PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Help with GAPI

What do i need to change in gx.h to get it to compile in C

Mr East pointed me in a direction in another thread, he said add some struct definitions

Would this be correct

GXDLL_API struct GXDisplayProperties
Or does anyone have or know where i can get a C definition
That's right. You also have to modify GXGetDefaultKeys.

Code:

//The following two lines modified by Dan East to make this header C compatible:
//Added "struct" to the following two prototypes:
GXDLL_API struct GXDisplayProperties GXGetDisplayProperties();
GXDLL_API struct GXKeyList GXGetDefaultKeys(int iOptions);


Dan East
Yep .got that working
thanks for the help. i looked at your quake source also, as i should have done in the first place.

Another question::

I see that you have used the dllLoad, Is this a more efficient and correct way to be doing things ?

Once again thanks for the above help
The main reason to dynamically load a DLL instead of statically linking to it is to allow you programatic control if the DLL is not found. If an application is statically linked to a DLL, and that DLL cannot be found when Windows CE loads the application, then the OS displays a cryptic message that the program cannot be executed. It does not even indicate the name of the missing DLL. If you load dynamically then you can provide a detailed error message if the dll cannot be found, or use some alternate routines in place of the DLL (like rendering to a regular Window DC).

Performance-wise there is no difference.

Dan East
Thanks.

Ill use your way, it seems more appropriate as i prefer good error trapping