DLL

  • Thread starter Thread starter Tomas Andersson
  • Start date Start date
T

Tomas Andersson

Is it possible to make a DLL file that will be usable in other programs like
Powerbasic
 
Is it possible to make a DLL file that will be usable in other programs like
Powerbasic

PowerBasic can use COM components, so you can make your .NET dll a com
component, and it should be usable.
 
Tomas Andersson said:
Is it possible to make a DLL file that will be usable in other programs
like Powerbasic

In addition to the other reply: Simple function exports are not supported
in the "managed world" (.NET-based libraries).
 
Ive created a class in VB9.
What do I need to make it usable from Powerbasic,
Is functions declared public usable as is?
Do I need to enable Register for COM interop

My problem is that I have a program written in VB9.
In a farly short time I need to strip away the forms and turn the program
into a DLL.
This DLL will be used in a program written in Powerbasic.
And as I have a verry low intrest in redoing my program in Powerbasic I need
options.

Can I find examples of code that would work with Powerbasic.
 
Tomas said:
Ive created a class in VB9.
What do I need to make it usable from Powerbasic,
Is functions declared public usable as is?
Do I need to enable Register for COM interop

My problem is that I have a program written in VB9.
In a farly short time I need to strip away the forms and turn the
program into a DLL.
This DLL will be used in a program written in Powerbasic.
And as I have a verry low intrest in redoing my program in Powerbasic
I need options.

Can I find examples of code that would work with Powerbasic.

First you should understand what Interop means:
http://msdn.microsoft.com/en-us/library/zsfww439.aspx

If Powerbasic supports COM (as Tom says), you can write a COM dll:
http://msdn.microsoft.com/en-us/library/zsfww439.aspx

See also the other COM related sub topics under Interop.

Also in the VB docs:
http://msdn.microsoft.com/en-us/library/6bw51z5z.aspx


Armin
 
First you should understand what Interop means:
http://msdn.microsoft.com/en-us/library/zsfww439.aspx

If Powerbasic supports COM (as Tom says), you can write a COM dll:
http://msdn.microsoft.com/en-us/library/zsfww439.aspx

I should clarify... It depends on what version of PB they are using. As I
recall, only the last two versions have supported COM (8 and 9). So, the OP
will want to make sure that the version they are using has that support.
Other wise, he can make use of the technique I wrote about on my blog

http://tomshelton.wordpress.com/2008/11/01/calling-managed-code-from-a-dll-created-in-visual-c-2008/

Essentially, creating a C++ wrapper dll for his VB.NET dll. This will allow
the PB program to call the C++ dll functions just like any other API call...
And that is definately supported in all versions of PB.
 
Back
Top