views:

453

answers:

3

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 ) ) ); }

A: 

About the closest thing I know of would be: http://pinvoke.net/ Maybe they would share their data with you? They have a VS tool that accesses this data, so it may be a webservice. You might even be able to sniff that out.

Geoffrey Chetwood
+1  A: 

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.)

dguaraglia
+1  A: 

Of course, you have Microsoft Platform SDK, but it is in raw .h C code, so hard to parse!

Similar work have been done by VB users (and Delphi users and probably for some other languages), for example ApiViewer has such database, but in some proprietary binary format (.apv extension), so you might have to reverse-engineer it.
Similarly, there is an API-Guide, which was hosted at Allapi.net but the later seems to be a parking site now. It used .api files (again binary-proprietary).

PhiLho