Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the Win32 API function definition available in a "database"/XML format?

I'm looking for a list of win32 API in some "database"/XML format.

I'd need it to easily create a "conversion layer" between win32 API and the higher level language I'm using (harbour/xharbour). Since this runs Pcode, it is necessary to transform parameters to C standard...

Instead of doing manual code write, I'd like to automate the process...

just for example, the windows API definition (taken from MSDN)

DWORD WINAPI GetSysColor(
  __in  int nIndex
);

should be transformed in

HB_FUNC( GETSYSCOLOR )
{
    hb_retnl( (LONG) GetSysColor( hb_parni( 1 ) ) );
}

1 Answers

AFAIK, pinvoke.net only stores text data with the PInvoke definition for the call. Not very useful if what you want is something to use as a pre-parsed database of APIs.

Probably you could create an small parser that will take the include file and translate it to what you need. In that case, I'd recommend using lcc-win32's include files, as they are pretty much fat-free/no-BS version of the SDK headers (they don't come with a bunch of special reserved words you'd have to ignore, etc.)

like image 128
dguaraglia Avatar answered Apr 03 '26 23:04

dguaraglia



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!