diff options
Diffstat (limited to 'private/ole32/ih')
51 files changed, 11093 insertions, 0 deletions
diff --git a/private/ole32/ih/alocdbg.h b/private/ole32/ih/alocdbg.h new file mode 100644 index 000000000..dcf9f594e --- /dev/null +++ b/private/ole32/ih/alocdbg.h @@ -0,0 +1,108 @@ +//+--------------------------------------------------------------------------- +// File: alocdbg.h +// +// Contents: Heap debugging structures and routines for the heap code +// in commnot +// +// History: 28-Oct-92 IsaacHe Created +// 23-Jan-95 KevinRo Moved into cairole\ih and renamed +// +//---------------------------------------------------------------------------- + +// +// We keep a stack backtrace for each allocated block of memory. DEPTHTRACE +// is the number of frames that we record +// +#define DEPTHTRACE 26 // depth of stack backtraces + +// +// The AllocArena structure has this signature at its front. We put a +// signature on the structure to allow external processes to snapshot the +// debug information and do some minimal check to see they are looking at the +// right stuff +// +const char HEAPSIG[] = { 'H', 'E', 'P', DEPTHTRACE }; + +// We keep track of the stack backtraces of allocation calls +// in these structues. + +struct HeapAllocRec { + DWORD sum; // checksum of stack backtrace + void *fTrace[ DEPTHTRACE ]; // stack backtrace + DWORD count; // # of un-freed allocs from this place + size_t bytes; // # of un-freed bytes from this place + struct AllocArena *paa; // points back to the beginning... + struct { + DWORD count; // # of allocs from this place + size_t bytes; // # of bytes from this place + } total; + union { + struct HeapAllocRec *next; // next bucket in the hash list + void *ImageBase; // base addr of containing module + } u; +}; + +struct AllocArena { + + char Signature [ sizeof(HEAPSIG) ]; + char comment[ 32 ]; + CRITICAL_SECTION csExclusive; // ensures single writer + + struct { + int KeepStackTrace:1; // are stack records being kept? + } flags; + + ULONG cAllocs; // # of non zero Alloc calls + ULONG czAllocs; // # of Alloc calls w/zero count + ULONG cFrees; // # of Free calls + ULONG cReAllocs; // # of realloc calls + ULONG cMissed; // # of missed stack backtraces + ULONG cRecords; // index of next free AllocRec entry + ULONG cBytesNow; // # of bytes currently allocated + ULONG cBytesTotal; // # of bytes ever allocated + ULONG cTotalRecords; // Total # of AllocRecs + ULONG cPaths; // # of distinct allocation paths + + struct { + ULONG total[ 32 ]; // total number of allocations + ULONG now[ 32 ]; // current # of simul allocs + ULONG simul[ 32 ]; // highest # of simul allocs + } Histogram; + + struct HeapAllocRec AllocRec[1]; // vector of records starts here.. +}; + +/* + * Allocators may want to associate one of these structures with every + * allocation... + */ +struct AHeader { + struct HeapAllocRec FAR *p; + size_t size; +}; + +STDAPI_(struct AllocArena ** ) +AllocArenaAddr( void ); + +STDAPI_( struct AllocArena * ) +AllocArenaCreate( DWORD memctx, char FAR *comment ); + +STDAPI_( struct HeapAllocRec FAR * ) +AllocArenaRecordAlloc( struct AllocArena *paa, size_t bytes ); + +STDAPI_(void) +AllocArenaRecordReAlloc( struct HeapAllocRec FAR *vp, + size_t oldbytes, size_t newbytes ); + +STDAPI_(void) +AllocArenaRecordFree( struct HeapAllocRec FAR *vp, size_t bytes ); + +STDAPI_(void) +AllocArenaDump( struct AllocArena *paa ); + +STDAPI_( void ) +AllocArenaDumpRecord( struct HeapAllocRec FAR *bp ); + +// This is our interface to symhelp for address translation +ULONG RealTranslate ( ULONG address, LPSTR name, ULONG maxNameLength); + diff --git a/private/ole32/ih/chicole.reg b/private/ole32/ih/chicole.reg new file mode 100644 index 000000000..de44b6c10 --- /dev/null +++ b/private/ole32/ih/chicole.reg @@ -0,0 +1,380 @@ +REGEDIT +HKEY_CLASSES_ROOT\CLSID + +// +// The values of the following keys need to be localized +// 11-16-93 +// LANGUAGE: USA +// + +; The string "Edit" below is to be localized. +HKEY_CLASSES_ROOT\Software\Microsoft\OLE1\UnregisteredVerb = Edit + +; The string "Unknown" below is to be localized. +HKEY_CLASSES_ROOT\Software\Microsoft\OLE2\UnknownUserType = Unknown + +; The string "Picture (Metafile)" is to be localized. +HKEY_CLASSES_ROOT\StaticMetafile = Picture (Metafile) +HKEY_CLASSES_ROOT\CLSID\{00000315-0000-0000-C000-000000000046} = Picture (Metafile) + +; The string "Picture" is to be localized. +HKEY_CLASSES_ROOT\CLSID\{00000315-0000-0000-C000-000000000046}\AuxUserType\2 = Picture +HKEY_CLASSES_ROOT\CLSID\{00000316-0000-0000-C000-000000000046}\AuxUserType\2 = Picture + +; The string "Picture (Device Independent Bitmap)" is to be localized. +HKEY_CLASSES_ROOT\StaticDib = Picture (Device Independent Bitmap) +HKEY_CLASSES_ROOT\CLSID\{00000316-0000-0000-C000-000000000046} = Picture (Device Independent Bitmap) + +; The string "Paintbrush Picture" is to be localized. +HKEY_CLASSES_ROOT\CLSID\{0003000a-0000-0000-C000-000000000046} = Paintbrush Picture + +; The string "Microsoft Drawing" is to be localized. +HKEY_CLASSES_ROOT\CLSID\{00030007-0000-0000-C000-000000000046} = Microsoft Drawing + + +// -------------------- NO LOCALIZATION NECESSARY BELOW THIS LINE ------------ + +HKEY_CLASSES_ROOT\CLSID\{00000300-0000-0000-C000-000000000046} = StdOleLink +HKEY_CLASSES_ROOT\CLSID\{00000300-0000-0000-C000-000000000046}\InprocServer32 = ole32.dll +HKEY_CLASSES_ROOT\CLSID\{00000301-0000-0000-C000-000000000046} = StdMemStm +HKEY_CLASSES_ROOT\CLSID\{00000301-0000-0000-C000-000000000046}\InprocServer32 = ole32.dll +HKEY_CLASSES_ROOT\CLSID\{00000302-0000-0000-C000-000000000046} = StdMemBytes +HKEY_CLASSES_ROOT\CLSID\{00000302-0000-0000-C000-000000000046}\InprocServer32 = ole32.dll +HKEY_CLASSES_ROOT\CLSID\{00000303-0000-0000-C000-000000000046} = FileMoniker +HKEY_CLASSES_ROOT\CLSID\{00000303-0000-0000-C000-000000000046}\InprocServer32 = ole32.dll +HKEY_CLASSES_ROOT\CLSID\{00000304-0000-0000-C000-000000000046} = ItemMoniker +HKEY_CLASSES_ROOT\CLSID\{00000304-0000-0000-C000-000000000046}\InprocServer32 = ole32.dll +HKEY_CLASSES_ROOT\CLSID\{00000305-0000-0000-C000-000000000046} = AntiMoniker +HKEY_CLASSES_ROOT\CLSID\{00000305-0000-0000-C000-000000000046}\InprocServer32 = ole32.dll +HKEY_CLASSES_ROOT\CLSID\{00000306-0000-0000-C000-000000000046} = PointerMoniker +HKEY_CLASSES_ROOT\CLSID\{00000306-0000-0000-C000-000000000046}\InprocServer32 = ole32.dll +HKEY_CLASSES_ROOT\CLSID\{00000308-0000-0000-C000-000000000046} = PackagerMoniker +HKEY_CLASSES_ROOT\CLSID\{00000308-0000-0000-C000-000000000046}\InprocServer32 = ole32.dll +HKEY_CLASSES_ROOT\CLSID\{00000309-0000-0000-C000-000000000046} = CompositeMoniker +HKEY_CLASSES_ROOT\CLSID\{00000309-0000-0000-C000-000000000046}\InprocServer32 = ole32.dll +HKEY_CLASSES_ROOT\CLSID\{0000030A-0000-0000-C000-000000000046} = DdeCompositeMoniker +HKEY_CLASSES_ROOT\CLSID\{0000030A-0000-0000-C000-000000000046}\InprocServer32 = ole32.dll +HKEY_CLASSES_ROOT\CLSID\{0000030B-0000-0000-C000-000000000046} = DfMarshal +HKEY_CLASSES_ROOT\CLSID\{0000030B-0000-0000-C000-000000000046}\InprocServer32 = ole32.dll +HKEY_CLASSES_ROOT\CLSID\{00000315-0000-0000-C000-000000000046} = Metafile +HKEY_CLASSES_ROOT\CLSID\{00000315-0000-0000-C000-000000000046}\InprocServer32 = ole32.dll +HKEY_CLASSES_ROOT\CLSID\{00000316-0000-0000-C000-000000000046} = Device Independent Bitmap +HKEY_CLASSES_ROOT\CLSID\{00000316-0000-0000-C000-000000000046}\InprocServer32 = ole32.dll + + +// +//StaticMetafile +// +;Root level key +HKEY_CLASSES_ROOT\StaticMetafile\CLSID = {00000315-0000-0000-C000-000000000046} +HKEY_CLASSES_ROOT\CLSID\{00000315-0000-0000-C000-000000000046}\ProgID = StaticMetafile +HKEY_CLASSES_ROOT\CLSID\{00000315-0000-0000-C000-000000000046}\InprocServer = ole32.dll + +; Default File Format = CF_METAFILEPICT +HKEY_CLASSES_ROOT\CLSID\{00000315-0000-0000-C000-000000000046}\DataFormats\DefaultFile = 3 +; Format 0 = CF_METAFILEPICT, DVASPECT_CONTENT, TYMED_MFPICT, DATADIR_BOTH +HKEY_CLASSES_ROOT\CLSID\{00000315-0000-0000-C000-000000000046}\DataFormats\GetSet\0 = 3,1,32,3 +; MiscStatus = OLEMISC_STATIC | OLEMISC_CANTLINKINSIDE | OLEMISC_RENDERINGISDEVICEINDEPENDENT = 8 + 16 + 512 +HKEY_CLASSES_ROOT\CLSID\{00000315-0000-0000-C000-000000000046}\MiscStatus = 536 +; Readable format = CF_METAFILEPICT +HKEY_CLASSES_ROOT\CLSID\{00000315-0000-0000-C000-000000000046}\Conversion\Readable\Main = 3,MSDraw + + +// +//StaticDib +// + +; Root level keys +HKEY_CLASSES_ROOT\StaticDib\CLSID = {00000316-0000-0000-C000-000000000046} +HKEY_CLASSES_ROOT\CLSID\{00000316-0000-0000-C000-000000000046}\ProgID = StaticDib +HKEY_CLASSES_ROOT\CLSID\{00000316-0000-0000-C000-000000000046}\InprocServer = ole2.dll + +; Default File Format = CF_DIB +HKEY_CLASSES_ROOT\CLSID\{00000316-0000-0000-C000-000000000046}\DataFormats\DefaultFile = 8 +; Format 0 = CF_DIB, DVASPECT_CONTENT, TYMED_HGLOBAL, DATADIR_BOTH +HKEY_CLASSES_ROOT\CLSID\{00000316-0000-0000-C000-000000000046}\DataFormats\GetSet\0 = 8,1,1,3 +; MiscStatus = OLEMISC_STATIC | OLEMISC_CANTLINKINSIDE | OLEMISC_RENDERINGISDEVICEINDEPENDENT = 8 + 16 + 512 +HKEY_CLASSES_ROOT\CLSID\{00000316-0000-0000-C000-000000000046}\MiscStatus = 536 +; Readable format = CF_DIB +HKEY_CLASSES_ROOT\CLSID\{00000316-0000-0000-C000-000000000046}\Conversion\Readable\Main = 8,PBrush + + +// +//PBrush +// + +; ProgID +HKEY_CLASSES_ROOT\PBrush\CLSID = {0003000a-0000-0000-C000-000000000046} +HKEY_CLASSES_ROOT\CLSID\{0003000a-0000-0000-C000-000000000046}\ProgID = PBrush +; Ole1Class +HKEY_CLASSES_ROOT\CLSID\{0003000a-0000-0000-C000-000000000046}\Ole1Class = PBrush +; MiscStatus = OLEMISC_RENDERINGISDEVICEINDEPENDENT = 512 +HKEY_CLASSES_ROOT\CLSID\{0003000a-0000-0000-C000-000000000046}\MiscStatus = 512 +; Readwritable format = CF_DIB +HKEY_CLASSES_ROOT\CLSID\{0003000a-0000-0000-C000-000000000046}\Conversion\Readable\Main = 8 + +// +// MSDraw +// + +; ProgID +HKEY_CLASSES_ROOT\CLSID\{00030007-0000-0000-C000-000000000046}\ProgID = MSDraw +; Ole1Class +HKEY_CLASSES_ROOT\CLSID\{00030007-0000-0000-C000-000000000046}\Ole1Class = MSDraw +; MiscStatus = OLEMISC_RENDERINGISDEVICEINDEPENDENT = 512 +HKEY_CLASSES_ROOT\CLSID\{00030007-0000-0000-C000-000000000046}\MiscStatus = 512 + +HKEY_CLASSES_ROOT\CLSID\{6f11fe5c-2fc5-101b-9e45-00000b65c7ef} = oleprx32_PSFactory +HKEY_CLASSES_ROOT\CLSID\{6f11fe5c-2fc5-101b-9e45-00000b65c7ef}\InprocServer32 = oleprx32.dll + + +HKEY_CLASSES_ROOT\Interface + +HKEY_CLASSES_ROOT\Interface\{00000000-0000-0000-C000-000000000046} = IUnknown +HKEY_CLASSES_ROOT\Interface\{00000000-0000-0000-C000-000000000046}\BaseInterface = +HKEY_CLASSES_ROOT\Interface\{00000000-0000-0000-C000-000000000046}\NumMethods = 3 + +HKEY_CLASSES_ROOT\Interface\{00000001-0000-0000-C000-000000000046} = IClassFactory +HKEY_CLASSES_ROOT\Interface\{00000001-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{00000001-0000-0000-C000-000000000046}\NumMethods = 5 + +HKEY_CLASSES_ROOT\Interface\{00000002-0000-0000-C000-000000000046} = IMalloc +HKEY_CLASSES_ROOT\Interface\{00000002-0000-0000-C000-000000000046}\NumMethods = 9 + +HKEY_CLASSES_ROOT\Interface\{00000003-0000-0000-C000-000000000046} = IMarshal +HKEY_CLASSES_ROOT\Interface\{00000003-0000-0000-C000-000000000046}\NumMethods = 9 + +HKEY_CLASSES_ROOT\Interface\{00000004-0000-0000-C000-000000000046} = IRpcChannel +HKEY_CLASSES_ROOT\Interface\{00000004-0000-0000-C000-000000000046}\NumMethods = 7 + +HKEY_CLASSES_ROOT\Interface\{00000005-0000-0000-C000-000000000046} = IRpcStub +HKEY_CLASSES_ROOT\Interface\{00000005-0000-0000-C000-000000000046}\NumMethods = 8 + +HKEY_CLASSES_ROOT\Interface\{00000007-0000-0000-C000-000000000046} = IRpcProxy +HKEY_CLASSES_ROOT\Interface\{00000007-0000-0000-C000-000000000046}\NumMethods = 5 + +HKEY_CLASSES_ROOT\Interface\{00000009-0000-0000-C000-000000000046} = IPSFactory +HKEY_CLASSES_ROOT\Interface\{00000009-0000-0000-C000-000000000046}\NumMethods = 5 + +HKEY_CLASSES_ROOT\Interface\{0000000a-0000-0000-C000-000000000046} = ILockBytes +HKEY_CLASSES_ROOT\Interface\{0000000a-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{0000000A-0000-0000-C000-000000000046}\NumMethods = 10 + +HKEY_CLASSES_ROOT\Interface\{0000000b-0000-0000-C000-000000000046} = IStorage +HKEY_CLASSES_ROOT\Interface\{0000000b-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{0000000B-0000-0000-C000-000000000046}\NumMethods = 18 + +HKEY_CLASSES_ROOT\Interface\{0000000c-0000-0000-C000-000000000046} = IStream +HKEY_CLASSES_ROOT\Interface\{0000000c-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{0000000C-0000-0000-C000-000000000046}\NumMethods = 14 + +HKEY_CLASSES_ROOT\Interface\{0000000d-0000-0000-C000-000000000046} = IEnumSTATSTG +HKEY_CLASSES_ROOT\Interface\{0000000d-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{0000000D-0000-0000-C000-000000000046}\NumMethods = 7 + +HKEY_CLASSES_ROOT\Interface\{0000000e-0000-0000-C000-000000000046} = IBindCtx +HKEY_CLASSES_ROOT\Interface\{0000000e-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{0000000E-0000-0000-C000-000000000046}\NumMethods = 13 + +HKEY_CLASSES_ROOT\Interface\{0000000f-0000-0000-C000-000000000046} = IMoniker +HKEY_CLASSES_ROOT\Interface\{0000000f-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{0000000F-0000-0000-C000-000000000046}\BaseInterface = {00000109-0000-0000-C000-000000000046} +HKEY_CLASSES_ROOT\Interface\{0000000F-0000-0000-C000-000000000046}\NumMethods = 23 + +HKEY_CLASSES_ROOT\Interface\{00000010-0000-0000-C000-000000000046} = IRunningObjectTable +HKEY_CLASSES_ROOT\Interface\{00000010-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{00000010-0000-0000-C000-000000000046}\NumMethods = 10 + +HKEY_CLASSES_ROOT\Interface\{00000012-0000-0000-C000-000000000046} = IRootStorage +HKEY_CLASSES_ROOT\Interface\{00000012-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{00000012-0000-0000-C000-000000000046}\NumMethods = 4 + +HKEY_CLASSES_ROOT\Interface\{00000016-0000-0000-C000-000000000046} = IMessageFilter +HKEY_CLASSES_ROOT\Interface\{00000016-0000-0000-C000-000000000046}\NumMethods = 6 + +HKEY_CLASSES_ROOT\Interface\{00000018-0000-0000-C000-000000000046} = IStdMarshalInfo +HKEY_CLASSES_ROOT\Interface\{00000018-0000-0000-C000-000000000046}\NumMethods = 4 + +HKEY_CLASSES_ROOT\Interface\{00000019-0000-0000-C000-000000000046} = IExternalConnection +HKEY_CLASSES_ROOT\Interface\{00000019-0000-0000-C000-000000000046}\NumMethods = 5 + +HKEY_CLASSES_ROOT\Interface\{00000100-0000-0000-C000-000000000046} = IEnumUnknown +HKEY_CLASSES_ROOT\Interface\{00000100-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{00000100-0000-0000-C000-000000000046}\NumMethods = 7 + +HKEY_CLASSES_ROOT\Interface\{00000101-0000-0000-C000-000000000046} = IEnumString +HKEY_CLASSES_ROOT\Interface\{00000101-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{00000101-0000-0000-C000-000000000046}\NumMethods = 7 + +HKEY_CLASSES_ROOT\Interface\{00000102-0000-0000-C000-000000000046} = IEnumMoniker +HKEY_CLASSES_ROOT\Interface\{00000102-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{00000102-0000-0000-C000-000000000046}\NumMethods = 7 + +HKEY_CLASSES_ROOT\Interface\{00000103-0000-0000-C000-000000000046} = IEnumFORMATETC +HKEY_CLASSES_ROOT\Interface\{00000103-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{00000103-0000-0000-C000-000000000046}\NumMethods = 7 + +HKEY_CLASSES_ROOT\Interface\{00000104-0000-0000-C000-000000000046} = IEnumOLEVERB +HKEY_CLASSES_ROOT\Interface\{00000104-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{00000104-0000-0000-C000-000000000046}\NumMethods = 7 + +HKEY_CLASSES_ROOT\Interface\{00000105-0000-0000-C000-000000000046} = IEnumSTATDATA +HKEY_CLASSES_ROOT\Interface\{00000105-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{00000105-0000-0000-C000-000000000046}\NumMethods = 7 + +HKEY_CLASSES_ROOT\Interface\{00000109-0000-0000-C000-000000000046} = IPersistStream +HKEY_CLASSES_ROOT\Interface\{00000109-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{00000109-0000-0000-C000-000000000046}\BaseInterface = {0000010C-0000-0000-C000-000000000046} +HKEY_CLASSES_ROOT\Interface\{00000109-0000-0000-C000-000000000046}\NumMethods = 8 + +HKEY_CLASSES_ROOT\Interface\{0000010a-0000-0000-C000-000000000046} = IPersistStorage +HKEY_CLASSES_ROOT\Interface\{0000010a-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{0000010A-0000-0000-C000-000000000046}\BaseInterface = {0000010C-0000-0000-C000-000000000046} +HKEY_CLASSES_ROOT\Interface\{0000010A-0000-0000-C000-000000000046}\NumMethods = 10 + +HKEY_CLASSES_ROOT\Interface\{0000010b-0000-0000-C000-000000000046} = IPersistFile +HKEY_CLASSES_ROOT\Interface\{0000010b-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{0000010B-0000-0000-C000-000000000046}\BaseInterface = {0000010C-0000-0000-C000-000000000046} +HKEY_CLASSES_ROOT\Interface\{0000010B-0000-0000-C000-000000000046}\NumMethods = 9 + +HKEY_CLASSES_ROOT\Interface\{0000010c-0000-0000-C000-000000000046} = IPersist +HKEY_CLASSES_ROOT\Interface\{0000010c-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{0000010C-0000-0000-C000-000000000046}\NumMethods = 4 + +HKEY_CLASSES_ROOT\Interface\{0000010D-0000-0000-C000-000000000046} = IViewObject +HKEY_CLASSES_ROOT\Interface\{0000010D-0000-0000-C000-000000000046}\NumMethods = 9 + +HKEY_CLASSES_ROOT\Interface\{0000010e-0000-0000-C000-000000000046} = IDataObject +HKEY_CLASSES_ROOT\Interface\{0000010e-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{0000010E-0000-0000-C000-000000000046}\NumMethods = 12 + +HKEY_CLASSES_ROOT\Interface\{0000010f-0000-0000-C000-000000000046} = IAdviseSink +HKEY_CLASSES_ROOT\Interface\{0000010f-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{0000010F-0000-0000-C000-000000000046}\NumMethods = 8 + +HKEY_CLASSES_ROOT\Interface\{00000110-0000-0000-C000-000000000046} = IDataAdviseHolder +HKEY_CLASSES_ROOT\Interface\{00000110-0000-0000-C000-000000000046}\NumMethods = 7 + +HKEY_CLASSES_ROOT\Interface\{00000111-0000-0000-C000-000000000046} = IOleAdviseHolder +HKEY_CLASSES_ROOT\Interface\{00000111-0000-0000-C000-000000000046}\NumMethods = 9 + +HKEY_CLASSES_ROOT\Interface\{00000112-0000-0000-C000-000000000046} = IOleObject +HKEY_CLASSES_ROOT\Interface\{00000112-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{00000112-0000-0000-C000-000000000046}\NumMethods = 24 + +HKEY_CLASSES_ROOT\Interface\{00000113-0000-0000-C000-000000000046} = IOleInPlaceObject +HKEY_CLASSES_ROOT\Interface\{00000113-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{00000113-0000-0000-C000-000000000046}\BaseInterface = {00000114-0000-0000-C000-000000000046} +HKEY_CLASSES_ROOT\Interface\{00000113-0000-0000-C000-000000000046}\NumMethods = 9 + +HKEY_CLASSES_ROOT\Interface\{00000114-0000-0000-C000-000000000046} = IOleWindow +HKEY_CLASSES_ROOT\Interface\{00000114-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{00000114-0000-0000-C000-000000000046}\NumMethods = 5 + +HKEY_CLASSES_ROOT\Interface\{00000115-0000-0000-C000-000000000046} = IOleInPlaceUIWindow +HKEY_CLASSES_ROOT\Interface\{00000115-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{00000115-0000-0000-C000-000000000046}\BaseInterface = {00000114-0000-0000-C000-000000000046} +HKEY_CLASSES_ROOT\Interface\{00000115-0000-0000-C000-000000000046}\NumMethods = 9 + +HKEY_CLASSES_ROOT\Interface\{00000116-0000-0000-C000-000000000046} = IOleInPlaceFrame +HKEY_CLASSES_ROOT\Interface\{00000116-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{00000116-0000-0000-C000-000000000046}\NumMethods = 15 + +HKEY_CLASSES_ROOT\Interface\{00000117-0000-0000-C000-000000000046} = IOleInPlaceActiveObject +HKEY_CLASSES_ROOT\Interface\{00000117-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{00000117-0000-0000-C000-000000000046}\BaseInterface = {00000114-0000-0000-C000-000000000046} +HKEY_CLASSES_ROOT\Interface\{00000117-0000-0000-C000-000000000046}\NumMethods = 10 + +HKEY_CLASSES_ROOT\Interface\{00000118-0000-0000-C000-000000000046} = IOleClientSite +HKEY_CLASSES_ROOT\Interface\{00000118-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{00000118-0000-0000-C000-000000000046}\NumMethods = 9 + +HKEY_CLASSES_ROOT\Interface\{00000119-0000-0000-C000-000000000046} = IOleInPlaceSite +HKEY_CLASSES_ROOT\Interface\{00000119-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{00000119-0000-0000-C000-000000000046}\BaseInterface = {00000114-0000-0000-C000-000000000046} +HKEY_CLASSES_ROOT\Interface\{00000119-0000-0000-C000-000000000046}\NumMethods = 15 + +HKEY_CLASSES_ROOT\Interface\{0000011a-0000-0000-C000-000000000046} = IParseDisplayName +HKEY_CLASSES_ROOT\Interface\{0000011a-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{0000011a-0000-0000-C000-000000000046}\NumMethods = 4 + +HKEY_CLASSES_ROOT\Interface\{0000011b-0000-0000-C000-000000000046} = IOleContainer +HKEY_CLASSES_ROOT\Interface\{0000011b-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{0000011b-0000-0000-C000-000000000046}\BaseInterface = {0000011A-0000-0000-C000-000000000046} +HKEY_CLASSES_ROOT\Interface\{0000011b-0000-0000-C000-000000000046}\NumMethods = 6 + +HKEY_CLASSES_ROOT\Interface\{0000011c-0000-0000-C000-000000000046} = IOleItemContainer +HKEY_CLASSES_ROOT\Interface\{0000011c-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{0000011c-0000-0000-C000-000000000046}\BaseInterface = {0000011B-0000-0000-C000-000000000046} +HKEY_CLASSES_ROOT\Interface\{0000011c-0000-0000-C000-000000000046}\NumMethods = 9 + +HKEY_CLASSES_ROOT\Interface\{0000011D-0000-0000-C000-000000000046} = IOleLink +HKEY_CLASSES_ROOT\Interface\{0000011D-0000-0000-C000-000000000046}\NumMethods = 14 + +HKEY_CLASSES_ROOT\Interface\{0000011E-0000-0000-C000-000000000046} = IOleCache +HKEY_CLASSES_ROOT\Interface\{0000011E-0000-0000-C000-000000000046}\NumMethods = 8 + +HKEY_CLASSES_ROOT\Interface\{00000121-0000-0000-C000-000000000046} = IDropSource +HKEY_CLASSES_ROOT\Interface\{00000121-0000-0000-C000-000000000046}\NumMethods = 5 + +HKEY_CLASSES_ROOT\Interface\{00000122-0000-0000-C000-000000000046} = IDropTarget +HKEY_CLASSES_ROOT\Interface\{00000122-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{00000122-0000-0000-C000-000000000046}\NumMethods = 7 + +HKEY_CLASSES_ROOT\Interface\{00000124-0000-0000-C000-000000000046} = IDebugStream +HKEY_CLASSES_ROOT\Interface\{00000124-0000-0000-C000-000000000046}\NumMethods = 19 + +HKEY_CLASSES_ROOT\Interface\{00000125-0000-0000-C000-000000000046} = IAdviseSink2 +HKEY_CLASSES_ROOT\Interface\{00000125-0000-0000-C000-000000000046}\ProxyStubClsid32 = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +HKEY_CLASSES_ROOT\Interface\{00000125-0000-0000-C000-000000000046}\BaseInterface = {0000010F-0000-0000-C000-000000000046} +HKEY_CLASSES_ROOT\Interface\{00000125-0000-0000-C000-000000000046}\NumMethods = 9 + +HKEY_CLASSES_ROOT\Interface\{00000126-0000-0000-C000-000000000046} = IRunnableObject +HKEY_CLASSES_ROOT\Interface\{00000126-0000-0000-C000-000000000046}\NumMethods = 8 + +HKEY_CLASSES_ROOT\Interface\{00000127-0000-0000-C000-000000000046} = IViewObject2 +HKEY_CLASSES_ROOT\Interface\{00000127-0000-0000-C000-000000000046}\BaseInterface = {0000010D-0000-0000-C000-000000000046} +HKEY_CLASSES_ROOT\Interface\{00000127-0000-0000-C000-000000000046}\NumMethods = 10 + +HKEY_CLASSES_ROOT\Interface\{00000128-0000-0000-C000-000000000046} = IOleCache2 +HKEY_CLASSES_ROOT\Interface\{00000128-0000-0000-C000-000000000046}\BaseInterface = {0000011E-0000-0000-C000-000000000046} +HKEY_CLASSES_ROOT\Interface\{00000128-0000-0000-C000-000000000046}\NumMethods = 10 + +HKEY_CLASSES_ROOT\Interface\{00000129-0000-0000-C000-000000000046} = IOleCacheControl +HKEY_CLASSES_ROOT\Interface\{00000129-0000-0000-C000-000000000046}\NumMethods = 5 + +HKEY_CLASSES_ROOT\Interface\{00020400-0000-0000-C000-000000000046} = IDispatch +HKEY_CLASSES_ROOT\Interface\{00020400-0000-0000-C000-000000000046}\NumMethods = 7 +HKEY_CLASSES_ROOT\Interface\{00020400-0000-0000-C000-000000000046}\ProxyStubClsid32 = {00020420-0000-0000-C000-000000000046} + +HKEY_CLASSES_ROOT\Interface\{00020404-0000-0000-C000-000000000046} = IEnumVARIANT +HKEY_CLASSES_ROOT\Interface\{00020404-0000-0000-C000-000000000046}\NumMethods = 7 +HKEY_CLASSES_ROOT\Interface\{00020404-0000-0000-C000-000000000046}\ProxyStubClsid32 = {00020421-0000-0000-C000-000000000046} + +HKEY_CLASSES_ROOT\Interface\{00020401-0000-0000-C000-000000000046} = ITypeInfo +HKEY_CLASSES_ROOT\Interface\{00020401-0000-0000-C000-000000000046}\NumMethods = 22 +HKEY_CLASSES_ROOT\Interface\{00020401-0000-0000-C000-000000000046}\ProxyStubClsid32 = {00020422-0000-0000-C000-000000000046} + +HKEY_CLASSES_ROOT\Interface\{00020402-0000-0000-C000-000000000046} = ITypeLib +HKEY_CLASSES_ROOT\Interface\{00020402-0000-0000-C000-000000000046}\NumMethods = 13 + +HKEY_CLASSES_ROOT\Interface\{00020403-0000-0000-C000-000000000046} = ITypeComp +HKEY_CLASSES_ROOT\Interface\{00020403-0000-0000-C000-000000000046}\NumMethods = 5 + +HKEY_CLASSES_ROOT\Interface\{00020405-0000-0000-C000-000000000046} = ICreateTypeInfo +HKEY_CLASSES_ROOT\Interface\{00020405-0000-0000-C000-000000000046}\NumMethods = 26 + +HKEY_CLASSES_ROOT\Interface\{00020406-0000-0000-C000-000000000046} = ICreateTypeLib +HKEY_CLASSES_ROOT\Interface\{00020406-0000-0000-C000-000000000046}\NumMethods = 13 + +HKEY_CLASSES_ROOT\Interface\{D5F56A34-593B-101A-B569-08002B2DBF7A} = IRpcProxyBuffer +HKEY_CLASSES_ROOT\Interface\{D5F56A34-593B-101A-B569-08002B2DBF7A}\NumMethods = 5 + +HKEY_CLASSES_ROOT\Interface\{D5F569D0-593B-101A-B569-08002B2DBF7A} = IPSFactoryBuffer +HKEY_CLASSES_ROOT\Interface\{D5F569D0-593B-101A-B569-08002B2DBF7A}\NumMethods = 5 + +HKEY_CLASSES_ROOT\Interface\{D5F56B60-593B-101A-B569-08002B2DBF7A} = IRpcChannelBuffer +HKEY_CLASSES_ROOT\Interface\{D5F56B60-593B-101A-B569-08002B2DBF7A}\NumMethods = 8 + +HKEY_CLASSES_ROOT\Interface\{D5F56AFC-593B-101A-B569-08002B2DBF7A} = IRpcStubBuffer +HKEY_CLASSES_ROOT\Interface\{D5F56AFC-593B-101A-B569-08002B2DBF7A}\NumMethods = 10 diff --git a/private/ole32/ih/clsctx.hxx b/private/ole32/ih/clsctx.hxx new file mode 100644 index 000000000..ff5a8f06a --- /dev/null +++ b/private/ole32/ih/clsctx.hxx @@ -0,0 +1,31 @@ +//+--------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1992 - 1996. +// +// File: clsctx.hxx +// +// Contents: Defines special CLSCTX to for 16 bit processes +// +// History: 6-16-95 ricksa Created +// +// BUGBUG: Post Win95 RTM, this should be merged into the public headers. +// Actually, the best approach would be to look at the two +// CLSCTX that have to do with 16 bit and merge them into one. +// +//---------------------------------------------------------------------------- +#ifndef __clcstx_hxx__ +#define __clsctx_hxx__ + +// this is chicago only +#define CLSCTX_16BIT 0x40 + +// note that there are two more high-order bits defined in ole2com.h +// for PS_DLL and NO_REMAP for internal use only +#ifdef WX86OLE +#define CLSCTX_VALID_MASK 0x000000df +#else +#define CLSCTX_VALID_MASK 0x0000001f +#endif + +#endif // __clsctx_hxx__ diff --git a/private/ole32/ih/ddesrvr.h b/private/ole32/ih/ddesrvr.h new file mode 100644 index 000000000..0c2da8eaf --- /dev/null +++ b/private/ole32/ih/ddesrvr.h @@ -0,0 +1,24 @@ +/* + ddesrvr.h + Header file for ddesrvr.cpp + + Author: + Jason Fuller jasonful 8-11-92 +*/ + +#ifndef fDdesrvr_h +#define fDdesrvr_h + +INTERNAL CreateDdeSrvrWindow (REFCLSID rclsid, HWND * phwnd = NULL); +INTERNAL DestroyDdeSrvrWindow (HWND hwnd, ATOM aClass); + +INTERNAL CreateCommonDdeWindow (void); +INTERNAL DestroyCommonDdeWindow (void); + +INTERNAL IsRunningInThisTask (LPOLESTR szFile, BOOL * pf); + +// Defined in cftable.cpp +STDAPI RemGetInfoForCid(REFCLSID clsid, LPDWORD pgrf, LPCLASSFACTORY * ppCF, + HWND ** pphwndDde, BOOL ** ppfAvail); + +#endif diff --git a/private/ole32/ih/debug.h b/private/ole32/ih/debug.h new file mode 100644 index 000000000..5b8c75820 --- /dev/null +++ b/private/ole32/ih/debug.h @@ -0,0 +1,316 @@ +//+---------------------------------------------------------------------------- +// +// File: +// debug.h +// +// Contents: +// macros and declarations for debug support--all are appropriately +// defined to nothing when not doing debug build +// +// Classes: +// +// Functions: +// +// History: +// 12/30/93 - ChrisWe - added file prologue; defined _DEBUG when +// DBG==1; added "const" to ASSERTDATA macro +// +//----------------------------------------------------------------------------- + + +#ifndef _DEBUG_H_ +#define _DEBUG_H_ + +#include <debnot.h> + +#ifndef RC_INVOKED +#ifdef _DEBUG +#define DBGSTATE " Debug is on" +#else +#define DBGSTATE " Debug is off" +#endif +#endif /* RC_INVOKED */ + +#ifndef _CAIRO_ +#include <ole2dbg.h> +#endif + +//these are bogus APIs (they do nothing) +STDAPI_(BOOL) ValidateAllObjects( BOOL fSuspicious ); +STDAPI_(void) DumpAllObjects( void ); + +#ifdef _DEBUG +BOOL InstallHooks(void); +BOOL UnInstallHooks(void); + +#undef ASSERTDATA +#define ASSERTDATA + +#undef AssertSz +#define AssertSz(a,b) ((a) ? NOERROR : FnAssert(#a, b, __FILE__, __LINE__)) +#undef Puts +#define Puts(s) OutputDebugString(TEXT(s)) + +#else // !_DEBUG + +#define ASSERTDATA +#define AssertSz(a, b) ((void)0) +#define Puts(s) ((void)0) + +#endif // _DEBUG + + +// special Assert for asserts below (since the expression is so large) +// REVIEW, shouldn't these be in the debug.h file? +#ifdef _DEBUG +#define AssertOut(a, b) { if (!(a)) FnAssert(szCheckOutParam, b, __FILE__, __LINE__); } +#else +#define AssertOut(a, b) ((void)0) +#endif + +#define AssertOutPtrParam(hr, p) \ + AssertOut(SUCCEEDED(hr) && IsValidPtrIn(p, sizeof(OLECHAR)) || \ + FAILED(hr) && (p) == NULL, \ + szBadOutParam) + +#define AssertOutPtrIface(hr, p) \ + AssertOut(SUCCEEDED(hr) && IsValidInterface(p) || \ + FAILED(hr) && (p) == NULL, \ + szBadOutIface) + +#define AssertOutPtrFailed(p) \ + AssertOut((p) == NULL, \ + szNonNULLOutPtr) + +#define AssertOutStgmedium(hr, pstgm) \ + AssertOut(SUCCEEDED(hr) && (pstgm)->tymed != TYMED_NULL || \ + FAILED(hr) && (pstgm)->tymed == TYMED_NULL, \ + szBadOutStgm) + + +// assert data for above assert out macros; once per dll +// Note that since these are only used in asserts, we leave them as ANSI +#define ASSERTOUTDATA \ + char szCheckOutParam[] = "check out param"; \ + char szBadOutParam[] = "Out pointer param conventions not followed"; \ + char szBadOutIface[] = "Out pointer interface conventions not followed"; \ + char szNonNULLOutPtr[] = "Out pointer not NULL on error"; \ + char szBadOutStgm[] = "Out stgmed param conventions not followed"; + +extern char szCheckOutParam[]; +extern char szBadOutParam[]; +extern char szBadOutIface[]; +extern char szNonNULLOutPtr[]; +extern char szBadOutStgm[]; + + +#ifdef __cplusplus + +interface IDebugStream; + +/* + * Class CBool wraps boolean values in such a way that they are + * readily distinguishable fron integers by the compiler so we can + * overload the stream << operator. + */ + +class FAR CBool +{ + BOOL value; +public: + CBool (BOOL& b) {value = b;} + operator BOOL( void ) { return value; } +}; + + +/* + * Class CHwnd wraps HWND values in such a way that they are + * readily distinguishable from UINTS by the compiler so we can + * overload the stream << operator + */ + +class FAR CHwnd +{ + HWND m_hwnd; + public: + CHwnd (HWND hwnd) {m_hwnd = hwnd; } + operator HWND( void ) {return m_hwnd;} +}; + +/* + * Class CAtom wraps ATOM values in such a way that they are + * readily distinguishable from UINTS by the compiler so we can + * overload the stream << operator + */ + +class FAR CAtom +{ + ATOM m_atom; + public: + CAtom (ATOM atom) {m_atom = atom; } + operator ATOM( void ) {return m_atom; } +}; + +/* + * IDebugStream is a stream to be used for debug output. One + * implementation uses the OutputDebugString function of Windows. + * + * The style is modeled on that of AT&T streams, and so uses + * overloaded operators. You can write to a stream in the + * following ways: + * + * *pdbstm << pUnk; // calls the IDebug::Dump function to + * display the object, if IDebug is supported. + * int n; + * *pdbstm << n; // writes n in decimal + * +- + * *pdbstm << sz; // writes a string + * + * CBool b(TRUE); + * *pdbstm << b; // writes True or False + * + * void FAR * pv; + * *pdbstm << pv; // writes the address pv in hex + * + * TCHAR ch; + * *pdbstm << ch; // writes the character + * + * ATOM atom; + * *pdbstm << CAtom(atom); // writes the string extracted from the atom + * + * HWND hwnd; + * *pdbstm << CHwnd(hwnd); // writes the info about a window handle + * + * These can be chained together, as such (somewhat artificial + * example): + * + * REFCLSID rclsid; + * pUnk->GetClass(&rclsid); + * *pdbstm << rclsid << " at " << (void FAR *)pUnk <<':' << pUnk; + * + * This produces something like: + * + * CFoo at A7360008: <description of object> + * + * The other useful feature is the Indent and UnIndent functions + * which allow an object to print some information, indent, print + * the info on its member objects, and unindent. This gives + * nicely formatted output. + * + * WARNING: do not (while implementing Dump) write + * + * *pdbstm << pUnkOuter + * + * since this will do a QueryInterface for IDebug, and start + * recursing! It is acceptable to write + * + * *pdbstm << (VOID FAR *)pUnkOuter + * + * as this will simply write the address of pUnkOuter. + * + */ + + +interface IDebugStream : public IUnknown +{ + STDMETHOD_(IDebugStream&, operator << ) ( IUnknown FAR * pDebug ) = 0; + STDMETHOD_(IDebugStream&, operator << ) ( REFCLSID rclsid ) = 0; + STDMETHOD_(IDebugStream&, operator << ) ( int n ) = 0; + STDMETHOD_(IDebugStream&, operator << ) ( long l ) = 0; + STDMETHOD_(IDebugStream&, operator << ) ( ULONG l ) = 0; + STDMETHOD_(IDebugStream&, operator << ) ( LPCTSTR sz ) = 0; + STDMETHOD_(IDebugStream&, operator << ) ( TCHAR ch ) = 0; + STDMETHOD_(IDebugStream&, operator << ) ( void FAR * pv ) = 0; + STDMETHOD_(IDebugStream&, operator << ) ( CBool b ) = 0; + STDMETHOD_(IDebugStream&, operator << ) ( CHwnd hwnd ) = 0; + STDMETHOD_(IDebugStream&, operator << ) ( CAtom atom ) = 0; + STDMETHOD_(IDebugStream&, Tab )( void ) = 0; + STDMETHOD_(IDebugStream&, Indent )( void ) = 0; + STDMETHOD_(IDebugStream&, UnIndent )( void ) = 0; + STDMETHOD_(IDebugStream&, Return )( void ) = 0; + STDMETHOD_(IDebugStream&, LF )( void ) = 0; +}; + +STDAPI_(IDebugStream FAR*) MakeDebugStream( short margin=70, short tabsize=4, BOOL fHeader=1); + + +interface IDebug +{ + STDMETHOD_(void, Dump )( IDebugStream FAR * pdbstm ) = 0; + STDMETHOD_(BOOL, IsValid )( BOOL fSuspicious = FALSE ) = 0; + +#ifdef NEVER + __export IDebug(void); + __export ~IDebug(void); +private: + +#ifdef _DEBUG + IDebug FAR * pIDPrev; + IDebug FAR * pIDNext; + + friend void STDAPICALLTYPE DumpAllObjects( void ); + friend BOOL STDAPICALLTYPE ValidateAllObjects( BOOL fSuspicious ); +#endif // _DEBUG +#endif // NEVER +}; + +/************************************************************************* +** The following functions can be used to log debug messages to a file +** and simutaneously write them to the dbwin debug window. +** The CDebugStream implementation automatically writes to a debug +** log file called "debug.log" in the current working directory. +** NOTE: The functions are only intended for C programmers. C++ +** programmers should use the "MakeDebugStream" instead. +*************************************************************************/ + +// Open a log file. +STDAPI_(HFILE) DbgLogOpen(LPCTSTR lpszFile, LPCTSTR lpszMode); + +// Close the log file. +STDAPI_(void) DbgLogClose(HFILE fh); + +// Write to debug log and debug window (used with cvw.exe or dbwin.exe). +STDAPI_(void) DbgLogOutputDebugString(HFILE fh, LPCTSTR lpsz); + +// Write to debug log only. +STDAPI_(void) DbgLogWrite(HFILE fh, LPCTSTR lpsz); + +// Write the current Date and Time to the log file. +STDAPI_(void) DbgLogTimeStamp(HFILE fh, LPCTSTR lpsz); + +// Write a banner separater to the log to separate sections. +STDAPI_(void) DbgLogWriteBanner(HFILE fh, LPCTSTR lpsz); + + + + +/* + * STDDEBDECL macro - helper for debug declaration + * + */ + +#ifdef _DEBUG + + #define STDDEBDECL(ignore, classname ) implement CDebug:public IDebug { public: \ + CDebug( C##classname FAR * p##classname ) { m_p##classname = p##classname;} \ + ~CDebug(void) {} \ + STDMETHOD_(void, Dump)(IDebugStream FAR * pdbstm ); \ + STDMETHOD_(BOOL, IsValid)(BOOL fSuspicious ); \ + private: C##classname FAR* m_p##classname; }; \ + DECLARE_NC(C##classname, CDebug) \ + CDebug m_Debug; + + #define CONSTRUCT_DEBUG m_Debug(this), + +#else // _DEBUG + +// no debugging +#define STDDEBDECL(cclassname,classname) +#define CONSTRUCT_DEBUG + +#endif // _DEBUG + +#endif __cplusplus + +#endif // !_DEBUG_H_ diff --git a/private/ole32/ih/dragopt.h b/private/ole32/ih/dragopt.h new file mode 100644 index 000000000..e33f33589 --- /dev/null +++ b/private/ole32/ih/dragopt.h @@ -0,0 +1,163 @@ +//+------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1992 - 1993. +// +// File: dragopt.h +// +// Contents: Intercomponent definitions to support the Drag/Drop optimization +// +// Functions: +// +// History: dd-mmm-yy Author Comment +// 08-Nov-94 alexgo added PrivDragDrop +// 30-Sep-94 ricksa Created +// +// Notes: +// +//-------------------------------------------------------------------------- + +#ifndef _DRAGOPT_H + +//+------------------------------------------------------------------------- +// +// Function: UnmarshalDragDataObject +// +// Synopsis: Handles unmarshaling of a marshaled data object +// +// Arguments: [pvMarshaledDataObject] - the marshaled buffer +// +// Returns: NULL - could not unmarshal +// ~NULL - remote IDataObject +// +// Algorithms: see com\rot\getif.cxx +// +// History: dd-mmm-yy Author Comment +// 30-Sep-94 Ricksa Created +// +//-------------------------------------------------------------------------- +IDataObject *UnmarshalDragDataObject(void *pvMarshaledDataObject); + + + + + +//+------------------------------------------------------------------------- +// +// Function: CreateDragDataObject +// +// Synopsis: Handles unmarshaling of a marshaled data object +// +// Arguments: [pvMarshaledDataObject] - the marshaled buffer for data object +// [dwSmId] - id of shared memory for formats. +// [ppIDataObject] - where to put Drag data object +// +// Returns: NOERROR - created a data object +// E_OUTOFMEMORY - could not allocate the Drag data object +// +// Algorithms: see ole232\drag\ido.cpp +// +// History: dd-mmm-yy Author Comment +// 30-Sep-94 Ricksa Created +// +//-------------------------------------------------------------------------- +HRESULT CreateDragDataObject( + void *pvMarshaledDataObject, + DWORD dwSmId, + IDataObject **ppIDataObject); + +typedef void * DDInfo; + +//+------------------------------------------------------------------------- +// +// Function: FreeDragDropInfo +// +// Synopsis: frees a DDInfo handle (aka as a SPrivDragDrop struct) +// +// Effects: +// +// Arguments: [hDDInfo] -- handle to free +// +// Requires: +// +// Returns: void +// +// Signals: +// +// Modifies: +// +// Algorithm: +// +// History: dd-mmm-yy Author Comment +// 07-Jan-95 alexgo author +// +// Notes: +// +//-------------------------------------------------------------------------- + +void FreeDragDropInfo( DDInfo hDDInfo ); + + +// +// Drag Drop interpreter op codes +// + +typedef enum tagDRAGOP +{ + DRAGOP_ENTER = 1, + DRAGOP_OVER = 2, + DRAGOP_LEAVE = 3, + DRAGOP_DROP = 4 +} DRAGOP; + +//+------------------------------------------------------------------------- +// +// Function: PrivDragDrop +// +// Synopsis: Main entry point for the private version of the OLE +// protocol. Instead of using IDropTarget proxy/stubs, +// we use a private rpc and do most of the work on the +// drop target side. +// +// Effects: +// +// Arguments: [hwnd] -- the target hwnd +// [dop] -- the drag drop operation to perform +// [DOBuffer] -- the data object buffer to send +// [pIDataObject] -- the data object interface (for the +// local case) +// [grfKeyState] -- the keyboard state +// [ptl] -- the mouse position +// [pdwEffect] -- the drag drop effect +// [hwndSource] -- the window of the drag source. Used +// to attach input queues for 16bit targets +// [phDDInfo] -- pointer to a DragDropInfo handle, for +// caching rpc info about the drop target. +// May not be NULL, but on DragEnter, +// should be a pointer to NULL. +// +// Requires: +// +// Returns: HRESULT +// +// Signals: +// +// Modifies: +// +// Algorithm: see getif.cxx +// +// History: dd-mmm-yy Author Comment +// 30-Sep-94 Ricksa Created +// 08-Nov-94 alexgo modified to use DRAGOP's +// 08-Jan-95 alexgo added caching of RPC binding handles via +// DDInfo handles +// Notes: +// +//-------------------------------------------------------------------------- + + +HRESULT PrivDragDrop( HWND hwnd, DRAGOP dop, IFBuffer DOBuffer, IDataObject * + pIDataObject, DWORD grfKeyState, POINTL ptl, DWORD *pdwEffect, + HWND hwndSource, DDInfo *phDDInfo); + +#endif // _DRAGOPT_H diff --git a/private/ole32/ih/exports.hxx b/private/ole32/ih/exports.hxx new file mode 100644 index 000000000..4623b5a4c --- /dev/null +++ b/private/ole32/ih/exports.hxx @@ -0,0 +1,211 @@ +//+--------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1992 - 1994. +// +// File: exports.hxx +// +// Contains: API id's for all our exported functions, used by tracing macros/functions +// ID's are 32 bit unsigned integers, with the upper 16 bits +// defining which Interface this function belongs to (API's have a 0 here) +// and the lower 16 bits being the actual function identifiers. +// This limits our tracing to only handle us to 65K methods per interface, and 65K exports, +// but if that ever happens woe to the programmer who uses OLE +// +// History: 20-Jul-95 t-stevan Created... +// +//---------------------------------------------------------------------------- + +#ifndef __EXPORTS_HXX__ +#define __EXPORTS_HXX__ + +// *** Global Data *** +// This is a table of pointers to tables of strings, each table corresponding +// to an Interface's methods, or in the zeroth table's case, APIs and exports +// we ifdef this out with a _TRACE +#if DBG==1 +extern const char **g_ppNameTables[]; +extern const char *g_pscInterfaceNames[]; +#endif + +// *** Defines and constants *** +// This stuff is not ifdef'd out because it doesn't hurt to have it defined +#define API_NAMETABLE 0x00000000 +#define API_START 0 + +// APIs and exports +#define API_CoInitialize (API_NAMETABLE|API_START) +#define API_CoUninitialize (API_NAMETABLE|(API_START+1)) +#define API_CoGetClassObject (API_NAMETABLE|(API_START+2)) +#define API_CoRegisterClassObject (API_NAMETABLE|(API_START+3)) +#define API_CoRevokeClassObject (API_NAMETABLE|(API_START+4)) +#define API_CoMarshalInterface (API_NAMETABLE|(API_START+5)) +#define API_CoUnmarshalInterface (API_NAMETABLE|(API_START+6)) +#define API_CoReleaseMarshalData (API_NAMETABLE|(API_START+7)) +#define API_CoDisconnectObject (API_NAMETABLE|(API_START+8)) +#define API_CoLockObjectExternal (API_NAMETABLE|(API_START+9)) +#define API_CoGetStandardMarshal (API_NAMETABLE|(API_START+10)) +#define API_CoIsHandlerConnected (API_NAMETABLE|(API_START+11)) +#define API_CoFreeAllLibraries (API_NAMETABLE|(API_START+12)) +#define API_CoFreeUnusedLibraries (API_NAMETABLE|(API_START+13)) +#define API_CoCreateInstance (API_NAMETABLE|(API_START+14)) +#define API_CLSIDFromString (API_NAMETABLE|(API_START+15)) +#define API_CoIsOle1Class (API_NAMETABLE|(API_START+16)) +#define API_ProgIDFromCLSID (API_NAMETABLE|(API_START+17)) +#define API_CLSIDFromProgID (API_NAMETABLE|(API_START+18)) +#define API_CoCreateGuid (API_NAMETABLE|(API_START+19)) +#define API_CoFileTimeToDosDateTime (API_NAMETABLE|(API_START+20)) +#define API_CoDosDateTimeToFileTime (API_NAMETABLE|(API_START+21)) +#define API_CoFileTimeNow (API_NAMETABLE|(API_START+22)) +#define API_CoRegisterMessageFilter (API_NAMETABLE|(API_START+23)) +#define API_CoGetTreatAsClass (API_NAMETABLE|(API_START+24)) +#define API_CoTreatAsClass (API_NAMETABLE|(API_START+25)) +#define API_DllGetClassObject (API_NAMETABLE|(API_START+26)) +#define API_StgCreateDocfile (API_NAMETABLE|(API_START+27)) +#define API_StgCreateDocfileOnILockBytes (API_NAMETABLE|(API_START+28)) +#define API_StgOpenStorage (API_NAMETABLE|(API_START+29)) +#define API_StgOpenStorageOnILockBytes (API_NAMETABLE|(API_START+30)) +#define API_StgIsStorageFile (API_NAMETABLE|(API_START+31)) +#define API_StgIsStorageILockBytes (API_NAMETABLE|(API_START+32)) +#define API_StgSetTimes (API_NAMETABLE|(API_START+33)) +#define API_CreateDataAdviseHolder (API_NAMETABLE|(API_START+34)) +#define API_CreateDataCache (API_NAMETABLE|(API_START+35)) +#define API_BindMoniker (API_NAMETABLE|(API_START+36)) +#define API_MkParseDisplayName (API_NAMETABLE|(API_START+37)) +#define API_MonikerRelativePathTo (API_NAMETABLE|(API_START+38)) +#define API_MonikerCommonPrefixWith (API_NAMETABLE|(API_START+39)) +#define API_CreateBindCtx (API_NAMETABLE|(API_START+40)) +#define API_CreateGenericComposite (API_NAMETABLE|(API_START+41)) +#define API_GetClassFile (API_NAMETABLE|(API_START+42)) +#define API_CreateFileMoniker (API_NAMETABLE|(API_START+43)) +#define API_CreateItemMoniker (API_NAMETABLE|(API_START+44)) +#define API_CreateAntiMoniker (API_NAMETABLE|(API_START+45)) +#define API_CreatePointerMoniker (API_NAMETABLE|(API_START+46)) +#define API_GetRunningObjectTable (API_NAMETABLE|(API_START+47)) +#define API_ReadClassStg (API_NAMETABLE|(API_START+48)) +#define API_WriteClassStg (API_NAMETABLE|(API_START+49)) +#define API_ReadClassStm (API_NAMETABLE|(API_START+50)) +#define API_WriteClassStm (API_NAMETABLE|(API_START+51)) +#define API_WriteFmtUserTypeStg (API_NAMETABLE|(API_START+52)) +#define API_ReadFmtUserTypeStg (API_NAMETABLE|(API_START+53)) +#define API_OleInitialize (API_NAMETABLE|(API_START+54)) +#define API_OleUninitialize (API_NAMETABLE|(API_START+55)) +#define API_OleQueryLinkFromData (API_NAMETABLE|(API_START+56)) +#define API_OleQueryCreateFromData (API_NAMETABLE|(API_START+57)) +#define API_OleCreate (API_NAMETABLE|(API_START+58)) +#define API_OleCreateFromData (API_NAMETABLE|(API_START+59)) +#define API_OleCreateLinkFromData (API_NAMETABLE|(API_START+60)) +#define API_OleCreateStaticFromData (API_NAMETABLE|(API_START+61)) +#define API_OleCreateLink (API_NAMETABLE|(API_START+62)) +#define API_OleCreateLinkToFile (API_NAMETABLE|(API_START+63)) +#define API_OleCreateFromFile (API_NAMETABLE|(API_START+64)) +#define API_OleLoad (API_NAMETABLE|(API_START+65)) +#define API_OleSave (API_NAMETABLE|(API_START+66)) +#define API_OleLoadFromStream (API_NAMETABLE|(API_START+67)) +#define API_OleSaveToStream (API_NAMETABLE|(API_START+68)) +#define API_OleSetContainedObject (API_NAMETABLE|(API_START+69)) +#define API_OleNoteObjectVisible (API_NAMETABLE|(API_START+70)) +#define API_RegisterDragDrop (API_NAMETABLE|(API_START+71)) +#define API_RevokeDragDrop (API_NAMETABLE|(API_START+72)) +#define API_DoDragDrop (API_NAMETABLE|(API_START+73)) +#define API_OleSetClipboard (API_NAMETABLE|(API_START+74)) +#define API_OleGetClipboard (API_NAMETABLE|(API_START+75)) +#define API_OleFlushClipboard (API_NAMETABLE|(API_START+76)) +#define API_OleIsCurrentClipboard (API_NAMETABLE|(API_START+77)) +#define API_OleCreateMenuDescriptor (API_NAMETABLE|(API_START+78)) +#define API_OleSetMenuDescriptor (API_NAMETABLE|(API_START+79)) +#define API_OleDestroyMenuDescriptor (API_NAMETABLE|(API_START+80)) +#define API_OleDraw (API_NAMETABLE|(API_START+81)) +#define API_OleRun (API_NAMETABLE|(API_START+82)) +#define API_OleIsRunning (API_NAMETABLE|(API_START+83)) +#define API_OleLockRunning (API_NAMETABLE|(API_START+84)) +#define API_CreateOleAdviseHolder (API_NAMETABLE|(API_START+85)) +#define API_OleCreateDefaultHandler (API_NAMETABLE|(API_START+86)) +#define API_OleCreateEmbeddingHelper (API_NAMETABLE|(API_START+87)) +#define API_OleRegGetUserType (API_NAMETABLE|(API_START+88)) +#define API_OleRegGetMiscStatus (API_NAMETABLE|(API_START+89)) +#define API_OleRegEnumFormatEtc (API_NAMETABLE|(API_START+90)) +#define API_OleRegEnumVerbs (API_NAMETABLE|(API_START+91)) +#define API_OleConvertIStorageToOLESTREAM (API_NAMETABLE|(API_START+92)) +#define API_OleConvertOLESTREAMToIStorage (API_NAMETABLE|(API_START+93)) +#define API_OleConvertIStorageToOLESTREAMEx (API_NAMETABLE|(API_START+94)) +#define API_OleConvertOLESTREAMToIStorageEx (API_NAMETABLE|(API_START+95)) +#define API_OleDoAutoConvert (API_NAMETABLE|(API_START+96)) +#define API_OleGetAutoConvert (API_NAMETABLE|(API_START+97)) +#define API_OleSetAutoConvert (API_NAMETABLE|(API_START+98)) +#define API_GetConvertStg (API_NAMETABLE|(API_START+99)) +#define API_SetConvertStg (API_NAMETABLE|(API_START+100)) +#define API_ReadOleStg (API_NAMETABLE|(API_START+101)) +#define API_WriteOleStg (API_NAMETABLE|(API_START+102)) +#define API_CoGetCallerTID (API_NAMETABLE|(API_START+103)) +#define API_CoGetState (API_NAMETABLE|(API_START+104)) +#define API_CoSetState (API_NAMETABLE|(API_START+105)) +#define API_CoMarshalHresult (API_NAMETABLE|(API_START+106)) +#define API_CoUnmarshalHresult (API_NAMETABLE|(API_START+107)) +#define API_CoGetCurrentLogicalThreadId (API_NAMETABLE|(API_START+108)) +#define API_CoGetPSClsid (API_NAMETABLE|(API_START+109)) +#define API_CoMarshalInterThreadInterfaceInStream (API_NAMETABLE|(API_START+110)) +#define API_IIDFromString (API_NAMETABLE|(API_START+111)) +#define API_StringFromCLSID (API_NAMETABLE|(API_START+112)) +#define API_StringFromIID (API_NAMETABLE|(API_START+113)) +#define API_StringFromGUID2 (API_NAMETABLE|(API_START+114)) +#define API_CoBuildVersion (API_NAMETABLE|(API_START+115)) +#define API_CoGetMalloc (API_NAMETABLE|(API_START+116)) +#define API_CoInitializeWOW (API_NAMETABLE|(API_START+117)) +#define API_CoUnloadingWOW (API_NAMETABLE|(API_START+118)) +#define API_CoTaskMemAlloc (API_NAMETABLE|(API_START+119)) +#define API_CoTaskMemFree (API_NAMETABLE|(API_START+120)) +#define API_CoTaskMemRealloc (API_NAMETABLE|(API_START+121)) +#define API_CoFreeLibrary (API_NAMETABLE|(API_START+122)) +#define API_CoLoadLibrary (API_NAMETABLE|(API_START+123)) +#define API_CoCreateFreeThreadedMarshaler (API_NAMETABLE|(API_START+124)) +#define API_OleInitializeWOW (API_NAMETABLE|(API_START+125)) +#define API_OleDuplicateData (API_NAMETABLE|(API_START+126)) +#define API_OleGetIconOfFile (API_NAMETABLE|(API_START+127)) +#define API_OleGetIconOfClass (API_NAMETABLE|(API_START+128)) +#define API_OleMetafilePictFromIconAndLabel (API_NAMETABLE|(API_START+129)) +#define API_OleTranslateAccelerator (API_NAMETABLE|(API_START+130)) +#define API_ReleaseStgMedium (API_NAMETABLE|(API_START+131)) +#define API_ReadStringStream (API_NAMETABLE|(API_START+132)) +#define API_WriteStringStream (API_NAMETABLE|(API_START+133)) +#define API_OpenOrCreateStream (API_NAMETABLE|(API_START+134)) +#define API_IsAccelerator (API_NAMETABLE|(API_START+135)) +#define API_CreateILockBytesOnHGlobal (API_NAMETABLE|(API_START+136)) +#define API_GetHGlobalFromILockBytes (API_NAMETABLE|(API_START+137)) +#define API_SetDocumentBitStg (API_NAMETABLE|(API_START+138)) +#define API_GetDocumentBitStg (API_NAMETABLE|(API_START+139)) +#define API_CreateStreamOnHGlobal (API_NAMETABLE|(API_START+140)) +#define API_GetHGlobalFromStream (API_NAMETABLE|(API_START+141)) +#define API_CoGetInterfaceAndReleaseStream (API_NAMETABLE|(API_START+142)) +#define API_CoGetCurrentProcess (API_NAMETABLE|(API_START+143)) +#define API_CoQueryReleaseObject (API_NAMETABLE|(API_START+144)) +#define API_CoRegisterMallocSpy (API_NAMETABLE|(API_START+145)) +#define API_CoRevokeMallocSpy (API_NAMETABLE|(API_START+146)) +#define API_CoGetMarshalSizeMax (API_NAMETABLE|(API_START+147)) +#define API_CoGetObject (API_NAMETABLE|(API_START+148)) +#define API_CreateClassMoniker (API_NAMETABLE|(API_START+149)) +#define API_OleCreateEx (API_NAMETABLE|(API_START+150)) +#define API_OleCreateFromDataEx (API_NAMETABLE|(API_START+151)) +#define API_OleCreateLinkFromDataEx (API_NAMETABLE|(API_START+152)) +#define API_OleCreateLinkEx (API_NAMETABLE|(API_START+153)) +#define API_OleCreateLinkToFileEx (API_NAMETABLE|(API_START+154)) +#define API_OleCreateFromFileEx (API_NAMETABLE|(API_START+155)) +#define API_CoRegisterSurrogate (API_NAMETABLE|(API_START+156)) +#define API_COUNT (API_CoRegisterSurrogate+1) + +// Interface methods +// IUnknown +#define IFACE_IUNKNOWN 0x00010000 + +#define IFM_IUnknown_QueryInterface (IFACE_IUNKNOWN) +#define IFM_IUnknown_AddRef (IFACE_IUNKNOWN|1) +#define IFM_IUnknown_Release (IFACE_IUNKNOWN|2) + +// IClassFactory +#define IFACE_ICLASSFACTORY 0x00020000 + +#define IFM_IClassFactory_CreateInstance (IFACE_ICLASSFACTORY) +#define IFM_IClassFactory_LockServer (IFACE_ICLASSFACTORY|1) + +#endif // __EXPORTS_HXX__ + diff --git a/private/ole32/ih/getif.hxx b/private/ole32/ih/getif.hxx new file mode 100644 index 000000000..3694ec701 --- /dev/null +++ b/private/ole32/ih/getif.hxx @@ -0,0 +1,32 @@ +//+------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1992 - 1993. +// +// File: getif.hxx +// +// Contents: Declaration APIs used to get an interface from a window +// +// History: 29-Dec-93 Ricksa Crated +// +//-------------------------------------------------------------------------- +#ifndef __GETIF_HXX__ +#define __GETIF_HXX__ + +// Assign an endpoint property to a window so interfaces can be returned +// from properties on the window. +extern "C" HRESULT AssignEndpointProperty(HWND hWnd); + +// Remove the end point property from the window +extern "C" HRESULT UnAssignEndpointProperty(HWND hWnd,DWORD* dwAssignAptID); + +#define ENDPOINT_PROP_NAME L"OleEndPointID" + +// Get an interface from the property listed on the window +extern "C" GetInterfaceFromWindowProp( + HWND hWnd, + REFIID riid, + IUnknown **ppunk, + LPOLESTR pwszPropertyName); + +#endif // __GETIF_HXX__ diff --git a/private/ole32/ih/hkldinp.h b/private/ole32/ih/hkldinp.h new file mode 100644 index 000000000..e2f9f7fa6 --- /dev/null +++ b/private/ole32/ih/hkldinp.h @@ -0,0 +1,100 @@ +//+------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1994. +// +// File: hkLdInP.h +// +// Contents: Inline function to load the DLL of an inproc server +// +// Functions: +// +// History: 01-Sep-94 Don Wright Created +// 08-Sep-94 Garry Lenz Separate into two functions +// 14-Nov-94 Don Wright Make LogEvent messages more complete +// +//-------------------------------------------------------------------------- +#ifndef _LDINPROC_H_ +#define _LDINPROC_H_ + +#include <Windows.h> +#include <TChar.h> +#include "hkregkey.h" +#include "hkLogEvt.h" +#include "hkole32x.h" + +#define MAX_CLSID 39 // Length of CLSID string including zero terminator + +enum ELOGEVENT +{ + eDontLogEvents, + eLogEvents +}; + +inline HINSTANCE LOADINPROCSERVER(WCHAR* wszClsid, ELOGEVENT eLog=eLogEvents) +{ + WCHAR szEventSource[] = L"HookOleLoadInprocServer"; + CHAR szInProc32[] = "InprocServer32"; + CHAR szClsidKey[MAX_PATH]; + CHAR szDllName[MAX_PATH]; + WCHAR wszDllName[MAX_PATH]; + CHAR szClsid[MAX_CLSID]; + WCHAR szMessageBuff[1024]; + long lSize = sizeof(szDllName); + LONG lRegResults; + HINSTANCE hDll = NULL; + + strcpy(szClsidKey,szCLSIDKey); + strcat(szClsidKey,KEY_SEP); + + WideCharToMultiByte (CP_ACP, WC_COMPOSITECHECK, wszClsid, -01, szClsid, sizeof (szClsid), NULL, NULL); + + strcat(szClsidKey,szClsid); + strcat(szClsidKey,KEY_SEP); + strcat(szClsidKey,szInProc32); + lRegResults = RegQueryValueA(HKEY_CLASSES_ROOT, + szClsidKey, + szDllName, + &lSize); + if (lRegResults == ERROR_SUCCESS) + { + if (hDll == 0) + { + hDll = LoadLibraryA(szDllName); + if ((eLog == eLogEvents) && (hDll == 0)) + { + lstrcpyW(szMessageBuff,L"Error loading library - "); + + MultiByteToWideChar (CP_ACP, MB_PRECOMPOSED, szDllName, -1, wszDllName, lstrlenA(szDllName)+1); + + lstrcatW(szMessageBuff,wszDllName); + lstrcatW(szMessageBuff,L" for CLSID "); + lstrcatW(szMessageBuff,wszClsid); + LogEvent(szEventSource,szMessageBuff); + } + } + } + else if (eLog == eLogEvents) + { + lstrcpyW(szMessageBuff,L"Error reading registry for CLSID!"); + lstrcatW(szMessageBuff,wszClsid); + LogEvent(szEventSource,szMessageBuff); + } + return hDll; +} + +inline HINSTANCE LOADINPROCSERVER(REFCLSID rclsid, ELOGEVENT eLog=eLogEvents) +{ + WCHAR szClsid[MAX_CLSID]; + HRESULT hResult; + HINSTANCE hDll = NULL; + + hResult = StringFromGUID2(rclsid,szClsid,sizeof(szClsid)); + if (SUCCEEDED(hResult)) + { + hDll = LOADINPROCSERVER(szClsid, eLogEvents); + } + return hDll; +} + +#endif //_LDINPROC_H_ diff --git a/private/ole32/ih/hklogevt.h b/private/ole32/ih/hklogevt.h new file mode 100644 index 000000000..4c0f3cb17 --- /dev/null +++ b/private/ole32/ih/hklogevt.h @@ -0,0 +1,34 @@ +//+------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1994. +// +// File: hkLogEvt.h +// +// Contents: Log an application event +// +// Functions: +// +// History: 28-Sep-94 Don Wright Created +// +//-------------------------------------------------------------------------- +#ifndef _LOGEVENT_H_ +#define _LOGEVENT_H_ + +inline void LogEvent(LPWSTR pSourceString,LPWSTR pEventText) +{ + HANDLE hEvent = RegisterEventSourceW(NULL,pSourceString); + LPCWSTR *pEventStr = (LPCWSTR *)&pEventText; + ReportEventW(hEvent, + EVENTLOG_INFORMATION_TYPE, + 0, + 0, + NULL, + 1, + 0, + pEventStr, + NULL); + DeregisterEventSource(hEvent); +} + +#endif // _LOGEVENT_H_ diff --git a/private/ole32/ih/hkole32.h b/private/ole32/ih/hkole32.h new file mode 100644 index 000000000..e9278f17b --- /dev/null +++ b/private/ole32/ih/hkole32.h @@ -0,0 +1,284 @@ +//+------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1994. +// +// File: hkOle32.h +// +// Contents: OLE32 Hook Header File +// +// Functions: +// +// History: 29-Nov-94 Ben Lawrence, Don Wright Created +// +//-------------------------------------------------------------------------- +#ifndef _OLE32HK_H_ +#define _OLE32HK_H_ + + +#ifndef _NOHOOKOLE /* If _NOHOOKOLE is *NOT* defined then generate support code */ + +#ifndef INITGUID +#define INITGUID +#endif /* INITGUID */ + +#include "hkole32x.h" +#include "hkoleobj.h" +#include "hkLdInP.h" +#include "hkregkey.h" +#include "hkLogEvt.h" +#include "ictsguid.h" +#include <windows.h> + +extern IHookOleObject *pHookOleObject; +extern HINSTANCE hHookDll; +extern IClassFactory *pcfHook; +extern BOOL bHookEnabledOverride; +STDAPI_(HRESULT) EnableHookObject(BOOL bEnabled, BOOL *pbPrevious); + + +#define DEFHOOKOBJECT \ + HINSTANCE hHookDll = 0; /* Handle to SpyHook DLL */\ + IHookOleObject* pHookOleObject = 0; /* IHookInterface interface pointer */\ + IClassFactory* pcfHook = 0; /* Hook Class factory pointer */\ + BOOL bHookEnabledOverride = TRUE;\ + BOOL bUninited = TRUE; + +#define DEFENABLEHOOKOBJECT \ +STDAPI_(HRESULT) EnableHookObject(BOOL bEnabled, BOOL* pbPrevious) \ +{ \ + static WCHAR szEventSource[] = L"EnableHookObject"; \ + static WCHAR szCreateFailed[] = L"pcfHook->CreateInstance failed"; \ + static WCHAR szBadDisable[] = L"Attempt to disable without valid pointer."; \ + static WCHAR szBadEnable[] =L"Attempt to enable without valid pointer."; \ + HRESULT hReturn = E_UNEXPECTED; \ + if (pbPrevious != NULL) \ + { \ + if (IsBadWritePtr(pbPrevious, sizeof(BOOL))) return E_INVALIDARG; \ + /* if a valid pointer was supplied, store current state */\ + *pbPrevious = bHookEnabledOverride; \ + } \ + if ((bHookEnabledOverride != bEnabled) || bUninited) /* if this is really a state change */\ + { \ + bUninited = FALSE; \ + bHookEnabledOverride = bEnabled; \ + if (bHookEnabledOverride && hHookDll && pcfHook) /* hook enabled and dll loaded and class factory found */ \ + { \ + hReturn = pcfHook->CreateInstance(NULL, IID_IHookOleObject, (void**)&pHookOleObject); \ + if (hReturn != S_OK) \ + { \ + LogEvent(szEventSource, szCreateFailed); \ + } \ + } \ + else if (!bHookEnabledOverride) \ + { \ + if (hHookDll && pHookOleObject) /* dll loaded and hook active */ \ + { \ + pHookOleObject->Release(); \ + pHookOleObject = NULL; \ + hReturn = S_OK; \ + } \ + else \ + { \ + LogEvent(szEventSource, szBadDisable); \ + } \ + } \ + else \ + { \ + LogEvent(szEventSource, szBadEnable); \ + } \ + } \ + else /* else this is a change to the same state */\ + { \ + hReturn = S_OK; /* return ok, do nothing */ \ + } \ + return hReturn; \ +} + +#define DEFGETHOOKINTERFACE \ +STDAPI_(HRESULT) GetHookInterface(IHookOleObject** ppNewHook) \ + { \ + if (IsBadWritePtr(ppNewHook, sizeof(IHookOleObject*))) return E_INVALIDARG; \ + *ppNewHook = pHookOleObject; \ + if (pHookOleObject) \ + { \ + pHookOleObject->AddRef(); \ + return S_OK; \ + } \ + return E_NOINTERFACE; \ + } + + +// These should be removed after 4.0 RTM. +// +inline void CALLHOOKOBJECT(HRESULT MAC_hr, REFCLSID MAC_rclsid, REFIID MAC_riid, IUnknown** MAC_ppv) +{ +} + +inline void CALLHOOKOBJECTCREATE(HRESULT MAC_hr, REFCLSID MAC_rclsid, REFIID MAC_riid, IUnknown** MAC_ppv) +{ +} + +inline void INITHOOKOBJECT(HRESULT MAC_hr) +{ + static WCHAR szEventSource[] = L"InitHookObject"; + static WCHAR szGetClassObjectFailed[] = L"DllGetClassObject failed"; + static WCHAR szNoEntryPoint[] = L"Could not find DllGetClassObject in Hook dll"; + static WCHAR szDllFailedToLoad[] = L"Hook dll failed to load"; + static WCHAR szHookNotRegistered[] = L"Hook CLSID is not registered correctly"; + static WCHAR szHookAlreadyRunning[] = L"Hook already installed"; + + if (bHookEnabledOverride && SUCCEEDED(MAC_hr) && (!pHookOleObject)) + { + HRESULT hResult = S_OK; + if (pHookOleObject == 0) + { + + DWORD HookEnabled = FALSE; + HANDLE HookEvent = OpenEventA(EVENT_ALL_ACCESS,FALSE, szHookEventName); + + if ((hHookDll == 0) && HookEvent) + { + CloseHandle(HookEvent); + + HKEY hRegKey; + LONG RegResults = RegOpenKeyA(HookBase,szHookKey,&hRegKey); + if (RegResults == ERROR_SUCCESS) + { + CLSID HookClsid; + CHAR szClsidText[MAX_PATH]; + DWORD RegDataType; + DWORD Datasize; + + Datasize = sizeof(szClsidText); + RegQueryValueExA(hRegKey, + szCLSIDValue, + NULL, + &RegDataType, + (BYTE*)&szClsidText, + &Datasize); + + if (SUCCEEDED(CLSIDFromStringA(szClsidText,&HookClsid))) + { + hHookDll = LOADINPROCSERVER(HookClsid); + if (hHookDll) + { + /* The OLE Spy Hook DLL exists */ + LPFNGETCLASSOBJECT pfnGCO; + pfnGCO = (LPFNGETCLASSOBJECT)GetProcAddress(hHookDll, "DllGetClassObject"); + if (pfnGCO) + { + if ((*pfnGCO)(HookClsid, IID_IClassFactory, (void**)&pcfHook) == NOERROR) + { + EnableHookObject(TRUE,NULL); + } + else // class factory could not be found + { + LogEvent(szEventSource, szGetClassObjectFailed); + } + } + else // GetProcAddress failed + { + LogEvent(szEventSource, szNoEntryPoint); + } + } + else // dll would not load or could not be found + { + LogEvent(szEventSource, szDllFailedToLoad); + } + + } + else // could not find clsid in registry + { + LogEvent(szEventSource, szHookNotRegistered); + } + RegCloseKey(hRegKey); + } // hook not enabled + + } // hook not in registry + } + else + { + LogEvent(szEventSource, szHookAlreadyRunning); + } + } +} + + +inline void UNINITHOOKOBJECT(void) +{ + if (pHookOleObject) + { + if (pHookOleObject) + { + pHookOleObject->Release(); + pHookOleObject = NULL; + } + if (pcfHook) + { + pcfHook->Release(); + pcfHook = NULL; + } + } +} + +#ifdef DEFCLSIDS + +//these are all undefined in ole32hk because they are private CLSIDs +//we define them here to null +#define GUID_NULL CLSID_HookOleObject //use this for now so it will compile + +#define CLSID_ItemMoniker CLSID_NULL +#define CLSID_FileMoniker CLSID_NULL +#define CLSID_PointerMoniker CLSID_NULL +#define CLSID_CompositeMoniker CLSID_NULL +#define CLSID_AntiMoniker CLSID_NULL +#define CLSID_PSBindCtx CLSID_NULL + +#endif /* DEFCLSIDS */ + +/////////////////////////////////////////////////////////////////////////////// +#else /* _NOHOOKOLE */ /* If _NOHOOKOLE *IS* defined then generate empty stubs */ + +#include "hkoleobj.h" // still need definition of IHookOleObject + +#define DEFHOOKOBJECT + +#define DEFENABLEHOOKOBJECT \ +STDAPI_(HRESULT) EnableHookObject(BOOL bEnabled, BOOL* pbPrevious) \ +{ \ + if (pbPrevious != NULL) \ + { \ + if (IsBadWritePtr(pbPrevious, sizeof(BOOL))) return E_INVALIDARG; \ + *pbPrevious = FALSE; \ + } \ + return E_NOTIMPL; \ +} + +#define DEFGETHOOKINTERFACE \ +STDAPI_(HRESULT) GetHookInterface(IHookOleObject** ppNewHook) \ +{ \ + if (IsBadWritePtr(ppNewHook, sizeof(IHookOleObject*))) return E_INVALIDARG; \ + *ppNewHook = NULL; \ + return E_NOTIMPL; \ +} + +inline void CALLHOOKOBJECT(HRESULT MAC_hr, REFCLSID MAC_rclsid, REFIID MAC_riid, IUnknown** MAC_ppv) +{ +} + +inline void CALLHOOKOBJECTCREATE(HRESULT MAC_hr, REFCLSID MAC_rclsid, REFIID MAC_riid, IUnknown** MAC_ppv) +{ +} + +inline void INITHOOKOBJECT(HRESULT MAC_hr) +{ +} + +inline void UNINITHOOKOBJECT(void) +{ +} + +#endif // _NOHOOKOLE + +#endif // _OLE32HK_H_ diff --git a/private/ole32/ih/hkole32x.h b/private/ole32/ih/hkole32x.h new file mode 100644 index 000000000..895c0e59c --- /dev/null +++ b/private/ole32/ih/hkole32x.h @@ -0,0 +1,134 @@ +//+------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1994. +// +// File: hkOle32x.h +// +// Contents: OLE 32 Extensions Header File +// +// Functions: +// +// History: 29-Nov-94 Garry Lenz Created +// +//-------------------------------------------------------------------------- +#ifndef _HKOLE32X_H_ +#define _HKOLE32X_H_ + +#include <Windows.h> +#include <TChar.h> + +interface IHookOleObject; + +STDAPI CoGetCurrentLogicalThreadId(GUID* pguidLogicalThreadId); +STDAPI GetHookInterface(IHookOleObject** pIHookOleObject); +STDAPI EnableHookObject(BOOL fNewState, BOOL* pfPrevState); + +#define GUID_STRING_LENGTH 39 +#define CLSID_STRING_LENGTH 39 +#define IID_STRING_LENGTH 39 +#define PROGID_STRING_LENGTH 40 + + + +// used by INITHOOKOBJECT + +inline HRESULT CLSIDFromStringA(LPSTR lpsz, LPCLSID lpclsid) +{ + LPWSTR lpwsz = new WCHAR[(strlen(lpsz)+1)]; + MultiByteToWideChar (CP_ACP, MB_PRECOMPOSED, lpsz, -1, lpwsz, lstrlenA(lpsz)+1); + HRESULT hr = CLSIDFromString(lpwsz, lpclsid); + delete lpwsz; + return hr; +} + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +#ifdef OLETOOLS +// these are needed only by the tools, not internally by ole32. we ifdef +// it here to maintain source compatibility. + +inline BOOL IsOle32ProcDefined(LPCSTR pszProcName) +{ + BOOL fResult = FALSE; + HINSTANCE hInstOle32 = LoadLibrary(__T("OLE32.DLL")); + if (hInstOle32) + { + if (GetProcAddress(hInstOle32, pszProcName) != NULL) + fResult = TRUE; + FreeLibrary(hInstOle32); + } + return fResult; +} + +inline HINSTANCE CoLoadLibrary(LPSTR lpszLibName, BOOL bAutoFree) +{ + LPWSTR lpwsz = new WCHAR[(strlen(lpszLibName)+1)]; + MultiByteToWideChar (CP_ACP, MB_PRECOMPOSED, lpszLibName, -1, lpwsz, lstrlenA(lpszLibName)+1); + HINSTANCE hInstance = CoLoadLibrary(lpwsz, bAutoFree); + delete lpwsz; + return hInstance; +} + +inline HRESULT IIDFromString(LPSTR lpsz, LPIID lpiid) +{ + LPWSTR lpwsz = new WCHAR[(strlen(lpsz)+1)]; + MultiByteToWideChar (CP_ACP, MB_PRECOMPOSED, lpsz, -1, lpwsz, lstrlenA(lpsz)+1); + HRESULT hr = IIDFromString(lpwsz, lpiid); + delete lpwsz; + return hr; +} + +inline HRESULT StringFromIID(REFIID riid, LPSTR FAR* lplpsz) +{ + HRESULT hr = StringFromIID(riid, (LPWSTR*)lplpsz); + if (hr == S_OK) + { + WCHAR wsz[IID_STRING_LENGTH]; + lstrcpyW(wsz, (LPWSTR)*lplpsz); + WideCharToMultiByte (CP_ACP, WC_COMPOSITECHECK, wsz, -1, *lplpsz, lstrlenW(wsz), NULL, NULL); + } + return hr; +} + +inline HRESULT StringFromCLSID(REFCLSID rclsid, LPSTR FAR* lplpsz) +{ + HRESULT hr = StringFromCLSID(rclsid, (LPWSTR*)lplpsz); + if (hr == S_OK) + { + WCHAR wsz[CLSID_STRING_LENGTH]; + lstrcpyW(wsz, (LPWSTR)*lplpsz); + WideCharToMultiByte (CP_ACP, WC_COMPOSITECHECK, wsz, -1, *lplpsz, lstrlenW(wsz), NULL, NULL); + } + return hr; +} + +inline HRESULT ProgIDFromCLSID(REFCLSID rclsid, LPSTR FAR* lplpsz) +{ + HRESULT hr = ProgIDFromCLSID(rclsid, (LPWSTR*)lplpsz); + if (hr == S_OK) + { + WCHAR wsz[PROGID_STRING_LENGTH]; + lstrcpyW(wsz, (LPWSTR)*lplpsz); + WideCharToMultiByte (CP_ACP, WC_COMPOSITECHECK, wsz, -1, *lplpsz, lstrlenW(wsz), NULL, NULL); + } + return hr; +} + +inline HRESULT CLSIDFromProgID(LPCSTR lpszProgID, LPCLSID lpclsid) +{ + LPWSTR lpwsz = new WCHAR[(strlen(lpszProgID)+1)]; + MultiByteToWideChar (CP_ACP, MB_PRECOMPOSED, lpszProgID, -1, lpwsz, lstrlenA(lpszProgID)+1); + HRESULT hr = CLSIDFromProgID(lpwsz, lpclsid); + delete lpwsz; + return hr; +} + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +#endif + +#endif // _HKOLE32X_H_ diff --git a/private/ole32/ih/hkoleobj.h b/private/ole32/ih/hkoleobj.h new file mode 100644 index 000000000..06a56a777 --- /dev/null +++ b/private/ole32/ih/hkoleobj.h @@ -0,0 +1,71 @@ +//+------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1994. +// +// File: hkoleobj.h +// +// Contents: IHookOleObject Interface Header File +// +// Functions: +// +// History: 01-Aug-94 Garry Lenz Created +// 20-Sep-94 Garry Lenz Added EnableRegistration +// 13-Oct-94 Garry Lenz Derive from IUnknownEx +// 13-Oct-94 Garry Lenz Added EnumObjects +// 20-Oct-94 Garry Lenz Added AssociateInstance +// 14-Dec-94 Don Wright Added fCreate param to RegisterObject +// +//-------------------------------------------------------------------------- + +#ifndef _IHOOKOLEOBJECT_H_ +#define _IHOOKOLEOBJECT_H_ + +#include <Windows.h> +#include "hkunkex.h" + +interface IHookOleInstance; + +enum EHookEnumFlags +{ + HEF_Instances = 1, + HEF_Classes = 2, + HEF_Interfaces = 3 +}; + +interface IHookOleObject : IUnknownEx +{ + public: + STDMETHOD ( EnumObjects ) + ( + DWORD dwEnumFlags, + IEnumUnknown** pIEnum + ) = 0; + STDMETHOD ( RegisterObject ) + ( + REFCLSID rclsid, + REFIID riid, + LPVOID pvObj, + BOOL fCreate + ) = 0; + STDMETHOD ( UnregisterObject ) + ( + LPVOID pvObj + ) = 0; + STDMETHOD ( UnregisterAll ) + ( + void + ) = 0; + STDMETHOD ( EnableRegistration ) + ( + BOOL fEnable + ) = 0; + STDMETHOD ( AssociateInstance ) + ( + REFIID riid, + LPVOID pvObj, + IHookOleInstance** ppIHookOleInstance + ) = 0; +}; + +#endif // _IHOOKOLEOBJECT_H_ diff --git a/private/ole32/ih/hkregkey.h b/private/ole32/ih/hkregkey.h new file mode 100644 index 000000000..0d753b945 --- /dev/null +++ b/private/ole32/ih/hkregkey.h @@ -0,0 +1,76 @@ +//+------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1994. +// +// File: hkregkey.h +// +// Contents: Defines for accessing the Registry +// +// Functions: +// +// History: 01-Aug-94 Garry Lenz Created +// 02-Aug-94 Don Wright Support Ansi/Unicode +// 25-Oct-94 Don Wright Add Keys for HookOleLog +// +//-------------------------------------------------------------------------- + +#ifndef _REGISTRYKEYS_H_ +#define _REGISTRYKEYS_H_ + +#include <Windows.h> + +#define KEY_SEP "\\" +#define WKEY_SEP L"\\" + +//Named Event for Global Hooking Flag +#define szHookEventName "HookSwitchHookEnabledEvent" + +// Keys used by OLE32hk.h for finding HookOle dll +#define HookBase HKEY_LOCAL_MACHINE +#define szHookKey "Software\\Microsoft\\HookOleObject" +#define wszHookKey L"Software\\Microsoft\\HookOleObject" + +// Keys used by HookOle for finding Wrappers and Filters +#define HookConfigBase HKEY_LOCAL_MACHINE +#define szHookConfigKey "Software\\Microsoft\\HookOleObject" +#define wszHookConfigKey L"Software\\Microsoft\\HookOleObject" + +// Keys used by HookOleLog +#define HookLogBase HKEY_LOCAL_MACHINE +#define szHookLogKey "Software\\Microsoft\\HookOleLog" +#define wszHookLogKey L"Software\\Microsoft\\HookOleLog" + +// Common sub-keys +#define szWrappersKey "Wrappers" +#define wszWrappersKey L"Wrappers" +#define szFiltersKey "Filters" +#define wszFiltersKey L"Filters" +#define szStatisticsKey "Statistics" +#define wszStatisticsKey L"Statistics" +#define szCLSIDKey "CLSID" +#define wszCLSIDKey L"CLSID" +#define szCurrentKey "Current" +#define wszCurrentKey L"Current" +#define szIIDKey "Interface" +#define wszIIDKey L"Interface" +#define szModuleKey "Module" +#define wszModuleKey L"Module" +#define szDefaultKey "Default" +#define wszDefaultKey L"Default" +#define szIncludeOnlyKey "Include Only" +#define wszIncludeOnlyKey L"Include Only" +#define szExcludeKey "Exclude" +#define wszExcludeKey L"Exclude" + +// Common value names +#define szEnabledValue "Enabled" +#define wszEnabledValue L"Enabled" +#define szCLSIDValue "CLSID" +#define wszCLSIDValue L"CLSID" +#define szWrapperValue "Wrapper" +#define wszWrapperValue L"Wrapper" +#define szFilterValue "Filter" +#define wszFilterValue L"Filter" + +#endif // _REGISTRYKEYS_H_ diff --git a/private/ole32/ih/hkunkex.h b/private/ole32/ih/hkunkex.h new file mode 100644 index 000000000..6e989c9f4 --- /dev/null +++ b/private/ole32/ih/hkunkex.h @@ -0,0 +1,31 @@ +//+------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1994. +// +// File: khunkex.h +// +// Contents: Extended IUnknown Interface Header File +// +// Functions: +// +// History: 13-Oct-94 Garry Lenz Created +// +//-------------------------------------------------------------------------- + +#ifndef _IUNKNOWNEX_H_ +#define _IUNKNOWNEX_H_ + +#include <Windows.h> + +interface IUnknownEx : IUnknown +{ + public: + STDMETHOD (QueryContainedInterface) + ( + REFIID riid, + LPVOID* ppvObj + ) = 0; +}; + +#endif // _IUNKNOWNEX_H_ diff --git a/private/ole32/ih/ictsguid.h b/private/ole32/ih/ictsguid.h new file mode 100644 index 000000000..08d1548d6 --- /dev/null +++ b/private/ole32/ih/ictsguid.h @@ -0,0 +1,108 @@ +//+------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1994. +// +// File: ICTGUID.h +// +// Contents: CLSIDs and IIDs for ICTS (Interface Conformance Test Suite) +// Header File +// +// Functions: +// +// History: 15-Jun-94 Garry Lenz Created +// 12-Oct-94 Garry Lenz Added IUnknownEx +// 12-Oct-94 Garry Lenz Added IEnumGUID +// 13-Oct-94 Garry Lenz Added Wrapper & Filter CLSIDs +// +//-------------------------------------------------------------------------- + +#ifndef _ICTSGUID_H_ +#define _ICTSGUID_H_ + +#include <Windows.h> + +//#ifdef INITGUID + DEFINE_OLEGUID(IID_IUnknownEx, 0x0002AD00, 0, 0); + DEFINE_OLEGUID(IID_IEnumGUID, 0x0002AD01, 0, 0); + + DEFINE_OLEGUID(CLSID_HookOleObject, 0x0002AD10, 0, 0); + DEFINE_OLEGUID(IID_IHookOleObject, 0x0002AD11, 0, 0); + DEFINE_OLEGUID(IID_IHookOleClass, 0x0002AD12, 0, 0); + DEFINE_OLEGUID(IID_IHookOleInstance, 0x0002AD13, 0, 0); + DEFINE_OLEGUID(IID_IHookOleInterface, 0x0002AD14, 0, 0); + DEFINE_OLEGUID(IID_IHookOleMethod, 0x0002AD15, 0, 0); + DEFINE_OLEGUID(IID_IHookOleWrapper, 0x0002AD1A, 0, 0); + DEFINE_OLEGUID(IID_IHookOleFilter, 0x0002AD1B, 0, 0); + + DEFINE_OLEGUID(CLSID_HookOleAPI, 0x0002AD20, 0, 0); + + DEFINE_OLEGUID(CLSID_HookOleLog, 0x0002AD30, 0, 0); + DEFINE_OLEGUID(IID_IHookOleLog, 0x0002AD31, 0, 0); + + DEFINE_OLEGUID(CLSID_HookOleWrapper, 0x0002ADA0, 0, 0); + DEFINE_OLEGUID(CLSID_HOW_ComponentObject, 0x0002ADA1, 0, 0); + DEFINE_OLEGUID(CLSID_HOW_CompoundDocument, 0x0002ADA2, 0, 0); + DEFINE_OLEGUID(CLSID_HOW_DataTransfer, 0x0002ADA3, 0, 0); + DEFINE_OLEGUID(CLSID_HOW_Linking, 0x0002ADA4, 0, 0); + DEFINE_OLEGUID(CLSID_HOW_PersistentStorage, 0x0002ADA5, 0, 0); + DEFINE_OLEGUID(CLSID_HOW_DragAndDrop, 0x0002ADA6, 0, 0); + DEFINE_OLEGUID(CLSID_HOW_InPlaceActivation, 0x0002ADA7, 0, 0); + DEFINE_OLEGUID(CLSID_HOW_Concurrency, 0x0002ADA8, 0, 0); + DEFINE_OLEGUID(CLSID_HOW_Automation, 0x0002ADA9, 0, 0); + + DEFINE_OLEGUID(CLSID_HookOleFilter, 0x0002ADB0, 0, 0); + DEFINE_OLEGUID(CLSID_HOF_ComponentObject, 0x0002ADB1, 0, 0); + DEFINE_OLEGUID(CLSID_HOF_CompoundDocument, 0x0002ADB2, 0, 0); + DEFINE_OLEGUID(CLSID_HOF_DataTransfer, 0x0002ADB3, 0, 0); + DEFINE_OLEGUID(CLSID_HOF_Linking, 0x0002ADB4, 0, 0); + DEFINE_OLEGUID(CLSID_HOF_PersistentStorage, 0x0002ADB5, 0, 0); + DEFINE_OLEGUID(CLSID_HOF_DragAndDrop, 0x0002ADB6, 0, 0); + DEFINE_OLEGUID(CLSID_HOF_InPlaceActivation, 0x0002ADB7, 0, 0); + DEFINE_OLEGUID(CLSID_HOF_Concurrency, 0x0002ADB8, 0, 0); + DEFINE_OLEGUID(CLSID_HOF_Automation, 0x0002ADB9, 0, 0); +#if 0 +//#else + extern "C" + { + extern IID IID_IUnknownEx; + extern IID IID_IEnumGUID; + + extern CLSID CLSID_HookOleObject; + extern IID IID_IHookOleObject; + extern IID IID_IHookOleClass; + extern IID IID_IHookOleInstance; + extern IID IID_IHookOleInterface; + extern IID IID_IHookOleMethod; + extern IID IID_IHookOleWrapper; + extern IID IID_IHookOleFilter; + + extern CLSID CLSID_HookOleAPI; + + extern CLSID CLSID_HookOleLog; + extern IID IID_IHookOleLog; + + extern CLSID CLSID_HookOleWrapper; + extern CLSID CLSID_HOW_ComponentObject; + extern CLSID CLSID_HOW_CompoundDocument; + extern CLSID CLSID_HOW_DataTransfer; + extern CLSID CLSID_HOW_Linking; + extern CLSID CLSID_HOW_PersistentStorage; + extern CLSID CLSID_HOW_DragAndDrop; + extern CLSID CLSID_HOW_InPlaceActivation; + extern CLSID CLSID_HOW_Concurrency; + + extern CLSID CLSID_HookOleFilter; + extern CLSID CLSID_HOF_ComponentObject; + extern CLSID CLSID_HOF_CompoundDocument; + extern CLSID CLSID_HOF_DataTransfer; + extern CLSID CLSID_HOF_Linking; + extern CLSID CLSID_HOF_PersistentStorage; + extern CLSID CLSID_HOF_DragAndDrop; + extern CLSID CLSID_HOF_InPlaceActivation; + extern CLSID CLSID_HOF_Concurrency; + } + +#endif /* INITGUID */ + +#endif /* _ICTSGUID_H_ */ diff --git a/private/ole32/ih/itrkmnk.hxx b/private/ole32/ih/itrkmnk.hxx new file mode 100644 index 000000000..5c1422ed0 --- /dev/null +++ b/private/ole32/ih/itrkmnk.hxx @@ -0,0 +1,49 @@ +#ifndef _ITRKMNK_HXX_ +#define _ITRKMNK_HXX_ + + +// Flags for the CFileMoniker::EnableTracking routine. +// Note that these flags must remain in the lower +// 16 bits, as the upper 16 bits are used for Track Flags +// (see the two macros which follow). + +#define OT_READTRACKINGINFO 0x0001L +#define OT_DISABLETRACKING 0x0002L +#define OT_ENABLESAVE 0x0004L +#define OT_DISABLESAVE 0x0008L +#define OT_ENABLEREDUCE 0x0010L +#define OT_DISABLEREDUCE 0x0020L + +#ifdef _CAIRO_ +#define OT_MAKETRACKING 0x0040L +#endif + +// The following two macros allow TRACK_* flags ("olecairo.h") +// to be piggy-backed onto the above OT flags, and vice +// versa. + +#ifdef _CAIRO_ + +#define TRACK_2_OT_FLAGS( flags ) ( flags << 16 ) +#define OT_2_TRACK_FLAGS( flags ) ( flags >> 16 ) + +#endif // _CAIRO_ + + +#define DEB_TRACK DEB_ITRACE + +class ITrackingMoniker : public IUnknown +{ +public: + virtual HRESULT __stdcall QueryInterface( + /* [in] */ REFIID riid, + /* [out] */ void __RPC_FAR *__RPC_FAR *ppvObject) = 0; + + virtual ULONG __stdcall AddRef( void) = 0; + + virtual ULONG __stdcall Release( void) = 0; + + virtual HRESULT __stdcall EnableTracking ( IMoniker *pmkLeft, ULONG ulFlags ) = 0; +}; +#endif + diff --git a/private/ole32/ih/map_kv.h b/private/ole32/ih/map_kv.h new file mode 100644 index 000000000..3d07d8f78 --- /dev/null +++ b/private/ole32/ih/map_kv.h @@ -0,0 +1,116 @@ +#ifndef __MAP_KV_H__ +#define __MAP_KV_H__ + +#include <memapi.hxx> + +///////////////////////////////////////////////////////////////////////////// +// class CMapKeyToValue - a mapping from 'KEY's to 'VALUE's, passed in as +// pv/cb pairs. The keys can be variable length, although we optmizize the +// case when they are all the same. +// +///////////////////////////////////////////////////////////////////////////// + +STDAPI_(UINT) MKVDefaultHashKey(LPVOID pKey, UINT cbKey); + +#ifdef WIN32 +DECLARE_HANDLE(HMAPKEY); +#else +DECLARE_HANDLE32(HMAPKEY); +#endif + +typedef UINT (STDAPICALLTYPE FAR* LPFNHASHKEY)(LPVOID, UINT); + +class FAR CMapKeyToValue : public CPrivAlloc +{ +public: + CMapKeyToValue(UINT cbValue, UINT cbKey = 0, + int nBlockSize=10, + LPFNHASHKEY lpfnHashKey = NULL, + UINT nHashSize = 17); + ~CMapKeyToValue(); + + // number of elements + int GetCount() const { return m_nCount; } + BOOL IsEmpty() const { return m_nCount == 0; } + + // Lookup; return FALSE if not found + BOOL Lookup(LPVOID pKey, UINT cbKey, LPVOID pValue) const; + BOOL LookupHKey(HMAPKEY hKey, LPVOID pValue) const; + BOOL LookupAdd(LPVOID pKey, UINT cbKey, LPVOID pValue) const; + + // add a new (key, value) pair; return FALSE if out of memory + BOOL SetAt(LPVOID pKey, UINT cbKey, LPVOID pValue); + BOOL SetAtHKey(HMAPKEY hKey, LPVOID pValue); + + // removing existing (key, ?) pair; return FALSE if no such key + BOOL RemoveKey(LPVOID pKey, UINT cbKey); + BOOL RemoveHKey(HMAPKEY hKey); + void RemoveAll(); + + // iterating all (key, value) pairs + POSITION GetStartPosition() const + { return (m_nCount == 0) ? (POSITION)NULL : BEFORE_START_POSITION; } + void GetNextAssoc(POSITION FAR* pNextPosition, LPVOID pKey, + UINT FAR* pcbKey, LPVOID pValue) const; + + // return HMAPKEY for given key; returns NULL if not currently in map + HMAPKEY GetHKey(LPVOID pKey, UINT cbKey) const; + + void AssertValid() const; + +private: + // abstracts, somewhat, variable and fixed sized keys; size is really + // m_cbKeyInAssoc. + union CKeyWrap + { + BYTE rgbKey[sizeof(LPVOID) + sizeof(UINT)]; + struct + { + LPVOID pKey; + UINT cbKey; + }; + }; + + // Association of one key and one value; NOTE: even though in general + // the size of the key and value varies, for any given map, + // the size of an assoc is fixed. + struct CAssoc + { + CAssoc FAR* pNext; + UINT nHashValue; // needed for efficient iteration + CKeyWrap key; // size is really m_cbKeyInAssoc + // BYTE rgbValue[m_cbValue]; + }; + + UINT SizeAssoc() const + { return sizeof(CAssoc)-sizeof(CKeyWrap) + m_cbKeyInAssoc + m_cbValue; } + CAssoc FAR* NewAssoc(UINT hash, LPVOID pKey, UINT cbKey, LPVOID pValue); + void FreeAssoc(CAssoc FAR* pAssoc); + BOOL CompareAssocKey(CAssoc FAR* pAssoc, LPVOID pKey, UINT cbKey) const; + CAssoc FAR* GetAssocAt(LPVOID pKey, UINT cbKey, UINT FAR& nHash) const; + + BOOL SetAssocKey(CAssoc FAR* pAssoc, LPVOID pKey, UINT cbKey) const; + void GetAssocKeyPtr(CAssoc FAR* pAssoc, LPVOID FAR* ppKey,UINT FAR* pcbKey) const; + void FreeAssocKey(CAssoc FAR* pAssoc) const; + void GetAssocValuePtr(CAssoc FAR* pAssoc, LPVOID FAR* ppValue) const; + void GetAssocValue(CAssoc FAR* pAssoc, LPVOID pValue) const; + void SetAssocValue(CAssoc FAR* pAssoc, LPVOID pValue) const; + + BOOL InitHashTable(); + + UINT m_cbValue; + UINT m_cbKey; // variable length if 0 + UINT m_cbKeyInAssoc; // always non-zero + + CAssoc FAR* FAR* m_pHashTable; + UINT m_nHashTableSize; + LPFNHASHKEY m_lpfnHashKey; + + int m_nCount; + CAssoc FAR* m_pFreeList; + struct CPlex FAR* m_pBlocks; + int m_nBlockSize; +}; + + +#endif // !__MAP_KV_H__ diff --git a/private/ole32/ih/map_up.h b/private/ole32/ih/map_up.h new file mode 100644 index 000000000..36548a670 --- /dev/null +++ b/private/ole32/ih/map_up.h @@ -0,0 +1,66 @@ + + +//////////////////////////////////////////////////////////////////////////// + + + +class FAR CMapUintPtr : public CPrivAlloc +{ +public: + // Construction + CMapUintPtr(UINT nBlockSize=10) + : m_mkv(sizeof(void FAR*), sizeof(UINT), nBlockSize) { } + + // Attributes + // number of elements + int GetCount() const + { return m_mkv.GetCount(); } + BOOL IsEmpty() const + { return GetCount() == 0; } + + // Lookup + BOOL Lookup(UINT key, void FAR* FAR& value) const + { return m_mkv.Lookup((LPVOID)&key, sizeof(UINT), (LPVOID)&value); } + + BOOL LookupHKey(HMAPKEY hKey, void FAR* FAR& value) const + { return m_mkv.LookupHKey(hKey, (LPVOID)&value); } + + BOOL LookupAdd(UINT key, void FAR* FAR& value) const + { return m_mkv.LookupAdd((LPVOID)&key, sizeof(UINT), (LPVOID)&value); } + + // Add/Delete + // add a new (key, value) pair + BOOL SetAt(UINT key, void FAR* value) + { return m_mkv.SetAt((LPVOID)&key, sizeof(UINT), (LPVOID)&value); } + BOOL SetAtHKey(HMAPKEY hKey, void FAR* value) + { return m_mkv.SetAtHKey(hKey, (LPVOID)&value); } + + // removing existing (key, ?) pair + BOOL RemoveKey(UINT key) + { return m_mkv.RemoveKey((LPVOID)&key, sizeof(UINT)); } + + BOOL RemoveHKey(HMAPKEY hKey) + { return m_mkv.RemoveHKey(hKey); } + + void RemoveAll() + { m_mkv.RemoveAll(); } + + + // iterating all (key, value) pairs + POSITION GetStartPosition() const + { return m_mkv.GetStartPosition(); } + + void GetNextAssoc(POSITION FAR& rNextPosition, UINT FAR& rKey, void FAR* FAR& rValue) const + { m_mkv.GetNextAssoc(&rNextPosition, (LPVOID)&rKey, NULL, (LPVOID)&rValue); } + + HMAPKEY GetHKey(UINT key) const + { return m_mkv.GetHKey((LPVOID)&key, sizeof(UINT)); } + +#ifdef _DEBUG + void AssertValid() const + { m_mkv.AssertValid(); } +#endif + +private: + CMapKeyToValue m_mkv; +}; diff --git a/private/ole32/ih/memapi.hxx b/private/ole32/ih/memapi.hxx new file mode 100644 index 000000000..d6a1a5ad6 --- /dev/null +++ b/private/ole32/ih/memapi.hxx @@ -0,0 +1,190 @@ +//+------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1992 - 1993. +// +// File: MemAPI.HXX +// +// Contents: Internal memory allocation routines +// +// Classes: CPrivAlloc +// +// Functions: PrivMemAlloc +// PrivMemAlloc8 +// PrivMemFree +// UtGlobalxxx +// +// History: +// 25-Jan-94 alexgo added PubMemReAlloc +// 04-Nov-93 AlexT Created +// +// Notes: +// +// For memory that the application can free with the task IMalloc, use +// CoTaskMemAlloc and CoTaskMemFree. +// +// For process local memory that is used internally, use PrivMemAlloc and +// PrivMemFree. +// +// For process local class instances, use CPrivAlloc as a base class. +// +// PubMemAlloc, PubMemRealloc, and PubMemFree are obsolete. +//-------------------------------------------------------------------------- + +#ifndef __MEMAPI_HXX__ +#define __MEMAPI_HXX__ + +//PubMemAlloc is obsolete. Use CoTaskMemAlloc. +#define PubMemAlloc(ulcb) CoTaskMemAlloc(ulcb) + +//PubMemRealloc is obsolete. Use CoTaskMemRealloc. +#define PubMemRealloc(pv, ulcb) CoTaskMemRealloc(pv, ulcb) + +//PubMemFree is obsolete. Use CoTaskMemFree. +#define PubMemFree(pv) CoTaskMemFree(pv) + + +//+------------------------------------------------------------------------- +// +// Function: PrivMemAlloc +// +// Synopsis: Allocate private memory block +// +// Arguments: [ulcb] -- size of memory block +// +// Returns: Pointer to memory block +// +//-------------------------------------------------------------------------- +extern HANDLE g_hHeap; + +typedef +LPVOID (WINAPI HEAP_ALLOC_ROUTINE)( + HANDLE hHeap, + DWORD dwFlags, + DWORD dwBytes); + +extern HEAP_ALLOC_ROUTINE * pfnHeapAlloc; + +#if DBG==1 +# define PrivMemAlloc(ulcb) CoTaskMemAlloc(ulcb) +#else +# define PrivMemAlloc(ulcb) (*pfnHeapAlloc)(g_hHeap, 0, (ulcb)) +#endif //DBG==1 + +//+------------------------------------------------------------------------- +// +// Function: PrivMemAlloc8 +// +// Synopsis: Allocate private memory block aligned on 8 byte boundary +// +// Arguments: [ulcb] -- size of memory block +// +// Returns: Pointer to memory block +// +// History: 14 Jul 94 AlexMit Created +// +// Notes: +// +//-------------------------------------------------------------------------- +#define PrivMemAlloc8(ulcb) PrivMemAlloc(((ulcb)+7)&~7) + +//+------------------------------------------------------------------------- +// +// Function: PrivMemFree +// +// Synopsis: Frees private memory block +// +// Arguments: [pv] -- pointer to memory block +// +//-------------------------------------------------------------------------- +typedef +BOOL (WINAPI HEAP_FREE_ROUTINE)( + HANDLE hHeap, + DWORD dwFlags, + LPVOID lpMem); + +extern HEAP_FREE_ROUTINE *pfnHeapFree; + +#if DBG==1 +# define PrivMemFree(pv) CoTaskMemFree(pv) +#else +# define PrivMemFree(pv) (*pfnHeapFree)(g_hHeap, 0, (pv)) +#endif //DBG==1 + +//+------------------------------------------------------------------------- +// +// Class: CPrivAlloc +// +// Purpose: Base class for process local classes +// +// Interface: operator new +// operator delete +// +// History: 04-Nov-93 AlexT Created +// +//-------------------------------------------------------------------------- +class CPrivAlloc +{ +public: + void *operator new(size_t size) + { + return PrivMemAlloc(size); + }; + + void operator delete(void *pv) + { + PrivMemFree(pv); + }; +}; + +void FAR* _CRTAPI1 operator new(size_t size); +void _CRTAPI1 operator delete(void FAR* ptr); + + +//+------------------------------------------------------------------------- +// +// Function: UtGlobalxxx +// +// Synopsis: Debugging version of global memory functions +// +// History: 28-Feb-94 AlexT Created +// 10-May-94 KevinRo Disabled for DDE build +// +// Notes: +// +// DDE uses GlobalAlloc for exchanging data between 16 and 32 bit +// servers, as well as for passing data across to other processes. +// The routine GlobalSize() is used quite often in these routines to +// determine the amount of data in the block. Therefore, we shouldn't go +// adding extra data to the block, like these routines do. Therefore, +// we won't override these routines if OLE_DDE_NO_GLOBAL_TRACKING is defined +// +// +//-------------------------------------------------------------------------- + +#if DBG==1 && defined(WIN32) && !defined(OLE_DDE_NO_GLOBAL_TRACKING) + +#define GlobalAlloc(uiFlag, cbBytes) UtGlobalAlloc(uiFlag, cbBytes) +#define GlobalReAlloc(h, cb, uiFlag) UtGlobalReAlloc(h, cb, uiFlag) +#define GlobalLock(h) UtGlobalLock(h) +#define GlobalUnlock(h) UtGlobalUnlock(h) +#define GlobalFree(h) UtGlobalFree(h) +#define SetClipboardData(uFormat, hMem) UtSetClipboardData(uFormat, hMem) + +extern "C" HGLOBAL WINAPI UtGlobalAlloc(UINT uiFlag, DWORD cbUser); +extern "C" HGLOBAL WINAPI UtGlobalReAlloc(HGLOBAL hGlobal, DWORD cbUser, UINT uiFlag); +extern "C" LPVOID WINAPI UtGlobalLock(HGLOBAL hGlobal); +extern "C" BOOL WINAPI UtGlobalUnlock(HGLOBAL hGlobal); +extern "C" HGLOBAL WINAPI UtGlobalFree(HGLOBAL hGlobal); +extern "C" HANDLE WINAPI UtSetClipboardData(UINT uFormat, HANDLE hMem); + +extern "C" void UtGlobalFlushTracking(void); + +#else + +#define UtGlobalFlushTracking() NULL +#define UtGlobalStopTracking(hGlobal) NULL + +#endif // !(DBG==1 && defined(WIN32)) + +#endif // !defined(__MEMAPI_HXX__) diff --git a/private/ole32/ih/nt1ole.reg b/private/ole32/ih/nt1ole.reg new file mode 100644 index 000000000..0bfdab9b4 --- /dev/null +++ b/private/ole32/ih/nt1ole.reg @@ -0,0 +1,576 @@ +\Registry\MACHINE\SYSTEM\CurrentControlSet\Services + +\Registry\MACHINE\SYSTEM\CurrentControlSet\Services\OLE + Type = REG_DWORD 0x10 + Start = REG_DWORD 0x3 + ErrorControl = REG_DWORD 0x0 + ImagePath = REG_EXPAND_SZ %SystemRoot%\System32\scm.exe + ObjectName = REG_SZ LocalSystem + +\Registry\MACHINE\SOFTWARE\Classes\CLSID +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000300-0000-0000-C000-000000000046} + = StdOleLink +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000300-0000-0000-C000-000000000046}\InprocServer32 + = ole32.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000301-0000-0000-C000-000000000046} + = StdMemStm +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000301-0000-0000-C000-000000000046}\InprocServer32 + = ole32.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000302-0000-0000-C000-000000000046} + = StdMemBytes +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000302-0000-0000-C000-000000000046}\InprocServer32 + = ole32.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000303-0000-0000-C000-000000000046} + = FileMoniker +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000303-0000-0000-C000-000000000046}\InprocServer32 + = ole32.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000304-0000-0000-C000-000000000046} + = ItemMoniker +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000304-0000-0000-C000-000000000046}\InprocServer32 + = ole32.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000305-0000-0000-C000-000000000046} + = AntiMoniker +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000305-0000-0000-C000-000000000046}\InprocServer32 + = ole32.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000306-0000-0000-C000-000000000046} + = PointerMoniker +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000306-0000-0000-C000-000000000046}\InprocServer32 + = ole32.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000307-0000-0000-C000-000000000046} + = DdeFileMoniker +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000307-0000-0000-C000-000000000046}\InprocServer32 + = ole32.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000308-0000-0000-C000-000000000046} + = PackagerMoniker +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000308-0000-0000-C000-000000000046}\InprocServer32 + = ole32.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000309-0000-0000-C000-000000000046} + = CompositeMoniker +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000309-0000-0000-C000-000000000046}\InprocServer32 + = ole32.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000030A-0000-0000-C000-000000000046} + = DdeCompositeMoniker +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000030A-0000-0000-C000-000000000046}\InprocServer32 + = ole32.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000030B-0000-0000-C000-000000000046} + = DfMarshal +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000030B-0000-0000-C000-000000000046}\InprocServer32 + = ole32.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000315-0000-0000-C000-000000000046} + = Metafile +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000315-0000-0000-C000-000000000046}\InprocServer32 + = ole32.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000316-0000-0000-C000-000000000046} + = Device Independent Bitmap +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000316-0000-0000-C000-000000000046}\InprocServer32 + = ole32.dll + +\Registry\MACHINE\SOFTWARE\Classes\StaticMetafile +\Registry\MACHINE\SOFTWARE\Classes\StaticMetafile\CLSID + = {00000315-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000315-0000-0000-C000-000000000046}\ProgID + = StaticMetafile +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000315-0000-0000-C000-000000000046}\InprocServer + = ole32.dll + +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000315-0000-0000-C000-000000000046}\DataFormats +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000315-0000-0000-C000-000000000046}\DataFormats\DefaultFile + = 3 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000315-0000-0000-C000-000000000046}\DataFormats\GetSet +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000315-0000-0000-C000-000000000046}\DataFormats\GetSet\0 + = 3,1,32,3 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000315-0000-0000-C000-000000000046}\MiscStatus + = 536 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000315-0000-0000-C000-000000000046}\Conversion +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000315-0000-0000-C000-000000000046}\Conversion\Readable +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000315-0000-0000-C000-000000000046}\Conversion\Readable\Main + = 3,MSDraw + + +\Registry\MACHINE\SOFTWARE\Classes\StaticDib +\Registry\MACHINE\SOFTWARE\Classes\StaticDib\CLSID + = {00000316-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000316-0000-0000-C000-000000000046}\ProgID + = StaticDib +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000316-0000-0000-C000-000000000046}\InprocServer + = ole32.dll + +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000316-0000-0000-C000-000000000046}\DataFormats +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000316-0000-0000-C000-000000000046}\DataFormats\DefaultFile + = 8 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000316-0000-0000-C000-000000000046}\DataFormats +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000316-0000-0000-C000-000000000046}\DataFormats\GetSet +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000316-0000-0000-C000-000000000046}\DataFormats\GetSet\0 + = 8,1,1,3 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000316-0000-0000-C000-000000000046}\MiscStatus + = 536 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000316-0000-0000-C000-000000000046}\Conversion +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000316-0000-0000-C000-000000000046}\Conversion\Readable +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000316-0000-0000-C000-000000000046}\Conversion\Readable\Main + = 8,PBrush + + +\Registry\MACHINE\SOFTWARE\Classes\PBrush +\Registry\MACHINE\SOFTWARE\Classes\PBrush\CLSID + = {0003000a-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0003000a-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0003000a-0000-0000-C000-000000000046}\ProgID + = PBrush +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0003000a-0000-0000-C000-000000000046}\Ole1Class + = PBrush +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0003000a-0000-0000-C000-000000000046}\MiscStatus + = 512 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0003000a-0000-0000-C000-000000000046}\Conversion +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0003000a-0000-0000-C000-000000000046}\Conversion\Readable +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0003000a-0000-0000-C000-000000000046}\Conversion\Readable\Main + = 8 + + +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00030007-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00030007-0000-0000-C000-000000000046}\ProgID + = MSDraw +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00030007-0000-0000-C000-000000000046}\Ole1Class + = MSDraw +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00030007-0000-0000-C000-000000000046}\MiscStatus + = 512 + +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{6f11fe5c-2fc5-101b-9e45-00000b65c7ef} + = oleprx32_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{6f11fe5c-2fc5-101b-9e45-00000b65c7ef}\InprocServer32 + = oleprx32.dll + + +\Registry\MACHINE\SOFTWARE\Classes\Interface + + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000000-0000-0000-C000-000000000046} + = IUnknown +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000000-0000-0000-C000-000000000046}\BaseInterface + = +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000000-0000-0000-C000-000000000046}\NumMethods + = 3 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000002-0000-0000-C000-000000000046} + = IMalloc +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000002-0000-0000-C000-000000000046}\NumMethods + = 9 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000003-0000-0000-C000-000000000046} + = IMarshal +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000003-0000-0000-C000-000000000046}\NumMethods + = 9 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000004-0000-0000-C000-000000000046} + = IRpcChannel +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000004-0000-0000-C000-000000000046}\NumMethods + = 7 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000005-0000-0000-C000-000000000046} + = IRpcStub +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000005-0000-0000-C000-000000000046}\NumMethods + = 8 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000007-0000-0000-C000-000000000046} + = IRpcProxy +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000007-0000-0000-C000-000000000046}\NumMethods + = 5 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000009-0000-0000-C000-000000000046} + = IPSFactory +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000009-0000-0000-C000-000000000046}\NumMethods + = 5 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000016-0000-0000-C000-000000000046} + = IMessageFilter +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000016-0000-0000-C000-000000000046}\NumMethods + = 6 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000018-0000-0000-C000-000000000046} + = IStdMarshalInfo +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000018-0000-0000-C000-000000000046}\NumMethods + = 4 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000019-0000-0000-C000-000000000046} + = IExternalConnection +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000019-0000-0000-C000-000000000046}\NumMethods + = 5 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000100-0000-0000-C000-000000000046} + = IEnumUnknown +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000100-0000-0000-C000-000000000046}\NumMethods + = 7 +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000100-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010D-0000-0000-C000-000000000046} + = IViewObject +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010D-0000-0000-C000-000000000046}\NumMethods + = 9 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000110-0000-0000-C000-000000000046} + = IDataAdviseHolder +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000110-0000-0000-C000-000000000046}\NumMethods + = 7 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000111-0000-0000-C000-000000000046} + = IOleAdviseHolder +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000111-0000-0000-C000-000000000046}\NumMethods + = 9 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000011D-0000-0000-C000-000000000046} + = IOleLink +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000011D-0000-0000-C000-000000000046}\NumMethods + = 14 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000011E-0000-0000-C000-000000000046} + = IOleCache +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000011E-0000-0000-C000-000000000046}\NumMethods + = 8 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000124-0000-0000-C000-000000000046} + = IDebugStream +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000124-0000-0000-C000-000000000046}\NumMethods + = 19 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000126-0000-0000-C000-000000000046} + = IRunnableObject +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000126-0000-0000-C000-000000000046}\NumMethods + = 8 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000127-0000-0000-C000-000000000046} + = IViewObject2 +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000127-0000-0000-C000-000000000046}\BaseInterface + = {0000010D-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000127-0000-0000-C000-000000000046}\NumMethods + = 10 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000128-0000-0000-C000-000000000046} + = IOleCache2 +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000128-0000-0000-C000-000000000046}\BaseInterface + = {0000011E-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000128-0000-0000-C000-000000000046}\NumMethods + = 10 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000129-0000-0000-C000-000000000046} + = IOleCacheControl +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000129-0000-0000-C000-000000000046}\NumMethods + = 5 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000125-0000-0000-C000-000000000046} + = IAdviseSink2 +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000125-0000-0000-C000-000000000046}\BaseInterface + = {0000010F-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000125-0000-0000-C000-000000000046}\NumMethods + = 9 +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000125-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010f-0000-0000-C000-000000000046} + = IAdviseSink +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010f-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010F-0000-0000-C000-000000000046}\NumMethods + = 8 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000e-0000-0000-C000-000000000046} + = IBindCtx +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000e-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000E-0000-0000-C000-000000000046}\NumMethods + = 13 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000001-0000-0000-C000-000000000046} + = IClassFactory +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000001-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000001-0000-0000-C000-000000000046}\NumMethods + = 5 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010e-0000-0000-C000-000000000046} + = IDataObject +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010e-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010E-0000-0000-C000-000000000046}\NumMethods + = 12 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000121-0000-0000-C000-000000000046} + = IDropSource +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000121-0000-0000-C000-000000000046}\NumMethods + = 5 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000122-0000-0000-C000-000000000046} + = IDropTarget +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000122-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000122-0000-0000-C000-000000000046}\NumMethods + = 7 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000101-0000-0000-C000-000000000046} + = IEnumString +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000101-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000100-0000-0000-C000-000000000046}\NumMethods + = 7 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000102-0000-0000-C000-000000000046} + = IEnumMoniker +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000102-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000102-0000-0000-C000-000000000046}\NumMethods + = 7 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000103-0000-0000-C000-000000000046} + = IEnumFORMATETC +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000103-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000103-0000-0000-C000-000000000046}\NumMethods + = 7 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000104-0000-0000-C000-000000000046} + = IEnumOLEVERB +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000104-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000104-0000-0000-C000-000000000046}\NumMethods + = 7 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000105-0000-0000-C000-000000000046} + = IEnumSTATDATA +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000105-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000105-0000-0000-C000-000000000046}\NumMethods + = 7 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000d-0000-0000-C000-000000000046} + = IEnumSTATSTG +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000d-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000D-0000-0000-C000-000000000046}\NumMethods + = 7 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000a-0000-0000-C000-000000000046} + = ILockBytes +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000a-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000a-0000-0000-C000-000000000046}\NumMethods + = 10 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000f-0000-0000-C000-000000000046} + = IMoniker +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000f-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000f-0000-0000-C000-000000000046}\BaseInterface + = {00000109-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000f-0000-0000-C000-000000000046}\NumMethods + = 23 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000118-0000-0000-C000-000000000046} + = IOleClientSite +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000118-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000118-0000-0000-C000-000000000046}\NumMethods + = 9 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000011b-0000-0000-C000-000000000046} + = IOleContainer +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000011b-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000011b-0000-0000-C000-000000000046}\BaseInterface + = {0000011a-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000011b-0000-0000-C000-000000000046}\NumMethods + = 6 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000117-0000-0000-C000-000000000046} + = IOleInPlaceActiveObject +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000117-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000117-0000-0000-C000-000000000046}\BaseInterface + = {00000114-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000117-0000-0000-C000-000000000046}\NumMethods + = 10 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000011c-0000-0000-C000-000000000046} + = IOleItemContainer +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000011c-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000011c-0000-0000-C000-000000000046}\BaseInterface + = {0000011b-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000011c-0000-0000-C000-000000000046}\NumMethods + = 9 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000116-0000-0000-C000-000000000046} + = IOleInPlaceFrame +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000116-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000116-0000-0000-C000-000000000046}\NumMethods + = 15 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000113-0000-0000-C000-000000000046} + = IOleInPlaceObject +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000113-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000113-0000-0000-C000-000000000046}\BaseInterface + = {00000114-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000113-0000-0000-C000-000000000046}\NumMethods + = 9 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000114-0000-0000-C000-000000000046} + = IOleWindow +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000114-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000114-0000-0000-C000-000000000046}\NumMethods + = 5 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000119-0000-0000-C000-000000000046} + = IOleInPlaceSite +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000119-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000119-0000-0000-C000-000000000046}\BaseInterface + = {00000114-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000119-0000-0000-C000-000000000046}\NumMethods + = 15 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000115-0000-0000-C000-000000000046} + = IOleInPlaceUIWindow +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000115-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000115-0000-0000-C000-000000000046}\BaseInterface + = {00000114-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000115-0000-0000-C000-000000000046}\NumMethods + = 9 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000112-0000-0000-C000-000000000046} + = IOleObject +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000112-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000112-0000-0000-C000-000000000046}\NumMethods + = 24 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000011a-0000-0000-C000-000000000046} + = IParseDisplayName +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000011a-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000011a-0000-0000-C000-000000000046}\NumMethods + = 4 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010c-0000-0000-C000-000000000046} + = IPersist +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010c-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010c-0000-0000-C000-000000000046}\NumMethods + = 4 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010b-0000-0000-C000-000000000046} + = IPersistFile +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010b-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010b-0000-0000-C000-000000000046}\BaseInterface + = {0000010c-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010b-0000-0000-C000-000000000046}\NumMethods + = 9 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010a-0000-0000-C000-000000000046} + = IPersistStorage +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010a-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010A-0000-0000-C000-000000000046}\BaseInterface + = {0000010C-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010A-0000-0000-C000-000000000046}\NumMethods + = 10 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000109-0000-0000-C000-000000000046} + = IPersistStream +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000109-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000109-0000-0000-C000-000000000046}\BaseInterface + = {0000010C-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000109-0000-0000-C000-000000000046}\NumMethods + = 8 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000010-0000-0000-C000-000000000046} + = IRunningObjectTable +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000010-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000010-0000-0000-C000-000000000046}\NumMethods + = 10 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000b-0000-0000-C000-000000000046} + = IStorage +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000b-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000b-0000-0000-C000-000000000046}\NumMethods + = 18 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000c-0000-0000-C000-000000000046} + = IStream +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000c-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000c-0000-0000-C000-000000000046}\NumMethods + = 14 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000012-0000-0000-C000-000000000046} + = IRootStorage +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000012-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {6f11fe5c-2fc5-101b-9e45-00000b65c7ef} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000012-0000-0000-C000-000000000046}\NumMethods + = 4 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020400-0000-0000-C000-000000000046} + = IDispatch +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020400-0000-0000-C000-000000000046}\NumMethods + = 7 +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020400-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {00020420-0000-0000-C000-000000000046} + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020404-0000-0000-C000-000000000046} + = IEnumVARIANT +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020404-0000-0000-C000-000000000046}\NumMethods + = 7 +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020404-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {00020421-0000-0000-C000-000000000046} + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020401-0000-0000-C000-000000000046} + = ITypeInfo +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020401-0000-0000-C000-000000000046}\NumMethods + = 22 +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020401-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {00020422-0000-0000-C000-000000000046} + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020402-0000-0000-C000-000000000046} + = ITypeLib +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020402-0000-0000-C000-000000000046}\NumMethods + = 13 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020403-0000-0000-C000-000000000046} + = ITypeComp +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020403-0000-0000-C000-000000000046}\NumMethods + = 5 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020405-0000-0000-C000-000000000046} + = ICreateTypeInfo +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020405-0000-0000-C000-000000000046}\NumMethods + = 26 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020406-0000-0000-C000-000000000046} + = ICreateTypeLib +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020406-0000-0000-C000-000000000046}\NumMethods + = 13 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{D5F56A34-593B-101A-B569-08002B2DBF7A} + = IRpcProxyBuffer +\Registry\MACHINE\SOFTWARE\Classes\Interface\{D5F56A34-593B-101A-B569-08002B2DBF7A}\NumMethods + = 5 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{D5F569D0-593B-101A-B569-08002B2DBF7A} + = IPSFactoryBuffer +\Registry\MACHINE\SOFTWARE\Classes\Interface\{D5F569D0-593B-101A-B569-08002B2DBF7A}\NumMethods + = 5 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{D5F56B60-593B-101A-B569-08002B2DBF7A} + = IRpcChannelBuffer +\Registry\MACHINE\SOFTWARE\Classes\Interface\{D5F56B60-593B-101A-B569-08002B2DBF7A}\NumMethods + = 8 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{D5F56AFC-593B-101A-B569-08002B2DBF7A} + = IRpcStubBuffer +\Registry\MACHINE\SOFTWARE\Classes\Interface\{D5F56AFC-593B-101A-B569-08002B2DBF7A}\NumMethods + = 10 diff --git a/private/ole32/ih/nt2ole.reg b/private/ole32/ih/nt2ole.reg new file mode 100644 index 000000000..c8b34692f --- /dev/null +++ b/private/ole32/ih/nt2ole.reg @@ -0,0 +1,780 @@ +\Registry\MACHINE\SYSTEM\CurrentControlSet\Services\SCM + Type = REG_DWORD 0x00000020 + Start = REG_DWORD 0x00000002 + ErrorControl = REG_DWORD 0x00000001 + ImagePath = REG_EXPAND_SZ %SystemRoot%\system32\scm.exe + ObjectName = LocalSystem +\Registry\MACHINE\SOFTWARE\Classes\.bb1 + = CLSID\{00000009-0000-0008-C000-000000000049} +\Registry\MACHINE\SOFTWARE\Classes\.bb2 + = CLSID\{00000009-0000-0008-C000-000000000048} +\Registry\MACHINE\SOFTWARE\Classes\.bbs + = CLSID\{00000009-0000-0008-C000-000000000047} +\Registry\MACHINE\SOFTWARE\Classes\CLSID +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000009-0000-0008-C000-000000000047} + = BasicSrv +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000009-0000-0008-C000-000000000047}\LocalServer32 + = testsrv.exe +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000009-0000-0008-C000-000000000048} + = BasicBnd2 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000009-0000-0008-C000-000000000048}\LocalServer32 + = olesrv.exe +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000009-0000-0008-C000-000000000049} + = BasicBnd +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000009-0000-0008-C000-000000000049}\InprocServer32 + = oleimpl.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000300-0000-0000-C000-000000000046} + = StdOleLink +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000300-0000-0000-C000-000000000046}\InprocServer32 + = ole32.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000301-0000-0000-C000-000000000046} + = StdMemStm +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000301-0000-0000-C000-000000000046}\InprocServer32 + = ole32.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000302-0000-0000-C000-000000000046} + = StdMemBytes +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000302-0000-0000-C000-000000000046}\InprocServer32 + = ole32.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000303-0000-0000-C000-000000000046} + = FileMoniker +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000303-0000-0000-C000-000000000046}\InprocServer32 + = ole32.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000304-0000-0000-C000-000000000046} + = ItemMoniker +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000304-0000-0000-C000-000000000046}\InprocServer32 + = ole32.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000305-0000-0000-C000-000000000046} + = AntiMoniker +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000305-0000-0000-C000-000000000046}\InprocServer32 + = ole32.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000306-0000-0000-C000-000000000046} + = PointerMoniker +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000306-0000-0000-C000-000000000046}\InprocServer32 + = ole32.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000307-0000-0000-C000-000000000046} + = DdeFileMoniker +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000307-0000-0000-C000-000000000046}\InprocServer32 + = ole32.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000308-0000-0000-C000-000000000046} + = PackagerMoniker +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000308-0000-0000-C000-000000000046}\InprocServer32 + = ole32.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000309-0000-0000-C000-000000000046} + = CompositeMoniker +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000309-0000-0000-C000-000000000046}\InprocServer32 + = ole32.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000030A-0000-0000-C000-000000000046} + = DdeCompositeMoniker +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000030A-0000-0000-C000-000000000046}\InprocServer32 + = ole32.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000030B-0000-0000-C000-000000000046} + = DfMarshal +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000030B-0000-0000-C000-000000000046}\InprocServer32 + = ole32.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000315-0000-0000-C000-000000000046} + = Metafile +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000315-0000-0000-C000-000000000046}\InprocServer32 + = ole32.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000316-0000-0000-C000-000000000046} + = Device Independent Bitmap +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000316-0000-0000-C000-000000000046}\InprocServer32 + = ole32.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000400-0001-0008-C000-000000000046} + = PSClassObject +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000400-0001-0008-C000-000000000046}\InprocServer32 + = iballs.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{009000d2-0000-0008-C000-000000000046} + = BasicSrv +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{009000d2-0000-0008-C000-000000000046}\LocalServer32 + = strmsrv.exe +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000013a-0001-0008-C000-000000000046} + = BasicSrv +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000013a-0001-0008-C000-000000000046}\LocalServer32 + = ballsrv.exe +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000013b-0001-0008-C000-000000000046} + = BasicSrv +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000013b-0001-0008-C000-000000000046}\LocalServer32 + = cubesrv.exe + +\Registry\MACHINE\SOFTWARE\Classes\.ut1 + = ProgID49 +\Registry\MACHINE\SOFTWARE\Classes\.ut2 + = ProgID48 +\Registry\MACHINE\SOFTWARE\Classes\.ut3 + = ProgID47 +\Registry\MACHINE\SOFTWARE\Classes\ProgID49 + = test app 1 +\Registry\MACHINE\SOFTWARE\Classes\ProgID49\CLSID + = {99999999-0000-0008-C000-000000000049} +\Registry\MACHINE\SOFTWARE\Classes\ProgID48 + = test app 2 +\Registry\MACHINE\SOFTWARE\Classes\ProgID48\CLSID + = {99999999-0000-0008-C000-000000000048} +\Registry\MACHINE\SOFTWARE\Classes\ProgID47 + = test app 3 +\Registry\MACHINE\SOFTWARE\Classes\ProgID47\CLSID + = {99999999-0000-0008-C000-000000000047} + +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{99999999-0000-0008-C000-000000000048} + = BasicBnd2 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{99999999-0000-0008-C000-000000000048}\LocalServer32 + = olesrv.exe +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{99999999-0000-0008-C000-000000000049} + = BasicBnd +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{99999999-0000-0008-C000-000000000049}\InprocServer32 + = oleimpl.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{99999999-0000-0008-C000-000000000047} + = TestEmbed +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{99999999-0000-0008-C000-000000000047}\InprocHandler32 + = ole32.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{99999999-0000-0008-C000-000000000047}\InprocServer32 + = ole32.dll +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{99999999-0000-0008-C000-000000000047}\LocalServer32 + = testsrv.exe +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{99999999-0000-0008-C000-000000000047}\protocol +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{99999999-0000-0008-C000-000000000047}\protocol\StdFileEditing +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{99999999-0000-0008-C000-000000000047}\protocol\StdFileEditing\server + = testsrv.exe + + +\Registry\MACHINE\SOFTWARE\Classes\StaticMetafile +\Registry\MACHINE\SOFTWARE\Classes\StaticMetafile\CLSID + = {00000315-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000315-0000-0000-C000-000000000046}\ProgID + = StaticMetafile +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000315-0000-0000-C000-000000000046}\InprocServer + = ole32.dll + +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000315-0000-0000-C000-000000000046}\DataFormats +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000315-0000-0000-C000-000000000046}\DataFormats\DefaultFile + = 3 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000315-0000-0000-C000-000000000046}\DataFormats\GetSet +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000315-0000-0000-C000-000000000046}\DataFormats\GetSet\0 + = 3,1,32,3 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000315-0000-0000-C000-000000000046}\MiscStatus + = 536 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000315-0000-0000-C000-000000000046}\Conversion +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000315-0000-0000-C000-000000000046}\Conversion\Readable +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000315-0000-0000-C000-000000000046}\Conversion\Readable\Main + = 3,MSDraw + + +\Registry\MACHINE\SOFTWARE\Classes\StaticDib +\Registry\MACHINE\SOFTWARE\Classes\StaticDib\CLSID + = {00000316-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000316-0000-0000-C000-000000000046}\ProgID + = StaticDib +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000316-0000-0000-C000-000000000046}\InprocServer + = ole32.dll + +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000316-0000-0000-C000-000000000046}\DataFormats +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000316-0000-0000-C000-000000000046}\DataFormats\DefaultFile + = 8 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000316-0000-0000-C000-000000000046}\DataFormats +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000316-0000-0000-C000-000000000046}\DataFormats\GetSet +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000316-0000-0000-C000-000000000046}\DataFormats\GetSet\0 + = 8,1,1,3 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000316-0000-0000-C000-000000000046}\MiscStatus + = 536 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000316-0000-0000-C000-000000000046}\Conversion +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000316-0000-0000-C000-000000000046}\Conversion\Readable +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000316-0000-0000-C000-000000000046}\Conversion\Readable\Main + = 8,PBrush + + +\Registry\MACHINE\SOFTWARE\Classes\PBrush +\Registry\MACHINE\SOFTWARE\Classes\PBrush\CLSID + = {0003000a-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0003000a-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0003000a-0000-0000-C000-000000000046}\ProgID + = PBrush +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0003000a-0000-0000-C000-000000000046}\Ole1Class + = PBrush +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0003000a-0000-0000-C000-000000000046}\MiscStatus + = 512 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0003000a-0000-0000-C000-000000000046}\Conversion +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0003000a-0000-0000-C000-000000000046}\Conversion\Readable +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0003000a-0000-0000-C000-000000000046}\Conversion\Readable\Main + = 8 + + +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00030007-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00030007-0000-0000-C000-000000000046}\ProgID + = MSDraw +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00030007-0000-0000-C000-000000000046}\Ole1Class + = MSDraw +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00030007-0000-0000-C000-000000000046}\MiscStatus + = 512 + + +\Registry\MACHINE\SOFTWARE\Classes\Interface + + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000000-0000-0000-C000-000000000046} + = IUnknown +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000000-0000-0000-C000-000000000046}\BaseInterface + = +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000000-0000-0000-C000-000000000046}\NumMethods + = 3 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000002-0000-0000-C000-000000000046} + = IMalloc +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000002-0000-0000-C000-000000000046}\NumMethods + = 9 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000003-0000-0000-C000-000000000046} + = IMarshal +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000003-0000-0000-C000-000000000046}\NumMethods + = 9 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000004-0000-0000-C000-000000000046} + = IRpcChannel +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000004-0000-0000-C000-000000000046}\NumMethods + = 7 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000005-0000-0000-C000-000000000046} + = IRpcStub +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000005-0000-0000-C000-000000000046}\NumMethods + = 8 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000007-0000-0000-C000-000000000046} + = IRpcProxy +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000007-0000-0000-C000-000000000046}\NumMethods + = 5 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000009-0000-0000-C000-000000000046} + = IPSFactory +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000009-0000-0000-C000-000000000046}\NumMethods + = 5 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000016-0000-0000-C000-000000000046} + = IMessageFilter +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000016-0000-0000-C000-000000000046}\NumMethods + = 6 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000018-0000-0000-C000-000000000046} + = IStdMarshalInfo +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000018-0000-0000-C000-000000000046}\NumMethods + = 4 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000019-0000-0000-C000-000000000046} + = IExternalConnection +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000019-0000-0000-C000-000000000046}\NumMethods + = 5 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000100-0000-0000-C000-000000000046} + = IEnumUnknown +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000100-0000-0000-C000-000000000046}\NumMethods + = 7 +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000100-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {00000100-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000100-0000-0000-C000-000000000046} + = IEnumUnknown_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000100-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010D-0000-0000-C000-000000000046} + = IViewObject +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010D-0000-0000-C000-000000000046}\NumMethods + = 9 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000110-0000-0000-C000-000000000046} + = IDataAdviseHolder +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000110-0000-0000-C000-000000000046}\NumMethods + = 7 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000111-0000-0000-C000-000000000046} + = IOleAdviseHolder +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000111-0000-0000-C000-000000000046}\NumMethods + = 9 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000011D-0000-0000-C000-000000000046} + = IOleLink +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000011D-0000-0000-C000-000000000046}\NumMethods + = 14 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000011E-0000-0000-C000-000000000046} + = IOleCache +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000011E-0000-0000-C000-000000000046}\NumMethods + = 8 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000124-0000-0000-C000-000000000046} + = IDebugStream +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000124-0000-0000-C000-000000000046}\NumMethods + = 19 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000126-0000-0000-C000-000000000046} + = IRunnableObject +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000126-0000-0000-C000-000000000046}\NumMethods + = 8 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000127-0000-0000-C000-000000000046} + = IViewObject2 +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000127-0000-0000-C000-000000000046}\BaseInterface + = {0000010D-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000127-0000-0000-C000-000000000046}\NumMethods + = 10 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000128-0000-0000-C000-000000000046} + = IOleCache2 +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000128-0000-0000-C000-000000000046}\BaseInterface + = {0000011E-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000128-0000-0000-C000-000000000046}\NumMethods + = 10 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000129-0000-0000-C000-000000000046} + = IOleCacheControl +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000129-0000-0000-C000-000000000046}\NumMethods + = 5 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000125-0000-0000-C000-000000000046} + = IAdviseSink2 +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000125-0000-0000-C000-000000000046}\BaseInterface + = {0000010F-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000125-0000-0000-C000-000000000046}\NumMethods + = 9 +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000125-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {00000125-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000125-0000-0000-C000-000000000046} + = IAdviseSink2_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000125-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010f-0000-0000-C000-000000000046} + = IAdviseSink +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010f-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {0000010f-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010F-0000-0000-C000-000000000046}\NumMethods + = 8 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000010f-0000-0000-C000-000000000046} + = IAdviseSink_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000010f-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000e-0000-0000-C000-000000000046} + = IBindCtx +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000e-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {0000000e-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000E-0000-0000-C000-000000000046}\NumMethods + = 13 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000000e-0000-0000-C000-000000000046} + = IBindCtx_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000000e-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000001-0000-0000-C000-000000000046} + = IClassFactory +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000001-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {00000001-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000001-0000-0000-C000-000000000046}\NumMethods + = 5 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000001-0000-0000-C000-000000000046} + = IClassFactory_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000001-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010e-0000-0000-C000-000000000046} + = IDataObject +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010e-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {0000010e-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010E-0000-0000-C000-000000000046}\NumMethods + = 12 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000010e-0000-0000-C000-000000000046} + = IDataObject_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000010e-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000121-0000-0000-C000-000000000046} + = IDropSource +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000121-0000-0000-C000-000000000046}\NumMethods + = 5 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000122-0000-0000-C000-000000000046} + = IDropTarget +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000122-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {00000122-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000122-0000-0000-C000-000000000046}\NumMethods + = 7 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000122-0000-0000-C000-000000000046} + = IDropTarget_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000122-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000101-0000-0000-C000-000000000046} + = IEnumString +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000101-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {00000101-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000100-0000-0000-C000-000000000046}\NumMethods + = 7 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000101-0000-0000-C000-000000000046} + = IEnumString_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000101-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000102-0000-0000-C000-000000000046} + = IEnumMoniker +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000102-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {00000102-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000102-0000-0000-C000-000000000046}\NumMethods + = 7 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000102-0000-0000-C000-000000000046} + = IEnumMoniker_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000102-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000103-0000-0000-C000-000000000046} + = IEnumFORMATETC +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000103-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {00000103-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000103-0000-0000-C000-000000000046}\NumMethods + = 7 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000103-0000-0000-C000-000000000046} + = IEnumFORMATETC_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000103-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000104-0000-0000-C000-000000000046} + = IEnumOLEVERB +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000104-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {00000104-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000104-0000-0000-C000-000000000046}\NumMethods + = 7 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000104-0000-0000-C000-000000000046} + = IEnumOLEVERB_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000104-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000105-0000-0000-C000-000000000046} + = IEnumSTATDATA +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000105-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {00000105-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000105-0000-0000-C000-000000000046}\NumMethods + = 7 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000105-0000-0000-C000-000000000046} + = IEnumSTATDATA_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000105-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000d-0000-0000-C000-000000000046} + = IEnumSTATSTG +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000d-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {0000000d-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000D-0000-0000-C000-000000000046}\NumMethods + = 7 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000000d-0000-0000-C000-000000000046} + = IEnumSTATSTG_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000000d-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000a-0000-0000-C000-000000000046} + = ILockBytes +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000a-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {0000000a-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000a-0000-0000-C000-000000000046}\NumMethods + = 10 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000000a-0000-0000-C000-000000000046} + = ILockBytes_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000000a-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000f-0000-0000-C000-000000000046} + = IMoniker +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000f-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {0000000f-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000f-0000-0000-C000-000000000046}\BaseInterface + = {00000109-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000f-0000-0000-C000-000000000046}\NumMethods + = 23 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000000f-0000-0000-C000-000000000046} + = IMoniker_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000000f-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000118-0000-0000-C000-000000000046} + = IOleClientSite +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000118-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {00000118-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000118-0000-0000-C000-000000000046}\NumMethods + = 9 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000118-0000-0000-C000-000000000046} + = IOleClientSite_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000118-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000011b-0000-0000-C000-000000000046} + = IOleContainer +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000011b-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {0000011b-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000011b-0000-0000-C000-000000000046}\BaseInterface + = {0000011a-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000011b-0000-0000-C000-000000000046}\NumMethods + = 6 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000011b-0000-0000-C000-000000000046} + = IOleContainer_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000011b-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000117-0000-0000-C000-000000000046} + = IOleInPlaceActiveObject +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000117-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {00000117-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000117-0000-0000-C000-000000000046}\BaseInterface + = {00000114-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000117-0000-0000-C000-000000000046}\NumMethods + = 10 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000117-0000-0000-C000-000000000046} + = IOleInPlaceActiveObject_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000117-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000011c-0000-0000-C000-000000000046} + = IOleItemContainer +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000011c-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {0000011c-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000011c-0000-0000-C000-000000000046}\BaseInterface + = {0000011b-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000011c-0000-0000-C000-000000000046}\NumMethods + = 9 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000011c-0000-0000-C000-000000000046} + = IOleItemContainer_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000011c-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000116-0000-0000-C000-000000000046} + = IOleInPlaceFrame +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000116-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {00000116-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000116-0000-0000-C000-000000000046}\NumMethods + = 15 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000116-0000-0000-C000-000000000046} + = IOleInPlaceFrame_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000116-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000113-0000-0000-C000-000000000046} + = IOleInPlaceObject +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000113-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {00000113-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000113-0000-0000-C000-000000000046}\BaseInterface + = {00000114-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000113-0000-0000-C000-000000000046}\NumMethods + = 9 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000113-0000-0000-C000-000000000046} + = IOleInPlaceObject_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000113-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000114-0000-0000-C000-000000000046} + = IOleWindow +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000114-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {00000114-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000114-0000-0000-C000-000000000046}\NumMethods + = 5 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000114-0000-0000-C000-000000000046} + = IOleWindow_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000114-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000119-0000-0000-C000-000000000046} + = IOleInPlaceSite +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000119-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {00000119-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000119-0000-0000-C000-000000000046}\BaseInterface + = {00000114-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000119-0000-0000-C000-000000000046}\NumMethods + = 15 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000119-0000-0000-C000-000000000046} + = IOleInPlaceSite_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000119-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000115-0000-0000-C000-000000000046} + = IOleInPlaceUIWindow +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000115-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {00000115-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000115-0000-0000-C000-000000000046}\BaseInterface + = {00000114-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000115-0000-0000-C000-000000000046}\NumMethods + = 9 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000115-0000-0000-C000-000000000046} + = IOleInPlaceUIWindow_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000115-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000112-0000-0000-C000-000000000046} + = IOleObject +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000112-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {00000112-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000112-0000-0000-C000-000000000046}\NumMethods + = 24 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000112-0000-0000-C000-000000000046} + = IOleObject_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000112-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000011a-0000-0000-C000-000000000046} + = IParseDisplayName +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000011a-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {0000011a-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000011a-0000-0000-C000-000000000046}\NumMethods + = 4 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000011a-0000-0000-C000-000000000046} + = IParseDisplayName_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000011a-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010c-0000-0000-C000-000000000046} + = IPersist +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010c-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {0000010c-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010c-0000-0000-C000-000000000046}\NumMethods + = 4 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000010c-0000-0000-C000-000000000046} + = IPersist_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000010c-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010b-0000-0000-C000-000000000046} + = IPersistFile +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010b-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {0000010b-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010b-0000-0000-C000-000000000046}\BaseInterface + = {0000010c-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010b-0000-0000-C000-000000000046}\NumMethods + = 9 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000010b-0000-0000-C000-000000000046} + = IPersistFile_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000010b-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010a-0000-0000-C000-000000000046} + = IPersistStorage +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010a-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {0000010a-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010A-0000-0000-C000-000000000046}\BaseInterface + = {0000010C-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000010A-0000-0000-C000-000000000046}\NumMethods + = 10 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000010a-0000-0000-C000-000000000046} + = IPersistStorage_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000010a-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000109-0000-0000-C000-000000000046} + = IPersistStream +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000109-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {00000109-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000109-0000-0000-C000-000000000046}\BaseInterface + = {0000010C-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000109-0000-0000-C000-000000000046}\NumMethods + = 8 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000109-0000-0000-C000-000000000046} + = IPersistStream_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000109-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000010-0000-0000-C000-000000000046} + = IRunningObjectTable +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000010-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {00000010-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000010-0000-0000-C000-000000000046}\NumMethods + = 10 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000010-0000-0000-C000-000000000046} + = IRunningObjectTable_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000010-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000b-0000-0000-C000-000000000046} + = IStorage +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000b-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {0000000b-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000b-0000-0000-C000-000000000046}\NumMethods + = 18 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000000b-0000-0000-C000-000000000046} + = IStorage_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000000b-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000c-0000-0000-C000-000000000046} + = IStream +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000c-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {0000000c-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{0000000c-0000-0000-C000-000000000046}\NumMethods + = 14 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000000c-0000-0000-C000-000000000046} + = IStream_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{0000000c-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000012-0000-0000-C000-000000000046} + = IRootStorage +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000012-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {00000012-0000-0000-C000-000000000046} +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00000012-0000-0000-C000-000000000046}\NumMethods + = 4 +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000012-0000-0000-C000-000000000046} + = IRootStorage_PSFactory +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{00000012-0000-0000-C000-000000000046}\InprocServer32 + = oleprx32.dll + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020400-0000-0000-C000-000000000046} + = IDispatch +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020400-0000-0000-C000-000000000046}\NumMethods + = 7 +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020400-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {00020420-0000-0000-C000-000000000046} + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020404-0000-0000-C000-000000000046} + = IEnumVARIANT +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020404-0000-0000-C000-000000000046}\NumMethods + = 7 +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020404-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {00020421-0000-0000-C000-000000000046} + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020401-0000-0000-C000-000000000046} + = ITypeInfo +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020401-0000-0000-C000-000000000046}\NumMethods + = 22 +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020401-0000-0000-C000-000000000046}\ProxyStubClsid32 + = {00020422-0000-0000-C000-000000000046} + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020402-0000-0000-C000-000000000046} + = ITypeLib +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020402-0000-0000-C000-000000000046}\NumMethods + = 13 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020403-0000-0000-C000-000000000046} + = ITypeComp +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020403-0000-0000-C000-000000000046}\NumMethods + = 5 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020405-0000-0000-C000-000000000046} + = ICreateTypeInfo +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020405-0000-0000-C000-000000000046}\NumMethods + = 26 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020406-0000-0000-C000-000000000046} + = ICreateTypeLib +\Registry\MACHINE\SOFTWARE\Classes\Interface\{00020406-0000-0000-C000-000000000046}\NumMethods + = 13 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{D5F56A34-593B-101A-B569-08002B2DBF7A} + = IRpcProxyBuffer +\Registry\MACHINE\SOFTWARE\Classes\Interface\{D5F56A34-593B-101A-B569-08002B2DBF7A}\NumMethods + = 5 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{D5F569D0-593B-101A-B569-08002B2DBF7A} + = IPSFactoryBuffer +\Registry\MACHINE\SOFTWARE\Classes\Interface\{D5F569D0-593B-101A-B569-08002B2DBF7A}\NumMethods + = 5 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{D5F56B60-593B-101A-B569-08002B2DBF7A} + = IRpcChannelBuffer +\Registry\MACHINE\SOFTWARE\Classes\Interface\{D5F56B60-593B-101A-B569-08002B2DBF7A}\NumMethods + = 8 + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{D5F56AFC-593B-101A-B569-08002B2DBF7A} + = IRpcStubBuffer +\Registry\MACHINE\SOFTWARE\Classes\Interface\{D5F56AFC-593B-101A-B569-08002B2DBF7A}\NumMethods + = 10 diff --git a/private/ole32/ih/ole1cls.h b/private/ole32/ih/ole1cls.h new file mode 100644 index 000000000..567dc1878 --- /dev/null +++ b/private/ole32/ih/ole1cls.h @@ -0,0 +1,148 @@ +/*****************************************************************************\ +* * +* ole1cls.h - Master definition of GUIDs for OLE1 classes * +* * +* OLE Version 2.0 * +* * +* Copyright (c) 1992-1993, Microsoft Corp. All rights reserved. * +* * +\*****************************************************************************/ + +/* This file is the master definition of all GUIDs for OLE1 classes. + + All such GUIDs are of the form: + + 0003xxxx-0000-0000-C000-000000000046 + + The last parameter to DEFINE_OLE1GUID is the old 1.0 class name, + i.e., its key in the registration database. + + Do not remove or change GUIDs. + + Do not add anything to this file except comments and DEFINE_OLE1GUID macros. +*/ + +#ifndef DEFINE_OLE1GUID +#define DEFINE_OLE1GUID(a,b,c,d,e) DEFINE_OLEGUID (a,b,c,d) +#endif + +#ifdef WIN32 +#define LSTR(x) L##x +#else +#define LSTR(x) x +#endif + + +DEFINE_OLE1GUID(CLSID_ExcelWorksheet, 0x00030000, 0, 0, LSTR("ExcelWorksheet")); +DEFINE_OLE1GUID(CLSID_ExcelChart, 0x00030001, 0, 0, LSTR("ExcelChart")); +DEFINE_OLE1GUID(CLSID_ExcelMacrosheet, 0x00030002, 0, 0, LSTR("ExcelMacrosheet")); +DEFINE_OLE1GUID(CLSID_WordDocument, 0x00030003, 0, 0, LSTR("WordDocument")); +DEFINE_OLE1GUID(CLSID_MSPowerPoint, 0x00030004, 0, 0, LSTR("MSPowerPoint")); +DEFINE_OLE1GUID(CLSID_MSPowerPointSho, 0x00030005, 0, 0, LSTR("MSPowerPointSho")); +DEFINE_OLE1GUID(CLSID_MSGraph, 0x00030006, 0, 0, LSTR("MSGraph")); +DEFINE_OLE1GUID(CLSID_MSDraw, 0x00030007, 0, 0, LSTR("MSDraw")); +DEFINE_OLE1GUID(CLSID_Note_It, 0x00030008, 0, 0, LSTR("Note-It")); +DEFINE_OLE1GUID(CLSID_WordArt, 0x00030009, 0, 0, LSTR("WordArt")); +DEFINE_OLE1GUID(CLSID_PBrush, 0x0003000a, 0, 0, LSTR("PBrush")); +DEFINE_OLE1GUID(CLSID_Equation, 0x0003000b, 0, 0, LSTR("Equation")); +DEFINE_OLE1GUID(CLSID_Package, 0x0003000c, 0, 0, LSTR("Package")); +DEFINE_OLE1GUID(CLSID_SoundRec, 0x0003000d, 0, 0, LSTR("SoundRec")); +DEFINE_OLE1GUID(CLSID_MPlayer, 0x0003000e, 0, 0, LSTR("MPlayer")); + +/* test apps */ +DEFINE_OLE1GUID(CLSID_ServerDemo, 0x0003000f, 0, 0, LSTR("ServerDemo")); +DEFINE_OLE1GUID(CLSID_Srtest, 0x00030010, 0, 0, LSTR("Srtest")); +DEFINE_OLE1GUID(CLSID_SrtInv, 0x00030011, 0, 0, LSTR("SrtInv")); +DEFINE_OLE1GUID(CLSID_OleDemo, 0x00030012, 0, 0, LSTR("OleDemo")); + +/* External ISVs */ +// Coromandel / Dorai Swamy / 718-793-7963 +DEFINE_OLE1GUID(CLSID_CoromandelIntegra,0x00030013, 0, 0, LSTR("CoromandelIntegra")); +DEFINE_OLE1GUID(CLSID_CoromandelObjServer,0x00030014, 0, 0, LSTR("CoromandelObjServer")); + +// 3-d Visions Corp / Peter Hirsch / 310-325-1339 +DEFINE_OLE1GUID(CLSID_StanfordGraphics, 0x00030015, 0, 0, LSTR("StanfordGraphics")); + +// Deltapoint / Nigel Hearne / 408-648-4000 +DEFINE_OLE1GUID(CLSID_DGraphCHART, 0x00030016, 0, 0, LSTR("DGraphCHART")); +DEFINE_OLE1GUID(CLSID_DGraphDATA, 0x00030017, 0, 0, LSTR("DGraphDATA")); + +// Corel / Richard V. Woodend / 613-728-8200 x1153 +DEFINE_OLE1GUID(CLSID_PhotoPaint, 0x00030018, 0, 0, LSTR("PhotoPaint")); +DEFINE_OLE1GUID(CLSID_CShow, 0x00030019, 0, 0, LSTR("CShow")); +DEFINE_OLE1GUID(CLSID_CorelChart, 0x0003001a, 0, 0, LSTR("CorelChart")); +DEFINE_OLE1GUID(CLSID_CDraw, 0x0003001b, 0, 0, LSTR("CDraw")); + +// Inset Systems / Mark Skiba / 203-740-2400 +DEFINE_OLE1GUID(CLSID_HJWIN1_0, 0x0003001c, 0, 0, LSTR("HJWIN1.0")); + +// Mark V Systems / Mark McGraw / 818-995-7671 +DEFINE_OLE1GUID(CLSID_ObjMakerOLE, 0x0003001d, 0, 0, LSTR("ObjMakerOLE")); + +// IdentiTech / Mike Gilger / 407-951-9503 +DEFINE_OLE1GUID(CLSID_FYI, 0x0003001e, 0, 0, LSTR("FYI")); +DEFINE_OLE1GUID(CLSID_FYIView, 0x0003001f, 0, 0, LSTR("FYIView")); + +// Inventa Corporation / Balaji Varadarajan / 408-987-0220 +DEFINE_OLE1GUID(CLSID_Stickynote, 0x00030020, 0, 0, LSTR("Stickynote")); + +// ShapeWare Corp. / Lori Pearce / 206-467-6723 +DEFINE_OLE1GUID(CLSID_ShapewareVISIO10, 0x00030021, 0, 0, LSTR("ShapewareVISIO10")); +DEFINE_OLE1GUID(CLSID_ImportServer, 0x00030022, 0, 0, LSTR("ImportServer")); + + +// test app SrTest +DEFINE_OLE1GUID(CLSID_SrvrTest, 0x00030023, 0, 0, LSTR("SrvrTest")); + +// Special clsid for when a 1.0 client pastes an embedded object +// that is a link. +// **This CLSID is obsolete. Do not reuse number. +//DEFINE_OLE1GUID(CLSID_10EmbedObj, 0x00030024, 0, 0, LSTR("OLE2_Embedded_Link")); + +// test app ClTest. Doesn't really work as a server but is in reg db +DEFINE_OLE1GUID(CLSID_ClTest, 0x00030025, 0, 0, LSTR("Cltest")); + +// Microsoft ClipArt Gallery Sherry Larsen-Holmes +DEFINE_OLE1GUID(CLSID_MS_ClipArt_Gallery,0x00030026, 0, 0, LSTR("MS_ClipArt_Gallery")); + +// Microsoft Project Cory Reina +DEFINE_OLE1GUID(CLSID_MSProject, 0x00030027, 0, 0, LSTR("MSProject")); + +// Microsoft Works Chart +DEFINE_OLE1GUID(CLSID_MSWorksChart, 0x00030028, 0, 0, LSTR("MSWorksChart")); + +// Microsoft Works Spreadsheet +DEFINE_OLE1GUID(CLSID_MSWorksSpreadsheet,0x00030029, 0, 0, LSTR("MSWorksSpreadsheet")); + +// AFX apps - Dean McCrory +DEFINE_OLE1GUID(CLSID_MinSvr, 0x0003002A, 0, 0, LSTR("MinSvr")); +DEFINE_OLE1GUID(CLSID_HierarchyList, 0x0003002B, 0, 0, LSTR("HierarchyList")); +DEFINE_OLE1GUID(CLSID_BibRef, 0x0003002C, 0, 0, LSTR("BibRef")); +DEFINE_OLE1GUID(CLSID_MinSvrMI, 0x0003002D, 0, 0, LSTR("MinSvrMI")); +DEFINE_OLE1GUID(CLSID_TestServ, 0x0003002E, 0, 0, LSTR("TestServ")); + +// Ami Pro +DEFINE_OLE1GUID(CLSID_AmiProDocument, 0x0003002F, 0, 0, LSTR("AmiProDocument")); + +// WordPerfect Presentations For Windows +DEFINE_OLE1GUID(CLSID_WPGraphics, 0x00030030, 0, 0, LSTR("WPGraphics")); +DEFINE_OLE1GUID(CLSID_WPCharts, 0x00030031, 0, 0, LSTR("WPCharts")); + + +// MicroGrafx Charisma +DEFINE_OLE1GUID(CLSID_Charisma, 0x00030032, 0, 0, LSTR("Charisma")); +DEFINE_OLE1GUID(CLSID_Charisma_30, 0x00030033, 0, 0, LSTR("Charisma_30")); +DEFINE_OLE1GUID(CLSID_CharPres_30, 0x00030034, 0, 0, LSTR("CharPres_30")); + +// MicroGrafx Draw +DEFINE_OLE1GUID(CLSID_Draw, 0x00030035, 0, 0, LSTR("Draw")); + +// MicroGrafx Designer +DEFINE_OLE1GUID(CLSID_Designer_40, 0x00030036, 0, 0, LSTR("Designer_40")); + + +#undef DEFINE_OLE1GUID + +/* as we discover OLE 1 servers we will add them to the end of this list; + there is room for 64K of them! +*/ diff --git a/private/ole32/ih/ole2com.h b/private/ole32/ih/ole2com.h new file mode 100644 index 000000000..056fe43d0 --- /dev/null +++ b/private/ole32/ih/ole2com.h @@ -0,0 +1,1001 @@ +//+--------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1992 - 1993. +// +// File: ole2com.h +// +// Contents: Common definitions shared by com and ole232 +// +// Classes: +// +// Functions: +// +// History: 4-26-94 kevinro Created +// 06-16-94 AlexT Add FnAssert prototype +// 07-26-94 AlexGo Added CStabilize and CSafeRefCount +// 21-Dec-94 BruceMa Wrap mbstowcs and wcstombs +// 23-Jan-95 t-ScottH added Dump method to CSafeRefCount +// 08-Sep-95 murthys Added declarations for compapi worker +// used by com, stg, scm etc +// +// Notes: +// There are two versions of ole2int.h in the project. This is +// unfortunate, but would be a major pain in the butt to fix. +// What I have done is to extract the share parts of the two files, +// and put them in this file. ole2int.h then includes this file. +// +// Someday, somebody should reconcile all of the differences between the +// two ole2int.h files, and rename them. Don't have time for that now, +// so I have gone for the path of least resistance. +// KevinRo +//---------------------------------------------------------------------------- +#ifndef _OLE2COM_H_ +#define _OLE2COM_H_ + +#include <memapi.hxx> + +// +// common compobj API worker functions used by com, stg, scm etc +// +// These definitions are shared between all of the components of OLE that +// use the common directory, such as SCM and COMPOBJ +// +// format for string form of GUID is (leading identifier ????) +// ????{%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X} + +#define GUIDSTR_MAX (1+ 8 + 1 + 4 + 1 + 4 + 1 + 4 + 1 + 12 + 1 + 1) +#define CLSIDSTR_MAX (GUIDSTR_MAX) +#define IIDSTR_MAX (GUIDSTR_MAX) + + +// +// Internal values used between OLE32 and SCM +// + +#define APT_THREADED 0 +#define FREE_THREADED 1 +#define SINGLE_THREADED 2 +#define BOTH_THREADED 3 +#define GOT_FROM_ROT 0x80000000 + + +// +// Internal CLSCTX used for loading Proxy/Stub DLLs +// +#define CLSCTX_PS_DLL 0x80000000 + +// +// Internal CLSCTX used for flagging that WX86 remapping should not occur +// +#define CLSCTX_NO_REMAP 0x40000000 + +// +// The following flags are used to support loading INPROC items into 16-bit DLL's +// +#define CLSCTX_INPROC_HANDLERS (CLSCTX_INPROC_HANDLER16 | CLSCTX_INPROC_HANDLER | CLSCTX_INPROC_HANDLERX86) +#define CLSCTX_INPROC_SERVERS (CLSCTX_INPROC_SERVER16 | CLSCTX_INPROC_SERVER | CLSCTX_INPROC_SERVERX86 | CLSCTX_PS_DLL) + +// "common" compapi worker functions + +INTERNAL_(int) wStringFromGUID2(REFGUID rguid, LPWSTR lpsz, int cbMax); +INTERNAL wStringFromUUID(REFGUID rguid, LPWSTR lpsz); +void FormatHexNumW( unsigned long ulValue, unsigned long chChars, WCHAR *pwcStr); +void FormatHexNumA( unsigned long ulValue, unsigned long chChars, char *pchStr); + +#ifdef _CHICAGO_ +INTERNAL_(int) wStringFromGUID2A(REFGUID rguid, LPSTR lpsz, int cbMax); +#define wStringFromGUID2T wStringFromGUID2A +#else +#define wStringFromGUID2T wStringFromGUID2 +#endif + +BOOL wThreadModelMatch(DWORD dwCallerThreadModel,DWORD dwDllThreadModel,DWORD dwContext); +LONG wQueryStripRegValue(HKEY hkey,LPCTSTR pwszSubKey,LPTSTR pwszValue, PLONG pcbValue); +LONG wGetDllInfo(HKEY hClsRegEntry,LPCTSTR pwszKey,LPTSTR pwszDllName,LONG *pclDllName,ULONG *pulDllThreadType); +BOOL wCompareDllName(LPCTSTR pwszPath, LPCTSTR pwszDllName, DWORD dwDllNameLen); + +// compapi worker functions + +INTERNAL wIsInternalProxyStubIID(REFIID riid, LPCLSID lpclsid); +INTERNAL wCoTreatAsClass(REFCLSID clsidOld, REFCLSID clsidNew); +INTERNAL wCLSIDFromOle1Class(LPCWSTR lpsz, LPCLSID lpclsid, BOOL fForceAssign=FALSE); +INTERNAL wCLSIDFromString(LPWSTR lpsz, LPCLSID lpclsid); + +#define wCLSIDFromProgID wCLSIDFromOle1Class + +INTERNAL_(int) wOle1ClassFromCLSID2(REFCLSID rclsid, LPWSTR lpsz, int cbMax); +INTERNAL wCoGetTreatAsClass(REFCLSID clsidOld, LPCLSID lpClsidNew); +INTERNAL wRegQueryPSClsid(REFIID riid, LPCLSID lpclsid); +INTERNAL wCoGetPSClsid(REFIID riid, LPCLSID lpclsid); +INTERNAL wCoGetClassExt(LPCWSTR pwszExt, LPCLSID pclsid); +INTERNAL wRegGetClassExt(LPCWSTR lpszExt, LPCLSID pclsid); +INTERNAL wCoGetClassPattern(HANDLE hfile, CLSID *pclsid); +INTERNAL wCoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwContext, REFIID riid, LPVOID FAR* ppv); +INTERNAL_(HRESULT) wCoMarshalInterThreadInterfaceInStream(REFIID riid, LPUNKNOWN pUnk, LPSTREAM *ppStm); +INTERNAL_(HRESULT) wCoGetInterfaceAndReleaseStream(LPSTREAM pstm, REFIID riid, LPVOID *ppv); +INTERNAL_(BOOL) wGUIDFromString(LPCWSTR lpsz, LPGUID pguid); +INTERNAL_(BOOL) wUUIDFromString(LPCWSTR lpsz, LPGUID pguid); +INTERNAL wStringFromCLSID(REFCLSID rclsid, LPWSTR FAR* lplpsz); +INTERNAL wStringFromIID(REFIID rclsid, LPWSTR FAR* lplpsz); +INTERNAL wIIDFromString(LPWSTR lpsz, LPIID lpiid); +INTERNAL_(BOOL) wCoIsOle1Class(REFCLSID rclsid); +INTERNAL wkProgIDFromCLSID(REFCLSID rclsid, LPWSTR FAR* ppszProgID); +INTERNAL wCoOpenClassKey(REFCLSID clsid, HKEY FAR* lphkeyClsid); +INTERNAL_(LONG) wRegQueryClassValue(REFCLSID rclsid, LPCWSTR lpszSubKey, + LPWSTR lpszValue, int cbMax); + + +// +// There are two sets of possible keys. There are the 32 bit, as well as +// the 16 bit +// + +#ifdef _KEVINROS_CHICAGO_CHANGES_ +const TCHAR tszOle32Dll[] = TEXT("OLE32.DLL"); + +#define OLE32_DLL tszOle32Dll +#define OLE32_BYTE_LEN sizeof(OLE32_DLL) +#define OLE32_CHAR_LEN (sizeof(OLE32_DLL) / sizeof(TCHAR) - 1) +#endif + +const TCHAR tszCLSID[] = TEXT("CLSID"); + +const TCHAR tszInprocServer[] = TEXT("InprocServer32"); +const TCHAR tszInprocHandler[] = TEXT("InprocHandler32"); +const TCHAR tszLocalServer[] = TEXT("LocalServer32"); + +const WCHAR wszActivateAtBits[] = L"ActivateAtBits"; +const WCHAR wszActivateRemote[] = L"Remote"; +const WCHAR wszDebug[] = L"Debug"; + +const TCHAR tszLocalServer16[] = TEXT("LocalServer"); +const TCHAR tszInprocServer16[] = TEXT("InprocServer"); +const TCHAR tszInprocHandler16[] = TEXT("InprocHandler"); + +const TCHAR tszOle2Dll[] = TEXT("OLE2.DLL"); + +#define OLE2_DLL tszOle2Dll +#define OLE2_BYTE_LEN sizeof(OLE2_DLL) +#define OLE2_CHAR_LEN (sizeof(OLE2_DLL) / sizeof(TCHAR) - 1) + + +const TCHAR tszCLSIDBACK[] = TEXT("CLSID\\"); +#define CLSIDBACK tszCLSIDBACK +#define CLSIDBACK_BYTE_LEN sizeof(CLSIDBACK) +#define CLSIDBACK_CHAR_LEN (sizeof(CLSIDBACK) / sizeof(TCHAR) - 1) + +#define KEY_LEN 256 // max size of registry key +#define VALUE_LEN 256 // max size of registry value + +#ifdef _CAIRO_ + +#define _DCOM_ // enable definition of Cairo OLE COM extensions +#include <oleext.h> + +#else + +// These API's are exposed for Cairo but not for Daytona, so we declare +// them here for internal users + +WINOLEAPI OleInitializeEx(LPVOID pvReserved, DWORD); +WINOLEAPI CoGetCallerTID( LPDWORD lpdwTID ); +WINOLEAPI CoGetPersistentInstance( + REFIID riid, + DWORD dwCtrl, + DWORD grfMode, + OLECHAR *pwszName, + struct IStorage *pstg, + REFCLSID rclsidOle1, + BOOL * pfOle1Loaded, + void **ppvUnk); +#endif + + +// +// No longer in the Cairo DEF file. We want to remove this as soon as +// oleutest can be changed to not use it. +// +WINOLEAPI CoNewPersistentInstance( + REFCLSID rclsid, + REFIID riid, + DWORD dwCtrl, + DWORD grfMode, + OLECHAR *pwszCreateFrom, + struct IStorage *pstgCreateFrom, + OLECHAR *pwszNewName, + void **ppunk); + +#if DBG==1 +STDAPI FnAssert(LPSTR lpstrExpr, LPSTR lpstrMsg, LPSTR lpstrFileName, UINT iLine); +#endif + +#if defined(_M_I86SM) || defined(_M_I86MM) +#define _NEARDATA +#endif + +#ifdef WIN32 +#define HTASK DWORD // Use Proccess id / Thread id +#endif + + +#ifdef WIN32 +// we have to define these because they have been deleted from +// win32s, where only the ...Ex versions exist anymore. +// Now, that's backward compatibility! +# define SetWindowOrg(h,x,y) SetWindowOrgEx((h),(x),(y),NULL) +# define SetWindowExt(h,x,y) SetWindowExtEx((h),(x),(y),NULL) +# define SetViewportOrg(h,x,y) SetViewportOrgEx((h),(x),(y),NULL) +# define SetViewportExt(h,x,y) SetViewportExtEx((h),(x),(y),NULL) +# define SetBitmapDimension(h,x,y) SetBitmapDimensionEx((h),(x),(y),NULL) +#endif + + +#ifdef WIN32 + +# define _xstrcpy lstrcpyW +# define _xstrcat lstrcatW +# define _xstrlen lstrlenW +# define _xstrchr wcschr +# define _xstrcmp lstrcmpW +# define _xstricmp lstrcmpiW +# define _xstrtok wcstok +# define _xisdigit(c) (IsCharAlphaNumericW(c) && !IsCharAlphaW(c)) + +#else // !WIN32 + +# define _xstrcpy _fstrcpy +# define _xstrcat _fstrcat +# define _xstrlen _fstrlen +# define _xstrchr _fstrchr +# define _xstrcmp _fstrcmp +# define _xstricmp _fstricmp +# define _xstrtok _fstrtok +# define _xisdigit(c) isdigit(c) + +#endif // WIN32 + +//+---------------------------------------------------------------------------- +// +// Macro: +// GETPPARENT +// +// Synopsis: +// Given a pointer to something contained by a struct (or +// class,) the type name of the containing struct (or class), +// and the name of the member being pointed to, return a pointer +// to the container. +// +// Arguments: +// [pmemb] -- pointer to member of struct (or class.) +// [struc] -- type name of containing struct (or class.) +// [membname] - name of member within the struct (or class.) +// +// Returns: +// pointer to containing struct (or class) +// +// Notes: +// Assumes all pointers are FAR. +// +// History: +// 11/10/93 - ChrisWe - created +// +//----------------------------------------------------------------------------- +#define GETPPARENT(pmemb, struc, membname) (\ + (struc FAR *)(((char FAR *)(pmemb))-offsetof(struc, membname))) + +//STDSTATIC is intended to be used for static class methods +//only!! +#define STDSTATIC_(type) static type EXPORT +#define STDSTATICIMP_(type) type EXPORT + +#ifdef WIN32 +# define WEP_FREE_DLL 0 // BUGBUG32 +# define WEP_SYSTEM_EXIT 1 +#endif + + +#ifdef WIN32 + +inline UINT GetDriveTypeFromNumber(int i) +{ + TCHAR szDevice[] = TEXT("A:\\"); + + // Pick off the drive letter from the input path. + *szDevice = i + 'A'; + +#ifdef _UNICODE + return(GetDriveTypeW(szDevice)); +#else + return(GetDriveTypeA(szDevice)); +#endif +} + +#endif + +#ifndef _MAC + +/* dll's instance and module handles */ +extern HMODULE g_hmodOLE2; +extern HINSTANCE g_hinst; + +/* Variables for registered clipboard formats */ +extern CLIPFORMAT g_cfObjectLink; +extern CLIPFORMAT g_cfOwnerLink; +extern CLIPFORMAT g_cfNative; +extern CLIPFORMAT g_cfLink; +extern CLIPFORMAT g_cfBinary; +extern CLIPFORMAT g_cfFileName; +extern CLIPFORMAT g_cfFileNameW; +extern CLIPFORMAT g_cfNetworkName; +extern CLIPFORMAT g_cfDataObject; +extern CLIPFORMAT g_cfEmbeddedObject; +extern CLIPFORMAT g_cfEmbedSource; +extern CLIPFORMAT g_cfLinkSource; +extern CLIPFORMAT g_cfOleDraw; +extern CLIPFORMAT g_cfLinkSrcDescriptor; +extern CLIPFORMAT g_cfObjectDescriptor; +extern CLIPFORMAT g_cfCustomLinkSource; +extern CLIPFORMAT g_cfPBrush; +extern CLIPFORMAT g_cfMSDraw; +extern CLIPFORMAT g_cfOlePrivateData; +extern CLIPFORMAT g_cfScreenPicture; // used for XL and Word hack + // see clipapi.cpp + +#endif // _MAC + + +#include <utstream.h> + +/* + * Warning disables: + * + * We compile with warning level 4, with the following warnings + * disabled: + * + * 4355: 'this' used in base member initializer list + * + * We don't see the point of this message and we do this all + * the time. + * + * 4505: Unreferenced local function has been removed -- the given + * function is local and not referenced in the body of the module. + * + * Unfortunately, this is generated for every inline function + * seen in the header files that is not used in the module. + * Since we use a number of inlines, this is a nuisance + * warning. It would be nice if the compiler distinguished + * between inlines and regular functions. + * + * 4706: Assignment within conditional expression. + * + * We use this style of programming extensively, so this + * warning is disabled. + */ +#pragma warning(disable:4355) +#pragma warning(disable:4068) + +/* + * MACROS for Mac/PC core code + * + * The following macros reduce the proliferation of #ifdefs. They + * allow tagging a fragment of code as Mac only, PC only, or with + * variants which differ on the PC and the Mac. + * + * Usage: + * + * + * h = GetHandle(); + * Mac(DisposeHandle(h)); + * + * + * h = GetHandle(); + * MacWin(h2 = h, CopyHandle(h, h2)); + * + */ +#ifdef _MAC +#define Mac(x) x +#define Win(x) +#define MacWin(x,y) x +#else +#define Mac(x) +#define Win(x) x +#define MacWin(x,y) y +#endif + +// Define WX86OLE if WX86 hooks are to be included into ole and scm +#ifndef i386 +#ifndef WX86OLE +#define WX86OLE +#endif +#endif + +#ifdef WX86OLE +const TCHAR tszInprocServerX86[] = TEXT("InprocServerX86"); +const TCHAR tszInprocHandlerX86[] = TEXT("InprocHandlerX86"); +#endif + +// +// The following include is for an interface between OLE and Wx86 +#ifdef WX86OLE +#include <wx86grpa.hxx> +extern CWx86 gcwx86; +#endif + +// +// The following includes an interface that is common between the +// WOW thunk layer, and the 32-bit version of OLE. +// + +#include <thunkapi.hxx> // WOW thunking interfaces + +// +// A call to CoInitializeWOW will set the following variable. When set, +// it points to a VTABLE of functions that we can call in the thunk +// DLL. Only used when running in a VDM. +// +extern LPOLETHUNKWOW g_pOleThunkWOW; + + +// debug versions of interlocked increment/decrement; not accurate +// under multi-threading conditions, but better than the return value +// of the Interlocked increment/decrement functions. +inline DWORD InterlockedAddRef(DWORD *pRefs) +{ +#if DBG==1 + DWORD refs = *pRefs + 1; + InterlockedIncrement((LPLONG)pRefs); + return refs; +#else + return InterlockedIncrement((LPLONG)pRefs); +#endif +} + +inline DWORD InterlockedRelease(DWORD *pRefs) +{ +#if DBG==1 + DWORD refs = *pRefs - 1; + return InterlockedDecrement((LPLONG)pRefs) == 0 ? 0 : refs; +#else + return InterlockedDecrement((LPLONG)pRefs); +#endif +} + + +// helper for getting stable pointers during destruction or other times; +// NOTE: not thread safe; must provide higher level synchronization +inline void SafeReleaseAndNULL(IUnknown **ppUnk) +{ + if (*ppUnk != NULL) + { + IUnknown *pUnkSave = *ppUnk; + *ppUnk = NULL; + pUnkSave->Release(); + } +} + + + +/***********************************************************************/ +/* FILE FORMAT RELATED INFO ****/ + +// Coponent object stream information + +#define COMPOBJ_STREAM OLESTR("\1CompObj") +#define BYTE_ORDER_INDICATOR 0xfffe // for MAC it could be different +#define COMPOBJ_STREAM_VERSION 0x0001 + +// OLE defines values for different OSs +#define OS_WIN 0x0000 +#define OS_MAC 0x0001 +#define OS_NT 0x0002 + +// HIGH WORD is OS indicator, LOW WORD is OS version number +extern DWORD gdwOrgOSVersion; +extern DWORD gdwOleVersion; + +// Ole streams information +#define OLE_STREAM OLESTR("\1Ole") +#define OLE_PRODUCT_VERSION 0x0200 /* (HIGH BYTE major version) */ +#define OLE_STREAM_VERSION 0x0001 + +#define OLE10_NATIVE_STREAM OLESTR("\1Ole10Native") +#define OLE10_ITEMNAME_STREAM OLESTR("\1Ole10ItemName") +#define OLE_PRESENTATION_STREAM OLESTR("\2OlePres000") +#define OLE_MAX_PRES_STREAMS 1000 +#define OLE_CONTENTS_STREAM OLESTR("CONTENTS") +#define OLE_INVALID_STREAMNUM (-1) + +/************************************************************************/ +/**** Storage APIs internally used ****/ +/************************************************************************/ + +STDAPI ReadClipformatStm(LPSTREAM lpstream, DWORD FAR* lpdwCf); +STDAPI WriteClipformatStm(LPSTREAM lpstream, CLIPFORMAT cf); + +STDAPI WriteMonikerStm (LPSTREAM pstm, LPMONIKER pmk); +STDAPI ReadMonikerStm (LPSTREAM pstm, LPMONIKER FAR* pmk); + +STDAPI_(LPSTREAM) CreateMemStm(DWORD cb, LPHANDLE phMem); +STDAPI_(LPSTREAM) CloneMemStm(HANDLE hMem); +STDAPI_(void) ReleaseMemStm (LPHANDLE hMem, BOOL fInternalOnly = FALSE); + +STDAPI GetClassFileEx( LPCWSTR lpszFileName, + CLSID FAR *pcid, + REFCLSID clsidOle1); + +/*************************************************************************/ +/*** Initialization code for individual modules ***/ +/*************************************************************************/ + +INTERNAL_(void) DDEWEP ( + BOOL fSystemExit +); + +INTERNAL_(BOOL) DDELibMain ( + HANDLE hInst, + WORD wDataSeg, + WORD cbHeapSize, + LPWSTR lpszCmdLine +); + +BOOL InitializeRunningObjectTable(void); + +HRESULT GetObjectFromRotByPath( + WCHAR *pwszPath, + IUnknown **ppvUnk); + +void DestroyRunningObjectTable(void); + + +/************************************************************************** + 'lindex' related macros +***************************************************************************/ + +#define DEF_LINDEX (-1) + +//+------------------------------------------------------------------------- +// +// Function: IsValidLINDEX +// +// Synopsis: Tests for valid combination of aspect and lindex +// +// Arguments: [dwAspect] -- aspect (part of FORMATETC) +// [lindex] -- lindex (part of FORMATETC) +// +// Returns: TRUE for valid lindex, else FALSE +// +// History: 20-Jun-94 AlexT Created +// +// Notes: Here is the spec for lindex values: +// +// dwAspect lindex values +// -------- ------------- +// DVASPECT_CONTENT -1 +// DVASPECT_DOCPRINT anything +// DVASPECT_ICON -1 +// DVASPECT_THUMBNAIL -1 +// +// So, we test for lindex == -1 or aspect == DOCPRINT +// +//-------------------------------------------------------------------------- + +inline BOOL IsValidLINDEX(DWORD dwAspect, LONG lindex) +{ + return((DEF_LINDEX == lindex) || (DVASPECT_DOCPRINT == dwAspect)); +} + +//+------------------------------------------------------------------------- +// +// Function: HasValidLINDEX +// +// Synopsis: Tests for valid combination of aspect and lindex +// +// Arguments: [pFormatEtc] -- pFormatEtc to test +// +// Returns: TRUE for valid lindex, else FALSE +// +// History: 20-Jun-94 AlexT Created +// +// Notes: See IsValidLINDEX, above +// +//-------------------------------------------------------------------------- + +inline BOOL HasValidLINDEX(FORMATETC const *pFormatEtc) +{ + return(IsValidLINDEX(pFormatEtc->dwAspect, pFormatEtc->lindex)); +} + +#define INIT_FORETC(foretc) { \ + (foretc).ptd = NULL; \ + (foretc).lindex = DEF_LINDEX; \ + (foretc).dwAspect = DVASPECT_CONTENT; \ +} + +// Only DDE layer will test for these values. And only for advises on cached +// formats do we use these values + +#define ADVFDDE_ONSAVE 0x40000000 +#define ADVFDDE_ONCLOSE 0x80000000 + + + + +// Used in Ole Private Stream +typedef enum tagOBJFLAGS +{ + OBJFLAGS_LINK=1L, + OBJFLAGS_DOCUMENT=2L, // this bit is owned by container and is + // propogated through saves + OBJFLAGS_CONVERT=4L, +} OBJFLAGS; + + +/***************************************** + Prototypes for dde\client\ddemnker.cpp +******************************************/ + +INTERNAL DdeBindToObject + (LPCOLESTR szFile, + REFCLSID clsid, + BOOL fPackageLink, + REFIID iid, + LPLPVOID ppv); + +INTERNAL DdeIsRunning + (CLSID clsid, + LPCOLESTR szFile, + LPBC pbc, + LPMONIKER pmkToLeft, + LPMONIKER pmkNewlyRunning); + + +/************************************** + Prototypes for moniker\mkparse.cpp +***************************************/ + +INTERNAL Ole10_ParseMoniker + (LPMONIKER pmk, + LPOLESTR FAR* pszFile, + LPOLESTR FAR* pszItem); + +STDAPI CreateOle1FileMoniker(LPWSTR, REFCLSID, LPMONIKER FAR*); + +/****************************************************************************/ +/* Utility APIs, might get exposed later */ +/****************************************************************************/ + +STDAPI OleGetData(LPDATAOBJECT lpDataObj, LPFORMATETC pformatetcIn, + LPSTGMEDIUM pmedium, BOOL fGetOwnership); +STDAPI OleSetData(LPDATAOBJECT lpDataObj, LPFORMATETC pformatetc, + STGMEDIUM FAR * pmedium, BOOL fRelease); +STDAPI OleDuplicateMedium(LPSTGMEDIUM lpMediumSrc, LPSTGMEDIUM lpMediumDest); + +STDAPI_(BOOL) OleIsDcMeta (HDC hdc); + +STDAPI SzFixNet( LPBINDCTX pbc, LPOLESTR szUNCName, LPOLESTR FAR * lplpszReturn, + UINT FAR * pEndServer, BOOL fForceConnection = TRUE); + +FARINTERNAL ReadFmtUserTypeProgIdStg + (IStorage FAR * pstg, + CLIPFORMAT FAR* pcf, + LPOLESTR FAR* pszUserType, + LPOLESTR szProgID); + +//+------------------------------------------------------------------------- +// +// Function: IsWOWProcess(), BOOL inline +// +// Synopsis: Tests whether or not we are running in a WOW process +// +// Returns: TRUE if in WOW process, FALSE otherwise +// +// Algorithm: +// +// History: dd-mmm-yy Author Comment +// 15-Nov-95 murthys created +// +// Notes: +// +//-------------------------------------------------------------------------- + +inline BOOL IsWOWProcess() +{ + return (BOOL) ( NULL == g_pOleThunkWOW ? FALSE : TRUE ); +} + +//+------------------------------------------------------------------------- +// +// Function: IsWOWThread(), BOOL inline +// +// Synopsis: Tests whether or not we are running in a 16-bit thread in a +// WOW process +// +// Returns: TRUE if in 16-bit thread in a WOW process, FALSE otherwise +// +// Algorithm: +// +// History: dd-mmm-yy Author Comment +// 15-Nov-95 murthys created +// +// Notes: +// +//-------------------------------------------------------------------------- + +BOOLEAN TLSIsWOWThread(); + +inline BOOL IsWOWThread() +{ + return (BOOL) ( IsWOWProcess() ? TLSIsWOWThread(): FALSE ); +} + +//+------------------------------------------------------------------------- +// +// Function: IsWOWThreadCallable(), BOOL inline +// +// Synopsis: Tests whether or not we can call into OLETHK32. +// +// Returns: TRUE if WOW thread is callable, FALSE if not +// +// Algorithm: Tests the g_pOleThunkWOW pointer to see if it is non-zero +// and not set to -1. -1 means we are in wow, but OLETHK32 +// has already been unloaded. Also, checks to see if we're in +// amidst a DLL_THREAD_DETACH. We will not allow calls to 16-bit +// side in this case as it may have already been cleaned up. +// +// History: dd-mmm-yy Author Comment +// 19-mar-95 KevinRo Created +// 15-Nov-95 MurthyS Renamed from IsWowCallable +// 29-Jan-95 MurthyS Added check for DLL_THREAD_DETACH +// +// Notes: +// Assumes that IsWOWThread() was called and returned TRUE! +// +//-------------------------------------------------------------------------- + +BOOLEAN TLSIsThreadDetaching(); + +inline BOOL IsWOWThreadCallable() +{ + return (BOOL) (( NULL == g_pOleThunkWOW ? FALSE : + ( INVALID_HANDLE_VALUE == g_pOleThunkWOW ? FALSE:TRUE)) && + !(TLSIsThreadDetaching())); +} + +/****************************************************************************/ +/* Stabilization classes */ +/* These are used to stabilize objects during re-entrant calls */ +/****************************************************************************/ + +#ifndef CO_E_RELEASED +#define CO_E_RELEASED -2147467246L +#endif + +//+------------------------------------------------------------------------- +// +// Class: CSafeRefCount +// +// Purpose: A concrete class for objects like the default handler to +// inherit from. CSafeRefCount will keep track of reference +// counts, nesting counts, and zombie states, allowing objects +// to easily manage the liveness of their memory images. +// +// Interface: +// +// History: dd-mmm-yy Author Comment +// 01-Aug-94 alexgo author +// 23-Jan-95 t-ScottH added Dump method (_DEBUG only) +// +// Notes: inherits CPrivAlloc +// +//-------------------------------------------------------------------------- + +class CSafeRefCount : public CPrivAlloc +{ +public: + ULONG SafeAddRef(); + ULONG SafeRelease(); + ULONG IncrementNestCount(); + ULONG DecrementNestCount(); + BOOL IsZombie(); + #ifdef _DEBUG + HRESULT Dump(char **ppszDumpOA, ULONG ulFlag, int nIndentLevel); + #endif // _DEBUG + + CSafeRefCount(); + virtual ~CSafeRefCount(); // this virtual destructor MUST be here + // even though it does no work. + // it is needed to fire derived obj's destructors + +private: + + ULONG m_cRefs; + ULONG m_cNest; + BOOL m_fInDelete; +}; + +//+------------------------------------------------------------------------- +// +// Class: CStabilize +// +// Purpose: An instance of this class should be allocated on the +// stack of every object method that makes an outgoing call. +// The contstructor takes a pointer to the object's base +// CSafeRefCount class. +// +// Interface: +// +// History: dd-mmm-yy Author Comment +// 01-Aug-94 alexgo author +// +// Notes: The constructor will increment the nest count of the +// object while the destructor will decrement it. +// +//-------------------------------------------------------------------------- + +class CStabilize +{ +public: + inline CStabilize( CSafeRefCount *pObjSafeRefCount ); + inline ~CStabilize(); + +private: + CSafeRefCount * m_pObjSafeRefCount; +}; + +inline CStabilize::CStabilize( CSafeRefCount *pObjSafeRefCount ) +{ + pObjSafeRefCount->IncrementNestCount(); + m_pObjSafeRefCount = pObjSafeRefCount; +} + +inline CStabilize::~CStabilize() +{ + m_pObjSafeRefCount->DecrementNestCount(); +} + +typedef void * IFBuffer; + +//+------------------------------------------------------------------------- +// +// Function: GetMarshalledInterfaceBuffer +// +// Synopsis: marshals the given interface into an allocated buffer. The +// buffer is returned +// +// Effects: +// +// Arguments: [refiid] -- the iid of the interface to marshal +// [punk] -- the IUnknown to marshal +// [pIFBuf] -- where to return the buffer +// +// Requires: +// +// Returns: HRESULT +// +// Signals: +// +// Modifies: +// +// Algorithm: calls CoMarshalInterface(MSHFLAGS_TABLESTRONG) +// +// History: dd-mmm-yy Author Comment +// 03-Dec-94 alexgo author +// +// Notes: +// +//-------------------------------------------------------------------------- + +HRESULT GetMarshalledInterfaceBuffer( REFIID riid, IUnknown *punk, IFBuffer + *pIFBuf); + +//+------------------------------------------------------------------------- +// +// Function: ReleaseMarshalledInterfaceBuffer +// +// Synopsis: releases the buffer allocated by GetMarshalledInterfaceBuffer +// +// Effects: +// +// Arguments: [IFBuf] -- the interface buffer to release +// +// Requires: +// +// Returns: HRESULT +// +// Signals: +// +// Modifies: +// +// Algorithm: calls CoReleaseMarshalData to undo the TABLE_STRONG +// marshalling +// +// History: dd-mmm-yy Author Comment +// 03-Dec-94 alexgo author +// +// Notes: +// +//-------------------------------------------------------------------------- + +HRESULT ReleaseMarshalledInterfaceBuffer( IFBuffer IFBuf ); + + +#define E_UNSPEC E_FAIL + +#include <widewrap.h> + +#include <stkswtch.h> +#include <shellapi.h> + +#ifdef WIN32 // REVIEW, just using this for tracking +# define OLE_E_NOOLE1 MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x00FE) +#endif // WIN32 + + +/***********************************************************************/ +/* Wrap mbstowcs and wcstombs which are unsafe to use */ +/* since they rely on crt.dll */ +/* */ +/* Note: cCh in both cases is the output buffer size, not a */ +/* string length. */ +/* */ +/***********************************************************************/ + +#define mbstowcs(x, y, z) DONT_USE_mbstowcs___USE_MultiByteToWideChar_INSTEAD +#define wcstombs(x, y, z) DONT_USE_wcstombs___USE_WideCharToMultiByte_INSTEAD + + + +//------------------------------------------------------------------ +// +// Dynamically Loaded System APIs +// +// OLEs implementations of these system APIs dynamically load the +// system DLLs. Since these are rarely used APIs we dynamically +// load them to reduce the load time of OLE32.DLL +// +// The implementations can be found in com\util\dynload.cxx +// +//------------------------------------------------------------------ + +// From MPR.DLL +#undef WNetGetConnection +#define WNetGetConnection(x,y,z) USE_OleWNetGetConnection_INSTEAD +DWORD OleWNetGetConnection(LPCWSTR lpLocalName, LPWSTR lpRemoteName, LPDWORD lpnLength); + +#ifndef _CHICAGO_ +#undef WNetGetUniversalName +#define WNetGetUniversalName(w,x,y,z) USE_OleWNetGetUniversalName_INSTEAD +DWORD OleWNetGetUniversalName(LPCWSTR szLocalPath, DWORD dwInfoLevel, LPVOID lpBuffer, LPDWORD lpBufferSize); +#endif + +// From SHELL32.DLL +#undef ExtractIcon +#define ExtractIcon(x,y,z) USE_OleExtractIcon_INSTEAD +HICON OleExtractIcon(HINSTANCE hInst, LPCWSTR lpszFileName, UINT nIconIndex); + +#undef ExtractAssociatedIcon +#define ExtractAssociatedIcon(x,y,z) USE_OleExtractAssociatedIcon_INSTEAD +HICON OleExtractAssociatedIcon(HINSTANCE hInst, LPCWSTR lpszFileName, LPWORD + pIndex); + +// From GDI32P.DLL +HBRUSH OleGdiConvertBrush(HBRUSH hbrush); +HBRUSH OleGdiCreateLocalBrush(HBRUSH hbrushRemote); + + +#undef SHGetFileInfo +#define SHGetFileInfo(v,w,x,y,z) USE_OleSHGetFileInfo_INSTEAD +DWORD OleSHGetFileInfo(LPCWSTR pszPath, DWORD dwFileAttributes, + SHFILEINFO FAR *psfi, UINT cbFileInfo, UINT uFlags); + +// HOOK OLE macros for wrapping interface pointers +#include <hkole32.h> + +// ---------------------------------------------------------------------------- +// API/Method trace output +// ---------------------------------------------------------------------------- + +#include <trace.hxx> + +#endif // _OLE2COM_H_ diff --git a/private/ole32/ih/ole2sp.h b/private/ole32/ih/ole2sp.h new file mode 100644 index 000000000..89d38f858 --- /dev/null +++ b/private/ole32/ih/ole2sp.h @@ -0,0 +1,411 @@ +/* ole2sp.h - semi-private info; only for test apps within the development group +*/ + +#if !defined( _OLE2SP_H_ ) +#define _OLE2SP_H_ + +#include <shellapi.h> + +// For MAC, M_PROLOG and M_EPILOG are macros which assist us in setting up the A5 +// world for a DLL when a method in the DLL is called from outside the DLL. + +#ifdef _MAC + +#define _MAX_PATH 260 + +#ifdef __cplusplus + +class CSetA5 +{ +public: + CSetA5 (ULONG savedA5){ A5save = SetA5(savedA5);} + ~CSetA5 (){ SetA5(A5save);} + +private: + ULONG A5save; +}; + +pascal long GetA5(void) = 0x2E8D; + +#define M_PROLOG(where) CSetA5 Dummy((where)->savedA5) +#define SET_A5 ULONG savedA5 +#define GET_A5() savedA5 = GetA5() + +// These macros assist Mac in manually saving/setting/restoring A5 in routines that contain +// goto's. + +#define A5_PROLOG(where) ULONG A5save = SetA5(where->savedA5) +#define RESTORE_A5() SetA5(A5save) + +// Lets MAC name our segments without ifdef's. + +#define NAME_SEG(x) + +#endif // ccplus + +#else + +#define M_PROLOG(where) +#define SET_A5 +#define GET_A5() +#define A5_PROLOG(where) +#define RESTORE_A5() +#define NAME_SEG(x) + +// +// By defining SEG(x) to code_seg(), we make #pragma SEG(x) a nop and +// eliminate lots of unknown pragma warnings... 02/18/94 +// + +#define SEG(x) code_seg() + +#define IGetProcAddress(a,b) GetProcAddress((a),(b)) + +#endif + + +#define ReportResult(a,b,c,d) ResultFromScode(b) + + +#ifdef WIN32 +#define MAP16(v16) +#define MAP32(v32) v32 +#define MAP1632(v16,v32) v32 +#else +#define MAP16(v16) v16 +#define MAP32(v32) +#define MAP1632(v16,v32) v16 +#endif + + +/****** Misc defintions ***************************************************/ + +#ifdef __TURBOC__ +#define implement struct huge +#else +#define implement struct +#endif +#define ctor_dtor private +#define implementations private +#define shared_state private + +// helpers for internal methods and functions which follow the same convention +// as the external ones + +#ifdef __cplusplus +#define INTERNALAPI_(type) extern "C" type +#else +#define INTERNALAPI_(type) type +#endif + +#define INTERNAL HRESULT +#define INTERNAL_(type) type +#define FARINTERNAL HRESULT FAR +#define FARINTERNAL_(type) type FAR +#define NEARINTERNAL HRESULT NEAR +#define NEARINTERNAL_(type) type NEAR + + + +//BEGIN REVIEW: We may not need all the following ones + +#define OT_LINK 1L +#define OT_EMBEDDED 2L +#define OT_STATIC 3L + + +//END REVIEW ..... + + +/****** Old Error Codes ************************************************/ + +#define S_OOM E_OUTOFMEMORY +#define S_BADARG E_INVALIDARG +#define S_BLANK E_BLANK +#define S_FORMAT E_FORMAT +#define S_NOT_RUNNING E_NOTRUNNING +#define E_UNSPEC E_FAIL + + + +/****** Macros for nested clases ******************************************/ + +/* To overcome problems with nested classes on MAC + * + * NC(a,b) is used to define a member function of a nested class: + * + * STDMETHODIMP_(type) NC(ClassName,NestedClassName)::MemberFunction(...) + * + * DECLARE_NC(a,b) is used within a class declaration to let a nested class + * access it container class: + * + * class ClassName { + * .............. + * + * class NestedClassName { + * ............. + * }; + * DECLARE_NC(ClassName,NestedClassName) + * .............. + * }; + */ + +#ifdef _MAC + +#define NESTED_CLASS(a,b) struct a##_##b +#define NC(a,b) a##__##b +#define NC1(a,b) a##_##b +#define DECLARE_NC(a,b) typedef a##::##b a##__##b; friend a##__##b; +#define DECLARE_NC2(a,b) typedef a##::a##_##b a##__##b; friend a##__##b; + +#else + +#define NC(a,b) a##::##b +#define DECLARE_NC(a,b) friend b; + +#endif + + +/****** More Misc defintions **********************************************/ + + +// LPLPVOID should not be made a typedef. typedef won't compile; worse +// within complicated macros the compiler generates unclear error messages +// +#define LPLPVOID void FAR * FAR * + +#define UNREFERENCED(a) ((void)(a)) + +#ifndef BASED_CODE +#ifdef WIN32 +#define BASED_CODE +#else +#define BASED_CODE __based(__segname("_CODE")) +#endif +#endif + + +/****** Standard IUnknown Implementation **********************************/ + +/* + * The following macro declares a nested class CUnknownImpl, + * creates an object of that class in the outer class, and + * declares CUnknownImpl to be a friend of the outer class. After + * writing about 20 class headers, it became evident that the + * implementation of CUnknownImpl was very similar in all cases, + * and this macro captures the similarity. The classname + * parameter is the name of the outer class WITHOUT the leading + * "C"; i.e., for CFileMoniker, classname is FileMoniker. + */ + +#define noError return NOERROR + +#ifdef _MAC + +#define STDUNKDECL(cclassname,classname) NESTED_CLASS(cclassname, CUnknownImpl):IUnknown { public: \ + NC1(cclassname,CUnknownImpl)( cclassname FAR * p##classname ) { m_p##classname = p##classname;} \ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPLPVOID ppvObj); \ + STDMETHOD_(ULONG,AddRef)(THIS); \ + STDMETHOD_(ULONG,Release)(THIS); \ + private: cclassname FAR* m_p##classname; }; \ + DECLARE_NC2(cclassname, CUnknownImpl) \ + NC(cclassname, CUnknownImpl) m_Unknown; + +#else // _MAC + +#define STDUNKDECL( ignore, classname ) implement CUnknownImpl:IUnknown { public: \ + CUnknownImpl( C##classname FAR * p##classname ) { m_p##classname = p##classname;} \ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPLPVOID ppvObj); \ + STDMETHOD_(ULONG,AddRef)(THIS); \ + STDMETHOD_(ULONG,Release)(THIS); \ + private: C##classname FAR* m_p##classname; }; \ + DECLARE_NC(C##classname, CUnknownImpl) \ + CUnknownImpl m_Unknown; +#endif + +/* + * The following macro implements all the methods of a nested + * CUnknownImpl class EXCEPT FOR QUERYINTERFACE. This macro was + * written after about 20 classes were written in which the + * implementations of CUnknownImpl were all the same. + */ + +#ifdef WIN32 + +#define STDUNKIMPL(classname) \ +STDMETHODIMP_(ULONG) NC(C##classname,CUnknownImpl)::AddRef( void ) \ +{ \ + InterlockedIncrement((LONG *)&m_p##classname->m_refs); \ + \ + return m_p##classname->m_refs; \ +} \ + \ +STDMETHODIMP_(ULONG) NC(C##classname,CUnknownImpl)::Release( void ) \ +{ \ + ULONG culRefs = 0; \ + \ + culRefs = InterlockedDecrement((LONG *)&m_p##classname->m_refs); \ + \ + if (culRefs == 0) \ + { \ + delete m_p##classname; \ + } \ + \ + return culRefs; \ +} + +#else + +#define STDUNKIMPL(classname) \ +STDMETHODIMP_(ULONG) NC(C##classname,CUnknownImpl)::AddRef( void ){ \ + return ++m_p##classname->m_refs; } \ +STDMETHODIMP_(ULONG) NC(C##classname,CUnknownImpl)::Release( void ){ \ + if (--m_p##classname->m_refs == 0) { delete m_p##classname; return 0; } \ + return m_p##classname->m_refs;} + +#endif // WIN32 + + +/* + * The following macro implements class::CUnknownImpl::QueryInterface IN + * THE SPECIAL CASE IN WHICH THE OUTER CLASS PRESENTS ONLY ONE INTERFACE + * OTHER THAN IUNKNOWN AND IDEBUG. This is not universally the case, + * but it is common enough that this macro will save time and space. + */ + +#ifdef _DEBUG +#define STDDEB_QI(classname) \ + if (IsEqualGUID(iidInterface, IID_IDebug)) \ + {*ppv = (void FAR *)&(m_p##classname->m_Debug); return 0;} else +#else +#define STDDEB_QI(classname) +#endif + +#ifdef WIN32 + +#define STDUNK_QI_IMPL(classname, interfacename) \ +STDMETHODIMP NC(C##classname,CUnknownImpl)::QueryInterface \ + (REFIID iidInterface, void FAR * FAR * ppv) \ +{ \ + HRESULT hres = S_OK; \ + \ + if (IsEqualIID(iidInterface,IID_IUnknown)) \ + { \ + *ppv = (void FAR *)&m_p##classname->m_Unknown; \ + AddRef(); \ + } \ + else if (IsEqualIID(iidInterface,IID_I##interfacename)) \ + { \ + *ppv = (void FAR *) &(m_p##classname->m_##classname); \ + m_p##classname->m_pUnkOuter->AddRef(); \ + } \ + else STDDEB_QI(classname) \ + { \ + *ppv = NULL; \ + hres = ResultFromScode(E_NOINTERFACE); \ + } \ + \ + return hres; \ +} + +#else + +STDMETHODIMP NC(C##classname,CUnknownImpl)::QueryInterface \ + (REFIID iidInterface, void FAR * FAR * ppv) { \ + if (IsEqualGUID(iidInterface,IID_IUnknown)) {\ + *ppv = (void FAR *)&m_p##classname->m_Unknown;\ + AddRef(); noError;\ + } else if (IsEqualGUID(iidInterface, IID_I##interfacename)) { \ + *ppv = (void FAR *) &(m_p##classname->m_##classname); \ + m_p##classname->m_pUnkOuter->AddRef(); return NOERROR; \ + } else \ + STDDEB_QI(classname) \ + {*ppv = NULL; return ResultFromScode(E_NOINTERFACE);} \ +} +#endif + + +/* + * The following macro implements the IUnknown methods inherited + * by the implementation of another interface. The implementation + * is simply to delegate all calls to m_pUnkOuter. Parameters: + * ocname is the outer class name, icname is the implementation + * class name. + * + */ + +#define STDUNKIMPL_FORDERIVED(ocname, icname) \ + STDMETHODIMP NC(C##ocname,C##icname)::QueryInterface \ +(REFIID iidInterface, LPLPVOID ppvObj) { \ + return m_p##ocname->m_pUnkOuter->QueryInterface(iidInterface, ppvObj);} \ + STDMETHODIMP_(ULONG) NC(C##ocname,C##icname)::AddRef(void) { \ + return m_p##ocname->m_pUnkOuter->AddRef(); } \ + STDMETHODIMP_(ULONG) NC(C##ocname,C##icname)::Release(void) { \ + return m_p##ocname->m_pUnkOuter->Release(); } + + +/****** Debug defintions **************************************************/ + +#include <debug.h> + + +/****** Other API defintions **********************************************/ + +// low level reg.dat access (in compobj.dll) +STDAPI CoGetInProcDll(REFCLSID rclsid, BOOL fServer, LPOLESTR lpszDll, int cbMax); +STDAPI CoGetLocalExe(REFCLSID rclsid, LPOLESTR lpszExe, int cbMax); +STDAPI CoGetPSClsid(REFIID iid, LPCLSID lpclsid); + + +// simpler alternatives to public apis +// WINOLEAPI_(int) StringFromGUID2(REFGUID rguid, LPOLESTR lpsz, int cbMax); +#define StringFromCLSID2(rclsid, lpsz, cbMax) \ + StringFromGUID2(rclsid, lpsz, cbMax) + +#define StringFromIID2(riid, lpsz, cbMax) \ + StringFromGUID2(riid, lpsz, cbMax) + +STDAPI_(int) Ole1ClassFromCLSID2(REFCLSID rclsid, LPOLESTR lpsz, int cbMax); +STDAPI_(BOOL) GUIDFromString(LPCOLESTR lpsz, LPGUID pguid); +STDAPI CLSIDFromOle1Class(LPCOLESTR lpsz, LPCLSID lpclsid, BOOL fForceAssign=FALSE); +STDAPI_(BOOL) CoIsHashedOle1Class(REFCLSID rclsid); +STDAPI CoOpenClassKey(REFCLSID clsid, HKEY FAR* lphkeyClsid); + + +// were public; now not +STDAPI SetDocumentBitStg(LPSTORAGE pStg, BOOL fDocument); +STDAPI GetDocumentBitStg(LPSTORAGE pStg); + + +INTERNAL CreateStandardMalloc(DWORD memctx, IMalloc FAR* FAR* ppMalloc); + + +/* + * Some docfiles stuff + */ + +#define STGM_DFRALL (STGM_READWRITE | STGM_TRANSACTED | STGM_SHARE_DENY_WRITE) +#define STGM_DFALL (STGM_READWRITE | STGM_TRANSACTED | STGM_SHARE_EXCLUSIVE) +#define STGM_SALL (STGM_READWRITE | STGM_SHARE_EXCLUSIVE) + + +/* + * Some moniker stuff + */ +//REVIEW32: Should this get exported publicly?? + +STDAPI Concatenate(LPMONIKER pmkFirst, LPMONIKER pmkRest, + LPMONIKER FAR * ppmkComposite ); + +/* + * Drag and Drop Interface Property Name + */ +#define OLE_DROP_TARGET_PROP L"OleDropTargetInterface" +#define OLE_DROP_TARGET_PROPA "OleDropTargetInterface" + +/* + * Private Clipboard Window IDataObject property name + */ +#define CLIPBOARD_DATA_OBJECT_PROP L"ClipboardDataObjectInterface" + +#endif // _OLE2SP_H_ diff --git a/private/ole32/ih/ole2ver.h b/private/ole32/ih/ole2ver.h new file mode 100644 index 000000000..6f4feff4d --- /dev/null +++ b/private/ole32/ih/ole2ver.h @@ -0,0 +1,15 @@ +/*****************************************************************************\ +* * +* ole2ver.h - OLE 2 Version Number Info * +* * +* Copyright (c) 1992-1993, Microsoft Corp. All rights reserved. * +* * +\*****************************************************************************/ + +#ifndef _OLE2VER_H_ +#define _OLE2VER_H_ + +#define rmm 23 +#define rup 639 + +#endif diff --git a/private/ole32/ih/olecoll.h b/private/ole32/ih/olecoll.h new file mode 100644 index 000000000..dbae67081 --- /dev/null +++ b/private/ole32/ih/olecoll.h @@ -0,0 +1,27 @@ +// Microsoft OLE library. +// Copyright (C) 1992 Microsoft Corporation, +// All rights reserved. + +// olecoll.h - global defines for collections and element definitions + +#ifndef __OLECOLL_H__ +#define __OLECOLL_H__ + + +// --------------------------------------------------------------------------- +// general defines for collections + +typedef void FAR* POSITION; + +#define BEFORE_START_POSITION ((POSITION)(ULONG)-1L) +#define _AFX_FP_OFF(thing) (*((UINT FAR*)&(thing))) +#define _AFX_FP_SEG(lp) (*((UINT FAR*)&(lp)+1)) + +#ifdef _DEBUG +#define ASSERT_VALID(p) p->AssertValid() +#else +#define ASSERT_VALID(p) +#endif + + +#endif //!__OLECOLL_H__ diff --git a/private/ole32/ih/olepfn.hxx b/private/ole32/ih/olepfn.hxx new file mode 100644 index 000000000..5b6ae14c2 --- /dev/null +++ b/private/ole32/ih/olepfn.hxx @@ -0,0 +1,39 @@ +//+--------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1992 - 1993. +// +// File: olepfn.hxx +// +// Contents: Extern declarations for some variables needed by +// CoQueryReleaseObject +// +// Classes: +// +// Functions: +// +// History: 8-15-94 kevinro Created +// +// This file contains a couple of extern declarations for variables required +// by a file in com\class. This is sort of hacky, but the idea is that +// each of these array entreis is going to be initialized to the address of a +// classes QueryInterface method. Rather than trying to determine the +// correct set of header files that are common across all of the files we +// need on of these variables for, I have put them all here. +// +//---------------------------------------------------------------------------- + +#ifndef __olepfn_hxx__ +#define __olepfn_hxx__ +#define QI_TABLE_CFileMoniker 0 +#define QI_TABLE_CExposedDocFile 1 +#define QI_TABLE_CCompositeMoniker 2 +#define QI_TABLE_CItemMoniker 3 +#define QI_TABLE_END 4 + +extern "C" DWORD adwQueryInterfaceTable[QI_TABLE_END]; + +STDAPI CoQueryReleaseObject(IUnknown *punk); +#endif // __olepfn_hxx__ + + diff --git a/private/ole32/ih/olerem.h b/private/ole32/ih/olerem.h new file mode 100644 index 000000000..4be14cf74 --- /dev/null +++ b/private/ole32/ih/olerem.h @@ -0,0 +1,165 @@ +//+------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1992 - 1995. +// +// File: olerem.h +// +// Synopsis: this file contain the base definitions for types and APIs +// exposed by the ORPC layer to upper layers. +// +//+------------------------------------------------------------------------- +#if !defined( _OLEREM_H_ ) +#define _OLEREM_H_ + +// default transport for same-machine communication +#ifdef _CHICAGO_ + #define LOCAL_PROTSEQ L"mswmsg" +#else + #define LOCAL_PROTSEQ L"ncalrpc" +#endif + + +// ----------------------------------------------------------------------- +// Interface for Handlers to acquire internal interfaces on the proxy mgr. +// +// NOTE: implemented as part of the std identity object +// +// ----------------------------------------------------------------------- +interface IInternalUnknown : public IUnknown +{ + STDMETHOD(QueryInternalInterface)(REFIID riid, void **ppv) = 0; +}; + +// ----------------------------------------------------------------------- +// Internal Interface used by handlers. +// +// NOTE: connect happens during unmarshal +// NOTE: implemented as part of the std identity object +// +// ----------------------------------------------------------------------- +interface IProxyManager : public IUnknown +{ + STDMETHOD(CreateServer)(REFCLSID rclsid, DWORD clsctx, void *pv) = 0; + STDMETHOD_(BOOL, IsConnected)(void) = 0; + STDMETHOD(LockConnection)(BOOL fLock, BOOL fLastUnlockReleases) = 0; + STDMETHOD_(void, Disconnect)(void) = 0; + STDMETHOD(CreateServerWithHandler)(REFCLSID rclsid, DWORD clsctx, void *pv, + REFCLSID rclsidHandler, IID iidSrv, void **ppv, + IID iidClnt, void *pClientSiteInterface) = 0; +}; + + +STDAPI GetInProcFreeMarshaler(IMarshal **ppIM); + + +// ----------------------------------------------------------------------- +// DCOM Only Stuff +// ----------------------------------------------------------------------- +#ifdef DCOM +#include <obase.h> // ORPC base definitions + +typedef const IPID &REFIPID; // reference to Interface Pointer IDentifier +typedef const OID &REFOID; // reference to Object IDentifier +typedef const OXID &REFOXID; // reference to Object Exporter IDentifier +typedef const MID &REFMID; // reference to Machine IDentifier + +typedef GUID MOXID; // OXID + MID +typedef const MOXID &REFMOXID; // reference to OXID + MID +typedef GUID MOID; // OID + MID +typedef const MOID &REFMOID; // reference to OID + MID + + +STDAPI CreateIdentityHandler(IUnknown *pUnkOuter, DWORD flags, + REFIID riid, void **ppv); + +#endif + +// ----------------------------------------------------------------------- +// non-DCOM Stuff +// ----------------------------------------------------------------------- +#ifndef DCOM + +#define FreeThreading FALSE + +INTERNAL CreateStdIdentity(IUnknown *pUnkOuter, IUnknown *pUnkControl, + IMarshal *pMarshal, REFIID riid, void **ppv); + +#ifndef OID_DEFINED +#define OID_DEFINED +typedef GUID OID; +#endif // OID_DEFINED + +typedef const GUID& REFOID; +#define OID_NULL GUID_NULL + +INTERNAL SkipMarshalExtension(IStream *pStm); + +// IRemoteHdlr : supported by RH piece of remoting system; not public + +interface IRemoteHdlr : public IUnknown +{ + // BUGBUG: may add GetServer to allow channel to get punk to hold + // during calls. + STDMETHOD_(struct IRpcChannelBuffer *, GetChannel)(BOOL fAddRef) = 0; + + // used during calls to ensure alive (only does anything on client side) + STDMETHOD_(ULONG, LockClient)(void) = 0; + STDMETHOD_(ULONG, UnLockClient)(void) = 0; + + // used during destruction of the identity object to clear the RH ptr. + STDMETHOD_(void, ClearIdentity)(void) = 0; + + // returns TRUE if iid is supported; like QueryInterface except no + // interface pointer returned; also works on both client and server sides. + STDMETHOD_(BOOL, DoesSupportIID)(REFIID riid) = 0; + + // add/subtract a reference or connection + STDMETHOD(AddConnection)(DWORD extconn, DWORD reserved) = 0; + STDMETHOD(ReleaseConnection)(DWORD extconn, DWORD reserved, BOOL fLastReleaseCloses) = 0; + + // isconnected, disconnect + STDMETHOD_(BOOL, IsConnected)(void) = 0; + STDMETHOD_(void, Disconnect)(void) = 0; + STDMETHOD(LockConnection)(BOOL fLock, BOOL fLastUnlockCloses) = 0; + + // Used by channel + STDMETHOD_(struct IRpcStubBuffer *, LookupStub)( REFIID, IUnknown **, HRESULT *phr ) = 0; + STDMETHOD_(void, FinishCall)( struct IRpcStubBuffer *, IUnknown * pUnkServer) = 0; + STDMETHOD_(void, GetObjectID)( OID * ) = 0; +}; + +// NOTE: connect happens during unmarshal +// NOTE: creation is currently by direct invocation: "new CRemoteHdlr(...)" + +// Identity Object / interface + +interface IStdIdentity : public IUnknown +{ + STDMETHOD_(void, GetObjectID)(OID *pOid) = 0; + STDMETHOD_(IUnknown *, GetServer)(BOOL fAddRef) = 0; + STDMETHOD_(void, RevokeObjectID)() = 0; + STDMETHOD_(IMarshal *, GetStdRemMarshal)() = 0; + STDMETHOD(AddConnection)(DWORD extconn, DWORD reserved) = 0; + STDMETHOD(ReleaseConnection)(DWORD extconn, DWORD reserved, BOOL fLastReleaseCloses) = 0; + STDMETHOD_(ULONG,ReleaseKeepAlive)(IUnknown *pUnkToRelease, DWORD reserved) = 0; +}; + +INTERNAL LookupIDFromUnk(IUnknown *pUnk, BOOL fCreate, IStdIdentity **ppStdId); +INTERNAL LookupIDFromID(REFOID oid, BOOL fAddRef, IStdIdentity **ppStdId); + +#define PSTDMARSHAL ((IMarshal *)1) + +STDAPI CreateIdentityHandler(IUnknown *pUnkOuter, IMarshal *pMarshal, + REFIID riid, void **ppv); + +#endif // not DCOM + + +#ifdef _CHICAGO_ +#include <..\com\idl\chicago\iface.h> +#else +#include <iface.h> +#endif + +#endif // _OLEREM_H diff --git a/private/ole32/ih/olesem.hxx b/private/ole32/ih/olesem.hxx new file mode 100644 index 000000000..a19f8ade0 --- /dev/null +++ b/private/ole32/ih/olesem.hxx @@ -0,0 +1,305 @@ +///+--------------------------------------------------------------------------- +// +// File: olesem.hxx +// +// Contents: Semaphore classes for use in OLE code +// +// Classes: COleStaticMutexSem - Mutex semaphore class for statically +// allocated objects +// COleDebugMutexSem - Mutex semaphore class for statically +// allocated objects that are not destructed +// on DLL unload (and thus are leaks..used +// for trace packages and such). +// +// History: 14-Dec-95 Jeffe Initial entry, derived from +// sem32.hxx by AlexT. +// +// Notes: This module defines a set of classes to wrap WIN32 +// Critical Sections. +// +// Note the distinction of allocation class: the reason for this +// is to avoid static constructors and destructors. +// +// The classes in this module *must* be used for mutex semaphores +// that are statically allocated. Use the classes in sem32.hxx +// for dynamically allocated (from heap or on the stack) objects. +// +//---------------------------------------------------------------------------- + +#ifndef __OLESEM_HXX__ +#define __OLESEM_HXX__ + +extern "C" +{ +#include <windows.h> +}; + + + +// +// List of initialized static mutexes (which must be destroyed +// during DLL exit). We know that PROCESS_ATTACH and PROCESS_DETACH +// are thread-safe, so we don't protect this list with a critical section. +// + +class COleStaticMutexSem; + +extern COleStaticMutexSem * g_pInitializedStaticMutexList; + + +// +// Critical section used to protect the creation of other semaphores +// + +extern CRITICAL_SECTION g_OleMutexCreationSem; + + + +#if DBG + +// +// DLL states used to ensure we don't use the wrong type of +// semaphore at the wrong time +// + +typedef enum _DLL_STATE_ { + DLL_STATE_STATIC_CONSTRUCTING = 0, + DLL_STATE_NORMAL, + DLL_STATE_STATIC_DESTRUCTING, + + DLL_STATE_COUNT + +} DLL_STATE, * PDLL_STATE; + +// +// Flag used to indicate if we're past executing the C++ constructors +// during DLL initialization +// + +extern DLL_STATE g_fDllState; + +#endif + + + +//+--------------------------------------------------------------------------- +// +// Class: COleStaticMutexSem (mxs) +// +// Purpose: This class defines a mutual exclusion semaphore for use in +// objects that are statically allocated (extern or static storage +// class). +// +// Interface: FastRequest - acquire semaphore an already-initialized +// semaphore +// Request - acquire semaphore +// Release - release semaphore +// ReleaseFn - release semaphore (non inline version) +// +// History: 14-Dec-95 JeffE Initial entry. +// +// Notes: This class must NOT be used in dynamically allocated objects! +// +// This class uses the fact that static objects are initialized +// by C++ to all zeroes. +// +//---------------------------------------------------------------------------- + + +class COleStaticMutexSem { +public: + +#if DBG + + COleStaticMutexSem(); + +#endif + + // This pointer *must* be the first member in this class + + class COleStaticMutexSem * pNextMutex; + BOOLEAN _fInitialized; + BOOLEAN _fAutoDestruct; + + void Init(); + void Destroy(); + inline void FastRequest(); + void Request(); + inline void Release(); +#ifdef _CHICAGO_ + // This is present for rpccall.asm which cannot use the inline version + void ReleaseFn(); +#endif + + // The following definition *should* be private...but C-10 insists on supplying + // an empty constructor if we use it. Since it doesn't really matter, we just + // don't use it in retail builds. + +#if DBG +private: +#endif + + CRITICAL_SECTION _cs; + +}; + +#if DBG==1 + +//+--------------------------------------------------------------------------- +// +// Class: COleDebugMutexSem (mxs) +// +// Purpose: This class defines a mutual exclusion semaphore for use in +// objects that are statically allocated (extern or static storage +// class) but are not destructed when the DLL unloads. +// +// Interface: FastRequest - acquire semaphore an already-initialized +// semaphore +// Request - acquire semaphore +// Release - release semaphore +// +// History: 14-Dec-95 JeffE Initial entry. +// +// Notes: This class must only be used in staticly allocated objects! +// +// This class may only be used in CHECKED builds...since it doesn't +// clean up after itself on DLL unload. +// +//---------------------------------------------------------------------------- + + +class COleDebugMutexSem : public COleStaticMutexSem { + +public: + + COleDebugMutexSem(); + +}; + +#endif // DBG==1 + + +//+--------------------------------------------------------------------------- +// +// Class: COleStaticLock (lck) +// +// Purpose: Lock using a static (or debug) Mutex Semaphore +// +// History: 02-Oct-91 BartoszM Created. +// +// Notes: Simple lock object to be created on the stack. +// The constructor acquires the semaphor, the destructor +// (called when lock is going out of scope) releases it. +// +//---------------------------------------------------------------------------- + +class COleStaticLock +{ + +public: + COleStaticLock ( COleStaticMutexSem& mxs ); + ~COleStaticLock (); + +private: + COleStaticMutexSem& _mxs; +}; + + +//+--------------------------------------------------------------------------- +// +// Member: COleStaticMutexSem::FastRequest +// +// Synopsis: Acquire the semaphore without checking to see if it's +// initialized. If another thread already has it, +// wait until it is released. +// +// History: 14-Dec-1995 Jeffe +// +// Notes: You may only use this method on code paths where you're +// *certain* the semaphore has already been initialized (either +// by invoking Init, or by calling the Request method). +// +//---------------------------------------------------------------------------- + +inline void COleStaticMutexSem::FastRequest() +{ + Win4Assert (_fInitialized && "You must use Request here, not FastRequest"); + EnterCriticalSection (&_cs); +} + + + +//+--------------------------------------------------------------------------- +// +// Member: COleStaticMutexSem::Release +// +// Synopsis: Release the semaphore. +// +// History: 14-Dec-1995 Jeffe +// +//---------------------------------------------------------------------------- + +inline void COleStaticMutexSem::Release() +{ + LeaveCriticalSection (&_cs); +} + + +#if DBG + +//+--------------------------------------------------------------------------- +// +// Member: COleStaticMutexSem::COleStaticMutexSem +// +// Synopsis: Debug constructor: ensure we weren't allocated dynamically. +// +// History: 14-Dec-1995 Jeffe +// +//---------------------------------------------------------------------------- + +inline COleStaticMutexSem::COleStaticMutexSem() +{ + Win4Assert (g_fDllState == DLL_STATE_STATIC_CONSTRUCTING); +} + + +#endif + + + +//+--------------------------------------------------------------------------- +// +// Member: COleStaticLock::COleStaticLock +// +// Synopsis: Acquire semaphore +// +// History: 02-Oct-91 BartoszM Created. +// +//---------------------------------------------------------------------------- + +inline COleStaticLock::COleStaticLock ( COleStaticMutexSem& mxs ) +: _mxs ( mxs ) +{ + _mxs.Request(); +} + +//+--------------------------------------------------------------------------- +// +// Member: COleStaticLock::~COleStaticLock +// +// Synopsis: Release semaphore +// +// History: 02-Oct-91 BartoszM Created. +// +//---------------------------------------------------------------------------- + +inline COleStaticLock::~COleStaticLock () +{ + _mxs.Release(); +} + + +#endif // _OLESEM_HXX + + + diff --git a/private/ole32/ih/oletemp.h b/private/ole32/ih/oletemp.h new file mode 100644 index 000000000..85730ba8b --- /dev/null +++ b/private/ole32/ih/oletemp.h @@ -0,0 +1,6 @@ +// for OleCreateEmbeddingHelper flags; roles in low word; options in high word +#define EMBDHLP_INPROC_HANDLER 0x0000L +#define EMBDHLP_INPROC_SERVER 0x0001L +#define EMBDHLP_CREATENOW 0x00000000L +#define EMBDHLP_DELAYCREATE 0x00010000L + diff --git a/private/ole32/ih/osift.hxx b/private/ole32/ih/osift.hxx new file mode 100644 index 000000000..6371e2880 --- /dev/null +++ b/private/ole32/ih/osift.hxx @@ -0,0 +1,29 @@ +//+--------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1992 - 1993. +// +// File: osift.hxx +// +// Contents: Definition of server side sift object +// +// Functions: DbgDllSetSiftObject - sets up global sift pointer +// +// History: 6-01-94 t-chripi Created +// +//---------------------------------------------------------------------------- + +#ifndef __OSIFT_HXX__ + +#define __OSIFT_HXX__ + +#include <sift.hxx> + +extern ISift *g_psftSiftObject; + +#define SIMULATE_FAILURE( dwRes ) \ + ((NULL != g_psftSiftObject) && \ + (g_psftSiftObject->SimFail( ( dwRes ) ))) \ + +#endif // __OSIFT_HXX__ + diff --git a/private/ole32/ih/perfmnce.hxx b/private/ole32/ih/perfmnce.hxx new file mode 100644 index 000000000..7e189531b --- /dev/null +++ b/private/ole32/ih/perfmnce.hxx @@ -0,0 +1,119 @@ +//+--------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1992 - 1994. +// +// File: perfmnce.hxx +// +// Contents: +// +// Classes: +// +// Functions: +// +// History: 3-06-95 JohannP (Johann Posch) Created +// +//---------------------------------------------------------------------------- + +#ifdef _PERF_BUILD_ +#ifndef _PERFORMANCE_DEFINED_ +#define _PERFORMANCE_DEFINED_ + + +typedef struct perfdata +{ + WORD wPos; + char szName[32]; + LARGE_INTEGER liStart; + LARGE_INTEGER liEnd; +} PerfData; + +typedef struct perflist +{ + UINT cElements; + PerfData rgPerfData[32]; +} PerfRg, *PPerfRg; + + +extern PerfRg perfrg; +typedef enum +{ + DebugTerminal = 1, + Consol = 2, + OleStream, + SzStr, +} PrintDestination; + + +#undef INTERFACE +#define INTERFACE IPerformance +DECLARE_INTERFACE_(IPerformance, IUnknown) +{ + // *** IUnknown methods *** + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + // *** IPerformance methods *** + STDMETHOD (Init) (THIS_ ) PURE; + STDMETHOD (Print) (THIS_ DWORD PrntDest) PURE; + STDMETHOD (Reset) (THIS_ ) PURE; +}; +typedef IPerformance FAR* LPPerformance, *PPerformance; + + + +#define _Perf_LoadLibraryOle 0 +#define _Perf_OleInitialize 1 +#define _Perf_CoInitialize 2 +#define _Perf_ChannelProcessInit 3 +#define _Perf_ChannelThreadInit 4 +#define _Perf_CreateFileMap 5 +#define _Perf_CreateFileMapConvert 6 +#define _Perf_CheckAndStartScm 7 +#define _Perf_EndScm 8 +#define _Perf_ISLClassCacheList 9 +#define _Perf_ISLCreateAllocator 10 +#define _Perf_ISLInProcList 11 +#define _Perf_ISLLocSrvList 12 +#define _Perf_ISLScmRot 13 +#define _Perf_InitClassCache 14 +#define _Perf_InitRot 15 +#define _Perf_InitSharedLists 16 +#define _Perf_MDFDllMain 17 +#define _Perf_ServiceListen 18 +#define _Perf_ShrdTbl 19 +#define _Perf_StartScm 20 +#define _Perf_StartScmX1 21 +#define _Perf_StartScmX2 22 +#define _Perf_StartScmX3 23 +#define _Perf_ThreadInit 24 +#define _Perf_CoUnitialzie 25 +#define _Perf_DllMain 26 +#define _Perf_RpcService 27 +#define _Perf_RpcListen 28 +#define _Perf_RpcReqProtseq 29 +#define _Perf_ChannelControl 30 +#define _Perf_27 31 + +#define StartPerfCounter(x) \ + QueryPerformanceCounter(&perfrg.rgPerfData[_Perf_##x].liStart); +#define EndPerfCounter(x) \ + QueryPerformanceCounter(&perfrg.rgPerfData[_Perf_##x].liEnd); + +STDAPI CoGetPerformance(PPerformance *ppPerformance); + +#endif // _PERFORMANCE_DEFINED_ +#else // !_PERF_BUILD_ + +#define StartPerfCounter(x) +#define EndPerfCounter(x) +#define CoGetPerformance(x ) + +#endif // !_PERF_BUILD_ + + + + + + diff --git a/private/ole32/ih/plex.h b/private/ole32/ih/plex.h new file mode 100644 index 000000000..ce460cad4 --- /dev/null +++ b/private/ole32/ih/plex.h @@ -0,0 +1,28 @@ +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and Microsoft +// QuickHelp documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +#ifndef __PLEX_H__ +#define __PLEX_H__ + +struct FAR CPlex // warning variable length structure +{ + CPlex FAR* pNext; + UINT nMax; + UINT nCur; + /* BYTE data[maxNum*elementSize]; */ + + INTERNAL_(void FAR*) data() { return this+1; } + + static INTERNAL_(CPlex FAR*) Create(CPlex FAR* FAR& head, UINT nMax, UINT cbElement); + + INTERNAL_(void) FreeDataChain(); // free this one and links +}; + +#endif //__PLEX_H__ diff --git a/private/ole32/ih/privguid.h b/private/ole32/ih/privguid.h new file mode 100644 index 000000000..86938b14a --- /dev/null +++ b/private/ole32/ih/privguid.h @@ -0,0 +1,239 @@ +//+------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1992 - 1996. +// +// File: privguid.h +// +// Contents: This file is the master definition of all OLE2 product +// GUIDs (public and private). All GUIDs used by the ole2 +// product are of the form: +// +// xxxxxxxx-xxxx-xxxY-C000-000000000046 +// +// This range is broken down as follows: +// +// 000000xx-0000-0000-C000-000000000046 compobj IIDs +// 000001xx-0000-0000-C000-000000000046 ole2 IIDs +// 000002xx-0000-0000-C000-000000000046 16bit ole2 smoke test +// 000003xx-0000-0000-C000-000000000046 ole2 CLSIDs +// 000004xx-0000-0000-C000-000000000046 ole2 sample apps (see DouglasH) +// +// Other interesting ranges are as follows: +// +// 0003xxxx-0000-0000-C000-000000000046 ole1 CLSIDs (ole1cls.h) +// 0004xxxx-0000-0000-C000-000000000046 hashed ole1 CLSIDs +// +// +// +// Classes: +// +// Functions: +// +// History: +// 24-Oct-94 BruceMa Added this file header +// 24-Oct-94 BruceMa Added IMallocSpy +// +// Notes: +// +//-------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////// +// Range 0x000 - 0x0ff : compobj IIDs - +// IID_IUnknown, 0x00000000L +// IID_IClassFactory, 0x00000001L +// IID_IMalloc, 0x00000002L +// IID_IMarshal, 0x00000003L + +// IID_ILockBytes, 0x0000000aL +// IID_IStorage, 0x0000000bL +// IID_IStream, 0x0000000cL +// IID_IEnumSTATSTG, 0x0000000dL + +// IID_IBindCtx, 0x0000000eL +// IID_IMoniker, 0x0000000fL +// IID_IRunningObjectTable, 0x00000010L +// IID_IInternalMoniker, 0x00000011L + +// IID_IRootStorage, 0x00000012L +// IID_IDfReserved1, 0x00000013L +// IID_IDfReserved2, 0x00000014L +// IID_IDfReserved3, 0x00000015L + +// IID_IMessageFilter, 0x00000016L + +// CLSID_StdMarshal, 0x00000017L + +// IID_IStdMarshalInfo, 0x00000018L + +// IID_IExternalConnection, 0x00000019L + +// IID_IWeakRef, 0x0000001aL + +/* interface for subpieces of standard remoting */ +DEFINE_OLEGUID(IID_IStdIdentity, 0x0000001bL, 0, 0); +DEFINE_OLEGUID(IID_IRemoteHdlr, 0x0000001cL, 0, 0); + +// IID_IMallocSpyf, 0x0000001dL, 0, 0); + +// IID_ITrackingMoniker, 0x0000001eL + +// IID_IMultiQI, 0x00000020L + +DEFINE_OLEGUID(IID_IInternalUnknown, 0x00000021L, 0, 0); + +// IID_ISurrogate, 0x00000022L, 0, 0); + +/* NOTE: LSB values 0x23 through 0xff are unused */ + +//////////////////////////////////////////////////////////////////////////// +// Range 0x100 - 0x1ff : upper layer IIDs - +// IID_IEnumUnknown, 0x00000100L +// IID_IEnumString, 0x00000101L +// IID_IEnumMoniker, 0x00000102L +// IID_IEnumFORMATETC, 0x00000103L +// IID_IEnumOLEVERB, 0x00000104L +// IID_IEnumSTATDATA, 0x00000105L + +// IID_IEnumGeneric, 0x00000106L +// IID_IEnumHolder, 0x00000107L +// IID_IEnumCallback, 0x00000108L + +// IID_IPersistStream, 0x00000109L +// IID_IPersistStorage, 0x0000010aL +// IID_IPersistFile, 0x0000010bL +// IID_IPersist, 0x0000010cL + +// IID_IViewObject, 0x0000010dL +// IID_IDataObject, 0x0000010eL +// IID_IAdviseSink, 0x0000010fL +// IID_IDataAdviseHolder, 0x00000110L +// IID_IOleAdviseHolder, 0x00000111L + +// IID_IOleObject, 0x00000112L +// IID_IOleInPlaceObject, 0x00000113L +// IID_IOleWindow, 0x00000114L +// IID_IOleInPlaceUIWindow, 0x00000115L +// IID_IOleInPlaceFrame, 0x00000116L +// IID_IOleInPlaceActiveObject, 0x00000117L + +// IID_IOleClientSite, 0x00000118L +// IID_IOleInPlaceSite, 0x00000119L + +// IID_IParseDisplayName, 0x0000011aL +// IID_IOleContainer, 0x0000011bL +// IID_IOleItemContainer, 0x0000011cL + +// IID_IOleLink, 0x0000011dL +// IID_IOleCache, 0x0000011eL +// IID_IOleManager, 0x0000011fL +// IID_IOlePresObj, 0x00000120L + +// IID_IDropSource, 0x00000121L +// IID_IDropTarget, 0x00000122L + +// IID_IDebug, 0x00000123L +// IID_IDebugStream, 0x00000124L + +// IID_IAdviseSink2, 0x00000125L + +// IID_IRunnableObject, 0x00000126L + +// IID_IViewObject2, 0x00000127L +// IID_IOleCache2, 0x00000128L +// IID_IOleCacheControl, 0x00000129L +// IID_IContinue, 0x0000012AL + +// IID_IDocConnect, 0x00000130L +// IID_IRemUnknown, 0x00000131L +// IID_IObjServer, 0x00000132L +// IID_IOSCM, 0x00000133L +// IID_IRundown, 0x00000134L +// IID_InterfaceFromWindowProp, 0x00000135L +// IID_IDSCM 0x00000136L +// IID_ISCMSCM 0x00000137L + +/* NOTE: LSB values 0x2a through 0xff are unused */ + +// IID_IPropertyStorage, 0x00000138L +// IID_IEnumSTATPROPSTG, 0x00000139L +// IID_IPropertySetStorage, 0x0000013AL +// IID_IEnumSTATPROPSETSTG, 0x0000013BL + +// IID_IRemoteUnknown2, 0x0000013CL +// IID_INonNDRStub, 0x0000013DL +DEFINE_OLEGUID(IID_INonNDRStub, 0x0000013DL, 0, 0); + + +// IID_IClientSecurity 0x0000013DL +// IID_IServerSecurity 0x0000013EL +// +// IID_IMacDragHelper 0x0000013FL + +// IID_IClassActivator 0x00000140L +// IID_IDLLHost 0x00000141L + +// Range 0x180 - 0x18F is reserved for the category interfaces. +// IID_? 0x00000180L +// IID_? 0x00000181L +// IID_? 0x00000182L +// IID_? 0x00000183L +// IID_? 0x00000184L +// IID_? 0x00000185L +// IID_? 0x00000186L +// IID_? 0x00000187L +// IID_? 0x00000188L +// IID_? 0x00000189L +// IID_? 0x0000018AL +// IID_? 0x0000018BL +// IID_? 0x0000018CL +// IID_? 0x0000018DL +// IID_? 0x0000018EL +// IID_? 0x0000018FL + + +// BUGBUG: this will be shortly removed (until binaries using +// these values are not in use. +DEFINE_OLEGUID(IID_IPropertyStorage_Old, 0x66600014, 0, 8); +DEFINE_OLEGUID(IID_IEnumSTATPROPSTG_Old, 0x66600015, 0, 8); +DEFINE_OLEGUID(IID_IPropertySetStorage_Old, 0x66650000L, 0, 8); +DEFINE_OLEGUID(IID_IEnumSTATPROPSETSTG_Old, 0x66650001L, 0, 8); + + +//////////////////////////////////////////////////////////////////////////// +// Range 0x300 - 0x3ff : internal CLSIDs +DEFINE_OLEGUID(CLSID_StdOleLink, 0x00000300, 0, 0); +DEFINE_OLEGUID(CLSID_StdMemStm, 0x00000301, 0, 0); +DEFINE_OLEGUID(CLSID_StdMemBytes, 0x00000302, 0, 0); +DEFINE_OLEGUID(CLSID_FileMoniker, 0x00000303, 0, 0); +DEFINE_OLEGUID(CLSID_ItemMoniker, 0x00000304, 0, 0); +DEFINE_OLEGUID(CLSID_AntiMoniker, 0x00000305, 0, 0); +DEFINE_OLEGUID(CLSID_PointerMoniker, 0x00000306, 0, 0); +// NOT TO BE USED 0x00000307, 0, 0); +DEFINE_OLEGUID(CLSID_PackagerMoniker, 0x00000308, 0, 0); +DEFINE_OLEGUID(CLSID_CompositeMoniker, 0x00000309, 0, 0); +// NOT TO BE USED 0x0000030a, 0, 0); +// NOT TO BE USED (was CLSID_DfMarshal) 0x0000030b, 0, 0); + +// NOT TO BE USED 0x30c - 0x315 - old PS CLSID's + +// CLSID_Picture_Metafile, 0x00000315 +// CLSID_Picture_Dib, 0x00000316 + +DEFINE_OLEGUID(CLSID_RemoteHdlr, 0x00000317, 0, 0); +DEFINE_OLEGUID(CLSID_RpcChannelBuffer, 0x00000318, 0, 0); +// CLSID_Picture_EnhMetafile,0x00000319 +DEFINE_OLEGUID(CLSID_ClassMoniker, 0x0000031A, 0, 0); +DEFINE_OLEGUID(CLSID_ErrorObject, 0x0000031B, 0, 0); +DEFINE_OLEGUID(ERROR_EXTENSION, 0x0000031C, 0, 0); + +DEFINE_OLEGUID(CLSID_PSOlePrx32, 0x00000320, 0, 0); +DEFINE_OLEGUID(IID_ITrackingMoniker, 0x00000321, 0, 0); + +DEFINE_OLEGUID(CLSID_ServerHandler, 0x00020322, 0, 0); +DEFINE_OLEGUID(CLSID_ClientSiteHandler, 0x00020323, 0, 0); +DEFINE_OLEGUID(CLSID_PSDispatch, 0x00020420, 0, 0); + +/* NOTE: LSB values 0x1a through 0xff are unused */ + +DEFINE_OLEGUID(IID_IHookOleObject, 0x0002AD11, 0, 0); diff --git a/private/ole32/ih/privoa.h b/private/ole32/ih/privoa.h new file mode 100644 index 000000000..452df6eda --- /dev/null +++ b/private/ole32/ih/privoa.h @@ -0,0 +1,59 @@ +//+--------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1992 - 1996. +// +// File: privoa.h +// +// Contents: Definitions for OleAut32.dll wrappers +// +// Classes: +// +// Functions: PrivSysAllocString +// PrivSysFreeString +// PrivSysReAllocStringLen +// PrivSysStringLen +// +// History: 20-Jun-96 MikeHill Created. +// +// Notes: +// This file has macros, function prototypes, and global +// externs that enable the OleAut32 wrapper functions. +// These functions load OleAut32.dll if necessary, and forward +// the call. +// +//---------------------------------------------------------------------------- + +#ifndef _PRIV_OA_H_ +#define _PRIV_OA_H_ + +// OleAut32 function prototypes + +typedef BSTR (STDAPICALLTYPE SYS_ALLOC_STRING)(OLECHAR FAR* pwsz); +typedef VOID (STDAPICALLTYPE SYS_FREE_STRING)(BSTR bstr); +typedef BOOL (STDAPICALLTYPE SYS_REALLOC_STRING_LEN)(BSTR* pbstr, OLECHAR* pch, UINT cch); +typedef UINT (STDAPICALLTYPE SYS_STRING_BYTE_LEN)(BSTR bstr); + +// The Wrapper routines, and function pointers for them. + +SYS_ALLOC_STRING LoadSysAllocString; +EXTERN_C SYS_ALLOC_STRING *pfnSysAllocString; + +SYS_FREE_STRING LoadSysFreeString; +EXTERN_C SYS_FREE_STRING *pfnSysFreeString; + +SYS_REALLOC_STRING_LEN LoadSysReAllocStringLen; +EXTERN_C SYS_REALLOC_STRING_LEN *pfnSysReAllocStringLen; + +SYS_STRING_BYTE_LEN LoadSysStringByteLen; +EXTERN_C SYS_STRING_BYTE_LEN *pfnSysStringByteLen; + +// Macros to ease the calling of the above function pointers + +#define PrivSysAllocString(pwsz) (*pfnSysAllocString)(pwsz) +#define PrivSysFreeString(bstr) (*pfnSysFreeString)(bstr) +#define PrivSysReAllocStringLen(pbstr,olestr,ui) \ + (*pfnSysReAllocStringLen)(pbstr, olestr, ui) +#define PrivSysStringByteLen(pbstr) (*pfnSysStringByteLen)(pbstr) + +#endif // ! _PRIV_OA_H_ diff --git a/private/ole32/ih/resource.h b/private/ole32/ih/resource.h new file mode 100644 index 000000000..e61bf3721 --- /dev/null +++ b/private/ole32/ih/resource.h @@ -0,0 +1,10 @@ +#define CURNONE 1 +#define CURMOVE 2 +#define CURCOPY 3 +#define CURLINK 4 +#define CURSCROLLMOVE 5 +#define CURSCROLLCOPY 6 +#define CURSCROLLLINK 7 + +// used by "..\src\def\geticon.c" +#define DEFICON 8 diff --git a/private/ole32/ih/rothint.hxx b/private/ole32/ih/rothint.hxx new file mode 100644 index 000000000..6ce287b0d --- /dev/null +++ b/private/ole32/ih/rothint.hxx @@ -0,0 +1,124 @@ +//+------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1992 - 1993. +// +// File: rothint.hxx +// +// Contents: Base class for ROT hint table used in NT +// +// History: 24-Jan-95 Ricksa Created +// +//-------------------------------------------------------------------------- +#ifndef __ROTHINT_HXX__ +#define __ROTHINT_HXX__ + +// Size of the hint table and size of the SCM's hash table for the ROT. +#define SCM_HASH_SIZE 251 + +// Name of hint table for non-NT1X +#define ROTHINT_NAME L"RotHintTable" + +#ifndef _CHICAGO_ + +//+------------------------------------------------------------------------- +// +// Class: CRotHintTable (rht) +// +// Purpose: Base class for hint table shared between SCM and OLE32. +// It is designed to abstract what is fundamental an array +// of on/off switches. +// +// Interface: SetIndicator - set indicator byte +// ClearIndicator - clear indicator byte +// GetIndicator - get indicator byte. +// +// History: 24-Jan-93 Ricksa Created +// +// Notes: +// +//-------------------------------------------------------------------------- +class CRotHintTable +{ +public: + CRotHintTable(void); + + void SetIndicator(DWORD dwOffset); + + void ClearIndicator(DWORD dwOffset); + + BOOL GetIndicator(DWORD dwOffset); + +protected: + + // This memory is allocated by the derived class. + // The SCM actually creates the memory while the + // client just opens the memory. + BYTE * _pbHintArray; +}; + + + +//+------------------------------------------------------------------------- +// +// Member: CRotHintTable::CRotHintTable +// +// Synopsis: Initialize object +// +// History: 24-Jan-95 Ricksa Created +// +//-------------------------------------------------------------------------- +inline CRotHintTable::CRotHintTable(void) : _pbHintArray(NULL) +{ + // Header does all the work +} + + +//+------------------------------------------------------------------------- +// +// Member: CRotHintTable::SetIndicator +// +// Synopsis: Turn switch on +// +// History: 24-Jan-95 Ricksa Created +// +//-------------------------------------------------------------------------- +inline void CRotHintTable::SetIndicator(DWORD dwOffset) +{ + _pbHintArray[dwOffset] = TRUE; +} + +//+------------------------------------------------------------------------- +// +// Member: CRotHintTable::ClearIndicator +// +// Synopsis: Turn switch off +// +// History: 24-Jan-95 Ricksa Created +// +//-------------------------------------------------------------------------- +inline void CRotHintTable::ClearIndicator(DWORD dwOffset) +{ + _pbHintArray[dwOffset] = FALSE; +} + + +//+------------------------------------------------------------------------- +// +// Member: CRotHintTable::GetIndicator +// +// Synopsis: Get the state of the switch +// +// History: 24-Jan-95 Ricksa Created +// +//-------------------------------------------------------------------------- +inline BOOL CRotHintTable::GetIndicator(DWORD dwOffset) +{ + return _pbHintArray[dwOffset]; +} + + + +#endif // !_CHICAGO_ + +#endif // __ROTHINT_HXX__ diff --git a/private/ole32/ih/stkswtch.h b/private/ole32/ih/stkswtch.h new file mode 100644 index 000000000..8a86e8e80 --- /dev/null +++ b/private/ole32/ih/stkswtch.h @@ -0,0 +1,200 @@ +//+--------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1992 - 1994. +// +// File: stkswtch.h +// +// Contents: Stack Switching proto types and macros +// +// Classes: +// +// Functions: +// +// History: 12-10-94 JohannP (Johann Posch) Created +// +//---------------------------------------------------------------------------- +#ifndef _STKSWTCH_ +#define _STKSWTCH_ + +#ifdef _CHICAGO_ + +extern "C" DWORD NEAR _cdecl SSCall(DWORD cbParamBytes, + DWORD flags, + LPVOID lpfnProcAddress, + DWORD param1,...); + + +#define SSF_BigStack 1 +#define SSF_SmallStack 0 +extern "C" BOOL WINAPI SSOnBigStack(VOID); + +DECLARE_DEBUG(Stack) +#define DEB_STCKSWTCH DEB_USER1 +#define SSOnSmallStack() (!SSOnBigStack()) +#if DBG==1 + +extern BOOL fSSOn; +#define SSONBIGSTACK() (fSSOn && IsWOWThread() && SSOnBigStack()) +#define SSONSMALLSTACK() (fSSOn && IsWOWThread() && !SSOnBigStack()) +#define StackAssert(x) ((fSSOn && IsWOWThread())? Win4Assert(x): TRUE) +#define StackDebugOut(x) StackInlineDebugOut x + +#else + +#define SSONBIGSTACK() (IsWOWThread() && SSOnBigStack()) +#define SSONSMALLSTACK() (IsWOWThread() && !SSOnBigStack()) +#define StackAssert(x) +#define StackDebugOut(x) + +#endif + +LRESULT WINAPI SSSendMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); +BOOL WINAPI SSReplyMessage(LRESULT lResult); +LRESULT WINAPI SSCallWindowProc(WNDPROC lpPrevWndFunc, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); +LRESULT WINAPI SSDefWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); +BOOL WINAPI SSPeekMessage(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax,UINT wRemoveMsg); +BOOL WINAPI SSGetMessage(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax); +LONG WINAPI SSDispatchMessage(CONST MSG *lpMsg); +BOOL WINAPI SSWaitMessage(VOID); +BOOL WINAPI SSDirectedYield(HTASK htask); +int WINAPI SSDialogBoxParam(HINSTANCE hInstance, LPCSTR lpTemplateName, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam); +int WINAPI SSDialogBoxIndirectParam(HINSTANCE hInstance, LPCDLGTEMPLATEA hDialogTemplate, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam); + +#define SSDialogBox(a,b,c,d) \ + SSDialogBoxParam(a,b,c,d, 0L) +#define SSDialogBoxIndirect(a,b,c,d) \ + SSDialogBoxIndirectParam(a,b,c,d,e, 0L) + +HWND WINAPI SSCreateWindowExA(DWORD dwExStyle, + LPCSTR lpClassName,LPCSTR lpWindowName, + DWORD dwStyle,int X,int Y,int nWidth,int nHeight, + HWND hWndParent ,HMENU hMenu,HINSTANCE hInstance, + LPVOID lpParam); + +HWND WINAPI SSCreateWindowExW(DWORD dwExStyle, + LPCWSTR lpClassName,LPCWSTR lpWindowName, + DWORD dwStyle, int X, int Y, int nWidth,int nHeight, + HWND hWndParent ,HMENU hMenu,HINSTANCE hInstance, + LPVOID lpParam); + +BOOL WINAPI SSDestroyWindow(HWND hWnd); +int WINAPI SSMessageBox(HWND hWnd,LPCSTR lpText,LPCSTR lpCaption, UINT uType); + +BOOL WINAPI SSOpenClipboard(HWND hWndNewOwner); +BOOL WINAPI SSCloseClipboard(VOID); +HWND WINAPI SSGetClipboardOwner(VOID); +HANDLE WINAPI SSSetClipboardData(UINT uFormat,HANDLE hMem); +HANDLE WINAPI SSGetClipboardData(UINT uFormat); +UINT WINAPI SSRegisterClipboardFormatA(LPCSTR lpszFormat); +UINT WINAPI SSEnumClipboardFormats(UINT format); +int WINAPI SSGetClipboardFormatNameA(UINT format,LPSTR lpszFormatName,int cchMaxCount); +BOOL WINAPI SSEmptyClipboard(VOID); +BOOL WINAPI SSIsClipboardFormatAvailable(UINT format); + + + +#undef SendMessage +#undef ReplyMessage +#undef CallWindowProc +#undef DefWindowProc +#undef PeekMessage +#undef GetMessage +#undef DispatchMessage +#undef WaitMessage +#undef DialogBoxParam +#undef DialogBoxIndirectParam +#undef CreateWindowExA +#undef CreateWindowExW +#undef DestroyWindow +#undef MessageBox +// +#undef OpenClipboard +#undef CloseClipboard +#undef GetClipboardOwner +#undef SetClipboardData +#undef RegisterClipboardFormatA +#undef EnumClipboardFormats +#undef GetClipboardFormatNameA +#undef EmptyClipboard +#undef IsClipboardFormatAvailable + +// Define all user APIs to an undefined function to +// force an compiling error. + +#define SS_STOP_STR USE_SS_API_INSTEAD /* error: Stack Switching: Please use SSxxx APIS! */ +#define SendMessage( hWnd, Msg, wParam, lParam) SS_STOP_STR +#define ReplyMessage( lResult) SS_STOP_STR +#define CallWindowProc( lpPrevWndFunc, hWnd, Msg, wParam, lParam) SS_STOP_STR +#define DefWindowProc( hWnd, Msg, wParam, lParam) SS_STOP_STR +#define PeekMessage( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg) SS_STOP_STR +#define GetMessage( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax) SS_STOP_STR +#define DispatchMessage( lpMsg) SS_STOP_STR +#define WaitMessage() SS_STOP_STR +#define DialogBoxParam( hInstance, lpTemplateName, hWndParent, lpDialogFunc, dwInitParam) SS_STOP_STR +#define DialogBoxIndirectParam( hInstance, hDialogTemplate, hWndParent, lpDialogFunc, dwInitParam) SS_STOP_STR +#define CreateWindowExA( dwExStyle, lpClassName, lpWindowName, dwStyle, X, Y, nWidth, nHeight, hWndParent , hMenu, hInstance, lpParam) SS_STOP_STR +#define CreateWindowExW( dwExStyle, lpClassName, lpWindowName, dwStyle, X, Y, nWidth, nHeight, hWndParent , hMenu, hInstance, lpParam) SS_STOP_STR +#define DestroyWindow( hWnd) SS_STOP_STR +#define MessageBox( hWnd, lpText, lpCaption, uType) SS_STOP_STR +// +#define OpenClipboard( hWndNewOwner) SS_STOP_STR +#define CloseClipboard() SS_STOP_STR +#define GetClipboardOwner() SS_STOP_STR +#define SetClipboardData( uFormat, hMem) SS_STOP_STR +#define RegisterClipboardFormatA(lpszFormat) SS_STOP_STR +#define EnumClipboardFormats( format) SS_STOP_STR +#define GetClipboardFormatNameA( format, lpszFormatName, cchMaxCount) SS_STOP_STR +#define EmptyClipboard() SS_STOP_STR +#define IsClipboardFormatAvailable( format) SS_STOP_STR + +#else // ! _CHICAGO + +// For non-chicago platrforms: define all SSxxx APIs +// back to the original user api + +#define SSSendMessage SendMessage +#define SSReplyMessage ReplyMessage +#define SSCallWindowProc CallWindowProc +#define SSDefWindowProc DefWindowProc +#define SSPeekMessage PeekMessage +#define SSGetMessage GetMessage +#define SSDispatchMessage DispatchMessage +#define SSWaitMessage WaitMessage +#define SSDirectedYield DirectedYield +#define SSDialogBoxParam DialogBoxParam +#define SSDialogBoxIndirectParam DialogBoxIndirectParam +#define SSCreateWindowExA CreateWindowExA +#define SSCreateWindowExW CreateWindowExW +#define SSDestroyWindow DestroyWindow +#define SSMessageBox MessageBox + +#define SSOpenClipboard OpenClipboard +#define SSCloseClipboard CloseClipboard +#define SSGetClipboardOwner GetClipboardOwner +#define SSSetClipboardData SetClipboardData +#define SSGetClipboardData GetClipboardData +#define SSRegisterClipboardFormatA RegisterClipboardFormatA +#define SSEnumClipboardFormats EnumClipboardFormats +#define SSGetClipboardFormatNameA GetClipboardFormatNameA +#define SSEmptyClipboard EmptyClipboard +#define SSIsClipboardFormatAvailable IsClipboardFormatAvailable + + +#endif // _CHICAGO_ + +#ifdef _CHICAGO_ + +#define SSAPI(x) SS##x + +#else + +#define SSAPI(x) x +#define StackDebugOut(x) +#define StackAssert(x) +#define SSOnSmallStack() + +#endif // _CHICAGO_ + +#endif // _STKSWTCH_ + diff --git a/private/ole32/ih/thkreg.h b/private/ole32/ih/thkreg.h new file mode 100644 index 000000000..316284f06 --- /dev/null +++ b/private/ole32/ih/thkreg.h @@ -0,0 +1,27 @@ +//+------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1992 - 1993. +// +// File: thkreg.cxx +// +// Contents: Contains constants used to read the registry for modifiable +// WOW behavior for OLE. +// +// History: 22-Jul-94 Ricksa Created +// 09-Jun-95 Susia Chicago optimization added +// +//-------------------------------------------------------------------------- +#ifndef _THKREG_H_ +#define _THKREG_H_ + + +// Name of key for OLE WOW special behavior +#define OLETHK_KEY TEXT("OleCompatibility") +// Factor by which to slow duration of WOW RPC calls +#define OLETHK_SLOWRPCTIME_VALUE TEXT("SlowRpcTimeFactor") + +// Default factor to slow duration of WOW RPC calls +#define OLETHK_DEFAULT_SLOWRPCTIME 4 + +#endif // _THKREG_H_ diff --git a/private/ole32/ih/thunkapi.hxx b/private/ole32/ih/thunkapi.hxx new file mode 100644 index 000000000..44ca0e9ba --- /dev/null +++ b/private/ole32/ih/thunkapi.hxx @@ -0,0 +1,142 @@ +//+--------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1992 - 1993. +// +// File: thunkapi.hxx +// +// Contents: Defines interfaces and methods for use by the WOW thunking +// system. This is intended as a private interface between +// OLE32 and the WOW thunking layer. +// +// Classes: OleThunkWOW +// +// Functions: +// +// History: 3-15-94 kevinro Created +// +//---------------------------------------------------------------------------- +#ifndef __thunkapi_hxx__ +#define __thunkapi_hxx__ + + +// +// ThunkManager interface +// +interface IThunkManager : public IUnknown +{ + // *** IUnknown methods *** + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + // *** IThunkManager methods *** + STDMETHOD_(BOOL, IsIIDRequested) (THIS_ REFIID rrid) PURE; + STDMETHOD_(BOOL, IsCustom3216Proxy) (THIS_ IUnknown *punk, + REFIID riid) PURE; +}; + + +// +// The following sets up an interface between OLE32 +// and the WOW thunking system. This interface is intended to be private +// between OLE32 and the WOW thunk layer. +// + +class OleThunkWOW +{ +public: + + STDMETHOD(LoadProcDll)( LPCTSTR pszDllName, + LPDWORD lpvpfnGetClassObject, + LPDWORD lpvpfnCanUnloadNow, + LPDWORD lpvhmodule ); + + STDMETHOD(UnloadProcDll)( DWORD vhmodule ); + + + STDMETHOD(CallGetClassObject)( DWORD vpfnGetClassObject, + REFCLSID rclsid, + REFIID riid, + LPVOID FAR *ppv ); + + STDMETHOD(CallCanUnloadNow)( DWORD vpfnCanUnloadNow ); + STDMETHOD(GetThunkManager)( IThunkManager **pThkMgr); + + // Used to launch OLE 1.0 servers when we're in Wow + STDMETHOD(WinExec16)(LPCOLESTR pszCommandLine, USHORT usShow); + + // + // Called by the DDE code to convert incoming HWND's from + // 16 bit HWND's into 32-bit HWND's. + // + STDMETHOD_(HWND,ConvertHwndToFullHwnd)(HWND hwnd); + + // + // Called by the DDE code to delete a metafile + // + STDMETHOD_(BOOL,FreeMetaFile)(HANDLE hmf); + + // Called by Call Control to guarantee that a Yield happens + // when running in Wow. + STDMETHOD(YieldTask16)(void); + + // Call Control Directed Yeild + STDMETHOD(DirectedYield)(DWORD dwCalleeTID); + + // Called by OLE32 when it is shutting down (done on a per thread basis) + STDMETHOD_(void,PrepareForCleanup)(void); + + STDMETHOD_(DWORD,GetAppCompatibilityFlags)(void); +}; + +typedef OleThunkWOW *LPOLETHUNKWOW,OLETHUNKWOW; + +// +// OLE Thunk Application Compatability flags +// + +#define OACF_CLIENTSITE_REF 0x80000000 // IOleObject::GetClientSite not ref'd + // Bug in Excel 5.0a +#define OACF_RESETMENU 0x40000000 // IOleInPlaceFrame::RemoveMenu didn't + // do a OleSetMenuDescriptor(NULL). +#define OACF_USEGDI 0x20000000 // Word 6 thinks bitmaps and palette + // objects are HGLOBALs, but they + // are really GDI objects. We'll patch + // this up for them. +// +// The following flag is set in olethunk\h\interop.hxx because it is used by +// 16-bit binaries. +// OACF_CORELTRASHMEM 0x10000000 // CorelDraw relies on the fact that +// // OLE16 trashed memory during paste- +// // link. Therefore, we'll go ahead +// // and trash it for them if this +// // flag is on. + +// +// The original OLE32 version of the stdid table didn't clean up properly. Some apps cannot +// handle the stdid calling after CoUninitialize. This flag prevents the stdid from doing so. +// Word 6.0c is an example of this. +// + +#define OACF_NO_UNINIT_CLEANUP 0x02000000 // Do not cleanup interfaces on CoUninitialize + +#define OACF_IVIEWOBJECT2 0x01000000 // use IViewObject2 instead IViewObject + + + + + +// +// The following three routines are exported from OLE32.DLL, and +// are called only by the WOW thunk layer. +// + +STDAPI CoInitializeWOW( LPMALLOC vlpmalloc, LPOLETHUNKWOW lpthk ); +STDAPI CoUnloadingWOW(BOOL fProcessDetach); +STDAPI OleInitializeWOW( LPMALLOC vlpmalloc, LPOLETHUNKWOW lpthk ); +STDAPI DllGetClassObjectWOW( REFCLSID rclsid, REFIID riid, LPVOID *ppv ); + +extern void SetOleThunkWowPtr(LPOLETHUNKWOW lpthk); + +#endif // diff --git a/private/ole32/ih/tls.h b/private/ole32/ih/tls.h new file mode 100644 index 000000000..7d676347c --- /dev/null +++ b/private/ole32/ih/tls.h @@ -0,0 +1,367 @@ +//+--------------------------------------------------------------------------- +// +// File: tls.hxx +// +// Purpose: manage thread local storage for OLE +// +// Notes: The gTlsIndex is initialized at process attach time. +// The per-thread data is allocated in CoInitialize in +// single-threaded apartments or on first use in +// multi-threaded apartments. +// +// The non-inline routines are in ..\com\class\tls.cxx +// +// History: 16-Jun-94 BruceMa Don't decrement 0 thread count +// 17-Jun-94 Bradloc Added punkState for VB94 +// 20-Jun-94 Rickhi Commented better +// 06-Jul-94 BruceMa Support for CoGetCurrentProcess +// 19-Jul-94 CraigWi Removed TLSGetEvent (used cache instead) +// 21-Jul-94 AlexT Add TLSIncOleInit, TLSDecOleInit +// 21-Aug-95 ShannonC Removed TLSSetMalloc, TLSGetMalloc +// 06-Oct-95 Rickhi Simplified. Made into a C++ class. +// 01-Feb-96 Rickhi On Nt, access TEB directly +// 30-May-96 ShannonC Add punkError +// +//---------------------------------------------------------------------------- +#ifndef _TLS_HXX_ +#define _TLS_HXX_ + + +#include <rpc.h> // UUID + + +//+--------------------------------------------------------------------------- +// +// forward declarations (in order to avoid type casting when accessing +// data members of the SOleTlsData structure). +// +//+--------------------------------------------------------------------------- + +class CAptCallCtrl; // see callctrl.hxx +class CSrvCallState; // see callctrl.hxx +class CRemoteUnknown; // see remoteu.hxx +class CObjServer; // see sobjact.hxx +class CSmAllocator; // see stg\h\smalloc.hxx +class CChannelCallInfo; // see chancont.hxx + + +#ifdef _CHICAGO_ +// Chicago uses the Thread Local Storage APIs +extern DWORD gTlsIndex; // global Index for TLS +#endif // _CHICAGO_ + + +//+--------------------------------------------------------------------------- +// +// Enum: OLETLSFLAGS +// +// Synopsys: bit values for dwFlags field of SOleTlsData. If you just want +// to store a BOOL in TLS, use this enum and the dwFlag field. +// +//+--------------------------------------------------------------------------- +typedef enum tagOLETLSFLAGS +{ + OLETLS_LOCALTID = 0x01, // This TID is in the current process. + OLETLS_UUIDINITIALIZED = 0x02, // This Logical thread is init'd. + OLETLS_INTHREADDETACH = 0x04, // This is in thread detach. Needed + // due to NT's special thread detach rules. + OLETLS_CHANNELTHREADINITIALZED = 0x08, // This channel has been init'd + OLETLS_WOWTHREAD = 0x10, // This thread is a 16-bit WOW thread. + OLETLS_THREADUNINITIALIZING = 0x20, // This thread is in CoUninitialize. + OLETLS_DISABLE_OLE1DDE = 0x40, // This thread can't use a DDE window. + OLETLS_APARTMENTTHREADED = 0x80, // This is an STA apartment thread + OLETLS_MULTITHREADED = 0x100 // This is an MTA apartment thread +} OLETLSFLAGS; + + +//+--------------------------------------------------------------------------- +// +// Structure: SOleTlsData +// +// Synopsis: structure holding per thread state needed by OLE32 +// +//+--------------------------------------------------------------------------- +typedef struct tagSOleTlsData +{ +#if !defined(_CHICAGO_) + // Docfile multiple allocator support + void *pvThreadBase; // per thread base pointer + CSmAllocator *pSmAllocator; // per thread docfile allocator +#endif + + DWORD dwApartmentID; // Per thread "process ID" + DWORD dwFlags; // see OLETLSFLAGS above + + // counters + DWORD cComInits; // number of per-thread inits + DWORD cOleInits; // number of per-thread OLE inits +#if DBG==1 + LONG cTraceNestingLevel; // call nesting level for OLETRACE +#endif + + + // Object RPC data + UUID LogicalThreadId; // current logical thread id + DWORD dwTIDCaller; // TID of current calling app + ULONG fault; // fault value + LONG cORPCNestingLevel; // call nesting level (DBG only) +#ifdef DCOM + CChannelCallInfo *pCallInfo; // channel call info + DWORD cDebugData; // count of bytes of debug data in call + void *pOXIDEntry; // ptr to OXIDEntry for this thread. + CObjServer *pObjServer; // Activation Server Object. + CRemoteUnknown *pRemoteUnk; // CRemUnknown for this thread. + CAptCallCtrl *pCallCtrl; // new call control for RPC + CSrvCallState *pTopSCS; // top server-side callctrl state + IMessageFilter *pMsgFilter; // temp storage for App MsgFilter + ULONG cPreRegOidsAvail; // count of server-side OIDs avail + unsigned hyper *pPreRegOids; // ptr to array of pre-reg OIDs + IUnknown *pCallContext; // call context object + DWORD dwAuthnLevel; // security level of current call +#else + void * pChanCtrl; // channel control + void * pService; // per-thread service object + void * pServiceList; + void * pCallCont; // call control + void * pDdeCallCont; // dde call control + void * pCALLINFO; // callinfo + DWORD dwEndPoint; // endpoint id +#ifdef _CHICAGO_ + HWND hwndOleRpcNotify; +#endif +#endif // DCOM + + // DDE data + HWND hwndDdeServer; // Per thread Common DDE server + HWND hwndDdeClient; // Per thread Common DDE client + + + // upper layer data + HWND hwndClip; // Clipboard window + IUnknown *punkState; // Per thread "state" object +#ifdef WX86OLE + IUnknown *punkStateWx86; // Per thread "state" object for Wx86 +#endif + void *pDragCursors; // Per thread drag cursor table. + +#ifdef _CHICAGO_ + LPVOID pWcstokContext; // Scan context for wcstok +#endif + + IUnknown *punkError; // Per thread error object. + ULONG cbErrorData; // Maximum size of error data. +} SOleTlsData; + + + +//+--------------------------------------------------------------------------- +// +// class COleTls +// +// Synopsis: class to abstract thread-local-storage in OLE. +// +// Notes: To use Tls in OLE, functions should define an instance of +// this class on their stack, then use the -> operator on the +// instance to access fields of the SOleTls structure. +// +// There are two instances of the ctor. One just Assert's that +// the SOleTlsData has already been allocated for this thread. Most +// internal code should use this ctor, since we can assert that if +// the thread made it this far into our code, tls has already been +// checked. +// +// The other ctor will check if SOleTlsData exists, and attempt to +// allocate and initialize it if it does not. This ctor will +// return an HRESULT. Functions that are entry points to OLE32 +// should use this version. +// +//+--------------------------------------------------------------------------- +class COleTls +{ +public: + COleTls(); + COleTls(HRESULT &hr); + COleTls(BOOL fDontAllocateIfNULL); + + // to get direct access to the data structure + SOleTlsData * operator->(void) { return _pData; } + + BOOL IsNULL() { return (_pData == NULL) ? TRUE : FALSE; } + +private: + + HRESULT TLSAllocData(); // allocates an SOleTlsData structure + + SOleTlsData * _pData; // ptr to OLE TLS data +}; + + +#ifndef _CHICAGO_ +//+--------------------------------------------------------------------------- +// +// Method: COleTls::COleTls +// +// Synopsis: ctor for OLE Tls object. +// +// Notes: Most internal code should use this version of the ctor, +// assuming that some outer-layer function has already verified +// the existence of the tls_data. +// +//+--------------------------------------------------------------------------- +inline COleTls::COleTls() +{ + _pData = (SOleTlsData *) NtCurrentTeb()->ReservedForOle; + Win4Assert(_pData && "Illegal attempt to use TLS before Initialized"); +} + +//+--------------------------------------------------------------------------- +// +// Method: COleTls::COleTls +// +// Synopsis: ctor for OLE Tls object. +// +// Notes: Special version for CoUninitialize which will not allocate +// (or assert) if the TLS is NULL. It can then be checked with +// IsNULL member function. +// +//+--------------------------------------------------------------------------- +inline COleTls::COleTls(BOOL fDontAllocateIfNULL) +{ + _pData = (SOleTlsData *) NtCurrentTeb()->ReservedForOle; +} + +//+--------------------------------------------------------------------------- +// +// Method: COleTls::COleTls +// +// Synopsis: ctor for OLE Tls object. +// +// Notes: Peripheral OLE code that can not assume that some outer-layer +// function has already verified the existence of the SOleTlsData +// structure for the current thread should use this version of +// the ctor. +// +//+--------------------------------------------------------------------------- +inline COleTls::COleTls(HRESULT &hr) +{ + _pData = (SOleTlsData *) NtCurrentTeb()->ReservedForOle; + if (_pData) + hr = S_OK; + else + hr = TLSAllocData(); +} + +#else // _CHICAGO_ versions + +//+--------------------------------------------------------------------------- +// +// Method: COleTls::COleTls +// +// Synopsis: ctor for OLE Tls object. +// +// Notes: Most internal code should use this version of the ctor, +// assuming that some outer-layer function has already verified +// the existence of the tls_data. +// +//+--------------------------------------------------------------------------- +inline COleTls::COleTls() +{ + _pData = (SOleTlsData *) TlsGetValue(gTlsIndex); + Win4Assert(_pData && "Illegal attempt to use TLS before Initialized"); +} + +//+--------------------------------------------------------------------------- +// +// Method: COleTls::COleTls +// +// Synopsis: ctor for OLE Tls object. +// +// Notes: Special version for CoUninitialize which will not allocate +// (or assert) if the TLS is NULL. It can then be checked with +// IsNULL member function. +// +//+--------------------------------------------------------------------------- +inline COleTls::COleTls(BOOL fDontAllocateIfNULL) +{ + _pData = (SOleTlsData *) TlsGetValue(gTlsIndex); +} + +//+--------------------------------------------------------------------------- +// +// Method: COleTls::COleTls +// +// Synopsis: ctor for OLE Tls object. +// +// Notes: Peripheral OLE code that can not assume that some outer-layer +// function has already verified the existence of the SOleTlsData +// structure for the current thread should use this version of +// the ctor. +// +//+--------------------------------------------------------------------------- +inline COleTls::COleTls(HRESULT &hr) +{ + _pData = (SOleTlsData *) TlsGetValue(gTlsIndex); + if (_pData) + hr = S_OK; + else + hr = TLSAllocData(); +} +#endif // _CHICAGO_ + + + +typedef DWORD HAPT; +const HAPT haptNULL = 0; + +//+--------------------------------------------------------------------------- +// +// Function: GetCurrentApartmentId +// +// Synopsis: Returns the apartment id that the current thread is executing +// in. If this is the Multi-threaded apartment, it returns 0. +// +//+--------------------------------------------------------------------------- +inline DWORD GetCurrentApartmentId() +{ + COleTls Tls; + return (Tls->dwFlags & OLETLS_APARTMENTTHREADED) ? GetCurrentThreadId() : 0; +} + +//+--------------------------------------------------------------------------- +// +// Function: IsSTAThread +// +// Synopsis: returns TRUE if the current thread is for a +// single-threaded apartment, FALSE otherwise +// +//+--------------------------------------------------------------------------- +inline BOOL IsSTAThread() +{ + COleTls Tls; + return (Tls->dwFlags & OLETLS_APARTMENTTHREADED) ? TRUE : FALSE; +} + +//+--------------------------------------------------------------------------- +// +// Function: IsMTAThread +// +// Synopsis: returns TRUE if the current thread is for a +// multi-threaded apartment, FALSE otherwise +// +//+--------------------------------------------------------------------------- +inline BOOL IsMTAThread() +{ + COleTls Tls; + return (Tls->dwFlags & OLETLS_APARTMENTTHREADED) ? FALSE : TRUE; +} + +BOOL IsApartmentInitialized(); +IID *TLSGetLogicalThread(); +BOOLEAN TLSIsWOWThread(); +BOOLEAN TLSIsThreadDetaching(); + +#ifndef DCOM +#include <tlschico.h> +#endif + +#endif // _TLS_HXX_ diff --git a/private/ole32/ih/tlschico.h b/private/ole32/ih/tlschico.h new file mode 100644 index 000000000..2e6a5d2c3 --- /dev/null +++ b/private/ole32/ih/tlschico.h @@ -0,0 +1,514 @@ +//+---------------------------------------------------------------- +// +// Functions: TLSxxx functions +// +// Purpose: temp place for old style TLS functions until DCOM is +// defined for Win95 +// +// History: 02-Nov-95 Rickhi Separated from tls.h +// +//----------------------------------------------------------------- + +#define ENDPOINT_ID_INVALID 0xFFFFFFFF + +HWND CreateDdeClientHwnd(void); + +//+--------------------------------------------------------------------------- +// +// Function: TLSGetDdeClientWindow() +// +// Synopsis: Returns a pointer to the per thread DdeClient window. If one +// has not been created, it will create it and return +// +// Returns: Pointer to the DdeClientWindow. This window is used for per +// thread cleanup +// +// History: 12-12-94 kevinro Created +//---------------------------------------------------------------------------- +inline void * TLSGetDdeClientWindow() +{ + HRESULT hr; + COleTls tls(hr); + if (SUCCEEDED(hr)) + { + if (tls->hwndDdeClient == NULL) + { + tls->hwndDdeClient = CreateDdeClientHwnd(); + } + return tls->hwndDdeClient; + } + else + { + return NULL; + } +} + +//+--------------------------------------------------------------------------- +// +// Function: TLSSetLogicalThread +// +// Synopsis: sets the logical thread id +// +// Arguments: [riid] - the id for the logical thread +// +//+--------------------------------------------------------------------------- +inline BOOL TLSSetLogicalThread(REFIID riid) +{ + HRESULT hr; + COleTls tls(hr); + if (SUCCEEDED(hr)) + { + tls->dwFlags |= OLETLS_UUIDINITIALIZED; + tls->LogicalThreadId = riid; + return TRUE; + } + + return FALSE; +} + +//+--------------------------------------------------------------------------- +// +// Function: TLSSetCallerTID +// +// Synopsis: sets the TID of current caller +// +// Arguments: [TIDCaller] - TID of app making the incoming call +// [fLocal] - whether TID is in this process +// [pTIDCallerPrev] - TID of app making the previous incoming call +// [pfLocalPrev] - whether previous TID is in this process +// +// Notes: these are valid only during object RPC. They are here to +// support focus management in IOleObject::DoVerb, where +// app queues get linked together. +// +//+--------------------------------------------------------------------------- +inline BOOL TLSSetCallerTID(DWORD TIDCaller, BOOL fLocal, + DWORD *pTIDCallerPrev, BOOL *pfLocalPrev) +{ + HRESULT hr; + COleTls tls(hr); + if (SUCCEEDED(hr)) + { + // save the old values + *pTIDCallerPrev = tls->dwTIDCaller; + *pfLocalPrev = (tls->dwFlags & OLETLS_LOCALTID) ? TRUE : FALSE; + + // set the new values + tls->dwTIDCaller = TIDCaller; + tls->dwFlags |= (fLocal) ? OLETLS_LOCALTID : 0; + return TRUE; + } + + return FALSE; +} + +//+--------------------------------------------------------------------------- +// +// Function: TLSGetCallerTID +// +// Synopsis: gets the TID of current caller +// +// Arguments: [pTIDCaller] - TID of app making the incoming call +// +// Returns: [S_OK] - tid set, caller in same process +// [S_FALSE] - tid set, caller in different process +// [E_OUTOFMEMORY] - cant get TLS data +// +// Notes: these are valid only during object RPC. They are here to +// support focus management in IOleObject::DoVerb, where +// app queues get linked together. +// +//+--------------------------------------------------------------------------- +inline HRESULT TLSGetCallerTID(DWORD *pTIDCaller) +{ + HRESULT hr; + COleTls tls(hr); + if (SUCCEEDED(hr)) + { + *pTIDCaller = tls->dwTIDCaller; + return (tls->dwFlags & OLETLS_LOCALTID) ? S_OK : S_FALSE; + } + + return E_OUTOFMEMORY; +} + +//+--------------------------------------------------------------------------- +// +// Function: TLSGetFault +// +// Synopsis: returns the per thread fault state +// +// Arguments: none +// +//+--------------------------------------------------------------------------- +inline ULONG TLSGetFault() +{ + HRESULT hr; + COleTls tls(hr); + if (SUCCEEDED(hr)) + { + return tls->fault; + } + else + { + return 0; + } +} + +//+--------------------------------------------------------------------------- +// +// Function: TLSSetFault +// +// Synopsis: sets the per thread fault state +// +// Arguments: [ulFault] - fault code +// +//+--------------------------------------------------------------------------- +inline void TLSSetFault(ULONG ulFault) +{ + HRESULT hr; + COleTls tls(hr); + if (SUCCEEDED(hr)) + { + tls->fault = ulFault; + } +} + +//+--------------------------------------------------------------------------- +// +// Function: TLSSetChannelControl +// +// Synopsis: Sets pointer to the per thread ChannelControl +// +// Arguments: [pChanCont] -- Pointer to be the DDECallControl for thread +// +// Notes: this is not AddRef'd +// +//+--------------------------------------------------------------------------- +inline BOOL TLSSetChannelControl( void *pChanCont ) +{ + HRESULT hr; + COleTls tls(hr); + if (SUCCEEDED(hr)) + { + tls->pChanCtrl = pChanCont; + return TRUE; + } + else + { + return FALSE; + } +} + +//+--------------------------------------------------------------------------- +// +// Function: TLSGetChannelControl +// +// Synopsis: Gets pointer to the per thread ChannelControl +// +// Arguments: none +// +// Notes: this is not AddRef'd +// +//+--------------------------------------------------------------------------- +inline void * TLSGetChannelControl() +{ + HRESULT hr; + COleTls tls(hr); + if (SUCCEEDED(hr)) + { + return tls->pChanCtrl; + } + else + { + return NULL; + } +} + +//+--------------------------------------------------------------------------- +// +// Function: TLSSetService +// +// Synopsis: Sets pointer to the per thread Service +// +// Arguments: [pService] -- Pointer to the service for the thread. +// +// Notes: this is not AddRef'd +// +//+--------------------------------------------------------------------------- +inline BOOL TLSSetService( void *pService ) +{ + HRESULT hr; + COleTls tls(hr); + if (SUCCEEDED(hr)) + { + tls->pService = pService; + return TRUE; + } + else + { + return FALSE; + } +} + +//+--------------------------------------------------------------------------- +// +// Function: TLSGetService +// +// Synopsis: Gets pointer to the per thread Service +// +// Arguments: none +// +// Notes: this is not AddRef'd +// +//+--------------------------------------------------------------------------- +inline void * TLSGetService() +{ + HRESULT hr; + COleTls tls(hr); + if (SUCCEEDED(hr)) + { + return tls->pService; + } + else + { + return NULL; + } +} + +//+--------------------------------------------------------------------------- +// +// Function: TLSSetServiceList +// +// Synopsis: Sets pointer to the per thread Service List +// +// Arguments: [pServiceList] -- Pointer to the service list for the thread. +// +// Notes: this is not AddRef'd +// +//+--------------------------------------------------------------------------- +inline BOOL TLSSetServiceList( void *pServiceList ) +{ + HRESULT hr; + COleTls tls(hr); + if (SUCCEEDED(hr)) + { + tls->pServiceList = pServiceList; + return TRUE; + } + else + { + return FALSE; + } +} + +//+--------------------------------------------------------------------------- +// +// Function: TLSGetServiceList +// +// Synopsis: Gets pointer to the per thread Service List +// +// Arguments: none +// +// Notes: this is not AddRef'd +// +//+--------------------------------------------------------------------------- +inline void * TLSGetServiceList() +{ + HRESULT hr; + COleTls tls(hr); + if (SUCCEEDED(hr)) + { + return tls->pServiceList; + } + else + { + return NULL; + } +} + +//+--------------------------------------------------------------------------- +// +// Function: TLSGetEndPointPtr +// +// Synopsis: Gets pointer to the per thread endpoint +// +// Arguments: none +// +// Notes: this is not AddRef'd +// +//+--------------------------------------------------------------------------- +inline DWORD * TLSGetEndPointPtr() +{ + HRESULT hr; + COleTls tls(hr); + if (SUCCEEDED(hr)) + { + return &tls->dwEndPoint; + } + else + { + return NULL; + } +} + + +//+--------------------------------------------------------------------------- +// +// Function: TLSSetCallControl +// +// Synopsis: Sets pointer to the per thread CallControl +// +// Arguments: [pCallCont] -- Pointer to be the CallControl for thread +// +// Notes: this is not AddRef'd +// +//+--------------------------------------------------------------------------- +inline BOOL TLSSetCallControl( void *pCallCont ) +{ + HRESULT hr; + COleTls tls(hr); + if (SUCCEEDED(hr)) + { + tls->pCallCont = pCallCont; + return TRUE; + } + else + { + return FALSE; + } +} + +//+--------------------------------------------------------------------------- +// +// Function: TLSGetCallControl +// +// Synopsis: Gets pointer to the per thread CallControl +// +// Arguments: none +// +// Notes: this is not AddRef'd +// +//+--------------------------------------------------------------------------- +inline void * TLSGetCallControl() +{ + HRESULT hr; + COleTls tls(hr); + if (SUCCEEDED(hr)) + { + return tls->pCallCont; + } + else + { + return NULL; + } +} + +//+--------------------------------------------------------------------------- +// +// Function: TLSSetDdeCallControl +// +// Synopsis: Sets pointer to the per thread DDECallControl +// +// Arguments: [pDdeCallCont] -- Pointer to be the DDECallControl for thread +// +// History: 5-13-94 kevinro Created +// +// Notes: +// +// This is not AddRefed. +//---------------------------------------------------------------------------- +inline BOOL TLSSetDdeCallControl( void *pDdeCallCont ) +{ + HRESULT hr; + COleTls tls(hr); + if (SUCCEEDED(hr)) + { + tls->pDdeCallCont = pDdeCallCont; + return TRUE; + } + else + return FALSE; +} + +//+--------------------------------------------------------------------------- +// +// Function: TLSGetDdeCallControl +// +// Synopsis: Returns a pointer to the per thread DDECallControl +// +// Returns: DDECallControl interface for thread +// +// History: 5-13-94 kevinro Created +// +// Notes: +// +// This is not AddRef'd +//---------------------------------------------------------------------------- +inline void * TLSGetDdeCallControl() +{ + HRESULT hr; + COleTls tls(hr); + if (SUCCEEDED(hr)) + { + return tls->pDdeCallCont; + } + else + { + return NULL; + } +} + +//+--------------------------------------------------------------------------- +// +// Function: TLSSetDdeServer +// +// Synopsis: Sets hwnd to CommonDdeServer window +// +// Arguments: [hwndDdeServer] -- +// +// History: 5-13-94 kevinro Created +// +// Notes: +// +//---------------------------------------------------------------------------- +inline BOOL TLSSetDdeServer(HWND hwndDdeServer ) +{ + HRESULT hr; + COleTls tls(hr); + if (SUCCEEDED(hr)) + { + tls->hwndDdeServer = hwndDdeServer; + return TRUE; + } + else + return FALSE; +} + +//+--------------------------------------------------------------------------- +// +// Function: TLSGetDdeServer +// +// Synopsis: Returns a handle to the per thread DdeServer window +// +// Returns: hwndDdeServer for thread +// +// History: 5-13-94 kevinro Created +// +// Notes: +//---------------------------------------------------------------------------- +inline HWND TLSGetDdeServer() +{ + HRESULT hr; + COleTls tls(hr); + if (SUCCEEDED(hr)) + { + return tls->hwndDdeServer; + } + else + { + return NULL; + } +} + + diff --git a/private/ole32/ih/trace.hxx b/private/ole32/ih/trace.hxx new file mode 100644 index 000000000..06b1e62d5 --- /dev/null +++ b/private/ole32/ih/trace.hxx @@ -0,0 +1,206 @@ +//+--------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1992 - 1996. +// +// File: trace.hxx +// +// Contents: TraceInfo macros and functions +// +// History: 14-Jul-95 t-stevan Created +// +//---------------------------------------------------------------------------- +#ifndef __TRACE_HXX__ +#define __TRACE_HXX__ + +#if DBG==1 + +#include <exports.hxx> + +// Our flags for the level of information we wish to print out, need to be OR'd together +#define INF_OFF 0x00000000 // No information printed out +#define INF_BASE 0x00000001 // base level of information + // minus cmn APIs like StringFromGUID2 +#define INF_CMN 0x00000002 // cmn APIs also +#define INF_SYM 0x00000004 // try to print out symbols +#define INF_STRUCT 0x00000008 // expand structures +#define INF_NOTLOADED 0x80000000 // we haven't retrieved the information level from the registry yet + +// *** Function Prototypes *** +// functions to print out trace information +void _oletracein(DWORD dwApiID, ...); +void _oletracecmnin(DWORD dwApiID, ...); +void _oletraceout(DWORD dwApiID, HRESULT hr); +void _oletracecmnout(DWORD dwApiID, HRESULT hr); +void _oletraceoutex(DWORD dwApiID,...); +void _oletracecmnoutex(DWORD dwApiID,...); + +// *** Macros *** +// ************************************************************ +// The following macros use these type specifiers in any passed format strings +// note that I tried to keep them similar to printf in most cases, but not always +// in general, the type specifiers are case-sensitive. Also, a caps type specifier +// usually means that the output will be in caps, as opposed to lowercase (i.e. BOOLs +// and HEX numbers) +// *** Basic types +// int, LONG -> %d, %D +// UINT, ULONG, DWORD ->%ud, %uD, %x, %X +// BOOL -> %b, %B +// pointer -> %p, %P (hex) +// string -> %s +// wide string -> %ws +// HANDLE -> %h +// LARGE_INTEGER, ULARGE_INTEGER -> %ld, %uld +// GUID -> %I +// LPOLESTR, OLECHAR -> %ws + +// *** Structures +// BIND_OPTS -> %tb +// DVTARGETDEVICE -> %td +// FORMATETC -> %te +// FILETIME -> %tf +// INTERFACEINFO -> %ti +// LOGPALETTE -> %tl +// MSG -> %tm +// OLEINPLACEFRAMEINFO -> %to +// POINT -> %tp +// RECT -> %tr +// STGMEDIUM -> %ts +// STATSTG -> %tt +// OLEMENUGROUPWIDTHS -> %tw +// SIZE -> %tz + +//+--------------------------------------------------------------------------- +// +// Macro: OLETRACEIN +// +// Synopsis: Handle all trace-related tasks at function entry. +// Current tasks: +// Print out function name and parameter list +// +// Arguments: +// Note: There are two forms of this macro, determined at run time +// +// One form: (API) +// +// OLETRACEIN((API_ID, format_str, param1, ...)) +// +// [API_ID] - the integeter API identifier +// [format_str] - the format string to pass to oleprintf +// [param1, ...] - the parameters to pass to oleprintf +// +// Second form (Method) +// +// OLETRACEIN((METHOD_ID, this_ptr, format_str, param1, ...)) +// +// [METHOD_ID] - the integer object/method identifier +// [this_ptr] - the this pointer of the object +// the other args are the same as above +// +// Returns: nothing +// +// History: 15-Jul-95 t-stevan Created +// +// Note: Which form of the function used is determined by the id passed. +// object IDs have a non-zero value in the upper 16 bits, +// API id's have a zero value in the upper 16 bits +//---------------------------------------------------------------------------- +#define OLETRACEIN(args) _oletracein args +#define OLETRACECMNIN(args) _oletracecmnin args + +//+--------------------------------------------------------------------------- +// +// Macro: OLETRACEOUT +// +// Synopsis: Handle all trace-related tasks at function exit. +// Current tasks: +// Print out function name and return value +// +// Arguments: API form: OLETRACEOUT((API_ID, hr)) +// +// [API_ID]- integer API identifier (API_xxx) +// [hr] - HRESULT return value +// +// Method form: OLETRACEOUT((METHOD_ID, this, hr)) +// +// [METHOD_ID]-integer object/method identifier +// [this] - this pointer of object +// [hr] - HRESULT return value +// +// Returns: nothing +// +// History: 15-Jul-95 t-stevan Created +// +//---------------------------------------------------------------------------- +#define OLETRACEOUT(args) _oletraceout args +#define OLETRACECMNOUT(args) _oletracecmnout args + +//+--------------------------------------------------------------------------- +// +// Macro: OLETRACEOUTEX +// +// Synopsis: Handle all trace-related tasks at function exit. +// Current tasks: +// Print out function name and return value +// +// Arguments: API form: OLETRACEOUTEX((API_ID, format, result)) +// +// [API_ID]- integer API identifier (API_xxx) +// [format]- format string +// [result]- return value +// +// Method form: OLETRACEOUTEX((METHOD_ID, this, hr)) +// +// [METHOD_ID]-integer object/method identifier +// [this] - this pointer of object +// [format]- format string +// [result]- return value +// +// Returns: nothing +// +// History: 15-Jul-95 t-stevan Created +// +//---------------------------------------------------------------------------- +#define OLETRACEOUTEX(args) _oletraceoutex args +#define OLETRACECMNOUTEX(args) _oletracecmnoutex args + +// use this to make a nicely formatted parameter string +#define PARAMFMT(paramstr) ( "("##paramstr")\n" ) + +// use this for a functions which take no parameters +#define NOPARAM (PARAMFMT("")) + +// use this to make a " returns %meef" format for OLETRACEOUT_ +#define RETURNFMT(str) ( " returned "##str##"\n" ) + +// use this for a function which returns void +#define NORETURN (RETURNFMT("")) + + +void InitializeTraceInfo(); // function to load the trace info level on +void CleanupTraceInfo(); // function to clean up the trace info process detatch + + +#else // #ifdef _TRACE + +#define OLETRACEIN(X) +#define OLETRACECMNIN(X) +#define OLETRACEOUT(x) +#define OLETRACECMNOUT(x) +#define OLETRACEOUTEX(x) +#define OLETRACECMNOUTEX(x) + +#define PARAMFMT(paramstr) ("") + +#define NOPARAM +#define NORETURN + +#define RETURNFMT(str) ("") + +#define InitializeTraceInfo() +#define CleanupTraceInfo() + + +#endif // DBG==1 + +#endif // #ifdef __TRACE_HXX__ diff --git a/private/ole32/ih/userapis.h b/private/ole32/ih/userapis.h new file mode 100644 index 000000000..5f6806da7 --- /dev/null +++ b/private/ole32/ih/userapis.h @@ -0,0 +1,76 @@ +//+--------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1992 - 1994. +// +// File: userapis.h +// +// Contents: Prototypes and macors for stack switching +// +// Classes: +// +// Functions: +// +// History: 12-30-94 JohannP (Johann Posch) Created +// +//---------------------------------------------------------------------------- + +#ifndef _USERAPIS_ +#define _USERAPIS_ + +#ifdef _CHICAGO_ + +#undef SendMessage +#undef ReplyMessage +#undef CallWindowProc +#undef DefWindowProc +#undef PeekMessage +#undef GetMessage +#undef DispatchMessage +#undef WaitMessage +#undef DirectedYield +#undef DialogBoxParam +#undef DialogBoxIndirectParam +#undef DestroyWindow +#undef MessageBox +#undef CreateWindowExA +#undef CreateWindowExW + +// Clipboard apis +#undef OpenClipboard +#undef CloseClipboard +#undef GetClipboardOwner +#undef SetClipboardData +#undef GetClipboardData +#undef EnumClipboardFormats +#undef EmptyClipboard +#undef RegisterClipboardFormatA +#undef GetClipboardFormatNameA +#undef IsClipboardFormatAvailable + +// +// Restore original definitions as in winuser.h +// + +#define SendMessage SendMessageA +#define CallWindowProc CallWindowProcA +#define DefWindowProc DefWindowProcA +#define PeekMessage PeekMessageA +#define GetMessage GetMessageA +#define DispatchMessage DispatchMessageA +#define DialogBoxParam DialogBoxParamA +#define DialogBoxIndirectParam DialogBoxIndirectParamA +#define MessageBox MessageBoxA + + +#undef DialogBox +#define DialogBox(a,b,c,d) \ + DialogBoxParamA(a,b,c,d, 0L) +#undef DialogBoxIndirect +#define DialogBoxIndirect(a,b,c,d) \ + DialogBoxIndirectParamA(a,b,c,d,e, 0L) + +#endif // _CHICAGO_ + +#endif // _USERAPIS_ + diff --git a/private/ole32/ih/utils.h b/private/ole32/ih/utils.h new file mode 100644 index 000000000..4ba770dec --- /dev/null +++ b/private/ole32/ih/utils.h @@ -0,0 +1,1560 @@ + +//+---------------------------------------------------------------------------- +// +// File: +// utils.h +// +// Contents: +// prototypes and constants for OLE internal utility routines +// +// Classes: +// +// Functions: +// +// History: +// 11/28/93 - ChrisWe - file inspection and cleanup begins +// 11/29/93 - ChrisWe - remove signature for non-existent +// function UtGlobalHandlCpy; moved manifest constants +// to be with functions they are used with (OPCODE_*, +// CONVERT_*); removed default parameters from functions; +// replace '!' with '~' in STREAMTYPE_OTHER definition +// 04/07/94 - AlexGo - added UtCreateStorageOnHGlobal +// +//----------------------------------------------------------------------------- + +#ifndef _UTILS_H_ +#define _UTILS_H_ + +// We need to serialize the placeable metafile structure in the same format +// that was used by WIN16, since RECT used LONGs under Win32. +// We ensure that no padding is added by using the #pragma pack() calls. + +#pragma pack(1) +typedef struct tagWIN16RECT +{ + WORD left; + WORD top; + WORD right; + WORD bottom; +} WIN16RECT; + +typedef struct tagPLACEABLEMETAHEADER +{ + DWORD key; /* must be PMF_KEY */ +#define PMF_KEY 0x9ac6cdd7 + WORD hmf; /* must be zero */ + WIN16RECT bbox; /* bounding rectangle of the metafile */ + WORD inch; /* # of metafile units per inch must be < 1440 */ + /* most apps use 576 or 1000 */ + DWORD reserved; /* must be zero */ + WORD checksum; +} PLACEABLEMETAHEADER; +#pragma pack() + +//+------------------------------------------------------------------------- +// +// Function: UtGetUNICODEData, PRIVATE INTERNAL +// +// Synopsis: Given a string length, and two pointers (one ANSI, one +// OLESTR), returns the UNICODE version of whichever string +// is valid. +// +// Effects: Memory is allocated on the caller's pointer for new OLESTR +// +// Arguments: [ulLength] -- length of string in CHARACTERS (not bytes) +// (including terminator) +// [szANSI] -- candidate ANSI string +// [szOLESTR] -- candidate OLESTR string +// [pstr] -- OLESTR OUT parameter +// +// Returns: NOERROR on success +// E_OUTOFMEMORY on allocation failure +// E_ANSITOUNICODE if ANSI cannot be converted to UNICODE +// +// Algorithm: If szOLESTR is available, a simple copy is performed +// If szOLESTR is not available, szANSI is converted to UNICODE +// and the result is copied. +// +// History: dd-mmm-yy Author Comment +// 08-Mar-94 davepl Created +// +// Notes: Only one of the two input strings (ANSI or UNICODE) should +// be set on entry. +// +//-------------------------------------------------------------------------- + +INTERNAL UtGetUNICODEData( ULONG, LPSTR, LPOLESTR, LPOLESTR *); + + +//+------------------------------------------------------------------------- +// +// Function: UtPutUNICODEData, PRIVATE INTERNAL +// +// Synopsis: Given an OLESTR and two possible buffer pointer, one ANSI +// and the other OLESTR, this fn tries to convert the string +// down to ANSI. If it succeeds, it allocates memory on the +// ANSI ptr for the result. If it fails, it allocates memory +// on the UNICODE ptr and copies the input string over. The +// length of the final result (ANSI or UNICODE) is returned +// in dwResultLen. +// +// Arguments: [ulLength] -- input length of OLESTR str +// [str] -- the OLESTR to store +// [pszANSI] -- candidate ANSI str ptr +// [pszOLESTR] -- candidate OLESTR str ptr +// [pdwResultLen] -- where to store the length of result +// +// Returns: NOERROR on success +// E_OUTOFMEMORY on allocation failure +// +// History: dd-mmm-yy Author Comment +// 08-Mar-94 davepl Created +// +//-------------------------------------------------------------------------- + +INTERNAL UtPutUNICODEData( + ULONG ulLength, + LPOLESTR str, + LPSTR * pszANSI, + LPOLESTR * pszOLESTR, + DWORD * pdwResultLen ); + +//+---------------------------------------------------------------------------- +// +// Function: +// UtDupGlobal, internal +// +// Synopsis: +// Duplicate the contents of an HGlobal into a new HGlobal. If +// there is no allocated memory, no new global is allocated. +// +// Arguments: +// [hsrc] -- the source HGLobal; need not be locked +// [uiFlags] -- flags to be passed on to GlobalAlloc() +// +// Returns: +// The new HGLOBAL, if successful, or NULL +// +// History: +// 11/28/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL_(HANDLE) UtDupGlobal(HANDLE hSrc, UINT uiFlags); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtIsFormatSupported, internal +// +// Synopsis: +// Checks a data object to see if it will accept +// IDataObject::SetData() and/or IDataObject::GetData() calls +// on the specified format. The direction of transfer is specified +// with the dwDirection flags. The function returns TRUE only +// if all requested transfers are possible. +// +// Arguments: +// [lpObj] -- the data object to check for the format +// [dwDirection] -- a combination of values from DATADIR_* +// [cfFormat] -- the format to look for +// +// Returns: +// TRUE, if transfers of [cfFormat] are supported in [dwDirection], +// FALSE otherwise +// +// Notes: +// +// History: +// 11/29/93 - ChrisWe - file inspection and cleanup; noted that +// enumerators are expected to be able to return +// formats for multiple DATADIR_* flags +// +//----------------------------------------------------------------------------- +FARINTERNAL_(BOOL) UtIsFormatSupported(LPDATAOBJECT lpObj, DWORD dwDirection, + CLIPFORMAT cfFormat); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtDupString, internal +// +// Synopsis: +// Copies the argument string into a new string allocated +// using the task allocator +// +// Arguments: +// [lpszIn] -- the string to duplicate +// +// Returns: +// a pointer to a copy of [lpszIn], or NULL if the allocator +// could not be acquired, or was out of memory +// +// History: +// 11/28/93 - ChrisWe - file cleanup and inspection +// +//----------------------------------------------------------------------------- +FARINTERNAL_(LPOLESTR) UtDupString(LPCOLESTR lpszIn); + +//+------------------------------------------------------------------------- +// +// Function: UtDupStringA +// +// Synopsis: Duplicates an ANSI string using the TASK allocator +// +// Effects: +// +// Arguments: [pszAnsi] -- the string to duplicate +// +// Requires: +// +// Returns: the newly allocated string duplicate or NULL +// +// Signals: +// +// Modifies: +// +// Algorithm: +// +// History: dd-mmm-yy Author Comment +// 04-Jun-94 alexgo author +// +// Notes: +// +//-------------------------------------------------------------------------- + +LPSTR UtDupStringA( LPCSTR pszAnsi ); + +//+---------------------------------------------------------------------------- +// +// Function: +// UtCopyFormatEtc, internal +// +// Synopsis: +// Copies a format etc, creating copies of data structures +// pointed to inside (the target device descriptor.) +// +// Arguments: +// [pFetcIn] -- pointer to the FORMATETC to copy +// [pFetcCopy] -- pointer to where to copy the FORMATETC to +// +// Returns: +// FALSE if pointed to data could not be copied because it +// could not be allocated +// TRUE otherwise +// +// Notes: +// +// History: +// 11/01/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL_(BOOL) UtCopyFormatEtc(FORMATETC FAR* pFetcIn, + FORMATETC FAR* pFetcCopy); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtCompareFormatEtc, internal +// +// Synopsis: +// +// Arguments: +// [pFetcLeft] -- pointer to a FORMATETC +// [pFetcRight] -- pointer to a FORMATETC +// +// Returns: +// UTCMPFETC_EQ is the two FORMATETCs match exactly +// UTCMPFETC_NEQ if the two FORMATETCs do not match +// UTCMPFETC_PARTIAL if the left FORMATETC is a subset of the +// right: fewer aspects, null target device, or +// fewer media +// +// Notes: +// +// History: +// 11/01/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL_(int) UtCompareFormatEtc(FORMATETC FAR* pFetcLeft, + FORMATETC FAR* pFetcRight); +#define UTCMPFETC_EQ 0 /* exact match */ +#define UTCMPFETC_NEQ 1 /* no match */ +#define UTCMPFETC_PARTIAL (-1) /* partial match; left is subset of right */ + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtCompareTargetDevice, internal +// +// Synopsis: +// Compares two target devices to see if they are the same +// +// Arguments: +// [ptdLeft] -- pointer to a target device description +// [ptdRight] -- pointer to a target device description +// +// Returns: +// TRUE if the two devices are the same, FALSE otherwise +// +// Notes: +// +// History: +// 11/01/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL_(BOOL) UtCompareTargetDevice(DVTARGETDEVICE FAR* ptdLeft, + DVTARGETDEVICE FAR* ptdRight); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtCopyStatData, internal +// +// Synopsis: +// Copies the contents of one STATDATA into another, including +// creating a copy of data pointed to, and incrementing the +// reference count on the advise sink to reflect the copy. +// +// Arguments: +// [pSDIn] -- the source STATDATA +// [pSDCopy] -- where to copy the information to +// +// Returns: +// FALSE if memory could not be allocated for the copy of +// the target device, TRUE otherwise +// +// Notes: +// +// History: +// 11/01/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL_(BOOL) UtCopyStatData(STATDATA FAR* pSDIn, STATDATA FAR* pSDCopy); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtReleaseStatData, internal +// +// Synopsis: +// Release resources associated with the argument STATDATA; this +// frees the device description within the FORMATETC, and releases +// the advise sink, if there is one. +// +// Arguments: +// [pStatData] -- The STATDATA to clean up +// +// Notes: +// +// History: +// 11/01/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL_(void) UtReleaseStatData(STATDATA FAR* pStatData); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtDupPalette, internal +// +// Synopsis: +// Creates a duplicate palette. +// +// Arguments: +// [hpalette] -- the palette to duplicate +// +// Returns: +// if successful, a handle to the duplicate palette; if any +// allocations or calls fail during the duplication process, NULL +// +// History: +// 11/29//93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL_(HPALETTE) UtDupPalette(HPALETTE hpalette); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtPaletteSize, internal +// +// Synopsis: +// Returns the size of a color table for a palette given the +// number of bits of color desired. +// +// Arguments: +// [lpHeader] -- ptr to BITMAPINFOHEADER structure +// +// Returns: +// Size in bytes of color information +// +// Notes: +// +// History: +// 11/29/93 - ChrisWe - change bit count argument to unsigned, +// and return value to size_t +// +// 07/18/94 - DavePl - Fixed for 16, 24, 32bpp DIBs +// +//----------------------------------------------------------------------------- +FARINTERNAL_(size_t) UtPaletteSize(BITMAPINFOHEADER *); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtFormatToTymed, internal +// +// Synopsis: +// Maps a clipboard format to a medium used to transport it. +// +// Arguments: +// [cf] -- the clipboard format to map +// +// Returns: +// a TYMED_* value +// +// Notes: +// +// History: +// 11/29/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL_(DWORD) UtFormatToTymed(CLIPFORMAT cf); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtQueryPictFormat, internal +// +// Synopsis: +// Check to see if the argument data object supports one of +// our preferred data formats for presentations: +// CF_METAFILEPICT, CF_DIB, CF_BITMAP, in that order. Returns +// TRUE, if success, and alters the given format descriptor +// to match the supported format. The given format descriptor +// is not altered if there is no match. +// +// Arguments: +// [lpSrcDataObj] -- the data object to query +// [lpforetc] - the format descriptor +// +// Returns: +// TRUE if a preferred format is found, FALSE otherwise +// +// Notes: +// +// History: +// 11/09/93 - ChrisWe - modified to not alter the descriptor +// if no match is found +// 11/09/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL_(BOOL) UtQueryPictFormat(LPDATAOBJECT lpSrcDataObj, + LPFORMATETC lpforetc); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtConvertDibToBitmap, internal +// +// Synopsis: +// Converts a DIB to a bitmap, returning a new handle to the +// bitmap. The original DIB is left untouched. +// +// Arguments: +// [hDib] -- handle to the DIB to convert +// +// Returns: +// if successful, and handle to the new bitmap +// +// Notes: +// REVIEW, the function uses the screen DC when creating the +// new bitmap. It may be the case that the bitmap was intended +// for another target, in which case this may not be appropriate. +// It may be necessary to alter this function to take a DC as +// an argument. +// +// History: +// 11/29/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL_(HBITMAP) UtConvertDibToBitmap(HANDLE hDib); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtConvertBitmapToDib, internal +// +// Synopsis: +// Creates a Device Independent Bitmap capturing the content of +// the argument bitmap. +// +// Arguments: +// [hBitmap] -- Handle to the bitmap to convert +// [hpal] -- color palette for the bitmap; may be null for +// default stock palette +// +// Returns: +// Handle to the DIB. May be null if any part of the conversion +// failed. +// +// Notes: +// +// History: +// 11/29/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL_(HANDLE) UtConvertBitmapToDib(HBITMAP hBitmap, HPALETTE hpal); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtGetClassId, internal +// +// Synopsis: +// Attempt to find the class id of the object. First, +// query for IOleObject, and if successful, call +// IOleObject::GetUserClassID(). If that fails, query for +// IPersist, and if successful, call IPersist::GetClassID. +// +// Arguments: +// [lpUnk] -- pointer to an IUnknown instance +// [lpClsid] -- pointer to where to copy the class id to +// +// Returns: +// TRUE, if the class id was obtained, or FALSE otherwise +// If unsuccessful, *[lpClsid] is set to CLSID_NULL +// +// Notes: +// +// History: +// 11/29/93 - ChrisWe - change to return BOOL to indicate success +// +//----------------------------------------------------------------------------- +FARINTERNAL_(BOOL) UtGetClassID(LPUNKNOWN lpUnk, CLSID FAR* lpClsid); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtCopyTargetDevice, internal +// +// Synopsis: +// Allocates a new target device description, and copies +// the given one into it +// +// Arguments: +// [ptd] -- pointer to a target device +// +// Returns: +// NULL, if the no memory can be allocated +// +// Notes: +// +// History: +// 11/01/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL_(DVTARGETDEVICE FAR*) UtCopyTargetDevice(DVTARGETDEVICE FAR* ptd); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtGetIconData, internal +// +// Synopsis: +// Attempts to get the icon for an object. +// +// Arguments: +// [lpSrcDataObj] -- The source data object +// [rclsid] -- the class id the object is known to be +// (may be CLSID_NULL) +// [lpforetc] -- the format of the data to fetch +// [lpstgmed] -- a place to return the medium it was fetched on +// +// Returns: +// E_OUTOFMEMORY, S_OK +// +// Notes: +// REVIEW, this method seems to assume that the contents of +// lpforetc are correct for fetching an icon. It passes this +// on to [lpSrcDataObj]->GetData first, and if that fails, +// calls OleGetIconOfClass, without checking the requested +// format in lpforetc. This could fetch anything +// +// History: +// 11/30/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL UtGetIconData(LPDATAOBJECT lpSrcDataObj, REFCLSID rclsid, + LPFORMATETC lpforetc, LPSTGMEDIUM lpstgmed); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtDoStreamOperation, internal +// +// Synopsis: +// Iterate over the streams in [pstgSrc], performing the +// operation indicated by [iOpCode] to those that are specified +// by [grfAllowedStmTypes]. +// +// Arguments: +// [pstgSrc] -- source IStorage instance +// [pstgDst] -- destination IStorage instance; may be null for +// some operations (OPCODE_REMOVE) +// [iOpCode] -- 1 value from the OPCODE_* values below +// [grfAllowedStmTypes] -- a logical or of one or more of the +// STREAMTYPE_* values below +// +// Returns: +// HRESULT +// +// Notes: +// +// History: +// 11/30/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +STDAPI UtDoStreamOperation(LPSTORAGE pstgSrc, LPSTORAGE pstgDst, + int iOpCode, DWORD grfAllowedStmTypes); + +#define OPCODE_COPY 1 /* copy the stream from pstgSrc to pstgDst */ +#define OPCODE_REMOVE 2 /* delete the stream from pstgSrc */ +#define OPCODE_MOVE 3 /* move the stream from pstgSrc to pstgDst */ +#define OPCODE_EXCLUDEFROMCOPY 4 + /* unimplemented, undocumented, intent unknown */ + +#define STREAMTYPE_CONTROL 0x00000001 /* OLE 0x1 stream (REVIEW const) */ +#define STREAMTYPE_CACHE 0x00000002 /* OLE 0x2 stream (REVIEW const) */ +#define STREAMTYPE_CONTAINER 0x00000004 /* OLE 0x3 stream (REVIEW const) */ +#define STREAMTYPE_OTHER \ + (~(STREAMTYPE_CONTROL | STREAMTYPE_CACHE | STREAMTYPE_CONTAINER)) +#define STREAMTYPE_ALL 0xFFFFFFFF /* all stream types are allowed */ + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtGetPresStreamName, internal +// +// Synopsis: +// Modify [lpszName] to be a presentation stream name based +// on [iStreamNum]. +// +// Arguments: +// [lpszName] -- a copy of OLE_PRESENTATION_STREAM; see below +// [iStreamNum] -- the number of the stream +// +// Notes: +// The digit field of [lpszName] is always completely overwritten, +// allowing repeated use of UtGetPresStreamName() on the same +// string; this removes the need to repeatedly start with a fresh +// copy of OLE_PRESENTATION_STREAM each time this is used in a +// loop. +// +// The validity of the implementation depends on the values of +// OLE_PRESENTATION_STREAM and OLE_MAX_PRES_STREAMS; if those +// change, the implementation must change +// +// History: +// 11/30/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL_(void)UtGetPresStreamName(LPOLESTR lpszName, int iStreamNum); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtRemoveExtraOlePresStreams, internal +// +// Synopsis: +// Deletes presentation streams in [pstg] starting with the +// presentation numbered [iStart]. All streams after that one +// (numbered sequentially) are deleted, up to OLE_MAX_PRES_STREAMS. +// +// Arguments: +// [pstg] -- the IStorage instance to operate on +// [iStart] -- the number of the first stream to remove +// +// Returns: +// +// Notes: +// The presentation stream names are generated with +// UtGetPresStreamName(). +// +// History: +// 11/30/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL_(void) UtRemoveExtraOlePresStreams(LPSTORAGE pstg, int iStart); + +//+------------------------------------------------------------------------- +// +// Function: UtCreateStorageOnHGlobal +// +// Synopsis: creates a storage on top of an HGlobal +// +// Effects: +// +// Arguments: [hGlobal] -- the memory on which to create the +// storage +// [fDeleteOnRelease] -- if TRUE, then delete the memory +// ILockBytes once the storage is +// released. +// [ppStg] -- where to put the storage interface +// [ppILockBytes] -- where to put the underlying ILockBytes, +// maybe NULL. The ILB must be released. +// +// Requires: +// +// Returns: HRESULT +// +// Signals: +// +// Modifies: +// +// Algorithm: create an ILockBytes on HGLOBAL and then create the docfile +// on top of the ILockBytes +// +// History: dd-mmm-yy Author Comment +// 07-Apr-94 alexgo author +// +// Notes: +// +//-------------------------------------------------------------------------- + +HRESULT UtCreateStorageOnHGlobal( HGLOBAL hGlobal, BOOL fDeleteOnRelease, + IStorage **ppStg, ILockBytes **ppILockBytes ); + + +//+------------------------------------------------------------------------- +// +// Function: UtGetTempFileName +// +// Synopsis: retrieves a temporary filename (for use in GetData, TYMED_FILE +// and temporary docfiles) +// +// Effects: +// +// Arguments: [pszPrefix] -- prefix of the temp filename +// [pszTempName] -- buffer that will receive the temp path. +// must be MAX_PATH or greater. +// +// Requires: +// +// Returns: HRESULT; +// +// Signals: +// +// Modifies: +// +// Algorithm: tries to get a file in the temp directory, failing that, in +// the windows directory +// +// History: dd-mmm-yy Author Comment +// 07-Apr-94 alexgo author +// +// Notes: +// +//-------------------------------------------------------------------------- + +HRESULT UtGetTempFileName( LPOLESTR pszPrefix, LPOLESTR pszTempName ); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtHGLOBALToStm, internal +// +// Synopsis: +// Write the contents of an HGLOBAL to a stream +// +// Arguments: +// [hdata] -- handle to the data to write out +// [dwSize] -- size of the data to write out +// [pstm] -- stream to write the data out to; on exit, the +// stream is positioned after the written data +// +// Returns: +// HRESULT +// +// Notes: +// +// History: +// 11/30/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +HRESULT UtHGLOBALtoStm(HANDLE hdata, DWORD dwSize, LPSTREAM pstm); + +//+------------------------------------------------------------------------- +// +// Function: UtHGLOBALtoHGLOBAL, internal +// +// Synopsis: Copies the source HGLOBAL into the target HGLOBAL +// +// Effects: +// +// Arguments: [hGlobalSrc] -- the source HGLOBAL +// [dwSize] -- the number of bytes to copy +// [hGlobalTgt] -- the target HGLOBAL +// +// Requires: +// +// Returns: HRESULT +// +// Signals: +// +// Modifies: +// +// Algorithm: +// +// History: dd-mmm-yy Author Comment +// 10-Apr-94 alexgo author +// +// Notes: this function will fail if the target hglobal is not large +// enough +// +//-------------------------------------------------------------------------- + +HRESULT UtHGLOBALtoHGLOBAL( HGLOBAL hGlobalSrc, DWORD dwSize, + HGLOBAL hGlobalTgt); + + +//+------------------------------------------------------------------------- +// +// Function: UtHGLOBALtoStorage, internal +// +// Synopsis: Copies the source HGLOBAL into the target storage +// +// Effects: +// +// Arguments: [hGlobalSrc] -- the source HGLOBAL +// [hpStg] -- the target storage +// +// Requires: +// +// Returns: HRESULT +// +// Signals: +// +// Modifies: +// +// Algorithm: +// +// History: dd-mmm-yy Author Comment +// 10-Apr-94 alexgo author +// +// Notes: this function will fail if the source HGLOBAL did not +// originally have a storage layered on top of it. +// +//-------------------------------------------------------------------------- + +HRESULT UtHGLOBALtoStorage( HGLOBAL hGlobalSrc, IStorage *pStg); + + +//+------------------------------------------------------------------------- +// +// Function: UtHGLOBALtoFile, internal +// +// Synopsis: Copies the source HGLOBAL into the target file +// +// Effects: +// +// Arguments: [hGlobalSrc] -- the source HGLOBAL +// [dwSize] -- the number of bytes to copy +// [pszFileName] -- the target file +// +// Requires: +// +// Returns: HRESULT +// +// Signals: +// +// Modifies: +// +// Algorithm: +// +// History: dd-mmm-yy Author Comment +// 10-Apr-94 alexgo author +// +// Notes: +// +//-------------------------------------------------------------------------- + +HRESULT UtHGLOBALtoFile( HGLOBAL hGlobalSrc, DWORD dwSize, + LPCOLESTR pszFileName); + + +/*** Following routines can be found in convert.cpp *****/ + +//+---------------------------------------------------------------------------- +// +// Function: +// UtGetHGLOBALFromStm, internal +// +// Synopsis: +// Create a new HGLOBAL, and read [dwSize] bytes into it +// from [lpstream]. +// +// Arguments: +// [lpstream] -- the stream to read the content of the new +// HGLOBAL from; on exit, points just past the data read +// [dwSize] -- the amount of material to read from the stream +// [lphPres] -- pointer to where to return the new handle +// +// Returns: +// HRESULT +// +// Notes: +// In case of any error, the new handle is freed. If the +// amount of material expected from [lpstream] is less than +// [dwSize], nothing is returned. +// +// History: +// 11/30/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL UtGetHGLOBALFromStm(LPSTREAM lpstream, DWORD dwSize, + HANDLE FAR* lphPres); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtGetHDIBFromDIBFileStm, internal +// +// Synopsis: +// Produce a handle to a DIB from a file stream +// +// Arguments: +// [pstm] -- the stream to read the DIB from; on exit, the +// stream is positioned just past the data read +// [lphdata] -- pointer to where to return the handle to the data +// +// Returns: +// HRESULT +// +// Notes: +// +// History: +// 11/30/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL UtGetHDIBFromDIBFileStm(LPSTREAM pstm, HANDLE FAR* lphdata); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtGetHMFPICT, internal +// +// Synopsis: +// Given a handle to a METAFILE, conjure up a handle to a +// METAFILEPICT, based on the metafile +// +// Arguments: +// [hMF] -- handle to the METAFILE +// [fDeleteOnError] -- if TRUE, delete the METAFILE [hMF] in there +// is any error +// [xExt] -- the x extent of the desired METAFILEPICT +// [yExt] -- the y extent of the desired METAFILEPICT +// +// Returns: +// Handle to the new METAFILEPICT, if successful, or NULL +// +// Notes: +// +// History: +// 11/30/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL_(HANDLE) UtGetHMFPICT(HMETAFILE hMF, BOOL fDeletOnError, + DWORD xExt, DWORD yExt); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtGetHMFFromMFStm, internal +// +// Synopsis: +// Create a handle to a METAFILE, loaded with content from +// the given stream +// +// Arguments: +// [lpstream] -- the source stream to initialize the METAFILE with; +// on exit, the stream is positioned just past the +// data read +// [dwSize] -- the amount of material to read from [lpstream] +// [fConvert] -- if TRUE, tries to convert a Macintosh QuickDraw +// file to METAFILE format +// [lphPres] -- pointer to where to return the new handle to +// the metafile +// +// Returns: +// HRESULT +// +// Notes: +// If [dwSize] is too large, and goes past the end of the +// stream, the error causes everything allocated to be freed, +// and nothing is returned in [lphPres]. +// +// History: +// 11/30/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL UtGetHMFFromMFStm(LPSTREAM lpstream, DWORD dwSize, + BOOL fConvert, HANDLE FAR* lphPres); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtGetSizeAndExtentsFromPlaceableMFStm, internal +// +// Synopsis: +// Obtain the size, width, and height of the metafile stored +// in a placeable metafile stream. +// +// Arguments: +// [lpstream] -- the stream to read the placeable metafile +// from; on exit, the stream is positioned at the +// beginning of the metafile header, after the +// placeable metafile header. +// [pdwSize] -- a pointer to where to return the size of the +// metafile; may be NULL +// [plWidth] -- a pointer to where to return the width of the +// metafile; may be NULL +// [plHeight] -- a pointer to where to return the height of the +// metafile; may be NULL +// +// Returns: +// HRESULT +// +// Notes: +// +// History: +// 11/30/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL UtGetSizeAndExtentsFromPlaceableMFStm(LPSTREAM pstm, + DWORD FAR* dwSize, LONG FAR* plWidth, LONG FAR* plHeight); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtGetHMFPICTFromPlaceableMFStm, internal +// +// Synopsis: +// Create a handle to a METAFILEPICT initialized from a +// placeable METAFILE stream. +// +// Arguments: +// [pstm] -- the stream to load the METAFILE from; on exit +// points just past the METAFILE data +// [lphdata] -- pointer to where to return the handle to the +// new METAFILEPICT +// +// Returns: +// HRESULT +// +// Notes: +// +// History: +// 11/30/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL UtGetHMFPICTFromPlaceableMFStm(LPSTREAM pstm, HANDLE FAR* lphdata); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtGetDibExtents, internal +// +// Synopsis: +// Return the width and height of a DIB, in HIMETRIC units +// per pixel. +// +// Arguments: +// [lpbmi] -- pointer to a BITMAPINFOHEADER +// [plWidth] -- pointer to where to return the width +// REVIEW, this should be a DWORD +// [plHeight] -- pointer to where to return the height +// REVIEW, this should be a DWORD +// +// Notes: +// +// History: +// 12/02/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL_(void) UtGetDibExtents(LPBITMAPINFOHEADER lpbmi, + LONG FAR* plWidth, LONG FAR* plHeight); +#ifdef LATER +FARINTERNAL_(void) UtGetDibExtents(LPBITMAPINFOHEADER lpbmi, + DWORD FAR* pdwWidth, DWORD FAR* pdwHeight); +#endif + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtHDIBToDIBFileStm, internal +// +// Synopsis: +// Given a handle to a DIB, write out out a DIB file stream. +// +// Arguments: +// [hdata] -- handle to the DIB +// [dwSize] -- the size of the DIB +// [pstm] -- the stream to write the DIB out to; on exit, the +// stream is positioned after the DIB data; the DIB +// data is prepended with a BITMAPFILEHEADER +// +// Returns: +// HRESULT +// +// Notes: +// +// History: +// 12/02/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL UtHDIBToDIBFileStm(HANDLE hdata, DWORD dwSize, LPSTREAM pstm); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtDIBStmToDIBFileStm, internal +// +// Synopsis: +// copy convert a DIB in a stream to a DIB file stream +// +// Arguments: +// [pstmDIB] -- the source DIB +// REVIEW, what does CopyTo do to the stream pointer? +// [dwSize] -- the size of the source DIB +// [pstmDIBFile] -- where to write the converted DIB file stream; +// should not be the same as [pstmDIB]; on exit, the +// stream is positioned after the DIB file data +// +// Returns: +// HRESULT +// +// Notes: +// +// History: +// 12/02/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL UtDIBStmToDIBFileStm(LPSTREAM pstmDIB, DWORD dwSize, + LPSTREAM pstmDIBFile); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtHDIBFileToOlePresStm, internal +// +// Synopsis: +// Given a handle to a DIB file, write it out to a stream +// +// Arguments: +// [hdata] -- the handle to the DIB file +// [pstm] -- the stream to write it out to; on exit, the +// stream is positioned after the written data +// +// Returns: +// HRESULT +// +// Notes: +// A small header with size information precedes the DIB file +// data. +// +// History: +// 12/02/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL UtHDIBFileToOlePresStm(HANDLE hdata, LPSTREAM pstm); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtHMFToMFStm, internal +// +// Synopsis: +// Given a handle to a METAFILE, write it out to a METAFILE stream +// +// Arguments: +// [lphMF] -- a *pointer* to a handle to a METAFILE +// REVIEW, why the hell is this a pointer? +// [dwSize] -- the size of the METAFILE +// [lpstream] -- the stream to write the METAFILE out to; on +// exit, the stream is positioned after the written data +// +// Returns: +// HRESULT +// +// Notes: +// +// History: +// 12/02/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL UtHMFToMFStm(HANDLE FAR* lphMF, DWORD dwSize, LPSTREAM lpstream); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtHMFToPlaceableMFStm, internal +// +// Synopsis: +// Given a handle to a METAFILE, write it to a stream as a +// placeable METAFILE +// +// Arguments: +// [lphMF] -- a *pointer* to a METAFILE handle +// REVIEW, why the hell is this a pointer? +// [dwSize] -- size of the METAFILE +// [lWidth] -- width of the metafile +// REVIEW, in what units? +// REVIEW, why isn't this a DWORD? +// [lHeight] -- height of the metafile +// REVIEW, in what units? +// REVIEW, why isn't this a DWORD? +// [pstm] -- the stream to write the data to; on exit, the stream +// is positioned after the written data +// +// Returns: +// HRESULT +// +// Notes: +// +// History: +// 12/02/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL UtHMFToPlaceableMFStm(HANDLE FAR* lphMF, DWORD dwSize, + LONG lWidth, LONG lHeight, LPSTREAM pstm); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtNFStmToPlaceableMFStm, internal +// +// Synopsis: +// Copy converts a METAFILE in a stream to a placeable METAFILE +// in another stream. +// +// Arguments: +// [pstmMF] -- the IStream instance from which to read the +// original METAFILE, positioned at the METAFILE +// REVIEW, where does CopyTo leave this stream pointer? +// [dwSize] -- the size of the source METAFILE +// [lWidth] -- the width of the source METAFILE +// REVIEW, in what units? +// REVIEW, why isn't this a DWORD? +// [lHeight] -- the height of the source METAFILE +// REVIEW, in what units? +// REVIEW, why isn't this a DWORD? +// [pstmPMF] -- the IStream instance to which to write the +// placeable METAFILE; on exit, the stream is positioned +// after the written data +// +// Returns: +// HRESULT +// +// Notes: +// +// History: +// 12/02/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL UtMFStmToPlaceableMFStm(LPSTREAM pstmMF, DWORD dwSize, + LONG lWidth, LONG lHeight, LPSTREAM pstmPMF); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtWriteOlePresStmHeader, internal +// +// Synopsis: +// Write out the header information for an Ole presentation stream. +// +// Arguments: +// [lpstream] -- the stream to write to; on exit, the stream is +// positioned after the header information +// [pforetc] -- pointer to the FORMATETC for the presentation +// data +// [dwAdvf] -- the advise control flags for this presentation +// +// Returns: +// HRESULT +// +// Notes: +// This writes the clipboard information, the target device +// information, if any, some FORMATETC data, and the advise +// control flags. +// +// History: +// 12/02/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL UtWriteOlePresStmHeader(LPSTREAM lppstream, LPFORMATETC pforetc, + DWORD dwAdvf); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtReadOlePresStmHeader, internal +// +// Synopsis: +// Reads the presentation description information from an Ole +// presentation stream, as written by +// UtWriteOlePresStmHeader(). +// +// Arguments: +// [pstm] -- the IStream instance to read the presentation +// description data from +// [pforetc] -- pointer to the FORMATETC to initialize based +// on data in the stream +// [pdwAdvf] -- pointer to where to put the advise flags for +// this presentation; may be NULL +// [pfConvert] -- pointer to a flag that is set to TRUE if +// the presentation will require conversion from +// Macintosh PICT format. +// +// Returns: +// HRESULT +// +// Notes: +// +// History: +// 12/02/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL UtReadOlePresStmHeader(LPSTREAM pstm, LPFORMATETC pforetc, + DWORD FAR* pdwAdvf, BOOL FAR* pfConvert); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtOlePresStmToContentsStm, internal +// +// Synopsis: +// Copy the content of a presentation stream to a contents stream, +// adjusting the format as necessary. +// +// Arguments: +// [pstg] -- the IStorage instance in which the presentation +// stream is, and in which to create the contents stream +// [lpszPresStm] -- the name of the source presentation stream +// [fDeletePresStm] -- flag that indicates that the presentation +// stream should be deleted if the copy and convert is +// successful. This is ignored if the source was +// DVASPECT_ICON. +// [puiStatus] -- pointer to a UINT where status bits from +// the CONVERT_* values below may be returned. +// +// Returns: +// HRESULT +// +// Notes: +// The content stream is named by the constant OLE_CONTENTS_STREAM. +// +// History: +// 12/05/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL UtOlePresStmToContentsStm(LPSTORAGE pstg, LPOLESTR lpszPresStm, + BOOL fDeletePresStm, UINT FAR* puiStatus); +#define CONVERT_NOSOURCE 0x0001 +#define CONVERT_NODESTINATION 0x0002 +#define CONVERT_SOURCEISICON 0x0004 + + +FARINTERNAL UtGetHMFPICTFromMSDrawNativeStm(LPSTREAM pstm, DWORD dwSize, + HANDLE FAR* lphdata); + +FARINTERNAL UtPlaceableMFStmToMSDrawNativeStm(LPSTREAM pstmPMF, + LPSTREAM pstmMSDraw); + +FARINTERNAL UtDIBFileStmToPBrushNativeStm(LPSTREAM pstmDIBFile, + LPSTREAM pstmPBrush); + +FARINTERNAL UtContentsStmTo10NativeStm(LPSTORAGE pstg, REFCLSID rclsid, + BOOL fDeleteContents, UINT FAR* puiStatus); + +FARINTERNAL Ut10NativeStmToContentsStm(LPSTORAGE pstg, REFCLSID rclsid, + BOOL fDeleteSrcStm); + + +//+---------------------------------------------------------------------------- +// +// Function: +// UtGetHPRESFromNative, internal +// +// Synopsis: +// Get a handle to a presentation from a native representation. +// +// Arguments: +// [pstg] -- the storage in which the native content is +// [cfFormat] -- the native format to attempt to read +// [fOle10Native] -- attempt to read the OLE10_NATIVE_STREAM +// stream in that format; if this is FALSE, we read the +// OLE_CONTENTS_STREAM +// +// Returns: +// HRESULT +// +// Notes: +// +// History: +// 12/05/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL_(HANDLE) UtGetHPRESFromNative(LPSTORAGE pstg, + CLIPFORMAT cfFormat, BOOL fOle10Native); + +//+------------------------------------------------------------------------- +// +// Function: ConvertPixelsToHIMETRIC +// +// Synopsis: Converts a pixel dimension to HIMETRIC units +// +// Effects: +// +// Arguments: [hdcRef] -- the reference DC +// [ulPels] -- dimension in pixel measurement +// [pulHIMETRIC] -- OUT param of converted HIMETRIC result +// [tDimension] -- indicates XDIMENSION or YDIMENSION of input +// +// Returns: S_OK, E_FAIL +// +// Algorithm: screen_mm * input_pels HIMETRICS/ +// ---------------------- * / == HIMETRICS +// screen_pels /mm +// +// History: dd-mmm-yy Author Comment +// 04-Aug-94 Davepl Created +// +// Notes: We need to know whether the input size is in the X or +// Y dimension, since the aspect ratio could vary +// +//-------------------------------------------------------------------------- + +// This enumeration is used to indicate in which diretion a +// dimension, when passed as a parameter, is to be relative to. +// This is needed for our Pixel -> HIMETRIC conversion function, +// since the aspect ratio could vary by dimension. + +typedef enum tagDIMENSION +{ + XDIMENSION = 'X', + YDIMENSION = 'Y' +} DIMENSION; + +FARINTERNAL ConvertPixelsToHIMETRIC (HDC hdcRef, + ULONG lPels, + ULONG * pulHIMETRIC, + DIMENSION tDimension); + +//+------------------------------------------------------------------------- +// +// Function: IsTaskName +// +// Synopsis: Determines if the passed name is the current task +// +// Effects: +// +// Arguments: [lpszIn] -- Task name +// +// Returns: TRUE, FALSE +// +// History: dd-mmm-yy Author Comment +// 03-Mar-95 Scottsk Created +// +// Notes: +// +//-------------------------------------------------------------------------- +FARINTERNAL_(BOOL) IsTaskName(LPCWSTR lpszIn); + +//+------------------------------------------------------------------------- +// +// Function: UtGetDvtd16Info +// UtConvertDvtd16toDvtd32 +// +// UtGetDvtd32Info +// UtConvertDvtd32toDvtd16 +// +// Synopsis: Utility functions for converting Ansi to Unicode DVTARGETDEVICEs +// +// Algorithm: UtGetDvtdXXInfo gets sizing data, which is then passed to +// UtConvertDvtdXXtoDvtdXX to perform the conversion. +// +// History: 06-May-94 AlexT Created +// +// Notes: Here's a sample usage of these functions: +// +// // pdvtd16 is a Ansi DVTARGETDEVICE +// DVTDINFO dvtdInfo; +// DVTARGETDEVICE pdvtd32; +// +// hr = UtGetDvtd16Info(pdvtd16, &dvtdInfo); +// // check hr +// pdvtd32 = CoTaskMemAlloc(dvtdInfo.cbConvertSize); +// // check pdvtd32 +// hr = UtConvertDvtd16toDvtd32(pdvtd16, &dvtdInfo, pdvtd32); +// // check hr +// // pdvtd32 now contains the converted data +// +//-------------------------------------------------------------------------- + +typedef struct +{ + UINT cbConvertSize; + UINT cchDrvName; + UINT cchDevName; + UINT cchPortName; +} DVTDINFO, *PDVTDINFO; + +extern "C" HRESULT UtGetDvtd16Info(DVTARGETDEVICE const UNALIGNED *pdvtd16, + PDVTDINFO pdvtdInfo); +extern "C" HRESULT UtConvertDvtd16toDvtd32(DVTARGETDEVICE const UNALIGNED *pdvtd16, + DVTDINFO const *pdvtdInfo, + DVTARGETDEVICE *pdvtd32); +extern "C" HRESULT UtGetDvtd32Info(DVTARGETDEVICE const *pdvtd32, + PDVTDINFO pdvtdInfo); +extern "C" HRESULT UtConvertDvtd32toDvtd16(DVTARGETDEVICE const *pdvtd32, + DVTDINFO const *pdvtdInfo, + DVTARGETDEVICE UNALIGNED *pdvtd16); + +#endif // _UTILS_H + + diff --git a/private/ole32/ih/utstream.h b/private/ole32/ih/utstream.h new file mode 100644 index 000000000..e4a03dbcb --- /dev/null +++ b/private/ole32/ih/utstream.h @@ -0,0 +1,205 @@ + +//+---------------------------------------------------------------------------- +// +// File: +// utstream.h +// +// Contents: +// Ole stream utility routines +// +// Classes: +// +// Functions: +// +// History: +// 12/07/93 - ChrisWe - file inspection and cleanup; removed +// redeclarations of ReadStringStream, and +// WriteStringStream which are declared in ole2sp.h; +// made default params on StSetSize explicit; removed +// signatures of obsolete (non-existent) atom reading and +// writing routines +// +//----------------------------------------------------------------------------- + +#ifndef _UTSTREAM_H_ +#define _UTSTREAM_H_ + + + + +// REVIEW, isn't this obsolete now, as StWrite is? +FARINTERNAL_(HRESULT) StRead(IStream FAR * lpstream, LPVOID lpBuf, ULONG ulLen); + +#define StWrite(lpstream, lpBuf, ulLen) lpstream->Write(lpBuf, ulLen, NULL) + +//+---------------------------------------------------------------------------- +// +// Function: +// StSetSize, internal +// +// Synopsis: +// Sets the size of the stream, using IStream::SetSize(). Saves +// the caller having to deal with the requisite ULARGE_INTEGER +// parameter, by initializing one from the [dwSize] argument. +// +// Arguments: +// [pstm] -- the stream to set the size of +// [dwSize] -- the size to set +// [fRelative] -- if TRUE, indicates that the size is [dwSize] +// plus the current seek position in the stream; if +// FALSE, sets [dwSize] as the absolute size +// +// Returns: +// HRESULT +// +// Notes: +// REVIEW, this seems crocked. When would you ever call +// this with [fRelative] == TRUE, and a non-zero [dwSize]? +// +// History: +// 12/07/93 - ChrisWe - file inspection and cleanup +// +//----------------------------------------------------------------------------- +FARINTERNAL StSetSize(LPSTREAM pstm, DWORD dwSize, BOOL fRelative); + + +// REVIEW, are the the following functions necessary anymore? +FARINTERNAL StSave10NativeData(IStorage FAR* pstgSave, HANDLE hNative, + BOOL fIsOle1Interop); + +FARINTERNAL StRead10NativeData(IStorage FAR* pstgSave, HANDLE FAR *phNative); + +FARINTERNAL StSave10ItemName(IStorage FAR* pstg, LPCSTR szItemName); + + + +//+--------------------------------------------------------------------------- +// +// Class: CStmBuf, Base class. +// +// Synopsis: Internal buffered Streams. +// +// Interfaces: CStmBuf - Constructor. +// ~CStmBuf - Destructor. +// Release - Release interface (used with OpenStream). +// +// History: 20-Feb-95 KentCe Created. +// +// Notes: This is a simple buffered class for internal use only. +// +//---------------------------------------------------------------------------- +class CStmBuf +{ +public: + CStmBuf(); + ~CStmBuf(); + +protected: + IStream * m_pStm; // Stream Interface to read/write. + + BYTE m_aBuffer[256]; // Small read/write buffer. + + PBYTE m_pBuffer; // Pointer into read/write buffer. + ULONG m_cBuffer; // Count of characters in read/write buffer. +}; + + +//+--------------------------------------------------------------------------- +// +// Class: CStmBufRead +// +// Synopsis: Internal buffered read of Streams. +// +// Interfaces: Init - Defines stream to read. +// OpenStream - Opens a stream for reading. +// Read - Read from the stream. +// ReadLong - Read a long value from the stream. +// Release - Release interface (used with OpenStream). +// +// History: 20-Feb-95 KentCe Created. +// +// Notes: This is a simple buffered read class for internal use only. +// +//---------------------------------------------------------------------------- +class CStmBufRead : public CStmBuf +{ +public: + void Init(IStream * pstm); + HRESULT OpenStream(IStorage * pstg, const OLECHAR * pwcsName); + HRESULT Read(PVOID pBuf, ULONG cBuf); + HRESULT ReadLong(LONG * plValue); + void Release(); + +private: + void Reset(void); +}; + + +//+--------------------------------------------------------------------------- +// +// Class: CStmBufWrite +// +// Synopsis: Internal buffered write of Streams. +// +// Interfaces: Init - Defines stream to write. +// OpenOrCreateStream - Opens/Creates a stream for writing. +// CreateStream - Creates a stream for writing. +// Write - Write to the stream. +// WriteLong - Write a long value to the stream. +// Flush - Flush buffer to the disk subsystem. +// Release - Release interface. +// +// History: 20-Feb-95 KentCe Created. +// +// Notes: This is a simple buffered write class for internal use only. +// +//---------------------------------------------------------------------------- +class CStmBufWrite : public CStmBuf +{ +public: + void Init(IStream * pstm); + HRESULT OpenOrCreateStream(IStorage * pstg, const OLECHAR * pwcsName); + HRESULT CreateStream(IStorage * pstg, const OLECHAR * pwcsName); + HRESULT Write(void const * pBuf, ULONG cBuf); + HRESULT WriteLong(LONG lValue); + HRESULT Flush(void); + void Release(); + +private: + void Reset(void); +}; + + +// +// The following was moved from the ole2sp.h file to keep stream related API's +// in one place. +// + +// Utility function not in the spec; in ole2.dll. +// Read and write length-prefixed strings. Open/Create stream. +// ReadStringStream does allocation, returns length of +// required buffer (strlen + 1 for terminating null) + +STDAPI ReadStringStream( CStmBufRead & StmRead, LPOLESTR FAR * ppsz ); +STDAPI WriteStringStream( CStmBufWrite & StmWrite, LPCOLESTR psz ); +STDAPI OpenOrCreateStream( IStorage FAR * pstg, const OLECHAR FAR * pwcsName, + IStream FAR* FAR* ppstm); + +// +// The following versions of StringStream are used with ANSI data +// +STDAPI ReadStringStreamA( CStmBufRead & StmRead, LPSTR FAR * ppsz ); + + +// read and write ole control stream (in ole2.dll) +STDAPI WriteOleStg (LPSTORAGE pstg, IOleObject FAR* pOleObj, + DWORD dwReserved, LPSTREAM FAR* ppstmOut); +STDAPI ReadOleStg (LPSTORAGE pstg, DWORD FAR* pdwFlags, + DWORD FAR* pdwOptUpdate, DWORD FAR* pdwReserved, + LPMONIKER FAR* ppmk, LPSTREAM FAR* pstmOut); +STDAPI ReadM1ClassStm(LPSTREAM pstm, CLSID FAR* pclsid); +STDAPI WriteM1ClassStm(LPSTREAM pstm, REFCLSID rclsid); +STDAPI ReadM1ClassStmBuf(CStmBufRead & StmRead, CLSID FAR* pclsid); +STDAPI WriteM1ClassStmBuf(CStmBufWrite & StmWrite, REFCLSID rclsid); + +#endif // _UTSTREAM_H diff --git a/private/ole32/ih/valid.h b/private/ole32/ih/valid.h new file mode 100644 index 000000000..73dcd51c3 --- /dev/null +++ b/private/ole32/ih/valid.h @@ -0,0 +1,323 @@ +#ifndef __IH_VALID__H__ +#define __IH_VALID__H__ + +#if DBG==1 && defined(WIN32) && !defined(_CHICAGO_) +#define VDATEHEAP() if( !HeapValidate(GetProcessHeap(),0,0)){ DebugBreak();} +#else +#define VDATEHEAP() +#endif // DBG==1 && defined(WIN32) && !defined(_CHICAGO_) + +#define IsValidPtrIn(pv,cb) ((pv == NULL) || !IsBadReadPtr ((pv),(cb))) +#define IsValidReadPtrIn(pv,cb) (!IsBadReadPtr ((pv),(cb))) +#define IsValidPtrOut(pv,cb) (!IsBadWritePtr((pv),(cb))) + +STDAPI_(BOOL) IsValidInterface( void FAR* pv ); + + +#if DBG==1 +// for performance, do not do in retail builds +STDAPI_(BOOL) IsValidIid( REFIID riid ); +#else +#define IsValidIid(x) (TRUE) +#endif + +#ifdef _DEBUG + +DECLARE_DEBUG(VDATE); + +#define VdateAssert(exp, msg) \ + VDATEInlineDebugOut( DEB_FORCE, "%s:%s; File: %s Line: %d\n", #exp, msg, __FILE__, __LINE__ ) + +//** POINTER IN validation macros: +#define VDATEPTRIN( pv, TYPE ) \ + if (!IsValidPtrIn( (pv), sizeof(TYPE))) \ + return (VdateAssert(pv, "Invalid in ptr"),ResultFromScode(E_INVALIDARG)) +#define GEN_VDATEPTRIN( pv, TYPE, retval) \ + if (!IsValidPtrIn( (pv), sizeof(TYPE))) \ + return (VdateAssert(pv, "Invalid in ptr"), retval) +#define VOID_VDATEPTRIN( pv, TYPE ) \ + if (!IsValidPtrIn( (pv), sizeof(TYPE))) {\ + VdateAssert(pv, "Invalid in ptr"); return; } + +//** POINTER IN validation macros for single entry/single exit functions +//** uses a goto instead of return +#define VDATEPTRIN_LABEL(pv, TYPE, label, retVar) \ + if (!IsValidPtrIn((pv), sizeof(TYPE))) \ + { retVar = (VdateAssert(pv, "Invalid in ptr"), ResultFromScode(E_INVALIDARG)); \ + goto label; } +#define GEN_VDATEPTRIN_LABEL(pv, TYPE, retval, label, retVar) \ + if (!IsValidPtrIn((pv), sizeof(TYPE))) \ + { retVar = (VdateAssert(pv, "Invalid in ptr"), retval); \ + goto label; } +#define VOID_VDATEPTRIN_LABEL(pv, TYPE, label) \ + if (!IsValidPtrIn((pv), sizeof(TYPE))) \ + { VdateAssert(pv, "Invalid in ptr"); goto label; } + + +//** READ POINTER IN validation macros: +#define VDATEREADPTRIN( pv, TYPE ) \ + if (!IsValidReadPtrIn( (pv), sizeof(TYPE))) \ + return (VdateAssert(pv,"Invalid in read ptr"),ResultFromScode(E_INVALIDARG)) +#define GEN_VDATEREADPTRIN( pv, TYPE, retval) \ + if (!IsValidReadPtrIn( (pv), sizeof(TYPE))) \ + return (VdateAssert(pv,"Invalid in read ptr"), retval) +#define VOID_VDATEREADPTRIN( pv, TYPE ) \ + if (!IsValidReadPtrIn( (pv), sizeof(TYPE))) {\ + VdateAssert(pv,"Invalid in read ptr"); return; } + +//** READ POINTER IN validation macros for single entry/single exit functions +//** uses a goto instead of return +#define VDATEREADPTRIN_LABEL(pv, TYPE, label, retVar) \ + if (!IsValidReadPtrIn((pv), sizeof(TYPE))) \ + { retVar = (VdateAssert(pv, "Invalid in read ptr"), ResultFromScode(E_INVALIDARG)); \ + goto label; } +#define GEN_VDATEREADPTRIN_LABEL(pv, TYPE, retval, label, retVar) \ + if (!IsValidReadPtrIn((pv), sizeof(TYPE))) \ + { retVar = (VdateAssert(pv, "Invalid in read ptr"), retval); \ + goto label; } +#define VOID_VDATEREADPTRIN_LABEL(pv, TYPE, label) \ + if (!IsValidReadPtrIn((pv), sizeof(TYPE))) \ + { VdateAssert(pv, "Invalid in read ptr"); goto label; } + +//** READ POINTER IN validation macros for single entry/single exit functions +//** uses a goto instead of return and a byte count instead of a TYPE +#define VDATESIZEREADPTRIN_LABEL(pv, cb, label, retVar) \ + if (!IsValidReadPtrIn((pv), cb)) \ + { retVar = (VdateAssert(pv, "Invalid in read ptr"), ResultFromScode(E_INVALIDARG)); \ + goto label; } +#define GEN_VDATESIZEREADPTRIN_LABEL(pv, cb, retval, label, retVar) \ + if (!IsValidReadPtrIn((pv), cb)) \ + { retVar = (VdateAssert(pv, "Invalid in read ptr"), retval); \ + goto label; } +#define VOID_VDATESIZEREADPTRIN_LABEL(pv, cb, label) \ + if (!IsValidReadPtrIn((pv), cb)) \ + { VdateAssert(pv, "Invalid in read ptr"); goto label; } + + +//** POINTER OUT validation macros: +#define VDATEPTROUT( pv, TYPE ) \ + if (!IsValidPtrOut( (pv), sizeof(TYPE))) \ + return (VdateAssert(pv,"Invalid out ptr"),ResultFromScode(E_INVALIDARG)) +#define GEN_VDATEPTROUT( pv, TYPE, retval ) \ + if (!IsValidPtrOut( (pv), sizeof(TYPE))) \ + return (VdateAssert(pv,"Invalid out ptr"), retval) + +//** POINTER OUT validation macros for single entry/single exit functions +//** uses a goto instead of return +#define VDATEPTROUT_LABEL( pv, TYPE, label, retVar ) \ + if (!IsValidPtrOut( (pv), sizeof(TYPE))) \ + { retVar = (VdateAssert(pv,"Invalid out ptr"),ResultFromScode(E_INVALIDARG)); \ + goto label; } +#define GEN_VDATEPTROUT_LABEL( pv, TYPE, retval, label, retVar ) \ + if (!IsValidPtrOut( (pv), sizeof(TYPE))) \ + { retVar = (VdateAssert(pv,"Invalid out ptr"),retval); \ + goto label; } + +//** POINTER OUT validation macros for single entry/single exit functions +//** uses a goto instead of return and a byte count instead of a TYPE +#define VDATESIZEPTROUT_LABEL(pv, cb, label, retVar) \ + if (!IsValidPtrOut((pv), cb)) \ + { retVar = (VdateAssert(pv, "Invalid out ptr"), ResultFromScode(E_INVALIDARG)); \ + goto label; } +#define GEN_VDATESIZEPTROUT_LABEL(pv, cb, retval, label, retVar) \ + if (!IsValidPtrOut((pv), cb)) \ + { retVar = (VdateAssert(pv, "Invalid out ptr"), retval); \ + goto label; } + + +//** POINTER is NULL validation macros +#define VDATEPTRNULL_LABEL(pv, label, retVar) \ + if ((pv) != NULL) \ + { retVar = (VdateAssert(pv, "Ptr should be NULL"), ResultFromScode(E_INVALIDARG)); \ + goto label; } +#define GEN_VDATEPTRNULL_LABEL(pv, retval, label, retVar) \ + if ((pv) != NULL) \ + { retVar = (VdateAssert(pv, "Ptr should be NULL"), retval); \ + goto label; } + +//** INTERFACE validation macro: +#define GEN_VDATEIFACE( pv, retval ) \ + if (!IsValidInterface(pv)) \ + return (VdateAssert(pv,"Invalid interface"), retval) +#define VDATEIFACE( pv ) \ + if (!IsValidInterface(pv)) \ + return (VdateAssert(pv,"Invalid interface"),ResultFromScode(E_INVALIDARG)) +#define VOID_VDATEIFACE( pv ) \ + if (!IsValidInterface(pv)) {\ + VdateAssert(pv,"Invalid interface"); return; } + +//** INTERFACE validation macros for single entry/single exit functions +//** uses a goto instead of return +#define GEN_VDATEIFACE_LABEL( pv, retval, label, retVar ) \ + if (!IsValidInterface(pv)) \ + { retVar = (VdateAssert(pv,"Invalid interface"),retval); \ + goto label; } +#define VDATEIFACE_LABEL( pv, label, retVar ) \ + if (!IsValidInterface(pv)) \ + { retVar = (VdateAssert(pv,"Invalid interface"),ResultFromScode(E_INVALIDARG)); \ + goto label; } +#define VOID_VDATEIFACE_LABEL( pv, label ) \ + if (!IsValidInterface(pv)) {\ + VdateAssert(pv,"Invalid interface"); goto label; } + +//** INTERFACE ID validation macro: +// Only do this in debug build +#define VDATEIID( iid ) if (!IsValidIid( iid )) \ + return (VdateAssert(iid,"Invalid iid"),ResultFromScode(E_INVALIDARG)) +#define GEN_VDATEIID( iid, retval ) if (!IsValidIid( iid )) {\ + VdateAssert(iid,"Invalid iid"); return retval; } + +//** INTERFACE ID validation macros for single entry/single exit functions +//** uses a goto instead of return +#define VDATEIID_LABEL( iid, label, retVar ) if (!IsValidIid( iid )) \ + {retVar = (VdateAssert(iid,"Invalid iid"),ResultFromScode(E_INVALIDARG)); \ + goto label; } +#define GEN_VDATEIID_LABEL( iid, retval, label, retVar ) if (!IsValidIid( iid )) {\ + VdateAssert(iid,"Invalid iid"); retVar = retval; goto label; } + + +#else // _DEBUG + + +#define VdateAssert(exp, msg) ((void)0) + +// --assertless macros for non-debug case +//** POINTER IN validation macros: +#define VDATEPTRIN( pv, TYPE ) if (!IsValidPtrIn( (pv), sizeof(TYPE))) \ + return (ResultFromScode(E_INVALIDARG)) +#define GEN_VDATEPTRIN( pv, TYPE, retval ) if (!IsValidPtrIn( (pv), sizeof(TYPE))) \ + return (retval) +#define VOID_VDATEPTRIN( pv, TYPE ) if (!IsValidPtrIn( (pv), sizeof(TYPE))) {\ + return; } + +//** POINTER IN validation macros for single entry/single exit functions +//** uses a goto instead of return +#define VDATEPTRIN_LABEL(pv, TYPE, label, retVar) \ + if (!IsValidPtrIn((pv), sizeof(TYPE))) \ + { retVar = ResultFromScode(E_INVALIDARG); \ + goto label; } +#define GEN_VDATEPTRIN_LABEL(pv, TYPE, retval, label, retVar) \ + if (!IsValidPtrIn((pv), sizeof(TYPE))) \ + { retVar = retval; \ + goto label; } +#define VOID_VDATEPTRIN_LABEL(pv, TYPE, label) \ + if (!IsValidPtrIn((pv), sizeof(TYPE))) \ + { goto label; } + +//** POINTER IN validation macros: +#define VDATEREADPTRIN( pv, TYPE ) if (!IsValidReadPtrIn( (pv), sizeof(TYPE))) \ + return (ResultFromScode(E_INVALIDARG)) +#define GEN_VDATEREADPTRIN( pv, TYPE, retval ) if (!IsValidReadPtrIn( (pv), sizeof(TYPE))) \ + return (retval) +#define VOID_VDATEREADPTRIN( pv, TYPE ) if (!IsValidReadPtrIn( (pv), sizeof(TYPE))) {\ + return; } + +//** POINTER IN validation macros for single entry/single exit functions +//** uses a goto instead of return +#define VDATEREADPTRIN_LABEL(pv, TYPE, label, retVar) \ + if (!IsValidReadPtrIn((pv), sizeof(TYPE))) \ + { retVar = ResultFromScode(E_INVALIDARG); \ + goto label; } +#define GEN_VDATEREADPTRIN_LABEL(pv, TYPE, retval, label, retVar) \ + if (!IsValidReadPtrIn((pv), sizeof(TYPE))) \ + { retVar = retval; \ + goto label; } +#define VOID_VDATEREADPTRIN_LABEL(pv, TYPE, label) \ + if (!IsValidReadPtrIn((pv), sizeof(TYPE))) \ + { goto label; } + +//** READ POINTER IN validation macros for single entry/single exit functions +//** uses a goto instead of return and a byte count instead of a TYPE +#define VDATESIZEREADPTRIN_LABEL(pv, cb, label, retVar) \ + if (!IsValidReadPtrIn((pv), cb)) \ + { retVar = ResultFromScode(E_INVALIDARG); \ + goto label; } +#define GEN_VDATESIZEREADPTRIN_LABEL(pv, cb, retval, label, retVar) \ + if (!IsValidReadPtrIn((pv), cb)) \ + { retVar = retval; \ + goto label; } +#define VOID_VDATESIZEREADPTRIN_LABEL(pv, cb, label) \ + if (!IsValidReadPtrIn((pv), cb)) \ + { goto label; } + + +//** POINTER OUT validation macros: +#define VDATEPTROUT( pv, TYPE ) if (!IsValidPtrOut( (pv), sizeof(TYPE))) \ + return (ResultFromScode(E_INVALIDARG)) + +#define GEN_VDATEPTROUT( pv, TYPE, retval ) if (!IsValidPtrOut( (pv), sizeof(TYPE))) \ + return (retval) + +//** POINTER OUT validation macros for single entry/single exit functions +//** uses a goto instead of return +#define VDATEPTROUT_LABEL( pv, TYPE, label, retVar ) \ + if (!IsValidPtrOut( (pv), sizeof(TYPE))) \ + { retVar = ResultFromScode(E_INVALIDARG); \ + goto label; } +#define GEN_VDATEPTROUT_LABEL( pv, TYPE, retval, label, retVar ) \ + if (!IsValidPtrOut( (pv), sizeof(TYPE))) \ + { retVar = retval; \ + goto label; } + +//** POINTER OUT validation macros for single entry/single exit functions +//** uses a goto instead of return and a byte count instead of a TYPE +#define VDATESIZEPTROUT_LABEL(pv, cb, label, retVar) \ + if (!IsValidPtrOut((pv), cb)) \ + { retVar = ResultFromScode(E_INVALIDARG); \ + goto label; } +#define GEN_VDATESIZEPTROUT_LABEL(pv, cb, retval, label, retVar) \ + if (!IsValidPtrOut((pv), cb)) \ + { retVar = retval; \ + goto label; } + + +//** POINTER is NULL validation macros +#define VDATEPTRNULL_LABEL(pv, label, retVar) \ + if ((pv) != NULL) \ + { retVar = ResultFromScode(E_INVALIDARG); \ + goto label; } +#define GEN_VDATEPTRNULL_LABEL(pv, retval, label, retVar) \ + if ((pv) != NULL) \ + { retVar = retval; \ + goto label; } + +//** INTERFACE validation macro: +#define VDATEIFACE( pv ) if (!IsValidInterface(pv)) \ + return (ResultFromScode(E_INVALIDARG)) +#define VOID_VDATEIFACE( pv ) if (!IsValidInterface(pv)) \ + return; +#define GEN_VDATEIFACE( pv, retval ) if (!IsValidInterface(pv)) \ + return (retval) + +//** INTERFACE validation macros for single entry/single exit functions +//** uses a goto instead of return +#define GEN_VDATEIFACE_LABEL( pv, retval, label, retVar ) \ + if (!IsValidInterface(pv)) \ + { retVar = retval; \ + goto label; } +#define VDATEIFACE_LABEL( pv, label, retVar ) \ + if (!IsValidInterface(pv)) \ + { retVar = ResultFromScode(E_INVALIDARG); \ + goto label; } +#define VOID_VDATEIFACE_LABEL( pv, label ) \ + if (!IsValidInterface(pv)) {\ + goto label; } + +//** INTERFACE ID validation macro: +// do not do in retail build. This code USED to call a bogus version of +// IsValidIID that did no work. Now we are faster and no less stable than before. +#define VDATEIID( iid ) ((void)0) +#define GEN_VDATEIID( iid, retval ) ((void)0); + +//** INTERFACE ID validation macros for single entry/single exit functions +//** uses a goto instead of return +#define VDATEIID_LABEL( iid, label, retVar ) if (!IsValidIid( iid )) \ + {retVar = ResultFromScode(E_INVALIDARG); \ + goto label; } +#define GEN_VDATEIID_LABEL( iid, retval, label, retVar ) if (!IsValidIid( iid )) {\ + retVar = retval; goto label; } + +#endif + +#endif // __IH_VALID_H__ + diff --git a/private/ole32/ih/verole.h b/private/ole32/ih/verole.h new file mode 100644 index 000000000..17149e129 --- /dev/null +++ b/private/ole32/ih/verole.h @@ -0,0 +1,5 @@ +#define rmj 1 +#define rmm 824 +#define rup 1 +#define szVerName "" +#define szVerUser "kevinro" diff --git a/private/ole32/ih/widewrap.h b/private/ole32/ih/widewrap.h new file mode 100644 index 000000000..f01dda088 --- /dev/null +++ b/private/ole32/ih/widewrap.h @@ -0,0 +1,783 @@ +//+--------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1993 - 1993. +// +// File: widewrap.h +// +// Contents: Wrapper functions for Win32c API used by 32-bit OLE 2 +// +// History: 12-27-93 ErikGav Created +// 06-14-94 KentCe Various Chicago build fixes. +// +//---------------------------------------------------------------------------- + +#ifndef _WIDEWRAP_H_ +#define _WIDEWRAP_H_ + +#ifndef RC_INVOKED +#pragma message ("INCLUDING WIDEWRAP.H from " __FILE__) +#endif /* RC_INVOKED */ + +#ifdef _CHICAGO_ + +#ifdef __cplusplus +extern "C" { +#endif + +#undef WNDCLASS +#define WNDCLASS WNDCLASSW +#define WNDCLASST WNDCLASSA + +#undef STARTUPINFO +#define STARTUPINFO STARTUPINFOW + +#undef WIN32_FIND_DATA +#define WIN32_FIND_DATA WIN32_FIND_DATAW + +HANDLE +WINAPI +CreateFileX( + LPCWSTR lpFileName, + DWORD dwDesiredAccess, + DWORD dwShareMode, + LPSECURITY_ATTRIBUTES lpSecurityAttributes, + DWORD dwCreationDisposition, + DWORD dwFlagsAndAttributes, + HANDLE hTemplateFile + ); + +#undef CreateFile +#define CreateFile CreateFileX +#define CreateFileT CreateFileA + +BOOL +WINAPI +DeleteFileX( + LPCWSTR lpFileName + ); + +#undef DeleteFile +#define DeleteFile DeleteFileX +#define DeleteFileT DeleteFileA + +UINT +WINAPI +RegisterClipboardFormatX( + LPCWSTR lpszFormat); + +#undef RegisterClipboardFormat +#define RegisterClipboardFormat RegisterClipboardFormatX +#define RegisterClipboardFormatT RegisterClipboardFormatA + +int +WINAPI +GetClipboardFormatNameX( + UINT format, + LPWSTR lpszFormatName, + int cchMaxCount); + +#undef GetClipboardFormatName +#define GetClipboardFormatName GetClipboardFormatNameX +#define GetClipboardFormatNameT GetClipboardFormatNameA + +LONG +APIENTRY +RegOpenKeyX ( + HKEY hKey, + LPCWSTR lpSubKey, + PHKEY phkResult + ); + +#undef RegOpenKey +#define RegOpenKey RegOpenKeyX +#define RegOpenKeyT RegOpenKeyA + +LONG +APIENTRY +RegQueryValueX ( + HKEY hKey, + LPCWSTR lpSubKey, + LPWSTR lpValue, + PLONG lpcbValue + ); + +#undef RegQueryValue +#define RegQueryValue RegQueryValueX +#define RegQueryValueT RegQueryValueA +LONG +APIENTRY +RegSetValueX ( + HKEY hKey, + LPCWSTR lpSubKey, + DWORD dwType, + LPCWSTR lpData, + DWORD cbData + ); + +#undef RegSetValue +#define RegSetValue RegSetValueX +#define RegSetValueT RegSetValueA + +UINT +WINAPI +RegisterWindowMessageX( + LPCWSTR lpString); + +#undef RegisterWindowMessage +#define RegisterWindowMessage RegisterWindowMessageX +#define RegisterWindowMessageT RegisterWindowMessageA + +LONG +APIENTRY +RegOpenKeyExX ( + HKEY hKey, + LPCWSTR lpSubKey, + DWORD ulOptions, + REGSAM samDesired, + PHKEY phkResult + ); + +#undef RegOpenKeyEx +#define RegOpenKeyEx RegOpenKeyExX +#define RegOpenKeyExT RegOpenKeyExA + +LONG +APIENTRY +RegQueryValueExX ( + HKEY hKey, + LPWSTR lpValueName, + LPDWORD lpReserved, + LPDWORD lpType, + LPBYTE lpData, + LPDWORD lpcbData + ); + +#undef RegQueryValueEx +#define RegQueryValueEx RegQueryValueExX +#define RegQueryValueExT RegQueryValueExA + +HWND +WINAPI +CreateWindowExX( + DWORD dwExStyle, + LPCWSTR lpClassName, + LPCWSTR lpWindowName, + DWORD dwStyle, + int X, + int Y, + int nWidth, + int nHeight, + HWND hWndParent , + HMENU hMenu, + HINSTANCE hInstance, + LPVOID lpParam); + +#undef CreateWindowEx +#define CreateWindowEx CreateWindowExX +#define CreateWindowExT CreateWindowExA + +ATOM +WINAPI +RegisterClassX( + CONST WNDCLASSW *lpWndClass); + +#undef RegisterClass +#define RegisterClass RegisterClassX +#define RegisterClassT RegisterClassA + +BOOL +WINAPI +UnregisterClassX( + LPCWSTR lpClassName, + HINSTANCE hInstance); + +#undef UnregisterClass +#define UnregisterClass UnregisterClassX +#define UnregisterClassT UnregisterClassA + +int WINAPIV wsprintfX(LPWSTR pwszOut, LPCWSTR pwszFormat, ...); + +#undef wsprintf +#define wsprintf wsprintfX +#define wsprintfT wsprintfA + +HWND +WINAPI +CreateWindowX( + LPCWSTR lpClassName, + LPCWSTR lpWindowName, + DWORD dwStyle, + int X, + int Y, + int nWidth, + int nHeight, + HWND hWndParent , + HMENU hMenu, + HINSTANCE hInstance, + LPVOID lpParam); + +#undef CreateWindow +#define CreateWindow CreateWindowX +#define CreateWindowT CreateWindowA + +HANDLE +WINAPI +GetPropX( + HWND hWnd, + LPCWSTR lpString); + +#undef GetProp +#define GetProp GetPropX +#define GetPropT GetPropA + +BOOL +WINAPI +SetPropX( + HWND hWnd, + LPCWSTR lpString, + HANDLE hData); + +#undef SetProp +#define SetProp SetPropX +#define SetPropT SetPropA + +HANDLE +WINAPI +RemovePropX( + HWND hWnd, + LPCWSTR lpString); + +#undef RemoveProp +#define RemoveProp RemovePropX +#define RemovePropT RemovePropA + +UINT +WINAPI +GetProfileIntX( + LPCWSTR lpAppName, + LPCWSTR lpKeyName, + INT nDefault + ); + +#undef GetProfileInt +#define GetProfileInt GetProfileIntX +#define GetProfileIntT GetProfileIntA + +ATOM +WINAPI +GlobalAddAtomX( + LPCWSTR lpString + ); + +#undef GlobalAddAtom +#define GlobalAddAtom GlobalAddAtomX +#define GlobalAddAtomT GlobalAddAtomA + +UINT +WINAPI +GlobalGetAtomNameX( + ATOM nAtom, + LPWSTR lpBuffer, + int nSize + ); + +#undef GlobalGetAtomName +#define GlobalGetAtomName GlobalGetAtomNameX +#define GlobalGetAtomNameT GlobalGetAtomNameA + +DWORD +WINAPI +GetModuleFileNameX( + HMODULE hModule, + LPWSTR lpFilename, + DWORD nSize + ); + +#undef GetModuleFileName +#define GetModuleFileName GetModuleFileNameX +#define GetModuleFileNameT GetModuleFileNameA + +LPWSTR +WINAPI +CharPrevX( + LPCWSTR lpszStart, + LPCWSTR lpszCurrent); + +#undef CharPrev +#define CharPrev CharPrevX +#define CharPrevT CharPrevA + +HFONT WINAPI CreateFontX(int, int, int, int, int, DWORD, + DWORD, DWORD, DWORD, DWORD, DWORD, + DWORD, DWORD, LPCWSTR); +#undef CreateFont +#define CreateFont CreateFontX +#define CreateFontT CreateFontA + +HMODULE +WINAPI +LoadLibraryX( + LPCWSTR lpLibFileName + ); + +#undef LoadLibrary +#define LoadLibrary LoadLibraryX +#define LoadLibraryT LoadLibraryA + +HMODULE +WINAPI +LoadLibraryExX( + LPCWSTR lpLibFileName, + HANDLE hFile, + DWORD dwFlags + ); + +#undef LoadLibraryEx +#define LoadLibraryEx LoadLibraryExX +#define LoadLibraryExT LoadLibraryExA + +LONG +APIENTRY +RegDeleteKeyX ( + HKEY hKey, + LPCWSTR lpSubKey + ); + +#undef RegDeleteKey +#define RegDeleteKey RegDeleteKeyX +#define RegDeleteKeyT RegDeleteKeyA + +#undef RpcStringBindingCompose +#define RpcStringBindingCompose RpcStringBindingComposeW + +#undef RpcBindingFromStringBinding +#define RpcBindingFromStringBinding RpcBindingFromStringBindingW + +#undef RpcStringFree +#define RpcStringFree RpcStringFreeW + +BOOL +WINAPI +CreateProcessX( + LPCWSTR lpApplicationName, + LPWSTR lpCommandLine, + LPSECURITY_ATTRIBUTES lpProcessAttributes, + LPSECURITY_ATTRIBUTES lpThreadAttributes, + BOOL bInheritHandles, + DWORD dwCreationFlags, + LPVOID lpEnvironment, + LPCWSTR lpCurrentDirectory, + LPSTARTUPINFOW lpStartupInfo, + LPPROCESS_INFORMATION lpProcessInformation + ); + +#undef CreateProcess +#define CreateProcess CreateProcessX +#define CreateProcessT CreateProcessA + +LONG +APIENTRY +RegEnumKeyExX ( + HKEY hKey, + DWORD dwIndex, + LPWSTR lpName, + LPDWORD lpcbName, + LPDWORD lpReserved, + LPWSTR lpClass, + LPDWORD lpcbClass, + PFILETIME lpftLastWriteTime + ); + +#undef RegEnumKeyEx +#define RegEnumKeyEx RegEnumKeyExX +#define RegEnumKeyExT RegEnumKeyExA + +#undef RpcServerUseProtseqEp +#define RpcServerUseProtseqEp RpcServerUseProtseqEpW + +BOOL +WINAPI +AppendMenuX( + HMENU hMenu, + UINT uFlags, + UINT uIDNewItem, + LPCWSTR lpNewItem + ); + +#undef AppendMenu +#define AppendMenu AppendMenuX +#define AppendMenuT AppendMenuA + +HANDLE +WINAPI +OpenEventX( + DWORD dwDesiredAccess, + BOOL bInheritHandle, + LPCWSTR lpName + ); + +#undef OpenEvent +#define OpenEvent OpenEventX +#define OpenEventT OpenEventA + +HANDLE +WINAPI +CreateEventX( + LPSECURITY_ATTRIBUTES lpEventAttributes, + BOOL bManualReset, + BOOL bInitialState, + LPCWSTR lpName + ); + +#undef CreateEvent +#define CreateEvent CreateEventX +#define CreateEventT CreateEventA + +UINT +WINAPI +GetDriveTypeX( + LPCWSTR lpRootPathName + ); + +#undef GetDriveType +#define GetDriveType GetDriveTypeX +#define GetDriveTypeT GetDriveTypeA + +DWORD +WINAPI +GetFileAttributesX( + LPCWSTR lpFileName + ); + +#undef GetFileAttributes +#define GetFileAttributes GetFileAttributesX +#define GetFileAttributesT GetFileAttributesA + +LONG +APIENTRY +RegEnumKeyX ( + HKEY hKey, + DWORD dwIndex, + LPWSTR lpName, + DWORD cbName + ); + +#undef RegEnumKey +#define RegEnumKey RegEnumKeyX +#define RegEnumKeyT RegEnumKeyA + +HANDLE +WINAPI +FindFirstFileX( + LPCWSTR lpFileName, + LPWIN32_FIND_DATAW lpFindFileData + ); + +#undef FindFirstFile +#define FindFirstFile FindFirstFileX +#define FindFirstFileT FindFirstFileA + +#undef RegisterProtseq +#define RegisterProtseq RegisterProtseqW + +#undef RpcStringBindingParse +#define RpcStringBindingParse RpcStringBindingParseW + +#undef RpcNetworkIsProtseqValid +#define RpcNetworkIsProtseqValid RpcNetworkIsProtseqValidW + +#undef RpcBindingToStringBinding +#define RpcBindingToStringBinding RpcBindingToStringBindingW + +#undef RpcServerUseProtseq +#define RpcServerUseProtseq RpcServerUseProtseqW + +BOOL +WINAPI +GetComputerNameX ( + LPWSTR lpBuffer, + LPDWORD nSize + ); + +#undef GetComputerName +#define GetComputerName GetComputerNameX +#define GetComputerNameT GetComputerNameA + +#undef Foo +#define Foo FooW + +#undef Foo +#define Foo FooW + +#undef Foo +#define Foo FooW + +//The following force Chicago to directly use the ANSI versions + +#undef DefWindowProc +#define DefWindowProc DefWindowProcA + +#undef CopyMetaFile // Currently str ptr is always +#define CopyMetaFile CopyMetaFileA // null, write a wrapper if this + // changes +#undef CreateMetaFile +#define CreateMetaFile CreateMetaFileA + +#undef PostMessage +#define PostMessage PostMessageA + +#undef SendMessage +#define SendMessage SendMessageA + +#undef PeekMessage +#define PeekMessage PeekMessageA + +#undef DispatchMessage +#define DispatchMessage DispatchMessageA + +#undef GetWindowLong +#define GetWindowLong GetWindowLongA + +#undef SetWindowLong +#define SetWindowLong SetWindowLongA + +DWORD +WINAPI +GetShortPathNameX( + LPCWSTR lpszLongPath, + LPWSTR lpszShortPath, + DWORD cchBuffer + ); + +#undef GetShortPathName +#define GetShortPathName GetShortPathNameX +#define GetShortPathNameT GetShortPathNameA + +DWORD +WINAPI +GetFullPathNameX( + LPCWSTR lpFileName, + DWORD nBufferLength, + LPWSTR lpBuffer, + LPWSTR *lpFilePart + ); + +#undef GetFullPathName +#define GetFullPathName GetFullPathNameX +#define GetFullPathNameT GetFullPathNameA + +DWORD +WINAPI +SearchPathX( + LPCWSTR lpPath, + LPCWSTR lpFileName, + LPCWSTR lpExtension, + DWORD nBufferLength, + LPWSTR lpBuffer, + LPWSTR *lpFilePart + ); + +#undef SearchPath +#define SearchPath SearchPathX +#define SearchPathT SearchPathA + +ATOM +WINAPI +GlobalFindAtomX( + LPCWSTR lpString + ); + +#undef GlobalFindAtom +#define GlobalFindAtom GlobalFindAtomX +#define GlobalFindAtomT GlobalFindAtomA + +int +WINAPI +GetClassNameX( + HWND hWnd, + LPWSTR lpClassName, + int nMaxCount); + +#undef GetClassName +#define GetClassName GetClassNameX +#define GetClassNameT GetClassNameA + +LPWSTR +WINAPI +CharLowerX( + LPWSTR lpsz); + +#define CharLowerW CharLowerX + +LPWSTR +WINAPI +CharUpperX( + LPWSTR lpsz); + +#define CharUpperW CharUpperX + +#define CharLowerBuffW CharLowerBuffW_not_available_on_Win9x + +#define CharUpperBuffW CharUpperBuffW_not_available_on_Win9x + +BOOL +WINAPI +GetStringTypeX( + DWORD dwInfoType, + LPCWSTR lpSrcStr, + int cchSrc, + LPWORD lpCharType); + +#define GetStringTypeW GetStringTypeX + +BOOL +WINAPI +IsCharAlphaX( + WCHAR ch); + +#define IsCharAlphaW IsCharAlphaX + +BOOL +WINAPI +IsCharAlphaNumericX( + WCHAR ch); + +#define IsCharAlphaNumericW IsCharAlphaNumericX + +#define IsCharLowerW IsCharLowerW_is_not_available_on_Win9x + +#define IsCharUpperW IsCharUpperW_is_not_available_on_Win9x + +#define LCMapStringW LCMapStringW_is_not_available_on_Win9x + +LPWSTR +WINAPI +lstrcatX( + LPWSTR lpString1, + LPCWSTR lpString2 + ); + +#define lstrcatW lstrcatX + +LPWSTR +WINAPI +lstrcpyX( + LPWSTR lpString1, + LPCWSTR lpString2 + ); + +#define lstrcpyW lstrcpyX + +LPWSTR +WINAPI +lstrcpynX( + LPWSTR lpString1, + LPCWSTR lpString2, + int iMaxLength + ); + +#define lstrcpynW lstrcpynX + +int +WINAPI +lstrcmpX( + LPCWSTR lpString1, + LPCWSTR lpString2 + ); + +#define lstrcmpW lstrcmpX + +int +WINAPI +lstrcmpiX( + LPCWSTR lpString1, + LPCWSTR lpString2 + ); + +#define lstrcmpiW lstrcmpiX + +HANDLE +WINAPI +CreateFileMappingX( + HANDLE hFile, + LPSECURITY_ATTRIBUTES lpFileMappingAttributes, + DWORD flProtect, + DWORD dwMaximumSizeHigh, + DWORD dwMaximumSizeLow, + LPCWSTR lpName + ); + +#undef CreateFileMapping +#define CreateFileMapping CreateFileMappingX +#define CreateFileMappingT CreateFileMappingA + +HANDLE +WINAPI +OpenFileMappingX( + DWORD dwDesiredAccess, + BOOL bInheritHandle, + LPCWSTR lpName + ); + +#undef OpenFileMapping +#define OpenFileMapping OpenFileMappingX +#define OpenFileMappingT OpenFileMappingA + +#ifdef __cplusplus +} +#endif + +#else +// +// These are the definitions for NT +// +#define CreateFileT CreateFileW +#define DeleteFileT DeleteFileW +#define RegisterClipboardFormatT RegisterClipboardFormatW +#define GetClipboardFormatNameT GetClipboardFormatNameW +#define RegOpenKeyT RegOpenKeyW +#define RegQueryValueT RegQueryValueW +#define RegSetValueT RegSetValueW +#define RegisterWindowMessageT RegisterWindowMessageW +#define RegOpenKeyExT RegOpenKeyExW +#define RegQueryValueExT RegQueryValueExW +#define CreateWindowExT CreateWindowExW +#define RegisterClassT RegisterClassW +#define UnregisterClassT UnregisterClassW +#define wsprintfT wsprintfW +#define CreateWindowT CreateWindowW +#define GetPropT GetPropW +#define SetPropT SetPropW +#define RemovePropT RemovePropW +#define GetProfileIntT GetProfileIntW +#define GlobalAddAtomT GlobalAddAtomW +#define GlobalGetAtomNameT GlobalGetAtomNameW +#define GetModuleFileNameT GetModuleFileNameW +#define CharPrevT CharPrevW +#define CreateFontT CreateFontW +#define LoadLibraryT LoadLibraryW +#define LoadLibraryExT LoadLibraryExW +#define RegDeleteKeyT RegDeleteKeyW +#define CreateProcessT CreateProcessW +#define RegEnumKeyExT RegEnumKeyExW +#define AppendMenuT AppendMenuW +#define OpenEventT OpenEventW +#define CreateEventT CreateEventW +#define GetDriveTypeT GetDriveTypeW +#define GetFileAttributesT GetFileAttributesW +#define RegEnumKeyT RegEnumKeyW +#define FindFirstFileT FindFirstFileW +#define GetComputerNameT GetComputerNameW +#define GetShortPathNameT GetShortPathNameW +#define GetFullPathNameT GetFullPathNameW +#define SearchPathT SearchPathW +#define GlobalFindAtomT GlobalFindAtomW +#define GetClassNameT GetClassNameW +#define CreateFileMappingT CreateFileMappingW +#define OpenFileMappingT OpenFileMappingW +#define WNDCLASST WNDCLASSW + +#endif // _CHICAGO_ + +#endif // _WIDEWRAP_H_ diff --git a/private/ole32/ih/wx86grpa.hxx b/private/ole32/ih/wx86grpa.hxx new file mode 100644 index 000000000..469a5ebf3 --- /dev/null +++ b/private/ole32/ih/wx86grpa.hxx @@ -0,0 +1,80 @@ +/*++ + +Copyright (c) 1995 Microsoft Corporation + +Module Name: + + wx86grpa.h + +Abstract: + + Ole interface into Wx86 + +Author: + + 29-Sep-1995 AlanWar + +Revision History: + +--*/ + +#ifdef WX86OLE + +typedef HRESULT (*PFNDLLGETCLASSOBJECT)(REFCLSID, REFIID, LPVOID *); +typedef HRESULT (*PFNDLLCANUNLOADNOW)(void); + + +typedef PFNDLLGETCLASSOBJECT (*WX86PFNGCA)(PVOID); +typedef PFNDLLCANUNLOADNOW (*WX86PFNCUN)(PVOID); +typedef void (*WX86GPFNFCB)(PVOID); +typedef BOOL (*WX86PFNNXPSF)(IUnknown *, REFIID); +typedef BOOL (*WX86PFNIN2XP)(IUnknown *); + +typedef PVOID *(*PFNWX86LOADWHOLE32)( + void + ); +typedef void (*PFNWX86UNLOADWHOLE32)( + void +); + +typedef PVOID (*WHOLEUNMARSHALLEDINSAMEAPT)(PVOID pv, REFIID piid); + +typedef void (*WHOLEAGGREGATEPROXY)(IUnknown *, IUnknown *); + +#define WholeNeedX86PSFactoryIdx 8 +#define WholeIsN2XProxyIdx 9 +#define WholeThunkDllGetClassObjectIdx 10 +#define WholeThunkDllCanUnloadNowIdx 11 +#define WholeUnmarshalledInSameApt 13 +#define WholeAggregateProxy 14 + +class CWx86 { +public: + CWx86(); + ~CWx86(); + + PFNDLLGETCLASSOBJECT TranslateDllGetClassObject(PFNDLLGETCLASSOBJECT pv); + PFNDLLCANUNLOADNOW TranslateDllCanUnloadNow(PFNDLLCANUNLOADNOW pv); + BOOL IsModuleX86(HMODULE hModule); + BOOL IsWx86Enabled(void); + void SetStubInvokeFlag(UCHAR bFlag); + BOOL NeedX86PSFactory(IUnknown *punkObj, REFIID riid); + BOOL IsN2XProxy(IUnknown *punk); + BOOL SetLoadAsX86(BOOL bFlag); + BOOL IsWx86Calling(void); + BOOL SetIsWx86Calling(BOOL bFlag); + PVOID UnmarshalledInSameApt(PVOID pv, REFIID piid); + void AggregateProxy(IUnknown *, IUnknown *); + BOOL IsWx86Installed(void); + +private: + PVOID *_apvWholeFuncs; + BOOL _fIsWx86Installed; +}; + +inline BOOL CWx86::IsWx86Installed(void) +{ + return(_fIsWx86Installed); +} + +#endif |