Page 1 of 1

DLL Questions ...

Posted: Fri Mar 07, 2008 12:19 pm
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 ,

Re: DLL Questions ...

Posted: Fri Mar 07, 2008 1:06 pm
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...