Changeset 98:ecba636b634e

Show
Ignore:
Timestamp:
02/08/08 21:36:27 (10 months ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

package dwt/ole

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dwt/DWT.d

    r84 r98  
    34743474 * @param code the DWT error code 
    34753475 */ 
     3476public static void error (char[] file, long line, int code) { 
     3477    error (code, null); 
     3478} 
    34763479public static void error (int code) { 
    34773480    error (code, null); 
  • dwt/dwthelper/utils.d

    r97 r98  
    77public import Math = tango.math.Math; 
    88 
    9 public import tango.core.Exception : IllegalArgumentException
     9public import tango.core.Exception : IllegalArgumentException, IOException
    1010 
    1111import tango.io.Stdout; 
     
    4242 
    4343alias ValueWrapperT!(bool)    ValueWrapperBool; 
     44alias ValueWrapperT!(int)     ValueWrapperInt; 
    4445alias ArrayWrapperT!(byte)    ArrayWrapperByte; 
    4546alias ArrayWrapperT!(int)     ArrayWrapperInt; 
     
    129130} 
    130131 
     132public bool startsWith( char[] src, char[] pattern ){ 
     133    if( src.length < pattern.length ){ 
     134        return false; 
     135    } 
     136    return src[ 0 .. pattern.length ] == pattern; 
     137} 
    131138public char[] toLowerCase( char[] src ){ 
    132139    return tango.text.Unicode.toLower( src ); 
  • dwt/internal/ole/win32/COM.d

    r97 r98  
    1  
    2 /* 
    3  * COM types, constants and APIs 
     1/******************************************************************************* 
     2 * Copyright (c) 2000, 2007 IBM Corporation and others. 
     3 * All rights reserved. This program and the accompanying materials 
     4 * are made available under the terms of the Eclipse Public License v1.0 
     5 * which accompanies this distribution, and is available at 
     6 * http://www.eclipse.org/legal/epl-v10.html 
    47 * 
    5  * all API are aliased from other modules 
    6  * 
    7  * author : Shawn Liu 
    8  */ 
    9  
     8 * Contributors: 
     9 *     IBM Corporation - initial API and implementation 
     10 * Port to the D programming language: 
     11 *     Shawn Liu 
     12 *     Frank Benoit <benoit@tionex.de> 
     13 *******************************************************************************/ 
    1014module dwt.internal.ole.win32.COM; 
    1115 
    1216 
    13 private import dwt.internal.ole.win32.COMTYPES; 
     17public import dwt.internal.ole.win32.COMTYPES; 
    1418private import dwt.internal.ole.win32.OAIDL; 
    1519private import dwt.internal.ole.win32.OBJIDL; 
     
    2731public import dwt.internal.win32.OS; 
    2832 
     33template IIDFromStringT(char[] g) { 
     34   static if (g.length == 38) 
     35     const GUID IIDFromStringT = IIDFromStringT!(g[1..$-1]); 
     36   else static if (g.length == 36) 
     37     const GUID IIDFromStringT = { 
     38        mixin("0x" ~ g[0..8]), 
     39        mixin("0x" ~ g[9..13]), 
     40        mixin("0x" ~ g[14..18]), 
     41        [ 
     42            mixin("0x" ~ g[19..21]), 
     43            mixin("0x" ~ g[21..23]), 
     44            mixin("0x" ~ g[24..26]), 
     45            mixin("0x" ~ g[26..28]), 
     46            mixin("0x" ~ g[28..30]), 
     47            mixin("0x" ~ g[30..32]), 
     48            mixin("0x" ~ g[32..34]), 
     49            mixin("0x" ~ g[34..36]) ] }; 
     50   else 
     51     static assert(false, "Incorrect format for GUID. "~g); 
     52} 
     53 
     54 
    2955public class COM : OS { 
    3056 
     
    3359    // all the GUID 
    3460    // GUIDs for Home Page Browser 
    35     public static const GUID IIDJavaBeansBridge = { 0x8AD9C840, 0x044E, 0x11D1, [ 0xB3, 0xE9, 0x00, 0x80, 0x5F, 0x49, 0x9D, 0x93]}; //$NON-NLS-1$ 
    36     public static const GUID IIDShockwaveActiveXControl = { 0x166B1BCA, 0x3F9C, 0x11CF, [ 0x80, 0x75, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00]}; //$NON-NLS-1$ 
    37     public const GUID IIDIEditorSiteTime = { 0x6BD2AEFE, 0x7876, 0x45e6, [0xA6, 0xE7, 0x3B, 0xFC, 0xDF, 0x65, 0x40, 0xAA]}; 
    38     public const GUID IIDIEditorSiteProperty = { 0xD381A1F4, 0x2326, 0x4f3c, [0xAF, 0xB9, 0xB7, 0x53, 0x7D, 0xB9, 0xE2, 0x38]}; 
    39     public const GUID IIDIEditorBaseProperty = { 0x61E55B0B, 0x2647, 0x47c4, [0x8C, 0x89, 0xE7, 0x36, 0xEF, 0x15, 0xD6, 0x36]}; 
    40     public const GUID IIDIEditorSite = { 0xCDD88AB9, 0xB01D, 0x426E, [0xB0, 0xF0, 0x30, 0x97, 0x3E, 0x9A, 0x07, 0x4B]}; 
    41     public const GUID IIDIEditorService = { 0xBEE283FE, 0x7B42, 0x4FF3, [0x82, 0x32, 0x0F, 0x07, 0xD4, 0x3A, 0xBC, 0xF1]}; 
    42     public const GUID IIDIEditorManager = { 0xEFDE08C4, 0xBE87, 0x4B1A, [0xBF, 0x84, 0x15, 0xFC, 0x30, 0x20, 0x71, 0x80]}; 
    43  
    44     public const GUID IIDIAccessible = { 0x618736E0, 0x3C3D, 0x11CF, [0x81, 0x0C, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71]}; 
    45     //public const GUID IIDIAccessibleHandler = { 0x03022430, 0xABC4, 0x11D0, [0xBD, 0xE2, 0x00, 0xAA, 0x00, 0x1A, 0x19, 0x53]}; 
    46     //public const GUID IIDIAccessor = { 0x0C733A8C, 0x2A1C, 0x11CE, [0xAD, 0xE5, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D]}; 
    47  
    48     public const GUID IIDIAdviseSink = { 0x0000010F, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    49     //public const GUID IIDIAdviseSink2 = { 0x00000125, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    50     //public const GUID IIDIBindCtx = { 0x0000000E, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    51     //public const GUID IIDIClassFactory = { 0x00000001, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    52     public const GUID IIDIClassFactory2 = { 0xB196B28F, 0xBAB4, 0x101A, [0xB6, 0x9C, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07]}; 
    53     public const GUID IIDIConnectionPoint = { 0xB196B286, 0xBAB4, 0x101A, [0xB6, 0x9C, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07]}; 
    54     public const GUID IIDIConnectionPointContainer = { 0xB196B284, 0xBAB4, 0x101A, [0xB6, 0x9C, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07]}; 
    55     //public const GUID IIDICreateErrorInfo = { 0x22F03340, 0x547D, 0x101B, [0x8E, 0x65, 0x08, 0x00, 0x2B, 0x2B, 0xD1, 0x19]}; 
    56     //public const GUID IIDICreateTypeInfo = { 0x00020405, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    57     //public const GUID IIDICreateTypeLib = { 0x00020406, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    58     //public const GUID IIDIDataAdviseHolder = { 0x00000110, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    59     public const GUID IIDIDataObject = { 0x0000010E, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    60     public const GUID IIDIDispatch = { 0x00020400, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    61     public const GUID IIDIDocHostUIHandler = { 0xBD3F23C0, 0xD43E, 0x11CF, [0x89, 0x3B, 0x00, 0xAA, 0x00, 0xBD, 0xCE, 0x1A]}; 
    62     public const GUID IIDIDocHostShowUI = { 0xC4D244B0, 0xD43E, 0x11CF, [0x89, 0x3B, 0x00, 0xAA, 0x00, 0xBD, 0xCE, 0x1A]}; 
    63     public const GUID IIDIDropSource = { 0x00000121, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    64     public const GUID IIDIDropTarget = { 0x00000122, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    65     //public const GUID IIDIEnumConnectionPoints = { 0xB196B285, 0xBAB4, 0x101A, [0xB6, 0x9C, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07]}; 
    66     //public const GUID IIDIEnumConnections = { 0xB196B287, 0xBAB4, 0x101A, [0xB6, 0x9C, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07]}; 
    67     public const GUID IIDIEnumFORMATETC = { 0x00000103, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    68     //public const GUID IIDIEnumMoniker = { 0x00000102, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    69     //public const GUID IIDIEnumOLEVERB = { 0x00000104, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    70     //public const GUID IIDIEnumSTATDATA = { 0x00000105, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    71     //public const GUID IIDIEnumSTATSTG = { 0x0000000D, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    72     //public const GUID IIDIEnumString = { 0x00000101, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    73     //public const GUID IIDIEnumUnknown = { 0x00000100, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    74     public const GUID IIDIEnumVARIANT = { 0x00020404, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    75     //public const GUID IIDIErrorInfo = { 0x1CF2B120, 0x547D, 0x101B, [0x8E, 0x65, 0x08, 0x00, 0x2B, 0x2B, 0xD1, 0x19]}; 
    76     //public const GUID IIDIErrorLog = { 0x3127CA40, 0x446E, 0x11CE, [0x81, 0x35, 0x00, 0xAA, 0x00, 0x4B, 0xB8, 0x51]}; 
    77     //public const GUID IIDIExternalConnection = { 0x00000019, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    78     public const GUID IIDIFont = { 0xBEF6E002, 0xA874, 0x101A, [0x8B, 0xBA, 0x00, 0xAA, 0x00, 0x30, 0x0C, 0xAB]}; 
    79     //public const GUID IIDIFontDisp = { 0xBEF6E003, 0xA874, 0x101A, [0x8B, 0xBA, 0x00, 0xAA, 0x00, 0x30, 0x0C, 0xAB]}; 
    80     public static const /*GUID*/ char[] IIDIHTMLDocumentEvents2 = /*IIDFromString(*/"{3050F613-98B5-11CF-BB82-00AA00BDCE0B}"/*)*/; 
    81     public const GUID IIDIInternetSecurityManager = { 0x79eac9ee, 0xbaf9, 0x11ce, [0x8c, 0x82, 0x00, 0xaa, 0x00, 0x4b, 0xa9, 0x0b]}; 
    82     //public const GUID IIDILockBytes = { 0x0000000A, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    83     //public const GUID IIDIMalloc = { 0x00000002, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    84     //public const GUID IIDIMallocSpy = { 0x0000001D, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    85     //public const GUID IIDIMarshal = { 0x00000003, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    86     //public const GUID IIDIMessageFilter = { 0x00000016, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    87     //public const GUID IIDIMoniker = { 0x0000000F, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    88     //public const GUID IIDIOleAdviseHolder = { 0x00000111, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    89     //public const GUID IIDIOleCache = { 0x0000011E, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    90     //public const GUID IIDIOleCache2 = { 0x00000128, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    91     //public const GUID IIDIOleCacheControl = { 0x00000129, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    92     public const GUID IIDIOleClientSite = { 0x00000118, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    93     public const GUID IIDIOleCommandTarget = { 0xB722BCCB, 0x4E68, 0x101B, [0xA2, 0xBC, 0x00, 0xAA, 0x00, 0x40, 0x47, 0x70]}; 
    94     public const GUID IIDIOleContainer = { 0x0000011B, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    95     public const GUID IIDIOleControl = { 0xB196B288, 0xBAB4, 0x101A, [0xB6, 0x9C, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07]}; 
    96     public const GUID IIDIOleControlSite = { 0xB196B289, 0xBAB4, 0x101A, [0xB6, 0x9C, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07]}; 
    97     public const GUID IIDIOleDocument = { 0xB722BCC5, 0x4E68, 0x101B, [0xA2, 0xBC, 0x00, 0xAA, 0x00, 0x40, 0x47, 0x70]}; 
    98     public const GUID IIDIOleDocumentSite = { 0xB722BCC7, 0x4E68, 0x101B, [0xA2, 0xBC, 0x00, 0xAA, 0x00, 0x40, 0x47, 0x70]}; 
    99     public const GUID IIDIOleInPlaceActiveObject = { 0x00000117, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    100     public const GUID IIDIOleInPlaceFrame = { 0x00000116, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    101     public const GUID IIDIOleInPlaceObject = { 0x00000113, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    102     public const GUID IIDIOleInPlaceSite = { 0x00000119, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    103     public const GUID IIDIOleInPlaceUIWindow = { 0x00000115, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    104     //public const GUID IIDIOleItemContainer = { 0x0000011C, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    105     public const GUID IIDIOleLink = { 0x0000011D, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    106     public const GUID IIDIOleObject = { 0x00000112, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    107     public const GUID IIDIOleWindow = { 0x00000114, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    108     //public const GUID IIDIParseDisplayName = { 0x0000011A, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    109     //public const GUID IIDIPerPropertyBrowsing = { 0x376BD3AA, 0x3845, 0x101B, [0x84, 0xED, 0x08, 0x00, 0x2B, 0x2E, 0xC7, 0x13]}; 
    110     public const GUID IIDIPersist = { 0x0000010C, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    111     public const GUID IIDIPersistFile = { 0x0000010B, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    112     //public const GUID IIDIPersistMemory = { 0xBD1AE5E0, 0xA6AE, 0x11CE, [0xBD, 0x37, 0x50, 0x42, 0x00, 0xC1, 0x00, 0x00]}; 
    113     //public const GUID IIDIPersistPropertyBag = { 0x37D84F60, 0x42CB, 0x11CE, [0x81, 0x35, 0x00, 0xAA, 0x00, 0x4B, 0xB8, 0x51]}; 
    114     public const GUID IIDIPersistStorage = { 0x0000010A, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    115     public const GUID IIDIPersistStream = { 0x00000109, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    116     public const GUID IIDIPersistStreamInit = { 0x7FD52380, 0x4E07, 0x101B, [0xAE, 0x2D, 0x08, 0x00, 0x2B, 0x2E, 0xC7, 0x13]}; 
    117     //public const GUID IIDIPicture = { 0x7BF80980, 0xBF32, 0x101A, [0x8B, 0xBB, 0x00, 0xAA, 0x00, 0x30, 0x0C, 0xAB]}; 
    118     //public const GUID IIDIPictureDisp = { 0x7BF80981, 0xBF32, 0x101A, [0x8B, 0xBB, 0x00, 0xAA, 0x00, 0x30, 0x0C, 0xAB]}; 
    119     //public const GUID IIDIPropertyBag = { 0x55272A00, 0x42CB, 0x11CE, [0x81, 0x35, 0x00, 0xAA, 0x00, 0x4B, 0xB8, 0x51]}; 
    120     public const GUID IIDIPropertyNotifySink = { 0x9BFBBC02, 0xEFF1, 0x101A, [0x84, 0xED, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07]}; 
    121     //public const GUID IIDIPropertyPage = { 0xB196B28D, 0xBAB4, 0x101A, [0xB6, 0x9C, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07]}; 
    122     //public const GUID IIDIPropertyPage2 = { 0x01E44665, 0x24AC, 0x101B, [0x84, 0xED, 0x08, 0x00, 0x2B, 0x2E, 0xC7, 0x13]}; 
    123     //public const GUID IIDIPropertyPageSite = { 0xB196B28C, 0xBAB4, 0x101A, [0xB6, 0x9C, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07]}; 
    124     public const GUID IIDIProvideClassInfo = { 0xB196B283, 0xBAB4, 0x101A, [0xB6, 0x9C, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07]}; 
    125     public const GUID IIDIProvideClassInfo2 = { 0xA6BC3AC0, 0xDBAA, 0x11CE, [0x9D, 0xE3, 0x00, 0xAA, 0x00, 0x4B, 0xB8, 0x51]}; 
    126     //public const GUID IIDIPSFactoryBuffer = { 0xD5F569D0, 0x593B, 0x101A, [0xB5, 0x69, 0x08, 0x00, 0x2B, 0x2D, 0xBF, 0x7A]}; 
    127     //public const GUID IIDIRootStorage = { 0x00000012, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    128     //public const GUID IIDIROTData = { 0xF29F6BC0, 0x5021, 0x11CE, [0xAA, 0x15, 0x00, 0x00, 0x69, 0x01, 0x29, 0x3F]}; 
    129     //public const GUID IIDIRpcChannelBuffer = { 0xD5F56B60, 0x593B, 0x101A, [0xB5, 0x69, 0x08, 0x00, 0x2B, 0x2D, 0xBF, 0x7A]}; 
    130     //public const GUID IIDIRpcProxyBuffer = { 0xD5F56A34, 0x593B, 0x101A, [0xB5, 0x69, 0x08, 0x00, 0x2B, 0x2D, 0xBF, 0x7A]}; 
    131     //public const GUID IIDIRpcStubBuffer = { 0xD5F56AFC, 0x593B, 0x101A, [0xB5, 0x69, 0x08, 0x00, 0x2B, 0x2D, 0xBF, 0x7A]}; 
    132     //public const GUID IIDIRunnableObject = { 0x00000126, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    133     //public const GUID IIDIRunningObjectTable = { 0x00000010, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    134     //public const GUID IIDISimpleFrameSite = { 0x742B0E01, 0x14E6, 0x101B, [0x91, 0x4E, 0x00, 0xAA, 0x00, 0x30, 0x0C, 0xAB]}; 
    135     public const GUID IIDIServiceProvider = { 0x6d5140c1, 0x7436, 0x11ce, [0x80, 0x34, 0x00, 0xaa, 0x00, 0x60, 0x09, 0xfa]}; 
    136     public const GUID IIDISpecifyPropertyPages = { 0xB196B28B, 0xBAB4, 0x101A, [0xB6, 0x9C, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07]}; 
    137     //public const GUID IIDIStdMarshalInfo = { 0x00000018, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    138     public const GUID IIDIStorage = { 0x0000000B, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    139     public const GUID IIDIStream = { 0x0000000C, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    140     //public const GUID IIDISupportErrorInfo = { 0xDF0B3D60, 0x548F, 0x101B, [0x8E, 0x65, 0x08, 0x00, 0x2B, 0x2B, 0xD1, 0x19]}; 
    141     //public const GUID IIDITypeComp = { 0x00020403, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    142     //public const GUID IIDITypeLib = { 0x00020402, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    143     public const GUID IIDIUnknown = { 0x00000000, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    144     //public const GUID IIDIViewObject = { 0x0000010D, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    145     public const GUID IIDIViewObject2 = { 0x00000127, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; 
    146     public static const GUID CGID_DocHostCommandHandler = { 0xf38bc242, 0xb950, 0x11d1, [0x89, 0x18, 0x00, 0xc0, 0x4f, 0xc2, 0xc8, 0x36]}; //$NON-NLS-1$ 
    147     public static const GUID CGID_Explorer = { 0x000214D0, 0x0000, 0x0000, [0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]}; //$NON-NLS-1$ 
     61 
     62    /** GUID Constants */ 
     63    public static const GUID IIDJavaBeansBridge = IIDFromStringT!("{8AD9C840-044E-11D1-B3E9-00805F499D93}"); //$NON-NLS-1$ 
     64    public static const GUID IIDShockwaveActiveXControl = IIDFromStringT!("{166B1BCA-3F9C-11CF-8075-444553540000}"); //$NON-NLS-1$ 
     65    public static const GUID IIDIEditorSiteTime = IIDFromStringT!("{6BD2AEFE-7876-45e6-A6E7-3BFCDF6540AA}"); //$NON-NLS-1$ 
     66    public static const GUID IIDIEditorSiteProperty = IIDFromStringT!("{D381A1F4-2326-4f3c-AFB9-B7537DB9E238}"); //$NON-NLS-1$ 
     67    public static const GUID IIDIEditorBaseProperty = IIDFromStringT!("{61E55B0B-2647-47c4-8C89-E736EF15D636}"); //$NON-NLS-1$ 
     68    public static const GUID IIDIEditorSite = IIDFromStringT!("{CDD88AB9-B01D-426E-B0F0-30973E9A074B}"); //$NON-NLS-1$ 
     69    public static const GUID IIDIEditorService = IIDFromStringT!("{BEE283FE-7B42-4FF3-8232-0F07D43ABCF1}"); //$NON-NLS-1$ 
     70    public static const GUID IIDIEditorManager = IIDFromStringT!("{EFDE08C4-BE87-4B1A-BF84-15FC30207180}"); //$NON-NLS-1$ 
     71    public static const GUID IIDIAccessible = IIDFromStringT!("{618736E0-3C3D-11CF-810C-00AA00389B71}"); //$NON-NLS-1$ 
     72    //public static const GUID IIDIAccessibleHandler = IIDFromStringT!("{03022430-ABC4-11D0-BDE2-00AA001A1953}"); //$NON-NLS-1$ 
     73    //public static const GUID IIDIAccessor = IIDFromStringT!("{0C733A8C-2A1C-11CE-ADE5-00AA0044773D}"); //$NON-NLS-1$ 
     74    public static const GUID IIDIAdviseSink = IIDFromStringT!("{0000010F-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     75    //public static const GUID IIDIAdviseSink2 = IIDFromStringT!("{00000125-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     76    //public static const GUID IIDIBindCtx = IIDFromStringT!("{0000000E-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     77    //public static const GUID IIDIClassFactory = IIDFromStringT!("{00000001-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     78    public static const GUID IIDIClassFactory2 = IIDFromStringT!("{B196B28F-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$ 
     79    public static const GUID IIDIConnectionPoint = IIDFromStringT!("{B196B286-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$ 
     80    public static const GUID IIDIConnectionPointContainer = IIDFromStringT!("{B196B284-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$ 
     81    //public static const GUID IIDICreateErrorInfo = IIDFromStringT!("{22F03340-547D-101B-8E65-08002B2BD119}"); //$NON-NLS-1$ 
     82    //public static const GUID IIDICreateTypeInfo = IIDFromStringT!("{00020405-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     83    //public static const GUID IIDICreateTypeLib = IIDFromStringT!("{00020406-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     84    //public static const GUID IIDIDataAdviseHolder = IIDFromStringT!("{00000110-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     85    public static const GUID IIDIDataObject = IIDFromStringT!("{0000010E-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     86    public static const GUID IIDIDispatch = IIDFromStringT!("{00020400-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     87    public static const GUID IIDIDocHostUIHandler = IIDFromStringT!("{BD3F23C0-D43E-11CF-893B-00AA00BDCE1A}"); //$NON-NLS-1$ 
     88    public static const GUID IIDIDocHostShowUI = IIDFromStringT!("{C4D244B0-D43E-11CF-893B-00AA00BDCE1A}"); //$NON-NLS-1$ 
     89    public static const GUID IIDIDropSource = IIDFromStringT!("{00000121-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     90    public static const GUID IIDIDropTarget = IIDFromStringT!("{00000122-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     91    //public static const GUID IIDIEnumConnectionPoints = IIDFromStringT!("{B196B285-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$ 
     92    //public static const GUID IIDIEnumConnections = IIDFromStringT!("{B196B287-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$ 
     93    public static const GUID IIDIEnumFORMATETC = IIDFromStringT!("{00000103-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     94    //public static const GUID IIDIEnumMoniker = IIDFromStringT!("{00000102-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     95    //public static const GUID IIDIEnumOLEVERB = IIDFromStringT!("{00000104-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     96    //public static const GUID IIDIEnumSTATDATA = IIDFromStringT!("{00000105-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     97    //public static const GUID IIDIEnumSTATSTG = IIDFromStringT!("{0000000D-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     98    //public static const GUID IIDIEnumString = IIDFromStringT!("{00000101-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     99    //public static const GUID IIDIEnumUnknown = IIDFromStringT!("{00000100-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     100    public static const GUID IIDIEnumVARIANT = IIDFromStringT!("{00020404-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     101    //public static const GUID IIDIErrorInfo = IIDFromStringT!("{1CF2B120-547D-101B-8E65-08002B2BD119}"); //$NON-NLS-1$ 
     102    //public static const GUID IIDIErrorLog = IIDFromStringT!("{3127CA40-446E-11CE-8135-00AA004BB851}"); //$NON-NLS-1$ 
     103    //public static const GUID IIDIExternalConnection = IIDFromStringT!("{00000019-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     104    public static const GUID IIDIFont = IIDFromStringT!("{BEF6E002-A874-101A-8BBA-00AA00300CAB}"); //$NON-NLS-1$ 
     105    //public static const GUID IIDIFontDisp = IIDFromStringT!("{BEF6E003-A874-101A-8BBA-00AA00300CAB}"); //$NON-NLS-1$ 
     106    public static const /*GUID*/ char[] IIDIHTMLDocumentEvents2 = /*IIDFromStringT!(*/"{3050F613-98B5-11CF-BB82-00AA00BDCE0B}"/*)*/; 
     107    public static const GUID IIDIInternetSecurityManager = IIDFromStringT!("{79eac9ee-baf9-11ce-8c82-00aa004ba90b}"); //$NON-NLS-1$ 
     108    //public static const GUID IIDILockBytes = IIDFromStringT!("{0000000A-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     109    //public static const GUID IIDIMalloc = IIDFromStringT!("{00000002-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     110    //public static const GUID IIDIMallocSpy = IIDFromStringT!("{0000001D-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     111    //public static const GUID IIDIMarshal = IIDFromStringT!("{00000003-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     112    //public static const GUID IIDIMessageFilter = IIDFromStringT!("{00000016-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     113    //public static const GUID IIDIMoniker = IIDFromStringT!("{0000000F-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     114    //public static const GUID IIDIOleAdviseHolder = IIDFromStringT!("{00000111-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     115    //public static const GUID IIDIOleCache = IIDFromStringT!("{0000011E-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     116    //public static const GUID IIDIOleCache2 = IIDFromStringT!("{00000128-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     117    //public static const GUID IIDIOleCacheControl = IIDFromStringT!("{00000129-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     118    public static const GUID IIDIOleClientSite = IIDFromStringT!("{00000118-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     119    public static const GUID IIDIOleCommandTarget = IIDFromStringT!("{B722BCCB-4E68-101B-A2BC-00AA00404770}"); //$NON-NLS-1$ 
     120    public static const GUID IIDIOleContainer = IIDFromStringT!("{0000011B-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     121    public static const GUID IIDIOleControl = IIDFromStringT!("{B196B288-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$ 
     122    public static const GUID IIDIOleControlSite = IIDFromStringT!("{B196B289-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$ 
     123    public static const GUID IIDIOleDocument = IIDFromStringT!("{B722BCC5-4E68-101B-A2BC-00AA00404770}"); //$NON-NLS-1$ 
     124    public static const GUID IIDIOleDocumentSite = IIDFromStringT!("{B722BCC7-4E68-101B-A2BC-00AA00404770}"); //$NON-NLS-1$ 
     125    public static const GUID IIDIOleInPlaceActiveObject = IIDFromStringT!("{00000117-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     126    public static const GUID IIDIOleInPlaceFrame = IIDFromStringT!("{00000116-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     127    public static const GUID IIDIOleInPlaceObject = IIDFromStringT!("{00000113-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     128    public static const GUID IIDIOleInPlaceSite = IIDFromStringT!("{00000119-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     129    public static const GUID IIDIOleInPlaceUIWindow = IIDFromStringT!("{00000115-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     130    //public static const GUID IIDIOleItemContainer = IIDFromStringT!("{0000011C-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     131    public static const GUID IIDIOleLink = IIDFromStringT!("{0000011D-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     132    public static const GUID IIDIOleObject = IIDFromStringT!("{00000112-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     133    public static const GUID IIDIOleWindow = IIDFromStringT!("{00000114-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     134    //public static const GUID IIDIParseDisplayName = IIDFromStringT!("{0000011A-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     135    //public static const GUID IIDIPerPropertyBrowsing = IIDFromStringT!("{376BD3AA-3845-101B-84ED-08002B2EC713}"); //$NON-NLS-1$ 
     136    public static const GUID IIDIPersist = IIDFromStringT!("{0000010C-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     137    public static const GUID IIDIPersistFile = IIDFromStringT!("{0000010B-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     138    //public static const GUID IIDIPersistMemory = IIDFromStringT!("{BD1AE5E0-A6AE-11CE-BD37-504200C10000}"); //$NON-NLS-1$ 
     139    //public static const GUID IIDIPersistPropertyBag = IIDFromStringT!("{37D84F60-42CB-11CE-8135-00AA004BB851}"); //$NON-NLS-1$ 
     140    public static const GUID IIDIPersistStorage = IIDFromStringT!("{0000010A-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     141    public static const GUID IIDIPersistStream = IIDFromStringT!("{00000109-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     142    public static const GUID IIDIPersistStreamInit = IIDFromStringT!("{7FD52380-4E07-101B-AE2D-08002B2EC713}"); //$NON-NLS-1$ 
     143    //public static const GUID IIDIPicture = IIDFromStringT!("{7BF80980-BF32-101A-8BBB-00AA00300CAB}"); //$NON-NLS-1$ 
     144    //public static const GUID IIDIPictureDisp = IIDFromStringT!("{7BF80981-BF32-101A-8BBB-00AA00300CAB}"); //$NON-NLS-1$ 
     145    //public static const GUID IIDIPropertyBag = IIDFromStringT!("{55272A00-42CB-11CE-8135-00AA004BB851}"); //$NON-NLS-1$ 
     146    public static const GUID IIDIPropertyNotifySink = IIDFromStringT!("{9BFBBC02-EFF1-101A-84ED-00AA00341D07}"); //$NON-NLS-1$ 
     147    //public static const GUID IIDIPropertyPage = IIDFromStringT!("{B196B28D-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$ 
     148    //public static const GUID IIDIPropertyPage2 = IIDFromStringT!("{01E44665-24AC-101B-84ED-08002B2EC713}"); //$NON-NLS-1$ 
     149    //public static const GUID IIDIPropertyPageSite = IIDFromStringT!("{B196B28C-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$ 
     150    public static const GUID IIDIProvideClassInfo = IIDFromStringT!("{B196B283-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$ 
     151    public static const GUID IIDIProvideClassInfo2 = IIDFromStringT!("{A6BC3AC0-DBAA-11CE-9DE3-00AA004BB851}"); //$NON-NLS-1$ 
     152    //public static const GUID IIDIPSFactoryBuffer = IIDFromStringT!("{D5F569D0-593B-101A-B569-08002B2DBF7A}"); //$NON-NLS-1$ 
     153    //public static const GUID IIDIRootStorage = IIDFromStringT!("{00000012-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     154    //public static const GUID IIDIROTData = IIDFromStringT!("{F29F6BC0-5021-11CE-AA15-00006901293F}"); //$NON-NLS-1$ 
     155    //public static const GUID IIDIRpcChannelBuffer = IIDFromStringT!("{D5F56B60-593B-101A-B569-08002B2DBF7A}"); //$NON-NLS-1$ 
     156    //public static const GUID IIDIRpcProxyBuffer = IIDFromStringT!("{D5F56A34-593B-101A-B569-08002B2DBF7A}"); //$NON-NLS-1$ 
     157    //public static const GUID IIDIRpcStubBuffer = IIDFromStringT!("{D5F56AFC-593B-101A-B569-08002B2DBF7A}"); //$NON-NLS-1$ 
     158    //public static const GUID IIDIRunnableObject = IIDFromStringT!("{00000126-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     159    //public static const GUID IIDIRunningObjectTable = IIDFromStringT!("{00000010-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     160    //public static const GUID IIDISimpleFrameSite = IIDFromStringT!("{742B0E01-14E6-101B-914E-00AA00300CAB}"); //$NON-NLS-1$ 
     161    public static const GUID IIDIServiceProvider = IIDFromStringT!("{6d5140c1-7436-11ce-8034-00aa006009fa}"); //$NON-NLS-1$ 
     162    public static const GUID IIDISpecifyPropertyPages = IIDFromStringT!("{B196B28B-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$ 
     163    //public static const GUID IIDIStdMarshalInfo = IIDFromStringT!("{00000018-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     164    public static const GUID IIDIStorage = IIDFromStringT!("{0000000B-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     165    public static const GUID IIDIStream = IIDFromStringT!("{0000000C-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     166    //public static const GUID IIDISupportErrorInfo = IIDFromStringT!("{DF0B3D60-548F-101B-8E65-08002B2BD119}"); //$NON-NLS-1$ 
     167    //public static const GUID IIDITypeComp = IIDFromStringT!("{00020403-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     168    //public static const GUID IIDITypeLib = IIDFromStringT!("{00020402-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     169    public static const GUID IIDIUnknown = IIDFromStringT!("{00000000-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     170    //public static const GUID IIDIViewObject = IIDFromStringT!("{0000010D-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     171    public static const GUID IIDIViewObject2 = IIDFromStringT!("{00000127-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     172    public static const GUID CGID_DocHostCommandHandler = IIDFromStringT!("{f38bc242-b950-11d1-8918-00c04fc2c836}"); //$NON-NLS-1$ 
     173    public static const GUID CGID_Explorer = IIDFromStringT!("{000214D0-0000-0000-C000-000000000046}"); //$NON-NLS-1$ 
     174 
     175 
    148176 
    149177    /* Constants */ 
     
    714742*/ 
    715743 
     744 
     745public static const int CHILDID_SELF = 0; 
    716746public static const int CO_E_OBJNOTCONNECTED = 0x800401FD; 
    717  
    718 public static const int STATE_SYSTEM_NORMAL = 0; 
    719 //public static const int STATE_SYSTEM_UNAVAILABLE = 0x1; 
    720 public static const int STATE_SYSTEM_SELECTED = 0x2; 
    721 public static const int STATE_SYSTEM_FOCUSED = 0x4; 
    722 public static const int STATE_SYSTEM_PRESSED = 0x8; 
    723 public static const int STATE_SYSTEM_CHECKED = 0x10; 
    724 //public static const int STATE_SYSTEM_MIXED = 0x20; 
    725 //public static const int STATE_SYSTEM_INDETERMINATE = STATE_SYSTEM_MIXED; 
    726 public static const int STATE_SYSTEM_READONLY = 0x40; 
    727 public static const int STATE_SYSTEM_HOTTRACKED = 0x80; 
    728 //public static const int STATE_SYSTEM_DEFAULT = 0x100; 
    729 public static const int STATE_SYSTEM_EXPANDED = 0x200; 
    730 public static const int STATE_SYSTEM_COLLAPSED = 0x400; 
    731 public static const int STATE_SYSTEM_BUSY = 0x800; 
    732 //public static const int STATE_SYSTEM_FLOATING = 0x1000; 
    733 //public static const int STATE_SYSTEM_MARQUEED = 0x2000; 
    734 //public static const int STATE_SYSTEM_ANIMATED = 0x4000; 
    735 public static const int STATE_SYSTEM_INVISIBLE = 0x8000; 
    736 public static const int STATE_SYSTEM_OFFSCREEN = 0x10000; 
    737 public static const int STATE_SYSTEM_SIZEABLE = 0x20000; 
    738 //public static const int STATE_SYSTEM_MOVEABLE = 0x40000; 
    739 //public static const int STATE_SYSTEM_SELFVOICING = 0x80000; 
    740 public static const int STATE_SYSTEM_FOCUSABLE = 0x100000; 
    741 public static const int STATE_SYSTEM_SELECTABLE = 0x200000; 
    742 public static const int STATE_SYSTEM_LINKED = 0x400000; 
    743 //public static const int STATE_SYSTEM_TRAVERSED = 0x800000; 
    744 public static const int STATE_SYSTEM_MULTISELECTABLE = 0x1000000; 
    745 //public static const int STATE_SYSTEM_EXTSELECTABLE = 0x2000000; 
    746 //public static const int STATE_SYSTEM_ALERT_LOW = 0x4000000; 
    747 //public static const int STATE_SYSTEM_ALERT_MEDIUM = 0x8000000; 
    748 //public static const int STATE_SYSTEM_ALERT_HIGH = 0x10000000; 
    749 //public static const int STATE_SYSTEM_PROTECTED = 0x20000000; 
    750 //public static const int STATE_SYSTEM_VALID = 0x3fffffff; 
    751747 
    752748//public static const int ROLE_SYSTEM_TITLEBAR = 0x1; 
     
    812808//public static const int ROLE_SYSTEM_CLOCK = 0x3d; 
    813809 
    814 public static const int CHILDID_SELF = 0; 
     810public static const int STATE_SYSTEM_NORMAL = 0; 
     811//public static const int STATE_SYSTEM_UNAVAILABLE = 0x1; 
     812public static const int STATE_SYSTEM_SELECTED = 0x2; 
     813public static const int STATE_SYSTEM_FOCUSED = 0x4; 
     814public static const int STATE_SYSTEM_PRESSED = 0x8; 
     815public static const int STATE_SYSTEM_CHECKED = 0x10; 
     816//public static const int STATE_SYSTEM_MIXED = 0x20; 
     817//public static const int STATE_SYSTEM_INDETERMINATE = STATE_SYSTEM_MIXED; 
     818public static const int STATE_SYSTEM_READONLY = 0x40; 
     819public static const int STATE_SYSTEM_HOTTRACKED = 0x80; 
     820//public static const int STATE_SYSTEM_DEFAULT = 0x100; 
     821public static const int STATE_SYSTEM_EXPANDED = 0x200; 
     822public static const int STATE_SYSTEM_COLLAPSED = 0x400; 
     823public static const int STATE_SYSTEM_BUSY = 0x800; 
     824//public static const int STATE_SYSTEM_FLOATING = 0x1000; 
     825//public static const int STATE_SYSTEM_MARQUEED = 0x2000; 
     826//public static const int STATE_SYSTEM_ANIMATED = 0x4000; 
     827public static const int STATE_SYSTEM_INVISIBLE = 0x8000; 
     828public static const int STATE_SYSTEM_OFFSCREEN = 0x10000; 
     829public static const int STATE_SYSTEM_SIZEABLE = 0x20000; 
     830//public static const int STATE_SYSTEM_MOVEABLE = 0x40000; 
     831//public static const int STATE_SYSTEM_SELFVOICING = 0x80000; 
     832public static const int STATE_SYSTEM_FOCUSABLE = 0x100000; 
     833public static const int STATE_SYSTEM_SELECTABLE = 0x200000; 
     834public static const int STATE_SYSTEM_LINKED = 0x400000; 
     835//public static const int STATE_SYSTEM_TRAVERSED = 0x800000; 
     836public static const int STATE_SYSTEM_MULTISELECTABLE = 0x1000000; 
     837//public static const int STATE_SYSTEM_EXTSELECTABLE = 0x2000000; 
     838//public static const int STATE_SYSTEM_ALERT_LOW = 0x4000000; 
     839//public static const int STATE_SYSTEM_ALERT_MEDIUM = 0x8000000; 
     840//public static const int STATE_SYSTEM_ALERT_HIGH = 0x10000000; 
     841//public static const int STATE_SYSTEM_PROTECTED = 0x20000000; 
     842//public static const int STATE_SYSTEM_VALID = 0x3fffffff; 
    815843 
    816844/* End ACCESSIBILITY */ 
  • dwt/ole/win32/OLE.d

    r97 r98  
    88 * Contributors: 
    99 *     IBM Corporation - initial API and implementation 
     10 * Port to the D programming language: 
     11 *     Frank Benoit <benoit@tionex.de> 
    1012 *******************************************************************************/ 
    1113module dwt.ole.win32.OLE; 
     
    283285 
    284286 
     287public static void error (char[] file, long line, int code) { 
     288    error (code, 0); 
     289} 
    285290public static void error (int code) { 
    286291    error (code, 0); 
     292} 
     293public static void error (char[] file, long line, int code, int hresult) { 
     294    error (code, hresult); 
    287295} 
    288296public static void error (int code, int hresult) { 
  • dwt/ole/win32/OleAutomation.d

    r97 r98  
    88 * Contributors: 
    99 *     IBM Corporation - initial API and implementation 
     10 * Port to the D programming language: 
     11 *     Frank Benoit <benoit@tionex.de> 
    1012 *******************************************************************************/ 
    1113module dwt.ole.win32.OleAutomation; 
     
    2628 
    2729import dwt.ole.win32.OleClientSite; 
    28  
    29  
    30 //PORTING_TYPE 
    31 public final class OleAutomation { 
    32     this(IDispatch idispatch); 
    33     public this(OleClientSite clientSite) ; 
    34     IDispatch getAddress() ; 
    35 
    36  
    37 /++ 
     30import dwt.ole.win32.OlePropertyDescription; 
     31import dwt.ole.win32.OleFunctionDescription; 
     32import dwt.ole.win32.OleParameterDescription; 
     33import dwt.ole.win32.Variant; 
     34import dwt.ole.win32.OLE; 
     35 
     36import dwt.dwthelper.utils; 
    3837 
    3938/** 
     
    104103public final class OleAutomation { 
    105104    private IDispatch objIDispatch; 
    106     private String exceptionDescription; 
     105    private char[] exceptionDescription; 
    107106    private ITypeInfo objITypeInfo; 
    108107 
     
    112111    objIDispatch.AddRef(); 
    113112 
    114     int[] ppv = new int[1]; 
    115     int result = objIDispatch.GetTypeInfo(0, COM.LOCALE_USER_DEFAULT, ppv); 
     113    int result = objIDispatch.GetTypeInfo(0, COM.LOCALE_USER_DEFAULT, &objITypeInfo); 
    116114    if (result is OLE.S_OK) { 
    117         objITypeInfo = new ITypeInfo(ppv[0]); 
    118115        objITypeInfo.AddRef(); 
    119116    } 
     
    133130    objIDispatch = clientSite.getAutomationObject(); 
    134131 
    135     int[] ppv = new int[1]; 
    136     int result = objIDispatch.GetTypeInfo(0, COM.LOCALE_USER_DEFAULT, ppv); 
     132    auto result = objIDispatch.GetTypeInfo(0, COM.LOCALE_USER_DEFAULT, &objITypeInfo); 
    137133    if (result is OLE.S_OK) { 
    138         objITypeInfo = new ITypeInfo(ppv[0]); 
    139134        objITypeInfo.AddRef(); 
    140135    } 
     
    159154 
    160155} 
    161 int getAddress() { 
    162     return objIDispatch.getAddress()
    163 } 
    164 public String getHelpFile(int dispId) { 
     156IDispatch getAddress() { 
     157    return objIDispatch
     158} 
     159public char[] getHelpFile(int dispId) { 
    165160    if (objITypeInfo is null) return null; 
    166     String[] file = new String[1]; 
    167     int rc = objITypeInfo.GetDocumentation(dispId, null, null, null, file ); 
    168     if (rc is OLE.S_OK) return file[0]; 
     161    BSTR file; 
     162    HRESULT rc = objITypeInfo.GetDocumentation(dispId, null, null, null, &file ); 
     163    if (rc is OLE.S_OK) { 
     164        char[] str = WCHARzToStr( file, -1 ); 
     165        COM.SysFreeString(file); 
     166        return str; 
     167    } 
    169168    return null; 
    170169} 
    171 public String getDocumentation(int dispId) { 
     170public char[] getDocumentation(int dispId) { 
    172171    if (objITypeInfo is null) return null; 
    173     String[] doc = new String[1]; 
    174     int rc = objITypeInfo.GetDocumentation(dispId, null, doc, null, null ); 
    175     if (rc is OLE.S_OK) return doc[0]; 
     172    BSTR doc; 
     173    HRESULT rc = objITypeInfo.GetDocumentation(dispId, null, &doc, null, null ); 
     174    if (rc == OLE.S_OK) { 
     175        char[] s = WCHARzToStr(doc, -1); 
     176        COM.SysFreeString(doc); 
     177        return s; 
     178    } 
    176179    return null; 
    177180} 
    178181public OlePropertyDescription getPropertyDescription(int index) { 
    179182    if (objITypeInfo is null) return null; 
    180     int[] ppVarDesc = new int[1]
    181     int rc = objITypeInfo.GetVarDesc(index, ppVarDesc); 
    182     if (rc !is OLE.S_OK) return null; 
    183     VARDESC vardesc = new VARDESC(); 
    184     COM.MoveMemory(vardesc, ppVarDesc[0], VARDESC.sizeof); 
     183    VARDESC* vardesc
     184    HRESULT rc = objITypeInfo.GetVarDesc(index, &vardesc); 
     185    if (rc != OLE.S_OK) return null; 
     186//  VARDESC* vardesc = new VARDESC(); 
     187//  COM.MoveMemory(vardesc, ppVarDesc[0], VARDESC.sizeof); 
    185188 
    186189    OlePropertyDescription data = new OlePropertyDescription(); 
    187190    data.id = vardesc.memid; 
    188191    data.name = getName(vardesc.memid); 
    189     data.type = vardesc.elemdescVar_tdesc_vt; 
    190     if (data.type is OLE.VT_PTR) { 
    191         short[] vt = new short[1]; 
    192         COM.MoveMemory(vt, vardesc.elemdescVar_tdesc_union + 4, 2); 
    193         data.type = vt[0]; 
     192    data.type = vardesc.elemdescVar.tdesc.vt; 
     193    if (data.type == OLE.VT_PTR) { 
     194//      short[] vt = new short[1]; 
     195//      COM.MoveMemory(vt, vardesc.elemdescVar.tdesc_union + 4, 2); 
     196        // TODO: 
     197        data.type = vardesc.elemdescVar.tdesc.vt; 
    194198    } 
    195199    data.flags = vardesc.wVarFlags; 
     
    198202    data.helpFile = getHelpFile(vardesc.memid); 
    199203 
    200     objITypeInfo.ReleaseVarDesc(ppVarDesc[0]); 
     204    objITypeInfo.ReleaseVarDesc(vardesc); 
    201205    return data; 
    202206} 
    203207public OleFunctionDescription getFunctionDescription(int index) { 
    204208    if (objITypeInfo is null) return null; 
    205     int[] ppFuncDesc = new int[1]; 
    206     int rc = objITypeInfo.GetFuncDesc(index, ppFuncDesc); 
    207     if (rc !is OLE.S_OK) return null; 
    208     FUNCDESC funcdesc = new FUNCDESC(); 
    209     COM.MoveMemory(funcdesc, ppFuncDesc[0], FUNCDESC.sizeof); 
     209    FUNCDESC* funcdesc; 
     210    HRESULT rc = objITypeInfo.GetFuncDesc(index, &funcdesc); 
     211    if (rc != OLE.S_OK) return null; 
    210212 
    211213    OleFunctionDescription data = new OleFunctionDescription(); 
     
    220222    data.helpFile = getHelpFile(funcdesc.memid); 
    221223 
    222     String[] names = getNames(funcdesc.memid, funcdesc.cParams + 1); 
     224    char[][] names = getNames(funcdesc.memid, funcdesc.cParams + 1); 
    223225    if (names.length > 0) { 
    224226        data.name = names[0]; 
     
    230232            data.args[i].name = names[i + 1]; 
    231233        } 
    232         short[] vt = new short[1]
    233         COM.MoveMemory(vt, funcdesc.lprgelemdescParam + i * 16 + 4, 2); 
     234        short[1] vt
     235        COM.MoveMemory(vt.ptr, funcdesc.lprgelemdescParam + i * 16 + 4, 2); 
    234236        if (vt[0] is OLE.VT_PTR) { 
    235             int[] pTypedesc = new int[1]
    236             COM.MoveMemory(pTypedesc, funcdesc.lprgelemdescParam + i * 16, 4); 
    237             short[] vt2 = new short[1]
    238             COM.MoveMemory(vt2, pTypedesc[0] + 4, 2); 
    239             vt[0] = (short)(vt2[0] | COM.VT_BYREF); 
     237            int[1] pTypedesc
     238            COM.MoveMemory(pTypedesc.ptr, funcdesc.lprgelemdescParam + i * 16, 4); 
     239            short[1] vt2
     240            COM.MoveMemory(vt2.ptr, pTypedesc[0] + 4, 2); 
     241            vt[0] = cast(short)(vt2[0] | COM.VT_BYREF); 
    240242        } 
    241243        data.args[i].type = vt[0]; 
    242         short[] wParamFlags = new short[1]
    243         COM.MoveMemory(wParamFlags, funcdesc.lprgelemdescParam + i * 16 + 12, 2); 
     244        short[1] wParamFlags
     245        COM.MoveMemory(wParamFlags.ptr, funcdesc.lprgelemdescParam + i * 16 + 12, 2); 
    244246        data.args[i].flags = wParamFlags[0]; 
    245247    } 
    246248 
    247     data.returnType = funcdesc.elemdescFunc_tdesc_vt; 
     249    data.returnType = funcdesc.elemdescFunc.tdesc.vt; 
    248250    if (data.returnType is OLE.VT_PTR) { 
    249         short[] vt = new short[1]
    250         COM.MoveMemory(vt, funcdesc.elemdescFunc_tdesc_union + 4, 2); 
     251        ushort[1] vt
     252        COM.MoveMemory(vt.ptr, funcdesc.elemdescFunc.tdesc.u.lpadesc, 2); 
    251253        data.returnType = vt[0]; 
    252254    } 
    253255 
    254     objITypeInfo.ReleaseFuncDesc(ppFuncDesc[0]); 
     256    objITypeInfo.ReleaseFuncDesc(funcdesc); 
    255257    return data; 
    256258} 
    257 public TYPEATTR getTypeInfoAttributes() { 
     259public TYPEATTR* getTypeInfoAttributes() { 
    258260    if (objITypeInfo is null) return null; 
    259     int[] ppTypeAttr = new int[1]
    260     int rc = objITypeInfo.GetTypeAttr(ppTypeAttr); 
     261    TYPEATTR* ppTypeAttr
     262    HRESULT rc = objITypeInfo.GetTypeAttr(&ppTypeAttr); 
    261263    if (rc !is OLE.S_OK) return null; 
    262     TYPEATTR typeattr = new TYPEATTR(); 
    263     COM.MoveMemory(typeattr, ppTypeAttr[0], TYPEATTR.sizeof); 
    264     objITypeInfo.ReleaseTypeAttr(ppTypeAttr[0]); 
     264    TYPEATTR* typeattr = new TYPEATTR(); 
     265    COM.MoveMemory(typeattr, ppTypeAttr, TYPEATTR.sizeof); 
     266    objITypeInfo.ReleaseTypeAttr(ppTypeAttr); 
    265267    return typeattr; 
    266268} 
    267 public String getName(int dispId) { 
     269 
     270public char[] getName(int dispId) { 
    268271    if (objITypeInfo is null) return null; 
    269     String[] name = new String[1]; 
    270     int rc = objITypeInfo.GetDocumentation(dispId, name, null, null, null ); 
    271     if (rc is OLE.S_OK) return name[0]; 
     272    BSTR name; 
     273    HRESULT rc = objITypeInfo.GetDocumentation(dispId, &name, null, null, null ); 
     274    if (rc == OLE.S_OK) { 
     275        char[] s = WCHARzToStr(name, -1); 
     276        COM.SysFreeString(name); 
     277        return s; 
     278    } 
    272279    return null; 
    273280} 
    274 public String[] getNames(int dispId, int maxSize) { 
    275     if (objITypeInfo is null) return new String[0]; 
    276     String[] names = new String[maxSize]; 
    277     int[] count = new int[1]; 
    278     int rc = objITypeInfo.GetNames(dispId, names, maxSize, count); 
    279     if (rc is OLE.S_OK) { 
    280         String[] newNames = new String[count[0]]; 
    281         System.arraycopy(names, 0, newNames, 0, count[0]); 
     281 
     282public char[][] getNames(int dispId, int maxSize) { 
     283    if (objITypeInfo is null) return new char[][0]; 
     284    BSTR[] names = new BSTR[maxSize]; 
     285    uint count; 
     286    HRESULT rc = objITypeInfo.GetNames(dispId, names.ptr, maxSize, &count); 
     287    if (rc == OLE.S_OK) { 
     288        char[][] newNames = new char[][count]; 
     289        for(int i=0; i<count; ++i){ 
     290            newNames[i] = WCHARzToStr(names[i], -1); 
     291            COM.SysFreeString(names[i]); 
     292        } 
    282293        return newNames; 
    283294    } 
    284     return new String[0]
     295    return null
    285296} 
    286297/** 
     
    294305 *         order as the names where provided; or null if the names are unknown 
    295306 */ 
    296 public int[] getIDsOfNames(String[] names) { 
    297  
    298     int[] rgdispid = new int[names.length]; 
    299     int result = objIDispatch.GetIDsOfNames(new GUID(), names, names.length, COM.LOCALE_USER_DEFAULT, rgdispid); 
    300     if (result !is COM.S_OK) return null; 
     307public int[] getIDsOfNames(char[][] names) { 
     308 
     309    int count = names.length; 
     310    wchar*[] wcNames = new wchar*[count]; 
     311    for(int i=0; i<count; ++i){ 
     312        wcNames[i] = StrToWCHARz(names[i]); 
     313    } 
     314    int[] rgdispid = new int[count]; 
     315    // TODO: NULL GUID ?? 
     316    GUID id; 
     317    HRESULT result = objIDispatch.GetIDsOfNames(&id, wcNames.ptr, count, COM.LOCALE_USER_DEFAULT, rgdispid.ptr); 
     318    if (result != COM.S_OK) return null; 
    301319 
    302320    return rgdispid; 
     
    307325 * @return a description of the last error encountered 
    308326 */ 
    309 public String getLastError() { 
     327public char[] getLastError() { 
    310328 
    311329    return exceptionDescription; 
     
    322340public Variant getProperty(int dispIdMember) { 
    323341    Variant pVarResult = new Variant(); 
    324     int result = invoke(dispIdMember, COM.DISPATCH_PROPERTYGET, null, null, pVarResult); 
     342    HRESULT result = invoke(dispIdMember, COM.DISPATCH_PROPERTYGET, null, null, pVarResult); 
    325343    return (result is OLE.S_OK) ? pVarResult : null; 
    326344} 
     
    340358public Variant getProperty(int dispIdMember, Variant[] rgvarg) { 
    341359    Variant pVarResult = new Variant(); 
    342     int result = invoke(dispIdMember, COM.DISPATCH_PROPERTYGET, rgvarg, null, pVarResult); 
     360    HRESULT result = invoke(dispIdMember, COM.DISPATCH_PROPERTYGET, rgvarg, null, pVarResult); 
    343361    return (result is OLE.S_OK) ? pVarResult : null; 
    344362 
     
    364382public Variant getProperty(int dispIdMember, Variant[] rgvarg, int[] rgdispidNamedArgs) { 
    365383    Variant pVarResult = new Variant(); 
    366     int result = invoke(dispIdMember, COM.DISPATCH_PROPERTYGET, rgvarg, rgdispidNamedArgs, pVarResult); 
     384    HRESULT result = invoke(dispIdMember, COM.DISPATCH_PROPERTYGET, rgvarg, rgdispidNamedArgs, pVarResult); 
    367385    return (result is OLE.S_OK) ? pVarResult : null; 
    368386} 
     
    378396public Variant invoke(int dispIdMember) { 
    379397    Variant pVarResult = new Variant(); 
    380     int result = invoke(dispIdMember, COM.DISPATCH_METHOD, null, null, pVarResult); 
     398    HRESULT result = invoke(dispIdMember, COM.DISPATCH_METHOD, null, null, pVarResult); 
    381399    return (result is COM.S_OK) ? pVarResult : null; 
    382400} 
     
    394412public Variant invoke(int dispIdMember, Variant[] rgvarg) { 
    395413    Variant pVarResult = new Variant(); 
    396     int result = invoke(dispIdMember, COM.DISPATCH_METHOD, rgvarg, null, pVarResult); 
     414    HRESULT result = invoke(dispIdMember, COM.DISPATCH_METHOD, rgvarg, null, pVarResult); 
    397415    return (result is COM.S_OK) ? pVarResult : null; 
    398416} 
     
    417435public Variant invoke(int dispIdMember, Variant[] rgvarg, int[] rgdispidNamedArgs) { 
    418436    Variant pVarResult = new Variant(); 
    419     int result = invoke(dispIdMember, COM.DISPATCH_METHOD, rgvarg, rgdispidNamedArgs, pVarResult); 
     437    HRESULT result = invoke(dispIdMember, COM.DISPATCH_METHOD, rgvarg, rgdispidNamedArgs, pVarResult); 
    420438    return (result is COM.S_OK) ? pVarResult : null; 
    421439} 
    422 private int invoke(int dispIdMember, int wFlags, Variant[] rgvarg, int[] rgdispidNamedArgs, Variant pVarResult) { 
     440private int invoke(int dispIdMember, ushort wFlags, Variant[] rgvarg, int[] rgdispidNamedArgs, Variant pVarResult) { 
     441    assert(objIDispatch); 
    423442 
    424443    // get the IDispatch interface for the control 
     
    426445 
    427446    // create a DISPPARAMS structure for the input parameters 
    428     DISPPARAMS pDispParams = new DISPPARAMS(); 
     447    DISPPARAMS pDispParams; 
     448 
    429449    // store arguments in rgvarg 
    430450    if (rgvarg !is null && rgvarg.length > 0) { 
    431         pDispParams.cArgs = rgvarg.length; 
    432         pDispParams.rgvarg = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, Variant.sizeof * rgvarg.length); 
    433         int offset = 0; 
    434         for (int i = rgvarg.length - 1; i >= 0 ; i--) { 
    435             rgvarg[i].getData(pDispParams.rgvarg + offset); 
    436             offset += Variant.sizeof; 
     451        VARIANT[] tempArgs = new VARIANT[rgvarg.length]; 
     452        for (int i = 0; i < rgvarg.length ; ++i) { 
     453            rgvarg[i].getData(&tempArgs[i]); 
    437454        } 
     455        // the reverse sequency 
     456        tempArgs.reverse; 
     457        pDispParams.cArgs = tempArgs.length; 
     458        pDispParams.rgvarg = tempArgs.ptr; 
    438459    } 
    439460 
    440461    // if arguments have ids, store the ids in rgdispidNamedArgs 
    441462    if (rgdispidNamedArgs !is null && rgdispidNamedArgs.length > 0) { 
    442         pDispParams.cNamedArgs = rgdispidNamedArgs.length; 
    443         pDispParams.rgdispidNamedArgs = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, 4 * rgdispidNamedArgs.length); 
    444         int offset = 0; 
    445         for (int i = rgdispidNamedArgs.length; i > 0; i--) { 
    446             COM.MoveMemory(pDispParams.rgdispidNamedArgs + offset, new int[] {rgdispidNamedArgs[i-1]}, 4); 
    447             offset += 4; 
    448         } 
     463        DISPID[] tempArgs = rgdispidNamedArgs.dup; 
     464        // the reverse sequency 
     465        tempArgs.reverse; 
     466        pDispParams.cNamedArgs = tempArgs.length; 
     467        pDispParams.rgdispidNamedArgs = tempArgs.ptr; 
    449468    } 
    450469 
    451470    // invoke the method 
    452     EXCEPINFO excepInfo = new EXCEPINFO(); 
    453     int[] pArgErr = new int[1]; 
    454     int pVarResultAddress = 0; 
    455     if (pVarResult !is null) pVarResultAddress = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, Variant.sizeof); 
    456     int result = objIDispatch.Invoke(dispIdMember, new GUID(), COM.LOCALE_USER_DEFAULT, wFlags, pDispParams, pVarResultAddress, excepInfo, pArgErr); 
    457  
    458     if (pVarResultAddress !is 0){ 
     471    EXCEPINFO excepInfo; 
     472    uint pArgErr; 
     473    VARIANT* pVarResultAddress = null; 
     474    if (pVarResult !is null) 
     475        pVarResultAddress = new VARIANT(); 
     476 
     477    GUID id;    // IID_NULL 
     478    /* 
     479         HRESULT Invoke( 
     480                [in] DISPID dispIdMember, 
     481                [in] REFIID riid, 
     482                [in] LCID lcid, 
     483                [in] WORD wFlags, 
     484                [in, out] DISPPARAMS * pDispParams, 
     485                [out] VARIANT * pVarResult, 
     486                [out] EXCEPINFO * pExcepInfo, 
     487                [out] UINT * puArgErr 
     488            ); 
     489     */ 
     490    HRESULT result = objIDispatch.Invoke(dispIdMember, &id, COM.LOCALE_USER_DEFAULT, wFlags, &pDispParams, pVarResultAddress, &excepInfo, &pArgErr); 
     491 
     492    if (pVarResultAddress !is null){ 
    459493        pVarResult.setData(pVarResultAddress); 
    460494        COM.VariantClear(pVarResultAddress); 
    461         OS.GlobalFree(pVarResultAddress);