Thread: D3D Debugging not working...

  1. #1
    Not stupid, just stupider yaya's Avatar
    Join Date
    May 2007
    Location
    Earthland
    Posts
    204

    Thumbs up D3D Debugging not working...

    I've been putting this off for a while, but now I need it. Using Frank Luna's examples for the debugging, I never get anthing popping up. I have been into the Control Panel->DirectX and set it to debug version, but I still get nothing.
    But now that I think about it, sometimes I get a window that pops up that is completely blank and has the options OK and Cancel. Could this be it? I'm using everything as of Frank Luna's examples (in the way of debugging) so surely it can't be his fault (again).

    Cheers.

  2. #2
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    The DXTrace functions do not seem to work in non-Unicode projects. If you turn unicode on you will see text. I've tried to get text with the project character set set to 'wide' and 'not set' and it just does not work.

    You can look in DXErr9.h to see why this is happening. According to what I see it appears to be a bug.

  3. #3
    Not stupid, just stupider yaya's Avatar
    Join Date
    May 2007
    Location
    Earthland
    Posts
    204
    Ah! Cheers.
    But when I go to "Project->Properties->Configuration Properties->General" (is this the right place?) and I changeCharacter Set from Multi-byte to Unicode and compile, I get this error everywhere I called HR():
    error C2664: 'DXTraceW' : cannot convert parameter 4 from 'const char [34]' to 'const WCHAR *'
    Any Ideas?

    Thanks.

  4. #4
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Put an L in front of the string literal or use the TEXT() macro.

  5. #5
    Not stupid, just stupider yaya's Avatar
    Join Date
    May 2007
    Location
    Earthland
    Posts
    204
    Is there any way to call the DXTrace in unicode without putting the rest of the program in unicode? Because I will have to go through all my code and change things (which could take a while).

    Cheers.

  6. #6
    Not stupid, just stupider yaya's Avatar
    Join Date
    May 2007
    Location
    Earthland
    Posts
    204
    I figured it out. For future reference, call DXTrace like this:

    DXTraceW(__FILE__, __LINE__, hr, L#x, TRUE);

  7. #7
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Yep. That puts the L in front of the string like I mentioned.

  8. #8
    Not stupid, just stupider yaya's Avatar
    Join Date
    May 2007
    Location
    Earthland
    Posts
    204
    Ah, sorry.
    I tried TEXT() and that didn't work for some reason, but L did.
    But you taught me that you can use unicode functions in non-unicode programs, and that's what I was trying to figure out. So thanks, that'll be really useful.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. help on debugging
    By Masterx in forum C++ Programming
    Replies: 56
    Last Post: 01-30-2009, 10:09 AM
  2. Dev-C++: Problems with Breakpoint Debugging
    By Thileepan_Bala in forum C Programming
    Replies: 1
    Last Post: 01-17-2008, 10:48 AM
  3. Problem in debugging in Eclipse
    By Bargi in forum Linux Programming
    Replies: 1
    Last Post: 08-21-2007, 09:53 AM
  4. gdb no debugging symbols found
    By Laserve in forum Linux Programming
    Replies: 8
    Last Post: 09-17-2006, 08:56 AM
  5. Debugging book recommendation
    By dagans in forum Projects and Job Recruitment
    Replies: 1
    Last Post: 09-13-2005, 07:35 PM