1155{
1157 DWORD dwNukeOnDelete, dwType, VolSerialNumber, MaxComponentLength;
1161 WCHAR szKey[150] =
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\BitBucket\\Volume\\";
1162
1163 if (wszPath[1] !=
L':')
1164 {
1165
1167 }
1168
1169
1171 StringCbCopyW(wszRootPathName,
sizeof(wszRootPathName), wszPath);
1173
1174
1176 {
1177
1179 }
1180
1182 {
1185 }
1186
1189
1191 {
1192 ERR(
"RegCreateKeyExW failed\n");
1194 }
1195
1197 {
1198
1199 dwNukeOnDelete = 0;
1201
1204 }
1205 else
1206 {
1207 dwSize =
sizeof(dwNukeOnDelete);
1210 {
1211 dwNukeOnDelete = 0;
1213 {
1214
1216 }
1217 }
1218 }
1219 BOOL bCanTrash = !dwNukeOnDelete;
1220
1222 return bCanTrash;
1223}
#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
STRSAFEAPI StringCbCopyW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
DWORD WINAPI GetLastError(void)
#define HKEY_CURRENT_USER