1150{
1152 DWORD dwNukeOnDelete, dwType, VolSerialNumber, MaxComponentLength;
1156 WCHAR szKey[150] =
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\BitBucket\\Volume\\";
1157
1158 if (wszPath[1] !=
L':')
1159 {
1160
1162 }
1163
1164
1166 StringCbCopyW(wszRootPathName,
sizeof(wszRootPathName), wszPath);
1168
1169
1171 {
1172
1174 }
1175
1177 {
1180 }
1181
1184
1186 {
1187 ERR(
"RegCreateKeyExW failed\n");
1189 }
1190
1192 {
1193
1194 dwNukeOnDelete = 0;
1196
1199 }
1200 else
1201 {
1202 dwSize =
sizeof(dwNukeOnDelete);
1205 {
1206 dwNukeOnDelete = 0;
1208 {
1209
1211 }
1212 }
1213 }
1214 BOOL bCanTrash = !dwNukeOnDelete;
1215
1217 return bCanTrash;
1218}
#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 _swprintf(buf, format,...)
#define REG_CREATED_NEW_KEY
STRSAFEAPI StringCbCopyW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
DWORD WINAPI GetLastError(void)
#define HKEY_CURRENT_USER