Re: COM returning error message to ASP

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"Chan" <parkchan@xxxxxxxxxxx> wrote in message
news:1121087037.356307.86640@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Thank you for your reply.
>
> Does this look okay?
>
> STDMETHODIMP CMyComTwo::Create()
> {
> AFX_MANAGE_STATE(AfxGetStaticModuleState())
>
> // TODO: Add your implementation code here
> if (...) { // something goes wrong here
> return AtlReportError (
> CLSID_NULL,
> "Can not proceed...",
> IID_NULL,
> 0
> );

The IID should be that of your interface - the client will turn around
and pass it to your implementation of ISupportErrorInfo which should
recognize it.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925


.



Relevant Pages

  • Re: FindConnectionPoints returns invalid access to memory location
    ... The IOPC common interface and implementation is working fine. ... helpstring("CoOPCServer Local Server TypeLib")] ... STDMETHODIMP CoOPCServer::FindConnectionPoint(REFIID riid, ... class CoOPCServer: public IOPCCommon, public IConnectionPointContainer ...
    (microsoft.public.win32.programmer.ole)
  • Re: In-process cross-thread (cross-apartment) marshaling
    ... you register the interface marshaling code.) ... object (ask for IUnknown with the IID of your interfrace as the ... Marshalling an IUnknown and unmarshalling an IUnknown is successful, ...
    (microsoft.public.win32.programmer.ole)
  • Re: Is it worth upgrading to XP Pro ?
    ... > Kevin Lawton wrote: ... >> Not perfect, by any means, but quite okay for general use. ... is much better suited to business use. ... Win2K interface because I've run that interface longer. ...
    (microsoft.public.windowsxp.basics)
  • Re: How do I implement IAMStreamConfig in C++ ?
    ... You forgot to implement the following methods which implement the IAMStreamConfig interface " .. ... STDMETHODIMP NonDelegatingQueryInterface; ... HRESULT ScribbleToStream; ... int *piCount, ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Good COM Interface Design
    ... interface's IID after it's publish is plain wrong. ... clients know exactly how to bind/call it. ... There is a lot of trickery associated with interface extensions in COM, ...
    (microsoft.public.vc.atl)