Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Computer Name
Message
De
27/10/2001 21:17:04
Charles Richard
Nvo Management Systems
Boisbriand, Québec, Canada
 
 
À
27/10/2001 20:53:45
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00574190
Message ID:
00574198
Vues:
22
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform