Writing a wrapper for a DLL

Blitz3D Forums/Blitz3D Programming/Writing a wrapper for a DLL

Craig H. Nisbet(Posted 2007) [#1]
Hey guys, I'd like to write a wrapper for a DLL that I found. What is the process for that? How do you get the Blitz language to see the DLL?


Gabriel(Posted 2007) [#2]
It depends entirely on the DLL.


Vertigo(Posted 2007) [#3]
Whats the DLL? As long as its a procedural C standard call libary and not like .net or managed or anything it should be doable. I was having problems with this a few weeks ago, and Kev helped out tremendously. Once you get the idea, and the basics down its really rather easy, just tedious.


Craig H. Nisbet(Posted 2007) [#4]
I found a tutorial post in the BLitz3D tutorial section, but the zip file with the tutorial doesn't open. Suck!


.rIKmAN.(Posted 2008) [#5]
Sweenie did a very good tutorial which you can find here: http://www.blitzbasic.com/Community/posts.php?topic=38319

edit: Just realised you said the files are missing...post your email and I`ll send them over to you.

If more people want it I`ll host it, just let me know :)


SabataRH(Posted 2008) [#6]
I could use this as well, thanks .rikman. Email addy in profile.


.rIKmAN.(Posted 2008) [#7]
I`ve hosted the tutorial on my website in case anybody else stumbles across this thread in the future.

It can be found at: http://www.ram-interactive.co.uk/C++WrapperTutor.rar

Hope it helps, it certainly helped me :)


Sweenie(Posted 2008) [#8]
Hi.

Sorry, I must have removed that tutorial by mistake.
It's back online now. =)


puki(Posted 2008) [#9]
Anybody know if we can basically *steal* stuff with this?

For example, lots of games use binkw32.dll for video playback - can this be wrapped to Blitz3D?

My brain is thinking there must be a lot of commercial game .dlls that we could potentially plunder.

I've got 1,431 of them in my games directory on my gaming system. There must be some in there that are worth stealing?

Any thoughts on this?


puki(Posted 2008) [#10]
Mmm, apparantly it just isn't that easy:
http://gmc.yoyogames.com/lofiversion/index.php/t266960.html

I no longer like this wrapper idea.

Load of rubbish.


Snarkbait(Posted 2008) [#11]
here's some info on bink
http://wiki.multimedia.cx/index.php?title=RAD_Game_Tools_Bink_API


puki(Posted 2008) [#12]
I'm not writing it - "Sweenie" can do it.

I've got lots more for him to work on. I suggest he finishes the Bink one pretty sharpish.

Under my management, Blitz will rule the wrapper waves.


Sweenie(Posted 2008) [#13]
I don't think I can afford a lawsuit from RAD Game Tools right now. =P


puki(Posted 2008) [#14]
Let me worry about any legalites. You just start the wrapper.

All my Bethesda and Arkane Studios media requires the user to have that media preinstalled - I 'piggyback' the installations.

The wrappers you are going to write for me are also going to 'piggyback' commercial dlls that are preinstalled. Nothing is being copied or distributed.

Let me know when the Bink one is done. I don't particularly need it, but I think Blitzers in general have a use for that one.


Dreamora(Posted 2008) [#15]
Piggyback anything without the license to use it in other projects is actually illegal. And commercial liceses do not give you the license to use any of the runtimes other than in the way given to you by them