6/> messages - Collapse all |
Newsgroups: microsoft.public.vc.atl From: Roy Chastain Date: Wed, 17 Jan 2001 14:11:48 -0500 Local: Wed, Jan 17 2001 2:11 pm Subject: Need help with IErrorInfo and ISupporErrorInfo I have a server that implements ISupportErrorInfo (via check box in ALT template). I try to access the error return in the client and end up with an exception in Kernel32 in IsBadReadPtr The code in the client is The error occurs on the call to GetErrorInfo(&pError); I admit I don't understand this part AT ALL and I was only able to PS. The server class was derived from ISupportErrorInfo not Complied with July 2000 Platform SDK and VC 6.0 SP 4 with ATLBASE.H Thanks for the help ------------------------------------------- You must Sign in before you can post messages. To post a message you must first join this group. Please update your nickname on the subscription settings page before posting. You do not have the permission required to post. |
Newsgroups: microsoft.public.vc.atl From: "Jon Dahl" Date: Wed, 17 Jan 2001 14:01:37 -0600 Local: Wed, Jan 17 2001 3:01 pm Subject: Re: Need help with IErrorInfo and ISupporErrorInfo The problem is: CComPtrIErrorInfo> pError; Don't declare a smart pointer. Let the GetErrorInfo function allocate the IErrorInfo* pError = NULL; GetErrorInfo(0, &pError); if(pError != NULL) } pError->Release(); Good luck, JD Roy Chastain news:2irb6t8m0nj8bik96cegrf90adq0f14278@4ax.com... > I have a server that implements ISupportErrorInfo (via check box in > ALT template). I try to access the error return in the client and end > up with an exception in Kernel32 in IsBadReadPtr > The code in the client is > The error occurs on the call to GetErrorInfo(&pError); > I admit I don't understand this part AT ALL and I was only able to > PS. The server class was derived from ISupportErrorInfo not > Complied with July 2000 Platform SDK and VC 6.0 SP 4 with ATLBASE.H > Thanks for the help > ------------------------------------------- - Hide quoted text - You must Sign in before you can post messages. To post a message you must first join this group. Please update your nickname on the subscription settings page before posting. You do not have the permission required to post. |
Newsgroups: microsoft.public.vc.atl From: Roy Chastain Date: Wed, 17 Jan 2001 15:34:12 -0500 Local: Wed, Jan 17 2001 3:34 pm Subject: Re: Need help with IErrorInfo and ISupporErrorInfo Thanks, but I am afraid that did not work either. It still get the error. Could this possible mean that the error info built by the server is in an invalid format or something like that? I have not faith that I got that part right either. On Wed, 17 Jan 2001 14:01:37 -0600, "Jon Dahl" >The problem is: ------------------------------------------- >CComPtrIErrorInfo> pError; >Don't declare a smart pointer. Let the GetErrorInfo function allocate the >IErrorInfo* pError = NULL; >GetErrorInfo(0, &pError); >if(pError != NULL) >} >pError->Release(); >Good luck, >JD >Roy Chastain >> The code in the client is >> The error occurs on the call to GetErrorInfo(&pError); >> I admit I don't understand this part AT ALL and I was only able to >> PS. The server class was derived from ISupportErrorInfo not >> Complied with July 2000 Platform SDK and VC 6.0 SP 4 with ATLBASE.H >> Thanks for the help >> ------------------------------------------- Roy Chastain KMSystems, Inc. - Hide quoted text - You must Sign in before you can post messages. To post a message you must first join this group. Please update your nickname on the subscription settings page before posting. You do not have the permission required to post. |
Newsgroups: microsoft.public.vc.atl From: "Ken Brady" Date: Thu, 18 Jan 2001 08:43:54 -0500 Local: Thurs, Jan 18 2001 8:43 am Subject: Re: Need help with IErrorInfo and ISupporErrorInfo Has your server called CComCoClass::Error(...) before returning its error code to the client? kb "Roy Chastain" news:2irb6t8m0nj8bik96cegrf90adq0f14278@4ax.com... > I have a server that implements ISupportErrorInfo (via check box in > ALT template). I try to access the error return in the client and end > up with an exception in Kernel32 in IsBadReadPtr > The code in the client is > The error occurs on the call to GetErrorInfo(&pError); > I admit I don't understand this part AT ALL and I was only able to > PS. The server class was derived from ISupportErrorInfo not > Complied with July 2000 Platform SDK and VC 6.0 SP 4 with ATLBASE.H > Thanks for the help > ------------------------------------------- - Hide quoted text - You must Sign in before you can post messages. To post a message you must first join this group. Please update your nickname on the subscription settings page before posting. You do not have the permission required to post. |
Newsgroups: microsoft.public.vc.atl From: Roy Chastain Date: Thu, 18 Jan 2001 09:13:42 -0500 Local: Thurs, Jan 18 2001 9:13 am Subject: Re: Need help with IErrorInfo and ISupporErrorInfo Lets that I put the code in and it appears to being called. On Thu, 18 Jan 2001 08:43:54 -0500, "Ken Brady" >Has your server called CComCoClass::Error(...) before returning its error ------------------------------------------- >code to the client? >kb >"Roy Chastain" >> The code in the client is >> The error occurs on the call to GetErrorInfo(&pError); >> I admit I don't understand this part AT ALL and I was only able to >> PS. The server class was derived from ISupportErrorInfo not >> Complied with July 2000 Platform SDK and VC 6.0 SP 4 with ATLBASE.H >> Thanks for the help >> ------------------------------------------- Roy Chastain KMSystems, Inc. - Hide quoted text - You must Sign in before you can post messages. To post a message you must first join this group. Please update your nickname on the subscription settings page before posting. You do not have the permission required to post. |
Newsgroups: microsoft.public.vc.atl From: yweg_sp...@sina.com (Allen Weng) Date: Mon, 29 Jan 2001 07:54:23 GMT Local: Mon, Jan 29 2001 2:54 am Subject: Re: Need help with IErrorInfo and ISupporErrorInfo I have no problem using IErrorInfo. I have a simple server that creates and sets error object, and a client on another end to retrieve the error object. It always runs successfully. All are written in ATL. In the server, create and set an error object like below: ICreateErrorInfo* pcei; HRESULT hr; hr = CreateErrorInfo(&pcei); In the client side, retrieve the erro object: HRESULT hr; hr = ::CoCreateInstance(CLSID_ErrTest, NULL, CLSCTX_ALL, IID_IErrTest, hr = pErrTest->CallException(); // An exception is generated in the server. if (FAILED(hr)) if (SUCCEEDED(hr)) I never run into the similar problem before. Just curious about how to -- Allen |