Page 1 of 1
Using .NET DLL in PureBasic
Posted: Wed Dec 31, 2003 12:57 am
by gamecoders
Is possible to use a .NET dll in purebasic? do you have a sample of a wrapper?
thx
Posted: Wed Dec 31, 2003 1:06 am
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...?
Posted: Wed Dec 31, 2003 1:42 am
by gamecoders
i am interested to create a good set of function used in .net for creating a complete framework for purebasic and darkbasic
Posted: Wed Dec 31, 2003 4:19 am
by Shannara
That would require people to install a 30MB+ runtime library in order to use your app

But oki dok

Posted: Wed Dec 31, 2003 6:12 pm
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.
Posted: Wed Dec 31, 2003 7:18 pm
by Shannara
Hehe, exactly

And dont forget that the source to your DLL is open for anybody to look at

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.

Posted: Fri Jan 02, 2004 4:59 pm
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

.
Posted: Mon Feb 09, 2004 8:57 pm
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