Roman B
September 13th, 1999, 07:05 AM
I want to pass a String over a COM object. I tried to decalre the fuction in IDL as follows:
[id(4), helpstring("method GetQuestionText")] HRESULT GetQuestionText([in, out, string] wchar_t **frtxt, [out, retval] int *result);
The first problem is, that the idl-compiler trows a warning that this is not compatible with [oleautomation]. Whats wrong. Is the OLE not possible to pass such pointer over the interface. The Second problem is, that I allocate memory with CoTastMemAlloc in the COM object and want to free it with CoTaskMemFree in the client. However the system abort my program in the kernel, with an error.
Can anybody help me please.
[id(4), helpstring("method GetQuestionText")] HRESULT GetQuestionText([in, out, string] wchar_t **frtxt, [out, retval] int *result);
The first problem is, that the idl-compiler trows a warning that this is not compatible with [oleautomation]. Whats wrong. Is the OLE not possible to pass such pointer over the interface. The Second problem is, that I allocate memory with CoTastMemAlloc in the COM object and want to free it with CoTaskMemFree in the client. However the system abort my program in the kernel, with an error.
Can anybody help me please.