Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 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.
    – votaroe
    Commented Jun 14, 2010 at 22:36
  • 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? Commented Jun 15, 2010 at 7:10
  • 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
    – votaroe
    Commented Jun 15, 2010 at 18:25