Home > database >  Urgent: this built-in help pb code is what is going wrong
Urgent: this built-in help pb code is what is going wrong

Time:09-30

His example is a original concept script that starts the original concept, Application server and creates an object that is contained in MYLIBRARY. DLL. If the object is created successfully, the script calls the function uf_calc, which returns a long as a status code and passes back the result of the calculation in the variable ld_result.

OLEObject PBObject, PBNVObject

Long ll_status
Double ld_result

PBObject=CREATE OLEObject
Ll_status=PBObject. ConnectToNewObject & amp;
(" original concept. The Application ")
IF ll_status=0 THEN
//Handle the error
The ELSE
PBObject. LibraryList="c: \ myappl \ mylibrary DLL"
PBObject. MachineCode=TRUE

PBNVObject=CREATE OLEObject

PBNVObject=& amp;
PBObject. CreateObject (" nvo_myobject ")

IF IsNull (PBNVObject) THEN
//Handle the error
The ELSE
Ll_status=PBNVObject. Uf_calc & amp;

(12, 14, REF result)
END the IF
END the IF
Mioleobject. Setcallback (PBNVobject)//mioleobject is my definition of ole object is implemented by a callback map

Please tell me, what the problem is out in where?

CodePudding user response:


Ll_status=PBNVObject. Uf_calc & amp;
(12, 14, REF result)
Here should be ll_result,
Does not define a result the variable

CodePudding user response:

At least two variables are not clearly defined:
1 & gt; The result (agree with upstairs opinion)
2> Mioleobject

Only visual syntax errors, the other is hard to tell,
  • Related