I have a delphi dll which i call using interop services in my web app. The The web app im calling the dll in Platform target is set to any cpu. When i test it in my console app which Platform target is x86 it loads and calls the dll with no errors. If i change the console apps platform target to any cpu it gives that same error. I cannot change the platform target of the web app. How can i overcome this? Is it that the delphi dll is targeted at using x86. Can i compile the delphi project to use any cpu in Borland Delphi 7. Help is much appreciated. Here is my import statement-
[DllImport(@"Decoder.dll", CharSet = CharSet.Unicode)]
static extern Int32 CALinkDecode(
string sCode,
out int SubscriberID,
out int MailshotID,
out int LinkID
);
Int32 retvalptr = CALinkDecode(sCode, out cas,
out cam, out cal);