If you are using DBC, you'll need the enhanced version. You'll also need to know a little bit about memblocks.
[EDIT]
In this example, I originally create buffer that will return the user name to a maximum of 200 characters. This could adjusted to your needs:
Make Memblock 1,200
But right after I wrote it, I remembered that DBC sends the pointer of a string to a dll so I could just use a string variable instead. But if I want more that 255 characters or I want to limit the number of characters, I could use a memblock to store the buffer. The version I'm posting here will be with a string variable instead of memblock 1 because it's just a little bit easier.
Memblock 2 is just a pointer to a DWORD which is where I store the length of the previously defined buffer for the user name. I make the memblock 4 bytes in length, then set it's value to the length of the buffer (200).
The name is returned in lpBuffer$
If result is 0, then the call failed.
advapi32=1
load dll "ADVAPI32.DLL",advapi32
make memblock 2,4
write memblock dword 2,0,200
lpnsize=get memblock ptr(2)
result=call dll(advapi32,"GetUserNameA",lpBuffer$,lpnsize)
print result
print lpBuffer$
delete dll advapi32
Enjoy your day.