|
| |||
| WM 5.0 InternetErrorDlg return ERROR_INVALID_HANDLE I have written a WM 5.0 CF 3.5 vb.net app that tries to pinvoke InternetErrorDlg to display a list of certificates to use for authentication to a web service. I getting the error ERROR_INVALID_HANDLE. I get this error whether set the hWnd parameter to Null, the Handle property of the WinForm, or I use GetDesktopWindow from coredll.dll to obtain the handle. My is code is below. Any help would be greatly appreciated <DllImport("WinInet.dll", _ EntryPoint:="InternetErrorDlg", _ CharSet:=CharSet.Unicode, SetLastError:=True)> _ Private Shared Function InternetErrorDlg( _ ByVal hWnd As IntPtr, _ ByRef hRequest As IntPtr, _ ByVal dwError As Int32, _ ByVal dwFlags As Int32, _ ByRef lpdwIndex As Int32) As Int32 End Function iFlags = FLAGS_ERROR_UI_FLAGS_GENERATE_DATA + FLAGS_ERROR_UI_FLAGS_CHANGE_OPTIONS lppvData = IntPtr.Zero hWnd = GetDesktopWindow() iResult = InternetErrorDlg(hWnd, m_Request, iError, iFlags, lppvData) Select Case iResult Case ERROR_SUCCESS Case ERROR_CANCELLED m_ErrorMessage = "The function was canceled by the user" Case ERROR_INTERNET_FORCE_RETRY m_ErrorMessage = "Function needs to redo its request" Case ERROR_INVALID_HANDLE m_ErrorMessage = "InternetErrorDlg: The handle to the parent window is invalid" Case Else m_ErrorMessage = "InternetErrorDlg: Error #" + iResult.ToString() End Select |
| Bookmarks |
| Thread Tools | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Re: How to return to V6 | Unhappy with V7 | Internet Explorer | 2 | 03-28-2009 02:11 PM |
| Return Specialist | TPC | Tablet PC Jobs | 0 | 09-20-2008 05:30 AM |
| Return to XP? | George W. Barrowcliff | Windows Vista | 23 | 10-02-2007 05:10 PM |
| Return to XP | DP | Windows Vista | 3 | 04-05-2007 07:45 AM |
| Return to I.E. 6? | aarennels | Windows XP | 2 | 03-23-2007 05:15 PM |
| New To Technology Questions? | Do You Need Help with Your Computer or Device? | Do You Need Help with this site? |