CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2005
    Location
    Munich, Germany
    Posts
    24

    [RESOLVED] Problem debugging into a function which takes a LPCTSTR.

    Hello,

    when I try to debug into a function which takes a LPCTSTR via pressing F11,
    I get a Windows error message with title 'Windows - No Disk' and text 'Exception Processing Message ... Parameters ...'.

    I use either MFC42d or MFC42ud under Windows XP SP2 and VS6 SP6 with the same problem.
    Sample code below with breakpoint at 'TestFct(sz)'. Then pressing F11 to step into the function causes the msgbox.

    What's going wrong here?
    Thanx in advance!

    void TestFct(LPCTSTR p_lpsz)
    {
    CString sz = p_lpsz;
    sz.Empty();
    }

    void CTestGUIDlg::OnOK()
    {
    CString sz;
    sz = "Bingo";

    TestFct(sz);

    CDialog::OnOK();
    }

  2. #2
    Join Date
    Oct 2006
    Posts
    616

    Re: Problem debugging into a function which takes a LPCTSTR.

    Well, I tried running and debugging your func with pretty much the same settings and had no problem. This leads to a conclusion that the problem is related with your workstation's settings and configuration, and not with VS.
    A quick google search yielded this link.

    Best of luck,

    Zachm

  3. #3
    Join Date
    Sep 2005
    Location
    Munich, Germany
    Posts
    24

    Re: Problem debugging into a function which takes a LPCTSTR.

    Hello Zachm,

    thank you for your tip! I spent some time to read all the threads posted and some hint that the issue may be caused by drive letters of USB devices. So I first removed all my USD disks and tried debugging the same think. The message box never appears again. So I try to re-assign the drive letters.
    In VS.NET 2003 I have a similar problem. When to step into the code via pressing F11 a message 'Find source: afxtls_.h' appears with an origianl location of 'f:\vs70builds\6030\vc\mfcatl\ship\atlmfc\include\afxtls_.h' but this file path never exists on my pc. Very strange, but thank you.

  4. #4
    Join Date
    Sep 2005
    Location
    Munich, Germany
    Posts
    24

    Re: Problem debugging into a function which takes a LPCTSTR.

    Hello again,

    now I know. It's the Removable Disk from my HP Officejet (for read smart cards) which is displayed in Window Explorer although no smart card is physically inserted. Thanx for Help!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured