Forum > General
dll call fails, how to check the specific reason, so as to solve the problem
Jzhen:
--- Quote from: TRon on February 06, 2023, 08:45:24 am ---
If you know for sure the library was made with Delphi Rad Studio then you can probably use their online documentation to determine the exact type for the parameter types (and then find/locate the FreePascal/Lazarus equivalent).
--- End quote ---
Make sure it is delphi.
I'm thinking about how to find the corresponding information
TRon:
--- Quote from: Jzhen on February 06, 2023, 08:55:34 am ---I'm thinking about how to find the corresponding information
--- End quote ---
I edited my previous post to include an example for unicodestring.
Here it is for System::DynamicArray
It is tedious but do-able. Although i have no idea if you are able to accomplish this with freepascal/lazarus. The documentation is rather explicit about some of these types being Delphi (class) compatible. FPC/Lazarus <> Delphi on binary/VMT level.
Jzhen:
--- Quote from: TRon on February 06, 2023, 09:01:43 am ---
I edited my previous post to include an example for unicodestring.
Here it is for System::DynamicArray
It is tedious but do-able. Although i have no idea if you are able to accomplish this with freepascal/lazarus. The documentation is rather explicit about some of these types being Delphi (class) compatible. FPC/Lazarus <> Delphi on binary/VMT level.
--- End quote ---
Thank you very much, I have already got the source code from a third party, and I don't need to guess the data type anymore.
How can I debug the method of entering the dll source code, similar to the function of java entering the source code, I want to see the direction of the specific data and code, so as to know the cause of the error.
This is my first time using delphi. Possible problems than Xiaobai, I hope you can provide your guidance.
TRon:
--- Quote from: Jzhen on February 07, 2023, 03:07:48 am ---Thank you very much,
--- End quote ---
You're welcome.
--- Quote --- I have already got the source code from a third party, and I don't need to guess the data type anymore.
--- End quote ---
That makes things /a lot/ easier.
--- Quote ---How can I debug the method of entering the dll source code, similar to the function of java entering the source code, I want to see the direction of the specific data and code, so as to know the cause of the error.
--- End quote ---
That depends on what kind of source-code you now actually got.
Do you now have the complete source-code of the library (thus also including the implementation of the library functions itself, in which case you can actually see what happens with the parameters) or only the library header sources ?
I am guesstimating that it is the latter.
--- Quote ---This is my first time using delphi. Possible problems than Xiaobai, I hope you can provide your guidance.
--- End quote ---
Delphi is really not my area of expertise (anymore). The last Delphi that I used was version 7.
In those days you could use the integrated debugger to set a breakpoint on the call to the library and inspect all (declared) values. Then debugging your way through the function to see what happens with the different parameters.
If you are working with Delphi then you are also actually also in the wrong forums as we usually discuss FreePascal/Lazarus here. There is some common ground between Delphi and FPC/Lazarus because FPC/Lazarus tries to be Delphi compatible /at source-level/ but as soon as you are talking Delphi specifics then this isn't really the right place to discuss it.
I do not know if there is someone else around that is able to chime in (and/or if it is allowed). (If even to mention where TS should go for Delphi specific questions these days).
What Delphi version/type are we talking about specifically ? (there is a long list of accumulated releases each with their own quirks over the years)
Jzhen:
--- Quote from: TRon on February 07, 2023, 05:49:59 am ---
That depends on what kind of source-code you now actually got.
Do you now have the complete source-code of the library (thus also including the implementation of the library functions itself, in which case you can actually see what happens with the parameters) or only the library header sources ?
I am guesstimating that it is the latter.
--- End quote ---
I have got the source code. Now I just need to debug the method. Thank you again
Navigation
[0] Message Index
[*] Previous page