Jump to content
Tuts 4 You

Writefile


5k3l3t0r

Recommended Posts

Posted

hi all,

i have a prob...

i need to write a text line to an existing .txt

i try WriteFile but nothing...

i think my prob is geting the handle of the .txt file

can someone help me?

by all

5k3l3t0r

Posted

Which language do you want....Writefile will work only after file has been opened..Use CreateFile for getting handle first

Posted

also use SetFilePointer to set start of write, for example if you wanna append text to file

Posted

sry, and tkx for answer me...

the language is ASM.

can you give me an example... please...

bye

5k3l3t0r

Posted

suggest using google first but I'll post an example tomorrow ;)

Posted

tkx, but i solved my prob... i try to send you a message but i get this error:

-You are not allowed to use the messenger feature on this board-

do you know why???

bye

5k3l3t0r

Posted

probably you are on trial, and not yet full member

example what for? wanna know what api does? www.msdn.com

invoke CreateFile,o file_name,GENERIC_WRITE,0,0,OPEN_EXISTING,FILE_ATTRIBUTE_ARCHIVE,0

mov file_handle,eax

invoke WriteFile,file_handle,eax,ecx,o buff,0

invoke CloseHandle,file_handle

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...