CompuServe Messages

#BAD DLL CALLING CONVENTI

    08-Oct-91 15:27:13
Fm: T.O. 70524,3723
To: Jonathan Zuck (UFI) 76702,1605
Jonathan, No succes with the double function. What I'm trying to do is extract a database numeric field (in character format) in my DLL, convert it to a double, and pass that value back to Vis Basic when Vis Basic requests it by supplying a field name. Declared as: Declare vxDouble (FieldName as String) As Double Called with: Amount# = vxDouble("amount_fld") BC++ function: double * FAR PASCAL vxDouble(char * fieldname, double * dval) { *dval = vxFldDouble(fieldname); return dval; } Looks simple enough. I think wthis is what you were getting at. I have a C test program that I use for debugging the DLL functions and it shows my internal function vxFldDouble works fine. The Vis Basic SUB structure I passed along the other day also works OK but I would like this to be a function to lend some consistency to the DLL calling conventions. The code sequence above stops the "BAD DLL CALLING CONVENTION" in Vis Basic but results in a crash in the DLL. Dr. Watson reports a "Null Selector (Read)" error and the ds register shows a null pointer. Any other suggestions? There is 1 Reply.