Hi people,
I have a question for my start menu generator, that is almost finished now...
How do I find the path of the wine start menu? (for me it's ~/c/windows/Start Menu, but for someone else it does not have to be like that...)
Any help here?
Grtz, Robert
Hello Robert,
I have a question for my start menu generator, that is almost finished now...
How do I find the path of the wine start menu? (for me it's ~/c/windows/Start Menu, but for someone else it does not have to be like that...)
Any help here?
Ypu should use the function SHGetSpecialFolderPath():
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/pla...
Using CSIDL_STARTMENU and CSIDL_COMMON_STARTMENU you get the root path of the user's respective the common start menu:
#include <stdio.h> #include <windows.h> #include <shlobj.h>
void process_startmenu(LPCTSTR path) {
// process start menu entries
}
int main(int argc, char* argv[]) { TCHAR path[1024];
if (SHGetSpecialFolderPath(0, path, CSIDL_STARTMENU, FALSE)) { printf("user start menu root: %s\n", path);
process_startmenu(path); }
if (SHGetSpecialFolderPath(0, path, CSIDL_COMMON_STARTMENU, FALSE)) { printf("common start menu root: %s\n", path);
process_startmenu(path); }
return 0; }