view dwt/internal/ole/win32/COM.d @ 97:2e6eb5bd2c16

starting OLE
author Frank Benoit <benoit@tionex.de>
date Fri, 08 Feb 2008 19:49:32 +0100
parents
children ecba636b634e
line wrap: on
line source


/*
 * COM types, constants and APIs
 *
 * all API are aliased from other modules
 *
 * author : Shawn Liu
 */

module dwt.internal.ole.win32.COM;


private import dwt.internal.ole.win32.COMTYPES;
private import dwt.internal.ole.win32.OAIDL;
private import dwt.internal.ole.win32.OBJIDL;
private import dwt.internal.ole.win32.OLEIDL;
private import dwt.internal.ole.win32.DOCOBJ;
private import dwt.internal.ole.win32.EXDISP;
private import dwt.internal.ole.win32.MSHTMHST;
private import dwt.internal.ole.win32.extras;
private import dwt.internal.ole.win32.ifs;
private import dwt.internal.ole.win32.COMAPI;

private alias dwt.internal.ole.win32.COMAPI COMAPI;


public import dwt.internal.win32.OS;

public class COM : OS {

	//private import std.c.windows.com;

	// all the GUID
	// GUIDs for Home Page Browser
    public static const GUID IIDJavaBeansBridge = { 0x8AD9C840, 0x044E, 0x11D1, [ 0xB3, 0xE9, 0x00, 0x80, 0x5F, 0x49, 0x9D, 0x93]}; //$NON-NLS-1$
    public static const GUID IIDShockwaveActiveXControl = { 0x166B1BCA, 0x3F9C, 0x11CF, [ 0x80, 0x75, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00]}; //$NON-NLS-1$
	public const GUID IIDIEditorSiteTime = { 0x6BD2AEFE, 0x7876, 0x45e6, [0xA6, 0xE7, 0x3B, 0xFC, 0xDF, 0x65, 0x40, 0xAA]};
	public const GUID IIDIEditorSiteProperty = { 0xD381A1F4, 0x2326, 0x4f3c, [0xAF, 0xB9, 0xB7, 0x53, 0x7D, 0xB9, 0xE2, 0x38]};
	public const GUID IIDIEditorBaseProperty = { 0x61E55B0B, 0x2647, 0x47c4, [0x8C, 0x89, 0xE7, 0x36, 0xEF, 0x15, 0xD6, 0x36]};
	public const GUID IIDIEditorSite = { 0xCDD88AB9, 0xB01D, 0x426E, [0xB0, 0xF0, 0x30, 0x97, 0x3E, 0x9A, 0x07, 0x4B]};
	public const GUID IIDIEditorService = { 0xBEE283FE, 0x7B42, 0x4FF3, [0x82, 0x32, 0x0F, 0x07, 0xD4, 0x3A, 0xBC, 0xF1]};
	public const GUID IIDIEditorManager = { 0xEFDE08C4, 0xBE87, 0x4B1A, [0xBF, 0x84, 0x15, 0xFC, 0x30, 0x20, 0x71, 0x80]};

	public const GUID IIDIAccessible = { 0x618736E0, 0x3C3D, 0x11CF, [0x81, 0x0C, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71]};
	//public const GUID IIDIAccessibleHandler = { 0x03022430, 0xABC4, 0x11D0, [0xBD, 0xE2, 0x00, 0xAA, 0x00, 0x1A, 0x19, 0x53]};
	//public const GUID IIDIAccessor = { 0x0C733A8C, 0x2A1C, 0x11CE, [0xAD, 0xE5, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D]};

