1153{
1155 DWORD dwNukeOnDelete, dwType, VolSerialNumber, MaxComponentLength;
1159 WCHAR szKey[150] =
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\BitBucket\\Volume\\";
1160
1161 if (wszPath[1] !=
L':')
1162 {
1163
1165 }
1166
1167
1169 StringCbCopyW(wszRootPathName,
sizeof(wszRootPathName), wszPath);
1171
1172
1174 {
1175
1177 }
1178
1180 {
1183 }
1184
1187
1189 {
1190 ERR(
"RegCreateKeyExW failed\n");
1192 }
1193
1195 {
1196
1197 dwNukeOnDelete = 0;
1199
1202 }
1203 else
1204 {
1205 dwSize =
sizeof(dwNukeOnDelete);
1208 {
1209 dwNukeOnDelete = 0;
1211 {
1212
1214 }
1215 }
1216 }
1217 BOOL bCanTrash = !dwNukeOnDelete;
1218
1220 return bCanTrash;
1221}
#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(WCHAR *path)
#define ERROR_FILE_NOT_FOUND
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
#define REG_CREATED_NEW_KEY
STRSAFEAPI StringCbCopyW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
DWORD WINAPI GetLastError(void)
#define HKEY_CURRENT_USER