I've got some functions I need to call that are in some DLL files that have been written in Delphi 5 in a VB.NET 2005 application. I'm able to use the DllImport function to access the functions just fine; however, I'm having an issue with the Delphi string data type and passing it to and from the .NET application.
Take this delphi function for example:
Expand|Select|Wrap|Line Numbers
- function AllocateInventory2(ItemNo: string;
- Warehouse: string;
- Quantity: double): Boolean;
- begin
- result := AllocateInv(UpperCase(ItemNo), '', UpperCase(Warehouse), Quantity);
- end;
Does anyone know how I can call this Delphi function from .NET and have it pass the string values in a manner so that they won't be corrupted when stored in Delphi?