Re: generated stubs fail to compile

Paul Marquis <[email protected]> Thu, 17 Aug 2006 07:15:05 -0400
Newsgroups gmane.comp.windows.devel.jawin
Message-ID <[email protected]>
Josh Passenger wrote:
> Hi Ed,
>
> Yes these failures do make sense...
>
> Basically the MS type lib system allows for a gazillion type mappings, each
> requiring some sort of special handling to map these to jawin code.
>
> The native side of the parser, written in C++ and used by the type browser,
> loads the type library and tries to generate an intermediate XML file,
> which
> the type browser styles using XSLT into java wrapper code.
>
> The failure you are seeing is occurring in the type parser, the java code
> that interfaces with the native code:
>
> http://jawinproject.cvs.sourceforge.net/jawinproject/jawin/src/org/jawin/browser/typelib/TypeParser.java?view=markup
>
>
> I think this code still needs some tidying up...
>
> Basically the issue you are seeing is that when the native type info is
> coming back its matched up to type configuration which details how the
> jawin
> conversion should occur and this is stored in this file:
>
> http://jawinproject.cvs.sourceforge.net/jawinproject/jawin/config/typeconversion.xml?view=markup
>
>
> As you can see, typeconversion.xml has holes for the types you are
> trying to
> map: 6, 10 and 28
>
> I'm not sure exactly what these types are or why we didn't map them, its
> not
> very hard to add the mappings once you know what the code should look like
> on the jawin side.
>
> Anyone know what these types are and how they should be mapped?

 From WTypes.h in the Platform SDK

VT_CY       = 6,     // currency
VT_ERROR    = 10,    // SCODE
VT_CARRAY   = 28,    // C style array

A CURRENCY is an 8-byte integer:

http://windowssdk.msdn.microsoft.com/en-us/library/ms221223.aspx

There are a bunch of conversion routines to manipulate CURRENCY types:

http://windowssdk.msdn.microsoft.com/en-us/library/ms221508.aspx

An SCODE is the same as an HRESULT on 32-bit platforms.  It is a 32-bit
status value:

http://windowssdk.msdn.microsoft.com/en-us/library/ms690088.aspx

I have no idea how to manipulate a VT_CARRAY type.

--
Paul Marquis
[email protected]