Go Back   FlashFXP Forums > Community Chatter > Programming

Programming Need help with C/C++/Delphi? Ask here and make us all laugh.

Closed Thread
 
Thread Tools Rate Thread
Old 09-02-2003, 09:01 AM   #1
Senior Member
 
Join Date: Feb 2003
Posts: 488
Default locking/unlocking files with c ?

hi, ive looked everywhere (still looking...) for examples on how to do this,

i know naff all about c so any help plz ?

+ theres no way to use lock resources via itcl for files outside of server control ?

thx

and if u want to write me an exe to lock/unlock file thatd be g*

b>d>>s is offline  
Old 09-02-2003, 06:00 PM   #2
Junior Member
 
Join Date: Aug 2003
Posts: 12
Default

afaik any file that is fopen()'d is locked while that program is still running and the file handle is still active(fclose() wasn't called)

correct me if i'm wrong ?

w3rd
w3rd is offline  
Old 09-03-2003, 02:37 AM   #3
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: Sep 2002
Posts: 558
Default

Open the file in write mode. That should lock it properly.
Also check out http://msdn.microsoft.com/library/de...createfile.asp and http://msdn.microsoft.com/library/de...e/lockfile.asp and http://msdn.microsoft.com/library/de...lockfileex.asp etc.. Its just basic win api stuff...
FTPServerTools is offline  
Old 09-03-2003, 06:41 AM   #4
Senior Member
 
Join Date: Feb 2003
Posts: 488
Default

ok, cheers :O
b>d>>s is offline  
Closed Thread
Create a free account to browse our forums without ads



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
New user question xymichael General Discussions 1 01-17-2005 11:21 PM


All times are GMT -5. The time now is 11:53 AM.