Skip to main content

Timeline for calling delphi dll from c#

Current License: CC BY-SA 2.5

5 events
when toggle format what by license comment
Jun 23, 2010 at 0:47 vote accept votaroe
Jun 15, 2010 at 18:25 comment added votaroe Yes if the setting is: UnmanagedType.LPStr the Init call works fine. If I call GetData the TMPData structure that I get back have garbage data for the firstname, lastname fields and default values for all the other fields. If I change to ByValTStr the Init call fails but I can still succesfully call GetData and the return values are correct from the previous successfull call of Init. I think I need to look at the Delphi code and try to figure out what is happening. I don't know delphi but hope that I can create a com delphi dll that is easier to use with interop than a standard dll
Jun 15, 2010 at 7:10 comment added Jim McKeeth So if you looked at your data before the call it was different then the data after the call, but it didn't resemble the data you were expecting at all?
Jun 14, 2010 at 22:36 comment added votaroe The dll was built with Delphi 6. The data I got back looked like garbage. Not sure if it was swapped but it was not truncated.
Jun 14, 2010 at 22:06 history answered Jim McKeeth CC BY-SA 2.5