Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dll problem - help needed
Message
De
05/12/2000 11:26:06
John Baird
Coatesville, Pennsylvanie, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00449385
Message ID:
00449401
Vues:
10
Thanks for the quick response and quite correct answer. It works like a charm. I guess I'm going to have to bite the bullet and learn VB. I was going to wait unitl .net comes out, but I guess I'll start now.

Thanks again....



>John,
>In the VB syntax, the Alias "Open_Client" gives you the actual name in the DLL while the name is the "friendly" name you use to call it. Also, there is no ALIAS in VFP, it is AS. While it doesn't throw an error, it doesn't work because you can't use that name in function calls. Try:
>DECLARE INTEGER Open_Client IN imdsi.dll AS OpenClient  STRING lcServerName, INTEGER lnSystem
>
>HTH.
>
>>Hi guys:
>>
>>I hope someone can help me figure this out. I have a sample VB form that uses the following declaration and works flawlessly:
>>
>>from modDeclare
>>Public Declare Function OpenClient Lib "imdsi.dll" Alias "Open_Client" (ByVal ServerName As String, ByVal System As Integer) As Long
>>
>>from frmConnection
>>If frmConnection.optTestRegion Then
>> gClientHdl = OpenClient("www.whatever.com", Asc("T"))
>>End If
>>
>>
>>The foxpro equivalent:
>>
>>form.init()
>>DECLARE LONG OpenClient IN imdsi.dll ALIAS Open_Client STRING lcServerName, INTEGER lnSystem
>>
>>form.connect()
>>LPARAMETERS tcAddress, tnMode
>>LOCAL llRetVal
>>
>>WITH this
>> lnServerHandle = OpenClient(tcAddress, tnMode)
>> IF .nServerHandle > 0
>> llRetVal = .T.
>> ENDIF
>>ENDWITH
>>RETURN llRetVal
>>
>>I get an error "Cannot find Entry point OpenClient in the dll". Any ideas would be greatly appreciated.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform