Veröffentlicht 13. April 201213 j Hallo, ich bin mir nicht ganz sicher wie die Signatur in C# aussehen muss für folgende Cpp Funktion: #define _extern extern "C" __declspec(dllexport) _extern bool ExtractChangedRectangleExt(HBITMAP hbmp, HBITMAP hbmp1, int min, int max, ImageCompareResult &result); Die ImageCompareResult sieht wie folgt aus: struct ImageCompareResult{ public: int x; int y; HBITMAP changedArea; int success; double percent; int error; }; Müsste ich das dann in C# so machen: [StructLayout(LayoutKind.Sequential)] public struct ImageCompareResult { public int x; public int y; public IntPtr changedArea; public int success; public double percent; public int error; }; [DllImport("mydll.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] private static extern bool ExtractChangedRectangleExt(IntPtr hbmp, IntPtr hbmp1, int min, int max, ref ImageCompareResult result); lg Gateway Bearbeitet 13. April 201213 j von Gateway_man
Archiv
Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.