![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | Need help with a System.Windows.Media and Windows Color System pro The stacktrace says it all. System.Runtime.InteropServices.COMException (0x80070000): The operation completed successfully. (Exception from HRESULT: 0x80070000) at MS.Internal.HRESULT.Check(Int32 hr) at System.Windows.Media.SafeProfileHandle.ReleaseHandle() at System.Runtime.InteropServices.SafeHandle.InternalFinalize() at System.Runtime.InteropServices.SafeHandle.Dispose(Boolean disposing) at System.Runtime.InteropServices.SafeHandle.Finalize() My guess on why we get "The operation completed successfully" is SetLastError wasn't set on the DllImport for CloseColorProfile. So by the time Marshal.GetHRForLastWin32Error() is called the error has been cleared by some marshalling code. We had temporarily got around this by calling GC.WaitForPendingFinalizers() but then later found out that is a big no no in the WPF as some finalizers call Dispatcher.Invoke which at that point would deadlock the application. We are thinking about just using BitmapCreateOptions.IgnoreColorProfile since without an error message this is hard to figure out. |
My System Specs![]() |
| Thread Tools | |
| |