mirror of
https://github.com/reactos/reactos.git
synced 2025-06-01 07:28:19 +00:00
Sync with trunk r63935.
svn path=/branches/shell-experiments/; revision=63939
This commit is contained in:
commit
4c1828ea4b
87 changed files with 2266 additions and 1374 deletions
|
@ -41,12 +41,10 @@
|
|||
#define _CRT_SECURE_NO_DEPRECATE /* all deprecated unsafe string functions */
|
||||
#endif
|
||||
|
||||
static const LPWSTR EVENT_SOURCE_APPLICATION = L"Application";
|
||||
static const LPWSTR EVENT_SOURCE_SECURITY = L"Security";
|
||||
static const LPWSTR EVENT_SOURCE_SYSTEM = L"System";
|
||||
static const WCHAR szWindowClass[] = L"EVENTVWR"; /* the main window class name*/
|
||||
static const WCHAR EVENTLOG_BASE_KEY[] = L"SYSTEM\\CurrentControlSet\\Services\\EventLog\\";
|
||||
|
||||
//MessageFile message buffer size
|
||||
// MessageFile message buffer size
|
||||
#define EVENT_MESSAGE_EVENTTEXT_BUFFER 1024*10
|
||||
#define EVENT_MESSAGE_FILE_BUFFER 1024*10
|
||||
#define EVENT_DLL_SEPARATOR L";"
|
||||
|
@ -73,6 +71,9 @@ OPENFILENAMEW sfn;
|
|||
LPWSTR lpSourceLogName = NULL;
|
||||
LPWSTR lpComputerName = NULL;
|
||||
|
||||
DWORD dwNumLogs = 0;
|
||||
WCHAR **LogNames;
|
||||
|
||||
/* Forward declarations of functions included in this code module: */
|
||||
ATOM MyRegisterClass(HINSTANCE hInstance);
|
||||
BOOL InitInstance(HINSTANCE, int);
|
||||
|
@ -838,19 +839,6 @@ Refresh(VOID)
|
|||
}
|
||||
|
||||
|
||||
//
|
||||
// FUNCTION: MyRegisterClass()
|
||||
//
|
||||
// PURPOSE: Registers the window class.
|
||||
//
|
||||
// COMMENTS:
|
||||
//
|
||||
// This function and its usage are only necessary if you want this code
|
||||
// to be compatible with Win32 systems prior to the 'RegisterClassEx'
|
||||
// function that was added to Windows 95. It is important to call this function
|
||||
// so that the application will get 'well formed' small icons associated
|
||||
// with it.
|
||||
//
|
||||
ATOM
|
||||
MyRegisterClass(HINSTANCE hInstance)
|
||||
{
|
||||
|
@ -874,16 +862,188 @@ MyRegisterClass(HINSTANCE hInstance)
|
|||
}
|
||||
|
||||
|
||||
//
|
||||
// FUNCTION: InitInstance(HINSTANCE, int)
|
||||
//
|
||||
// PURPOSE: Saves instance handle and creates main window
|
||||
//
|
||||
// COMMENTS:
|
||||
//
|
||||
// In this function, we save the instance handle in a global variable and
|
||||
// create and display the main program window.
|
||||
//
|
||||
VOID
|
||||
GetDisplayNameFile(LPCWSTR lpLogName, LPWSTR lpModuleName)
|
||||
{
|
||||
HKEY hKey;
|
||||
WCHAR *KeyPath;
|
||||
WCHAR szModuleName[MAX_PATH];
|
||||
DWORD dwData;
|
||||
|
||||
|
||||
KeyPath = (WCHAR*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (wcslen(EVENTLOG_BASE_KEY) + wcslen(lpLogName) + 1) * sizeof(WCHAR));
|
||||
if (!KeyPath)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
wcscpy(KeyPath, EVENTLOG_BASE_KEY);
|
||||
wcscat(KeyPath, lpLogName);
|
||||
|
||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, KeyPath, 0, KEY_READ, &hKey) != ERROR_SUCCESS)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, KeyPath);
|
||||
return;
|
||||
}
|
||||
|
||||
dwData = MAX_PATH;
|
||||
|
||||
if (RegQueryValueExW(hKey, L"DisplayNameFile", NULL, NULL, (LPBYTE)szModuleName, &dwData) == ERROR_SUCCESS)
|
||||
{
|
||||
ExpandEnvironmentStringsW(szModuleName, lpModuleName, MAX_PATH);
|
||||
}
|
||||
|
||||
RegCloseKey(hKey);
|
||||
HeapFree(GetProcessHeap(), 0, KeyPath);
|
||||
}
|
||||
|
||||
|
||||
DWORD
|
||||
GetDisplayNameID(LPCWSTR lpLogName)
|
||||
{
|
||||
HKEY hKey;
|
||||
WCHAR *KeyPath;
|
||||
DWORD dwMessageID = 0;
|
||||
DWORD dwData;
|
||||
|
||||
KeyPath = (WCHAR*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (wcslen(EVENTLOG_BASE_KEY) + wcslen(lpLogName) + 1) * sizeof(WCHAR));
|
||||
if (!KeyPath)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
wcscpy(KeyPath, EVENTLOG_BASE_KEY);
|
||||
wcscat(KeyPath, lpLogName);
|
||||
|
||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, KeyPath, 0, KEY_READ, &hKey) != ERROR_SUCCESS)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, KeyPath);
|
||||
return 0;
|
||||
}
|
||||
|
||||
dwData = sizeof(dwMessageID);
|
||||
|
||||
RegQueryValueExW(hKey, L"DisplayNameID", NULL, NULL, (LPBYTE)&dwMessageID, &dwData);
|
||||
|
||||
RegCloseKey(hKey);
|
||||
HeapFree(GetProcessHeap(), 0, KeyPath);
|
||||
|
||||
return dwMessageID;
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
BuildLogList(void)
|
||||
{
|
||||
HKEY hKey;
|
||||
DWORD lpcName;
|
||||
DWORD dwIndex;
|
||||
DWORD dwMessageID;
|
||||
DWORD dwMaxKeyLength;
|
||||
WCHAR szModuleName[MAX_PATH];
|
||||
LPWSTR lpDisplayName;
|
||||
HANDLE hLibrary = NULL;
|
||||
|
||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, EVENTLOG_BASE_KEY, 0, KEY_READ, &hKey) != ERROR_SUCCESS)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (RegQueryInfoKeyW(hKey, NULL, NULL, NULL, &dwNumLogs, &dwMaxKeyLength, NULL, NULL, NULL, NULL, NULL, NULL) != ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(hKey);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!dwNumLogs)
|
||||
{
|
||||
RegCloseKey(hKey);
|
||||
return;
|
||||
}
|
||||
|
||||
LogNames = (WCHAR**)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (dwNumLogs + 1) * sizeof(WCHAR*));
|
||||
|
||||
if (!LogNames)
|
||||
{
|
||||
RegCloseKey(hKey);
|
||||
return;
|
||||
}
|
||||
|
||||
for (dwIndex = 0; dwIndex < dwNumLogs; dwIndex++)
|
||||
{
|
||||
LogNames[dwIndex] = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, ((dwMaxKeyLength + 1) * sizeof(WCHAR)));
|
||||
|
||||
if (LogNames[dwIndex] != NULL)
|
||||
{
|
||||
lpcName = dwMaxKeyLength + 1;
|
||||
|
||||
if (RegEnumKeyExW(hKey, dwIndex, LogNames[dwIndex], &lpcName, NULL, NULL, NULL, NULL) == ERROR_SUCCESS)
|
||||
{
|
||||
lpDisplayName = NULL;
|
||||
|
||||
ZeroMemory(szModuleName, sizeof(szModuleName));
|
||||
GetDisplayNameFile(LogNames[dwIndex], szModuleName);
|
||||
dwMessageID = GetDisplayNameID(LogNames[dwIndex]);
|
||||
|
||||
hLibrary = LoadLibraryExW(szModuleName, NULL, DONT_RESOLVE_DLL_REFERENCES | LOAD_LIBRARY_AS_DATAFILE);
|
||||
if (hLibrary != NULL)
|
||||
{
|
||||
FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_HMODULE, hLibrary, dwMessageID, 0, (LPWSTR)&lpDisplayName, 0, NULL);
|
||||
FreeLibrary(hLibrary);
|
||||
}
|
||||
|
||||
if (lpDisplayName)
|
||||
{
|
||||
InsertMenuW(hMainMenu, ID_SAVE_PROTOCOL, MF_BYCOMMAND | MF_STRING, ID_FIRST_LOG + dwIndex, lpDisplayName);
|
||||
}
|
||||
else
|
||||
{
|
||||
InsertMenuW(hMainMenu, ID_SAVE_PROTOCOL, MF_BYCOMMAND | MF_STRING, ID_FIRST_LOG + dwIndex, LogNames[dwIndex]);
|
||||
}
|
||||
|
||||
LocalFree(lpDisplayName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
InsertMenuW(hMainMenu, ID_SAVE_PROTOCOL, MF_BYCOMMAND | MF_SEPARATOR, ID_FIRST_LOG + dwIndex + 1, NULL);
|
||||
|
||||
RegCloseKey(hKey);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
FreeLogList(void)
|
||||
{
|
||||
DWORD dwIndex;
|
||||
|
||||
if (!LogNames)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (dwIndex = 0; dwIndex < dwNumLogs; dwIndex++)
|
||||
{
|
||||
if (LogNames[dwIndex])
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, LogNames[dwIndex]);
|
||||
}
|
||||
|
||||
DeleteMenu(hMainMenu, ID_FIRST_LOG + dwIndex, MF_BYCOMMAND);
|
||||
}
|
||||
|
||||
DeleteMenu(hMainMenu, ID_FIRST_LOG + dwIndex + 1, MF_BYCOMMAND);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, LogNames);
|
||||
|
||||
dwNumLogs = 0;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
BOOL
|
||||
InitInstance(HINSTANCE hInstance,
|
||||
int nCmdShow)
|
||||
|
@ -1042,23 +1202,16 @@ InitInstance(HINSTANCE hInstance,
|
|||
ShowWindow(hwndMainWindow, nCmdShow);
|
||||
UpdateWindow(hwndMainWindow);
|
||||
|
||||
QueryEventMessages(lpComputerName, // Use the local computer.
|
||||
EVENT_SOURCE_APPLICATION); // The event log category
|
||||
BuildLogList();
|
||||
|
||||
QueryEventMessages(lpComputerName, LogNames[0]);
|
||||
|
||||
CheckMenuRadioItem(GetMenu(hwndMainWindow), ID_FIRST_LOG, ID_FIRST_LOG + dwNumLogs, ID_FIRST_LOG, MF_BYCOMMAND);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// FUNCTION: WndProc(HWND, UINT, WPARAM, LPARAM)
|
||||
//
|
||||
// PURPOSE: Processes messages for the main window.
|
||||
//
|
||||
// WM_COMMAND - process the application menu
|
||||
// WM_PAINT - Paint the main window
|
||||
// WM_DESTROY - post a quit message and return
|
||||
//
|
||||
//
|
||||
LRESULT CALLBACK
|
||||
WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
|
@ -1069,11 +1222,6 @@ WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
{
|
||||
case WM_CREATE:
|
||||
hMainMenu = GetMenu(hWnd);
|
||||
CheckMenuRadioItem(GetMenu(hWnd),
|
||||
ID_LOG_APPLICATION,
|
||||
ID_LOG_SYSTEM,
|
||||
ID_LOG_APPLICATION,
|
||||
MF_BYCOMMAND);
|
||||
break;
|
||||
|
||||
case WM_NOTIFY:
|
||||
|
@ -1099,44 +1247,21 @@ WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
|
||||
case WM_COMMAND:
|
||||
// Parse the menu selections:
|
||||
|
||||
if ((LOWORD(wParam) >= ID_FIRST_LOG) && (LOWORD(wParam) <= ID_FIRST_LOG + dwNumLogs))
|
||||
{
|
||||
if (LogNames[LOWORD(wParam) - ID_FIRST_LOG])
|
||||
{
|
||||
if (QueryEventMessages(lpComputerName, LogNames[LOWORD(wParam) - ID_FIRST_LOG]))
|
||||
{
|
||||
CheckMenuRadioItem(GetMenu(hWnd), ID_FIRST_LOG, ID_FIRST_LOG + dwNumLogs, LOWORD(wParam), MF_BYCOMMAND);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
switch (LOWORD(wParam))
|
||||
{
|
||||
case ID_LOG_APPLICATION:
|
||||
if (QueryEventMessages(lpComputerName, // Use the local computer.
|
||||
EVENT_SOURCE_APPLICATION)) // The event log category
|
||||
{
|
||||
CheckMenuRadioItem(GetMenu(hWnd),
|
||||
ID_LOG_APPLICATION,
|
||||
ID_LOG_SYSTEM,
|
||||
ID_LOG_APPLICATION,
|
||||
MF_BYCOMMAND);
|
||||
}
|
||||
break;
|
||||
|
||||
case ID_LOG_SECURITY:
|
||||
if (QueryEventMessages(lpComputerName, // Use the local computer.
|
||||
EVENT_SOURCE_SECURITY)) // The event log category
|
||||
{
|
||||
CheckMenuRadioItem(GetMenu(hWnd),
|
||||
ID_LOG_APPLICATION,
|
||||
ID_LOG_SYSTEM,
|
||||
ID_LOG_SECURITY,
|
||||
MF_BYCOMMAND);
|
||||
}
|
||||
break;
|
||||
|
||||
case ID_LOG_SYSTEM:
|
||||
if (QueryEventMessages(lpComputerName, // Use the local computer.
|
||||
EVENT_SOURCE_SYSTEM)) // The event log category
|
||||
{
|
||||
CheckMenuRadioItem(GetMenu(hWnd),
|
||||
ID_LOG_APPLICATION,
|
||||
ID_LOG_SYSTEM,
|
||||
ID_LOG_SYSTEM,
|
||||
MF_BYCOMMAND);
|
||||
}
|
||||
break;
|
||||
|
||||
case ID_SAVE_PROTOCOL:
|
||||
SaveProtocol();
|
||||
break;
|
||||
|
@ -1191,6 +1316,7 @@ WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
break;
|
||||
case WM_DESTROY:
|
||||
FreeRecords();
|
||||
FreeLogList();
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
|
||||
|
|
|
@ -4,10 +4,6 @@ IDC_EVENTVWR MENU
|
|||
BEGIN
|
||||
POPUP "&Дневник"
|
||||
BEGIN
|
||||
MENUITEM "&Приложение", ID_LOG_APPLICATION
|
||||
MENUITEM "&Сигурност", ID_LOG_SECURITY
|
||||
MENUITEM "&Уредба", ID_LOG_SYSTEM
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
|
||||
|
|
|
@ -4,10 +4,6 @@ IDC_EVENTVWR MENU
|
|||
BEGIN
|
||||
POPUP "&Protokol"
|
||||
BEGIN
|
||||
MENUITEM "&Aplikace", ID_LOG_APPLICATION
|
||||
MENUITEM "&Zabezpečení", ID_LOG_SECURITY
|
||||
MENUITEM "&Systém", ID_LOG_SYSTEM
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Uložit &Protokol...", ID_SAVE_PROTOCOL, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Odstranit události", ID_CLEAR_EVENTS, GRAYED
|
||||
|
|
|
@ -6,10 +6,6 @@ IDC_EVENTVWR MENU
|
|||
BEGIN
|
||||
POPUP "&Protokoll"
|
||||
BEGIN
|
||||
MENUITEM "&Anwendung", ID_LOG_APPLICATION
|
||||
MENUITEM "&Sicherheit", ID_LOG_SECURITY
|
||||
MENUITEM "&System", ID_LOG_SYSTEM
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Protokoll s&peichern...", ID_SAVE_PROTOCOL, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Alle E&reignisse löschen", ID_CLEAR_EVENTS, GRAYED
|
||||
|
|
|
@ -6,10 +6,6 @@ IDC_EVENTVWR MENU
|
|||
BEGIN
|
||||
POPUP "&Log"
|
||||
BEGIN
|
||||
MENUITEM "&Εφαρμογή", ID_LOG_APPLICATION
|
||||
MENUITEM "&Ασφάλεια", ID_LOG_SECURITY
|
||||
MENUITEM "&Σύστημα", ID_LOG_SYSTEM
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
|
||||
|
|
|
@ -12,10 +12,6 @@ IDC_EVENTVWR MENU
|
|||
BEGIN
|
||||
POPUP "&Log"
|
||||
BEGIN
|
||||
MENUITEM "&Application", ID_LOG_APPLICATION
|
||||
MENUITEM "&Security", ID_LOG_SECURITY
|
||||
MENUITEM "&System", ID_LOG_SYSTEM
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
|
||||
|
|
|
@ -6,10 +6,6 @@ IDC_EVENTVWR MENU
|
|||
BEGIN
|
||||
POPUP "&Log"
|
||||
BEGIN
|
||||
MENUITEM "&Aplicación", ID_LOG_APPLICATION
|
||||
MENUITEM "&Seguridad", ID_LOG_SECURITY
|
||||
MENUITEM "&Sistema", ID_LOG_SYSTEM
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
|
||||
|
|
|
@ -6,13 +6,9 @@ IDC_EVENTVWR MENU
|
|||
BEGIN
|
||||
POPUP "Journa&l"
|
||||
BEGIN
|
||||
MENUITEM "&Application", ID_LOG_APPLICATION
|
||||
MENUITEM "&Sécurité", ID_LOG_SECURITY
|
||||
MENUITEM "&Système", ID_LOG_SYSTEM
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
|
||||
MENUITEM "Effacer tous &les événements", ID_CLEAR_EVENTS, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Quitter", IDM_EXIT
|
||||
END
|
||||
|
@ -48,10 +44,10 @@ END
|
|||
|
||||
IDD_PROGRESSBOX DIALOGEX 0, 0, 230, 40
|
||||
STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER
|
||||
CAPTION "Patientez.."
|
||||
CAPTION "Patientez..."
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
CTEXT "Chargement des journaux d'événements. Veuillez patienter ...", IDC_STATIC, 0, 15, 230, 8, SS_NOPREFIX
|
||||
CTEXT "Chargement des journaux d'événements. Veuillez patienter...", IDC_STATIC, 0, 15, 230, 8, SS_NOPREFIX
|
||||
END
|
||||
|
||||
IDD_EVENTDETAILDIALOG DIALOGEX 0, 0, 276, 282
|
||||
|
@ -65,27 +61,27 @@ BEGIN
|
|||
PUSHBUTTON "Suiva&nt", IDNEXT, 144, 258, 50, 14
|
||||
PUSHBUTTON "Aide", IDHELP, 210, 258, 50, 14
|
||||
EDITTEXT IDC_EVENTTEXTEDIT, 14, 81, 247, 108, ES_MULTILINE | ES_READONLY
|
||||
LTEXT "&Description:", IDC_STATIC, 15, 70, 39, 8
|
||||
LTEXT "Date:", IDC_STATIC, 14, 14, 36, 8
|
||||
LTEXT "&Description :", IDC_STATIC, 14, 70, 45, 8
|
||||
LTEXT "Date :", IDC_STATIC, 14, 14, 40, 8
|
||||
EDITTEXT IDC_EVENTDATESTATIC, 56, 14, 72, 8, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
|
||||
LTEXT "Heure :", IDC_STATIC, 14, 27, 36, 8
|
||||
LTEXT "Heure :", IDC_STATIC, 14, 27, 40, 8
|
||||
EDITTEXT IDC_EVENTTIMESTATIC, 56, 27, 72, 8, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
|
||||
LTEXT "&Utilisateur :", IDC_STATIC, 14, 41, 36, 8
|
||||
LTEXT "&Utilisateur :", IDC_STATIC, 14, 41, 40, 8
|
||||
EDITTEXT IDC_EVENTUSERSTATIC, 56, 41, 72, 8, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
|
||||
LTEXT "Ordinateur :", IDC_STATIC, 14, 54, 36, 8
|
||||
LTEXT "Ordinateur :", IDC_STATIC, 14, 54, 40, 8
|
||||
EDITTEXT IDC_EVENTCOMPUTERSTATIC, 56, 54, 72, 8, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
|
||||
LTEXT "Événement :", IDC_STATIC, 133, 15, 36, 8
|
||||
LTEXT "Événement :", IDC_STATIC, 133, 15, 42, 8
|
||||
EDITTEXT IDC_EVENTIDSTATIC, 175, 15, 87, 8, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
|
||||
LTEXT "Source:", IDC_STATIC, 133, 28, 36, 8
|
||||
LTEXT "Source :", IDC_STATIC, 133, 28, 42, 8
|
||||
EDITTEXT IDC_EVENTSOURCESTATIC, 175, 28, 87, 8, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
|
||||
LTEXT "Type:", IDC_STATIC, 133, 42, 36, 8
|
||||
LTEXT "Type :", IDC_STATIC, 133, 42, 42, 8
|
||||
EDITTEXT IDC_EVENTTYPESTATIC, 175, 42, 87, 8, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
|
||||
LTEXT "Catégorie :", IDC_STATIC, 133, 55, 36, 8
|
||||
LTEXT "Catégorie :", IDC_STATIC, 133, 55, 42, 8
|
||||
EDITTEXT IDC_EVENTCATEGORYSTATIC, 175, 55, 87, 8, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EVENTDATAEDIT, 14, 204, 247, 44, ES_MULTILINE | ES_READONLY
|
||||
LTEXT "Données", IDC_STATIC, 14, 194, 20, 8
|
||||
CONTROL "&Octets", IDC_BYTESRADIO, "Button", BS_AUTORADIOBUTTON, 39, 194, 34, 8
|
||||
CONTROL "&Mots", IDC_WORDRADIO, "Button", BS_AUTORADIOBUTTON, 77, 194, 33, 8
|
||||
LTEXT "Données :", IDC_STATIC, 14, 194, 35, 8
|
||||
CONTROL "&Octets", IDC_BYTESRADIO, "Button", BS_AUTORADIOBUTTON, 50, 194, 34, 8
|
||||
CONTROL "&Mots", IDC_WORDRADIO, "Button", BS_AUTORADIOBUTTON, 88, 194, 33, 8
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
|
@ -93,7 +89,7 @@ BEGIN
|
|||
IDS_APP_TITLE "Visionneuse d'événements"
|
||||
IDS_APP_TITLE_EX "%s - %s Log on \\\\"
|
||||
IDS_STATUS_MSG "%s has %lu event(s)"
|
||||
IDS_EVENTSTRINGIDNOTFOUND "La description pour l'événement d'ID ( %lu ) dans la source ( %s ) ne peut être trouvée. L'ordinateur local pourrait ne pas avoir les informations registres nécéssaires ou les fichiers DLL de message pour afficher les messages depuis un ordinateur distant."
|
||||
IDS_EVENTSTRINGIDNOTFOUND "La description pour l'événement d'ID ( %lu ) dans la source ( %s ) ne peut être trouvée. L'ordinateur local pourrait ne pas avoir les informations registres nécessaires ou les fichiers DLL de message pour afficher les messages depuis un ordinateur distant."
|
||||
IDS_EVENTLOG_ERROR_TYPE "Erreur"
|
||||
IDS_EVENTLOG_WARNING_TYPE "Avertissement"
|
||||
IDS_EVENTLOG_INFORMATION_TYPE "Informations"
|
||||
|
|
|
@ -6,10 +6,6 @@ IDC_EVENTVWR MENU
|
|||
BEGIN
|
||||
POPUP "מציג האירועים (מקומי)"
|
||||
BEGIN
|
||||
MENUITEM "יישום", ID_LOG_APPLICATION
|
||||
MENUITEM "אבטחה", ID_LOG_SECURITY
|
||||
MENUITEM "מערכת", ID_LOG_SYSTEM
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
|
||||
|
|
|
@ -6,10 +6,6 @@ IDC_EVENTVWR MENU
|
|||
BEGIN
|
||||
POPUP "&Log"
|
||||
BEGIN
|
||||
MENUITEM "&Applicazioni", ID_LOG_APPLICATION
|
||||
MENUITEM "&Sicurezza", ID_LOG_SECURITY
|
||||
MENUITEM "&Sistema", ID_LOG_SYSTEM
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
|
||||
|
|
|
@ -6,10 +6,6 @@ IDC_EVENTVWR MENU
|
|||
BEGIN
|
||||
POPUP "ログ(&L)"
|
||||
BEGIN
|
||||
MENUITEM "アプリケーション(&A)", ID_LOG_APPLICATION
|
||||
MENUITEM "セキュリティ(&S)", ID_LOG_SECURITY
|
||||
MENUITEM "システム(&S)", ID_LOG_SYSTEM
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
|
||||
|
|
|
@ -6,10 +6,6 @@ IDC_EVENTVWR MENU
|
|||
BEGIN
|
||||
POPUP "로그(&L)"
|
||||
BEGIN
|
||||
MENUITEM "애플리케이션(&A)", ID_LOG_APPLICATION
|
||||
MENUITEM "보안(&S)", ID_LOG_SECURITY
|
||||
MENUITEM "시스템(&S)", ID_LOG_SYSTEM
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
|
||||
|
|
|
@ -4,10 +4,6 @@ IDC_EVENTVWR MENU
|
|||
BEGIN
|
||||
POPUP "&Logg"
|
||||
BEGIN
|
||||
MENUITEM "&Applikasjon", ID_LOG_APPLICATION
|
||||
MENUITEM "&Sikkerhet", ID_LOG_SECURITY
|
||||
MENUITEM "&System", ID_LOG_SYSTEM
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
|
||||
|
|
|
@ -8,10 +8,6 @@ IDC_EVENTVWR MENU
|
|||
BEGIN
|
||||
POPUP "&Logi"
|
||||
BEGIN
|
||||
MENUITEM "&Aplikacja", ID_LOG_APPLICATION
|
||||
MENUITEM "&Zabezpieczenia", ID_LOG_SECURITY
|
||||
MENUITEM "&System", ID_LOG_SYSTEM
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Zapisz &protokół...", ID_SAVE_PROTOCOL, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "W&yczyść wszystkie zdarzenia", ID_CLEAR_EVENTS, GRAYED
|
||||
|
|
|
@ -6,10 +6,6 @@ IDC_EVENTVWR MENU
|
|||
BEGIN
|
||||
POPUP "&Registro"
|
||||
BEGIN
|
||||
MENUITEM "&Aplicativo", ID_LOG_APPLICATION
|
||||
MENUITEM "S&egurança", ID_LOG_SECURITY
|
||||
MENUITEM "&Sistema", ID_LOG_SYSTEM
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
|
||||
|
|
|
@ -6,10 +6,6 @@ IDC_EVENTVWR MENU
|
|||
BEGIN
|
||||
POPUP "J&urnal"
|
||||
BEGIN
|
||||
MENUITEM "&Aplicație", ID_LOG_APPLICATION
|
||||
MENUITEM "Se&curitate", ID_LOG_SECURITY
|
||||
MENUITEM "&Sistem", ID_LOG_SYSTEM
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Păstrare p&rotocol…", ID_SAVE_PROTOCOL, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Înlăt&ură toate evenimentele", ID_CLEAR_EVENTS, GRAYED
|
||||
|
|
|
@ -6,10 +6,6 @@ IDC_EVENTVWR MENU
|
|||
BEGIN
|
||||
POPUP "&Логи"
|
||||
BEGIN
|
||||
MENUITEM "&Приложений", ID_LOG_APPLICATION
|
||||
MENUITEM "&Безопасности", ID_LOG_SECURITY
|
||||
MENUITEM "&Системы", ID_LOG_SYSTEM
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
|
||||
|
|
|
@ -9,10 +9,6 @@ IDC_EVENTVWR MENU
|
|||
BEGIN
|
||||
POPUP "&Záznam"
|
||||
BEGIN
|
||||
MENUITEM "&Application", ID_LOG_APPLICATION
|
||||
MENUITEM "&Security", ID_LOG_SECURITY
|
||||
MENUITEM "&System", ID_LOG_SYSTEM
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
|
||||
|
|
|
@ -12,10 +12,6 @@ IDC_EVENTVWR MENU
|
|||
BEGIN
|
||||
POPUP "&Log"
|
||||
BEGIN
|
||||
MENUITEM "&Aplikacion", ID_LOG_APPLICATION
|
||||
MENUITEM "&Siguri", ID_LOG_SECURITY
|
||||
MENUITEM "&Sistemi", ID_LOG_SYSTEM
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
|
||||
|
|
|
@ -6,10 +6,6 @@ IDC_EVENTVWR MENU
|
|||
BEGIN
|
||||
POPUP "&Logg"
|
||||
BEGIN
|
||||
MENUITEM "&Applikation", ID_LOG_APPLICATION
|
||||
MENUITEM "&Säkerhet", ID_LOG_SECURITY
|
||||
MENUITEM "&System", ID_LOG_SYSTEM
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
|
||||
|
|
|
@ -12,10 +12,6 @@ IDC_EVENTVWR MENU
|
|||
BEGIN
|
||||
POPUP "&Kayıt"
|
||||
BEGIN
|
||||
MENUITEM "&Uygulama", ID_LOG_APPLICATION
|
||||
MENUITEM "&Güvenlik", ID_LOG_SECURITY
|
||||
MENUITEM "&Dizge", ID_LOG_SYSTEM
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Protokolü Kaydet...", ID_SAVE_PROTOCOL, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Tüm Olayları Sil", ID_CLEAR_EVENTS, GRAYED
|
||||
|
|
|
@ -6,10 +6,6 @@ IDC_EVENTVWR MENU
|
|||
BEGIN
|
||||
POPUP "&Звіт"
|
||||
BEGIN
|
||||
MENUITEM "&Програма", ID_LOG_APPLICATION
|
||||
MENUITEM "&Захист", ID_LOG_SECURITY
|
||||
MENUITEM "&Система", ID_LOG_SYSTEM
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
|
||||
|
|
|
@ -6,10 +6,6 @@ IDC_EVENTVWR MENU
|
|||
BEGIN
|
||||
POPUP "日志(&L)"
|
||||
BEGIN
|
||||
MENUITEM "应用程序日志(&A)", ID_LOG_APPLICATION
|
||||
MENUITEM "安全日志(&S)", ID_LOG_SECURITY
|
||||
MENUITEM "系统日志(&Y)", ID_LOG_SYSTEM
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
|
||||
|
|
|
@ -35,19 +35,18 @@
|
|||
#define IDC_WORDRADIO 1013
|
||||
#define IDC_EVENTDATAEDIT 1014
|
||||
|
||||
#define ID_LOG_APPLICATION 32771
|
||||
#define ID_LOG_SECURITY 32772
|
||||
#define ID_LOG_SYSTEM 32773
|
||||
#define ID_HELP_HELP 32775
|
||||
#define ID_HELP 32776
|
||||
#define ID_OPTIONS 32777
|
||||
#define ID_VIEW 32778
|
||||
#define IDM_HELP 32779
|
||||
#define ID_VIEW_REFRESH 32780
|
||||
#define ID_REFRESH 32781
|
||||
#define IDM_REFRESH 32782
|
||||
#define ID_CLEAR_EVENTS 32783
|
||||
#define ID_SAVE_PROTOCOL 32784
|
||||
#define ID_HELP_HELP 32771
|
||||
#define ID_HELP 32772
|
||||
#define ID_OPTIONS 32773
|
||||
#define ID_VIEW 32774
|
||||
#define IDM_HELP 32775
|
||||
#define ID_VIEW_REFRESH 32776
|
||||
#define ID_REFRESH 32777
|
||||
#define IDM_REFRESH 32778
|
||||
#define ID_CLEAR_EVENTS 32779
|
||||
#define ID_SAVE_PROTOCOL 32780
|
||||
|
||||
#define ID_FIRST_LOG 45000
|
||||
|
||||
/* String IDs */
|
||||
#define IDS_APP_TITLE 103
|
||||
|
|
|
@ -293,7 +293,7 @@ ExtractFilesFromCab(LPWSTR lpCabName, LPWSTR lpOutputPath)
|
|||
VOID
|
||||
InitLogs(VOID)
|
||||
{
|
||||
WCHAR szBuf[MAX_PATH] = L"SYSTEM\\CurrentControlSet\\Services\\EventLog\\ReactOS Application Manager\\ReactOS Application Manager";
|
||||
WCHAR szBuf[MAX_PATH] = L"SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\ReactOS Application Manager";
|
||||
WCHAR szPath[MAX_PATH];
|
||||
DWORD dwCategoryNum = 1;
|
||||
DWORD dwDisp, dwData;
|
||||
|
|
|
@ -313,8 +313,10 @@ void ShellDirectory::read_directory(int scan_flags)
|
|||
if (GetFileInformationByHandle(hFile, &entry->_bhfi))
|
||||
entry->_bhfi_valid = true;
|
||||
|
||||
#ifdef BACKUP_READ_IMPLEMENTED
|
||||
if (ScanNTFSStreams(entry, hFile))
|
||||
entry->_scanned = true; // There exist named NTFS sub-streams in this file.
|
||||
#endif
|
||||
|
||||
CloseHandle(hFile);
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
//#include "winfs.h"
|
||||
|
||||
|
||||
#ifdef BACKUP_READ_IMPLEMENTED
|
||||
int ScanNTFSStreams(Entry* entry, HANDLE hFile)
|
||||
{
|
||||
PVOID ctx = 0;
|
||||
|
@ -116,6 +117,7 @@ int ScanNTFSStreams(Entry* entry, HANDLE hFile)
|
|||
|
||||
return cnt;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void WinDirectory::read_directory(int scan_flags)
|
||||
|
@ -167,8 +169,10 @@ void WinDirectory::read_directory(int scan_flags)
|
|||
if (GetFileInformationByHandle(hFile, &entry->_bhfi))
|
||||
entry->_bhfi_valid = true;
|
||||
|
||||
#ifdef BACKUP_READ_IMPLEMENTED
|
||||
if (ScanNTFSStreams(entry, hFile))
|
||||
entry->_scanned = true; // There exist named NTFS sub-streams in this file.
|
||||
#endif
|
||||
|
||||
CloseHandle(hFile);
|
||||
}
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
// Martin Fuchs, 23.07.2003
|
||||
//
|
||||
|
||||
/* Enable this when the BackupRead API is implemented */
|
||||
// #define BACKUP_READ_IMPLEMENTED
|
||||
|
||||
/// Windows file system file-entry
|
||||
struct WinEntry : public Entry
|
||||
|
@ -65,4 +67,6 @@ struct WinDirectory : public WinEntry, public Directory
|
|||
virtual Entry* find_entry(const void*);
|
||||
};
|
||||
|
||||
#ifdef BACKUP_READ_IMPLEMENTED
|
||||
extern int ScanNTFSStreams(Entry* entry, HANDLE hFile);
|
||||
#endif
|
||||
|
|
|
@ -31,17 +31,13 @@ add_custom_command(
|
|||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/reactos.dff.dyn
|
||||
)
|
||||
|
||||
# And now we build reactos.inf
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf
|
||||
add_custom_target(
|
||||
reactos_cab_inf
|
||||
COMMAND native-cabman -C ${CMAKE_CURRENT_BINARY_DIR}/reactos.dff -L ${CMAKE_CURRENT_BINARY_DIR} -I -P ${REACTOS_SOURCE_DIR}
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/reactos.dff native-cabman)
|
||||
|
||||
# reactos.cab generation will be made later (cf. CMakeMacros.cmake - create iso lists)
|
||||
add_custom_target(reactos_cab_inf DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf)
|
||||
|
||||
add_cd_file(
|
||||
TARGET reactos_cab
|
||||
TARGET reactos_cab_inf
|
||||
FILE ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf
|
||||
DESTINATION reactos
|
||||
NO_CAB FOR bootcd regtest)
|
||||
|
|
|
@ -376,10 +376,17 @@ endfunction()
|
|||
function(create_iso_lists)
|
||||
# generate reactos.cab before anything else
|
||||
get_property(_filelist GLOBAL PROPERTY REACTOS_CAB_DEPENDS)
|
||||
|
||||
# begin with reactos.inf. We want this command to be always executed, so we pretend it generates another file although it will never do.
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf ${CMAKE_CURRENT_BINARY_DIR}/__some_non_existent_file
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${REACTOS_BINARY_DIR}/boot/bootdata/packages/reactos.inf ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf
|
||||
DEPENDS ${REACTOS_BINARY_DIR}/boot/bootdata/packages/reactos.inf reactos_cab_inf)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/reactos.cab
|
||||
COMMAND native-cabman -C ${REACTOS_BINARY_DIR}/boot/bootdata/packages/reactos.dff -RC ${REACTOS_BINARY_DIR}/boot/bootdata/packages/reactos.inf -N -P ${REACTOS_SOURCE_DIR}
|
||||
DEPENDS ${REACTOS_BINARY_DIR}/boot/bootdata/packages/reactos.inf native-cabman ${_filelist})
|
||||
COMMAND native-cabman -C ${REACTOS_BINARY_DIR}/boot/bootdata/packages/reactos.dff -RC ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf -N -P ${REACTOS_SOURCE_DIR}
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf native-cabman ${_filelist})
|
||||
|
||||
add_custom_target(reactos_cab DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/reactos.cab)
|
||||
add_dependencies(reactos_cab reactos_cab_inf)
|
||||
|
|
|
@ -115,7 +115,7 @@ endif()
|
|||
|
||||
# Link-time code generation
|
||||
if(LTCG)
|
||||
add_compile_flags("-flto -ffat-lto-objects")
|
||||
add_compile_flags("-flto -fno-fat-lto-objects")
|
||||
endif()
|
||||
|
||||
if(ARCH STREQUAL "i386")
|
||||
|
|
|
@ -60,7 +60,7 @@ static const addon_info_t *addon;
|
|||
|
||||
static HWND install_dialog = NULL;
|
||||
|
||||
static WCHAR GeckoUrl[] = L"http://dl.dropboxusercontent.com/u/743491/ReactOS/wine_gecko-2.24-x86.msi";
|
||||
static WCHAR GeckoUrl[] = L"http://svn.reactos.org/amine/wine_gecko-2.24-x86.msi";
|
||||
|
||||
/* SHA definitions are copied from advapi32. They aren't available in headers. */
|
||||
|
||||
|
|
|
@ -95,9 +95,13 @@ InitRadioButtons(HWND hWnd)
|
|||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
SendDlgItemMessage(hWnd, IDC_WITHOUTREBOOT_RB, BM_SETCHECK, 1, 1);
|
||||
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
else
|
||||
SendDlgItemMessage(hWnd, IDC_WITHOUTREBOOT_RB, BM_SETCHECK, 1, 1);
|
||||
}
|
||||
|
||||
INT_PTR CALLBACK
|
||||
|
|
|
@ -44,7 +44,7 @@ BEGIN
|
|||
IDS_DEV_OUT_OF_MEMORY "Le pilote de ce périphérique peut être mauvais, ou votre système peut être à court de mémoire ou d'autres ressources."
|
||||
IDS_DEV_ENTRY_IS_WRONG_TYPE "Ce périphérique ne fonctionne pas correctement parce qu'un des pilotes de ce périphérique peut être mauvais, ou votre base de registres peut être mauvaise."
|
||||
IDS_DEV_LACKED_ARBITRATOR "Le pilote de ce périphérique a demandé une ressource que ReactOS ne sait pas prendre en compte."
|
||||
IDS_DEV_BOOT_CONFIG_CONFLICT "Un autre périphérique utilise les ressources nécéssaires à ce périphérique."
|
||||
IDS_DEV_BOOT_CONFIG_CONFLICT "Un autre périphérique utilise les ressources nécessaires à ce périphérique."
|
||||
IDS_DEV_FAILED_FILTER "Les pilotes de ce périphérique doivent être réinstallés."
|
||||
IDS_DEV_DEVLOADER_NOT_FOUND "Ce périphérique ne fonctionne pas correctement parce que ReactOS ne peut charger le fichier %1 qui charge les pilotes de ce périphérique."
|
||||
IDS_DEV_DEVLOADER_NOT_FOUND2 "Ce périphérique ne fonctionne pas correctement parce que le fichier %1 qui charge les pilotes de ce périphérique est mauvais."
|
||||
|
|
|
@ -1129,16 +1129,17 @@ CDefaultContextMenu::DoCreateLink(
|
|||
HRESULT CDefaultContextMenu::DoDelete(LPCMINVOKECOMMANDINFO lpcmi) {
|
||||
TRACE("(%p) Deleting\n", this);
|
||||
|
||||
CComPtr<IDataObject> pDataObj;
|
||||
CComPtr<IDataObject> pDataObject;
|
||||
|
||||
if (SUCCEEDED(SHCreateDataObject(m_pidlFolder, m_cidl, m_apidl, NULL, IID_PPV_ARG(IDataObject, &pDataObj))))
|
||||
if (SUCCEEDED(SHCreateDataObject(m_pidlFolder, m_cidl, m_apidl, NULL, IID_PPV_ARG(IDataObject, &pDataObject))))
|
||||
{
|
||||
SHCreateThread(DoDeleteThreadProc, pDataObj, NULL, NULL);
|
||||
IStream *s;
|
||||
CoMarshalInterThreadInterfaceInStream(IID_IDataObject, pDataObject, &s);
|
||||
SHCreateThread(DoDeleteThreadProc, s, NULL, NULL);
|
||||
}
|
||||
else
|
||||
return E_FAIL;
|
||||
return S_OK;
|
||||
|
||||
}
|
||||
|
||||
HRESULT
|
||||
|
|
|
@ -116,7 +116,7 @@ HRESULT WINAPI CAdminToolsFolder::FinalConstruct()
|
|||
*
|
||||
*/
|
||||
HRESULT WINAPI CAdminToolsFolder::ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName,
|
||||
DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes)
|
||||
DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes)
|
||||
{
|
||||
TRACE("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n",
|
||||
this, hwndOwner, pbc, lpszDisplayName, debugstr_w(lpszDisplayName),
|
||||
|
@ -167,7 +167,7 @@ HRESULT WINAPI CAdminToolsFolder::EnumObjects(HWND hwndOwner, DWORD dwFlags, LPE
|
|||
/**************************************************************************
|
||||
* CAdminToolsFolder::BindToObject
|
||||
*/
|
||||
HRESULT WINAPI CAdminToolsFolder::BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
|
||||
HRESULT WINAPI CAdminToolsFolder::BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
|
||||
{
|
||||
TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", this,
|
||||
pidl, pbcReserved, shdebugstr_guid (&riid), ppvOut);
|
||||
|
@ -178,7 +178,7 @@ HRESULT WINAPI CAdminToolsFolder::BindToObject(LPCITEMIDLIST pidl, LPBC pbcReser
|
|||
/**************************************************************************
|
||||
* CAdminToolsFolder::BindToStorage
|
||||
*/
|
||||
HRESULT WINAPI CAdminToolsFolder::BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
|
||||
HRESULT WINAPI CAdminToolsFolder::BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
|
||||
{
|
||||
FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n",
|
||||
this, pidl, pbcReserved, shdebugstr_guid (&riid), ppvOut);
|
||||
|
@ -190,7 +190,7 @@ HRESULT WINAPI CAdminToolsFolder::BindToStorage(LPCITEMIDLIST pidl, LPBC pbcRese
|
|||
/**************************************************************************
|
||||
* CAdminToolsFolder::CompareIDs
|
||||
*/
|
||||
HRESULT WINAPI CAdminToolsFolder::CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
|
||||
HRESULT WINAPI CAdminToolsFolder::CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2)
|
||||
{
|
||||
int nReturn;
|
||||
|
||||
|
@ -234,7 +234,7 @@ HRESULT WINAPI CAdminToolsFolder::CreateViewObject(HWND hwndOwner, REFIID riid,
|
|||
/**************************************************************************
|
||||
* ISF_AdminTools_fnGetAttributesOf
|
||||
*/
|
||||
HRESULT WINAPI CAdminToolsFolder::GetAttributesOf(UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut)
|
||||
HRESULT WINAPI CAdminToolsFolder::GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut)
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
static const DWORD dwAdminToolsAttributes =
|
||||
|
@ -286,7 +286,7 @@ HRESULT WINAPI CAdminToolsFolder::GetAttributesOf(UINT cidl, LPCITEMIDLIST *apid
|
|||
* LPVOID* ppvObject) //[out] Resulting Interface
|
||||
*
|
||||
*/
|
||||
HRESULT WINAPI CAdminToolsFolder::GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl,
|
||||
HRESULT WINAPI CAdminToolsFolder::GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl,
|
||||
REFIID riid, UINT * prgfInOut, LPVOID * ppvOut)
|
||||
{
|
||||
LPITEMIDLIST pidl;
|
||||
|
@ -355,7 +355,7 @@ HRESULT WINAPI CAdminToolsFolder::GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCIT
|
|||
* CAdminToolsFolder::GetDisplayNameOf
|
||||
*
|
||||
*/
|
||||
HRESULT WINAPI CAdminToolsFolder::GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet)
|
||||
HRESULT WINAPI CAdminToolsFolder::GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet)
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
LPWSTR pszPath, pOffset;
|
||||
|
@ -457,8 +457,8 @@ HRESULT WINAPI CAdminToolsFolder::GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwF
|
|||
* DWORD dwFlags, //[in ] SHGNO formatting flags
|
||||
* LPITEMIDLIST* ppidlOut) //[out] simple pidl returned
|
||||
*/
|
||||
HRESULT WINAPI CAdminToolsFolder::SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, /* simple pidl */
|
||||
LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut)
|
||||
HRESULT WINAPI CAdminToolsFolder::SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, /* simple pidl */
|
||||
LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut)
|
||||
{
|
||||
FIXME ("(%p)->(%p,pidl=%p,%s,%lu,%p)\n", this, hwndOwner, pidl,
|
||||
debugstr_w (lpName), dwFlags, pPidlOut);
|
||||
|
@ -496,14 +496,14 @@ HRESULT WINAPI CAdminToolsFolder::GetDefaultColumnState(UINT iColumn, DWORD *pcs
|
|||
|
||||
}
|
||||
|
||||
HRESULT WINAPI CAdminToolsFolder::GetDetailsEx (LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv)
|
||||
HRESULT WINAPI CAdminToolsFolder::GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv)
|
||||
{
|
||||
FIXME ("(%p): stub\n", this);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CAdminToolsFolder::GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd)
|
||||
HRESULT WINAPI CAdminToolsFolder::GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd)
|
||||
{
|
||||
WCHAR buffer[MAX_PATH] = {0};
|
||||
HRESULT hr = E_FAIL;
|
||||
|
|
|
@ -41,24 +41,24 @@ class CAdminToolsFolder :
|
|||
HRESULT WINAPI FinalConstruct();
|
||||
|
||||
// IShellFolder
|
||||
virtual HRESULT WINAPI ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, LPITEMIDLIST *ppidl, DWORD *pdwAttributes);
|
||||
virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes);
|
||||
virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList);
|
||||
virtual HRESULT WINAPI BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2);
|
||||
virtual HRESULT WINAPI BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2);
|
||||
virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI GetAttributesOf (UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut);
|
||||
virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut);
|
||||
virtual HRESULT WINAPI GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet);
|
||||
virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut);
|
||||
virtual HRESULT WINAPI GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut);
|
||||
virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut);
|
||||
virtual HRESULT WINAPI GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet);
|
||||
virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut);
|
||||
|
||||
/* ShellFolder2 */
|
||||
virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid);
|
||||
virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum);
|
||||
virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay);
|
||||
virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags);
|
||||
virtual HRESULT WINAPI GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv);
|
||||
virtual HRESULT WINAPI GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd);
|
||||
virtual HRESULT WINAPI GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv);
|
||||
virtual HRESULT WINAPI GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd);
|
||||
virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid);
|
||||
|
||||
// IPersist
|
||||
|
|
|
@ -312,7 +312,7 @@ HRESULT WINAPI CControlPanelFolder::ParseDisplayName(
|
|||
LPBC pbc,
|
||||
LPOLESTR lpszDisplayName,
|
||||
DWORD *pchEaten,
|
||||
LPITEMIDLIST *ppidl,
|
||||
PIDLIST_RELATIVE *ppidl,
|
||||
DWORD *pdwAttributes)
|
||||
{
|
||||
WCHAR szElement[MAX_PATH];
|
||||
|
@ -408,7 +408,7 @@ HRESULT WINAPI CControlPanelFolder::EnumObjects(
|
|||
* CControlPanelFolder::BindToObject
|
||||
*/
|
||||
HRESULT WINAPI CControlPanelFolder::BindToObject(
|
||||
LPCITEMIDLIST pidl,
|
||||
PCUIDLIST_RELATIVE pidl,
|
||||
LPBC pbcReserved,
|
||||
REFIID riid,
|
||||
LPVOID *ppvOut)
|
||||
|
@ -422,7 +422,7 @@ HRESULT WINAPI CControlPanelFolder::BindToObject(
|
|||
* CControlPanelFolder::BindToStorage
|
||||
*/
|
||||
HRESULT WINAPI CControlPanelFolder::BindToStorage(
|
||||
LPCITEMIDLIST pidl,
|
||||
PCUIDLIST_RELATIVE pidl,
|
||||
LPBC pbcReserved,
|
||||
REFIID riid,
|
||||
LPVOID *ppvOut)
|
||||
|
@ -437,7 +437,7 @@ HRESULT WINAPI CControlPanelFolder::BindToStorage(
|
|||
* CControlPanelFolder::CompareIDs
|
||||
*/
|
||||
|
||||
HRESULT WINAPI CControlPanelFolder::CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
|
||||
HRESULT WINAPI CControlPanelFolder::CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2)
|
||||
{
|
||||
int nReturn;
|
||||
|
||||
|
@ -480,7 +480,7 @@ HRESULT WINAPI CControlPanelFolder::CreateViewObject(HWND hwndOwner, REFIID riid
|
|||
/**************************************************************************
|
||||
* CControlPanelFolder::GetAttributesOf
|
||||
*/
|
||||
HRESULT WINAPI CControlPanelFolder::GetAttributesOf(UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut)
|
||||
HRESULT WINAPI CControlPanelFolder::GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD * rgfInOut)
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
|
@ -522,7 +522,7 @@ HRESULT WINAPI CControlPanelFolder::GetAttributesOf(UINT cidl, LPCITEMIDLIST * a
|
|||
*
|
||||
*/
|
||||
HRESULT WINAPI CControlPanelFolder::GetUIObjectOf(HWND hwndOwner,
|
||||
UINT cidl, LPCITEMIDLIST * apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut)
|
||||
UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut)
|
||||
{
|
||||
LPITEMIDLIST pidl;
|
||||
IUnknown *pObj = NULL;
|
||||
|
@ -576,7 +576,7 @@ HRESULT WINAPI CControlPanelFolder::GetUIObjectOf(HWND hwndOwner,
|
|||
/**************************************************************************
|
||||
* CControlPanelFolder::GetDisplayNameOf
|
||||
*/
|
||||
HRESULT WINAPI CControlPanelFolder::GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet)
|
||||
HRESULT WINAPI CControlPanelFolder::GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet)
|
||||
{
|
||||
CHAR szName[MAX_PATH];
|
||||
WCHAR wszName[MAX_PATH+1]; /* +1 for potential backslash */
|
||||
|
@ -656,8 +656,8 @@ HRESULT WINAPI CControlPanelFolder::GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD d
|
|||
* DWORD dwFlags, //[in ] SHGNO formatting flags
|
||||
* LPITEMIDLIST* ppidlOut) //[out] simple pidl returned
|
||||
*/
|
||||
HRESULT WINAPI CControlPanelFolder::SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */
|
||||
LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut)
|
||||
HRESULT WINAPI CControlPanelFolder::SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, /*simple pidl */
|
||||
LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut)
|
||||
{
|
||||
FIXME("(%p)->(%p,pidl=%p,%s,%u,%p)\n", this, hwndOwner, pidl, debugstr_w(lpName), dwFlags, pPidlOut);
|
||||
return E_FAIL;
|
||||
|
@ -693,13 +693,13 @@ HRESULT WINAPI CControlPanelFolder::GetDefaultColumnState(UINT iColumn, DWORD *p
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CControlPanelFolder::GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv)
|
||||
HRESULT WINAPI CControlPanelFolder::GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv)
|
||||
{
|
||||
FIXME("(%p)\n", this);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CControlPanelFolder::GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd)
|
||||
HRESULT WINAPI CControlPanelFolder::GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd)
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
|
|
|
@ -46,24 +46,24 @@ class CControlPanelFolder :
|
|||
HRESULT WINAPI FinalConstruct();
|
||||
|
||||
// IShellFolder
|
||||
virtual HRESULT WINAPI ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, LPITEMIDLIST *ppidl, DWORD *pdwAttributes);
|
||||
virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes);
|
||||
virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList);
|
||||
virtual HRESULT WINAPI BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2);
|
||||
virtual HRESULT WINAPI BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2);
|
||||
virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI GetAttributesOf (UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut);
|
||||
virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut);
|
||||
virtual HRESULT WINAPI GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet);
|
||||
virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut);
|
||||
virtual HRESULT WINAPI GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut);
|
||||
virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut);
|
||||
virtual HRESULT WINAPI GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet);
|
||||
virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut);
|
||||
|
||||
/* ShellFolder2 */
|
||||
virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid);
|
||||
virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum);
|
||||
virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay);
|
||||
virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags);
|
||||
virtual HRESULT WINAPI GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv);
|
||||
virtual HRESULT WINAPI GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd);
|
||||
virtual HRESULT WINAPI GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv);
|
||||
virtual HRESULT WINAPI GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd);
|
||||
virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid);
|
||||
|
||||
// IPersist
|
||||
|
|
|
@ -300,7 +300,7 @@ HRESULT WINAPI CDesktopFolder::ParseDisplayName(
|
|||
LPBC pbc,
|
||||
LPOLESTR lpszDisplayName,
|
||||
DWORD *pchEaten,
|
||||
LPITEMIDLIST *ppidl,
|
||||
PIDLIST_RELATIVE *ppidl,
|
||||
DWORD *pdwAttributes)
|
||||
{
|
||||
WCHAR szElement[MAX_PATH];
|
||||
|
@ -462,7 +462,7 @@ HRESULT WINAPI CDesktopFolder::EnumObjects(
|
|||
* CDesktopFolder::BindToObject
|
||||
*/
|
||||
HRESULT WINAPI CDesktopFolder::BindToObject(
|
||||
LPCITEMIDLIST pidl,
|
||||
PCUIDLIST_RELATIVE pidl,
|
||||
LPBC pbcReserved,
|
||||
REFIID riid,
|
||||
LPVOID *ppvOut)
|
||||
|
@ -477,7 +477,7 @@ HRESULT WINAPI CDesktopFolder::BindToObject(
|
|||
* CDesktopFolder::BindToStorage
|
||||
*/
|
||||
HRESULT WINAPI CDesktopFolder::BindToStorage(
|
||||
LPCITEMIDLIST pidl,
|
||||
PCUIDLIST_RELATIVE pidl,
|
||||
LPBC pbcReserved,
|
||||
REFIID riid,
|
||||
LPVOID *ppvOut)
|
||||
|
@ -492,7 +492,7 @@ HRESULT WINAPI CDesktopFolder::BindToStorage(
|
|||
/**************************************************************************
|
||||
* CDesktopFolder::CompareIDs
|
||||
*/
|
||||
HRESULT WINAPI CDesktopFolder::CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
|
||||
HRESULT WINAPI CDesktopFolder::CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2)
|
||||
{
|
||||
int nReturn;
|
||||
|
||||
|
@ -545,7 +545,7 @@ HRESULT WINAPI CDesktopFolder::CreateViewObject(
|
|||
*/
|
||||
HRESULT WINAPI CDesktopFolder::GetAttributesOf(
|
||||
UINT cidl,
|
||||
LPCITEMIDLIST *apidl,
|
||||
PCUITEMID_CHILD_ARRAY apidl,
|
||||
DWORD *rgfInOut)
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
|
@ -609,7 +609,7 @@ HRESULT WINAPI CDesktopFolder::GetAttributesOf(
|
|||
HRESULT WINAPI CDesktopFolder::GetUIObjectOf(
|
||||
HWND hwndOwner,
|
||||
UINT cidl,
|
||||
LPCITEMIDLIST *apidl,
|
||||
PCUITEMID_CHILD_ARRAY apidl,
|
||||
REFIID riid,
|
||||
UINT *prgfInOut,
|
||||
LPVOID *ppvOut)
|
||||
|
@ -682,7 +682,7 @@ HRESULT WINAPI CDesktopFolder::GetUIObjectOf(
|
|||
* NOTES
|
||||
* special case: pidl = null gives desktop-name back
|
||||
*/
|
||||
HRESULT WINAPI CDesktopFolder::GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet)
|
||||
HRESULT WINAPI CDesktopFolder::GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet)
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
LPWSTR pszPath;
|
||||
|
@ -857,10 +857,10 @@ HRESULT WINAPI CDesktopFolder::GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlag
|
|||
*/
|
||||
HRESULT WINAPI CDesktopFolder::SetNameOf(
|
||||
HWND hwndOwner,
|
||||
LPCITEMIDLIST pidl, /* simple pidl */
|
||||
PCUITEMID_CHILD pidl, /* simple pidl */
|
||||
LPCOLESTR lpName,
|
||||
DWORD dwFlags,
|
||||
LPITEMIDLIST *pPidlOut)
|
||||
PITEMID_CHILD *pPidlOut)
|
||||
{
|
||||
CComPtr<IShellFolder2> psf;
|
||||
HRESULT hr;
|
||||
|
@ -966,7 +966,7 @@ HRESULT WINAPI CDesktopFolder::GetDefaultColumnState(UINT iColumn, DWORD *pcsFla
|
|||
}
|
||||
|
||||
HRESULT WINAPI CDesktopFolder::GetDetailsEx(
|
||||
LPCITEMIDLIST pidl,
|
||||
PCUITEMID_CHILD pidl,
|
||||
const SHCOLUMNID *pscid,
|
||||
VARIANT *pv)
|
||||
{
|
||||
|
@ -976,7 +976,7 @@ HRESULT WINAPI CDesktopFolder::GetDetailsEx(
|
|||
}
|
||||
|
||||
HRESULT WINAPI CDesktopFolder::GetDetailsOf(
|
||||
LPCITEMIDLIST pidl,
|
||||
PCUITEMID_CHILD pidl,
|
||||
UINT iColumn,
|
||||
SHELLDETAILS *psd)
|
||||
{
|
||||
|
|
|
@ -48,24 +48,24 @@ class CDesktopFolder :
|
|||
HRESULT WINAPI FinalConstruct();
|
||||
|
||||
// *** IShellFolder methods ***
|
||||
virtual HRESULT WINAPI ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, LPITEMIDLIST *ppidl, DWORD *pdwAttributes);
|
||||
virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes);
|
||||
virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList);
|
||||
virtual HRESULT WINAPI BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2);
|
||||
virtual HRESULT WINAPI BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2);
|
||||
virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI GetAttributesOf (UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut);
|
||||
virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut);
|
||||
virtual HRESULT WINAPI GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet);
|
||||
virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut);
|
||||
virtual HRESULT WINAPI GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut);
|
||||
virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut);
|
||||
virtual HRESULT WINAPI GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet);
|
||||
virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut);
|
||||
|
||||
// *** IShellFolder2 methods ***
|
||||
virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid);
|
||||
virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum);
|
||||
virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay);
|
||||
virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags);
|
||||
virtual HRESULT WINAPI GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv);
|
||||
virtual HRESULT WINAPI GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd);
|
||||
virtual HRESULT WINAPI GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv);
|
||||
virtual HRESULT WINAPI GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd);
|
||||
virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid);
|
||||
|
||||
// *** IPersist methods ***
|
||||
|
|
|
@ -198,7 +198,7 @@ HRESULT WINAPI CFontsFolder::ParseDisplayName(
|
|||
LPBC pbcReserved,
|
||||
LPOLESTR lpszDisplayName,
|
||||
DWORD *pchEaten,
|
||||
LPITEMIDLIST *ppidl,
|
||||
PIDLIST_RELATIVE *ppidl,
|
||||
DWORD * pdwAttributes)
|
||||
{
|
||||
HRESULT hr = E_UNEXPECTED;
|
||||
|
@ -252,7 +252,7 @@ HRESULT WINAPI CFontsFolder::EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMID
|
|||
/**************************************************************************
|
||||
* CFontsFolder::BindToObject
|
||||
*/
|
||||
HRESULT WINAPI CFontsFolder::BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
|
||||
HRESULT WINAPI CFontsFolder::BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
|
||||
{
|
||||
TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", this,
|
||||
pidl, pbcReserved, shdebugstr_guid (&riid), ppvOut);
|
||||
|
@ -263,7 +263,7 @@ HRESULT WINAPI CFontsFolder::BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved,
|
|||
/**************************************************************************
|
||||
* CFontsFolder::BindToStorage
|
||||
*/
|
||||
HRESULT WINAPI CFontsFolder::BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
|
||||
HRESULT WINAPI CFontsFolder::BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
|
||||
{
|
||||
FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n", this,
|
||||
pidl, pbcReserved, shdebugstr_guid (&riid), ppvOut);
|
||||
|
@ -276,7 +276,7 @@ HRESULT WINAPI CFontsFolder::BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved,
|
|||
* CFontsFolder::CompareIDs
|
||||
*/
|
||||
|
||||
HRESULT WINAPI CFontsFolder::CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
|
||||
HRESULT WINAPI CFontsFolder::CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2)
|
||||
{
|
||||
int nReturn;
|
||||
|
||||
|
@ -325,7 +325,7 @@ HRESULT WINAPI CFontsFolder::CreateViewObject(HWND hwndOwner, REFIID riid, LPVOI
|
|||
/**************************************************************************
|
||||
* CFontsFolder::GetAttributesOf
|
||||
*/
|
||||
HRESULT WINAPI CFontsFolder::GetAttributesOf(UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut)
|
||||
HRESULT WINAPI CFontsFolder::GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut)
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
|
@ -381,7 +381,7 @@ HRESULT WINAPI CFontsFolder::GetAttributesOf(UINT cidl, LPCITEMIDLIST *apidl, DW
|
|||
*/
|
||||
HRESULT WINAPI CFontsFolder::GetUIObjectOf(
|
||||
HWND hwndOwner,
|
||||
UINT cidl, LPCITEMIDLIST *apidl,
|
||||
UINT cidl, PCUITEMID_CHILD_ARRAY apidl,
|
||||
REFIID riid, UINT *prgfInOut, LPVOID *ppvOut)
|
||||
{
|
||||
LPITEMIDLIST pidl;
|
||||
|
@ -441,7 +441,7 @@ HRESULT WINAPI CFontsFolder::GetUIObjectOf(
|
|||
* CFontsFolder::GetDisplayNameOf
|
||||
*
|
||||
*/
|
||||
HRESULT WINAPI CFontsFolder::GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet)
|
||||
HRESULT WINAPI CFontsFolder::GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet)
|
||||
{
|
||||
PIDLFontStruct *pFont;
|
||||
|
||||
|
@ -499,8 +499,8 @@ HRESULT WINAPI CFontsFolder::GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags,
|
|||
* dwFlags [in] SHGNO formatting flags
|
||||
* ppidlOut [out] simple pidl returned
|
||||
*/
|
||||
HRESULT WINAPI CFontsFolder::SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */
|
||||
LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut)
|
||||
HRESULT WINAPI CFontsFolder::SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, /*simple pidl */
|
||||
LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut)
|
||||
{
|
||||
FIXME ("(%p)->(%p,pidl=%p,%s,%u,%p)\n", this,
|
||||
hwndOwner, pidl, debugstr_w (lpName), dwFlags, pPidlOut);
|
||||
|
@ -541,13 +541,13 @@ HRESULT WINAPI CFontsFolder::GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CFontsFolder::GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv)
|
||||
HRESULT WINAPI CFontsFolder::GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv)
|
||||
{
|
||||
FIXME ("(%p)\n", this);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CFontsFolder::GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd)
|
||||
HRESULT WINAPI CFontsFolder::GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd)
|
||||
{
|
||||
WCHAR buffer[MAX_PATH] = {0};
|
||||
HRESULT hr = E_FAIL;
|
||||
|
|
|
@ -39,24 +39,24 @@ class CFontsFolder :
|
|||
HRESULT WINAPI FinalConstruct();
|
||||
|
||||
// IShellFolder
|
||||
virtual HRESULT WINAPI ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, LPITEMIDLIST *ppidl, DWORD *pdwAttributes);
|
||||
virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes);
|
||||
virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList);
|
||||
virtual HRESULT WINAPI BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2);
|
||||
virtual HRESULT WINAPI BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2);
|
||||
virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI GetAttributesOf (UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut);
|
||||
virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut);
|
||||
virtual HRESULT WINAPI GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet);
|
||||
virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut);
|
||||
virtual HRESULT WINAPI GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut);
|
||||
virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut);
|
||||
virtual HRESULT WINAPI GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet);
|
||||
virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut);
|
||||
|
||||
/* ShellFolder2 */
|
||||
virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid);
|
||||
virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum);
|
||||
virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay);
|
||||
virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags);
|
||||
virtual HRESULT WINAPI GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv);
|
||||
virtual HRESULT WINAPI GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd);
|
||||
virtual HRESULT WINAPI GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv);
|
||||
virtual HRESULT WINAPI GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd);
|
||||
virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid);
|
||||
|
||||
// IPersist
|
||||
|
|
|
@ -171,7 +171,7 @@ LPITEMIDLIST SHELL32_CreatePidlFromBindCtx(IBindCtx *pbc, LPCWSTR path)
|
|||
HRESULT WINAPI CFSFolder::ParseDisplayName(HWND hwndOwner,
|
||||
LPBC pbc,
|
||||
LPOLESTR lpszDisplayName,
|
||||
DWORD *pchEaten, LPITEMIDLIST *ppidl,
|
||||
DWORD *pchEaten, PIDLIST_RELATIVE *ppidl,
|
||||
DWORD *pdwAttributes)
|
||||
{
|
||||
HRESULT hr = E_INVALIDARG;
|
||||
|
@ -297,7 +297,7 @@ HRESULT WINAPI CFSFolder::EnumObjects(
|
|||
* LPVOID* ppvObject //[out] Interface*
|
||||
*/
|
||||
HRESULT WINAPI CFSFolder::BindToObject(
|
||||
LPCITEMIDLIST pidl,
|
||||
PCUIDLIST_RELATIVE pidl,
|
||||
LPBC pbc,
|
||||
REFIID riid,
|
||||
LPVOID * ppvOut)
|
||||
|
@ -317,7 +317,7 @@ HRESULT WINAPI CFSFolder::BindToObject(
|
|||
* LPVOID* ppvObject //[out] Interface* returned
|
||||
*/
|
||||
HRESULT WINAPI CFSFolder::BindToStorage(
|
||||
LPCITEMIDLIST pidl,
|
||||
PCUIDLIST_RELATIVE pidl,
|
||||
LPBC pbcReserved,
|
||||
REFIID riid,
|
||||
LPVOID *ppvOut)
|
||||
|
@ -334,7 +334,8 @@ HRESULT WINAPI CFSFolder::BindToStorage(
|
|||
*/
|
||||
|
||||
HRESULT WINAPI CFSFolder::CompareIDs(LPARAM lParam,
|
||||
LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
|
||||
PCUIDLIST_RELATIVE pidl1,
|
||||
PCUIDLIST_RELATIVE pidl2)
|
||||
{
|
||||
int nReturn;
|
||||
|
||||
|
@ -390,7 +391,7 @@ HRESULT WINAPI CFSFolder::CreateViewObject(HWND hwndOwner,
|
|||
*
|
||||
*/
|
||||
HRESULT WINAPI CFSFolder::GetAttributesOf(UINT cidl,
|
||||
LPCITEMIDLIST * apidl, DWORD * rgfInOut)
|
||||
PCUITEMID_CHILD_ARRAY apidl, DWORD * rgfInOut)
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
|
@ -459,8 +460,9 @@ HRESULT WINAPI CFSFolder::GetAttributesOf(UINT cidl,
|
|||
* needs the positions.
|
||||
*/
|
||||
HRESULT WINAPI CFSFolder::GetUIObjectOf(HWND hwndOwner,
|
||||
UINT cidl, LPCITEMIDLIST * apidl, REFIID riid,
|
||||
UINT * prgfInOut, LPVOID * ppvOut)
|
||||
UINT cidl, PCUITEMID_CHILD_ARRAY apidl,
|
||||
REFIID riid, UINT * prgfInOut,
|
||||
LPVOID * ppvOut)
|
||||
{
|
||||
LPITEMIDLIST pidl;
|
||||
IUnknown *pObj = NULL;
|
||||
|
@ -604,7 +606,7 @@ void SHELL_FS_ProcessDisplayFilename(LPWSTR szPath, DWORD dwFlags)
|
|||
* if the name is in the pidl the ret value should be a STRRET_OFFSET
|
||||
*/
|
||||
|
||||
HRESULT WINAPI CFSFolder::GetDisplayNameOf(LPCITEMIDLIST pidl,
|
||||
HRESULT WINAPI CFSFolder::GetDisplayNameOf(PCUITEMID_CHILD pidl,
|
||||
DWORD dwFlags, LPSTRRET strRet)
|
||||
{
|
||||
LPWSTR pszPath;
|
||||
|
@ -684,10 +686,10 @@ HRESULT WINAPI CFSFolder::GetDisplayNameOf(LPCITEMIDLIST pidl,
|
|||
*/
|
||||
HRESULT WINAPI CFSFolder::SetNameOf(
|
||||
HWND hwndOwner,
|
||||
LPCITEMIDLIST pidl,
|
||||
PCUITEMID_CHILD pidl,
|
||||
LPCOLESTR lpName,
|
||||
DWORD dwFlags,
|
||||
LPITEMIDLIST * pPidlOut)
|
||||
PITEMID_CHILD *pPidlOut)
|
||||
{
|
||||
WCHAR szSrc[MAX_PATH + 1], szDest[MAX_PATH + 1];
|
||||
LPWSTR ptr;
|
||||
|
@ -785,7 +787,7 @@ HRESULT WINAPI CFSFolder::GetDefaultColumnState(UINT iColumn,
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CFSFolder::GetDetailsEx(LPCITEMIDLIST pidl,
|
||||
HRESULT WINAPI CFSFolder::GetDetailsEx(PCUITEMID_CHILD pidl,
|
||||
const SHCOLUMNID * pscid, VARIANT * pv)
|
||||
{
|
||||
FIXME ("(%p)\n", this);
|
||||
|
@ -793,7 +795,7 @@ HRESULT WINAPI CFSFolder::GetDetailsEx(LPCITEMIDLIST pidl,
|
|||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CFSFolder::GetDetailsOf(LPCITEMIDLIST pidl,
|
||||
HRESULT WINAPI CFSFolder::GetDetailsOf(PCUITEMID_CHILD pidl,
|
||||
UINT iColumn, SHELLDETAILS * psd)
|
||||
{
|
||||
HRESULT hr = E_FAIL;
|
||||
|
@ -1762,6 +1764,7 @@ DWORD WINAPI CFSFolder::_DoDropThreadProc(LPVOID lpParameter) {
|
|||
data->This->Release();
|
||||
//Release the parameter from the heap.
|
||||
HeapFree(GetProcessHeap(), 0, data);
|
||||
CoUninitialize();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -59,24 +59,24 @@ class CFSFolder :
|
|||
|
||||
|
||||
// IShellFolder
|
||||
virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, LPITEMIDLIST *ppidl, DWORD *pdwAttributes);
|
||||
virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes);
|
||||
virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList);
|
||||
virtual HRESULT WINAPI BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2);
|
||||
virtual HRESULT WINAPI BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2);
|
||||
virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI GetAttributesOf(UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut);
|
||||
virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut);
|
||||
virtual HRESULT WINAPI GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet);
|
||||
virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut);
|
||||
virtual HRESULT WINAPI GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut);
|
||||
virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut);
|
||||
virtual HRESULT WINAPI GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet);
|
||||
virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut);
|
||||
|
||||
/* ShellFolder2 */
|
||||
virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid);
|
||||
virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum);
|
||||
virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay);
|
||||
virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags);
|
||||
virtual HRESULT WINAPI GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv);
|
||||
virtual HRESULT WINAPI GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd);
|
||||
virtual HRESULT WINAPI GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv);
|
||||
virtual HRESULT WINAPI GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd);
|
||||
virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid);
|
||||
|
||||
// IPersist
|
||||
|
|
|
@ -193,7 +193,7 @@ HRESULT WINAPI CDrivesFolder::FinalConstruct()
|
|||
* CDrivesFolder::ParseDisplayName
|
||||
*/
|
||||
HRESULT WINAPI CDrivesFolder::ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName,
|
||||
DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes)
|
||||
DWORD * pchEaten, PIDLIST_RELATIVE * ppidl, DWORD * pdwAttributes)
|
||||
{
|
||||
HRESULT hr = E_INVALIDARG;
|
||||
LPCWSTR szNext = NULL;
|
||||
|
@ -287,7 +287,7 @@ HRESULT WINAPI CDrivesFolder::EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMI
|
|||
/**************************************************************************
|
||||
* CDrivesFolder::BindToObject
|
||||
*/
|
||||
HRESULT WINAPI CDrivesFolder::BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
|
||||
HRESULT WINAPI CDrivesFolder::BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
|
||||
{
|
||||
TRACE("(%p)->(pidl=%p,%p,%s,%p)\n", this,
|
||||
pidl, pbcReserved, shdebugstr_guid(&riid), ppvOut);
|
||||
|
@ -298,7 +298,7 @@ HRESULT WINAPI CDrivesFolder::BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved,
|
|||
/**************************************************************************
|
||||
* CDrivesFolder::BindToStorage
|
||||
*/
|
||||
HRESULT WINAPI CDrivesFolder::BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
|
||||
HRESULT WINAPI CDrivesFolder::BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
|
||||
{
|
||||
FIXME("(%p)->(pidl=%p,%p,%s,%p) stub\n", this,
|
||||
pidl, pbcReserved, shdebugstr_guid (&riid), ppvOut);
|
||||
|
@ -311,7 +311,7 @@ HRESULT WINAPI CDrivesFolder::BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved
|
|||
* CDrivesFolder::CompareIDs
|
||||
*/
|
||||
|
||||
HRESULT WINAPI CDrivesFolder::CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
|
||||
HRESULT WINAPI CDrivesFolder::CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2)
|
||||
{
|
||||
int nReturn;
|
||||
|
||||
|
@ -362,7 +362,7 @@ HRESULT WINAPI CDrivesFolder::CreateViewObject(HWND hwndOwner, REFIID riid, LPVO
|
|||
/**************************************************************************
|
||||
* CDrivesFolder::GetAttributesOf
|
||||
*/
|
||||
HRESULT WINAPI CDrivesFolder::GetAttributesOf(UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut)
|
||||
HRESULT WINAPI CDrivesFolder::GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD * rgfInOut)
|
||||
{
|
||||
static const DWORD dwComputerAttributes =
|
||||
SFGAO_CANRENAME | SFGAO_CANDELETE | SFGAO_HASPROPSHEET | SFGAO_DROPTARGET |
|
||||
|
@ -421,7 +421,7 @@ HRESULT WINAPI CDrivesFolder::GetAttributesOf(UINT cidl, LPCITEMIDLIST * apidl,
|
|||
*
|
||||
*/
|
||||
HRESULT WINAPI CDrivesFolder::GetUIObjectOf(HWND hwndOwner,
|
||||
UINT cidl, LPCITEMIDLIST *apidl,
|
||||
UINT cidl, PCUITEMID_CHILD_ARRAY apidl,
|
||||
REFIID riid, UINT *prgfInOut, LPVOID *ppvOut)
|
||||
{
|
||||
LPITEMIDLIST pidl;
|
||||
|
@ -486,7 +486,7 @@ HRESULT WINAPI CDrivesFolder::GetUIObjectOf(HWND hwndOwner,
|
|||
/**************************************************************************
|
||||
* CDrivesFolder::GetDisplayNameOf
|
||||
*/
|
||||
HRESULT WINAPI CDrivesFolder::GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet)
|
||||
HRESULT WINAPI CDrivesFolder::GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet)
|
||||
{
|
||||
LPWSTR pszPath;
|
||||
HRESULT hr = S_OK;
|
||||
|
@ -682,8 +682,8 @@ HRESULT WINAPI CDrivesFolder::GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags
|
|||
* dwFlags [in] SHGNO formatting flags
|
||||
* ppidlOut [out] simple pidl returned
|
||||
*/
|
||||
HRESULT WINAPI CDrivesFolder::SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl,
|
||||
LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut)
|
||||
HRESULT WINAPI CDrivesFolder::SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl,
|
||||
LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut)
|
||||
{
|
||||
LPWSTR sName;
|
||||
HKEY hKey;
|
||||
|
@ -766,14 +766,14 @@ HRESULT WINAPI CDrivesFolder::GetDefaultColumnState(UINT iColumn, DWORD * pcsFla
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CDrivesFolder::GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv)
|
||||
HRESULT WINAPI CDrivesFolder::GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID * pscid, VARIANT * pv)
|
||||
{
|
||||
FIXME ("(%p)\n", this);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/* FIXME: drive size >4GB is rolling over */
|
||||
HRESULT WINAPI CDrivesFolder::GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd)
|
||||
HRESULT WINAPI CDrivesFolder::GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd)
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
|
|
|
@ -39,24 +39,24 @@ class CDrivesFolder :
|
|||
HRESULT WINAPI FinalConstruct();
|
||||
|
||||
// IShellFolder
|
||||
virtual HRESULT WINAPI ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, LPITEMIDLIST *ppidl, DWORD *pdwAttributes);
|
||||
virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes);
|
||||
virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList);
|
||||
virtual HRESULT WINAPI BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2);
|
||||
virtual HRESULT WINAPI BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2);
|
||||
virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI GetAttributesOf (UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut);
|
||||
virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut);
|
||||
virtual HRESULT WINAPI GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet);
|
||||
virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut);
|
||||
virtual HRESULT WINAPI GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut);
|
||||
virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut);
|
||||
virtual HRESULT WINAPI GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet);
|
||||
virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut);
|
||||
|
||||
/* ShellFolder2 */
|
||||
virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid);
|
||||
virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum);
|
||||
virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay);
|
||||
virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags);
|
||||
virtual HRESULT WINAPI GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv);
|
||||
virtual HRESULT WINAPI GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd);
|
||||
virtual HRESULT WINAPI GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv);
|
||||
virtual HRESULT WINAPI GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd);
|
||||
virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid);
|
||||
|
||||
// IPersist
|
||||
|
|
|
@ -126,8 +126,8 @@ HRESULT WINAPI CMyDocsFolder::FinalConstruct()
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CMyDocsFolder::ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName,
|
||||
DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes)
|
||||
HRESULT WINAPI CMyDocsFolder::ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName,
|
||||
DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes)
|
||||
{
|
||||
WCHAR szElement[MAX_PATH];
|
||||
LPCWSTR szNext = NULL;
|
||||
|
@ -245,7 +245,7 @@ HRESULT WINAPI CMyDocsFolder::EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMI
|
|||
/**************************************************************************
|
||||
* CMyDocsFolder::BindToObject
|
||||
*/
|
||||
HRESULT WINAPI CMyDocsFolder::BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
|
||||
HRESULT WINAPI CMyDocsFolder::BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
|
||||
{
|
||||
TRACE("(%p)->(pidl=%p,%p,%s,%p)\n",
|
||||
this, pidl, pbcReserved, shdebugstr_guid (&riid), ppvOut);
|
||||
|
@ -256,7 +256,7 @@ HRESULT WINAPI CMyDocsFolder::BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved,
|
|||
/**************************************************************************
|
||||
* CMyDocsFolder::BindToStorage
|
||||
*/
|
||||
HRESULT WINAPI CMyDocsFolder::BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
|
||||
HRESULT WINAPI CMyDocsFolder::BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
|
||||
{
|
||||
FIXME("(%p)->(pidl=%p,%p,%s,%p) stub\n",
|
||||
this, pidl, pbcReserved, shdebugstr_guid (&riid), ppvOut);
|
||||
|
@ -268,7 +268,7 @@ HRESULT WINAPI CMyDocsFolder::BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved
|
|||
/**************************************************************************
|
||||
* CMyDocsFolder::CompareIDs
|
||||
*/
|
||||
HRESULT WINAPI CMyDocsFolder::CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
|
||||
HRESULT WINAPI CMyDocsFolder::CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2)
|
||||
{
|
||||
int nReturn;
|
||||
|
||||
|
@ -318,7 +318,7 @@ HRESULT WINAPI CMyDocsFolder::CreateViewObject(HWND hwndOwner, REFIID riid, LPVO
|
|||
/**************************************************************************
|
||||
* CMyDocsFolder::GetAttributesOf
|
||||
*/
|
||||
HRESULT WINAPI CMyDocsFolder::GetAttributesOf(UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut)
|
||||
HRESULT WINAPI CMyDocsFolder::GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut)
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
static const DWORD dwMyDocumentsAttributes =
|
||||
|
@ -370,7 +370,7 @@ HRESULT WINAPI CMyDocsFolder::GetAttributesOf(UINT cidl, LPCITEMIDLIST *apidl, D
|
|||
* LPVOID* ppvObject) //[out] Resulting Interface
|
||||
*
|
||||
*/
|
||||
HRESULT WINAPI CMyDocsFolder::GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl,
|
||||
HRESULT WINAPI CMyDocsFolder::GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl,
|
||||
REFIID riid, UINT * prgfInOut, LPVOID * ppvOut)
|
||||
{
|
||||
LPITEMIDLIST pidl;
|
||||
|
@ -435,7 +435,7 @@ HRESULT WINAPI CMyDocsFolder::GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMID
|
|||
return hr;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CMyDocsFolder::GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet)
|
||||
HRESULT WINAPI CMyDocsFolder::GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet)
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
LPWSTR pszPath;
|
||||
|
@ -575,8 +575,8 @@ HRESULT WINAPI CMyDocsFolder::GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags
|
|||
return hr;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CMyDocsFolder::SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, /* simple pidl */
|
||||
LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut)
|
||||
HRESULT WINAPI CMyDocsFolder::SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, /* simple pidl */
|
||||
LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut)
|
||||
{
|
||||
FIXME ("(%p)->(%p,pidl=%p,%s,%u,%p)\n", this, hwndOwner, pidl,
|
||||
debugstr_w (lpName), dwFlags, pPidlOut);
|
||||
|
@ -620,14 +620,14 @@ HRESULT WINAPI CMyDocsFolder::GetDefaultColumnState(UINT iColumn, DWORD *pcsFlag
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CMyDocsFolder::GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv)
|
||||
HRESULT WINAPI CMyDocsFolder::GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv)
|
||||
{
|
||||
FIXME ("(%p)\n", this);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CMyDocsFolder::GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd)
|
||||
HRESULT WINAPI CMyDocsFolder::GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd)
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
|
|
|
@ -40,24 +40,24 @@ class CMyDocsFolder :
|
|||
HRESULT WINAPI FinalConstruct();
|
||||
|
||||
// IShellFolder
|
||||
virtual HRESULT WINAPI ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, LPITEMIDLIST *ppidl, DWORD *pdwAttributes);
|
||||
virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes);
|
||||
virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList);
|
||||
virtual HRESULT WINAPI BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2);
|
||||
virtual HRESULT WINAPI BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2);
|
||||
virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI GetAttributesOf (UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut);
|
||||
virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut);
|
||||
virtual HRESULT WINAPI GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet);
|
||||
virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut);
|
||||
virtual HRESULT WINAPI GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut);
|
||||
virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut);
|
||||
virtual HRESULT WINAPI GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet);
|
||||
virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut);
|
||||
|
||||
/* ShellFolder2 */
|
||||
virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid);
|
||||
virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum);
|
||||
virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay);
|
||||
virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags);
|
||||
virtual HRESULT WINAPI GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv);
|
||||
virtual HRESULT WINAPI GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd);
|
||||
virtual HRESULT WINAPI GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv);
|
||||
virtual HRESULT WINAPI GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd);
|
||||
virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid);
|
||||
|
||||
// IPersist
|
||||
|
|
|
@ -66,7 +66,7 @@ HRESULT WINAPI CNetFolder::FinalConstruct()
|
|||
* CNetFolder::ParseDisplayName
|
||||
*/
|
||||
HRESULT WINAPI CNetFolder::ParseDisplayName(HWND hwndOwner, LPBC pbcReserved, LPOLESTR lpszDisplayName,
|
||||
DWORD *pchEaten, LPITEMIDLIST *ppidl, DWORD *pdwAttributes)
|
||||
DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes)
|
||||
{
|
||||
HRESULT hr = E_UNEXPECTED;
|
||||
|
||||
|
@ -101,7 +101,7 @@ HRESULT WINAPI CNetFolder::EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLI
|
|||
/**************************************************************************
|
||||
* CNetFolder::BindToObject
|
||||
*/
|
||||
HRESULT WINAPI CNetFolder::BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
|
||||
HRESULT WINAPI CNetFolder::BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
|
||||
{
|
||||
TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", this,
|
||||
pidl, pbcReserved, shdebugstr_guid (&riid), ppvOut);
|
||||
|
@ -112,7 +112,7 @@ HRESULT WINAPI CNetFolder::BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, RE
|
|||
/**************************************************************************
|
||||
* CNetFolder::BindToStorage
|
||||
*/
|
||||
HRESULT WINAPI CNetFolder::BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
|
||||
HRESULT WINAPI CNetFolder::BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
|
||||
{
|
||||
FIXME("(%p)->(pidl=%p,%p,%s,%p) stub\n", this,
|
||||
pidl, pbcReserved, shdebugstr_guid (&riid), ppvOut);
|
||||
|
@ -125,7 +125,7 @@ HRESULT WINAPI CNetFolder::BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, R
|
|||
* CNetFolder::CompareIDs
|
||||
*/
|
||||
|
||||
HRESULT WINAPI CNetFolder::CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
|
||||
HRESULT WINAPI CNetFolder::CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2)
|
||||
{
|
||||
int nReturn;
|
||||
|
||||
|
@ -176,7 +176,7 @@ HRESULT WINAPI CNetFolder::CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID
|
|||
/**************************************************************************
|
||||
* CNetFolder::GetAttributesOf
|
||||
*/
|
||||
HRESULT WINAPI CNetFolder::GetAttributesOf(UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut)
|
||||
HRESULT WINAPI CNetFolder::GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut)
|
||||
{
|
||||
static const DWORD dwNethoodAttributes =
|
||||
SFGAO_STORAGE | SFGAO_HASPROPSHEET | SFGAO_STORAGEANCESTOR |
|
||||
|
@ -226,7 +226,7 @@ HRESULT WINAPI CNetFolder::GetAttributesOf(UINT cidl, LPCITEMIDLIST *apidl, DWOR
|
|||
* ppvObject [out] Resulting Interface
|
||||
*
|
||||
*/
|
||||
HRESULT WINAPI CNetFolder::GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, REFIID riid,
|
||||
HRESULT WINAPI CNetFolder::GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid,
|
||||
UINT * prgfInOut, LPVOID * ppvOut)
|
||||
{
|
||||
LPITEMIDLIST pidl;
|
||||
|
@ -288,7 +288,7 @@ HRESULT WINAPI CNetFolder::GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIS
|
|||
* CNetFolder::GetDisplayNameOf
|
||||
*
|
||||
*/
|
||||
HRESULT WINAPI CNetFolder::GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet)
|
||||
HRESULT WINAPI CNetFolder::GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet)
|
||||
{
|
||||
FIXME("(%p)->(pidl=%p,0x%08x,%p)\n", this, pidl, dwFlags, strRet);
|
||||
pdump(pidl);
|
||||
|
@ -311,8 +311,8 @@ HRESULT WINAPI CNetFolder::GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, L
|
|||
* dwFlags [in] SHGNO formatting flags
|
||||
* ppidlOut [out] simple pidl returned
|
||||
*/
|
||||
HRESULT WINAPI CNetFolder::SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */
|
||||
LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut)
|
||||
HRESULT WINAPI CNetFolder::SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, /*simple pidl */
|
||||
LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut)
|
||||
{
|
||||
FIXME("(%p)->(%p,pidl=%p,%s,%u,%p)\n", this,
|
||||
hwndOwner, pidl, debugstr_w (lpName), dwFlags, pPidlOut);
|
||||
|
@ -353,13 +353,13 @@ HRESULT WINAPI CNetFolder::GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags)
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CNetFolder::GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv)
|
||||
HRESULT WINAPI CNetFolder::GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv)
|
||||
{
|
||||
FIXME("(%p)\n", this);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CNetFolder::GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd)
|
||||
HRESULT WINAPI CNetFolder::GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd)
|
||||
{
|
||||
WCHAR buffer[MAX_PATH] = {0};
|
||||
HRESULT hr = E_FAIL;
|
||||
|
|
|
@ -39,24 +39,24 @@ class CNetFolder :
|
|||
HRESULT WINAPI FinalConstruct();
|
||||
|
||||
// IShellFolder
|
||||
virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, LPITEMIDLIST *ppidl, DWORD *pdwAttributes);
|
||||
virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes);
|
||||
virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList);
|
||||
virtual HRESULT WINAPI BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2);
|
||||
virtual HRESULT WINAPI BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2);
|
||||
virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI GetAttributesOf(UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut);
|
||||
virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut);
|
||||
virtual HRESULT WINAPI GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet);
|
||||
virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut);
|
||||
virtual HRESULT WINAPI GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut);
|
||||
virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut);
|
||||
virtual HRESULT WINAPI GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet);
|
||||
virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut);
|
||||
|
||||
/* ShellFolder2 */
|
||||
virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid);
|
||||
virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum);
|
||||
virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay);
|
||||
virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags);
|
||||
virtual HRESULT WINAPI GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv);
|
||||
virtual HRESULT WINAPI GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd);
|
||||
virtual HRESULT WINAPI GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv);
|
||||
virtual HRESULT WINAPI GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd);
|
||||
virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid);
|
||||
|
||||
// IPersist
|
||||
|
|
|
@ -351,7 +351,7 @@ HRESULT WINAPI CPrinterFolder::FinalConstruct()
|
|||
* This is E_NOTIMPL in Windows too.
|
||||
*/
|
||||
HRESULT WINAPI CPrinterFolder::ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName,
|
||||
DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes)
|
||||
DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes)
|
||||
{
|
||||
TRACE("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n",
|
||||
this, hwndOwner, pbc, lpszDisplayName, debugstr_w(lpszDisplayName),
|
||||
|
@ -410,7 +410,7 @@ HRESULT WINAPI CPrinterFolder::EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUM
|
|||
/**************************************************************************
|
||||
* CPrinterFolder::BindToObject
|
||||
*/
|
||||
HRESULT WINAPI CPrinterFolder::BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut)
|
||||
HRESULT WINAPI CPrinterFolder::BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut)
|
||||
{
|
||||
TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", this,
|
||||
pidl, pbcReserved, shdebugstr_guid (&riid), ppvOut);
|
||||
|
@ -421,7 +421,7 @@ HRESULT WINAPI CPrinterFolder::BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved
|
|||
/**************************************************************************
|
||||
* ISF_Printers_fnBindToStorage
|
||||
*/
|
||||
HRESULT WINAPI CPrinterFolder::BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut)
|
||||
HRESULT WINAPI CPrinterFolder::BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut)
|
||||
{
|
||||
FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n",
|
||||
this, pidl, pbcReserved, shdebugstr_guid (&riid), ppvOut);
|
||||
|
@ -433,7 +433,7 @@ HRESULT WINAPI CPrinterFolder::BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserve
|
|||
/**************************************************************************
|
||||
* CPrinterFolder::CompareIDs
|
||||
*/
|
||||
HRESULT WINAPI CPrinterFolder::CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
|
||||
HRESULT WINAPI CPrinterFolder::CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2)
|
||||
{
|
||||
int nReturn;
|
||||
|
||||
|
@ -485,7 +485,7 @@ HRESULT WINAPI CPrinterFolder::CreateViewObject(HWND hwndOwner, REFIID riid, LPV
|
|||
/**************************************************************************
|
||||
* CPrinterFolder::GetAttributesOf
|
||||
*/
|
||||
HRESULT WINAPI CPrinterFolder::GetAttributesOf(UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut)
|
||||
HRESULT WINAPI CPrinterFolder::GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut)
|
||||
{
|
||||
static const DWORD dwPrintersAttributes =
|
||||
SFGAO_HASPROPSHEET | SFGAO_STORAGEANCESTOR | SFGAO_FILESYSANCESTOR | SFGAO_FOLDER | SFGAO_CANRENAME | SFGAO_CANDELETE;
|
||||
|
@ -514,7 +514,7 @@ HRESULT WINAPI CPrinterFolder::GetAttributesOf(UINT cidl, LPCITEMIDLIST *apidl,
|
|||
* LPVOID* ppvObject) //[out] Resulting Interface
|
||||
*
|
||||
*/
|
||||
HRESULT WINAPI CPrinterFolder::GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl,
|
||||
HRESULT WINAPI CPrinterFolder::GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl,
|
||||
REFIID riid, UINT * prgfInOut, LPVOID * ppvOut)
|
||||
{
|
||||
IUnknown *pObj = NULL;
|
||||
|
@ -545,7 +545,7 @@ HRESULT WINAPI CPrinterFolder::GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMI
|
|||
* CPrinterFolder::GetDisplayNameOf
|
||||
*
|
||||
*/
|
||||
HRESULT WINAPI CPrinterFolder::GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet)
|
||||
HRESULT WINAPI CPrinterFolder::GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet)
|
||||
{
|
||||
LPWSTR pszName;
|
||||
PIDLPrinterStruct * p;
|
||||
|
@ -604,8 +604,8 @@ HRESULT WINAPI CPrinterFolder::GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlag
|
|||
* DWORD dwFlags, //[in ] SHGNO formatting flags
|
||||
* LPITEMIDLIST* ppidlOut) //[out] simple pidl returned
|
||||
*/
|
||||
HRESULT WINAPI CPrinterFolder::SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, /* simple pidl */
|
||||
LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut)
|
||||
HRESULT WINAPI CPrinterFolder::SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, /* simple pidl */
|
||||
LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut)
|
||||
{
|
||||
FIXME("(%p)->(%p,pidl=%p,%s,%lu,%p)\n", this, hwndOwner, pidl,
|
||||
debugstr_w (lpName), dwFlags, pPidlOut);
|
||||
|
@ -644,14 +644,14 @@ HRESULT WINAPI CPrinterFolder::GetDefaultColumnState(UINT iColumn, DWORD *pcsFla
|
|||
|
||||
}
|
||||
|
||||
HRESULT WINAPI CPrinterFolder::GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv)
|
||||
HRESULT WINAPI CPrinterFolder::GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv)
|
||||
{
|
||||
FIXME("(%p): stub\n", this);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CPrinterFolder::GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd)
|
||||
HRESULT WINAPI CPrinterFolder::GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd)
|
||||
{
|
||||
WCHAR buffer[MAX_PATH] = {0};
|
||||
HRESULT hr = E_FAIL;
|
||||
|
|
|
@ -42,24 +42,24 @@ class CPrinterFolder :
|
|||
HRESULT WINAPI FinalConstruct();
|
||||
|
||||
// IShellFolder
|
||||
virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, LPITEMIDLIST *ppidl, DWORD *pdwAttributes);
|
||||
virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes);
|
||||
virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList);
|
||||
virtual HRESULT WINAPI BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2);
|
||||
virtual HRESULT WINAPI BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2);
|
||||
virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI GetAttributesOf(UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut);
|
||||
virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut);
|
||||
virtual HRESULT WINAPI GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet);
|
||||
virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut);
|
||||
virtual HRESULT WINAPI GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut);
|
||||
virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut);
|
||||
virtual HRESULT WINAPI GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet);
|
||||
virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut);
|
||||
|
||||
/* ShellFolder2 */
|
||||
virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid);
|
||||
virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum);
|
||||
virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay);
|
||||
virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags);
|
||||
virtual HRESULT WINAPI GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv);
|
||||
virtual HRESULT WINAPI GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd);
|
||||
virtual HRESULT WINAPI GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv);
|
||||
virtual HRESULT WINAPI GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd);
|
||||
virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid);
|
||||
|
||||
// IPersist
|
||||
|
|
|
@ -493,7 +493,7 @@ HRESULT WINAPI CRecycleBin::GetCurFolder(LPITEMIDLIST *ppidl)
|
|||
*/
|
||||
|
||||
HRESULT WINAPI CRecycleBin::ParseDisplayName(HWND hwnd, LPBC pbc,
|
||||
LPOLESTR pszDisplayName, ULONG *pchEaten, LPITEMIDLIST *ppidl,
|
||||
LPOLESTR pszDisplayName, ULONG *pchEaten, PIDLIST_RELATIVE *ppidl,
|
||||
ULONG *pdwAttributes)
|
||||
{
|
||||
FIXME("stub\n");
|
||||
|
@ -537,19 +537,19 @@ HRESULT WINAPI CRecycleBin::EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDL
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CRecycleBin::BindToObject(LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv)
|
||||
HRESULT WINAPI CRecycleBin::BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbc, REFIID riid, void **ppv)
|
||||
{
|
||||
FIXME("(%p, %p, %p, %s, %p) - stub\n", this, pidl, pbc, debugstr_guid(&riid), ppv);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CRecycleBin::BindToStorage(LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv)
|
||||
HRESULT WINAPI CRecycleBin::BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbc, REFIID riid, void **ppv)
|
||||
{
|
||||
FIXME("(%p, %p, %p, %s, %p) - stub\n", this, pidl, pbc, debugstr_guid(&riid), ppv);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CRecycleBin::CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
|
||||
HRESULT WINAPI CRecycleBin::CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2)
|
||||
{
|
||||
/* TODO */
|
||||
TRACE("(%p, %p, %p, %p)\n", this, (void *)lParam, pidl1, pidl2);
|
||||
|
@ -593,7 +593,7 @@ HRESULT WINAPI CRecycleBin::CreateViewObject(HWND hwndOwner, REFIID riid, void *
|
|||
|
||||
}
|
||||
|
||||
HRESULT WINAPI CRecycleBin::GetAttributesOf(UINT cidl, LPCITEMIDLIST *apidl,
|
||||
HRESULT WINAPI CRecycleBin::GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl,
|
||||
SFGAOF *rgfInOut)
|
||||
{
|
||||
TRACE("(%p, %d, {%p, ...}, {%x})\n", this, cidl, apidl ? apidl[0] : NULL, (unsigned int)*rgfInOut);
|
||||
|
@ -601,7 +601,7 @@ HRESULT WINAPI CRecycleBin::GetAttributesOf(UINT cidl, LPCITEMIDLIST *apidl,
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CRecycleBin::GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl,
|
||||
HRESULT WINAPI CRecycleBin::GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl,
|
||||
REFIID riid, UINT *prgfInOut, void **ppv)
|
||||
{
|
||||
IUnknown *pObj = NULL;
|
||||
|
@ -636,7 +636,7 @@ HRESULT WINAPI CRecycleBin::GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLI
|
|||
return hr;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CRecycleBin::GetDisplayNameOf(LPCITEMIDLIST pidl, SHGDNF uFlags, STRRET *pName)
|
||||
HRESULT WINAPI CRecycleBin::GetDisplayNameOf(PCUITEMID_CHILD pidl, SHGDNF uFlags, STRRET *pName)
|
||||
{
|
||||
PIDLRecycleStruct *pFileDetails;
|
||||
LPWSTR pFileName;
|
||||
|
@ -680,8 +680,8 @@ HRESULT WINAPI CRecycleBin::GetDisplayNameOf(LPCITEMIDLIST pidl, SHGDNF uFlags,
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CRecycleBin::SetNameOf(HWND hwnd, LPCITEMIDLIST pidl, LPCOLESTR pszName,
|
||||
SHGDNF uFlags, LPITEMIDLIST *ppidlOut)
|
||||
HRESULT WINAPI CRecycleBin::SetNameOf(HWND hwnd, PCUITEMID_CHILD pidl, LPCOLESTR pszName,
|
||||
SHGDNF uFlags, PITEMID_CHILD *ppidlOut)
|
||||
{
|
||||
TRACE("\n");
|
||||
return E_FAIL; /* not supported */
|
||||
|
@ -717,7 +717,7 @@ HRESULT WINAPI CRecycleBin::GetDefaultColumnState(UINT iColumn, SHCOLSTATEF *pcs
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CRecycleBin::GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv)
|
||||
HRESULT WINAPI CRecycleBin::GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv)
|
||||
{
|
||||
FIXME("stub\n");
|
||||
return E_NOTIMPL;
|
||||
|
@ -743,7 +743,7 @@ static HRESULT FormatDateTime(LPWSTR buffer, int size, FILETIME * ft)
|
|||
return (ret != 0 ? E_FAIL : S_OK);
|
||||
}
|
||||
|
||||
HRESULT WINAPI CRecycleBin::GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, LPSHELLDETAILS pDetails)
|
||||
HRESULT WINAPI CRecycleBin::GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, LPSHELLDETAILS pDetails)
|
||||
{
|
||||
PIDLRecycleStruct * pFileDetails;
|
||||
WCHAR buffer[MAX_PATH];
|
||||
|
@ -1460,8 +1460,9 @@ HRESULT WINAPI CRecycleBin::Drop(IDataObject *pDataObject,
|
|||
|
||||
/* Handle cfShellIDList Drop objects here, otherwise send the approriate message to other software */
|
||||
if (SUCCEEDED(pDataObject->QueryGetData(&fmt))) {
|
||||
pDataObject->AddRef();
|
||||
SHCreateThread(DoDeleteThreadProc, pDataObject, NULL, NULL);
|
||||
IStream *s;
|
||||
CoMarshalInterThreadInterfaceInStream(IID_IDataObject, pDataObject, &s);
|
||||
SHCreateThread(DoDeleteThreadProc, s, NULL, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1475,10 +1476,14 @@ HRESULT WINAPI CRecycleBin::Drop(IDataObject *pDataObject,
|
|||
|
||||
DWORD WINAPI DoDeleteThreadProc(LPVOID lpParameter)
|
||||
{
|
||||
IDataObject *pda = (IDataObject*) lpParameter;
|
||||
DoDeleteDataObject(pda);
|
||||
//Release the data object
|
||||
pda->Release();
|
||||
CoInitialize(NULL);
|
||||
CComPtr<IDataObject> pDataObject;
|
||||
HRESULT hr = CoGetInterfaceAndReleaseStream (static_cast<IStream*>(lpParameter), IID_PPV_ARG(IDataObject, &pDataObject));
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
DoDeleteDataObject(pDataObject);
|
||||
}
|
||||
CoUninitialize();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -55,24 +55,24 @@ class CRecycleBin :
|
|||
virtual HRESULT WINAPI GetCurFolder(LPITEMIDLIST * pidl);
|
||||
|
||||
// IShellFolder
|
||||
virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, LPITEMIDLIST *ppidl, DWORD *pdwAttributes);
|
||||
virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes);
|
||||
virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList);
|
||||
virtual HRESULT WINAPI BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2);
|
||||
virtual HRESULT WINAPI BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2);
|
||||
virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI GetAttributesOf(UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut);
|
||||
virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, REFIID riid, UINT *prgfInOut, LPVOID *ppvOut);
|
||||
virtual HRESULT WINAPI GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet);
|
||||
virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut);
|
||||
virtual HRESULT WINAPI GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut);
|
||||
virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut);
|
||||
virtual HRESULT WINAPI GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet);
|
||||
virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut);
|
||||
|
||||
// IShellFolder2
|
||||
virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid);
|
||||
virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum);
|
||||
virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay);
|
||||
virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags);
|
||||
virtual HRESULT WINAPI GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv);
|
||||
virtual HRESULT WINAPI GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd);
|
||||
virtual HRESULT WINAPI GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv);
|
||||
virtual HRESULT WINAPI GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd);
|
||||
virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid);
|
||||
|
||||
// IContextMenu
|
||||
|
|
|
@ -26,6 +26,7 @@ list(APPEND SOURCE
|
|||
add_library(fastfat SHARED ${SOURCE} vfatfs.rc)
|
||||
|
||||
set_module_type(fastfat kernelmodedriver)
|
||||
target_link_libraries(fastfat ${PSEH_LIB})
|
||||
add_importlibs(fastfat ntoskrnl hal)
|
||||
|
||||
add_pch(fastfat vfat.h SOURCE)
|
||||
|
|
|
@ -340,12 +340,14 @@ vfatFCBInitializeCacheFromVolume(
|
|||
{
|
||||
PFILE_OBJECT fileObject;
|
||||
PVFATCCB newCCB;
|
||||
NTSTATUS status;
|
||||
|
||||
fileObject = IoCreateStreamFileObject (NULL, vcb->StorageDevice);
|
||||
|
||||
newCCB = ExAllocateFromNPagedLookasideList(&VfatGlobalData->CcbLookasideList);
|
||||
if (newCCB == NULL)
|
||||
{
|
||||
ObDereferenceObject(fileObject);
|
||||
return STATUS_INSUFFICIENT_RESOURCES;
|
||||
}
|
||||
RtlZeroMemory(newCCB, sizeof (VFATCCB));
|
||||
|
@ -356,11 +358,24 @@ vfatFCBInitializeCacheFromVolume(
|
|||
fcb->FileObject = fileObject;
|
||||
fcb->RefCount++;
|
||||
|
||||
CcInitializeCacheMap(fileObject,
|
||||
(PCC_FILE_SIZES)(&fcb->RFCB.AllocationSize),
|
||||
TRUE,
|
||||
&VfatGlobalData->CacheMgrCallbacks,
|
||||
fcb);
|
||||
_SEH2_TRY
|
||||
{
|
||||
CcInitializeCacheMap(fileObject,
|
||||
(PCC_FILE_SIZES)(&fcb->RFCB.AllocationSize),
|
||||
TRUE,
|
||||
&VfatGlobalData->CacheMgrCallbacks,
|
||||
fcb);
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
status = _SEH2_GetExceptionCode();
|
||||
fcb->RefCount--;
|
||||
fcb->FileObject = NULL;
|
||||
ExFreeToNPagedLookasideList(&VfatGlobalData->CcbLookasideList, newCCB);
|
||||
ObDereferenceObject(fileObject);
|
||||
return status;
|
||||
}
|
||||
_SEH2_END;
|
||||
|
||||
fcb->Flags |= FCB_CACHE_INITIALIZED;
|
||||
return STATUS_SUCCESS;
|
||||
|
|
|
@ -550,11 +550,20 @@ VfatMount(
|
|||
Fcb->RFCB.ValidDataLength = Fcb->RFCB.FileSize;
|
||||
Fcb->RFCB.AllocationSize = Fcb->RFCB.FileSize;
|
||||
|
||||
CcInitializeCacheMap(DeviceExt->FATFileObject,
|
||||
(PCC_FILE_SIZES)(&Fcb->RFCB.AllocationSize),
|
||||
TRUE,
|
||||
&VfatGlobalData->CacheMgrCallbacks,
|
||||
Fcb);
|
||||
_SEH2_TRY
|
||||
{
|
||||
CcInitializeCacheMap(DeviceExt->FATFileObject,
|
||||
(PCC_FILE_SIZES)(&Fcb->RFCB.AllocationSize),
|
||||
TRUE,
|
||||
&VfatGlobalData->CacheMgrCallbacks,
|
||||
Fcb);
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
Status = _SEH2_GetExceptionCode();
|
||||
goto ByeBye;
|
||||
}
|
||||
_SEH2_END;
|
||||
|
||||
DeviceExt->LastAvailableCluster = 2;
|
||||
ExInitializeResourceLite(&DeviceExt->FatResource);
|
||||
|
|
|
@ -673,22 +673,35 @@ VfatRead(
|
|||
Status = /*STATUS_END_OF_FILE*/STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (IrpContext->FileObject->PrivateCacheMap == NULL)
|
||||
_SEH2_TRY
|
||||
{
|
||||
CcInitializeCacheMap(IrpContext->FileObject,
|
||||
(PCC_FILE_SIZES)(&Fcb->RFCB.AllocationSize),
|
||||
FALSE,
|
||||
&(VfatGlobalData->CacheMgrCallbacks),
|
||||
Fcb);
|
||||
}
|
||||
if (IrpContext->FileObject->PrivateCacheMap == NULL)
|
||||
{
|
||||
CcInitializeCacheMap(IrpContext->FileObject,
|
||||
(PCC_FILE_SIZES)(&Fcb->RFCB.AllocationSize),
|
||||
FALSE,
|
||||
&(VfatGlobalData->CacheMgrCallbacks),
|
||||
Fcb);
|
||||
}
|
||||
|
||||
if (!CcCopyRead(IrpContext->FileObject, &ByteOffset, Length,
|
||||
(BOOLEAN)(IrpContext->Flags & IRPCONTEXT_CANWAIT), Buffer,
|
||||
&IrpContext->Irp->IoStatus))
|
||||
if (!CcCopyRead(IrpContext->FileObject,
|
||||
&ByteOffset,
|
||||
Length,
|
||||
(IrpContext->Flags & IRPCONTEXT_CANWAIT) != 0,
|
||||
Buffer,
|
||||
&IrpContext->Irp->IoStatus))
|
||||
{
|
||||
ASSERT((IrpContext->Flags & IRPCONTEXT_CANWAIT) == 0);
|
||||
Status = STATUS_PENDING;
|
||||
goto ByeBye;
|
||||
}
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
Status = STATUS_PENDING;
|
||||
Status = _SEH2_GetExceptionCode();
|
||||
goto ByeBye;
|
||||
}
|
||||
_SEH2_END;
|
||||
|
||||
if (!NT_SUCCESS(IrpContext->Irp->IoStatus.Status))
|
||||
{
|
||||
|
@ -947,30 +960,42 @@ VfatWrite(
|
|||
{
|
||||
// cached write
|
||||
|
||||
if (IrpContext->FileObject->PrivateCacheMap == NULL)
|
||||
_SEH2_TRY
|
||||
{
|
||||
CcInitializeCacheMap(IrpContext->FileObject,
|
||||
(PCC_FILE_SIZES)(&Fcb->RFCB.AllocationSize),
|
||||
FALSE,
|
||||
&VfatGlobalData->CacheMgrCallbacks,
|
||||
Fcb);
|
||||
}
|
||||
if (IrpContext->FileObject->PrivateCacheMap == NULL)
|
||||
{
|
||||
CcInitializeCacheMap(IrpContext->FileObject,
|
||||
(PCC_FILE_SIZES)(&Fcb->RFCB.AllocationSize),
|
||||
FALSE,
|
||||
&VfatGlobalData->CacheMgrCallbacks,
|
||||
Fcb);
|
||||
}
|
||||
|
||||
if (ByteOffset.QuadPart > OldFileSize.QuadPart)
|
||||
{
|
||||
CcZeroData(IrpContext->FileObject, &OldFileSize, &ByteOffset, TRUE);
|
||||
}
|
||||
if (ByteOffset.QuadPart > OldFileSize.QuadPart)
|
||||
{
|
||||
CcZeroData(IrpContext->FileObject, &OldFileSize, &ByteOffset, TRUE);
|
||||
}
|
||||
|
||||
if (CcCopyWrite(IrpContext->FileObject, &ByteOffset, Length,
|
||||
1 /*IrpContext->Flags & IRPCONTEXT_CANWAIT*/, Buffer))
|
||||
{
|
||||
IrpContext->Irp->IoStatus.Information = Length;
|
||||
Status = STATUS_SUCCESS;
|
||||
if (CcCopyWrite(IrpContext->FileObject,
|
||||
&ByteOffset,
|
||||
Length,
|
||||
TRUE /*(IrpContext->Flags & IRPCONTEXT_CANWAIT) != 0*/,
|
||||
Buffer))
|
||||
{
|
||||
IrpContext->Irp->IoStatus.Information = Length;
|
||||
Status = STATUS_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
ASSERT(FALSE /*(IrpContext->Flags & IRPCONTEXT_CANWAIT) == 0*/);
|
||||
Status = STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
}
|
||||
else
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
Status = STATUS_UNSUCCESSFUL;
|
||||
Status = _SEH2_GetExceptionCode();
|
||||
}
|
||||
_SEH2_END;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include <ntifs.h>
|
||||
#include <ntdddisk.h>
|
||||
#include <dos.h>
|
||||
#include <pseh/pseh2.h>
|
||||
|
||||
#define USE_ROS_CC_AND_FS
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ NpCommonSetSecurityInfo(IN PDEVICE_OBJECT DeviceObject,
|
|||
IoGetFileObjectGenericMapping());
|
||||
if (!NT_SUCCESS(Status)) return Status;
|
||||
|
||||
Status = ObLogSecurityDescriptor(TempSecurityDescriptor, &NewSecurityDescriptor, TRUE);
|
||||
Status = ObLogSecurityDescriptor(TempSecurityDescriptor, &NewSecurityDescriptor, 1);
|
||||
ExFreePool(TempSecurityDescriptor);
|
||||
|
||||
if (!NT_SUCCESS(Status)) return Status;
|
||||
|
|
|
@ -74,6 +74,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
|
|||
Chars.MinorNdisVersion = NDIS_MINOR_VERSION;
|
||||
Chars.OpenAdapterCompleteHandler = NduOpenAdapterComplete;
|
||||
Chars.CloseAdapterCompleteHandler = NduCloseAdapterComplete;
|
||||
Chars.PnPEventHandler = NduNetPnPEvent;
|
||||
Chars.SendCompleteHandler = NduSendComplete;
|
||||
Chars.TransferDataCompleteHandler = NduTransferDataComplete;
|
||||
Chars.ResetCompleteHandler = NduResetComplete;
|
||||
|
|
|
@ -134,6 +134,11 @@ NTAPI
|
|||
NduCloseAdapterComplete(NDIS_HANDLE ProtocolBindingContext,
|
||||
NDIS_STATUS Status);
|
||||
|
||||
NDIS_STATUS
|
||||
NTAPI
|
||||
NduNetPnPEvent(NDIS_HANDLE ProtocolBindingContext,
|
||||
PNET_PNP_EVENT NetPnPEvent);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
NduSendComplete(NDIS_HANDLE ProtocolBindingContext,
|
||||
|
|
|
@ -40,6 +40,25 @@ NduCloseAdapterComplete(NDIS_HANDLE ProtocolBindingContext,
|
|||
KeSetEvent(&AdapterContext->AsyncEvent, IO_NO_INCREMENT, FALSE);
|
||||
}
|
||||
|
||||
NDIS_STATUS
|
||||
NTAPI
|
||||
NduNetPnPEvent(NDIS_HANDLE ProtocolBindingContext,
|
||||
PNET_PNP_EVENT NetPnPEvent)
|
||||
{
|
||||
DPRINT("NetPnPEvent\n");
|
||||
|
||||
switch (NetPnPEvent->NetEvent)
|
||||
{
|
||||
case NetEventQueryRemoveDevice:
|
||||
/* Nothing to do */
|
||||
return NDIS_STATUS_SUCCESS;
|
||||
|
||||
default:
|
||||
DPRINT1("NetPnPEvent unimplemented for net event 0x%x\n", NetPnPEvent->NetEvent);
|
||||
return NDIS_STATUS_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
NduSendComplete(NDIS_HANDLE ProtocolBindingContext,
|
||||
|
|
|
@ -222,7 +222,7 @@ PADDRESS_FILE AddrFindShared(
|
|||
* ARGUMENTS:
|
||||
* SearchContext = Pointer to search context
|
||||
* RETURNS:
|
||||
* Pointer to address file, NULL if none was found
|
||||
* Pointer to referenced address file, NULL if none was found
|
||||
*/
|
||||
PADDRESS_FILE AddrSearchNext(
|
||||
PAF_SEARCH SearchContext)
|
||||
|
@ -232,6 +232,7 @@ PADDRESS_FILE AddrSearchNext(
|
|||
KIRQL OldIrql;
|
||||
PADDRESS_FILE Current = NULL;
|
||||
BOOLEAN Found = FALSE;
|
||||
PADDRESS_FILE StartingAddrFile;
|
||||
|
||||
TcpipAcquireSpinLock(&AddressFileListLock, &OldIrql);
|
||||
|
||||
|
@ -241,8 +242,8 @@ PADDRESS_FILE AddrSearchNext(
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/* Remove the extra reference we added to keep this address file in memory */
|
||||
DereferenceObject(CONTAINING_RECORD(SearchContext->Next, ADDRESS_FILE, ListEntry));
|
||||
/* Save this pointer so we can dereference it later */
|
||||
StartingAddrFile = CONTAINING_RECORD(SearchContext->Next, ADDRESS_FILE, ListEntry);
|
||||
|
||||
CurrentEntry = SearchContext->Next;
|
||||
|
||||
|
@ -279,10 +280,16 @@ PADDRESS_FILE AddrSearchNext(
|
|||
/* Reference the next address file to prevent the link from disappearing behind our back */
|
||||
ReferenceObject(CONTAINING_RECORD(SearchContext->Next, ADDRESS_FILE, ListEntry));
|
||||
}
|
||||
|
||||
/* Reference the returned address file before dereferencing the starting
|
||||
* address file because it may be that Current == StartingAddrFile */
|
||||
ReferenceObject(Current);
|
||||
}
|
||||
else
|
||||
Current = NULL;
|
||||
|
||||
DereferenceObject(StartingAddrFile);
|
||||
|
||||
TcpipReleaseSpinLock(&AddressFileListLock, OldIrql);
|
||||
|
||||
return Current;
|
||||
|
|
|
@ -919,6 +919,7 @@ typedef struct _SCATTER_GATHER_CONTEXT {
|
|||
PVOID AdapterListControlContext, MapRegisterBase;
|
||||
ULONG MapRegisterCount;
|
||||
BOOLEAN WriteToDevice;
|
||||
WAIT_CONTEXT_BLOCK Wcb;
|
||||
} SCATTER_GATHER_CONTEXT, *PSCATTER_GATHER_CONTEXT;
|
||||
|
||||
|
||||
|
@ -1041,11 +1042,14 @@ HalpScatterGatherAdapterControl(IN PDEVICE_OBJECT DeviceObject,
|
|||
AdapterControlContext->AdapterListControlContext = Context;
|
||||
AdapterControlContext->WriteToDevice = WriteToDevice;
|
||||
|
||||
return IoAllocateAdapterChannel(AdapterObject,
|
||||
DeviceObject,
|
||||
AdapterControlContext->MapRegisterCount,
|
||||
HalpScatterGatherAdapterControl,
|
||||
AdapterControlContext);
|
||||
AdapterControlContext->Wcb.DeviceObject = DeviceObject;
|
||||
AdapterControlContext->Wcb.DeviceContext = AdapterControlContext;
|
||||
AdapterControlContext->Wcb.CurrentIrp = DeviceObject->CurrentIrp;
|
||||
|
||||
return HalAllocateAdapterChannel(AdapterObject,
|
||||
&AdapterControlContext->Wcb,
|
||||
AdapterControlContext->MapRegisterCount,
|
||||
HalpScatterGatherAdapterControl);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
55
include/crt/ivec.h
Normal file
55
include/crt/ivec.h
Normal file
|
@ -0,0 +1,55 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the mingw-w64 runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
#ifndef _IVEC_H_INCLUDED
|
||||
#define _IVEC_H_INCLUDED
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#if !defined __cplusplus
|
||||
#error This file is only supported in C++ compilations!
|
||||
#endif
|
||||
|
||||
#include <intrin.h>
|
||||
#include <assert.h>
|
||||
#include <dvec.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
#if defined(_ENABLE_VEC_DEBUG)
|
||||
#include <iostream>
|
||||
#endif
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
#ifdef __SSE__
|
||||
|
||||
#define _MM_QW (*((__int64*)&vec))
|
||||
|
||||
#pragma pack(push,16)
|
||||
|
||||
class M64
|
||||
{
|
||||
protected:
|
||||
__m64 vec;
|
||||
public:
|
||||
M64() {}
|
||||
M64(__m64 mm) { vec = mm; }
|
||||
M64(__int64 mm) { _MM_QW = mm; }
|
||||
M64(int i) { vec = _m_from_int(i); }
|
||||
|
||||
operator __m64() const { return vec; }
|
||||
|
||||
M64& operator&=(const M64 &a) { return *this = (M64) _m_pand(vec,a); }
|
||||
M64& operator|=(const M64 &a) { return *this = (M64) _m_por(vec,a); }
|
||||
M64& operator^=(const M64 &a) { return *this = (M64) _m_pxor(vec,a); }
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
#endif /* ifdef __SSE__ */
|
||||
|
||||
#endif
|
||||
#endif
|
627
include/psdk/bthdef.h
Normal file
627
include/psdk/bthdef.h
Normal file
|
@ -0,0 +1,627 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the mingw-w64 runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
#ifndef _INC_BTHDEF
|
||||
#define _INC_BTHDEF
|
||||
|
||||
#include <_mingw_unicode.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* ULONGLONG according to google */
|
||||
__MINGW_EXTENSION typedef ULONGLONG BTH_ADDR;
|
||||
/* ULONG according to google */
|
||||
typedef ULONG BTH_COD;
|
||||
|
||||
/*http://www.koders.com/delphi/fidD54082EB25FCAB99B74E5FDB4F3937EFB567FE9A.aspx*/
|
||||
/* The following parts are under LGPL */
|
||||
|
||||
DEFINE_GUID(GUID_BTHPORT_DEVICE_INTERFACE,0x0850302A,0xB344,0x4fda,0x9B,0xE9,0x90,0x57,0x6B,0x8D,0x46,0xF0);
|
||||
DEFINE_GUID(GUID_BLUETOOTH_RADIO_IN_RANGE,0xEA3B5B82,0x26EE,0x450E,0xB0,0xD8,0xD2,0x6F,0xE3,0x0A,0x38,0x69);
|
||||
DEFINE_GUID(GUID_BLUETOOTH_RADIO_OUT_OF_RANGE,0xE28867C9,0xC2AA,0x4CED,0xB9,0x69,0x45,0x70,0x86,0x60,0x37,0xC4);
|
||||
DEFINE_GUID(GUID_BLUETOOTH_PIN_REQUEST,0xBD198B7C,0x24AB,0x4B9A,0x8C,0x0D,0xA8,0xEA,0x83,0x49,0xAA,0x16);
|
||||
DEFINE_GUID(GUID_BLUETOOTH_L2CAP_EVENT,0x7EAE4030,0xB709,0x4AA8,0xAC,0x55,0xE9,0x53,0x82,0x9C,0x9D,0xAA);
|
||||
DEFINE_GUID(GUID_BLUETOOTH_HCI_EVENT,0xFC240062,0x1541,0x49BE,0xB4,0x63,0x84,0xC4,0xDC,0xD7,0xBF,0x7F);
|
||||
DEFINE_GUID(BLUETOOTH_BASE_UUID,0x00000000,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(SDP_PROTOCOL_UUID,0x00000001,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(UDP_PROTOCOL_UUID,0x00000002,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(RFCOMM_PROTOCOL_UUID,0x00000003,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(TCP_PROTOCOL_UUID,0x00000004,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(TCSBIN_PROTOCOL_UUID,0x00000005,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(TCSAT_PROTOCOL_UUID,0x00000006,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(OBEX_PROTOCOL_UUID,0x00000008,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(IP_PROTOCOL_UUID,0x00000009,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(FTP_PROTOCOL_UUID,0x0000000A,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(HTTP_PROTOCOL_UUID,0x0000000C,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(WSP_PROTOCOL_UUID,0x0000000E,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(BNEP_PROTOCOL_UUID,0x0000000F,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(UPNP_PROTOCOL_UUID,0x00000010,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(HCCC_PROTOCOL_UUID,0x00000012,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(HCDC_PROTOCOL_UUID,0x00000014,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(HN_PROTOCOL_UUID,0x00000016,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(AVCTP_PROTOCOL_UUID,0x00000017,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(AVDTP_PROTOCOL_UUID,0x00000019,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(CMPT_PROTOCOL_UUID,0x0000001B,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(UDI_C_PLANE_PROTOCOL_UUID,0x0000001D,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(L2CAP_PROTOCOL_UUID,0x00000100,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
|
||||
#define SDP_PROTOCOL_UUID16 0x0001
|
||||
#define UDP_PROTOCOL_UUID16 0x0002
|
||||
#define RFCOMM_PROTOCOL_UUID16 0x0003
|
||||
#define TCP_PROTOCOL_UUID16 0x0004
|
||||
#define TCSBIN_PROTOCOL_UUID16 0x0005
|
||||
#define TCSAT_PROTOCOL_UUID16 0x0006
|
||||
#define OBEX_PROTOCOL_UUID16 0x0008
|
||||
#define IP_PROTOCOL_UUID16 0x0009
|
||||
#define FTP_PROTOCOL_UUID16 0x000A
|
||||
#define HTTP_PROTOCOL_UUID16 0x000C
|
||||
#define WSP_PROTOCOL_UUID16 0x000E
|
||||
#define BNEP_PROTOCOL_UUID16 0x000F
|
||||
#define UPNP_PROTOCOL_UUID16 0x0010
|
||||
#define HID_PROTOCOL_UUID16 0x0011
|
||||
#define HCCC_PROTOCOL_UUID16 0x0012
|
||||
#define HCDC_PROTOCOL_UUID16 0x0014
|
||||
#define HCN_PROTOCOL_UUID16 0x0016
|
||||
#define AVCTP_PROTOCOL_UUID16 0x0017
|
||||
#define AVDTP_PROTOCOL_UUID16 0x0019
|
||||
#define CMPT_PROTOCOL_UUID16 0x001B
|
||||
#define UDI_C_PLANE_PROTOCOL_UUID16 0x001D
|
||||
#define L2CAP_PROTOCOL_UUID16 0x0100
|
||||
|
||||
DEFINE_GUID(ServiceDiscoveryServerServiceClassID_UUID,0x00001000,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(BrowseGroupDescriptorServiceClassID_UUID,0x00001001,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(PublicBrowseGroupServiceClass_UUID,0x00001002,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(SerialPortServiceClass_UUID,0x00001101,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(LANAccessUsingPPPServiceClass_UUID,0x00001102,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(DialupNetworkingServiceClass_UUID,0x00001103,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(IrMCSyncServiceClass_UUID,0x00001104,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(OBEXObjectPushServiceClass_UUID,0x00001105,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(OBEXFileTransferServiceClass_UUID,0x00001106,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(IrMCSyncCommandServiceClass_UUID,0x00001107,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(HeadsetServiceClass_UUID,0x00001108,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(CordlessTelephonyServiceClass_UUID,0x00001109,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(AudioSourceServiceClass_UUID,0x0000110A,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(AudioSinkServiceClass_UUID,0x0000110B,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(AVRemoteControlTargetServiceClass_UUID,0x0000110C,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(AdvancedAudioDistributionServiceClass_UUID,0x0000110D,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(AVRemoteControlServiceClass_UUID,0x0000110E,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(VideoConferencingServiceClass_UUID,0x0000110F,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(IntercomServiceClass_UUID,0x00001110,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(FaxServiceClass_UUID,0x00001111,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(HeadsetAudioGatewayServiceClass_UUID,0x00001112,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(WAPServiceClass_UUID,0x00001113,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(WAPClientServiceClass_UUID,0x00001114,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(PANUServiceClass_UUID,0x00001115,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(NAPServiceClass_UUID,0x00001116,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(GNServiceClass_UUID,0x00001117,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(DirectPrintingServiceClass_UUID,0x00001118,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(ReferencePrintingServiceClass_UUID,0x00001119,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(ImagingServiceClass_UUID,0x0000111A,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(ImagingResponderServiceClass_UUID,0x0000111B,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(ImagingAutomaticArchiveServiceClass_UUID,0x0000111C,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(ImagingReferenceObjectsServiceClass_UUID,0x0000111D,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(HandsfreeServiceClass_UUID,0x0000111E,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(HandsfreeAudioGatewayServiceClass_UUID,0x0000111F,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(DirectPrintingReferenceObjectsServiceClass_UUID,0x00001120,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(ReflectedUIServiceClass_UUID,0x00001121,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(BasicPringingServiceClass_UUID,0x00001122,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(PrintingStatusServiceClass_UUID,0x00001123,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(HumanInterfaceDeviceServiceClass_UUID,0x00001124,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(HardcopyCableReplacementServiceClass_UUID,0x00001125,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(HCRPrintServiceClass_UUID,0x00001126,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(HCRScanServiceClass_UUID,0x00001127,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(CommonISDNAccessServiceClass_UUID,0x00001128,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(VideoConferencingGWServiceClass_UUID,0x00001129,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(UDIMTServiceClass_UUID,0x0000112A,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(UDITAServiceClass_UUID,0x0000112B,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(AudioVideoServiceClass_UUID,0x0000112C,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(PnPInformationServiceClass_UUID,0x00001200,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(GenericNetworkingServiceClass_UUID,0x00001201,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(GenericFileTransferServiceClass_UUID,0x00001202,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(GenericAudioServiceClass_UUID,0x00001203,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
DEFINE_GUID(GenericTelephonyServiceClass_UUID,0x00001204,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB);
|
||||
|
||||
#define ServiceDiscoveryServerServiceClassID_UUID16 0x1000
|
||||
#define BrowseGroupDescriptorServiceClassID_UUID16 0x1001
|
||||
#define PublicBrowseGroupServiceClassID_UUID16 0x1002
|
||||
#define SerialPortServiceClassID_UUID16 0x1101
|
||||
#define LANAccessUsingPPPServiceClassID_UUID16 0x1102
|
||||
#define DialupNetworkingServiceClassID_UUID16 0x1103
|
||||
#define IrMCSyncServiceClassID_UUID16 0x1104
|
||||
#define OBEXObjectPushServiceClassID_UUID16 0x1105
|
||||
#define OBEXFileTransferServiceClassID_UUID16 0x1106
|
||||
#define IrMcSyncCommandServiceClassID_UUID16 0x1107
|
||||
#define HeadsetServiceClassID_UUID16 0x1108
|
||||
#define CordlessServiceClassID_UUID16 0x1109
|
||||
#define AudioSourceServiceClassID_UUID16 0x110A
|
||||
#define AudioSinkSourceServiceClassID_UUID16 0x110B
|
||||
#define AVRemoteControlTargetServiceClassID_UUID16 0x110C
|
||||
#define AdvancedAudioDistributionServiceClassID_UUID16 0x110D
|
||||
#define AVRemoteControlServiceClassID_UUID16 0x110E
|
||||
#define VideoConferencingServiceClassID_UUID16 0x110F
|
||||
#define IntercomServiceClassID_UUID16 0x1110
|
||||
#define FaxServiceClassID_UUID16 0x1111
|
||||
#define HeadsetAudioGatewayServiceClassID_UUID16 0x1112
|
||||
#define WAPServiceClassID_UUID16 0x1113
|
||||
#define WAPClientServiceClassID_UUID16 0x1114
|
||||
#define PANUServiceClassID_UUID16 0x1115
|
||||
#define NAPServiceClassID_UUID16 0x1116
|
||||
#define GNServiceClassID_UUID16 0x1117
|
||||
#define DirectPrintingServiceClassID_UUID16 0x1118
|
||||
#define ReferencePrintingServiceClassID_UUID16 0x1119
|
||||
#define ImagingServiceClassID_UUID16 0x111A
|
||||
#define ImagingResponderServiceClassID_UUID16 0x111B
|
||||
#define ImagingAutomaticArchiveServiceClassID_UUID16 0x111C
|
||||
#define ImagingReferenceObjectsServiceClassID_UUID16 0x111D
|
||||
#define HandsfreeServiceClassID_UUID16 0x111E
|
||||
#define HandsfreeAudioGatewayServiceClassID_UUID16 0x111F
|
||||
#define DirectPrintingReferenceObjectsServiceClassID_UUID16 0x1120
|
||||
#define ReflectsUIServiceClassID_UUID16 0x1121
|
||||
#define BasicPrintingServiceClassID_UUID16 0x1122
|
||||
#define PrintingStatusServiceClassID_UUID16 0x1123
|
||||
#define HumanInterfaceDeviceServiceClassID_UUID16 0x1124
|
||||
#define HardcopyCableReplacementServiceClassID_UUID16 0x1125
|
||||
#define HCRPrintServiceClassID_UUID16 0x1126
|
||||
#define HCRScanServiceClassID_UUID16 0x1127
|
||||
#define CommonISDNAccessServiceClass_UUID16 0x1128
|
||||
#define VideoConferencingGWServiceClass_UUID16 0x1129
|
||||
#define UDIMTServiceClass_UUID16 0x112A
|
||||
#define UDITAServiceClass_UUID16 0x112B
|
||||
#define AudioVideoServiceClass_UUID16 0x112C
|
||||
|
||||
#define PnPInformationServiceClassID_UUID16 0x1200
|
||||
#define GenericNetworkingServiceClassID_UUID16 0x1201
|
||||
#define GenericFileTransferServiceClassID_UUID16 0x1202
|
||||
#define GenericAudioServiceClassID_UUID16 0x1203
|
||||
#define GenericTelephonyServiceClassID_UUID16 0x1204
|
||||
|
||||
#define BTH_MAX_NAME_SIZE 248
|
||||
#define BTH_MAX_PIN_SIZE 16
|
||||
#define BTH_LINK_KEY_LENGTH 16
|
||||
|
||||
#define BTH_MFG_ERICSSON 0
|
||||
#define BTH_MFG_NOKIA 1
|
||||
#define BTH_MFG_INTEL 2
|
||||
#define BTH_MFG_IBM 3
|
||||
#define BTH_MFG_TOSHIBA 4
|
||||
#define BTH_MFG_3COM 5
|
||||
#define BTH_MFG_MICROSOFT 6
|
||||
#define BTH_MFG_LUCENT 7
|
||||
#define BTH_MFG_MOTOROLA 8
|
||||
#define BTH_MFG_INFINEON 9
|
||||
#define BTH_MFG_CSR 10
|
||||
#define BTH_MFG_SILICONWAVE 11
|
||||
#define BTH_MFG_DIGIANSWER 12
|
||||
#define BTH_MFG_TI 13
|
||||
#define BTH_MFG_PARTHUS 14
|
||||
#define BTH_MFG_BROADCOM 15
|
||||
#define BTH_MFG_MITEL 16
|
||||
#define BTH_MFG_WIDCOMM 17
|
||||
#define BTH_MFG_ZEEVO 18
|
||||
#define BTH_MFG_ATMEL 19
|
||||
#define BTH_MFG_MITSIBUSHI 20
|
||||
#define BTH_MFG_RTX_TELECOM 21
|
||||
#define BTH_MFG_KC_TECHNOLOGY 22
|
||||
#define BTH_MFG_NEWLOGIC 23
|
||||
#define BTH_MFG_TRANSILICA 24
|
||||
#define BTH_MFG_ROHDE_SCHWARZ 25
|
||||
#define BTH_MFG_TTPCOM 26
|
||||
#define BTH_MFG_SIGNIA 27
|
||||
#define BTH_MFG_CONEXANT 28
|
||||
#define BTH_MFG_QUALCOMM 29
|
||||
#define BTH_MFG_INVENTEL 30
|
||||
#define BTH_MFG_AVM_BERLIN 31
|
||||
#define BTH_MFG_BANDSPEED 32
|
||||
#define BTH_MFG_MANSELLA 33
|
||||
#define BTH_MFG_NEC 34
|
||||
#define BTH_MFG_WAVEPLUS_TECHNOLOGY_CO 35
|
||||
#define BTH_MFG_ALCATEL 36
|
||||
#define BTH_MFG_PHILIPS_SEMICONDUCTOR 37
|
||||
#define BTH_MFG_C_TECHNOLOGIES 38
|
||||
#define BTH_MFG_OPEN_INTERFACE 39
|
||||
#define BTH_MFG_RF_MICRO_DEVICES 40
|
||||
#define BTH_MFG_HITACHI 41
|
||||
#define BTH_MFG_SYMBOL_TECHNOLOGIES 42
|
||||
#define BTH_MFG_TENOVIS 43
|
||||
#define BTH_MFG_MACRONIX_INTERNATIONAL 44
|
||||
#define BTH_MFG_INTERNAL_USE 65535
|
||||
|
||||
#define BTH_ADDR_NULL 0ULL
|
||||
|
||||
#define NAP_MASK 0xFFFF00000000ULL
|
||||
#define SAP_MASK 0x0000FFFFFFFFULL
|
||||
#define NAP_BIT_OFFSET 32
|
||||
#define SAP_BIT_OFFSET 0
|
||||
|
||||
#define GET_NAP(X) (((X)&NAP_MASK)>>NAP_BIT_OFFSET)
|
||||
#define GET_SAP(X) (((X)&SAP_MASK)>>SAP_BIT_OFFSET)
|
||||
#define SET_NAP(X) ((X)<<NAP_BIT_OFFSET)
|
||||
#define SET_SAP(X) ((X)<<SAP_BIT_OFFSET)
|
||||
#define SET_NAP_SAP(X,Y) (SET_NAP(X)|SET_SAP(Y))
|
||||
|
||||
#define COD_FORMAT_BIT_OFFSET 0
|
||||
#define COD_MINOR_BIT_OFFSET 2
|
||||
#define COD_MAJOR_BIT_OFFSET 8
|
||||
#define COD_SERVICE_BIT_OFFSET 13
|
||||
|
||||
#define COD_FORMAT_MASK 0x000003
|
||||
#define COD_MINOR_MASK 0x0000FC
|
||||
#define COD_MAJOR_MASK 0x001F00
|
||||
#define COD_SERVICE_MASK 0xFFE0000
|
||||
|
||||
#define GET_COD_FORMAT(X) (((X) & COD_FORMAT_MASK) >> COD_FORMAT_BIT_OFFSET)
|
||||
#define GET_COD_MINOR(X) (((X) & COD_MINOR_MASK) >> COD_MINOR_BIT_OFFSET)
|
||||
#define GET_COD_MAJOR(X) (((X) & COD_MAJOR_MASK) >> COD_MAJOR_BIT_OFFSET)
|
||||
#define GET_COD_SERVICE(X) (((X) & COD_SERVICE_MASK) >> COD_SERVICE_BIT_OFFSET)
|
||||
|
||||
#define SET_COD_MINOR(X,Y) (((X) & ~(COD_MINOR_MASK)) | ((Y) << COD_MINOR_BIT_OFFSET))
|
||||
#define SET_COD_MAJOR(X,Y) (((X) & ~(COD_MAJOR_MASK)) | ((Y) << COD_MAJOR_BIT_OFFSET))
|
||||
#define SET_COD_SERVICE(X,Y) (((X) & ~(COD_SERVICE_MASK)) | ((Y) << COD_SERVICE_BIT_OFFSET))
|
||||
|
||||
#define COD_VERSION 0
|
||||
|
||||
#define COD_SERVICE_LIMITED 0x0001
|
||||
#define COD_SERVICE_POSITIONING 0x0008
|
||||
#define COD_SERVICE_NETWORKING 0x0010
|
||||
#define COD_SERVICE_RENDERING 0x0020
|
||||
#define COD_SERVICE_CAPTURING 0x0040
|
||||
#define COD_SERVICE_OBJECT_XFER 0x0080
|
||||
#define COD_SERVICE_AUDIO 0x0100
|
||||
#define COD_SERVICE_TELEPHONY 0x0200
|
||||
#define COD_SERVICE_INFORMATION 0x0400
|
||||
|
||||
#define COD_SERVICE_VALID_MASK (COD_SERVICE_LIMITED|COD_SERVICE_POSITIONING|COD_SERVICE_NETWORKING|COD_SERVICE_RENDERING|COD_SERVICE_CAPTURING|COD_SERVICE_OBJECT_XFER|COD_SERVICE_AUDIO|COD_SERVICE_TELEPHONY|COD_SERVICE_INFORMATION)
|
||||
|
||||
#define COD_SERVICE_MAX_COUNT 9
|
||||
|
||||
#define COD_MAJOR_MISCELLANEOUS 0x00
|
||||
#define COD_MAJOR_COMPUTER 0x01
|
||||
#define COD_MAJOR_PHONE 0x02
|
||||
#define COD_MAJOR_LAN_ACCESS 0x03
|
||||
#define COD_MAJOR_AUDIO 0x04
|
||||
#define COD_MAJOR_PERIPHERAL 0x05
|
||||
#define COD_MAJOR_IMAGING 0x06
|
||||
#define COD_MAJOR_UNCLASSIFIED 0x1F
|
||||
|
||||
#define COD_COMPUTER_MINOR_UNCLASSIFIED 0x00
|
||||
#define COD_COMPUTER_MINOR_DESKTOP 0x01
|
||||
#define COD_COMPUTER_MINOR_SERVER 0x02
|
||||
#define COD_COMPUTER_MINOR_LAPTOP 0x03
|
||||
#define COD_COMPUTER_MINOR_HANDHELD 0x04
|
||||
#define COD_COMPUTER_MINOR_PALM 0x05
|
||||
#define COD_COMPUTER_MINOR_WEARABLE 0x06
|
||||
|
||||
#define COD_PHONE_MINOR_UNCLASSIFIED 0x00
|
||||
#define COD_PHONE_MINOR_CELLULAR 0x01
|
||||
#define COD_PHONE_MINOR_CORDLESS 0x02
|
||||
#define COD_PHONE_MINOR_SMART 0x03
|
||||
#define COD_PHONE_MINOR_WIRED_MODEM 0x04
|
||||
|
||||
#define COD_AUDIO_MINOR_UNCLASSIFIED 0x00
|
||||
#define COD_AUDIO_MINOR_HEADSET 0x01
|
||||
#define COD_AUDIO_MINOR_HANDS_FREE 0x02
|
||||
#define COD_AUDIO_MINOR_HEADSET_HANDS_FREE 0x03
|
||||
#define COD_AUDIO_MINOR_MICROPHONE 0x04
|
||||
#define COD_AUDIO_MINOR_LOUDSPEAKER 0x05
|
||||
#define COD_AUDIO_MINOR_HEADPHONES 0x06
|
||||
#define COD_AUDIO_MINOR_PORTABLE_AUDIO 0x07
|
||||
#define COD_AUDIO_MINOR_CAR_AUDIO 0x08
|
||||
#define COD_AUDIO_MINOR_SET_TOP_BOX 0x09
|
||||
#define COD_AUDIO_MINOR_HIFI_AUDIO 0x0A
|
||||
#define COD_AUDIO_MINOR_VCR 0x0B
|
||||
#define COD_AUDIO_MINOR_VIDEO_CAMERA 0x0C
|
||||
#define COD_AUDIO_MINOR_CAMCORDER 0x0D
|
||||
#define COD_AUDIO_MINOR_VIDEO_MONITOR 0x0E
|
||||
#define COD_AUDIO_MINOR_VIDEO_DISPLAY_LOUDSPEAKER 0x0F
|
||||
#define COD_AUDIO_MINOR_VIDEO_DISPLAY_CONFERENCING 0x10
|
||||
/* #define COD_AUDIO_MINOR_RESERVED 0x11 */
|
||||
#define COD_AUDIO_MINOR_GAMING_TOY 0x12
|
||||
|
||||
#define COD_PERIPHERAL_MINOR_KEYBOARD_MASK 0x10
|
||||
#define COD_PERIPHERAL_MINOR_POINTER_MASK 0x20
|
||||
|
||||
#define COD_PERIPHERAL_MINOR_NO_CATEGORY 0x00
|
||||
#define COD_PERIPHERAL_MINOR_JOYSTICK 0x01
|
||||
#define COD_PERIPHERAL_MINOR_GAMEPAD 0x02
|
||||
#define COD_PERIPHERAL_MINOR_REMOTE_CONTROL 0x03
|
||||
#define COD_PERIPHERAL_MINOR_SENSING 0x04
|
||||
|
||||
#define COD_IMAGING_MINOR_DISPLAY_MASK 0x04
|
||||
#define COD_IMAGING_MINOR_CAMERA_MASK 0x08
|
||||
#define COD_IMAGING_MINOR_SCANNER_MASK 0x10
|
||||
#define COD_IMAGING_MINOR_PRINTER_MASK 0x20
|
||||
|
||||
#define COD_LAN_ACCESS_BIT_OFFSET 5
|
||||
#define COD_LAN_MINOR_MASK 0x0000001C
|
||||
#define COD_LAN_ACCESS_MASK 0x000000E0
|
||||
|
||||
#define GET_COD_LAN_MINOR(X) (((X) & COD_LAN_MINOR_MASK) >> COD_MINOR_BIT_OFFSET)
|
||||
#define GET_COD_LAN_ACCESS(X) (((X) & COD_LAN_ACCESS_MASK) >> COD_LAN_ACCESS_BIT_OFFSET)
|
||||
|
||||
#define COD_LAN_MINOR_UNCLASSIFIED 0x00
|
||||
|
||||
#define COD_LAN_ACCESS_0_USED 0x00
|
||||
#define COD_LAN_ACCESS_17_USED 0x01
|
||||
#define COD_LAN_ACCESS_33_USED 0x02
|
||||
#define COD_LAN_ACCESS_50_USED 0x03
|
||||
#define COD_LAN_ACCESS_67_USED 0x04
|
||||
#define COD_LAN_ACCESS_83_USED 0x05
|
||||
#define COD_LAN_ACCESS_99_USED 0x06
|
||||
#define COD_LAN_ACCESS_FULL 0x07
|
||||
|
||||
#define LAP_GIAC_VALUE 0x009E8B00
|
||||
|
||||
#define LAP_LIAC_VALUE 0x009E8B00
|
||||
#define BTH_ADDR_IAC_FIRST 0x9E8B00
|
||||
#define BTH_ADDR_IAC_LAST 0x9E8B3
|
||||
#define BTH_ADDR_LIAC 0x9E8B00
|
||||
#define BTH_ADDR_GIAC 0x9E8B33
|
||||
|
||||
typedef UCHAR BTHSTATUS, *PBTHSTATUS;
|
||||
|
||||
#define BTH_ERROR(X) ((X) != BTH_ERROR_SUCCESS)
|
||||
#define BTH_SUCCESS(X) ((X) === BTH_ERROR_SUCCESS)
|
||||
|
||||
#define BTH_ERROR_SUCCESS 0x00
|
||||
#define BTH_ERROR_UNKNOWN_HCI_COMMAND 0x01
|
||||
#define BTH_ERROR_NO_CONNECTION 0x02
|
||||
#define BTH_ERROR_HARDWARE_FAILURE 0x03
|
||||
#define BTH_ERROR_PAGE_TIMEOUT 0x04
|
||||
#define BTH_ERROR_AUTHENTICATION_FAILURE 0x05
|
||||
#define BTH_ERROR_KEY_MISSING 0x06
|
||||
#define BTH_ERROR_MEMORY_FULL 0x07
|
||||
#define BTH_ERROR_CONNECTION_TIMEOUT 0x08
|
||||
#define BTH_ERROR_MAX_NUMBER_OF_CONNECTIONS 0x09
|
||||
#define BTH_ERROR_MAX_NUMBER_OF_SCO_CONNECTIONS 0x0A
|
||||
#define BTH_ERROR_ACL_CONNECTION_ALREADY_EXISTS 0x0B
|
||||
#define BTH_ERROR_COMMAND_DISALLOWED 0x0C
|
||||
#define TH_ERROR_COMMAND_DISALLOWED 0x0D
|
||||
#define BTH_ERROR_HOST_REJECTED_SECURITY_REASONS 0x0E
|
||||
#define BTH_ERROR_HOST_REJECTED_PERSONAL_DEVICE 0x0F
|
||||
#define BTH_ERROR_HOST_TIMEOUT 0x10
|
||||
#define BTH_ERROR_UNSUPPORTED_FEATURE_OR_PARAMETER 0x11
|
||||
#define BTH_ERROR_INVALID_HCI_PARAMETER 0x12
|
||||
#define BTH_ERROR_REMOTE_USER_ENDED_CONNECTION 0x13
|
||||
#define BTH_ERROR_REMOTE_LOW_RESOURCES 0x14
|
||||
#define BTH_ERROR_REMOTE_POWERING_OFF 0x15
|
||||
#define BTH_ERROR_LOCAL_HOST_TERMINATED_CONNECTION 0x16
|
||||
#define BTH_ERROR_REPEATED_ATTEMPTS 0x17
|
||||
#define BTH_ERROR_PAIRING_NOT_ALLOWED 0x18
|
||||
#define BTH_ERROR_UKNOWN_LMP_PDU 0x19
|
||||
#define BTH_ERROR_UNSUPPORTED_REMOTE_FEATURE 0x1A
|
||||
#define BTH_ERROR_SCO_OFFSET_REJECTED 0x1B
|
||||
#define BTH_ERROR_SCO_INTERVAL_REJECTED 0x1C
|
||||
#define BTH_ERROR_SCO_AIRMODE_REJECTED 0x1D
|
||||
#define BTH_ERROR_INVALID_LMP_PARAMETERS 0x1E
|
||||
#define BTH_ERROR_UNSPECIFIED_ERROR 0x1F
|
||||
#define BTH_ERROR_UNSUPPORTED_LMP_PARM_VALUE 0x20
|
||||
#define BTH_ERROR_ROLE_CHANGE_NOT_ALLOWED 0x21
|
||||
#define BTH_ERROR_LMP_RESPONSE_TIMEOUT 0x22
|
||||
#define BTH_ERROR_LMP_TRANSACTION_COLLISION 0x23
|
||||
#define BTH_ERROR_LMP_PDU_NOT_ALLOWED 0x24
|
||||
#define BTH_ERROR_ENCRYPTION_MODE_NOT_ACCEPTABLE 0x25
|
||||
#define BTH_ERROR_UNIT_KEY_NOT_USED 0x26
|
||||
#define BTH_ERROR_QOS_IS_NOT_SUPPORTED 0x27
|
||||
#define BTH_ERROR_INSTANT_PASSED 0x28
|
||||
#define BTH_ERROR_PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED 0x29
|
||||
#define BTH_ERROR_UNSPECIFIED 0xFF
|
||||
|
||||
#define L2CAP_MIN_MTU 48
|
||||
#define L2CAP_MAX_MTU 0xFFFF
|
||||
#define L2CAP_DEFAULT_MTU 672
|
||||
|
||||
#define MAX_L2CAP_PING_DATA_LENGTH 44
|
||||
#define MAX_L2CAP_INFO_DATA_LENGTH 44
|
||||
|
||||
#define BDIF_ADDRESS 0x00000001
|
||||
#define BDIF_COD 0x00000002
|
||||
#define BDIF_NAME 0x00000004
|
||||
#define BDIF_PAIRED 0x00000008
|
||||
#define BDIF_PERSONAL 0x00000010
|
||||
#define BDIF_CONNECTED 0x00000020
|
||||
#define BDIF_VALID_FLAGS (BDIF_ADDRESS|BDIF_COD|BDIF_NAME|BDIF_PAIRED|BDIF_PERSONAL|BDIF_CONNECTED)
|
||||
|
||||
typedef struct _BTH_DEVICE_INFO {
|
||||
ULONG flags;
|
||||
BTH_ADDR address;
|
||||
BTH_COD classOfDevice;
|
||||
CHAR name[BTH_MAX_NAME_SIZE];
|
||||
} BTH_DEVICE_INFO, *PBTH_DEVICE_INFO;
|
||||
|
||||
typedef struct _BTH_RADIO_IN_RANGE {
|
||||
BTH_DEVICE_INFO deviceInfo;
|
||||
ULONG previousDeviceFlags;
|
||||
} BTH_RADIO_IN_RANGE, *PBTH_RADIO_IN_RANGE;
|
||||
|
||||
typedef struct _BTH_L2CAP_EVENT_INFO {
|
||||
BTH_ADDR bthAddress;
|
||||
USHORT psm;
|
||||
UCHAR connected;
|
||||
UCHAR initiated;
|
||||
} BTH_L2CAP_EVENT_INFO, *PBTH_L2CAP_EVENT_INFO;
|
||||
|
||||
#define HCI_CONNNECTION_TYPE_ACL 1
|
||||
#define HCI_CONNNECTION_TYPE_SCO 2
|
||||
|
||||
typedef struct _BTH_HCI_EVENT_INFO {
|
||||
BTH_ADDR bthAddress;
|
||||
UCHAR connectionType;
|
||||
UCHAR connected;
|
||||
} BTH_HCI_EVENT_INFO, *PBTH_HCI_EVENT_INFO;
|
||||
|
||||
#define MAX_UUIDS_IN_QUERY 12
|
||||
#define BTH_VID_DEFAULT_VALUE 0xFFFF
|
||||
|
||||
#define SDP_ERROR_INVALID_SDP_VERSION 0x0001
|
||||
#define SDP_ERROR_INVALID_RECORD_HANDLE 0x0002
|
||||
#define SDP_ERROR_INVALID_REQUEST_SYNTAX 0x0003
|
||||
#define SDP_ERROR_INVALID_PDU_SIZE 0x0004
|
||||
#define SDP_ERROR_INVALID_CONTINUATION_STATE 0x0005
|
||||
#define SDP_ERROR_INSUFFICIENT_RESOURCES 0x0006
|
||||
|
||||
#define SDP_ERROR_SUCCESS 0x0000
|
||||
#define SDP_ERROR_SERVER_INVALID_RESPONSE 0x0100
|
||||
#define SDP_ERROR_SERVER_RESPONSE_DID_NOT_PARSE 0x0200
|
||||
#define SDP_ERROR_SERVER_BAD_FORMAT 0x0300
|
||||
#define SDP_ERROR_COULD_NOT_SEND_CONTINUE 0x0400
|
||||
#define SDP_ERROR_RESPONSE_TOO_LARGE 0x0500
|
||||
|
||||
#define SDP_ATTRIB_RECORD_HANDLE 0x0000
|
||||
#define SDP_ATTRIB_CLASS_ID_LIST 0x0001
|
||||
#define SDP_ATTRIB_RECORD_STATE 0x0002
|
||||
#define SDP_ATTRIB_SERVICE_ID 0x0003
|
||||
#define SDP_ATTRIB_PROTOCOL_DESCRIPTOR_LIST 0x0004
|
||||
#define SDP_ATTRIB_BROWSE_GROUP_LIST 0x0005
|
||||
#define SDP_ATTRIB_LANG_BASE_ATTRIB_ID_LIST 0x0006
|
||||
#define SDP_ATTRIB_INFO_TIME_TO_LIVE 0x0007
|
||||
#define SDP_ATTRIB_AVAILABILITY 0x0008
|
||||
#define SDP_ATTRIB_PROFILE_DESCRIPTOR_LIST 0x0009
|
||||
#define SDP_ATTRIB_DOCUMENTATION_URL 0x000A
|
||||
#define SDP_ATTRIB_CLIENT_EXECUTABLE_URL 0x000B
|
||||
#define SDP_ATTRIB_ICON_URL 0x000C
|
||||
#define SDP_ATTRIB_ADDITIONAL_PROTOCOL_DESCRIPTOR_LIST 0x000D
|
||||
|
||||
#define SDP_ATTRIB_PROFILE_SPECIFIC 0x0200
|
||||
|
||||
#define LANG_BASE_LANGUAGE_INDEX 0x0000
|
||||
#define LANG_BASE_ENCODING_INDEX 0x0001
|
||||
#define LANG_BASE_OFFSET_INDEX 0x0002
|
||||
#define LANG_DEFAULT_ID 0x0100
|
||||
|
||||
#define STRING_NAME_OFFSET 0x0000
|
||||
#define STRING_DESCRIPTION_OFFSET 0x0001
|
||||
#define STRING_PROVIDER_NAME_OFFSET 0x0002
|
||||
|
||||
#define SDP_ATTRIB_SDP_VERSION_NUMBER_LIST 0x0200
|
||||
#define SDP_ATTRIB_SDP_DATABASE_STATE 0x0201
|
||||
|
||||
#define SDP_ATTRIB_BROWSE_GROUP_ID 0x0200
|
||||
|
||||
#define SDP_ATTRIB_CORDLESS_EXTERNAL_NETWORK 0x0301
|
||||
|
||||
#define SDP_ATTRIB_FAX_CLASS_1_SUPPORT 0x0302
|
||||
#define SDP_ATTRIB_FAX_CLASS_2_0_SUPPORT 0x0303
|
||||
#define SDP_ATTRIB_FAX_CLASS_2_SUPPORT 0x0304
|
||||
#define SDP_ATTRIB_FAX_AUDIO_FEEDBACK_SUPPORT 0x0305
|
||||
|
||||
#define SDP_ATTRIB_HEADSET_REMOTE_AUDIO_VOLUME_CONTROL 0x0302
|
||||
|
||||
#define SDP_ATTRIB_LAN_LPSUBNET 0x0200
|
||||
|
||||
#define SDP_ATTRIB_OBJECT_PUSH_SUPPORTED_FORMATS_LIST 0x0303
|
||||
#define SDP_ATTRIB_SYNCH_SUPPORTED_DATA_STORES_LIST 0x0301
|
||||
|
||||
#define SDP_ATTRIB_SERVICE_VERSION 0x0300
|
||||
|
||||
#define SDP_ATTRIB_PAN_NETWORK_ADDRESS 0x0306
|
||||
#define SDP_ATTRIB_PAN_WAP_GATEWAY 0x0307
|
||||
#define SDP_ATTRIB_PAN_HOME_PAGE_URL 0x0308
|
||||
#define SDP_ATTRIB_PAN_WAP_STACK_TYPE 0x0309
|
||||
#define SDP_ATTRIB_PAN_SECURITY_DESCRIPTION 0x030A
|
||||
#define SDP_ATTRIB_PAN_NET_ACCESS_TYPE 0x030B
|
||||
#define SDP_ATTRIB_PAN_MAX_NET_ACCESS_RATE 0x030C
|
||||
|
||||
#define SDP_ATTRIB_IMAGING_SUPPORTED_CAPABILITIES 0x0310
|
||||
#define SDP_ATTRIB_IMAGING_SUPPORTED_FEATURES 0x0311
|
||||
#define SDP_ATTRIB_IMAGING_SUPPORTED_FUNCTIONS 0x0312
|
||||
#define SDP_ATTRIB_IMAGING_TOTAL_DATA_CAPACITY 0x0313
|
||||
|
||||
#define SDP_ATTRIB_DI_SPECIFICATION_ID 0x0200
|
||||
#define SDP_ATTRIB_DI_VENDOR_ID 0x0201
|
||||
#define SDP_ATTRIB_DI_PRODUCT_ID 0x0202
|
||||
#define SDP_ATTRIB_DI_VERSION 0x0203
|
||||
#define SDP_ATTRIB_DI_PRIMARY_RECORD 0x0204
|
||||
#define SDP_ATTRIB_DI_VENDOR_ID_SOURCE 0x0205
|
||||
|
||||
#define SDP_ATTRIB_HID_DEVICE_RELEASE_NUMBER 0x0200
|
||||
#define SDP_ATTRIB_HID_PARSER_VERSION 0x0201
|
||||
#define SDP_ATTRIB_HID_DEVICE_SUBCLASS 0x0202
|
||||
#define SDP_ATTRIB_HID_COUNTRY_CODE 0x0203
|
||||
#define SDP_ATTRIB_HID_VIRTUAL_CABLE 0x0204
|
||||
#define SDP_ATTRIB_HID_RECONNECT_INITIATE 0x0205
|
||||
#define SDP_ATTRIB_HID_DESCRIPTOR_LIST 0x0206
|
||||
#define SDP_ATTRIB_HID_LANG_ID_BASE_LIST 0x0207
|
||||
#define SDP_ATTRIB_HID_SDP_DISABLE 0x0208
|
||||
#define SDP_ATTRIB_HID_BATTERY_POWER 0x0209
|
||||
#define SDP_ATTRIB_HID_REMOTE_WAKE 0x020A
|
||||
#define SDP_ATTRIB_HID_REPORT_LIST 0x020B
|
||||
#define SDP_ATTRIB_HID_SUPERVISION_TIMEOUT 0x020C
|
||||
#define SDP_ATTRIB_HID_NORMALLY_CONNECTABLE 0x020D
|
||||
#define SDP_ATTRIB_HID_BOOT_DEVICE 0x020E
|
||||
|
||||
#define CORDLESS_EXTERNAL_NETWORK_PSTN 0x01
|
||||
#define CORDLESS_EXTERNAL_NETWORK_ISDN 0x02
|
||||
#define CORDLESS_EXTERNAL_NETWORK_GSM 0x03
|
||||
#define CORDLESS_EXTERNAL_NETWORK_CDMA 0x04
|
||||
#define CORDLESS_EXTERNAL_NETWORK_ANALOG_CELLULAR 0x05
|
||||
#define CORDLESS_EXTERNAL_NETWORK_PACKET_SWITCHED 0x06
|
||||
#define CORDLESS_EXTERNAL_NETWORK_OTHER 0x07
|
||||
|
||||
#define OBJECT_PUSH_FORMAT_VCARD_2_1 0x01
|
||||
#define OBJECT_PUSH_FORMAT_VCARD_3_0 0x02
|
||||
#define OBJECT_PUSH_FORMAT_VCAL_1_0 0x03
|
||||
#define OBJECT_PUSH_FORMAT_ICAL_2_0 0x04
|
||||
#define OBJECT_PUSH_FORMAT_VNOTE 0x05
|
||||
#define OBJECT_PUSH_FORMAT_VMESSAGE 0x06
|
||||
#define OBJECT_PUSH_FORMAT_ANY 0xFF
|
||||
|
||||
#define SYNCH_DATA_STORE_PHONEBOOK 0x01
|
||||
#define SYNCH_DATA_STORE_CALENDAR 0x03
|
||||
#define SYNCH_DATA_STORE_NOTES 0x05
|
||||
#define SYNCH_DATA_STORE_MESSAGES 0x06
|
||||
|
||||
#define DI_VENDOR_ID_SOURCE_BLUETOOTH_SIG 0x0001
|
||||
#define DI_VENDOR_ID_SOURCE_USB_IF 0x0002
|
||||
|
||||
#define PSM_SDP 0x0001
|
||||
#define PSM_RFCOMM 0x0003
|
||||
#define PSM_TCS_BIN 0x0005
|
||||
#define PSM_TCS_BIN_CORDLESS 0x0007
|
||||
#define PSM_BNEP 0x0000
|
||||
#define PSM_HID_CONTROL 0x0011
|
||||
#define PSM_HID_INTERRUPT 0x0013
|
||||
#define PSM_AVCTP 0x0017
|
||||
#define PSM_AVDTP 0x0019
|
||||
#define PSM_UDI_C_PLANE 0x001D
|
||||
|
||||
#define STR_ADDR_FMTA "(%02x:%02x:%02x:%02x:%02x:%02x)"
|
||||
#define STR_ADDR_FMTW L"(%02x:%02x:%02x:%02x:%02x:%02x)"
|
||||
|
||||
#define STR_ADDR_SHORT_FMTA "%04x%08x"
|
||||
#define STR_ADDR_SHORT_FMTW L"%04x%08x"
|
||||
|
||||
#define STR_ADDR_FMT __MINGW_NAME_AW(STR_ADDR_FMT)
|
||||
#define STR_ADDR_SHORT_FMT __MINGW_NAME_AW(STR_ADDR_SHORT_FMT)
|
||||
|
||||
#define GET_BITS(X,Y,Z) (((X)>>(Y))&Z)
|
||||
#define GET_BIT(X,Y) GET_BITS(X,Y,0x1)
|
||||
|
||||
#define LMP_3_SLOT_PACKETS(X) GET_BIT(X, 1)
|
||||
#define LMP_ENCRYPTION(X) GET_BIT(X, 2)
|
||||
#define LMP_SLOT_OFFSET(X) GET_BIT(X, 3)
|
||||
#define LMP_TIMING_ACCURACY(X) GET_BIT(X, 4)
|
||||
#define LMP_SWITCH(X) GET_BIT(X, 5)
|
||||
#define LMP_HOLD_MODE(X) GET_BIT(X, 6)
|
||||
#define LMP_SNIFF_MODE(X) GET_BIT(X, 7)
|
||||
#define LMP_PARK_MODE(X) GET_BIT(X, 8)
|
||||
#define LMP_RSSI(X) GET_BIT(X, 9)
|
||||
#define LMP_CHANNEL_QUALITY_DRIVEN_MODE(X) GET_BIT(X, 10)
|
||||
#define LMP_SCO_LINK(X) GET_BIT(X, 11)
|
||||
#define LMP_HV2_PACKETS(X) GET_BIT(X, 12)
|
||||
#define LMP_HV3_PACKETS(X) GET_BIT(X, 13)
|
||||
#define LMP_MU_LAW_LOG(X) GET_BIT(X, 14)
|
||||
#define LMP_A_LAW_LOG(X) GET_BIT(X, 15)
|
||||
#define LMP_CVSD(X) GET_BIT(X, 16)
|
||||
#define LMP_PAGING_SCHEME(X) GET_BIT(X, 17)
|
||||
#define LMP_POWER_CONTROL(X) GET_BIT(X, 18)
|
||||
#define LMP_TRANSPARENT_SCO_DATA(X) GET_BIT(X, 19)
|
||||
#define LMP_FLOW_CONTROL_LAG(X) GET_BITS(X, 20, 0x3)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /*_INC_BTHDEF*/
|
|
@ -207,7 +207,7 @@ __ANNOTATION(SAL_IoGetDmaAdapter(void);)
|
|||
#define __drv_formatString(kind)
|
||||
#define __drv_freesMem(kind)
|
||||
#define __drv_fun(annotes)
|
||||
#define __drv_functionClass
|
||||
#define __drv_functionClass(x)
|
||||
#define __drv_holdsCancelSpinLock()
|
||||
#define __drv_holdsCriticalRegion()
|
||||
#define __drv_holdsPriorityRegion()
|
||||
|
|
|
@ -215,7 +215,7 @@ interface IShellFolder : IUnknown
|
|||
[in] LPBC pbcReserved,
|
||||
[in, string] LPOLESTR lpszDisplayName,
|
||||
[out] ULONG *pchEaten,
|
||||
[out] LPITEMIDLIST *ppidl,
|
||||
[out] PIDLIST_RELATIVE *ppidl,
|
||||
[in, out, unique] ULONG *pdwAttributes);
|
||||
|
||||
HRESULT EnumObjects(
|
||||
|
@ -332,8 +332,8 @@ interface IShellFolder2 : IShellFolder
|
|||
HRESULT EnumSearches( [out] IEnumExtraSearch **ppenum );
|
||||
HRESULT GetDefaultColumn( [in] DWORD dwReserved, [out] ULONG *pSort, [out] ULONG *pDisplay );
|
||||
HRESULT GetDefaultColumnState( [in] UINT iColumn, [out] SHCOLSTATEF *pcsFlags );
|
||||
HRESULT GetDetailsEx( [in] LPCITEMIDLIST pidl, [in] const SHCOLUMNID *pscid, [out] VARIANT *pv);
|
||||
HRESULT GetDetailsOf( [in] LPCITEMIDLIST pidl, [in] UINT iColumn, [out] SHELLDETAILS *psd);
|
||||
HRESULT GetDetailsEx( [in] PCUITEMID_CHILD pidl, [in] const SHCOLUMNID *pscid, [out] VARIANT *pv);
|
||||
HRESULT GetDetailsOf( [in] PCUITEMID_CHILD pidl, [in] UINT iColumn, [out] SHELLDETAILS *psd);
|
||||
HRESULT MapColumnToSCID( [in] UINT iColumn, [in] SHCOLUMNID *pscid );
|
||||
}
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ typedef LPITEMIDLIST PITEMID_CHILD;
|
|||
typedef const PITEMID_CHILD PCITEMID_CHILD;
|
||||
typedef LPCITEMIDLIST PCUITEMID_CHILD;
|
||||
typedef LPCITEMIDLIST *PCUITEMID_CHILD_ARRAY;
|
||||
typedef LPITEMIDLIST PIDLIST_RELATIVE;
|
||||
typedef LPCITEMIDLIST PCUIDLIST_RELATIVE;
|
||||
typedef LPITEMIDLIST PIDLIST_ABSOLUTE;
|
||||
typedef LPCITEMIDLIST PCIDLIST_ABSOLUTE;
|
||||
|
|
206
include/psdk/stralign.h
Normal file
206
include/psdk/stralign.h
Normal file
|
@ -0,0 +1,206 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the mingw-w64 runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
#ifndef __STRALIGN_H_
|
||||
#define __STRALIGN_H_
|
||||
|
||||
#ifndef _STRALIGN_USE_SECURE_CRT
|
||||
#define _STRALIGN_USE_SECURE_CRT 0
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef WSTR_ALIGNED
|
||||
#if defined (__amd64__) || defined (__arm__)
|
||||
#define WSTR_ALIGNED(s) TRUE
|
||||
#else
|
||||
#define WSTR_ALIGNED(s) (((DWORD_PTR)(s) & 1) == 0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_X86_)
|
||||
#define ua_CharUpperW CharUpperW
|
||||
#define ua_lstrcmpiW lstrcmpiW
|
||||
#define ua_lstrcmpW lstrcmpW
|
||||
#define ua_lstrlenW lstrlenW
|
||||
#define ua_wcschr wcschr
|
||||
#define ua_wcsicmp wcsicmp
|
||||
#define ua_wcslen wcslen
|
||||
#define ua_wcsrchr wcsrchr
|
||||
|
||||
PUWSTR ua_wcscpy(PUWSTR Destination,PCUWSTR Source);
|
||||
#if !defined (__CRT__NO_INLINE) && !defined (__CYGWIN__)
|
||||
__CRT_INLINE PUWSTR ua_wcscpy(PUWSTR Destination,PCUWSTR Source) { return wcscpy(Destination,Source); }
|
||||
#else
|
||||
#define ua_wcscpy wcscpy
|
||||
#endif
|
||||
|
||||
#else /* not _X86_ : */
|
||||
|
||||
#ifndef WSTR_ALIGNED
|
||||
#define WSTR_ALIGNED(s) (((DWORD_PTR)(s) & (sizeof(WCHAR)-1))==0)
|
||||
#endif
|
||||
|
||||
/* TODO: This method seems to be not present for amd64. */
|
||||
LPUWSTR WINAPI uaw_CharUpperW(LPUWSTR String);
|
||||
int WINAPI uaw_lstrcmpW(PCUWSTR String1,PCUWSTR String2);
|
||||
int WINAPI uaw_lstrcmpiW(PCUWSTR String1,PCUWSTR String2);
|
||||
int WINAPI uaw_lstrlenW(LPCUWSTR String);
|
||||
PUWSTR __cdecl uaw_wcschr(PCUWSTR String,WCHAR Character);
|
||||
PUWSTR __cdecl uaw_wcscpy(PUWSTR Destination,PCUWSTR Source);
|
||||
int __cdecl uaw_wcsicmp(PCUWSTR String1,PCUWSTR String2);
|
||||
size_t __cdecl uaw_wcslen(PCUWSTR String);
|
||||
PUWSTR __cdecl uaw_wcsrchr(PCUWSTR String,WCHAR Character);
|
||||
#ifdef CharUpper
|
||||
LPUWSTR ua_CharUpperW(LPUWSTR String);
|
||||
#ifndef __CRT__NO_INLINE
|
||||
__CRT_INLINE LPUWSTR ua_CharUpperW(LPUWSTR String) {
|
||||
if(WSTR_ALIGNED(String)) return CharUpperW((PWSTR)String);
|
||||
return uaw_CharUpperW(String);
|
||||
}
|
||||
#endif /* !__CRT__NO_INLINE */
|
||||
#endif /* CharUpper */
|
||||
|
||||
#ifdef lstrcmp
|
||||
int ua_lstrcmpW(LPCUWSTR String1,LPCUWSTR String2);
|
||||
#endif
|
||||
#ifdef lstrcmpi
|
||||
int ua_lstrcmpiW(LPCUWSTR String1,LPCUWSTR String2);
|
||||
#endif
|
||||
#ifdef lstrlen
|
||||
int ua_lstrlenW(LPCUWSTR String);
|
||||
#endif
|
||||
|
||||
#ifndef __CRT__NO_INLINE
|
||||
#ifdef lstrcmp
|
||||
__CRT_INLINE int ua_lstrcmpW(LPCUWSTR String1,LPCUWSTR String2) {
|
||||
if(WSTR_ALIGNED(String1) && WSTR_ALIGNED(String2))
|
||||
return lstrcmpW((LPCWSTR)String1,(LPCWSTR)String2);
|
||||
return uaw_lstrcmpW(String1,String2);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef lstrcmpi
|
||||
__CRT_INLINE int ua_lstrcmpiW(LPCUWSTR String1,LPCUWSTR String2) {
|
||||
if(WSTR_ALIGNED(String1) && WSTR_ALIGNED(String2))
|
||||
return lstrcmpiW((LPCWSTR)String1,(LPCWSTR)String2);
|
||||
return uaw_lstrcmpiW(String1,String2);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef lstrlen
|
||||
__CRT_INLINE int ua_lstrlenW(LPCUWSTR String) {
|
||||
if(WSTR_ALIGNED(String)) return lstrlenW((PCWSTR)String);
|
||||
return uaw_lstrlenW(String);
|
||||
}
|
||||
#endif
|
||||
#endif /* !__CRT__NO_INLINE */
|
||||
|
||||
#if defined(_WSTRING_DEFINED)
|
||||
#ifdef _WConst_return
|
||||
typedef _WConst_return WCHAR UNALIGNED *PUWSTR_C;
|
||||
#else
|
||||
typedef WCHAR UNALIGNED *PUWSTR_C;
|
||||
#endif
|
||||
|
||||
PUWSTR_C ua_wcschr(PCUWSTR String,WCHAR Character);
|
||||
PUWSTR_C ua_wcsrchr(PCUWSTR String,WCHAR Character);
|
||||
#if defined(__cplusplus) && defined(_WConst_Return)
|
||||
PUWSTR ua_wcschr(PUWSTR String,WCHAR Character);
|
||||
PUWSTR ua_wcsrchr(PUWSTR String,WCHAR Character);
|
||||
#endif
|
||||
PUWSTR ua_wcscpy(PUWSTR Destination,PCUWSTR Source);
|
||||
size_t ua_wcslen(PCUWSTR String);
|
||||
|
||||
#ifndef __CRT__NO_INLINE
|
||||
__CRT_INLINE PUWSTR_C ua_wcschr(PCUWSTR String,WCHAR Character) {
|
||||
if(WSTR_ALIGNED(String)) return wcschr((PCWSTR)String,Character);
|
||||
return (PUWSTR_C)uaw_wcschr(String,Character);
|
||||
}
|
||||
__CRT_INLINE PUWSTR_C ua_wcsrchr(PCUWSTR String,WCHAR Character) {
|
||||
if(WSTR_ALIGNED(String)) return wcsrchr((PCWSTR)String,Character);
|
||||
return (PUWSTR_C)uaw_wcsrchr(String,Character);
|
||||
}
|
||||
#if defined(__cplusplus) && defined(_WConst_Return)
|
||||
__CRT_INLINE PUWSTR ua_wcschr(PUWSTR String,WCHAR Character) {
|
||||
if(WSTR_ALIGNED(String)) return wcscpy((PWSTR)Destination,(PCWSTR)Source);
|
||||
return uaw_wcscpy(Destination,Source);
|
||||
}
|
||||
__CRT_INLINE PUWSTR ua_wcsrchr(PUWSTR String,WCHAR Character) {
|
||||
if(WSTR_ALIGNED(String)) return wcsrchr(String,Character);
|
||||
return uaw_wcsrchr((PCUWSTR)String,Character);
|
||||
}
|
||||
#endif
|
||||
|
||||
__CRT_INLINE PUWSTR ua_wcscpy(PUWSTR Destination,PCUWSTR Source) {
|
||||
if(WSTR_ALIGNED(Source) && WSTR_ALIGNED(Destination))
|
||||
return wcscpy((PWSTR)Destination,(PCWSTR)Source);
|
||||
return uaw_wcscpy(Destination,Source);
|
||||
}
|
||||
__CRT_INLINE size_t ua_wcslen(PCUWSTR String) {
|
||||
if(WSTR_ALIGNED(String)) return wcslen((PCWSTR)String);
|
||||
return uaw_wcslen(String);
|
||||
}
|
||||
#endif /* !__CRT__NO_INLINE */
|
||||
#endif /* _X86_ */
|
||||
int ua_wcsicmp(LPCUWSTR String1,LPCUWSTR String2);
|
||||
|
||||
#ifndef __CRT__NO_INLINE
|
||||
__CRT_INLINE int ua_wcsicmp(LPCUWSTR String1,LPCUWSTR String2) {
|
||||
if(WSTR_ALIGNED(String1) && WSTR_ALIGNED(String2))
|
||||
return _wcsicmp((LPCWSTR)String1,(LPCWSTR)String2);
|
||||
return uaw_wcsicmp(String1,String2);
|
||||
}
|
||||
#endif /* !__CRT__NO_INLINE */
|
||||
#endif /* _WSTRING_DEFINED */
|
||||
|
||||
#ifndef __UA_WCSLEN
|
||||
#define __UA_WCSLEN ua_wcslen
|
||||
#endif
|
||||
|
||||
#define __UA_WSTRSIZE(s) ((__UA_WCSLEN(s)+1)*sizeof(WCHAR))
|
||||
#define __UA_STACKCOPY(p,s) memcpy(_alloca(s),p,s)
|
||||
|
||||
#if defined (__amd64__) || defined (__arm__) || defined (_X86_)
|
||||
#define WSTR_ALIGNED_STACK_COPY(d,s) (*(d) = (PCWSTR)(s))
|
||||
#else
|
||||
#define WSTR_ALIGNED_STACK_COPY(d,s) { PCUWSTR __ua_src; ULONG __ua_size; PWSTR __ua_dst; __ua_src = (s); if(WSTR_ALIGNED(__ua_src)) { __ua_dst = (PWSTR)__ua_src; } else { __ua_size = __UA_WSTRSIZE(__ua_src); __ua_dst = (PWSTR)_alloca(__ua_size); memcpy(__ua_dst,__ua_src,__ua_size); } *(d) = (PCWSTR)__ua_dst; }
|
||||
#endif
|
||||
|
||||
#define ASTR_ALIGNED_STACK_COPY(d,s) (*(d) = (PCSTR)(s))
|
||||
|
||||
#if !defined (_X86_) && !defined (__amd64__) && !defined (__arm__)
|
||||
#define __UA_STRUC_ALIGNED(t,s) (((DWORD_PTR)(s) & (TYPE_ALIGNMENT(t)-1))==0)
|
||||
#define STRUC_ALIGNED_STACK_COPY(t,s) __UA_STRUC_ALIGNED(t,s) ? ((t const *)(s)) : ((t const *)__UA_STACKCOPY((s),sizeof(t)))
|
||||
#else
|
||||
#define STRUC_ALIGNED_STACK_COPY(t,s) ((CONST t *)(s))
|
||||
#endif
|
||||
|
||||
#if defined(UNICODE)
|
||||
#define TSTR_ALIGNED_STACK_COPY(d,s) WSTR_ALIGNED_STACK_COPY(d,s)
|
||||
#define TSTR_ALIGNED(x) WSTR_ALIGNED(x)
|
||||
#define ua_CharUpper ua_CharUpperW
|
||||
#define ua_lstrcmp ua_lstrcmpW
|
||||
#define ua_lstrcmpi ua_lstrcmpiW
|
||||
#define ua_lstrlen ua_lstrlenW
|
||||
#define ua_tcscpy ua_wcscpy
|
||||
#else
|
||||
#define TSTR_ALIGNED_STACK_COPY(d,s) ASTR_ALIGNED_STACK_COPY(d,s)
|
||||
#define TSTR_ALIGNED(x) TRUE
|
||||
#define ua_CharUpper CharUpperA
|
||||
#define ua_lstrcmp lstrcmpA
|
||||
#define ua_lstrcmpi lstrcmpiA
|
||||
#define ua_lstrlen lstrlenA
|
||||
#define ua_tcscpy strcpy
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#include <sec_api/stralign_s.h>
|
||||
#endif
|
|
@ -321,6 +321,7 @@ VOID RawIpReceive(PIP_INTERFACE Interface, PIP_PACKET IPPacket)
|
|||
0,
|
||||
IPPacket,
|
||||
DataSize);
|
||||
DereferenceObject(AddrFile);
|
||||
} while ((AddrFile = AddrSearchNext(&SearchContext)) != NULL);
|
||||
} else {
|
||||
/* There are no open address files that will take this datagram */
|
||||
|
|
|
@ -320,6 +320,7 @@ VOID UDPReceive(PIP_INTERFACE Interface, PIP_PACKET IPPacket)
|
|||
UDPHeader->DestPort,
|
||||
IPPacket,
|
||||
DataSize);
|
||||
DereferenceObject(AddrFile);
|
||||
} while ((AddrFile = AddrSearchNext(&SearchContext)) != NULL);
|
||||
} else {
|
||||
/* There are no open address files that will take this datagram */
|
||||
|
|
Binary file not shown.
|
@ -18,8 +18,13 @@
|
|||
static PFN_NUMBER CcZeroPage = 0;
|
||||
|
||||
#define MAX_ZERO_LENGTH (256 * 1024)
|
||||
#define MAX_RW_LENGTH (256 * 1024)
|
||||
C_ASSERT(MAX_RW_LENGTH <= VACB_MAPPING_GRANULARITY);
|
||||
|
||||
typedef enum _CC_COPY_OPERATION
|
||||
{
|
||||
CcOperationRead,
|
||||
CcOperationWrite,
|
||||
CcOperationZero
|
||||
} CC_COPY_OPERATION;
|
||||
|
||||
ULONG CcFastMdlReadWait;
|
||||
ULONG CcFastMdlReadNotPossible;
|
||||
|
@ -54,136 +59,6 @@ CcInitCacheZeroPage (
|
|||
MiZeroPhysicalPage(CcZeroPage);
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ReadVacbChain (
|
||||
PROS_SHARED_CACHE_MAP SharedCacheMap,
|
||||
ULONG ReadOffset,
|
||||
ULONG Length,
|
||||
PVOID Buffer)
|
||||
{
|
||||
PROS_VACB head;
|
||||
PROS_VACB current;
|
||||
PROS_VACB previous;
|
||||
IO_STATUS_BLOCK Iosb;
|
||||
NTSTATUS Status;
|
||||
ULONG TempLength;
|
||||
KEVENT Event;
|
||||
PMDL Mdl;
|
||||
|
||||
Mdl = _alloca(MmSizeOfMdl(NULL, MAX_RW_LENGTH));
|
||||
|
||||
Status = CcRosGetVacbChain(SharedCacheMap, ReadOffset, Length, &head);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
return Status;
|
||||
}
|
||||
current = head;
|
||||
while (current != NULL)
|
||||
{
|
||||
/*
|
||||
* If the current VACB is valid then copy it into the user buffer.
|
||||
*/
|
||||
if (current->Valid)
|
||||
{
|
||||
TempLength = min(VACB_MAPPING_GRANULARITY, Length);
|
||||
RtlCopyMemory(Buffer, current->BaseAddress, TempLength);
|
||||
|
||||
Buffer = (PVOID)((ULONG_PTR)Buffer + TempLength);
|
||||
|
||||
Length = Length - TempLength;
|
||||
previous = current;
|
||||
current = current->NextInChain;
|
||||
CcRosReleaseVacb(SharedCacheMap, previous, TRUE, FALSE, FALSE);
|
||||
}
|
||||
/*
|
||||
* Otherwise read in as much as we can.
|
||||
*/
|
||||
else
|
||||
{
|
||||
PROS_VACB current2;
|
||||
ULONG current_size;
|
||||
ULONG i;
|
||||
PPFN_NUMBER MdlPages;
|
||||
|
||||
/*
|
||||
* Count the maximum number of bytes we could read starting
|
||||
* from the current VACB.
|
||||
*/
|
||||
current2 = current;
|
||||
current_size = 0;
|
||||
while ((current2 != NULL) && !current2->Valid && (current_size < MAX_RW_LENGTH))
|
||||
{
|
||||
current2 = current2->NextInChain;
|
||||
current_size += VACB_MAPPING_GRANULARITY;
|
||||
}
|
||||
|
||||
/*
|
||||
* Create an MDL which contains all their pages.
|
||||
*/
|
||||
MmInitializeMdl(Mdl, NULL, current_size);
|
||||
Mdl->MdlFlags |= (MDL_PAGES_LOCKED | MDL_IO_PAGE_READ);
|
||||
current2 = current;
|
||||
current_size = 0;
|
||||
MdlPages = (PPFN_NUMBER)(Mdl + 1);
|
||||
while ((current2 != NULL) && !current2->Valid && (current_size < MAX_RW_LENGTH))
|
||||
{
|
||||
PVOID address = current2->BaseAddress;
|
||||
for (i = 0; i < VACB_MAPPING_GRANULARITY / PAGE_SIZE; i++, address = RVA(address, PAGE_SIZE))
|
||||
{
|
||||
*MdlPages++ = MmGetPfnForProcess(NULL, address);
|
||||
}
|
||||
current2 = current2->NextInChain;
|
||||
current_size += VACB_MAPPING_GRANULARITY;
|
||||
}
|
||||
|
||||
/*
|
||||
* Read in the information.
|
||||
*/
|
||||
KeInitializeEvent(&Event, NotificationEvent, FALSE);
|
||||
Status = IoPageRead(SharedCacheMap->FileObject,
|
||||
Mdl,
|
||||
¤t->FileOffset,
|
||||
&Event,
|
||||
&Iosb);
|
||||
if (Status == STATUS_PENDING)
|
||||
{
|
||||
KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL);
|
||||
Status = Iosb.Status;
|
||||
}
|
||||
if (Mdl->MdlFlags & MDL_MAPPED_TO_SYSTEM_VA)
|
||||
{
|
||||
MmUnmapLockedPages(Mdl->MappedSystemVa, Mdl);
|
||||
}
|
||||
if (!NT_SUCCESS(Status) && Status != STATUS_END_OF_FILE)
|
||||
{
|
||||
while (current != NULL)
|
||||
{
|
||||
previous = current;
|
||||
current = current->NextInChain;
|
||||
CcRosReleaseVacb(SharedCacheMap, previous, FALSE, FALSE, FALSE);
|
||||
}
|
||||
return Status;
|
||||
}
|
||||
current_size = 0;
|
||||
while (current != NULL && !current->Valid && current_size < MAX_RW_LENGTH)
|
||||
{
|
||||
previous = current;
|
||||
current = current->NextInChain;
|
||||
TempLength = min(VACB_MAPPING_GRANULARITY, Length);
|
||||
RtlCopyMemory(Buffer, previous->BaseAddress, TempLength);
|
||||
|
||||
Buffer = (PVOID)((ULONG_PTR)Buffer + TempLength);
|
||||
|
||||
Length = Length - TempLength;
|
||||
CcRosReleaseVacb(SharedCacheMap, previous, TRUE, FALSE, FALSE);
|
||||
current_size += VACB_MAPPING_GRANULARITY;
|
||||
}
|
||||
}
|
||||
}
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
CcReadVirtualAddress (
|
||||
|
@ -288,6 +163,170 @@ CcWriteVirtualAddress (
|
|||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
ReadWriteOrZero(
|
||||
_Inout_ PVOID BaseAddress,
|
||||
_Inout_opt_ PVOID Buffer,
|
||||
_In_ ULONG Length,
|
||||
_In_ CC_COPY_OPERATION Operation)
|
||||
{
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
|
||||
if (Operation == CcOperationZero)
|
||||
{
|
||||
/* Zero */
|
||||
RtlZeroMemory(BaseAddress, Length);
|
||||
}
|
||||
else
|
||||
{
|
||||
_SEH2_TRY
|
||||
{
|
||||
if (Operation == CcOperationWrite)
|
||||
RtlCopyMemory(BaseAddress, Buffer, Length);
|
||||
else
|
||||
RtlCopyMemory(Buffer, BaseAddress, Length);
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
Status = _SEH2_GetExceptionCode();
|
||||
}
|
||||
_SEH2_END;
|
||||
}
|
||||
return Status;
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
CcCopyData (
|
||||
_In_ PFILE_OBJECT FileObject,
|
||||
_In_ LONGLONG FileOffset,
|
||||
_Inout_ PVOID Buffer,
|
||||
_In_ ULONG Length,
|
||||
_In_ CC_COPY_OPERATION Operation,
|
||||
_In_ BOOLEAN Wait,
|
||||
_Out_ PIO_STATUS_BLOCK IoStatus)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
LONGLONG CurrentOffset;
|
||||
ULONG BytesCopied;
|
||||
KIRQL OldIrql;
|
||||
PROS_SHARED_CACHE_MAP SharedCacheMap;
|
||||
PLIST_ENTRY ListEntry;
|
||||
PROS_VACB Vacb;
|
||||
ULONG PartialLength;
|
||||
PVOID BaseAddress;
|
||||
BOOLEAN Valid;
|
||||
|
||||
SharedCacheMap = FileObject->SectionObjectPointer->SharedCacheMap;
|
||||
CurrentOffset = FileOffset;
|
||||
BytesCopied = 0;
|
||||
|
||||
if (!Wait)
|
||||
{
|
||||
/* test if the requested data is available */
|
||||
KeAcquireSpinLock(&SharedCacheMap->CacheMapLock, &OldIrql);
|
||||
/* FIXME: this loop doesn't take into account areas that don't have
|
||||
* a VACB in the list yet */
|
||||
ListEntry = SharedCacheMap->CacheMapVacbListHead.Flink;
|
||||
while (ListEntry != &SharedCacheMap->CacheMapVacbListHead)
|
||||
{
|
||||
Vacb = CONTAINING_RECORD(ListEntry,
|
||||
ROS_VACB,
|
||||
CacheMapVacbListEntry);
|
||||
ListEntry = ListEntry->Flink;
|
||||
if (!Vacb->Valid &&
|
||||
DoRangesIntersect(Vacb->FileOffset.QuadPart,
|
||||
VACB_MAPPING_GRANULARITY,
|
||||
CurrentOffset, Length))
|
||||
{
|
||||
KeReleaseSpinLock(&SharedCacheMap->CacheMapLock, OldIrql);
|
||||
/* data not available */
|
||||
return FALSE;
|
||||
}
|
||||
if (Vacb->FileOffset.QuadPart >= CurrentOffset + Length)
|
||||
break;
|
||||
}
|
||||
KeReleaseSpinLock(&SharedCacheMap->CacheMapLock, OldIrql);
|
||||
}
|
||||
|
||||
PartialLength = CurrentOffset % VACB_MAPPING_GRANULARITY;
|
||||
if (PartialLength != 0)
|
||||
{
|
||||
PartialLength = min(Length, VACB_MAPPING_GRANULARITY - PartialLength);
|
||||
Status = CcRosRequestVacb(SharedCacheMap,
|
||||
ROUND_DOWN(CurrentOffset,
|
||||
VACB_MAPPING_GRANULARITY),
|
||||
&BaseAddress,
|
||||
&Valid,
|
||||
&Vacb);
|
||||
if (!NT_SUCCESS(Status))
|
||||
ExRaiseStatus(Status);
|
||||
if (!Valid)
|
||||
{
|
||||
Status = CcReadVirtualAddress(Vacb);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
CcRosReleaseVacb(SharedCacheMap, Vacb, FALSE, FALSE, FALSE);
|
||||
ExRaiseStatus(Status);
|
||||
}
|
||||
}
|
||||
Status = ReadWriteOrZero((PUCHAR)BaseAddress + CurrentOffset % VACB_MAPPING_GRANULARITY,
|
||||
Buffer,
|
||||
PartialLength,
|
||||
Operation);
|
||||
|
||||
CcRosReleaseVacb(SharedCacheMap, Vacb, TRUE, Operation != CcOperationRead, FALSE);
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
ExRaiseStatus(STATUS_INVALID_USER_BUFFER);
|
||||
|
||||
Length -= PartialLength;
|
||||
CurrentOffset += PartialLength;
|
||||
BytesCopied += PartialLength;
|
||||
|
||||
if (Buffer)
|
||||
Buffer = (PVOID)((ULONG_PTR)Buffer + PartialLength);
|
||||
}
|
||||
|
||||
while (Length > 0)
|
||||
{
|
||||
ASSERT(CurrentOffset % VACB_MAPPING_GRANULARITY == 0);
|
||||
PartialLength = min(VACB_MAPPING_GRANULARITY, Length);
|
||||
Status = CcRosRequestVacb(SharedCacheMap,
|
||||
CurrentOffset,
|
||||
&BaseAddress,
|
||||
&Valid,
|
||||
&Vacb);
|
||||
if (!NT_SUCCESS(Status))
|
||||
ExRaiseStatus(Status);
|
||||
if (!Valid &&
|
||||
(Operation == CcOperationRead ||
|
||||
PartialLength < VACB_MAPPING_GRANULARITY))
|
||||
{
|
||||
Status = CcReadVirtualAddress(Vacb);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
CcRosReleaseVacb(SharedCacheMap, Vacb, FALSE, FALSE, FALSE);
|
||||
ExRaiseStatus(Status);
|
||||
}
|
||||
}
|
||||
Status = ReadWriteOrZero(BaseAddress, Buffer, PartialLength, Operation);
|
||||
|
||||
CcRosReleaseVacb(SharedCacheMap, Vacb, TRUE, Operation != CcOperationRead, FALSE);
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
ExRaiseStatus(STATUS_INVALID_USER_BUFFER);
|
||||
|
||||
Length -= PartialLength;
|
||||
CurrentOffset += PartialLength;
|
||||
BytesCopied += PartialLength;
|
||||
|
||||
if (Buffer)
|
||||
Buffer = (PVOID)((ULONG_PTR)Buffer + PartialLength);
|
||||
}
|
||||
IoStatus->Status = STATUS_SUCCESS;
|
||||
IoStatus->Information = BytesCopied;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
|
@ -304,7 +343,6 @@ CcCanIWrite (
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
|
@ -318,121 +356,18 @@ CcCopyRead (
|
|||
OUT PVOID Buffer,
|
||||
OUT PIO_STATUS_BLOCK IoStatus)
|
||||
{
|
||||
ULONG ReadOffset;
|
||||
ULONG TempLength;
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
PVOID BaseAddress;
|
||||
PROS_VACB Vacb;
|
||||
BOOLEAN Valid;
|
||||
ULONG ReadLength = 0;
|
||||
PROS_SHARED_CACHE_MAP SharedCacheMap;
|
||||
KIRQL oldirql;
|
||||
PLIST_ENTRY current_entry;
|
||||
PROS_VACB current;
|
||||
|
||||
DPRINT("CcCopyRead(FileObject 0x%p, FileOffset %I64x, "
|
||||
"Length %lu, Wait %u, Buffer 0x%p, IoStatus 0x%p)\n",
|
||||
FileObject, FileOffset->QuadPart, Length, Wait,
|
||||
Buffer, IoStatus);
|
||||
|
||||
SharedCacheMap = FileObject->SectionObjectPointer->SharedCacheMap;
|
||||
ReadOffset = (ULONG)FileOffset->QuadPart;
|
||||
|
||||
DPRINT("SectionSize %I64d, FileSize %I64d\n",
|
||||
SharedCacheMap->SectionSize.QuadPart,
|
||||
SharedCacheMap->FileSize.QuadPart);
|
||||
|
||||
/*
|
||||
* Check for the nowait case that all the cache VACBs that would
|
||||
* cover this read are in memory.
|
||||
*/
|
||||
if (!Wait)
|
||||
{
|
||||
KeAcquireSpinLock(&SharedCacheMap->CacheMapLock, &oldirql);
|
||||
/* FIXME: this loop doesn't take into account areas that don't have
|
||||
* a VACB in the list yet */
|
||||
current_entry = SharedCacheMap->CacheMapVacbListHead.Flink;
|
||||
while (current_entry != &SharedCacheMap->CacheMapVacbListHead)
|
||||
{
|
||||
current = CONTAINING_RECORD(current_entry,
|
||||
ROS_VACB,
|
||||
CacheMapVacbListEntry);
|
||||
if (!current->Valid &&
|
||||
DoRangesIntersect(current->FileOffset.QuadPart,
|
||||
VACB_MAPPING_GRANULARITY,
|
||||
ReadOffset, Length))
|
||||
{
|
||||
KeReleaseSpinLock(&SharedCacheMap->CacheMapLock, oldirql);
|
||||
IoStatus->Status = STATUS_UNSUCCESSFUL;
|
||||
IoStatus->Information = 0;
|
||||
return FALSE;
|
||||
}
|
||||
if (current->FileOffset.QuadPart >= ReadOffset + Length)
|
||||
break;
|
||||
current_entry = current_entry->Flink;
|
||||
}
|
||||
KeReleaseSpinLock(&SharedCacheMap->CacheMapLock, oldirql);
|
||||
}
|
||||
|
||||
TempLength = ReadOffset % VACB_MAPPING_GRANULARITY;
|
||||
if (TempLength != 0)
|
||||
{
|
||||
TempLength = min(Length, VACB_MAPPING_GRANULARITY - TempLength);
|
||||
Status = CcRosRequestVacb(SharedCacheMap,
|
||||
ROUND_DOWN(ReadOffset,
|
||||
VACB_MAPPING_GRANULARITY),
|
||||
&BaseAddress, &Valid, &Vacb);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
IoStatus->Information = 0;
|
||||
IoStatus->Status = Status;
|
||||
DPRINT("CcRosRequestVacb failed, Status %x\n", Status);
|
||||
return FALSE;
|
||||
}
|
||||
if (!Valid)
|
||||
{
|
||||
Status = CcReadVirtualAddress(Vacb);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
IoStatus->Information = 0;
|
||||
IoStatus->Status = Status;
|
||||
CcRosReleaseVacb(SharedCacheMap, Vacb, FALSE, FALSE, FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
RtlCopyMemory(Buffer,
|
||||
(char*)BaseAddress + ReadOffset % VACB_MAPPING_GRANULARITY,
|
||||
TempLength);
|
||||
CcRosReleaseVacb(SharedCacheMap, Vacb, TRUE, FALSE, FALSE);
|
||||
ReadLength += TempLength;
|
||||
Length -= TempLength;
|
||||
ReadOffset += TempLength;
|
||||
Buffer = (PVOID)((char*)Buffer + TempLength);
|
||||
}
|
||||
|
||||
while (Length > 0)
|
||||
{
|
||||
TempLength = min(VACB_MAPPING_GRANULARITY, Length);
|
||||
Status = ReadVacbChain(SharedCacheMap, ReadOffset, TempLength, Buffer);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
IoStatus->Information = 0;
|
||||
IoStatus->Status = Status;
|
||||
DPRINT("ReadVacbChain failed, Status %x\n", Status);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
ReadLength += TempLength;
|
||||
Length -= TempLength;
|
||||
ReadOffset += TempLength;
|
||||
|
||||
Buffer = (PVOID)((ULONG_PTR)Buffer + TempLength);
|
||||
}
|
||||
|
||||
IoStatus->Status = STATUS_SUCCESS;
|
||||
IoStatus->Information = ReadLength;
|
||||
DPRINT("CcCopyRead O.K.\n");
|
||||
return TRUE;
|
||||
return CcCopyData(FileObject,
|
||||
FileOffset->QuadPart,
|
||||
Buffer,
|
||||
Length,
|
||||
CcOperationRead,
|
||||
Wait,
|
||||
IoStatus);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -447,109 +382,19 @@ CcCopyWrite (
|
|||
IN BOOLEAN Wait,
|
||||
IN PVOID Buffer)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
ULONG WriteOffset;
|
||||
KIRQL oldirql;
|
||||
PROS_SHARED_CACHE_MAP SharedCacheMap;
|
||||
PLIST_ENTRY current_entry;
|
||||
PROS_VACB Vacb;
|
||||
ULONG TempLength;
|
||||
PVOID BaseAddress;
|
||||
BOOLEAN Valid;
|
||||
IO_STATUS_BLOCK IoStatus;
|
||||
|
||||
DPRINT("CcCopyWrite(FileObject 0x%p, FileOffset %I64x, "
|
||||
"Length %lu, Wait %u, Buffer 0x%p)\n",
|
||||
FileObject, FileOffset->QuadPart, Length, Wait, Buffer);
|
||||
|
||||
SharedCacheMap = FileObject->SectionObjectPointer->SharedCacheMap;
|
||||
WriteOffset = (ULONG)FileOffset->QuadPart;
|
||||
|
||||
if (!Wait)
|
||||
{
|
||||
/* testing, if the requested datas are available */
|
||||
KeAcquireSpinLock(&SharedCacheMap->CacheMapLock, &oldirql);
|
||||
/* FIXME: this loop doesn't take into account areas that don't have
|
||||
* a VACB in the list yet */
|
||||
current_entry = SharedCacheMap->CacheMapVacbListHead.Flink;
|
||||
while (current_entry != &SharedCacheMap->CacheMapVacbListHead)
|
||||
{
|
||||
Vacb = CONTAINING_RECORD(current_entry,
|
||||
ROS_VACB,
|
||||
CacheMapVacbListEntry);
|
||||
if (!Vacb->Valid &&
|
||||
DoRangesIntersect(Vacb->FileOffset.QuadPart,
|
||||
VACB_MAPPING_GRANULARITY,
|
||||
WriteOffset, Length))
|
||||
{
|
||||
KeReleaseSpinLock(&SharedCacheMap->CacheMapLock, oldirql);
|
||||
/* datas not available */
|
||||
return FALSE;
|
||||
}
|
||||
if (Vacb->FileOffset.QuadPart >= WriteOffset + Length)
|
||||
break;
|
||||
current_entry = current_entry->Flink;
|
||||
}
|
||||
KeReleaseSpinLock(&SharedCacheMap->CacheMapLock, oldirql);
|
||||
}
|
||||
|
||||
TempLength = WriteOffset % VACB_MAPPING_GRANULARITY;
|
||||
if (TempLength != 0)
|
||||
{
|
||||
ULONG ROffset;
|
||||
ROffset = ROUND_DOWN(WriteOffset, VACB_MAPPING_GRANULARITY);
|
||||
TempLength = min(Length, VACB_MAPPING_GRANULARITY - TempLength);
|
||||
Status = CcRosRequestVacb(SharedCacheMap, ROffset,
|
||||
&BaseAddress, &Valid, &Vacb);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
if (!Valid)
|
||||
{
|
||||
if (!NT_SUCCESS(CcReadVirtualAddress(Vacb)))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
RtlCopyMemory((char*)BaseAddress + WriteOffset % VACB_MAPPING_GRANULARITY,
|
||||
return CcCopyData(FileObject,
|
||||
FileOffset->QuadPart,
|
||||
Buffer,
|
||||
TempLength);
|
||||
CcRosReleaseVacb(SharedCacheMap, Vacb, TRUE, TRUE, FALSE);
|
||||
|
||||
Length -= TempLength;
|
||||
WriteOffset += TempLength;
|
||||
|
||||
Buffer = (PVOID)((ULONG_PTR)Buffer + TempLength);
|
||||
}
|
||||
|
||||
while (Length > 0)
|
||||
{
|
||||
TempLength = min(VACB_MAPPING_GRANULARITY, Length);
|
||||
Status = CcRosRequestVacb(SharedCacheMap,
|
||||
WriteOffset,
|
||||
&BaseAddress,
|
||||
&Valid,
|
||||
&Vacb);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
if (!Valid && TempLength < VACB_MAPPING_GRANULARITY)
|
||||
{
|
||||
if (!NT_SUCCESS(CcReadVirtualAddress(Vacb)))
|
||||
{
|
||||
CcRosReleaseVacb(SharedCacheMap, Vacb, FALSE, FALSE, FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
RtlCopyMemory(BaseAddress, Buffer, TempLength);
|
||||
CcRosReleaseVacb(SharedCacheMap, Vacb, TRUE, TRUE, FALSE);
|
||||
Length -= TempLength;
|
||||
WriteOffset += TempLength;
|
||||
|
||||
Buffer = (PVOID)((ULONG_PTR)Buffer + TempLength);
|
||||
}
|
||||
return TRUE;
|
||||
Length,
|
||||
CcOperationWrite,
|
||||
Wait,
|
||||
&IoStatus);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -679,102 +524,15 @@ CcZeroData (
|
|||
}
|
||||
else
|
||||
{
|
||||
/* File is cached */
|
||||
KIRQL oldirql;
|
||||
PROS_SHARED_CACHE_MAP SharedCacheMap;
|
||||
PLIST_ENTRY current_entry;
|
||||
PROS_VACB Vacb, current, previous;
|
||||
ULONG TempLength;
|
||||
IO_STATUS_BLOCK IoStatus;
|
||||
|
||||
SharedCacheMap = FileObject->SectionObjectPointer->SharedCacheMap;
|
||||
if (!Wait)
|
||||
{
|
||||
/* testing, if the requested datas are available */
|
||||
KeAcquireSpinLock(&SharedCacheMap->CacheMapLock, &oldirql);
|
||||
/* FIXME: this loop doesn't take into account areas that don't have
|
||||
* a VACB in the list yet */
|
||||
current_entry = SharedCacheMap->CacheMapVacbListHead.Flink;
|
||||
while (current_entry != &SharedCacheMap->CacheMapVacbListHead)
|
||||
{
|
||||
Vacb = CONTAINING_RECORD(current_entry,
|
||||
ROS_VACB,
|
||||
CacheMapVacbListEntry);
|
||||
if (!Vacb->Valid &&
|
||||
DoRangesIntersect(Vacb->FileOffset.QuadPart,
|
||||
VACB_MAPPING_GRANULARITY,
|
||||
WriteOffset.u.LowPart, Length))
|
||||
{
|
||||
KeReleaseSpinLock(&SharedCacheMap->CacheMapLock, oldirql);
|
||||
/* datas not available */
|
||||
return FALSE;
|
||||
}
|
||||
if (Vacb->FileOffset.QuadPart >= WriteOffset.u.LowPart + Length)
|
||||
break;
|
||||
current_entry = current_entry->Flink;
|
||||
}
|
||||
KeReleaseSpinLock(&SharedCacheMap->CacheMapLock, oldirql);
|
||||
}
|
||||
|
||||
while (Length > 0)
|
||||
{
|
||||
ULONG Offset;
|
||||
Offset = WriteOffset.u.LowPart % VACB_MAPPING_GRANULARITY;
|
||||
if (Length + Offset > MAX_ZERO_LENGTH)
|
||||
{
|
||||
CurrentLength = MAX_ZERO_LENGTH - Offset;
|
||||
}
|
||||
else
|
||||
{
|
||||
CurrentLength = Length;
|
||||
}
|
||||
Status = CcRosGetVacbChain(SharedCacheMap, WriteOffset.u.LowPart - Offset,
|
||||
Offset + CurrentLength, &Vacb);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
current = Vacb;
|
||||
|
||||
while (current != NULL)
|
||||
{
|
||||
Offset = WriteOffset.u.LowPart % VACB_MAPPING_GRANULARITY;
|
||||
if ((Offset != 0) ||
|
||||
(Offset + CurrentLength < VACB_MAPPING_GRANULARITY))
|
||||
{
|
||||
if (!current->Valid)
|
||||
{
|
||||
/* read the block */
|
||||
Status = CcReadVirtualAddress(current);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("CcReadVirtualAddress failed, status %x\n",
|
||||
Status);
|
||||
}
|
||||
}
|
||||
TempLength = min(CurrentLength, VACB_MAPPING_GRANULARITY - Offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
TempLength = VACB_MAPPING_GRANULARITY;
|
||||
}
|
||||
RtlZeroMemory((PUCHAR)current->BaseAddress + Offset,
|
||||
TempLength);
|
||||
|
||||
WriteOffset.QuadPart += TempLength;
|
||||
CurrentLength -= TempLength;
|
||||
Length -= TempLength;
|
||||
|
||||
current = current->NextInChain;
|
||||
}
|
||||
|
||||
current = Vacb;
|
||||
while (current != NULL)
|
||||
{
|
||||
previous = current;
|
||||
current = current->NextInChain;
|
||||
CcRosReleaseVacb(SharedCacheMap, previous, TRUE, TRUE, FALSE);
|
||||
}
|
||||
}
|
||||
return CcCopyData(FileObject,
|
||||
WriteOffset.QuadPart,
|
||||
NULL,
|
||||
Length,
|
||||
CcOperationZero,
|
||||
Wait,
|
||||
&IoStatus);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
|
|
@ -87,6 +87,7 @@ CcInitializeCacheMap (
|
|||
|
||||
/* Call old ROS cache init function */
|
||||
CcRosInitializeFileCache(FileObject,
|
||||
FileSizes,
|
||||
CallBacks,
|
||||
LazyWriterContext);
|
||||
}
|
||||
|
@ -234,12 +235,12 @@ CcUninitializeCacheMap (
|
|||
IN PLARGE_INTEGER TruncateSize OPTIONAL,
|
||||
IN PCACHE_UNINITIALIZE_EVENT UninitializeCompleteEvent OPTIONAL)
|
||||
{
|
||||
#if 0
|
||||
UNIMPLEMENTED;
|
||||
return FALSE;
|
||||
#else
|
||||
return NT_SUCCESS(CcRosReleaseFileCache(FileObject));
|
||||
#endif
|
||||
NTSTATUS Status;
|
||||
|
||||
Status = CcRosReleaseFileCache(FileObject);
|
||||
if (UninitializeCompleteEvent)
|
||||
KeSetEvent(&UninitializeCompleteEvent->Event, IO_NO_INCREMENT, FALSE);
|
||||
return NT_SUCCESS(Status);
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
|
|
|
@ -725,73 +725,6 @@ CcRosCreateVacb (
|
|||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
CcRosGetVacbChain (
|
||||
PROS_SHARED_CACHE_MAP SharedCacheMap,
|
||||
ULONG FileOffset,
|
||||
ULONG Length,
|
||||
PROS_VACB *Vacb)
|
||||
{
|
||||
PROS_VACB current;
|
||||
ULONG i;
|
||||
PROS_VACB *VacbList;
|
||||
PROS_VACB Previous = NULL;
|
||||
|
||||
ASSERT(SharedCacheMap);
|
||||
|
||||
DPRINT("CcRosGetVacbChain()\n");
|
||||
|
||||
Length = ROUND_UP(Length, VACB_MAPPING_GRANULARITY);
|
||||
|
||||
VacbList = _alloca(sizeof(PROS_VACB) *
|
||||
(Length / VACB_MAPPING_GRANULARITY));
|
||||
|
||||
/*
|
||||
* Look for a VACB already mapping the same data.
|
||||
*/
|
||||
for (i = 0; i < (Length / VACB_MAPPING_GRANULARITY); i++)
|
||||
{
|
||||
ULONG CurrentOffset = FileOffset + (i * VACB_MAPPING_GRANULARITY);
|
||||
current = CcRosLookupVacb(SharedCacheMap, CurrentOffset);
|
||||
if (current != NULL)
|
||||
{
|
||||
KeAcquireGuardedMutex(&ViewLock);
|
||||
|
||||
/* Move to tail of LRU list */
|
||||
RemoveEntryList(¤t->VacbLruListEntry);
|
||||
InsertTailList(&VacbLruListHead, ¤t->VacbLruListEntry);
|
||||
|
||||
KeReleaseGuardedMutex(&ViewLock);
|
||||
|
||||
VacbList[i] = current;
|
||||
}
|
||||
else
|
||||
{
|
||||
CcRosCreateVacb(SharedCacheMap, CurrentOffset, ¤t);
|
||||
VacbList[i] = current;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < Length / VACB_MAPPING_GRANULARITY; i++)
|
||||
{
|
||||
if (i == 0)
|
||||
{
|
||||
*Vacb = VacbList[i];
|
||||
Previous = VacbList[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
Previous->NextInChain = VacbList[i];
|
||||
Previous = VacbList[i];
|
||||
}
|
||||
}
|
||||
ASSERT(Previous);
|
||||
Previous->NextInChain = NULL;
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
CcRosGetVacb (
|
||||
|
@ -1187,6 +1120,7 @@ NTSTATUS
|
|||
NTAPI
|
||||
CcRosInitializeFileCache (
|
||||
PFILE_OBJECT FileObject,
|
||||
PCC_FILE_SIZES FileSizes,
|
||||
PCACHE_MANAGER_CALLBACKS CallBacks,
|
||||
PVOID LazyWriterContext)
|
||||
/*
|
||||
|
@ -1216,13 +1150,8 @@ CcRosInitializeFileCache (
|
|||
SharedCacheMap->FileObject = FileObject;
|
||||
SharedCacheMap->Callbacks = CallBacks;
|
||||
SharedCacheMap->LazyWriteContext = LazyWriterContext;
|
||||
if (FileObject->FsContext)
|
||||
{
|
||||
SharedCacheMap->SectionSize =
|
||||
((PFSRTL_COMMON_FCB_HEADER)FileObject->FsContext)->AllocationSize;
|
||||
SharedCacheMap->FileSize =
|
||||
((PFSRTL_COMMON_FCB_HEADER)FileObject->FsContext)->FileSize;
|
||||
}
|
||||
SharedCacheMap->SectionSize = FileSizes->AllocationSize;
|
||||
SharedCacheMap->FileSize = FileSizes->FileSize;
|
||||
KeInitializeSpinLock(&SharedCacheMap->CacheMapLock);
|
||||
InitializeListHead(&SharedCacheMap->CacheMapVacbListHead);
|
||||
FileObject->SectionObjectPointer->SharedCacheMap = SharedCacheMap;
|
||||
|
|
|
@ -2043,12 +2043,35 @@ VOID
|
|||
NTAPI
|
||||
CmShutdownSystem(VOID)
|
||||
{
|
||||
PLIST_ENTRY ListEntry;
|
||||
PCMHIVE Hive;
|
||||
ULONG i;
|
||||
|
||||
/* Kill the workers */
|
||||
if (!CmFirstTime) CmpShutdownWorkers();
|
||||
|
||||
/* Flush all hives */
|
||||
CmpLockRegistryExclusive();
|
||||
CmpDoFlushAll(TRUE);
|
||||
|
||||
/* Close all hive files */
|
||||
ListEntry = CmpHiveListHead.Flink;
|
||||
while (ListEntry != &CmpHiveListHead)
|
||||
{
|
||||
Hive = CONTAINING_RECORD(ListEntry, CMHIVE, HiveList);
|
||||
|
||||
for (i = 0; i < HFILE_TYPE_MAX; i++)
|
||||
{
|
||||
if (Hive->FileHandles[i] != NULL)
|
||||
{
|
||||
ZwClose(Hive->FileHandles[i]);
|
||||
Hive->FileHandles[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
ListEntry = ListEntry->Flink;
|
||||
}
|
||||
|
||||
CmpUnlockRegistry();
|
||||
}
|
||||
|
||||
|
|
|
@ -145,7 +145,6 @@ typedef struct _ROS_VACB
|
|||
/* Pointer to the shared cache map for the file which this view maps data for. */
|
||||
PROS_SHARED_CACHE_MAP SharedCacheMap;
|
||||
/* Pointer to the next VACB in a chain. */
|
||||
struct _ROS_VACB *NextInChain;
|
||||
} ROS_VACB, *PROS_VACB;
|
||||
|
||||
typedef struct _INTERNAL_BCB
|
||||
|
@ -223,15 +222,6 @@ CcRosLookupVacb(
|
|||
ULONG FileOffset
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
CcRosGetVacbChain(
|
||||
PROS_SHARED_CACHE_MAP SharedCacheMap,
|
||||
ULONG FileOffset,
|
||||
ULONG Length,
|
||||
PROS_VACB *Vacb
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
CcInitCacheZeroPage(VOID);
|
||||
|
@ -287,6 +277,7 @@ NTSTATUS
|
|||
NTAPI
|
||||
CcRosInitializeFileCache(
|
||||
PFILE_OBJECT FileObject,
|
||||
PCC_FILE_SIZES FileSizes,
|
||||
PCACHE_MANAGER_CALLBACKS CallBacks,
|
||||
PVOID LazyWriterContext
|
||||
);
|
||||
|
|
|
@ -351,6 +351,11 @@ IopEditDeviceList(IN PDRIVER_OBJECT DriverObject,
|
|||
while (Previous->NextDevice != DeviceObject)
|
||||
{
|
||||
/* Not this one, keep moving */
|
||||
if (!Previous->NextDevice)
|
||||
{
|
||||
DPRINT1("Failed to remove PDO %p on driver %wZ (not found)\n", DeviceObject, &DeviceObject->DriverObject->DriverName);
|
||||
return;
|
||||
}
|
||||
Previous = Previous->NextDevice;
|
||||
}
|
||||
|
||||
|
|
|
@ -597,6 +597,7 @@ IopSendRemoveDevice(IN PDEVICE_OBJECT DeviceObject)
|
|||
&GUID_TARGET_DEVICE_REMOVE_COMPLETE,
|
||||
NULL,
|
||||
NULL);
|
||||
ObDereferenceObject(DeviceObject);
|
||||
}
|
||||
|
||||
static
|
||||
|
@ -4431,7 +4432,6 @@ IopSendRemoveDeviceRelations(PDEVICE_RELATIONS DeviceRelations)
|
|||
for (i = 0; i < DeviceRelations->Count; i++)
|
||||
{
|
||||
IopSendRemoveDevice(DeviceRelations->Objects[i]);
|
||||
ObDereferenceObject(DeviceRelations->Objects[i]);
|
||||
DeviceRelations->Objects[i] = NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -46,12 +46,9 @@ set(CMAKE_ASM_COMPILER_ID "GNU")
|
|||
set(CMAKE_MC_COMPILER ${MINGW_TOOLCHAIN_PREFIX}windmc)
|
||||
set(CMAKE_RC_COMPILER ${MINGW_TOOLCHAIN_PREFIX}windres)
|
||||
set(CMAKE_DLLTOOL ${MINGW_TOOLCHAIN_PREFIX}dlltool)
|
||||
#set(CMAKE_AR ${MINGW_TOOLCHAIN_PREFIX}gcc-ar${MINGW_TOOLCHAIN_SUFFIX})
|
||||
|
||||
if(NOT LTCG)
|
||||
set(CMAKE_C_CREATE_STATIC_LIBRARY "<CMAKE_AR> crT <TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||
else()
|
||||
set(CMAKE_C_CREATE_STATIC_LIBRARY "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||
endif()
|
||||
set(CMAKE_C_CREATE_STATIC_LIBRARY "<CMAKE_AR> crT <TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||
set(CMAKE_CXX_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY})
|
||||
set(CMAKE_ASM_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY})
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -296,6 +296,35 @@ ConvertBitmapInfo(
|
|||
RtlCopyMemory((PVOID)NewDataPtr, (PVOID)OldDataPtr, DataSize);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Verify some data validity */
|
||||
switch (BitmapInfo->bmiHeader.biCompression)
|
||||
{
|
||||
case BI_RLE8:
|
||||
if (BitmapInfo->bmiHeader.biBitCount != 8)
|
||||
return NULL;
|
||||
if (BitmapInfo->bmiHeader.biHeight < 0)
|
||||
return NULL;
|
||||
break;
|
||||
case BI_RLE4:
|
||||
if (BitmapInfo->bmiHeader.biBitCount != 4)
|
||||
return NULL;
|
||||
if (BitmapInfo->bmiHeader.biHeight < 0)
|
||||
return NULL;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* Non "standard" formats must have a valid size set */
|
||||
if ((BitmapInfo->bmiHeader.biCompression != BI_RGB) &&
|
||||
(BitmapInfo->bmiHeader.biCompression != BI_BITFIELDS))
|
||||
{
|
||||
if (BitmapInfo->bmiHeader.biSizeImage == 0)
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
Size = NewBitmapInfo->bmiHeader.biSize;
|
||||
if (ColorSpec == DIB_RGB_COLORS)
|
||||
|
|
|
@ -375,6 +375,115 @@ cleanup:
|
|||
return result;
|
||||
}
|
||||
|
||||
static
|
||||
HBITMAP
|
||||
IntGdiCreateMaskFromRLE(
|
||||
DWORD Width,
|
||||
DWORD Height,
|
||||
ULONG Compression,
|
||||
const BYTE* Bits,
|
||||
DWORD BitsSize)
|
||||
{
|
||||
HBITMAP Mask;
|
||||
DWORD x, y;
|
||||
SURFOBJ* SurfObj;
|
||||
UINT i = 0;
|
||||
BYTE Data, NumPixels, ToSkip;
|
||||
|
||||
ASSERT((Compression == BI_RLE8) || (Compression == BI_RLE4));
|
||||
|
||||
/* Create the bitmap */
|
||||
Mask = GreCreateBitmapEx(Width, Height, 0, BMF_1BPP, 0, 0, NULL, 0);
|
||||
if (!Mask)
|
||||
return NULL;
|
||||
|
||||
SurfObj = EngLockSurface((HSURF)Mask);
|
||||
if (!SurfObj)
|
||||
{
|
||||
GreDeleteObject(Mask);
|
||||
return NULL;
|
||||
}
|
||||
ASSERT(SurfObj->pvBits != NULL);
|
||||
|
||||
x = y = 0;
|
||||
|
||||
while (i < BitsSize)
|
||||
{
|
||||
NumPixels = Bits[i];
|
||||
Data = Bits[i + 1];
|
||||
i += 2;
|
||||
|
||||
if (NumPixels != 0)
|
||||
{
|
||||
if ((x + NumPixels) > Width)
|
||||
NumPixels = Width - x;
|
||||
|
||||
if (NumPixels == 0)
|
||||
continue;
|
||||
|
||||
DIB_1BPP_HLine(SurfObj, x, x + NumPixels, y, 1);
|
||||
x += NumPixels;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Data < 3)
|
||||
{
|
||||
switch (Data)
|
||||
{
|
||||
case 0:
|
||||
/* End of line */
|
||||
y++;
|
||||
if (y == Height)
|
||||
goto done;
|
||||
x = 0;
|
||||
break;
|
||||
case 1:
|
||||
/* End of file */
|
||||
goto done;
|
||||
case 2:
|
||||
/* Jump */
|
||||
if (i >= (BitsSize - 1))
|
||||
goto done;
|
||||
x += Bits[i];
|
||||
if (x > Width)
|
||||
x = Width;
|
||||
y += Bits[i + 1];
|
||||
if (y >= Height)
|
||||
goto done;
|
||||
i += 2;
|
||||
break;
|
||||
}
|
||||
/* Done for this run */
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Embedded data into the RLE */
|
||||
NumPixels = Data;
|
||||
if (Compression == BI_RLE8)
|
||||
ToSkip = NumPixels;
|
||||
else
|
||||
ToSkip = (NumPixels / 2) + (NumPixels & 1);
|
||||
|
||||
if ((i + ToSkip) > BitsSize)
|
||||
goto done;
|
||||
ToSkip = (ToSkip + 1) & ~1;
|
||||
|
||||
if ((x + NumPixels) > Width)
|
||||
NumPixels = Width - x;
|
||||
|
||||
if (NumPixels != 0)
|
||||
{
|
||||
DIB_1BPP_HLine(SurfObj, x, x + NumPixels, y, 1);
|
||||
x += NumPixels;
|
||||
}
|
||||
i += ToSkip;
|
||||
}
|
||||
|
||||
done:
|
||||
EngUnlockSurface(SurfObj);
|
||||
return Mask;
|
||||
}
|
||||
|
||||
W32KAPI
|
||||
INT
|
||||
APIENTRY
|
||||
|
@ -399,8 +508,8 @@ NtGdiSetDIBitsToDeviceInternal(
|
|||
INT ret = 0;
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
PDC pDC;
|
||||
HBITMAP hSourceBitmap = NULL;
|
||||
SURFOBJ *pDestSurf, *pSourceSurf = NULL;
|
||||
HBITMAP hSourceBitmap = NULL, hMaskBitmap = NULL;
|
||||
SURFOBJ *pDestSurf, *pSourceSurf = NULL, *pMaskSurf = NULL;
|
||||
SURFACE *pSurf;
|
||||
RECTL rcDest;
|
||||
POINTL ptSource;
|
||||
|
@ -492,6 +601,28 @@ NtGdiSetDIBitsToDeviceInternal(
|
|||
goto Exit;
|
||||
}
|
||||
|
||||
/* HACK: If this is a RLE bitmap, only the relevant pixels must be set. */
|
||||
if ((bmi->bmiHeader.biCompression == BI_RLE8) || (bmi->bmiHeader.biCompression == BI_RLE4))
|
||||
{
|
||||
hMaskBitmap = IntGdiCreateMaskFromRLE(bmi->bmiHeader.biWidth,
|
||||
ScanLines,
|
||||
bmi->bmiHeader.biCompression,
|
||||
Bits,
|
||||
cjMaxBits);
|
||||
if (!hMaskBitmap)
|
||||
{
|
||||
EngSetLastError(ERROR_NO_SYSTEM_RESOURCES);
|
||||
Status = STATUS_NO_MEMORY;
|
||||
goto Exit;
|
||||
}
|
||||
pMaskSurf = EngLockSurface((HSURF)hMaskBitmap);
|
||||
if (!pMaskSurf)
|
||||
{
|
||||
Status = STATUS_UNSUCCESSFUL;
|
||||
goto Exit;
|
||||
}
|
||||
}
|
||||
|
||||
/* Create a palette for the DIB */
|
||||
ppalDIB = CreateDIBPalette(bmi, pDC, ColorUse);
|
||||
if (!ppalDIB)
|
||||
|
@ -529,15 +660,15 @@ NtGdiSetDIBitsToDeviceInternal(
|
|||
ptSource.x, ptSource.y, SourceSize.cx, SourceSize.cy);
|
||||
Status = IntEngBitBlt(pDestSurf,
|
||||
pSourceSurf,
|
||||
NULL,
|
||||
pMaskSurf,
|
||||
&pDC->co.ClipObj,
|
||||
&exlo.xlo,
|
||||
&rcDest,
|
||||
&ptSource,
|
||||
pMaskSurf ? &ptSource : NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
ROP4_FROM_INDEX(R3_OPINDEX_SRCCOPY));
|
||||
pMaskSurf ? ROP4_MASK : ROP4_FROM_INDEX(R3_OPINDEX_SRCCOPY));
|
||||
|
||||
/* Cleanup EXLATEOBJ */
|
||||
EXLATEOBJ_vCleanup(&exlo);
|
||||
|
@ -555,6 +686,8 @@ Exit:
|
|||
|
||||
if (pSourceSurf) EngUnlockSurface(pSourceSurf);
|
||||
if (hSourceBitmap) EngDeleteSurface((HSURF)hSourceBitmap);
|
||||
if (pMaskSurf) EngUnlockSurface(pMaskSurf);
|
||||
if (hMaskBitmap) EngDeleteSurface((HSURF)hMaskBitmap);
|
||||
DC_UnlockDc(pDC);
|
||||
Exit2:
|
||||
ExFreePoolWithTag(pbmiSafe, 'pmTG');
|
||||
|
|
|
@ -1600,12 +1600,12 @@ ftGdiGetGlyphOutline(
|
|||
}
|
||||
}
|
||||
|
||||
// FT_Set_Pixel_Sizes(ft_face,
|
||||
// TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfWidth,
|
||||
FT_Set_Pixel_Sizes(ft_face,
|
||||
TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfWidth,
|
||||
/* FIXME: Should set character height if neg */
|
||||
// (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight == 0 ?
|
||||
// dc->ppdev->devinfo.lfDefaultFont.lfHeight : abs(TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight)));
|
||||
// FtSetCoordinateTransform(face, DC_pmxWorldToDevice(dc));
|
||||
(TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight == 0 ?
|
||||
dc->ppdev->devinfo.lfDefaultFont.lfHeight : abs(TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight)));
|
||||
FtSetCoordinateTransform(ft_face, DC_pmxWorldToDevice(dc));
|
||||
|
||||
TEXTOBJ_UnlockText(TextObj);
|
||||
|
||||
|
@ -3674,6 +3674,7 @@ GreExtTextOutW(
|
|||
}
|
||||
else
|
||||
{
|
||||
// FIXME this should probably be a matrix transform with TextTop as well.
|
||||
Scale = pdcattr->mxWorldToDevice.efM11;
|
||||
if (_FLOATOBJ_Equal0(&Scale))
|
||||
FLOATOBJ_Set1(&Scale);
|
||||
|
|
Loading…
Reference in a new issue