What i'm trying to do here is pretty obvious. But why won't it work for me??? .386 .model flat, stdcall option casemap:none include \masm32\include\windows.inc include \masm32\include\kernel32.inc include \masm32\include\user32.inc include \masm32\include\advapi32.inc includelib \masm32\lib\kernel32.lib includelib \masm32\lib\user32.lib includelib \masm32\lib\advapi32.lib .data MsgCaption db "User Info:",0 MsgBoxText db "The current user logged in is: %s",0 .data? UserName db 256 dup (?) Buffer db 512 dup (?) .code start: invoke GetUserName, UserName, sizeof UserName invoke wsprintf, addr Buffer, addr MsgBoxText, addr UserName invoke MessageBox, NULL,addr Buffer, addr MsgCaption, MB_OK invoke ExitProcess,NULL end start
Posted on 2001-04-02 17:53:00 by Nokturnal
Nok,
.data? UserName db 256 dup (?) Buffer db 512 dup (?) .code start: invoke GetUserName, UserName, sizeof UserName
Replace with: .data? UserName db 127 dup (?) nSize dd sizeof UserName .code invoke GetUserName, addr UserName,addr nSize forge
Posted on 2001-04-02 19:19:00 by forge