public int TranslateUrl(int dwTranslate, string strURLIn, out IntPtr pstrURLOut) { pstrURLOut = IntPtr.Zero; BrowserTranslateUrlEventArgs e = new BrowserTranslateUrlEventArgs(strURLIn); try { hostControl.RaiseOnTranslateUrl(e); // this can maybe also cause exceptions: see http://support.microsoft.com/?kbid=327106 pstrURLOut = Marshal.StringToCoTaskMemUni(e.TranslatedUrl); } catch {} return(Interop.S_OK); }