	public const GUID IIDIAdviseSink = { 0x0000010F, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDIAdviseSink2 = { 0x00000125, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDIBindCtx = { 0x0000000E, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDIClassFactory = { 0x00000001, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	public const GUID IIDIClassFactory2 = { 0xB196B28F, 0xBAB4, 0x101A, [0xB6, 0x9C, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07]};
	public const GUID IIDIConnectionPoint = { 0xB196B286, 0xBAB4, 0x101A, [0xB6, 0x9C, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07]};
	public const GUID IIDIConnectionPointContainer = { 0xB196B284, 0xBAB4, 0x101A, [0xB6, 0x9C, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07]};
	//public const GUID IIDICreateErrorInfo = { 0x22F03340, 0x547D, 0x101B, [0x8E, 0x65, 0x08, 0x00, 0x2B, 0x2B, 0xD1, 0x19]};
	//public const GUID IIDICreateTypeInfo = { 0x00020405, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDICreateTypeLib = { 0x00020406, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDIDataAdviseHolder = { 0x00000110, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	public const GUID IIDIDataObject = { 0x0000010E, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	public const GUID IIDIDispatch = { 0x00020400, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	public const GUID IIDIDocHostUIHandler = { 0xBD3F23C0, 0xD43E, 0x11CF, [0x89, 0x3B, 0x00, 0xAA, 0x00, 0xBD, 0xCE, 0x1A]};
	public const GUID IIDIDocHostShowUI = { 0xC4D244B0, 0xD43E, 0x11CF, [0x89, 0x3B, 0x00, 0xAA, 0x00, 0xBD, 0xCE, 0x1A]};
	public const GUID IIDIDropSource = { 0x00000121, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	public const GUID IIDIDropTarget = { 0x00000122, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDIEnumConnectionPoints = { 0xB196B285, 0xBAB4, 0x101A, [0xB6, 0x9C, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07]};
	//public const GUID IIDIEnumConnections = { 0xB196B287, 0xBAB4, 0x101A, [0xB6, 0x9C, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07]};
	public const GUID IIDIEnumFORMATETC = { 0x00000103, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDIEnumMoniker = { 0x00000102, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDIEnumOLEVERB = { 0x00000104, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDIEnumSTATDATA = { 0x00000105, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDIEnumSTATSTG = { 0x0000000D, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDIEnumString = { 0x00000101, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDIEnumUnknown = { 0x00000100, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	public const GUID IIDIEnumVARIANT = { 0x00020404, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDIErrorInfo = { 0x1CF2B120, 0x547D, 0x101B, [0x8E, 0x65, 0x08, 0x00, 0x2B, 0x2B, 0xD1, 0x19]};
	//public const GUID IIDIErrorLog = { 0x3127CA40, 0x446E, 0x11CE, [0x81, 0x35, 0x00, 0xAA, 0x00, 0x4B, 0xB8, 0x51]};
	//public const GUID IIDIExternalConnection = { 0x00000019, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	public const GUID IIDIFont = { 0xBEF6E002, 0xA874, 0x101A, [0x8B, 0xBA, 0x00, 0xAA, 0x00, 0x30, 0x0C, 0xAB]};
	//public const GUID IIDIFontDisp = { 0xBEF6E003, 0xA874, 0x101A, [0x8B, 0xBA, 0x00, 0xAA, 0x00, 0x30, 0x0C, 0xAB]};
    public static const /*GUID*/ char[] IIDIHTMLDocumentEvents2 = /*IIDFromString(*/"{3050F613-98B5-11CF-BB82-00AA00BDCE0B}"/*)*/;
	public const GUID IIDIInternetSecurityManager = { 0x79eac9ee, 0xbaf9, 0x11ce, [0x8c, 0x82, 0x00, 0xaa, 0x00, 0x4b, 0xa9, 0x0b]};
	//public const GUID IIDILockBytes = { 0x0000000A, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDIMalloc = { 0x00000002, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDIMallocSpy = { 0x0000001D, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDIMarshal = { 0x00000003, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDIMessageFilter = { 0x00000016, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDIMoniker = { 0x0000000F, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDIOleAdviseHolder = { 0x00000111, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDIOleCache = { 0x0000011E, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDIOleCache2 = { 0x00000128, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDIOleCacheControl = { 0x00000129, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	public const GUID IIDIOleClientSite = { 0x00000118, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	public const GUID IIDIOleCommandTarget = { 0xB722BCCB, 0x4E68, 0x101B, [0xA2, 0xBC, 0x00, 0xAA, 0x00, 0x40, 0x47, 0x70]};
	public const GUID IIDIOleContainer = { 0x0000011B, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	public const GUID IIDIOleControl = { 0xB196B288, 0xBAB4, 0x101A, [0xB6, 0x9C, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07]};
	public const GUID IIDIOleControlSite = { 0xB196B289, 0xBAB4, 0x101A, [0xB6, 0x9C, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07]};
	public const GUID IIDIOleDocument = { 0xB722BCC5, 0x4E68, 0x101B, [0xA2, 0xBC, 0x00, 0xAA, 0x00, 0x40, 0x47, 0x70]};
	public const GUID IIDIOleDocumentSite = { 0xB722BCC7, 0x4E68, 0x101B, [0xA2, 0xBC, 0x00, 0xAA, 0x00, 0x40, 0x47, 0x70]};
	public const GUID IIDIOleInPlaceActiveObject = { 0x00000117, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	public const GUID IIDIOleInPlaceFrame = { 0x00000116, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	public const GUID IIDIOleInPlaceObject = { 0x00000113, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	public const GUID IIDIOleInPlaceSite = { 0x00000119, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	public const GUID IIDIOleInPlaceUIWindow = { 0x00000115, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDIOleItemContainer = { 0x0000011C, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	public const GUID IIDIOleLink = { 0x0000011D, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	public const GUID IIDIOleObject = { 0x00000112, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	public const GUID IIDIOleWindow = { 0x00000114, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDIParseDisplayName = { 0x0000011A, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDIPerPropertyBrowsing = { 0x376BD3AA, 0x3845, 0x101B, [0x84, 0xED, 0x08, 0x00, 0x2B, 0x2E, 0xC7, 0x13]};
	public const GUID IIDIPersist = { 0x0000010C, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	public const GUID IIDIPersistFile = { 0x0000010B, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDIPersistMemory = { 0xBD1AE5E0, 0xA6AE, 0x11CE, [0xBD, 0x37, 0x50, 0x42, 0x00, 0xC1, 0x00, 0x00]};
	//public const GUID IIDIPersistPropertyBag = { 0x37D84F60, 0x42CB, 0x11CE, [0x81, 0x35, 0x00, 0xAA, 0x00, 0x4B, 0xB8, 0x51]};
	public const GUID IIDIPersistStorage = { 0x0000010A, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	public const GUID IIDIPersistStream = { 0x00000109, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	public const GUID IIDIPersistStreamInit = { 0x7FD52380, 0x4E07, 0x101B, [0xAE, 0x2D, 0x08, 0x00, 0x2B, 0x2E, 0xC7, 0x13]};
	//public const GUID IIDIPicture = { 0x7BF80980, 0xBF32, 0x101A, [0x8B, 0xBB, 0x00, 0xAA, 0x00, 0x30, 0x0C, 0xAB]};
	//public const GUID IIDIPictureDisp = { 0x7BF80981, 0xBF32, 0x101A, [0x8B, 0xBB, 0x00, 0xAA, 0x00, 0x30, 0x0C, 0xAB]};
	//public const GUID IIDIPropertyBag = { 0x55272A00, 0x42CB, 0x11CE, [0x81, 0x35, 0x00, 0xAA, 0x00, 0x4B, 0xB8, 0x51]};
	public const GUID IIDIPropertyNotifySink = { 0x9BFBBC02, 0xEFF1, 0x101A, [0x84, 0xED, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07]};
	//public const GUID IIDIPropertyPage = { 0xB196B28D, 0xBAB4, 0x101A, [0xB6, 0x9C, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07]};
	//public const GUID IIDIPropertyPage2 = { 0x01E44665, 0x24AC, 0x101B, [0x84, 0xED, 0x08, 0x00, 0x2B, 0x2E, 0xC7, 0x13]};
	//public const GUID IIDIPropertyPageSite = { 0xB196B28C, 0xBAB4, 0x101A, [0xB6, 0x9C, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07]};
	public const GUID IIDIProvideClassInfo = { 0xB196B283, 0xBAB4, 0x101A, [0xB6, 0x9C, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07]};
	public const GUID IIDIProvideClassInfo2 = { 0xA6BC3AC0, 0xDBAA, 0x11CE, [0x9D, 0xE3, 0x00, 0xAA, 0x00, 0x4B, 0xB8, 0x51]};
	//public const GUID IIDIPSFactoryBuffer = { 0xD5F569D0, 0x593B, 0x101A, [0xB5, 0x69, 0x08, 0x00, 0x2B, 0x2D, 0xBF, 0x7A]};
	//public const GUID IIDIRootStorage = { 0x00000012, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDIROTData = { 0xF29F6BC0, 0x5021, 0x11CE, [0xAA, 0x15, 0x00, 0x00, 0x69, 0x01, 0x29, 0x3F]};
	//public const GUID IIDIRpcChannelBuffer = { 0xD5F56B60, 0x593B, 0x101A, [0xB5, 0x69, 0x08, 0x00, 0x2B, 0x2D, 0xBF, 0x7A]};
	//public const GUID IIDIRpcProxyBuffer = { 0xD5F56A34, 0x593B, 0x101A, [0xB5, 0x69, 0x08, 0x00, 0x2B, 0x2D, 0xBF, 0x7A]};
	//public const GUID IIDIRpcStubBuffer = { 0xD5F56AFC, 0x593B, 0x101A, [0xB5, 0x69, 0x08, 0x00, 0x2B, 0x2D, 0xBF, 0x7A]};
	//public const GUID IIDIRunnableObject = { 0x00000126, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDIRunningObjectTable = { 0x00000010, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDISimpleFrameSite = { 0x742B0E01, 0x14E6, 0x101B, [0x91, 0x4E, 0x00, 0xAA, 0x00, 0x30, 0x0C, 0xAB]};
	public const GUID IIDIServiceProvider = { 0x6d5140c1, 0x7436, 0x11ce, [0x80, 0x34, 0x00, 0xaa, 0x00, 0x60, 0x09, 0xfa]};
	public const GUID IIDISpecifyPropertyPages = { 0xB196B28B, 0xBAB4, 0x101A, [0xB6, 0x9C, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07]};
	//public const GUID IIDIStdMarshalInfo = { 0x00000018, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	public const GUID IIDIStorage = { 0x0000000B, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	public const GUID IIDIStream = { 0x0000000C, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDISupportErrorInfo = { 0xDF0B3D60, 0x548F, 0x101B, [0x8E, 0x65, 0x08, 0x00, 0x2B, 0x2B, 0xD1, 0x19]};
	//public const GUID IIDITypeComp = { 0x00020403, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDITypeLib = { 0x00020402, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	public const GUID IIDIUnknown = { 0x00000000, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	//public const GUID IIDIViewObject = { 0x0000010D, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
	public const GUID IIDIViewObject2 = { 0x00000127, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]};
    public static const GUID CGID_DocHostCommandHandler = { 0xf38bc242, 0xb950, 0x11d1, [0x89, 0x18, 0x00, 0xc0, 0x4f, 0xc2, 0xc8, 0x36]}; //$NON-NLS-1$
    public static const GUID CGID_Explorer = { 0x000214D0, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; //$NON-NLS-1$

	/* Constants */
    //public static const int ADVF_DATAONSTOP = 64;
    //public static const int ADVF_NODATA = 1;
    //public static const int ADVF_ONLYONCE = 2;
    //public static const int ADVF_PRIMEFIRST = 4;
    //public static const int ADVFCACHE_FORCEBUILTIN = 16;
    //public static const int ADVFCACHE_NOHANDLER = 8;
    //public static const int ADVFCACHE_ONSAVE = 32;
    public static const int CF_TEXT = 1;
    public static const int CF_BITMAP = 2;
    public static const int CF_METAFILEPICT = 3;
    public static const int CF_SYLK = 4;
    public static const int CF_DIF = 5;
    public static const int CF_TIFF = 6;
    public static const int CF_OEMTEXT = 7;
    public static const int CF_DIB = 8;
    public static const int CF_PALETTE = 9;
    public static const int CF_PENDATA = 10;
    public static const int CF_RIFF = 11;
    public static const int CF_WAVE = 12;
    public static const int CF_UNICODETEXT = 13;
    public static const int CF_ENHMETAFILE = 14;
    public static const int CF_HDROP = 15;
    public static const int CF_LOCALE = 16;
    public static const int CF_MAX = 17;
    public static const int CLSCTX_INPROC_HANDLER = 2;
    public static const int CLSCTX_INPROC_SERVER = 1;
    public static const int CLSCTX_LOCAL_SERVER = 4;
    public static const int CLSCTX_REMOTE_SERVER = 16;
    public static const int CO_E_CLASSSTRING = -2147221005;
    //public static const int COINIT_APARTMENTTHREADED = 2;
    //public static const int COINIT_DISABLE_OLE1DDE = 4;
    //public static const int COINIT_MULTITHREADED = 0;
    //public static const int COINIT_SPEED_OVER_MEMORY = 8;
    public static const int DATADIR_GET = 1;
    public static const int DATADIR_SET = 2;
    public static const int DISP_E_EXCEPTION = 0x80020009;
    public static const int DISP_E_MEMBERNOTFOUND = -2147352573;
    public static const int DISP_E_UNKNOWNINTERFACE = 0x80020001;
    //public static const int DISPID_AMBIENT_APPEARANCE = -716;
    //public static const int DISPID_AMBIENT_AUTOCLIP = -715;
    public static const int DISPID_AMBIENT_BACKCOLOR = -701;
    //public static const int DISPID_AMBIENT_CHARSET = -727;
    //public static const int DISPID_AMBIENT_CODEPAGE = -725;
    //public static const int DISPID_AMBIENT_DISPLAYASDEFAULT = -713;
    //public static const int DISPID_AMBIENT_DISPLAYNAME = -702;
    public static const int DISPID_AMBIENT_FONT = -703;
    public static const int DISPID_AMBIENT_FORECOLOR = -704;
    public static const int DISPID_AMBIENT_LOCALEID = -705;
    public static const int DISPID_AMBIENT_MESSAGEREFLECT = -706;
    public static const int DISPID_AMBIENT_OFFLINEIFNOTCONNECTED = -5501;
    //public static const int DISPID_AMBIENT_PALETTE = -726;
    //public static const int DISPID_AMBIENT_RIGHTTOLEFT = -732;
    //public static const int DISPID_AMBIENT_SCALEUNITS = -707;
    public static const int DISPID_AMBIENT_SHOWGRABHANDLES = -711;
    public static const int DISPID_AMBIENT_SHOWHATCHING = -712;
    public static const int DISPID_AMBIENT_SILENT = -5502;
    public static const int DISPID_AMBIENT_SUPPORTSMNEMONICS = -714;
    //public static const int DISPID_AMBIENT_TEXTALIGN = -708;
    //public static const int DISPID_AMBIENT_TOPTOBOTTOM = -733;
    //public static const int DISPID_AMBIENT_TRANSFERPRIORITY = -728;
    public static const int DISPID_AMBIENT_UIDEAD = -710;
    public static const int DISPID_AMBIENT_USERMODE = -709;
    public static const int DISPID_BACKCOLOR = -501;
    public static const int DISPID_FONT = -512;
    public static const int DISPID_FONT_BOLD = 3;
    public static const int DISPID_FONT_CHARSET = 8;
    public static const int DISPID_FONT_ITALIC = 4;
    public static const int DISPID_FONT_NAME = 0;
    public static const int DISPID_FONT_SIZE = 2;
    public static const int DISPID_FONT_STRIKE = 6;
    public static const int DISPID_FONT_UNDER = 5;
    public static const int DISPID_FONT_WEIGHT = 7;
    public static const int DISPID_FORECOLOR = -513;
    public static const int DISPID_HTMLDOCUMENTEVENTS_ONDBLCLICK = 0xFFFFFDA7;
    public static const int DISPID_HTMLDOCUMENTEVENTS_ONDRAGSTART = 0x8001000B;
    public static const int DISPID_HTMLDOCUMENTEVENTS_ONMOUSEOUT = 0x80010009;
    public static const int DISPID_HTMLDOCUMENTEVENTS_ONMOUSEOVER = 0x80010008;
    public static const int DISPID_HTMLDOCUMENTEVENTS_ONMOUSEMOVE = 0xFFFFFDA2;
    public static const int DISPID_HTMLDOCUMENTEVENTS_ONMOUSEDOWN = 0xFFFFFDA3;
    public static const int DISPID_HTMLDOCUMENTEVENTS_ONMOUSEUP = 0xFFFFFDA1;
    public static const int DISPID_HTMLDOCUMENTEVENTS_ONSTOP = 0x00000402;

    //public static const int DISPID_READYSTATE = -525;
    //public static const int DISPID_READYSTATECHANGE = -609;
    public static const int DRAGDROP_S_DROP = 0x00040100;
    public static const int DRAGDROP_S_CANCEL = 0x00040101;
    public static const int DRAGDROP_S_USEDEFAULTCURSORS = 0x00040102;
    public static const int DROPEFFECT_NONE = 0;
    public static const int DROPEFFECT_COPY = 1;
    public static const int DROPEFFECT_MOVE = 2;
    public static const int DROPEFFECT_LINK = 4;
    public static const int DROPEFFECT_SCROLL = 0x80000000;
    public static const int DV_E_FORMATETC = -2147221404;
    public static const int DV_E_STGMEDIUM = -2147221402;
    public static const int DV_E_TYMED = -2147221399;
    public static const int DVASPECT_CONTENT = 1;
    //public static const int DVASPECT_DOCPRINT = 8;
    //public static const int DVASPECT_ICON = 4;
    //public static const int DVASPECT_THUMBNAIL = 2;
    public static const int E_FAIL = -2147467259;
    public static const int E_INVALIDARG = -2147024809;
    public static const int E_NOINTERFACE = -2147467262;
    public static const int E_NOTIMPL = -2147467263;
    public static const int E_NOTSUPPORTED = 0x80040100;
    //public static const int E_NOTLICENSED = -2147221230;
    public static const int E_OUTOFMEMORY = -2147024882;
    //public static const int E_POINTER = -2147467261;
    public static const int GMEM_FIXED = 0;
    //public static const int GMEM_MOVABLE = 2;
    //public static const int GMEM_NODISCARD = 32;
    public static const int GMEM_ZEROINIT = 64;
    public static const int GUIDKIND_DEFAULT_SOURCE_DISP_IID = 1;
    public static const int IMPLTYPEFLAG_FDEFAULT = 1;
    //public static const int IMPLTYPEFLAG_FDEFAULTVTABLE = 2048;
    public static const int IMPLTYPEFLAG_FRESTRICTED = 4;
    public static const int IMPLTYPEFLAG_FSOURCE = 2;
    public static const int LOCALE_SYSTEM_DEFAULT = 1024;
    public static const int LOCALE_USER_DEFAULT = 2048;
    //public static const int MEMCTX_TASK = 1;
    //public static const int OLEACTIVATEAUTO = 3;
    //public static const int OLEACTIVATEDOUBLECLICK = 2;
    //public static const int OLEACTIVATEGETFOCUS = 1;
    //public static const int OLEACTIVATEMANUAL = 0;
    //public static const int OLEAUTOMATIC = 0;
    //public static const int OLECHANGED = 0;
    public static const int OLECLOSE_NOSAVE = 1;
    //public static const int OLECLOSE_PROMPTSAVE = 2;
    public static const int OLECLOSE_SAVEIFDIRTY = 0;
    //public static const int OLECLOSED = 2;
    //public static const int OLECONTF_EMBEDDINGS = 1;
    //public static const int OLECONTF_LINKS = 2;
    //public static const int OLECONTF_ONLYIFRUNNING = 16;
    //public static const int OLECONTF_ONLYUSER = 8;
    //public static const int OLECONTF_OTHERS = 4;
    //public static const int OLEDEACTIVATEMANUAL = 1;
    //public static const int OLEDEACTIVATEONLOSEFOCUS = 0;
    //public static const int OLEDECBORDER = 1;
    //public static const int OLEDECBORDERANDNIBS = 3;
    //public static const int OLEDECNIBS = 2;
    //public static const int OLEDECNONE = 0;
    //public static const int OLEDISPLAYCONTENT = 0;
    //public static const int OLEDISPLAYICON = 1;
    //public static const int OLEEITHER = 2;
    public static const int OLEEMBEDDED = 1;
    //public static const int OLEFROZEN = 1;
    public static const int OLEIVERB_DISCARDUNDOSTATE = -6;
    //public static const int OLEIVERB_HIDE = -3;
    public static const int OLEIVERB_INPLACEACTIVATE = -5;
    //public static const int OLEIVERB_OPEN = -2;
    public static const int OLEIVERB_PRIMARY = 0;
    //public static const int OLEIVERB_PROPERTIES = -7;
    //public static const int OLEIVERB_SHOW = -1;
    //public static const int OLEIVERB_UIACTIVATE = -4;
    public static const int OLELINKED = 0;
    //public static const int OLEMANUAL = 2;
    //public static const int OLEMISC_ACTIVATEWHENVISIBLE = 256;
    //public static const int OLEMISC_ACTSLIKEBUTTON = 4096;
    //public static const int OLEMISC_ACTSLIKELABEL = 8192;
    //public static const int OLEMISC_ALIGNABLE = 32768;
    //public static const int OLEMISC_ALWAYSRUN = 2048;
    //public static const int OLEMISC_CANLINKBYOLE1 = 32;
    //public static const int OLEMISC_CANTLINKINSIDE = 16;
    //public static const int OLEMISC_IGNOREACTIVATEWHENVISIBLE = 524288;
    //public static const int OLEMISC_IMEMODE = 262144;
    //public static const int OLEMISC_INSERTNOTREPLACE = 4;
    //public static const int OLEMISC_INSIDEOUT = 128;
    //public static const int OLEMISC_INVISIBLEATRUNTIME = 1024;
    //public static const int OLEMISC_ISLINKOBJECT = 64;
    //public static const int OLEMISC_NOUIACTIVATE = 16384;
    //public static const int OLEMISC_ONLYICONIC = 2;
    //public static const int OLEMISC_RECOMPOSEONRESIZE = 1;
    //public static const int OLEMISC_RENDERINGISDEVICEINDEPENDENT = 512;
    //public static const int OLEMISC_SETCLIENTSITEFIRST = 131072;
    //public static const int OLEMISC_SIMPLEFRAME = 65536;
    //public static const int OLEMISC_STATIC = 8;
    //public static const int OLEMISC_SUPPORTSMULTILEVELUNDO = 2097152;
    //public static const int OLEMISC_WANTSTOMENUMERGE = 1048576;
    //public static const int OLENONE = 3;
    //public static const int OLERENAMED = 3;
    //public static const int OLERENDER_ASIS = 3;
    public static const int OLERENDER_DRAW = 1;
    //public static const int OLERENDER_FORMAT = 2;
    //public static const int OLERENDER_NONE = 0;
    //public static const int OLESAVED = 1;
    //public static const int OLESIZEAUTOSIZE = 2;
    //public static const int OLESIZECLIP = 0;
    //public static const int OLESIZESTRETCH = 1;
    //public static const int OLESIZEZOOM = 3;
    //public static const int OLEWHICHMK_CONTAINER = 1;
    //public static const int OLEWHICHMK_OBJFULL = 3;
    //public static const int OLEWHICHMK_OBJREL = 2;
    public static const int S_FALSE = 1;
    public static const int S_OK = 0;
    public static const int STG_E_FILENOTFOUND = 0x80030002;
    public static const int STG_S_CONVERTED = 0x00030200;
    //public static const int STGC_CONSOLIDATE = 8;
    //public static const int STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE = 4;
    public static const int STGC_DEFAULT = 0;
    //public static const int STGC_ONLYIFCURRENT = 2;
    //public static const int STGC_OVERWRITE = 1;
    public static const int STGM_CONVERT = 0x00020000;
    public static const int STGM_CREATE = 0x00001000;
    public static const int STGM_DELETEONRELEASE = 0x04000000;
    public static const int STGM_DIRECT = 0x00000000;
    public static const int STGM_DIRECT_SWMR = 0x00400000;
    public static const int STGM_FAILIFTHERE = 0x00000000;
    public static const int STGM_NOSCRATCH = 0x00100000;
    public static const int STGM_NOSNAPSHOT = 0x00200000;
    public static const int STGM_PRIORITY = 0x00040000;
    public static const int STGM_READ = 0x00000000;
    public static const int STGM_READWRITE = 0x00000002;
    public static const int STGM_SHARE_DENY_NONE = 0x00000040;
    public static const int STGM_SHARE_DENY_READ = 0x00000030;
    public static const int STGM_SHARE_DENY_WRITE = 0x00000020;
    public static const int STGM_SHARE_EXCLUSIVE = 0x00000010;
    public static const int STGM_SIMPLE = 0x08000000;
    public static const int STGM_TRANSACTED = 0x00010000;
    public static const int STGM_WRITE = 0x00000001;
    public static const int STGTY_STORAGE = 1;
    public static const int STGTY_STREAM = 2;
    public static const int STGTY_LOCKBYTES = 3;
    public static const int STGTY_PROPERTY = 4;
    //public static const int TYMED_ENHMF = 64;
    //public static const int TYMED_FILE = 2;
    //public static const int TYMED_GDI = 16;
    public static const int TYMED_HGLOBAL = 1;
    //public static const int TYMED_ISTORAGE = 8;
    //public static const int TYMED_ISTREAM = 4;
    //public static const int TYMED_MFPICT = 32;
    //public static const int TYMED_NULL = 0;
    public static const short DISPATCH_METHOD = 0x1;
    public static const short DISPATCH_PROPERTYGET = 0x2;
    public static const short DISPATCH_PROPERTYPUT = 0x4;
    public static const short DISPATCH_PROPERTYPUTREF = 0x8;
    //public static const short DISPID_CONSTRUCTOR = -6;
    //public static const short DISPID_DESTRUCTOR = -7;
    //public static const short DISPID_EVALUATE = -5;
    //public static const short DISPID_NEWENUM = -4;
    public static const short DISPID_PROPERTYPUT = -3;
    //public static const short DISPID_UNKNOWN = -1;
    //public static const short DISPID_VALUE = 0;
    public static const short VT_BOOL = 11;
    public static const short VT_BSTR = 8;
    public static const short VT_BYREF = 16384;
    public static const short VT_CY = 6;
    public static const short VT_DATE = 7;
    public static const short VT_DISPATCH = 9;
    public static const short VT_EMPTY = 0;
    public static const short VT_ERROR = 10;
    public static const short VT_I1 = 16;
    public static const short VT_I2 = 2;
    public static const short VT_I4 = 3;
    public static const short VT_I8 = 20;
    public static const short VT_NULL = 1;
    public static const short VT_R4 = 4;
    public static const short VT_R8 = 5;
    public static const short VT_UI1 = 17;
    public static const short VT_UI2 = 18;
    public static const short VT_UI4 = 19;
    public static const short VT_UNKNOWN = 13;
    public static const short VT_VARIANT = 12;
    public static const short VARIANT_TRUE = -1;
    public static const short VARIANT_FALSE = 0;


// alias dwt.internal.ole.win32.comapi.
// public static GUID* IIDFromString(char[] lpsz) {
// 	GUID* lpiid = new GUID();
// 	if (COM.IIDFromString(Converter.StrToWCHARz(lpsz), lpiid) == COM.S_OK)
// 		return lpiid;
// 	return null;
// }

alias COMAPI.CLSIDFromProgID CLSIDFromProgID;
alias COMAPI.CLSIDFromString CLSIDFromString;
alias COMAPI.CoCreateInstance CoCreateInstance;
alias COMAPI.CoFreeUnusedLibraries CoFreeUnusedLibraries;
alias COMAPI.CoGetClassObject CoGetClassObject;
alias COMAPI.CoLockObjectExternal CoLockObjectExternal;
alias COMAPI.CoTaskMemAlloc CoTaskMemAlloc;
alias COMAPI.CoTaskMemFree CoTaskMemFree;
alias COMAPI.CreateStdAccessibleObject CreateStdAccessibleObject;
alias COMAPI.CreateStreamOnHGlobal CreateStreamOnHGlobal;
alias COMAPI.DoDragDrop DoDragDrop;
alias COMAPI.GetClassFile GetClassFile;
alias COMAPI.IIDFromString IIDFromString;
alias COMAPI.IsEqualGUID IsEqualGUID;
alias COMAPI.LresultFromObject LresultFromObject;
alias COMAPI.OleCreate OleCreate;
alias COMAPI.OleCreateFromFile OleCreateFromFile;
alias COMAPI.OleCreatePropertyFrame OleCreatePropertyFrame;
alias COMAPI.OleDraw OleDraw;
alias COMAPI.OleFlushClipboard OleFlushClipboard;
alias COMAPI.OleGetClipboard OleGetClipboard;
alias COMAPI.OleIsCurrentClipboard OleIsCurrentClipboard;
alias COMAPI.OleIsRunning OleIsRunning;
alias COMAPI.OleLoad OleLoad;
alias COMAPI.OleRun OleRun;
alias COMAPI.OleSave OleSave;
alias COMAPI.OleSetClipboard OleSetClipboard;
alias COMAPI.OleSetContainedObject OleSetContainedObject;
alias COMAPI.OleSetMenuDescriptor OleSetMenuDescriptor;
alias COMAPI.OleTranslateColor OleTranslateColor;
alias COMAPI.ProgIDFromCLSID ProgIDFromCLSID;
alias COMAPI.RegisterDragDrop RegisterDragDrop;
alias COMAPI.ReleaseStgMedium ReleaseStgMedium;
alias COMAPI.RevokeDragDrop RevokeDragDrop;
alias COMAPI.StgCreateDocfile StgCreateDocfile;
alias COMAPI.StgIsStorageFile StgIsStorageFile;
alias COMAPI.StgOpenStorage StgOpenStorage;
alias COMAPI.StringFromCLSID StringFromCLSID;
alias COMAPI.SysAllocString SysAllocString;
alias COMAPI.SysFreeString SysFreeString;
alias COMAPI.SysStringByteLen SysStringByteLen;
alias COMAPI.VariantChangeType VariantChangeType;
alias COMAPI.VariantClear VariantClear;
alias COMAPI.VariantCopy VariantCopy;
alias COMAPI.VariantInit VariantInit;
alias COMAPI.WriteClassStg WriteClassStg;

/**
 * <Shawn Liu>
 * VtbCall partially kept, use VtbCall instead of automation can promote performace
 * and VtbCall doesn't need prototype of interface declaration
 */

public static int VtblCall(int fnNumber, void* ppVtbl) {
	Function1 fn = cast(Function1)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl);
}

public static int VtblCall(int fnNumber, void* ppVtbl, int arg0){
	Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, arg0);
}

public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1){
	Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, arg0, arg1);
}

public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2){
	Function4 fn = cast(Function4)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, arg0, arg1, arg2);
}
public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2, int arg3){
	Function5 fn = cast(Function5)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, arg0, arg1, arg2, arg3);
}

public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4){
	Function6 fn = cast(Function6)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, arg0, arg1, arg2, arg3, arg4);
}

public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5){
	Function7 fn = cast(Function7)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5);
}

public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6){
	Function8 fn = cast(Function8)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6);
}

public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7){
	Function9 fn = cast(Function9)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
}

/*
public static int VtblCall(int fnNumber, void* ppVtbl) {
	Function1 fn = cast(Function1)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl);
}

public static int VtblCall(int fnNumber, void* ppVtbl, int arg0){
	Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, arg0);
}

public static int VtblCall(int fnNumber, void* ppVtbl, void* arg0){
	Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, cast(int)arg0);
}

public static int VtblCall(int fnNumber, void* ppVtbl, wchar* arg0) {
	Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, cast(int)arg0);
}
public static int VtblCall(int fnNumber, void* ppVtbl, wchar* arg0, wchar* arg1){
	Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, cast(int)arg0, cast(int)arg1);
}
public static int VtblCall(int fnNumber, void* ppVtbl, wchar* arg0, int arg1) {
	Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, cast(int)arg0, arg1);
}
public static int VtblCall(int fnNumber, void* ppVtbl, wchar* arg0, int arg1, int arg2, int arg3, int[] arg4) {
	Function6 fn = cast(Function6)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, cast(int)arg0, arg1, arg2, arg3, cast(int)cast(int*)arg4);
}
public static int VtblCall(int fnNumber, void* ppVtbl, wchar* arg0, int arg1, int arg2, int arg3, int arg4, int[] arg5) {
	Function7 fn = cast(Function7)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, cast(int)arg0, arg1, arg2, arg3, arg4, cast(int)cast(int*)arg5);
}
public static int VtblCall(int fnNumber, void* ppVtbl, int[] arg0) {
	Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, cast(int)cast(int*)arg0);
}
public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int[] arg1) {
	Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, arg0, cast(int)cast(int*)arg1);
}
public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1) {
	Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, arg0, arg1);
}
public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int[] arg2) {
	Function4 fn = cast(Function4)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, arg0, arg1, cast(int)cast(int*)arg2);
}
public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2) {
	Function4 fn = cast(Function4)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, arg0, arg1, arg2);
}
public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2, int[] arg3) {
	Function5 fn = cast(Function5)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, arg0, arg1, arg2, cast(int)cast(int*)arg3);
}
public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, DVTARGETDEVICE* arg2, SIZE* arg3) {
	Function5 fn = cast(Function5)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, arg0, arg1, cast(int)(arg2), cast(int)(arg3));
}
public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, GUID* arg2, int arg3, int[] arg4) {
	Function6 fn = cast(Function6)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, arg0, arg1, cast(int)(arg2), arg3, cast(int)cast(int*)arg4);
}
public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, FORMATETC* arg1, int[] arg2) {
	Function4 fn = cast(Function4)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, arg0, cast(int)(arg1), cast(int)cast(int*)arg2);
}
public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, GUID* arg1) {
	Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, arg0, cast(int)(arg1));
}
public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, GUID* arg1, int arg2, int arg3) {
	Function5 fn = cast(Function5)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, arg0, cast(int)(arg1), arg2, arg3);
}
public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, GUID* arg1, int arg2, int arg3, DISPPARAMS* arg4, int arg5, EXCEPINFO* arg6, int[] arg7) {
	Function9 fn = cast(Function9)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, arg0, cast(int)(arg1), arg2, arg3, cast(int)(arg4), arg5, cast(int)(arg6), cast(int)cast(int*)arg7);
}
public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, STATSTG* arg1, int[] arg2) {
	Function4 fn = cast(Function4)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, arg0, cast(int)(arg1), cast(int)cast(int*)arg2);
}
public static int VtblCall(int fnNumber, void* ppVtbl, MSG* arg0) {
	Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, cast(int)(arg0));
}
public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, MSG* arg1, int arg2, int arg3, int arg4, RECT* arg5) {
	Function7 fn = cast(Function7)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, arg0, cast(int)(arg1), arg2, arg3, arg4, cast(int)(arg5));
}
public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, SIZE* arg1) {
	Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, arg0, cast(int)(arg1));
}

// TODO: the type of BOOL ???
// conflict with  VtblCall(int, int, int, int);
public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, bool arg1) {
	Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, arg0, cast(int)arg1);
}
public static int VtblCall(int fnNumber, void* ppVtbl, CAUUID* arg0) {
	Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, cast(int)(arg0));
}
public static int VtblCall(int fnNumber, void* ppVtbl, CONTROLINFO* arg0) {
	Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, cast(int)(arg0));
}
public static int VtblCall(int fnNumber, void* ppVtbl, FORMATETC* arg0) {
	Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, cast(int)(arg0));
}
public static int VtblCall(int fnNumber, void* ppVtbl, FORMATETC* arg0, STGMEDIUM* arg1) {
	Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, cast(int)(arg0), cast(int)(arg1));
}
// TODO: BOOL type ???
public static int VtblCall(int fnNumber, void* ppVtbl, FORMATETC* arg0, STGMEDIUM* arg1, int arg2) {
	Function4 fn = cast(Function4)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, cast(int)(arg0), cast(int)(arg1), arg2);
}
public static int VtblCall(int fnNumber, void* ppVtbl, GUID* arg0) {
	Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, cast(int)(arg0));
}

public static int VtblCall(int fnNumber, void* ppVtbl, GUID* arg0, int[] arg1) {
	Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, cast(int)(arg0), cast(int)cast(int*)arg1);
}

public static int VtblCall(int fnNumber, void* ppVtbl, GUID* arg0, int arg1, int arg2, int arg3, int[] arg4) {
	Function6 fn = cast(Function6)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, cast(int)(arg0), arg1, arg2, arg3, cast(int)cast(int*)arg4);
}
public static int VtblCall(int fnNumber, void* ppVtbl, GUID* arg0, int arg1, int arg2, int arg3, int arg4) {
	Function6 fn = cast(Function6)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, cast(int)(arg0), arg1, arg2, arg3, arg4);
}
public static int VtblCall(int fnNumber, void* ppVtbl, GUID* arg0, int arg1, OLECMD* arg2, OLECMDTEXT* arg3) {
	Function5 fn = cast(Function5)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, cast(int)(arg0), arg1, cast(int)(arg2), cast(int)(arg3));
}
public static int VtblCall(int fnNumber, void* ppVtbl, LICINFO* arg0) {
	Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, cast(int)(arg0));
}
public static int VtblCall(int fnNumber, void* ppVtbl, RECT* arg0, int arg1, int arg2) {
	Function4 fn = cast(Function4)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, cast(int)(arg0), arg1, arg2);
}
public static int VtblCall(int fnNumber, void* ppVtbl, RECT* arg0, RECT* arg1) {
	Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, cast(int)(arg0), cast(int)(arg1));
}
public static int VtblCall(int fnNumber, void* ppVtbl, RECT* arg0) {
	Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, cast(int)(arg0));
}
public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int[] arg1, int[] arg2, int[] arg3, int[] arg4) {
	Function6 fn = cast(Function6)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, arg0, cast(int)cast(int*)arg1, cast(int)cast(int*)arg2, cast(int)cast(int*)arg3, cast(int)cast(int*)arg4);
}
public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int[] arg1, int arg2, int[] arg3) {
	Function5 fn = cast(Function5)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, arg0, cast(int)cast(int*)arg1, arg2, cast(int)cast(int*)arg3);
}


// Start ACCESSIBILITY
public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2, int arg3) {
	Function5 fn = cast(Function5)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, arg0, arg1, arg2, arg3);
}
public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4) {
	Function6 fn = cast(Function6)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, arg0, arg1, arg2, arg3, arg4);
}
public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5) {
	Function7 fn = cast(Function7)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5);
}
public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7) {
	Function9 fn = cast(Function9)(*cast(int **)ppVtbl)[fnNumber];
	return fn(ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
}

*/

public static const int CO_E_OBJNOTCONNECTED = 0x800401FD;

public static const int STATE_SYSTEM_NORMAL = 0;
//public static const int STATE_SYSTEM_UNAVAILABLE = 0x1;
public static const int STATE_SYSTEM_SELECTED = 0x2;
public static const int STATE_SYSTEM_FOCUSED = 0x4;
public static const int STATE_SYSTEM_PRESSED = 0x8;
public static const int STATE_SYSTEM_CHECKED = 0x10;
//public static const int STATE_SYSTEM_MIXED = 0x20;
//public static const int STATE_SYSTEM_INDETERMINATE = STATE_SYSTEM_MIXED;
public static const int STATE_SYSTEM_READONLY = 0x40;
public static const int STATE_SYSTEM_HOTTRACKED = 0x80;
//public static const int STATE_SYSTEM_DEFAULT = 0x100;
public static const int STATE_SYSTEM_EXPANDED = 0x200;
public static const int STATE_SYSTEM_COLLAPSED = 0x400;
public static const int STATE_SYSTEM_BUSY = 0x800;
//public static const int STATE_SYSTEM_FLOATING = 0x1000;
//public static const int STATE_SYSTEM_MARQUEED = 0x2000;
//public static const int STATE_SYSTEM_ANIMATED = 0x4000;
public static const int STATE_SYSTEM_INVISIBLE = 0x8000;
public static const int STATE_SYSTEM_OFFSCREEN = 0x10000;
public static const int STATE_SYSTEM_SIZEABLE = 0x20000;
//public static const int STATE_SYSTEM_MOVEABLE = 0x40000;
//public static const int STATE_SYSTEM_SELFVOICING = 0x80000;
public static const int STATE_SYSTEM_FOCUSABLE = 0x100000;
public static const int STATE_SYSTEM_SELECTABLE = 0x200000;
public static const int STATE_SYSTEM_LINKED = 0x400000;
//public static const int STATE_SYSTEM_TRAVERSED = 0x800000;
public static const int STATE_SYSTEM_MULTISELECTABLE = 0x1000000;
//public static const int STATE_SYSTEM_EXTSELECTABLE = 0x2000000;
//public static const int STATE_SYSTEM_ALERT_LOW = 0x4000000;
//public static const int STATE_SYSTEM_ALERT_MEDIUM = 0x8000000;
//public static const int STATE_SYSTEM_ALERT_HIGH = 0x10000000;
//public static const int STATE_SYSTEM_PROTECTED = 0x20000000;
//public static const int STATE_SYSTEM_VALID = 0x3fffffff;

//public static const int ROLE_SYSTEM_TITLEBAR = 0x1;
public static const int ROLE_SYSTEM_MENUBAR = 0x2;
public static const int ROLE_SYSTEM_SCROLLBAR = 0x3;
//public static const int ROLE_SYSTEM_GRIP = 0x4;
//public static const int ROLE_SYSTEM_SOUND = 0x5;
//public static const int ROLE_SYSTEM_CURSOR = 0x6;
//public static const int ROLE_SYSTEM_CARET = 0x7;
//public static const int ROLE_SYSTEM_ALERT = 0x8;
public static const int ROLE_SYSTEM_WINDOW = 0x9;
public static const int ROLE_SYSTEM_CLIENT = 0xa;
public static const int ROLE_SYSTEM_MENUPOPUP = 0xb;
public static const int ROLE_SYSTEM_MENUITEM = 0xc;
public static const int ROLE_SYSTEM_TOOLTIP = 0xd;
//public static const int ROLE_SYSTEM_APPLICATION = 0xe;
//public static const int ROLE_SYSTEM_DOCUMENT = 0xf;
//public static const int ROLE_SYSTEM_PANE = 0x10;
//public static const int ROLE_SYSTEM_CHART = 0x11;
public static const int ROLE_SYSTEM_DIALOG = 0x12;
//public static const int ROLE_SYSTEM_BORDER = 0x13;
//public static const int ROLE_SYSTEM_GROUPING = 0x14;
public static const int ROLE_SYSTEM_SEPARATOR = 0x15;
public static const int ROLE_SYSTEM_TOOLBAR = 0x16;
//public static const int ROLE_SYSTEM_STATUSBAR = 0x17;
public static const int ROLE_SYSTEM_TABLE = 0x18;
public static const int ROLE_SYSTEM_COLUMNHEADER = 0x19;
public static const int ROLE_SYSTEM_ROWHEADER = 0x1a;
//public static const int ROLE_SYSTEM_COLUMN = 0x1b;
//public static const int ROLE_SYSTEM_ROW = 0x1c;
public static const int ROLE_SYSTEM_CELL = 0x1d;
public static const int ROLE_SYSTEM_LINK = 0x1e;
//public static const int ROLE_SYSTEM_HELPBALLOON = 0x1f;
//public static const int ROLE_SYSTEM_CHARACTER = 0x20;
public static const int ROLE_SYSTEM_LIST = 0x21;
public static const int ROLE_SYSTEM_LISTITEM = 0x22;
public static const int ROLE_SYSTEM_OUTLINE = 0x23;
public static const int ROLE_SYSTEM_OUTLINEITEM = 0x24;
public static const int ROLE_SYSTEM_PAGETAB = 0x25;
//public static const int ROLE_SYSTEM_PROPERTYPAGE = 0x26;
//public static const int ROLE_SYSTEM_INDICATOR = 0x27;
//public static const int ROLE_SYSTEM_GRAPHIC = 0x28;
public static const int ROLE_SYSTEM_STATICTEXT = 0x29;
public static const int ROLE_SYSTEM_TEXT = 0x2a;
public static const int ROLE_SYSTEM_PUSHBUTTON = 0x2b;
public static const int ROLE_SYSTEM_CHECKBUTTON = 0x2c;
public static const int ROLE_SYSTEM_RADIOBUTTON = 0x2d;
public static const int ROLE_SYSTEM_COMBOBOX = 0x2e;
//public static const int ROLE_SYSTEM_DROPLIST = 0x2f;
public static const int ROLE_SYSTEM_PROGRESSBAR = 0x30;
//public static const int ROLE_SYSTEM_DIAL = 0x31;
//public static const int ROLE_SYSTEM_HOTKEYFIELD = 0x32;
public static const int ROLE_SYSTEM_SLIDER = 0x33;
//public static const int ROLE_SYSTEM_SPINBUTTON = 0x34;
//public static const int ROLE_SYSTEM_DIAGRAM = 0x35;
//public static const int ROLE_SYSTEM_ANIMATION = 0x36;
//public static const int ROLE_SYSTEM_EQUATION = 0x37;
//public static const int ROLE_SYSTEM_BUTTONDROPDOWN = 0x38;
//public static const int ROLE_SYSTEM_BUTTONMENU = 0x39;
//public static const int ROLE_SYSTEM_BUTTONDROPDOWNGRID = 0x3a;
//public static const int ROLE_SYSTEM_WHITESPACE = 0x3b;
public static const int ROLE_SYSTEM_PAGETABLIST = 0x3c;
//public static const int ROLE_SYSTEM_CLOCK = 0x3d;

public static const int CHILDID_SELF = 0;

/* End ACCESSIBILITY */

}