Well i have never used dlls from win dir, just started to look on the app called API guide and found an function i want to use in :
GetUserName
from the Advapi32.dll
i tried like this:
function getProfileName()
local Advapi32 as Integer
local result as string
repeat
inc Advapi32
until Dll Exist(Advapi32) = 0
Load Dll "Advapi32.dll", Advapi32
result = Call Dll(Advapi32, "GetUserName",0)
Delete Dll Advapi32
endfunction result
bit it didnt work, i suppose it is becuse the parameters or what it is called, how do i make this work so it returns the user name?
here is the declaration i got from API guide
Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
and here is the function name (well you guys prob already got the name of it):
GetUserName
Please make an example source and please explain what i did wrong and what all in your source does. I want to learn something to
You never fail, only make mistakes.