|
-
January 31st, 2005, 03:43 PM
#1
COM Error
Hi guys,
I have a COM exe server, which I added the following interface:
.h
[id(184), helpstring("method GetChange")] HRESULT GetChange([out] BSTR *pVal);
.cpp
STDMETHODIMP CATL::GetChange(BSTR *pVal)
{
CString strCommand;
bstr_t bstr( "Hello" );
*pVal = bstr.copy( );
return S_OK;
}
and I call it from my CLient like this:
BSTR Change;
ComObj->GetChange( & Change );
The problem is everytime I get to execute this instruction my application gets an access violation error and the callstack shows
RPCRT4! 7802e81c() as the method. It does not even get to the COM function, I debugged to make sure it's not the function that is causing this, any ideas why this is happening??/
Thanks a lot
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|