Click here to Skip to main content
16,005,734 members
Home / Discussions / C#
   

C#

 
GeneralRe: Is it possible to save EXE from Dynamic Compilation? Pin
BGearig16-Nov-07 8:32
BGearig16-Nov-07 8:32 
GeneralRe: Is it possible to save EXE from Dynamic Compilation? Pin
Giorgi Dalakishvili16-Nov-07 9:20
mentorGiorgi Dalakishvili16-Nov-07 9:20 
QuestionGenerate classes from mssql database Pin
[DK]KiloDunse16-Nov-07 8:04
[DK]KiloDunse16-Nov-07 8:04 
AnswerRe: Generate classes from mssql database Pin
Judah Gabriel Himango16-Nov-07 8:40
sponsorJudah Gabriel Himango16-Nov-07 8:40 
QuestionC# pointer to struct using C dll Pin
dfn16-Nov-07 8:00
dfn16-Nov-07 8:00 
AnswerRe: C# pointer to struct using C dll Pin
Judah Gabriel Himango16-Nov-07 9:05
sponsorJudah Gabriel Himango16-Nov-07 9:05 
GeneralRe: C# pointer to struct using C dll Pin
dfn16-Nov-07 9:14
dfn16-Nov-07 9:14 
QuestionHow can I fix "The Breakpoint will not currently be hit......" Pin
Khoramdin16-Nov-07 7:41
Khoramdin16-Nov-07 7:41 
Hello everyone, I am working on a Browser Helper Object (BHO) and have created a Class Library with the following code.

using System;<br />
using System.Collections.Generic;<br />
using System.Text;<br />
using SHDocVw;<br />
using mshtml;<br />
using System.IO;<br />
using Microsoft.Win32;<br />
using System.Runtime.InteropServices;<br />
<br />
namespace WebWatcher<br />
{<br />
<br />
    [ComVisible(true),<br />
    InterfaceType(ComInterfaceType.InterfaceIsIUnknown),<br />
    Guid("FC4801A3-2BA9-11CF-A229-00AA003D7352")]<br />
    public interface IObjectWithSite<br />
    {<br />
        [PreserveSig]<br />
        int SetSite([MarshalAs(UnmanagedType.IUnknown)]object site);<br />
        [PreserveSig]<br />
        int GetSite(ref Guid guid, out IntPtr ppvSite);<br />
    }<br />
<br />
    [<br />
    ComVisible(true),<br />
    Guid("8a194578-81ea-4850-9911-13ba2d71efbd"),<br />
    ClassInterface(ClassInterfaceType.None)<br />
    ]<br />
<br />
    public class BHO : IObjectWithSite<br />
    {<br />
        WebBrowser webBrowser;<br />
        HTMLDocument document;<br />
<br />
        public void OnDocumentComplete(object pDisp, ref object URL)<br />
        {<br />
            document = (HTMLDocument)webBrowser.Document;<br />
<br />
            foreach (IHTMLInputElement tempElement in document.getElementsByTagName("INPUT"))<br />
            {<br />
                System.Windows.Forms.MessageBox.Show(tempElement.name != null ? tempElement.name : "it sucks, no name, try id" + ((IHTMLElement)tempElement).id);<br />
            }<br />
        }<br />
<br />
        public void OnBeforeNavigate2(object pDisp, ref object URL, ref object Flags, ref object TargetFrameName, ref object PostData, ref object Headers, ref bool Cancel)<br />
        {<br />
            document = (HTMLDocument)webBrowser.Document;<br />
<br />
            foreach (IHTMLInputElement tempElement in document.getElementsByTagName("INPUT"))<br />
            {<br />
                if (tempElement.type.ToLower() == "password")<br />
                {<br />
                    System.Windows.Forms.MessageBox.Show(tempElement.value);<br />
                }<br />
            }<br />
        }<br />
<br />
        #region WebWatcher Internal Functions<br />
        <br />
        public int SetSite(object site)<br />
        {<br />
<br />
            if (site != null)<br />
            {<br />
                webBrowser = (WebBrowser)site;<br />
                webBrowser.DocumentComplete += new DWebBrowserEvents2_DocumentCompleteEventHandler(this.OnDocumentComplete);<br />
                webBrowser.BeforeNavigate2 += new DWebBrowserEvents2_BeforeNavigate2EventHandler(this.OnBeforeNavigate2);<br />
            }<br />
            else<br />
            {<br />
                webBrowser.DocumentComplete -= new DWebBrowserEvents2_DocumentCompleteEventHandler(this.OnDocumentComplete);<br />
                webBrowser.BeforeNavigate2 -= new DWebBrowserEvents2_BeforeNavigate2EventHandler(this.OnBeforeNavigate2);<br />
                webBrowser = null;<br />
            }<br />
<br />
            return 0;<br />
<br />
        }<br />
<br />
        public int GetSite(ref Guid guid, out IntPtr ppvSite)<br />
        {<br />
            IntPtr punk = Marshal.GetIUnknownForObject(webBrowser);<br />
            int hr = Marshal.QueryInterface(punk, ref guid, out ppvSite);<br />
            Marshal.Release(punk);<br />
<br />
            return hr;<br />
        }<br />
        <br />
        #endregion<br />
    }<br />
}<br />


