938{
940 DWORD dwNukeOnDelete, dwType, VolSerialNumber, MaxComponentLength;
944 WCHAR szKey[150] =
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\BitBucket\\Volume\\";
945
946 if (wszPath[1] !=
L':')
947 {
948
950 }
951
952
954 StringCbCopyW(wszRootPathName,
sizeof(wszRootPathName), wszPath);
956
957
959 {
960
962 }
963
965 {
968 }
969
972
974 {
975 ERR(
"RegCreateKeyExW failed\n");
977 }
978
980 {
981
982 dwNukeOnDelete = 0;
984
989 }
990 else
991 {
992 dwSize =
sizeof(dwNukeOnDelete);
995 {
997 {
998
999 dwNukeOnDelete = 0;
1001 }
1004 }
1005 else if (dwNukeOnDelete)
1006 {
1007
1010 }
1011
1012
1013
1016 }
1017}
#define RegCloseKey(hKey)
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
UINT WINAPI GetDriveTypeW(IN LPCWSTR lpRootPathName)
BOOL WINAPI GetVolumeInformationW(IN LPCWSTR lpRootPathName, IN LPWSTR lpVolumeNameBuffer, IN DWORD nVolumeNameSize, OUT LPDWORD lpVolumeSerialNumber OPTIONAL, OUT LPDWORD lpMaximumComponentLength OPTIONAL, OUT LPDWORD lpFileSystemFlags OPTIONAL, OUT LPWSTR lpFileSystemNameBuffer OPTIONAL, IN DWORD nFileSystemNameSize)
BOOL WINAPI PathStripToRootW(LPWSTR lpszPath)
#define ERROR_FILE_NOT_FOUND
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
#define REG_CREATED_NEW_KEY
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
STRSAFEAPI StringCbCopyW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
DWORD WINAPI GetLastError(void)
#define HKEY_CURRENT_USER