Article View: borland.public.cppbuilder.nativeapi
Article #2448File access syncronization
From: Goran Ekstrom
Date: Sun, 18 Feb 2007 21:49
Date: Sun, 18 Feb 2007 21:49
16 lines
1580 bytes
1580 bytes
Hi, need to synch file access to a file created by another app. The idea here is to use mutually exclusive file locking where the creator opens/creates, writes and closes and the reader waits for access and then opens exclusively. When the reader is ready, the file should be removed and the writer then recreates the file next time. It is this Open-then-delete part in the reader app. that I am wondering about. How can I open, close, delete without any access time gaps here? One idea is to rename the file, assuming the rename function is lock aware but there is only a STDIO function called "rename" available as i seems. Will this function do or do you have any other ideas? Thanks Goran Ekstrom Close Talk Marketing
Technical Details
Message-ID:
<45d8c9b8$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,b0ad3456f545786c,start X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Goran Ekstrom" <goek!removeantispam!@telia.com> Newsgroups: borland.public.cppbuilder.nativeapi Subject: File access syncronization Date: Sun, 18 Feb 2007 22:49:14 +0100 Lines: 18 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1896 NNTP-Posting-Host: 81.235.179.15 Message-ID: <45d8c9b8$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1171835320 81.235.179.15 (18 Feb 2007 13:48:40 -0800) Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail