General information
Category:
Windows API functions
Title:
GetComputerName API Call
Greetings,
I need to be able to get the computer name and I am having some difficulties. Below is my sample code.
(VFP 3.0). I have also tried it my removing the @ symbol.
**--Sample Code
DECLARE INTEGER GetComputerName IN Win32API STRING @cReturnBuffer, INTEGER nBufferSize
LOCAL lcresult, cReturnBuffer, nBufferSize
lcresult = ""
cReturnBuffer = SPACE(1024)
nBufferSize = LEN(cReturnBuffer)
nBufferSize = GetComputerName(@cReturnBuffer, nBufferSize)
IF nBufferSize > 0
lcresult = LEFT(cReturnBuffer, nBufferSize)
?lcresult
ENDIF
Thanks in advance,
Scott
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only