DotNetGetBool Function

Action

Gets the boolean return value of the last DotNetCallMethod call in bReturn.

Include file

DotNetAPI.bdh

Syntax

DotNetGetBool( in    hObject : number,
               inout bReturn : boolean ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hObject Handle to a .NET Object
bReturn Boolean variable that will receive the return value of the last DotNetCallMethod call

Example

dcltrans
  transaction TMain
  var
    hObject, hObject2 : number;
    bReturn           : boolean;
  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");
    DotNetGetBool(hObject, bReturn);
    DotNetFreeObject(hObject);
    DotNetFreeObject(hObject2);
  end TMain;