Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to call this C# function from VFP 8.0
Message
De
11/08/2005 15:40:52
 
 
À
09/08/2005 14:20:37
Joel Leach
Memorial Business Systems, Inc.
Tennessie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01039530
Message ID:
01040384
Vues:
13
Yes, the company sent us a COM DLL

It was easier to work.

Thank you.


>Juan,
>
>As Martin said, the object has to be made available using COM. Assuming that it is, the initialization will look something like this:
>
>Local loCheckDigit as ValidacionClaveSecreta.CheckDigitGeneration
>
>loCheckDigit = CreateObject("ValidacionClaveSecreta.CheckDigitGeneration","001123456789")
>
>There's only one problem: this code won't work. Someone correct me if I'm wrong, but I don't think you can pass parameters to a constructor (Init()) over COM. So you'll need some other way to set the value. If there was a method called setCheckValue(), then you're code would look something like this:
>
>Local loCheckDigit as ValidacionClaveSecreta.CheckDigitGeneration
>
>loCheckDigit = CreateObject("ValidacionClaveSecreta.CheckDigitGeneration")
>loCheckDigit.setCheckValue("001123456789")
>? loCheckDigit.getCheckDigit().ToString()
>
>
>
>>Hi, I am trying to use a C# function assembled in a DLL, it was provided by another company but I get this error "Cannot find entry point".
>>
>>I am trying this code:
>>
>>DECLARE integer getCheckDigit IN ValidacionClaveSecreta.dll
>>? getCheckDigit("001123456789")
>>
>>
>>Or should I use CreateObject() ?
>>
>>
>>Please any one could tell me how to do it.
>>This function receives a string of digits and returns an integer (Check Digit)
>>
>>I already registered the DLL (ValidacionClaveSecreta.DLL) under .Net Configuration 1.1 but I don't know how to invoke it from VFP
>>
>>Only a member is exposed, the public function CheckDigitGeneration()
>>The company explains this C# sample code:
>>
>>
>>CheckDigitGeneration objCheckDigit = new
>> CheckDigitGeneration(txtClave.Text);
>> >lblCheckDigit.Text = objCheckDigit.getCheckDigit().ToString();
>>
>>
>>
>>Thanks,
>>
>>Juan C.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform