Go Back   FlashFXP Forums > >

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

Closed Thread
 
Thread Tools Rate Thread Display Modes
Old 09-02-2003, 09:01 AM   #1
b>d>>s
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
w3rd
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
FTPServerTools
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: Sep 2002
Posts: 543
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
b>d>>s
Senior Member
 
Join Date: Feb 2003
Posts: 488
Default

ok, cheers :O
b>d>>s is offline  
Closed Thread

Tags
control, files, lock, server, thx

Thread Tools
Display Modes 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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New user question xymichael General Discussion 1 01-18-2005 12:21 AM


All times are GMT -5. The time now is 12:04 AM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)