Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GetComputerName API Call
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00227405
Message ID:
00227828
Vues:
36
>>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform