Ok, I know this is a long shot, but I wrote some code to call a Delphi DLL with 3 parameters from C#. These 3 parameters are delphi records that each have almost a million fields (exaggerating of course). I painstakingly created structs in C#. For arrays, I didn't use the "fixed" keywords, I instantiated them at runtime using "new" double[100] (for example. So now I called the delphi function, and I get an exception that I have invalid arguments. I was expecting access violations right off the bat.
Ok, I know this is a long shot, but I wrote some code to call a Delphi DLL with 3 parameters from C#. These 3 parameters are delphi records that each have almost a million fields (exaggerating of course). I painstakingly created structs in C#. For arrays, I didn't use the "fixed" keywords, I instantiated them at runtime using "new" double[100] (for example. So now I called the delphi function, and I get an exception that I have invalid arguments. I was expecting access violations right off the bat.
Now, I'm thinking that the C# structures are not equivalent to the Delphi records. I did a size of in Delphi of the records in the Delphi EXE that calls this DLL, and the record sizes are a lot bigger than the C# counterparts. I'm wondering if it has to do with record alignment, etc. Or is there some C# to Delphi issue I'm not aware of?
Thanks
Now, I'm thinking that the C# structures are not equivalent to the Delphi records. I did a size of in Delphi of the records in the Delphi EXE that calls this DLL, and the record sizes are a lot bigger than the C# counterparts. I'm wondering if it has to do with record alignment, etc. Or is there some C# to Delphi issue I'm not aware of?
Thanks
Comments
Post a Comment