Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing a String to a DLL
Message
De
27/04/2001 11:40:17
 
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00499201
Message ID:
00500778
Vues:
20
>>Ok, it's a dll written in straight C and it wasn't built on my computer. I tried registering the dll (using regsvr32) but I got the "no entry point" message. I almost always get this message to a point that I think that my "regsvr32" program is corrupted. So, I wouldn't mind the message.
>>
>>Now, what do you mean when you say that I need to set a reference to the componenent?
>
>Since it is a real library, you don't have to set a reference and you can't register it.
>
>Have you changed the declaration to ByVal?
>
>Do you have the real declaration in C?

I changed the declaration back to ByVal and it's still not working.

It's defined as a LPSTR variable in the dll.

Now, I got tired of trying different combinations and I wrote a message to the creator of the dll. He wrote back and told me how he was using it in VB. All I had to do was to declare it as a string ByVal and pass a string of fixed length. It still didn't work and what I discovered was that I had to create an executable and run it (instead of hitting the "play" button in the VB dev. environment) for the program to work.

So, I had it right the first time but I was running it from the VB environment and it looks like I can't do that. Any ideas why?

Plus, you say that it is a "real" library. What's a real library, what's an example of an "unreal" one and in what cases should I register a library?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform