Okay
Tak for det men jeg har også fundet en anden måde hvor man bruger databasen.
HKEY keyHandle;
char rgValue [1024];
char fnlRes [1024];
DWORD size1;
DWORD Type;
if( RegOpenKeyEx( HKEY_CURRENT_USER,
"Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Explorer\\\\Shell Folders",
0,
KEY_QUERY_VALUE,
&keyHandle) == ERROR_SUCCESS)
{
size1=1023;
RegQueryValueEx( keyHandle, "Desktop", NULL, &Type, (LPBYTE)rgValue,&size1);
sprintf(fnlRes,"%s",rgValue);
}
RegCloseKey(keyHandle);