
FB II Compiler
PG PRO
Debugging
Memory
System
Mathematics
Resources
Disk I/O
Windows
Controls
Menus
Mouse
Keyboard
Text
Fonts
Drawing
Sound
Clipboard
Printing
Communication
ASM
|
COMMUNICATION
Get the network username
Try this...
CLEAR LOCAL
LOCAL FN getUserName$
DIM stHdl&, size&, userName$
stHdl& = FN GETRESOURCE(_"STR ",-16096) 'get hndle to users name STR
LONG IF stHdl& 'check if valid resource
size& = FN SIZERESOURCE(stHdl&) 'size in bytes
BLOCKMOVE [stHdl&], @userName$, size& 'move text into string
CALL RELEASERESOURCE(stHdl&) 'get rid of handle
XELSE
userName$ = "(not available)"
END IF
END FN = userName$
|