CDLL question.
Posted: Tue Jul 20, 2004 10:56 pm
I am trying to use the CDLL function to access a dll developed in Delphi 6 in an R&R report (version9 Xbase) on a Windows XP notebook.____There is a calculated field that has the following expression;__CDLL("BORRetLib","GetCombinedCategory",NEWEELE3->EESYSID+NEWEELE3->PLANCODE+EEELECT->PLYRCODE)__The verify button says it is a valid expression.____The function definition in the dll looks like this:__function GetCombinedCategory(strParms: string): string; StdCall;____The dll works correctly with no errors from a Delphi test program, but when the report runs in the designer it selects records sucessfully but when it goes to export the data it blows up with an error which drops you out of the designer.__(R&R Report Designer, Xbase Edition has encountered a problem and needs to close. We are sorry for the inconvenience.) Then if you click the "Don^t send to Microsoft" button the following message appears.__(report name.RRW - R&R Xbase: rrw.exe - Application Error The instruction at "0x73dd1351" referenced memory at "0x00000004". The memory could not be "read". Click OK to terminate the program.)____Does Anyone have an idea what could cause this?____Also, in the manual "Developing Applications, Xbase Edition" on pg 199 it says;__CDLL() takes three string arguments and returns a string value.__However down a couple of paragraphs on the same page it says; CDLL() expects a boolean return value from the called DLL. These seem contradictory? Do I need to define the function in the called dll differently than shown above?