DLL Questions ...

Just starting out? Need help? Post your questions and find answers here.
Yourself
User
User
Posts: 17
Joined: Fri Jan 18, 2008 2:47 pm

DLL Questions ...

Post by Yourself »

Can PureBasic call dotNet compiled dlls directly?
Is there a library which can do this if it cant?
Also when coding dlls, are variables remembered between different procedures?

Code: Select all

ProcedureDLL decl_var()
myvar.l= 6
EndProcedure

ProcedureDLL use_var()
decl_var()
MessageRequester('',myvar) ; is myvar recognised here ?
EndProcedure
Can a dll have internal Procedures outside exported one ?
Like : -

Code: Select all

Procedure InternalProc()
MessageRequester('','')
EndProcedure

ProcedureDLL TestProc()
InternalPro()
EndProcedure
;will calling TestProc throw an error ?
Help me with these!
Thanks ,
milan1612
Addict
Addict
Posts: 894
Joined: Thu Apr 05, 2007 12:15 am
Location: Nuremberg, Germany
Contact:

Re: DLL Questions ...

Post by milan1612 »

Yourself wrote:Can PureBasic call dotNet compiled dlls directly?
Is there a library which can do this if it cant?
No, but one way could be to write a wrapper library with C++/CLI (.Net)
and export the necessary functions via native interface...
Yourself wrote:Also when coding dlls, are variables remembered between different procedures?
No, only if you declare them global. (EDIT: or static/shared)
Yourself wrote:Can a dll have internal Procedures outside exported one ?
Yes, that's no problem...
Windows 7 & PureBasic 4.4
Post Reply