UNIT Ole2Auto
Class
TOleController
Method
AssignIDispatch
CallFunction
CallFunctionByID
CallFunctionByIDsNamedParams
CallFunctionNamedParams
CallFunctionNoParams
CallFunctionNoParamsByID
CallProcedure
CallProcedureByID
CallProcedureByIDsNamedParams
CallProcedureNamedParams
CallProcedureNoParams
CallProcedureNoParamsByID
CreateObject
GetProperty
GetPropertyByID
SetProperty
SetPropertyByID
Routine
CreateLCID
This class allows you accesses OLE Automation objects. OLE
Automation controllers are clients that use the OLE IDispatch interface to access the OLE
server objects that implement this interface. The controller must first create the object
by calling the CreateObject method, then call the object's interface methods by using the
CallFunction, CallFunctionNamedParams, CallProcedure, CallProcedureNamedParams etc
methods.
In 32-bit Delphi versions you can use internal Delphi OLE Automation controller instead,
but Delphi controller not supports the object's interface methods that named with '$'
symbols, i.e. "GetText$" (in Word Basic). This class allows you call such
methods still.
Property Locale
Declaration: Locale: TLCID;
Returns the Language ID.
Property OleObject
Declaration: OleObject: Variant;
Read OleObject property to access the OLE object created by the OLE controller as a variant.
Method
AssignIDispatch
Declaration: procedure AssignIDispatch(V: Variant); virtual;
procedure AssignDispatch assigns variant V to dispatch.
Method CallFunction
Declaration: function CallFunction(const AName: string; const Params: array
of const): PVariant;
CallFunction function calls the function name AName with parameters Params.
Method
CallFunctionByID
Declaration: function CallFunctionByID(ID: DISPID; const Params: array of
const): PVariant;
CallFunctionById calls the function by it's ID number and with parameters Params
Method
CallFunctionByIDsNamedParams
Declaration: function CallFunctionByIDsNamedParams(const IDs: TDispIDList;
const Params: array of const; Cnt: Byte): PVariant;
CallFunctionByIdsNamedParams calls the function by it's IDs
with parameters Params with count of parameters Cnt.
Method
CallFunctionNamedParams
Declaration: function CallFunctionNamedParams(const AName: string; const
Params: array of const; const Names: array of string): PVariant;
CallFunctionNamedParams calls a function with Parameters Params and Names.
Method
CallFunctionNoParams
Declaration: function CallFunctionNoParams(const AName: string): PVariant;
CallFunctionNoParams calls the function AName without parameters.
Method
CallFunctionNoParamsByID
Declaration: function CallFunctionNoParamsByID(ID: DISPID): PVariant;
CallFunctionNoParamsById calls a function by it's ID.
Method CallProcedure
Declaration: procedure CallProcedure(const AName: string; const Params: array
of const);
CallProcedure calls a procedure AName with parameters Params.
Method
CallProcedureByID
Declaration: procedure CallProcedureByID(ID: DISPID; const Params: array of
const);
CallProcedureById calls a procedure by it's ID and with parameters Params
Method
CallProcedureByIDsNamedParams
Declaration: procedure CallProcedureByIDsNamedParams(const IDs: TDispIDList;
const Params: array of const; Cnt: Byte);
CallProcedureByIdsNamedParams calls a procedure by (ID number) Ids and with parameters Params and with parameter count Cnt.
Method
CallProcedureNamedParams
Declaration: procedure CallProcedureNamedParams(const AName: string; const
Params: array of const; const Names: array of string);
CallProcedureByIdsNamedParams calls a procedure by (ID number) Ids and with parameters Params and with Names.
Method
CallProcedureNoParams
Declaration: procedure CallProcedureNoParams(const AName: string);
CallProcedureNoParams calls a procedure with No parameters, and function name AName.
Method
CallProcedureNoParamsByID
Declaration: procedure CallProcedureNoParamsByID(ID: DISPID);
CallProcedureNoparamsById calls a procedure without any parameters by it's ID (number).
Method CreateObject
Declaration: procedure CreateObject(const ClassName: string);
The CreateObject method creates an OLE automation object of the specified class. This is the way to get a new instance of an OLE automation server object for your automation controller.
Method GetProperty
Declaration: function GetProperty(const AName: string): PVariant;
Many automation objects include properties in their interfaces. Properties represent the state or content of the automation server. This method allows you to refer to automation-object property by its name AName.
Method
GetPropertyByID
Declaration: function GetPropertyByID(ID: DISPID): PVariant;
Many automation objects include properties in their interfaces. Properties represent the state or content of the automation server. This method allows you to refer to automation-object property by its identifier ID.
Method SetProperty
Declaration: procedure SetProperty(const AName: string; const Prop: array of
const);
Many automation objects include properties in their interfaces. Properties represent the
state or content of the automation server. This method allows you to set a value of
automation-object property by its name AName.
Method
SetPropertyByID
Declaration: procedure SetPropertyByID(ID: DISPID; const Prop: array of
const);
Many automation objects include properties in their interfaces. Properties represent the state or content of the automation server. This method allows you to set a value of automation-object property by its identifier ID.
Routine CreateLCID
Declaration: function CreateLCID(PrimaryLangID, SubLangID: Word): TLCID;
CreateLCID example:
Next code fragment sets the language code for English:
OleController.Locale := CreateLCID(LANG_ENGLISH, SUBLANG_DEFAULT);
Index Page | About | Download
Creation Date: 4 Feb 1998 | Last Update: 16 Mar 2000