Module SigCjC_DataObjectFiles.pkg

     1//==============================================================================
     2// Project      : SigCj - VDF Classes for Codejock
     3// File         : SigCjC_DataObjectFiles.pkg
     4// Description  : VDF Class for Codejock control
     5//
     6// Created by   : Ian Smith
     7// Revision     : $Rev: $
     8//                $Date: $
     9//                $Author: $
    10//
    11// Requirements : Visual DataFlex 14.1
    12//                Codejock SuitePro - Version 13.4.2
    13//
    14// Copyright    : (c) 2009 VDF SIG UK
    15//                Visual DataFlex Special Interest Group UK.
    16//                http://www.vdfsig.co.uk/
    17//                dev@vdfsig.co.uk
    18//
    19//                This file is part of SigCj.
    20//
    21//                SigCj is free software: you can redistribute it and/or modify
    22//                it under the terms of the GNU Lesser General Public License
    23//                as published by the Free Software Foundation, either version
    24//                2.1 of the License, or (at your option) any later version.
    25//
    26//                SigCj is distributed in the hope that it will be useful, but
    27//                WITHOUT ANY WARRANTY; without even the implied warranty of
    28//                MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    29//                GNU Lesser General Public License for more details.
    30//
    31//                If you have the complete SigCj workspace then a copy of the
    32//                GNU Lesser General Public License is in the Docs folder. If
    33//                not, see <http://www.gnu.org/licenses/>.
    34//
    35//==============================================================================
    36
    37Use FlexCOM20.pkg
    38
    39Class cSigCjComDataObjectFiles is a cComAutomationObject
    40
    41    { MethodType=Property DesignTime=False }
    42    Function ComItem Integer llIndex Returns String
    43        Handle hDispatchDriver
    44        String retVal
    45        Get phDispatchDriver to hDispatchDriver
    46        Send PrepareParams to hDispatchDriver 1
    47        Send DefineParam to hDispatchDriver OLE_VT_I4 llIndex
    48        Get InvokeComMethod of hDispatchDriver 0 OLE_VT_BSTR to retVal
    49        Function_Return retVal
    50    End_Function
    51
    52    { MethodType=Property DesignTime=False }
    53    Function ComCount Returns Integer
    54        Handle hDispatchDriver
    55        Integer retVal
    56        Get phDispatchDriver to hDispatchDriver
    57        Get InvokeComMethod of hDispatchDriver 1 OLE_VT_I4 to retVal
    58        Function_Return retVal
    59    End_Function
    60
    61    { MethodType=Property DesignTime=False }
    62    Function Com_NewEnum Returns Variant
    63        Handle hDispatchDriver
    64        Variant retVal
    65        Get phDispatchDriver to hDispatchDriver
    66        Get InvokeComMethod of hDispatchDriver -4 OLE_VT_UNKNOWN to retVal
    67        Function_Return retVal
    68    End_Function
    69End_Class
    70
    71Class cSigCjComDataObject is a cComAutomationObject
    72
    73    Function ComGetFormat Integer llFormat Returns Boolean
    74        Handle hDispatchDriver
    75        Boolean retVal
    76        Get phDispatchDriver to hDispatchDriver
    77        Send PrepareParams to hDispatchDriver 1
    78        Send DefineParam to hDispatchDriver OLE_VT_I4 llFormat
    79        Get InvokeComMethod of hDispatchDriver 2 OLE_VT_BOOL to retVal
    80        Function_Return retVal
    81    End_Function
    82
    83    { MethodType=Property DesignTime=False }
    84    Function ComFiles Returns Variant
    85        Handle hDispatchDriver
    86        Variant retVal
    87        Get phDispatchDriver to hDispatchDriver
    88        Get InvokeComMethod of hDispatchDriver 1 OLE_VT_DISPATCH to retVal
    89        Function_Return retVal
    90    End_Function
    91
    92    Function ComGetData Integer llFormat Returns Variant
    93        Handle hDispatchDriver
    94        Variant retVal
    95        Get phDispatchDriver to hDispatchDriver
    96        Send PrepareParams to hDispatchDriver 1
    97        Send DefineParam to hDispatchDriver OLE_VT_I4 llFormat
    98        Get InvokeComMethod of hDispatchDriver 3 OLE_VT_VARIANT to retVal
    99        Function_Return retVal
   100    End_Function
   101
   102    Procedure ComSetData Variant llvValue Variant llFormat
   103        Handle hDispatchDriver
   104        Get phDispatchDriver to hDispatchDriver
   105        Send PrepareParams to hDispatchDriver 2
   106        Send DefineParam to hDispatchDriver OLE_VT_VARIANT llvValue
   107        Send DefineParam to hDispatchDriver OLE_VT_VARIANT llFormat
   108        Send InvokeComMethod to hDispatchDriver 4 OLE_VT_VOID
   109    End_Procedure
   110
   111    Procedure ComClear
   112        Handle hDispatchDriver
   113        Get phDispatchDriver to hDispatchDriver
   114        Send InvokeComMethod to hDispatchDriver 5 OLE_VT_VOID
   115    End_Procedure
   116End_Class
   117
   118//==============================================================================
   119//End of package - SigCjC_DataObjectFiles.pkg
   120//==============================================================================
   121