if (COM.IsEqualGUID(guid, COM.IIDIOleDocumentSite )) { String progID = getProgramID(); if (!progID.startsWith("PowerPoint")) { COM.MoveMemory(ppvObject, new int[] {iOleDocumentSite.getAddress()}, 4); AddRef(); return COM.S_OK; } }
protected int QueryInterface(int riid, int ppvObject) {	if (riid == 0 || ppvObject == 0)		return COM.E_NOINTERFACE;	GUID guid = new GUID();	COM.MoveMemory(guid, riid, GUID.sizeof);	if (COM.IsEqualGUID(guid, COM.IIDIUnknown)) {		COM.MoveMemory(ppvObject, new int[] {iUnknown.getAddress()}, 4);		AddRef();		return COM.S_OK;	}	if (COM.IsEqualGUID(guid, COM.IIDIAdviseSink)) {		COM.MoveMemory(ppvObject, new int[] {iAdviseSink.getAddress()}, 4);		AddRef();		return COM.S_OK;	}	if (COM.IsEqualGUID(guid, COM.IIDIOleClientSite)) {		COM.MoveMemory(ppvObject, new int[] {iOleClientSite.getAddress()}, 4);		AddRef();		return COM.S_OK;	}	if (COM.IsEqualGUID(guid, COM.IIDIOleInPlaceSite)) {		COM.MoveMemory(ppvObject, new int[] {iOleInPlaceSite.getAddress()}, 4);		AddRef();		return COM.S_OK;	}	if (COM.IsEqualGUID(guid, COM.IIDIOleDocumentSite )) {		String progID = getProgramID();		if (!progID.startsWith("PowerPoint")) { //$NON-NLS-1$			COM.MoveMemory(ppvObject, new int[] {iOleDocumentSite.getAddress()}, 4);			AddRef();			return COM.S_OK;		}	}	COM.MoveMemory(ppvObject, new int[] {0}, 4);	return COM.E_NOINTERFACE;}