Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetComputerName API Call
Message
From
09/06/1999 10:27:46
 
 
To
08/06/1999 09:39:58
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00227405
Message ID:
00227872
Views:
14
>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

Have you tries SYS(0)in VFP???

Bernard
Previous
Reply
Map
View

Click here to load this message in the networking platform