Click here to Skip to main content
16,004,806 members

Comments by ms0482828 (Top 3 by date)

ms0482828 3-Jun-21 9:15am View    
Understand, thank you very much :D
I think there is only this way, the error message makes me tired
ms0482828 2-Jun-21 22:50pm View    
Thanks for your help, KarstenK. I have put the data in the same folder, and create an empty project to test. I think there is no have mixed x86 and x64 files in the empty project. But the Error still exists.
ms0482828 2-Jun-21 22:42pm View    
Thanks for your help, Richard McCutchan. But the project still doesn't work
I have tried to change the path and use Marshal.StringToBSTR(String) Method like this:

[DllImport("D:\\image_16bit_code\\MoveFullImageByFirstImage.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr Open16BitGrayImage(IntPtr imgFile);

string imgUrl = "Image_Mapping/MRI-PDI_Axial-Z/MRI-PDI_Axial-Z_0110.png";
IntPtr BSTR_imgUrlt = Marshal.StringToBSTR(imgUrl);

Am I using it incorrectly? Error still exists.
char * whether the return should not be used IntPtr?