--- [EMAIL PROTECTED] wrote:
> Joe Wilson <[EMAIL PROTECTED]> wrote:
> > --- [EMAIL PROTECTED] wrote:
> > > Is there something that the SQLite core can do better?
> > 
> > Perhaps exclusive locks on journal files would help avoid this problem.
> > Or are the -journal and etilqs_* files supposed to be sharable by other 
> > sqlite processes?
> 
> They are, at least on unix.  On unix, both files are opened with
> the O_EXCL flag.  How do I do the same thing for windows?

I'm just guessing, but LockFileEx() and LOCKFILE_EXCLUSIVE_LOCK might do
the trick:

 http://msdn2.microsoft.com/en-us/library/aa365203.aspx

Unfortunately, the open and exclusive lock combination is not atomic.

There's also this - CreateFileTransacted():

 http://msdn2.microsoft.com/en-us/library/aa363859.aspx

which has the argument:

 dwShareMode
    ...
    If this parameter is 0 (zero) and CreateFileTransacted succeeds, 
    the object cannot be shared and cannot be opened again until the 
    handle is closed. 
    ...
    The sharing options remain in effect until you close the handle to 
    an object.



 
____________________________________________________________________________________
Expecting? Get great news right away with email Auto-Check. 
Try the Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html 

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to