Skip to content

Instantly share code, notes, and snippets.

@seanbamforth
Last active August 29, 2015 14:05
Show Gist options
  • Save seanbamforth/e3c09b61b42add1afb5c to your computer and use it in GitHub Desktop.
Save seanbamforth/e3c09b61b42add1afb5c to your computer and use it in GitHub Desktop.
cComDictionary - using ActiveX Object
// Visual DataFlex COM proxy classes generated from C:\Windows\SysWOW64\scrrun.dll
Use FlexCom20.pkg
Define OLECompareMethod for Integer
Define OLEBinaryCompare for 0
Define OLETextCompare for 1
Define OLEDatabaseCompare for 2
Define OLEIOMode for Integer
Define OLEForReading for 1
Define OLEForWriting for 2
Define OLEForAppending for 8
Define OLETristate for Integer
Define OLETristateTrue for -1
Define OLETristateFalse for 0
Define OLETristateUseDefault for -2
Define OLETristateMixed for -2
Define OLE__MIDL___MIDL_itf_scrrun_0000_0000_0001 for Integer
Define OLENormal for 0
Define OLEReadOnly for 1
Define OLEHidden for 2
Define OLESystem for 4
Define OLEVolume for 8
Define OLEDirectory for 16
Define OLEArchive for 32
Define OLEAlias for 1024
Define OLECompressed for 2048
Define OLE__MIDL___MIDL_itf_scrrun_0001_0001_0001 for Integer
Define OLEUnknownType for 0
Define OLERemovable for 1
Define OLEFixed for 2
Define OLERemote for 3
Define OLECDRom for 4
Define OLERamDisk for 5
Define OLE__MIDL___MIDL_itf_scrrun_0001_0001_0002 for Integer
Define OLEWindowsFolder for 0
Define OLESystemFolder for 1
Define OLETemporaryFolder for 2
Define OLE__MIDL___MIDL_itf_scrrun_0001_0001_0003 for Integer
Define OLEStdIn for 0
Define OLEStdOut for 1
Define OLEStdErr for 2
Define FileAttribute for OLE__MIDL___MIDL_itf_scrrun_0000_0000_0001
Define DriveTypeConst for OLE__MIDL___MIDL_itf_scrrun_0001_0001_0001
Define SpecialFolderConst for OLE__MIDL___MIDL_itf_scrrun_0001_0001_0002
Define StandardStreamTypes for OLE__MIDL___MIDL_itf_scrrun_0001_0001_0003
// CLSID: {42C642C1-97E1-11CF-978F-00A02463E06F}
// Scripting.Dictionary Interface
Class cComIDictionary is a Mixin
// Set or get the item for a given key
{ MethodType=Property DesignTime=False }
Procedure Set ComItemRef Variant llKey Variant value
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 2
Send DefineParam to hDispatchDriver (OLE_VT_BYREF ior OLE_VT_VARIANT) llKey
Set ComProperty of hDispatchDriver 0 (OLE_VT_BYREF ior OLE_VT_VARIANT) to value
End_Procedure
// Set or get the item for a given key
{ MethodType=Property DesignTime=False }
Procedure Set ComItem Variant llKey Variant value
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 2
Send DefineParam to hDispatchDriver (OLE_VT_BYREF ior OLE_VT_VARIANT) llKey
Set ComProperty of hDispatchDriver 0 (OLE_VT_BYREF ior OLE_VT_VARIANT) to value
End_Procedure
// Set or get the item for a given key
{ MethodType=Property DesignTime=False }
Function ComItem Variant llKey Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver (OLE_VT_BYREF ior OLE_VT_VARIANT) llKey
Get InvokeComMethod of hDispatchDriver 0 OLE_VT_VARIANT to retVal
Function_Return retVal
End_Function
// Add a new key and item to the dictionary.
Procedure ComAdd Variant llKey Variant llItem
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 2
Send DefineParam to hDispatchDriver (OLE_VT_BYREF ior OLE_VT_VARIANT) llKey
Send DefineParam to hDispatchDriver (OLE_VT_BYREF ior OLE_VT_VARIANT) llItem
Send InvokeComMethod to hDispatchDriver 1 OLE_VT_VOID
End_Procedure
// Get the number of items in the dictionary.
{ MethodType=Property DesignTime=False }
Function ComCount Returns Integer
Handle hDispatchDriver
Integer retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 2 OLE_VT_I4 to retVal
Function_Return retVal
End_Function
// Determine if a given key is in the dictionary.
Function ComExists Variant llKey Returns Boolean
Handle hDispatchDriver
Boolean retVal
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver (OLE_VT_BYREF ior OLE_VT_VARIANT) llKey
Get InvokeComMethod of hDispatchDriver 3 OLE_VT_BOOL to retVal
Function_Return retVal
End_Function
// Get an array containing all items in the dictionary.
Function ComItems Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 4 OLE_VT_VARIANT to retVal
Function_Return retVal
End_Function
// Change a key to a different key.
{ MethodType=Property DesignTime=False }
Procedure Set ComKey Variant llKey Variant value
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 2
Send DefineParam to hDispatchDriver (OLE_VT_BYREF ior OLE_VT_VARIANT) llKey
Set ComProperty of hDispatchDriver 5 (OLE_VT_BYREF ior OLE_VT_VARIANT) to value
End_Procedure
// Get an array containing all keys in the dictionary.
Function ComKeys Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 6 OLE_VT_VARIANT to retVal
Function_Return retVal
End_Function
// Remove a given key from the dictionary.
Procedure ComRemove Variant llKey
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver (OLE_VT_BYREF ior OLE_VT_VARIANT) llKey
Send InvokeComMethod to hDispatchDriver 7 OLE_VT_VOID
End_Procedure
// Remove all information from the dictionary.
Procedure ComRemoveAll
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send InvokeComMethod to hDispatchDriver 8 OLE_VT_VOID
End_Procedure
// Set or get the string comparison method.
{ MethodType=Property DesignTime=False }
Procedure Set ComCompareMode OLECompareMethod value
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Set ComProperty of hDispatchDriver 9 OLE_VT_I4 to value
End_Procedure
// Set or get the string comparison method.
{ MethodType=Property DesignTime=False }
Function ComCompareMode Returns OLECompareMethod
Handle hDispatchDriver
OLECompareMethod retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 9 OLE_VT_I4 to retVal
Function_Return retVal
End_Function
Function Com_NewEnum Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver -4 OLE_VT_UNKNOWN to retVal
Function_Return retVal
End_Function
End_Class
// CoClass
// ProgID: Scripting.Dictionary
// CLSID: {EE09B103-97E0-11CF-978F-00A02463E06F}
// Scripting.Dictionary
Class cComDictionary is a cComAutomationObject
Import_Class_Protocol cComIDictionary
Procedure Construct_Object
Forward Send Construct_Object
Set psProgID to "{EE09B103-97E0-11CF-978F-00A02463E06F}"
Set peAutoCreate to acNoAutoCreate
End_Procedure
End_Class
// CLSID: {2A0B9D10-4B87-11D3-A97A-00104B365C9F}
// FileSystemObject
Class cComIFileSystem3 is a Mixin
// Get drives collection
{ MethodType=Property DesignTime=False }
Function ComDrives Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 10010 OLE_VT_DISPATCH to retVal
Function_Return retVal
End_Function
// Generate a path from an existing path and a name
Function ComBuildPath String llPath String llName Returns String
Handle hDispatchDriver
String retVal
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 2
Send DefineParam to hDispatchDriver OLE_VT_BSTR llPath
Send DefineParam to hDispatchDriver OLE_VT_BSTR llName
Get InvokeComMethod of hDispatchDriver 10000 OLE_VT_BSTR to retVal
Function_Return retVal
End_Function
// Return drive from a path
Function ComGetDriveName String llPath Returns String
Handle hDispatchDriver
String retVal
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver OLE_VT_BSTR llPath
Get InvokeComMethod of hDispatchDriver 10004 OLE_VT_BSTR to retVal
Function_Return retVal
End_Function
// Return path to the parent folder
Function ComGetParentFolderName String llPath Returns String
Handle hDispatchDriver
String retVal
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver OLE_VT_BSTR llPath
Get InvokeComMethod of hDispatchDriver 10005 OLE_VT_BSTR to retVal
Function_Return retVal
End_Function
// Return the file name from a path
Function ComGetFileName String llPath Returns String
Handle hDispatchDriver
String retVal
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver OLE_VT_BSTR llPath
Get InvokeComMethod of hDispatchDriver 10006 OLE_VT_BSTR to retVal
Function_Return retVal
End_Function
// Return base name from a path
Function ComGetBaseName String llPath Returns String
Handle hDispatchDriver
String retVal
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver OLE_VT_BSTR llPath
Get InvokeComMethod of hDispatchDriver 10007 OLE_VT_BSTR to retVal
Function_Return retVal
End_Function
// Return extension from path
Function ComGetExtensionName String llPath Returns String
Handle hDispatchDriver
String retVal
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver OLE_VT_BSTR llPath
Get InvokeComMethod of hDispatchDriver 10008 OLE_VT_BSTR to retVal
Function_Return retVal
End_Function
// Return the canonical representation of the path
Function ComGetAbsolutePathName String llPath Returns String
Handle hDispatchDriver
String retVal
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver OLE_VT_BSTR llPath
Get InvokeComMethod of hDispatchDriver 10002 OLE_VT_BSTR to retVal
Function_Return retVal
End_Function
// Generate name that can be used to name a temporary file
Function ComGetTempName Returns String
Handle hDispatchDriver
String retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 10003 OLE_VT_BSTR to retVal
Function_Return retVal
End_Function
// Check if a drive or a share exists
Function ComDriveExists String llDriveSpec Returns Boolean
Handle hDispatchDriver
Boolean retVal
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver OLE_VT_BSTR llDriveSpec
Get InvokeComMethod of hDispatchDriver 10015 OLE_VT_BOOL to retVal
Function_Return retVal
End_Function
// Check if a file exists
Function ComFileExists String llFileSpec Returns Boolean
Handle hDispatchDriver
Boolean retVal
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver OLE_VT_BSTR llFileSpec
Get InvokeComMethod of hDispatchDriver 10016 OLE_VT_BOOL to retVal
Function_Return retVal
End_Function
// Check if a path exists
Function ComFolderExists String llFolderSpec Returns Boolean
Handle hDispatchDriver
Boolean retVal
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver OLE_VT_BSTR llFolderSpec
Get InvokeComMethod of hDispatchDriver 10017 OLE_VT_BOOL to retVal
Function_Return retVal
End_Function
// Get drive or UNC share
Function ComGetDrive String llDriveSpec Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver OLE_VT_BSTR llDriveSpec
Get InvokeComMethod of hDispatchDriver 10011 OLE_VT_DISPATCH to retVal
Function_Return retVal
End_Function
// Get file
Function ComGetFile String llFilePath Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver OLE_VT_BSTR llFilePath
Get InvokeComMethod of hDispatchDriver 10012 OLE_VT_DISPATCH to retVal
Function_Return retVal
End_Function
// Get folder
Function ComGetFolder String llFolderPath Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver OLE_VT_BSTR llFolderPath
Get InvokeComMethod of hDispatchDriver 10013 OLE_VT_DISPATCH to retVal
Function_Return retVal
End_Function
// Get location of various system folders
Function ComGetSpecialFolder SpecialFolderConst llSpecialFolder Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver OLE_VT_I4 llSpecialFolder
Get InvokeComMethod of hDispatchDriver 10014 OLE_VT_DISPATCH to retVal
Function_Return retVal
End_Function
// Delete a file
Procedure ComDeleteFile String llFileSpec Boolean llForce
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 2
Send DefineParam to hDispatchDriver OLE_VT_BSTR llFileSpec
Send DefineParam to hDispatchDriver OLE_VT_BOOL llForce
Send InvokeComMethod to hDispatchDriver 1200 OLE_VT_VOID
End_Procedure
// Delete a folder
Procedure ComDeleteFolder String llFolderSpec Boolean llForce
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 2
Send DefineParam to hDispatchDriver OLE_VT_BSTR llFolderSpec
Send DefineParam to hDispatchDriver OLE_VT_BOOL llForce
Send InvokeComMethod to hDispatchDriver 1201 OLE_VT_VOID
End_Procedure
// Move a file
Procedure ComMoveFile String llSource String llDestination
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 2
Send DefineParam to hDispatchDriver OLE_VT_BSTR llSource
Send DefineParam to hDispatchDriver OLE_VT_BSTR llDestination
Send InvokeComMethod to hDispatchDriver 1204 OLE_VT_VOID
End_Procedure
// Move a folder
Procedure ComMoveFolder String llSource String llDestination
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 2
Send DefineParam to hDispatchDriver OLE_VT_BSTR llSource
Send DefineParam to hDispatchDriver OLE_VT_BSTR llDestination
Send InvokeComMethod to hDispatchDriver 1205 OLE_VT_VOID
End_Procedure
// Copy a file
Procedure ComCopyFile String llSource String llDestination Boolean llOverWriteFiles
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 3
Send DefineParam to hDispatchDriver OLE_VT_BSTR llSource
Send DefineParam to hDispatchDriver OLE_VT_BSTR llDestination
Send DefineParam to hDispatchDriver OLE_VT_BOOL llOverWriteFiles
Send InvokeComMethod to hDispatchDriver 1202 OLE_VT_VOID
End_Procedure
// Copy a folder
Procedure ComCopyFolder String llSource String llDestination Boolean llOverWriteFiles
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 3
Send DefineParam to hDispatchDriver OLE_VT_BSTR llSource
Send DefineParam to hDispatchDriver OLE_VT_BSTR llDestination
Send DefineParam to hDispatchDriver OLE_VT_BOOL llOverWriteFiles
Send InvokeComMethod to hDispatchDriver 1203 OLE_VT_VOID
End_Procedure
// Create a folder
Function ComCreateFolder String llPath Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver OLE_VT_BSTR llPath
Get InvokeComMethod of hDispatchDriver 1120 OLE_VT_DISPATCH to retVal
Function_Return retVal
End_Function
// Create a file as a TextStream
Function ComCreateTextFile String llFileName Boolean llOverwrite Boolean llUnicode Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 3
Send DefineParam to hDispatchDriver OLE_VT_BSTR llFileName
Send DefineParam to hDispatchDriver OLE_VT_BOOL llOverwrite
Send DefineParam to hDispatchDriver OLE_VT_BOOL llUnicode
Get InvokeComMethod of hDispatchDriver 1101 OLE_VT_DISPATCH to retVal
Function_Return retVal
End_Function
// Open a file as a TextStream
Function ComOpenTextFile String llFileName OLEIOMode llIOMode Boolean llCreate OLETristate llFormat Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 4
Send DefineParam to hDispatchDriver OLE_VT_BSTR llFileName
Send DefineParam to hDispatchDriver OLE_VT_I4 llIOMode
Send DefineParam to hDispatchDriver OLE_VT_BOOL llCreate
Send DefineParam to hDispatchDriver OLE_VT_I4 llFormat
Get InvokeComMethod of hDispatchDriver 1100 OLE_VT_DISPATCH to retVal
Function_Return retVal
End_Function
// Retrieve the standard input, output or error stream
Function ComGetStandardStream StandardStreamTypes llStandardStreamType Boolean llUnicode Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 2
Send DefineParam to hDispatchDriver OLE_VT_I4 llStandardStreamType
Send DefineParam to hDispatchDriver OLE_VT_BOOL llUnicode
Get InvokeComMethod of hDispatchDriver 20000 OLE_VT_DISPATCH to retVal
Function_Return retVal
End_Function
// Retrieve the file version of the specified file into a string
Function ComGetFileVersion String llFileName Returns String
Handle hDispatchDriver
String retVal
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver OLE_VT_BSTR llFileName
Get InvokeComMethod of hDispatchDriver 20010 OLE_VT_BSTR to retVal
Function_Return retVal
End_Function
End_Class
// CoClass
// ProgID: Scripting.FileSystemObject
// CLSID: {0D43FE01-F093-11CF-8940-00A0C9054228}
// FileSystem Object
Class cComFileSystemObject is a cComAutomationObject
Import_Class_Protocol cComIFileSystem3
Procedure Construct_Object
Forward Send Construct_Object
Set psProgID to "{0D43FE01-F093-11CF-8940-00A0C9054228}"
Set peAutoCreate to acNoAutoCreate
End_Procedure
End_Class
// CLSID: {C7C3F5A0-88A3-11D0-ABCB-00A0C90FFFC0}
// Drive Interface
Class cComIDrive is a Mixin
// Path
{ MethodType=Property DesignTime=False }
Function ComPath Returns String
Handle hDispatchDriver
String retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 0 OLE_VT_BSTR to retVal
Function_Return retVal
End_Function
// Drive letter
{ MethodType=Property DesignTime=False }
Function ComDriveLetter Returns String
Handle hDispatchDriver
String retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 10000 OLE_VT_BSTR to retVal
Function_Return retVal
End_Function
// Share name
{ MethodType=Property DesignTime=False }
Function ComShareName Returns String
Handle hDispatchDriver
String retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 10001 OLE_VT_BSTR to retVal
Function_Return retVal
End_Function
// Drive type
{ MethodType=Property DesignTime=False }
Function ComDriveType Returns DriveTypeConst
Handle hDispatchDriver
DriveTypeConst retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 10002 OLE_VT_I4 to retVal
Function_Return retVal
End_Function
// Root folder
{ MethodType=Property DesignTime=False }
Function ComRootFolder Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 10003 OLE_VT_DISPATCH to retVal
Function_Return retVal
End_Function
// Get available space
{ MethodType=Property DesignTime=False }
Function ComAvailableSpace Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 10005 OLE_VT_VARIANT to retVal
Function_Return retVal
End_Function
// Get drive free space
{ MethodType=Property DesignTime=False }
Function ComFreeSpace Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 10004 OLE_VT_VARIANT to retVal
Function_Return retVal
End_Function
// Get total drive size
{ MethodType=Property DesignTime=False }
Function ComTotalSize Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 10006 OLE_VT_VARIANT to retVal
Function_Return retVal
End_Function
// Name of volume
{ MethodType=Property DesignTime=False }
Function ComVolumeName Returns String
Handle hDispatchDriver
String retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 10007 OLE_VT_BSTR to retVal
Function_Return retVal
End_Function
// Name of volume
{ MethodType=Property DesignTime=False }
Procedure Set ComVolumeName String value
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Set ComProperty of hDispatchDriver 10007 OLE_VT_BSTR to value
End_Procedure
// Filesystem type
{ MethodType=Property DesignTime=False }
Function ComFileSystem Returns String
Handle hDispatchDriver
String retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 10008 OLE_VT_BSTR to retVal
Function_Return retVal
End_Function
// Serial number
{ MethodType=Property DesignTime=False }
Function ComSerialNumber Returns Integer
Handle hDispatchDriver
Integer retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 10009 OLE_VT_I4 to retVal
Function_Return retVal
End_Function
// Check if disk is available
{ MethodType=Property DesignTime=False }
Function ComIsReady Returns Boolean
Handle hDispatchDriver
Boolean retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 10010 OLE_VT_BOOL to retVal
Function_Return retVal
End_Function
End_Class
// CoClass
// CLSID: {C7C3F5B1-88A3-11D0-ABCB-00A0C90FFFC0}
// Drive Object
Class cComDrive is a cComAutomationObject
Import_Class_Protocol cComIDrive
Procedure Construct_Object
Forward Send Construct_Object
Set peAutoCreate to acNoAutoCreate
End_Procedure
End_Class
// CLSID: {C7C3F5A1-88A3-11D0-ABCB-00A0C90FFFC0}
// Drive Collection Interface
Class cComIDriveCollection is a Mixin
// Get drive
{ MethodType=Property DesignTime=False }
Function ComItem Variant llKey Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver OLE_VT_VARIANT llKey
Get InvokeComMethod of hDispatchDriver 0 OLE_VT_DISPATCH to retVal
Function_Return retVal
End_Function
// Number of drives
{ MethodType=Property DesignTime=False }
Function ComCount Returns Integer
Handle hDispatchDriver
Integer retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 1 OLE_VT_I4 to retVal
Function_Return retVal
End_Function
End_Class
// CoClass
// CLSID: {C7C3F5B2-88A3-11D0-ABCB-00A0C90FFFC0}
// Collection of drives associated with drive letters
Class cComDrives is a cComAutomationObject
Import_Class_Protocol cComIDriveCollection
Procedure Construct_Object
Forward Send Construct_Object
Set peAutoCreate to acNoAutoCreate
End_Procedure
End_Class
// CLSID: {C7C3F5A2-88A3-11D0-ABCB-00A0C90FFFC0}
// Folder Interface
Class cComIFolder is a Mixin
// Path to folder
{ MethodType=Property DesignTime=False }
Function ComPath Returns String
Handle hDispatchDriver
String retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 0 OLE_VT_BSTR to retVal
Function_Return retVal
End_Function
// Get name of folder
{ MethodType=Property DesignTime=False }
Function ComName Returns String
Handle hDispatchDriver
String retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 1000 OLE_VT_BSTR to retVal
Function_Return retVal
End_Function
// Get name of folder
{ MethodType=Property DesignTime=False }
Procedure Set ComName String value
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Set ComProperty of hDispatchDriver 1000 OLE_VT_BSTR to value
End_Procedure
// Short path
{ MethodType=Property DesignTime=False }
Function ComShortPath Returns String
Handle hDispatchDriver
String retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 1002 OLE_VT_BSTR to retVal
Function_Return retVal
End_Function
// Short name
{ MethodType=Property DesignTime=False }
Function ComShortName Returns String
Handle hDispatchDriver
String retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 1001 OLE_VT_BSTR to retVal
Function_Return retVal
End_Function
// Get drive that contains folder
{ MethodType=Property DesignTime=False }
Function ComDrive Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 1004 OLE_VT_DISPATCH to retVal
Function_Return retVal
End_Function
// Get parent folder
{ MethodType=Property DesignTime=False }
Function ComParentFolder Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 1005 OLE_VT_DISPATCH to retVal
Function_Return retVal
End_Function
// Folder attributes
{ MethodType=Property DesignTime=False }
Function ComAttributes Returns FileAttribute
Handle hDispatchDriver
FileAttribute retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 1003 OLE_VT_I4 to retVal
Function_Return retVal
End_Function
// Folder attributes
{ MethodType=Property DesignTime=False }
Procedure Set ComAttributes FileAttribute value
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Set ComProperty of hDispatchDriver 1003 OLE_VT_I4 to value
End_Procedure
// Date folder was created
{ MethodType=Property DesignTime=False }
Function ComDateCreated Returns DateTime
Handle hDispatchDriver
DateTime retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 1006 OLE_VT_DATE to retVal
Function_Return retVal
End_Function
// Date folder was last modified
{ MethodType=Property DesignTime=False }
Function ComDateLastModified Returns DateTime
Handle hDispatchDriver
DateTime retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 1007 OLE_VT_DATE to retVal
Function_Return retVal
End_Function
// Date folder was last accessed
{ MethodType=Property DesignTime=False }
Function ComDateLastAccessed Returns DateTime
Handle hDispatchDriver
DateTime retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 1008 OLE_VT_DATE to retVal
Function_Return retVal
End_Function
// Type description
{ MethodType=Property DesignTime=False }
Function ComType Returns String
Handle hDispatchDriver
String retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 1010 OLE_VT_BSTR to retVal
Function_Return retVal
End_Function
// Delete this folder
Procedure ComDelete Boolean llForce
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver OLE_VT_BOOL llForce
Send InvokeComMethod to hDispatchDriver 1201 OLE_VT_VOID
End_Procedure
// Copy this folder
Procedure ComCopy String llDestination Boolean llOverWriteFiles
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 2
Send DefineParam to hDispatchDriver OLE_VT_BSTR llDestination
Send DefineParam to hDispatchDriver OLE_VT_BOOL llOverWriteFiles
Send InvokeComMethod to hDispatchDriver 1203 OLE_VT_VOID
End_Procedure
// Move this folder
Procedure ComMove String llDestination
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver OLE_VT_BSTR llDestination
Send InvokeComMethod to hDispatchDriver 1205 OLE_VT_VOID
End_Procedure
// True if folder is root
{ MethodType=Property DesignTime=False }
Function ComIsRootFolder Returns Boolean
Handle hDispatchDriver
Boolean retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 10000 OLE_VT_BOOL to retVal
Function_Return retVal
End_Function
// Sum of files and subfolders
{ MethodType=Property DesignTime=False }
Function ComSize Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 1009 OLE_VT_VARIANT to retVal
Function_Return retVal
End_Function
// Get folders collection
{ MethodType=Property DesignTime=False }
Function ComSubFolders Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 10001 OLE_VT_DISPATCH to retVal
Function_Return retVal
End_Function
// Get files collection
{ MethodType=Property DesignTime=False }
Function ComFiles Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 10002 OLE_VT_DISPATCH to retVal
Function_Return retVal
End_Function
// Create a file as a TextStream
Function ComCreateTextFile String llFileName Boolean llOverwrite Boolean llUnicode Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 3
Send DefineParam to hDispatchDriver OLE_VT_BSTR llFileName
Send DefineParam to hDispatchDriver OLE_VT_BOOL llOverwrite
Send DefineParam to hDispatchDriver OLE_VT_BOOL llUnicode
Get InvokeComMethod of hDispatchDriver 1101 OLE_VT_DISPATCH to retVal
Function_Return retVal
End_Function
End_Class
// CoClass
// CLSID: {C7C3F5B3-88A3-11D0-ABCB-00A0C90FFFC0}
// Folder object
Class cComFolder is a cComAutomationObject
Import_Class_Protocol cComIFolder
Procedure Construct_Object
Forward Send Construct_Object
Set peAutoCreate to acNoAutoCreate
End_Procedure
End_Class
// CLSID: {C7C3F5A3-88A3-11D0-ABCB-00A0C90FFFC0}
// Folder Collection Interface
Class cComIFolderCollection is a Mixin
// Create a new folder
Function ComAdd String llName Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver OLE_VT_BSTR llName
Get InvokeComMethod of hDispatchDriver 2 OLE_VT_DISPATCH to retVal
Function_Return retVal
End_Function
// Get folder
{ MethodType=Property DesignTime=False }
Function ComItem Variant llKey Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver OLE_VT_VARIANT llKey
Get InvokeComMethod of hDispatchDriver 0 OLE_VT_DISPATCH to retVal
Function_Return retVal
End_Function
// Number of folders
{ MethodType=Property DesignTime=False }
Function ComCount Returns Integer
Handle hDispatchDriver
Integer retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 1 OLE_VT_I4 to retVal
Function_Return retVal
End_Function
End_Class
// CoClass
// CLSID: {C7C3F5B4-88A3-11D0-ABCB-00A0C90FFFC0}
// Collection of subfolders in a folder
Class cComFolders is a cComAutomationObject
Import_Class_Protocol cComIFolderCollection
Procedure Construct_Object
Forward Send Construct_Object
Set peAutoCreate to acNoAutoCreate
End_Procedure
End_Class
// CLSID: {C7C3F5A4-88A3-11D0-ABCB-00A0C90FFFC0}
// File Interface
Class cComIFile is a Mixin
// Path to the file
{ MethodType=Property DesignTime=False }
Function ComPath Returns String
Handle hDispatchDriver
String retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 0 OLE_VT_BSTR to retVal
Function_Return retVal
End_Function
// Get name of file
{ MethodType=Property DesignTime=False }
Function ComName Returns String
Handle hDispatchDriver
String retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 1000 OLE_VT_BSTR to retVal
Function_Return retVal
End_Function
// Get name of file
{ MethodType=Property DesignTime=False }
Procedure Set ComName String value
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Set ComProperty of hDispatchDriver 1000 OLE_VT_BSTR to value
End_Procedure
// Short path
{ MethodType=Property DesignTime=False }
Function ComShortPath Returns String
Handle hDispatchDriver
String retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 1002 OLE_VT_BSTR to retVal
Function_Return retVal
End_Function
// Short name
{ MethodType=Property DesignTime=False }
Function ComShortName Returns String
Handle hDispatchDriver
String retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 1001 OLE_VT_BSTR to retVal
Function_Return retVal
End_Function
// Get drive that contains file
{ MethodType=Property DesignTime=False }
Function ComDrive Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 1004 OLE_VT_DISPATCH to retVal
Function_Return retVal
End_Function
// Get folder that contains file
{ MethodType=Property DesignTime=False }
Function ComParentFolder Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 1005 OLE_VT_DISPATCH to retVal
Function_Return retVal
End_Function
// File attributes
{ MethodType=Property DesignTime=False }
Function ComAttributes Returns FileAttribute
Handle hDispatchDriver
FileAttribute retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 1003 OLE_VT_I4 to retVal
Function_Return retVal
End_Function
// File attributes
{ MethodType=Property DesignTime=False }
Procedure Set ComAttributes FileAttribute value
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Set ComProperty of hDispatchDriver 1003 OLE_VT_I4 to value
End_Procedure
// Date file was created
{ MethodType=Property DesignTime=False }
Function ComDateCreated Returns DateTime
Handle hDispatchDriver
DateTime retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 1006 OLE_VT_DATE to retVal
Function_Return retVal
End_Function
// Date file was last modified
{ MethodType=Property DesignTime=False }
Function ComDateLastModified Returns DateTime
Handle hDispatchDriver
DateTime retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 1007 OLE_VT_DATE to retVal
Function_Return retVal
End_Function
// Date file was last accessed
{ MethodType=Property DesignTime=False }
Function ComDateLastAccessed Returns DateTime
Handle hDispatchDriver
DateTime retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 1008 OLE_VT_DATE to retVal
Function_Return retVal
End_Function
// File size
{ MethodType=Property DesignTime=False }
Function ComSize Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 1009 OLE_VT_VARIANT to retVal
Function_Return retVal
End_Function
// Type description
{ MethodType=Property DesignTime=False }
Function ComType Returns String
Handle hDispatchDriver
String retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 1010 OLE_VT_BSTR to retVal
Function_Return retVal
End_Function
// Delete this file
Procedure ComDelete Boolean llForce
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver OLE_VT_BOOL llForce
Send InvokeComMethod to hDispatchDriver 1200 OLE_VT_VOID
End_Procedure
// Copy this file
Procedure ComCopy String llDestination Boolean llOverWriteFiles
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 2
Send DefineParam to hDispatchDriver OLE_VT_BSTR llDestination
Send DefineParam to hDispatchDriver OLE_VT_BOOL llOverWriteFiles
Send InvokeComMethod to hDispatchDriver 1202 OLE_VT_VOID
End_Procedure
// Move this file
Procedure ComMove String llDestination
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver OLE_VT_BSTR llDestination
Send InvokeComMethod to hDispatchDriver 1204 OLE_VT_VOID
End_Procedure
// Open a file as a TextStream
Function ComOpenAsTextStream OLEIOMode llIOMode OLETristate llFormat Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 2
Send DefineParam to hDispatchDriver OLE_VT_I4 llIOMode
Send DefineParam to hDispatchDriver OLE_VT_I4 llFormat
Get InvokeComMethod of hDispatchDriver 1100 OLE_VT_DISPATCH to retVal
Function_Return retVal
End_Function
End_Class
// CoClass
// CLSID: {C7C3F5B5-88A3-11D0-ABCB-00A0C90FFFC0}
// File object
Class cComFile is a cComAutomationObject
Import_Class_Protocol cComIFile
Procedure Construct_Object
Forward Send Construct_Object
Set peAutoCreate to acNoAutoCreate
End_Procedure
End_Class
// CLSID: {C7C3F5A5-88A3-11D0-ABCB-00A0C90FFFC0}
// File Collection Interface
Class cComIFileCollection is a Mixin
// Get file
{ MethodType=Property DesignTime=False }
Function ComItem Variant llKey Returns Variant
Handle hDispatchDriver
Variant retVal
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver OLE_VT_VARIANT llKey
Get InvokeComMethod of hDispatchDriver 0 OLE_VT_DISPATCH to retVal
Function_Return retVal
End_Function
// Number of folders
{ MethodType=Property DesignTime=False }
Function ComCount Returns Integer
Handle hDispatchDriver
Integer retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 1 OLE_VT_I4 to retVal
Function_Return retVal
End_Function
End_Class
// CoClass
// CLSID: {C7C3F5B6-88A3-11D0-ABCB-00A0C90FFFC0}
// Collection of files in a folder
Class cComFiles is a cComAutomationObject
Import_Class_Protocol cComIFileCollection
Procedure Construct_Object
Forward Send Construct_Object
Set peAutoCreate to acNoAutoCreate
End_Procedure
End_Class
// CLSID: {53BAD8C1-E718-11CF-893D-00A0C9054228}
// Scripting.TextStream Interface
Class cComITextStream is a Mixin
// Current line number
{ MethodType=Property DesignTime=False }
Function ComLine Returns Integer
Handle hDispatchDriver
Integer retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 10000 OLE_VT_I4 to retVal
Function_Return retVal
End_Function
// Current column number
{ MethodType=Property DesignTime=False }
Function ComColumn Returns Integer
Handle hDispatchDriver
Integer retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver -529 OLE_VT_I4 to retVal
Function_Return retVal
End_Function
// Is the current position at the end of the stream?
{ MethodType=Property DesignTime=False }
Function ComAtEndOfStream Returns Boolean
Handle hDispatchDriver
Boolean retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 10002 OLE_VT_BOOL to retVal
Function_Return retVal
End_Function
// Is the current position at the end of a line?
{ MethodType=Property DesignTime=False }
Function ComAtEndOfLine Returns Boolean
Handle hDispatchDriver
Boolean retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 10003 OLE_VT_BOOL to retVal
Function_Return retVal
End_Function
// Read a specific number of characters into a string
Function ComRead Integer llCharacters Returns String
Handle hDispatchDriver
String retVal
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver OLE_VT_I4 llCharacters
Get InvokeComMethod of hDispatchDriver 10004 OLE_VT_BSTR to retVal
Function_Return retVal
End_Function
// Read an entire line into a string
Function ComReadLine Returns String
Handle hDispatchDriver
String retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 10005 OLE_VT_BSTR to retVal
Function_Return retVal
End_Function
// Read the entire stream into a string
Function ComReadAll Returns String
Handle hDispatchDriver
String retVal
Get phDispatchDriver to hDispatchDriver
Get InvokeComMethod of hDispatchDriver 10006 OLE_VT_BSTR to retVal
Function_Return retVal
End_Function
// Write a string to the stream
Procedure ComWrite String llText
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver OLE_VT_BSTR llText
Send InvokeComMethod to hDispatchDriver 10007 OLE_VT_VOID
End_Procedure
// Write a string and an end of line to the stream
Procedure ComWriteLine String llText
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver OLE_VT_BSTR llText
Send InvokeComMethod to hDispatchDriver 10008 OLE_VT_VOID
End_Procedure
// Write a number of blank lines to the stream
Procedure ComWriteBlankLines Integer llLines
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver OLE_VT_I4 llLines
Send InvokeComMethod to hDispatchDriver 10009 OLE_VT_VOID
End_Procedure
// Skip a specific number of characters
Procedure ComSkip Integer llCharacters
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver OLE_VT_I4 llCharacters
Send InvokeComMethod to hDispatchDriver 10010 OLE_VT_VOID
End_Procedure
// Skip a line
Procedure ComSkipLine
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send InvokeComMethod to hDispatchDriver 10011 OLE_VT_VOID
End_Procedure
// Close a text stream
Procedure ComClose
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send InvokeComMethod to hDispatchDriver 10012 OLE_VT_VOID
End_Procedure
End_Class
// CoClass
// CLSID: {0BB02EC0-EF49-11CF-8940-00A0C9054228}
// TextStream object
Class cComTextStream is a cComAutomationObject
Import_Class_Protocol cComITextStream
Procedure Construct_Object
Forward Send Construct_Object
Set peAutoCreate to acNoAutoCreate
End_Procedure
End_Class
// CLSID: {AADC65F6-CFF1-11D1-B747-00C04FC2B085}
// Script Encoder Interface
Class cComIScriptEncoder is a Mixin
// Call the Encoder determined by szExt, passing bstrStreamIn and optional arguments
Function ComEncodeScriptFile String llszExt String llbstrStreamIn Integer llcFlags String llbstrDefaultLang Returns String
Handle hDispatchDriver
String retVal
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 4
Send DefineParam to hDispatchDriver OLE_VT_BSTR llszExt
Send DefineParam to hDispatchDriver OLE_VT_BSTR llbstrStreamIn
Send DefineParam to hDispatchDriver OLE_VT_I4 llcFlags
Send DefineParam to hDispatchDriver OLE_VT_BSTR llbstrDefaultLang
Get InvokeComMethod of hDispatchDriver 0 OLE_VT_BSTR to retVal
Function_Return retVal
End_Function
End_Class
// CoClass
// ProgID: Scripting.Encoder
// CLSID: {32DA2B15-CFED-11D1-B747-00C04FC2B085}
// Script Encoder Object
Class cComEncoder is a cComAutomationObject
Import_Class_Protocol cComIScriptEncoder
Procedure Construct_Object
Forward Send Construct_Object
Set psProgID to "{32DA2B15-CFED-11D1-B747-00C04FC2B085}"
Set peAutoCreate to acNoAutoCreate
End_Procedure
End_Class
Use scrrun.pkg
Class cDictionary is a cObject
Procedure Construct_Object
Forward Send Construct_Object
Property Integer phDict
Property String[] paKeyList
End_Procedure
Function DictionaryHandle Returns Handle
Integer hObj
If ((phDict(Self))<>0) Function_Return (phDict(Self))
Get Create (RefClass(cComDictionary)) to hObj
Send CreateComObject to hObj
Set phDict to hObj
Function_Return (phDict(Self))
End_Function
Procedure AddKey String sKey String sValue
Integer hObj
String[] aKeyList
Get DictionaryHandle to hObj
If (not(ComExists(hObj,sKey))) Begin
Get paKeyList to aKeyList
Move (sKey) to aKeyList[SizeOfArray(aKeyList)]
Set paKeyList to aKeyList
End
Send ComAdd to hObj sKey sValue
End_Procedure
Procedure RemoveAll
Integer hObj
String[] aKeyList
Get DictionaryHandle to hObj
Send ComRemoveAll to hObj
Set paKeyList to aKeyList
End_Procedure
Procedure Delete_data
Send RemoveAll
End_Procedure
Function KeyValue String sKey Returns String
String sValue
Integer hObj
Get DictionaryHandle to hObj
If (ComExists(hObj,sKey)) Move (ComItem(hObj,sKey)) to sValue
Function_Return sValue
End_Function
Function SizeOfDictionary Returns Integer
Integer iCount
Integer hObj
Get DictionaryHandle to hObj
Move (ComCount(hObj)) to iCount
Function_Return iCount
End_Function
Function ListOfKeys Returns String[]
Function_Return (paKeyList(Self))
End_Function
Procedure Destroy_Object
Integer hObj
Forward Send Destroy_Object // must be sent
If ((phDict(Self))<>0) Begin
Get DictionaryHandle to hObj
Send ReleaseComObject to hObj
Send Destroy to hObj
End
End_Procedure
End_Class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment