Back to index

lightning-sunbird  0.9+nobinonly
nsXPCDispSimple.cpp
Go to the documentation of this file.
00001 // nsXPCDispSimple.cpp : Implementation of CXPCIDispatchTestApp and DLL registration.
00002 
00003 #include "stdafx.h"
00004 #include "XPCIDispatchTest.h"
00005 #include "nsXPCDispSimple.h"
00006 
00008 //
00009 
00010 STDMETHODIMP nsXPCDispSimple::InterfaceSupportsErrorInfo(REFIID riid)
00011 {
00012     static const IID* arr[] = 
00013     {
00014         &IID_nsIXPCDispSimple,
00015     };
00016 
00017     for (int i=0;i<sizeof(arr)/sizeof(arr[0]);i++)
00018     {
00019         if (InlineIsEqualGUID(*arr[i],riid))
00020             return S_OK;
00021     }
00022     return S_FALSE;
00023 }
00024 
00025 STDMETHODIMP nsXPCDispSimple::ClassName(BSTR * name)
00026 {
00027     if (name == NULL)
00028         return E_POINTER;
00029     CComBSTR x("nsXPCDispSimple");
00030     *name = x.Detach();
00031     return S_OK;
00032 }
00033 STDMETHODIMP nsXPCDispSimple::get_Number(LONG * result)
00034 {
00035     if (result == NULL)
00036         return E_POINTER;
00037     *result = mNumber;
00038     return S_OK;
00039 }
00040 STDMETHODIMP nsXPCDispSimple::put_Number(LONG result)
00041 {
00042     mNumber = result;
00043     return S_OK;
00044 }