flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
baldr
vagination,
When in doubt, RTFM. MSDN wrote: If the lpFileName parameter does not contain a full path and file name for the file, WritePrivateProfileString searches the Windows directory for the file. If the file does not exist, this function creates the file in the Windows directory. |
|||
![]() |
|
vagination
Solucion using GetFullPathNameA.
GetPrivateProfileString confused me because it does not need the full path. Code: Code: Format PE GUI Entry start include "win32ax.inc" section '.data' data readable writeable Seccion db 'Download', 0 Key db 'File', 0 String db 'program.exe',0 Config db "Update.ini",0 Path db 256h DUP (0) section '.text' code readable executable start: push 0 push Path push 256h push Config call [GetFullPathNameA] push Path push String push Key push Seccion call [WritePrivateProfileStringA] push 0 call [ExitProcess] section '.idata' import data readable library kernel32,'KERNEL32.DLL',\ user32,'USER32.DLL' import kernel32,\ WritePrivateProfileStringA,'WritePrivateProfileStringA',\ ExitProcess,'ExitProcess',\ GetFullPathNameA,'GetFullPathNameA' section '.reloc' fixups data readable discardable Regards. |
|||
![]() |
|
baldr
vagination,
256h seems too arbitrary, you may use MAX_PATH instead. And those bytes don't have to be initialized. It always makes me curious why somebody would include "win32ax.inc" and not use its features, like enhanced invoke and automatic API imports. Relocations for PE .EXE with default base look suspicious too. |
|||
![]() |
|
typedef
vagination?
|
|||
![]() |
|
vagination
typedef: hahahaa ! xD
baldr: Now use MAX_PATH... include "win32ax.inc" , is habit ;P |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.