Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

COM+ Event Methods (Marshaling Data Arrays) ... Problem

VolCamp55VolCamp55 Member Posts: 2
I've got a set of COM+ Event methods created that include some variable-length integer data arrays as arguments to the event methods. I've used variable-length data arrays in COM server interfaces before and had no problem getting the data marshaled over to the calling client app. I simply send an integer argument for the data array length, along with defining the data array as a size_is parameter. This would look like the following in the IDL definition file:

interface IErrorEvents : IUnknown
{
[helpstring("method NewErrorEvent")] HRESULT NewErrorEvent(
[in] long DataSize,
[in, size_is(DataSize)] unsigned char* DataArray);
};

This type of COM interface definition works fine for COM servers. However, using this type of IDL definition for a COM+ event method causes a problem. I only receive the 1st integer array value via marshaling, along with a value 1 for the 2nd array value. This occurs no matter what the size of the data array that is getting passed via the COM+ event method. Does anyone know what might be causing this weird marshaling problem when using COM+ event methods?
Thanks ... Rick

Sign In or Register to comment.