Re: Still need help!
khalprin <khalprin@discussions.microsoft.com> wrote:
I've tried to simplify this by using only one structure with two
fixed arrays within it to represent the 'OBJCMDPARM' data. My
structure now looks like this:
typedef struct tagOBJCMD
{
long lId;
BSTR bsName;
BSTR bsDescription;
BSTR bsMonitorItem;
BYTE bState;
long lParameters;
BSTR bsParamName[5];
BSTR bsParamDesc[5];
} OBJCMD;
All the samples I've been able to find that show how to prototype the
call use this format in the IDL:
[id(11)] HRESULT ListCommands2(
[out] VARIANT_BOOL* bEnableDisable,
[out] long* plCommandCount,
[out,size_is(, *plCommandCount)] OBJCMD** ppCmds
);
I still can't get this to work.
Have you actually built and registered proxy/stub DLL? Your use of [id]
attribute suggests that perhaps you are trying to use TLB-driven
marshalling, but your interface is not automation-compatible.
The interface which contains this method is derived from
IDispatch
What for? Your method is not automation-compatible, it can't be called
via IDispatch::Invoke anyway. Don't you get MIDL warnings to that
effect?
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925