| |
|
|
| CompileMarkSeparationcls
print getComputerAndUserName()
waitinput
end
proc getComputerAndUserName
var sz&=256
var m&=external("kernel32.dll","GlobalAlloc",64,sz&)
ifnot external("secur32.dll","GetUserNameExA",2,m&,addr(sz&))
external("kernel32.dll","GlobalFree",m&)
return ""
endif
var s$=char$(m&,0,sz&)
external("kernel32.dll","GlobalFree",m&)
return s$
endproc
or. xpse CompileMarkSeparationor. nativ: CompileMarkSeparationcls
print getComputerAndUserName()
waitinput
end
nproc getComputerAndUserName
string sz="xFFzzzz",
sm=space$(256)
long dll=loadLibrary("secur32.dll")
setlong(sz,1,call(getProcAddress(dll,"GetUserNameExA"),2,sm,sz))
freeLibrary(dll)
casenot long(sz,1) : return ""
return char$(sm,0,ord(sz))
endproc
|
|
|
| |
|
|
|
ByteAttack | functions lovely under Win7/64bit and under VMWare WinXP. praise and reward |
|
|
| |
|
|
|
| salvo! |
|
|
| |
|
|