Here is the code that gave me trouble:
UUID uuid1;
RPC_STATUS rpcStatus;
rpcStatus = UuidFromString( (UCHAR*) "5C407353-215D-11D0-9929-080036180F02",&uuid1);
if ( rpcStatus != RPC_S_OK )
{
AfxMessageBox("CLSID Failed"
return FALSE;
}
HRESULT hr=0;
IUnknown *punk ;
IDispatch *dispatch;
hr = GetActiveObject(uuid1,NULL,&punk);
CString CsMessage;
CsMessage.Format("%d",hr);
AfxMessageBox(CsMessage);
After program was run, I got a big negative number for hr. Any help will be appreciated.
UUID uuid1;
RPC_STATUS rpcStatus;
rpcStatus = UuidFromString( (UCHAR*) "5C407353-215D-11D0-9929-080036180F02",&uuid1);
if ( rpcStatus != RPC_S_OK )
{
AfxMessageBox("CLSID Failed"
return FALSE;
}
HRESULT hr=0;
IUnknown *punk ;
IDispatch *dispatch;
hr = GetActiveObject(uuid1,NULL,&punk);
CString CsMessage;
CsMessage.Format("%d",hr);
AfxMessageBox(CsMessage);
After program was run, I got a big negative number for hr. Any help will be appreciated.