[prev in list] [next in list] [prev in thread] [next in thread]
List: ms-java-com
Subject: How do I combine iid_is and size_is
From: Herman Schipper <hschipper () BAAN ! NL>
Date: 2000-07-25 11:40:58
[Download RAW message or body]
I have the following method definition in idl:
HRESULT nextObjectsRemote(
[in] REFIID riid, // requested
interface for objects
[in] ULONG celt, // Number of
elements requested
[out,size_is(celt), iid_is(riid)] IUnknown **ppObjects, // the next objects
[out,retval] ULONG *pceltFetched // Pointer to the
number of objects actually supplied
);
I use the iid_is tag because I don't want to do a remote QI for every
retrieved object. I don't want to use the MULTI_QI structure because that
would give too much overhead.
Since midl and jactivex don't map these tags correclty to java, I would need
to write the following idl:
[out, size_is(celt), JTLBATTR_SIZE_IS("celt"), iid_is(riid),
JTLBATTR_IID_IS("riid")] IUnknown **ppObjects
but these two cannot be combined as far as I know, because:
The size_is tag would generate this in java:
@com.parameters([out,customMarshal="com.ms.com.SizeIsMarshaler",type=CUSTOM]
rgelt,
The iid_is tag would generate this in java:
@com.parameters([out,customMarshal="com.ms.com.IIDIsMarshaler",type=CUSTOM]
rgelt)
Since only one customMarshal class can be specified at a time it is not
possible to combine them automatically. Does anybody know if it is possible
to get the functionality I want?
I think that what I need is a class called
"com.ms.com.SizeIsAndIIDIsMarshaler", which would be a combination of the
marshalers above. Could I provide this myself, and if I did, would I just
write the 'non-java' idl and write the @com.parameters tags myself? Is there
a way to get to the sources of SizeIsMarshaler and IIDIsMarshaler?
TIA,
With kind regards,
Herman.
----------------------------------------------------------------
Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
contains important info including how to unsubscribe. Save time, search
the archives at http://discuss.microsoft.com/archives/index.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic