unsafe HRESULT IGetVBAObject.GetObject(Guid *riid, IVBFormat[] rval, uint dwReserved) { Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in GetObject"); if (rval is null || riid is null) { return(HRESULT.E_INVALIDARG); } if (!riid->Equals(ivbformat_Guid)) { rval[0] = null; return(HRESULT.E_NOINTERFACE); } rval[0] = new VBFormat(); return(HRESULT.S_OK); }
int UnsafeNativeMethods.IGetVBAObject.GetObject(ref Guid riid, UnsafeNativeMethods.IVBFormat[] rval, int dwReserved) { Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in GetObject for proxy"); if (rval == null || riid.Equals(Guid.Empty)) return NativeMethods.E_INVALIDARG; if (riid.Equals(ivbformat_Guid)) { rval[0] = new VBFormat(); return NativeMethods.S_OK; } else { rval[0] = null; return NativeMethods.E_NOINTERFACE; } }