Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Computer Name
Message
From
27/10/2001 21:17:04
Charles Richard
Nvo Management Systems
Boisbriand, Quebec, Canada
 
 
To
27/10/2001 20:53:45
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00574190
Message ID:
00574198
Views:
23
Here is the fixed code:
LOCAL lnBuffer_Size, lcBuffer, lcComputerName, lnResult
lnBuffer_Size = 100
lcBuffer = SPACE(0)

DECLARE INTEGER GetComputerName IN kernel32 ;
  STRING @lcBuffer , INTEGER @lnBuffer_Size
lcComputerName = REPLICATE(CHR(0),lnBuffer_Size)
lnResult = GetComputerName(@lcComputerName, lnBuffer_Size)
lcComputerName = LEFT(lcComputerName,AT(CHR(0),lcComputerName)-1)
IF lnResult # 0
  MESSAGEBOX(lcComputerName)
ENDIF
HTH
>Sergey,
>
>I can't get this to work. I get an error that BUFFER_SIZE is not a variable.
Charles Richard
NVO Management Systems
crichard@nvo.ca
Previous
Reply
Map
View

Click here to load this message in the networking platform