How do I make a dll wrapper
Blitz3D Forums/Blitz3D Programming/How do I make a dll wrapper
| ||
Well I asked this once but I didnt get many response's. I was looking for a good tutorial on how to make decl files and wrap dll's so that I can use custom dll's with blitz or so that I may wrap other dll's. I do not have extensive c++ knowledge but I am in the process of learning, I was under the impression that wrapping dll's was fairly easy but very time consuming is that true? if someone could point me to a good tutorial or kind of explain how I would go about wrapping a dll? the example that Blitz research made dosnt really explain much. |
| ||
The problem with wrapping is that you have to wrap / emulate especially the object based stuff to something Blitz can handle: integers, floats or strings and handle the object based stuff using to this "indices". There isn't much more "magic" which this topic as you simply call functions with the number of bytes which are used for input ( 4 bytes per variable, even for strings ) |
| ||
@ckob Do you want to: 1) Write headers for a dll. 2) Make a dll wrapper (a dll that calls a dll that Blitz otherwise can not use) |
| ||
I think it would be option 2 :P say I was going to use a directx dll or something with blitz what would I need to do? |
| ||
That is next to impossible. You would need to create a large system around DX to handle all its objects, interfaces etc so in the end you could write an engine in C++ or something like that and then compile it as Blitz usable DLL ... |
| ||
I was using directx as an example lol,ok say I wanted to use a diffrent dll I dont know any dll all I want to do is be able to use it with blitz to use the features in the dll i dont know what I need to do maybe its option 1 *shrugs* not sure thats why I asked |
| ||
You will need to create a system that handles the objects and interfaces of the dll and provides access and control over them with the possibilities of Blitz3D. If the DLL is simple C or other non-oop stuff, the wrapper becomes easier. |
| ||
tutorials...examples.. please |
| ||
*Bump* I would really like some help if anyone could be so kind as to tell me were to find a good tutorial or even give me an example |
| ||
for example tokamak wrapper which is opensource? :) |
| ||
ckob (Posted 2004-09-08 08:28:27) Maybe you would like him to write it for you as well??? tutorials...examples.. please |
| ||
yeah thanks for the idea...screw coding Dreamora can you just write it for me. If your not going to post something useful then please dont post. Dreamora thanks ill look into that. |
| ||
Recently I wrote a very simple DirectX9 wrapper just to see if I could get DX9 to render in blitz. I could clean up the code and try to write a tutorial on it. It's not much though, just three exported functions. One to initialize the DX device, one to render and one to cleanup and release the DX objects. |
| ||
tutorials...examples.. please Follow the link in my signature for (almost) complete OpenGL 1.1 headers. |
| ||
thanks everyone :) |
| ||
I wrote a tutorial. You find it here-> http://www.blitzbasic.com/Community/posts.php?topic=38319 |
| ||
thanks ill check it out |