|
-
Aug 22nd, 2023, 07:49 AM
#14
Re: Using a dll made by c++ for VB
 Originally Posted by PhotonBytes
Can you show me where you said something twice to me? Many apologies.
I sure can.
 Originally Posted by jmcilhinney
If it exports functions directly then you need to use Platform Invoke (pinvoke), just as you do for Windows API functions.
 Originally Posted by jmcilhinney
As I said previously, you will have to use pinvoke to call the unmanaged functions exported by your library.
 Originally Posted by PhotonBytes
If there is nothing for me to do on the C++ side what can I do on the VB side to make my c++ dll work?
Exactly what I already told you to do.
 Originally Posted by jmcilhinney
Basically, you declare a .NET method with the appropriate attributes that matches the signature of the unmanaged function you want to call. You then call your method and .NET will invoke the external function. You'll then need to deploy your unmanaged library with your .NET app. You might start here.
Did you follow the link that I went to the trouble of providing as a starting point for you, which provides an example of the sort of thing I described?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|