When I try to debug the above code, for some reason the BreakPoint which I have got on the code changes to an empty circult with the following warning.

"The Breakpoint will not currently be hit. No symbols have been loaded for this document."

When I check the output window I get the list of DLL files saying no symbole loaded for them also. In order to keep the posting short this is a few line of the output window.

'iexplore.exe': Loaded 'C:\Program Files\Internet Explorer\iexplore.exe', No symbols loaded.
'iexplore.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded.
'iexplore.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded.
'iexplore.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded.


I have searched the Internet and saddly, have not been able to find any solution for this problem. Many people suggested many different way to fix it but it seems that they don't really know why this problem appears and how it can truly be fixed. They have rather played with the setting of thier compiler and all of the sudden things got working as you can see in posting on this site http://forums.microsoft.com/msdn/showpost.aspx?postid=348785&siteid=1&sb=0&d=1&at=7&ft=11&tf=0&pageid=2[^]

Can someone be kind enough to tell me how I can sort this out and why is it that I am unable to get this simple BHO working.

Thank you very much and have a great day.

Khoramdin
AnswerRe: How can I fix "The Breakpoint will not currently be hit......" Pin
Judah Gabriel Himango16-Nov-07 9:05
sponsorJudah Gabriel Himango16-Nov-07 9:05 
GeneralRe: How can I fix "The Breakpoint will not currently be hit......" Pin
Khoramdin16-Nov-07 11:36
Khoramdin16-Nov-07 11:36 
QuestionImmediate Window - '@err' equivalent Pin
Jeffrey Walton16-Nov-07 7:16
Jeffrey Walton16-Nov-07 7:16 
AnswerRe: Immediate Window - '@err' equivalent Pin
Judah Gabriel Himango16-Nov-07 7:36
sponsorJudah Gabriel Himango16-Nov-07 7:36 
GeneralRe: Immediate Window - '@err' equivalent Pin
Jeffrey Walton16-Nov-07 8:11
Jeffrey Walton16-Nov-07 8:11 
GeneralRe: Immediate Window - '@err' equivalent Pin
Judah Gabriel Himango16-Nov-07 8:14
sponsorJudah Gabriel Himango16-Nov-07 8:14 
QuestionWPF Question - Button Control Pin
Vidvict16-Nov-07 6:49
Vidvict16-Nov-07 6:49 
QuestionService to restart system Pin
dan!sh 16-Nov-07 6:44
professional dan!sh 16-Nov-07 6:44 
AnswerRe: Service to restart system Pin
Judah Gabriel Himango16-Nov-07 6:50
sponsorJudah Gabriel Himango16-Nov-07 6:50 
GeneralRe: Service to restart system Pin
dan!sh 16-Nov-07 6:59
professional dan!sh 16-Nov-07 6:59 
GeneralRe: Service to restart system Pin
Judah Gabriel Himango16-Nov-07 7:33
sponsorJudah Gabriel Himango16-Nov-07 7:33 
GeneralRe: Service to restart system Pin
dan!sh 16-Nov-07 7:44
professional dan!sh 16-Nov-07 7:44 
GeneralRe: Service to restart system Pin
Judah Gabriel Himango16-Nov-07 7:57
sponsorJudah Gabriel Himango16-Nov-07 7:57 
QuestionDLL Injection Pin
shakeebgenii16-Nov-07 6:42
shakeebgenii16-Nov-07 6:42 
AnswerRe: DLL Injection Pin
Judah Gabriel Himango16-Nov-07 6:47
sponsorJudah Gabriel Himango16-Nov-07 6:47 
QuestionRegular Expressions Pin
tthellebuyck16-Nov-07 5:56
tthellebuyck16-Nov-07 5:56 
AnswerRe: Regular Expressions Pin
Judah Gabriel Himango16-Nov-07 6:25
sponsorJudah Gabriel Himango16-Nov-07 6:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.