| 1 | /* | 
|---|
| 2 | * moniker.h [OLE32] | 
|---|
| 3 | * | 
|---|
| 4 | * Private include for Running Object Table (ROT) implementation class | 
|---|
| 5 | */ | 
|---|
| 6 |  | 
|---|
| 7 | #if !defined(MONIKER_INCLUDED) | 
|---|
| 8 | #define MONIKER_INCLUDED | 
|---|
| 9 |  | 
|---|
| 10 | #define ROT_BLOCK_SIZE  50 | 
|---|
| 11 |  | 
|---|
| 12 | // ROT Element | 
|---|
| 13 | struct RunObject | 
|---|
| 14 | { | 
|---|
| 15 | IUnknown *  pObj;                   // object | 
|---|
| 16 | IMoniker *  pmkObj;                 // moniker who identifies this object | 
|---|
| 17 | FILETIME    lastModifObj;           // Last modified date/time | 
|---|
| 18 | DWORD       identRegObj;            // registration key relative to this object | 
|---|
| 19 | DWORD       regTypeObj;             // registration type : strong or weak | 
|---|
| 20 | }; | 
|---|
| 21 |  | 
|---|
| 22 | // Implementation structure for ROT | 
|---|
| 23 | struct RunningObjectTableImpl | 
|---|
| 24 | { | 
|---|
| 25 | ICOM_VTABLE(IRunningObjectTable)*  lpvtbl; | 
|---|
| 26 | ULONG       ref; | 
|---|
| 27 |  | 
|---|
| 28 | RunObject * runObjTab;              // First object | 
|---|
| 29 | DWORD       runObjTabSize;          // ROT size | 
|---|
| 30 | DWORD       runObjTabLastIndx;      // First free ROT entry | 
|---|
| 31 | DWORD       runObjTabRegister;      // Registration key of the next registred object | 
|---|
| 32 | }; | 
|---|
| 33 |  | 
|---|
| 34 | // Initialisation | 
|---|
| 35 | extern HRESULT RunningObjectTableImpl_Initialize(); | 
|---|
| 36 | extern HRESULT RunningObjectTableImpl_UnInitialize(); | 
|---|
| 37 |  | 
|---|
| 38 | static HRESULT Destroy(); | 
|---|
| 39 | static HRESULT GetObjectIndex(RunningObjectTableImpl * This, DWORD identReg, IMoniker * pmk, DWORD * indx); | 
|---|
| 40 |  | 
|---|
| 41 | static HRESULT WIN32API RunningObjectTableImpl_QueryInterface | 
|---|
| 42 | (IRunningObjectTable * iface,REFIID riid,void** ppvObject); | 
|---|
| 43 | static ULONG   WIN32API RunningObjectTableImpl_AddRef | 
|---|
| 44 | (IRunningObjectTable * iface); | 
|---|
| 45 | static ULONG   WIN32API RunningObjectTableImpl_Release | 
|---|
| 46 | (IRunningObjectTable * iface); | 
|---|
| 47 | static HRESULT WIN32API RunningObjectTableImpl_Register | 
|---|
| 48 | (IRunningObjectTable * iface, DWORD grfFlags, IUnknown * punkObject, | 
|---|
| 49 | IMoniker * pmkObjectName, DWORD* pdwRegister); | 
|---|
| 50 | static HRESULT WIN32API RunningObjectTableImpl_Revoke | 
|---|
| 51 | (IRunningObjectTable * iface, DWORD dwRegister); | 
|---|
| 52 | static HRESULT WIN32API RunningObjectTableImpl_IsRunning | 
|---|
| 53 | (IRunningObjectTable * iface, IMoniker * pmkObjectName); | 
|---|
| 54 | static HRESULT WIN32API RunningObjectTableImpl_GetObject | 
|---|
| 55 | (IRunningObjectTable * iface, IMoniker * pmkObjectName, IUnknown * * ppunkObject); | 
|---|
| 56 | static HRESULT WIN32API RunningObjectTableImpl_NoteChangeTime | 
|---|
| 57 | (IRunningObjectTable * iface, DWORD dwRegister, FILETIME * pfiletime); | 
|---|
| 58 | static HRESULT WIN32API RunningObjectTableImpl_GetTimeOfLastChange | 
|---|
| 59 | (IRunningObjectTable * iface, IMoniker * pmkObjectName, FILETIME * pfiletime); | 
|---|
| 60 | static HRESULT WIN32API RunningObjectTableImpl_EnumRunning | 
|---|
| 61 | (IRunningObjectTable * iface, IEnumMoniker * * ppenumMoniker); | 
|---|
| 62 |  | 
|---|
| 63 | #endif // MONIKER_INCLUDED | 
|---|
| 64 |  | 
|---|