29#define NO_SHLWAPI_STREAM
31#include "wine/unicode.h"
37static const WCHAR lpszContentTypeW[] = {
'C',
'o',
'n',
't',
'e',
'n',
't',
' ',
'T',
'y',
'p',
'e',
'\0'};
41 'D',
'a',
't',
'a',
'b',
'a',
's',
'e',
'\\',
'C',
'o',
'n',
't',
'e',
'n',
't',
42 ' ',
'T',
'y',
'p',
'e',
'\\', 0 };
166 DWORD dwKeyCount = 0, dwValueCount = 0, dwRet;
178 if(!dwRet && !dwKeyCount && !dwValueCount)
195 DWORD dwKeyCount = 0, dwValueCount = 0, dwRet;
207 if(!dwRet && !dwKeyCount && !dwValueCount)
272 WARN(
"Invalid lpszValue would crash under Win32!\n");
289 WARN(
"Invalid lpszValue would crash under Win32!\n");
347 size_t dwStrLen =
strlen(lpszType);
405 DWORD dwlen = iLen - 1, dwType;
408 if (iLen > 0 && lpExt)
411 if (lpszType && lpExt && iLen > 2 &&
433 DWORD dwlen = iLen - 1, dwType;
436 if (iLen > 0 && lpExt)
439 if (lpszType && lpExt && iLen > 2 &&
476 dwLen =
strlen(lpszExt) + 1;
599 static const WCHAR szClassIdKey[] = {
'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
600 'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
'W',
'i',
'n',
'd',
'o',
'w',
's',
'\\',
601 'C',
'u',
'r',
'r',
'e',
'n',
't',
'V',
'e',
'r',
's',
'i',
'o',
'n',
'\\',
602 'E',
'x',
'p',
'l',
'o',
'r',
'e',
'r',
'\\',
'C',
'L',
'S',
'I',
'D',
'\\' };
613 wcscpy(szKey, bUseHKCU ?
L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\CLSID\\" :
L"CLSID\\");
623 memcpy(szKey, szClassIdKey,
sizeof(szClassIdKey));
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
void shell(int argc, const char *argv[])
#define RegCloseKey(hKey)
#define ERROR_INVALID_FUNCTION
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegOpenKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD ulOptions, _In_ REGSAM samDesired, _Out_ PHKEY phkResult)
LONG WINAPI RegQueryInfoKeyA(HKEY hKey, LPSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime)
LONG WINAPI RegDeleteKeyW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey)
LONG WINAPI RegQueryInfoKeyW(HKEY hKey, LPWSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime)
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegDeleteKeyA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey)
static WCHAR unknown[MAX_STRING_RESOURCE_LEN]
#define MultiByteToWideChar
BOOL WINAPI PathUnExpandEnvStringsW(const WCHAR *path, WCHAR *buffer, UINT buf_len)
BOOL WINAPI PathUnExpandEnvStringsA(const char *path, char *buffer, UINT buf_len)
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
_ACRTIMP size_t __cdecl strlen(const char *)
DWORD WINAPI SHGetValueW(HKEY hkey, const WCHAR *subkey, const WCHAR *value, DWORD *type, void *data, DWORD *data_len)
DWORD WINAPI SHSetValueW(HKEY hkey, const WCHAR *subkey, const WCHAR *value, DWORD type, const void *data, DWORD data_len)
DWORD WINAPI SHDeleteValueA(HKEY hkey, const char *subkey, const char *value)
DWORD WINAPI SHDeleteValueW(HKEY hkey, const WCHAR *subkey, const WCHAR *value)
DWORD WINAPI SHRegSetPathW(HKEY hkey, const WCHAR *subkey, const WCHAR *value, const WCHAR *path, DWORD flags)
DWORD WINAPI SHGetValueA(HKEY hkey, const char *subkey, const char *value, DWORD *type, void *data, DWORD *data_len)
DWORD WINAPI SHSetValueA(HKEY hkey, const char *subkey, const char *value, DWORD type, const void *data, DWORD data_len)
DWORD WINAPI SHRegSetPathA(HKEY hkey, const char *subkey, const char *value, const char *path, DWORD flags)
HRESULT WINAPI SHRegisterValidateTemplate(LPCWSTR filename, BOOL unknown)
BOOL WINAPI UnregisterMIMETypeForExtensionW(LPCWSTR lpszSubKey)
static const char lpszContentTypeA[]
DWORD WINAPI SHGetValueGoodBootA(HKEY hkey, LPCSTR pSubKey, LPCSTR pValue, LPDWORD pwType, LPVOID pvData, LPDWORD pbData)
BOOL WINAPI UnregisterMIMETypeForExtensionA(LPCSTR lpszSubKey)
BOOL WINAPI RegisterMIMETypeForExtensionA(LPCSTR lpszSubKey, LPCSTR lpszValue)
DWORD WINAPI SHDeleteOrphanKeyW(HKEY hKey, LPCWSTR lpszSubKey)
BOOL WINAPI GetMIMETypeSubKeyW(LPCWSTR lpszType, LPWSTR lpszBuffer, DWORD dwLen)
static const DWORD dwLenMimeDbContent
HRESULT WINAPI SHRegGetCLSIDKeyW(REFGUID, LPCWSTR, BOOL, BOOL, PHKEY)
BOOL WINAPI RegisterExtensionForMIMETypeW(LPCWSTR lpszExt, LPCWSTR lpszType)
HRESULT WINAPI SHRegGetCLSIDKeyA(REFGUID guid, LPCSTR lpszValue, BOOL bUseHKCU, BOOL bCreate, PHKEY phKey)
BOOL WINAPI RegisterExtensionForMIMETypeA(LPCSTR lpszExt, LPCSTR lpszType)
BOOL WINAPI UnregisterExtensionForMIMETypeA(LPCSTR lpszType)
static const char szMimeDbContentA[]
BOOL WINAPI GetMIMETypeSubKeyA(LPCSTR lpszType, LPSTR lpszBuffer, DWORD dwLen)
static const WCHAR szMimeDbContentW[]
BOOL WINAPI MIME_GetExtensionW(LPCWSTR lpszType, LPWSTR lpExt, INT iLen)
DWORD WINAPI SHDeleteOrphanKeyA(HKEY hKey, LPCSTR lpszSubKey)
BOOL WINAPI MIME_GetExtensionA(LPCSTR lpszType, LPSTR lpExt, INT iLen)
static const char szExtensionA[]
DWORD WINAPI SHGetValueGoodBootW(HKEY hkey, LPCWSTR pSubKey, LPCWSTR pValue, LPDWORD pwType, LPVOID pvData, LPDWORD pbData)
INT WINAPI SHStringFromGUIDW(REFGUID, LPWSTR, INT)
static const WCHAR szExtensionW[]
BOOL WINAPI UnregisterExtensionForMIMETypeW(LPCWSTR lpszType)
static const WCHAR lpszContentTypeW[]
BOOL WINAPI RegisterMIMETypeForExtensionW(LPCWSTR lpszSubKey, LPCWSTR lpszValue)
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
int WINAPI lstrlenA(LPCSTR lpString)
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
_In_ LPWSTR _In_ DWORD _In_ LPCVOID pvData
#define UNREFERENCED_PARAMETER(P)
_In_ int _In_ BOOL bCreate
static HRESULT HRESULT_FROM_WIN32(unsigned int x)
#define HKEY_CURRENT_USER
#define HKEY_CLASSES_ROOT
int WINAPI GetSystemMetrics(_In_ int)