I have a c++ function like,
extern "C" __declspec ( dllexport ) DWORD GetSizeAfterMergeISOTemplates(BYTE* StoredISOTemplate, BYTE* CapturedISOTemplate)
{
}
I would like to return the size of array after merging the two byte arrays in the argument. The c++ part is working and its returning the correct value.
But my problem is I need to get the value in DWORD in c#. The function is,
[DllImport("XFPLibISO")]
extern static UInt32 GetSizeAfterMergeISOTemplates(Byte[] StoredISOTemplate, Byte[] CapturedISOTemplate);
But its returning the wrong value. Its 3477800 something. But actual value is around 964.
Can anybody suggest how can I do this?
C++ function you provided means CallingConvention.Cdecl. You must specify it, when applying
DllImportAttribute: