05-06-2016 06:15 AM
We are using the ECW SDK to display arial photos behind destribution networks in a C# WPF desktop application.
It works fine in the 32 bit version but in the 64 Bit version an assertion window pops up when calling NCSSetFileView and the following call to NCSCloseFileViewEx never returns.
I created a stripped down console application and made a screenshot of the assertion.
Solved! Go to Solution.
05-31-2016 07:36 AM
I figured it out eventually.
The signature of the NCSOpenFileViewW call must be:
NCSError NCSOpenFileViewW(string fileName, out IntPtr pNCSFileView, [MarshalAs(UnmanagedType.FunctionPtr)] RefreshCallback callBack);
delegate int RefreshCallback(IntPtr ptr);
If you don't use the callback it can be simply:
NCSError NCSOpenFileViewW(string fileName, out IntPtr pNCSFileView, IntPtr callBack);
and you can pass IntPtr.Zero.
Apparently using object callback has some side effects.