Finding the desktop's directory.

This is a discussion on Finding the desktop's directory. within the Windows Programming forums, part of the Platform Specific Boards category; How do I find the desktop's directory?...

  1. #1
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342

    Post Finding the desktop's directory.

    How do I find the desktop's directory?

  2. #2
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    SHGetFolderLocation look it up
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  3. #3
    Registered User
    Join Date
    Aug 2005
    Posts
    8
    Yes, but you also have to translate the ID.
    Any one got any tips for that?

  4. #4
    Registered User
    Join Date
    Sep 2004
    Posts
    44

  5. #5
    Registered User
    Join Date
    Aug 2005
    Posts
    8
    lol yeah I got it thanks tho,
    Code:
    LPITEMIDLIST dd = NULL;
    SHGetSpecialFolderLocation(
    NULL,
    CSIDL_DESKTOPDIRECTORY,
    &dd);
    char szpathint[_MAX_PATH];
    SHGetPathFromIDList(dd,szpathint);

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Couple errors please help :-D
    By JJJIrish05 in forum C Programming
    Replies: 9
    Last Post: 03-06-2008, 02:54 AM
  2. Finding files in a directory
    By smarta_982002 in forum C Programming
    Replies: 1
    Last Post: 01-25-2008, 10:10 AM
  3. Finding out the name of a file, and changing directory
    By nindoja in forum C Programming
    Replies: 17
    Last Post: 06-22-2004, 10:49 PM
  4. Finding a directory, and printing whats in it
    By booyah in forum C Programming
    Replies: 4
    Last Post: 11-12-2003, 11:52 AM
  5. Finding out if its a directory or not
    By mikie7boy in forum C++ Programming
    Replies: 1
    Last Post: 08-29-2003, 06:06 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21