Android smartphone

2009-10-22

Using COM Object in delphi

Author: Friend88

// Using Com object in delphi

// Declare comObj in declaratioin block

//

Unit TestCOMOjbe;

Interface

uses ComObj;

...

function functionname(parameter):<result type>

implement

function functionname(parameter):<result type>;

var OleVariantName:OleVariant

begin

OleVariantName := CreateOLEOjbect('ComObject Name');

...

OleVariantName.UnInitialize;

end;

ActiveX Script

Set objFSO = CreateObject("Scripting.FileSystemObject")

Sub CreatePath(strPath)

If Not objFSO.FolderExists( objFSO.GetParentFolderName(strPath) ) then Call CreatePath( objFSO.GetParentFolderName(strPath) )

objFSO.CreateFolder( strPath )

End Sub

No comments: