Authors: Francis Beaudet <francis@macadamian.com>, Sylvain St-Germain <sylvain@macada...
[wine] / dlls / shell32 / classes.c
1 /*
2  *      file type mapping 
3  *      (HKEY_CLASSES_ROOT - Stuff)
4  *
5  *
6  */
7 #include <stdlib.h>
8 #include <string.h>
9 #include "debug.h"
10 #include "shlobj.h"
11 #include "shell.h"
12 #include "winerror.h"
13 #include "commctrl.h"
14
15 #include "shell32_main.h"
16
17 BOOL32 WINAPI HCR_MapTypeToValue ( LPSTR szExtension, LPSTR szFileType, DWORD len)
18 {       HKEY    hkey;
19
20         TRACE(shell, "%s %p\n",szExtension, szFileType );
21         if (RegOpenKeyEx32A(HKEY_CLASSES_ROOT,szExtension,0,0x02000000,&hkey))
22         { return FALSE;
23         }
24
25         if (RegQueryValue32A(hkey,NULL,szFileType,&len))
26         { RegCloseKey(hkey);
27           return FALSE;
28         }       
29
30         RegCloseKey(hkey);
31
32         TRACE(shell, "-- %s\n", szFileType );
33
34         return TRUE;
35 }
36