Hi,
I've been getting some requests to provide PB bindings for my 2D rendering API, GameVision SDK. I'm in the process of doing this, but I'm having some problems.
Some of the routines are recognized and some are not. For example, I can call GV_LogFile_Write_(...), but not GV_App_ProcessMessages_(). I've checked the GV.bpl file and it seems ok. It looks like the whole GV_App_XXX family of routines do not work, yet other groups do. How is this possible?
I'm new to Pure Basic so most likely I am doing something wrong. I purchased it about a year ago, but not had a change yet to dive in until now. Any help is appreciated.
I've tried 3.90 and the 3.91 beta.
Here is a link to what I have so far:
http://www.jarroddavis.com/priv/gv_pb_wip.rar (~700KB)
Thanks
PB Bindings for GameVision SDK
-
- New User
- Posts: 7
- Joined: Sat May 22, 2004 1:24 pm
- Location: USA
- Contact:
-
- New User
- Posts: 7
- Joined: Sat May 22, 2004 1:24 pm
- Location: USA
- Contact:
Hi,
I used the Dll Importer tool. From what I understand you have to add the "_" to the end of imported routines when used in PB.
All of the routines in the GV.DLL are STDCALL and exported like such:
GV_App_ProcessMessages
GV_LogFile_Write
not like
_GV_App_ProcessMessages@0
_GV_LogFile_Write@1
Mmm.. maybe this could be the problem? The GV.DLL is written in Delphi and it does not add any decerations to the exported routines (see the view.txt file, which is a dump of the gv.dll).
Could this be a problem?
I used the Dll Importer tool. From what I understand you have to add the "_" to the end of imported routines when used in PB.
All of the routines in the GV.DLL are STDCALL and exported like such:
GV_App_ProcessMessages
GV_LogFile_Write
not like
_GV_App_ProcessMessages@0
_GV_LogFile_Write@1
Mmm.. maybe this could be the problem? The GV.DLL is written in Delphi and it does not add any decerations to the exported routines (see the view.txt file, which is a dump of the gv.dll).
Could this be a problem?
-
- New User
- Posts: 7
- Joined: Sat May 22, 2004 1:24 pm
- Location: USA
- Contact:
It might be the compiler and not the dll importer that's at fault. I had a quick look at what the importer had created from your 'gv.exp' file and to me it seemed to be ok.
Maybe someone from the PB team could help you or someone that's more experienced with these things than me.
[edit]
I have investigated/experimented a bit further and it seems to be an error in the compiler. Having the '_' character in a function name somehow screws up the internal list of functions, or it might be that the internal function search routine is faulty?
[/edit]
Maybe someone from the PB team could help you or someone that's more experienced with these things than me.
[edit]
I have investigated/experimented a bit further and it seems to be an error in the compiler. Having the '_' character in a function name somehow screws up the internal list of functions, or it might be that the internal function search routine is faulty?
[/edit]
-
- New User
- Posts: 7
- Joined: Sat May 22, 2004 1:24 pm
- Location: USA
- Contact:
Here's a list, made by Freak, of win API types and their corresponding type in PureBasic, which might be of use for you:
http://freak.coolfreepages.com/help/wintypes.zip
http://freak.coolfreepages.com/help/wintypes.zip
-
- New User
- Posts: 7
- Joined: Sat May 22, 2004 1:24 pm
- Location: USA
- Contact:
-
- New User
- Posts: 7
- Joined: Sat May 22, 2004 1:24 pm
- Location: USA
- Contact:
Hi,
I just converted the TestBed demo in the GVSDK to PureBasic. It seems to run good. You can download it here:
http://www.jarroddavis.com/priv/gv_pb_testbed.rar
The TestBed demo shows:
* Rendering (textures, Primitives)
* Audio (One shot & Looping Samples, Streaming music)
* Archive (Loading from standard zip files)
* Fonts
* Frame-Based Timing
* Dialog boxes
* Polygons
* Input
* Screen Shot
I had to make a few changes to the GV core so that it could work with PB. The changes are good because they are what are needed to make GV work better with more languages.
I converted a fair amount of the API over to PB. There is still much left to do, but this is a great start. I must say that PureBasic is powerful indeed.
You need DX9.0b to run this demo.
I just converted the TestBed demo in the GVSDK to PureBasic. It seems to run good. You can download it here:
http://www.jarroddavis.com/priv/gv_pb_testbed.rar
The TestBed demo shows:
* Rendering (textures, Primitives)
* Audio (One shot & Looping Samples, Streaming music)
* Archive (Loading from standard zip files)
* Fonts
* Frame-Based Timing
* Dialog boxes
* Polygons
* Input
* Screen Shot
I had to make a few changes to the GV core so that it could work with PB. The changes are good because they are what are needed to make GV work better with more languages.
I converted a fair amount of the API over to PB. There is still much left to do, but this is a great start. I must say that PureBasic is powerful indeed.

You need DX9.0b to run this demo.