Anonymous - 2012-10-02

Hi, I am getting the following error:
"A call to PInvoke function 'CsXmpToolkit!SE.Halligang.CsXmpToolkit.XmpFiles::XMPFiles_OpenFile' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature."

which is being thrown at this line :

result = XMPFiles_OpenFile(xmpFilesHandle, pFilePath, fileFormat, openFlags); in the OpenFile method.

This is the code I am passing:

                XmpCore.Initialize();
                XmpFiles xmpF = new XmpFiles();
                XmpCore xmpC = new XmpCore();
                bool result = xmpF.OpenFile(dlg.FileName, FileFormat.Unknown, OpenFlags.OpenOnlyXmp);

Could you kindly enlighten me as to what is the problem?

Many thanks