pb dll in vc++

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Kendrel.

I have asked danilo already in irc and also wrote an email to fred about this problem.

my problem is that i tried to use a pb dll with vc++, and cant get it to work.
danilo already told me that pb creates stdcall dlls, and that was the first mistake i made when i tried to do it on my own.

whatever... i have not used a dll with vc++ before, and would need a working example how to link (static and dynamic) a dll with vc++.

i know all files are beeing created (except for the .h file maybe) from pb, but iam really sick and have spend hours on this.

i think more people would be interested in this, but even if iam the only one... it would be VERY nice if you could help me out... iam stuck!

thx for reading...

kendrel
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

I use PB DLL with VC++ and it works perfectly. You just have to us the regular API functions to use it or build a standard .lib with the functions.


YourLib = LoadLibrary(..)
YourFunc = GetProcAddress(...)
(YourFunc)(...).





Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Kendrel.

So you dont use the files generated by purebasic?
If iam right there is already an import library that is supposed to be used inside vc++.

your example would load the dll dynamic... hmmm

would you be so nice and take the time for a little downloadable example (including source) ?! iam confused a little...

kendrel
Post Reply