DotNetSetBool Function

Action

Sets a boolean parameter for the next DotNetCallMethod or DotNetLoadObject call in an internal parameter array. The parameters will be passed in the order they have been set to the internal array. After calling DotNetCallMethod or DotNetLoadObject the internal parameter array will be cleared.

Include file

DotNetAPI.bdh

Syntax

DotNetSetBool( in hObject : number,
               in bParam  : boolean );
Parameter Description
hObject Handle to a .NET Object to set the parameter for the next DotNetCallMethod call or DOTNET_CONSTRUCTOR to set the parameter for the next DotNetLoadObject call.
bParam Boolean value that should be passed as parameter to the next DotNetCallMethod on the passed .NET Object

Example

dcltrans
  transaction TMain
  var
    hObject, hObject2 : number;
    sReturnValue      : string;
  begin
    DotNetSetString(hObject, "ConstrValue1");

    hObject := DotNetLoadObject("bin\\Release\\MyDotNet.dll", "MyDotNet.TestClass");
    hObject2 := DotNetLoadObject("bin\\Release\\MyDotNet.dll", "MyDotNet.ParamClass");
    DotNetSetFloat(hObject, 1.23);
    DotNetSetInt(hObject, 123);
    DotNetSetBool(hObject, false);
    DotNetSetObject(hObject, hObject2);
    DotNetCallMethod(hObject,"TestMethod");
    DotNetGetString(hObject, sReturnValue);
    DotNetFreeObject(hObject);
    DotNetFreeObject(hObject2);
  end TMain;