1 module directx.com; 2 3 public import directx.win32; 4 public import core.sys.windows.com; 5 6 alias const(GUID)* REFGUID, REFIID, REFCLSID, REFFMTID; 7 8 mixin( uuid!(IUnknown, "00000000-0000-0000-C000-000000000046")); 9 mixin( uuid!(IClassFactory,"00000001-0000-0000-C000-000000000046")); 10 11 template uuid(T, const char[] g) { 12 const char [] uuid = 13 "const IID IID_"~T.stringof~"={ 0x" ~ g[0..8] ~ ",0x" ~ g[9..13] ~ ",0x" ~ g[14..18] ~ ",[0x" ~ g[19..21] ~ ",0x" ~ g[21..23] ~ ",0x" ~ g[24..26] ~ ",0x" ~ g[26..28] ~ ",0x" ~ g[28..30] ~ ",0x" ~ g[30..32] ~ ",0x" ~ g[32..34] ~ ",0x" ~ g[34..36] ~ "]};"~ 14 "template uuidof(T:"~T.stringof~"){"~ 15 " const IID uuidof ={ 0x" ~ g[0..8] ~ ",0x" ~ g[9..13] ~ ",0x" ~ g[14..18] ~ ",[0x" ~ g[19..21] ~ ",0x" ~ g[21..23] ~ ",0x" ~ g[24..26] ~ ",0x" ~ g[26..28] ~ ",0x" ~ g[28..30] ~ ",0x" ~ g[30..32] ~ ",0x" ~ g[32..34] ~ ",0x" ~ g[34..36] ~ "]};"~ 16 "}"; 17 } 18 19 // from intsafe.h 20 enum INTSAFE_E_ARITHMETIC_OVERFLOW = cast(HRESULT)0x80070216L; // 0x216 = 534 = ERROR_ARITHMETIC_OVERFLOW 21 22 // Interface from DocumentTarget.h 23 mixin(uuid!(IPrintDocumentPackageTarget, "1b8efec4-3019-4c27-964e-367202156906")); 24 interface IPrintDocumentPackageTarget : IUnknown 25 { 26 extern(Windows): 27 /* [helpstring] */ HRESULT GetPackageTargetTypes( 28 /* [out] */ UINT32* targetCount, 29 /* [size_is][size_is][out] */ GUID** targetTypes); 30 31 /* [helpstring] */ HRESULT GetPackageTarget( 32 /* [in] */ REFGUID guidTargetType, 33 /* [in] */ REFIID riid, 34 /* [iid_is][out] */ void** ppvTarget); 35 36 HRESULT Cancel(); 37 38 }