Advertisement
MichaelPetch

Russian MASM64 example SO

Sep 21st, 2022 (edited)
227
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 1 0
  1. OPTION DOTNAME
  2. option casemap:none
  3.  
  4. include G:\Programs\Soft\Coding\MASM\masm64\Include\win64.inc
  5. include G:\Programs\Soft\Coding\MASM\masm64\Include\kernel32.inc
  6. include G:\Programs\Soft\Coding\MASM\masm64\Include\user32.inc
  7. include G:\Programs\Soft\Coding\MASM\masm64\Include\ADVAPI32.inc
  8. include G:\Programs\Soft\Coding\MASM\masm64\Include\temphls.inc
  9. include G:\Programs\Soft\Coding\MASM\masm64\Include\unicode_string.inc
  10.  
  11. includelib G:\Programs\Soft\Coding\MASM\masm64\lib\user32.lib
  12. includelib G:\Programs\Soft\Coding\MASM\masm64\lib\kernel32.lib
  13. includelib G:\Programs\Soft\Coding\MASM\masm64\lib\comctl32.lib
  14. includelib G:\Programs\Soft\Coding\MASM\masm64\lib\gdi32.lib
  15. includelib G:\Programs\Soft\Coding\MASM\masm64\lib\advapi32.lib
  16.  
  17. OPTION PROLOGUE:rbpFramePrologue ; This option is required per the Russian DOCS
  18. OPTION EPILOGUE:rbpFrameEpilogue
  19.  
  20. .data
  21. nFILE db 'OSPFv3.txt', 0
  22. .code
  23. WinMain proc <7> ; 7 is the most number of function arguments passed to Invoke in this function
  24. ; See docs here: http://dsmhelp.narod.ru/environment.htm
  25. local dummy:dword ; Seems you need to have at least one local for Invoke to work! Bug?!?
  26.  
  27. invoke CreateFile, &nFILE, GENERIC_READ or GENERIC_WRITE, NULL, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL ;Создаю файл
  28. invoke ExitProcess, NULL
  29. WinMain endp
  30. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement