Click here to Skip to main content
16,015,097 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCompiler warnings from GetWindowLongPtr / SetWindowLongPtr Pin
Steve Thresher27-May-02 2:59
Steve Thresher27-May-02 2:59 
GeneralRe: Compiler warnings from GetWindowLongPtr / SetWindowLongPtr Pin
Mike Nordell27-May-02 21:11
Mike Nordell27-May-02 21:11 
GeneralGet The Slider ID in a form Pin
tongc27-May-02 2:14
tongc27-May-02 2:14 
GeneralRe: Get The Slider ID in a form Pin
Mazdak27-May-02 2:29
Mazdak27-May-02 2:29 
GeneralRe: Get The Slider ID in a form Pin
tongc27-May-02 2:42
tongc27-May-02 2:42 
GeneralRe: Get The Slider ID in a form Pin
Mazdak27-May-02 3:45
Mazdak27-May-02 3:45 
GeneralDCOM Security question !Plz Pin
jancsi27-May-02 2:09
jancsi27-May-02 2:09 
GeneralIErrorInfo Pin
Spiros27-May-02 1:57
Spiros27-May-02 1:57 
I use a component that returns errors using the ISupportErrorInfo. I create this component inside another component and I can not access the error Description using the code below:

CoInitialize(NULL);

if (FAILED(CoCreateInstance(CLSID_AppSrv, NULL, CLSCTX_ALL,
IID_IAppSrv, (void**)&pAppSrv)))
{
::SysFreeString(bstrInCall);
return;
}

hResult = pAppSrv->DispatchService3(bstrInCall , &vResponse);

if (hResult == S_OK)
*szXMLResponse = vResponse.bstrVal;
else
{

HRESULT hr=S_OK;
IErrorInfo *err;
BSTR str;

hr = GetErrorInfo(0, &err);
if (FAILED(hr))
{
*szXMLResponse = "<error>Unable To Retrieve Error Message";
return;
}

hr = err->GetDescription(&str);
if (SUCCEEDED(hr))
{
CString szTemp;
szTemp = "<error>003<description>";
szTemp += str;
szTemp += "";
SysFreeString(str);
*szXMLResponse = szTemp;
}

err->Release();
}

Note that GetErrorInfo never fails but GetDescription always fails. Note that this happens when both the components are installed into 2 different packages in the COM+. Also the threading model of the component that produces the error is Apartment while the threading model of the component that fails to access the error is Neutral.


Spiros Prantalos
GeneralRe: IErrorInfo Pin
Le centriste27-May-02 3:32
Le centriste27-May-02 3:32 
GeneralRe: IErrorInfo Pin
Spiros27-May-02 3:39
Spiros27-May-02 3:39 
GeneralRe: IErrorInfo Pin
Le centriste27-May-02 7:18
Le centriste27-May-02 7:18 
GeneralRe: IErrorInfo Pin
27-May-02 22:31
suss27-May-02 22:31 
GeneralEmbed - Assembly VC++ Pin
Sameer Maggon27-May-02 0:58
Sameer Maggon27-May-02 0:58 
GeneralRe: Embed - Assembly VC++ Pin
Joaquín M López Muñoz27-May-02 2:41
Joaquín M López Muñoz27-May-02 2:41 
GeneralRe: Embed - Assembly VC++ Pin
Sameer Maggon27-May-02 3:10
Sameer Maggon27-May-02 3:10 
GeneralCArchive - query Pin
Ravi Sudhakar27-May-02 0:46
Ravi Sudhakar27-May-02 0:46 
GeneralRe: CArchive - query Pin
Dominik Reichl27-May-02 1:06
Dominik Reichl27-May-02 1:06 
GeneralRe: CArchive - query Pin
Ravi Sudhakar27-May-02 1:24
Ravi Sudhakar27-May-02 1:24 
GeneralRe: CArchive - query Pin
Dominik Reichl27-May-02 1:21
Dominik Reichl27-May-02 1:21 
GeneralRe: CArchive - query Pin
Ravi Sudhakar27-May-02 2:27
Ravi Sudhakar27-May-02 2:27 
QuestionATL/COM + MFC: Dialogs? Pin
Dominik Reichl27-May-02 0:53
Dominik Reichl27-May-02 0:53 
AnswerRe: ATL/COM + MFC: Dialogs? Pin
Martin Ziacek27-May-02 1:00
Martin Ziacek27-May-02 1:00 
GeneralRe: ATL/COM + MFC: Dialogs? Pin
Dominik Reichl27-May-02 1:04
Dominik Reichl27-May-02 1:04 
GeneralRe: ATL/COM + MFC: Dialogs? Pin
Martin Ziacek27-May-02 1:19
Martin Ziacek27-May-02 1:19 
GeneralRe: ATL/COM + MFC: Dialogs? Pin
Dominik Reichl27-May-02 1:22
Dominik Reichl27-May-02 1:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.