
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 machine network name
Try this for machine name...
CLEAR LOCAL
LOCAL FN getMachineName$
DIM stHdl&, size&, machineName$
stHdl& = FN GETRESOURCE(_"STR ",-16413) 'get hndle to users name STR
LONG IF stHdl& 'check if valid resource
size& = FN SIZERESOURCE(stHdl&) 'size in bytes
BLOCKMOVE [stHdl&], @machineName$, size& 'move text into string
CALL RELEASERESOURCE(stHdl&) 'get rid of handle
XELSE
userName$ = "(not available)"
END IF
END FN = machineName$
|