Page 1 of 1
Cool unmentioned Pb feature
Posted: Tue Feb 28, 2006 7:06 pm
by Nik
First we have to thank Fred for making the Compiler produce a .lib file when compiling as dll. And thanks for the import function because now we cann do the following:
This code is compiled as DLL for example with pb 3.94
Code: Select all
ProcedureDLL MakeSth(Val.l)
MessageRequester("TeHTEst",Str(Val.l))
EndProcedure
Now we copy the NameofDLL.lib file int the directory of the sourcode for our Version 4.0 program.
Here is the code we right in 4.0 to use the function from 3.94
Code: Select all
Import "NameofDLL.lib"
MakeSth(Val.l)
EndImport
MakeSth(45)
Thats an absolutley WOW Feature I think
Posted: Tue Feb 28, 2006 7:21 pm
by freak
Keep in mind that the program will still require the dll to run. the generated .lib is only an import library (wrapper to the dll)
Posted: Tue Feb 28, 2006 7:26 pm
by Nik
As an alternative one could use Prototypes

Re: Cool unmentioned Pb feature
Posted: Tue Feb 28, 2006 7:57 pm
by DarkDragon
Nik wrote:Thats an absolutley WOW Feature I think
WOW sucks! GPI and Epyx have gone because of it.
But the feature is nice, yeah

Posted: Tue Feb 28, 2006 8:26 pm
by Flype
yes really useful, i like this feature a lot.
ps: what WOW means ? (i don't understand, i'm french)
Posted: Tue Feb 28, 2006 8:31 pm
by Polo
World of Warcraft

Posted: Tue Feb 28, 2006 10:25 pm
by Shannara
freak wrote:Keep in mind that the program will still require the dll to run. the generated .lib is only an import library (wrapper to the dll)
To get around that, you can use the PBOSL library to call function in memory, thus include the dll in a user library that wraps that library of sorts ...
Posted: Tue Feb 28, 2006 10:45 pm
by Bonne_den_kule
Polo wrote:World of Warcraft

The new weapon of mass destruction, together with dick cheney.
Re: Cool unmentioned Pb feature
Posted: Tue Feb 28, 2006 11:34 pm
by va!n
DarkDragon wrote:Nik wrote:Thats an absolutley WOW Feature I think
WOW sucks! GPI and Epyx have gone because of it.
What? GPI and Epyx left PureBasic? :roll: