Using .NET DLL in PureBasic

Everything else that doesn't fall into one of the other PB categories.
gamecoders
User
User
Posts: 13
Joined: Wed May 28, 2003 2:41 pm
Location: Italy

Using .NET DLL in PureBasic

Post by gamecoders »

Is possible to use a .NET dll in purebasic? do you have a sample of a wrapper?
thx
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

.net DLL Assembly? You could if you wrap it with a COM wrapper. Check out the .NET docs for more info. Then use the Interface to access your COM.

Donno why you would want to use an "interpreted language" dll instead of a real programming language library...?
gamecoders
User
User
Posts: 13
Joined: Wed May 28, 2003 2:41 pm
Location: Italy

Post by gamecoders »

i am interested to create a good set of function used in .net for creating a complete framework for purebasic and darkbasic
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

That would require people to install a 30MB+ runtime library in order to use your app :) But oki dok :D
Kanati
New User
New User
Posts: 9
Joined: Fri Jun 27, 2003 7:00 pm
Contact:

Post by Kanati »

That's ok, the .NET runtimes are included to be included in the next XP service pack I believe. And in the next iteration of windows as well. I remember going through the same thing with people tossing hissy fits with each new version of visual basic too. Now the runtimes are included with windows and no one thinks twice about it.
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

Hehe, exactly :) And dont forget that the source to your DLL is open for anybody to look at :D whoo hoo! anyways, to answer your question..

Ergh, I think I already did. In .NET there is a way to convert over your DLL Assembly to be accessable via COM environment. This will allow PB access to it. However, you have to use interfaces just like you would when accessing DX DLLs. Should work though.

Any chance I could get you to explain more about your project? I mean, are you doing something like... allowing purebasic and powerbasic users use the .NET framework? That would be kinda cool, in a weird sorta way. :D
Mortamer
User
User
Posts: 36
Joined: Mon Dec 29, 2003 5:07 pm

Post by Mortamer »

Sounds good to me, I don't know if I'd use .net much but it'd be nice to see what all the fuss is about :P .
pieter
New User
New User
Posts: 6
Joined: Sat Jun 14, 2003 9:16 pm

Post by pieter »

Hi, there is another way.

Write the DLL using managed extensions for VC++. Then your DLL can be accessed directly using the standard PB "OpenLibrary()" etc... functions and VC++.NET handles the marshalling to the .NET framework at the lowest level.

Anybody interested :?:

Cheers,
Pieter Greyling
[-pg-]
Post Reply