Skip to content

Instantly share code, notes, and snippets.

@wqweto
Created December 21, 2022 16:16
Show Gist options
  • Save wqweto/82e10ddc196c01eb61ba0ccc191308d2 to your computer and use it in GitHub Desktop.
Save wqweto/82e10ddc196c01eb61ba0ccc191308d2 to your computer and use it in GitHub Desktop.
stdole2.tlb differences win7 vs win11
// Generated .IDL file (by the OLE/COM Object Viewer)
//
// typelib filename: stdole2.tlb
[
uuid(00020430-0000-0000-C000-000000000046),
version(2.0),
helpstring("OLE Automation")
]
library stdole
{
// Forward declare all types defined in this typelib
interface IUnknown;
interface IDispatch;
interface IEnumVARIANT;
interface IFont;
dispinterface Font;
interface IPicture;
dispinterface Picture;
dispinterface FontEvents;
typedef struct tagGUID {
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID;
typedef struct tagDISPPARAMS {
VARIANT* rgvarg;
long* rgdispidNamedArgs;
unsigned int cArgs;
unsigned int cNamedArgs;
} DISPPARAMS;
typedef struct tagEXCEPINFO {
unsigned short wCode;
unsigned short wReserved;
BSTR bstrSource;
BSTR bstrDescription;
BSTR bstrHelpFile;
unsigned long dwHelpContext;
void* pvReserved;
void* pfnDeferredFillIn;
SCODE scode;
} EXCEPINFO;
[
odl,
uuid(00000000-0000-0000-C000-000000000046),
hidden
]
interface IUnknown {
};
[
odl,
uuid(00020400-0000-0000-C000-000000000046),
restricted
]
interface IDispatch : IUnknown {
[restricted]
HRESULT _stdcall GetTypeInfoCount([out] unsigned int* pctinfo);
[restricted]
HRESULT _stdcall GetTypeInfo(
[in] unsigned int itinfo,
[in] unsigned long lcid,
[out] void** pptinfo);
[restricted]
HRESULT _stdcall GetIDsOfNames(
[in] GUID* riid,
[in] char** rgszNames,
[in] unsigned int cNames,
[in] unsigned long lcid,
[out] long* rgdispid);
[restricted]
HRESULT _stdcall Invoke(
[in] long dispidMember,
[in] GUID* riid,
[in] unsigned long lcid,
[in] unsigned short wFlags,
[in] DISPPARAMS* pdispparams,
[out] VARIANT* pvarResult,
[out] EXCEPINFO* pexcepinfo,
[out] unsigned int* puArgErr);
};
[
odl,
uuid(00020404-0000-0000-C000-000000000046),
hidden
]
interface IEnumVARIANT : IUnknown {
HRESULT _stdcall Next(
[in] unsigned long celt,
[in] VARIANT* rgvar,
[out] unsigned long* pceltFetched);
HRESULT _stdcall Skip([in] unsigned long celt);
HRESULT _stdcall Reset();
HRESULT _stdcall Clone([out] IEnumVARIANT** ppenum);
};
typedef [uuid(66504301-BE0F-101A-8BBB-00AA00300CAB), public]
unsigned long OLE_COLOR;
typedef [uuid(66504302-BE0F-101A-8BBB-00AA00300CAB), public]
long OLE_XPOS_PIXELS;
typedef [uuid(66504303-BE0F-101A-8BBB-00AA00300CAB), public]
long OLE_YPOS_PIXELS;
typedef [uuid(66504304-BE0F-101A-8BBB-00AA00300CAB), public]
long OLE_XSIZE_PIXELS;
typedef [uuid(66504305-BE0F-101A-8BBB-00AA00300CAB), public]
long OLE_YSIZE_PIXELS;
typedef [uuid(66504306-BE0F-101A-8BBB-00AA00300CAB), public]
long OLE_XPOS_HIMETRIC;
typedef [uuid(66504307-BE0F-101A-8BBB-00AA00300CAB), public]
long OLE_YPOS_HIMETRIC;
typedef [uuid(66504308-BE0F-101A-8BBB-00AA00300CAB), public]
long OLE_XSIZE_HIMETRIC;
typedef [uuid(66504309-BE0F-101A-8BBB-00AA00300CAB), public]
long OLE_YSIZE_HIMETRIC;
typedef [uuid(BF030640-9069-101B-AE2D-08002B2EC713), public]
single OLE_XPOS_CONTAINER;
typedef [uuid(BF030641-9069-101B-AE2D-08002B2EC713), public]
single OLE_YPOS_CONTAINER;
typedef [uuid(BF030642-9069-101B-AE2D-08002B2EC713), public]
single OLE_XSIZE_CONTAINER;
typedef [uuid(BF030643-9069-101B-AE2D-08002B2EC713), public]
single OLE_YSIZE_CONTAINER;
typedef [uuid(66504313-BE0F-101A-8BBB-00AA00300CAB), public]
int OLE_HANDLE;
typedef [uuid(6650430B-BE0F-101A-8BBB-00AA00300CAB), public]
VARIANT_BOOL OLE_OPTEXCLUSIVE;
typedef [uuid(BF030644-9069-101B-AE2D-08002B2EC713), public]
VARIANT_BOOL OLE_CANCELBOOL;
typedef [uuid(BF030645-9069-101B-AE2D-08002B2EC713), public]
VARIANT_BOOL OLE_ENABLEDEFAULTBOOL;
typedef [uuid(6650430A-BE0F-101A-8BBB-00AA00300CAB)]
enum {
Unchecked = 0,
Checked = 1,
Gray = 2
} OLE_TRISTATE;
typedef [uuid(6650430D-BE0F-101A-8BBB-00AA00300CAB), public]
BSTR FONTNAME;
typedef [uuid(6650430E-BE0F-101A-8BBB-00AA00300CAB), public]
CURRENCY FONTSIZE;
typedef [uuid(6650430F-BE0F-101A-8BBB-00AA00300CAB), public]
VARIANT_BOOL FONTBOLD;
typedef [uuid(66504310-BE0F-101A-8BBB-00AA00300CAB), public]
VARIANT_BOOL FONTITALIC;
typedef [uuid(66504311-BE0F-101A-8BBB-00AA00300CAB), public]
VARIANT_BOOL FONTUNDERSCORE;
typedef [uuid(66504312-BE0F-101A-8BBB-00AA00300CAB), public]
VARIANT_BOOL FONTSTRIKETHROUGH;
[
odl,
uuid(BEF6E002-A874-101A-8BBA-00AA00300CAB),
helpstring("Font Object"),
hidden
]
interface IFont : IUnknown {
[propget]
HRESULT _stdcall Name([out, retval] BSTR* pname);
[propput]
HRESULT _stdcall Name([in] BSTR pname);
[propget]
HRESULT _stdcall Size([out, retval] CURRENCY* psize);
[propput]
HRESULT _stdcall Size([in] CURRENCY psize);
[propget]
HRESULT _stdcall Bold([out, retval] VARIANT_BOOL* pbold);
[propput]
HRESULT _stdcall Bold([in] VARIANT_BOOL pbold);
[propget]
HRESULT _stdcall Italic([out, retval] VARIANT_BOOL* pitalic);
[propput]
HRESULT _stdcall Italic([in] VARIANT_BOOL pitalic);
[propget]
HRESULT _stdcall Underline([out, retval] VARIANT_BOOL* punderline);
[propput]
HRESULT _stdcall Underline([in] VARIANT_BOOL punderline);
[propget]
HRESULT _stdcall Strikethrough([out, retval] VARIANT_BOOL* pstrikethrough);
[propput]
HRESULT _stdcall Strikethrough([in] VARIANT_BOOL pstrikethrough);
[propget]
HRESULT _stdcall Weight([out, retval] short* pweight);
[propput]
HRESULT _stdcall Weight([in] short pweight);
[propget]
HRESULT _stdcall Charset([out, retval] short* pcharset);
[propput]
HRESULT _stdcall Charset([in] short pcharset);
[propget]
HRESULT _stdcall hFont([out, retval] OLE_HANDLE* phfont);
HRESULT _stdcall Clone([out] IFont** ppfont);
HRESULT _stdcall IsEqual([in] IFont* pfontOther);
HRESULT _stdcall SetRatio(
[in] long cyLogical,
[in] long cyHimetric);
HRESULT _stdcall AddRefHfont([in] OLE_HANDLE hFont);
HRESULT _stdcall ReleaseHfont([in] OLE_HANDLE hFont);
};
[
uuid(BEF6E003-A874-101A-8BBA-00AA00300CAB)
]
dispinterface Font {
properties:
[id(00000000)
]
BSTR Name;
[id(0x00000002)
]
CURRENCY Size;
[id(0x00000003)
]
VARIANT_BOOL Bold;
[id(0x00000004)
]
VARIANT_BOOL Italic;
[id(0x00000005)
]
VARIANT_BOOL Underline;
[id(0x00000006)
]
VARIANT_BOOL Strikethrough;
[id(0x00000007)
]
short Weight;
[id(0x00000008)
]
short Charset;
methods:
};
typedef [public]
Font IFontDisp;
[
uuid(0BE35203-8F91-11CE-9DE3-00AA004BB851)
]
coclass StdFont {
[default] dispinterface Font;
[default, source] dispinterface FontEvents;
interface IFont;
};
[
odl,
uuid(7BF80980-BF32-101A-8BBB-00AA00300CAB),
helpstring("Picture Object"),
hidden
]
interface IPicture : IUnknown {
[propget]
HRESULT _stdcall Handle([out, retval] OLE_HANDLE* phandle);
[propget]
HRESULT _stdcall hPal([out, retval] OLE_HANDLE* phpal);
[propget]
HRESULT _stdcall Type([out, retval] short* ptype);
[propget]
HRESULT _stdcall Width([out, retval] OLE_XSIZE_HIMETRIC* pwidth);
[propget]
HRESULT _stdcall Height([out, retval] OLE_YSIZE_HIMETRIC* pheight);
HRESULT _stdcall Render(
[in] int hdc,
[in] long x,
[in] long y,
[in] long cx,
[in] long cy,
[in] OLE_XPOS_HIMETRIC xSrc,
[in] OLE_YPOS_HIMETRIC ySrc,
[in] OLE_XSIZE_HIMETRIC cxSrc,
[in] OLE_YSIZE_HIMETRIC cySrc,
[in] void* prcWBounds);
[propput]
HRESULT _stdcall hPal([in] OLE_HANDLE phpal);
[propget]
HRESULT _stdcall CurDC([out, retval] int* phdcOut);
HRESULT _stdcall SelectPicture(
[in] int hdcIn,
[out] int* phdcOut,
[out] OLE_HANDLE* phbmpOut);
[propget]
HRESULT _stdcall KeepOriginalFormat([out, retval] VARIANT_BOOL* pfkeep);
[propput]
HRESULT _stdcall KeepOriginalFormat([in] VARIANT_BOOL pfkeep);
HRESULT _stdcall PictureChanged();
HRESULT _stdcall SaveAsFile(
[in] void* pstm,
[in] VARIANT_BOOL fSaveMemCopy,
[out] long* pcbSize);
[propget]
HRESULT _stdcall Attributes([out, retval] long* pdwAttr);
HRESULT _stdcall SetHdc([in] OLE_HANDLE hdc);
};
[
uuid(7BF80981-BF32-101A-8BBB-00AA00300CAB)
]
dispinterface Picture {
properties:
[id(00000000), readonly
]
OLE_HANDLE Handle;
[id(0x00000002)
]
OLE_HANDLE hPal;
[id(0x00000003), readonly
]
short Type;
[id(0x00000004), readonly
]
OLE_XSIZE_HIMETRIC Width;
[id(0x00000005), readonly
]
OLE_YSIZE_HIMETRIC Height;
methods:
[id(0x00000006)]
void Render(
int hdc,
long x,
long y,
long cx,
long cy,
OLE_XPOS_HIMETRIC xSrc,
OLE_YPOS_HIMETRIC ySrc,
OLE_XSIZE_HIMETRIC cxSrc,
OLE_YSIZE_HIMETRIC cySrc,
void* prcWBounds);
};
typedef [public]
Picture IPictureDisp;
[
uuid(0BE35204-8F91-11CE-9DE3-00AA004BB851)
]
coclass StdPicture {
[default] dispinterface Picture;
interface IPicture;
};
typedef [uuid(E6C8FA08-BD9F-11D0-985E-00C04FC29993)]
enum {
Default = 0,
Monochrome = 1,
VgaColor = 2,
Color = 4
} LoadPictureConstants;
[
dllname("oleaut32.dll"),
uuid(91209AC0-60F6-11CF-9C5D-00AA00C1489E),
helpstring("Functions for Standard OLE Objects"),
helpcontext(0x00002775)
]
module StdFunctions {
[entry("OleLoadPictureFileEx"), helpstring("Loads a picture from a file"), helpcontext(0x00002775)]
HRESULT _stdcall LoadPicture(
[in, optional] VARIANT filename,
[in, optional, defaultvalue(0)] int widthDesired,
[in, optional, defaultvalue(0)] int heightDesired,
[in, optional, defaultvalue(0)] LoadPictureConstants flags,
[out, retval] IPictureDisp** retval);
[entry("OleSavePictureFile"), helpstring("Saves a picture to a file"), helpcontext(0x00002775)]
HRESULT _stdcall SavePicture(
[in] IPictureDisp* Picture,
[in] BSTR filename);
};
[
uuid(4EF6100A-AF88-11D0-9846-00C04FC29993),
helpstring("Event interface for the Font object"),
hidden
]
dispinterface FontEvents {
properties:
methods:
[id(0x00000009)]
void FontChanged([in] BSTR PropertyName);
};
typedef [public]
FontEvents IFontEventsDisp;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment