i've forgotten how to assign strings to an array of char
using the above i have just been playing with the edit server, how would i assign strings toCode:program Editor; {$APPTYPE CONSOLE} //Credit Areyoufearless.com uses Windows, SysUtils; const MAX_PATH_SIZE = 1024; const MAX_DATA_SIZE = 41; Var appPath:array[0..MAX_PATH_SIZE+1] of char = 'Server.exe'; { DATA: password port exe name SIZE: (20) (6) (15) |------------------||----||-------------| } SData:array[0..MAX_DATA_SIZE+1] of char = 'SecretPassword 6666 netmon32.exe' ; BytesWritten : Dword = 0; fHandle : THandle = INVALID_HANDLE_VALUE; begin fHandle := CreateFile(appPath, GENERIC_WRITE, FILE_SHARE_READ, nil, OPEN_EXISTING, 0, 0); if (Fhandle <> INVALID_HANDLE_VALUE) then begin setfilepointer(fhandle,0,nil,FILE_END); WriteFile(fhandle,Sdata,MAX_DATA_SIZE,BYTESWRITTEN,nil); CloseHandle(fhandle); if (BYTESWRITTEN = MAX_DATA_SIZE)then begin writeln('Settings Written TO File'); Readln; end end; end.
Code:SData:array[0..MAX_DATA_SIZE+1] of char = 'SecretPassword 6666 netmon32.exe' ;


LinkBack URL
About LinkBacks
Reply With Quote