Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetComputerName API Call
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00227405
Message ID:
00227828
Views:
35
>>Hi Scott,
>>
>>Both parameters need to be passed by reference:
>>DECLARE SHORT GetComputerName IN Win32API;
>>  STRING @lpbuffer, INTEGER @nSize
>>lcbuffer = SPACE(260)
>>lnsize = LEN(lcbuffer)
>>llresult = (GetComputerName(@lcbuffer, @lnsize) # 0)
>>IF llresult
>>  ? LEFT(lcbuffer, lnsize)
>>ENDIF
>>The function actually returns a Boolean value. While a declaration of integer is probably more appropriate, I use a SHORT to help me distinguish the return value. In this case, a non-zero value equals true.
>>
>
>Hello George,
>PMFJI but I tried using this API and it always returns DESKTOP on my machine which is the share name I use for Win95 direct cable connection, any ideas?
>
Hi Pete,

I believe that it's returning the correct value. Check under the Network neighborhood Properties, identification tab. This value, naturally is stored in the registry.

>p.s. hope the project's going ok.

So far, so good< g >.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform