From 2c73bb570b16ed862a3e28e263198273d4591074 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 30 Aug 2013 18:38:04 +0000 Subject: COM-related code rearranged git-svn-id: http://svn.miranda-ng.org/main/trunk@5889 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/ShellExt/src/shlcom.h | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'plugins/ShellExt/src/shlcom.h') diff --git a/plugins/ShellExt/src/shlcom.h b/plugins/ShellExt/src/shlcom.h index ab0f337fe7..c4b24ac6fd 100644 --- a/plugins/ShellExt/src/shlcom.h +++ b/plugins/ShellExt/src/shlcom.h @@ -40,6 +40,9 @@ #define HIPC_NOICONS 1 +#define IPC_PACKET_SIZE (0x1000 * 32) +#define IPC_PACKET_NAME "m.mi.miranda.ipc.server" + ///////////////////////////////////////////////////////////////////////////////////////// struct TGroupNode @@ -114,9 +117,9 @@ struct THeaderIPC ///////////////////////////////////////////////////////////////////////////////////////// -struct TShlComRec : public IShellExtInit, public IContextMenu3 +struct TShellExt : public IShellExtInit, public IContextMenu3, public MZeroedObject { - TShlComRec(); + TShellExt(); ULONG RefCount; // this is owned by the shell after items are added 'n' is used to @@ -158,7 +161,7 @@ struct TShlComRec : public IShellExtInit, public IContextMenu3 struct TEnumData { - TShlComRec *Self; + TShellExt *Self; // autodetected, don't hard code since shells that don't support it // won't send WM_MEASUREITETM/WM_DRAWITEM at all. @@ -172,6 +175,20 @@ struct TEnumData DWORD pid; // sub-unique value used to make work object name }; +struct TClassFactoryRec : public IClassFactory +{ + TClassFactoryRec(); + + LONG RefCount; + + HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject); + ULONG STDMETHODCALLTYPE AddRef(void); + ULONG STDMETHODCALLTYPE Release(void); + + HRESULT STDMETHODCALLTYPE CreateInstance(IUnknown *pUnkOuter, REFIID riid, void **ppvObject); + HRESULT STDMETHODCALLTYPE LockServer(BOOL fLock); +}; + ///////////////////////////////////////////////////////////////////////////////////////// enum TSlotDrawType {dtEntry = 0x01, dtGroup = 0x02, dtContact = 0x04, dtCommand = 0x08 }; @@ -205,3 +222,5 @@ void ipcFixupAddresses(BOOL FromServer, THeaderIPC *pipch); TGroupNode* AllocGroupNode(TGroupNodeList *list, TGroupNode *Root, int Depth); TGroupNode* FindGroupNode(TGroupNode* p, const DWORD Hash, int Depth); + +char* CreateProcessUID(int pid, char *buf, size_t bufLen); -- cgit v1.2.3