From ba54fa17fe506020b3473ddf0964d43c2e67d4ec Mon Sep 17 00:00:00 2001 From: Sylvain Petreolle Date: Thu, 14 Aug 2008 14:36:35 +0000 Subject: [PATCH 001/324] update devmgmt french translation svn path=/trunk/; revision=35335 --- reactos/base/applications/mscutils/devmgmt/lang/fr-FR.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/base/applications/mscutils/devmgmt/lang/fr-FR.rc b/reactos/base/applications/mscutils/devmgmt/lang/fr-FR.rc index 0eb862fa705..927cf7465ab 100644 --- a/reactos/base/applications/mscutils/devmgmt/lang/fr-FR.rc +++ b/reactos/base/applications/mscutils/devmgmt/lang/fr-FR.rc @@ -68,7 +68,7 @@ BEGIN IDS_APPNAME "Gestionnaire de pйriphйriques ReactOS" IDS_HINT_BLANK " " IDS_HINT_EXIT " Quitte le programme." - IDS_HINT_REFRESH " Actualise la liste des services." + IDS_HINT_REFRESH " Actualise la liste des pйriphйriques." IDS_HINT_PROP " Ouvre la feuille de propriйtйs pour la sйlection actuelle." IDS_HINT_HELP " Affiche la fenкtre d'aide." IDS_HINT_ABOUT " А propos du Gestionnaire de Pйriphйriques de ReactOS." From 5a07d4bce3ab5b3b3deaae36f93a33533de82c63 Mon Sep 17 00:00:00 2001 From: Sylvain Petreolle Date: Thu, 14 Aug 2008 14:45:58 +0000 Subject: [PATCH 002/324] update eventvwrv french translation patch by Amine Khaldi (amine48rz) svn path=/trunk/; revision=35336 --- .../mscutils/eventvwr/lang/fr-FR.rc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/reactos/base/applications/mscutils/eventvwr/lang/fr-FR.rc b/reactos/base/applications/mscutils/eventvwr/lang/fr-FR.rc index f4a38fddd61..ded893d5a6b 100644 --- a/reactos/base/applications/mscutils/eventvwr/lang/fr-FR.rc +++ b/reactos/base/applications/mscutils/eventvwr/lang/fr-FR.rc @@ -13,7 +13,7 @@ BEGIN POPUP "Journa&l" BEGIN MENUITEM "&Application", ID_LOG_APPLICATION, CHECKED - MENUITEM "&Securitй", ID_LOG_SECURITY + MENUITEM "&Sйcuritй", ID_LOG_SECURITY MENUITEM "&Systиme", ID_LOG_SYSTEM MENUITEM SEPARATOR MENUITEM "Quitter", IDM_EXIT @@ -76,7 +76,7 @@ BEGIN LTEXT "Static",IDC_EVENTUSERSTATIC,56,41,72,8 LTEXT "Ordinateur :",IDC_STATIC,14,54,36,8 LTEXT "Static",IDC_EVENTCOMPUTERSTATIC,56,54,72,8 - LTEXT "EventID :",IDC_STATIC,133,15,36,8 + LTEXT "Йvйnement :",IDC_STATIC,133,15,36,8 LTEXT "Static",IDC_EVENTIDSTATIC,175,15,87,8 LTEXT "Source :",IDC_STATIC,133,28,36,8 LTEXT "Static",IDC_EVENTSOURCESTATIC,175,28,87,8 @@ -86,19 +86,19 @@ BEGIN LTEXT "Static",IDC_EVENTCATEGORYSTATIC,175,55,87,8 EDITTEXT IDC_EVENTDATAEDIT,14,204,247,44,ES_MULTILINE | ES_READONLY LTEXT "Donnйes",IDC_STATIC,14,194,20,8 - CONTROL "&Bytes",IDC_BYTESRADIO,"Button",BS_AUTORADIOBUTTON,39,194,34,10 - CONTROL "&Word",IDC_WORDRADIO,"Button",BS_AUTORADIOBUTTON,77,194,33,10 + CONTROL "&Octets",IDC_BYTESRADIO,"Button",BS_AUTORADIOBUTTON,39,194,34,10 + CONTROL "&Mots",IDC_WORDRADIO,"Button",BS_AUTORADIOBUTTON,77,194,33,10 END STRINGTABLE BEGIN IDS_APP_TITLE "Visionneuse d'йvйnements" IDC_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." - IDC_EVENTLOG_ERROR_TYPE "Error" - IDC_EVENTLOG_WARNING_TYPE "Warning" - IDC_EVENTLOG_INFORMATION_TYPE "Information" + IDC_EVENTLOG_ERROR_TYPE "Erreur" + IDC_EVENTLOG_WARNING_TYPE "Avertissement" + IDC_EVENTLOG_INFORMATION_TYPE "Informations" IDC_EVENTLOG_AUDIT_SUCCESS "Audit Success" IDC_EVENTLOG_AUDIT_FAILURE "Audit Failure" - IDC_EVENTLOG_SUCCESS "Success" - IDC_EVENTLOG_UNKNOWN_TYPE "Unknown Event" + IDC_EVENTLOG_SUCCESS "Succиs" + IDC_EVENTLOG_UNKNOWN_TYPE "Йvйnement Inconnu" END From 11a3ecefa478c9381c31f53c6a3b53ea93043166 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Thu, 14 Aug 2008 14:47:31 +0000 Subject: [PATCH 003/324] * Implement drive checking dialog with fmifs library svn path=/trunk/; revision=35337 --- reactos/dll/win32/shell32/drive.c | 371 ++++++++++++++++++++++++------ 1 file changed, 307 insertions(+), 64 deletions(-) diff --git a/reactos/dll/win32/shell32/drive.c b/reactos/dll/win32/shell32/drive.c index 5bc61a30268..8f963fc65ab 100644 --- a/reactos/dll/win32/shell32/drive.c +++ b/reactos/dll/win32/shell32/drive.c @@ -92,6 +92,20 @@ VOID IN PFMIFSCALLBACK Callback ); +typedef +VOID +(NTAPI *CHKDSK)( + IN PWCHAR DriveRoot, + IN PWCHAR Format, + IN BOOLEAN CorrectErrors, + IN BOOLEAN Verbose, + IN BOOLEAN CheckOnlyIfDirty, + IN BOOLEAN ScanDrive, + IN PVOID Unused2, + IN PVOID Unused3, + IN PFMIFSCALLBACK Callback +); + typedef struct { @@ -101,9 +115,13 @@ typedef struct QUERY_AVAILABLEFSFORMAT QueryAvailableFileSystemFormat; FORMAT_EX FormatEx; ENABLEVOLUMECOMPRESSION EnableVolumeCompression; + CHKDSK Chkdsk; UINT Result; }FORMAT_DRIVE_CONTEXT, *PFORMAT_DRIVE_CONTEXT; +BOOL InitializeFmifsLibrary(PFORMAT_DRIVE_CONTEXT pContext); +BOOL GetDefaultClusterSize(LPWSTR szFs, PDWORD pClusterSize, PULARGE_INTEGER TotalNumberOfBytes); + HWND WINAPI DeviceCreateHardwarePageEx(HWND hWndParent, LPGUID lpGuids, @@ -116,6 +134,172 @@ HPROPSHEETPAGE SH_CreatePropertySheetPage(LPSTR resname, DLGPROC dlgproc, LPARAM extern HINSTANCE shell32_hInstance; +VOID +GetDriveNameWithLetter(LPWSTR szText, UINT Length, WCHAR Drive) +{ + WCHAR szDrive[] = {'C',':','\\', 0}; + DWORD dwMaxComp, dwFileSys, TempLength = 0; + + szDrive[0] = Drive; + if (GetVolumeInformationW(szDrive, szText, Length, NULL, &dwMaxComp, &dwFileSys, NULL, 0)) + { + szText[Length-1] = L'\0'; + TempLength = wcslen(szText); + if (!TempLength) + { + /* load default volume label */ + TempLength = LoadStringW(shell32_hInstance, IDS_DRIVE_FIXED, &szText[Length+1], (sizeof(szText)/sizeof(WCHAR))- Length - 2); + } + } + if (TempLength + 4 < Length) + { + szText[TempLength] = L' '; + szText[TempLength+1] = L'('; + szText[TempLength+2] = szDrive[0]; + szText[TempLength+3] = L')'; + TempLength +=4; + } + + if (TempLength < Length) + szText[TempLength] = L'\0'; + else + szText[Length-1] = L'\0'; +} + + +VOID +InitializeChkDskDialog(HWND hwndDlg, PFORMAT_DRIVE_CONTEXT pContext) +{ + WCHAR szText[100]; + UINT Length; + SetWindowLongPtr(hwndDlg, DWLP_USER, (INT_PTR)pContext); + + Length = GetWindowTextW(hwndDlg, szText, sizeof(szText)/sizeof(WCHAR)); + + GetDriveNameWithLetter(&szText[Length +1], (sizeof(szText)/sizeof(WCHAR))-Length-1, pContext->Drive); + szText[Length] = L' '; + szText[(sizeof(szText)/sizeof(WCHAR))-1] = L'\0'; + SetWindowText(hwndDlg, szText); +} + +HWND ChkdskDrvDialog = NULL; +BOOLEAN bChkdskSuccess = FALSE; + +BOOLEAN +NTAPI +ChkdskCallback( + IN CALLBACKCOMMAND Command, + IN ULONG SubAction, + IN PVOID ActionInfo) +{ + PDWORD Progress; + PBOOLEAN pSuccess; + switch(Command) + { + case PROGRESS: + Progress = (PDWORD)ActionInfo; + SendDlgItemMessageW(ChkdskDrvDialog, 14002, PBM_SETPOS, (WPARAM)*Progress, 0); + break; + case DONE: + pSuccess = (PBOOLEAN)ActionInfo; + bChkdskSuccess = (*pSuccess); + break; + + case VOLUMEINUSE: + case INSUFFICIENTRIGHTS: + case FSNOTSUPPORTED: + case CLUSTERSIZETOOSMALL: + bChkdskSuccess = FALSE; + FIXME("\n"); + break; + + default: + break; + } + + return TRUE; +} + +VOID +ChkDskNow(HWND hwndDlg, PFORMAT_DRIVE_CONTEXT pContext) +{ + DWORD ClusterSize = 0, dwMaxComponentLength, FileSystemFlags; + WCHAR szFs[30]; + WCHAR szDrive[] = {'C',':','\\', 0}; + WCHAR szVolumeLabel[40]; + ULARGE_INTEGER TotalNumberOfFreeBytes, FreeBytesAvailableUser; + BOOLEAN bCorrectErrors = FALSE, bScanDrive = FALSE; + + szDrive[0] = pContext->Drive; + if(!GetVolumeInformationW(szDrive, szVolumeLabel, sizeof(szVolumeLabel)/sizeof(WCHAR), NULL, &dwMaxComponentLength, &FileSystemFlags, szFs, sizeof(szFs)/sizeof(WCHAR))) + { + FIXME("failed to get drive fs type\n"); + return; + } + + if (!GetDiskFreeSpaceExW(szDrive, &FreeBytesAvailableUser, &TotalNumberOfFreeBytes, NULL)) + { + FIXME("failed to get drive space type\n"); + return; + } + + if (!GetDefaultClusterSize(szFs, &ClusterSize, &TotalNumberOfFreeBytes)) + { + FIXME("invalid cluster size\n"); + return; + } + + if (SendDlgItemMessageW(hwndDlg, 14000, BM_GETCHECK, 0, 0) == BST_CHECKED) + bCorrectErrors = TRUE; + + if (SendDlgItemMessageW(hwndDlg, 14001, BM_GETCHECK, 0, 0) == BST_CHECKED) + bScanDrive = TRUE; + + ChkdskDrvDialog = hwndDlg; + bChkdskSuccess = FALSE; + SendDlgItemMessageW(hwndDlg, 14002, PBM_SETRANGE, 0, MAKELPARAM(0, 100)); + pContext->Chkdsk(szDrive, szFs, bCorrectErrors, TRUE, FALSE, bScanDrive, NULL, NULL, ChkdskCallback); + + ChkdskDrvDialog = NULL; + pContext->Result = bChkdskSuccess; + bChkdskSuccess = FALSE; + +} + +INT_PTR +CALLBACK +ChkDskDlg( + HWND hwndDlg, + UINT uMsg, + WPARAM wParam, + LPARAM lParam +) +{ + PFORMAT_DRIVE_CONTEXT pContext; + switch(uMsg) + { + case WM_INITDIALOG: + SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)lParam); + InitializeChkDskDialog(hwndDlg, (PFORMAT_DRIVE_CONTEXT)lParam); + return TRUE; + case WM_COMMAND: + switch(LOWORD(wParam)) + { + case IDCANCEL: + EndDialog(hwndDlg, 0); + break; + case IDOK: + pContext = (PFORMAT_DRIVE_CONTEXT) GetWindowLongPtr(hwndDlg, DWLP_USER); + ChkDskNow(hwndDlg, pContext); + break; + } + break; + } + + return FALSE; +} + + static LARGE_INTEGER GetFreeBytesShare(LARGE_INTEGER TotalNumberOfFreeBytes, LARGE_INTEGER TotalNumberOfBytes) @@ -365,11 +549,12 @@ DriveExtraDlg( { STARTUPINFOW si; PROCESS_INFORMATION pi; - WCHAR szPath[MAX_PATH]; + WCHAR szPath[MAX_PATH + 10]; WCHAR szArg[MAX_PATH]; WCHAR * szDrive; - UINT length; LPPROPSHEETPAGEW ppsp; + DWORD dwSize; + FORMAT_DRIVE_CONTEXT Context; switch (uMsg) { @@ -381,38 +566,58 @@ DriveExtraDlg( ZeroMemory( &si, sizeof(si) ); si.cb = sizeof(si); ZeroMemory( &pi, sizeof(pi) ); - if (!GetSystemDirectoryW(szPath, MAX_PATH)) - break; + szDrive = (WCHAR*)GetWindowLongPtr(hwndDlg, DWLP_USER); switch(LOWORD(wParam)) { case 14000: - /// - /// FIXME - /// show checkdsk dialog - /// + if (InitializeFmifsLibrary(&Context)) + { + Context.Drive = szDrive[0]; + DialogBoxParamW(shell32_hInstance, L"CHKDSK_DLG", hwndDlg, ChkDskDlg, (LPARAM)&Context); + FreeLibrary(Context.hLibrary); + } break; case 14001: - szArg[0] = L'"'; - wcscpy(&szArg[1], szPath); - wcscat(szPath, L"\\mmc.exe"); - wcscat(szArg, L"\\dfrg.msc\" "); - length = wcslen(szArg); - szArg[length] = szDrive[0]; - szArg[length+1] = L':'; - szArg[length+2] = L'\0'; - if (CreateProcessW(szPath, szArg, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) + dwSize = sizeof(szPath); + if (RegGetValueW(HKEY_LOCAL_MACHINE, + L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\MyComputer\\DefragPath", + NULL, + RRF_RT_REG_EXPAND_SZ, + NULL, + (PVOID)szPath, + &dwSize) == S_OK) { - CloseHandle(pi.hProcess); - CloseHandle(pi.hThread); + swprintf(szArg, szPath, szDrive[0]); + if (!GetSystemDirectoryW(szPath, MAX_PATH)) + break; + szDrive = PathAddBackslashW(szPath); + if (!szDrive) + break; + + wcscat(szDrive, L"mmc.exe"); + if (CreateProcessW(szPath, szArg, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) + { + CloseHandle(pi.hProcess); + CloseHandle(pi.hThread); + } } break; case 14002: - wcscat(szPath, L"\\ntbackup.exe"); - if (CreateProcessW(szPath, NULL, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) + dwSize = sizeof(szPath); + if (RegGetValueW(HKEY_LOCAL_MACHINE, + L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\MyComputer\\BackupPath", + NULL, + RRF_RT_REG_EXPAND_SZ, + NULL, + (PVOID)szPath, + &dwSize) == S_OK) { - CloseHandle(pi.hProcess); - CloseHandle(pi.hThread); + if (CreateProcessW(szPath, NULL, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) + { + CloseHandle(pi.hProcess); + CloseHandle(pi.hThread); + } } } break; @@ -542,15 +747,76 @@ SH_ShowDriveProperties(WCHAR * drive) return TRUE; } +BOOL +GetDefaultClusterSize(LPWSTR szFs, PDWORD pClusterSize, PULARGE_INTEGER TotalNumberOfBytes) +{ + DWORD ClusterSize; + if (!wcsicmp(szFs, L"FAT16") || + !wcsicmp(szFs, L"FAT")) //REACTOS HACK + { + if (TotalNumberOfBytes->QuadPart <= (16 * 1024 * 1024)) + ClusterSize = 2048; + else if (TotalNumberOfBytes->QuadPart <= (32 * 1024 * 1024)) + ClusterSize = 512; + else if (TotalNumberOfBytes->QuadPart <= (64 * 1024 * 1024)) + ClusterSize = 1024; + else if (TotalNumberOfBytes->QuadPart <= (128 * 1024 * 1024)) + ClusterSize = 2048; + else if (TotalNumberOfBytes->QuadPart <= (256 * 1024 * 1024)) + ClusterSize = 4096; + else if (TotalNumberOfBytes->QuadPart <= (512 * 1024 * 1024)) + ClusterSize = 8192; + else if (TotalNumberOfBytes->QuadPart <= (1024 * 1024 * 1024)) + ClusterSize = 16384; + else if (TotalNumberOfBytes->QuadPart <= (2048LL * 1024LL * 1024LL)) + ClusterSize = 32768; + else if (TotalNumberOfBytes->QuadPart <= (4096LL * 1024LL * 1024LL)) + ClusterSize = 8192; + else + return FALSE; + } + else if (!wcsicmp(szFs, L"FAT32")) + { + if (TotalNumberOfBytes->QuadPart <=(64 * 1024 * 1024)) + ClusterSize = 512; + else if (TotalNumberOfBytes->QuadPart <= (128 * 1024 * 1024)) + ClusterSize = 1024; + else if (TotalNumberOfBytes->QuadPart <= (256 * 1024 * 1024)) + ClusterSize = 2048; + else if (TotalNumberOfBytes->QuadPart <= (8192LL * 1024LL * 1024LL)) + ClusterSize = 2048; + else if (TotalNumberOfBytes->QuadPart <= (16384LL * 1024LL * 1024LL)) + ClusterSize = 8192; + else if (TotalNumberOfBytes->QuadPart <= (32768LL * 1024LL * 1024LL)) + ClusterSize = 16384; + else + return FALSE; + } + else if (!wcsicmp(szFs, L"NTFS")) + { + if (TotalNumberOfBytes->QuadPart <=(512 * 1024 * 1024)) + ClusterSize = 512; + else if (TotalNumberOfBytes->QuadPart <= (1024 * 1024 * 1024)) + ClusterSize = 1024; + else if (TotalNumberOfBytes->QuadPart <= (2048LL * 1024LL * 1024LL)) + ClusterSize = 2048; + else + ClusterSize = 2048; + } + else + return FALSE; + *pClusterSize = ClusterSize; + return TRUE; +} VOID InsertDefaultClusterSizeForFs(HWND hwndDlg, PFORMAT_DRIVE_CONTEXT pContext) { WCHAR szFs[100] = {0}; - WCHAR szDrive[4] = { L'C', ':', '\\', 0 }; + WCHAR szDrive[4] = { L'C', ':', '\\', 0 }; INT iSelIndex; ULARGE_INTEGER FreeBytesAvailableUser, TotalNumberOfBytes; DWORD ClusterSize; @@ -574,30 +840,13 @@ InsertDefaultClusterSizeForFs(HWND hwndDlg, PFORMAT_DRIVE_CONTEXT pContext) if (!wcsicmp(szFs, L"FAT16") || !wcsicmp(szFs, L"FAT")) //REACTOS HACK { - if (TotalNumberOfBytes.QuadPart <= (16 * 1024 * 1024)) - ClusterSize = 2048; - else if (TotalNumberOfBytes.QuadPart <= (32 * 1024 * 1024)) - ClusterSize = 512; - else if (TotalNumberOfBytes.QuadPart <= (64 * 1024 * 1024)) - ClusterSize = 1024; - else if (TotalNumberOfBytes.QuadPart <= (128 * 1024 * 1024)) - ClusterSize = 2048; - else if (TotalNumberOfBytes.QuadPart <= (256 * 1024 * 1024)) - ClusterSize = 4096; - else if (TotalNumberOfBytes.QuadPart <= (512 * 1024 * 1024)) - ClusterSize = 8192; - else if (TotalNumberOfBytes.QuadPart <= (1024 * 1024 * 1024)) - ClusterSize = 16384; - else if (TotalNumberOfBytes.QuadPart <= (2048LL * 1024LL * 1024LL)) - ClusterSize = 32768; - else if (TotalNumberOfBytes.QuadPart <= (4096LL * 1024LL * 1024LL)) - ClusterSize = 8192; - else + if (!GetDefaultClusterSize(szFs, &ClusterSize, &TotalNumberOfBytes)) { TRACE("FAT16 is not supported on hdd larger than 4G current %lu\n", TotalNumberOfBytes.QuadPart); SendMessageW(hDlgCtrl, CB_DELETESTRING, iSelIndex, 0); return; } + if (LoadStringW(shell32_hInstance, IDS_DEFAULT_CLUSTER_SIZE, szFs, sizeof(szFs)/sizeof(WCHAR))) { hDlgCtrl = GetDlgItem(hwndDlg, 28680); @@ -611,19 +860,7 @@ InsertDefaultClusterSizeForFs(HWND hwndDlg, PFORMAT_DRIVE_CONTEXT pContext) } else if (!wcsicmp(szFs, L"FAT32")) { - if (TotalNumberOfBytes.QuadPart <=(64 * 1024 * 1024)) - ClusterSize = 512; - else if (TotalNumberOfBytes.QuadPart <= (128 * 1024 * 1024)) - ClusterSize = 1024; - else if (TotalNumberOfBytes.QuadPart <= (256 * 1024 * 1024)) - ClusterSize = 2048; - else if (TotalNumberOfBytes.QuadPart <= (8192LL * 1024LL * 1024LL)) - ClusterSize = 2048; - else if (TotalNumberOfBytes.QuadPart <= (16384LL * 1024LL * 1024LL)) - ClusterSize = 8192; - else if (TotalNumberOfBytes.QuadPart <= (32768LL * 1024LL * 1024LL)) - ClusterSize = 16384; - else + if (!GetDefaultClusterSize(szFs, &ClusterSize, &TotalNumberOfBytes)) { TRACE("FAT32 is not supported on hdd larger than 32G current %lu\n", TotalNumberOfBytes.QuadPart); SendMessageW(hDlgCtrl, CB_DELETESTRING, iSelIndex, 0); @@ -643,14 +880,12 @@ InsertDefaultClusterSizeForFs(HWND hwndDlg, PFORMAT_DRIVE_CONTEXT pContext) } else if (!wcsicmp(szFs, L"NTFS")) { - if (TotalNumberOfBytes.QuadPart <=(512 * 1024 * 1024)) - ClusterSize = 512; - else if (TotalNumberOfBytes.QuadPart <= (1024 * 1024 * 1024)) - ClusterSize = 1024; - else if (TotalNumberOfBytes.QuadPart <= (2048LL * 1024LL * 1024LL)) - ClusterSize = 2048; - else - ClusterSize = 2048; + if (!GetDefaultClusterSize(szFs, &ClusterSize, &TotalNumberOfBytes)) + { + TRACE("NTFS is not supported on hdd larger than 2TB current %lu\n", TotalNumberOfBytes.QuadPart); + SendMessageW(hDlgCtrl, CB_DELETESTRING, iSelIndex, 0); + return; + } hDlgCtrl = GetDlgItem(hwndDlg, 28680); if (LoadStringW(shell32_hInstance, IDS_DEFAULT_CLUSTER_SIZE, szFs, sizeof(szFs)/sizeof(WCHAR))) @@ -1016,6 +1251,14 @@ InitializeFmifsLibrary(PFORMAT_DRIVE_CONTEXT pContext) return FALSE; } + pContext->Chkdsk = (CHKDSK) GetProcAddress(hLibrary, "Chkdsk"); + if (!pContext->Chkdsk) + { + ERR("Chkdsk export is missing\n"); + FreeLibrary(hLibrary); + return FALSE; + } + return TRUE; } From 07ca2d26fc549ad0a48f6422713d0dba31e4187e Mon Sep 17 00:00:00 2001 From: Sylvain Petreolle Date: Thu, 14 Aug 2008 14:52:35 +0000 Subject: [PATCH 004/324] update more utility french translation Amine Khaldi (amine48rz) svn path=/trunk/; revision=35338 --- reactos/base/applications/cmdutils/more/lang/fr-FR.rc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reactos/base/applications/cmdutils/more/lang/fr-FR.rc b/reactos/base/applications/cmdutils/more/lang/fr-FR.rc index 2b718376e03..fb9b5762d02 100644 --- a/reactos/base/applications/cmdutils/more/lang/fr-FR.rc +++ b/reactos/base/applications/cmdutils/more/lang/fr-FR.rc @@ -7,9 +7,9 @@ BEGIN Commande | MORE \n\ MORE [Lecteur:][Chemin]Nom du fichier\n\n\ [Lecteur:][Chemin]Nom du fichier Un fichier, dont le contenu sera affichй.\n\ - Commande\t\t Une commande, dont la sortie sera affichй.\n\n\ - А l'invite ""-- Continuer --"" you pouvez appuyer sur n'importe quelle touche pour afficher la page suivante.\n" + Commande\t\t Une commande, dont la sortie sera affichйe.\n\n\ + А l'invite ""-- Continuer --"" Vous pouvez appuyer sur n'importe quelle touche pour afficher la page suivante.\n" IDS_CONTINUE, " -- Continuer (100%) -- " - IDS_FILE_ACCESS, "Impossible d'accиder au fichier %s." + IDS_FILE_ACCESS, "Impossible d'accйder au fichier %s." END From 467ea81557df4ab5af5a2b2012cfea20f9b3c44f Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Thu, 14 Aug 2008 15:03:37 +0000 Subject: [PATCH 005/324] * Store the paths of ntbackup and defrag.msc in the registry svn path=/trunk/; revision=35339 --- reactos/boot/bootdata/hivesft_i386.inf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/reactos/boot/bootdata/hivesft_i386.inf b/reactos/boot/bootdata/hivesft_i386.inf index 550eec22d37..34fd6c9e53a 100644 --- a/reactos/boot/bootdata/hivesft_i386.inf +++ b/reactos/boot/bootdata/hivesft_i386.inf @@ -28,6 +28,11 @@ HKLM,SOFTWARE\Microsoft\Active Setup\Installed Components\{de5aed00-a4bf-11d1-99 ; Common shell folders HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders",,0x00000012 HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders",,0x00000012 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\DefragPath",,0x00000012 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\DefragPath","",0x00020000,"%systemroot%\system32\dfrg.msc %c:" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\BackupPath",,0x00000012 +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\BackupPath","",0x00020000,"%SystemRoot%\system32\ntbackup.exe" + HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce",,0x00000012 HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons",,0x00000012 HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu",,0x00000012 From c335a12872989bf04cfa1d2b522a007bc2e787ed Mon Sep 17 00:00:00 2001 From: Sylvain Petreolle Date: Thu, 14 Aug 2008 16:17:22 +0000 Subject: [PATCH 006/324] update french translations : solitaire, msconfig, desk.cpl, win32csr patches by Amine Khaldi (amine48rz) svn path=/trunk/; revision=35341 --- .../games/solitaire/lang/fr-FR.rc | 2 +- .../base/applications/msconfig/lang/fr-FR.rc | 30 +++++++++---------- reactos/dll/cpl/desk/lang/fr-FR.rc | 4 +-- .../win32/csrss/win32csr/lang/fr-FR.rc | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/reactos/base/applications/games/solitaire/lang/fr-FR.rc b/reactos/base/applications/games/solitaire/lang/fr-FR.rc index a062d927dad..b63d69cec38 100644 --- a/reactos/base/applications/games/solitaire/lang/fr-FR.rc +++ b/reactos/base/applications/games/solitaire/lang/fr-FR.rc @@ -22,7 +22,7 @@ BEGIN AUTORADIOBUTTON "En tirer trois", IDC_OPT_DRAWTHREE, 14, 32, 52, 10 AUTOCHECKBOX "Afficher le temp&s", IDC_OPT_SHOWTIME, 7 ,51 ,65 ,10, WS_TABSTOP | WS_DISABLED - AUTOCHECKBOX "Barre de s&tatus", IDC_OPT_STATUSBAR, 7, 66, 64, 10, WS_TABSTOP + AUTOCHECKBOX "Barre de s&tatut", IDC_OPT_STATUSBAR, 7, 66, 64, 10, WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 35, 97, 50, 14 PUSHBUTTON "Annuler", IDCANCEL, 101, 97, 50, 14 diff --git a/reactos/base/applications/msconfig/lang/fr-FR.rc b/reactos/base/applications/msconfig/lang/fr-FR.rc index e116455ce87..6ff3e099fc2 100644 --- a/reactos/base/applications/msconfig/lang/fr-FR.rc +++ b/reactos/base/applications/msconfig/lang/fr-FR.rc @@ -36,7 +36,7 @@ BEGIN PUSHBUTTON "Rechercher", IDC_BTN_SYSTEM_FIND, 290, 95, 66, 14 PUSHBUTTON "&Nouveau", IDC_BTN_SYSTEM_NEW, 290, 115, 66, 14 - PUSHBUTTON "Йdi&ter", IDC_BTN_SYSTEM_EDIT, 290, 135, 66, 14 + PUSHBUTTON "M&odifier", IDC_BTN_SYSTEM_EDIT, 290, 135, 66, 14 PUSHBUTTON "Activer tout", IDC_BTN_SYSTEM_ACTIVATE, 123, 155, 66, 14 PUSHBUTTON "Dйsactiver tout",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 @@ -64,11 +64,11 @@ IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Sйlection du Dйmarrage ", -1, 10, 10, 340, 150,0,WS_EX_TRANSPARENT - CONTROL "Dйmarrage &Normal - charge tous les drivers et services", IDC_CBX_NORMAL_START, "Button", 0x50010009, 20, 30, 185, 10 - CONTROL "Dйmarrage &Diagnostic - charge les pйriphйriques de base et services seulement", IDC_CBX_DIAGNOSTIC_START, "Button", 0x50010009, 20, 45, 260, 10 - CONTROL "Dйmarrage &Sйlectif", IDC_CBX_SELECTIVE_STARTUP, "Button", 0x50010009, 20, 60, 75, 10 - AUTOCHECKBOX "T&raiter le fichier SYSTEM.INI", IDC_CBX_SYSTEM_INI, 30, 80, 100, 10 + GROUPBOX "Sйlection du mode de dйmarrage ", -1, 10, 10, 340, 150,0,WS_EX_TRANSPARENT + CONTROL "Dйmarrage &normal - charge tous les pilotes et tous les services", IDC_CBX_NORMAL_START, "Button", 0x50010009, 20, 30, 185, 10 + CONTROL "Dйmarrage en mode &diagnostic - charge les pйriphйriques de base et les services seulement", IDC_CBX_DIAGNOSTIC_START, "Button", 0x50010009, 20, 45, 260, 10 + CONTROL "Dйmarrage &sйlectif", IDC_CBX_SELECTIVE_STARTUP, "Button", 0x50010009, 20, 60, 75, 10 + AUTOCHECKBOX "T&raiter le fichier System.ini", IDC_CBX_SYSTEM_INI, 30, 80, 100, 10 AUTOCHECKBOX "&Charger les Services Systиme", IDC_CBX_SYSTEM_SERVICE, 30, 95, 105, 10 AUTOCHECKBOX "Charger les йlйments de dйmarrage", IDC_CBX_STARTUP_ITEM, 30, 110, 75, 10 END @@ -78,7 +78,7 @@ STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50, 0x00000200 - PUSHBUTTON "&Cocher tous les chemins de dйmarrage", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 70, 12 + PUSHBUTTON "&Vйrifier les chemins de dйmarrage", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 70, 12 PUSHBUTTON "&Par Dйfaut", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 70, 12 PUSHBUTTON "&Monter", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12 PUSHBUTTON "&Descendre", IDC_BTN_MOVE_DOWN_BOOT_OPTION, 280, 65, 70, 12 @@ -91,7 +91,7 @@ BEGIN PUSHBUTTON "Options A&vancйes...", IDC_BTN_ADVANCED_OPTIONS, 100, 150, 70, 12 LTEXT "&Dйlai:", -1, 280, 91, 30, 10 EDITTEXT IDC_TXT_BOOT_TIMEOUT, 310, 90, 25, 12, ES_LEFT - LTEXT "sec.", -1, 340, 91, 15, 10 + LTEXT "secondes", -1, 340, 91, 15, 10 END IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175 @@ -133,7 +133,7 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_SERVICES_COLUMN_SERVICE "Service" - IDS_SERVICES_COLUMN_REQ "Requis" + IDS_SERVICES_COLUMN_REQ "Essentiel" IDS_SERVICES_COLUMN_VENDOR "Fabricant" IDS_SERVICES_COLUMN_STATUS "Йtat" END @@ -144,15 +144,15 @@ BEGIN IDS_TOOLS_COLUMN_DESCR "Description" IDS_TOOLS_CMD_NAME "Console" - IDS_TOOLS_CMD_DESCR "" + IDS_TOOLS_CMD_DESCR "Ouvre la console." IDS_TOOLS_CMD_CMD "cmd.exe" IDS_TOOLS_INFO_NAME "Version" - IDS_TOOLS_INFO_DESCR "Affiche les informations de version." + IDS_TOOLS_INFO_DESCR "Affiche la version de ReactOS." IDS_TOOLS_INFO_CMD "winver.exe" - IDS_TOOLS_REGEDIT_NAME "Editeur de Registre" - IDS_TOOLS_REGEDIT_DESCR "Ouvre l'йditeur de Registre" + IDS_TOOLS_REGEDIT_NAME "Editeur du Registre" + IDS_TOOLS_REGEDIT_DESCR "Ouvre l'йditeur du Registre" IDS_TOOLS_REGEDIT_CMD "regedit.exe" IDS_TOOLS_SYSDM_NAME "Propriйtйs systиme" @@ -160,14 +160,14 @@ BEGIN IDS_TOOLS_SYSDM_CMD "control.exe" IDS_TOOLS_SYSDM_PARAM "sysdm.cpl" - IDS_STARTUP_COLUMN_ELEMENT "Elйment" + IDS_STARTUP_COLUMN_ELEMENT "Йlйment" IDS_STARTUP_COLUMN_CMD "Commande" IDS_STARTUP_COLUMN_PATH "Chemin" END STRINGTABLE DISCARDABLE BEGIN - IDS_SERVICES_STATUS_RUNNING "En cours" + IDS_SERVICES_STATUS_RUNNING "En cours d'exйcution" IDS_SERVICES_STATUS_STOPPED "Arrкtй" IDS_SERVICES_YES "Oui" IDS_SERVICES_UNKNOWN "Inconnu" diff --git a/reactos/dll/cpl/desk/lang/fr-FR.rc b/reactos/dll/cpl/desk/lang/fr-FR.rc index 7ef56de6a5e..24005bdd803 100644 --- a/reactos/dll/cpl/desk/lang/fr-FR.rc +++ b/reactos/dll/cpl/desk/lang/fr-FR.rc @@ -54,7 +54,7 @@ FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDC_APPEARANCE_PREVIEW, "PreviewWndClass", WS_VISIBLE | WS_BORDER, 7, 7, 232, 120 - LTEXT "Colorscheme", IDC_STATIC, 7, 140, 64, 7 + LTEXT "Modиle de couleurs", IDC_STATIC, 7, 140, 64, 7 COMBOBOX IDC_APPEARANCE_UI_ITEM, 7, 169, 120, 54, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Avancй", IDC_APPEARANCE_ADVANCED, 182, 150, 56, 15 END @@ -81,7 +81,7 @@ BEGIN LTEXT "&2иme Couleur :", IDC_ADVAPPEARANCE_COLOR2_T, 216, 160, 40, 9 CHECKBOX "-", IDC_ADVAPPEARANCE_COLOR2_B, 216, 170, 28, 13, BS_PUSHLIKE | BS_BITMAP - LTEXT "Fonte :", IDC_ADVAPPEARANCE_FONT_T, 5, 190, 50, 8 + LTEXT "Police :", IDC_ADVAPPEARANCE_FONT_T, 5, 190, 50, 8 COMBOBOX IDC_ADVAPPEARANCE_FONT_C, 5, 200, 130, 90, CBS_DROPDOWN | CBS_HASSTRINGS | CBS_SORT | WS_VSCROLL | WS_TABSTOP LTEXT "Taille :", IDC_ADVAPPEARANCE_FONTSIZE_T, 142, 190, 39, 8 diff --git a/reactos/subsystems/win32/csrss/win32csr/lang/fr-FR.rc b/reactos/subsystems/win32/csrss/win32csr/lang/fr-FR.rc index 834aa502dec..708af193c8e 100644 --- a/reactos/subsystems/win32/csrss/win32csr/lang/fr-FR.rc +++ b/reactos/subsystems/win32/csrss/win32csr/lang/fr-FR.rc @@ -47,7 +47,7 @@ BEGIN IDS_SCROLL "Dйfiler" IDS_FIND "Trouver..." IDS_DEFAULTS "Dйfauts" - IDS_PROPERTIES "Proprietйs" + IDS_PROPERTIES "Propriйtйs" IDS_SCROLLHERE "Dйfiler ici" IDS_SCROLLTOP "Dйfiler tout en haut" IDS_SCROLLBOTTOM "Dйfiler tout en bas" From 9f65ee2cec9469e87484b1a033db2c74fbb7f10b Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Thu, 14 Aug 2008 16:43:52 +0000 Subject: [PATCH 007/324] - Fix MiSyncThreadProcessViews to hack-sync the next thread's ETHREAD too (spotted by Alex) svn path=/trunk/; revision=35342 --- reactos/ntoskrnl/mm/mm.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/reactos/ntoskrnl/mm/mm.c b/reactos/ntoskrnl/mm/mm.c index 948d855eb70..82e9d0d20fc 100644 --- a/reactos/ntoskrnl/mm/mm.c +++ b/reactos/ntoskrnl/mm/mm.c @@ -28,12 +28,14 @@ VOID FASTCALL MiSyncThreadProcessViews(IN PKTHREAD NextThread) { + PVOID Process = PsGetCurrentProcess(); + PETHREAD Thread = CONTAINING_RECORD(NextThread, ETHREAD, Tcb); + /* Hack Sync because Mm is broken */ - MmUpdatePageDir(PsGetCurrentProcess(), - ((PETHREAD)NextThread)->ThreadsProcess, - sizeof(EPROCESS)); - MmUpdatePageDir(PsGetCurrentProcess(), - (PVOID)((PETHREAD)NextThread)->Tcb.StackLimit, + MmUpdatePageDir(Process, Thread, sizeof(ETHREAD)); + MmUpdatePageDir(Process, Thread->ThreadsProcess, sizeof(EPROCESS)); + MmUpdatePageDir(Process, + (PVOID)Thread->Tcb.StackLimit, NextThread->LargeStack ? KERNEL_LARGE_STACK_SIZE : KERNEL_STACK_SIZE); } From 1e1fc03ade6bc86b5eb0638603e63191f0d74f4a Mon Sep 17 00:00:00 2001 From: Dmitry Chapyshev Date: Thu, 14 Aug 2008 17:57:50 +0000 Subject: [PATCH 008/324] - Update Russian translation svn path=/trunk/; revision=35344 --- reactos/dll/win32/shell32/lang/ru-RU.rc | 70 ++++++++++++------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/reactos/dll/win32/shell32/lang/ru-RU.rc b/reactos/dll/win32/shell32/lang/ru-RU.rc index 5da6844743f..ecdf0d6fb3a 100644 --- a/reactos/dll/win32/shell32/lang/ru-RU.rc +++ b/reactos/dll/win32/shell32/lang/ru-RU.rc @@ -373,59 +373,59 @@ BEGIN PUSHBUTTON "Отмена", 14006, 206, 236, 50, 14 END -FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 256 +FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 238 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION CAPTION "Общие" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "Задачи", -1, 7, 10, 249, 45 //ICON -AUTORADIOBUTTON "Отобра&жение списка типичных задач в папках", 14001, 40, 25, 120, 10, WS_TABSTOP -AUTORADIOBUTTON "Использовать обы&чные папки ReactOS", 14002, 40, 37, 120, 10, WS_TABSTOP +AUTORADIOBUTTON "Отобра&жение списка типичных задач в папках", 14001, 40, 24, 185, 10, WS_TABSTOP +AUTORADIOBUTTON "Использовать обы&чные папки ReactOS", 14002, 40, 36, 185, 10, WS_TABSTOP GROUPBOX "Обзор папок", -1, 7, 60, 249, 45, WS_TABSTOP //ICON -AUTORADIOBUTTON "&Открывать папки в одном и том же окне", 14004, 40, 70, 140, 10, WS_TABSTOP -AUTORADIOBUTTON "О&ткрывать каждую папку в отдельном окне", 14005, 40, 82, 140, 10, WS_TABSTOP +AUTORADIOBUTTON "&Открывать папки в одном и том же окне", 14004, 40, 75, 185, 10, WS_TABSTOP +AUTORADIOBUTTON "О&ткрывать каждую папку в отдельном окне", 14005, 40, 87, 185, 10, WS_TABSTOP GROUPBOX "Щелчки мышью", -1, 7, 110, 249, 60 //ICON -AUTORADIOBUTTON "От&крывать одним щелчком, выделять указателем", 14007, 40, 120, 170, 10, WS_TABSTOP +AUTORADIOBUTTON "От&крывать одним щелчком, выделять указателем", 14007, 40, 120, 200, 10, WS_TABSTOP AUTORADIOBUTTON "Подчеркив&ать подписи значков", 14008, 50, 132, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Подчеркивать подписи з&начков при наведении", 14009, 50, 144, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Откр&ывать двойным, а выделять одним щелчком", 14010, 40, 156, 170, 10, WS_TABSTOP -PUSHBUTTON "&Восстановить умолчания", 14011, 180, 180, 60, 14, WS_TABSTOP +AUTORADIOBUTTON "Подчеркивать подписи з&начков при наведении", 14009, 50, 144, 185, 10, WS_TABSTOP +AUTORADIOBUTTON "Откр&ывать двойным, а выделять одним щелчком", 14010, 40, 156, 195, 10, WS_TABSTOP +PUSHBUTTON "&Восстановить умолчания", 14011, 148, 180, 104, 14, WS_TABSTOP END -FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 +FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 238 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION CAPTION "Вид" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "Представление папок", -1, 7, 10, 249, 60 //ICON -LTEXT "Можно применить вид, выбранный для этой папки, например, ""Таблица"" или ""Плитка"", ко всем папкам.", -1, 60, 20, 180, 20 -PUSHBUTTON "&Применить ко всем папкам", 14001, 60, 50, 80, 14, WS_TABSTOP -PUSHBUTTON "&Сброс для всех папок", 14002, 150, 50, 80, 14, WS_TABSTOP -LTEXT "Дополнительные параметры:", -1, 7, 80, 100, 10 +LTEXT "Можно применить вид, выбранный для этой папки, например, ""Таблица"" или ""Плитка"", ко всем папкам.", -1, 60, 24, 180, 20 +PUSHBUTTON "&Применить ко всем папкам", 14001, 60, 50, 100, 14, WS_TABSTOP +PUSHBUTTON "&Сброс для всех папок", 14002, 164, 50, 80, 14, WS_TABSTOP +LTEXT "Дополнительные параметры:", -1, 9, 78, 120, 10 CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 -PUSHBUTTON "&Восстановить умолчания", 14004, 180, 210, 80, 14, WS_TABSTOP +PUSHBUTTON "&Восстановить умолчания", 14004, 156, 216, 101, 14, WS_TABSTOP END -FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 256 +FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 238 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION CAPTION "Типы файлов" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN -LTEXT "&Зарегистрированные типы файлов:", -1, 7, 10, 70, 10 +LTEXT "&Зарегистрированные типы файлов:", -1, 9, 7, 133, 10 CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 -PUSHBUTTON "&Создать", 14001, 120, 110, 50, 14, WS_TABSTOP -PUSHBUTTON "&Удалить", 14002, 180, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "&Создать", 14001, 147, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "&Удалить", 14002, 202, 110, 50, 14, WS_TABSTOP GROUPBOX "Описание расширения '%s'", 14003, 7, 130, 249, 70 -LTEXT "Открывать в:", -1, 12, 140, 40, 10 +LTEXT "Открывать в:", -1, 12, 142, 54, 10 //ICON -LTEXT "Приложение:", 14005, 100, 140, 40, 10 -PUSHBUTTON "&Изменить...", 14006, 180, 140, 50, 14, WS_TABSTOP -LTEXT "Файлы с расширением '%s' имеют тип '%s'. Для\nизменения параметров всех файлов '%s', нажмите\n""Дополнительно"".", 14007, 12, 155, 160, 30 -PUSHBUTTON "До&полнительно", 14008, 180, 175, 50, 14, WS_TABSTOP +LTEXT "Приложение:", 14005, 100, 142, 54, 10 +PUSHBUTTON "&Изменить...", 14006, 180, 140, 63, 14, WS_TABSTOP +LTEXT "Файлы с расширением '%s' имеют тип '%s'. Для изменения параметров всех файлов '%s', нажмите ""Дополнительно"".", 14007, 12, 155, 162, 36 +PUSHBUTTON "До&полнительно", 14008, 180, 175, 63, 14, WS_TABSTOP END CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 @@ -563,18 +563,18 @@ BEGIN AUTOCHECKBOX "&Использовать сжатие", 28675, 16, 152, 155, 10 END -CHKDSK_DLG DIALOGEX 50, 50, 194, 120 +CHKDSK_DLG DIALOGEX 50, 50, 232, 111 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "Check Disk" +CAPTION "Проверка диска" FONT 8, "MS Shell Dlg" BEGIN - DEFPUSHBUTTON "Start", IDOK, 53, 100, 60, 14 - GROUPBOX "Check disk options", -1, 7, 6, 179, 50 - PUSHBUTTON "Cancel", IDCANCEL, 118, 100, 60, 14 - AUTOCHECKBOX "Automatically fix file system errors", 14000, 16, 15, 155, 10 - AUTOCHECKBOX "&Scan for and attempt recovery of bad sectors", 14001, 16, 30, 165, 10 - CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 - LTEXT "", 14003, 60, 80, 170, 10 + DEFPUSHBUTTON "Запуск", IDOK, 101, 91, 60, 14 + GROUPBOX "Параметры проверки диска", -1, 7, 5, 218, 50 + PUSHBUTTON "Отмена", IDCANCEL, 165, 91, 60, 14 + AUTOCHECKBOX "&Автоматически исправлять системные ошибки", 14000, 16, 19, 178, 10 + AUTOCHECKBOX "&Проверять и востанавливать поврежденные сектора", 14001, 16, 35, 200, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 218, 8 + LTEXT "", 14003, 7, 75, 218, 10 END IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 @@ -623,7 +623,7 @@ BEGIN IDS_MYCOMPUTER "Мой компьютер" IDS_RECYCLEBIN_FOLDER_NAME "Корзина" IDS_CONTROLPANEL "Панель управления" - IDS_ADMINISTRATIVETOOLS "Administrative Tools" + IDS_ADMINISTRATIVETOOLS "Администрирование" /* context menus */ IDS_VIEW_LARGE "&Большие значки" @@ -743,5 +743,5 @@ BEGIN IDS_FONTS "Шрифты" IDS_INSTALLNEWFONT "Установить новый шрифт..." - IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" + IDS_DEFAULT_CLUSTER_SIZE "Выделяемый по умолчанию размер" END From 39775880e5a1fe172ee45426a8ab9a4fa6d16f32 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Thu, 14 Aug 2008 19:30:32 +0000 Subject: [PATCH 009/324] - Header cleanup - Rename ObInit to ObInitSystem - Add missing KPCR_PRCB_PRCB_LOCK offset to the NDK svn path=/trunk/; revision=35345 --- reactos/include/ndk/asm.h | 1 + reactos/ntoskrnl/ex/init.c | 4 +- reactos/ntoskrnl/include/internal/cm.h | 15 ++++ reactos/ntoskrnl/include/internal/kd.h | 7 ++ reactos/ntoskrnl/include/internal/ntoskrnl.h | 88 ++------------------ reactos/ntoskrnl/ob/obinit.c | 2 +- 6 files changed, 32 insertions(+), 85 deletions(-) diff --git a/reactos/include/ndk/asm.h b/reactos/include/ndk/asm.h index 952c545d466..771fa8242ad 100644 --- a/reactos/include/ndk/asm.h +++ b/reactos/include/ndk/asm.h @@ -191,6 +191,7 @@ Author: #define KPCR_PROCESSOR_NUMBER 0x130 #define KPCR_PRCB_SET_MEMBER 0x134 #define KPCR_PRCB_CPU_TYPE 0x138 +#define KPCR_PRCB_PRCB_LOCK 0xA7C #define KPCR_NPX_THREAD 0x640 #define KPCR_DR6 0x428 #define KPCR_DR7 0x42C diff --git a/reactos/ntoskrnl/ex/init.c b/reactos/ntoskrnl/ex/init.c index 89f09f0bbce..72f13b0570b 100644 --- a/reactos/ntoskrnl/ex/init.c +++ b/reactos/ntoskrnl/ex/init.c @@ -1203,7 +1203,7 @@ ExpInitializeExecutive(IN ULONG Cpu, #endif /* Create the Basic Object Manager Types to allow new Object Types */ - if (!ObInit()) KEBUGCHECK(OBJECT_INITIALIZATION_FAILED); + if (!ObInitSystem()) KEBUGCHECK(OBJECT_INITIALIZATION_FAILED); /* Load basic Security for other Managers */ if (!SeInit()) KEBUGCHECK(SECURITY_INITIALIZATION_FAILED); @@ -1516,7 +1516,7 @@ Phase1InitializationDiscard(IN PVOID Context) InbvUpdateProgressBar(5); /* Call OB initialization again */ - if (!ObInit()) KeBugCheck(OBJECT1_INITIALIZATION_FAILED); + if (!ObInitSystem()) KeBugCheck(OBJECT1_INITIALIZATION_FAILED); /* Initialize Basic System Objects and Worker Threads */ if (!ExInitSystem()) KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, 0, 0, 1, 0); diff --git a/reactos/ntoskrnl/include/internal/cm.h b/reactos/ntoskrnl/include/internal/cm.h index 8e9289817dd..fc54a4af59d 100644 --- a/reactos/ntoskrnl/include/internal/cm.h +++ b/reactos/ntoskrnl/include/internal/cm.h @@ -520,6 +520,21 @@ typedef struct _KEY_INFORMATION NTSTATUS CmiCallRegisteredCallbacks(IN REG_NOTIFY_CLASS Argument1, IN PVOID Argument2); /////////////////////////////////////////////////////////////////////////////// +// +// Startup and Shutdown Functions +// +BOOLEAN +NTAPI +CmInitSystem1( + VOID +); + +VOID +NTAPI +CmShutdownSystem( + VOID +); + // // Mapped View Hive Functions // diff --git a/reactos/ntoskrnl/include/internal/kd.h b/reactos/ntoskrnl/include/internal/kd.h index a799b3b149c..9390411b128 100644 --- a/reactos/ntoskrnl/include/internal/kd.h +++ b/reactos/ntoskrnl/include/internal/kd.h @@ -183,6 +183,13 @@ KD_CONTINUE_TYPE /* INIT ROUTINES *************************************************************/ +BOOLEAN +NTAPI +KdInitSystem( + ULONG Reserved, + PLOADER_PARAMETER_BLOCK LoaderBlock +); + VOID STDCALL KdpScreenInit( diff --git a/reactos/ntoskrnl/include/internal/ntoskrnl.h b/reactos/ntoskrnl/include/internal/ntoskrnl.h index c78a02ffbe6..a0c8e480fb6 100644 --- a/reactos/ntoskrnl/include/internal/ntoskrnl.h +++ b/reactos/ntoskrnl/include/internal/ntoskrnl.h @@ -37,6 +37,8 @@ #define InterlockedCompareExchange64 _InterlockedCompareExchange64 #define InterlockedExchange _InterlockedExchange #define InterlockedExchangeAdd _InterlockedExchangeAdd +#define InterlockedOr _InterlockedOr +#define InterlockedAnd _InterlockedAnd #include "ke.h" #include "i386/mm.h" @@ -71,84 +73,6 @@ #include "hal.h" #include "arch/intrin_i.h" -#include -/* - * Defines a descriptor as it appears in the processor tables - */ -typedef struct __DESCRIPTOR -{ - ULONG a; - ULONG b; -} IDT_DESCRIPTOR, GDT_DESCRIPTOR; - -#include -//extern GDT_DESCRIPTOR KiGdt[256]; - -/* - * Initalization functions (called once by main()) - */ -BOOLEAN NTAPI ObInit(VOID); -BOOLEAN NTAPI CmInitSystem1(VOID); -VOID NTAPI CmShutdownSystem(VOID); -BOOLEAN NTAPI KdInitSystem(ULONG Reserved, PLOADER_PARAMETER_BLOCK LoaderBlock); - -/* FIXME - RtlpCreateUnicodeString is obsolete and should be removed ASAP! */ -BOOLEAN FASTCALL -RtlpCreateUnicodeString( - IN OUT PUNICODE_STRING UniDest, - IN PCWSTR Source, - IN POOL_TYPE PoolType); - -VOID -NTAPI -RtlpLogException(IN PEXCEPTION_RECORD ExceptionRecord, - IN PCONTEXT ContextRecord, - IN PVOID ContextData, - IN ULONG Size); - -/* FIXME: Interlocked functions that need to be made into a public header */ -#ifdef __GNUC__ -FORCEINLINE -LONG -InterlockedAnd(IN OUT LONG volatile *Target, - IN LONG Set) -{ - LONG i; - LONG j; - - j = *Target; - do { - i = j; - j = InterlockedCompareExchange((PLONG)Target, - i & Set, - i); - - } while (i != j); - - return j; -} - -FORCEINLINE -LONG -InterlockedOr(IN OUT LONG volatile *Target, - IN LONG Set) -{ - LONG i; - LONG j; - - j = *Target; - do { - i = j; - j = InterlockedCompareExchange((PLONG)Target, - i | Set, - i); - - } while (i != j); - - return j; -} -#endif - /* * generic information class probing code */ @@ -324,8 +248,8 @@ C_ASSERT(FIELD_OFFSET(KTHREAD, TrapFrame) == KTHREAD_TRAP_FRAME); C_ASSERT(FIELD_OFFSET(KTHREAD, CallbackStack) == KTHREAD_CALLBACK_STACK); C_ASSERT(FIELD_OFFSET(KTHREAD, ApcState.Process) == KTHREAD_APCSTATE_PROCESS); C_ASSERT(FIELD_OFFSET(KPROCESS, DirectoryTableBase) == KPROCESS_DIRECTORY_TABLE_BASE); -//C_ASSERT(FIELD_OFFSET(KPCR, Tib.ExceptionList) == KPCR_EXCEPTION_LIST); -//C_ASSERT(FIELD_OFFSET(KPCR, Self) == KPCR_SELF); +C_ASSERT(FIELD_OFFSET(KPCR, Tib.ExceptionList) == KPCR_EXCEPTION_LIST); +C_ASSERT(FIELD_OFFSET(KPCR, Self) == KPCR_SELF); #ifdef _M_IX86 C_ASSERT(FIELD_OFFSET(KPCR, IRR) == KPCR_IRR); C_ASSERT(FIELD_OFFSET(KPCR, IDR) == KPCR_IDR); @@ -335,7 +259,7 @@ C_ASSERT(FIELD_OFFSET(KIPCR, PrcbData) + FIELD_OFFSET(KPRCB, NextThread) == KPCR C_ASSERT(FIELD_OFFSET(KIPCR, PrcbData) + FIELD_OFFSET(KPRCB, NpxThread) == KPCR_NPX_THREAD); C_ASSERT(FIELD_OFFSET(KIPCR, PrcbData) == KPCR_PRCB_DATA); C_ASSERT(FIELD_OFFSET(KIPCR, PrcbData) + FIELD_OFFSET(KPRCB, KeSystemCalls) == KPCR_SYSTEM_CALLS); -C_ASSERT(FIELD_OFFSET(KIPCR, PrcbData) + FIELD_OFFSET(KPRCB, DpcData) + /*FIELD_OFFSET(KDPC_DATA, DpcQueuDepth)*/12 == KPCR_PRCB_DPC_QUEUE_DEPTH); +C_ASSERT(FIELD_OFFSET(KIPCR, PrcbData) + FIELD_OFFSET(KPRCB, DpcData) + FIELD_OFFSET(KDPC_DATA, DpcQueueDepth) == KPCR_PRCB_DPC_QUEUE_DEPTH); C_ASSERT(FIELD_OFFSET(KIPCR, PrcbData) + FIELD_OFFSET(KPRCB, DpcData) + 16 == KPCR_PRCB_DPC_COUNT); C_ASSERT(FIELD_OFFSET(KIPCR, PrcbData) + FIELD_OFFSET(KPRCB, DpcStack) == KPCR_PRCB_DPC_STACK); C_ASSERT(FIELD_OFFSET(KIPCR, PrcbData) + FIELD_OFFSET(KPRCB, TimerRequest) == KPCR_PRCB_TIMER_REQUEST); @@ -348,7 +272,7 @@ C_ASSERT(FIELD_OFFSET(KIPCR, PrcbData) + FIELD_OFFSET(KPRCB, TimerRequest) == KP C_ASSERT(FIELD_OFFSET(KIPCR, PrcbData) + FIELD_OFFSET(KPRCB, QuantumEnd) == KPCR_PRCB_QUANTUM_END); C_ASSERT(FIELD_OFFSET(KIPCR, PrcbData) + FIELD_OFFSET(KPRCB, DeferredReadyListHead) == KPCR_PRCB_DEFERRED_READY_LIST_HEAD); C_ASSERT(FIELD_OFFSET(KIPCR, PrcbData) + FIELD_OFFSET(KPRCB, PowerState) == KPCR_PRCB_POWER_STATE_IDLE_FUNCTION); -//C_ASSERT(FIELD_OFFSET(KIPCR, PrcbData) + FIELD_OFFSET(KPRCB, PrcbLock) == KPCR_PRCB_PRCB_LOCK); +C_ASSERT(FIELD_OFFSET(KIPCR, PrcbData) + FIELD_OFFSET(KPRCB, PrcbLock) == KPCR_PRCB_PRCB_LOCK); C_ASSERT(FIELD_OFFSET(KIPCR, PrcbData) + FIELD_OFFSET(KPRCB, DpcStack) == KPCR_PRCB_DPC_STACK); C_ASSERT(sizeof(FX_SAVE_AREA) == SIZEOF_FX_SAVE_AREA); diff --git a/reactos/ntoskrnl/ob/obinit.c b/reactos/ntoskrnl/ob/obinit.c index 1cf18b051f6..9083f1af7f8 100644 --- a/reactos/ntoskrnl/ob/obinit.c +++ b/reactos/ntoskrnl/ob/obinit.c @@ -124,7 +124,7 @@ ObInit2(VOID) BOOLEAN INIT_FUNCTION NTAPI -ObInit(VOID) +ObInitSystem(VOID) { OBJECT_ATTRIBUTES ObjectAttributes; UNICODE_STRING Name; From e9f18efcfc4c59e3b5b4d1000fef16fbb579030b Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Thu, 14 Aug 2008 21:35:52 +0000 Subject: [PATCH 010/324] PE symbol dumper. It's not finished, functions don't work and the type output doesn't always look 100% correct. But it does it's job. You need dbghelp.dll and symsrv.dll from windbg. svn path=/trunk/; revision=35346 --- .../applications/devutils/directory.rbuild | 4 + .../applications/devutils/symdump/symdump.c | 985 ++++++++++++++++++ .../devutils/symdump/symdump.rbuild | 9 + 3 files changed, 998 insertions(+) create mode 100644 rosapps/applications/devutils/symdump/symdump.c create mode 100644 rosapps/applications/devutils/symdump/symdump.rbuild diff --git a/rosapps/applications/devutils/directory.rbuild b/rosapps/applications/devutils/directory.rbuild index 071248a4102..1f981be4285 100644 --- a/rosapps/applications/devutils/directory.rbuild +++ b/rosapps/applications/devutils/directory.rbuild @@ -20,6 +20,10 @@ + + + + diff --git a/rosapps/applications/devutils/symdump/symdump.c b/rosapps/applications/devutils/symdump/symdump.c new file mode 100644 index 00000000000..28b9e2ba51c --- /dev/null +++ b/rosapps/applications/devutils/symdump/symdump.c @@ -0,0 +1,985 @@ +/* + * PE symbol dumper + * + * symdump.c + * + * Copyright (c) 2008 Timo Kreuzer kreuzer reactos org> + * + * This program is released under the terms of the GNU GPL. + * + * TODO: + * - fix GDILoObjType + * - fix UDTKind1 + * - include the correct headers for some stuff + * - fix unions like LARGE_INTEGER + */ + +#include +#define _WINVER 0x501 +#include +#include +#include + +HANDLE hCurrentProcess; +BOOL g_bShowPos = 0; + +#define MAX_SYMBOL_NAME 1024 + +#define CV_CALL_NEAR_C 0x00 +#define CV_CALL_FAR_C 0x01 +#define CV_CALL_NEAR_PASCAL 0x02 +#define CV_CALL_FAR_PASCAL 0x03 +#define CV_CALL_NEAR_FAST 0x04 +#define CV_CALL_FAR_FAST 0x05 +#define CV_CALL_SKIPPED 0x06 +#define CV_CALL_NEAR_STD 0x07 +#define CV_CALL_FAR_STD 0x08 +#define CV_CALL_NEAR_SYS 0x09 +#define CV_CALL_FAR_SYS 0x0a +#define CV_CALL_THISCALL 0x0b +#define CV_CALL_MIPSCALL 0x0c +#define CV_CALL_GENERIC 0x0d +#define CV_CALL_ALPHACALL 0x0e +#define CV_CALL_PPCCALL 0x0f +#define CV_CALL_SHCALL 0x10 +#define CV_CALL_ARMCALL 0x11 +#define CV_CALL_AM33CALL 0x12 +#define CV_CALL_TRICALL 0x13 +#define CV_CALL_SH5CALL 0x14 +#define CV_CALL_M32RCALL 0x15 + +enum SymTagEnum +{ + SymTagNull, + SymTagExe, + SymTagCompiland, + SymTagCompilandDetails, + SymTagCompilandEnv, + SymTagFunction, + SymTagBlock, + SymTagData, + SymTagAnnotation, + SymTagLabel, + SymTagPublicSymbol, + SymTagUDT, + SymTagEnum, + SymTagFunctionType, + SymTagPointerType, + SymTagArrayType, + SymTagBaseType, + SymTagTypedef, + SymTagBaseClass, + SymTagFriend, + SymTagFunctionArgType, + SymTagFuncDebugStart, + SymTagFuncDebugEnd, + SymTagUsingNamespace, + SymTagVTableShape, + SymTagVTable, + SymTagCustom, + SymTagThunk, + SymTagCustomType, + SymTagManagedType, + SymTagDimension, + SymTagMax +}; + +enum +{ + UDTKind_Struct = 0, + UDTKind_Class = 1, /* ? */ + UDTKind_Union = 2, +}; + +enum BasicType +{ + btNoType = 0, + btVoid = 1, + btChar = 2, + btWChar = 3, + btInt = 6, + btUInt = 7, + btFloat = 8, + btBCD = 9, + btBool = 10, + btLong = 13, + btULong = 14, + btCurrency = 25, + btDate = 26, + btVariant = 27, + btComplex = 28, + btBit = 29, + btBSTR = 30, + btHresult = 31 +}; + +typedef struct +{ + HANDLE hProcess; + DWORD64 dwModuleBase; + LPSTR pszSymbolName; + BOOL bType; +} ENUMINFO, *PENUMINFO; + +VOID DumpType(DWORD dwTypeIndex, PENUMINFO pei, INT indent, BOOL bMembers); + +CHAR *SymTagString[] = +{ + "SymTagNull", + "SymTagExe", + "SymTagCompiland", + "SymTagCompilandDetails", + "SymTagCompilandEnv", + "SymTagFunction", + "SymTagBlock", + "SymTagData", + "SymTagAnnotation", + "SymTagLabel", + "SymTagPublicSymbol", + "SymTagUDT", + "SymTagEnum", + "SymTagFunctionType", + "SymTagPointerType", + "SymTagArrayType", + "SymTagBaseType", + "SymTagTypedef", + "SymTagBaseClass", + "SymTagFriend", + "SymTagFunctionArgType", + "SymTagFuncDebugStart", + "SymTagFuncDebugEnd", + "SymTagUsingNamespace", + "SymTagVTableShape", + "SymTagVTable", + "SymTagCustom", + "SymTagThunk", + "SymTagCustomType", + "SymTagManagedType", + "SymTagDimension", + "SymTagMax" +}; + +void +IndentPrint(INT ind) +{ + INT i; + for (i = 0; i < ind; i++) + { + printf(" "); + } +} + +#define printfi \ + IndentPrint(indent); printf + +VOID +PrintUsage() +{ + printf("Syntax:\n\n"); + printf("dumpsym [-sp=] [-p] []\n\n"); + printf(" The PE file you want to dump the symbols of\n"); + printf("-sp= Path to your symbol files.\n"); + printf(" Default is MS symbol server.\n"); + printf("-p Enable struct positions.\n"); + printf(" A name of a Symbol, you want to dump\n"); + printf(" Default is all symbols.\n"); + printf("\n"); +} + +BOOL InitDbgHelp(HANDLE hProcess, LPSTR pszSymbolPath) +{ + if (!SymInitialize(hProcess, 0, FALSE)) + return FALSE; + + SymSetOptions(SymGetOptions() | SYMOPT_ALLOW_ABSOLUTE_SYMBOLS); + SymSetOptions(SymGetOptions() & (~SYMOPT_DEFERRED_LOADS)); + SymSetSearchPath(hProcess, pszSymbolPath); + return TRUE; +} + +VOID +DumpBaseType(DWORD dwTypeIndex, PENUMINFO pei, INT indent) +{ + ULONG64 ulSize; + DWORD dwBaseType; + + SymGetTypeInfo(pei->hProcess, pei->dwModuleBase, dwTypeIndex, TI_GET_LENGTH, &ulSize); + SymGetTypeInfo(pei->hProcess, pei->dwModuleBase, dwTypeIndex, TI_GET_BASETYPE, &dwBaseType); + + switch (dwBaseType) + { + case btVoid: + printfi("VOID"); + return; + case btChar: + printfi("CHAR"); + return; + case btWChar: + printfi("WCHAR"); + return; + case btInt: + switch (ulSize) + { + case 1: + printfi("CHAR"); + return; + case 2: + printfi("SHORT"); + return; + case 4: + printfi("INT"); + return; + case 8: + printfi("INT64"); + return; + default: + printfi("INT%ld", (ULONG)ulSize * 8); + return; + } + case btUInt: + switch (ulSize) + { + case 1: + printfi("UCHAR"); + return; + case 2: + printfi("USHORT"); + return; + case 4: + printfi("UINT"); + return; + case 8: + printfi("UINT64"); + return; + default: + printfi("UINT%ld", (ULONG)ulSize * 8); + return; + } + case btFloat: + switch (ulSize) + { + case 4: + printfi("FLOAT"); + return; + case 8: + printfi("DOUBLE"); + return; + default: + printfi("FLOAT%ld", (ULONG)ulSize * 8); + return; + } + case btBCD: + printfi("BCD%ld", (ULONG)ulSize * 8); + return; + case btBool: + switch (ulSize) + { + case 1: + printfi("BOOLEAN"); + return; + case 4: + printfi("BOOL"); + return; + default: + printfi("BOOL%ld", (ULONG)ulSize * 8); + return; + } + case btLong: + switch (ulSize) + { + case 1: + printfi("CHAR"); + return; + case 2: + printfi("SHORT"); + return; + case 4: + printfi("LONG"); + return; + case 8: + printfi("LONGLONG"); + return; + default: + printfi("LONG%ld", (ULONG)ulSize * 8); + return; + } + case btULong: + switch (ulSize) + { + case 1: + printfi("UCHAR"); + return; + case 2: + printfi("USHORT"); + return; + case 4: + printfi("ULONG"); + return; + case 8: + printfi("ULONGLONG"); + return; + default: + printfi("ULONG%ld", (ULONG)ulSize * 8); + return; + } + case btCurrency: + case btDate: + case btVariant: + case btComplex: + case btBit: + case btBSTR: + printfi("UNSUP_%ld_%ld", dwBaseType, (ULONG)ulSize); + return; + case btHresult: + if (ulSize == 4) + { + printfi("HRESULT"); + return; + } + printfi("HRESULT%ld", (ULONG)ulSize); + return; + } + + printfi("UNKNBASETYPE"); +} + +VOID +DumpArray(DWORD dwTypeIndex, PENUMINFO pei, INT indent) +{ + DWORD dwTypeId; + + SymGetTypeInfo(pei->hProcess, pei->dwModuleBase, dwTypeIndex, TI_GET_TYPE, &dwTypeId); + DumpType(dwTypeId, pei, indent, FALSE); +} + +VOID +DumpPointer(DWORD dwTypeIndex, PENUMINFO pei, INT indent) +{ + DWORD dwRefTypeId; + DWORD dwTag = 0; + ULONG64 ulSize; + DWORD dwBaseType; + + SymGetTypeInfo(pei->hProcess, pei->dwModuleBase, dwTypeIndex, TI_GET_TYPE, &dwRefTypeId); + SymGetTypeInfo(pei->hProcess, pei->dwModuleBase, dwRefTypeId, TI_GET_BASETYPE, &dwBaseType); + SymGetTypeInfo(pei->hProcess, pei->dwModuleBase, dwRefTypeId, TI_GET_LENGTH, &ulSize); + SymGetTypeInfo(pei->hProcess, pei->dwModuleBase, dwRefTypeId, TI_GET_SYMTAG, &dwTag); + + if (dwTag == SymTagFunctionType) + { + printfi("PPROC"); + return; + } + + switch (dwBaseType) + { + case btVoid: + switch (ulSize) + { + case 0: + printfi("PVOID"); + return; + } + break; + + case btChar: + switch (ulSize) + { + case 1: + printfi("PCHAR"); + return; + } + break; + case btWChar: + switch (ulSize) + { + case 2: + printfi("PWCHAR"); + return; + } + break; + case btInt: + switch (ulSize) + { + case 4: + printfi("PINT"); + return; + } + break; + case btUInt: + switch (ulSize) + { + case 4: + printfi("PUINT"); + return; + } + break; + case btFloat: + switch (ulSize) + { + case 4: + printfi("PFLOAT"); + return; + case 8: + printfi("PDOUBLE"); + return; + } + break; + case btBCD: + break; + case btBool: + switch (ulSize) + { + case 1: + printfi("PBOOLEAN"); + return; + case 4: + printfi("PBOOL"); + return; + } + break; + case btLong: + switch (ulSize) + { + case 4: + printfi("PLONG"); + return; + case 8: + printfi("PLONGLONG"); + return; + } + break; + case btULong: + switch (ulSize) + { + case 4: + printfi("PULONG"); + return; + case 8: + printfi("PULONGLONG"); + return; + } + break; + case btCurrency: + case btDate: + case btVariant: + case btComplex: + case btBit: + case btBSTR: + case btHresult: + break; + } + + DumpType(dwRefTypeId, pei, indent, FALSE); + printf("*"); +} + +VOID +PrintVariant(VARIANT *v) +{ +// printf("", v->n1.n2.vt); + switch (v->n1.n2.vt) + { + case VT_I1: + printf("%d", (INT)v->n1.n2.n3.cVal); + break; + case VT_UI1: + printf("0x%x", (UINT)v->n1.n2.n3.cVal); + break; + case VT_I2: + printf("%d", (UINT)v->n1.n2.n3.iVal); + break; + case VT_UI2: + printf("0x%x", (UINT)v->n1.n2.n3.iVal); + break; + case VT_INT: + case VT_I4: + printf("%d", (UINT)v->n1.n2.n3.lVal); + break; + case VT_UINT: + case VT_UI4: + printf("0x%x", (UINT)v->n1.n2.n3.lVal); + break; + } +} + +BOOL +IsUnnamed(WCHAR *pszName) +{ + if ((StrStrW(pszName, L"__unnamed") != NULL) || + (StrStrW(pszName, L"") != NULL)) + { + return TRUE; + } + return FALSE; +} + +VOID +DumpEnum(DWORD dwTypeIndex, PENUMINFO pei, INT indent, BOOL bMembers) +{ + DWORD64 dwModuleBase = pei->dwModuleBase; + HANDLE hProcess = pei->hProcess; + INT i; + DWORD dwUDTKind; + WCHAR *pszName, *pszNameX; + struct + { + TI_FINDCHILDREN_PARAMS tfp; + ULONG TypeIds[200]; + } tfpex; + VARIANT v; + + SymGetTypeInfo(hProcess, dwModuleBase, dwTypeIndex, TI_GET_SYMNAME, &pszNameX); + SymGetTypeInfo(hProcess, dwModuleBase, dwTypeIndex, TI_GET_UDTKIND, &dwUDTKind); + pszName = pszNameX; + if (IsUnnamed(pszName)) + { + if (bMembers) + { + LocalFree(pszNameX); + return; + } + bMembers = TRUE; + pszName = L""; + } + printfi("enum %ls", pszName); + LocalFree(pszNameX); + + if (bMembers) + { + printf(" /* %03x */", 0); + printfi("\n{\n"); + + /* Get the children */ + SymGetTypeInfo(hProcess, dwModuleBase, dwTypeIndex, TI_GET_CHILDRENCOUNT, &tfpex.tfp.Count); + + tfpex.tfp.Start = 0; + SymGetTypeInfo(hProcess, dwModuleBase, dwTypeIndex, TI_FINDCHILDREN, &tfpex.tfp); + + for (i = 0; i < tfpex.tfp.Count; i++) + { + pszName = L""; + + SymGetTypeInfo(hProcess, dwModuleBase, tfpex.tfp.ChildId[i], TI_GET_SYMNAME, &pszName); + SymGetTypeInfo(hProcess, dwModuleBase, tfpex.tfp.ChildId[i], TI_GET_VALUE, &v); + + indent++; + printfi("%ls = ", pszName); + PrintVariant(&v); + printf(",\n"); + indent--; + + LocalFree(pszName); + } + printfi("}"); + } +} + +VOID +DumpUDT(DWORD dwTypeIndex, PENUMINFO pei, INT indent, BOOL bMembers) +{ + DWORD64 dwModuleBase = pei->dwModuleBase; + HANDLE hProcess = pei->hProcess; + INT i; + DWORD dwUDTKind; + WCHAR *pszName, *pszNameX; + struct + { + TI_FINDCHILDREN_PARAMS tfp; + ULONG TypeIds[200]; + } tfpex; + + DWORD dwDataKind; + DWORD dwTypeId; + DWORD dwCount; + WCHAR *pszTypeName; + + SymGetTypeInfo(hProcess, dwModuleBase, dwTypeIndex, TI_GET_SYMNAME, &pszNameX); + SymGetTypeInfo(hProcess, dwModuleBase, dwTypeIndex, TI_GET_UDTKIND, &dwUDTKind); + + pszName = pszNameX; + if (IsUnnamed(pszName)) + { + if (bMembers) + { + LocalFree(pszNameX); + return; + } + bMembers = TRUE; + pszName = L""; + } + if (dwUDTKind == UDTKind_Struct) + { + printfi("struct %ls", pszName); + } + else if (dwUDTKind == UDTKind_Union) + { + printfi("union %ls", pszName); + } + else + { + printfi("UTDKind%ld %ls", dwUDTKind, pszName); + } + LocalFree(pszNameX); + + if (bMembers) + { + ULONG64 ulLength; + + printf("\n"); + printfi("{\n"); + + /* Get the children */ + SymGetTypeInfo(hProcess, dwModuleBase, dwTypeIndex, TI_GET_CHILDRENCOUNT, &tfpex.tfp.Count); + + tfpex.tfp.Start = 0; + SymGetTypeInfo(hProcess, dwModuleBase, dwTypeIndex, TI_FINDCHILDREN, &tfpex.tfp); + + for (i = 0; i < tfpex.tfp.Count; i++) + { + DWORD dwChildTag; + DWORD dwOffset; + + pszName = L""; + pszTypeName = L""; + + SymGetTypeInfo(hProcess, dwModuleBase, tfpex.tfp.ChildId[i], TI_GET_SYMNAME, &pszName); + SymGetTypeInfo(hProcess, dwModuleBase, tfpex.tfp.ChildId[i], TI_GET_DATAKIND, &dwDataKind); + SymGetTypeInfo(hProcess, dwModuleBase, tfpex.tfp.ChildId[i], TI_GET_TYPE, &dwTypeId); + SymGetTypeInfo(hProcess, dwModuleBase, tfpex.tfp.ChildId[i], TI_GET_OFFSET, &dwOffset); + SymGetTypeInfo(hProcess, dwModuleBase, dwTypeId, TI_GET_SYMTAG, &dwChildTag); + SymGetTypeInfo(hProcess, dwModuleBase, dwTypeId, TI_GET_LENGTH, &ulLength); + + printf(" /* %03lx */", dwOffset); + DumpType(dwTypeId, pei, indent + 1, FALSE); + printf(" %ls", pszName); + if (dwChildTag == SymTagArrayType) + { + SymGetTypeInfo(hProcess, dwModuleBase, dwTypeId, TI_GET_COUNT, &dwCount); + printf("[%ld]", dwCount); + } + else + { + DWORD dwCurrentBitPos; + DWORD dwNextBitPos; + + SymGetTypeInfo(hProcess, dwModuleBase, tfpex.tfp.ChildId[i], TI_GET_BITPOSITION, &dwCurrentBitPos); + if (i < tfpex.tfp.Count - 1) + { + SymGetTypeInfo(hProcess, dwModuleBase, tfpex.tfp.ChildId[i+1], TI_GET_BITPOSITION, &dwNextBitPos); + } + else + { + dwNextBitPos = 0; + } + + if (dwNextBitPos == 0 && dwCurrentBitPos != 0) + { + dwNextBitPos = ulLength * 8; + } + + if (dwNextBitPos != dwCurrentBitPos) + { + printf(":%ld", dwNextBitPos - dwCurrentBitPos); + } + } + printf(";\n"); + LocalFree(pszName); + } + printfi("}"); + } +} + +VOID +DumpType(DWORD dwTypeIndex, PENUMINFO pei, INT indent, BOOL bMembers) +{ + HANDLE hProcess = pei->hProcess; + DWORD64 dwModuleBase = pei->dwModuleBase; + DWORD dwTag = 0; + + SymGetTypeInfo(hProcess, dwModuleBase, dwTypeIndex, TI_GET_SYMTAG, &dwTag); + + switch (dwTag) + { + case SymTagEnum: + DumpEnum(dwTypeIndex, pei, indent, bMembers); + break; + + case SymTagUDT: + DumpUDT(dwTypeIndex, pei, indent, bMembers); + break; + + case SymTagPointerType: + DumpPointer(dwTypeIndex, pei, indent); + break; + + case SymTagBaseType: + DumpBaseType(dwTypeIndex, pei, indent); + break; + + case SymTagArrayType: + DumpArray(dwTypeIndex, pei, indent); + break; + + case SymTagFunctionType: + printfi("function"); + break; + + default: + printfi("typeTag%ld", dwTag); + break; + } + +} + + +VOID +DumpCV(DWORD dwTypeIndex, PENUMINFO pei) +{ + DWORD cv = 0x20; + + SymGetTypeInfo(pei->hProcess, pei->dwModuleBase, dwTypeIndex, TI_GET_CALLING_CONVENTION, &cv); + switch (cv) + { + case CV_CALL_NEAR_C: + printf("CDECL"); + return; + case CV_CALL_FAR_C: + printf("FAR CDECL"); + return; + case CV_CALL_NEAR_PASCAL: + printf("PASCAL"); + return; + case CV_CALL_FAR_PASCAL: + printf("FAR PASCAL"); + return; + case CV_CALL_NEAR_FAST: + printf("FASTCALL"); + return; + case CV_CALL_FAR_FAST: + printf("FAR FASTCALL"); + return; + case CV_CALL_SKIPPED: + printf("SKIPPED"); + return; + case CV_CALL_NEAR_STD: + printf("STDCALL"); + return; + case CV_CALL_FAR_STD: + printf("FAR STDCALL"); + return; + case CV_CALL_NEAR_SYS: + case CV_CALL_FAR_SYS: + case CV_CALL_THISCALL: + printf("THISCALL"); + return; + case CV_CALL_MIPSCALL: + printf("MIPSCALL"); + return; + case CV_CALL_GENERIC: + case CV_CALL_ALPHACALL: + case CV_CALL_PPCCALL: + case CV_CALL_SHCALL: + case CV_CALL_ARMCALL: + case CV_CALL_AM33CALL: + case CV_CALL_TRICALL: + case CV_CALL_SH5CALL: + case CV_CALL_M32RCALL: + default: + printf("UNKNOWNCV"); + } + +} + +BOOL CALLBACK +EnumParamsProc( + PSYMBOL_INFO pSymInfo, + ULONG SymbolSize, + PVOID UserContext) +{ + printf("x, "); + (*(INT*)UserContext)++; + return TRUE; +} + +VOID +DumpParams(PSYMBOL_INFO pSymInfo, PENUMINFO pei) +{ + IMAGEHLP_STACK_FRAME sf; + BOOL bRet; + + sf.InstructionOffset = pSymInfo->Address; + + printf("("); + bRet = SymSetContext(pei->hProcess, &sf, 0); + + if (!bRet) + { + printf("\nError: SymSetContext() failed. Error code: %lu \n", GetLastError()); + return; + } + printf("Address == 0x%x, ReturnOffset = 0x%x", (UINT)pSymInfo->Address, (UINT)sf.ReturnOffset); + + // Enumerate local variables + + INT NumLocals = 0; // the number of local variables found + + bRet = SymEnumSymbols(pei->hProcess, 0, 0, EnumParamsProc, &NumLocals); + + if (!bRet) + { +// printf("Error: SymEnumSymbols() failed. Error code: %lu \n", GetLastError()); + printf("?)"); + return; + } + + if (NumLocals == 0) + { +// printf("The function does not have parameters and local variables.\n"); + printf("void)"); + } + + printf(")"); +} + +VOID +DumpFunction(PSYMBOL_INFO pSymInfo, PENUMINFO pei) +{ + DWORD dwTypeId; + +//printf("Name=%s, Size=%ld, TypeId=0x%ld\n", pSymInfo->Name, pSymInfo->Size, pSymInfo->TypeIndex); + + SymGetTypeInfo(pei->hProcess, pei->dwModuleBase, pSymInfo->TypeIndex, TI_GET_TYPEID, &dwTypeId); + +// DumpCV(pSymInfo->TypeIndex, pei); +// printf("\n"); +// DumpType(pSymInfo->TypeIndex, pei, 0, FALSE); + printf("%s", pSymInfo->Name); + DumpParams(pSymInfo, pei); +} + +BOOL CALLBACK +EnumSymbolsProc( + PSYMBOL_INFO pSymInfo, + ULONG SymbolSize, + PVOID UserContext) +{ + PENUMINFO pei = (PENUMINFO)UserContext; + + if ((pei->pszSymbolName == NULL) || + (strstr(pSymInfo->Name, pei->pszSymbolName) != 0)) + { + if (pei->bType) + { + DumpType(pSymInfo->TypeIndex, pei, 0, TRUE); + printf("\n\n"); + } + else + { + //if (pSymInfo->Flags & SYMFLAG_FUNCTION) + { +// DumpFunction(pSymInfo, pei); +// printf("\n\n"); + } + } + } + return TRUE; +} + +int main(int argc, char* argv[]) +{ + HANDLE hProcess; + CHAR szFullFileName[MAX_PATH+1]; + DWORD64 dwModuleBase; + BOOL bRet; + LPSTR pszSymbolPath, pszSymbolName; + INT i; + ENUMINFO enuminfo; + + printf("PE symbol dumper\n"); + printf("Copyright (c) Timo Kreuzer 2008\n\n"); + + if (argc < 2) + { + PrintUsage(); + return 0; + } + + /* Get the full path name of the PE file from first argument */ + GetFullPathName(argv[1], MAX_PATH, szFullFileName, NULL); + + /* Default Symbol Name (all) */ + pszSymbolName = NULL; + + /* Default to ms symbol server */ + pszSymbolPath = "srv**symbols*http://msdl.microsoft.com/download/symbols"; + + /* Check other command line arguments */ + for (i = 2; i < argc; i++) + { + if (*argv[i] == '-') + { + if (strncmp(argv[i], "-sp=", 4) == 0) + { + pszSymbolPath = argv[i] + 4; + } + else if (strcmp(argv[i], "-p") == 0) + { + g_bShowPos = 1; + } + else + { + printf("Invalid argument: %s\n", argv[i]); + PrintUsage(); + return 0; + } + } + else + { + pszSymbolName = argv[i]; + } + } + + hProcess = GetCurrentProcess(); + + printf("Trying to get symbols from: %s\n", pszSymbolPath); + + if (!InitDbgHelp(hProcess, pszSymbolPath)) + { + printf("SymInitialize() failed\n"); + goto cleanup; + } + + printf("Loading symbols for %s, please wait...\n", szFullFileName); + dwModuleBase = SymLoadModule64(hProcess, 0, szFullFileName, 0, 0, 0); + if (dwModuleBase == 0) + { + printf("SymLoadModule64() failed: %ld\n", GetLastError()); + goto cleanup; + } + + printf("\nSymbols:\n"); + enuminfo.hProcess = hProcess; + enuminfo.pszSymbolName = pszSymbolName; + enuminfo.bType = FALSE; + SetLastError(ERROR_SUCCESS); + bRet = SymEnumSymbols(hProcess, dwModuleBase, NULL, EnumSymbolsProc, &enuminfo); + if (!bRet) + { + printf("SymEnumSymbols failed: %ld\n", GetLastError()); + } + + printf("\nTypes:\n"); + enuminfo.bType = TRUE; + enuminfo.dwModuleBase = dwModuleBase; + SetLastError(ERROR_SUCCESS); + bRet = SymEnumTypes(hProcess, dwModuleBase, EnumSymbolsProc, &enuminfo); + if (!bRet) + { + printf("SymEnumTypes failed: %ld\n", GetLastError()); + } + +cleanup: + + return 0; +} diff --git a/rosapps/applications/devutils/symdump/symdump.rbuild b/rosapps/applications/devutils/symdump/symdump.rbuild new file mode 100644 index 00000000000..a02bddd0fb0 --- /dev/null +++ b/rosapps/applications/devutils/symdump/symdump.rbuild @@ -0,0 +1,9 @@ + + . + 0x0501 + 0x0501 + dbghelp + shlwapi + kernel32 + symdump.c + From 5b1adcd9076d047c0196bbfc88c66c637c3f36e6 Mon Sep 17 00:00:00 2001 From: Dmitry Chapyshev Date: Fri, 15 Aug 2008 10:03:19 +0000 Subject: [PATCH 011/324] - Add icons for Folder Options (not work yet) svn path=/trunk/; revision=35350 --- reactos/dll/win32/shell32/icon_res.rc | 9 ++++++ reactos/dll/win32/shell32/lang/bg-BG.rc | 31 ++++++++++---------- reactos/dll/win32/shell32/lang/ca-ES.rc | 31 ++++++++++---------- reactos/dll/win32/shell32/lang/cs-CZ.rc | 31 ++++++++++---------- reactos/dll/win32/shell32/lang/da-DK.rc | 31 ++++++++++---------- reactos/dll/win32/shell32/lang/de-DE.rc | 6 ++-- reactos/dll/win32/shell32/lang/el-GR.rc | 31 ++++++++++---------- reactos/dll/win32/shell32/lang/en-GB.rc | 31 ++++++++++---------- reactos/dll/win32/shell32/lang/en-US.rc | 31 ++++++++++---------- reactos/dll/win32/shell32/lang/es-ES.rc | 31 ++++++++++---------- reactos/dll/win32/shell32/lang/fi-FI.rc | 31 ++++++++++---------- reactos/dll/win32/shell32/lang/fr-FR.rc | 31 ++++++++++---------- reactos/dll/win32/shell32/lang/hu-HU.rc | 31 ++++++++++---------- reactos/dll/win32/shell32/lang/it-IT.rc | 31 ++++++++++---------- reactos/dll/win32/shell32/lang/ja-JP.rc | 31 ++++++++++---------- reactos/dll/win32/shell32/lang/ko-KR.rc | 31 ++++++++++---------- reactos/dll/win32/shell32/lang/nl-NL.rc | 31 ++++++++++---------- reactos/dll/win32/shell32/lang/no-NO.rc | 31 ++++++++++---------- reactos/dll/win32/shell32/lang/pl-PL.rc | 31 ++++++++++---------- reactos/dll/win32/shell32/lang/pt-BR.rc | 31 ++++++++++---------- reactos/dll/win32/shell32/lang/pt-PT.rc | 31 ++++++++++---------- reactos/dll/win32/shell32/lang/ru-RU.rc | 30 +++++++++---------- reactos/dll/win32/shell32/lang/sk-SK.rc | 31 ++++++++++---------- reactos/dll/win32/shell32/lang/sl-SI.rc | 31 ++++++++++---------- reactos/dll/win32/shell32/lang/sv-SE.rc | 31 ++++++++++---------- reactos/dll/win32/shell32/lang/tr-TR.rc | 31 ++++++++++---------- reactos/dll/win32/shell32/lang/uk-UA.rc | 31 ++++++++++---------- reactos/dll/win32/shell32/lang/zh-CN.rc | 31 ++++++++++---------- reactos/dll/win32/shell32/lang/zh-TW.rc | 31 ++++++++++---------- reactos/dll/win32/shell32/res/icons/182.ico | Bin 0 -> 9774 bytes reactos/dll/win32/shell32/res/icons/183.ico | Bin 0 -> 9774 bytes reactos/dll/win32/shell32/res/icons/184.ico | Bin 0 -> 9774 bytes reactos/dll/win32/shell32/res/icons/185.ico | Bin 0 -> 9774 bytes reactos/dll/win32/shell32/res/icons/186.ico | Bin 0 -> 9774 bytes reactos/dll/win32/shell32/res/icons/187.ico | Bin 0 -> 9774 bytes reactos/dll/win32/shell32/shresdef.h | 9 ++++++ 36 files changed, 426 insertions(+), 434 deletions(-) create mode 100644 reactos/dll/win32/shell32/res/icons/182.ico create mode 100644 reactos/dll/win32/shell32/res/icons/183.ico create mode 100644 reactos/dll/win32/shell32/res/icons/184.ico create mode 100644 reactos/dll/win32/shell32/res/icons/185.ico create mode 100644 reactos/dll/win32/shell32/res/icons/186.ico create mode 100644 reactos/dll/win32/shell32/res/icons/187.ico diff --git a/reactos/dll/win32/shell32/icon_res.rc b/reactos/dll/win32/shell32/icon_res.rc index 16b2fe41d0f..e3d52e077f4 100644 --- a/reactos/dll/win32/shell32/icon_res.rc +++ b/reactos/dll/win32/shell32/icon_res.rc @@ -56,6 +56,15 @@ IDI_SHELL_RUN2 ICON "res/icons/160.ico" // "res/icons/161.ico" IDI_SHELL_NETWORK_FOLDER ICON "res/icons/172.ico" // "res/icons/173.ico" + +// Folder Options, General dialog +IDI_SHELL_SHOW_COMMON_TASKS ICON "res/icons/182.ico" +IDI_SHELL_CLASSIC_FOLDERS ICON "res/icons/183.ico" +IDI_SHELL_OPEN_IN_SOME_WINDOW ICON "res/icons/184.ico" +IDI_SHELL_OPEN_IN_NEW_WINDOW ICON "res/icons/185.ico" +IDI_SHELL_SINGLE_CLICK_TO_OPEN ICON "res/icons/186.ico" +IDI_SHELL_DOUBLE_CLICK_TO_OPEN ICON "res/icons/187.ico" + IDI_SHELL_EMPTY_RECYCLE_BIN1 ICON "res/icons/191.ico" IDI_SHELL_FULL_RECYCLE_BIN1 ICON "res/icons/192.ico" // "res/icons/210.ico" diff --git a/reactos/dll/win32/shell32/lang/bg-BG.rc b/reactos/dll/win32/shell32/lang/bg-BG.rc index e8281537cf5..157cb2bc975 100644 --- a/reactos/dll/win32/shell32/lang/bg-BG.rc +++ b/reactos/dll/win32/shell32/lang/bg-BG.rc @@ -377,22 +377,21 @@ STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION CAPTION "Общи" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - -GROUPBOX "Задачи", -1, 7, 10, 249, 45 -//ICON -AUTORADIOBUTTON "Показване на общите задачи в папките", 14001, 20, 25, 210, 10, WS_TABSTOP -AUTORADIOBUTTON "Използване на обичайните папки на Windows", 14002, 20, 37, 210, 10, WS_TABSTOP -GROUPBOX "Обзор на папките", -1, 7, 60, 249, 45, WS_TABSTOP -//ICON -AUTORADIOBUTTON "Отваряне на всички папки в &един прозорец", 14004, 20, 70, 210, 10, WS_TABSTOP -AUTORADIOBUTTON "Отваряне на всяка папка в от&делен прозорец", 14005, 20, 82, 210, 10, WS_TABSTOP -GROUPBOX "Цъкането действа така:", -1, 7, 110, 249, 60 -//ICON -AUTORADIOBUTTON "&Отваряне с единично цъкане (избор с посочване)", 14007, 20, 120, 210, 10, WS_TABSTOP -AUTORADIOBUTTON "Подчертаване заглавията на значетата съгласно &обзорника ми", 14008, 30, 220, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Подчертаване на заглавията на значетата при &посочване", 14009, 30, 144, 220, 10, WS_TABSTOP -AUTORADIOBUTTON "&Отваряне с двойно цъкане (избиране с единично)", 14010, 20, 156, 170, 10, WS_TABSTOP -PUSHBUTTON "От под&разбираните", 14011, 160, 180, 75, 14, WS_TABSTOP + GROUPBOX "Задачи", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Показване на общите задачи в папките", 14001, 20, 25, 210, 10, WS_TABSTOP + AUTORADIOBUTTON "Използване на обичайните папки на Windows", 14002, 20, 37, 210, 10, WS_TABSTOP + GROUPBOX "Обзор на папките", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Отваряне на всички папки в &един прозорец", 14004, 20, 70, 210, 10, WS_TABSTOP + AUTORADIOBUTTON "Отваряне на всяка папка в от&делен прозорец", 14005, 20, 82, 210, 10, WS_TABSTOP + GROUPBOX "Цъкането действа така:", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Отваряне с единично цъкане (избор с посочване)", 14007, 20, 120, 210, 10, WS_TABSTOP + AUTORADIOBUTTON "Подчертаване заглавията на значетата съгласно &обзорника ми", 14008, 30, 220, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Подчертаване на заглавията на значетата при &посочване", 14009, 30, 144, 220, 10, WS_TABSTOP + AUTORADIOBUTTON "&Отваряне с двойно цъкане (избиране с единично)", 14010, 20, 156, 170, 10, WS_TABSTOP + PUSHBUTTON "От под&разбираните", 14011, 160, 180, 75, 14, WS_TABSTOP END FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 diff --git a/reactos/dll/win32/shell32/lang/ca-ES.rc b/reactos/dll/win32/shell32/lang/ca-ES.rc index 7a93e48c92b..3a936b28ee4 100644 --- a/reactos/dll/win32/shell32/lang/ca-ES.rc +++ b/reactos/dll/win32/shell32/lang/ca-ES.rc @@ -378,22 +378,21 @@ STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - -GROUPBOX "Tasks", -1, 7, 10, 249, 45 -//ICON -AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP -AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP -GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP -//ICON -AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP -AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP -GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 -//ICON -AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP -PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP END FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 diff --git a/reactos/dll/win32/shell32/lang/cs-CZ.rc b/reactos/dll/win32/shell32/lang/cs-CZ.rc index 49b5605cccf..e6bae703209 100644 --- a/reactos/dll/win32/shell32/lang/cs-CZ.rc +++ b/reactos/dll/win32/shell32/lang/cs-CZ.rc @@ -380,22 +380,21 @@ STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION CAPTION "Obecnй" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - -GROUPBOX "Ъkoly", -1, 7, 10, 249, 45 -//ICON -AUTORADIOBUTTON "&Zobrazit bмћnй operace ve sloћkбch", 14001, 40, 25, 120, 10, WS_TABSTOP -AUTORADIOBUTTON "Pouћнt klas&ickй sloћky ReactOS", 14002, 40, 37, 120, 10, WS_TABSTOP -GROUPBOX "Prochбzenн sloћek", -1, 7, 60, 249, 45, WS_TABSTOP -//ICON -AUTORADIOBUTTON "Otevнrat kaћdou sloћku ve stejnй&m oknм", 14004, 40, 70, 140, 10, WS_TABSTOP -AUTORADIOBUTTON "Ote&vнrat kaћdou sloћku ve svйm vlastnнm oknм", 14005, 40, 82, 140, 10, WS_TABSTOP -GROUPBOX "Klikбnн na poloћky", -1, 7, 110, 249, 60 -//ICON -AUTORADIOBUTTON "Jedno kliknutн k &otevшenн poloћky (vybrat ukбzбnнm)", 14007, 40, 120, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Podtrhбvat nбzvy ikon podle &nastavenн prohlнћeиe", 14008, 50, 132, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Podtrhбvat nбzvy ikon jen &pшi ukбzбnн na nм", 14009, 50, 144, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "&Dvojkliknutн k otevшenн poloћky (vybrat kliknutнm)", 14010, 40, 156, 170, 10, WS_TABSTOP -PUSHBUTTON "O&bnovit vэchozн", 14011, 180, 180, 60, 14, WS_TABSTOP + GROUPBOX "Ъkoly", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Zobrazit bмћnй operace ve sloћkбch", 14001, 40, 25, 120, 10, WS_TABSTOP + AUTORADIOBUTTON "Pouћнt klas&ickй sloћky ReactOS", 14002, 40, 37, 120, 10, WS_TABSTOP + GROUPBOX "Prochбzenн sloћek", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Otevнrat kaћdou sloћku ve stejnй&m oknм", 14004, 40, 70, 140, 10, WS_TABSTOP + AUTORADIOBUTTON "Ote&vнrat kaћdou sloћku ve svйm vlastnнm oknм", 14005, 40, 82, 140, 10, WS_TABSTOP + GROUPBOX "Klikбnн na poloћky", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Jedno kliknutн k &otevшenн poloћky (vybrat ukбzбnнm)", 14007, 40, 120, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Podtrhбvat nбzvy ikon podle &nastavenн prohlнћeиe", 14008, 50, 132, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Podtrhбvat nбzvy ikon jen &pшi ukбzбnн na nм", 14009, 50, 144, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "&Dvojkliknutн k otevшenн poloћky (vybrat kliknutнm)", 14010, 40, 156, 170, 10, WS_TABSTOP + PUSHBUTTON "O&bnovit vэchozн", 14011, 180, 180, 60, 14, WS_TABSTOP END FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 diff --git a/reactos/dll/win32/shell32/lang/da-DK.rc b/reactos/dll/win32/shell32/lang/da-DK.rc index fb665bdf8dc..89f821bc0f6 100644 --- a/reactos/dll/win32/shell32/lang/da-DK.rc +++ b/reactos/dll/win32/shell32/lang/da-DK.rc @@ -378,22 +378,21 @@ STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - -GROUPBOX "Tasks", -1, 7, 10, 249, 45 -//ICON -AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP -AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP -GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP -//ICON -AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP -AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP -GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 -//ICON -AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP -PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP END FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 diff --git a/reactos/dll/win32/shell32/lang/de-DE.rc b/reactos/dll/win32/shell32/lang/de-DE.rc index ae8fab4a46c..a314c26288f 100644 --- a/reactos/dll/win32/shell32/lang/de-DE.rc +++ b/reactos/dll/win32/shell32/lang/de-DE.rc @@ -382,15 +382,15 @@ CAPTION "Allgemein" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "Aufgaben", -1, 7, 10, 249, 45 - //ICON + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL AUTORADIOBUTTON "&Allgemeine Aufgaben in Ordnern anzeigen", 14001, 40, 25, 150, 10, WS_TABSTOP AUTORADIOBUTTON "ReactOS Klassisc&he Ansicht verwenden", 14002, 40, 37, 150, 10, WS_TABSTOP GROUPBOX "Ordner durchsuchen", -1, 7, 60, 249, 45, WS_TABSTOP - //ICON + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL AUTORADIOBUTTON "Jeden Ordner im &selben Fenster цffnen", 14004, 40, 70, 150, 10, WS_TABSTOP AUTORADIOBUTTON "&Jeden Ordner im eigenen Fenster цffnen", 14005, 40, 82, 150, 10, WS_TABSTOP GROUPBOX "Markieren von Elementen", -1, 7, 110, 249, 60 - //ICON + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL AUTORADIOBUTTON "&Цffnen durch &einfachen Klick (Markieren durch zeigen)", 14007, 40, 120, 210, 10, WS_TABSTOP AUTORADIOBUTTON "Symbolunerschriften wie im Br&owser unterstreichen", 14008, 50, 132, 210, 10, WS_TABSTOP AUTORADIOBUTTON "Symbolunerschriften nur beim Zeigen &unterstreichen", 14009, 50, 144, 210, 10, WS_TABSTOP diff --git a/reactos/dll/win32/shell32/lang/el-GR.rc b/reactos/dll/win32/shell32/lang/el-GR.rc index f2ac5f9ac87..0adcae6b957 100644 --- a/reactos/dll/win32/shell32/lang/el-GR.rc +++ b/reactos/dll/win32/shell32/lang/el-GR.rc @@ -378,22 +378,21 @@ STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - -GROUPBOX "Tasks", -1, 7, 10, 249, 45 -//ICON -AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP -AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP -GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP -//ICON -AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP -AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP -GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 -//ICON -AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP -PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP END FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 diff --git a/reactos/dll/win32/shell32/lang/en-GB.rc b/reactos/dll/win32/shell32/lang/en-GB.rc index 65d588245ad..77fc8cea583 100644 --- a/reactos/dll/win32/shell32/lang/en-GB.rc +++ b/reactos/dll/win32/shell32/lang/en-GB.rc @@ -378,22 +378,21 @@ STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - -GROUPBOX "Tasks", -1, 7, 10, 249, 45 -//ICON -AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP -AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP -GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP -//ICON -AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP -AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP -GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 -//ICON -AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP -PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP END FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 diff --git a/reactos/dll/win32/shell32/lang/en-US.rc b/reactos/dll/win32/shell32/lang/en-US.rc index 2b2cf1a4770..e29ed9b1c4c 100644 --- a/reactos/dll/win32/shell32/lang/en-US.rc +++ b/reactos/dll/win32/shell32/lang/en-US.rc @@ -379,22 +379,21 @@ STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - -GROUPBOX "Tasks", -1, 7, 10, 249, 45 -//ICON -AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP -AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP -GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP -//ICON -AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP -AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP -GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 -//ICON -AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP -PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP END FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 diff --git a/reactos/dll/win32/shell32/lang/es-ES.rc b/reactos/dll/win32/shell32/lang/es-ES.rc index cfbeea723e6..08c2a8a4a5e 100644 --- a/reactos/dll/win32/shell32/lang/es-ES.rc +++ b/reactos/dll/win32/shell32/lang/es-ES.rc @@ -381,22 +381,21 @@ STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - -GROUPBOX "Tareas", -1, 7, 10, 249, 45 -//ICON -AUTORADIOBUTTON "M&ostrar tareas comunes en las carpetas", 14001, 40, 25, 120, 10, WS_TABSTOP -AUTORADIOBUTTON "Utilizar las carpetas clб&sicas de ReactOS", 14002, 40, 37, 120, 10, WS_TABSTOP -GROUPBOX "Examinar carpetas ", -1, 7, 60, 249, 45, WS_TABSTOP -//ICON -AUTORADIOBUTTON "Abrir todas las carpetas en la &misma ventana", 14004, 40, 70, 140, 10, WS_TABSTOP -AUTORADIOBUTTON "Abrir cada carpeta ventanas di&ferentes", 14005, 40, 82, 140, 10, WS_TABSTOP -GROUPBOX "Hacer clic en los elementos como se indica ", -1, 7, 110, 249, 60 -//ICON -AUTORADIOBUTTON "&Un solo clic para abrir elemento (seleccionar al seсalar)", 14007, 40, 120, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Subrayar los tнtulos de iconos que coincidan con el e&xplorador", 14008, 50, 132, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Subrayar &los tнtulos de iconos cuando yo los seсale", 14009, 50, 144, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "&Doble clic para abrir elemento (seleccionar con un clic)", 14010, 40, 156, 170, 10, WS_TABSTOP -PUSHBUTTON "&Restaurar valores predeterminados", 14011, 180, 180, 60, 14, WS_TABSTOP + GROUPBOX "Tareas", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "M&ostrar tareas comunes en las carpetas", 14001, 40, 25, 120, 10, WS_TABSTOP + AUTORADIOBUTTON "Utilizar las carpetas clб&sicas de ReactOS", 14002, 40, 37, 120, 10, WS_TABSTOP + GROUPBOX "Examinar carpetas ", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Abrir todas las carpetas en la &misma ventana", 14004, 40, 70, 140, 10, WS_TABSTOP + AUTORADIOBUTTON "Abrir cada carpeta ventanas di&ferentes", 14005, 40, 82, 140, 10, WS_TABSTOP + GROUPBOX "Hacer clic en los elementos como se indica ", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Un solo clic para abrir elemento (seleccionar al seсalar)", 14007, 40, 120, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Subrayar los tнtulos de iconos que coincidan con el e&xplorador", 14008, 50, 132, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Subrayar &los tнtulos de iconos cuando yo los seсale", 14009, 50, 144, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "&Doble clic para abrir elemento (seleccionar con un clic)", 14010, 40, 156, 170, 10, WS_TABSTOP + PUSHBUTTON "&Restaurar valores predeterminados", 14011, 180, 180, 60, 14, WS_TABSTOP END FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 diff --git a/reactos/dll/win32/shell32/lang/fi-FI.rc b/reactos/dll/win32/shell32/lang/fi-FI.rc index a845f945013..61e4fea3b88 100644 --- a/reactos/dll/win32/shell32/lang/fi-FI.rc +++ b/reactos/dll/win32/shell32/lang/fi-FI.rc @@ -378,22 +378,21 @@ STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - -GROUPBOX "Tasks", -1, 7, 10, 249, 45 -//ICON -AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP -AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP -GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP -//ICON -AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP -AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP -GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 -//ICON -AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP -PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP END FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 diff --git a/reactos/dll/win32/shell32/lang/fr-FR.rc b/reactos/dll/win32/shell32/lang/fr-FR.rc index 764fac64741..e789aa7524d 100644 --- a/reactos/dll/win32/shell32/lang/fr-FR.rc +++ b/reactos/dll/win32/shell32/lang/fr-FR.rc @@ -382,22 +382,21 @@ STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION CAPTION "Gйnйral" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - -GROUPBOX "Tвches", -1, 7, 10, 249, 45 -//ICON -AUTORADIOBUTTON "Afficher les tвches habituelles dans les dossiers", 14001, 40, 25, 120, 10, WS_TABSTOP -AUTORADIOBUTTON "Utiliser les dossiers ReactOS class&iques", 14002, 40, 37, 120, 10, WS_TABSTOP -GROUPBOX "Parcourir les dossiers", -1, 7, 60, 249, 45, WS_TABSTOP -//ICON -AUTORADIOBUTTON "Ouvrir tous les dossiers dans la &mкme fenкtre", 14004, 40, 70, 140, 10, WS_TABSTOP -AUTORADIOBUTTON "Ouvrir chaque dossier dans sa propre fenкtre", 14005, 40, 82, 140, 10, WS_TABSTOP -GROUPBOX "Cliquer sur les йlйments de la faзon suivante", -1, 7, 110, 249, 60 -//ICON -AUTORADIOBUTTON "Clic unique pour ouvrir un йlйment (pointer pour sйlectionner)", 14007, 40, 120, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Toujours souligner les titres des icфnes comme dans le navigateur", 14008, 50, 132, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Souligner les titres des icфnes seulement quand je les &pointe", 14009, 50, 144, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "&Double-cliquer pour ouvrir un йlйment (clic unique pour le sйlectionner)", 14010, 40, 156, 170, 10, WS_TABSTOP -PUSHBUTTON "Pa&ramиtres par dйfaut", 14011, 180, 180, 60, 14, WS_TABSTOP + GROUPBOX "Tвches", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Afficher les tвches habituelles dans les dossiers", 14001, 40, 25, 120, 10, WS_TABSTOP + AUTORADIOBUTTON "Utiliser les dossiers ReactOS class&iques", 14002, 40, 37, 120, 10, WS_TABSTOP + GROUPBOX "Parcourir les dossiers", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Ouvrir tous les dossiers dans la &mкme fenкtre", 14004, 40, 70, 140, 10, WS_TABSTOP + AUTORADIOBUTTON "Ouvrir chaque dossier dans sa propre fenкtre", 14005, 40, 82, 140, 10, WS_TABSTOP + GROUPBOX "Cliquer sur les йlйments de la faзon suivante", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Clic unique pour ouvrir un йlйment (pointer pour sйlectionner)", 14007, 40, 120, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Toujours souligner les titres des icфnes comme dans le navigateur", 14008, 50, 132, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Souligner les titres des icфnes seulement quand je les &pointe", 14009, 50, 144, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "&Double-cliquer pour ouvrir un йlйment (clic unique pour le sйlectionner)", 14010, 40, 156, 170, 10, WS_TABSTOP + PUSHBUTTON "Pa&ramиtres par dйfaut", 14011, 180, 180, 60, 14, WS_TABSTOP END FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 diff --git a/reactos/dll/win32/shell32/lang/hu-HU.rc b/reactos/dll/win32/shell32/lang/hu-HU.rc index 99a511153d9..76ceb0958a1 100644 --- a/reactos/dll/win32/shell32/lang/hu-HU.rc +++ b/reactos/dll/win32/shell32/lang/hu-HU.rc @@ -381,22 +381,21 @@ STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - -GROUPBOX "Tasks", -1, 7, 10, 249, 45 -//ICON -AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP -AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP -GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP -//ICON -AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP -AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP -GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 -//ICON -AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP -PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP END FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 diff --git a/reactos/dll/win32/shell32/lang/it-IT.rc b/reactos/dll/win32/shell32/lang/it-IT.rc index e0e7033d547..3f57ce26027 100644 --- a/reactos/dll/win32/shell32/lang/it-IT.rc +++ b/reactos/dll/win32/shell32/lang/it-IT.rc @@ -379,22 +379,21 @@ STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION CAPTION "Generale" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - -GROUPBOX "Attivitа", -1, 7, 10, 249, 45 -//ICON -AUTORADIOBUTTON "Mostrare le attivitа comuni nelle cartelle", 14001, 40, 25, 120, 10, WS_TABSTOP -AUTORADIOBUTTON "Utilizzare le cartelle nella forma 'ReactOS class&ic' ", 14002, 40, 37, 120, 10, WS_TABSTOP -GROUPBOX "Sfoglia cartelle", -1, 7, 60, 249, 45, WS_TABSTOP -//ICON -AUTORADIOBUTTON "Aprire ogni cartella nella stessa finestra", 14004, 40, 70, 140, 10, WS_TABSTOP -AUTORADIOBUTTON "Aprire ogni cartella in una nuova finestra", 14005, 40, 82, 140, 10, WS_TABSTOP -GROUPBOX "Click sugli elementi come segue", -1, 7, 110, 249, 60 -//ICON -AUTORADIOBUTTON "&Click singolo per aprire un elemento (seleziona ed apre)", 14007, 40, 120, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Sottolinea i titoli delle icone in modo coerente con il &browser", 14008, 50, 132, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Sottolinea i titoli delle icone solo se &selezionate", 14009, 50, 144, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "&Doppio click per aprire un elemento (click singolo per selezionare)", 14010, 40, 156, 170, 10, WS_TABSTOP -PUSHBUTTON "&Ripristina le impostazioni predefinite", 14011, 180, 180, 60, 14, WS_TABSTOP + GROUPBOX "Attivitа", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Mostrare le attivitа comuni nelle cartelle", 14001, 40, 25, 120, 10, WS_TABSTOP + AUTORADIOBUTTON "Utilizzare le cartelle nella forma 'ReactOS class&ic' ", 14002, 40, 37, 120, 10, WS_TABSTOP + GROUPBOX "Sfoglia cartelle", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Aprire ogni cartella nella stessa finestra", 14004, 40, 70, 140, 10, WS_TABSTOP + AUTORADIOBUTTON "Aprire ogni cartella in una nuova finestra", 14005, 40, 82, 140, 10, WS_TABSTOP + GROUPBOX "Click sugli elementi come segue", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Click singolo per aprire un elemento (seleziona ed apre)", 14007, 40, 120, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Sottolinea i titoli delle icone in modo coerente con il &browser", 14008, 50, 132, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Sottolinea i titoli delle icone solo se &selezionate", 14009, 50, 144, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "&Doppio click per aprire un elemento (click singolo per selezionare)", 14010, 40, 156, 170, 10, WS_TABSTOP + PUSHBUTTON "&Ripristina le impostazioni predefinite", 14011, 180, 180, 60, 14, WS_TABSTOP END FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 diff --git a/reactos/dll/win32/shell32/lang/ja-JP.rc b/reactos/dll/win32/shell32/lang/ja-JP.rc index 3aa95f8ef99..a9d540556d8 100644 --- a/reactos/dll/win32/shell32/lang/ja-JP.rc +++ b/reactos/dll/win32/shell32/lang/ja-JP.rc @@ -378,22 +378,21 @@ STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION CAPTION "General" FONT 9, "MS UI Gothic", 0, 0, 0x0 BEGIN - -GROUPBOX "Tasks", -1, 7, 10, 249, 45 -//ICON -AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP -AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP -GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP -//ICON -AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP -AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP -GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 -//ICON -AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP -PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP END FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 diff --git a/reactos/dll/win32/shell32/lang/ko-KR.rc b/reactos/dll/win32/shell32/lang/ko-KR.rc index eae30075385..6a21cc08345 100644 --- a/reactos/dll/win32/shell32/lang/ko-KR.rc +++ b/reactos/dll/win32/shell32/lang/ko-KR.rc @@ -378,22 +378,21 @@ STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - -GROUPBOX "Tasks", -1, 7, 10, 249, 45 -//ICON -AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP -AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP -GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP -//ICON -AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP -AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP -GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 -//ICON -AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP -PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP END FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 diff --git a/reactos/dll/win32/shell32/lang/nl-NL.rc b/reactos/dll/win32/shell32/lang/nl-NL.rc index 9a3aef600af..74730fe8e16 100644 --- a/reactos/dll/win32/shell32/lang/nl-NL.rc +++ b/reactos/dll/win32/shell32/lang/nl-NL.rc @@ -378,22 +378,21 @@ STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - -GROUPBOX "Tasks", -1, 7, 10, 249, 45 -//ICON -AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP -AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP -GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP -//ICON -AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP -AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP -GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 -//ICON -AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP -PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP END FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 diff --git a/reactos/dll/win32/shell32/lang/no-NO.rc b/reactos/dll/win32/shell32/lang/no-NO.rc index 7d71a5a0058..5b13e36d74d 100644 --- a/reactos/dll/win32/shell32/lang/no-NO.rc +++ b/reactos/dll/win32/shell32/lang/no-NO.rc @@ -357,22 +357,21 @@ STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION CAPTION "Generielt" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - -GROUPBOX "Oppgaver", -1, 7, 10, 249, 45 -//ICON -AUTORADIOBUTTON "Vis felles oppgaver i &mapper", 14001, 40, 25, 120, 10, WS_TABSTOP -AUTORADIOBUTTON "Bruk ReactOS klass&isk mapper", 14002, 40, 37, 120, 10, WS_TABSTOP -GROUPBOX "Utforsk mapper", -1, 7, 60, 249, 45, WS_TABSTOP -//ICON -AUTORADIOBUTTON "Еpne hver mapper i sa&mme vindu", 14004, 40, 70, 140, 10, WS_TABSTOP -AUTORADIOBUTTON "Еpne hver mapper i sitt egen &vindu", 14005, 40, 82, 140, 10, WS_TABSTOP -GROUPBOX "Klikk enheter som fшlgende", -1, 7, 110, 249, 60 -//ICON -AUTORADIOBUTTON "&Enkelt-klikk for е еpne en enhet (peker for е velge)", 14007, 40, 120, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Utheve ikon titteler konsekvent med min &utforsker", 14008, 50, 132, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "UUtheve ikon titteler bare mens jeg &peker pе de", 14009, 50, 144, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "&Dobbelt klikk for е еpne enheten (Enkelt-klikk for е velge)", 14010, 40, 156, 170, 10, WS_TABSTOP -PUSHBUTTON "&Gjenopprette standard", 14011, 180, 180, 60, 14, WS_TABSTOP + GROUPBOX "Oppgaver", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Vis felles oppgaver i &mapper", 14001, 40, 25, 120, 10, WS_TABSTOP + AUTORADIOBUTTON "Bruk ReactOS klass&isk mapper", 14002, 40, 37, 120, 10, WS_TABSTOP + GROUPBOX "Utforsk mapper", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Еpne hver mapper i sa&mme vindu", 14004, 40, 70, 140, 10, WS_TABSTOP + AUTORADIOBUTTON "Еpne hver mapper i sitt egen &vindu", 14005, 40, 82, 140, 10, WS_TABSTOP + GROUPBOX "Klikk enheter som fшlgende", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Enkelt-klikk for е еpne en enhet (peker for е velge)", 14007, 40, 120, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Utheve ikon titteler konsekvent med min &utforsker", 14008, 50, 132, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "UUtheve ikon titteler bare mens jeg &peker pе de", 14009, 50, 144, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "&Dobbelt klikk for е еpne enheten (Enkelt-klikk for е velge)", 14010, 40, 156, 170, 10, WS_TABSTOP + PUSHBUTTON "&Gjenopprette standard", 14011, 180, 180, 60, 14, WS_TABSTOP END FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 diff --git a/reactos/dll/win32/shell32/lang/pl-PL.rc b/reactos/dll/win32/shell32/lang/pl-PL.rc index 2dd997f9dab..6a2649cfe20 100644 --- a/reactos/dll/win32/shell32/lang/pl-PL.rc +++ b/reactos/dll/win32/shell32/lang/pl-PL.rc @@ -385,22 +385,21 @@ STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION CAPTION "Ogуlne" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - -GROUPBOX "Zadania", -1, 7, 10, 249, 45 -//ICON -AUTORADIOBUTTON "Pokaї podstawowe zadania w &katalogach", 14001, 40, 25, 120, 10, WS_TABSTOP -AUTORADIOBUTTON "Uїyj klasycznych katalogуw &ReactOS", 14002, 40, 37, 120, 10, WS_TABSTOP -GROUPBOX "Przegl№daj katalogi", -1, 7, 60, 249, 45, WS_TABSTOP -//ICON -AUTORADIOBUTTON "Otwуrz kaїdy katalog w tym &samym oknie", 14004, 40, 70, 140, 10, WS_TABSTOP -AUTORADIOBUTTON "Otwуrz kaїdy katalog w &osobnym oknie", 14005, 40, 82, 140, 10, WS_TABSTOP -GROUPBOX "Dziaіanie przyciskуw myszki", -1, 7, 110, 249, 60 -//ICON -AUTORADIOBUTTON "&Pojedyncze klikniкcie by otworzyж cel (najechanie by wskazaж)", 14007, 40, 120, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Po&dwуjne klikniкcie by otworzyж (pojedyncze klikniкcie by wskazaж)", 14010, 40, 156, 170, 10, WS_TABSTOP -PUSHBUTTON "&Ustawienia domyњlne", 14011, 180, 180, 60, 14, WS_TABSTOP + GROUPBOX "Zadania", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Pokaї podstawowe zadania w &katalogach", 14001, 40, 25, 120, 10, WS_TABSTOP + AUTORADIOBUTTON "Uїyj klasycznych katalogуw &ReactOS", 14002, 40, 37, 120, 10, WS_TABSTOP + GROUPBOX "Przegl№daj katalogi", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Otwуrz kaїdy katalog w tym &samym oknie", 14004, 40, 70, 140, 10, WS_TABSTOP + AUTORADIOBUTTON "Otwуrz kaїdy katalog w &osobnym oknie", 14005, 40, 82, 140, 10, WS_TABSTOP + GROUPBOX "Dziaіanie przyciskуw myszki", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Pojedyncze klikniкcie by otworzyж cel (najechanie by wskazaж)", 14007, 40, 120, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Po&dwуjne klikniкcie by otworzyж (pojedyncze klikniкcie by wskazaж)", 14010, 40, 156, 170, 10, WS_TABSTOP + PUSHBUTTON "&Ustawienia domyњlne", 14011, 180, 180, 60, 14, WS_TABSTOP END FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 diff --git a/reactos/dll/win32/shell32/lang/pt-BR.rc b/reactos/dll/win32/shell32/lang/pt-BR.rc index da7a4a4f932..3fbe8a012fc 100644 --- a/reactos/dll/win32/shell32/lang/pt-BR.rc +++ b/reactos/dll/win32/shell32/lang/pt-BR.rc @@ -380,22 +380,21 @@ STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - -GROUPBOX "Tasks", -1, 7, 10, 249, 45 -//ICON -AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP -AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP -GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP -//ICON -AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP -AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP -GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 -//ICON -AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP -PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP END FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 diff --git a/reactos/dll/win32/shell32/lang/pt-PT.rc b/reactos/dll/win32/shell32/lang/pt-PT.rc index cc6c78f9a42..cb5add298fb 100644 --- a/reactos/dll/win32/shell32/lang/pt-PT.rc +++ b/reactos/dll/win32/shell32/lang/pt-PT.rc @@ -380,22 +380,21 @@ STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - -GROUPBOX "Tasks", -1, 7, 10, 249, 45 -//ICON -AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP -AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP -GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP -//ICON -AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP -AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP -GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 -//ICON -AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP -PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP END FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 diff --git a/reactos/dll/win32/shell32/lang/ru-RU.rc b/reactos/dll/win32/shell32/lang/ru-RU.rc index ecdf0d6fb3a..c3a5c2fd0d8 100644 --- a/reactos/dll/win32/shell32/lang/ru-RU.rc +++ b/reactos/dll/win32/shell32/lang/ru-RU.rc @@ -378,21 +378,21 @@ STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION CAPTION "Общие" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN -GROUPBOX "Задачи", -1, 7, 10, 249, 45 -//ICON -AUTORADIOBUTTON "Отобра&жение списка типичных задач в папках", 14001, 40, 24, 185, 10, WS_TABSTOP -AUTORADIOBUTTON "Использовать обы&чные папки ReactOS", 14002, 40, 36, 185, 10, WS_TABSTOP -GROUPBOX "Обзор папок", -1, 7, 60, 249, 45, WS_TABSTOP -//ICON -AUTORADIOBUTTON "&Открывать папки в одном и том же окне", 14004, 40, 75, 185, 10, WS_TABSTOP -AUTORADIOBUTTON "О&ткрывать каждую папку в отдельном окне", 14005, 40, 87, 185, 10, WS_TABSTOP -GROUPBOX "Щелчки мышью", -1, 7, 110, 249, 60 -//ICON -AUTORADIOBUTTON "От&крывать одним щелчком, выделять указателем", 14007, 40, 120, 200, 10, WS_TABSTOP -AUTORADIOBUTTON "Подчеркив&ать подписи значков", 14008, 50, 132, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Подчеркивать подписи з&начков при наведении", 14009, 50, 144, 185, 10, WS_TABSTOP -AUTORADIOBUTTON "Откр&ывать двойным, а выделять одним щелчком", 14010, 40, 156, 195, 10, WS_TABSTOP -PUSHBUTTON "&Восстановить умолчания", 14011, 148, 180, 104, 14, WS_TABSTOP + GROUPBOX "Задачи", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 24, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Отобра&жение списка типичных задач в папках", 14001, 40, 24, 185, 10, WS_TABSTOP + AUTORADIOBUTTON "Использовать обы&чные папки ReactOS", 14002, 40, 36, 185, 10, WS_TABSTOP + GROUPBOX "Обзор папок", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 75, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Открывать папки в одном и том же окне", 14004, 40, 75, 185, 10, WS_TABSTOP + AUTORADIOBUTTON "О&ткрывать каждую папку в отдельном окне", 14005, 40, 87, 185, 10, WS_TABSTOP + GROUPBOX "Щелчки мышью", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "От&крывать одним щелчком, выделять указателем", 14007, 40, 120, 200, 10, WS_TABSTOP + AUTORADIOBUTTON "Подчеркив&ать подписи значков", 14008, 50, 132, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Подчеркивать подписи з&начков при наведении", 14009, 50, 144, 185, 10, WS_TABSTOP + AUTORADIOBUTTON "Откр&ывать двойным, а выделять одним щелчком", 14010, 40, 156, 195, 10, WS_TABSTOP + PUSHBUTTON "&Восстановить умолчания", 14011, 148, 180, 104, 14, WS_TABSTOP END FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 238 diff --git a/reactos/dll/win32/shell32/lang/sk-SK.rc b/reactos/dll/win32/shell32/lang/sk-SK.rc index d8ebb75e35f..293a62ba8c1 100644 --- a/reactos/dll/win32/shell32/lang/sk-SK.rc +++ b/reactos/dll/win32/shell32/lang/sk-SK.rc @@ -384,22 +384,21 @@ STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION CAPTION "Vљeobecnй" //General FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - -GROUPBOX "Ъlohy", -1, 7, 10, 249, 45 -//ICON -AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP -AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP -GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP -//ICON -AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP -AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP -GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 -//ICON -AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP -PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP + GROUPBOX "Ъlohy", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP END FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 diff --git a/reactos/dll/win32/shell32/lang/sl-SI.rc b/reactos/dll/win32/shell32/lang/sl-SI.rc index 9ce5ceb6723..c86677f9d6e 100644 --- a/reactos/dll/win32/shell32/lang/sl-SI.rc +++ b/reactos/dll/win32/shell32/lang/sl-SI.rc @@ -378,22 +378,21 @@ STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - -GROUPBOX "Tasks", -1, 7, 10, 249, 45 -//ICON -AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP -AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP -GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP -//ICON -AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP -AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP -GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 -//ICON -AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP -PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP END FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 diff --git a/reactos/dll/win32/shell32/lang/sv-SE.rc b/reactos/dll/win32/shell32/lang/sv-SE.rc index b5edf7351f2..a976b19d103 100644 --- a/reactos/dll/win32/shell32/lang/sv-SE.rc +++ b/reactos/dll/win32/shell32/lang/sv-SE.rc @@ -378,22 +378,21 @@ STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - -GROUPBOX "Tasks", -1, 7, 10, 249, 45 -//ICON -AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP -AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP -GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP -//ICON -AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP -AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP -GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 -//ICON -AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP -PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP END FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 diff --git a/reactos/dll/win32/shell32/lang/tr-TR.rc b/reactos/dll/win32/shell32/lang/tr-TR.rc index 3c0c50e5b12..c6491701507 100644 --- a/reactos/dll/win32/shell32/lang/tr-TR.rc +++ b/reactos/dll/win32/shell32/lang/tr-TR.rc @@ -378,22 +378,21 @@ STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - -GROUPBOX "Tasks", -1, 7, 10, 249, 45 -//ICON -AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP -AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP -GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP -//ICON -AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP -AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP -GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 -//ICON -AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP -PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP END FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 diff --git a/reactos/dll/win32/shell32/lang/uk-UA.rc b/reactos/dll/win32/shell32/lang/uk-UA.rc index f1fd47c86f6..beb561be144 100644 --- a/reactos/dll/win32/shell32/lang/uk-UA.rc +++ b/reactos/dll/win32/shell32/lang/uk-UA.rc @@ -379,22 +379,21 @@ STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION CAPTION "Загальні" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - -GROUPBOX "Завдання", -1, 7, 10, 249, 45 -//ICON -AUTORADIOBUTTON "&Показувати список типових завдань у папках", 14001, 40, 25, 120, 10, WS_TABSTOP -AUTORADIOBUTTON "Використовувати зви&чайні папки ReactOS", 14002, 40, 37, 120, 10, WS_TABSTOP -GROUPBOX "Огляд папок", -1, 7, 60, 249, 45, WS_TABSTOP -//ICON -AUTORADIOBUTTON "Відкривати папки в то&му самому вікні", 14004, 40, 70, 140, 10, WS_TABSTOP -AUTORADIOBUTTON "Відкрива&ти кожну папку в окремому вікні", 14005, 40, 82, 140, 10, WS_TABSTOP -GROUPBOX "Клацання мишею", -1, 7, 110, 249, 60 -//ICON -AUTORADIOBUTTON "Від&кривати одиночним, виділяти вказівником", 14007, 40, 120, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Підкресл&ювати підписи значків", 14008, 50, 132, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Підкр&еслювати лише при наведенні", 14009, 50, 144, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Відкрив&ати подвійним, виділяти одиночним", 14010, 40, 156, 170, 10, WS_TABSTOP -PUSHBUTTON "&Відновити", 14011, 180, 180, 60, 14, WS_TABSTOP + GROUPBOX "Завдання", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Показувати список типових завдань у папках", 14001, 40, 25, 120, 10, WS_TABSTOP + AUTORADIOBUTTON "Використовувати зви&чайні папки ReactOS", 14002, 40, 37, 120, 10, WS_TABSTOP + GROUPBOX "Огляд папок", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Відкривати папки в то&му самому вікні", 14004, 40, 70, 140, 10, WS_TABSTOP + AUTORADIOBUTTON "Відкрива&ти кожну папку в окремому вікні", 14005, 40, 82, 140, 10, WS_TABSTOP + GROUPBOX "Клацання мишею", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Від&кривати одиночним, виділяти вказівником", 14007, 40, 120, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Підкресл&ювати підписи значків", 14008, 50, 132, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Підкр&еслювати лише при наведенні", 14009, 50, 144, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Відкрив&ати подвійним, виділяти одиночним", 14010, 40, 156, 170, 10, WS_TABSTOP + PUSHBUTTON "&Відновити", 14011, 180, 180, 60, 14, WS_TABSTOP END FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 diff --git a/reactos/dll/win32/shell32/lang/zh-CN.rc b/reactos/dll/win32/shell32/lang/zh-CN.rc index e67b019a999..33f63d4a063 100644 --- a/reactos/dll/win32/shell32/lang/zh-CN.rc +++ b/reactos/dll/win32/shell32/lang/zh-CN.rc @@ -367,22 +367,21 @@ STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - -GROUPBOX "Tasks", -1, 7, 10, 249, 45 -//ICON -AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP -AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP -GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP -//ICON -AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP -AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP -GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 -//ICON -AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP -PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP END FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 diff --git a/reactos/dll/win32/shell32/lang/zh-TW.rc b/reactos/dll/win32/shell32/lang/zh-TW.rc index e76c86a85ec..9b5fbb06d60 100644 --- a/reactos/dll/win32/shell32/lang/zh-TW.rc +++ b/reactos/dll/win32/shell32/lang/zh-TW.rc @@ -379,22 +379,21 @@ STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - -GROUPBOX "Tasks", -1, 7, 10, 249, 45 -//ICON -AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP -AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP -GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP -//ICON -AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP -AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP -GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 -//ICON -AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP -AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP -PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP END FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 diff --git a/reactos/dll/win32/shell32/res/icons/182.ico b/reactos/dll/win32/shell32/res/icons/182.ico new file mode 100644 index 0000000000000000000000000000000000000000..56c8f24b994858a89e06ddf7ca0d7be1bbdc1492 GIT binary patch literal 9774 zcmeI2K}a)K5P-+%?=Q54A{PFW3QdcM(AFOcf@m*F&Z0;0EF|>mK_r*-oN8|p{12sw zUXvi6LcmKQIe0TI9&_=MqtL_ldz-wMmt=Rd>Tb2@xZ|6B^X<&+?8|0X6d93GnVl8J z2|1k*`B9{^|3OYa7rAAw?Vpv?FGYU&N@Pwk=ufCRPDysm9ooM}y0+su(r7d!o6U+- zPRh-Zh*Qb~+=x>vGG^TkKv^h17?nzeJ;&XI7+5Gj7~|vPGC4UZGcz-?u&^LYOG~o0 zwk8`J8?v*rBk6Qn_V)H9m&?iF;h~(IoXGk4xm;Xa$ko-ATwhOt9Ux#nNH{n;{x8e8UkKr%jZ{S<-G$Vzk z(L7p2Wn~_I6@C+b7ybaArnk=E%kWkBI(!4Z2|oot4bN3QUW8wUUx(j<&%o#43-BfQ zns;j`hxWiH;ZyKw_&j_us6CQ_&%qbqOYk-Lfc8ikz6xK5Z@@R<1KPt{Nunt+kEwZwf z`6R5|6Z^G}wAHW~MpTU>mtMGOB27D8K1%4ZTAO0Br68;9h z1<&V)_3N;H9oDbI`kjYgh2MnVg+G8lfV!&l+!@D2DT{1p5&{2cru{4)GH{1$u$ zJ_lcbFTuZjNsRi6TYO?9;Ul9R|A@CFw4ZyGl76b|pHQOw9jrZg`9Tck+2bezk8JSyJZ-^+dmi5em9!&caQI}jQ@RGa1J}3llM6Pr{?#$yr#Y}AJNzM zoh8J2r!}nKC;XT`zNc%}PRH+8ej@P#K74%l4@gDieO%g~toJ$PgWHiT&opoH8au#K zC=a0#N?#L+&jRFkBto5@@%z{KqxPxLH$Gq7gWChM42fUkLDJetXT(nJKl!Bi?XZDK zpA_GmLLBv*n1RNS`b~w#Fwx8mhLM5Ep!nt}Ph%jIqD(Gr1jO(A{PrjDi*M%L0|Mgr z2Yl3iKz#MyJFs<=m^yVUlxtuzAbvNLr)9z#V6=@SbHou4;3^)}a|_QR#BqrXPGHXmQ)`E|~awMCxa zK2KeX8tr+jwn+2a`9j*E^Y_=U_w77-PLCmcq4L{tf^3~vk2b63v{-hS{9gA!9ja&4 zdG%;J^_(6%zA*XiFj3oK^7A6g{n1-{>e1(>N873A^w{x*$!~`Vv{h^^wyoxLUOjfW zF!^8m^;bQLQ-^;4@}jNYC*#s#`FXwm>mh3QN*yA1#D{-1dU j`?ml2&%SnX+MV2A*!kb=*VzGkomcqRtGLz9r|f?LXu6Eh literal 0 HcmV?d00001 diff --git a/reactos/dll/win32/shell32/res/icons/183.ico b/reactos/dll/win32/shell32/res/icons/183.ico new file mode 100644 index 0000000000000000000000000000000000000000..5f3251917ba1b45ca482fba7a05444088fd5cefc GIT binary patch literal 9774 zcmeI2K}ah{7{|XvpMB64idc9j6`B?ip{)-Jf@m*F&Z0;0EF|>mK_r*-oN8|pe1}p* zuSpP3A>gHu9K4wpkGXisQRrd%n@wilB<^Nn-tN=#9QSj--TBS``{vupW>*wR$e7H| z3j5b``dZ{Ck?!#uIsHQ9mUEr{SvmbmT+k!DjSlT${NPlpRgRRm31jgvesCrxCS-DQQf6jmWMN@JmX?-eZEa09 zHa28uXGb!bjO^|0Nj{&K!^1;4IXRK@^K-elxR9%>E4jYDmfPD~xx2fQ`}=!o|EuJW zckiV7PgUA~{Yj)1Y#ZChjCS z1D}FV!)M?N@TEcJkt}>3z6f82ufq>0k5u4m@D2DTd<%X+c~~zgERAKb0tO#Y9!evs z2G@XV!nNSS%OWa^ZXUh}Ux#IN1g{u$Q?O}R)}<<-UDEs%{4^_Ujup1Z3R`A{t+T?m z;Ir^~_#%86z79VRzY4zzzYBi=e*}L9UxBZ|H{hG_E%+7qZTNloWB5z>8~8RnpCi_= zVht__`!tcT#z#qY%!B^mG@D2DTd<%XGej0ubei42dejR=bJ`10RFT$7M zpMOh^g*GqwWFi^T#=8B9;Fk3JxoJ&krgv}k)78`O9b5g5@gE%D==bFD5##s7^$w^< zbnzYa3Awy}{PB=xuJ0?Wq4mnxu>B$O<7Rwt`iVrhKP>%Z@)>;i`0jtusv@7oW&Oc= zpHtp=70K~T^U^-W3h)%lLuiDpuZZZg0QntBBhNtn{xv?*F&Pfh=eyhAY<>SEj@=%d zck6eCyL7rie9Sm*eLtmvdA`^040_j{$=M_5ET-;`DvLzZ^bQ1p+R=sy^9!%B)w0 z9Di$lY0tI-`Yker{SdQ#kN!8<=a}8T!$Z{nw}%!e#hPh#Sgk~M0L*8*co3x%h}eSfZf;k+~=Vo{f~-oVm?CO4DoU| z2iEvU#kc2Rw9MY_v-C}OPwlM!q2v2P(KK;eOq}NY{^dnmzfZigivT$cwTxR1YOQDPDxtY9i5@(W$nW>iV&D?o!-aGH!`|i9<=7}OP8Ijpp zp`4J@36Wn!+Sl*o^h=Rj+U)*WIsIDXw{Jw|ltJI4I!+}s+A8c*?4fR1melKY$z(EO zl@fAuByxEvva_=zLZ47)bn5`p8p?-Cxm@N7#y%+cP#+r`lgY_RnVFf9g@pxKT3V8| zwKdt;*pO5zC3|~&lFer2@bFMhPEO?f{9GJMZln9?F{%OHpiN06EJ-FUd{~mpSyCtv%oO}I{2cru{4)GH{1$u~ zJ`10RFTz*h=iyi3H{o~T58#jB&)`e&75Ex_9lim-0>2Hv4}T1=$-9AX!jp_7nnH7E z0hN_`_*M8#_+9t|c#_^cgD=5X;A`-8_y+tG{4_jw^>`6}8Gapp3qB2>h0ntm;j53+ zW2Xi-0h@$P!RBBKy;37-_$+)Lz6f81?~xiQ!B^mG@OAhGe0OTvX<>~d&?K5db11Aw zT1bgl6}TE)9j*cApANCo*v-P{;fwH9cvgn@YQc5_J_*m7v~utT<)`4MSzU9iu0>YY zGOKHy)wKnmhR?$1;fwH9_<8tM_)Yj-_yhPO_%rwtdLoxal7sACK{Ai>bt%e(&KA{cnx5huVc#e}^T< zz8U_uBZ}bTdDhzE_}9wAc+)-B;ohsil?lxQ1|IcK1RC$;@?m_ZTj$D|zthrLar%93 zuhT#3Bj*0TaS68G7!BI*V}8_(?+p9ls@?AwemwpHzI^=lKa#S@cvRZ$tn)qPT`MCQ z-f3RtbIbs5p}d5KC|ya!J`0d@C_rlk+ z`N`inLOJ~Gvz70AI1_~Qt3Q|hP?CcYzxan-na*%e`%W@LsdW9mzg|992ArGjs+6B? zpEBD@Lx#V#zRHWufbJp_=#LTW57_?}{Q`B%cU+{=-_gSeHHYmKs&jROr=P|1@jp?V z>KuP^oKsQ%Dq2RVI!E07f&T2}-}Sf%y=rpY%fG&C8r1-_Zc5YcRrX`FKZt+jqLLu~ z+2~pQRO9o?fwuYeX?vLdTaE@ih3UW7T-~|R5Dgoq{{g4o!h`tNJySn5b8^qq)J>l$ z-R)ueZ%t^xQ<(nEytGttUz@tSUF*a8*WK(uds=nsl41Rub)hEB9Nnd9H)VHU5dS(h zD)~S7*BGPJzQ4chwRJxkmG<+`_WG|u)SW9G*YEnJ`;RK`#%{m)NA=w^cH91co=dWm8z8j7*7n;VF1vKKEJ%Hj)-Lo`(p zBN0pv+`!D`FxtNuO^wbdQjigunGxD?IUN`I zO(eYjBBwu#JTn&9XXNx3kw1PFnN)L&W;FnX8Q+__E3K4+}_@Dg*`ZE_@O^GHYO7j6EZzLE%Wp9vbeY?tE;QBv9TfL za#{BF_M}#;$>HIloSdA<`T4nAUti1p{k=RsKFag+v%I{#$m{E?bpG|^&#zzQ_Mcnn z{QVd4meFl=A3a8Ou}^46N+nO$*F9o*Qm=b*alv9H;iuqd;TPbS;Md@{;4APo_y+tX z`~&`r!nfet@V%)C(?X4u&~>zo)=}7qw2%_< z?%UR!)1%4BL7ybbL2>uNI3jPkh3EzTm!%xCb!Oy}kz%RkC!EeD=;A`*= z_)GXqQXGjDe}1u0jFFMhUWk^Wv5$|B7x)RqbPCoUJ^ju8*+@7wXrk<0o{A&>)`|r) z{d3nUm>+D-vG>l`>tcalcY)aW+VSVpy7mn7!^Ma5S(=^y(^%JZ-@j`g8#8nL_RZcs z&0gvL{P}jIyQ6mYm2iJU`)G`q`JWu2R6ZHaYL9V0%6!B>b+0_U3hgn~sl%zI8yh+- zZD(h8Te>|{+G+MQ|B?G*F!Ue4wM>sTfBU^x$T-d9BpI5<9H|<+`#t50@2Sc=%?Asw zL%aTr~D8f1;{cC~;7FHPNpO?cx2tp?~heO>>oQd%S|5yi?1poY9j5~KjLZza_~Ko-Fv%jWFD!6om> zaR+d?P^Sq7T@!uRzh$%dXKog8{aZeZf4dlF*?!QmBXnH<_J$_-=hl)myOPvSzy5)`U9{%th|`R6mN=ec`y`^IKk zW7F&2_{OGfzwy;yztS7uo!@VKckSxOy*7P!T>HK8-FuxSzE+;zo9~rDxc_vm=e0_V)Q`6$}b>Q`*Zmx7*+VzhfKhNB& zZ+HLhb7pG79m}Ji6yLpfdG~d1dB@PbCcSIE$GuL9-_LWF<=JxcseIc0KRW(L=Rc3< Z%k`O*fA?PH*^jEfj~>$;edPZs{sWK_N%#N& literal 0 HcmV?d00001 diff --git a/reactos/dll/win32/shell32/res/icons/186.ico b/reactos/dll/win32/shell32/res/icons/186.ico new file mode 100644 index 0000000000000000000000000000000000000000..d09411113a043ba8f3b92b508af06a59c0268f70 GIT binary patch literal 9774 zcmd6rOKcU%6^4(2AtYgD7y}uuJ$?`j80^^CafUDuAd^6xEt*-5*fNs6$O;xC#Kzen z@lX)RSiD9&g#cj;7=d^%A^{S+@P1q_Z!k|GWzqRg6;-!y+ugTKtYnT|x2ya7b^cS2 zuC8-LN@TcHR}0rsvU8Nkmm=@)C&TNklP6Eg*|TTm+_`gd{``44b?TIyIB`ObA3rX~jvbTU-d;I;_^@<$cgw+p z2j#$l1G0bre%ZTsuk6{gM|SVtEjxDXkgZ#{%F?AvrKhJyUcP)O4|lP6E) z(W6K5`0-=u>+6%Qt}Z!x^r&3FeqF9!y()L_-j$m-Z_2G(x8(Ni+j8g59m!_1a^uDg zxpwWE$edoeckiAYIdVjDxtu(G`c$@U+a~w#-Fn&3H*em^+qZ9J!-fsAe*Jn`w{D%RUAtCR zuU;)HSFV&LOP0v4UAv^cy~d_c1-~175BSsIFM_`UJ_mj-`0v2~0G=^qQQ!)A=Cg)Qw^G_D zt0>(RnL8c)Jn-Lu{~r8u@N2>E2HykzH290)uYk{i9|yh?JS(`f8T=gZ3&DR2z8!oA z_%85=z+Xrj8t^sXTfw)1Uj@Fq-_Wq6-0(;{_zv)0;17Yn06t-OqzC+I@E5^f0iOe( zFg&b@8cHjrjk1aYK7M#4=mCEk{6+9rz~{in503=x;5)!~fjfZ*suQTnl7AKp2=j`$MPbX`SZVa`UTBps?Tec zf8KoUx{*JtzCaCNeqR5l7OM|K!uqe#t1eFeN2@P%FvLH%rHQ7v;yl#5kiM#=iQb8F zS^ZpNOnNI&q7o1*XR$f287P?)n)CY4j6PGRoqOLplWCke z%(eer^Oxo^A2P4blvn=N>BlrrtHV45=GRhG~%wT{ud;RB)lczOg>S}cq>M~7bR+{4XfRUWIK#ECu9!BxcJh=dQ`JVTLXg^W-@dwH;;$#wC;%G<0%}r) z*MB}CQ&#>(MMXtE>6p(-$BrBSE9DQ~ zl>|W_TalJq!bLv)UzWmi$^&2qM1`YLoD7M_amMZQ|DIw<>~k*S*u}{xEclje z94#1{a7^ShW)D>Z_K33=M>kH392~7!SQ`7_Inp6|poE{rC2LC7~~A>@#%Ue%NNX9!HVJKIiTJ_GyU3 znf1@X6dix22KyQnID=~1h_@4|ptMh@6tz#>V(qhjtXY0--5W`$5QadJuzrZeuusI} z*Qc$7ogC15F9h>J_tZEKT+ zNPl696Z|Ltf_*Y1Bum)ktet{h82=%PaQR-){RI2uZLp8?43YI2|&F{?Vk`7NPDdzHXmbE$csF|K!ysl}IL$L?U@a zeyNj8ca735lnNc3o& zrVJ5Xff@TvEAkuiub}Y|+!SHXtKa)D1eD%{8S^|ta_vL-iIx7rR`QIvr(aQfgAv86 z9o~^XJp&O!{pfoVQz4eR&(}8Ky$yKdeNkIl1|y1B8w4n(5GOo|q4kf6wQ_t70=62@ ztu_YBt$u17Eu3x*KS$7_{KR7Y_&)Q_pE)x8oFNLh9CsT2Fh=Wx;pa2y`Q5sA-0t3ud6Xya zInj~vAZTWt6_sua9`$~{SvF8kPMEQ$xYg_%ErRC>TJ0QRF zA<92cf1}TcPRttM-7eaHVrj!qG+oetXVdY!v3Jjtu6mZxH9!bil%IpW;U`-1^XkUf zUnBGGpNG~-*dIcY)ck}OIUO&erhq8Qe22qp!R-st^NI2i7{wM{gK7Ftgk$+8?Z zK)*w-FVTLwd-Y`?e_T7g>KaVLPpoJ7weLCyuD{Bq;}G2!oDb@!^JAc^^0T)WoqvKn z&rd{a_>_Yn)fDx?ajGxspWf?LeTXYMr)l`f1>|(S>ews4^66aYdeEYNxN&vkp?)}D z)Q@OUo$~W-DcXNx`JAp-9ee!-D~Ha7`r!PCj)!8RzBr%ssygjcn*KX}?K|lN(_bBn zs1M=s2+xi4C45!A_9+cN>+gZ?l{&_{j?`~`ue7}@`b>-7hwI^c_uS!h|Ka=hlzl5v z*dzZ&-r*h@h%AYSEcpm?)q7GBS#(*F5?QhmS<(_&@)B9rY?k*n%ifVCH<4uz%d(GW Z`Icn)o@M!_X6bv56vgr=`Tsjl@gE$DC=~zz literal 0 HcmV?d00001 diff --git a/reactos/dll/win32/shell32/res/icons/187.ico b/reactos/dll/win32/shell32/res/icons/187.ico new file mode 100644 index 0000000000000000000000000000000000000000..38b924da89a8107b1f46d81d97a02a504d96a0d5 GIT binary patch literal 9774 zcmeI2S!`5C7KRT?2s1-~uuSZ3Z;TsgFm_{mI%A**a1t12lFUdbJVv|{$$pq8c!)B* zc;1j$GzbJ1I~WiG1Q;*^u|GrtB;LZlG|djpjx-NQXl$JD*It4{s@ zsZ(|9o>PfPKN%nu6~cY6v=0{fRHW;7k+csHxk{aBuaNfPB7Yk#5>*|_Op5kXSv1hU znM=R!XV3Fw-MV#h?AS3mb?TIyK7CrwoH--Mj~|z#M~}*pBS+-$;lt9|*(nDO9FTqc z_Q~G8du7j_J+gcEZrQnWr|j6VL$+_C>mOcI{eu{`|RY*|J4mym%pN)~u29=g-UP)vM*@%a`)%)hk)GYL&cx{aRM8 zTq$qfypa_vR><<@%Vp`(rLuVOVwpdGzHHmJP1@VrW%K6EvT4&MX=!OuuloOF(IS1K z@TXOJ5zqf8_?IUNe>@BtG)P8_7$N25iEY zkd8vX4E-qjb?DFjSt2dywW8OC-hTAXqBjw}8R&hB-uLMJ2<~!lw}ab({t5KYp??wm z6#CQA{|@~h(8r%F63jrK`He8xCQ37931uHercXqF2KwKk|2_IYqQ4yd?dW%)e**n; z=wC!Xh5jh?%g|>mVSY~Lp%R*@>gGvn)c0~zA+-SfBn_S zX@9oBUp9nG%i?8a4Ph0U`^o2xjg4Q}_NMw!O{_E=tGDeE{=9K!Ba6hyA8fnW?%`Pg zxc1rcuKt38vWI)Nf8p9OT-h_)KkIJqXS(;~pAoM$_GxFjBaK1(%Hy?FVYT11tIEuo ziJ8v6{_%;m;Sv;VyMz;osom|P(Nf{aJZqNVQRT;9~G~vEU5!P`}@t|va+)7_L15isw*j>-86^e@p#b`+kZrTbbN6w z3VcZv9I3Cb?{5EC+iPk=#p-_}u~@93zwQ5N{qL$n)wR_j30M1nzE0V1ZTs;031dT5 zHMJlVmz0#08tHBy8XG@06s@YOsSec@`zmOa#9jZ7V&fvU(YmS{AnHPZ_)_oMKZ%W< zP*YbKt*S<&t~O+(p0A{lA+fPzs>WAVMx#|=0OCu`wNDC1#ze=BA75Fm8mfX+#U|VS z6{QmfGX8aizF$0J6L8vSd_|F7IV?>V3U8y?%;u=iOY^`&Q=QsfV1 z5i!kwlbDedZZWY0VGGd&!36OVVF?ih0R`9I0<6PFpI(GnbTPq4pQOYqggr!C1X{#d zghN~rQ%SuO2Mz_#1VF?>Ml=x0BE&?5T10dNVZ>mt0LTNC4%s|7d>*JV_=H?gXz-Oq zh`X}k8=MSqV?31vZf*!U@QLm4NuTx`i!$&XX@U5-E(gA`7ECj(&iKOZCsxgkZ!itM zGamc`{g3OwC#vo}zd^GdK9xqy%E>#w#Qg@JfF7%Y>jxYI+xtor$Os`k*BtXpE(1Op z1496xl*3VE!>1likP%Xa-1y`-;FCcZ`}5)(aPUD!NQq#{VLzJ#_&A^B2g^yH97S*Y z9XR+PBfRF|Ym$>i*gXow4}yaavJpn1$y*j-PXiz4kkDzqm*{jupog2;3~=zxHpMkJ zJ{w>VUsKCOCq&9+@q2@VPcI{QNt41XLN3exgY!v1v7A-pC=7m|;Na8CNN#-cWz-x# z6KyCoPxb|B|!q=TqX3XCyk$NqJsyf0eC(--Dn2&%k-g z8c%BsLkhGhpAF`3qNyI5WgK~klWT-zq|`Sxmv;emang|zw7)nM?OCR zK-Tq_Ip!e0w%KCW{@biSK68$rFSvUTbv$iCj;~mV$ukG4Td9{$86wJ?;*ykr(^z8WGhTn24zw&A!`0(v0Wc=*CKELig#5w-B ziClX4AlvwZ+{&-KT6E7;KagVP-GA7p--$nyTltmO7WD&bD=$Ca8=qf&PhjVdo50%( z`XF=seQ_(lelKh(l%H=^FMiz%)dpP$T7vx9xRqb`QCoB#NMZAipODbs|8?$(eEo6j zdl0n2^5^1Ke*IS2QYb%BX)k_Vi`E962j$Jjt^B%Q*rMxzcRTO+$%TD>vSE+p#f+P~ z^1I(%@3;O|p3J+}Wfolrq=0$(3Cw+dvK@~s#OK$wXnhd$gI$w$U1+?LtrW^ndZ1^t z{@h!BT?=Z1u0gfK`JwB*P&+bhu{PPeuERpcPln?2liqnGV!q#%U%9Oxg1*ptU7K30 z9ev$(9Tvh*uIBUW*mVy4@xq~df%60NuJzUqwZYDdwI%be{Os*{=bt3a@spAIW7hXj z`K=Asj-WrREow(!Md!2-escMgu3h!L@++6lh1y{4(D~Q;pdFdESpVo<+mxSgOWyI5 zi>GuAtMBz2tQ$$Oh*??`gCkYo=_vX3YEmL&O}CHbZ% e8GDK&2L9)b|4YyV=A7dCU*G3{OI0o#EB_N_dG1UA literal 0 HcmV?d00001 diff --git a/reactos/dll/win32/shell32/shresdef.h b/reactos/dll/win32/shell32/shresdef.h index 3a06fe0abcd..dbc22559301 100644 --- a/reactos/dll/win32/shell32/shresdef.h +++ b/reactos/dll/win32/shell32/shresdef.h @@ -238,6 +238,15 @@ #define IDI_SHELL_MY_DOCUMENTS 235 #define IDI_SHELL_CONTROL_PANEL1 330 #define IDI_SHELL_ADMINTOOLS 328 + +// Icons for Folder Options (ID's identical to Windows XP SP3) +#define IDI_SHELL_SHOW_COMMON_TASKS 182 +#define IDI_SHELL_CLASSIC_FOLDERS 183 +#define IDI_SHELL_OPEN_IN_SOME_WINDOW 184 +#define IDI_SHELL_OPEN_IN_NEW_WINDOW 185 +#define IDI_SHELL_SINGLE_CLICK_TO_OPEN 186 +#define IDI_SHELL_DOUBLE_CLICK_TO_OPEN 187 + /* AVI resources, windows shell32 has 14 of them: 150-152 and 160-170 FIXME: Need to add them, but for now just let them use the same: searching.avi From 234e50df0d3f36ec7fc9db074cd8bf5012cd278e Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Fri, 15 Aug 2008 12:17:08 +0000 Subject: [PATCH 012/324] - Fix MiSyncThreadProcessViews. Should fix bug 3658. Based on Stefan Ginsberg's patch. See issue #3658 for more details. svn path=/trunk/; revision=35352 --- reactos/ntoskrnl/include/internal/mm.h | 3 ++- reactos/ntoskrnl/ke/i386/ctxswitch.S | 3 ++- reactos/ntoskrnl/ke/procobj.c | 4 ++-- reactos/ntoskrnl/ke/thrdobj.c | 2 +- reactos/ntoskrnl/ke/thrdschd.c | 4 ++-- reactos/ntoskrnl/mm/mm.c | 6 +++--- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/reactos/ntoskrnl/include/internal/mm.h b/reactos/ntoskrnl/include/internal/mm.h index 502135124d8..fd9854b8e7b 100644 --- a/reactos/ntoskrnl/include/internal/mm.h +++ b/reactos/ntoskrnl/include/internal/mm.h @@ -1556,7 +1556,8 @@ MmCheckSystemImage( VOID FASTCALL MiSyncThreadProcessViews( - IN PKTHREAD NextThread + IN PKTHREAD NextThread, + IN PEPROCESS Process ); extern PMM_AVL_TABLE MmKernelAddressSpace; diff --git a/reactos/ntoskrnl/ke/i386/ctxswitch.S b/reactos/ntoskrnl/ke/i386/ctxswitch.S index 3cff2d27a1c..dbbebd66527 100644 --- a/reactos/ntoskrnl/ke/i386/ctxswitch.S +++ b/reactos/ntoskrnl/ke/i386/ctxswitch.S @@ -738,7 +738,8 @@ CheckNext: SwapContext: /* ReactOS Mm Hack */ mov ecx, esi - call @MiSyncThreadProcessViews@4 + mov edx, [edi+KTHREAD_APCSTATE_PROCESS] + call @MiSyncThreadProcessViews@8 /* Swap context at APC_LEVEL */ mov ecx, APC_LEVEL diff --git a/reactos/ntoskrnl/ke/procobj.c b/reactos/ntoskrnl/ke/procobj.c index e456824d133..242dc28a298 100644 --- a/reactos/ntoskrnl/ke/procobj.c +++ b/reactos/ntoskrnl/ke/procobj.c @@ -448,7 +448,7 @@ KeAttachProcess(IN PKPROCESS Process) ASSERT_IRQL_LESS_OR_EQUAL(DISPATCH_LEVEL); /* Make sure that we are in the right page directory (ReactOS Mm Hack) */ - MiSyncThreadProcessViews(Thread); + MiSyncThreadProcessViews(Thread, (PEPROCESS)Process); /* Check if we're already in that process */ if (Thread->ApcState.Process == Process) return; @@ -574,7 +574,7 @@ KeStackAttachProcess(IN PKPROCESS Process, ASSERT_IRQL_LESS_OR_EQUAL(DISPATCH_LEVEL); /* Make sure that we are in the right page directory (ReactOS Mm Hack) */ - MiSyncThreadProcessViews(Thread); + MiSyncThreadProcessViews(Thread, (PEPROCESS)Process); /* Crash system if DPC is being executed! */ if (KeIsExecutingDpc()) diff --git a/reactos/ntoskrnl/ke/thrdobj.c b/reactos/ntoskrnl/ke/thrdobj.c index dccfe9c4a80..14520ebecf0 100644 --- a/reactos/ntoskrnl/ke/thrdobj.c +++ b/reactos/ntoskrnl/ke/thrdobj.c @@ -811,7 +811,7 @@ KeInitThread(IN OUT PKTHREAD Thread, Thread->KernelStackResident = TRUE; /* Make sure that we are in the right page directory (ReactOS Mm Hack) */ - MiSyncThreadProcessViews(Thread); + MiSyncThreadProcessViews(Thread, (PEPROCESS)Process); /* Enter SEH to avoid crashes due to user mode */ Status = STATUS_SUCCESS; diff --git a/reactos/ntoskrnl/ke/thrdschd.c b/reactos/ntoskrnl/ke/thrdschd.c index 15a2d9f61a2..04db88dd24b 100644 --- a/reactos/ntoskrnl/ke/thrdschd.c +++ b/reactos/ntoskrnl/ke/thrdschd.c @@ -344,7 +344,7 @@ KiSwapThread(IN PKTHREAD CurrentThread, WaitIrql = CurrentThread->WaitIrql; /* REACTOS Mm Hack of Doom */ - MiSyncThreadProcessViews(NextThread); + MiSyncThreadProcessViews(NextThread, PsGetCurrentProcess()); /* Swap contexts */ ApcState = KiSwapContext(CurrentThread, NextThread); @@ -714,7 +714,7 @@ NtYieldExecution(VOID) ASSERT(OldIrql <= DISPATCH_LEVEL); /* REACTOS Mm Hack of Doom */ - MiSyncThreadProcessViews(NextThread); + MiSyncThreadProcessViews(NextThread, PsGetCurrentProcess()); /* Swap to new thread */ KiSwapContext(Thread, NextThread); diff --git a/reactos/ntoskrnl/mm/mm.c b/reactos/ntoskrnl/mm/mm.c index 82e9d0d20fc..0b985348aec 100644 --- a/reactos/ntoskrnl/mm/mm.c +++ b/reactos/ntoskrnl/mm/mm.c @@ -26,12 +26,12 @@ MM_STATS MmStats; VOID FASTCALL -MiSyncThreadProcessViews(IN PKTHREAD NextThread) +MiSyncThreadProcessViews(IN PKTHREAD NextThread, + IN PEPROCESS Process) { - PVOID Process = PsGetCurrentProcess(); PETHREAD Thread = CONTAINING_RECORD(NextThread, ETHREAD, Tcb); - /* Hack Sync because Mm is broken */ + /* Hack Sync because Mm is broken */ MmUpdatePageDir(Process, Thread, sizeof(ETHREAD)); MmUpdatePageDir(Process, Thread->ThreadsProcess, sizeof(EPROCESS)); MmUpdatePageDir(Process, From 809f843f36f448fd1421aa9ad570b3aa7b9f7da0 Mon Sep 17 00:00:00 2001 From: Sylvain Petreolle Date: Fri, 15 Aug 2008 14:24:24 +0000 Subject: [PATCH 013/324] Update french translation for servman and shell32 Patches by Amine Khaldi and me svn path=/trunk/; revision=35353 --- .../mscutils/servman/lang/fr-FR.rc | 34 +++++++++--------- reactos/dll/win32/shell32/lang/fr-FR.rc | 36 +++++++++---------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/reactos/base/applications/mscutils/servman/lang/fr-FR.rc b/reactos/base/applications/mscutils/servman/lang/fr-FR.rc index 35e3894eaa2..7a204f3276c 100644 --- a/reactos/base/applications/mscutils/servman/lang/fr-FR.rc +++ b/reactos/base/applications/mscutils/servman/lang/fr-FR.rc @@ -15,8 +15,8 @@ BEGIN MENUITEM SEPARATOR MENUITEM "Dйmarrer", ID_START, GRAYED MENUITEM "Arrкter", ID_STOP, GRAYED - MENUITEM "Pause", ID_PAUSE, GRAYED - MENUITEM "Relancer", ID_RESUME, GRAYED + MENUITEM "Suspendre", ID_PAUSE, GRAYED + MENUITEM "Reprendre", ID_RESUME, GRAYED MENUITEM "Redйmarrer", ID_RESTART, GRAYED MENUITEM SEPARATOR MENUITEM "Rafraоchir", ID_REFRESH @@ -27,7 +27,7 @@ BEGIN MENUITEM SEPARATOR MENUITEM "Propriйtйs...", ID_PROP, GRAYED END - POPUP "Vue" + POPUP "Affichage" BEGIN MENUITEM "Grandes Icфnes", ID_VIEW_LARGE MENUITEM "Petites Icфnes", ID_VIEW_SMALL @@ -49,8 +49,8 @@ BEGIN BEGIN MENUITEM "Dйmarrer", ID_START, GRAYED MENUITEM "Arrкter", ID_STOP, GRAYED - MENUITEM "Pause", ID_PAUSE, GRAYED - MENUITEM "Relancer", ID_RESUME, GRAYED + MENUITEM "Suspendre", ID_PAUSE, GRAYED + MENUITEM "Reprendre", ID_RESUME, GRAYED MENUITEM "Redйmarrer", ID_RESTART, GRAYED MENUITEM SEPARATOR MENUITEM "Rafraоchir", ID_REFRESH @@ -87,17 +87,17 @@ BEGIN COMBOBOX IDC_START_TYPE, 70, 107, 176, 40, WS_CHILD | WS_VISIBLE | WS_TABSTOP | CBS_DROPDOWNLIST PUSHBUTTON "Dйmarrer", IDC_START, 6, 155, 54, 15, WS_DISABLED PUSHBUTTON "Arrкter", IDC_STOP, 68, 155, 54, 15, WS_DISABLED - PUSHBUTTON "Pause", IDC_PAUSE , 130, 155, 54, 15, WS_DISABLED - PUSHBUTTON "Relancer", IDC_RESUME, 192, 155, 54, 15, WS_DISABLED + PUSHBUTTON "Suspendre", IDC_PAUSE , 130, 155, 54, 15, WS_DISABLED + PUSHBUTTON "Reprendre", IDC_RESUME, 192, 155, 54, 15, WS_DISABLED LTEXT "Nom du service :", IDC_STATIC, 4, 11, 53, 11 - LTEXT "Nom long :", IDC_STATIC, 4, 29, 53, 11 + LTEXT "Nom complet :", IDC_STATIC, 4, 29, 53, 11 LTEXT "Description :", IDC_STATIC, 4, 51, 53, 11 LTEXT "Rйpertoire de l'exйcutable :", IDC_STATIC, 6, 73, 82, 9 - LTEXT "Dйmarrage :", IDC_STATIC, 6, 108, 53, 11 - LTEXT "Йtat du service :", IDC_STATIC, 4, 138, 53, 11 + LTEXT "Type de dйmarrage :", IDC_STATIC, 6, 108, 53, 11 + LTEXT "Statut du service :", IDC_STATIC, 4, 138, 53, 11 LTEXT "", IDC_SERV_STATUS, 70, 138, 176, 11, WS_CHILD | WS_VISIBLE LTEXT "Vous pouvez dйfinir les paramиtres passйs au service lorsque vous le dйmarrez.",IDC_STATIC, 6,177,240,15 - LTEXT "Paramиtres :", IDC_STATIC, 6, 200, 58, 11 + LTEXT "Paramиtres de dйmarrage :", IDC_STATIC, 6, 200, 58, 11 EDITTEXT IDC_START_PARAM, 68, 199, 178, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP PUSHBUTTON "Йditer", IDC_EDIT, 192, 215, 54, 15, WS_DISABLED END @@ -109,8 +109,8 @@ STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THIC BEGIN CONTROL "", IDC_DEPEND_TREE1, "SysTreeView32" ,0x50010007, 8, 70, 236, 68, 0x00000200 CONTROL "", IDC_DEPEND_TREE2, "SysTreeView32", 0x50010007, 8, 151, 234, 67, 0x00000200 - LTEXT "Certains services dйpendent d'autres services, de pilotes systиme ou de leur groupe de dйmarrage. Si un composant systиme est arrкtй ou ne fonctionne pas correctement, les services qui en dйpendent peuvent кtre affectйs.", IDC_STATIC,8, 7, 238, 36 - LTEXT "Ce service dйpend des composants suivants", IDC_STATIC, 8, 57, 236, 9 + LTEXT "Certains services dйpendent d'autres services, pilotes systиme et groupes d'ordre de chargement. Si un composant systиme est arrкtй ou ne fonctionne pas correctement, les services dйpendants peuvent кtre affectйs.", IDC_STATIC,8, 7, 238, 36 + LTEXT "Ce service dйpend des composants systиme suivants", IDC_STATIC, 8, 57, 236, 9 LTEXT "", IDC_DEPEND_SERVICE, 8, 38, 236, 13 END @@ -125,12 +125,12 @@ BEGIN EDITTEXT IDC_CREATE_DESC, 10, 97, 210, 48, WS_CHILD | WS_VISIBLE EDITTEXT IDC_CREATE_OPTIONS, 10, 162, 210, 13, WS_CHILD | WS_VISIBLE LTEXT "*Nom du service :", IDC_STATIC, 12, 12, 54, 9 - LTEXT "*Nom long :", IDC_STATIC, 12, 33, 54, 9 + LTEXT "*Nom complet :", IDC_STATIC, 12, 33, 54, 9 LTEXT "*Rйpertoire de l'exйcutable :", IDC_STATIC, 10, 51, 68, 9 LTEXT "Description :", IDC_STATIC, 12, 86, 44, 9 PUSHBUTTON "OK", IDOK, 126, 192, 44, 13 PUSHBUTTON "Annuler", IDCANCEL, 176, 192, 46, 13 - LTEXT "Options supplйmentaires (clicker sur aide pour plus de dйtails)", IDC_STATIC, 10, 151, 134, 9 + LTEXT "Options supplйmentaires (cliquer sur aide pour plus de dйtails)", IDC_STATIC, 10, 151, 134, 9 PUSHBUTTON "Aide", ID_CREATE_HELP, 10, 192, 44, 13 END @@ -171,7 +171,7 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_APPNAME "Gestionnaire de Service ReactOS" + IDS_APPNAME "Gestionnaire de Services ReactOS" END STRINGTABLE DISCARDABLE @@ -195,7 +195,7 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_NUM_SERVICES "Services: %d" - IDS_LICENSE "Ce programme est un logiciel libre ; vous pouvez le redistribuer et/ou le modifier tout en respectant les termes de la ""GNU General Public License"" publiйe par la Free Software Foundation; dans sa version 2 (ou selon votre prйfйrence) toute version ultйrieure.\r\n\r\nCe programme est distribuй dans l'espoir qu'il sera utile, cependant SANS GARANTIE D'AUCUNE SORTE; sans mкme une garantie implicite de COMMERCIABILITE ou DE CONFORMITE A UNE UTILISATION PARTICULIERE. \r\n\r\nVoir la Licence Publique Gйnйrale GNU pour plus de dйtails. Vous devriez avoir reзu un exemplaire de la Licence Publique Gйnйrale GNU avec ce programme ; si ce n'est pas le cas, йcrivez а la Free Software Foundation Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA." + IDS_LICENSE "Ce programme est un logiciel libre ; vous pouvez le redistribuer et/ou le modifier tout en respectant les termes de la ""GNU General Public License"" publiйe par la Free Software Foundation; dans sa version 2 (ou selon votre prйfйrence) toute version ultйrieure.\r\n\r\nCe programme est distribuй dans l'espoir qu'il sera utile, cependant SANS GARANTIE D'AUCUNE SORTE; sans mкme une garantie implicite de COMMERCIABILITЙ ou DE CONFORMITЙ A UNE UTILISATION PARTICULIИRE. \r\n\r\nVoir la Licence Publique Gйnйrale GNU pour plus de dйtails. Vous devriez avoir reзu un exemplaire de la Licence Publique Gйnйrale GNU avec ce programme ; si ce n'est pas le cas, йcrivez а la Free Software Foundation Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA." END STRINGTABLE DISCARDABLE diff --git a/reactos/dll/win32/shell32/lang/fr-FR.rc b/reactos/dll/win32/shell32/lang/fr-FR.rc index e789aa7524d..e430f878187 100644 --- a/reactos/dll/win32/shell32/lang/fr-FR.rc +++ b/reactos/dll/win32/shell32/lang/fr-FR.rc @@ -96,7 +96,7 @@ END SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU -CAPTION "Parcourir pour un dossier" +CAPTION "Rechercher un dossier" FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDD_TITLE, 10, 8, 198, 24 @@ -308,7 +308,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Outils" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX "Vйrifcation-d'erreurs", -1, 5, 5, 230, 60 + GROUPBOX "Vйrification d'erreurs", -1, 5, 5, 230, 60 LTEXT "Cette option vйrifiera le volume pour йviter les\nerreurs.", -1, 40, 25, 160, 20 PUSHBUTTON "Vйrifier maintenant...", 14000, 130, 45, 90, 15, WS_TABSTOP GROUPBOX "Dйfragmentation", -1, 5, 65, 230, 60 @@ -349,7 +349,7 @@ END BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Proprйtйs de la corbeille" +CAPTION "Propriйtйs de la corbeille" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 @@ -609,18 +609,18 @@ BEGIN IDS_SHV_COLUMN9 "Commentaires" IDS_SHV_COLUMN10 "Propriйtaire" IDS_SHV_COLUMN11 "Groupe" - IDS_SHV_COLUMN12 "Filename" - IDS_SHV_COLUMN13 "Category" + IDS_SHV_COLUMN12 "Nom de fichier" + IDS_SHV_COLUMN13 "Catйgorie" IDS_SHV_COLUMN_DELFROM "Localisation d'origine" IDS_SHV_COLUMN_DELDATE "Date de suppression" - IDS_SHV_COLUMN_FONTTYPE "Fonttype" + IDS_SHV_COLUMN_FONTTYPE "Type de police" IDS_SHV_COLUMN_WORKGROUP "Workgroup" - IDS_SHV_NETWORKLOCATION "Network Location" + IDS_SHV_NETWORKLOCATION "Emplacement rйseau" IDS_SHV_COLUMN_DOCUMENTS "Documents" - IDS_SHV_COLUMN_STATUS "Status" - IDS_SHV_COLUMN_COMMENTS "Comments" - IDS_SHV_COLUMN_LOCATION "Location" - IDS_SHV_COLUMN_MODEL "Model" + IDS_SHV_COLUMN_STATUS "Йtat" + IDS_SHV_COLUMN_COMMENTS "Commentaires" + IDS_SHV_COLUMN_LOCATION "Emplacement" + IDS_SHV_COLUMN_MODEL "Modиle" /* special folders */ IDS_DESKTOP "Bureau" @@ -641,7 +641,7 @@ BEGIN IDS_DELETE "&Supprimer" IDS_PROPERTIES "&Propriйtйs" IDS_CUT "C&ouper" - IDS_RESTORE "Restore" + IDS_RESTORE "Res&taurer" IDS_CREATEFOLDER_DENIED "Impossible de crйer le nouveau dossier : permission refusйe." IDS_CREATEFOLDER_CAPTION "Erreur lors de la crйation du nouveau dossier" @@ -714,7 +714,7 @@ BEGIN IDS_FOLDER_OPTIONS "Options du dossier" IDS_RECYCLEBIN_LOCATION "Emplacement de la corbeille" IDS_RECYCLEBIN_DISKSPACE "Espace disponible" - IDS_EMPTY_BITBUCKET "Corbeille vide" + IDS_EMPTY_BITBUCKET "Vider la Corbeille" IDS_PICK_ICON_TITLE "Choisir une icфne" IDS_PICK_ICON_FILTER "Fichiers d'icфnes (*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" IDS_OPEN_WITH_FILTER "Fichiers exйcutables\0*.exe\0" @@ -743,10 +743,10 @@ BEGIN IDS_PLAY_VERB "Lire" IDS_PREVIEW_VERB "Apercevoir" - IDS_FILE_FOLDER "%u Files, %u Folders" - IDS_PRINTERS "Printers" - IDS_FONTS "Fonts" - IDS_INSTALLNEWFONT "Install New Font..." + IDS_FILE_FOLDER "%u fichiers, %u rйpertoires" + IDS_PRINTERS "Imprimantes" + IDS_FONTS "Polices" + IDS_INSTALLNEWFONT "Installer une nouvelle police..." - IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" + IDS_DEFAULT_CLUSTER_SIZE "Taille d'allocation par dйfaut" END From 7b55de3a28db0305b90411d2f7d2ea68e42c79aa Mon Sep 17 00:00:00 2001 From: ReactOS Portable Systems Group Date: Fri, 15 Aug 2008 15:02:40 +0000 Subject: [PATCH 014/324] Don't build with -s, this strips vital information from the output. Use --strip-debug instead, which gets rid of the DWARF debugging information, but keeps the file and symbols sane, so objdump can still be used on the output. svn path=/trunk/; revision=35354 --- reactos/ReactOS-arm.rbuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/ReactOS-arm.rbuild b/reactos/ReactOS-arm.rbuild index b073d425aa6..5f6e7b792c9 100644 --- a/reactos/ReactOS-arm.rbuild +++ b/reactos/ReactOS-arm.rbuild @@ -68,7 +68,7 @@ -Wno-attributes -fno-strict-aliasing - -s + --strip-debug -static From 8f90e11e732875f6aaf69ef99e8200c246f9f218 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Fri, 15 Aug 2008 16:09:17 +0000 Subject: [PATCH 015/324] Fix typo which was preventing compilation on *nix svn path=/trunk/; revision=35355 --- reactos/dll/ntdll/ntdll.rbuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/dll/ntdll/ntdll.rbuild b/reactos/dll/ntdll/ntdll.rbuild index 06759b12e99..fbd01ebe8a7 100644 --- a/reactos/dll/ntdll/ntdll.rbuild +++ b/reactos/dll/ntdll/ntdll.rbuild @@ -33,7 +33,7 @@ - stubs_asm.S + stubs_asm.s From 08c7fe628b031b8679c87311664bc3fb38b1b2a6 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Fri, 15 Aug 2008 18:24:11 +0000 Subject: [PATCH 016/324] Gregor Schneider - Floating point values are not passed directly, but using the stack. Ref: Wine code and http://en.wikibooks.org/wiki/Reverse_Engineering/Floating_Point_Numbers code. - mem/i386/memchr_asm.s: don't loop if given size is 0. - Python test_builtin passes all 50 tests now. See issue #1255 for more details. svn path=/trunk/; revision=35357 --- reactos/lib/sdk/crt/math/stubs.c | 72 ++++++++++++----------- reactos/lib/sdk/crt/mem/i386/memchr_asm.s | 9 +-- 2 files changed, 43 insertions(+), 38 deletions(-) diff --git a/reactos/lib/sdk/crt/math/stubs.c b/reactos/lib/sdk/crt/math/stubs.c index 40c726cffc2..58fac7113c0 100644 --- a/reactos/lib/sdk/crt/math/stubs.c +++ b/reactos/lib/sdk/crt/math/stubs.c @@ -1,134 +1,138 @@ #include #include -double _CIsin(double x); -double _CIcos(double x); -double _CItan(double x); -double _CIsinh(double x); -double _CIcosh(double x); -double _CItanh(double x); -double _CIasin(double x); -double _CIacos(double x); -double _CIatan(double x); -double _CIatan2(double y, double x); -double _CIexp(double x); -double _CIlog(double x); -double _CIlog10(double x); -double _CIpow(double x, double y); -double _CIsqrt(double x); -double _CIfmod(double x, double y); - +#define FPU_DOUBLE(var) double var; \ + __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var) : ) +#define FPU_DOUBLES(var1,var2) double var1,var2; \ + __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var2) : ); \ + __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var1) : ) /* * @implemented */ -double _CIsin(double x) +double CDECL _CIsin(void) { + FPU_DOUBLE(x); return sin(x); } /* * @implemented */ -double _CIcos(double x) +double CDECL _CIcos(void) { + FPU_DOUBLE(x); return cos(x); } /* * @implemented */ -double _CItan(double x) +double CDECL _CItan(void) { + FPU_DOUBLE(x); return tan(x); } /* * @implemented */ -double _CIsinh(double x) +double CDECL _CIsinh(void) { + FPU_DOUBLE(x); return sinh(x); } /* * @implemented */ -double _CIcosh(double x) +double CDECL _CIcosh(void) { + FPU_DOUBLE(x); return cosh(x); } /* * @implemented */ -double _CItanh(double x) +double CDECL _CItanh(void) { + FPU_DOUBLE(x); return tanh(x); } /* * @implemented */ -double _CIasin(double x) +double CDECL _CIasin(void) { + FPU_DOUBLE(x); return asin(x); } /* * @implemented */ -double _CIacos(double x) +double CDECL _CIacos(void) { + FPU_DOUBLE(x); return acos(x); } /* * @implemented */ -double _CIatan(double x) +double CDECL _CIatan(void) { + FPU_DOUBLE(x); return atan(x); } /* * @implemented */ -double _CIatan2(double y, double x) +double CDECL _CIatan2(void) { - return atan2(y, x); + FPU_DOUBLES(x, y); + return atan2(x, y); } /* * @implemented */ -double _CIexp(double x) +double CDECL _CIexp(void) { + FPU_DOUBLE(x); return exp(x); } /* * @implemented */ -double _CIlog(double x) +double CDECL _CIlog(void) { + FPU_DOUBLE(x); return log(x); } /* * @implemented */ -double _CIlog10(double x) +double CDECL _CIlog10(void) { + FPU_DOUBLE(x); return log10(x); } /* * @implemented */ -double _CIpow(double x, double y) +double CDECL _CIpow(void) { + FPU_DOUBLES(x, y); return pow(x, y); } /* * @implemented */ -double _CIsqrt(double x) +double CDECL _CIsqrt(void) { + FPU_DOUBLE(x); return sqrt(x); } /* * @implemented */ -double _CIfmod(double x, double y) +double CDECL _CIfmod(void) { + FPU_DOUBLES(x, y); return fmod(x, y); } diff --git a/reactos/lib/sdk/crt/mem/i386/memchr_asm.s b/reactos/lib/sdk/crt/mem/i386/memchr_asm.s index f044a1d72f1..f6e8037fc31 100644 --- a/reactos/lib/sdk/crt/mem/i386/memchr_asm.s +++ b/reactos/lib/sdk/crt/mem/i386/memchr_asm.s @@ -2,7 +2,7 @@ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: lib/string/i386/memchr.s + * FILE: lib/sdk/crt/mem/i386/memchr.s */ /* @@ -19,13 +19,14 @@ _memchr: mov 0xc(%ebp),%eax mov 0x10(%ebp),%ecx cld + jecxz .Lnotfound repne scasb - je .L1 + je .Lfound +.Lnotfound: mov $1,%edi -.L1: +.Lfound: mov %edi,%eax dec %eax pop %edi leave ret - From 1a6f1682451b0cfff8907b66aae32400afa81d15 Mon Sep 17 00:00:00 2001 From: ReactOS Portable Systems Group Date: Sat, 16 Aug 2008 01:58:59 +0000 Subject: [PATCH 017/324] Implement InterlockedComparePte and InterlockedCompareExchangePte to: 1) Avoid all the casting currently being done 2) Allow portability with other platforms so that the code can be potentially shared later. svn path=/trunk/; revision=35364 --- reactos/ntoskrnl/include/internal/mm.h | 7 ++++ reactos/ntoskrnl/mm/i386/page.c | 44 +++++++++++++------------- 2 files changed, 29 insertions(+), 22 deletions(-) diff --git a/reactos/ntoskrnl/include/internal/mm.h b/reactos/ntoskrnl/include/internal/mm.h index fd9854b8e7b..086d70a9ac6 100644 --- a/reactos/ntoskrnl/include/internal/mm.h +++ b/reactos/ntoskrnl/include/internal/mm.h @@ -164,6 +164,13 @@ typedef ULONG PFN_TYPE, *PPFN_TYPE; (PAGE_WRITECOPY | \ PAGE_EXECUTE_WRITECOPY) + +#define InterlockedCompareExchangePte(PointerPte, Exchange, Comperand) \ + InterlockedCompareExchange((PLONG)(PointerPte), Exchange, Comperand) + +#define InterlockedExchangePte(PointerPte, Value) \ + InterlockedExchange((PLONG)(PointerPte), Value) + typedef struct { ULONG Entry[NR_SECTION_PAGE_ENTRIES]; diff --git a/reactos/ntoskrnl/mm/i386/page.c b/reactos/ntoskrnl/mm/i386/page.c index 36713e7deac..6ccd43dc97d 100644 --- a/reactos/ntoskrnl/mm/i386/page.c +++ b/reactos/ntoskrnl/mm/i386/page.c @@ -331,7 +331,7 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create) { KEBUGCHECK(0); } - if (0 == InterlockedCompareExchangeUL(&PageDir[PdeOffset], 0, 0)) + if (0 == InterlockedCompareExchangePte(&PageDir[PdeOffset], 0, 0)) { if (Create == FALSE) { @@ -343,7 +343,7 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create) { KEBUGCHECK(0); } - Entry = InterlockedCompareExchangeUL(&PageDir[PdeOffset], PFN_TO_PTE(Pfn) | PA_PRESENT | PA_READWRITE | PA_USER, 0); + Entry = InterlockedCompareExchangePte(&PageDir[PdeOffset], PFN_TO_PTE(Pfn) | PA_PRESENT | PA_READWRITE | PA_USER, 0); if (Entry != 0) { MmReleasePageMemoryConsumer(MC_NPPOOL, Pfn); @@ -363,11 +363,11 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create) return Pt + ADDR_TO_PTE_OFFSET(Address); } PageDir = (PULONG)MiAddressToPde(Address); - if (0 == InterlockedCompareExchangeUL(PageDir, 0, 0)) + if (0 == InterlockedCompareExchangePte(PageDir, 0, 0)) { if (Address >= MmSystemRangeStart) { - if (0 == InterlockedCompareExchangeUL(&MmGlobalKernelPageDirectory[PdeOffset], 0, 0)) + if (0 == InterlockedCompareExchangePte(&MmGlobalKernelPageDirectory[PdeOffset], 0, 0)) { if (Create == FALSE) { @@ -383,12 +383,12 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create) { Entry |= PA_GLOBAL; } - if(0 != InterlockedCompareExchangeUL(&MmGlobalKernelPageDirectory[PdeOffset], Entry, 0)) + if(0 != InterlockedCompareExchangePte(&MmGlobalKernelPageDirectory[PdeOffset], Entry, 0)) { MmReleasePageMemoryConsumer(MC_NPPOOL, Pfn); } } - (void)InterlockedExchangeUL(PageDir, MmGlobalKernelPageDirectory[PdeOffset]); + InterlockedExchangePte(PageDir, MmGlobalKernelPageDirectory[PdeOffset]); } else { @@ -401,7 +401,7 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create) { KEBUGCHECK(0); } - Entry = InterlockedCompareExchangeUL(PageDir, PFN_TO_PTE(Pfn) | PA_PRESENT | PA_READWRITE | PA_USER, 0); + Entry = InterlockedCompareExchangePte(PageDir, PFN_TO_PTE(Pfn) | PA_PRESENT | PA_READWRITE | PA_USER, 0); if (Entry != 0) { MmReleasePageMemoryConsumer(MC_NPPOOL, Pfn); @@ -476,7 +476,7 @@ MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPF do { Pte = *Pt; - } while (Pte != InterlockedCompareExchangeUL(Pt, Pte & ~PA_PRESENT, Pte)); + } while (Pte != InterlockedCompareExchangePte(Pt, Pte & ~PA_PRESENT, Pte)); MiFlushTlb(Pt, Address); WasValid = (PAGE_MASK(Pte) != 0); @@ -510,7 +510,7 @@ MmRawDeleteVirtualMapping(PVOID Address) /* * Set the entry to zero */ - (void)InterlockedExchangeUL(Pt, 0); + InterlockedExchangePte(Pt, 0); MiFlushTlb(Pt, Address); } } @@ -549,7 +549,7 @@ MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage, /* * Atomically set the entry to zero and get the old value. */ - Pte = InterlockedExchangeUL(Pt, 0); + Pte = InterlockedExchangePte(Pt, 0); MiFlushTlb(Pt, Address); @@ -604,7 +604,7 @@ MmDeletePageFileMapping(PEPROCESS Process, PVOID Address, /* * Atomically set the entry to zero and get the old value. */ - Pte = InterlockedExchangeUL(Pt, 0); + Pte = InterlockedExchangePte(Pt, 0); MiFlushTlb(Pt, Address); @@ -659,7 +659,7 @@ MmIsAccessedAndResetAccessPage(PEPROCESS Process, PVOID Address) do { Pte = *Pt; - } while (Pte != InterlockedCompareExchangeUL(Pt, Pte & ~PA_ACCESSED, Pte)); + } while (Pte != InterlockedCompareExchangePte(Pt, Pte & ~PA_ACCESSED, Pte)); if (Pte & PA_ACCESSED) { @@ -696,7 +696,7 @@ MmSetCleanPage(PEPROCESS Process, PVOID Address) do { Pte = *Pt; - } while (Pte != InterlockedCompareExchangeUL(Pt, Pte & ~PA_DIRTY, Pte)); + } while (Pte != InterlockedCompareExchangePte(Pt, Pte & ~PA_DIRTY, Pte)); if (Pte & PA_DIRTY) { @@ -730,7 +730,7 @@ MmSetDirtyPage(PEPROCESS Process, PVOID Address) do { Pte = *Pt; - } while (Pte != InterlockedCompareExchangeUL(Pt, Pte | PA_DIRTY, Pte)); + } while (Pte != InterlockedCompareExchangePte(Pt, Pte | PA_DIRTY, Pte)); if (!(Pte & PA_DIRTY)) { MiFlushTlb(Pt, Address); @@ -757,7 +757,7 @@ MmEnableVirtualMapping(PEPROCESS Process, PVOID Address) do { Pte = *Pt; - } while (Pte != InterlockedCompareExchangeUL(Pt, Pte | PA_PRESENT, Pte)); + } while (Pte != InterlockedCompareExchangePte(Pt, Pte | PA_PRESENT, Pte)); if (!(Pte & PA_PRESENT)) { MiFlushTlb(Pt, Address); @@ -859,7 +859,7 @@ MmCreateVirtualMappingForKernel(PVOID Address, { KEBUGCHECK(0); } - (void)InterlockedExchangeUL(Pt, PFN_TO_PTE(Pages[i]) | Attributes); + InterlockedExchangePte(Pt, PFN_TO_PTE(Pages[i]) | Attributes); } return(STATUS_SUCCESS); @@ -899,7 +899,7 @@ MmCreatePageFileMapping(PEPROCESS Process, { MmMarkPageUnmapped(PTE_TO_PFN((Pte))); } - (void)InterlockedExchangeUL(Pt, SwapEntry << 1); + InterlockedExchangePte(Pt, SwapEntry << 1); if (Pte != 0) { MiFlushTlb(Pt, Address); @@ -1018,7 +1018,7 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process, { MmMarkPageUnmapped(PTE_TO_PFN((Pte))); } - (void)InterlockedExchangeUL(Pt, PFN_TO_PTE(Pages[i]) | Attributes); + InterlockedExchangePte(Pt, PFN_TO_PTE(Pages[i]) | Attributes); if (Pte != 0) { if (Address > MmSystemRangeStart || @@ -1138,7 +1138,7 @@ MmSetPageProtect(PEPROCESS Process, PVOID Address, ULONG flProtect) { KEBUGCHECK(0); } - InterlockedExchange((PLONG)Pt, PAGE_MASK(*Pt) | Attributes | (*Pt & (PA_ACCESSED|PA_DIRTY))); + InterlockedExchangePte(Pt, PAGE_MASK(*Pt) | Attributes | (*Pt & (PA_ACCESSED|PA_DIRTY))); MiFlushTlb(Pt, Address); } @@ -1243,7 +1243,7 @@ MmChangeHyperspaceMapping(PVOID Address, PFN_TYPE NewPage) ASSERT (IS_HYPERSPACE(Address)); - Entry = InterlockedExchange((PLONG)MiAddressToPte(Address), PFN_TO_PTE(NewPage) | PA_PRESENT | PA_READWRITE); + Entry = InterlockedExchangePte(MiAddressToPte(Address), PFN_TO_PTE(NewPage) | PA_PRESENT | PA_READWRITE); Pfn = PTE_TO_PFN(Entry); __invlpg(Address); @@ -1259,7 +1259,7 @@ MmDeleteHyperspaceMapping(PVOID Address) ASSERT (IS_HYPERSPACE(Address)); - Entry = InterlockedExchange((PLONG)MiAddressToPte(Address), 0); + Entry = InterlockedExchangePte(MiAddressToPte(Address), 0); Pfn = PTE_TO_PFN(Entry); __invlpg(Address); @@ -1293,7 +1293,7 @@ MmUpdatePageDir(PEPROCESS Process, PVOID Address, ULONG Size) { if (Offset != ADDR_TO_PDE_OFFSET(PAGETABLE_MAP)) { - (void)InterlockedCompareExchangeUL(&Pde[Offset], MmGlobalKernelPageDirectory[Offset], 0); + InterlockedCompareExchangePte(&Pde[Offset], MmGlobalKernelPageDirectory[Offset], 0); } } if (Pde != (PULONG)PAGEDIRECTORY_MAP) From fae32f4a71e23a5f04393be69c792cdbed641620 Mon Sep 17 00:00:00 2001 From: Daniel Reimer Date: Sat, 16 Aug 2008 08:08:55 +0000 Subject: [PATCH 018/324] Update ReactOS Calc to Version 1.10. svn path=/trunk/; revision=35367 --- reactos/base/applications/calc/calc.h | 7 +- reactos/base/applications/calc/calc.rbuild | 4 +- reactos/base/applications/calc/convert.c | 1 - reactos/base/applications/calc/rpn.c | 6 +- reactos/base/applications/calc/rpn_mpfr.c | 4 +- reactos/base/applications/calc/whatsnew.txt | 11 +++ reactos/base/applications/calc/winmain.c | 83 ++++++--------------- 7 files changed, 49 insertions(+), 67 deletions(-) diff --git a/reactos/base/applications/calc/calc.h b/reactos/base/applications/calc/calc.h index 36e8febcfdb..177e38e7362 100644 --- a/reactos/base/applications/calc/calc.h +++ b/reactos/base/applications/calc/calc.h @@ -42,7 +42,9 @@ #define IDC_STATIC ((DWORD)-1) #endif -#define CALC_VERSION TEXT("1.09") +#define CALC_VERSION TEXT("1.10") + +#define MAX_CALC_SIZE 256 /*#define USE_KEYBOARD_HOOK*/ @@ -144,7 +146,8 @@ typedef struct { #endif HWND hWnd; DWORD layout; - TCHAR buffer[256]; + TCHAR buffer[MAX_CALC_SIZE]; + TCHAR source[MAX_CALC_SIZE]; TCHAR *ptr; calc_number_t code; calc_number_t prev; diff --git a/reactos/base/applications/calc/calc.rbuild b/reactos/base/applications/calc/calc.rbuild index 0c9be44f64b..72739c62183 100644 --- a/reactos/base/applications/calc/calc.rbuild +++ b/reactos/base/applications/calc/calc.rbuild @@ -2,13 +2,13 @@ . - 1 + 1 0x0501 user32 gdi32 kernel32 about.c - convert.c + convert.c function.c rpn.c utl.c diff --git a/reactos/base/applications/calc/convert.c b/reactos/base/applications/calc/convert.c index 06107c81d4d..d281d444603 100644 --- a/reactos/base/applications/calc/convert.c +++ b/reactos/base/applications/calc/convert.c @@ -561,4 +561,3 @@ void ConvInit(HWND hWnd) ConvAdjust(hWnd, 0); } - diff --git a/reactos/base/applications/calc/rpn.c b/reactos/base/applications/calc/rpn.c index 241464673bf..1435e8065ab 100644 --- a/reactos/base/applications/calc/rpn.c +++ b/reactos/base/applications/calc/rpn.c @@ -310,6 +310,8 @@ void run_operator(calc_node_t *result, operator_list[operation].op_p(&dc, &da, &db); } else operator_list[operation].op_f(&dc, &da, &db); + if (_finite(dc.f) == 0) + calc.is_nan = TRUE; } else { operator_list[operation].op_i(&dc, &da, &db); /* apply final limitator to result */ @@ -331,7 +333,6 @@ static void evalStack(calc_number_t *number) stack_node_t *op, ip; unsigned int prec; - percent_mode = FALSE; op = pop(); ip = *op; prec = operator_list[ip.node.operation].prec; @@ -373,6 +374,9 @@ int exec_infix2postfix(calc_number_t *number, unsigned int func) return 0; } + if (func == RPN_OPERATOR_PERCENT) + percent_mode = TRUE; + tmp.node.number = *number; tmp.node.base = calc.base; tmp.node.operation = func; diff --git a/reactos/base/applications/calc/rpn_mpfr.c b/reactos/base/applications/calc/rpn_mpfr.c index a6e8d70df20..d5dc95c805b 100644 --- a/reactos/base/applications/calc/rpn_mpfr.c +++ b/reactos/base/applications/calc/rpn_mpfr.c @@ -311,7 +311,6 @@ static void evalStack(calc_number_t *number) unsigned int prec; mpfr_init(ip.node.number.mf); - percent_mode = FALSE; op = pop(); node_copy(&ip, op); prec = operator_list[ip.node.operation].prec; @@ -355,6 +354,9 @@ int exec_infix2postfix(calc_number_t *number, unsigned int func) return 0; } + if (func == RPN_OPERATOR_PERCENT) + percent_mode = TRUE; + mpfr_init(tmp.node.number.mf); rpn_copy(&tmp.node.number, number); tmp.node.operation = func; diff --git a/reactos/base/applications/calc/whatsnew.txt b/reactos/base/applications/calc/whatsnew.txt index b4b7f596d61..930ffb94eac 100644 --- a/reactos/base/applications/calc/whatsnew.txt +++ b/reactos/base/applications/calc/whatsnew.txt @@ -1,3 +1,14 @@ +1.10 (20080813) +======================= +* Added Norvegian and Korean translations. +* Fixed Polish and Slovak translations. +* Fixed percent mode. +* Fixed some unsignaled overflow errors. +* Fixed conversion method, now scientific notation is recognized too. +* Added compilation for UNICODE executables. +* Plain MINGW toolchain do not support wWinMain function, so I switched to old WinMain if it is not under ReactOS' build tree. +* Detect error if UNICODE version is launched into Win9x (avoid the lock). + 1.09 (20080630) ======================= * Fixed bug with Conversion function: "Category" type must be found like "from" and "to" because the combobox sorts its items alphabetically. diff --git a/reactos/base/applications/calc/winmain.c b/reactos/base/applications/calc/winmain.c index 86ffe56ad61..14b00ac0333 100644 --- a/reactos/base/applications/calc/winmain.c +++ b/reactos/base/applications/calc/winmain.c @@ -784,68 +784,18 @@ static void delete_stat_item(int n) static char *ReadConversion(const char *formula) { - unsigned int len = 256, n; - char *str; - char *code = NULL; - const char *p = formula; - char c; - calc_number_t x; - TCHAR buffer[SIZEOF(calc.buffer)]; -#ifdef UNICODE - char cbuffer[SIZEOF(calc.buffer)]; -#endif + int len = strlen(formula); + char *str = (char *)malloc(len+3); - str = (char *)malloc(len); if (str == NULL) return NULL; - /* prepare code string */ - rpn_alloc(&x); - convert_text2number(&x); - prepare_rpn_result(&x, - buffer, SIZEOF(buffer), - calc.base); - rpn_free(&x); - -#ifdef UNICODE - WideCharToMultiByte(CP_ACP, 0, buffer, -1, cbuffer, SIZEOF(cbuffer), NULL, NULL); -#endif - str[0] = '('; - n = 1; - while (1) { - if (code != NULL) { - c = *code++; - if (*code == '\0') - code = NULL; - } else - c = *p++; + memcpy(str+1, formula, len); + str[len+1] = ')'; + str[len+2] = '\0'; - if (c == '\0') { - str[n++] = ')'; - if (n >= len-1) { - str = (char *)realloc(str, len += 16); - if (str == NULL) - return NULL; - } - break; - } else - if (c == '$') { -#ifdef UNICODE - code = cbuffer; -#else - code = buffer; -#endif - continue; - } - str[n++] = c; - if (n >= len-1) { - str = (char *)realloc(str, len += 16); - if (str == NULL) - return NULL; - } - } - str[n] = '\0'; + _tcscpy(calc.source, (*calc.buffer == _T('\0')) ? _T("0") : calc.buffer); /* clear display content before proceeding */ calc.ptr = calc.buffer; @@ -991,6 +941,11 @@ static char *handle_sequence_input(HWND hwnd, sequence_t *seq) case 'Q': PostMessage(hwnd, WM_COMMAND, (WPARAM)IDC_BUTTON_CANC, 0); break; case 'R': PostMessage(hwnd, WM_COMMAND, (WPARAM)IDC_BUTTON_MR, 0); break; } + } else + if (ch == '$') { + calc.ptr = + _tcscpy(calc.buffer, calc.source) + + _tcslen(calc.source); } else { for (x=0; x Date: Sat, 16 Aug 2008 08:15:49 +0000 Subject: [PATCH 019/324] - Move x86-specific code, which was accidentally committed to the generic part of crt library to arch specific area. - Include x86-specific _CI* functions into libcntpr. svn path=/trunk/; revision=35368 --- reactos/lib/sdk/crt/crt.rbuild | 1 + reactos/lib/sdk/crt/libcntpr.rbuild | 1 + reactos/lib/sdk/crt/math/i386/ci.c | 137 ++++++++++++++++++++++++++++ reactos/lib/sdk/crt/math/stubs.c | 72 +++++++-------- 4 files changed, 173 insertions(+), 38 deletions(-) create mode 100644 reactos/lib/sdk/crt/math/i386/ci.c diff --git a/reactos/lib/sdk/crt/crt.rbuild b/reactos/lib/sdk/crt/crt.rbuild index bb78b1739bd..56c2e9491ef 100644 --- a/reactos/lib/sdk/crt/crt.rbuild +++ b/reactos/lib/sdk/crt/crt.rbuild @@ -104,6 +104,7 @@ atan2.c + ci.c exp.c fmod.c ldexp.c diff --git a/reactos/lib/sdk/crt/libcntpr.rbuild b/reactos/lib/sdk/crt/libcntpr.rbuild index 97d7d61175f..4884817f55a 100644 --- a/reactos/lib/sdk/crt/libcntpr.rbuild +++ b/reactos/lib/sdk/crt/libcntpr.rbuild @@ -41,6 +41,7 @@ aulldvrm_asm.s aullrem_asm.s aullshr_asm.s + ci.c ceil_asm.s cos_asm.s fabs_asm.s diff --git a/reactos/lib/sdk/crt/math/i386/ci.c b/reactos/lib/sdk/crt/math/i386/ci.c new file mode 100644 index 00000000000..b0a58eb2d5c --- /dev/null +++ b/reactos/lib/sdk/crt/math/i386/ci.c @@ -0,0 +1,137 @@ +#include +#include + +#define FPU_DOUBLE(var) double var; \ + __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var) : ) +#define FPU_DOUBLES(var1,var2) double var1,var2; \ + __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var2) : ); \ + __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var1) : ) + +/* + * @implemented + */ +double CDECL _CIsin(void) +{ + FPU_DOUBLE(x); + return sin(x); +} +/* + * @implemented + */ +double CDECL _CIcos(void) +{ + FPU_DOUBLE(x); + return cos(x); +} +/* + * @implemented + */ +double CDECL _CItan(void) +{ + FPU_DOUBLE(x); + return tan(x); +} +/* + * @implemented + */ +double CDECL _CIsinh(void) +{ + FPU_DOUBLE(x); + return sinh(x); +} +/* + * @implemented + */ +double CDECL _CIcosh(void) +{ + FPU_DOUBLE(x); + return cosh(x); +} +/* + * @implemented + */ +double CDECL _CItanh(void) +{ + FPU_DOUBLE(x); + return tanh(x); +} +/* + * @implemented + */ +double CDECL _CIasin(void) +{ + FPU_DOUBLE(x); + return asin(x); +} +/* + * @implemented + */ +double CDECL _CIacos(void) +{ + FPU_DOUBLE(x); + return acos(x); +} +/* + * @implemented + */ +double CDECL _CIatan(void) +{ + FPU_DOUBLE(x); + return atan(x); +} +/* + * @implemented + */ +double CDECL _CIatan2(void) +{ + FPU_DOUBLES(x, y); + return atan2(x, y); +} +/* + * @implemented + */ +double CDECL _CIexp(void) +{ + FPU_DOUBLE(x); + return exp(x); +} +/* + * @implemented + */ +double CDECL _CIlog(void) +{ + FPU_DOUBLE(x); + return log(x); +} +/* + * @implemented + */ +double CDECL _CIlog10(void) +{ + FPU_DOUBLE(x); + return log10(x); +} +/* + * @implemented + */ +double CDECL _CIpow(void) +{ + FPU_DOUBLES(x, y); + return pow(x, y); +} +/* + * @implemented + */ +double CDECL _CIsqrt(void) +{ + FPU_DOUBLE(x); + return sqrt(x); +} +/* + * @implemented + */ +double CDECL _CIfmod(void) +{ + FPU_DOUBLES(x, y); + return fmod(x, y); +} diff --git a/reactos/lib/sdk/crt/math/stubs.c b/reactos/lib/sdk/crt/math/stubs.c index 58fac7113c0..271807fb9f5 100644 --- a/reactos/lib/sdk/crt/math/stubs.c +++ b/reactos/lib/sdk/crt/math/stubs.c @@ -1,138 +1,134 @@ #include #include -#define FPU_DOUBLE(var) double var; \ - __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var) : ) -#define FPU_DOUBLES(var1,var2) double var1,var2; \ - __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var2) : ); \ - __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var1) : ) +double CDECL _CIsin(double x); +double CDECL _CIcos(double x); +double CDECL _CItan(double x); +double CDECL _CIsinh(double x); +double CDECL _CIcosh(double x); +double CDECL _CItanh(double x); +double CDECL _CIasin(double x); +double CDECL _CIacos(double x); +double CDECL _CIatan(double x); +double CDECL _CIatan2(double y, double x); +double CDECL _CIexp(double x); +double CDECL _CIlog(double x); +double CDECL _CIlog10(double x); +double CDECL _CIpow(double x, double y); +double CDECL _CIsqrt(double x); +double CDECL _CIfmod(double x, double y); + /* * @implemented */ -double CDECL _CIsin(void) +double CDECL _CIsin(double x) { - FPU_DOUBLE(x); return sin(x); } /* * @implemented */ -double CDECL _CIcos(void) +double CDECL _CIcos(double x) { - FPU_DOUBLE(x); return cos(x); } /* * @implemented */ -double CDECL _CItan(void) +double CDECL _CItan(double x) { - FPU_DOUBLE(x); return tan(x); } /* * @implemented */ -double CDECL _CIsinh(void) +double CDECL _CIsinh(double x) { - FPU_DOUBLE(x); return sinh(x); } /* * @implemented */ -double CDECL _CIcosh(void) +double CDECL _CIcosh(double x) { - FPU_DOUBLE(x); return cosh(x); } /* * @implemented */ -double CDECL _CItanh(void) +double CDECL _CItanh(double x) { - FPU_DOUBLE(x); return tanh(x); } /* * @implemented */ -double CDECL _CIasin(void) +double CDECL _CIasin(double x) { - FPU_DOUBLE(x); return asin(x); } /* * @implemented */ -double CDECL _CIacos(void) +double CDECL _CIacos(double x) { - FPU_DOUBLE(x); return acos(x); } /* * @implemented */ -double CDECL _CIatan(void) +double CDECL _CIatan(double x) { - FPU_DOUBLE(x); return atan(x); } /* * @implemented */ -double CDECL _CIatan2(void) +double CDECL _CIatan2(double x, double y) { - FPU_DOUBLES(x, y); - return atan2(x, y); + return atan2(y, x); } /* * @implemented */ -double CDECL _CIexp(void) +double CDECL _CIexp(double x) { - FPU_DOUBLE(x); return exp(x); } /* * @implemented */ -double CDECL _CIlog(void) +double CDECL _CIlog(double x) { - FPU_DOUBLE(x); return log(x); } /* * @implemented */ -double CDECL _CIlog10(void) +double CDECL _CIlog10(double x) { - FPU_DOUBLE(x); return log10(x); } /* * @implemented */ -double CDECL _CIpow(void) +double CDECL _CIpow(double x, double y) { - FPU_DOUBLES(x, y); return pow(x, y); } /* * @implemented */ -double CDECL _CIsqrt(void) +double CDECL _CIsqrt(double x) { - FPU_DOUBLE(x); return sqrt(x); } /* * @implemented */ -double CDECL _CIfmod(void) +double CDECL _CIfmod(double x, double y) { - FPU_DOUBLES(x, y); return fmod(x, y); } From 67cefa90adffbe91a133c51ad43cd39972d72a20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sat, 16 Aug 2008 09:25:46 +0000 Subject: [PATCH 020/324] Replace .def file by a .spec file svn path=/trunk/; revision=35369 --- reactos/base/applications/kbswitch/kbsdll/kbsdll.c | 8 ++++---- reactos/base/applications/kbswitch/kbsdll/kbsdll.def | 7 ------- reactos/base/applications/kbswitch/kbsdll/kbsdll.rbuild | 4 ++-- reactos/base/applications/kbswitch/kbsdll/kbsdll.spec | 2 ++ 4 files changed, 8 insertions(+), 13 deletions(-) delete mode 100644 reactos/base/applications/kbswitch/kbsdll/kbsdll.def create mode 100644 reactos/base/applications/kbswitch/kbsdll/kbsdll.spec diff --git a/reactos/base/applications/kbswitch/kbsdll/kbsdll.c b/reactos/base/applications/kbswitch/kbsdll/kbsdll.c index 7933fcd0a45..e533ecb96f4 100644 --- a/reactos/base/applications/kbswitch/kbsdll/kbsdll.c +++ b/reactos/base/applications/kbswitch/kbsdll/kbsdll.c @@ -88,8 +88,8 @@ WinHookProc(int code, WPARAM wParam, LPARAM lParam) return CallNextHookEx(hWinHook, code, wParam, lParam); } -BOOL -KbSwitchSetHooks() +BOOL WINAPI +KbSwitchSetHooks(VOID) { hKeyboardHook = SetWindowsHookEx(WH_KEYBOARD, KeyboardHookProc, hInstance, 0); hLangHook = SetWindowsHookEx(WH_GETMESSAGE, LangHookProc, hInstance, 0); @@ -101,8 +101,8 @@ KbSwitchSetHooks() return FALSE; } -VOID -KbSwitchDeleteHooks() +VOID WINAPI +KbSwitchDeleteHooks(VOID) { if (hKeyboardHook) UnhookWindowsHookEx(hKeyboardHook); if (hLangHook) UnhookWindowsHookEx(hLangHook); diff --git a/reactos/base/applications/kbswitch/kbsdll/kbsdll.def b/reactos/base/applications/kbswitch/kbsdll/kbsdll.def deleted file mode 100644 index 99e8f342753..00000000000 --- a/reactos/base/applications/kbswitch/kbsdll/kbsdll.def +++ /dev/null @@ -1,7 +0,0 @@ -LIBRARY kbsdll.dll - -EXPORTS -KbSwitchSetHooks -KbSwitchDeleteHooks - -; EOF diff --git a/reactos/base/applications/kbswitch/kbsdll/kbsdll.rbuild b/reactos/base/applications/kbswitch/kbsdll/kbsdll.rbuild index 4e0bd705ae8..c84b3edc5aa 100644 --- a/reactos/base/applications/kbswitch/kbsdll/kbsdll.rbuild +++ b/reactos/base/applications/kbswitch/kbsdll/kbsdll.rbuild @@ -1,15 +1,15 @@ - + . 0x0500 0x0600 0x0600 - ntdll kernel32 user32 comctl32 kbsdll.c kbsdll.rc + kbsdll.spec diff --git a/reactos/base/applications/kbswitch/kbsdll/kbsdll.spec b/reactos/base/applications/kbswitch/kbsdll/kbsdll.spec new file mode 100644 index 00000000000..46a5a52f32a --- /dev/null +++ b/reactos/base/applications/kbswitch/kbsdll/kbsdll.spec @@ -0,0 +1,2 @@ +@ stdcall KbSwitchSetHooks() +@ stdcall KbSwitchDeleteHooks() From 5f8b05dfa82cc569a5186c32508fc4eec9f39d96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sat, 16 Aug 2008 09:29:12 +0000 Subject: [PATCH 021/324] Remove unused file svn path=/trunk/; revision=35370 --- reactos/drivers/filesystems/fastfat/vfatfs.def | 1 - 1 file changed, 1 deletion(-) delete mode 100644 reactos/drivers/filesystems/fastfat/vfatfs.def diff --git a/reactos/drivers/filesystems/fastfat/vfatfs.def b/reactos/drivers/filesystems/fastfat/vfatfs.def deleted file mode 100644 index 02fcc1c471b..00000000000 --- a/reactos/drivers/filesystems/fastfat/vfatfs.def +++ /dev/null @@ -1 +0,0 @@ -LIBRARY VFATFS.SYS From 9fb87bbf797a6177d1d107f43e2cd95aaf62af19 Mon Sep 17 00:00:00 2001 From: Colin Finck Date: Sat, 16 Aug 2008 10:44:53 +0000 Subject: [PATCH 022/324] Mario Kacmar (kario@szm.sk) - Print no approximate round trip times on 100% loss like Windows does See issue #2542 for more details. svn path=/trunk/; revision=35371 --- reactos/base/applications/network/ping/ping.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/reactos/base/applications/network/ping/ping.c b/reactos/base/applications/network/ping/ping.c index c86f7a5103a..4cb3636d6f1 100644 --- a/reactos/base/applications/network/ping/ping.c +++ b/reactos/base/applications/network/ping/ping.c @@ -644,9 +644,13 @@ int main(int argc, char* argv[]) printf("\nPing statistics for %s:\n", TargetIP); printf(" Packets: Sent = %d, Received = %d, Lost = %d (%d%% loss),\n", SentCount, SentCount - LostCount, LostCount, Count); - printf("Approximate round trip times in milli-seconds:\n"); - printf(" Minimum = %s, Maximum = %s, Average = %s\n", - MinTime, MaxTime, AvgTime); + /* Print approximate times or NO approximate times if 100% loss */ + if ((SentCount - LostCount) > 0) + { + printf("Approximate round trip times in milli-seconds:\n"); + printf(" Minimum = %s, Maximum = %s, Average = %s\n", + MinTime, MaxTime, AvgTime); + } } return 0; } From e3847788b9f23ba4a3fb0b483db54cf74502da49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sat, 16 Aug 2008 10:45:25 +0000 Subject: [PATCH 023/324] Replace .def file by a .spec file svn path=/trunk/; revision=35372 --- reactos/drivers/ksfilter/ks/events.c | 2 +- reactos/drivers/ksfilter/ks/kcom.c | 102 +++++++++++------------ reactos/drivers/ksfilter/ks/ks.def | 115 -------------------------- reactos/drivers/ksfilter/ks/ks.rbuild | 3 +- reactos/drivers/ksfilter/ks/ks.spec | 110 ++++++++++++++++++++++++ reactos/drivers/ksfilter/ks/misc.c | 6 +- 6 files changed, 167 insertions(+), 171 deletions(-) delete mode 100644 reactos/drivers/ksfilter/ks/ks.def create mode 100644 reactos/drivers/ksfilter/ks/ks.spec diff --git a/reactos/drivers/ksfilter/ks/events.c b/reactos/drivers/ksfilter/ks/events.c index c5a94731e4d..ab0334f3b40 100644 --- a/reactos/drivers/ksfilter/ks/events.c +++ b/reactos/drivers/ksfilter/ks/events.c @@ -95,7 +95,7 @@ KSDDKAPI VOID NTAPI KsFreeEventList( IN PFILE_OBJECT FileObject, IN OUT PLIST_ENTRY EventsList, - IN KSEVENTS_LOCKTYPE EVentsFlags, + IN KSEVENTS_LOCKTYPE EventsFlags, IN PVOID EventsLock) { UNIMPLEMENTED; diff --git a/reactos/drivers/ksfilter/ks/kcom.c b/reactos/drivers/ksfilter/ks/kcom.c index c041e60c1c8..d1d1d1d545e 100644 --- a/reactos/drivers/ksfilter/ks/kcom.c +++ b/reactos/drivers/ksfilter/ks/kcom.c @@ -1,51 +1,51 @@ -/* =============================================================== - Kernel-mode COM -*/ - -#include -#include -#include -#include -#include - - -/* http://msdn2.microsoft.com/en-us/library/ms809781.aspx */ -COMDDKAPI NTSTATUS NTAPI -KoCreateInstance( - IN REFCLSID ClassId, - IN IUnknown* UnkOuter OPTIONAL, - IN ULONG ClsContext, - IN REFIID InterfaceId, - OUT PVOID* Interface) -{ - /* If UnkOuter isn't NULL, it must be IUnknown - TODO: CHECK THIS PARAM */ - /* TODO: Check IRQL? */ - - DPRINT("KoCreateInstance called\n"); - - if ( ClsContext != CLSCTX_KERNEL_SERVER ) - { - DPRINT("FAILED: ClsContext must be CLSCTX_KERNEL_SERVER\n"); - return STATUS_INVALID_PARAMETER_3; - } - - /* - Find the desired interface and create an instance. - - But we also need to supply a - pointer which will be set to a list of available interfaces, to - IoGetDeviceInterfaces. - - We can then create a file based on this information and thus talk - to the appropriate device. - - Useful references: - http://www.freelists.org/archives/wdmaudiodev/01-2003/msg00023.html - - TODO - */ - - DPRINT("** FAKING SUCCESS **\n"); - - return STATUS_SUCCESS; -} +/* =============================================================== + Kernel-mode COM +*/ + +#include +#include +#include +#include +#include + + +/* http://msdn2.microsoft.com/en-us/library/ms809781.aspx */ +COMDDKAPI NTSTATUS NTAPI +KoCreateInstance( + IN REFCLSID ClassId, + IN IUnknown* UnkOuter OPTIONAL, + IN ULONG ClsContext, + IN REFIID InterfaceId, + OUT PVOID* Interface) +{ + /* If UnkOuter isn't NULL, it must be IUnknown - TODO: CHECK THIS PARAM */ + /* TODO: Check IRQL? */ + + DPRINT("KoCreateInstance called\n"); + + if ( ClsContext != CLSCTX_KERNEL_SERVER ) + { + DPRINT("FAILED: ClsContext must be CLSCTX_KERNEL_SERVER\n"); + return STATUS_INVALID_PARAMETER_3; + } + + /* + Find the desired interface and create an instance. + + But we also need to supply a + pointer which will be set to a list of available interfaces, to + IoGetDeviceInterfaces. + + We can then create a file based on this information and thus talk + to the appropriate device. + + Useful references: + http://www.freelists.org/archives/wdmaudiodev/01-2003/msg00023.html + + TODO + */ + + DPRINT("** FAKING SUCCESS **\n"); + + return STATUS_SUCCESS; +} diff --git a/reactos/drivers/ksfilter/ks/ks.def b/reactos/drivers/ksfilter/ks/ks.def deleted file mode 100644 index 5b76c945b38..00000000000 --- a/reactos/drivers/ksfilter/ks/ks.def +++ /dev/null @@ -1,115 +0,0 @@ -; -; Exports definition file for ks.sys -; - -EXPORTS -KsCreateAllocator@12 -KsCreateDefaultAllocator@4 -KsValidateAllocatorCreateRequest@8 -KsCreateDefaultAllocatorEx@24 -KsValidateAllocatorFramingEx@12 - -KsCreateClock@12 -KsCreateDefaultClock@8 -KsAllocateDefaultClock@4 -KsAllocateDefaultClockEx@28 -KsFreeDefaultClock@4 -KsValidateClockCreateRequest@8 -KsGetDefaultClockState@4 -KsSetDefaultClockState@8 -KsGetDefaultClockTime@4 -KsSetDefaultClockTime@12 - -KsMethodHandler@12 -KsMethodHandlerWithAllocator@20 -KsFastMethodHandler@32 - -KsPropertyHandler@12 -KsPropertyHandlerWithAllocator@20 -KsUnserializeObjectPropertiesFromRegistry@12 -KsFastPropertyHandler@32 - -KsGenerateEvent@4 -KsEnableEventWithAllocator@32 -KsGenerateDataEvent@12 -KsEnableEvent@24 -KsDiscardEvent@4 -KsDisableEvent@16 -KsFreeEventList@16 - -KsValidateTopologyNodeCreateRequest@12 -KsCreateTopologyNode@16 -KsTopologyPropertyHandler@16 - -KsCreatePin@16 -KsValidateConnectRequest@16 -KsPinPropertyHandler@20 -KsPinDataIntersection@24 - -KsHandleSizedListQuery@16 - -KsAcquireResetValue@8 -KsAddIrpToCancelableQueue@20 -KsAddObjectCreateItemToDeviceHeader@20 -KsAddObjectCreateItemToObjectHeader@20 -KsAllocateDeviceHeader@12 -KsAllocateExtraData@12 -KsAllocateObjectCreateItem@16 -KsAllocateObjectHeader@20 -KsCancelIo@8 -KsCancelRoutine@8 -KsDefaultDeviceIoCompletion@8 -KsDispatchFastIoDeviceControlFailure@36 -KsDispatchFastReadFailure@32 -; KsDispatchFastWriteFailure@32 -KsDispatchInvalidDeviceRequest@8 -KsDispatchIrp@8 -KsDispatchSpecificMethod@8 -KsDispatchSpecificProperty@8 -KsForwardAndCatchIrp@16 -KsForwardIrp@12 -KsFreeDeviceHeader@4 -KsFreeObjectHeader@4 -KsGetChildCreateParameter@8 -KsMoveIrpsOnCancelableQueue@28 -KsProbeStreamIrp@12 -KsQueryInformationFile@16 -KsQueryObjectAccessMask@4 -KsQueryObjectCreateItem@4 -KsReadFile@32 -KsReleaseIrpOnCancelableQueue@8 -KsRemoveIrpFromCancelableQueue@16 -KsRemoveSpecificIrpFromCancelableQueue@4 -KsSetInformationFile@16 -KsSetMajorFunctionHandler@8 -KsStreamIo@44 -KsWriteFile@32 - -KsRegisterWorker@8 -KsUnregisterWorker@4 -KsRegisterCountedWorker@12 -KsDecrementCountedWorker@4 -KsIncrementCountedWorker@4 -KsQueueWorkItem@8 - -KsCacheMedium@12 -KsDefaultDispatchPnp@8 -KsSetDevicePnpAndBaseObject@12 -KsDefaultDispatchPower@8 -KsSetPowerDispatch@12 -KsReferenceBusObject@4 -KsDereferenceBusObject@4 -KsFreeObjectCreateItem@8 -KsFreeObjectCreateItemsByContext@8 -KsLoadResource@24 -; KsNullDriverUnload@4 -KsPinDataIntersectionEx@32 -KsQueryDevicePnpObject@4 -KsRecalculateStackDepth@8 -KsSetTargetDeviceObject@8 -KsSetTargetState@8 -KsSynchronousIoControlDevice@32 -KsInitializeDriver@12 - -; Kernel COM -KoCreateInstance@20 diff --git a/reactos/drivers/ksfilter/ks/ks.rbuild b/reactos/drivers/ksfilter/ks/ks.rbuild index f91d0c497cd..4e9301005b3 100644 --- a/reactos/drivers/ksfilter/ks/ks.rbuild +++ b/reactos/drivers/ksfilter/ks/ks.rbuild @@ -4,7 +4,7 @@ . .. ../include - + ntoskrnl @@ -21,4 +21,5 @@ topology.c worker.c kcom.c + ks.spec diff --git a/reactos/drivers/ksfilter/ks/ks.spec b/reactos/drivers/ksfilter/ks/ks.spec new file mode 100644 index 00000000000..75ab3fd72cf --- /dev/null +++ b/reactos/drivers/ksfilter/ks/ks.spec @@ -0,0 +1,110 @@ +@ stdcall KsCreateAllocator(ptr ptr ptr) +@ stdcall KsCreateDefaultAllocator(ptr) +@ stdcall KsValidateAllocatorCreateRequest(ptr ptr) +@ stdcall KsCreateDefaultAllocatorEx(ptr ptr ptr ptr ptr ptr) +@ stdcall KsValidateAllocatorFramingEx(ptr long ptr) + +@ stdcall KsCreateClock(ptr ptr ptr) +@ stdcall KsCreateDefaultClock(ptr ptr) +@ stdcall KsAllocateDefaultClock(ptr) +@ stdcall KsAllocateDefaultClockEx(ptr ptr ptr ptr ptr ptr long) +@ stdcall KsFreeDefaultClock(ptr) +@ stdcall KsValidateClockCreateRequest(ptr ptr) +@ stdcall KsGetDefaultClockState(ptr) +@ stdcall KsSetDefaultClockState(ptr long) +@ stdcall KsGetDefaultClockTime(ptr) +@ stdcall KsSetDefaultClockTime(ptr long long) + +@ stdcall KsMethodHandler(ptr long ptr) +@ stdcall KsMethodHandlerWithAllocator(ptr long ptr ptr long) +@ stdcall KsFastMethodHandler(ptr ptr long ptr long ptr long ptr) + +@ stdcall KsPropertyHandler(ptr long ptr) +@ stdcall KsPropertyHandlerWithAllocator(ptr long ptr ptr long) +@ stdcall KsUnserializeObjectPropertiesFromRegistry(ptr ptr ptr) +@ stdcall KsFastPropertyHandler(ptr ptr long ptr long ptr long ptr) + +@ stdcall KsGenerateEvent(ptr) +@ stdcall KsEnableEventWithAllocator(ptr long ptr ptr long ptr ptr long) +@ stdcall KsGenerateDataEvent(ptr long ptr) +@ stdcall KsEnableEvent(ptr long ptr ptr long ptr) +@ stdcall KsDiscardEvent(ptr) +@ stdcall KsDisableEvent(ptr ptr long ptr) +@ stdcall KsFreeEventList(ptr ptr long ptr) + +@ stdcall KsValidateTopologyNodeCreateRequest(ptr ptr ptr) +@ stdcall KsCreateTopologyNode(ptr ptr long ptr) +@ stdcall KsTopologyPropertyHandler(ptr ptr ptr ptr) + +@ stdcall KsCreatePin(ptr ptr long ptr) +@ stdcall KsValidateConnectRequest(ptr long ptr ptr) +@ stdcall KsPinPropertyHandler(ptr ptr ptr long ptr) +@ stdcall KsPinDataIntersection(ptr ptr ptr long ptr ptr) + +@ stdcall KsHandleSizedListQuery(ptr long long ptr) + +@ stdcall KsAcquireResetValue(ptr ptr) +@ stdcall KsAddIrpToCancelableQueue(ptr ptr ptr long ptr) +@ stdcall KsAddObjectCreateItemToDeviceHeader(ptr ptr ptr wstr ptr) +@ stdcall KsAddObjectCreateItemToObjectHeader(ptr ptr ptr wstr ptr) +@ stdcall KsAllocateDeviceHeader(ptr long ptr) +@ stdcall KsAllocateExtraData(ptr long ptr) +@ stdcall KsAllocateObjectCreateItem(long ptr long ptr) +@ stdcall KsAllocateObjectHeader(ptr long ptr ptr ptr) +@ stdcall KsCancelIo(ptr ptr) +@ stdcall KsCancelRoutine(ptr ptr) +@ stdcall KsDefaultDeviceIoCompletion(ptr ptr) +@ stdcall KsDispatchFastIoDeviceControlFailure(ptr long ptr long ptr long long ptr ptr) +@ stdcall KsDispatchFastReadFailure(ptr ptr long long long ptr ptr ptr) +; KsDispatchFastWriteFailure@32 +@ stdcall KsDispatchInvalidDeviceRequest(ptr ptr) +@ stdcall KsDispatchIrp(ptr ptr) +@ stdcall KsDispatchSpecificMethod(ptr ptr) +@ stdcall KsDispatchSpecificProperty(ptr ptr) +@ stdcall KsForwardAndCatchIrp(ptr ptr ptr long) +@ stdcall KsForwardIrp(ptr ptr long) +@ stdcall KsFreeDeviceHeader(ptr) +@ stdcall KsFreeObjectHeader(ptr) +@ stdcall KsGetChildCreateParameter(ptr ptr) +@ stdcall KsMoveIrpsOnCancelableQueue(ptr ptr ptr ptr long ptr ptr) +@ stdcall KsProbeStreamIrp(ptr long long) +@ stdcall KsQueryInformationFile(ptr ptr long long) +@ stdcall KsQueryObjectAccessMask(ptr) +@ stdcall KsQueryObjectCreateItem(ptr) +@ stdcall KsReadFile(ptr ptr ptr ptr ptr long long long) +@ stdcall KsReleaseIrpOnCancelableQueue(ptr ptr) +@ stdcall KsRemoveIrpFromCancelableQueue(ptr ptr long long) +@ stdcall KsRemoveSpecificIrpFromCancelableQueue(ptr) +@ stdcall KsSetInformationFile(ptr ptr long long) +@ stdcall KsSetMajorFunctionHandler(ptr long) +@ stdcall KsStreamIo(ptr ptr ptr ptr ptr long ptr ptr long long long) +@ stdcall KsWriteFile(ptr ptr ptr ptr ptr long long long) + +@ stdcall KsRegisterWorker(long ptr) +@ stdcall KsUnregisterWorker(ptr) +@ stdcall KsRegisterCountedWorker(long ptr ptr) +@ stdcall KsDecrementCountedWorker(ptr) +@ stdcall KsIncrementCountedWorker(ptr) +@ stdcall KsQueueWorkItem(ptr ptr) + +@ stdcall KsCacheMedium(ptr ptr long) +@ stdcall KsDefaultDispatchPnp(ptr ptr) +@ stdcall KsSetDevicePnpAndBaseObject(ptr ptr ptr) +@ stdcall KsDefaultDispatchPower(ptr ptr) +@ stdcall KsSetPowerDispatch(ptr ptr ptr) +@ stdcall KsReferenceBusObject(ptr) +@ stdcall KsDereferenceBusObject(ptr) +@ stdcall KsFreeObjectCreateItem(ptr ptr) +@ stdcall KsFreeObjectCreateItemsByContext(ptr ptr) +@ stdcall KsLoadResource(ptr long ptr long ptr ptr) +; KsNullDriverUnload@4 +@ stdcall KsPinDataIntersectionEx(ptr ptr ptr long ptr long ptr ptr) +@ stdcall KsQueryDevicePnpObject(ptr) +@ stdcall KsRecalculateStackDepth(ptr long) +@ stdcall KsSetTargetDeviceObject(ptr ptr) +@ stdcall KsSetTargetState(ptr long) +@ stdcall KsSynchronousIoControlDevice(ptr long long ptr long ptr long ptr) +@ stdcall KsInitializeDriver(ptr ptr ptr) + +; Kernel COM +@ stdcall KoCreateInstance(ptr ptr long ptr ptr) diff --git a/reactos/drivers/ksfilter/ks/misc.c b/reactos/drivers/ksfilter/ks/misc.c index 288333349f1..a3075846fbd 100644 --- a/reactos/drivers/ksfilter/ks/misc.c +++ b/reactos/drivers/ksfilter/ks/misc.c @@ -223,9 +223,9 @@ KsSynchronousIoControlDevice( */ KSDDKAPI NTSTATUS NTAPI KsInitializeDriver( -IN PDRIVER_OBJECT DriverObject, -IN PUNICODE_STRING RegistryPath, -IN const KSDEVICE_DESCRIPTOR *Descriptor OPTIONAL + IN PDRIVER_OBJECT DriverObject, + IN PUNICODE_STRING RegistryPath, + IN const KSDEVICE_DESCRIPTOR *Descriptor OPTIONAL ) { UNIMPLEMENTED; From 8e971e91d31c2e46ed1fe8e7b2900225e840d79c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sat, 16 Aug 2008 10:48:20 +0000 Subject: [PATCH 024/324] No need to export DriverEntry svn path=/trunk/; revision=35373 --- reactos/drivers/multimedia/audio/sb16_nt4/sb16_nt4.def | 6 ------ reactos/drivers/multimedia/audio/sb16_nt4/sb16_nt4.rbuild | 1 - 2 files changed, 7 deletions(-) delete mode 100644 reactos/drivers/multimedia/audio/sb16_nt4/sb16_nt4.def diff --git a/reactos/drivers/multimedia/audio/sb16_nt4/sb16_nt4.def b/reactos/drivers/multimedia/audio/sb16_nt4/sb16_nt4.def deleted file mode 100644 index 32ef407d0a6..00000000000 --- a/reactos/drivers/multimedia/audio/sb16_nt4/sb16_nt4.def +++ /dev/null @@ -1,6 +0,0 @@ -; -; Exports definition file for sb16_ks.sys -; -EXPORTS -DriverEntry@8 - diff --git a/reactos/drivers/multimedia/audio/sb16_nt4/sb16_nt4.rbuild b/reactos/drivers/multimedia/audio/sb16_nt4/sb16_nt4.rbuild index dff053f7e4f..9874081382c 100644 --- a/reactos/drivers/multimedia/audio/sb16_nt4/sb16_nt4.rbuild +++ b/reactos/drivers/multimedia/audio/sb16_nt4/sb16_nt4.rbuild @@ -3,7 +3,6 @@ . .. - ntoskrnl hal main.c From 41544ac115668f99c28707bf228971e662809ae6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sat, 16 Aug 2008 10:50:21 +0000 Subject: [PATCH 025/324] Remove useless file svn path=/trunk/; revision=35374 --- reactos/drivers/network/acd/rasacd.def | 8 -------- reactos/drivers/network/acd/rasacd.rbuild | 1 - 2 files changed, 9 deletions(-) delete mode 100644 reactos/drivers/network/acd/rasacd.def diff --git a/reactos/drivers/network/acd/rasacd.def b/reactos/drivers/network/acd/rasacd.def deleted file mode 100644 index 82868d1dd6f..00000000000 --- a/reactos/drivers/network/acd/rasacd.def +++ /dev/null @@ -1,8 +0,0 @@ -; RAS Automatic Connection Driver - ReactOS Operating System - -LIBRARY RASACD.SYS - -EXPORTS - - -; EOF diff --git a/reactos/drivers/network/acd/rasacd.rbuild b/reactos/drivers/network/acd/rasacd.rbuild index b6d2139c72f..499dbe776a5 100644 --- a/reactos/drivers/network/acd/rasacd.rbuild +++ b/reactos/drivers/network/acd/rasacd.rbuild @@ -1,7 +1,6 @@ - include ntoskrnl hal From 9fbc7142ad2fa8a53d7a44a39ef17eb5cd349832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sat, 16 Aug 2008 11:10:14 +0000 Subject: [PATCH 026/324] Replace .def file by a .spec file svn path=/trunk/; revision=35375 --- reactos/drivers/storage/ide/pciidex/pciidex.def | 8 -------- reactos/drivers/storage/ide/pciidex/pciidex.rbuild | 3 ++- reactos/drivers/storage/ide/pciidex/pciidex.spec | 3 +++ 3 files changed, 5 insertions(+), 9 deletions(-) delete mode 100644 reactos/drivers/storage/ide/pciidex/pciidex.def create mode 100644 reactos/drivers/storage/ide/pciidex/pciidex.spec diff --git a/reactos/drivers/storage/ide/pciidex/pciidex.def b/reactos/drivers/storage/ide/pciidex/pciidex.def deleted file mode 100644 index 5f810fe1d0e..00000000000 --- a/reactos/drivers/storage/ide/pciidex/pciidex.def +++ /dev/null @@ -1,8 +0,0 @@ -LIBRARY pciidex.sys - -EXPORTS -PciIdeXGetBusData@16 -PciIdeXInitialize@16 -PciIdeXSetBusData@20 - -;EOF \ No newline at end of file diff --git a/reactos/drivers/storage/ide/pciidex/pciidex.rbuild b/reactos/drivers/storage/ide/pciidex/pciidex.rbuild index 5aa07d10e5e..0691c33b3cf 100644 --- a/reactos/drivers/storage/ide/pciidex/pciidex.rbuild +++ b/reactos/drivers/storage/ide/pciidex/pciidex.rbuild @@ -1,7 +1,7 @@ - + ntoskrnl fdo.c miniport.c @@ -9,4 +9,5 @@ pciidex.c pdo.c pciidex.rc + pciidex.spec diff --git a/reactos/drivers/storage/ide/pciidex/pciidex.spec b/reactos/drivers/storage/ide/pciidex/pciidex.spec new file mode 100644 index 00000000000..b31793550f3 --- /dev/null +++ b/reactos/drivers/storage/ide/pciidex/pciidex.spec @@ -0,0 +1,3 @@ +@ stdcall PciIdeXGetBusData(ptr ptr long long) +@ stdcall PciIdeXInitialize(ptr ptr ptr long) +@ stdcall PciIdeXSetBusData(ptr ptr ptr long long) From 33893b95686aa4ebe8b7c6d000b04d178953e322 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sat, 16 Aug 2008 11:14:22 +0000 Subject: [PATCH 027/324] Replace .def file by a .spec file svn path=/trunk/; revision=35376 --- reactos/drivers/storage/port/diskdump/diskdump.c | 2 +- reactos/drivers/storage/port/diskdump/diskdump.def | 7 ------- reactos/drivers/storage/port/diskdump/diskdump.rbuild | 3 ++- reactos/drivers/storage/port/diskdump/diskdump.rc | 2 +- reactos/drivers/storage/port/diskdump/diskdump.spec | 1 + 5 files changed, 5 insertions(+), 10 deletions(-) delete mode 100644 reactos/drivers/storage/port/diskdump/diskdump.def create mode 100644 reactos/drivers/storage/port/diskdump/diskdump.spec diff --git a/reactos/drivers/storage/port/diskdump/diskdump.c b/reactos/drivers/storage/port/diskdump/diskdump.c index b5e0262f9bd..f7037dee275 100644 --- a/reactos/drivers/storage/port/diskdump/diskdump.c +++ b/reactos/drivers/storage/port/diskdump/diskdump.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id$ +/* $Id: diskdump.c 29690 2007-10-19 23:21:45Z dreimer $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS Kernel diff --git a/reactos/drivers/storage/port/diskdump/diskdump.def b/reactos/drivers/storage/port/diskdump/diskdump.def deleted file mode 100644 index 65e33b51740..00000000000 --- a/reactos/drivers/storage/port/diskdump/diskdump.def +++ /dev/null @@ -1,7 +0,0 @@ -; $Id$ -; -; diskdump.def - export definition file for crash dump driver -; -LIBRARY DISKDUMP.SYS -EXPORTS -DiskDumpFunctions diff --git a/reactos/drivers/storage/port/diskdump/diskdump.rbuild b/reactos/drivers/storage/port/diskdump/diskdump.rbuild index 67a7bf8527c..35ff83526e2 100644 --- a/reactos/drivers/storage/port/diskdump/diskdump.rbuild +++ b/reactos/drivers/storage/port/diskdump/diskdump.rbuild @@ -2,7 +2,7 @@ - + include/reactos/drivers ntoskrnl hal @@ -11,4 +11,5 @@ diskdump.c diskdump_helper.S diskdump.rc + diskdump.spec diff --git a/reactos/drivers/storage/port/diskdump/diskdump.rc b/reactos/drivers/storage/port/diskdump/diskdump.rc index 67b00ce30b3..be01545ecb7 100644 --- a/reactos/drivers/storage/port/diskdump/diskdump.rc +++ b/reactos/drivers/storage/port/diskdump/diskdump.rc @@ -1,4 +1,4 @@ -/* $Id$ */ +/* $Id: diskdump.rc 21842 2006-05-07 19:16:11Z ion $ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "Crash Dump Disk Driver\0" diff --git a/reactos/drivers/storage/port/diskdump/diskdump.spec b/reactos/drivers/storage/port/diskdump/diskdump.spec new file mode 100644 index 00000000000..c28c1a442ed --- /dev/null +++ b/reactos/drivers/storage/port/diskdump/diskdump.spec @@ -0,0 +1 @@ +@ extern DiskDumpFunctions From b7b8f77dc185d8d93c378f27e0ec2fe433ec6a55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sat, 16 Aug 2008 11:31:39 +0000 Subject: [PATCH 028/324] Replace .def file by a .spec file svn path=/trunk/; revision=35377 --- reactos/drivers/usb/usbd/usbd.def | 13 ------------- reactos/drivers/usb/usbd/usbd.rbuild | 3 ++- reactos/drivers/usb/usbd/usbd.spec | 9 +++++++++ 3 files changed, 11 insertions(+), 14 deletions(-) delete mode 100644 reactos/drivers/usb/usbd/usbd.def create mode 100644 reactos/drivers/usb/usbd/usbd.spec diff --git a/reactos/drivers/usb/usbd/usbd.def b/reactos/drivers/usb/usbd/usbd.def deleted file mode 100644 index ac55df0ea44..00000000000 --- a/reactos/drivers/usb/usbd/usbd.def +++ /dev/null @@ -1,13 +0,0 @@ -; -; Exports definition file for usbd.sys -; -EXPORTS -USBD_Debug_GetHeap@16 -USBD_Debug_RetHeap@12 -USBD_CalculateUsbBandwidth@12 -USBD_CreateConfigurationRequestEx@8 -USBD_CreateConfigurationRequest@8 -USBD_GetInterfaceLength@8 -USBD_ParseConfigurationDescriptorEx@28 -USBD_ParseDescriptors@16 -;USBD_GetPdoRegistryParameters diff --git a/reactos/drivers/usb/usbd/usbd.rbuild b/reactos/drivers/usb/usbd/usbd.rbuild index a5bb94b8a09..5a9f43661cf 100644 --- a/reactos/drivers/usb/usbd/usbd.rbuild +++ b/reactos/drivers/usb/usbd/usbd.rbuild @@ -1,9 +1,10 @@ - + ntoskrnl hal usbd.c usbd.rc + usbd.spec diff --git a/reactos/drivers/usb/usbd/usbd.spec b/reactos/drivers/usb/usbd/usbd.spec new file mode 100644 index 00000000000..5f6f8349ab0 --- /dev/null +++ b/reactos/drivers/usb/usbd/usbd.spec @@ -0,0 +1,9 @@ +USBD_Debug_GetHeap(long long long long) +USBD_Debug_RetHeap(ptr long long) +USBD_CalculateUsbBandwidth(long long long) +USBD_CreateConfigurationRequestEx(ptr ptr) +USBD_CreateConfigurationRequest(ptr ptr) +USBD_GetInterfaceLength(ptr ptr) +USBD_ParseConfigurationDescriptorEx(ptr ptr long long long long long) +USBD_ParseDescriptors(ptr long ptr long) +;USBD_GetPdoRegistryParameters From 016f8daf8b599d8313127cf4437f2d02edaff28c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sat, 16 Aug 2008 11:32:17 +0000 Subject: [PATCH 029/324] Remove useless file svn path=/trunk/; revision=35378 --- reactos/drivers/usb/usbstor/usbstor.def | 2 -- reactos/drivers/usb/usbstor/usbstor.rbuild | 1 - 2 files changed, 3 deletions(-) delete mode 100644 reactos/drivers/usb/usbstor/usbstor.def diff --git a/reactos/drivers/usb/usbstor/usbstor.def b/reactos/drivers/usb/usbstor/usbstor.def deleted file mode 100644 index 0eaf4f07f2c..00000000000 --- a/reactos/drivers/usb/usbstor/usbstor.def +++ /dev/null @@ -1,2 +0,0 @@ -LIBRARY usbstor.sys -EXPORTS diff --git a/reactos/drivers/usb/usbstor/usbstor.rbuild b/reactos/drivers/usb/usbstor/usbstor.rbuild index e13ade995d2..5a92f8ba383 100644 --- a/reactos/drivers/usb/usbstor/usbstor.rbuild +++ b/reactos/drivers/usb/usbstor/usbstor.rbuild @@ -1,7 +1,6 @@ - include ntoskrnl From 00ff637edd9d662ba4de3fccea1e783a9333505a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sat, 16 Aug 2008 11:35:36 +0000 Subject: [PATCH 030/324] Replace .def file by a .spec file svn path=/trunk/; revision=35379 --- reactos/drivers/video/displays/framebuf/framebuf.def | 3 --- reactos/drivers/video/displays/framebuf/framebuf.rbuild | 3 ++- reactos/drivers/video/displays/framebuf/framebuf.spec | 1 + 3 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 reactos/drivers/video/displays/framebuf/framebuf.def create mode 100644 reactos/drivers/video/displays/framebuf/framebuf.spec diff --git a/reactos/drivers/video/displays/framebuf/framebuf.def b/reactos/drivers/video/displays/framebuf/framebuf.def deleted file mode 100644 index 3ab97ffa6b8..00000000000 --- a/reactos/drivers/video/displays/framebuf/framebuf.def +++ /dev/null @@ -1,3 +0,0 @@ -LIBRARY framebuf.dll -EXPORTS -DrvEnableDriver@12 diff --git a/reactos/drivers/video/displays/framebuf/framebuf.rbuild b/reactos/drivers/video/displays/framebuf/framebuf.rbuild index f6db9a453b4..cdadcab0007 100644 --- a/reactos/drivers/video/displays/framebuf/framebuf.rbuild +++ b/reactos/drivers/video/displays/framebuf/framebuf.rbuild @@ -1,7 +1,7 @@ - + . win32k libcntpr @@ -11,4 +11,5 @@ screen.c surface.c framebuf.rc + framebuf.spec diff --git a/reactos/drivers/video/displays/framebuf/framebuf.spec b/reactos/drivers/video/displays/framebuf/framebuf.spec new file mode 100644 index 00000000000..aec115e4ef7 --- /dev/null +++ b/reactos/drivers/video/displays/framebuf/framebuf.spec @@ -0,0 +1 @@ +@ stdcall DrvEnableDriver(long long ptr) From 09bf4fce5df2db2aa03099e6a502c22cbf50c07e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sat, 16 Aug 2008 11:35:58 +0000 Subject: [PATCH 031/324] Replace .def file by a .spec file svn path=/trunk/; revision=35380 --- reactos/drivers/video/displays/framebufacc/framebufacc.def | 3 --- reactos/drivers/video/displays/framebufacc/framebufacc.rbuild | 3 ++- reactos/drivers/video/displays/framebufacc/framebufacc.spec | 1 + 3 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 reactos/drivers/video/displays/framebufacc/framebufacc.def create mode 100644 reactos/drivers/video/displays/framebufacc/framebufacc.spec diff --git a/reactos/drivers/video/displays/framebufacc/framebufacc.def b/reactos/drivers/video/displays/framebufacc/framebufacc.def deleted file mode 100644 index 3ab97ffa6b8..00000000000 --- a/reactos/drivers/video/displays/framebufacc/framebufacc.def +++ /dev/null @@ -1,3 +0,0 @@ -LIBRARY framebuf.dll -EXPORTS -DrvEnableDriver@12 diff --git a/reactos/drivers/video/displays/framebufacc/framebufacc.rbuild b/reactos/drivers/video/displays/framebufacc/framebufacc.rbuild index 814fb2ada80..47c32ec3e4d 100644 --- a/reactos/drivers/video/displays/framebufacc/framebufacc.rbuild +++ b/reactos/drivers/video/displays/framebufacc/framebufacc.rbuild @@ -1,7 +1,7 @@ - + . win32k libcntpr @@ -11,4 +11,5 @@ screen.c surface.c framebufacc.rc + framebufacc.spec diff --git a/reactos/drivers/video/displays/framebufacc/framebufacc.spec b/reactos/drivers/video/displays/framebufacc/framebufacc.spec new file mode 100644 index 00000000000..aec115e4ef7 --- /dev/null +++ b/reactos/drivers/video/displays/framebufacc/framebufacc.spec @@ -0,0 +1 @@ +@ stdcall DrvEnableDriver(long long ptr) From 4d169f861b644f1600f1eb199a3e79d27b146858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sat, 16 Aug 2008 11:37:13 +0000 Subject: [PATCH 032/324] Replace .def file by a .spec file svn path=/trunk/; revision=35381 --- reactos/drivers/video/displays/vga/vgaddi.def | 4 ---- reactos/drivers/video/displays/vga/vgaddi.rbuild | 3 ++- reactos/drivers/video/displays/vga/vgaddi.spec | 1 + 3 files changed, 3 insertions(+), 5 deletions(-) delete mode 100644 reactos/drivers/video/displays/vga/vgaddi.def create mode 100644 reactos/drivers/video/displays/vga/vgaddi.spec diff --git a/reactos/drivers/video/displays/vga/vgaddi.def b/reactos/drivers/video/displays/vga/vgaddi.def deleted file mode 100644 index 2f98d49c250..00000000000 --- a/reactos/drivers/video/displays/vga/vgaddi.def +++ /dev/null @@ -1,4 +0,0 @@ -; vgaddi.def -LIBRARY vgaddi.dll -EXPORTS -DrvEnableDriver@12 diff --git a/reactos/drivers/video/displays/vga/vgaddi.rbuild b/reactos/drivers/video/displays/vga/vgaddi.rbuild index 09ff2a846a0..ca0d329f0e9 100644 --- a/reactos/drivers/video/displays/vga/vgaddi.rbuild +++ b/reactos/drivers/video/displays/vga/vgaddi.rbuild @@ -1,7 +1,7 @@ - + . libcntpr win32k @@ -22,4 +22,5 @@ vgavideo.c vgaddi.rc + vgaddi.spec diff --git a/reactos/drivers/video/displays/vga/vgaddi.spec b/reactos/drivers/video/displays/vga/vgaddi.spec new file mode 100644 index 00000000000..aec115e4ef7 --- /dev/null +++ b/reactos/drivers/video/displays/vga/vgaddi.spec @@ -0,0 +1 @@ +@ stdcall DrvEnableDriver(long long ptr) From b521c81620f93e7c459de34e8343748084d9d541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sat, 16 Aug 2008 11:44:23 +0000 Subject: [PATCH 033/324] No need to export DriverEntry svn path=/trunk/; revision=35382 --- reactos/drivers/wdm/audio/drivers/sb16/sb16.rbuild | 1 - reactos/drivers/wdm/audio/drivers/sb16/sb16_ks.def | 6 ------ 2 files changed, 7 deletions(-) delete mode 100644 reactos/drivers/wdm/audio/drivers/sb16/sb16_ks.def diff --git a/reactos/drivers/wdm/audio/drivers/sb16/sb16.rbuild b/reactos/drivers/wdm/audio/drivers/sb16/sb16.rbuild index 00e7e0763d7..8d9ae1587b2 100644 --- a/reactos/drivers/wdm/audio/drivers/sb16/sb16.rbuild +++ b/reactos/drivers/wdm/audio/drivers/sb16/sb16.rbuild @@ -3,7 +3,6 @@ . .. - ntoskrnl portcls stdunk.cpp diff --git a/reactos/drivers/wdm/audio/drivers/sb16/sb16_ks.def b/reactos/drivers/wdm/audio/drivers/sb16/sb16_ks.def deleted file mode 100644 index 32ef407d0a6..00000000000 --- a/reactos/drivers/wdm/audio/drivers/sb16/sb16_ks.def +++ /dev/null @@ -1,6 +0,0 @@ -; -; Exports definition file for sb16_ks.sys -; -EXPORTS -DriverEntry@8 - From fbd12707f0bec0ee7caf5736d8b5b4a455a6194b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sat, 16 Aug 2008 11:45:30 +0000 Subject: [PATCH 034/324] No need to export DriverEntry svn path=/trunk/; revision=35383 --- reactos/drivers/wdm/audio/drivers/mpu401/mpu401.def | 6 ------ reactos/drivers/wdm/audio/drivers/mpu401/mpu401.rbuild | 10 +--------- 2 files changed, 1 insertion(+), 15 deletions(-) delete mode 100644 reactos/drivers/wdm/audio/drivers/mpu401/mpu401.def diff --git a/reactos/drivers/wdm/audio/drivers/mpu401/mpu401.def b/reactos/drivers/wdm/audio/drivers/mpu401/mpu401.def deleted file mode 100644 index 1a605ebb6b5..00000000000 --- a/reactos/drivers/wdm/audio/drivers/mpu401/mpu401.def +++ /dev/null @@ -1,6 +0,0 @@ -; -; Exports definition file for mpu401_ks.sys -; -EXPORTS -DriverEntry@8 - diff --git a/reactos/drivers/wdm/audio/drivers/mpu401/mpu401.rbuild b/reactos/drivers/wdm/audio/drivers/mpu401/mpu401.rbuild index cbd1fef36b1..ea1ea6fce4a 100644 --- a/reactos/drivers/wdm/audio/drivers/mpu401/mpu401.rbuild +++ b/reactos/drivers/wdm/audio/drivers/mpu401/mpu401.rbuild @@ -1,18 +1,10 @@ - - - . .. ntoskrnl portcls - + mpu401.rc adapter.cpp From b38fdbfee00d29d8751398bcf42b7683bc063226 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sat, 16 Aug 2008 11:59:16 +0000 Subject: [PATCH 035/324] Replace .def file by a .spec file svn path=/trunk/; revision=35384 --- .../wdm/audio/backpln/portcls/port_factory.c | 2 +- .../wdm/audio/backpln/portcls/portcls.def | 55 ------------------- .../wdm/audio/backpln/portcls/portcls.rbuild | 3 +- .../wdm/audio/backpln/portcls/portcls.spec | 51 +++++++++++++++++ 4 files changed, 54 insertions(+), 57 deletions(-) delete mode 100644 reactos/drivers/wdm/audio/backpln/portcls/portcls.def create mode 100644 reactos/drivers/wdm/audio/backpln/portcls/portcls.spec diff --git a/reactos/drivers/wdm/audio/backpln/portcls/port_factory.c b/reactos/drivers/wdm/audio/backpln/portcls/port_factory.c index 49e864ad930..23def6b7b20 100644 --- a/reactos/drivers/wdm/audio/backpln/portcls/port_factory.c +++ b/reactos/drivers/wdm/audio/backpln/portcls/port_factory.c @@ -48,7 +48,7 @@ PcNewPort( { DPRINT("Calling KoCreateInstance\n"); /* Call KS.SYS's Kernel-mode COM function */ - status = KoCreateInstance(ClassId, NULL, CLSCTX_KERNEL_SERVER, &IID_IPort, &new_port); + status = KoCreateInstance(ClassId, NULL, CLSCTX_KERNEL_SERVER, &IID_IPort, (PVOID*)&new_port); } else { diff --git a/reactos/drivers/wdm/audio/backpln/portcls/portcls.def b/reactos/drivers/wdm/audio/backpln/portcls/portcls.def deleted file mode 100644 index 4ad6a010c50..00000000000 --- a/reactos/drivers/wdm/audio/backpln/portcls/portcls.def +++ /dev/null @@ -1,55 +0,0 @@ -; -; Exports definition file for portcls.sys -; -EXPORTS -DllInitialize@4 -DllUnload@0 - -; Adapters (adapter.c) -PcAddAdapterDevice@20 -PcInitializeAdapterDriver@12 - -; Factories -PcNewDmaChannel@20 -PcNewInterruptSync@20 -PcNewMiniport@8 -PcNewPort@8 -PcNewRegistryKey@36 -PcNewResourceList@20 -PcNewResourceSublist@20 -PcNewServiceGroup@8 - -; Digital Rights Management (drm.c) -PcAddContentHandlers@12 -PcCreateContentMixed@12 -PcDestroyContent@4 -PcForwardContentToDeviceObject@12 -PcForwardContentToFileObject@8 -PcForwardContentToInterface@12 -PcGetContentRights@8 - -; IRP Helpers -PcCompleteIrp@12 -PcDispatchIrp@8 -PcForwardIrpSynchronous@8 - -; Misc -PcGetTimeInterval@8 -PcRegisterSubdevice@12 - -; Physical Connections -PcRegisterPhysicalConnection@20 -PcRegisterPhysicalConnectionFromExternal@20 -PcRegisterPhysicalConnectionToExternal@20 - -; Power Management -PcRegisterAdapterPowerManagement@8 -PcRequestNewPowerState@8 - -; Properties -PcCompletePendingPropertyRequest@8 -PcGetDeviceProperty@20 - -; Timeouts -PcRegisterIoTimeout@12 -PcUnregisterIoTimeout@12 diff --git a/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild b/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild index 043d7c43c7a..6f2fc9c06e2 100644 --- a/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild +++ b/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild @@ -8,7 +8,7 @@ -fno-rtti --> -Wno-non-virtual-dtor - + @@ -48,4 +48,5 @@ MiniportWavePci.cpp portcls.rc + portcls.spec diff --git a/reactos/drivers/wdm/audio/backpln/portcls/portcls.spec b/reactos/drivers/wdm/audio/backpln/portcls/portcls.spec new file mode 100644 index 00000000000..1af797cafed --- /dev/null +++ b/reactos/drivers/wdm/audio/backpln/portcls/portcls.spec @@ -0,0 +1,51 @@ +@ stdcall DllInitialize(long) +@ stdcall DllUnload() + +; Adapters (adapter.c) +@ stdcall PcAddAdapterDevice(ptr ptr ptr long long) +@ stdcall PcInitializeAdapterDriver(ptr ptr ptr) + +; Factories +@ stdcall PcNewDmaChannel(ptr ptr long ptr ptr) +@ stdcall PcNewInterruptSync(ptr ptr ptr long long) +@ stdcall PcNewMiniport(ptr ptr) +@ stdcall PcNewPort(ptr ptr) +@ stdcall PcNewRegistryKey(ptr ptr long long ptr ptr ptr long ptr) +@ stdcall PcNewResourceList(ptr ptr long ptr ptr) +@ stdcall PcNewResourceSublist(ptr ptr long ptr long) +@ stdcall PcNewServiceGroup(ptr ptr) + +; Digital Rights Management (drm.c) +@ stdcall PcAddContentHandlers(long ptr long) +@ stdcall PcCreateContentMixed(ptr long ptr) +@ stdcall PcDestroyContent(long) +@ stdcall PcForwardContentToDeviceObject(long ptr ptr) +@ stdcall PcForwardContentToFileObject(long ptr) +@ stdcall PcForwardContentToInterface(long ptr long) +@ stdcall PcGetContentRights(long ptr) + +; IRP Helpers +@ stdcall PcCompleteIrp(ptr ptr long) +@ stdcall PcDispatchIrp(ptr ptr) +@ stdcall PcForwardIrpSynchronous(ptr ptr) + +; Misc +@ stdcall PcGetTimeInterval(long long) +@ stdcall PcRegisterSubdevice(ptr wstr ptr) + +; Physical Connections +@ stdcall PcRegisterPhysicalConnection(ptr ptr long ptr long) +@ stdcall PcRegisterPhysicalConnectionFromExternal(ptr ptr long ptr long) +@ stdcall PcRegisterPhysicalConnectionToExternal(ptr ptr long ptr long) + +; Power Management +@ stdcall PcRegisterAdapterPowerManagement(ptr ptr) +@ stdcall PcRequestNewPowerState(ptr long) + +; Properties +@ stdcall PcCompletePendingPropertyRequest(ptr long) +@ stdcall PcGetDeviceProperty(ptr long long ptr ptr) + +; Timeouts +@ stdcall PcRegisterIoTimeout(ptr ptr ptr) +@ stdcall PcUnregisterIoTimeout(ptr ptr ptr) From 0e0ea9b0df567d6e1947e4960bcc4d758d4950bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sat, 16 Aug 2008 12:03:07 +0000 Subject: [PATCH 036/324] Replace .def file by a .spec file svn path=/trunk/; revision=35386 --- reactos/drivers/wdm/audio/drm/drmk/drmk.def | 12 ------------ reactos/drivers/wdm/audio/drm/drmk/drmk.rbuild | 5 +++-- reactos/drivers/wdm/audio/drm/drmk/drmk.spec | 7 +++++++ 3 files changed, 10 insertions(+), 14 deletions(-) delete mode 100644 reactos/drivers/wdm/audio/drm/drmk/drmk.def create mode 100644 reactos/drivers/wdm/audio/drm/drmk/drmk.spec diff --git a/reactos/drivers/wdm/audio/drm/drmk/drmk.def b/reactos/drivers/wdm/audio/drm/drmk/drmk.def deleted file mode 100644 index b5208628163..00000000000 --- a/reactos/drivers/wdm/audio/drm/drmk/drmk.def +++ /dev/null @@ -1,12 +0,0 @@ -; -; Exports definition file for drmk.sys -; - -EXPORTS -DrmAddContentHandlers@12 -DrmCreateContentMixed@12 -DrmDestroyContent@4 -DrmForwardContentToDeviceObject@12 -DrmForwardContentToFileObject@8 -DrmForwardContentToInterface@12 -DrmGetContentRights@8 \ No newline at end of file diff --git a/reactos/drivers/wdm/audio/drm/drmk/drmk.rbuild b/reactos/drivers/wdm/audio/drm/drmk/drmk.rbuild index 5b425b517ca..beef05a26fb 100644 --- a/reactos/drivers/wdm/audio/drm/drmk/drmk.rbuild +++ b/reactos/drivers/wdm/audio/drm/drmk/drmk.rbuild @@ -4,9 +4,10 @@ . .. ../include - + ntoskrnl - drmk.rc stubs.cpp + drmk.rc + drmk.spec diff --git a/reactos/drivers/wdm/audio/drm/drmk/drmk.spec b/reactos/drivers/wdm/audio/drm/drmk/drmk.spec new file mode 100644 index 00000000000..9f6947e5314 --- /dev/null +++ b/reactos/drivers/wdm/audio/drm/drmk/drmk.spec @@ -0,0 +1,7 @@ +@ stdcall DrmAddContentHandlers(long ptr long) +@ stdcall DrmCreateContentMixed(ptr long ptr) +@ stdcall DrmDestroyContent(long) +@ stdcall DrmForwardContentToDeviceObject(long ptr ptr) +@ stdcall DrmForwardContentToFileObject(long ptr) +@ stdcall DrmForwardContentToInterface(long ptr long) +@ stdcall DrmGetContentRights(long ptr) From 28aa57b53fd04988327a69eead55e839ea8988b1 Mon Sep 17 00:00:00 2001 From: Colin Finck Date: Sat, 16 Aug 2008 12:20:18 +0000 Subject: [PATCH 037/324] Restructure the keyboard & mouse detection code: - Truly separate i8042BasicDetect from i8042DetectKeyboard and i8042DetectMouse: It now only does the CTRL_SELF_TEST, any other specific detections are done in their respective functions - Only set KEYBOARD_PRESENT and MOUSE_PRESENT, when all respective detections completed successfully Might fix bug #3550 svn path=/trunk/; revision=35387 --- reactos/drivers/input/i8042prt/pnp.c | 51 ++++++++++++++++------------ 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/reactos/drivers/input/i8042prt/pnp.c b/reactos/drivers/input/i8042prt/pnp.c index 81f440b3d4b..530460693ac 100644 --- a/reactos/drivers/input/i8042prt/pnp.c +++ b/reactos/drivers/input/i8042prt/pnp.c @@ -85,6 +85,7 @@ i8042BasicDetect( i8042Flush(DeviceExtension); + /* Issue a CTRL_SELF_TEST command to check if this is really an i8042 controller */ ResendIterations = DeviceExtension->Settings.ResendIterations + 1; while (ResendIterations--) { @@ -118,24 +119,6 @@ i8042BasicDetect( } } - /* - * We used to send a KBD_LINE_TEST (0xAB) command here, but on at least HP - * Pavilion notebooks the response to that command was incorrect. - * So now we just assume that a keyboard is attached. - */ - DeviceExtension->Flags |= KEYBOARD_PRESENT; - - if (i8042Write(DeviceExtension, DeviceExtension->ControlPort, MOUSE_LINE_TEST)) - { - Status = i8042ReadDataWait(DeviceExtension, &Value); - if (NT_SUCCESS(Status) && Value == 0) - DeviceExtension->Flags |= MOUSE_PRESENT; - } - - if (IsFirstStageSetup()) - /* Ignore the mouse */ - DeviceExtension->Flags &= ~MOUSE_PRESENT; - return STATUS_SUCCESS; } @@ -165,6 +148,13 @@ i8042DetectKeyboard( if (!i8042ChangeMode(DeviceExtension, 0, CCB_TRANSLATE | CCB_SYSTEM_FLAG)) return; + /* + * We used to send a KBD_LINE_TEST (0xAB) command, but on at least HP + * Pavilion notebooks the response to that command was incorrect. + * So now we just assume that a keyboard is attached. + */ + DeviceExtension->Flags |= KEYBOARD_PRESENT; + INFO_(I8042PRT, "Keyboard detected\n"); } @@ -177,6 +167,19 @@ i8042DetectMouse( UCHAR ExpectedReply[] = { MOUSE_ACK, 0xAA }; UCHAR ReplyByte; + /* First do a mouse line test */ + if (i8042Write(DeviceExtension, DeviceExtension->ControlPort, MOUSE_LINE_TEST)) + { + Status = i8042ReadDataWait(DeviceExtension, &Value); + + if (!NT_SUCCESS(Status) || Value != 0) + { + WARN_(I8042PRT, "Mouse line test failed\n"); + goto failure; + } + } + + /* Now reset the mouse */ i8042Flush(DeviceExtension); if(!i8042IsrWritePort(DeviceExtension, MOU_CMD_RESET, CTRL_WRITE_MOUSE)) @@ -240,6 +243,7 @@ i8042DetectMouse( goto failure; } + DeviceExtension->Flags |= MOUSE_PRESENT; INFO_(I8042PRT, "Mouse detected\n"); return; @@ -415,9 +419,14 @@ StartProcedure( } /* First detect the mouse and then the keyboard! - If we do it the other way round, some systems throw away settings like the keyboard translation, when detecting the mouse. */ - TRACE_(I8042PRT, "Detecting mouse\n"); - i8042DetectMouse(DeviceExtension); + If we do it the other way round, some systems throw away settings like the keyboard translation, when detecting the mouse. + + Don't detect the mouse if we're in 1st stage setup! */ + if(!IsFirstStageSetup()) + { + TRACE_(I8042PRT, "Detecting mouse\n"); + i8042DetectMouse(DeviceExtension); + } TRACE_(I8042PRT, "Detecting keyboard\n"); i8042DetectKeyboard(DeviceExtension); From 5833f234a8e65ad708897cba3686eb5f60cf9886 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Sat, 16 Aug 2008 12:51:39 +0000 Subject: [PATCH 038/324] =?UTF-8?q?Finta=20L=C3=A1szl=C3=B3=20=20-=20Fix=20=5Fallmul=20function,=20which=20woul?= =?UTF-8?q?d=20always=20give=200=20if=20both=20multiplier=20and=20muliplic?= =?UTF-8?q?and's=20high=20words=20are=200.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit svn path=/trunk/; revision=35388 --- reactos/lib/sdk/crt/math/i386/allmul_asm.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/lib/sdk/crt/math/i386/allmul_asm.s b/reactos/lib/sdk/crt/math/i386/allmul_asm.s index c07867de052..1c17bb939a7 100644 --- a/reactos/lib/sdk/crt/math/i386/allmul_asm.s +++ b/reactos/lib/sdk/crt/math/i386/allmul_asm.s @@ -83,7 +83,7 @@ __allmul: mov ecx,BLO jnz short hard //both are zero, just mult ALO and BLO - mov eax,AHI + mov eax,ALO mul ecx ret 16 // callee restores the stack From 660f76d0a1f5dd02ec31c72e8080e503d0d55bbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sat, 16 Aug 2008 13:18:50 +0000 Subject: [PATCH 039/324] Replace .def file by a .spec file svn path=/trunk/; revision=35389 --- reactos/dll/keyboard/kbda1/kbda1.def | 8 -------- reactos/dll/keyboard/kbda1/kbda1.rbuild | 3 ++- reactos/dll/keyboard/kbda1/kbda1.spec | 1 + reactos/dll/keyboard/kbda2/kbda2.def | 8 -------- reactos/dll/keyboard/kbda2/kbda2.rbuild | 3 ++- reactos/dll/keyboard/kbda2/kbda2.spec | 1 + reactos/dll/keyboard/kbda3/kbda3.def | 8 -------- reactos/dll/keyboard/kbda3/kbda3.rbuild | 3 ++- reactos/dll/keyboard/kbda3/kbda3.spec | 1 + reactos/dll/keyboard/kbdal/kbdal.def | 8 -------- reactos/dll/keyboard/kbdal/kbdal.rbuild | 3 ++- reactos/dll/keyboard/kbdal/kbdal.spec | 1 + reactos/dll/keyboard/kbdarme/kbdarme.def | 8 -------- reactos/dll/keyboard/kbdarme/kbdarme.rbuild | 3 ++- reactos/dll/keyboard/kbdarme/kbdarme.spec | 1 + reactos/dll/keyboard/kbdarmw/kbdarmw.def | 8 -------- reactos/dll/keyboard/kbdarmw/kbdarmw.rbuild | 3 ++- reactos/dll/keyboard/kbdarmw/kbdarmw.spec | 1 + reactos/dll/keyboard/kbdaze/kbdaze.def | 8 -------- reactos/dll/keyboard/kbdaze/kbdaze.rbuild | 3 ++- reactos/dll/keyboard/kbdaze/kbdaze.spec | 1 + reactos/dll/keyboard/kbdazel/kbdazel.def | 8 -------- reactos/dll/keyboard/kbdazel/kbdazel.rbuild | 3 ++- reactos/dll/keyboard/kbdazel/kbdazel.spec | 1 + reactos/dll/keyboard/kbdbe/kbdbe.def | 8 -------- reactos/dll/keyboard/kbdbe/kbdbe.rbuild | 3 ++- reactos/dll/keyboard/kbdbe/kbdbe.spec | 1 + reactos/dll/keyboard/kbdbga/kbdbga.def | 8 -------- reactos/dll/keyboard/kbdbga/kbdbga.rbuild | 8 +++++--- reactos/dll/keyboard/kbdbga/kbdbga.spec | 1 + reactos/dll/keyboard/kbdbgm/kbdbgm.def | 8 -------- reactos/dll/keyboard/kbdbgm/kbdbgm.rbuild | 6 ++++-- reactos/dll/keyboard/kbdbgm/kbdbgm.spec | 1 + reactos/dll/keyboard/kbdbgt/kbdbgt.def | 8 -------- reactos/dll/keyboard/kbdbgt/kbdbgt.rbuild | 8 +++++--- reactos/dll/keyboard/kbdbgt/kbdbgt.spec | 1 + reactos/dll/keyboard/kbdblr/kbdblr.def | 8 -------- reactos/dll/keyboard/kbdblr/kbdblr.rbuild | 3 ++- reactos/dll/keyboard/kbdblr/kbdblr.spec | 1 + reactos/dll/keyboard/kbdbr/kbdbr.def | 8 -------- reactos/dll/keyboard/kbdbr/kbdbr.rbuild | 3 ++- reactos/dll/keyboard/kbdbr/kbdbr.spec | 1 + reactos/dll/keyboard/kbdbur/kbdbur.def | 8 -------- reactos/dll/keyboard/kbdbur/kbdbur.rbuild | 3 ++- reactos/dll/keyboard/kbdbur/kbdbur.spec | 1 + reactos/dll/keyboard/kbdcan/kbdcan.def | 8 -------- reactos/dll/keyboard/kbdcan/kbdcan.rbuild | 3 ++- reactos/dll/keyboard/kbdcan/kbdcan.spec | 1 + reactos/dll/keyboard/kbdcr/kbdcr.def | 8 -------- reactos/dll/keyboard/kbdcr/kbdcr.rbuild | 3 ++- reactos/dll/keyboard/kbdcr/kbdcr.spec | 1 + reactos/dll/keyboard/kbdcz1/kbdcz1.def | 8 -------- reactos/dll/keyboard/kbdcz1/kbdcz1.rbuild | 5 ++++- reactos/dll/keyboard/kbdcz1/kbdcz1.spec | 1 + reactos/dll/keyboard/kbdda/kbdda.def | 3 --- reactos/dll/keyboard/kbdda/kbdda.rbuild | 3 ++- reactos/dll/keyboard/kbdda/kbdda.spec | 1 + reactos/dll/keyboard/kbddv/kbddv.def | 8 -------- reactos/dll/keyboard/kbddv/kbddv.rbuild | 3 ++- reactos/dll/keyboard/kbddv/kbddv.spec | 1 + reactos/dll/keyboard/kbdes/kbdes.def | 4 ---- reactos/dll/keyboard/kbdes/kbdes.rbuild | 3 ++- reactos/dll/keyboard/kbdes/kbdes.spec | 1 + reactos/dll/keyboard/kbdest/kbdest.def | 8 -------- reactos/dll/keyboard/kbdest/kbdest.rbuild | 3 ++- reactos/dll/keyboard/kbdest/kbdest.spec | 1 + reactos/dll/keyboard/kbdfc/kbdfc.def | 8 -------- reactos/dll/keyboard/kbdfc/kbdfc.rbuild | 3 ++- reactos/dll/keyboard/kbdfc/kbdfc.spec | 1 + reactos/dll/keyboard/kbdfi/kbdfi.def | 8 -------- reactos/dll/keyboard/kbdfi/kbdfi.rbuild | 3 ++- reactos/dll/keyboard/kbdfi/kbdfi.spec | 1 + reactos/dll/keyboard/kbdfr/kbdfr.def | 8 -------- reactos/dll/keyboard/kbdfr/kbdfr.rbuild | 3 ++- reactos/dll/keyboard/kbdfr/kbdfr.spec | 1 + reactos/dll/keyboard/kbdgeo/kbdgeo.def | 8 -------- reactos/dll/keyboard/kbdgeo/kbdgeo.rbuild | 3 ++- reactos/dll/keyboard/kbdgeo/kbdgeo.spec | 1 + reactos/dll/keyboard/kbdgerg/kbdgerg.def | 8 -------- reactos/dll/keyboard/kbdgerg/kbdgerg.rbuild | 3 ++- reactos/dll/keyboard/kbdgerg/kbdgerg.spec | 1 + reactos/dll/keyboard/kbdgneo/kbdgneo.def | 8 -------- reactos/dll/keyboard/kbdgneo/kbdgneo.rbuild | 3 ++- reactos/dll/keyboard/kbdgneo/kbdgneo.spec | 1 + reactos/dll/keyboard/kbdgr/kbdgr.def | 8 -------- reactos/dll/keyboard/kbdgr/kbdgr.rbuild | 3 ++- reactos/dll/keyboard/kbdgr/kbdgr.spec | 1 + reactos/dll/keyboard/kbdgrist/kbdgrist.def | 8 -------- reactos/dll/keyboard/kbdgrist/kbdgrist.rbuild | 3 ++- reactos/dll/keyboard/kbdgrist/kbdgrist.spec | 1 + reactos/dll/keyboard/kbdhe/kbdhe.def | 8 -------- reactos/dll/keyboard/kbdhe/kbdhe.rbuild | 5 +++-- reactos/dll/keyboard/kbdhe/kbdhe.spec | 1 + reactos/dll/keyboard/kbdheb/kbdheb.def | 8 -------- reactos/dll/keyboard/kbdheb/kbdheb.rbuild | 5 +++-- reactos/dll/keyboard/kbdheb/kbdheb.spec | 1 + reactos/dll/keyboard/kbdhu/kbdhu.def | 8 -------- reactos/dll/keyboard/kbdhu/kbdhu.rbuild | 3 ++- reactos/dll/keyboard/kbdhu/kbdhu.spec | 1 + reactos/dll/keyboard/kbdic/kbdic.def | 8 -------- reactos/dll/keyboard/kbdic/kbdic.rbuild | 3 ++- reactos/dll/keyboard/kbdic/kbdic.spec | 1 + reactos/dll/keyboard/kbdinasa/kbdinasa.def | 8 -------- reactos/dll/keyboard/kbdinasa/kbdinasa.rbuild | 3 ++- reactos/dll/keyboard/kbdinasa/kbdinasa.spec | 1 + reactos/dll/keyboard/kbdinben/kbdinben.def | 8 -------- reactos/dll/keyboard/kbdinben/kbdinben.rbuild | 3 ++- reactos/dll/keyboard/kbdinben/kbdinben.spec | 1 + reactos/dll/keyboard/kbdindev/kbdindev.def | 8 -------- reactos/dll/keyboard/kbdindev/kbdindev.rbuild | 3 ++- reactos/dll/keyboard/kbdindev/kbdindev.spec | 1 + reactos/dll/keyboard/kbdinguj/kbdinguj.def | 8 -------- reactos/dll/keyboard/kbdinguj/kbdinguj.rbuild | 3 ++- reactos/dll/keyboard/kbdinguj/kbdinguj.spec | 1 + reactos/dll/keyboard/kbdinmal/kbdinmal.def | 8 -------- reactos/dll/keyboard/kbdinmal/kbdinmal.rbuild | 3 ++- reactos/dll/keyboard/kbdinmal/kbdinmal.spec | 1 + reactos/dll/keyboard/kbdir/kbdir.def | 8 -------- reactos/dll/keyboard/kbdir/kbdir.rbuild | 3 ++- reactos/dll/keyboard/kbdir/kbdir.spec | 1 + reactos/dll/keyboard/kbdit/kbdit.def | 4 ---- reactos/dll/keyboard/kbdit/kbdit.rbuild | 3 ++- reactos/dll/keyboard/kbdit/kbdit.spec | 1 + reactos/dll/keyboard/kbdja/kbdja.def | 8 -------- reactos/dll/keyboard/kbdja/kbdja.rbuild | 3 ++- reactos/dll/keyboard/kbdja/kbdja.spec | 1 + reactos/dll/keyboard/kbdkaz/kbdkaz.def | 8 -------- reactos/dll/keyboard/kbdkaz/kbdkaz.rbuild | 3 ++- reactos/dll/keyboard/kbdkaz/kbdkaz.spec | 1 + reactos/dll/keyboard/kbdko/kbdko.def | 8 -------- reactos/dll/keyboard/kbdko/kbdko.rbuild | 3 ++- reactos/dll/keyboard/kbdko/kbdko.spec | 1 + reactos/dll/keyboard/kbdla/kbdla.def | 8 -------- reactos/dll/keyboard/kbdla/kbdla.rbuild | 3 ++- reactos/dll/keyboard/kbdla/kbdla.spec | 1 + reactos/dll/keyboard/kbdlt/kbdlt.def | 8 -------- reactos/dll/keyboard/kbdlt/kbdlt.rbuild | 5 ++++- reactos/dll/keyboard/kbdlt/kbdlt.spec | 1 + reactos/dll/keyboard/kbdlv/kbdlv.def | 8 -------- reactos/dll/keyboard/kbdlv/kbdlv.rbuild | 3 ++- reactos/dll/keyboard/kbdlv/kbdlv.spec | 1 + reactos/dll/keyboard/kbdmac/kbdmac.def | 8 -------- reactos/dll/keyboard/kbdmac/kbdmac.rbuild | 3 ++- reactos/dll/keyboard/kbdmac/kbdmac.spec | 1 + reactos/dll/keyboard/kbdne/kbdne.def | 8 -------- reactos/dll/keyboard/kbdne/kbdne.rbuild | 3 ++- reactos/dll/keyboard/kbdne/kbdne.spec | 1 + reactos/dll/keyboard/kbdno/kbdno.def | 3 --- reactos/dll/keyboard/kbdno/kbdno.rbuild | 3 ++- reactos/dll/keyboard/kbdno/kbdno.spec | 1 + reactos/dll/keyboard/kbdpl1/kbdpl1.def | 8 -------- reactos/dll/keyboard/kbdpl1/kbdpl1.rbuild | 3 ++- reactos/dll/keyboard/kbdpl1/kbdpl1.spec | 1 + reactos/dll/keyboard/kbdpo/kbdpo.def | 3 --- reactos/dll/keyboard/kbdpo/kbdpo.rbuild | 3 ++- reactos/dll/keyboard/kbdpo/kbdpo.spec | 1 + reactos/dll/keyboard/kbdro/kbdro.def | 8 -------- reactos/dll/keyboard/kbdro/kbdro.rbuild | 3 ++- reactos/dll/keyboard/kbdro/kbdro.spec | 1 + reactos/dll/keyboard/kbdru/kbdru.def | 8 -------- reactos/dll/keyboard/kbdru/kbdru.rbuild | 3 ++- reactos/dll/keyboard/kbdru/kbdru.spec | 1 + reactos/dll/keyboard/kbdru1/kbdru1.def | 8 -------- reactos/dll/keyboard/kbdru1/kbdru1.rbuild | 3 ++- reactos/dll/keyboard/kbdru1/kbdru1.spec | 1 + reactos/dll/keyboard/kbdsg/kbdsg.def | 8 -------- reactos/dll/keyboard/kbdsg/kbdsg.rbuild | 3 ++- reactos/dll/keyboard/kbdsg/kbdsg.spec | 1 + reactos/dll/keyboard/kbdsk/kbdsk.def | 8 -------- reactos/dll/keyboard/kbdsk/kbdsk.rbuild | 3 ++- reactos/dll/keyboard/kbdsk/kbdsk.spec | 1 + reactos/dll/keyboard/kbdsk1/kbdsk1.def | 8 -------- reactos/dll/keyboard/kbdsk1/kbdsk1.rbuild | 3 ++- reactos/dll/keyboard/kbdsk1/kbdsk1.spec | 1 + reactos/dll/keyboard/kbdsw/kbdsw.def | 8 -------- reactos/dll/keyboard/kbdsw/kbdsw.rbuild | 3 ++- reactos/dll/keyboard/kbdsw/kbdsw.spec | 1 + reactos/dll/keyboard/kbdtat/kbdtat.def | 8 -------- reactos/dll/keyboard/kbdtat/kbdtat.rbuild | 3 ++- reactos/dll/keyboard/kbdtat/kbdtat.spec | 1 + reactos/dll/keyboard/kbdth0/kbdth0.def | 8 -------- reactos/dll/keyboard/kbdth0/kbdth0.rbuild | 5 +++-- reactos/dll/keyboard/kbdth0/kbdth0.spec | 1 + reactos/dll/keyboard/kbdth1/kbdth1.def | 8 -------- reactos/dll/keyboard/kbdth1/kbdth1.rbuild | 5 +++-- reactos/dll/keyboard/kbdth1/kbdth1.spec | 1 + reactos/dll/keyboard/kbdth2/kbdth2.def | 8 -------- reactos/dll/keyboard/kbdth2/kbdth2.rbuild | 3 ++- reactos/dll/keyboard/kbdth2/kbdth2.spec | 1 + reactos/dll/keyboard/kbdth3/kbdth3.def | 8 -------- reactos/dll/keyboard/kbdth3/kbdth3.rbuild | 5 +++-- reactos/dll/keyboard/kbdth3/kbdth3.spec | 1 + reactos/dll/keyboard/kbdtuf/kbdtuf.def | 8 -------- reactos/dll/keyboard/kbdtuf/kbdtuf.rbuild | 3 ++- reactos/dll/keyboard/kbdtuf/kbdtuf.spec | 1 + reactos/dll/keyboard/kbdtuq/kbdtuq.def | 8 -------- reactos/dll/keyboard/kbdtuq/kbdtuq.rbuild | 3 ++- reactos/dll/keyboard/kbdtuq/kbdtuq.spec | 1 + reactos/dll/keyboard/kbduk/kbduk.def | 8 -------- reactos/dll/keyboard/kbduk/kbduk.rbuild | 3 ++- reactos/dll/keyboard/kbduk/kbduk.spec | 1 + reactos/dll/keyboard/kbdur/kbdur.def | 8 -------- reactos/dll/keyboard/kbdur/kbdur.rbuild | 3 ++- reactos/dll/keyboard/kbdur/kbdur.spec | 1 + reactos/dll/keyboard/kbdurs/kbdurs.def | 8 -------- reactos/dll/keyboard/kbdurs/kbdurs.rbuild | 3 ++- reactos/dll/keyboard/kbdurs/kbdurs.spec | 1 + reactos/dll/keyboard/kbdus/kbdus.def | 8 -------- reactos/dll/keyboard/kbdus/kbdus.rbuild | 3 ++- reactos/dll/keyboard/kbdus/kbdus.spec | 1 + reactos/dll/keyboard/kbdusa/kbdusa.def | 8 -------- reactos/dll/keyboard/kbdusa/kbdusa.rbuild | 3 ++- reactos/dll/keyboard/kbdusa/kbdusa.spec | 1 + reactos/dll/keyboard/kbdusl/kbdusl.def | 8 -------- reactos/dll/keyboard/kbdusl/kbdusl.rbuild | 3 ++- reactos/dll/keyboard/kbdusl/kbdusl.spec | 1 + reactos/dll/keyboard/kbdusr/kbdusr.def | 8 -------- reactos/dll/keyboard/kbdusr/kbdusr.rbuild | 3 ++- reactos/dll/keyboard/kbdusr/kbdusr.spec | 1 + reactos/dll/keyboard/kbdusx/kbdusx.def | 8 -------- reactos/dll/keyboard/kbdusx/kbdusx.rbuild | 3 ++- reactos/dll/keyboard/kbdusx/kbdusx.spec | 1 + reactos/dll/keyboard/kbduzb/kbduzb.def | 8 -------- reactos/dll/keyboard/kbduzb/kbduzb.rbuild | 3 ++- reactos/dll/keyboard/kbduzb/kbduzb.spec | 1 + reactos/dll/keyboard/kbdvntc/kbdvntc.def | 8 -------- reactos/dll/keyboard/kbdvntc/kbdvntc.rbuild | 3 ++- reactos/dll/keyboard/kbdvntc/kbdvntc.spec | 1 + reactos/dll/keyboard/kbdycc/kbdycc.def | 8 -------- reactos/dll/keyboard/kbdycc/kbdycc.rbuild | 3 ++- reactos/dll/keyboard/kbdycc/kbdycc.spec | 1 + reactos/dll/keyboard/kbdycl/kbdycl.def | 8 -------- reactos/dll/keyboard/kbdycl/kbdycl.rbuild | 3 ++- reactos/dll/keyboard/kbdycl/kbdycl.spec | 1 + 234 files changed, 251 insertions(+), 689 deletions(-) delete mode 100644 reactos/dll/keyboard/kbda1/kbda1.def create mode 100644 reactos/dll/keyboard/kbda1/kbda1.spec delete mode 100644 reactos/dll/keyboard/kbda2/kbda2.def create mode 100644 reactos/dll/keyboard/kbda2/kbda2.spec delete mode 100644 reactos/dll/keyboard/kbda3/kbda3.def create mode 100644 reactos/dll/keyboard/kbda3/kbda3.spec delete mode 100644 reactos/dll/keyboard/kbdal/kbdal.def create mode 100644 reactos/dll/keyboard/kbdal/kbdal.spec delete mode 100644 reactos/dll/keyboard/kbdarme/kbdarme.def create mode 100644 reactos/dll/keyboard/kbdarme/kbdarme.spec delete mode 100644 reactos/dll/keyboard/kbdarmw/kbdarmw.def create mode 100644 reactos/dll/keyboard/kbdarmw/kbdarmw.spec delete mode 100644 reactos/dll/keyboard/kbdaze/kbdaze.def create mode 100644 reactos/dll/keyboard/kbdaze/kbdaze.spec delete mode 100644 reactos/dll/keyboard/kbdazel/kbdazel.def create mode 100644 reactos/dll/keyboard/kbdazel/kbdazel.spec delete mode 100644 reactos/dll/keyboard/kbdbe/kbdbe.def create mode 100644 reactos/dll/keyboard/kbdbe/kbdbe.spec delete mode 100644 reactos/dll/keyboard/kbdbga/kbdbga.def create mode 100644 reactos/dll/keyboard/kbdbga/kbdbga.spec delete mode 100644 reactos/dll/keyboard/kbdbgm/kbdbgm.def create mode 100644 reactos/dll/keyboard/kbdbgm/kbdbgm.spec delete mode 100644 reactos/dll/keyboard/kbdbgt/kbdbgt.def create mode 100644 reactos/dll/keyboard/kbdbgt/kbdbgt.spec delete mode 100644 reactos/dll/keyboard/kbdblr/kbdblr.def create mode 100644 reactos/dll/keyboard/kbdblr/kbdblr.spec delete mode 100644 reactos/dll/keyboard/kbdbr/kbdbr.def create mode 100644 reactos/dll/keyboard/kbdbr/kbdbr.spec delete mode 100644 reactos/dll/keyboard/kbdbur/kbdbur.def create mode 100644 reactos/dll/keyboard/kbdbur/kbdbur.spec delete mode 100644 reactos/dll/keyboard/kbdcan/kbdcan.def create mode 100644 reactos/dll/keyboard/kbdcan/kbdcan.spec delete mode 100644 reactos/dll/keyboard/kbdcr/kbdcr.def create mode 100644 reactos/dll/keyboard/kbdcr/kbdcr.spec delete mode 100644 reactos/dll/keyboard/kbdcz1/kbdcz1.def create mode 100644 reactos/dll/keyboard/kbdcz1/kbdcz1.spec delete mode 100644 reactos/dll/keyboard/kbdda/kbdda.def create mode 100644 reactos/dll/keyboard/kbdda/kbdda.spec delete mode 100644 reactos/dll/keyboard/kbddv/kbddv.def create mode 100644 reactos/dll/keyboard/kbddv/kbddv.spec delete mode 100644 reactos/dll/keyboard/kbdes/kbdes.def create mode 100644 reactos/dll/keyboard/kbdes/kbdes.spec delete mode 100644 reactos/dll/keyboard/kbdest/kbdest.def create mode 100644 reactos/dll/keyboard/kbdest/kbdest.spec delete mode 100644 reactos/dll/keyboard/kbdfc/kbdfc.def create mode 100644 reactos/dll/keyboard/kbdfc/kbdfc.spec delete mode 100644 reactos/dll/keyboard/kbdfi/kbdfi.def create mode 100644 reactos/dll/keyboard/kbdfi/kbdfi.spec delete mode 100644 reactos/dll/keyboard/kbdfr/kbdfr.def create mode 100644 reactos/dll/keyboard/kbdfr/kbdfr.spec delete mode 100644 reactos/dll/keyboard/kbdgeo/kbdgeo.def create mode 100644 reactos/dll/keyboard/kbdgeo/kbdgeo.spec delete mode 100644 reactos/dll/keyboard/kbdgerg/kbdgerg.def create mode 100644 reactos/dll/keyboard/kbdgerg/kbdgerg.spec delete mode 100644 reactos/dll/keyboard/kbdgneo/kbdgneo.def create mode 100644 reactos/dll/keyboard/kbdgneo/kbdgneo.spec delete mode 100644 reactos/dll/keyboard/kbdgr/kbdgr.def create mode 100644 reactos/dll/keyboard/kbdgr/kbdgr.spec delete mode 100644 reactos/dll/keyboard/kbdgrist/kbdgrist.def create mode 100644 reactos/dll/keyboard/kbdgrist/kbdgrist.spec delete mode 100644 reactos/dll/keyboard/kbdhe/kbdhe.def create mode 100644 reactos/dll/keyboard/kbdhe/kbdhe.spec delete mode 100644 reactos/dll/keyboard/kbdheb/kbdheb.def create mode 100644 reactos/dll/keyboard/kbdheb/kbdheb.spec delete mode 100644 reactos/dll/keyboard/kbdhu/kbdhu.def create mode 100644 reactos/dll/keyboard/kbdhu/kbdhu.spec delete mode 100644 reactos/dll/keyboard/kbdic/kbdic.def create mode 100644 reactos/dll/keyboard/kbdic/kbdic.spec delete mode 100644 reactos/dll/keyboard/kbdinasa/kbdinasa.def create mode 100644 reactos/dll/keyboard/kbdinasa/kbdinasa.spec delete mode 100644 reactos/dll/keyboard/kbdinben/kbdinben.def create mode 100644 reactos/dll/keyboard/kbdinben/kbdinben.spec delete mode 100644 reactos/dll/keyboard/kbdindev/kbdindev.def create mode 100644 reactos/dll/keyboard/kbdindev/kbdindev.spec delete mode 100644 reactos/dll/keyboard/kbdinguj/kbdinguj.def create mode 100644 reactos/dll/keyboard/kbdinguj/kbdinguj.spec delete mode 100644 reactos/dll/keyboard/kbdinmal/kbdinmal.def create mode 100644 reactos/dll/keyboard/kbdinmal/kbdinmal.spec delete mode 100644 reactos/dll/keyboard/kbdir/kbdir.def create mode 100644 reactos/dll/keyboard/kbdir/kbdir.spec delete mode 100644 reactos/dll/keyboard/kbdit/kbdit.def create mode 100644 reactos/dll/keyboard/kbdit/kbdit.spec delete mode 100644 reactos/dll/keyboard/kbdja/kbdja.def create mode 100644 reactos/dll/keyboard/kbdja/kbdja.spec delete mode 100644 reactos/dll/keyboard/kbdkaz/kbdkaz.def create mode 100644 reactos/dll/keyboard/kbdkaz/kbdkaz.spec delete mode 100644 reactos/dll/keyboard/kbdko/kbdko.def create mode 100644 reactos/dll/keyboard/kbdko/kbdko.spec delete mode 100644 reactos/dll/keyboard/kbdla/kbdla.def create mode 100644 reactos/dll/keyboard/kbdla/kbdla.spec delete mode 100644 reactos/dll/keyboard/kbdlt/kbdlt.def create mode 100644 reactos/dll/keyboard/kbdlt/kbdlt.spec delete mode 100644 reactos/dll/keyboard/kbdlv/kbdlv.def create mode 100644 reactos/dll/keyboard/kbdlv/kbdlv.spec delete mode 100644 reactos/dll/keyboard/kbdmac/kbdmac.def create mode 100644 reactos/dll/keyboard/kbdmac/kbdmac.spec delete mode 100644 reactos/dll/keyboard/kbdne/kbdne.def create mode 100644 reactos/dll/keyboard/kbdne/kbdne.spec delete mode 100644 reactos/dll/keyboard/kbdno/kbdno.def create mode 100644 reactos/dll/keyboard/kbdno/kbdno.spec delete mode 100644 reactos/dll/keyboard/kbdpl1/kbdpl1.def create mode 100644 reactos/dll/keyboard/kbdpl1/kbdpl1.spec delete mode 100644 reactos/dll/keyboard/kbdpo/kbdpo.def create mode 100644 reactos/dll/keyboard/kbdpo/kbdpo.spec delete mode 100644 reactos/dll/keyboard/kbdro/kbdro.def create mode 100644 reactos/dll/keyboard/kbdro/kbdro.spec delete mode 100644 reactos/dll/keyboard/kbdru/kbdru.def create mode 100644 reactos/dll/keyboard/kbdru/kbdru.spec delete mode 100644 reactos/dll/keyboard/kbdru1/kbdru1.def create mode 100644 reactos/dll/keyboard/kbdru1/kbdru1.spec delete mode 100644 reactos/dll/keyboard/kbdsg/kbdsg.def create mode 100644 reactos/dll/keyboard/kbdsg/kbdsg.spec delete mode 100644 reactos/dll/keyboard/kbdsk/kbdsk.def create mode 100644 reactos/dll/keyboard/kbdsk/kbdsk.spec delete mode 100644 reactos/dll/keyboard/kbdsk1/kbdsk1.def create mode 100644 reactos/dll/keyboard/kbdsk1/kbdsk1.spec delete mode 100644 reactos/dll/keyboard/kbdsw/kbdsw.def create mode 100644 reactos/dll/keyboard/kbdsw/kbdsw.spec delete mode 100644 reactos/dll/keyboard/kbdtat/kbdtat.def create mode 100644 reactos/dll/keyboard/kbdtat/kbdtat.spec delete mode 100644 reactos/dll/keyboard/kbdth0/kbdth0.def create mode 100644 reactos/dll/keyboard/kbdth0/kbdth0.spec delete mode 100644 reactos/dll/keyboard/kbdth1/kbdth1.def create mode 100644 reactos/dll/keyboard/kbdth1/kbdth1.spec delete mode 100644 reactos/dll/keyboard/kbdth2/kbdth2.def create mode 100644 reactos/dll/keyboard/kbdth2/kbdth2.spec delete mode 100644 reactos/dll/keyboard/kbdth3/kbdth3.def create mode 100644 reactos/dll/keyboard/kbdth3/kbdth3.spec delete mode 100644 reactos/dll/keyboard/kbdtuf/kbdtuf.def create mode 100644 reactos/dll/keyboard/kbdtuf/kbdtuf.spec delete mode 100644 reactos/dll/keyboard/kbdtuq/kbdtuq.def create mode 100644 reactos/dll/keyboard/kbdtuq/kbdtuq.spec delete mode 100644 reactos/dll/keyboard/kbduk/kbduk.def create mode 100644 reactos/dll/keyboard/kbduk/kbduk.spec delete mode 100644 reactos/dll/keyboard/kbdur/kbdur.def create mode 100644 reactos/dll/keyboard/kbdur/kbdur.spec delete mode 100644 reactos/dll/keyboard/kbdurs/kbdurs.def create mode 100644 reactos/dll/keyboard/kbdurs/kbdurs.spec delete mode 100644 reactos/dll/keyboard/kbdus/kbdus.def create mode 100644 reactos/dll/keyboard/kbdus/kbdus.spec delete mode 100644 reactos/dll/keyboard/kbdusa/kbdusa.def create mode 100644 reactos/dll/keyboard/kbdusa/kbdusa.spec delete mode 100644 reactos/dll/keyboard/kbdusl/kbdusl.def create mode 100644 reactos/dll/keyboard/kbdusl/kbdusl.spec delete mode 100644 reactos/dll/keyboard/kbdusr/kbdusr.def create mode 100644 reactos/dll/keyboard/kbdusr/kbdusr.spec delete mode 100644 reactos/dll/keyboard/kbdusx/kbdusx.def create mode 100644 reactos/dll/keyboard/kbdusx/kbdusx.spec delete mode 100644 reactos/dll/keyboard/kbduzb/kbduzb.def create mode 100644 reactos/dll/keyboard/kbduzb/kbduzb.spec delete mode 100644 reactos/dll/keyboard/kbdvntc/kbdvntc.def create mode 100644 reactos/dll/keyboard/kbdvntc/kbdvntc.spec delete mode 100644 reactos/dll/keyboard/kbdycc/kbdycc.def create mode 100644 reactos/dll/keyboard/kbdycc/kbdycc.spec delete mode 100644 reactos/dll/keyboard/kbdycl/kbdycl.def create mode 100644 reactos/dll/keyboard/kbdycl/kbdycl.spec diff --git a/reactos/dll/keyboard/kbda1/kbda1.def b/reactos/dll/keyboard/kbda1/kbda1.def deleted file mode 100644 index 8bc15d20854..00000000000 --- a/reactos/dll/keyboard/kbda1/kbda1.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbda1.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbda1/kbda1.rbuild b/reactos/dll/keyboard/kbda1/kbda1.rbuild index 9313180bb3f..f4535a84a1d 100644 --- a/reactos/dll/keyboard/kbda1/kbda1.rbuild +++ b/reactos/dll/keyboard/kbda1/kbda1.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbda1.c kbda1.rc + kbda1.spec diff --git a/reactos/dll/keyboard/kbda1/kbda1.spec b/reactos/dll/keyboard/kbda1/kbda1.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbda1/kbda1.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbda2/kbda2.def b/reactos/dll/keyboard/kbda2/kbda2.def deleted file mode 100644 index 87fc02ac6f3..00000000000 --- a/reactos/dll/keyboard/kbda2/kbda2.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbda2.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbda2/kbda2.rbuild b/reactos/dll/keyboard/kbda2/kbda2.rbuild index 97dc1f5a08b..13c311dae83 100644 --- a/reactos/dll/keyboard/kbda2/kbda2.rbuild +++ b/reactos/dll/keyboard/kbda2/kbda2.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbda2.c kbda2.rc + kbda2.spec diff --git a/reactos/dll/keyboard/kbda2/kbda2.spec b/reactos/dll/keyboard/kbda2/kbda2.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbda2/kbda2.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbda3/kbda3.def b/reactos/dll/keyboard/kbda3/kbda3.def deleted file mode 100644 index 2307d7d0c97..00000000000 --- a/reactos/dll/keyboard/kbda3/kbda3.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbda3.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbda3/kbda3.rbuild b/reactos/dll/keyboard/kbda3/kbda3.rbuild index 1eb53a9cabf..b3d213c52aa 100644 --- a/reactos/dll/keyboard/kbda3/kbda3.rbuild +++ b/reactos/dll/keyboard/kbda3/kbda3.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbda3.c kbda3.rc + kbda3.spec diff --git a/reactos/dll/keyboard/kbda3/kbda3.spec b/reactos/dll/keyboard/kbda3/kbda3.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbda3/kbda3.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdal/kbdal.def b/reactos/dll/keyboard/kbdal/kbdal.def deleted file mode 100644 index 355652b15e6..00000000000 --- a/reactos/dll/keyboard/kbdal/kbdal.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdal.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdal/kbdal.rbuild b/reactos/dll/keyboard/kbdal/kbdal.rbuild index 63bfe56e911..e45eb3d8862 100644 --- a/reactos/dll/keyboard/kbdal/kbdal.rbuild +++ b/reactos/dll/keyboard/kbdal/kbdal.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdal.c kbdal.rc + kbdal.spec diff --git a/reactos/dll/keyboard/kbdal/kbdal.spec b/reactos/dll/keyboard/kbdal/kbdal.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdal/kbdal.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdarme/kbdarme.def b/reactos/dll/keyboard/kbdarme/kbdarme.def deleted file mode 100644 index c56d24b9308..00000000000 --- a/reactos/dll/keyboard/kbdarme/kbdarme.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdarme.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdarme/kbdarme.rbuild b/reactos/dll/keyboard/kbdarme/kbdarme.rbuild index d3e67d0c184..008efd44374 100644 --- a/reactos/dll/keyboard/kbdarme/kbdarme.rbuild +++ b/reactos/dll/keyboard/kbdarme/kbdarme.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdarme.c kbdarme.rc + kbdarme.spec diff --git a/reactos/dll/keyboard/kbdarme/kbdarme.spec b/reactos/dll/keyboard/kbdarme/kbdarme.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdarme/kbdarme.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdarmw/kbdarmw.def b/reactos/dll/keyboard/kbdarmw/kbdarmw.def deleted file mode 100644 index 4676a69a6dc..00000000000 --- a/reactos/dll/keyboard/kbdarmw/kbdarmw.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdarmw.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdarmw/kbdarmw.rbuild b/reactos/dll/keyboard/kbdarmw/kbdarmw.rbuild index 95f0ec39d78..37383830f23 100644 --- a/reactos/dll/keyboard/kbdarmw/kbdarmw.rbuild +++ b/reactos/dll/keyboard/kbdarmw/kbdarmw.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdarmw.c kbdarmw.rc + kbdarmw.spec diff --git a/reactos/dll/keyboard/kbdarmw/kbdarmw.spec b/reactos/dll/keyboard/kbdarmw/kbdarmw.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdarmw/kbdarmw.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdaze/kbdaze.def b/reactos/dll/keyboard/kbdaze/kbdaze.def deleted file mode 100644 index f4c189d5fbb..00000000000 --- a/reactos/dll/keyboard/kbdaze/kbdaze.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdaze.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdaze/kbdaze.rbuild b/reactos/dll/keyboard/kbdaze/kbdaze.rbuild index 8c0e518a9dd..fdeeb8af0e0 100644 --- a/reactos/dll/keyboard/kbdaze/kbdaze.rbuild +++ b/reactos/dll/keyboard/kbdaze/kbdaze.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdaze.c kbdaze.rc + kbdaze.spec diff --git a/reactos/dll/keyboard/kbdaze/kbdaze.spec b/reactos/dll/keyboard/kbdaze/kbdaze.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdaze/kbdaze.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdazel/kbdazel.def b/reactos/dll/keyboard/kbdazel/kbdazel.def deleted file mode 100644 index bcfe3e493dd..00000000000 --- a/reactos/dll/keyboard/kbdazel/kbdazel.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdazel.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdazel/kbdazel.rbuild b/reactos/dll/keyboard/kbdazel/kbdazel.rbuild index b10de660563..3011162513c 100644 --- a/reactos/dll/keyboard/kbdazel/kbdazel.rbuild +++ b/reactos/dll/keyboard/kbdazel/kbdazel.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdazel.c kbdazel.rc + kbdazel.spec diff --git a/reactos/dll/keyboard/kbdazel/kbdazel.spec b/reactos/dll/keyboard/kbdazel/kbdazel.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdazel/kbdazel.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdbe/kbdbe.def b/reactos/dll/keyboard/kbdbe/kbdbe.def deleted file mode 100644 index ea0271f832a..00000000000 --- a/reactos/dll/keyboard/kbdbe/kbdbe.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdbe.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdbe/kbdbe.rbuild b/reactos/dll/keyboard/kbdbe/kbdbe.rbuild index 6bc1bc70e29..d17d60ce6ca 100644 --- a/reactos/dll/keyboard/kbdbe/kbdbe.rbuild +++ b/reactos/dll/keyboard/kbdbe/kbdbe.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdbe.c kbdbe.rc + kbdbe.spec diff --git a/reactos/dll/keyboard/kbdbe/kbdbe.spec b/reactos/dll/keyboard/kbdbe/kbdbe.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdbe/kbdbe.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdbga/kbdbga.def b/reactos/dll/keyboard/kbdbga/kbdbga.def deleted file mode 100644 index 4858a5fb570..00000000000 --- a/reactos/dll/keyboard/kbdbga/kbdbga.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdbga.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdbga/kbdbga.rbuild b/reactos/dll/keyboard/kbdbga/kbdbga.rbuild index 1dc758883c6..70aabd09dd2 100644 --- a/reactos/dll/keyboard/kbdbga/kbdbga.rbuild +++ b/reactos/dll/keyboard/kbdbga/kbdbga.rbuild @@ -1,9 +1,11 @@ + + - + include - 0x0500 kbdbga.c kbdbga.rc - \ No newline at end of file + kbdbga.spec + diff --git a/reactos/dll/keyboard/kbdbga/kbdbga.spec b/reactos/dll/keyboard/kbdbga/kbdbga.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdbga/kbdbga.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdbgm/kbdbgm.def b/reactos/dll/keyboard/kbdbgm/kbdbgm.def deleted file mode 100644 index 79314113131..00000000000 --- a/reactos/dll/keyboard/kbdbgm/kbdbgm.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdbgm.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdbgm/kbdbgm.rbuild b/reactos/dll/keyboard/kbdbgm/kbdbgm.rbuild index 1eb705ceaa1..1bad67104e9 100644 --- a/reactos/dll/keyboard/kbdbgm/kbdbgm.rbuild +++ b/reactos/dll/keyboard/kbdbgm/kbdbgm.rbuild @@ -1,9 +1,11 @@ + + - + include - 0x0500 kbdbgm.c kbdbgm.rc + kbdbgm.spec diff --git a/reactos/dll/keyboard/kbdbgm/kbdbgm.spec b/reactos/dll/keyboard/kbdbgm/kbdbgm.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdbgm/kbdbgm.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdbgt/kbdbgt.def b/reactos/dll/keyboard/kbdbgt/kbdbgt.def deleted file mode 100644 index 4519422ee14..00000000000 --- a/reactos/dll/keyboard/kbdbgt/kbdbgt.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdbgt.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdbgt/kbdbgt.rbuild b/reactos/dll/keyboard/kbdbgt/kbdbgt.rbuild index 4dbc6c42bf3..43d911488c9 100644 --- a/reactos/dll/keyboard/kbdbgt/kbdbgt.rbuild +++ b/reactos/dll/keyboard/kbdbgt/kbdbgt.rbuild @@ -1,9 +1,11 @@ + + - + include - 0x0500 kbdbgt.c kbdbgt.rc - \ No newline at end of file + kbdbgt.spec + diff --git a/reactos/dll/keyboard/kbdbgt/kbdbgt.spec b/reactos/dll/keyboard/kbdbgt/kbdbgt.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdbgt/kbdbgt.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdblr/kbdblr.def b/reactos/dll/keyboard/kbdblr/kbdblr.def deleted file mode 100644 index 982da6f0d04..00000000000 --- a/reactos/dll/keyboard/kbdblr/kbdblr.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdblr.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdblr/kbdblr.rbuild b/reactos/dll/keyboard/kbdblr/kbdblr.rbuild index e9a4b2f5fd1..51303bb3408 100644 --- a/reactos/dll/keyboard/kbdblr/kbdblr.rbuild +++ b/reactos/dll/keyboard/kbdblr/kbdblr.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdblr.c kbdblr.rc + kbdblr.spec diff --git a/reactos/dll/keyboard/kbdblr/kbdblr.spec b/reactos/dll/keyboard/kbdblr/kbdblr.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdblr/kbdblr.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdbr/kbdbr.def b/reactos/dll/keyboard/kbdbr/kbdbr.def deleted file mode 100644 index 689997ab55f..00000000000 --- a/reactos/dll/keyboard/kbdbr/kbdbr.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdbr.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdbr/kbdbr.rbuild b/reactos/dll/keyboard/kbdbr/kbdbr.rbuild index a38a8caa49b..e0a2d6d7bb2 100644 --- a/reactos/dll/keyboard/kbdbr/kbdbr.rbuild +++ b/reactos/dll/keyboard/kbdbr/kbdbr.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdbr.c kbdbr.rc + kbdbr.spec diff --git a/reactos/dll/keyboard/kbdbr/kbdbr.spec b/reactos/dll/keyboard/kbdbr/kbdbr.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdbr/kbdbr.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdbur/kbdbur.def b/reactos/dll/keyboard/kbdbur/kbdbur.def deleted file mode 100644 index 3bf311d6b7d..00000000000 --- a/reactos/dll/keyboard/kbdbur/kbdbur.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdbur.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdbur/kbdbur.rbuild b/reactos/dll/keyboard/kbdbur/kbdbur.rbuild index 4d9c588410f..81efd760fcb 100644 --- a/reactos/dll/keyboard/kbdbur/kbdbur.rbuild +++ b/reactos/dll/keyboard/kbdbur/kbdbur.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdbur.c kbdbur.rc + kbdbur.spec diff --git a/reactos/dll/keyboard/kbdbur/kbdbur.spec b/reactos/dll/keyboard/kbdbur/kbdbur.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdbur/kbdbur.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdcan/kbdcan.def b/reactos/dll/keyboard/kbdcan/kbdcan.def deleted file mode 100644 index 3f0ed6f0168..00000000000 --- a/reactos/dll/keyboard/kbdcan/kbdcan.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdcan.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdcan/kbdcan.rbuild b/reactos/dll/keyboard/kbdcan/kbdcan.rbuild index 48bd041cbc3..9857e8f2f3b 100644 --- a/reactos/dll/keyboard/kbdcan/kbdcan.rbuild +++ b/reactos/dll/keyboard/kbdcan/kbdcan.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdcan.c kbdcan.rc + kbdcan.spec diff --git a/reactos/dll/keyboard/kbdcan/kbdcan.spec b/reactos/dll/keyboard/kbdcan/kbdcan.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdcan/kbdcan.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdcr/kbdcr.def b/reactos/dll/keyboard/kbdcr/kbdcr.def deleted file mode 100644 index 2f63ec4826c..00000000000 --- a/reactos/dll/keyboard/kbdcr/kbdcr.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdcr.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdcr/kbdcr.rbuild b/reactos/dll/keyboard/kbdcr/kbdcr.rbuild index 5ed8bb001ec..f709a9eb03c 100644 --- a/reactos/dll/keyboard/kbdcr/kbdcr.rbuild +++ b/reactos/dll/keyboard/kbdcr/kbdcr.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdcr.c kbdcr.rc + kbdcr.spec diff --git a/reactos/dll/keyboard/kbdcr/kbdcr.spec b/reactos/dll/keyboard/kbdcr/kbdcr.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdcr/kbdcr.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdcz1/kbdcz1.def b/reactos/dll/keyboard/kbdcz1/kbdcz1.def deleted file mode 100644 index 1a9a6c20957..00000000000 --- a/reactos/dll/keyboard/kbdcz1/kbdcz1.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdcz1.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdcz1/kbdcz1.rbuild b/reactos/dll/keyboard/kbdcz1/kbdcz1.rbuild index ed6e50ae887..c9d22a60f84 100644 --- a/reactos/dll/keyboard/kbdcz1/kbdcz1.rbuild +++ b/reactos/dll/keyboard/kbdcz1/kbdcz1.rbuild @@ -1,8 +1,11 @@ + + - + include 0x0500 kbdcz1.c kbdcz1.rc + kbdcz1.spec diff --git a/reactos/dll/keyboard/kbdcz1/kbdcz1.spec b/reactos/dll/keyboard/kbdcz1/kbdcz1.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdcz1/kbdcz1.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdda/kbdda.def b/reactos/dll/keyboard/kbdda/kbdda.def deleted file mode 100644 index 27d0cf710c0..00000000000 --- a/reactos/dll/keyboard/kbdda/kbdda.def +++ /dev/null @@ -1,3 +0,0 @@ -LIBRARY kbdda.dll -EXPORTS -KbdLayerDescriptor@0 diff --git a/reactos/dll/keyboard/kbdda/kbdda.rbuild b/reactos/dll/keyboard/kbdda/kbdda.rbuild index 158320d2718..b3582afa281 100644 --- a/reactos/dll/keyboard/kbdda/kbdda.rbuild +++ b/reactos/dll/keyboard/kbdda/kbdda.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdda.c kbdda.rc + kbdda.spec diff --git a/reactos/dll/keyboard/kbdda/kbdda.spec b/reactos/dll/keyboard/kbdda/kbdda.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdda/kbdda.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbddv/kbddv.def b/reactos/dll/keyboard/kbddv/kbddv.def deleted file mode 100644 index c5c76997bc9..00000000000 --- a/reactos/dll/keyboard/kbddv/kbddv.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbddv.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbddv/kbddv.rbuild b/reactos/dll/keyboard/kbddv/kbddv.rbuild index dadbcada6ed..89a765ca6a0 100644 --- a/reactos/dll/keyboard/kbddv/kbddv.rbuild +++ b/reactos/dll/keyboard/kbddv/kbddv.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbddv.c kbddv.rc + kbddv.spec diff --git a/reactos/dll/keyboard/kbddv/kbddv.spec b/reactos/dll/keyboard/kbddv/kbddv.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbddv/kbddv.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdes/kbdes.def b/reactos/dll/keyboard/kbdes/kbdes.def deleted file mode 100644 index e475fe442c0..00000000000 --- a/reactos/dll/keyboard/kbdes/kbdes.def +++ /dev/null @@ -1,4 +0,0 @@ -LIBRARY kbdes.dll - -EXPORTS -KbdLayerDescriptor@0 \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdes/kbdes.rbuild b/reactos/dll/keyboard/kbdes/kbdes.rbuild index b1f41d18836..45cfdf8cd34 100644 --- a/reactos/dll/keyboard/kbdes/kbdes.rbuild +++ b/reactos/dll/keyboard/kbdes/kbdes.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdes.c kbdes.rc + kbdes.spec diff --git a/reactos/dll/keyboard/kbdes/kbdes.spec b/reactos/dll/keyboard/kbdes/kbdes.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdes/kbdes.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdest/kbdest.def b/reactos/dll/keyboard/kbdest/kbdest.def deleted file mode 100644 index b3eae444615..00000000000 --- a/reactos/dll/keyboard/kbdest/kbdest.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdest.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdest/kbdest.rbuild b/reactos/dll/keyboard/kbdest/kbdest.rbuild index 1af9e6986ac..39c3b196b6b 100644 --- a/reactos/dll/keyboard/kbdest/kbdest.rbuild +++ b/reactos/dll/keyboard/kbdest/kbdest.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdest.c kbdest.rc + kbdest.spec diff --git a/reactos/dll/keyboard/kbdest/kbdest.spec b/reactos/dll/keyboard/kbdest/kbdest.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdest/kbdest.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdfc/kbdfc.def b/reactos/dll/keyboard/kbdfc/kbdfc.def deleted file mode 100644 index 6e55ed40d9b..00000000000 --- a/reactos/dll/keyboard/kbdfc/kbdfc.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdfc.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdfc/kbdfc.rbuild b/reactos/dll/keyboard/kbdfc/kbdfc.rbuild index 1830f18e6c0..7d20ce4c4b1 100644 --- a/reactos/dll/keyboard/kbdfc/kbdfc.rbuild +++ b/reactos/dll/keyboard/kbdfc/kbdfc.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdfc.c kbdfc.rc + kbdfc.spec diff --git a/reactos/dll/keyboard/kbdfc/kbdfc.spec b/reactos/dll/keyboard/kbdfc/kbdfc.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdfc/kbdfc.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdfi/kbdfi.def b/reactos/dll/keyboard/kbdfi/kbdfi.def deleted file mode 100644 index 4ad11b5df1b..00000000000 --- a/reactos/dll/keyboard/kbdfi/kbdfi.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdfi.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdfi/kbdfi.rbuild b/reactos/dll/keyboard/kbdfi/kbdfi.rbuild index cb801859e28..8def34916a1 100644 --- a/reactos/dll/keyboard/kbdfi/kbdfi.rbuild +++ b/reactos/dll/keyboard/kbdfi/kbdfi.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdfi.c kbdfi.rc + kbdfi.spec diff --git a/reactos/dll/keyboard/kbdfi/kbdfi.spec b/reactos/dll/keyboard/kbdfi/kbdfi.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdfi/kbdfi.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdfr/kbdfr.def b/reactos/dll/keyboard/kbdfr/kbdfr.def deleted file mode 100644 index a880573f8ca..00000000000 --- a/reactos/dll/keyboard/kbdfr/kbdfr.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdfr.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdfr/kbdfr.rbuild b/reactos/dll/keyboard/kbdfr/kbdfr.rbuild index dfd9e99d638..3b9251409c1 100644 --- a/reactos/dll/keyboard/kbdfr/kbdfr.rbuild +++ b/reactos/dll/keyboard/kbdfr/kbdfr.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdfr.c kbdfr.rc + kbdfr.spec diff --git a/reactos/dll/keyboard/kbdfr/kbdfr.spec b/reactos/dll/keyboard/kbdfr/kbdfr.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdfr/kbdfr.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdgeo/kbdgeo.def b/reactos/dll/keyboard/kbdgeo/kbdgeo.def deleted file mode 100644 index d32ef61a8d2..00000000000 --- a/reactos/dll/keyboard/kbdgeo/kbdgeo.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdgeo.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdgeo/kbdgeo.rbuild b/reactos/dll/keyboard/kbdgeo/kbdgeo.rbuild index 73ea7494b0b..cf930f80c1b 100644 --- a/reactos/dll/keyboard/kbdgeo/kbdgeo.rbuild +++ b/reactos/dll/keyboard/kbdgeo/kbdgeo.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdgeo.c kbdgeo.rc + kbdgeo.spec diff --git a/reactos/dll/keyboard/kbdgeo/kbdgeo.spec b/reactos/dll/keyboard/kbdgeo/kbdgeo.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdgeo/kbdgeo.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdgerg/kbdgerg.def b/reactos/dll/keyboard/kbdgerg/kbdgerg.def deleted file mode 100644 index fcc567eec63..00000000000 --- a/reactos/dll/keyboard/kbdgerg/kbdgerg.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdgerg.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdgerg/kbdgerg.rbuild b/reactos/dll/keyboard/kbdgerg/kbdgerg.rbuild index edb55b8c96b..5f282da5e46 100644 --- a/reactos/dll/keyboard/kbdgerg/kbdgerg.rbuild +++ b/reactos/dll/keyboard/kbdgerg/kbdgerg.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdgerg.c kbdgerg.rc + kbdgerg.spec diff --git a/reactos/dll/keyboard/kbdgerg/kbdgerg.spec b/reactos/dll/keyboard/kbdgerg/kbdgerg.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdgerg/kbdgerg.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdgneo/kbdgneo.def b/reactos/dll/keyboard/kbdgneo/kbdgneo.def deleted file mode 100644 index 56245f911c4..00000000000 --- a/reactos/dll/keyboard/kbdgneo/kbdgneo.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdgneo.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdgneo/kbdgneo.rbuild b/reactos/dll/keyboard/kbdgneo/kbdgneo.rbuild index 8356048e75d..44403a40538 100644 --- a/reactos/dll/keyboard/kbdgneo/kbdgneo.rbuild +++ b/reactos/dll/keyboard/kbdgneo/kbdgneo.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdgneo.c kbdgneo.rc + kbdgneo.spec diff --git a/reactos/dll/keyboard/kbdgneo/kbdgneo.spec b/reactos/dll/keyboard/kbdgneo/kbdgneo.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdgneo/kbdgneo.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdgr/kbdgr.def b/reactos/dll/keyboard/kbdgr/kbdgr.def deleted file mode 100644 index 7dc7cadfdad..00000000000 --- a/reactos/dll/keyboard/kbdgr/kbdgr.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdgr.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdgr/kbdgr.rbuild b/reactos/dll/keyboard/kbdgr/kbdgr.rbuild index defc5c6591b..d992f6ec3e7 100644 --- a/reactos/dll/keyboard/kbdgr/kbdgr.rbuild +++ b/reactos/dll/keyboard/kbdgr/kbdgr.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdgr.c kbdgr.rc + kbdgr.spec diff --git a/reactos/dll/keyboard/kbdgr/kbdgr.spec b/reactos/dll/keyboard/kbdgr/kbdgr.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdgr/kbdgr.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdgrist/kbdgrist.def b/reactos/dll/keyboard/kbdgrist/kbdgrist.def deleted file mode 100644 index 75a113eeab9..00000000000 --- a/reactos/dll/keyboard/kbdgrist/kbdgrist.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdgrist.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdgrist/kbdgrist.rbuild b/reactos/dll/keyboard/kbdgrist/kbdgrist.rbuild index 9e01bd02996..5f228231848 100644 --- a/reactos/dll/keyboard/kbdgrist/kbdgrist.rbuild +++ b/reactos/dll/keyboard/kbdgrist/kbdgrist.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdgrist.c kbdgrist.rc + kbdgrist.spec diff --git a/reactos/dll/keyboard/kbdgrist/kbdgrist.spec b/reactos/dll/keyboard/kbdgrist/kbdgrist.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdgrist/kbdgrist.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdhe/kbdhe.def b/reactos/dll/keyboard/kbdhe/kbdhe.def deleted file mode 100644 index 53beb921709..00000000000 --- a/reactos/dll/keyboard/kbdhe/kbdhe.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdhe.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdhe/kbdhe.rbuild b/reactos/dll/keyboard/kbdhe/kbdhe.rbuild index 167be200609..8dfa25cde1f 100644 --- a/reactos/dll/keyboard/kbdhe/kbdhe.rbuild +++ b/reactos/dll/keyboard/kbdhe/kbdhe.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdhe.c kbdhe.rc - \ No newline at end of file + kbdhe.spec + diff --git a/reactos/dll/keyboard/kbdhe/kbdhe.spec b/reactos/dll/keyboard/kbdhe/kbdhe.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdhe/kbdhe.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdheb/kbdheb.def b/reactos/dll/keyboard/kbdheb/kbdheb.def deleted file mode 100644 index 763d231df8e..00000000000 --- a/reactos/dll/keyboard/kbdheb/kbdheb.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdheb.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdheb/kbdheb.rbuild b/reactos/dll/keyboard/kbdheb/kbdheb.rbuild index 6dbb9de501d..f163665fc92 100644 --- a/reactos/dll/keyboard/kbdheb/kbdheb.rbuild +++ b/reactos/dll/keyboard/kbdheb/kbdheb.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdheb.c kbdheb.rc - \ No newline at end of file + kbdheb.spec + diff --git a/reactos/dll/keyboard/kbdheb/kbdheb.spec b/reactos/dll/keyboard/kbdheb/kbdheb.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdheb/kbdheb.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdhu/kbdhu.def b/reactos/dll/keyboard/kbdhu/kbdhu.def deleted file mode 100644 index ff47310dfc4..00000000000 --- a/reactos/dll/keyboard/kbdhu/kbdhu.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdhu.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdhu/kbdhu.rbuild b/reactos/dll/keyboard/kbdhu/kbdhu.rbuild index 89cb4f9f111..33d5a8ae5fa 100644 --- a/reactos/dll/keyboard/kbdhu/kbdhu.rbuild +++ b/reactos/dll/keyboard/kbdhu/kbdhu.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdhu.c kbdhu.rc + kbdhu.spec diff --git a/reactos/dll/keyboard/kbdhu/kbdhu.spec b/reactos/dll/keyboard/kbdhu/kbdhu.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdhu/kbdhu.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdic/kbdic.def b/reactos/dll/keyboard/kbdic/kbdic.def deleted file mode 100644 index 8dc0ec5bd0e..00000000000 --- a/reactos/dll/keyboard/kbdic/kbdic.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdic.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdic/kbdic.rbuild b/reactos/dll/keyboard/kbdic/kbdic.rbuild index 9dd1f98aacf..ca14176da38 100644 --- a/reactos/dll/keyboard/kbdic/kbdic.rbuild +++ b/reactos/dll/keyboard/kbdic/kbdic.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdic.c kbdic.rc + kbdic.spec diff --git a/reactos/dll/keyboard/kbdic/kbdic.spec b/reactos/dll/keyboard/kbdic/kbdic.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdic/kbdic.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdinasa/kbdinasa.def b/reactos/dll/keyboard/kbdinasa/kbdinasa.def deleted file mode 100644 index 83539cf11df..00000000000 --- a/reactos/dll/keyboard/kbdinasa/kbdinasa.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdinasa.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdinasa/kbdinasa.rbuild b/reactos/dll/keyboard/kbdinasa/kbdinasa.rbuild index 4e2d3508f03..eb093ceb3e8 100644 --- a/reactos/dll/keyboard/kbdinasa/kbdinasa.rbuild +++ b/reactos/dll/keyboard/kbdinasa/kbdinasa.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdinasa.c kbdinasa.rc + kbdinasa.spec diff --git a/reactos/dll/keyboard/kbdinasa/kbdinasa.spec b/reactos/dll/keyboard/kbdinasa/kbdinasa.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdinasa/kbdinasa.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdinben/kbdinben.def b/reactos/dll/keyboard/kbdinben/kbdinben.def deleted file mode 100644 index accfe832a9a..00000000000 --- a/reactos/dll/keyboard/kbdinben/kbdinben.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdinben.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdinben/kbdinben.rbuild b/reactos/dll/keyboard/kbdinben/kbdinben.rbuild index 80eef9e429b..418fbe7e0ae 100644 --- a/reactos/dll/keyboard/kbdinben/kbdinben.rbuild +++ b/reactos/dll/keyboard/kbdinben/kbdinben.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdinben.c kbdinben.rc + kbdinben.spec diff --git a/reactos/dll/keyboard/kbdinben/kbdinben.spec b/reactos/dll/keyboard/kbdinben/kbdinben.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdinben/kbdinben.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdindev/kbdindev.def b/reactos/dll/keyboard/kbdindev/kbdindev.def deleted file mode 100644 index 411f47f0f50..00000000000 --- a/reactos/dll/keyboard/kbdindev/kbdindev.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdindev.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdindev/kbdindev.rbuild b/reactos/dll/keyboard/kbdindev/kbdindev.rbuild index 7d9601e7401..67c41f377f3 100644 --- a/reactos/dll/keyboard/kbdindev/kbdindev.rbuild +++ b/reactos/dll/keyboard/kbdindev/kbdindev.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdindev.c kbdindev.rc + kbdindev.spec diff --git a/reactos/dll/keyboard/kbdindev/kbdindev.spec b/reactos/dll/keyboard/kbdindev/kbdindev.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdindev/kbdindev.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdinguj/kbdinguj.def b/reactos/dll/keyboard/kbdinguj/kbdinguj.def deleted file mode 100644 index 818755d1c79..00000000000 --- a/reactos/dll/keyboard/kbdinguj/kbdinguj.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdinguj.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdinguj/kbdinguj.rbuild b/reactos/dll/keyboard/kbdinguj/kbdinguj.rbuild index d9825e4f2bf..aca7a777e64 100644 --- a/reactos/dll/keyboard/kbdinguj/kbdinguj.rbuild +++ b/reactos/dll/keyboard/kbdinguj/kbdinguj.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdinguj.c kbdinguj.rc + kbdinguj.spec diff --git a/reactos/dll/keyboard/kbdinguj/kbdinguj.spec b/reactos/dll/keyboard/kbdinguj/kbdinguj.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdinguj/kbdinguj.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdinmal/kbdinmal.def b/reactos/dll/keyboard/kbdinmal/kbdinmal.def deleted file mode 100644 index 38f6b588943..00000000000 --- a/reactos/dll/keyboard/kbdinmal/kbdinmal.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdinmal.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdinmal/kbdinmal.rbuild b/reactos/dll/keyboard/kbdinmal/kbdinmal.rbuild index 08dcfd66a05..4d4f50b79fb 100644 --- a/reactos/dll/keyboard/kbdinmal/kbdinmal.rbuild +++ b/reactos/dll/keyboard/kbdinmal/kbdinmal.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdinmal.c kbdinmal.rc + kbdinmal.spec diff --git a/reactos/dll/keyboard/kbdinmal/kbdinmal.spec b/reactos/dll/keyboard/kbdinmal/kbdinmal.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdinmal/kbdinmal.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdir/kbdir.def b/reactos/dll/keyboard/kbdir/kbdir.def deleted file mode 100644 index 182d0ef4a8a..00000000000 --- a/reactos/dll/keyboard/kbdir/kbdir.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdir.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdir/kbdir.rbuild b/reactos/dll/keyboard/kbdir/kbdir.rbuild index 970766de56e..4d35719d649 100644 --- a/reactos/dll/keyboard/kbdir/kbdir.rbuild +++ b/reactos/dll/keyboard/kbdir/kbdir.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdir.c kbdir.rc + kbdir.spec diff --git a/reactos/dll/keyboard/kbdir/kbdir.spec b/reactos/dll/keyboard/kbdir/kbdir.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdir/kbdir.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdit/kbdit.def b/reactos/dll/keyboard/kbdit/kbdit.def deleted file mode 100644 index 502a2eb8c09..00000000000 --- a/reactos/dll/keyboard/kbdit/kbdit.def +++ /dev/null @@ -1,4 +0,0 @@ -LIBRARY kbdit.dll - -EXPORTS -KbdLayerDescriptor@0 diff --git a/reactos/dll/keyboard/kbdit/kbdit.rbuild b/reactos/dll/keyboard/kbdit/kbdit.rbuild index 949d2e7786d..eeca81895ee 100644 --- a/reactos/dll/keyboard/kbdit/kbdit.rbuild +++ b/reactos/dll/keyboard/kbdit/kbdit.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdit.c kbdit.rc + kbdit.spec diff --git a/reactos/dll/keyboard/kbdit/kbdit.spec b/reactos/dll/keyboard/kbdit/kbdit.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdit/kbdit.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdja/kbdja.def b/reactos/dll/keyboard/kbdja/kbdja.def deleted file mode 100644 index 6a67344ff6c..00000000000 --- a/reactos/dll/keyboard/kbdja/kbdja.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdja.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdja/kbdja.rbuild b/reactos/dll/keyboard/kbdja/kbdja.rbuild index a1397301245..3453ab78d76 100644 --- a/reactos/dll/keyboard/kbdja/kbdja.rbuild +++ b/reactos/dll/keyboard/kbdja/kbdja.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdja.c kbdja.rc + kbdja.spec diff --git a/reactos/dll/keyboard/kbdja/kbdja.spec b/reactos/dll/keyboard/kbdja/kbdja.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdja/kbdja.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdkaz/kbdkaz.def b/reactos/dll/keyboard/kbdkaz/kbdkaz.def deleted file mode 100644 index 39d5df95ba3..00000000000 --- a/reactos/dll/keyboard/kbdkaz/kbdkaz.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdkaz.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdkaz/kbdkaz.rbuild b/reactos/dll/keyboard/kbdkaz/kbdkaz.rbuild index fade6ac3aa8..646a0738040 100644 --- a/reactos/dll/keyboard/kbdkaz/kbdkaz.rbuild +++ b/reactos/dll/keyboard/kbdkaz/kbdkaz.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdkaz.c kbdkaz.rc + kbdkaz.spec diff --git a/reactos/dll/keyboard/kbdkaz/kbdkaz.spec b/reactos/dll/keyboard/kbdkaz/kbdkaz.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdkaz/kbdkaz.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdko/kbdko.def b/reactos/dll/keyboard/kbdko/kbdko.def deleted file mode 100644 index cff55c480be..00000000000 --- a/reactos/dll/keyboard/kbdko/kbdko.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdko.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdko/kbdko.rbuild b/reactos/dll/keyboard/kbdko/kbdko.rbuild index 195c2465803..f6ad227e060 100644 --- a/reactos/dll/keyboard/kbdko/kbdko.rbuild +++ b/reactos/dll/keyboard/kbdko/kbdko.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdko.c kbdko.rc + kbdko.spec diff --git a/reactos/dll/keyboard/kbdko/kbdko.spec b/reactos/dll/keyboard/kbdko/kbdko.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdko/kbdko.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdla/kbdla.def b/reactos/dll/keyboard/kbdla/kbdla.def deleted file mode 100644 index 6f99c63510b..00000000000 --- a/reactos/dll/keyboard/kbdla/kbdla.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdla.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdla/kbdla.rbuild b/reactos/dll/keyboard/kbdla/kbdla.rbuild index 8c0d35a99d5..f6eff54f57c 100644 --- a/reactos/dll/keyboard/kbdla/kbdla.rbuild +++ b/reactos/dll/keyboard/kbdla/kbdla.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdla.c kbdla.rc + kbdla.spec diff --git a/reactos/dll/keyboard/kbdla/kbdla.spec b/reactos/dll/keyboard/kbdla/kbdla.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdla/kbdla.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdlt/kbdlt.def b/reactos/dll/keyboard/kbdlt/kbdlt.def deleted file mode 100644 index 8076cd6bb01..00000000000 --- a/reactos/dll/keyboard/kbdlt/kbdlt.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdlt.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdlt/kbdlt.rbuild b/reactos/dll/keyboard/kbdlt/kbdlt.rbuild index c24958fd8b8..682e2fcb547 100644 --- a/reactos/dll/keyboard/kbdlt/kbdlt.rbuild +++ b/reactos/dll/keyboard/kbdlt/kbdlt.rbuild @@ -1,8 +1,11 @@ + + - + include 0x0500 kbdlt.c kbdlt.rc + kbdlt.spec diff --git a/reactos/dll/keyboard/kbdlt/kbdlt.spec b/reactos/dll/keyboard/kbdlt/kbdlt.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdlt/kbdlt.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdlv/kbdlv.def b/reactos/dll/keyboard/kbdlv/kbdlv.def deleted file mode 100644 index 22c07722923..00000000000 --- a/reactos/dll/keyboard/kbdlv/kbdlv.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdlv.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdlv/kbdlv.rbuild b/reactos/dll/keyboard/kbdlv/kbdlv.rbuild index 1ef428e3145..9d099e8dc9f 100644 --- a/reactos/dll/keyboard/kbdlv/kbdlv.rbuild +++ b/reactos/dll/keyboard/kbdlv/kbdlv.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdlv.c kbdlv.rc + kbdlv.spec diff --git a/reactos/dll/keyboard/kbdlv/kbdlv.spec b/reactos/dll/keyboard/kbdlv/kbdlv.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdlv/kbdlv.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdmac/kbdmac.def b/reactos/dll/keyboard/kbdmac/kbdmac.def deleted file mode 100644 index 020260e6796..00000000000 --- a/reactos/dll/keyboard/kbdmac/kbdmac.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdmac.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdmac/kbdmac.rbuild b/reactos/dll/keyboard/kbdmac/kbdmac.rbuild index 3aeb55c9716..ed855b1ed3c 100644 --- a/reactos/dll/keyboard/kbdmac/kbdmac.rbuild +++ b/reactos/dll/keyboard/kbdmac/kbdmac.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdmac.c kbdmac.rc + kbdmac.spec diff --git a/reactos/dll/keyboard/kbdmac/kbdmac.spec b/reactos/dll/keyboard/kbdmac/kbdmac.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdmac/kbdmac.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdne/kbdne.def b/reactos/dll/keyboard/kbdne/kbdne.def deleted file mode 100644 index 443b275ca2e..00000000000 --- a/reactos/dll/keyboard/kbdne/kbdne.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdne.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdne/kbdne.rbuild b/reactos/dll/keyboard/kbdne/kbdne.rbuild index 304736f25e5..926c5b01d61 100644 --- a/reactos/dll/keyboard/kbdne/kbdne.rbuild +++ b/reactos/dll/keyboard/kbdne/kbdne.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdne.c kbdne.rc + kbdne.spec diff --git a/reactos/dll/keyboard/kbdne/kbdne.spec b/reactos/dll/keyboard/kbdne/kbdne.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdne/kbdne.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdno/kbdno.def b/reactos/dll/keyboard/kbdno/kbdno.def deleted file mode 100644 index 0e90fbc0428..00000000000 --- a/reactos/dll/keyboard/kbdno/kbdno.def +++ /dev/null @@ -1,3 +0,0 @@ -LIBRARY kbdno.dll -EXPORTS -KbdLayerDescriptor@0 diff --git a/reactos/dll/keyboard/kbdno/kbdno.rbuild b/reactos/dll/keyboard/kbdno/kbdno.rbuild index da0ee5982b6..8c53f1afb43 100644 --- a/reactos/dll/keyboard/kbdno/kbdno.rbuild +++ b/reactos/dll/keyboard/kbdno/kbdno.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdno.c kbdno.rc + kbdno.spec diff --git a/reactos/dll/keyboard/kbdno/kbdno.spec b/reactos/dll/keyboard/kbdno/kbdno.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdno/kbdno.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdpl1/kbdpl1.def b/reactos/dll/keyboard/kbdpl1/kbdpl1.def deleted file mode 100644 index eb8b6eeb5be..00000000000 --- a/reactos/dll/keyboard/kbdpl1/kbdpl1.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdpl1.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdpl1/kbdpl1.rbuild b/reactos/dll/keyboard/kbdpl1/kbdpl1.rbuild index 175a0ba6484..c67bec16713 100644 --- a/reactos/dll/keyboard/kbdpl1/kbdpl1.rbuild +++ b/reactos/dll/keyboard/kbdpl1/kbdpl1.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdpl1.c kbdpl1.rc + kbdpl1.spec diff --git a/reactos/dll/keyboard/kbdpl1/kbdpl1.spec b/reactos/dll/keyboard/kbdpl1/kbdpl1.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdpl1/kbdpl1.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdpo/kbdpo.def b/reactos/dll/keyboard/kbdpo/kbdpo.def deleted file mode 100644 index 3d2b976bdcd..00000000000 --- a/reactos/dll/keyboard/kbdpo/kbdpo.def +++ /dev/null @@ -1,3 +0,0 @@ -LIBRARY kbdpo.dll -EXPORTS -KbdLayerDescriptor@0 diff --git a/reactos/dll/keyboard/kbdpo/kbdpo.rbuild b/reactos/dll/keyboard/kbdpo/kbdpo.rbuild index c325b8536cb..2610aff858f 100644 --- a/reactos/dll/keyboard/kbdpo/kbdpo.rbuild +++ b/reactos/dll/keyboard/kbdpo/kbdpo.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdpo.c kbdpo.rc + kbdpo.spec diff --git a/reactos/dll/keyboard/kbdpo/kbdpo.spec b/reactos/dll/keyboard/kbdpo/kbdpo.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdpo/kbdpo.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdro/kbdro.def b/reactos/dll/keyboard/kbdro/kbdro.def deleted file mode 100644 index fa55b031e4a..00000000000 --- a/reactos/dll/keyboard/kbdro/kbdro.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdro.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdro/kbdro.rbuild b/reactos/dll/keyboard/kbdro/kbdro.rbuild index 05b23d6cf23..15fee3807ef 100644 --- a/reactos/dll/keyboard/kbdro/kbdro.rbuild +++ b/reactos/dll/keyboard/kbdro/kbdro.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdro.c kbdro.rc + kbdro.spec diff --git a/reactos/dll/keyboard/kbdro/kbdro.spec b/reactos/dll/keyboard/kbdro/kbdro.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdro/kbdro.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdru/kbdru.def b/reactos/dll/keyboard/kbdru/kbdru.def deleted file mode 100644 index 6f2972c8b00..00000000000 --- a/reactos/dll/keyboard/kbdru/kbdru.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdru.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdru/kbdru.rbuild b/reactos/dll/keyboard/kbdru/kbdru.rbuild index d35756e1dc5..7d84ce5d932 100644 --- a/reactos/dll/keyboard/kbdru/kbdru.rbuild +++ b/reactos/dll/keyboard/kbdru/kbdru.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdru.c kbdru.rc + kbdru.spec diff --git a/reactos/dll/keyboard/kbdru/kbdru.spec b/reactos/dll/keyboard/kbdru/kbdru.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdru/kbdru.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdru1/kbdru1.def b/reactos/dll/keyboard/kbdru1/kbdru1.def deleted file mode 100644 index 6f4776c3980..00000000000 --- a/reactos/dll/keyboard/kbdru1/kbdru1.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdru1.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdru1/kbdru1.rbuild b/reactos/dll/keyboard/kbdru1/kbdru1.rbuild index ef96031a21a..104e57ba165 100644 --- a/reactos/dll/keyboard/kbdru1/kbdru1.rbuild +++ b/reactos/dll/keyboard/kbdru1/kbdru1.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdru1.c kbdru1.rc + kbdru1.spec diff --git a/reactos/dll/keyboard/kbdru1/kbdru1.spec b/reactos/dll/keyboard/kbdru1/kbdru1.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdru1/kbdru1.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdsg/kbdsg.def b/reactos/dll/keyboard/kbdsg/kbdsg.def deleted file mode 100644 index 529859364c2..00000000000 --- a/reactos/dll/keyboard/kbdsg/kbdsg.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdsg.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdsg/kbdsg.rbuild b/reactos/dll/keyboard/kbdsg/kbdsg.rbuild index 7b88c28d423..dfb5dcabe71 100644 --- a/reactos/dll/keyboard/kbdsg/kbdsg.rbuild +++ b/reactos/dll/keyboard/kbdsg/kbdsg.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdsg.c kbdsg.rc + kbdsg.spec diff --git a/reactos/dll/keyboard/kbdsg/kbdsg.spec b/reactos/dll/keyboard/kbdsg/kbdsg.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdsg/kbdsg.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdsk/kbdsk.def b/reactos/dll/keyboard/kbdsk/kbdsk.def deleted file mode 100644 index b0600ad2ee2..00000000000 --- a/reactos/dll/keyboard/kbdsk/kbdsk.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdsk.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdsk/kbdsk.rbuild b/reactos/dll/keyboard/kbdsk/kbdsk.rbuild index 1ca92a58d2f..db0938767a2 100644 --- a/reactos/dll/keyboard/kbdsk/kbdsk.rbuild +++ b/reactos/dll/keyboard/kbdsk/kbdsk.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdsk.c kbdsk.rc + kbdsk.spec diff --git a/reactos/dll/keyboard/kbdsk/kbdsk.spec b/reactos/dll/keyboard/kbdsk/kbdsk.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdsk/kbdsk.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdsk1/kbdsk1.def b/reactos/dll/keyboard/kbdsk1/kbdsk1.def deleted file mode 100644 index 2157030c0a9..00000000000 --- a/reactos/dll/keyboard/kbdsk1/kbdsk1.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdsk1.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdsk1/kbdsk1.rbuild b/reactos/dll/keyboard/kbdsk1/kbdsk1.rbuild index 49fc7a46bdb..e639566fd9c 100644 --- a/reactos/dll/keyboard/kbdsk1/kbdsk1.rbuild +++ b/reactos/dll/keyboard/kbdsk1/kbdsk1.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdsk1.c kbdsk1.rc + kbdsk1.spec diff --git a/reactos/dll/keyboard/kbdsk1/kbdsk1.spec b/reactos/dll/keyboard/kbdsk1/kbdsk1.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdsk1/kbdsk1.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdsw/kbdsw.def b/reactos/dll/keyboard/kbdsw/kbdsw.def deleted file mode 100644 index 6f6c4e514e0..00000000000 --- a/reactos/dll/keyboard/kbdsw/kbdsw.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdsw.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdsw/kbdsw.rbuild b/reactos/dll/keyboard/kbdsw/kbdsw.rbuild index 45570b4f788..70733e95c0a 100644 --- a/reactos/dll/keyboard/kbdsw/kbdsw.rbuild +++ b/reactos/dll/keyboard/kbdsw/kbdsw.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdsw.c kbdsw.rc + kbdsw.spec diff --git a/reactos/dll/keyboard/kbdsw/kbdsw.spec b/reactos/dll/keyboard/kbdsw/kbdsw.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdsw/kbdsw.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdtat/kbdtat.def b/reactos/dll/keyboard/kbdtat/kbdtat.def deleted file mode 100644 index 32dfbadd26e..00000000000 --- a/reactos/dll/keyboard/kbdtat/kbdtat.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdtat.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdtat/kbdtat.rbuild b/reactos/dll/keyboard/kbdtat/kbdtat.rbuild index 72678738cb7..b158a4bed4d 100644 --- a/reactos/dll/keyboard/kbdtat/kbdtat.rbuild +++ b/reactos/dll/keyboard/kbdtat/kbdtat.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdtat.c kbdtat.rc + kbdtat.spec diff --git a/reactos/dll/keyboard/kbdtat/kbdtat.spec b/reactos/dll/keyboard/kbdtat/kbdtat.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdtat/kbdtat.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdth0/kbdth0.def b/reactos/dll/keyboard/kbdth0/kbdth0.def deleted file mode 100644 index 9516ffc4327..00000000000 --- a/reactos/dll/keyboard/kbdth0/kbdth0.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdth0.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdth0/kbdth0.rbuild b/reactos/dll/keyboard/kbdth0/kbdth0.rbuild index 45318db0432..57dac75db54 100644 --- a/reactos/dll/keyboard/kbdth0/kbdth0.rbuild +++ b/reactos/dll/keyboard/kbdth0/kbdth0.rbuild @@ -1,10 +1,11 @@ - - + + include 0x0500 kbdth0.c kbdth0.rc + kbdth0.spec diff --git a/reactos/dll/keyboard/kbdth0/kbdth0.spec b/reactos/dll/keyboard/kbdth0/kbdth0.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdth0/kbdth0.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdth1/kbdth1.def b/reactos/dll/keyboard/kbdth1/kbdth1.def deleted file mode 100644 index 02ecd264f3d..00000000000 --- a/reactos/dll/keyboard/kbdth1/kbdth1.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdth1.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdth1/kbdth1.rbuild b/reactos/dll/keyboard/kbdth1/kbdth1.rbuild index 1b76f6fc5c0..918ccaef910 100644 --- a/reactos/dll/keyboard/kbdth1/kbdth1.rbuild +++ b/reactos/dll/keyboard/kbdth1/kbdth1.rbuild @@ -1,10 +1,11 @@ - - + + include 0x0500 kbdth1.c kbdth1.rc + kbdth1.spec diff --git a/reactos/dll/keyboard/kbdth1/kbdth1.spec b/reactos/dll/keyboard/kbdth1/kbdth1.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdth1/kbdth1.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdth2/kbdth2.def b/reactos/dll/keyboard/kbdth2/kbdth2.def deleted file mode 100644 index e04b8b8467d..00000000000 --- a/reactos/dll/keyboard/kbdth2/kbdth2.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdth2.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdth2/kbdth2.rbuild b/reactos/dll/keyboard/kbdth2/kbdth2.rbuild index e578b76c89a..23028cde79c 100644 --- a/reactos/dll/keyboard/kbdth2/kbdth2.rbuild +++ b/reactos/dll/keyboard/kbdth2/kbdth2.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdth2.c kbdth2.rc + kbdth2.spec diff --git a/reactos/dll/keyboard/kbdth2/kbdth2.spec b/reactos/dll/keyboard/kbdth2/kbdth2.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdth2/kbdth2.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdth3/kbdth3.def b/reactos/dll/keyboard/kbdth3/kbdth3.def deleted file mode 100644 index 8f3e4662a9b..00000000000 --- a/reactos/dll/keyboard/kbdth3/kbdth3.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdth3.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdth3/kbdth3.rbuild b/reactos/dll/keyboard/kbdth3/kbdth3.rbuild index 13266791d42..8d4599d7fbf 100644 --- a/reactos/dll/keyboard/kbdth3/kbdth3.rbuild +++ b/reactos/dll/keyboard/kbdth3/kbdth3.rbuild @@ -1,10 +1,11 @@ - - + + include 0x0500 kbdth3.c kbdth3.rc + kbdth3.spec diff --git a/reactos/dll/keyboard/kbdth3/kbdth3.spec b/reactos/dll/keyboard/kbdth3/kbdth3.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdth3/kbdth3.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdtuf/kbdtuf.def b/reactos/dll/keyboard/kbdtuf/kbdtuf.def deleted file mode 100644 index 6d1e5808f5e..00000000000 --- a/reactos/dll/keyboard/kbdtuf/kbdtuf.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdtuf.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdtuf/kbdtuf.rbuild b/reactos/dll/keyboard/kbdtuf/kbdtuf.rbuild index d57200cc540..5b0064c6adf 100644 --- a/reactos/dll/keyboard/kbdtuf/kbdtuf.rbuild +++ b/reactos/dll/keyboard/kbdtuf/kbdtuf.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdtuf.c kbdtuf.rc + kbdtuf.spec diff --git a/reactos/dll/keyboard/kbdtuf/kbdtuf.spec b/reactos/dll/keyboard/kbdtuf/kbdtuf.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdtuf/kbdtuf.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdtuq/kbdtuq.def b/reactos/dll/keyboard/kbdtuq/kbdtuq.def deleted file mode 100644 index 9846b631a03..00000000000 --- a/reactos/dll/keyboard/kbdtuq/kbdtuq.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdtuq.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdtuq/kbdtuq.rbuild b/reactos/dll/keyboard/kbdtuq/kbdtuq.rbuild index bf2c1f56157..1cc516fcce8 100644 --- a/reactos/dll/keyboard/kbdtuq/kbdtuq.rbuild +++ b/reactos/dll/keyboard/kbdtuq/kbdtuq.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdtuq.c kbdtuq.rc + kbdtuq.spec diff --git a/reactos/dll/keyboard/kbdtuq/kbdtuq.spec b/reactos/dll/keyboard/kbdtuq/kbdtuq.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdtuq/kbdtuq.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbduk/kbduk.def b/reactos/dll/keyboard/kbduk/kbduk.def deleted file mode 100644 index 984901486b1..00000000000 --- a/reactos/dll/keyboard/kbduk/kbduk.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbduk.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbduk/kbduk.rbuild b/reactos/dll/keyboard/kbduk/kbduk.rbuild index dd1c50acab7..50cc9b84b18 100644 --- a/reactos/dll/keyboard/kbduk/kbduk.rbuild +++ b/reactos/dll/keyboard/kbduk/kbduk.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbduk.c kbduk.rc + kbduk.spec diff --git a/reactos/dll/keyboard/kbduk/kbduk.spec b/reactos/dll/keyboard/kbduk/kbduk.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbduk/kbduk.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdur/kbdur.def b/reactos/dll/keyboard/kbdur/kbdur.def deleted file mode 100644 index 717b43c4bb0..00000000000 --- a/reactos/dll/keyboard/kbdur/kbdur.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdur.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdur/kbdur.rbuild b/reactos/dll/keyboard/kbdur/kbdur.rbuild index 47975b35eea..c38ab572c03 100644 --- a/reactos/dll/keyboard/kbdur/kbdur.rbuild +++ b/reactos/dll/keyboard/kbdur/kbdur.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdur.c kbdur.rc + kbdur.spec diff --git a/reactos/dll/keyboard/kbdur/kbdur.spec b/reactos/dll/keyboard/kbdur/kbdur.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdur/kbdur.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdurs/kbdurs.def b/reactos/dll/keyboard/kbdurs/kbdurs.def deleted file mode 100644 index 587658d268a..00000000000 --- a/reactos/dll/keyboard/kbdurs/kbdurs.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdurs.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdurs/kbdurs.rbuild b/reactos/dll/keyboard/kbdurs/kbdurs.rbuild index 08d7239f29a..91c94bdb1ef 100644 --- a/reactos/dll/keyboard/kbdurs/kbdurs.rbuild +++ b/reactos/dll/keyboard/kbdurs/kbdurs.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdurs.c kbdurs.rc + kbdurs.spec diff --git a/reactos/dll/keyboard/kbdurs/kbdurs.spec b/reactos/dll/keyboard/kbdurs/kbdurs.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdurs/kbdurs.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdus/kbdus.def b/reactos/dll/keyboard/kbdus/kbdus.def deleted file mode 100644 index 309f9bc6188..00000000000 --- a/reactos/dll/keyboard/kbdus/kbdus.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdus.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdus/kbdus.rbuild b/reactos/dll/keyboard/kbdus/kbdus.rbuild index 4e0e24fc27e..42c7ca0e090 100644 --- a/reactos/dll/keyboard/kbdus/kbdus.rbuild +++ b/reactos/dll/keyboard/kbdus/kbdus.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdus.c kbdus.rc + kbdus.spec diff --git a/reactos/dll/keyboard/kbdus/kbdus.spec b/reactos/dll/keyboard/kbdus/kbdus.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdus/kbdus.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdusa/kbdusa.def b/reactos/dll/keyboard/kbdusa/kbdusa.def deleted file mode 100644 index 1d065d8260c..00000000000 --- a/reactos/dll/keyboard/kbdusa/kbdusa.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdusa.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdusa/kbdusa.rbuild b/reactos/dll/keyboard/kbdusa/kbdusa.rbuild index ba81f601ace..c9dc1b90799 100644 --- a/reactos/dll/keyboard/kbdusa/kbdusa.rbuild +++ b/reactos/dll/keyboard/kbdusa/kbdusa.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdusa.c kbdusa.rc + kbdusa.spec diff --git a/reactos/dll/keyboard/kbdusa/kbdusa.spec b/reactos/dll/keyboard/kbdusa/kbdusa.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdusa/kbdusa.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdusl/kbdusl.def b/reactos/dll/keyboard/kbdusl/kbdusl.def deleted file mode 100644 index 1d5b0a9303e..00000000000 --- a/reactos/dll/keyboard/kbdusl/kbdusl.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdusl.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdusl/kbdusl.rbuild b/reactos/dll/keyboard/kbdusl/kbdusl.rbuild index 1b96f09024b..80de56da78a 100644 --- a/reactos/dll/keyboard/kbdusl/kbdusl.rbuild +++ b/reactos/dll/keyboard/kbdusl/kbdusl.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdusl.c kbdusl.rc + kbdusl.spec diff --git a/reactos/dll/keyboard/kbdusl/kbdusl.spec b/reactos/dll/keyboard/kbdusl/kbdusl.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdusl/kbdusl.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdusr/kbdusr.def b/reactos/dll/keyboard/kbdusr/kbdusr.def deleted file mode 100644 index a64407986e2..00000000000 --- a/reactos/dll/keyboard/kbdusr/kbdusr.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdusr.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdusr/kbdusr.rbuild b/reactos/dll/keyboard/kbdusr/kbdusr.rbuild index e45630ad744..3fa2412a282 100644 --- a/reactos/dll/keyboard/kbdusr/kbdusr.rbuild +++ b/reactos/dll/keyboard/kbdusr/kbdusr.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdusr.c kbdusr.rc + kbdusr.spec diff --git a/reactos/dll/keyboard/kbdusr/kbdusr.spec b/reactos/dll/keyboard/kbdusr/kbdusr.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdusr/kbdusr.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdusx/kbdusx.def b/reactos/dll/keyboard/kbdusx/kbdusx.def deleted file mode 100644 index 0620d16f7db..00000000000 --- a/reactos/dll/keyboard/kbdusx/kbdusx.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdusx.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdusx/kbdusx.rbuild b/reactos/dll/keyboard/kbdusx/kbdusx.rbuild index bab07196b9a..c2eb6e9bece 100644 --- a/reactos/dll/keyboard/kbdusx/kbdusx.rbuild +++ b/reactos/dll/keyboard/kbdusx/kbdusx.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdusx.c kbdusx.rc + kbdusx.spec diff --git a/reactos/dll/keyboard/kbdusx/kbdusx.spec b/reactos/dll/keyboard/kbdusx/kbdusx.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdusx/kbdusx.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbduzb/kbduzb.def b/reactos/dll/keyboard/kbduzb/kbduzb.def deleted file mode 100644 index d0ebc72497c..00000000000 --- a/reactos/dll/keyboard/kbduzb/kbduzb.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbduzb.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbduzb/kbduzb.rbuild b/reactos/dll/keyboard/kbduzb/kbduzb.rbuild index 24b1e7430ce..cf995a05315 100644 --- a/reactos/dll/keyboard/kbduzb/kbduzb.rbuild +++ b/reactos/dll/keyboard/kbduzb/kbduzb.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbduzb.c kbduzb.rc + kbduzb.spec diff --git a/reactos/dll/keyboard/kbduzb/kbduzb.spec b/reactos/dll/keyboard/kbduzb/kbduzb.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbduzb/kbduzb.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdvntc/kbdvntc.def b/reactos/dll/keyboard/kbdvntc/kbdvntc.def deleted file mode 100644 index c5850fa73c0..00000000000 --- a/reactos/dll/keyboard/kbdvntc/kbdvntc.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdvntc.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdvntc/kbdvntc.rbuild b/reactos/dll/keyboard/kbdvntc/kbdvntc.rbuild index 220e0aa1763..472e3f9ce11 100644 --- a/reactos/dll/keyboard/kbdvntc/kbdvntc.rbuild +++ b/reactos/dll/keyboard/kbdvntc/kbdvntc.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdvntc.c kbdvntc.rc + kbdvntc.spec diff --git a/reactos/dll/keyboard/kbdvntc/kbdvntc.spec b/reactos/dll/keyboard/kbdvntc/kbdvntc.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdvntc/kbdvntc.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdycc/kbdycc.def b/reactos/dll/keyboard/kbdycc/kbdycc.def deleted file mode 100644 index 20e1dd29d00..00000000000 --- a/reactos/dll/keyboard/kbdycc/kbdycc.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdycc.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdycc/kbdycc.rbuild b/reactos/dll/keyboard/kbdycc/kbdycc.rbuild index 55191d630af..bc81aa50ea5 100644 --- a/reactos/dll/keyboard/kbdycc/kbdycc.rbuild +++ b/reactos/dll/keyboard/kbdycc/kbdycc.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdycc.c kbdycc.rc + kbdycc.spec diff --git a/reactos/dll/keyboard/kbdycc/kbdycc.spec b/reactos/dll/keyboard/kbdycc/kbdycc.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdycc/kbdycc.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file diff --git a/reactos/dll/keyboard/kbdycl/kbdycl.def b/reactos/dll/keyboard/kbdycl/kbdycl.def deleted file mode 100644 index 147c20aaa57..00000000000 --- a/reactos/dll/keyboard/kbdycl/kbdycl.def +++ /dev/null @@ -1,8 +0,0 @@ -; -; ReactOS Operating System -; -LIBRARY kbdycl.dll - -EXPORTS -KbdLayerDescriptor@0 -;EOF diff --git a/reactos/dll/keyboard/kbdycl/kbdycl.rbuild b/reactos/dll/keyboard/kbdycl/kbdycl.rbuild index 2a26e60817f..4da9d79adb4 100644 --- a/reactos/dll/keyboard/kbdycl/kbdycl.rbuild +++ b/reactos/dll/keyboard/kbdycl/kbdycl.rbuild @@ -1,10 +1,11 @@ - + include 0x0500 kbdycl.c kbdycl.rc + kbdycl.spec diff --git a/reactos/dll/keyboard/kbdycl/kbdycl.spec b/reactos/dll/keyboard/kbdycl/kbdycl.spec new file mode 100644 index 00000000000..e1c7a26c1c4 --- /dev/null +++ b/reactos/dll/keyboard/kbdycl/kbdycl.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file From e96d8d91adac36afa3bccf2fb2087103f6301404 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Sat, 16 Aug 2008 14:18:42 +0000 Subject: [PATCH 040/324] - No need to set a variable to TRUE twice before it is used svn path=/trunk/; revision=35390 --- reactos/ntoskrnl/io/iomgr/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/io/iomgr/irq.c b/reactos/ntoskrnl/io/iomgr/irq.c index 91cd1597d83..46190187bc6 100644 --- a/reactos/ntoskrnl/io/iomgr/irq.c +++ b/reactos/ntoskrnl/io/iomgr/irq.c @@ -35,7 +35,7 @@ IoConnectInterrupt(OUT PKINTERRUPT *InterruptObject, PKINTERRUPT InterruptUsed; PIO_INTERRUPT IoInterrupt; PKSPIN_LOCK SpinLockUsed; - BOOLEAN FirstRun = TRUE; + BOOLEAN FirstRun; CCHAR Count = 0; KAFFINITY Affinity; PAGED_CODE(); From 1b11b8d6ce2b26298b3bc64cb44fb476ccae68d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sat, 16 Aug 2008 14:30:20 +0000 Subject: [PATCH 041/324] Increase lost packet count when transmit failed or receive failed for whatever reason svn path=/trunk/; revision=35392 --- reactos/base/applications/network/ping/ping.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reactos/base/applications/network/ping/ping.c b/reactos/base/applications/network/ping/ping.c index 4cb3636d6f1..94cd421d460 100644 --- a/reactos/base/applications/network/ping/ping.c +++ b/reactos/base/applications/network/ping/ping.c @@ -541,6 +541,7 @@ static BOOL Ping(VOID) } if (Status == SOCKET_ERROR) { + LostCount++; if (WSAGetLastError() == WSAEHOSTUNREACH) printf("Destination host unreachable.\n"); else @@ -567,6 +568,8 @@ static BOOL Ping(VOID) printf("\n"); #endif /* !NDEBUG */ } + else + LostCount++; if (Status == SOCKET_ERROR) { if (WSAGetLastError() != WSAETIMEDOUT) @@ -581,7 +584,6 @@ static BOOL Ping(VOID) if (Status == 0) { printf("Request timed out.\n"); - LostCount++; GlobalFree(Buffer); return TRUE; } From bafb77d60c530517b353e63570a156e78921aa20 Mon Sep 17 00:00:00 2001 From: James Tabor Date: Sat, 16 Aug 2008 15:48:05 +0000 Subject: [PATCH 042/324] Add check for null after allocating new DCE. See bug 3638. svn path=/trunk/; revision=35394 --- reactos/subsystems/win32/win32k/ntuser/windc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/reactos/subsystems/win32/win32k/ntuser/windc.c b/reactos/subsystems/win32/win32k/ntuser/windc.c index 24f4955d26b..fd1a03eee34 100644 --- a/reactos/subsystems/win32/win32k/ntuser/windc.c +++ b/reactos/subsystems/win32/win32k/ntuser/windc.c @@ -467,6 +467,7 @@ UserGetDCEx(PWINDOW_OBJECT Window OPTIONAL, HANDLE ClipRegion, ULONG Flags) { Dce = DceAllocDCE(NULL, DCE_CACHE_DC); } + if (!Dce) return NULL; Dce->hwndCurrent = (Window ? Window->hSelf : NULL); } From a878cd2e464ad8ddc18ab2cd8e6532a04a164ea8 Mon Sep 17 00:00:00 2001 From: James Tabor Date: Sat, 16 Aug 2008 16:01:03 +0000 Subject: [PATCH 043/324] Wine update to dialog.c, see bug 3644. svn path=/trunk/; revision=35395 --- reactos/dll/win32/user32/windows/dialog.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/reactos/dll/win32/user32/windows/dialog.c b/reactos/dll/win32/user32/windows/dialog.c index f45142b614f..1980fb32b8e 100644 --- a/reactos/dll/win32/user32/windows/dialog.c +++ b/reactos/dll/win32/user32/windows/dialog.c @@ -755,14 +755,13 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate, { rect.left += MulDiv(template.x, xBaseUnit, 4); rect.top += MulDiv(template.y, yBaseUnit, 8); + if( !(template.style & (WS_CHILD|DS_ABSALIGN)) ) + ClientToScreen( owner, (POINT *)&rect ); } if ( !(template.style & WS_CHILD) ) { INT dX, dY; - if( !(template.style & DS_ABSALIGN) ) - ClientToScreen( owner, (POINT *)&rect ); - /* try to fit it into the desktop */ if( (dX = rect.left + rect.right + GetSystemMetrics(SM_CXDLGFRAME) From 399dc7da51aab87733ea3f6d917f829dd7eea6fc Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Sat, 16 Aug 2008 17:53:28 +0000 Subject: [PATCH 044/324] - Spelling fixes - Remove deprecated comment from resource.c - Fix obsdcach.c comment header svn path=/trunk/; revision=35396 --- reactos/ntoskrnl/ex/i386/fastinterlck_asm.S | 8 ++++---- reactos/ntoskrnl/ex/i386/interlck_asm.S | 2 +- reactos/ntoskrnl/ex/init.c | 2 +- reactos/ntoskrnl/ex/resource.c | 8 -------- reactos/ntoskrnl/io/iomgr/iowork.c | 2 +- reactos/ntoskrnl/ob/obdir.c | 2 +- reactos/ntoskrnl/ob/obinit.c | 2 +- reactos/ntoskrnl/ob/oblife.c | 2 +- reactos/ntoskrnl/ob/oblink.c | 2 +- reactos/ntoskrnl/ob/obname.c | 2 +- reactos/ntoskrnl/ob/obref.c | 2 +- reactos/ntoskrnl/ob/obsdcach.c | 11 +++++------ 12 files changed, 18 insertions(+), 27 deletions(-) diff --git a/reactos/ntoskrnl/ex/i386/fastinterlck_asm.S b/reactos/ntoskrnl/ex/i386/fastinterlck_asm.S index c0d56a3b511..af825ca1f59 100644 --- a/reactos/ntoskrnl/ex/i386/fastinterlck_asm.S +++ b/reactos/ntoskrnl/ex/i386/fastinterlck_asm.S @@ -226,7 +226,7 @@ cmp eax, ecx je 2f - /* Get the next entry and do the deletion*/ + /* Get the next entry and do the deletion */ #ifdef CONFIG_SMP push ebx mov ebx, [eax] @@ -569,7 +569,7 @@ _ExpInterlockedPopEntrySListEnd@0: push ebx push ebp - /* Get desination pointer, exchange value and comperand value/address */ + /* Get destination pointer, exchange value and comperand value/address */ mov ebp, ecx mov ebx, [edx] mov ecx, [edx+4] @@ -601,7 +601,7 @@ _ExpInterlockedPopEntrySListEnd@0: push ebp push ebp - /* Get desination pointer, exchange value and comperand value/address */ + /* Get destination pointer, exchange value and comperand value/address */ mov ebp, ecx mov ebx, [edx] mov ecx, [edx+4] @@ -730,7 +730,7 @@ _ExpInterlockedPopEntrySListEnd@0: push ebp push ebp - /* Get desination pointer, exchange value and comperand value/address */ + /* Get destination pointer, exchange value and comperand value/address */ mov ebp, ecx mov ebx, [edx] mov ecx, [edx+4] diff --git a/reactos/ntoskrnl/ex/i386/interlck_asm.S b/reactos/ntoskrnl/ex/i386/interlck_asm.S index 0a81f482ffc..40c2c256c53 100644 --- a/reactos/ntoskrnl/ex/i386/interlck_asm.S +++ b/reactos/ntoskrnl/ex/i386/interlck_asm.S @@ -239,7 +239,7 @@ _ExInterlockedInsertTailList@12: /* Restore flags */ popfd - /* check if the list was empty and return NULL */ + /* Check if the list was empty and return NULL */ xor eax, edx jz 2f diff --git a/reactos/ntoskrnl/ex/init.c b/reactos/ntoskrnl/ex/init.c index 72f13b0570b..835796e4da3 100644 --- a/reactos/ntoskrnl/ex/init.c +++ b/reactos/ntoskrnl/ex/init.c @@ -986,7 +986,7 @@ ExpInitializeExecutive(IN ULONG Cpu, /* Setup bugcheck messages */ KiInitializeBugCheck(); - /* Setup initial system settings (FIXME: Needs Cm Rewrite) */ + /* Setup initial system settings */ CmGetSystemControlValues(LoaderBlock->RegistryBase, CmControlVector); /* Load static defaults for Service Pack 1 and add our SVN revision */ diff --git a/reactos/ntoskrnl/ex/resource.c b/reactos/ntoskrnl/ex/resource.c index ad3e7c516a9..fe054e56ec2 100644 --- a/reactos/ntoskrnl/ex/resource.c +++ b/reactos/ntoskrnl/ex/resource.c @@ -6,14 +6,6 @@ * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org) */ -/* - * WARNING: - * This implementation is the Windows NT 5.x one. - * Vista has optimized the OwnerThread entry array and the internals of - * ExpFindEntryForThread and ExpFindFreeEntry probably need to be modified - * accordingly in order to support the WDK. - */ - /* INCLUDES *****************************************************************/ #include diff --git a/reactos/ntoskrnl/io/iomgr/iowork.c b/reactos/ntoskrnl/io/iomgr/iowork.c index c3db3adaff5..594a875c8fe 100644 --- a/reactos/ntoskrnl/io/iomgr/iowork.c +++ b/reactos/ntoskrnl/io/iomgr/iowork.c @@ -26,7 +26,7 @@ IopWorkItemCallback(IN PVOID Parameter) /* Call the work routine */ IoWorkItem->WorkerRoutine(DeviceObject, IoWorkItem->Context); - /* Dereferenece the device object */ + /* Dereference the device object */ ObDereferenceObject(DeviceObject); } diff --git a/reactos/ntoskrnl/ob/obdir.c b/reactos/ntoskrnl/ob/obdir.c index 1b7f1b3ff12..b7da8e05b00 100644 --- a/reactos/ntoskrnl/ob/obdir.c +++ b/reactos/ntoskrnl/ob/obdir.c @@ -1,7 +1,7 @@ /* * PROJECT: ReactOS Kernel * LICENSE: GPL - See COPYING in the top level directory - * FILE: ntoskrnl/ob/dirobj.c + * FILE: ntoskrnl/ob/obdir.c * PURPOSE: Manages the Object Manager's Directory Implementation, * such as functions for addition, deletion and lookup into * the Object Manager's namespace. These routines are separate diff --git a/reactos/ntoskrnl/ob/obinit.c b/reactos/ntoskrnl/ob/obinit.c index 9083f1af7f8..51a2f9fca36 100644 --- a/reactos/ntoskrnl/ob/obinit.c +++ b/reactos/ntoskrnl/ob/obinit.c @@ -1,7 +1,7 @@ /* * PROJECT: ReactOS Kernel * LICENSE: GPL - See COPYING in the top level directory - * FILE: ntoskrnl/ob/init.c + * FILE: ntoskrnl/ob/obinit.c * PURPOSE: Handles Object Manager Initialization and Shutdown * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org) * Eric Kohl diff --git a/reactos/ntoskrnl/ob/oblife.c b/reactos/ntoskrnl/ob/oblife.c index 91b550d3533..570225a6329 100644 --- a/reactos/ntoskrnl/ob/oblife.c +++ b/reactos/ntoskrnl/ob/oblife.c @@ -1,7 +1,7 @@ /* * PROJECT: ReactOS Kernel * LICENSE: GPL - See COPYING in the top level directory - * FILE: ntoskrnl/ob/create.c + * FILE: ntoskrnl/ob/oblife.c * PURPOSE: Manages the lifetime of an Object, including its creation, * and deletion, as well as setting or querying any of its * information while it is active. Since Object Types are also diff --git a/reactos/ntoskrnl/ob/oblink.c b/reactos/ntoskrnl/ob/oblink.c index c173d1baf8a..bc742e339d8 100644 --- a/reactos/ntoskrnl/ob/oblink.c +++ b/reactos/ntoskrnl/ob/oblink.c @@ -1,7 +1,7 @@ /* * PROJECT: ReactOS Kernel * LICENSE: GPL - See COPYING in the top level directory -* FILE: ntoskrnl/ob/symlink.c +* FILE: ntoskrnl/ob/oblink.c * PURPOSE: Implements symbolic links * PROGRAMMERS: Alex Ionescu (alex@relsoft.net) * David Welch (welch@mcmail.com) diff --git a/reactos/ntoskrnl/ob/obname.c b/reactos/ntoskrnl/ob/obname.c index 513032127e2..a23a2df9e89 100644 --- a/reactos/ntoskrnl/ob/obname.c +++ b/reactos/ntoskrnl/ob/obname.c @@ -1,7 +1,7 @@ /* * PROJECT: ReactOS Kernel * LICENSE: GPL - See COPYING in the top level directory - * FILE: ntoskrnl/ob/namespce.c + * FILE: ntoskrnl/ob/obname.c * PURPOSE: Manages all functions related to the Object Manager name- * space, such as finding objects or querying their names. * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org) diff --git a/reactos/ntoskrnl/ob/obref.c b/reactos/ntoskrnl/ob/obref.c index 0ebb04b5fbd..eaa45237217 100644 --- a/reactos/ntoskrnl/ob/obref.c +++ b/reactos/ntoskrnl/ob/obref.c @@ -1,7 +1,7 @@ /* * PROJECT: ReactOS Kernel * LICENSE: GPL - See COPYING in the top level directory - * FILE: ntoskrnl/ob/refderef.c + * FILE: ntoskrnl/ob/obref.c * PURPOSE: Manages the referencing and de-referencing of all Objects, * as well as the Object Fast Reference implementation. * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org) diff --git a/reactos/ntoskrnl/ob/obsdcach.c b/reactos/ntoskrnl/ob/obsdcach.c index b252ae61450..c339c8cdbe9 100644 --- a/reactos/ntoskrnl/ob/obsdcach.c +++ b/reactos/ntoskrnl/ob/obsdcach.c @@ -1,10 +1,9 @@ /* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/ob/sdcache.c - * PURPOSE: No purpose listed. - * - * PROGRAMMERS: David Welch (welch@cwcom.net) + * PROJECT: ReactOS Kernel + * LICENSE: GPL - See COPYING in the top level directory + * FILE: ntoskrnl/ob/obsdcach.c + * PURPOSE: Security Descriptor Caching + * PROGRAMMERS: Aleksey Bragin (aleksey@reactos.org) */ /* INCLUDES *******************************************************************/ From 0860be6816c3e86167d35aca98bfd91387e4e39d Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Sat, 16 Aug 2008 18:06:12 +0000 Subject: [PATCH 045/324] - Remove deprecated ExfpInterlockedExchange64 svn path=/trunk/; revision=35397 --- reactos/ntoskrnl/ex/i386/interlck_asm.S | 19 ------------------- reactos/ntoskrnl/include/internal/ex.h | 10 ---------- 2 files changed, 29 deletions(-) diff --git a/reactos/ntoskrnl/ex/i386/interlck_asm.S b/reactos/ntoskrnl/ex/i386/interlck_asm.S index 40c2c256c53..e6a8f3a2159 100644 --- a/reactos/ntoskrnl/ex/i386/interlck_asm.S +++ b/reactos/ntoskrnl/ex/i386/interlck_asm.S @@ -556,24 +556,5 @@ _Exi386InterlockedExchangeUlong@12: /* Return */ ret 8 - -/* Ugly hack: Use InterlockedExchange64 */ -.att_syntax -.global @ExfpInterlockedExchange64@8 -@ExfpInterlockedExchange64@8: - pushl %ebx - pushl %esi - movl %ecx,%esi - movl (%edx),%ebx - movl 4(%edx),%ecx -1: - movl (%esi),%eax - movl 4(%esi),%edx - LOCK - cmpxchg8b (%esi) - jnz 1b - popl %esi - popl %ebx - ret /* EOF */ diff --git a/reactos/ntoskrnl/include/internal/ex.h b/reactos/ntoskrnl/include/internal/ex.h index 65df7d70e30..09cb4c94ed8 100644 --- a/reactos/ntoskrnl/include/internal/ex.h +++ b/reactos/ntoskrnl/include/internal/ex.h @@ -1007,13 +1007,6 @@ ExTryToAcquireResourceExclusiveLite( IN PERESOURCE Resource ); -LONGLONG -FASTCALL -ExfpInterlockedExchange64( - LONGLONG volatile * Destination, - PLONGLONG Exchange -); - NTSTATUS ExpSetTimeZoneInformation(PTIME_ZONE_INFORMATION TimeZoneInformation); @@ -1068,7 +1061,4 @@ XIPInit( #define ExfInterlockedCompareExchange64UL(Destination, Exchange, Comperand) \ (ULONGLONG)ExfInterlockedCompareExchange64((PLONGLONG)(Destination), (PLONGLONG)(Exchange), (PLONGLONG)(Comperand)) -#define ExfpInterlockedExchange64UL(Target, Value) \ - (ULONGLONG)ExfpInterlockedExchange64((PLONGLONG)(Target), (PLONGLONG)(Value)) - #endif /* __NTOSKRNL_INCLUDE_INTERNAL_EXECUTIVE_H */ From 7fd0c1eb309df20724e83876eb5e81af536f1a4a Mon Sep 17 00:00:00 2001 From: Art Yerkes Date: Sat, 16 Aug 2008 22:39:01 +0000 Subject: [PATCH 046/324] Merge aicom-network-fixes up to 35398 svn path=/trunk/; revision=35399 --- reactos/drivers/network/afd/afd/context.c | 15 +++++++++------ reactos/drivers/network/afd/afd/info.c | 15 ++++++--------- reactos/drivers/network/afd/afd/listen.c | 11 +++++++++-- reactos/drivers/network/afd/afd/lock.c | 4 ++-- reactos/drivers/network/afd/afd/main.c | 8 ++++++-- reactos/drivers/network/tcpip/tcpip/irp.c | 4 ++-- 6 files changed, 34 insertions(+), 23 deletions(-) diff --git a/reactos/drivers/network/afd/afd/context.c b/reactos/drivers/network/afd/afd/context.c index 18744884ed0..9796a1c8db5 100644 --- a/reactos/drivers/network/afd/afd/context.c +++ b/reactos/drivers/network/afd/afd/context.c @@ -39,27 +39,30 @@ AfdGetContext( PDEVICE_OBJECT DeviceObject, PIRP Irp, NTSTATUS STDCALL AfdSetContext( PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp ) { - NTSTATUS Status = STATUS_NO_MEMORY; + NTSTATUS Status = STATUS_BUFFER_TOO_SMALL; PFILE_OBJECT FileObject = IrpSp->FileObject; PAFD_FCB FCB = FileObject->FsContext; if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); + if( FCB->Context ) { + ExFreePool( FCB->Context ); + FCB->Context = NULL; + } + if( FCB->ContextSize < IrpSp->Parameters.DeviceIoControl.InputBufferLength ) { - if( FCB->Context ) - ExFreePool( FCB->Context ); FCB->Context = ExAllocatePool ( PagedPool, IrpSp->Parameters.DeviceIoControl.InputBufferLength ); - } - if( FCB->Context ) { - Status = STATUS_SUCCESS; + if( !FCB->Context ) return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, 0, NULL ); + RtlCopyMemory( FCB->Context, IrpSp->Parameters.DeviceIoControl.Type3InputBuffer, IrpSp->Parameters.DeviceIoControl.InputBufferLength ); + Status = STATUS_SUCCESS; } AFD_DbgPrint(MID_TRACE,("Returning %x\n", Status)); diff --git a/reactos/drivers/network/afd/afd/info.c b/reactos/drivers/network/afd/afd/info.c index 9a3ead68093..5e233ef80a2 100644 --- a/reactos/drivers/network/afd/afd/info.c +++ b/reactos/drivers/network/afd/afd/info.c @@ -24,12 +24,9 @@ AfdGetInfo( PDEVICE_OBJECT DeviceObject, PIRP Irp, AFD_DbgPrint(MID_TRACE,("Called %x %x\n", InfoReq, InfoReq ? InfoReq->InformationClass : 0)); - _SEH_TRY { - if( !SocketAcquireStateLock( FCB ) ) { - Status = LostSocket( Irp ); - _SEH_YIELD(return Status); - } + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); + _SEH_TRY { switch( InfoReq->InformationClass ) { case AFD_INFO_RECEIVE_WINDOW_SIZE: InfoReq->Information.Ulong = FCB->Recv.Size; @@ -113,7 +110,7 @@ AfdGetSockOrPeerName( PDEVICE_OBJECT DeviceObject, PIRP Irp, TDI_QUERY_ADDRESS_INFO, Mdl ); } else { - if( !NT_SUCCESS + if( NT_SUCCESS ( Status = TdiBuildNullConnectionInfo ( &ConnInfo, FCB->LocalAddress->Address[0].AddressType ) ) ) { @@ -148,11 +145,11 @@ AfdGetSockOrPeerName( PDEVICE_OBJECT DeviceObject, PIRP Irp, if( ConnInfo ) ExFreePool( ConnInfo ); if( SysMdl ) IoFreeMdl( SysMdl ); + if( TransAddr ) MmUnmapLockedPages( TransAddr, Mdl ); } + /* MmUnlockPages( Mdl ); */ } - - /* MmUnlockPages( Mdl ); */ - /* IoFreeMdl( Mdl ); */ + /* IoFreeMdl( Mdl ); */ } else { Status = STATUS_INSUFFICIENT_RESOURCES; } diff --git a/reactos/drivers/network/afd/afd/listen.c b/reactos/drivers/network/afd/afd/listen.c index 63d4b359f30..fbd73b97479 100644 --- a/reactos/drivers/network/afd/afd/listen.c +++ b/reactos/drivers/network/afd/afd/listen.c @@ -188,8 +188,6 @@ NTSTATUS AfdListenSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp, if( !NT_SUCCESS(Status) ) return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL ); - FCB->State = SOCKET_STATE_LISTENING; - TdiBuildNullConnectionInfo ( &FCB->ListenIrp.ConnectionCallInfo, FCB->LocalAddress->Address[0].AddressType ); @@ -197,6 +195,11 @@ NTSTATUS AfdListenSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp, ( &FCB->ListenIrp.ConnectionReturnInfo, FCB->LocalAddress->Address[0].AddressType ); + if( !FCB->ListenIrp.ConnectionReturnInfo || !FCB->ListenIrp.ConnectionCallInfo ) + return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, 0, NULL ); + + FCB->State = SOCKET_STATE_LISTENING; + Status = TdiListen( &FCB->ListenIrp.InFlightRequest, FCB->Connection.Object, &FCB->ListenIrp.ConnectionCallInfo, @@ -272,6 +275,8 @@ NTSTATUS AfdAccept( PDEVICE_OBJECT DeviceObject, PIRP Irp, ( &FCB->ListenIrp.ConnectionReturnInfo, FCB->LocalAddress->Address[0].AddressType ); + if( !FCB->ListenIrp.ConnectionReturnInfo ) return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, 0, NULL ); + Status = TdiListen( &FCB->ListenIrp.InFlightRequest, FCB->Connection.Object, &FCB->ListenIrp.ConnectionCallInfo, @@ -306,6 +311,8 @@ NTSTATUS AfdAccept( PDEVICE_OBJECT DeviceObject, PIRP Irp, (PVOID *)&NewFileObject, NULL ); + if( !NT_SUCCESS(Status) ) UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL ); + ASSERT(NewFileObject != FileObject); ASSERT(NewFileObject->FsContext != FCB); diff --git a/reactos/drivers/network/afd/afd/lock.c b/reactos/drivers/network/afd/afd/lock.c index 43f0633614c..d63fb56a2b8 100644 --- a/reactos/drivers/network/afd/afd/lock.c +++ b/reactos/drivers/network/afd/afd/lock.c @@ -167,7 +167,7 @@ UINT SocketAcquireStateLock( PAFD_FCB FCB ) { NTSTATUS Status = STATUS_SUCCESS; PVOID CurrentThread = KeGetCurrentThread(); - ASSERT(KeGetCurrentIrql() == PASSIVE_LEVEL); + ASSERT(KeGetCurrentIrql() <= APC_LEVEL); AFD_DbgPrint(MAX_TRACE,("Called on %x, attempting to lock\n", FCB)); @@ -218,7 +218,7 @@ VOID SocketStateUnlock( PAFD_FCB FCB ) { PVOID CurrentThread = KeGetCurrentThread(); #endif ASSERT(FCB->LockCount > 0); - ASSERT(KeGetCurrentIrql() == PASSIVE_LEVEL); + ASSERT(KeGetCurrentIrql() <= APC_LEVEL); ExAcquireFastMutex( &FCB->Mutex ); FCB->LockCount--; diff --git a/reactos/drivers/network/afd/afd/main.c b/reactos/drivers/network/afd/afd/main.c index a689ce56098..ae461883196 100644 --- a/reactos/drivers/network/afd/afd/main.c +++ b/reactos/drivers/network/afd/afd/main.c @@ -210,8 +210,12 @@ VOID DestroySocket( PAFD_FCB FCB ) { ExFreePool( FCB->LocalAddress ); if( FCB->RemoteAddress ) ExFreePool( FCB->RemoteAddress ); - - ExFreePool(FCB->TdiDeviceName.Buffer); + if( FCB->ListenIrp.ConnectionReturnInfo ) + ExFreePool( FCB->ListenIrp.ConnectionReturnInfo ); + if( FCB->ListenIrp.ConnectionCallInfo ) + ExFreePool( FCB->ListenIrp.ConnectionCallInfo ); + if( FCB->TdiDeviceName.Buffer ) + ExFreePool(FCB->TdiDeviceName.Buffer); ExFreePool(FCB); AFD_DbgPrint(MIN_TRACE,("Deleted (%x)\n", FCB)); diff --git a/reactos/drivers/network/tcpip/tcpip/irp.c b/reactos/drivers/network/tcpip/tcpip/irp.c index 0ba3bfb5ab5..da0e95e890c 100644 --- a/reactos/drivers/network/tcpip/tcpip/irp.c +++ b/reactos/drivers/network/tcpip/tcpip/irp.c @@ -27,14 +27,14 @@ NTSTATUS IRPFinish( PIRP Irp, NTSTATUS Status ) { UntrackFL( __FILE__, __LINE__, Irp ); #endif - (void)IoSetCancelRoutine( Irp, NULL ); + Irp->IoStatus.Status = Status; if( Status == STATUS_PENDING ) IoMarkIrpPending( Irp ); else { - Irp->IoStatus.Status = Status; Irql = KeGetCurrentIrql(); + (void)IoSetCancelRoutine( Irp, NULL ); IoCompleteRequest( Irp, IO_NETWORK_INCREMENT ); if (KeGetCurrentIrql() != Irql) { DbgPrint("WARNING: IO COMPLETION RETURNED AT WRONG IRQL:\n"); From 0d12515dcbe59b292aa7dd5bd688501760b5b82e Mon Sep 17 00:00:00 2001 From: James Tabor Date: Sun, 17 Aug 2008 00:46:51 +0000 Subject: [PATCH 047/324] - Add timer handle type. svn path=/trunk/; revision=35400 --- reactos/dll/win32/user32/include/user32p.h | 1 + reactos/subsystems/win32/win32k/include/object.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/reactos/dll/win32/user32/include/user32p.h b/reactos/dll/win32/user32/include/user32p.h index 24a9c9f4d82..3c156a0bb00 100644 --- a/reactos/dll/win32/user32/include/user32p.h +++ b/reactos/dll/win32/user32/include/user32p.h @@ -187,6 +187,7 @@ extern int SPY_Init(void); #define VALIDATE_TYPE_ACCEL 8 #define VALIDATE_TYPE_MONITOR 12 #define VALIDATE_TYPE_EVENT 15 +#define VALIDATE_TYPE_TIMER 16 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */ #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */ diff --git a/reactos/subsystems/win32/win32k/include/object.h b/reactos/subsystems/win32/win32k/include/object.h index 32c32fb2e31..952697e16c5 100644 --- a/reactos/subsystems/win32/win32k/include/object.h +++ b/reactos/subsystems/win32/win32k/include/object.h @@ -51,7 +51,8 @@ typedef enum _USER_OBJECT_TYPE otCallProc = 7, otAccel, otMonitor = 12, - otEvent = 15 + otEvent = 15, + otTimer } USER_OBJECT_TYPE; From 3cdbb3f31d80840d3e3f895e0d3575d4fd3c5c5a Mon Sep 17 00:00:00 2001 From: ReactOS Portable Systems Group Date: Sun, 17 Aug 2008 02:01:30 +0000 Subject: [PATCH 048/324] FreeLDR-side of RAM Disk support for x86 based on actual NT implementation (instead of ARM-only hacks): 1) First, remove the hack in bootmgr.c that looked for a reactos.img. 2) Instead, read the command line to the kernel, and check for /RDIMAGEPATH. If found, load the ramdisk in the loader. 3) This uses the same routine as the previous hack, but enhances it with actual status and progress printouts. 4) Finally, update usetup to generate a ReactOS (RAM Disk) entry on DBG builds, under the WinLDR one. Also fixed a bug where, on MiniTUI, the text sent to UiDrawProgressBarCenter would be ignored. This patch does not result in working RAM disk support yet. To test the FreeLDR side of things, you need to create a ramdisk file: this is easy. Preferred way right now is to use qemu-img to create a standard QEMU image. Then install ReactOS on it and configure it. This is now your ramdisk. Make your image about 100MB; this is how much ReactOS requires to install right now. Now on your "official" QEMU image, you can delete everything except freeldr.sys and freeldr.ini. Or don't, if it's large enough. Now add the reactos.img to your official image. You should have at least 100MB free space. Now when you boot the ReactOS (RAM disk) entry, it should boot up until the kernel, which will panic since there's no ramdisk support yet. Note that you can't just create a QEMU image and drop files in it -- it must be properly formatted and have the ReactOS boot sector: The RAM disk isn't just a collection of files, it's an entire virtual drive, so that's why you must first officially install ReactOS on it. svn path=/trunk/; revision=35401 --- reactos/base/setup/usetup/bootsup.c | 34 +++++++++++++++- reactos/boot/freeldr/freeldr/bootmgr.c | 8 ---- reactos/boot/freeldr/freeldr/disk/ramdisk.c | 35 ++++++++++------ .../boot/freeldr/freeldr/include/ramdisk.h | 4 +- .../boot/freeldr/freeldr/reactos/reactos.c | 40 +++++++++++++++++-- reactos/boot/freeldr/freeldr/ui/minitui.c | 2 +- 6 files changed, 95 insertions(+), 28 deletions(-) diff --git a/reactos/base/setup/usetup/bootsup.c b/reactos/base/setup/usetup/bootsup.c index 5f7f135d1aa..aeb57bd70b4 100644 --- a/reactos/base/setup/usetup/bootsup.c +++ b/reactos/base/setup/usetup/bootsup.c @@ -387,6 +387,13 @@ CreateFreeLoaderIniForReactos(PWCHAR IniPath, INSERT_LAST, L"ReactOS_WinLdr", L"\"ReactOS (WinLdr)\""); + + /* ReactOS_Ram="ReactOS (RAM Disk)" */ + IniCacheInsertKey(IniSection, + NULL, + INSERT_LAST, + L"ReactOS_Ram", + L"\"ReactOS (RAM Disk)\""); #endif /* Create "ReactOS" section */ @@ -444,7 +451,7 @@ CreateFreeLoaderIniForReactos(PWCHAR IniPath, IniSection = IniCacheAppendSection(IniCache, L"ReactOS_WinLdr"); - /* BootType=ReactOS */ + /* BootType=Windows2003 */ IniCacheInsertKey(IniSection, NULL, INSERT_LAST, @@ -464,6 +471,31 @@ CreateFreeLoaderIniForReactos(PWCHAR IniPath, INSERT_LAST, L"Options", L"/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS"); + + /* Create "ReactOS_WinLdr" section */ + IniSection = IniCacheAppendSection(IniCache, + L"ReactOS_Ram"); + + /* BootType=ReactOS */ + IniCacheInsertKey(IniSection, + NULL, + INSERT_LAST, + L"BootType", + L"ReactOS"); + + /* SystemPath=ramdisk(0)\\ReactOS */ + IniCacheInsertKey(IniSection, + NULL, + INSERT_LAST, + L"SystemPath", + L"ramdisk(0)\\ReactOS"); + + /* Options=/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS /RDIMAGEPATH=reactos.img /RDIMAGEOFFSET=32256*/ + IniCacheInsertKey(IniSection, + NULL, + INSERT_LAST, + L"Options", + L"/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS /RDIMAGEPATH=reactos.img /RDIMAGEOFFSET=32256"); #endif /* Save the ini file */ diff --git a/reactos/boot/freeldr/freeldr/bootmgr.c b/reactos/boot/freeldr/freeldr/bootmgr.c index 904f1ef309b..878ed85025b 100644 --- a/reactos/boot/freeldr/freeldr/bootmgr.c +++ b/reactos/boot/freeldr/freeldr/bootmgr.c @@ -37,14 +37,6 @@ VOID RunLoader(VOID) return; } - // - // Check if we have a virtual RAM disk - // This is for x86 emulation -- on real hardware, the RAM disk will be - // located in one of the hardware memory descriptors as well as on the - // freeldr command-line - // - RamDiskCheckForVirtualFile(); - if (!IniFileInitialize()) { UiMessageBoxCritical("Error initializing .ini file"); diff --git a/reactos/boot/freeldr/freeldr/disk/ramdisk.c b/reactos/boot/freeldr/freeldr/disk/ramdisk.c index ee087967b6e..fe624850a5a 100644 --- a/reactos/boot/freeldr/freeldr/disk/ramdisk.c +++ b/reactos/boot/freeldr/freeldr/disk/ramdisk.c @@ -27,7 +27,7 @@ RamDiskGetDataAtOffset(IN PVOID Offset) // // Return data from our RAM Disk // - assert(((ULONG_PTR)gRamDiskBase + (ULONG_PTR)Offset) < + ASSERT(((ULONG_PTR)gRamDiskBase + (ULONG_PTR)Offset) < ((ULONG_PTR)gRamDiskBase + (ULONG_PTR)gRamDiskSize)); return (PVOID)((ULONG_PTR)gRamDiskBase + (ULONG_PTR)(Offset)); } @@ -83,35 +83,41 @@ RamDiskReadLogicalSectors(IN ULONG Reserved, VOID NTAPI -RamDiskCheckForVirtualFile(VOID) +RamDiskLoadVirtualFile(IN PCHAR FileName) { PFILE RamFile; ULONG TotalRead, ChunkSize; - + PCHAR MsgBuffer = "Loading ramdisk..."; + ULONG PercentPerChunk, Percent; + + // + // Display progress + // + UiDrawProgressBarCenter(1, 100, MsgBuffer); + // // Try opening the ramdisk file (this assumes the boot volume was opened) - // - RamFile = FsOpenFile("reactos.img"); + // + RamFile = FsOpenFile(FileName); if (RamFile) { // // Get the file size // gRamDiskSize = FsGetFileSize(RamFile); - TuiPrintf("Found virtual ramdisk (%dKB)\n", gRamDiskSize / 1024); if (!gRamDiskSize) return; // // Allocate memory for it // ChunkSize = 8 * 1024 * 1024; + Percent = PercentPerChunk = 100 / (gRamDiskSize / ChunkSize); gRamDiskBase = MmAllocateMemory(gRamDiskSize); if (!gRamDiskBase) return; - + // // Read it in chunks // - TuiPrintf("Loading ramdisk @ 0x%x...", gRamDiskBase); for (TotalRead = 0; TotalRead < gRamDiskSize; TotalRead += ChunkSize) { // @@ -124,11 +130,17 @@ RamDiskCheckForVirtualFile(VOID) // ChunkSize = gRamDiskSize - TotalRead; } - + + // + // Draw progress + // + UiDrawProgressBarCenter(Percent, 100, MsgBuffer); + Percent += PercentPerChunk; + // // Copy the contents // - TuiPrintf("."); + if (!FsReadFile(RamFile, ChunkSize, NULL, @@ -137,10 +149,9 @@ RamDiskCheckForVirtualFile(VOID) // // Fail // - TuiPrintf("Failed to read ramdisk\n"); + UiMessageBox("Failed to read ramdisk\n"); } } - TuiPrintf("\n"); } } diff --git a/reactos/boot/freeldr/freeldr/include/ramdisk.h b/reactos/boot/freeldr/freeldr/include/ramdisk.h index f53e8861584..08378adfb6d 100644 --- a/reactos/boot/freeldr/freeldr/include/ramdisk.h +++ b/reactos/boot/freeldr/freeldr/include/ramdisk.h @@ -20,8 +20,8 @@ RamDiskSwitchFromBios( VOID NTAPI -RamDiskCheckForVirtualFile( - VOID +RamDiskLoadVirtualFile( + IN PCHAR FileName ); extern PVOID gRamDiskBase; diff --git a/reactos/boot/freeldr/freeldr/reactos/reactos.c b/reactos/boot/freeldr/freeldr/reactos/reactos.c index 1439f419dd9..c04373ad85e 100644 --- a/reactos/boot/freeldr/freeldr/reactos/reactos.c +++ b/reactos/boot/freeldr/freeldr/reactos/reactos.c @@ -40,7 +40,7 @@ char reactos_arc_hardware_data[HW_MAX_ARC_HEAP_SIZE] = {0}; CHAR szHalName[255]; CHAR szBootPath[255]; CHAR SystemRoot[255]; -static CHAR szLoadingMsg[] = "Loading ReactOS..."; +static CHAR szLoadingMsg[] = "ReactOS is loading files..."; BOOLEAN FrLdrBootType; ULONG_PTR KernelBase; ROS_KERNEL_ENTRY_POINT KernelEntryPoint; @@ -576,6 +576,11 @@ LoadAndBootReactOS(PCSTR OperatingSystemName) PVOID LoadBase; ULONG_PTR Base; ULONG Size; + + // + // Backdrop + // + UiDrawBackdrop(); // // Open the operating system section @@ -588,13 +593,40 @@ LoadAndBootReactOS(PCSTR OperatingSystemName) return; } - UiDrawBackdrop(); - UiDrawStatusText("Detecting Hardware..."); - UiDrawProgressBarCenter(1, 100, szLoadingMsg); + // + // Read the command line + // + if (IniReadSettingByName(SectionId, "Options", value, sizeof(value))) + { + // + // Check if a ramdisk file was given + // + PCHAR File; + File = strstr(value, "/RDIMAGEPATH="); + if (File) + { + // + // Copy the file name and everything else after it + // + strcpy(szFileName, File + 13); + + // + // Null-terminate + // + *strstr(szFileName, " ") = ANSI_NULL; + + // + // Load the ramdisk + // + RamDiskLoadVirtualFile(szFileName); + } + } /* * Setup multiboot information structure */ + UiDrawProgressBarCenter(1, 100, szLoadingMsg); + UiDrawStatusText("Detecting Hardware..."); LoaderBlock.CommandLine = reactos_kernel_cmdline; LoaderBlock.PageDirectoryStart = (ULONG)&PageDirectoryStart; LoaderBlock.PageDirectoryEnd = (ULONG)&PageDirectoryEnd; diff --git a/reactos/boot/freeldr/freeldr/ui/minitui.c b/reactos/boot/freeldr/freeldr/ui/minitui.c index 47bd56f135d..bbc36a82dd8 100644 --- a/reactos/boot/freeldr/freeldr/ui/minitui.c +++ b/reactos/boot/freeldr/freeldr/ui/minitui.c @@ -65,7 +65,7 @@ VOID MiniTuiDrawProgressBar(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UL // // Draw the "Loading..." text // - TuiDrawCenteredText(Left + 2, Top + 1, Right - 2, Top + 1, "ReactOS is loading files...", ATTR(7, 0)); + TuiDrawCenteredText(Left + 2, Top + 1, Right - 2, Top + 1, ProgressText, ATTR(7, 0)); // Draw the percent complete for (i=0; i<(Position*ProgressBarWidth)/Range; i++) From 7c7314849d73f4f1d0e1b94767e0fba1f3a51aca Mon Sep 17 00:00:00 2001 From: ReactOS Portable Systems Group Date: Sun, 17 Aug 2008 02:35:30 +0000 Subject: [PATCH 049/324] Make RAM disk support work on x86 as well (it is now generic): 1) Don't assert if loaded from setup. On NT this means special things, but we don't care about that for now. 2) Add to txtsetup.sif along with the other core FS drivers. This will eventually allow installing from ramdisk as well (and later, over the network) 3) Add to hivesys_i386.inf so that the driver is initialized. RAM disk now works flawlessly on x86 -- just make sure to follow the previous instructions, and add to your total memory available to ReactOS. svn path=/trunk/; revision=35402 --- reactos/boot/bootdata/hivesys_i386.inf | 11 +++++++++++ reactos/boot/bootdata/txtsetup.sif | 1 + reactos/drivers/storage/class/ramdisk/ramdisk.c | 5 +++-- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/reactos/boot/bootdata/hivesys_i386.inf b/reactos/boot/bootdata/hivesys_i386.inf index dc907b5e224..6ecad64091b 100644 --- a/reactos/boot/bootdata/hivesys_i386.inf +++ b/reactos/boot/bootdata/hivesys_i386.inf @@ -25,6 +25,10 @@ HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E975-E325-11CE-BFC1-08002BE103 HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E975-E325-11CE-BFC1-08002BE10318}","NoDisplayClass",0x00000000,"1" HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E975-E325-11CE-BFC1-08002BE10318}","NoInstallClass",0x00000000,"1" +HKLM,"SYSTEM\CurrentControlSet\Control\Class\{9D6D66A6-0B0C-4563-9077-A0E9A7955AE4}",,0x00000000,"Ramdisk" +HKLM,"SYSTEM\CurrentControlSet\Control\Class\{9D6D66A6-0B0C-4563-9077-A0E9A7955AE4}","Class",0x00000000,"Ramdisk" +HKLM,"SYSTEM\CurrentControlSet\Control\Class\{9D6D66A6-0B0C-4563-9077-A0E9A7955AE4}","Icon",0x00000000,"-5" + ; Default computer name settings HKLM,"SYSTEM\CurrentControlSet\Control\ComputerName",,0x00000012 HKLM,"SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName","ComputerName",0x00000002,"COMPUTERNAME" @@ -1025,6 +1029,13 @@ HKLM,"SYSTEM\CurrentControlSet\Services\fastfat","ImagePath",0x00020000,"system3 HKLM,"SYSTEM\CurrentControlSet\Services\fastfat","Start",0x00010001,0x00000000 HKLM,"SYSTEM\CurrentControlSet\Services\fastfat","Type",0x00010001,0x00000002 +; RAM Disk class driver +HKLM,"SYSTEM\CurrentControlSet\Services\RamDisk","ErrorControl",0x00010001,0x00000000 +HKLM,"SYSTEM\CurrentControlSet\Services\RamDisk","Group",0x00000000,"Boot File System" +HKLM,"SYSTEM\CurrentControlSet\Services\RamDisk","ImagePath",0x00020000,"system32\drivers\ramdisk.sys" +HKLM,"SYSTEM\CurrentControlSet\Services\RamDisk","Start",0x00010001,0x00000000 +HKLM,"SYSTEM\CurrentControlSet\Services\RamDisk","Type",0x00010001,0x00000002 + ; EXT2 Filesystem driver HKLM,"SYSTEM\CurrentControlSet\Services\Ext2fs","ErrorControl",0x00010001,0x00000000 HKLM,"SYSTEM\CurrentControlSet\Services\Ext2fs","Group",0x00000000,"Boot File System" diff --git a/reactos/boot/bootdata/txtsetup.sif b/reactos/boot/bootdata/txtsetup.sif index 1c1bcf39602..b9e1a50be2d 100644 --- a/reactos/boot/bootdata/txtsetup.sif +++ b/reactos/boot/bootdata/txtsetup.sif @@ -33,6 +33,7 @@ pci.sys=,,,,,,,,,,,,4 scsiport.sys=,,,,,,x,,,,,,4 uniata.sys=,,,,,,,,,,,,4 fastfat.sys=,,,,,,x,,,,,,4 +ramdisk.sys=,,,,,,x,,,,,,4 ext2.sys=,,,,,,x,,,,,,4 [HardwareIdsDatabase] diff --git a/reactos/drivers/storage/class/ramdisk/ramdisk.c b/reactos/drivers/storage/class/ramdisk/ramdisk.c index 0a15a6c1bb3..59f3d24ff43 100644 --- a/reactos/drivers/storage/class/ramdisk/ramdisk.c +++ b/reactos/drivers/storage/class/ramdisk/ramdisk.c @@ -2284,7 +2284,7 @@ RamdiskAddDevice(IN PDRIVER_OBJECT DriverObject, // // Are we being booted from setup? Not yet supported // - ASSERT (!KeLoaderBlock->SetupLdrBlock); + //ASSERT(!KeLoaderBlock->SetupLdrBlock); } // @@ -2308,6 +2308,7 @@ DriverEntry(IN PDRIVER_OBJECT DriverObject, PCHAR BootDeviceName, CommandLine; PDEVICE_OBJECT PhysicalDeviceObject = NULL; NTSTATUS Status; + DPRINT1("RAM Disk Driver Initialized\n"); // // Query ramdisk parameters @@ -2399,7 +2400,7 @@ DriverEntry(IN PDRIVER_OBJECT DriverObject, // // Installing from Ramdisk isn't supported yet // - ASSERT(!KeLoaderBlock->SetupLdrBlock); + //ASSERT(!KeLoaderBlock->SetupLdrBlock); // // Are we reporting the device From 8b23bceee1a5fbefbc486dfc96e8a027b0282bc5 Mon Sep 17 00:00:00 2001 From: Art Yerkes Date: Sun, 17 Aug 2008 05:23:10 +0000 Subject: [PATCH 050/324] Don't attempt to mount a partition that starts with a fat bootblock. svn path=/trunk/; revision=35403 --- reactos/drivers/filesystems/ext2/src/fsctrl.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/reactos/drivers/filesystems/ext2/src/fsctrl.c b/reactos/drivers/filesystems/ext2/src/fsctrl.c index 372c0c227c3..dfd545975a7 100644 --- a/reactos/drivers/filesystems/ext2/src/fsctrl.c +++ b/reactos/drivers/filesystems/ext2/src/fsctrl.c @@ -252,6 +252,14 @@ Ext2MountVolume ( Ext2PerformVerifyDiskRead ( TargetDeviceObject, BootSector, StartingOffset, NumberOfBytesToRead ); + // Reject a volume that contains fat artifacts + + DebugTrace(DEBUG_TRACE_MOUNT, "OEM[%s]", BootSector->Oem); + if (BootSector->Oem[0]) + { + try_return (STATUS_WRONG_VOLUME); + } + // Allocating memory for reading in Super Block... SuperBlock = Ext2AllocatePool( PagedPool, NumberOfBytesToRead ); From 553ffd969a686b2ce5be2fcc73d8f8fc1fb01d2b Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Sun, 17 Aug 2008 12:05:28 +0000 Subject: [PATCH 051/324] - Remove dead pager.c - Remove empty aspace.c - Move MmKernelAddressSpace to a header svn path=/trunk/; revision=35406 --- reactos/ntoskrnl/include/internal/mm.h | 2 + reactos/ntoskrnl/mm/aspace.c | 27 ------ reactos/ntoskrnl/mm/pager.c | 109 ----------------------- reactos/ntoskrnl/ntoskrnl-generic.rbuild | 2 - 4 files changed, 2 insertions(+), 138 deletions(-) delete mode 100644 reactos/ntoskrnl/mm/aspace.c delete mode 100644 reactos/ntoskrnl/mm/pager.c diff --git a/reactos/ntoskrnl/include/internal/mm.h b/reactos/ntoskrnl/include/internal/mm.h index 086d70a9ac6..f7fea088cad 100644 --- a/reactos/ntoskrnl/include/internal/mm.h +++ b/reactos/ntoskrnl/include/internal/mm.h @@ -388,6 +388,8 @@ typedef VOID BOOLEAN Dirty ); +PMM_AVL_TABLE MmKernelAddressSpace; + /* marea.c *******************************************************************/ NTSTATUS diff --git a/reactos/ntoskrnl/mm/aspace.c b/reactos/ntoskrnl/mm/aspace.c deleted file mode 100644 index 48b44a08fe6..00000000000 --- a/reactos/ntoskrnl/mm/aspace.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/mm/aspace.c - * PURPOSE: Manages address spaces - * - * PROGRAMMERS: David Welch (welch@cwcom.net) - */ - -/* INCLUDES *****************************************************************/ - -#include -#include - -#if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, MmInitializeKernelAddressSpace) -#endif - - -/* GLOBALS ******************************************************************/ - -PMM_AVL_TABLE MmKernelAddressSpace; - -/* FUNCTIONS *****************************************************************/ - - -/* EOF */ diff --git a/reactos/ntoskrnl/mm/pager.c b/reactos/ntoskrnl/mm/pager.c deleted file mode 100644 index 793d73df328..00000000000 --- a/reactos/ntoskrnl/mm/pager.c +++ /dev/null @@ -1,109 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/mm/pager.c - * PURPOSE: Moves infrequently used data out of memory - * - * PROGRAMMERS: David Welch (welch@cwcom.net) - */ - -/* INCLUDES ****************************************************************/ - -#include -#define NDEBUG -#include - -/* GLOBALS *******************************************************************/ - -#if 0 -static HANDLE PagerThreadHandle; -static CLIENT_ID PagerThreadId; -static KEVENT PagerThreadEvent; -static BOOLEAN PagerThreadShouldTerminate; -static ULONG PagerThreadWorkCount; -#endif - -/* FUNCTIONS *****************************************************************/ - -#if 0 -BOOLEAN -MiIsPagerThread(VOID) -{ - return(PsGetCurrentThreadId() == PagerThreadId.UniqueThread); -} - -VOID -MiStartPagerThread(VOID) -{ - ULONG WasWorking; - - WasWorking = InterlockedIncrement(&PagerThreadWorkCount); - if (WasWorking == 1) - { - KeSetEvent(&PagerThreadEvent, IO_NO_INCREMENT, FALSE); - } -} - -VOID -MiStopPagerThread(VOID) -{ - (VOID)InterlockedDecrement(&PagerThreadWorkCount); -} - -static NTSTATUS STDCALL -MmPagerThreadMain(PVOID Ignored) -{ - NTSTATUS Status; - - for(;;) - { - /* Wake for a low memory situation or a terminate request. */ - Status = KeWaitForSingleObject(&PagerThreadEvent, - 0, - KernelMode, - FALSE, - NULL); - if (!NT_SUCCESS(Status)) - { - DbgPrint("PagerThread: Wait failed\n"); - KEBUGCHECK(0); - } - if (PagerThreadShouldTerminate) - { - DbgPrint("PagerThread: Terminating\n"); - return(STATUS_SUCCESS); - } - do - { - /* Try and make some memory available to the system. */ - MmRebalanceMemoryConsumers(); - } - while(PagerThreadWorkCount > 0); - } -} - -NTSTATUS MmInitPagerThread(VOID) -{ - NTSTATUS Status; - - PagerThreadShouldTerminate = FALSE; - PagerThreadWorkCount = 0; - KeInitializeEvent(&PagerThreadEvent, - SynchronizationEvent, - FALSE); - - Status = PsCreateSystemThread(&PagerThreadHandle, - THREAD_ALL_ACCESS, - NULL, - NULL, - &PagerThreadId, - (PKSTART_ROUTINE) MmPagerThreadMain, - NULL); - if (!NT_SUCCESS(Status)) - { - return(Status); - } - - return(STATUS_SUCCESS); -} -#endif diff --git a/reactos/ntoskrnl/ntoskrnl-generic.rbuild b/reactos/ntoskrnl/ntoskrnl-generic.rbuild index 3f72f594a78..dac3192fd75 100644 --- a/reactos/ntoskrnl/ntoskrnl-generic.rbuild +++ b/reactos/ntoskrnl/ntoskrnl-generic.rbuild @@ -364,7 +364,6 @@ anonmem.c - aspace.c balance.c cont.c drvlck.c @@ -380,7 +379,6 @@ npool.c pagefile.c pageop.c - pager.c pagfault.c paging.c pe.c From 10ec9546544f3c9892f72a0c8dae9cb91b0de978 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Sun, 17 Aug 2008 12:17:08 +0000 Subject: [PATCH 052/324] - Remove two more files by moving their tiny contents (one stub, one 2 line function) to mm.c svn path=/trunk/; revision=35407 --- reactos/ntoskrnl/mm/mm.c | 25 +++++++++++++++++++ reactos/ntoskrnl/mm/pagfault.c | 30 ----------------------- reactos/ntoskrnl/mm/paging.c | 31 ------------------------ reactos/ntoskrnl/ntoskrnl-generic.rbuild | 2 -- 4 files changed, 25 insertions(+), 63 deletions(-) delete mode 100644 reactos/ntoskrnl/mm/pagfault.c delete mode 100644 reactos/ntoskrnl/mm/paging.c diff --git a/reactos/ntoskrnl/mm/mm.c b/reactos/ntoskrnl/mm/mm.c index 0b985348aec..dc880dc5313 100644 --- a/reactos/ntoskrnl/mm/mm.c +++ b/reactos/ntoskrnl/mm/mm.c @@ -366,6 +366,31 @@ MmCommitPagedPoolAddress(PVOID Address, BOOLEAN Locked) /* Miscellanea functions: they may fit somewhere else */ +/* + * @implemented + */ +BOOLEAN +NTAPI +MmIsRecursiveIoFault (VOID) +{ + PETHREAD Thread = PsGetCurrentThread(); + + return (Thread->DisablePageFaultClustering | Thread->ForwardClusterOnly); +} + +/* + * @unimplemented + */ +NTSTATUS +NTAPI +MmMapUserAddressesToPage(IN PVOID BaseAddress, + IN SIZE_T NumberOfBytes, + IN PVOID PageAddress) +{ + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} + /* * @unimplemented */ diff --git a/reactos/ntoskrnl/mm/pagfault.c b/reactos/ntoskrnl/mm/pagfault.c deleted file mode 100644 index 4bae88943f6..00000000000 --- a/reactos/ntoskrnl/mm/pagfault.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/mm/pagfault.c - * PURPOSE: No purpose listed. - * - * PROGRAMMERS: No programmer listed. - */ - - -#include - -/* - * @implemented - */ -BOOLEAN -STDCALL -MmIsRecursiveIoFault ( - VOID -) -{ - PETHREAD Thread = PsGetCurrentThread (); - - return ( Thread->DisablePageFaultClustering - | Thread->ForwardClusterOnly - ); -} - - -/* EOF */ diff --git a/reactos/ntoskrnl/mm/paging.c b/reactos/ntoskrnl/mm/paging.c deleted file mode 100644 index 228e1c7ea18..00000000000 --- a/reactos/ntoskrnl/mm/paging.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/mm/paging.c - * PURPOSE: Paging file functions - * - * PROGRAMMERS: David Welch (welch@mcmail.com) - */ - -/* INCLUDES *****************************************************************/ - -#include -#include - - -/* FUNCTIONS *****************************************************************/ - -/* - * @unimplemented - */ -NTSTATUS -STDCALL -MmMapUserAddressesToPage ( - IN PVOID BaseAddress, - IN SIZE_T NumberOfBytes, - IN PVOID PageAddress - ) -{ - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; -} diff --git a/reactos/ntoskrnl/ntoskrnl-generic.rbuild b/reactos/ntoskrnl/ntoskrnl-generic.rbuild index dac3192fd75..b452e7ae97e 100644 --- a/reactos/ntoskrnl/ntoskrnl-generic.rbuild +++ b/reactos/ntoskrnl/ntoskrnl-generic.rbuild @@ -379,8 +379,6 @@ npool.c pagefile.c pageop.c - pagfault.c - paging.c pe.c physical.c pool.c From 4972a810f1c9bb14e147bd3c74248e183b41b43d Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Sun, 17 Aug 2008 17:38:28 +0000 Subject: [PATCH 053/324] - Remove dead code svn path=/trunk/; revision=35410 --- reactos/ntoskrnl/include/internal/mm.h | 14 --- reactos/ntoskrnl/mm/i386/page.c | 117 ------------------------- 2 files changed, 131 deletions(-) diff --git a/reactos/ntoskrnl/include/internal/mm.h b/reactos/ntoskrnl/include/internal/mm.h index f7fea088cad..fb0cb2c0779 100644 --- a/reactos/ntoskrnl/include/internal/mm.h +++ b/reactos/ntoskrnl/include/internal/mm.h @@ -1061,13 +1061,6 @@ PVOID NTAPI MmCreateHyperspaceMapping(PFN_TYPE Page); -PFN_TYPE -NTAPI -MmChangeHyperspaceMapping( - PVOID Address, - PFN_TYPE Page -); - PFN_TYPE NTAPI MmDeleteHyperspaceMapping(PVOID Address); @@ -1219,13 +1212,6 @@ VOID NTAPI MmReferencePageUnsafe(PFN_TYPE Page); -BOOLEAN -NTAPI -MmIsAccessedAndResetAccessPage( - struct _EPROCESS *Process, - PVOID Address -); - ULONG NTAPI MmGetReferenceCountPage(PFN_TYPE Page); diff --git a/reactos/ntoskrnl/mm/i386/page.c b/reactos/ntoskrnl/mm/i386/page.c index 6ccd43dc97d..ba1c9916994 100644 --- a/reactos/ntoskrnl/mm/i386/page.c +++ b/reactos/ntoskrnl/mm/i386/page.c @@ -62,25 +62,6 @@ __inline LARGE_INTEGER PTE_TO_PAGE(ULONG npage) BOOLEAN MmUnmapPageTable(PULONG Pt); -ULONG_PTR -NTAPI -MiFlushTlbIpiRoutine(ULONG_PTR Address) -{ - if (Address == (ULONG_PTR)-1) - { - KeFlushCurrentTb(); - } - else if (Address == (ULONG_PTR)-2) - { - KeFlushCurrentTb(); - } - else - { - __invlpg((PVOID)Address); - } - return 0; -} - VOID MiFlushTlb(PULONG Pt, PVOID Address) { @@ -90,8 +71,6 @@ MiFlushTlb(PULONG Pt, PVOID Address) } } - - PULONG MmGetPageDirectory(VOID) { @@ -271,50 +250,6 @@ MmDeletePageTable(PEPROCESS Process, PVOID Address) } } -VOID -NTAPI -MmFreePageTable(PEPROCESS Process, PVOID Address) -{ - PEPROCESS CurrentProcess = PsGetCurrentProcess(); - ULONG i; - PFN_TYPE Pfn; - PULONG PageTable; - - DPRINT("ProcessId %d, Address %x\n", Process->UniqueProcessId, Address); - if (Process != NULL && Process != CurrentProcess) - { - KeAttachProcess(&Process->Pcb); - } - - PageTable = (PULONG)PAGE_ROUND_DOWN((PVOID)MiAddressToPte(Address)); - for (i = 0; i < 1024; i++) - { - if (PageTable[i] != 0) - { - DbgPrint("Page table entry not clear at %x/%x (is %x)\n", - ((ULONG)Address / (4*1024*1024)), i, PageTable[i]); - KEBUGCHECK(0); - } - } - Pfn = MiAddressToPde(Address)->u.Hard.PageFrameNumber; - MiAddressToPde(Address)->u.Long = 0; - MiFlushTlb((PULONG)MiAddressToPde(Address), MiAddressToPte(Address)); - - if (Address >= MmSystemRangeStart) - { - // MmGlobalKernelPageDirectory[ADDR_TO_PDE_OFFSET(Address)] = 0; - KEBUGCHECK(0); - } - else - { - MmReleasePageMemoryConsumer(MC_NPPOOL, Pfn); - } - if (Process != NULL && Process != CurrentProcess) - { - KeDetachProcess(); - } -} - static PULONG MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create) { @@ -637,42 +572,6 @@ MmIsDirtyPage(PEPROCESS Process, PVOID Address) return MmGetPageEntryForProcess(Process, Address) & PA_DIRTY ? TRUE : FALSE; } -BOOLEAN -NTAPI -MmIsAccessedAndResetAccessPage(PEPROCESS Process, PVOID Address) -{ - PULONG Pt; - ULONG Pte; - - if (Address < MmSystemRangeStart && Process == NULL) - { - DPRINT1("MmIsAccessedAndResetAccessPage is called for user space without a process.\n"); - KEBUGCHECK(0); - } - - Pt = MmGetPageTableForProcess(Process, Address, FALSE); - if (Pt == NULL) - { - KEBUGCHECK(0); - } - - do - { - Pte = *Pt; - } while (Pte != InterlockedCompareExchangePte(Pt, Pte & ~PA_ACCESSED, Pte)); - - if (Pte & PA_ACCESSED) - { - MiFlushTlb(Pt, Address); - return TRUE; - } - else - { - MmUnmapPageTable(Pt); - return FALSE; - } -} - VOID NTAPI MmSetCleanPage(PEPROCESS Process, PVOID Address) @@ -1234,22 +1133,6 @@ MmCreateHyperspaceMapping(PFN_TYPE Page) return Address; } -PFN_TYPE -NTAPI -MmChangeHyperspaceMapping(PVOID Address, PFN_TYPE NewPage) -{ - PFN_TYPE Pfn; - ULONG Entry; - - ASSERT (IS_HYPERSPACE(Address)); - - Entry = InterlockedExchangePte(MiAddressToPte(Address), PFN_TO_PTE(NewPage) | PA_PRESENT | PA_READWRITE); - Pfn = PTE_TO_PFN(Entry); - - __invlpg(Address); - return Pfn; -} - PFN_TYPE NTAPI MmDeleteHyperspaceMapping(PVOID Address) From 4aa45a68034d6b9fbdd66a4c3d4727491b099615 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Sun, 17 Aug 2008 18:01:49 +0000 Subject: [PATCH 054/324] - Move kernel mode implementation of RtlpGetStackLimits from crt to ntoskrnl svn path=/trunk/; revision=35411 --- reactos/lib/sdk/crt/except/i386/seh.s | 28 ------------------ reactos/ntoskrnl/ntoskrnl-generic.rbuild | 5 ++++ reactos/ntoskrnl/rtl/i386/stack.S | 37 ++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 28 deletions(-) create mode 100644 reactos/ntoskrnl/rtl/i386/stack.S diff --git a/reactos/lib/sdk/crt/except/i386/seh.s b/reactos/lib/sdk/crt/except/i386/seh.s index 96ec9951e9b..15a8cc5777a 100644 --- a/reactos/lib/sdk/crt/except/i386/seh.s +++ b/reactos/lib/sdk/crt/except/i386/seh.s @@ -438,31 +438,3 @@ except_return3: pop ebp ret .endfunc - -// -// -// REMOVE ME REMOVE ME REMOVE ME REMOVE ME REMOVE ME REMOVE ME REMOVE ME -// -// -.func RtlpGetStackLimits@8 -.globl _RtlpGetStackLimits@8 -_RtlpGetStackLimits@8: - - /* Get the current thread */ - mov eax, [fs:KPCR_CURRENT_THREAD] - - /* Get the stack limits */ - mov ecx, [eax+KTHREAD_STACK_LIMIT] - mov edx, [eax+KTHREAD_INITIAL_STACK] - sub edx, SIZEOF_FX_SAVE_AREA - - /* Return them */ - mov eax, [esp+4] - mov [eax], ecx - - mov eax, [esp+8] - mov [eax], edx - - /* return */ - ret 8 -.endfunc diff --git a/reactos/ntoskrnl/ntoskrnl-generic.rbuild b/reactos/ntoskrnl/ntoskrnl-generic.rbuild index b452e7ae97e..09ecaf6e633 100644 --- a/reactos/ntoskrnl/ntoskrnl-generic.rbuild +++ b/reactos/ntoskrnl/ntoskrnl-generic.rbuild @@ -442,6 +442,11 @@ rtlexcpt.c + + + stack.S + + libsupp.c misc.c diff --git a/reactos/ntoskrnl/rtl/i386/stack.S b/reactos/ntoskrnl/rtl/i386/stack.S new file mode 100644 index 00000000000..822e60db065 --- /dev/null +++ b/reactos/ntoskrnl/rtl/i386/stack.S @@ -0,0 +1,37 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS Kernel + * FILE: ntoskrnl/rtl/i386/seh.s + * PURPOSE: Stack Support for RTL + * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include +.intel_syntax noprefix + +/* FUNCTIONS *****************************************************************/ + +.func RtlpGetStackLimits@8 +.globl _RtlpGetStackLimits@8 +_RtlpGetStackLimits@8: + + /* Get the current thread */ + mov eax, [fs:KPCR_CURRENT_THREAD] + + /* Get the stack limits */ + mov ecx, [eax+KTHREAD_STACK_LIMIT] + mov edx, [eax+KTHREAD_INITIAL_STACK] + sub edx, SIZEOF_FX_SAVE_AREA + + /* Return them */ + mov eax, [esp+4] + mov [eax], ecx + + mov eax, [esp+8] + mov [eax], edx + + /* return */ + ret 8 +.endfunc From 878ef899652873bafe889ff2a810326fc2fa7892 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sun, 17 Aug 2008 18:11:32 +0000 Subject: [PATCH 055/324] Device type can be undefined if kbdclass or mouclass is not loaded. svn path=/trunk/; revision=35412 --- reactos/drivers/input/i8042prt/pnp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/drivers/input/i8042prt/pnp.c b/reactos/drivers/input/i8042prt/pnp.c index 530460693ac..5234a7722c9 100644 --- a/reactos/drivers/input/i8042prt/pnp.c +++ b/reactos/drivers/input/i8042prt/pnp.c @@ -617,8 +617,8 @@ i8042PnpStartDevice( } default: { - ERR_(I8042PRT, "Unknown FDO type %u\n", DeviceExtension->Type); - ASSERT(FALSE); + WARN_(I8042PRT, "Unknown FDO type %u\n", DeviceExtension->Type); + ASSERT(!(PortDeviceExtension->Flags & KEYBOARD_CONNECTED) || !(PortDeviceExtension->Flags & MOUSE_CONNECTED)); Status = STATUS_INVALID_DEVICE_REQUEST; } } From 4353142bc2e46e7bfb4faa6020ff3c4ca99f0d8a Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Sun, 17 Aug 2008 18:34:37 +0000 Subject: [PATCH 056/324] - Rename SeInit to SeInitSystem svn path=/trunk/; revision=35413 --- reactos/ntoskrnl/ex/init.c | 4 ++-- reactos/ntoskrnl/include/internal/se.h | 2 +- reactos/ntoskrnl/se/semgr.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/reactos/ntoskrnl/ex/init.c b/reactos/ntoskrnl/ex/init.c index 835796e4da3..2ecfb63d53a 100644 --- a/reactos/ntoskrnl/ex/init.c +++ b/reactos/ntoskrnl/ex/init.c @@ -1206,7 +1206,7 @@ ExpInitializeExecutive(IN ULONG Cpu, if (!ObInitSystem()) KEBUGCHECK(OBJECT_INITIALIZATION_FAILED); /* Load basic Security for other Managers */ - if (!SeInit()) KEBUGCHECK(SECURITY_INITIALIZATION_FAILED); + if (!SeInitSystem()) KEBUGCHECK(SECURITY_INITIALIZATION_FAILED); /* Initialize the Process Manager */ if (!PsInitSystem(LoaderBlock)) KEBUGCHECK(PROCESS_INITIALIZATION_FAILED); @@ -1532,7 +1532,7 @@ Phase1InitializationDiscard(IN PVOID Context) } /* Initialize the SRM in Phase 1 */ - if (!SeInit()) KEBUGCHECK(SECURITY1_INITIALIZATION_FAILED); + if (!SeInitSystem()) KEBUGCHECK(SECURITY1_INITIALIZATION_FAILED); /* Update the progress bar */ InbvUpdateProgressBar(10); diff --git a/reactos/ntoskrnl/include/internal/se.h b/reactos/ntoskrnl/include/internal/se.h index 5ab71dcc74c..d7365f4d594 100644 --- a/reactos/ntoskrnl/include/internal/se.h +++ b/reactos/ntoskrnl/include/internal/se.h @@ -86,7 +86,7 @@ extern PSECURITY_DESCRIPTOR SeUnrestrictedSd; /* Functions */ BOOLEAN NTAPI -SeInit(VOID); +SeInitSystem(VOID); BOOLEAN NTAPI diff --git a/reactos/ntoskrnl/se/semgr.c b/reactos/ntoskrnl/se/semgr.c index 262723b811d..5cf54558ad6 100644 --- a/reactos/ntoskrnl/se/semgr.c +++ b/reactos/ntoskrnl/se/semgr.c @@ -134,7 +134,7 @@ SepInitializationPhase1(VOID) BOOLEAN NTAPI -SeInit(VOID) +SeInitSystem(VOID) { /* Check the initialization phase */ switch (ExpInitializationPhase) From f7b3363eb2af216f4d52f4a6d7cbe16f76f6514d Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Sun, 17 Aug 2008 19:23:06 +0000 Subject: [PATCH 057/324] - Fix comment header svn path=/trunk/; revision=35414 --- reactos/ntoskrnl/rtl/i386/stack.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/rtl/i386/stack.S b/reactos/ntoskrnl/rtl/i386/stack.S index 822e60db065..d71cc4f0c3e 100644 --- a/reactos/ntoskrnl/rtl/i386/stack.S +++ b/reactos/ntoskrnl/rtl/i386/stack.S @@ -1,7 +1,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS Kernel - * FILE: ntoskrnl/rtl/i386/seh.s + * FILE: ntoskrnl/rtl/i386/stack.s * PURPOSE: Stack Support for RTL * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org) */ From 42114cdc6956422d64c274ef8fd29cc9e9b03165 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Mon, 18 Aug 2008 07:37:25 +0000 Subject: [PATCH 058/324] - Remove empty header svn path=/trunk/; revision=35421 --- reactos/ntoskrnl/include/internal/i386/fpu.h | 5 ----- reactos/ntoskrnl/include/internal/ntoskrnl.h | 1 - 2 files changed, 6 deletions(-) delete mode 100644 reactos/ntoskrnl/include/internal/i386/fpu.h diff --git a/reactos/ntoskrnl/include/internal/i386/fpu.h b/reactos/ntoskrnl/include/internal/i386/fpu.h deleted file mode 100644 index d13a3e3a54e..00000000000 --- a/reactos/ntoskrnl/include/internal/i386/fpu.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef __NTOSKRNL_INCLUDE_INTERNAL_I386_FPU_H -#define __NTOSKRNL_INCLUDE_INTERNAL_I386_FPU_H - -#endif /* __NTOSKRNL_INCLUDE_INTERNAL_I386_FPU_H */ - diff --git a/reactos/ntoskrnl/include/internal/ntoskrnl.h b/reactos/ntoskrnl/include/internal/ntoskrnl.h index a0c8e480fb6..0f9ff32de46 100644 --- a/reactos/ntoskrnl/include/internal/ntoskrnl.h +++ b/reactos/ntoskrnl/include/internal/ntoskrnl.h @@ -42,7 +42,6 @@ #include "ke.h" #include "i386/mm.h" -#include "i386/fpu.h" #include "i386/v86m.h" #include "ob.h" #include "mm.h" From 7a7c6e2c988e28ea60b4828095dcb41dc9d3e568 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Mon, 18 Aug 2008 07:42:12 +0000 Subject: [PATCH 059/324] - Remove 3 deprecated macros - Use X86_EFLAGS_ID instead of cpu.c specific EFLAGS_ID svn path=/trunk/; revision=35422 --- reactos/ntoskrnl/ke/i386/cpu.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/reactos/ntoskrnl/ke/i386/cpu.c b/reactos/ntoskrnl/ke/i386/cpu.c index d5f9298b685..c2bf0afc12b 100644 --- a/reactos/ntoskrnl/ke/i386/cpu.c +++ b/reactos/ntoskrnl/ke/i386/cpu.c @@ -12,12 +12,6 @@ #define NDEBUG #include -/* FIXME: Local EFLAGS defines not used anywhere else */ -#define EFLAGS_IOPL 0x3000 -#define EFLAGS_NF 0x4000 -#define EFLAGS_RF 0x10000 -#define EFLAGS_ID 0x200000 - /* GLOBALS *******************************************************************/ /* The Boot TSS */ @@ -133,7 +127,7 @@ KiSetProcessorType(VOID) Ke386SaveFlags(EFlags); /* XOR out the ID bit and update EFlags */ - NewEFlags = EFlags ^ EFLAGS_ID; + NewEFlags = EFlags ^ X86_EFLAGS_ID; Ke386RestoreFlags(NewEFlags); /* Get them back and see if they were modified */ @@ -141,7 +135,7 @@ KiSetProcessorType(VOID) if (NewEFlags != EFlags) { /* The modification worked, so CPUID exists. Set the ID Bit again. */ - EFlags |= EFLAGS_ID; + EFlags |= X86_EFLAGS_ID; Ke386RestoreFlags(EFlags); /* Peform CPUID 0 to see if CPUID 1 is supported */ From bd8aae9daf6c088c24ffa97031001a47947316b6 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Mon, 18 Aug 2008 07:47:44 +0000 Subject: [PATCH 060/324] - Add KdInitSystem to kd64.h svn path=/trunk/; revision=35423 --- reactos/ntoskrnl/include/internal/kd64.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/reactos/ntoskrnl/include/internal/kd64.h b/reactos/ntoskrnl/include/internal/kd64.h index 6387e6fc1bd..b129260d1cf 100644 --- a/reactos/ntoskrnl/include/internal/kd64.h +++ b/reactos/ntoskrnl/include/internal/kd64.h @@ -50,6 +50,16 @@ BOOLEAN IN BOOLEAN SecondChance ); +// +// Initialization Routines +// +BOOLEAN +NTAPI +KdInitSystem( + ULONG Reserved, + PLOADER_PARAMETER_BLOCK LoaderBlock +); + // // Debug and Multi-Processor Switch Routines // From b7375f0b9d958f27e91ac7225814f63011645ce1 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Mon, 18 Aug 2008 09:49:28 +0000 Subject: [PATCH 061/324] - Don't export PoSetDeviceBusy, it should be a macro in a DDK header - Clean up Po* stubs svn path=/trunk/; revision=35424 --- reactos/include/ddk/winddk.h | 3 + reactos/ntoskrnl/ntoskrnl.spec | 1 - reactos/ntoskrnl/po/events.c | 38 ++-- reactos/ntoskrnl/po/power.c | 393 ++++++++++++++++----------------- 4 files changed, 220 insertions(+), 215 deletions(-) diff --git a/reactos/include/ddk/winddk.h b/reactos/include/ddk/winddk.h index 3a658aac111..bf02239231b 100644 --- a/reactos/include/ddk/winddk.h +++ b/reactos/include/ddk/winddk.h @@ -10948,6 +10948,9 @@ NTAPI PoSetDeviceBusy( PULONG IdlePointer); +#define PoSetDeviceBusy(IdlePointer) \ + ((void)(*(IdlePointer) = 0)) + NTKERNELAPI POWER_STATE NTAPI diff --git a/reactos/ntoskrnl/ntoskrnl.spec b/reactos/ntoskrnl/ntoskrnl.spec index f37251e4eda..4f3e9157895 100644 --- a/reactos/ntoskrnl/ntoskrnl.spec +++ b/reactos/ntoskrnl/ntoskrnl.spec @@ -909,7 +909,6 @@ @ stdcall PoRequestPowerIrp(ptr long long ptr ptr ptr) ;PoRequestShutdownEvent ;PoSetHiberRange -@ stdcall PoSetDeviceBusy(ptr) @ stdcall PoSetPowerState(ptr long long) @ stdcall PoSetSystemState(long) ;PoShutdownBugCheck diff --git a/reactos/ntoskrnl/po/events.c b/reactos/ntoskrnl/po/events.c index 51450faab09..63567cd006c 100644 --- a/reactos/ntoskrnl/po/events.c +++ b/reactos/ntoskrnl/po/events.c @@ -1,18 +1,27 @@ /* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel + * PROJECT: ReactOS Kernel + * LICENSE: GPL - See COPYING in the top level directory * FILE: ntoskrnl/po/events.c * PURPOSE: Power Manager - * * PROGRAMMERS: Hervй Poussineau (hpoussin@reactos.org) */ +/* INCLUDES ******************************************************************/ + #include #define NDEBUG #include -PKWIN32_POWEREVENT_CALLOUT PopEventCallout; -extern PCALLBACK_OBJECT SetSystemTimeCallback; +/* GLOBALS *******************************************************************/ + +typedef struct _SYS_BUTTON_CONTEXT +{ + PDEVICE_OBJECT DeviceObject; + PIO_WORKITEM WorkItem; + KEVENT Event; + IO_STATUS_BLOCK IoStatusBlock; + ULONG SysButton; +} SYS_BUTTON_CONTEXT, *PSYS_BUTTON_CONTEXT; static VOID NTAPI @@ -20,6 +29,11 @@ PopGetSysButton( IN PDEVICE_OBJECT DeviceObject, IN PVOID Context); +PKWIN32_POWEREVENT_CALLOUT PopEventCallout; +extern PCALLBACK_OBJECT SetSystemTimeCallback; + +/* FUNCTIONS *****************************************************************/ + VOID NTAPI PoNotifySystemTimeSet(VOID) @@ -40,15 +54,6 @@ PoNotifySystemTimeSet(VOID) } } -typedef struct _SYS_BUTTON_CONTEXT -{ - PDEVICE_OBJECT DeviceObject; - PIO_WORKITEM WorkItem; - KEVENT Event; - IO_STATUS_BLOCK IoStatusBlock; - ULONG SysButton; -} SYS_BUTTON_CONTEXT, *PSYS_BUTTON_CONTEXT; - static NTSTATUS NTAPI PopGetSysButtonCompletion( @@ -137,9 +142,8 @@ PopGetSysButton( NTSTATUS NTAPI -PopAddRemoveSysCapsCallback( - IN PVOID NotificationStructure, - IN PVOID Context) +PopAddRemoveSysCapsCallback(IN PVOID NotificationStructure, + IN PVOID Context) { PDEVICE_INTERFACE_CHANGE_NOTIFICATION Notification; PSYS_BUTTON_CONTEXT SysButtonContext; diff --git a/reactos/ntoskrnl/po/power.c b/reactos/ntoskrnl/po/power.c index 74c8b059fed..e656446afed 100644 --- a/reactos/ntoskrnl/po/power.c +++ b/reactos/ntoskrnl/po/power.c @@ -1,17 +1,20 @@ /* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel + * PROJECT: ReactOS Kernel + * LICENSE: GPL - See COPYING in the top level directory * FILE: ntoskrnl/po/power.c * PURPOSE: Power Manager - * * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net) * Hervй Poussineau (hpoussin@reactos.com) */ +/* INCLUDES ******************************************************************/ + #include #define NDEBUG #include +/* GLOBALS *******************************************************************/ + extern ULONG ExpInitialiationPhase; typedef struct _REQUEST_POWER_ITEM @@ -24,50 +27,11 @@ typedef struct _REQUEST_POWER_ITEM PDEVICE_NODE PopSystemPowerDeviceNode = NULL; BOOLEAN PopAcpiPresent = FALSE; -/* - * @implemented - */ -NTSTATUS -STDCALL -PoCallDriver(IN PDEVICE_OBJECT DeviceObject, - IN OUT PIRP Irp) -{ - NTSTATUS Status; - - Status = IoCallDriver(DeviceObject, Irp); - - return Status; -} - -/* - * @unimplemented - */ -PULONG -STDCALL -PoRegisterDeviceForIdleDetection(IN PDEVICE_OBJECT DeviceObject, - IN ULONG ConservationIdleTime, - IN ULONG PerformanceIdleTime, - IN DEVICE_POWER_STATE State) -{ - UNIMPLEMENTED; - return NULL; -} - -/* - * @unimplemented - */ -PVOID -STDCALL -PoRegisterSystemState(IN PVOID StateHandle, - IN EXECUTION_STATE Flags) -{ - UNIMPLEMENTED; - return NULL; -} +/* PRIVATE FUNCTIONS *********************************************************/ static NTSTATUS -STDCALL +NTAPI PopRequestPowerIrpCompletion(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PVOID Context) @@ -90,94 +54,6 @@ PopRequestPowerIrpCompletion(IN PDEVICE_OBJECT DeviceObject, return STATUS_SUCCESS; } -/* - * @implemented - */ -NTSTATUS -STDCALL -PoRequestPowerIrp(IN PDEVICE_OBJECT DeviceObject, - IN UCHAR MinorFunction, - IN POWER_STATE PowerState, - IN PREQUEST_POWER_COMPLETE CompletionFunction, - IN PVOID Context, - OUT PIRP *pIrp OPTIONAL) -{ - PDEVICE_OBJECT TopDeviceObject; - PIO_STACK_LOCATION Stack; - PIRP Irp; - PIO_STATUS_BLOCK IoStatusBlock; - PREQUEST_POWER_ITEM RequestPowerItem; - NTSTATUS Status; - - if (MinorFunction != IRP_MN_QUERY_POWER - && MinorFunction != IRP_MN_SET_POWER - && MinorFunction != IRP_MN_WAIT_WAKE) - return STATUS_INVALID_PARAMETER_2; - - RequestPowerItem = ExAllocatePool(NonPagedPool, sizeof(REQUEST_POWER_ITEM)); - if (!RequestPowerItem) - return STATUS_INSUFFICIENT_RESOURCES; - IoStatusBlock = ExAllocatePool(NonPagedPool, sizeof(IO_STATUS_BLOCK)); - if (!IoStatusBlock) - { - ExFreePool(RequestPowerItem); - return STATUS_INSUFFICIENT_RESOURCES; - } - - /* Always call the top of the device stack */ - TopDeviceObject = IoGetAttachedDeviceReference(DeviceObject); - - Irp = IoBuildSynchronousFsdRequest(IRP_MJ_PNP, - TopDeviceObject, - NULL, - 0, - NULL, - NULL, - IoStatusBlock); - if (!Irp) - { - ExFreePool(RequestPowerItem); - ExFreePool(IoStatusBlock); - return STATUS_INSUFFICIENT_RESOURCES; - } - - /* POWER IRPs are always initialized with a status code of - STATUS_NOT_IMPLEMENTED */ - Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED; - Irp->IoStatus.Information = 0; - - Stack = IoGetNextIrpStackLocation(Irp); - Stack->MinorFunction = MinorFunction; - if (MinorFunction == IRP_MN_WAIT_WAKE) - Stack->Parameters.WaitWake.PowerState = PowerState.SystemState; - else - Stack->Parameters.WaitWake.PowerState = PowerState.DeviceState; - - RequestPowerItem->CompletionRoutine = CompletionFunction; - RequestPowerItem->PowerState = PowerState; - RequestPowerItem->Context = Context; - - if (pIrp != NULL) - *pIrp = Irp; - - IoSetCompletionRoutine(Irp, PopRequestPowerIrpCompletion, RequestPowerItem, TRUE, TRUE, TRUE); - Status = IoCallDriver(TopDeviceObject, Irp); - - /* Always return STATUS_PENDING. The completion routine - * will call CompletionFunction and complete the Irp. - */ - return STATUS_PENDING; -} - -#undef PoSetDeviceBusy -VOID -NTAPI -PoSetDeviceBusy(IN PULONG IdlePointer) -{ - UNIMPLEMENTED; - *IdlePointer = 0; -} - VOID NTAPI PopCleanupPowerState(IN PPOWER_STATE PowerState) @@ -185,55 +61,6 @@ PopCleanupPowerState(IN PPOWER_STATE PowerState) //UNIMPLEMENTED; } -/* - * @unimplemented - */ -POWER_STATE -STDCALL -PoSetPowerState(IN PDEVICE_OBJECT DeviceObject, - IN POWER_STATE_TYPE Type, - IN POWER_STATE State) -{ - POWER_STATE ps; - - ASSERT_IRQL(DISPATCH_LEVEL); - - ps.SystemState = PowerSystemWorking; // Fully on - ps.DeviceState = PowerDeviceD0; // Fully on - - return ps; -} - -/* - * @unimplemented - */ -VOID -STDCALL -PoSetSystemState(IN EXECUTION_STATE Flags) -{ - UNIMPLEMENTED; -} - -/* - * @unimplemented - */ -VOID -STDCALL -PoStartNextPowerIrp(IN PIRP Irp) -{ - UNIMPLEMENTED; -} - -/* - * @unimplemented - */ -VOID -STDCALL -PoUnregisterSystemState(IN PVOID StateHandle) -{ - UNIMPLEMENTED; -} - NTSTATUS NTAPI PopSetSystemPowerState(SYSTEM_POWER_STATE PowerState) @@ -387,11 +214,197 @@ PoInitializePrcb(IN PKPRCB Prcb) KeInitializeTimerEx(&Prcb->PowerState.PerfTimer, SynchronizationTimer); } +/* PUBLIC FUNCTIONS **********************************************************/ + +/* + * @implemented + */ +NTSTATUS +NTAPI +PoCallDriver(IN PDEVICE_OBJECT DeviceObject, + IN OUT PIRP Irp) +{ + NTSTATUS Status; + + /* Forward to Io -- FIXME! */ + Status = IoCallDriver(DeviceObject, Irp); + + /* Return status */ + return Status; +} + +/* + * @unimplemented + */ +PULONG +NTAPI +PoRegisterDeviceForIdleDetection(IN PDEVICE_OBJECT DeviceObject, + IN ULONG ConservationIdleTime, + IN ULONG PerformanceIdleTime, + IN DEVICE_POWER_STATE State) +{ + UNIMPLEMENTED; + return NULL; +} + +/* + * @unimplemented + */ +PVOID +NTAPI +PoRegisterSystemState(IN PVOID StateHandle, + IN EXECUTION_STATE Flags) +{ + UNIMPLEMENTED; + return NULL; +} + +/* + * @implemented + */ +NTSTATUS +NTAPI +PoRequestPowerIrp(IN PDEVICE_OBJECT DeviceObject, + IN UCHAR MinorFunction, + IN POWER_STATE PowerState, + IN PREQUEST_POWER_COMPLETE CompletionFunction, + IN PVOID Context, + OUT PIRP *pIrp OPTIONAL) +{ + PDEVICE_OBJECT TopDeviceObject; + PIO_STACK_LOCATION Stack; + PIRP Irp; + PIO_STATUS_BLOCK IoStatusBlock; + PREQUEST_POWER_ITEM RequestPowerItem; + NTSTATUS Status; + + if (MinorFunction != IRP_MN_QUERY_POWER + && MinorFunction != IRP_MN_SET_POWER + && MinorFunction != IRP_MN_WAIT_WAKE) + return STATUS_INVALID_PARAMETER_2; + + RequestPowerItem = ExAllocatePool(NonPagedPool, sizeof(REQUEST_POWER_ITEM)); + if (!RequestPowerItem) + return STATUS_INSUFFICIENT_RESOURCES; + IoStatusBlock = ExAllocatePool(NonPagedPool, sizeof(IO_STATUS_BLOCK)); + if (!IoStatusBlock) + { + ExFreePool(RequestPowerItem); + return STATUS_INSUFFICIENT_RESOURCES; + } + + /* Always call the top of the device stack */ + TopDeviceObject = IoGetAttachedDeviceReference(DeviceObject); + + Irp = IoBuildSynchronousFsdRequest(IRP_MJ_PNP, + TopDeviceObject, + NULL, + 0, + NULL, + NULL, + IoStatusBlock); + if (!Irp) + { + ExFreePool(RequestPowerItem); + ExFreePool(IoStatusBlock); + return STATUS_INSUFFICIENT_RESOURCES; + } + + /* POWER IRPs are always initialized with a status code of + STATUS_NOT_IMPLEMENTED */ + Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED; + Irp->IoStatus.Information = 0; + + Stack = IoGetNextIrpStackLocation(Irp); + Stack->MinorFunction = MinorFunction; + if (MinorFunction == IRP_MN_WAIT_WAKE) + Stack->Parameters.WaitWake.PowerState = PowerState.SystemState; + else + Stack->Parameters.WaitWake.PowerState = PowerState.DeviceState; + + RequestPowerItem->CompletionRoutine = CompletionFunction; + RequestPowerItem->PowerState = PowerState; + RequestPowerItem->Context = Context; + + if (pIrp != NULL) + *pIrp = Irp; + + IoSetCompletionRoutine(Irp, PopRequestPowerIrpCompletion, RequestPowerItem, TRUE, TRUE, TRUE); + Status = IoCallDriver(TopDeviceObject, Irp); + + /* Always return STATUS_PENDING. The completion routine + * will call CompletionFunction and complete the Irp. + */ + return STATUS_PENDING; +} + +/* + * @unimplemented + */ +POWER_STATE +NTAPI +PoSetPowerState(IN PDEVICE_OBJECT DeviceObject, + IN POWER_STATE_TYPE Type, + IN POWER_STATE State) +{ + POWER_STATE ps; + + ASSERT_IRQL(DISPATCH_LEVEL); + + ps.SystemState = PowerSystemWorking; // Fully on + ps.DeviceState = PowerDeviceD0; // Fully on + + return ps; +} + +/* + * @unimplemented + */ +VOID +NTAPI +PoSetSystemState(IN EXECUTION_STATE Flags) +{ + UNIMPLEMENTED; +} + +/* + * @unimplemented + */ +VOID +NTAPI +PoStartNextPowerIrp(IN PIRP Irp) +{ + UNIMPLEMENTED; +} + +/* + * @unimplemented + */ +VOID +NTAPI +PoUnregisterSystemState(IN PVOID StateHandle) +{ + UNIMPLEMENTED; +} + /* * @unimplemented */ NTSTATUS -STDCALL +NTAPI +PoQueueShutdownWorkItem(IN PWORK_QUEUE_ITEM WorkItem) +{ + PAGED_CODE(); + + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} + +/* + * @unimplemented + */ +NTSTATUS +NTAPI NtInitiatePowerAction (IN POWER_ACTION SystemAction, IN SYSTEM_POWER_STATE MinSystemState, IN ULONG Flags, @@ -405,7 +418,7 @@ NtInitiatePowerAction (IN POWER_ACTION SystemAction, * @unimplemented */ NTSTATUS -STDCALL +NTAPI NtPowerInformation(IN POWER_INFORMATION_LEVEL PowerInformationLevel, IN PVOID InputBuffer OPTIONAL, IN ULONG InputBufferLength, @@ -467,18 +480,6 @@ NtPowerInformation(IN POWER_INFORMATION_LEVEL PowerInformationLevel, return Status; } - -NTSTATUS -STDCALL -PoQueueShutdownWorkItem(IN PWORK_QUEUE_ITEM WorkItem) -{ - PAGED_CODE(); - - DPRINT1("PoQueueShutdownWorkItem(%p)\n", WorkItem); - - return STATUS_NOT_IMPLEMENTED; -} - NTSTATUS NTAPI NtGetDevicePowerState(IN HANDLE Device, @@ -512,5 +513,3 @@ NtSetThreadExecutionState(IN EXECUTION_STATE esFlags, UNIMPLEMENTED; return STATUS_NOT_IMPLEMENTED; } - -/* EOF */ From 5f26c6070c4cc3d053c0187d3c4e6871b2e3afaf Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Mon, 18 Aug 2008 09:50:38 +0000 Subject: [PATCH 062/324] - STDCALL -> NTAPI svn path=/trunk/; revision=35425 --- reactos/ntoskrnl/ps/job.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/reactos/ntoskrnl/ps/job.c b/reactos/ntoskrnl/ps/job.c index 135822d652b..9d6162d1fbc 100644 --- a/reactos/ntoskrnl/ps/job.c +++ b/reactos/ntoskrnl/ps/job.c @@ -117,7 +117,7 @@ PspExitProcessFromJob(IN PEJOB Job, * @unimplemented */ NTSTATUS -STDCALL +NTAPI NtAssignProcessToJobObject ( HANDLE JobHandle, HANDLE ProcessHandle) @@ -216,7 +216,7 @@ NtCreateJobSet(IN ULONG NumJob, * @unimplemented */ NTSTATUS -STDCALL +NTAPI NtCreateJobObject ( PHANDLE JobHandle, ACCESS_MASK DesiredAccess, @@ -321,7 +321,7 @@ NtCreateJobObject ( * @implemented */ NTSTATUS -STDCALL +NTAPI NtIsProcessInJob ( IN HANDLE ProcessHandle, IN HANDLE JobHandle OPTIONAL ) @@ -389,7 +389,7 @@ NtIsProcessInJob ( * @implemented */ NTSTATUS -STDCALL +NTAPI NtOpenJobObject ( PHANDLE JobHandle, ACCESS_MASK DesiredAccess, @@ -453,7 +453,7 @@ NtOpenJobObject ( * @unimplemented */ NTSTATUS -STDCALL +NTAPI NtQueryInformationJobObject ( HANDLE JobHandle, JOBOBJECTINFOCLASS JobInformationClass, @@ -470,7 +470,7 @@ NtQueryInformationJobObject ( * @unimplemented */ NTSTATUS -STDCALL +NTAPI NtSetInformationJobObject ( HANDLE JobHandle, JOBOBJECTINFOCLASS JobInformationClass, @@ -486,7 +486,7 @@ NtSetInformationJobObject ( * @unimplemented */ NTSTATUS -STDCALL +NTAPI NtTerminateJobObject ( HANDLE JobHandle, NTSTATUS ExitStatus ) @@ -523,7 +523,7 @@ NtTerminateJobObject ( * @implemented */ PVOID -STDCALL +NTAPI PsGetJobLock ( PEJOB Job ) { ASSERT(Job); @@ -535,7 +535,7 @@ PsGetJobLock ( PEJOB Job ) * @implemented */ PVOID -STDCALL +NTAPI PsGetJobSessionId ( PEJOB Job ) { ASSERT(Job); @@ -547,7 +547,7 @@ PsGetJobSessionId ( PEJOB Job ) * @implemented */ ULONG -STDCALL +NTAPI PsGetJobUIRestrictionsClass ( PEJOB Job ) { ASSERT(Job); @@ -559,7 +559,7 @@ PsGetJobUIRestrictionsClass ( PEJOB Job ) * @unimplemented */ VOID -STDCALL +NTAPI PsSetJobUIRestrictionsClass(PEJOB Job, ULONG UIRestrictionsClass) { From e3f8231305d6d5a526c0460bcfa30c9480c9237e Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Mon, 18 Aug 2008 13:30:17 +0000 Subject: [PATCH 063/324] - Cleanup and reformat parts of pnpmgr (no code change) svn path=/trunk/; revision=35427 --- reactos/ntoskrnl/io/pnpmgr/plugplay.c | 256 +++-- reactos/ntoskrnl/io/pnpmgr/pnpdma.c | 120 +-- reactos/ntoskrnl/io/pnpmgr/pnpmgr.c | 1239 ++++++++++++------------ reactos/ntoskrnl/io/pnpmgr/pnpnotify.c | 345 ++++--- reactos/ntoskrnl/io/pnpmgr/pnpreport.c | 174 ++-- reactos/ntoskrnl/io/pnpmgr/pnproot.c | 9 +- 6 files changed, 1074 insertions(+), 1069 deletions(-) diff --git a/reactos/ntoskrnl/io/pnpmgr/plugplay.c b/reactos/ntoskrnl/io/pnpmgr/plugplay.c index 43fc9104f1d..c0370787d25 100644 --- a/reactos/ntoskrnl/io/pnpmgr/plugplay.c +++ b/reactos/ntoskrnl/io/pnpmgr/plugplay.c @@ -1,16 +1,14 @@ /* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/io/plugplay.c + * PROJECT: ReactOS Kernel + * COPYRIGHT: GPL - See COPYING in the top level directory + * FILE: ntoskrnl/io/pnpmgr/plugplay.c * PURPOSE: Plug-and-play interface routines - * * PROGRAMMERS: Eric Kohl */ /* INCLUDES *****************************************************************/ #include - #define NDEBUG #include @@ -114,127 +112,6 @@ IopRemovePlugPlayEvent(VOID) return STATUS_SUCCESS; } - -/* - * Plug and Play event structure used by NtGetPlugPlayEvent. - * - * EventGuid - * Can be one of the following values: - * GUID_HWPROFILE_QUERY_CHANGE - * GUID_HWPROFILE_CHANGE_CANCELLED - * GUID_HWPROFILE_CHANGE_COMPLETE - * GUID_TARGET_DEVICE_QUERY_REMOVE - * GUID_TARGET_DEVICE_REMOVE_CANCELLED - * GUID_TARGET_DEVICE_REMOVE_COMPLETE - * GUID_PNP_CUSTOM_NOTIFICATION - * GUID_PNP_POWER_NOTIFICATION - * GUID_DEVICE_* (see above) - * - * EventCategory - * Type of the event that happened. - * - * Result - * ? - * - * Flags - * ? - * - * TotalSize - * Size of the event block including the device IDs and other - * per category specific fields. - */ -/* - * NtGetPlugPlayEvent - * - * Returns one Plug & Play event from a global queue. - * - * Parameters - * Reserved1 - * Reserved2 - * Always set to zero. - * - * Buffer - * The buffer that will be filled with the event information on - * successful return from the function. - * - * BufferSize - * Size of the buffer pointed by the Buffer parameter. If the - * buffer size is not large enough to hold the whole event - * information, error STATUS_BUFFER_TOO_SMALL is returned and - * the buffer remains untouched. - * - * Return Values - * STATUS_PRIVILEGE_NOT_HELD - * STATUS_BUFFER_TOO_SMALL - * STATUS_SUCCESS - * - * Remarks - * This function isn't multi-thread safe! - * - * @implemented - */ -NTSTATUS STDCALL -NtGetPlugPlayEvent(IN ULONG Reserved1, - IN ULONG Reserved2, - OUT PPLUGPLAY_EVENT_BLOCK Buffer, - IN ULONG BufferSize) -{ - PPNP_EVENT_ENTRY Entry; - NTSTATUS Status; - - DPRINT("NtGetPlugPlayEvent() called\n"); - - /* Function can only be called from user-mode */ - if (KeGetPreviousMode() == KernelMode) - { - DPRINT1("NtGetPlugPlayEvent cannot be called from kernel mode!\n"); - return STATUS_ACCESS_DENIED; - } - - /* Check for Tcb privilege */ - if (!SeSinglePrivilegeCheck(SeTcbPrivilege, - UserMode)) - { - DPRINT1("NtGetPlugPlayEvent: Caller does not hold the SeTcbPrivilege privilege!\n"); - return STATUS_PRIVILEGE_NOT_HELD; - } - - /* Wait for a PnP event */ - DPRINT("Waiting for pnp notification event\n"); - Status = KeWaitForSingleObject(&IopPnpNotifyEvent, - UserRequest, - KernelMode, - FALSE, - NULL); - if (!NT_SUCCESS(Status)) - { - DPRINT1("KeWaitForSingleObject() failed (Status %lx)\n", Status); - return Status; - } - - /* Get entry from the tail of the queue */ - Entry = CONTAINING_RECORD(IopPnpEventQueueHead.Blink, - PNP_EVENT_ENTRY, - ListEntry); - - /* Check the buffer size */ - if (BufferSize < Entry->Event.TotalSize) - { - DPRINT1("Buffer is too small for the pnp-event\n"); - return STATUS_BUFFER_TOO_SMALL; - } - - /* Copy event data to the user buffer */ - memcpy(Buffer, - &Entry->Event, - Entry->Event.TotalSize); - - DPRINT("NtGetPlugPlayEvent() done\n"); - - return STATUS_SUCCESS; -} - - static PDEVICE_OBJECT IopTraverseDeviceNode(PDEVICE_NODE Node, PUNICODE_STRING DeviceInstance) { @@ -706,6 +583,128 @@ IopResetDevice(PPLUGPLAY_CONTROL_RESET_DEVICE_DATA ResetDeviceData) return Status; } +/* PUBLIC FUNCTIONS **********************************************************/ + +/* + * Plug and Play event structure used by NtGetPlugPlayEvent. + * + * EventGuid + * Can be one of the following values: + * GUID_HWPROFILE_QUERY_CHANGE + * GUID_HWPROFILE_CHANGE_CANCELLED + * GUID_HWPROFILE_CHANGE_COMPLETE + * GUID_TARGET_DEVICE_QUERY_REMOVE + * GUID_TARGET_DEVICE_REMOVE_CANCELLED + * GUID_TARGET_DEVICE_REMOVE_COMPLETE + * GUID_PNP_CUSTOM_NOTIFICATION + * GUID_PNP_POWER_NOTIFICATION + * GUID_DEVICE_* (see above) + * + * EventCategory + * Type of the event that happened. + * + * Result + * ? + * + * Flags + * ? + * + * TotalSize + * Size of the event block including the device IDs and other + * per category specific fields. + */ + +/* + * NtGetPlugPlayEvent + * + * Returns one Plug & Play event from a global queue. + * + * Parameters + * Reserved1 + * Reserved2 + * Always set to zero. + * + * Buffer + * The buffer that will be filled with the event information on + * successful return from the function. + * + * BufferSize + * Size of the buffer pointed by the Buffer parameter. If the + * buffer size is not large enough to hold the whole event + * information, error STATUS_BUFFER_TOO_SMALL is returned and + * the buffer remains untouched. + * + * Return Values + * STATUS_PRIVILEGE_NOT_HELD + * STATUS_BUFFER_TOO_SMALL + * STATUS_SUCCESS + * + * Remarks + * This function isn't multi-thread safe! + * + * @implemented + */ +NTSTATUS +NTAPI +NtGetPlugPlayEvent(IN ULONG Reserved1, + IN ULONG Reserved2, + OUT PPLUGPLAY_EVENT_BLOCK Buffer, + IN ULONG BufferSize) +{ + PPNP_EVENT_ENTRY Entry; + NTSTATUS Status; + + DPRINT("NtGetPlugPlayEvent() called\n"); + + /* Function can only be called from user-mode */ + if (KeGetPreviousMode() == KernelMode) + { + DPRINT1("NtGetPlugPlayEvent cannot be called from kernel mode!\n"); + return STATUS_ACCESS_DENIED; + } + + /* Check for Tcb privilege */ + if (!SeSinglePrivilegeCheck(SeTcbPrivilege, + UserMode)) + { + DPRINT1("NtGetPlugPlayEvent: Caller does not hold the SeTcbPrivilege privilege!\n"); + return STATUS_PRIVILEGE_NOT_HELD; + } + + /* Wait for a PnP event */ + DPRINT("Waiting for pnp notification event\n"); + Status = KeWaitForSingleObject(&IopPnpNotifyEvent, + UserRequest, + KernelMode, + FALSE, + NULL); + if (!NT_SUCCESS(Status)) + { + DPRINT1("KeWaitForSingleObject() failed (Status %lx)\n", Status); + return Status; + } + + /* Get entry from the tail of the queue */ + Entry = CONTAINING_RECORD(IopPnpEventQueueHead.Blink, + PNP_EVENT_ENTRY, + ListEntry); + + /* Check the buffer size */ + if (BufferSize < Entry->Event.TotalSize) + { + DPRINT1("Buffer is too small for the pnp-event\n"); + return STATUS_BUFFER_TOO_SMALL; + } + + /* Copy event data to the user buffer */ + memcpy(Buffer, + &Entry->Event, + Entry->Event.TotalSize); + + DPRINT("NtGetPlugPlayEvent() done\n"); + + return STATUS_SUCCESS; +} /* * NtPlugPlayControl @@ -763,7 +762,8 @@ IopResetDevice(PPLUGPLAY_CONTROL_RESET_DEVICE_DATA ResetDeviceData) * * @unimplemented */ -NTSTATUS STDCALL +NTSTATUS +NTAPI NtPlugPlayControl(IN PLUGPLAY_CONTROL_CLASS PlugPlayControlClass, IN OUT PVOID Buffer, IN ULONG BufferLength) @@ -844,5 +844,3 @@ NtPlugPlayControl(IN PLUGPLAY_CONTROL_CLASS PlugPlayControlClass, return STATUS_NOT_IMPLEMENTED; } - -/* EOF */ diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpdma.c b/reactos/ntoskrnl/io/pnpmgr/pnpdma.c index 19fdd982ad3..28ed2765015 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpdma.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpdma.c @@ -1,9 +1,8 @@ /* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/io/pnpdma.c + * PROJECT: ReactOS Kernel + * COPYRIGHT: GPL - See COPYING in the top level directory + * FILE: ntoskrnl/io/pnpmgr/pnpdma.c * PURPOSE: PnP manager DMA routines - * * PROGRAMMERS: Filip Navara (xnavara@volny.cz) */ @@ -14,69 +13,74 @@ #include #include -/* FUNCTIONS *****************************************************************/ +/* PUBLIC FUNCTIONS **********************************************************/ /* * @implemented */ -PDMA_ADAPTER STDCALL -IoGetDmaAdapter( - IN PDEVICE_OBJECT PhysicalDeviceObject, - IN PDEVICE_DESCRIPTION DeviceDescription, - IN OUT PULONG NumberOfMapRegisters) +PDMA_ADAPTER +NTAPI +IoGetDmaAdapter(IN PDEVICE_OBJECT PhysicalDeviceObject, + IN PDEVICE_DESCRIPTION DeviceDescription, + IN OUT PULONG NumberOfMapRegisters) { - NTSTATUS Status; - ULONG ResultLength; - BUS_INTERFACE_STANDARD BusInterface; - IO_STATUS_BLOCK IoStatusBlock; - IO_STACK_LOCATION Stack; - DEVICE_DESCRIPTION PrivateDeviceDescription; - PDMA_ADAPTER Adapter = NULL; + NTSTATUS Status; + ULONG ResultLength; + BUS_INTERFACE_STANDARD BusInterface; + IO_STATUS_BLOCK IoStatusBlock; + IO_STACK_LOCATION Stack; + DEVICE_DESCRIPTION PrivateDeviceDescription; + PDMA_ADAPTER Adapter = NULL; - DPRINT("IoGetDmaAdapter called\n"); + DPRINT("IoGetDmaAdapter called\n"); - /* - * Try to create DMA adapter through bus driver. - */ - if (PhysicalDeviceObject != NULL) - { - if (DeviceDescription->InterfaceType == PNPBus || - DeviceDescription->InterfaceType == InterfaceTypeUndefined) + /* Try to create DMA adapter through bus driver */ + if (PhysicalDeviceObject) { - RtlCopyMemory(&PrivateDeviceDescription, DeviceDescription, - sizeof(DEVICE_DESCRIPTION)); - Status = IoGetDeviceProperty(PhysicalDeviceObject, - DevicePropertyLegacyBusType, sizeof(INTERFACE_TYPE), - &PrivateDeviceDescription.InterfaceType, &ResultLength); - if (!NT_SUCCESS(Status)) - PrivateDeviceDescription.InterfaceType = Internal; - DeviceDescription = &PrivateDeviceDescription; + if (DeviceDescription->InterfaceType == PNPBus || + DeviceDescription->InterfaceType == InterfaceTypeUndefined) + { + RtlCopyMemory(&PrivateDeviceDescription, + DeviceDescription, + sizeof(DEVICE_DESCRIPTION)); + + Status = IoGetDeviceProperty(PhysicalDeviceObject, + DevicePropertyLegacyBusType, + sizeof(INTERFACE_TYPE), + &PrivateDeviceDescription.InterfaceType, + &ResultLength); + + if (!NT_SUCCESS(Status)) + PrivateDeviceDescription.InterfaceType = Internal; + + DeviceDescription = &PrivateDeviceDescription; + } + + Stack.Parameters.QueryInterface.Size = sizeof(BUS_INTERFACE_STANDARD); + Stack.Parameters.QueryInterface.Version = 1; + Stack.Parameters.QueryInterface.Interface = (PINTERFACE)&BusInterface; + Stack.Parameters.QueryInterface.InterfaceType = + &GUID_BUS_INTERFACE_STANDARD; + + Status = IopInitiatePnpIrp(PhysicalDeviceObject, + &IoStatusBlock, + IRP_MN_QUERY_INTERFACE, + &Stack); + + if (NT_SUCCESS(Status)) + { + Adapter = BusInterface.GetDmaAdapter(BusInterface.Context, + DeviceDescription, + NumberOfMapRegisters); + + BusInterface.InterfaceDereference(BusInterface.Context); + if (Adapter) return Adapter; + } } - Stack.Parameters.QueryInterface.Size = sizeof(BUS_INTERFACE_STANDARD); - Stack.Parameters.QueryInterface.Version = 1; - Stack.Parameters.QueryInterface.Interface = (PINTERFACE)&BusInterface; - Stack.Parameters.QueryInterface.InterfaceType = - &GUID_BUS_INTERFACE_STANDARD; - Status = IopInitiatePnpIrp(PhysicalDeviceObject, &IoStatusBlock, - IRP_MN_QUERY_INTERFACE, &Stack); - if (NT_SUCCESS(Status)) - { - Adapter = BusInterface.GetDmaAdapter(BusInterface.Context, - DeviceDescription, NumberOfMapRegisters); - BusInterface.InterfaceDereference(BusInterface.Context); - if (Adapter != NULL) - return Adapter; - } - } - - /* - * Fallback to HAL. - */ - - return HalGetDmaAdapter(PhysicalDeviceObject, DeviceDescription, - NumberOfMapRegisters); + /* Fall back to HAL */ + return HalGetDmaAdapter(PhysicalDeviceObject, + DeviceDescription, + NumberOfMapRegisters); } - -/* EOF */ diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c index 60364eddd3b..7d5068d306a 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c @@ -1,17 +1,15 @@ /* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/io/pnpmgr.c + * PROJECT: ReactOS Kernel + * COPYRIGHT: GPL - See COPYING in the top level directory + * FILE: ntoskrnl/io/pnpmgr/pnpmgr.c * PURPOSE: Initializes the PnP manager - * * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net) - * Hervй Poussineau (hpoussin@reactos.org) + * Copyright 2007 Hervй Poussineau (hpoussin@reactos.org) */ /* INCLUDES ******************************************************************/ #include - #define NDEBUG #include @@ -224,7 +222,7 @@ IopStartDevice( } NTSTATUS -STDCALL +NTAPI IopQueryDeviceCapabilities(PDEVICE_NODE DeviceNode, PDEVICE_CAPABILITIES DeviceCaps) { @@ -265,466 +263,6 @@ IopAsynchronousInvalidateDeviceRelations( ExFreePool(Data); } -/* - * @implemented - */ -VOID -NTAPI -IoInvalidateDeviceRelations( - IN PDEVICE_OBJECT DeviceObject, - IN DEVICE_RELATION_TYPE Type) -{ - PIO_WORKITEM WorkItem; - PINVALIDATE_DEVICE_RELATION_DATA Data; - - Data = ExAllocatePool(PagedPool, sizeof(INVALIDATE_DEVICE_RELATION_DATA)); - if (!Data) - return; - WorkItem = IoAllocateWorkItem(DeviceObject); - if (!WorkItem) - { - ExFreePool(Data); - return; - } - - ObReferenceObject(DeviceObject); - Data->DeviceObject = DeviceObject; - Data->Type = Type; - Data->WorkItem = WorkItem; - - IoQueueWorkItem( - WorkItem, - IopAsynchronousInvalidateDeviceRelations, - DelayedWorkQueue, - Data); -} - -/* - * @unimplemented - */ -NTSTATUS -STDCALL -IoGetDeviceProperty(IN PDEVICE_OBJECT DeviceObject, - IN DEVICE_REGISTRY_PROPERTY DeviceProperty, - IN ULONG BufferLength, - OUT PVOID PropertyBuffer, - OUT PULONG ResultLength) -{ - PDEVICE_NODE DeviceNode = IopGetDeviceNode(DeviceObject); - DEVICE_CAPABILITIES DeviceCaps; - ULONG Length; - PVOID Data = NULL; - PWSTR Ptr; - NTSTATUS Status; - - DPRINT("IoGetDeviceProperty(0x%p %d)\n", DeviceObject, DeviceProperty); - - *ResultLength = 0; - - if (DeviceNode == NULL) - return STATUS_INVALID_DEVICE_REQUEST; - - switch (DeviceProperty) - { - case DevicePropertyBusNumber: - Length = sizeof(ULONG); - Data = &DeviceNode->ChildBusNumber; - break; - - /* Complete, untested */ - case DevicePropertyBusTypeGuid: - /* Sanity check */ - if ((DeviceNode->ChildBusTypeIndex != 0xFFFF) && - (DeviceNode->ChildBusTypeIndex < IopBusTypeGuidList->GuidCount)) - { - /* Return the GUID */ - *ResultLength = sizeof(GUID); - - /* Check if the buffer given was large enough */ - if (BufferLength < *ResultLength) - { - return STATUS_BUFFER_TOO_SMALL; - } - - /* Copy the GUID */ - RtlCopyMemory(PropertyBuffer, - &(IopBusTypeGuidList->Guids[DeviceNode->ChildBusTypeIndex]), - sizeof(GUID)); - return STATUS_SUCCESS; - } - else - { - return STATUS_OBJECT_NAME_NOT_FOUND; - } - break; - - case DevicePropertyLegacyBusType: - Length = sizeof(INTERFACE_TYPE); - Data = &DeviceNode->ChildInterfaceType; - break; - - case DevicePropertyAddress: - /* Query the device caps */ - Status = IopQueryDeviceCapabilities(DeviceNode, &DeviceCaps); - if (NT_SUCCESS(Status) && (DeviceCaps.Address != (ULONG)-1)) - { - /* Return length */ - *ResultLength = sizeof(ULONG); - - /* Check if the buffer given was large enough */ - if (BufferLength < *ResultLength) - { - return STATUS_BUFFER_TOO_SMALL; - } - - /* Return address */ - *(PULONG)PropertyBuffer = DeviceCaps.Address; - return STATUS_SUCCESS; - } - else - { - return STATUS_OBJECT_NAME_NOT_FOUND; - } - break; - -// case DevicePropertyUINumber: -// if (DeviceNode->CapabilityFlags == NULL) -// return STATUS_INVALID_DEVICE_REQUEST; -// Length = sizeof(ULONG); -// Data = &DeviceNode->CapabilityFlags->UINumber; -// break; - - case DevicePropertyClassName: - case DevicePropertyClassGuid: - case DevicePropertyDriverKeyName: - case DevicePropertyManufacturer: - case DevicePropertyFriendlyName: - case DevicePropertyHardwareID: - case DevicePropertyCompatibleIDs: - case DevicePropertyDeviceDescription: - case DevicePropertyLocationInformation: - case DevicePropertyUINumber: - { - LPCWSTR RegistryPropertyName; - UNICODE_STRING EnumRoot = RTL_CONSTANT_STRING(ENUM_ROOT); - UNICODE_STRING ValueName; - KEY_VALUE_PARTIAL_INFORMATION *ValueInformation; - ULONG ValueInformationLength; - HANDLE KeyHandle, EnumRootHandle; - NTSTATUS Status; - - switch (DeviceProperty) - { - case DevicePropertyClassName: - RegistryPropertyName = L"Class"; break; - case DevicePropertyClassGuid: - RegistryPropertyName = L"ClassGuid"; break; - case DevicePropertyDriverKeyName: - RegistryPropertyName = L"Driver"; break; - case DevicePropertyManufacturer: - RegistryPropertyName = L"Mfg"; break; - case DevicePropertyFriendlyName: - RegistryPropertyName = L"FriendlyName"; break; - case DevicePropertyHardwareID: - RegistryPropertyName = L"HardwareID"; break; - case DevicePropertyCompatibleIDs: - RegistryPropertyName = L"CompatibleIDs"; break; - case DevicePropertyDeviceDescription: - RegistryPropertyName = L"DeviceDesc"; break; - case DevicePropertyLocationInformation: - RegistryPropertyName = L"LocationInformation"; break; - case DevicePropertyUINumber: - RegistryPropertyName = L"UINumber"; break; - default: - /* Should not happen */ - ASSERT(FALSE); - return STATUS_UNSUCCESSFUL; - } - - DPRINT("Registry property %S\n", RegistryPropertyName); - - /* Open Enum key */ - Status = IopOpenRegistryKeyEx(&EnumRootHandle, NULL, - &EnumRoot, KEY_READ); - if (!NT_SUCCESS(Status)) - { - DPRINT1("Error opening ENUM_ROOT, Status=0x%08x\n", Status); - return Status; - } - - /* Open instance key */ - Status = IopOpenRegistryKeyEx(&KeyHandle, EnumRootHandle, - &DeviceNode->InstancePath, KEY_READ); - if (!NT_SUCCESS(Status)) - { - DPRINT1("Error opening InstancePath, Status=0x%08x\n", Status); - ZwClose(EnumRootHandle); - return Status; - } - - /* Allocate buffer to read as much data as required by the caller */ - ValueInformationLength = FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, - Data[0]) + BufferLength; - ValueInformation = ExAllocatePool(PagedPool, ValueInformationLength); - if (!ValueInformation) - { - ZwClose(KeyHandle); - return STATUS_INSUFFICIENT_RESOURCES; - } - - /* Read the value */ - RtlInitUnicodeString(&ValueName, RegistryPropertyName); - Status = ZwQueryValueKey(KeyHandle, &ValueName, - KeyValuePartialInformation, ValueInformation, - ValueInformationLength, - &ValueInformationLength); - ZwClose(KeyHandle); - - /* Return data */ - *ResultLength = ValueInformation->DataLength; - - if (!NT_SUCCESS(Status)) - { - DPRINT1("Problem: Status=0x%08x, ResultLength = %d\n", Status, *ResultLength); - ExFreePool(ValueInformation); - if (Status == STATUS_BUFFER_OVERFLOW) - return STATUS_BUFFER_TOO_SMALL; - else - return Status; - } - - /* FIXME: Verify the value (NULL-terminated, correct format). */ - RtlCopyMemory(PropertyBuffer, ValueInformation->Data, - ValueInformation->DataLength); - ExFreePool(ValueInformation); - - return STATUS_SUCCESS; - } - - case DevicePropertyBootConfiguration: - Length = 0; - if (DeviceNode->BootResources->Count != 0) - { - Length = CM_RESOURCE_LIST_SIZE(DeviceNode->BootResources); - } - Data = &DeviceNode->BootResources; - break; - - /* FIXME: use a translated boot configuration instead */ - case DevicePropertyBootConfigurationTranslated: - Length = 0; - if (DeviceNode->BootResources->Count != 0) - { - Length = CM_RESOURCE_LIST_SIZE(DeviceNode->BootResources); - } - Data = &DeviceNode->BootResources; - break; - - case DevicePropertyEnumeratorName: - /* A buffer overflow can't happen here, since InstancePath - * always contains the enumerator name followed by \\ */ - Ptr = wcschr(DeviceNode->InstancePath.Buffer, L'\\'); - ASSERT(Ptr); - Length = (Ptr - DeviceNode->InstancePath.Buffer + 1) * sizeof(WCHAR); - Data = DeviceNode->InstancePath.Buffer; - break; - - case DevicePropertyPhysicalDeviceObjectName: - /* InstancePath buffer is NULL terminated, so we can do this */ - Length = DeviceNode->InstancePath.MaximumLength; - Data = DeviceNode->InstancePath.Buffer; - break; - - default: - return STATUS_INVALID_PARAMETER_2; - } - - /* Prepare returned values */ - *ResultLength = Length; - if (BufferLength < Length) - return STATUS_BUFFER_TOO_SMALL; - RtlCopyMemory(PropertyBuffer, Data, Length); - - /* NULL terminate the string (if required) */ - if (DeviceProperty == DevicePropertyEnumeratorName) - ((LPWSTR)PropertyBuffer)[Length / sizeof(WCHAR)] = UNICODE_NULL; - - return STATUS_SUCCESS; -} - -/* - * @unimplemented - */ -VOID -STDCALL -IoInvalidateDeviceState(IN PDEVICE_OBJECT PhysicalDeviceObject) -{ - UNIMPLEMENTED; -} - -/** - * @name IoOpenDeviceRegistryKey - * - * Open a registry key unique for a specified driver or device instance. - * - * @param DeviceObject Device to get the registry key for. - * @param DevInstKeyType Type of the key to return. - * @param DesiredAccess Access mask (eg. KEY_READ | KEY_WRITE). - * @param DevInstRegKey Handle to the opened registry key on - * successful return. - * - * @return Status. - * - * @implemented - */ -NTSTATUS -STDCALL -IoOpenDeviceRegistryKey(IN PDEVICE_OBJECT DeviceObject, - IN ULONG DevInstKeyType, - IN ACCESS_MASK DesiredAccess, - OUT PHANDLE DevInstRegKey) -{ - static WCHAR RootKeyName[] = - L"\\Registry\\Machine\\System\\CurrentControlSet\\"; - static WCHAR ProfileKeyName[] = - L"Hardware Profiles\\Current\\System\\CurrentControlSet\\"; - static WCHAR ClassKeyName[] = L"Control\\Class\\"; - static WCHAR EnumKeyName[] = L"Enum\\"; - static WCHAR DeviceParametersKeyName[] = L"Device Parameters"; - ULONG KeyNameLength; - LPWSTR KeyNameBuffer; - UNICODE_STRING KeyName; - ULONG DriverKeyLength; - OBJECT_ATTRIBUTES ObjectAttributes; - PDEVICE_NODE DeviceNode = NULL; - NTSTATUS Status; - - DPRINT("IoOpenDeviceRegistryKey() called\n"); - - if ((DevInstKeyType & (PLUGPLAY_REGKEY_DEVICE | PLUGPLAY_REGKEY_DRIVER)) == 0) - { - DPRINT1("IoOpenDeviceRegistryKey(): got wrong params, exiting... \n"); - return STATUS_INVALID_PARAMETER; - } - - /* - * Calculate the length of the base key name. This is the full - * name for driver key or the name excluding "Device Parameters" - * subkey for device key. - */ - - KeyNameLength = sizeof(RootKeyName); - if (DevInstKeyType & PLUGPLAY_REGKEY_CURRENT_HWPROFILE) - KeyNameLength += sizeof(ProfileKeyName) - sizeof(UNICODE_NULL); - if (DevInstKeyType & PLUGPLAY_REGKEY_DRIVER) - { - KeyNameLength += sizeof(ClassKeyName) - sizeof(UNICODE_NULL); - Status = IoGetDeviceProperty(DeviceObject, DevicePropertyDriverKeyName, - 0, NULL, &DriverKeyLength); - if (Status != STATUS_BUFFER_TOO_SMALL) - return Status; - KeyNameLength += DriverKeyLength; - } - else - { - DeviceNode = IopGetDeviceNode(DeviceObject); - KeyNameLength += sizeof(EnumKeyName) - sizeof(UNICODE_NULL) + - DeviceNode->InstancePath.Length; - } - - /* - * Now allocate the buffer for the key name... - */ - - KeyNameBuffer = ExAllocatePool(PagedPool, KeyNameLength); - if (KeyNameBuffer == NULL) - return STATUS_INSUFFICIENT_RESOURCES; - - KeyName.Length = 0; - KeyName.MaximumLength = (USHORT)KeyNameLength; - KeyName.Buffer = KeyNameBuffer; - - /* - * ...and build the key name. - */ - - KeyName.Length += sizeof(RootKeyName) - sizeof(UNICODE_NULL); - RtlCopyMemory(KeyNameBuffer, RootKeyName, KeyName.Length); - - if (DevInstKeyType & PLUGPLAY_REGKEY_CURRENT_HWPROFILE) - RtlAppendUnicodeToString(&KeyName, ProfileKeyName); - - if (DevInstKeyType & PLUGPLAY_REGKEY_DRIVER) - { - RtlAppendUnicodeToString(&KeyName, ClassKeyName); - Status = IoGetDeviceProperty(DeviceObject, DevicePropertyDriverKeyName, - DriverKeyLength, KeyNameBuffer + - (KeyName.Length / sizeof(WCHAR)), - &DriverKeyLength); - if (!NT_SUCCESS(Status)) - { - DPRINT1("Call to IoGetDeviceProperty() failed with Status 0x%08lx\n", Status); - ExFreePool(KeyNameBuffer); - return Status; - } - KeyName.Length += (USHORT)DriverKeyLength - sizeof(UNICODE_NULL); - } - else - { - RtlAppendUnicodeToString(&KeyName, EnumKeyName); - Status = RtlAppendUnicodeStringToString(&KeyName, &DeviceNode->InstancePath); - if (DeviceNode->InstancePath.Length == 0) - { - ExFreePool(KeyNameBuffer); - return Status; - } - } - - /* - * Open the base key. - */ - Status = IopOpenRegistryKeyEx(DevInstRegKey, NULL, &KeyName, DesiredAccess); - if (!NT_SUCCESS(Status)) - { - DPRINT1("IoOpenDeviceRegistryKey(%wZ): Base key doesn't exist, exiting... (Status 0x%08lx)\n", &KeyName, Status); - ExFreePool(KeyNameBuffer); - return Status; - } - ExFreePool(KeyNameBuffer); - - /* - * For driver key we're done now. - */ - - if (DevInstKeyType & PLUGPLAY_REGKEY_DRIVER) - return Status; - - /* - * Let's go further. For device key we must open "Device Parameters" - * subkey and create it if it doesn't exist yet. - */ - - RtlInitUnicodeString(&KeyName, DeviceParametersKeyName); - InitializeObjectAttributes(&ObjectAttributes, &KeyName, - OBJ_CASE_INSENSITIVE, *DevInstRegKey, NULL); - Status = ZwCreateKey(DevInstRegKey, DesiredAccess, &ObjectAttributes, - 0, NULL, REG_OPTION_NON_VOLATILE, NULL); - ZwClose(ObjectAttributes.RootDirectory); - - return Status; -} - -/* - * @unimplemented - */ -VOID -STDCALL -IoRequestDeviceEject(IN PDEVICE_OBJECT PhysicalDeviceObject) -{ - UNIMPLEMENTED; -} - - NTSTATUS IopGetSystemPowerDeviceObject(PDEVICE_OBJECT *DeviceObject) { @@ -743,7 +281,7 @@ IopGetSystemPowerDeviceObject(PDEVICE_OBJECT *DeviceObject) } USHORT -STDCALL +NTAPI IopGetBusTypeGuidIndex(LPGUID BusTypeGuid) { USHORT i = 0, FoundIndex = 0xFFFF; @@ -2136,158 +1674,6 @@ IopActionInterrogateDeviceStack(PDEVICE_NODE DeviceNode, return STATUS_SUCCESS; } -/* - * @implemented - */ -VOID -NTAPI -IoSynchronousInvalidateDeviceRelations( - IN PDEVICE_OBJECT DeviceObject, - IN DEVICE_RELATION_TYPE Type) -{ - PDEVICE_NODE DeviceNode = IopGetDeviceNode(DeviceObject); - DEVICETREE_TRAVERSE_CONTEXT Context; - PDEVICE_RELATIONS DeviceRelations; - IO_STATUS_BLOCK IoStatusBlock; - PDEVICE_NODE ChildDeviceNode; - IO_STACK_LOCATION Stack; - BOOLEAN BootDrivers; - OBJECT_ATTRIBUTES ObjectAttributes; - UNICODE_STRING LinkName = RTL_CONSTANT_STRING(L"\\SystemRoot"); - HANDLE Handle; - NTSTATUS Status; - ULONG i; - - DPRINT("DeviceObject 0x%p\n", DeviceObject); - - DPRINT("Sending IRP_MN_QUERY_DEVICE_RELATIONS to device stack\n"); - - Stack.Parameters.QueryDeviceRelations.Type = Type; - - Status = IopInitiatePnpIrp( - DeviceObject, - &IoStatusBlock, - IRP_MN_QUERY_DEVICE_RELATIONS, - &Stack); - if (!NT_SUCCESS(Status)) - { - DPRINT("IopInitiatePnpIrp() failed with status 0x%08lx\n", Status); - return; - } - - DeviceRelations = (PDEVICE_RELATIONS)IoStatusBlock.Information; - - if (!DeviceRelations || DeviceRelations->Count <= 0) - { - DPRINT("No PDOs\n"); - if (DeviceRelations) - { - ExFreePool(DeviceRelations); - } - return; - } - - DPRINT("Got %d PDOs\n", DeviceRelations->Count); - - /* - * Create device nodes for all discovered devices - */ - for (i = 0; i < DeviceRelations->Count; i++) - { - if (IopGetDeviceNode(DeviceRelations->Objects[i]) != NULL) - { - ObDereferenceObject(DeviceRelations->Objects[i]); - continue; - } - Status = IopCreateDeviceNode( - DeviceNode, - DeviceRelations->Objects[i], - NULL, - &ChildDeviceNode); - DeviceNode->Flags |= DNF_ENUMERATED; - if (!NT_SUCCESS(Status)) - { - DPRINT("No resources\n"); - for (i = 0; i < DeviceRelations->Count; i++) - ObDereferenceObject(DeviceRelations->Objects[i]); - ExFreePool(DeviceRelations); - return; - } - } - ExFreePool(DeviceRelations); - - /* - * Retrieve information about all discovered children from the bus driver - */ - IopInitDeviceTreeTraverseContext( - &Context, - DeviceNode, - IopActionInterrogateDeviceStack, - DeviceNode); - - Status = IopTraverseDeviceTree(&Context); - if (!NT_SUCCESS(Status)) - { - DPRINT("IopTraverseDeviceTree() failed with status 0x%08lx\n", Status); - return; - } - - /* - * Retrieve configuration from the registry for discovered children - */ - IopInitDeviceTreeTraverseContext( - &Context, - DeviceNode, - IopActionConfigureChildServices, - DeviceNode); - - Status = IopTraverseDeviceTree(&Context); - if (!NT_SUCCESS(Status)) - { - DPRINT("IopTraverseDeviceTree() failed with status 0x%08lx\n", Status); - return; - } - - /* - * Get the state of the system boot. If the \\SystemRoot link isn't - * created yet, we will assume that it's possible to load only boot - * drivers. - */ - InitializeObjectAttributes( - &ObjectAttributes, - &LinkName, - 0, - NULL, - NULL); - Status = ZwOpenFile( - &Handle, - FILE_ALL_ACCESS, - &ObjectAttributes, - &IoStatusBlock, - 0, - 0); - if (NT_SUCCESS(Status)) - { - BootDrivers = FALSE; - ZwClose(Handle); - } - else - BootDrivers = TRUE; - - /* - * Initialize services for discovered children. Only boot drivers will - * be loaded from boot driver! - */ - Status = IopInitializePnpServices(DeviceNode, BootDrivers); - if (!NT_SUCCESS(Status)) - { - DPRINT("IopInitializePnpServices() failed with status 0x%08lx\n", Status); - return; - } - - DPRINT("IopInvalidateDeviceRelations() finished\n"); -} - /* * IopActionConfigureChildServices * @@ -3476,4 +2862,615 @@ PpInitSystem(VOID) } } -/* EOF */ +/* PUBLIC FUNCTIONS **********************************************************/ + +/* + * @unimplemented + */ +NTSTATUS +NTAPI +IoGetDeviceProperty(IN PDEVICE_OBJECT DeviceObject, + IN DEVICE_REGISTRY_PROPERTY DeviceProperty, + IN ULONG BufferLength, + OUT PVOID PropertyBuffer, + OUT PULONG ResultLength) +{ + PDEVICE_NODE DeviceNode = IopGetDeviceNode(DeviceObject); + DEVICE_CAPABILITIES DeviceCaps; + ULONG Length; + PVOID Data = NULL; + PWSTR Ptr; + NTSTATUS Status; + + DPRINT("IoGetDeviceProperty(0x%p %d)\n", DeviceObject, DeviceProperty); + + *ResultLength = 0; + + if (DeviceNode == NULL) + return STATUS_INVALID_DEVICE_REQUEST; + + switch (DeviceProperty) + { + case DevicePropertyBusNumber: + Length = sizeof(ULONG); + Data = &DeviceNode->ChildBusNumber; + break; + + /* Complete, untested */ + case DevicePropertyBusTypeGuid: + /* Sanity check */ + if ((DeviceNode->ChildBusTypeIndex != 0xFFFF) && + (DeviceNode->ChildBusTypeIndex < IopBusTypeGuidList->GuidCount)) + { + /* Return the GUID */ + *ResultLength = sizeof(GUID); + + /* Check if the buffer given was large enough */ + if (BufferLength < *ResultLength) + { + return STATUS_BUFFER_TOO_SMALL; + } + + /* Copy the GUID */ + RtlCopyMemory(PropertyBuffer, + &(IopBusTypeGuidList->Guids[DeviceNode->ChildBusTypeIndex]), + sizeof(GUID)); + return STATUS_SUCCESS; + } + else + { + return STATUS_OBJECT_NAME_NOT_FOUND; + } + break; + + case DevicePropertyLegacyBusType: + Length = sizeof(INTERFACE_TYPE); + Data = &DeviceNode->ChildInterfaceType; + break; + + case DevicePropertyAddress: + /* Query the device caps */ + Status = IopQueryDeviceCapabilities(DeviceNode, &DeviceCaps); + if (NT_SUCCESS(Status) && (DeviceCaps.Address != (ULONG)-1)) + { + /* Return length */ + *ResultLength = sizeof(ULONG); + + /* Check if the buffer given was large enough */ + if (BufferLength < *ResultLength) + { + return STATUS_BUFFER_TOO_SMALL; + } + + /* Return address */ + *(PULONG)PropertyBuffer = DeviceCaps.Address; + return STATUS_SUCCESS; + } + else + { + return STATUS_OBJECT_NAME_NOT_FOUND; + } + break; + +// case DevicePropertyUINumber: +// if (DeviceNode->CapabilityFlags == NULL) +// return STATUS_INVALID_DEVICE_REQUEST; +// Length = sizeof(ULONG); +// Data = &DeviceNode->CapabilityFlags->UINumber; +// break; + + case DevicePropertyClassName: + case DevicePropertyClassGuid: + case DevicePropertyDriverKeyName: + case DevicePropertyManufacturer: + case DevicePropertyFriendlyName: + case DevicePropertyHardwareID: + case DevicePropertyCompatibleIDs: + case DevicePropertyDeviceDescription: + case DevicePropertyLocationInformation: + case DevicePropertyUINumber: + { + LPCWSTR RegistryPropertyName; + UNICODE_STRING EnumRoot = RTL_CONSTANT_STRING(ENUM_ROOT); + UNICODE_STRING ValueName; + KEY_VALUE_PARTIAL_INFORMATION *ValueInformation; + ULONG ValueInformationLength; + HANDLE KeyHandle, EnumRootHandle; + NTSTATUS Status; + + switch (DeviceProperty) + { + case DevicePropertyClassName: + RegistryPropertyName = L"Class"; break; + case DevicePropertyClassGuid: + RegistryPropertyName = L"ClassGuid"; break; + case DevicePropertyDriverKeyName: + RegistryPropertyName = L"Driver"; break; + case DevicePropertyManufacturer: + RegistryPropertyName = L"Mfg"; break; + case DevicePropertyFriendlyName: + RegistryPropertyName = L"FriendlyName"; break; + case DevicePropertyHardwareID: + RegistryPropertyName = L"HardwareID"; break; + case DevicePropertyCompatibleIDs: + RegistryPropertyName = L"CompatibleIDs"; break; + case DevicePropertyDeviceDescription: + RegistryPropertyName = L"DeviceDesc"; break; + case DevicePropertyLocationInformation: + RegistryPropertyName = L"LocationInformation"; break; + case DevicePropertyUINumber: + RegistryPropertyName = L"UINumber"; break; + default: + /* Should not happen */ + ASSERT(FALSE); + return STATUS_UNSUCCESSFUL; + } + + DPRINT("Registry property %S\n", RegistryPropertyName); + + /* Open Enum key */ + Status = IopOpenRegistryKeyEx(&EnumRootHandle, NULL, + &EnumRoot, KEY_READ); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Error opening ENUM_ROOT, Status=0x%08x\n", Status); + return Status; + } + + /* Open instance key */ + Status = IopOpenRegistryKeyEx(&KeyHandle, EnumRootHandle, + &DeviceNode->InstancePath, KEY_READ); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Error opening InstancePath, Status=0x%08x\n", Status); + ZwClose(EnumRootHandle); + return Status; + } + + /* Allocate buffer to read as much data as required by the caller */ + ValueInformationLength = FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, + Data[0]) + BufferLength; + ValueInformation = ExAllocatePool(PagedPool, ValueInformationLength); + if (!ValueInformation) + { + ZwClose(KeyHandle); + return STATUS_INSUFFICIENT_RESOURCES; + } + + /* Read the value */ + RtlInitUnicodeString(&ValueName, RegistryPropertyName); + Status = ZwQueryValueKey(KeyHandle, &ValueName, + KeyValuePartialInformation, ValueInformation, + ValueInformationLength, + &ValueInformationLength); + ZwClose(KeyHandle); + + /* Return data */ + *ResultLength = ValueInformation->DataLength; + + if (!NT_SUCCESS(Status)) + { + DPRINT1("Problem: Status=0x%08x, ResultLength = %d\n", Status, *ResultLength); + ExFreePool(ValueInformation); + if (Status == STATUS_BUFFER_OVERFLOW) + return STATUS_BUFFER_TOO_SMALL; + else + return Status; + } + + /* FIXME: Verify the value (NULL-terminated, correct format). */ + RtlCopyMemory(PropertyBuffer, ValueInformation->Data, + ValueInformation->DataLength); + ExFreePool(ValueInformation); + + return STATUS_SUCCESS; + } + + case DevicePropertyBootConfiguration: + Length = 0; + if (DeviceNode->BootResources->Count != 0) + { + Length = CM_RESOURCE_LIST_SIZE(DeviceNode->BootResources); + } + Data = &DeviceNode->BootResources; + break; + + /* FIXME: use a translated boot configuration instead */ + case DevicePropertyBootConfigurationTranslated: + Length = 0; + if (DeviceNode->BootResources->Count != 0) + { + Length = CM_RESOURCE_LIST_SIZE(DeviceNode->BootResources); + } + Data = &DeviceNode->BootResources; + break; + + case DevicePropertyEnumeratorName: + /* A buffer overflow can't happen here, since InstancePath + * always contains the enumerator name followed by \\ */ + Ptr = wcschr(DeviceNode->InstancePath.Buffer, L'\\'); + ASSERT(Ptr); + Length = (Ptr - DeviceNode->InstancePath.Buffer + 1) * sizeof(WCHAR); + Data = DeviceNode->InstancePath.Buffer; + break; + + case DevicePropertyPhysicalDeviceObjectName: + /* InstancePath buffer is NULL terminated, so we can do this */ + Length = DeviceNode->InstancePath.MaximumLength; + Data = DeviceNode->InstancePath.Buffer; + break; + + default: + return STATUS_INVALID_PARAMETER_2; + } + + /* Prepare returned values */ + *ResultLength = Length; + if (BufferLength < Length) + return STATUS_BUFFER_TOO_SMALL; + RtlCopyMemory(PropertyBuffer, Data, Length); + + /* NULL terminate the string (if required) */ + if (DeviceProperty == DevicePropertyEnumeratorName) + ((LPWSTR)PropertyBuffer)[Length / sizeof(WCHAR)] = UNICODE_NULL; + + return STATUS_SUCCESS; +} + +/* + * @unimplemented + */ +VOID +NTAPI +IoInvalidateDeviceState(IN PDEVICE_OBJECT PhysicalDeviceObject) +{ + UNIMPLEMENTED; +} + +/** + * @name IoOpenDeviceRegistryKey + * + * Open a registry key unique for a specified driver or device instance. + * + * @param DeviceObject Device to get the registry key for. + * @param DevInstKeyType Type of the key to return. + * @param DesiredAccess Access mask (eg. KEY_READ | KEY_WRITE). + * @param DevInstRegKey Handle to the opened registry key on + * successful return. + * + * @return Status. + * + * @implemented + */ +NTSTATUS +NTAPI +IoOpenDeviceRegistryKey(IN PDEVICE_OBJECT DeviceObject, + IN ULONG DevInstKeyType, + IN ACCESS_MASK DesiredAccess, + OUT PHANDLE DevInstRegKey) +{ + static WCHAR RootKeyName[] = + L"\\Registry\\Machine\\System\\CurrentControlSet\\"; + static WCHAR ProfileKeyName[] = + L"Hardware Profiles\\Current\\System\\CurrentControlSet\\"; + static WCHAR ClassKeyName[] = L"Control\\Class\\"; + static WCHAR EnumKeyName[] = L"Enum\\"; + static WCHAR DeviceParametersKeyName[] = L"Device Parameters"; + ULONG KeyNameLength; + LPWSTR KeyNameBuffer; + UNICODE_STRING KeyName; + ULONG DriverKeyLength; + OBJECT_ATTRIBUTES ObjectAttributes; + PDEVICE_NODE DeviceNode = NULL; + NTSTATUS Status; + + DPRINT("IoOpenDeviceRegistryKey() called\n"); + + if ((DevInstKeyType & (PLUGPLAY_REGKEY_DEVICE | PLUGPLAY_REGKEY_DRIVER)) == 0) + { + DPRINT1("IoOpenDeviceRegistryKey(): got wrong params, exiting... \n"); + return STATUS_INVALID_PARAMETER; + } + + /* + * Calculate the length of the base key name. This is the full + * name for driver key or the name excluding "Device Parameters" + * subkey for device key. + */ + + KeyNameLength = sizeof(RootKeyName); + if (DevInstKeyType & PLUGPLAY_REGKEY_CURRENT_HWPROFILE) + KeyNameLength += sizeof(ProfileKeyName) - sizeof(UNICODE_NULL); + if (DevInstKeyType & PLUGPLAY_REGKEY_DRIVER) + { + KeyNameLength += sizeof(ClassKeyName) - sizeof(UNICODE_NULL); + Status = IoGetDeviceProperty(DeviceObject, DevicePropertyDriverKeyName, + 0, NULL, &DriverKeyLength); + if (Status != STATUS_BUFFER_TOO_SMALL) + return Status; + KeyNameLength += DriverKeyLength; + } + else + { + DeviceNode = IopGetDeviceNode(DeviceObject); + KeyNameLength += sizeof(EnumKeyName) - sizeof(UNICODE_NULL) + + DeviceNode->InstancePath.Length; + } + + /* + * Now allocate the buffer for the key name... + */ + + KeyNameBuffer = ExAllocatePool(PagedPool, KeyNameLength); + if (KeyNameBuffer == NULL) + return STATUS_INSUFFICIENT_RESOURCES; + + KeyName.Length = 0; + KeyName.MaximumLength = (USHORT)KeyNameLength; + KeyName.Buffer = KeyNameBuffer; + + /* + * ...and build the key name. + */ + + KeyName.Length += sizeof(RootKeyName) - sizeof(UNICODE_NULL); + RtlCopyMemory(KeyNameBuffer, RootKeyName, KeyName.Length); + + if (DevInstKeyType & PLUGPLAY_REGKEY_CURRENT_HWPROFILE) + RtlAppendUnicodeToString(&KeyName, ProfileKeyName); + + if (DevInstKeyType & PLUGPLAY_REGKEY_DRIVER) + { + RtlAppendUnicodeToString(&KeyName, ClassKeyName); + Status = IoGetDeviceProperty(DeviceObject, DevicePropertyDriverKeyName, + DriverKeyLength, KeyNameBuffer + + (KeyName.Length / sizeof(WCHAR)), + &DriverKeyLength); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Call to IoGetDeviceProperty() failed with Status 0x%08lx\n", Status); + ExFreePool(KeyNameBuffer); + return Status; + } + KeyName.Length += (USHORT)DriverKeyLength - sizeof(UNICODE_NULL); + } + else + { + RtlAppendUnicodeToString(&KeyName, EnumKeyName); + Status = RtlAppendUnicodeStringToString(&KeyName, &DeviceNode->InstancePath); + if (DeviceNode->InstancePath.Length == 0) + { + ExFreePool(KeyNameBuffer); + return Status; + } + } + + /* + * Open the base key. + */ + Status = IopOpenRegistryKeyEx(DevInstRegKey, NULL, &KeyName, DesiredAccess); + if (!NT_SUCCESS(Status)) + { + DPRINT1("IoOpenDeviceRegistryKey(%wZ): Base key doesn't exist, exiting... (Status 0x%08lx)\n", &KeyName, Status); + ExFreePool(KeyNameBuffer); + return Status; + } + ExFreePool(KeyNameBuffer); + + /* + * For driver key we're done now. + */ + + if (DevInstKeyType & PLUGPLAY_REGKEY_DRIVER) + return Status; + + /* + * Let's go further. For device key we must open "Device Parameters" + * subkey and create it if it doesn't exist yet. + */ + + RtlInitUnicodeString(&KeyName, DeviceParametersKeyName); + InitializeObjectAttributes(&ObjectAttributes, &KeyName, + OBJ_CASE_INSENSITIVE, *DevInstRegKey, NULL); + Status = ZwCreateKey(DevInstRegKey, DesiredAccess, &ObjectAttributes, + 0, NULL, REG_OPTION_NON_VOLATILE, NULL); + ZwClose(ObjectAttributes.RootDirectory); + + return Status; +} + +/* + * @unimplemented + */ +VOID +NTAPI +IoRequestDeviceEject(IN PDEVICE_OBJECT PhysicalDeviceObject) +{ + UNIMPLEMENTED; +} + +/* + * @implemented + */ +VOID +NTAPI +IoInvalidateDeviceRelations( + IN PDEVICE_OBJECT DeviceObject, + IN DEVICE_RELATION_TYPE Type) +{ + PIO_WORKITEM WorkItem; + PINVALIDATE_DEVICE_RELATION_DATA Data; + + Data = ExAllocatePool(PagedPool, sizeof(INVALIDATE_DEVICE_RELATION_DATA)); + if (!Data) + return; + WorkItem = IoAllocateWorkItem(DeviceObject); + if (!WorkItem) + { + ExFreePool(Data); + return; + } + + ObReferenceObject(DeviceObject); + Data->DeviceObject = DeviceObject; + Data->Type = Type; + Data->WorkItem = WorkItem; + + IoQueueWorkItem( + WorkItem, + IopAsynchronousInvalidateDeviceRelations, + DelayedWorkQueue, + Data); +} + +/* + * @implemented + */ +VOID +NTAPI +IoSynchronousInvalidateDeviceRelations( + IN PDEVICE_OBJECT DeviceObject, + IN DEVICE_RELATION_TYPE Type) +{ + PDEVICE_NODE DeviceNode = IopGetDeviceNode(DeviceObject); + DEVICETREE_TRAVERSE_CONTEXT Context; + PDEVICE_RELATIONS DeviceRelations; + IO_STATUS_BLOCK IoStatusBlock; + PDEVICE_NODE ChildDeviceNode; + IO_STACK_LOCATION Stack; + BOOLEAN BootDrivers; + OBJECT_ATTRIBUTES ObjectAttributes; + UNICODE_STRING LinkName = RTL_CONSTANT_STRING(L"\\SystemRoot"); + HANDLE Handle; + NTSTATUS Status; + ULONG i; + + DPRINT("DeviceObject 0x%p\n", DeviceObject); + + DPRINT("Sending IRP_MN_QUERY_DEVICE_RELATIONS to device stack\n"); + + Stack.Parameters.QueryDeviceRelations.Type = Type; + + Status = IopInitiatePnpIrp( + DeviceObject, + &IoStatusBlock, + IRP_MN_QUERY_DEVICE_RELATIONS, + &Stack); + if (!NT_SUCCESS(Status)) + { + DPRINT("IopInitiatePnpIrp() failed with status 0x%08lx\n", Status); + return; + } + + DeviceRelations = (PDEVICE_RELATIONS)IoStatusBlock.Information; + + if (!DeviceRelations || DeviceRelations->Count <= 0) + { + DPRINT("No PDOs\n"); + if (DeviceRelations) + { + ExFreePool(DeviceRelations); + } + return; + } + + DPRINT("Got %d PDOs\n", DeviceRelations->Count); + + /* + * Create device nodes for all discovered devices + */ + for (i = 0; i < DeviceRelations->Count; i++) + { + if (IopGetDeviceNode(DeviceRelations->Objects[i]) != NULL) + { + ObDereferenceObject(DeviceRelations->Objects[i]); + continue; + } + Status = IopCreateDeviceNode( + DeviceNode, + DeviceRelations->Objects[i], + NULL, + &ChildDeviceNode); + DeviceNode->Flags |= DNF_ENUMERATED; + if (!NT_SUCCESS(Status)) + { + DPRINT("No resources\n"); + for (i = 0; i < DeviceRelations->Count; i++) + ObDereferenceObject(DeviceRelations->Objects[i]); + ExFreePool(DeviceRelations); + return; + } + } + ExFreePool(DeviceRelations); + + /* + * Retrieve information about all discovered children from the bus driver + */ + IopInitDeviceTreeTraverseContext( + &Context, + DeviceNode, + IopActionInterrogateDeviceStack, + DeviceNode); + + Status = IopTraverseDeviceTree(&Context); + if (!NT_SUCCESS(Status)) + { + DPRINT("IopTraverseDeviceTree() failed with status 0x%08lx\n", Status); + return; + } + + /* + * Retrieve configuration from the registry for discovered children + */ + IopInitDeviceTreeTraverseContext( + &Context, + DeviceNode, + IopActionConfigureChildServices, + DeviceNode); + + Status = IopTraverseDeviceTree(&Context); + if (!NT_SUCCESS(Status)) + { + DPRINT("IopTraverseDeviceTree() failed with status 0x%08lx\n", Status); + return; + } + + /* + * Get the state of the system boot. If the \\SystemRoot link isn't + * created yet, we will assume that it's possible to load only boot + * drivers. + */ + InitializeObjectAttributes( + &ObjectAttributes, + &LinkName, + 0, + NULL, + NULL); + Status = ZwOpenFile( + &Handle, + FILE_ALL_ACCESS, + &ObjectAttributes, + &IoStatusBlock, + 0, + 0); + if (NT_SUCCESS(Status)) + { + BootDrivers = FALSE; + ZwClose(Handle); + } + else + BootDrivers = TRUE; + + /* + * Initialize services for discovered children. Only boot drivers will + * be loaded from boot driver! + */ + Status = IopInitializePnpServices(DeviceNode, BootDrivers); + if (!NT_SUCCESS(Status)) + { + DPRINT("IopInitializePnpServices() failed with status 0x%08lx\n", Status); + return; + } + + DPRINT("IopInvalidateDeviceRelations() finished\n"); +} diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpnotify.c b/reactos/ntoskrnl/io/pnpmgr/pnpnotify.c index 79e10df0394..3c125e52ea7 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpnotify.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpnotify.c @@ -1,9 +1,8 @@ /* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/io/pnpnotify.c + * PROJECT: ReactOS Kernel + * COPYRIGHT: GPL - See COPYING in the top level directory + * FILE: ntoskrnl/io/pnpmgr/pnpnotify.c * PURPOSE: Plug & Play notification functions - * * PROGRAMMERS: Filip Navara (xnavara@volny.cz) * Hervй Poussineau (hpoussin@reactos.org) */ @@ -14,21 +13,16 @@ #define NDEBUG #include -#if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, IopInitPnpNotificationImplementation) -#endif - - /* TYPES *******************************************************************/ typedef struct _PNP_NOTIFY_ENTRY { - LIST_ENTRY PnpNotifyList; - IO_NOTIFICATION_EVENT_CATEGORY EventCategory; - PVOID Context; - UNICODE_STRING Guid; - PFILE_OBJECT FileObject; - PDRIVER_NOTIFICATION_CALLBACK_ROUTINE PnpNotificationProc; + LIST_ENTRY PnpNotifyList; + IO_NOTIFICATION_EVENT_CATEGORY EventCategory; + PVOID Context; + UNICODE_STRING Guid; + PFILE_OBJECT FileObject; + PDRIVER_NOTIFICATION_CALLBACK_ROUTINE PnpNotificationProc; } PNP_NOTIFY_ENTRY, *PPNP_NOTIFY_ENTRY; KGUARDED_MUTEX PnpNotifyListLock; @@ -36,163 +30,6 @@ LIST_ENTRY PnpNotifyListHead; /* FUNCTIONS *****************************************************************/ -/* - * @unimplemented - */ -ULONG -STDCALL -IoPnPDeliverServicePowerNotification( - ULONG VetoedPowerOperation OPTIONAL, - ULONG PowerNotification, - ULONG Unknown OPTIONAL, - BOOLEAN Synchronous - ) -{ - UNIMPLEMENTED; - return 0; -} - -/* - * @implemented - */ -NTSTATUS -STDCALL -IoRegisterPlugPlayNotification( - IN IO_NOTIFICATION_EVENT_CATEGORY EventCategory, - IN ULONG EventCategoryFlags, - IN PVOID EventCategoryData OPTIONAL, - IN PDRIVER_OBJECT DriverObject, - IN PDRIVER_NOTIFICATION_CALLBACK_ROUTINE CallbackRoutine, - IN PVOID Context, - OUT PVOID *NotificationEntry) -{ - PPNP_NOTIFY_ENTRY Entry; - PWSTR SymbolicLinkList; - NTSTATUS Status; - - PAGED_CODE(); - - DPRINT("IoRegisterPlugPlayNotification(EventCategory 0x%x, EventCategoryFlags 0x%lx, DriverObject %p) called.\n", - EventCategory, - EventCategoryFlags, - DriverObject); - - ObReferenceObject(DriverObject); - - /* Try to allocate entry for notification before sending any notification */ - Entry = ExAllocatePoolWithTag( - NonPagedPool, - sizeof(PNP_NOTIFY_ENTRY), - TAG_PNP_NOTIFY); - if (!Entry) - { - DPRINT("ExAllocatePool() failed\n"); - ObDereferenceObject(DriverObject); - return STATUS_INSUFFICIENT_RESOURCES; - } - - if (EventCategory == EventCategoryDeviceInterfaceChange - && EventCategoryFlags & PNPNOTIFY_DEVICE_INTERFACE_INCLUDE_EXISTING_INTERFACES) - { - DEVICE_INTERFACE_CHANGE_NOTIFICATION NotificationInfos; - UNICODE_STRING SymbolicLinkU; - PWSTR SymbolicLink; - - Status = IoGetDeviceInterfaces( - (LPGUID)EventCategoryData, - NULL, /* PhysicalDeviceObject OPTIONAL */ - 0, /* Flags */ - &SymbolicLinkList); - if (!NT_SUCCESS(Status)) - { - DPRINT("IoGetDeviceInterfaces() failed with status 0x%08lx\n", Status); - ExFreePoolWithTag(Entry, TAG_PNP_NOTIFY); - ObDereferenceObject(DriverObject); - return Status; - } - /* Enumerate SymbolicLinkList */ - NotificationInfos.Version = 1; - NotificationInfos.Size = sizeof(DEVICE_INTERFACE_CHANGE_NOTIFICATION); - RtlCopyMemory(&NotificationInfos.Event, &GUID_DEVICE_INTERFACE_ARRIVAL, sizeof(GUID)); - RtlCopyMemory(&NotificationInfos.InterfaceClassGuid, EventCategoryData, sizeof(GUID)); - NotificationInfos.SymbolicLinkName = &SymbolicLinkU; - for (SymbolicLink = SymbolicLinkList; *SymbolicLink; SymbolicLink += wcslen(SymbolicLink) + 1) - { - RtlInitUnicodeString(&SymbolicLinkU, SymbolicLink); - DPRINT("Calling callback routine for %S\n", SymbolicLink); - (*CallbackRoutine)(&NotificationInfos, Context); - } - ExFreePool(SymbolicLinkList); - } - - Entry->PnpNotificationProc = CallbackRoutine; - Entry->EventCategory = EventCategory; - Entry->Context = Context; - switch (EventCategory) - { - case EventCategoryDeviceInterfaceChange: - { - Status = RtlStringFromGUID(EventCategoryData, &Entry->Guid); - if (!NT_SUCCESS(Status)) - { - ExFreePoolWithTag(Entry, TAG_PNP_NOTIFY); - ObDereferenceObject(DriverObject); - return Status; - } - break; - } - case EventCategoryHardwareProfileChange: - { - /* nothing to do */ - break; - } - case EventCategoryTargetDeviceChange: - { - Entry->FileObject = (PFILE_OBJECT)EventCategoryData; - break; - } - default: - { - DPRINT1("IoRegisterPlugPlayNotification(): unknown EventCategory 0x%x UNIMPLEMENTED\n", EventCategory); - break; - } - } - - KeAcquireGuardedMutex(&PnpNotifyListLock); - InsertHeadList(&PnpNotifyListHead, - &Entry->PnpNotifyList); - KeReleaseGuardedMutex(&PnpNotifyListLock); - - DPRINT("IoRegisterPlugPlayNotification() returns NotificationEntry %p\n", - Entry); - *NotificationEntry = Entry; - return STATUS_SUCCESS; -} - -/* - * @implemented - */ -NTSTATUS -STDCALL -IoUnregisterPlugPlayNotification( - IN PVOID NotificationEntry) -{ - PPNP_NOTIFY_ENTRY Entry; - - PAGED_CODE(); - - Entry = (PPNP_NOTIFY_ENTRY)NotificationEntry; - DPRINT("IoUnregisterPlugPlayNotification(NotificationEntry %p) called\n", - Entry); - - KeAcquireGuardedMutex(&PnpNotifyListLock); - RtlFreeUnicodeString(&Entry->Guid); - RemoveEntryList(&Entry->PnpNotifyList); - KeReleaseGuardedMutex(&PnpNotifyListLock); - - return STATUS_SUCCESS; -} - VOID IopNotifyPlugPlayNotification( IN PDEVICE_OBJECT DeviceObject, @@ -323,4 +160,166 @@ IopNotifyPlugPlayNotification( ExFreePoolWithTag(NotificationStructure, TAG_PNP_NOTIFY); } -/* EOF */ +/* PUBLIC FUNCTIONS **********************************************************/ + +/* + * @unimplemented + */ +ULONG +NTAPI +IoPnPDeliverServicePowerNotification(ULONG VetoedPowerOperation OPTIONAL, + ULONG PowerNotification, + ULONG Unknown OPTIONAL, + BOOLEAN Synchronous) +{ + UNIMPLEMENTED; + return 0; +} + +/* + * @implemented + */ +NTSTATUS +NTAPI +IoRegisterPlugPlayNotification(IN IO_NOTIFICATION_EVENT_CATEGORY EventCategory, + IN ULONG EventCategoryFlags, + IN PVOID EventCategoryData OPTIONAL, + IN PDRIVER_OBJECT DriverObject, + IN PDRIVER_NOTIFICATION_CALLBACK_ROUTINE CallbackRoutine, + IN PVOID Context, + OUT PVOID *NotificationEntry) +{ + PPNP_NOTIFY_ENTRY Entry; + PWSTR SymbolicLinkList; + NTSTATUS Status; + PAGED_CODE(); + + DPRINT("__FUNCTION__(EventCategory 0x%x, EventCategoryFlags 0x%lx, DriverObject %p) called.\n", + EventCategory, + EventCategoryFlags, + DriverObject); + + ObReferenceObject(DriverObject); + + /* Try to allocate entry for notification before sending any notification */ + Entry = ExAllocatePoolWithTag(NonPagedPool, + sizeof(PNP_NOTIFY_ENTRY), + TAG_PNP_NOTIFY); + + if (!Entry) + { + DPRINT("ExAllocatePool() failed\n"); + ObDereferenceObject(DriverObject); + return STATUS_INSUFFICIENT_RESOURCES; + } + + if (EventCategory == EventCategoryDeviceInterfaceChange && + EventCategoryFlags & PNPNOTIFY_DEVICE_INTERFACE_INCLUDE_EXISTING_INTERFACES) + { + DEVICE_INTERFACE_CHANGE_NOTIFICATION NotificationInfos; + UNICODE_STRING SymbolicLinkU; + PWSTR SymbolicLink; + + Status = IoGetDeviceInterfaces((LPGUID)EventCategoryData, + NULL, /* PhysicalDeviceObject OPTIONAL */ + 0, /* Flags */ + &SymbolicLinkList); + if (!NT_SUCCESS(Status)) + { + DPRINT("IoGetDeviceInterfaces() failed with status 0x%08lx\n", + Status); + ExFreePoolWithTag(Entry, TAG_PNP_NOTIFY); + ObDereferenceObject(DriverObject); + return Status; + } + + /* Enumerate SymbolicLinkList */ + NotificationInfos.Version = 1; + NotificationInfos.Size = sizeof(DEVICE_INTERFACE_CHANGE_NOTIFICATION); + RtlCopyMemory(&NotificationInfos.Event, + &GUID_DEVICE_INTERFACE_ARRIVAL, + sizeof(GUID)); + RtlCopyMemory(&NotificationInfos.InterfaceClassGuid, + EventCategoryData, + sizeof(GUID)); + NotificationInfos.SymbolicLinkName = &SymbolicLinkU; + + for (SymbolicLink = SymbolicLinkList; + *SymbolicLink; + SymbolicLink += wcslen(SymbolicLink) + 1) + { + RtlInitUnicodeString(&SymbolicLinkU, SymbolicLink); + DPRINT("Calling callback routine for %S\n", SymbolicLink); + (*CallbackRoutine)(&NotificationInfos, Context); + } + + ExFreePool(SymbolicLinkList); + } + + Entry->PnpNotificationProc = CallbackRoutine; + Entry->EventCategory = EventCategory; + Entry->Context = Context; + switch (EventCategory) + { + case EventCategoryDeviceInterfaceChange: + { + Status = RtlStringFromGUID(EventCategoryData, &Entry->Guid); + if (!NT_SUCCESS(Status)) + { + ExFreePoolWithTag(Entry, TAG_PNP_NOTIFY); + ObDereferenceObject(DriverObject); + return Status; + } + break; + } + case EventCategoryHardwareProfileChange: + { + /* nothing to do */ + break; + } + case EventCategoryTargetDeviceChange: + { + Entry->FileObject = (PFILE_OBJECT)EventCategoryData; + break; + } + default: + { + DPRINT1("__FUNCTION__(): unknown EventCategory 0x%x UNIMPLEMENTED\n", + EventCategory); + break; + } + } + + KeAcquireGuardedMutex(&PnpNotifyListLock); + InsertHeadList(&PnpNotifyListHead, + &Entry->PnpNotifyList); + KeReleaseGuardedMutex(&PnpNotifyListLock); + + DPRINT("IoRegisterPlugPlayNotification() returns NotificationEntry %p\n", + Entry); + + *NotificationEntry = Entry; + + return STATUS_SUCCESS; +} + +/* + * @implemented + */ +NTSTATUS +NTAPI +IoUnregisterPlugPlayNotification(IN PVOID NotificationEntry) +{ + PPNP_NOTIFY_ENTRY Entry; + PAGED_CODE(); + + Entry = (PPNP_NOTIFY_ENTRY)NotificationEntry; + DPRINT("__FUNCTION__(NotificationEntry %p) called\n", Entry); + + KeAcquireGuardedMutex(&PnpNotifyListLock); + RtlFreeUnicodeString(&Entry->Guid); + RemoveEntryList(&Entry->PnpNotifyList); + KeReleaseGuardedMutex(&PnpNotifyListLock); + + return STATUS_SUCCESS; +} diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpreport.c b/reactos/ntoskrnl/io/pnpmgr/pnpreport.c index 0e372b08b95..e11c4b0263e 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpreport.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpreport.c @@ -1,9 +1,8 @@ /* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/io/pnpreport.c - * PURPOSE: Device Changes Reporting functions - * + * PROJECT: ReactOS Kernel + * COPYRIGHT: GPL - See COPYING in the top level directory + * FILE: ntoskrnl/io/pnpmgr/pnpreport.c + * PURPOSE: Device Changes Reporting Functions * PROGRAMMERS: Filip Navara (xnavara@volny.cz) */ @@ -13,116 +12,127 @@ #define NDEBUG #include -/* FUNCTIONS *****************************************************************/ +/* PUBLIC FUNCTIONS **********************************************************/ /* * @implemented */ NTSTATUS -STDCALL -IoReportDetectedDevice( - IN PDRIVER_OBJECT DriverObject, - IN INTERFACE_TYPE LegacyBusType, - IN ULONG BusNumber, - IN ULONG SlotNumber, - IN PCM_RESOURCE_LIST ResourceList, - IN PIO_RESOURCE_REQUIREMENTS_LIST ResourceRequirements OPTIONAL, - IN BOOLEAN ResourceAssigned, - IN OUT PDEVICE_OBJECT *DeviceObject) +NTAPI +IoReportDetectedDevice(IN PDRIVER_OBJECT DriverObject, + IN INTERFACE_TYPE LegacyBusType, + IN ULONG BusNumber, + IN ULONG SlotNumber, + IN PCM_RESOURCE_LIST ResourceList, + IN PIO_RESOURCE_REQUIREMENTS_LIST ResourceRequirements OPTIONAL, + IN BOOLEAN ResourceAssigned, + IN OUT PDEVICE_OBJECT *DeviceObject OPTIONAL) { - PDEVICE_NODE DeviceNode; - PDEVICE_OBJECT Pdo; - NTSTATUS Status = STATUS_SUCCESS; + PDEVICE_NODE DeviceNode; + PDEVICE_OBJECT Pdo; + NTSTATUS Status = STATUS_SUCCESS; - DPRINT("IoReportDetectedDevice (DeviceObject %p, *DeviceObject %p)\n", - DeviceObject, DeviceObject ? *DeviceObject : NULL); + DPRINT("__FUNCTION__ (DeviceObject %p, *DeviceObject %p)\n", + DeviceObject, DeviceObject ? *DeviceObject : NULL); - /* if *DeviceObject is not NULL, we must use it as a PDO, - * and don't create a new one. - */ - if (DeviceObject && *DeviceObject) - Pdo = *DeviceObject; - else - { - UNICODE_STRING ServiceName; - ServiceName.Buffer = DriverObject->DriverName.Buffer + sizeof(DRIVER_ROOT_NAME) / sizeof(WCHAR) - 1; - ServiceName.Length = ServiceName.MaximumLength = DriverObject->DriverName.Length - sizeof(DRIVER_ROOT_NAME) + sizeof(WCHAR); - - /* create a new PDO and return it in *DeviceObject */ - Status = IopCreateDeviceNode(IopRootDeviceNode, NULL, &ServiceName, &DeviceNode); - if (!NT_SUCCESS(Status)) + /* if *DeviceObject is not NULL, we must use it as a PDO, and don't create a new one */ + if (DeviceObject && *DeviceObject) { - DPRINT("IopCreateDeviceNode() failed (Status 0x%08lx)\n", Status); - return Status; + Pdo = *DeviceObject; } - Pdo = DeviceNode->PhysicalDeviceObject; - if (DeviceObject) - *DeviceObject = Pdo; + else + { + UNICODE_STRING ServiceName; + ServiceName.Buffer = DriverObject->DriverName.Buffer + + sizeof(DRIVER_ROOT_NAME) / sizeof(WCHAR) - 1; + ServiceName.Length = DriverObject->DriverName.Length - + sizeof(DRIVER_ROOT_NAME) + sizeof(WCHAR); + ServiceName.MaximumLength = ServiceName.Length; + + /* create a new PDO and return it in *DeviceObject */ + Status = IopCreateDeviceNode(IopRootDeviceNode, + NULL, + &ServiceName, + &DeviceNode); + + if (!NT_SUCCESS(Status)) + { + DPRINT("IopCreateDeviceNode() failed (Status 0x%08lx)\n", Status); + return Status; + } + + Pdo = DeviceNode->PhysicalDeviceObject; + if (DeviceObject) *DeviceObject = Pdo; } - /* we don't need to call AddDevice and send IRP_MN_START_DEVICE */ - - return Status; + /* we don't need to call AddDevice and send IRP_MN_START_DEVICE */ + return Status; } /* * @unimplemented */ NTSTATUS -STDCALL -IoReportResourceForDetection( - IN PDRIVER_OBJECT DriverObject, - IN PCM_RESOURCE_LIST DriverList OPTIONAL, - IN ULONG DriverListSize OPTIONAL, - IN PDEVICE_OBJECT DeviceObject OPTIONAL, - IN PCM_RESOURCE_LIST DeviceList OPTIONAL, - IN ULONG DeviceListSize OPTIONAL, - OUT PBOOLEAN ConflictDetected) +NTAPI +IoReportResourceForDetection(IN PDRIVER_OBJECT DriverObject, + IN PCM_RESOURCE_LIST DriverList OPTIONAL, + IN ULONG DriverListSize OPTIONAL, + IN PDEVICE_OBJECT DeviceObject OPTIONAL, + IN PCM_RESOURCE_LIST DeviceList OPTIONAL, + IN ULONG DeviceListSize OPTIONAL, + OUT PBOOLEAN ConflictDetected) { - static int warned = 0; - if (!warned) - { - DPRINT1("IoReportResourceForDetection partly implemented\n"); - warned = 1; - } + static int warned = 0; + if (!warned) + { + DPRINT1("IoReportResourceForDetection partly implemented\n"); + warned = 1; + } - *ConflictDetected = FALSE; + *ConflictDetected = FALSE; - if (PopSystemPowerDeviceNode != NULL && DriverListSize > 0) - { - /* We hope legacy devices will be enumerated by ACPI */ - *ConflictDetected = TRUE; - return STATUS_CONFLICTING_ADDRESSES; - } - return STATUS_SUCCESS; + if (PopSystemPowerDeviceNode && DriverListSize > 0) + { + /* We hope legacy devices will be enumerated by ACPI */ + *ConflictDetected = TRUE; + return STATUS_CONFLICTING_ADDRESSES; + } + + return STATUS_SUCCESS; +} + +VOID +NTAPI +IopSetEvent(IN PVOID Context) +{ + PKEVENT Event = Context; + + /* Set the event */ + KeSetEvent(Event, IO_NO_INCREMENT, FALSE); } /* * @unimplemented */ NTSTATUS -STDCALL -IoReportTargetDeviceChange( - IN PDEVICE_OBJECT PhysicalDeviceObject, - IN PVOID NotificationStructure) +NTAPI +IoReportTargetDeviceChange(IN PDEVICE_OBJECT PhysicalDeviceObject, + IN PVOID NotificationStructure) { - DPRINT1("IoReportTargetDeviceChange called (UNIMPLEMENTED)\n"); - return STATUS_NOT_IMPLEMENTED; + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; } /* * @unimplemented */ NTSTATUS -STDCALL -IoReportTargetDeviceChangeAsynchronous( - IN PDEVICE_OBJECT PhysicalDeviceObject, - IN PVOID NotificationStructure, - IN PDEVICE_CHANGE_COMPLETE_CALLBACK Callback OPTIONAL, - IN PVOID Context OPTIONAL) +NTAPI +IoReportTargetDeviceChangeAsynchronous(IN PDEVICE_OBJECT PhysicalDeviceObject, + IN PVOID NotificationStructure, + IN PDEVICE_CHANGE_COMPLETE_CALLBACK Callback OPTIONAL, + IN PVOID Context OPTIONAL) { - DPRINT1("IoReportTargetDeviceChangeAsynchronous called (UNIMPLEMENTED)\n"); - return STATUS_NOT_IMPLEMENTED; + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; } - -/* EOF */ diff --git a/reactos/ntoskrnl/io/pnpmgr/pnproot.c b/reactos/ntoskrnl/io/pnpmgr/pnproot.c index af9d9cd67f9..d817f413426 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnproot.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnproot.c @@ -1,9 +1,8 @@ /* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/io/pnproot.c + * PROJECT: ReactOS Kernel + * COPYRIGHT: GPL - See COPYING in the top level directory + * FILE: ntoskrnl/io/pnpmgr/pnproot.c * PURPOSE: PnP manager root device - * * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net) * Copyright 2007 Hervй Poussineau (hpoussin@reactos.org) */ @@ -1135,5 +1134,3 @@ PnpRootDriverEntry( return STATUS_SUCCESS; } - -/* EOF */ From d94c54c3a77af715ec5714899dd5a81ed5e55bb9 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Mon, 18 Aug 2008 13:31:33 +0000 Subject: [PATCH 064/324] - Implement IoReportTargetDeviceChange as a wrapper around the unimplemented IoReportTargetDeviceChangeAsynchronous svn path=/trunk/; revision=35428 --- reactos/ntoskrnl/io/pnpmgr/pnpreport.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpreport.c b/reactos/ntoskrnl/io/pnpmgr/pnpreport.c index e11c4b0263e..d7b6d71bef2 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpreport.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpreport.c @@ -119,8 +119,27 @@ NTAPI IoReportTargetDeviceChange(IN PDEVICE_OBJECT PhysicalDeviceObject, IN PVOID NotificationStructure) { - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; + KEVENT Event; + NTSTATUS Status; + + /* Initialize the event */ + KeInitializeEvent(&Event, NotificationEvent, FALSE); + + /* Call the asynchronous version */ + Status = IoReportTargetDeviceChangeAsynchronous(PhysicalDeviceObject, + NotificationStructure, + IopClearEvent, + &Event); + + /* Only wait if we succeeded */ + if (NT_SUCCESS(Status)) + { + /* Wait for it to complete */ + KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL); + } + + /* Return status */ + return Status; } /* From 183d54b37711aeacd6819db9a6c4bc606df6d146 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Mon, 18 Aug 2008 13:33:40 +0000 Subject: [PATCH 065/324] - Fix a typo (and build) svn path=/trunk/; revision=35429 --- reactos/ntoskrnl/io/pnpmgr/pnpreport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpreport.c b/reactos/ntoskrnl/io/pnpmgr/pnpreport.c index d7b6d71bef2..d967e66609a 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpreport.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpreport.c @@ -128,7 +128,7 @@ IoReportTargetDeviceChange(IN PDEVICE_OBJECT PhysicalDeviceObject, /* Call the asynchronous version */ Status = IoReportTargetDeviceChangeAsynchronous(PhysicalDeviceObject, NotificationStructure, - IopClearEvent, + IopSetEvent, &Event); /* Only wait if we succeeded */ From f4d87f01ffdadf8a969b472bcd159cf8227cfe9f Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Mon, 18 Aug 2008 13:35:52 +0000 Subject: [PATCH 066/324] - Missed a STDCALL -> NTAPI svn path=/trunk/; revision=35430 --- reactos/ntoskrnl/io/pnpmgr/pnproot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/io/pnpmgr/pnproot.c b/reactos/ntoskrnl/io/pnpmgr/pnproot.c index d817f413426..3742ad85d92 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnproot.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnproot.c @@ -1062,7 +1062,7 @@ PnpRootPnpControl( } NTSTATUS -STDCALL +NTAPI PnpRootAddDevice( IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT PhysicalDeviceObject) From e6bc2154e342eb516c9160b735e0b85769a8444b Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Mon, 18 Aug 2008 14:08:22 +0000 Subject: [PATCH 067/324] Implement the "Add users to a group" function. svn path=/trunk/; revision=35432 --- reactos/dll/cpl/usrmgr/groupprops.c | 269 ++++++++++++++++++++++++++- reactos/dll/cpl/usrmgr/lang/en-US.rc | 6 +- 2 files changed, 267 insertions(+), 8 deletions(-) diff --git a/reactos/dll/cpl/usrmgr/groupprops.c b/reactos/dll/cpl/usrmgr/groupprops.c index 78b7a055a0b..ac30a280c00 100644 --- a/reactos/dll/cpl/usrmgr/groupprops.c +++ b/reactos/dll/cpl/usrmgr/groupprops.c @@ -60,6 +60,252 @@ GetTextSid(PSID pSid, } +static VOID +InitGroupMembersList(HWND hwndDlg, + PGENERAL_GROUP_DATA pGroupData) +{ + HWND hwndLV; + LV_COLUMN column; + RECT rect; + TCHAR szStr[32]; + HIMAGELIST hImgList; + HICON hIcon; + + NET_API_STATUS netStatus; + PUSER_INFO_20 pUserBuffer; + DWORD entriesread; + DWORD totalentries; + DWORD resume_handle = 0; + DWORD i; + LV_ITEM lvi; + INT iItem; + + hwndLV = GetDlgItem(hwndDlg, IDC_USER_ADD_MEMBERSHIP_LIST); + GetClientRect(hwndLV, &rect); + + hImgList = ImageList_Create(16,16,ILC_COLOR8 | ILC_MASK,5,5); + hIcon = LoadImage(hApplet,MAKEINTRESOURCE(IDI_GROUP),IMAGE_ICON,16,16,LR_DEFAULTCOLOR); + ImageList_AddIcon(hImgList,hIcon); + DestroyIcon(hIcon); + hIcon = LoadImage(hApplet, MAKEINTRESOURCE(IDI_USER), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR); + ImageList_AddIcon(hImgList, hIcon); + DestroyIcon(hIcon); + hIcon = LoadImage(hApplet, MAKEINTRESOURCE(IDI_LOCKED_USER), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR); + ImageList_AddIcon(hImgList, hIcon); + DestroyIcon(hIcon); + + (void)ListView_SetImageList(hwndLV, hImgList, LVSIL_SMALL); + (void)ListView_SetExtendedListViewStyle(hwndLV, LVS_EX_FULLROWSELECT); + + memset(&column, 0x00, sizeof(column)); + column.mask = LVCF_FMT | LVCF_WIDTH | LVCF_SUBITEM | LVCF_TEXT; + column.fmt = LVCFMT_LEFT; + column.cx = (INT)((rect.right - rect.left) * 0.40); + column.iSubItem = 0; + LoadString(hApplet, IDS_NAME, szStr, sizeof(szStr) / sizeof(szStr[0])); + column.pszText = szStr; + (void)ListView_InsertColumn(hwndLV, 0, &column); + + column.cx = (INT)((rect.right - rect.left) * 0.60); + column.iSubItem = 1; + LoadString(hApplet, IDS_DESCRIPTION, szStr, sizeof(szStr) / sizeof(szStr[0])); + column.pszText = szStr; + (void)ListView_InsertColumn(hwndLV, 1, &column); + + /* TODO: Enumerate global groups and add them to the list! */ + + for (;;) + { + netStatus = NetUserEnum(NULL, 20, FILTER_NORMAL_ACCOUNT, + (LPBYTE*)&pUserBuffer, + 1024, &entriesread, + &totalentries, &resume_handle); + if (netStatus != NERR_Success && netStatus != ERROR_MORE_DATA) + break; + + for (i = 0; i < entriesread; i++) + { + memset(&lvi, 0x00, sizeof(lvi)); + lvi.mask = LVIF_TEXT | LVIF_STATE | LVIF_IMAGE; + lvi.pszText = pUserBuffer[i].usri20_name; + lvi.state = 0; + lvi.iImage = (pUserBuffer[i].usri20_flags & UF_ACCOUNTDISABLE) ? 2 : 1; + iItem = ListView_InsertItem(hwndLV, &lvi); + + ListView_SetItemText(hwndLV, iItem, 1, + pUserBuffer[i].usri20_full_name); + + ListView_SetItemText(hwndLV, iItem, 2, + pUserBuffer[i].usri20_comment); + } + + NetApiBufferFree(&pUserBuffer); + + /* No more data left */ + if (netStatus != ERROR_MORE_DATA) + break; + } +} + + +static BOOL +AddSelectedUsersToGroup(HWND hwndDlg, + PGENERAL_GROUP_DATA pGroupData) +{ + HWND hwndLV; + INT nSelectedItems; + INT nItem; + TCHAR szUserName[UNLEN]; + BOOL bResult = FALSE; + LOCALGROUP_MEMBERS_INFO_3 memberInfo; + NET_API_STATUS status; + + hwndLV = GetDlgItem(hwndDlg, IDC_USER_ADD_MEMBERSHIP_LIST); + + nSelectedItems = ListView_GetSelectedCount(hwndLV); + if (nSelectedItems > 0) + { + nItem = ListView_GetNextItem(hwndLV, -1, LVNI_SELECTED); + while (nItem != -1) + { + /* Get the new user name */ + ListView_GetItemText(hwndLV, + nItem, 0, + szUserName, + UNLEN); + + DebugPrintf(_TEXT("Selected user: %s"), szUserName); + + memberInfo.lgrmi3_domainandname = szUserName; + + status = NetLocalGroupAddMembers(NULL, pGroupData->szGroupName, 3, + (LPBYTE)&memberInfo, 1); + if (status != NERR_Success && status != ERROR_MEMBER_IN_ALIAS) + { + TCHAR szText[256]; + wsprintf(szText, TEXT("Error: %u"), status); + MessageBox(NULL, szText, TEXT("NetLocalGroupAddMembers"), MB_ICONERROR | MB_OK); + } + else + { + bResult = TRUE; + } + + nItem = ListView_GetNextItem(hwndLV, nItem, LVNI_SELECTED); + } + } + + return bResult; +} + + +INT_PTR CALLBACK +AddUsersToGroupDlgProc(HWND hwndDlg, + UINT uMsg, + WPARAM wParam, + LPARAM lParam) +{ + PGENERAL_GROUP_DATA pGroupData; + + UNREFERENCED_PARAMETER(wParam); + + pGroupData = (PGENERAL_GROUP_DATA)GetWindowLongPtr(hwndDlg, DWLP_USER); + + switch (uMsg) + { + case WM_INITDIALOG: + pGroupData = (PGENERAL_GROUP_DATA)lParam; + SetWindowLongPtr(hwndDlg, DWLP_USER, (INT_PTR)pGroupData); + InitGroupMembersList(hwndDlg, pGroupData); + break; + + case WM_COMMAND: + switch (LOWORD(wParam)) + { + case IDOK: + if (AddSelectedUsersToGroup(hwndDlg, pGroupData)) + EndDialog(hwndDlg, IDOK); + else + EndDialog(hwndDlg, IDCANCEL); + break; + + case IDCANCEL: + EndDialog(hwndDlg, IDCANCEL); + break; + } + break; + + default: + return FALSE; + } + + return TRUE; +} + + +static VOID +AddUsersToGroup(HWND hwndDlg, + PGENERAL_GROUP_DATA pGroupData) +{ + HWND hwndLV; +// NET_API_STATUS status; + PLOCALGROUP_MEMBERS_INFO_1 membersInfo = NULL; + DWORD dwRead; + DWORD dwTotal; + DWORD_PTR resumeHandle = 0; + DWORD i; + LV_ITEM lvi; + TCHAR szGroupName[256]; + + if (DialogBoxParam(hApplet, + MAKEINTRESOURCE(IDD_USER_ADD_MEMBERSHIP), + hwndDlg, + AddUsersToGroupDlgProc, + (LPARAM)pGroupData) == IDOK) + { + hwndLV = GetDlgItem(hwndDlg, IDC_GROUP_GENERAL_MEMBERS); + + (void)ListView_DeleteAllItems(hwndLV); + +// DebugPrintf(_T("Removed all users from the list!")); + + /* Set group members */ + NetLocalGroupGetMembers(NULL, pGroupData->szGroupName, 1, (LPBYTE*)&membersInfo, + MAX_PREFERRED_LENGTH, &dwRead, &dwTotal, + &resumeHandle); + + for (i = 0; i < dwRead; i++) + { + ZeroMemory(&lvi, sizeof(lvi)); + lvi.mask = LVIF_TEXT | LVIF_STATE | LVIF_IMAGE; + lvi.pszText = membersInfo[i].lgrmi1_name; + lvi.state = 0; + lvi.iImage = (membersInfo[i].lgrmi1_sidusage == SidTypeGroup || + membersInfo[i].lgrmi1_sidusage == SidTypeWellKnownGroup) ? 1 : 0; + + if (membersInfo[i].lgrmi1_sidusage == SidTypeWellKnownGroup) + { + TCHAR szSid[256]; + + GetTextSid(membersInfo[i].lgrmi1_sid, szSid); + + wsprintf(szGroupName, + TEXT("%s (%s)"), + membersInfo[i].lgrmi1_name, + szSid); + + lvi.pszText = szGroupName; + } + + + (void)ListView_InsertItem(hwndLV, &lvi); + } + + NetApiBufferFree(membersInfo); + } +} + + static VOID RemoveUserFromGroup(HWND hwndDlg, PGENERAL_GROUP_DATA pGroupData) @@ -161,11 +407,12 @@ GetGeneralGroupData(HWND hwndDlg, /* Create the image list */ hImgList = ImageList_Create(16, 16, ILC_COLOR8 | ILC_MASK, 5, 5); - hIcon = LoadImage(hApplet, MAKEINTRESOURCE(IDI_USER), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR); - ImageList_AddIcon(hImgList, hIcon); hIcon = LoadImage(hApplet, MAKEINTRESOURCE(IDI_GROUP), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR); ImageList_AddIcon(hImgList, hIcon); DestroyIcon(hIcon); + hIcon = LoadImage(hApplet, MAKEINTRESOURCE(IDI_USER), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR); + ImageList_AddIcon(hImgList, hIcon); + DestroyIcon(hIcon); (void)ListView_SetImageList(hwndLV, hImgList, LVSIL_SMALL); @@ -198,8 +445,16 @@ GetGeneralGroupData(HWND hwndDlg, lvi.mask = LVIF_TEXT | LVIF_STATE | LVIF_IMAGE; lvi.pszText = membersInfo[i].lgrmi1_name; lvi.state = 0; - lvi.iImage = (membersInfo[i].lgrmi1_sidusage == SidTypeGroup || - membersInfo[i].lgrmi1_sidusage == SidTypeWellKnownGroup) ? 1 : 0; + if (membersInfo[i].lgrmi1_sidusage == SidTypeGroup || + membersInfo[i].lgrmi1_sidusage == SidTypeWellKnownGroup) + { + lvi.iImage = 0; + } + else if (membersInfo[i].lgrmi1_sidusage == SidTypeUser) + { + /* FIXME: handle locked user properly! */ + lvi.iImage = 1; + } if (membersInfo[i].lgrmi1_sidusage == SidTypeWellKnownGroup) { @@ -208,7 +463,7 @@ GetGeneralGroupData(HWND hwndDlg, GetTextSid(membersInfo[i].lgrmi1_sid, szSid); wsprintf(szGroupName, - TEXT("%s\\%s (%s)"), + TEXT("%s (%s)"), membersInfo[i].lgrmi1_name, szSid); @@ -295,6 +550,10 @@ GroupGeneralPageProc(HWND hwndDlg, PropSheet_Changed(GetParent(hwndDlg), hwndDlg); break; + case IDC_GROUP_GENERAL_ADD: + AddUsersToGroup(hwndDlg, pGroupData); + break; + case IDC_GROUP_GENERAL_REMOVE: RemoveUserFromGroup(hwndDlg, pGroupData); break; diff --git a/reactos/dll/cpl/usrmgr/lang/en-US.rc b/reactos/dll/cpl/usrmgr/lang/en-US.rc index 88ef2e8aea9..1c33618ae8c 100644 --- a/reactos/dll/cpl/usrmgr/lang/en-US.rc +++ b/reactos/dll/cpl/usrmgr/lang/en-US.rc @@ -99,7 +99,7 @@ BEGIN LTEXT "Members:", -1, 7, 63, 45, 8 CONTROL "", IDC_GROUP_GENERAL_MEMBERS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 7, 74, 238, 117, WS_EX_CLIENTEDGE - PUSHBUTTON "Add...", IDC_GROUP_GENERAL_ADD, 7, 197, 50, 14, WS_DISABLED + PUSHBUTTON "Add...", IDC_GROUP_GENERAL_ADD, 7, 197, 50, 14 PUSHBUTTON "Remove", IDC_GROUP_GENERAL_REMOVE, 61, 197, 50, 14, WS_DISABLED END @@ -164,8 +164,8 @@ BEGIN LTEXT "Member of:", -1, 7, 7, 56, 8 CONTROL "", IDC_USER_ADD_MEMBERSHIP_LIST, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 7, 18, 238, 173, WS_EX_CLIENTEDGE - DEFPUSHBUTTON "OK",IDOK,156,197,50,14 - PUSHBUTTON "Cancel",IDCANCEL,210,197,50,14 + DEFPUSHBUTTON "OK",IDOK,141,197,50,14 + PUSHBUTTON "Cancel",IDCANCEL,195,197,50,14 END From f7972be7d15f9891cc586dcd7067d4f3ac36be2a Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Mon, 18 Aug 2008 17:05:31 +0000 Subject: [PATCH 068/324] - Replace the remaining X86_EFLAGS* with EFLAGS_* - Add missing EFLAGS_* to NDK svn path=/trunk/; revision=35433 --- reactos/include/ndk/i386/ketypes.h | 3 ++ reactos/ntoskrnl/include/internal/i386/ke.h | 36 --------------------- reactos/ntoskrnl/kdbg/kdb.c | 24 +++++++------- reactos/ntoskrnl/ke/i386/cpu.c | 4 +-- 4 files changed, 17 insertions(+), 50 deletions(-) diff --git a/reactos/include/ndk/i386/ketypes.h b/reactos/include/ndk/i386/ketypes.h index d165f72c924..6ad6aeba6ff 100644 --- a/reactos/include/ndk/i386/ketypes.h +++ b/reactos/include/ndk/i386/ketypes.h @@ -88,11 +88,14 @@ Author: #define EFLAGS_TF 0x100L #define EFLAGS_INTERRUPT_MASK 0x200L #define EFLAGS_DF 0x400L +#define EFLAGS_IOPL 0x3000L #define EFLAGS_NESTED_TASK 0x4000L +#define EFLAGS_RF 0x10000 #define EFLAGS_V86_MASK 0x20000 #define EFLAGS_ALIGN_CHECK 0x40000 #define EFLAGS_VIF 0x80000 #define EFLAGS_VIP 0x100000 +#define EFLAGS_ID 0x200000 #define EFLAGS_USER_SANITIZE 0x3F4DD7 #define EFLAG_SIGN 0x8000 #define EFLAG_ZERO 0x4000 diff --git a/reactos/ntoskrnl/include/internal/i386/ke.h b/reactos/ntoskrnl/include/internal/i386/ke.h index 64d1c1310fc..cd4eddfacb0 100644 --- a/reactos/ntoskrnl/include/internal/i386/ke.h +++ b/reactos/ntoskrnl/include/internal/i386/ke.h @@ -5,42 +5,6 @@ #pragma GCC system_header #endif -#define X86_EFLAGS_TF 0x00000100 /* Trap flag */ -#define X86_EFLAGS_IF 0x00000200 /* Interrupt Enable flag */ -#define X86_EFLAGS_IOPL 0x00003000 /* I/O Privilege Level bits */ -#define X86_EFLAGS_NT 0x00004000 /* Nested Task flag */ -#define X86_EFLAGS_RF 0x00010000 /* Resume flag */ -#define X86_EFLAGS_VM 0x00020000 /* Virtual Mode */ -#define X86_EFLAGS_ID 0x00200000 /* CPUID detection flag */ - -#define X86_CR0_PE 0x00000001 /* enable Protected Mode */ -#define X86_CR0_NE 0x00000020 /* enable native FPU error reporting */ -#define X86_CR0_TS 0x00000008 /* enable exception on FPU instruction for task switch */ -#define X86_CR0_EM 0x00000004 /* enable FPU emulation (disable FPU) */ -#define X86_CR0_MP 0x00000002 /* enable FPU monitoring */ -#define X86_CR0_WP 0x00010000 /* enable Write Protect (copy on write) */ -#define X86_CR0_PG 0x80000000 /* enable Paging */ - -#define X86_CR4_PAE 0x00000020 /* enable physical address extensions */ -#define X86_CR4_PGE 0x00000080 /* enable global pages */ -#define X86_CR4_OSFXSR 0x00000200 /* enable FXSAVE/FXRSTOR instructions */ -#define X86_CR4_OSXMMEXCPT 0x00000400 /* enable #XF exception */ - -#define X86_FEATURE_VME 0x00000002 /* Virtual 8086 Extensions are present */ -#define X86_FEATURE_TSC 0x00000010 /* time stamp counters are present */ -#define X86_FEATURE_PAE 0x00000040 /* physical address extension is present */ -#define X86_FEATURE_CX8 0x00000100 /* CMPXCHG8B instruction present */ -#define X86_FEATURE_SYSCALL 0x00000800 /* SYSCALL/SYSRET support present */ -#define X86_FEATURE_PGE 0x00002000 /* Page Global Enable */ -#define X86_FEATURE_MMX 0x00800000 /* MMX extension present */ -#define X86_FEATURE_FXSR 0x01000000 /* FXSAVE/FXRSTOR instructions present */ -#define X86_FEATURE_SSE 0x02000000 /* SSE extension present */ -#define X86_FEATURE_SSE2 0x04000000 /* SSE2 extension present */ -#define X86_FEATURE_HT 0x10000000 /* Hyper-Threading present */ - -#define X86_EXT_FEATURE_SSE3 0x00000001 /* SSE3 extension present */ -#define X86_EXT_FEATURE_3DNOW 0x40000000 /* 3DNOW! extension present */ - #define FRAME_EDITED 0xFFF8 #ifndef __ASM__ diff --git a/reactos/ntoskrnl/kdbg/kdb.c b/reactos/ntoskrnl/kdbg/kdb.c index 2973c50a39b..cbe4b9a72eb 100644 --- a/reactos/ntoskrnl/kdbg/kdb.c +++ b/reactos/ntoskrnl/kdbg/kdb.c @@ -1349,7 +1349,7 @@ KdbEnterDebuggerException( else if (BreakPoint->Type == KdbBreakPointTemporary && BreakPoint->Process == KdbCurrentProcess) { - ASSERT((TrapFrame->EFlags & X86_EFLAGS_TF) == 0); + ASSERT((TrapFrame->EFlags & EFLAGS_TF) == 0); /* * Delete the temporary breakpoint which was used to step over or into the instruction. @@ -1361,7 +1361,7 @@ KdbEnterDebuggerException( if ((KdbSingleStepOver && !KdbpStepOverInstruction(TrapFrame->Eip)) || (!KdbSingleStepOver && !KdbpStepIntoInstruction(TrapFrame->Eip))) { - Context->EFlags |= X86_EFLAGS_TF; + Context->EFlags |= EFLAGS_TF; } goto continue_execution; /* return */ } @@ -1377,7 +1377,7 @@ KdbEnterDebuggerException( BreakPoint->Type == KdbBreakPointTemporary) { ASSERT(ExceptionCode == STATUS_BREAKPOINT); - Context->EFlags |= X86_EFLAGS_TF; + Context->EFlags |= EFLAGS_TF; KdbBreakPointToReenable = BreakPoint; } @@ -1450,30 +1450,30 @@ KdbEnterDebuggerException( /* Unset TF if we are no longer single stepping. */ if (KdbNumSingleSteps == 0) - Context->EFlags &= ~X86_EFLAGS_TF; + Context->EFlags &= ~EFLAGS_TF; goto continue_execution; /* return */ } /* Check if we expect a single step */ if ((TrapFrame->Dr6 & 0xf) == 0 && KdbNumSingleSteps > 0) { - /*ASSERT((Context->Eflags & X86_EFLAGS_TF) != 0);*/ + /*ASSERT((Context->Eflags & EFLAGS_TF) != 0);*/ if (--KdbNumSingleSteps > 0) { if ((KdbSingleStepOver && KdbpStepOverInstruction(TrapFrame->Eip)) || (!KdbSingleStepOver && KdbpStepIntoInstruction(TrapFrame->Eip))) { - Context->EFlags &= ~X86_EFLAGS_TF; + Context->EFlags &= ~EFLAGS_TF; } else { - Context->EFlags |= X86_EFLAGS_TF; + Context->EFlags |= EFLAGS_TF; } goto continue_execution; /* return */ } else { - Context->EFlags &= ~X86_EFLAGS_TF; + Context->EFlags &= ~EFLAGS_TF; KdbEnteredOnSingleStep = TRUE; } } @@ -1574,12 +1574,12 @@ KdbEnterDebuggerException( if ((KdbSingleStepOver && KdbpStepOverInstruction(KdbCurrentTrapFrame->Tf.Eip)) || (!KdbSingleStepOver && KdbpStepIntoInstruction(KdbCurrentTrapFrame->Tf.Eip))) { - ASSERT((KdbCurrentTrapFrame->Tf.EFlags & X86_EFLAGS_TF) == 0); - /*KdbCurrentTrapFrame->Tf.EFlags &= ~X86_EFLAGS_TF;*/ + ASSERT((KdbCurrentTrapFrame->Tf.EFlags & EFLAGS_TF) == 0); + /*KdbCurrentTrapFrame->Tf.EFlags &= ~EFLAGS_TF;*/ } else { - Context->EFlags |= X86_EFLAGS_TF; + Context->EFlags |= EFLAGS_TF; } } @@ -1608,7 +1608,7 @@ continue_execution: /* Set the RF flag so we don't trigger the same breakpoint again. */ if (Resume) { - TrapFrame->EFlags |= X86_EFLAGS_RF; + TrapFrame->EFlags |= EFLAGS_RF; } /* Clear dr6 status flags. */ diff --git a/reactos/ntoskrnl/ke/i386/cpu.c b/reactos/ntoskrnl/ke/i386/cpu.c index c2bf0afc12b..3e5aa136a47 100644 --- a/reactos/ntoskrnl/ke/i386/cpu.c +++ b/reactos/ntoskrnl/ke/i386/cpu.c @@ -127,7 +127,7 @@ KiSetProcessorType(VOID) Ke386SaveFlags(EFlags); /* XOR out the ID bit and update EFlags */ - NewEFlags = EFlags ^ X86_EFLAGS_ID; + NewEFlags = EFlags ^ EFLAGS_ID; Ke386RestoreFlags(NewEFlags); /* Get them back and see if they were modified */ @@ -135,7 +135,7 @@ KiSetProcessorType(VOID) if (NewEFlags != EFlags) { /* The modification worked, so CPUID exists. Set the ID Bit again. */ - EFlags |= X86_EFLAGS_ID; + EFlags |= EFLAGS_ID; Ke386RestoreFlags(EFlags); /* Peform CPUID 0 to see if CPUID 1 is supported */ From eccf1ea8b551b16e305c2f5b073c30c392311bbc Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Mon, 18 Aug 2008 17:07:09 +0000 Subject: [PATCH 069/324] - Remove broken IoReportTargetDeviceChange implementation on Alex's request svn path=/trunk/; revision=35434 --- reactos/ntoskrnl/io/pnpmgr/pnpreport.c | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpreport.c b/reactos/ntoskrnl/io/pnpmgr/pnpreport.c index d967e66609a..e11c4b0263e 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpreport.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpreport.c @@ -119,27 +119,8 @@ NTAPI IoReportTargetDeviceChange(IN PDEVICE_OBJECT PhysicalDeviceObject, IN PVOID NotificationStructure) { - KEVENT Event; - NTSTATUS Status; - - /* Initialize the event */ - KeInitializeEvent(&Event, NotificationEvent, FALSE); - - /* Call the asynchronous version */ - Status = IoReportTargetDeviceChangeAsynchronous(PhysicalDeviceObject, - NotificationStructure, - IopSetEvent, - &Event); - - /* Only wait if we succeeded */ - if (NT_SUCCESS(Status)) - { - /* Wait for it to complete */ - KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL); - } - - /* Return status */ - return Status; + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; } /* From 290c90788a3f802ca0c153eacc57eb28ef863fd4 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Mon, 18 Aug 2008 17:38:38 +0000 Subject: [PATCH 070/324] - Fix freeldr build svn path=/trunk/; revision=35435 --- reactos/boot/freeldr/freeldr/arch/i386/loader.c | 2 +- reactos/boot/freeldr/freeldr/include/freeldr.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/reactos/boot/freeldr/freeldr/arch/i386/loader.c b/reactos/boot/freeldr/freeldr/arch/i386/loader.c index 5b02add3707..8877b656388 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/loader.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/loader.c @@ -96,7 +96,7 @@ FrLdrSetupPae(ULONG Magic) __writecr3(PageDirectoryBaseAddress); /* Enable Paging and Write Protect*/ - __writecr0(__readcr0() | X86_CR0_PG | X86_CR0_WP); + __writecr0(__readcr0() | CR0_PG | CR0_WP); /* Jump to Kernel */ (*KernelEntryPoint)(Magic, &LoaderBlock); diff --git a/reactos/boot/freeldr/freeldr/include/freeldr.h b/reactos/boot/freeldr/freeldr/include/freeldr.h index 4b891514aa2..216b2e2a4a0 100644 --- a/reactos/boot/freeldr/freeldr/include/freeldr.h +++ b/reactos/boot/freeldr/freeldr/include/freeldr.h @@ -47,6 +47,7 @@ #include #include /* NDK, needed for ReactOS/Windows loaders */ +#include #include #include #include From 2546d4ddc67c498c0abaf2b7979791b049fdc865 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Mon, 18 Aug 2008 22:24:45 +0000 Subject: [PATCH 071/324] - add 3 resource strings svn path=/trunk/; revision=35437 --- reactos/dll/win32/shell32/lang/bg-BG.rc | 3 +++ reactos/dll/win32/shell32/lang/ca-ES.rc | 3 +++ reactos/dll/win32/shell32/lang/cs-CZ.rc | 3 +++ reactos/dll/win32/shell32/lang/da-DK.rc | 3 +++ reactos/dll/win32/shell32/lang/de-DE.rc | 3 +++ reactos/dll/win32/shell32/lang/el-GR.rc | 3 +++ reactos/dll/win32/shell32/lang/en-GB.rc | 3 +++ reactos/dll/win32/shell32/lang/en-US.rc | 3 +++ reactos/dll/win32/shell32/lang/es-ES.rc | 3 +++ reactos/dll/win32/shell32/lang/fi-FI.rc | 3 +++ reactos/dll/win32/shell32/lang/fr-FR.rc | 3 +++ reactos/dll/win32/shell32/lang/hu-HU.rc | 3 +++ reactos/dll/win32/shell32/lang/it-IT.rc | 3 +++ reactos/dll/win32/shell32/lang/ja-JP.rc | 3 +++ reactos/dll/win32/shell32/lang/ko-KR.rc | 3 +++ reactos/dll/win32/shell32/lang/nl-NL.rc | 3 +++ reactos/dll/win32/shell32/lang/no-NO.rc | 3 +++ reactos/dll/win32/shell32/lang/pl-PL.rc | 3 +++ reactos/dll/win32/shell32/lang/pt-BR.rc | 3 +++ reactos/dll/win32/shell32/lang/pt-PT.rc | 3 +++ reactos/dll/win32/shell32/lang/ru-RU.rc | 3 +++ reactos/dll/win32/shell32/lang/sk-SK.rc | 3 +++ reactos/dll/win32/shell32/lang/sl-SI.rc | 3 +++ reactos/dll/win32/shell32/lang/sv-SE.rc | 3 +++ reactos/dll/win32/shell32/lang/tr-TR.rc | 3 +++ reactos/dll/win32/shell32/lang/uk-UA.rc | 3 +++ reactos/dll/win32/shell32/lang/zh-CN.rc | 3 +++ reactos/dll/win32/shell32/lang/zh-TW.rc | 3 +++ reactos/dll/win32/shell32/shresdef.h | 3 +++ 29 files changed, 87 insertions(+) diff --git a/reactos/dll/win32/shell32/lang/bg-BG.rc b/reactos/dll/win32/shell32/lang/bg-BG.rc index 157cb2bc975..c6942c72caf 100644 --- a/reactos/dll/win32/shell32/lang/bg-BG.rc +++ b/reactos/dll/win32/shell32/lang/bg-BG.rc @@ -641,6 +641,9 @@ BEGIN IDS_PROPERTIES "&Свойства" IDS_CUT "Из&рязване" IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" IDS_CREATEFOLDER_DENIED "Създаването на нова папка е невъзможно: недостатъчни права." IDS_CREATEFOLDER_CAPTION "Грешка при създаване на нова папка" diff --git a/reactos/dll/win32/shell32/lang/ca-ES.rc b/reactos/dll/win32/shell32/lang/ca-ES.rc index 3a936b28ee4..6626a801e8e 100644 --- a/reactos/dll/win32/shell32/lang/ca-ES.rc +++ b/reactos/dll/win32/shell32/lang/ca-ES.rc @@ -638,6 +638,9 @@ BEGIN IDS_PROPERTIES "Properties" IDS_CUT "Cut" IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" IDS_CREATEFOLDER_DENIED "Unable to create new Folder: Permission denied." IDS_CREATEFOLDER_CAPTION "Error during creation of a new folder" diff --git a/reactos/dll/win32/shell32/lang/cs-CZ.rc b/reactos/dll/win32/shell32/lang/cs-CZ.rc index e6bae703209..c70abea1d04 100644 --- a/reactos/dll/win32/shell32/lang/cs-CZ.rc +++ b/reactos/dll/win32/shell32/lang/cs-CZ.rc @@ -640,6 +640,9 @@ BEGIN IDS_PROPERTIES "&Vlastnosti" IDS_CUT "Vyj&mout" IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" IDS_CREATEFOLDER_DENIED "Nelze vytvoшit novou sloћku, protoћe pшнstup byl odepшen." IDS_CREATEFOLDER_CAPTION "Chyba pшi pokusu vytvoшit novэ adresбш" diff --git a/reactos/dll/win32/shell32/lang/da-DK.rc b/reactos/dll/win32/shell32/lang/da-DK.rc index 89f821bc0f6..f67714caa08 100644 --- a/reactos/dll/win32/shell32/lang/da-DK.rc +++ b/reactos/dll/win32/shell32/lang/da-DK.rc @@ -638,6 +638,9 @@ BEGIN IDS_PROPERTIES "Properties" IDS_CUT "Cut" IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" IDS_CREATEFOLDER_DENIED "Unable to create new Folder: Permission denied." IDS_CREATEFOLDER_CAPTION "Error during creation of a new folder" diff --git a/reactos/dll/win32/shell32/lang/de-DE.rc b/reactos/dll/win32/shell32/lang/de-DE.rc index a314c26288f..ff1e520637b 100644 --- a/reactos/dll/win32/shell32/lang/de-DE.rc +++ b/reactos/dll/win32/shell32/lang/de-DE.rc @@ -643,6 +643,9 @@ BEGIN IDS_PROPERTIES "Eigenschaften" IDS_CUT "Ausschneiden" IDS_RESTORE "Wiederherstellen" + IDS_FORMATDRIVE "Formatieren..." + IDS_RENAME "Umbenennen" + IDS_INSERT "Einfьgen" IDS_CREATEFOLDER_DENIED "Es konnte kein neues Verzeichnis erstellt werden: Zugriff verweigert." IDS_CREATEFOLDER_CAPTION "Es trat ein Fehler beim Erstellen eines neuen Verzeichnisses auf." diff --git a/reactos/dll/win32/shell32/lang/el-GR.rc b/reactos/dll/win32/shell32/lang/el-GR.rc index 0adcae6b957..f1c6212ccc1 100644 --- a/reactos/dll/win32/shell32/lang/el-GR.rc +++ b/reactos/dll/win32/shell32/lang/el-GR.rc @@ -639,6 +639,9 @@ BEGIN IDS_PROPERTIES "&Йдйьфзфет" IDS_CUT "Б&рпкпрЮ" IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" IDS_CREATEFOLDER_DENIED "Ден Юфбн дхнбфЮ з дзмйпхсгЯб фпх цбкЭлпх: Ден ерйфсЭрефбй з рсьувбуз." IDS_CREATEFOLDER_CAPTION "УцЬлмб кбфЬ фзн дзмйпхсгЯб нЭпх цбкЭлпх" diff --git a/reactos/dll/win32/shell32/lang/en-GB.rc b/reactos/dll/win32/shell32/lang/en-GB.rc index 77fc8cea583..e1ef5e6f918 100644 --- a/reactos/dll/win32/shell32/lang/en-GB.rc +++ b/reactos/dll/win32/shell32/lang/en-GB.rc @@ -638,6 +638,9 @@ BEGIN IDS_PROPERTIES "Properties" IDS_CUT "C&ut" IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" IDS_CREATEFOLDER_DENIED "Unable to create new Folder: Permission denied." IDS_CREATEFOLDER_CAPTION "Error during creation of a new folder" diff --git a/reactos/dll/win32/shell32/lang/en-US.rc b/reactos/dll/win32/shell32/lang/en-US.rc index e29ed9b1c4c..4e9047fc2df 100644 --- a/reactos/dll/win32/shell32/lang/en-US.rc +++ b/reactos/dll/win32/shell32/lang/en-US.rc @@ -639,6 +639,9 @@ BEGIN IDS_PROPERTIES "Properties" IDS_CUT "Cut" IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" IDS_CREATEFOLDER_DENIED "Unable to create new Folder: Permission denied." IDS_CREATEFOLDER_CAPTION "Error during creation of a new folder" diff --git a/reactos/dll/win32/shell32/lang/es-ES.rc b/reactos/dll/win32/shell32/lang/es-ES.rc index 08c2a8a4a5e..214fc23c44b 100644 --- a/reactos/dll/win32/shell32/lang/es-ES.rc +++ b/reactos/dll/win32/shell32/lang/es-ES.rc @@ -641,6 +641,9 @@ BEGIN IDS_PROPERTIES "&Propiedades" IDS_CUT "C&ortar" IDS_RESTORE "Restaurar" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" IDS_CREATEFOLDER_DENIED "No se puede crear nueva carpeta: Permiso denegado." IDS_CREATEFOLDER_CAPTION "Error durante la creaciуn de una nueva carpeta" diff --git a/reactos/dll/win32/shell32/lang/fi-FI.rc b/reactos/dll/win32/shell32/lang/fi-FI.rc index 61e4fea3b88..66ddaa22b47 100644 --- a/reactos/dll/win32/shell32/lang/fi-FI.rc +++ b/reactos/dll/win32/shell32/lang/fi-FI.rc @@ -638,6 +638,9 @@ BEGIN IDS_PROPERTIES "&Ominaisuudet" IDS_CUT "&Leikkaa" IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" IDS_CREATEFOLDER_DENIED "Uutta kansiota ei voitu luoda: Oikeudet eivдt riitд." IDS_CREATEFOLDER_CAPTION "Virhe luotaessa uutta kansiota" diff --git a/reactos/dll/win32/shell32/lang/fr-FR.rc b/reactos/dll/win32/shell32/lang/fr-FR.rc index e430f878187..8e3342d6549 100644 --- a/reactos/dll/win32/shell32/lang/fr-FR.rc +++ b/reactos/dll/win32/shell32/lang/fr-FR.rc @@ -642,6 +642,9 @@ BEGIN IDS_PROPERTIES "&Propriйtйs" IDS_CUT "C&ouper" IDS_RESTORE "Res&taurer" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" IDS_CREATEFOLDER_DENIED "Impossible de crйer le nouveau dossier : permission refusйe." IDS_CREATEFOLDER_CAPTION "Erreur lors de la crйation du nouveau dossier" diff --git a/reactos/dll/win32/shell32/lang/hu-HU.rc b/reactos/dll/win32/shell32/lang/hu-HU.rc index 76ceb0958a1..a56e952742c 100644 --- a/reactos/dll/win32/shell32/lang/hu-HU.rc +++ b/reactos/dll/win32/shell32/lang/hu-HU.rc @@ -641,6 +641,9 @@ BEGIN IDS_PROPERTIES "Tulajdonsбgok" IDS_CUT "Kivбgбs" IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" IDS_CREATEFOLDER_DENIED "Nem hozhatу lйtre ъj mappa: Nincs hozzб engedйlyed." IDS_CREATEFOLDER_CAPTION "Hiba a mappa lйtrehozбsakor" diff --git a/reactos/dll/win32/shell32/lang/it-IT.rc b/reactos/dll/win32/shell32/lang/it-IT.rc index 3f57ce26027..521541881e7 100644 --- a/reactos/dll/win32/shell32/lang/it-IT.rc +++ b/reactos/dll/win32/shell32/lang/it-IT.rc @@ -639,6 +639,9 @@ BEGIN IDS_PROPERTIES "&Proprietа" IDS_CUT "&Taglia" IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" IDS_CREATEFOLDER_DENIED "Impossibile creare la cartella: Accesso negato." IDS_CREATEFOLDER_CAPTION "Errore durante la creazione della cartella" diff --git a/reactos/dll/win32/shell32/lang/ja-JP.rc b/reactos/dll/win32/shell32/lang/ja-JP.rc index a9d540556d8..db24d649ddf 100644 --- a/reactos/dll/win32/shell32/lang/ja-JP.rc +++ b/reactos/dll/win32/shell32/lang/ja-JP.rc @@ -638,6 +638,9 @@ BEGIN IDS_PROPERTIES "Properties" IDS_CUT "Cut" IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" IDS_CREATEFOLDER_DENIED "ђV‚µ‚ўѓtѓHѓ‹ѓ_‚рЌмђ¬‚Е‚«‚Ь‚№‚с‚Е‚µ‚Ѕ: ѓAѓNѓZѓXЊ ‚Є‚ ‚и‚Ь‚№‚сЃB" IDS_CREATEFOLDER_CAPTION "ђV‚µ‚ўѓtѓHѓ‹ѓ_‚МЌмђ¬’†‚ЙѓGѓ‰Ѓ[‚Є”­ђ¶‚µ‚Ь‚µ‚Ѕ" diff --git a/reactos/dll/win32/shell32/lang/ko-KR.rc b/reactos/dll/win32/shell32/lang/ko-KR.rc index 6a21cc08345..4244428718b 100644 --- a/reactos/dll/win32/shell32/lang/ko-KR.rc +++ b/reactos/dll/win32/shell32/lang/ko-KR.rc @@ -638,6 +638,9 @@ BEGIN IDS_PROPERTIES "Properties" IDS_CUT "Cut" IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" IDS_CREATEFOLDER_DENIED "Unable to create new Folder: Permission denied." IDS_CREATEFOLDER_CAPTION "Error during creation of a new folder" diff --git a/reactos/dll/win32/shell32/lang/nl-NL.rc b/reactos/dll/win32/shell32/lang/nl-NL.rc index 74730fe8e16..8f63cb2c2aa 100644 --- a/reactos/dll/win32/shell32/lang/nl-NL.rc +++ b/reactos/dll/win32/shell32/lang/nl-NL.rc @@ -638,6 +638,9 @@ BEGIN IDS_PROPERTIES "Properties" IDS_CUT "Cut" IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" IDS_CREATEFOLDER_DENIED "Unable to create new Folder: Permission denied." IDS_CREATEFOLDER_CAPTION "Error during creation of a new folder" diff --git a/reactos/dll/win32/shell32/lang/no-NO.rc b/reactos/dll/win32/shell32/lang/no-NO.rc index 5b13e36d74d..c3b13ef4d5a 100644 --- a/reactos/dll/win32/shell32/lang/no-NO.rc +++ b/reactos/dll/win32/shell32/lang/no-NO.rc @@ -617,6 +617,9 @@ BEGIN IDS_PROPERTIES "Egenska&per" IDS_CUT "Klipp &ut" IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" IDS_CREATEFOLDER_DENIED "Kunne ikke opprette ny mappe: tilgang nektet." IDS_CREATEFOLDER_CAPTION "Klarte ikke opprette ny mappe" diff --git a/reactos/dll/win32/shell32/lang/pl-PL.rc b/reactos/dll/win32/shell32/lang/pl-PL.rc index 6a2649cfe20..cac26705dfc 100644 --- a/reactos/dll/win32/shell32/lang/pl-PL.rc +++ b/reactos/dll/win32/shell32/lang/pl-PL.rc @@ -645,6 +645,9 @@ BEGIN IDS_PROPERTIES "Wіaњciwoњci" IDS_CUT "Wytnij" IDS_RESTORE "Przywrуж" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" IDS_CREATEFOLDER_DENIED "Nie mogк utworzyж nowego katalogu: Brak dostкpu." IDS_CREATEFOLDER_CAPTION "Bі№d przy tworzeniu nowego katalogu." diff --git a/reactos/dll/win32/shell32/lang/pt-BR.rc b/reactos/dll/win32/shell32/lang/pt-BR.rc index 3fbe8a012fc..3f66ce4e004 100644 --- a/reactos/dll/win32/shell32/lang/pt-BR.rc +++ b/reactos/dll/win32/shell32/lang/pt-BR.rc @@ -640,6 +640,9 @@ BEGIN IDS_PROPERTIES "Propriedades" IDS_CUT "C&ortar" IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" IDS_CREATEFOLDER_DENIED "Nгo pode criar nova pasta: Permissгo negada." IDS_CREATEFOLDER_CAPTION "Erro durante a criaзгo da nova pasta" diff --git a/reactos/dll/win32/shell32/lang/pt-PT.rc b/reactos/dll/win32/shell32/lang/pt-PT.rc index cb5add298fb..5ca01e8f812 100644 --- a/reactos/dll/win32/shell32/lang/pt-PT.rc +++ b/reactos/dll/win32/shell32/lang/pt-PT.rc @@ -640,6 +640,9 @@ BEGIN IDS_PROPERTIES "Properties" IDS_CUT "Cut" IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" IDS_CREATEFOLDER_DENIED "Nгo й possнvel criar nova pasta: Permissгo negada." IDS_CREATEFOLDER_CAPTION "Erro durante a criaзгo da nova pasta" diff --git a/reactos/dll/win32/shell32/lang/ru-RU.rc b/reactos/dll/win32/shell32/lang/ru-RU.rc index c3a5c2fd0d8..0ed228f1c13 100644 --- a/reactos/dll/win32/shell32/lang/ru-RU.rc +++ b/reactos/dll/win32/shell32/lang/ru-RU.rc @@ -638,6 +638,9 @@ BEGIN IDS_PROPERTIES "Свойства" IDS_CUT "Вырезать" IDS_RESTORE "Востановить" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" IDS_CREATEFOLDER_DENIED "Невозможно создать папку - нет полномочий." IDS_CREATEFOLDER_CAPTION "Ошибка во время создания папки" diff --git a/reactos/dll/win32/shell32/lang/sk-SK.rc b/reactos/dll/win32/shell32/lang/sk-SK.rc index 293a62ba8c1..880be7e0111 100644 --- a/reactos/dll/win32/shell32/lang/sk-SK.rc +++ b/reactos/dll/win32/shell32/lang/sk-SK.rc @@ -644,6 +644,9 @@ BEGIN IDS_PROPERTIES "Vl&astnosti" IDS_CUT "&Vystrihnъќ" IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" IDS_CREATEFOLDER_DENIED "Nie je moћnй vytvoriќ novэ prieиinok: Prнstup zamietnutэ." IDS_CREATEFOLDER_CAPTION "Chyba poиas vytvбrania novйho prieиinka" diff --git a/reactos/dll/win32/shell32/lang/sl-SI.rc b/reactos/dll/win32/shell32/lang/sl-SI.rc index c86677f9d6e..1b3b79358c8 100644 --- a/reactos/dll/win32/shell32/lang/sl-SI.rc +++ b/reactos/dll/win32/shell32/lang/sl-SI.rc @@ -638,6 +638,9 @@ BEGIN IDS_PROPERTIES "Properties" IDS_CUT "Cut" IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" IDS_CREATEFOLDER_DENIED "Unable to create new Folder: Permission denied." IDS_CREATEFOLDER_CAPTION "Error during creation of a new folder" diff --git a/reactos/dll/win32/shell32/lang/sv-SE.rc b/reactos/dll/win32/shell32/lang/sv-SE.rc index a976b19d103..9b8e0e2d4b7 100644 --- a/reactos/dll/win32/shell32/lang/sv-SE.rc +++ b/reactos/dll/win32/shell32/lang/sv-SE.rc @@ -638,6 +638,9 @@ BEGIN IDS_PROPERTIES "Properties" IDS_CUT "Cut" IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" IDS_CREATEFOLDER_DENIED "Unable to create new Folder: Permission denied." IDS_CREATEFOLDER_CAPTION "Error during creation of a new folder" diff --git a/reactos/dll/win32/shell32/lang/tr-TR.rc b/reactos/dll/win32/shell32/lang/tr-TR.rc index c6491701507..dd50639a734 100644 --- a/reactos/dll/win32/shell32/lang/tr-TR.rc +++ b/reactos/dll/win32/shell32/lang/tr-TR.rc @@ -638,6 +638,9 @@ BEGIN IDS_PROPERTIES "&Цzellikler" IDS_CUT "&Kes" IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" IDS_CREATEFOLDER_DENIED "Yeni dizin oluюturulamэyor: Eriюim engellendi." IDS_CREATEFOLDER_CAPTION "Dizin oluюturma sэrasэnda hata" diff --git a/reactos/dll/win32/shell32/lang/uk-UA.rc b/reactos/dll/win32/shell32/lang/uk-UA.rc index beb561be144..d01b29db63d 100644 --- a/reactos/dll/win32/shell32/lang/uk-UA.rc +++ b/reactos/dll/win32/shell32/lang/uk-UA.rc @@ -639,6 +639,9 @@ BEGIN IDS_PROPERTIES "В&ластивості" IDS_CUT "&Вирізати" IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" IDS_CREATEFOLDER_DENIED "Не вдалося створити нову папку: Відмова у доступі." IDS_CREATEFOLDER_CAPTION "Помилка при створенні нової папки" diff --git a/reactos/dll/win32/shell32/lang/zh-CN.rc b/reactos/dll/win32/shell32/lang/zh-CN.rc index 33f63d4a063..9c221ea72d4 100644 --- a/reactos/dll/win32/shell32/lang/zh-CN.rc +++ b/reactos/dll/win32/shell32/lang/zh-CN.rc @@ -627,6 +627,9 @@ BEGIN IDS_PROPERTIES "КфРФ(&P)" IDS_CUT "јфЗР(&U)" IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" IDS_CREATEFOLDER_DENIED "Unable to create new Folder: Permission denied." IDS_CREATEFOLDER_CAPTION "Error during creation of a new folder" diff --git a/reactos/dll/win32/shell32/lang/zh-TW.rc b/reactos/dll/win32/shell32/lang/zh-TW.rc index 9b5fbb06d60..24561281463 100644 --- a/reactos/dll/win32/shell32/lang/zh-TW.rc +++ b/reactos/dll/win32/shell32/lang/zh-TW.rc @@ -639,6 +639,9 @@ BEGIN IDS_PROPERTIES "Properties" IDS_CUT "Cut" IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" IDS_CREATEFOLDER_DENIED "Unable to create new Folder: Permission denied." IDS_CREATEFOLDER_CAPTION "Error during creation of a new folder" diff --git a/reactos/dll/win32/shell32/shresdef.h b/reactos/dll/win32/shell32/shresdef.h index dbc22559301..b6215514009 100644 --- a/reactos/dll/win32/shell32/shresdef.h +++ b/reactos/dll/win32/shell32/shresdef.h @@ -162,6 +162,9 @@ #define IDS_RESTORE 324 #define IDS_DEFAULT_CLUSTER_SIZE 325 #define IDS_ADMINISTRATIVETOOLS 326 +#define IDS_FORMATDRIVE 327 +#define IDS_RENAME 328 +#define IDS_INSERT 329 /* Note: this string is referenced from the registry */ #define IDS_RECYCLEBIN_FOLDER_NAME 8964 From eaee8097aa907cc3a48d214818de4ca85d256b0d Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Tue, 19 Aug 2008 00:04:53 +0000 Subject: [PATCH 072/324] - rewrite ISFHelper_CopyItems to actually copy the items when requested - should fix copy&paste of files in explorer (Directories are not yet supported) svn path=/trunk/; revision=35440 --- reactos/dll/win32/shell32/shfldr_fs.c | 84 +++++++++++++++++++-------- 1 file changed, 60 insertions(+), 24 deletions(-) diff --git a/reactos/dll/win32/shell32/shfldr_fs.c b/reactos/dll/win32/shell32/shfldr_fs.c index 4046bb2e1a2..b7ac4deedaf 100644 --- a/reactos/dll/win32/shell32/shfldr_fs.c +++ b/reactos/dll/win32/shell32/shfldr_fs.c @@ -1269,39 +1269,75 @@ static HRESULT WINAPI ISFHelper_fnCopyItems (ISFHelper * iface, IShellFolder * pSFFrom, UINT cidl, LPCITEMIDLIST * apidl) { - UINT i; IPersistFolder2 *ppf2 = NULL; - char szSrcPath[MAX_PATH], - szDstPath[MAX_PATH]; + WCHAR szSrcPath[MAX_PATH]; + WCHAR szTargetPath[MAX_PATH]; + SHFILEOPSTRUCTW op; + LPITEMIDLIST pidl; + LPWSTR pszSrc, pszTarget; + int res; + IGenericSFImpl *This = impl_from_ISFHelper(iface); TRACE ("(%p)->(%p,%u,%p)\n", This, pSFFrom, cidl, apidl); - IShellFolder_QueryInterface (pSFFrom, &IID_IPersistFolder2, - (LPVOID *) & ppf2); - if (ppf2) { - LPITEMIDLIST pidl; - - if (SUCCEEDED (IPersistFolder2_GetCurFolder (ppf2, &pidl))) { - for (i = 0; i < cidl; i++) { - SHGetPathFromIDListA (pidl, szSrcPath); - PathAddBackslashA (szSrcPath); - _ILSimpleGetText (apidl[i], szSrcPath + strlen (szSrcPath), - MAX_PATH); - - if (!WideCharToMultiByte(CP_ACP, 0, This->sPathTarget, -1, szDstPath, MAX_PATH, NULL, NULL)) - szDstPath[0] = '\0'; - PathAddBackslashA (szDstPath); - _ILSimpleGetText (apidl[i], szDstPath + strlen (szDstPath), - MAX_PATH); - MESSAGE ("would copy %s to %s\n", szSrcPath, szDstPath); - } - SHFree (pidl); + IShellFolder_QueryInterface (pSFFrom, &IID_IPersistFolder2, (LPVOID *) & ppf2); + if (ppf2) + { + if (FAILED(IPersistFolder2_GetCurFolder (ppf2, &pidl))) + { + IPersistFolder2_Release(ppf2); + return E_FAIL; } + + if (!SHGetPathFromIDListW (pidl, szSrcPath)) + { + SHFree (pidl); + IPersistFolder2_Release (ppf2); + return E_FAIL; + } + pszSrc = PathAddBackslashW (szSrcPath); + wcscpy(szTargetPath, This->sPathTarget); + pszTarget = PathAddBackslashW (szTargetPath); + + pszSrc = build_paths_list(szSrcPath, cidl, apidl); + pszTarget = build_paths_list(szTargetPath, cidl, apidl); + + if (!pszSrc || !pszTarget) + { + if (pszSrc) + HeapFree(GetProcessHeap(), 0, pszSrc); + + if (pszTarget) + HeapFree(GetProcessHeap(), 0, pszTarget); + + SHFree (pidl); + IPersistFolder2_Release (ppf2); + return E_OUTOFMEMORY; + } + + ZeroMemory(&op, sizeof(op)); + op.hwnd = GetActiveWindow(); + op.wFunc = FO_COPY; + op.pFrom = pszSrc; + op.pTo = pszTarget; + op.fFlags = FOF_ALLOWUNDO; + + res = SHFileOperationW(&op); + + HeapFree(GetProcessHeap(), 0, pszSrc); + HeapFree(GetProcessHeap(), 0, pszTarget); + + SHFree (pidl); IPersistFolder2_Release (ppf2); + + if (res) + return E_FAIL; + else + return S_OK; } - return S_OK; + return E_FAIL; } static const ISFHelperVtbl shvt = From 7d8e94151cbadb0d01c980d81768f8003dc71ff4 Mon Sep 17 00:00:00 2001 From: Art Yerkes Date: Tue, 19 Aug 2008 06:06:43 +0000 Subject: [PATCH 073/324] Merge aicom-network-fixes up to 35446. I (arty) modified the new printing in msafd to be conditional, so as not to be accused of causing unnecessary spew. svn path=/trunk/; revision=35447 --- reactos/dll/win32/msafd/misc/dllmain.c | 10 ++++++---- reactos/drivers/network/afd/afd/connect.c | 7 +++++-- reactos/drivers/network/afd/afd/info.c | 17 +++++++++++++---- reactos/drivers/network/afd/afd/listen.c | 13 ++++++------- reactos/drivers/network/afd/afd/lock.c | 2 +- reactos/drivers/network/afd/afd/read.c | 2 +- reactos/drivers/network/afd/afd/select.c | 16 ++++++++-------- reactos/drivers/network/afd/afd/tdi.c | 2 +- reactos/include/ddk/tdikrnl.h | 2 +- .../drivers/ip/transport/datagram/datagram.c | 1 + 10 files changed, 43 insertions(+), 29 deletions(-) diff --git a/reactos/dll/win32/msafd/misc/dllmain.c b/reactos/dll/win32/msafd/misc/dllmain.c index 4c520e132af..1343c99a936 100644 --- a/reactos/dll/win32/msafd/misc/dllmain.c +++ b/reactos/dll/win32/msafd/misc/dllmain.c @@ -285,10 +285,12 @@ DWORD MsafdReturnWithErrno( NTSTATUS Status, LPINT Errno, DWORD Received, if( ReturnedBytes ) *ReturnedBytes = Received; break; case STATUS_END_OF_FILE: *Errno = WSAESHUTDOWN; break; case STATUS_PENDING: *Errno = WSA_IO_PENDING; break; - case STATUS_BUFFER_OVERFLOW: *Errno = WSAEMSGSIZE; break; - case STATUS_INSUFFICIENT_RESOURCES: *Errno = WSA_NOT_ENOUGH_MEMORY; break; - case STATUS_INVALID_CONNECTION: *Errno = WSAEAFNOSUPPORT; break; - case STATUS_REMOTE_NOT_LISTENING: *Errno = WSAECONNRESET; break; + case STATUS_BUFFER_OVERFLOW: AFD_DbgPrint(MID_TRACE,("MSAFD: STATUS_BUFFER_TOO_SMALL/STATUS_BUFFER_OVERFLOW\n")); *Errno = WSAEMSGSIZE; break; + case STATUS_NO_MEMORY: /* Fall through to STATUS_INSUFFICIENT_RESOURCES */ + case STATUS_INSUFFICIENT_RESOURCES: AFD_DbgPrint(MID_TRACE,("MSAFD: STATUS_NO_MEMORY/STATUS_INSUFFICIENT_RESOURCES\n")); *Errno = WSA_NOT_ENOUGH_MEMORY; break; + case STATUS_INVALID_CONNECTION: AFD_DbgPrint(MID_TRACE,("MSAFD: STATUS_INVALID_CONNECTION\n")); *Errno = WSAEAFNOSUPPORT; break; + case STATUS_REMOTE_NOT_LISTENING: AFD_DbgPrint(MID_TRACE, ("MSAFD: STATUS_REMOTE_NOT_LISTENING\n")); *Errno = WSAECONNRESET; break; + case STATUS_FILE_CLOSED: AFD_DbgPrint(MID_TRACE, ("MSAFD: STATUS_FILE_CLOSED\n")); *Errno = WSAENOTSOCK; break; default: DbgPrint("MSAFD: Error %x is unknown\n", Status); *Errno = WSAEINVAL; break; diff --git a/reactos/drivers/network/afd/afd/connect.c b/reactos/drivers/network/afd/afd/connect.c index 77d9f0aa94a..ff55ef8ea2b 100644 --- a/reactos/drivers/network/afd/afd/connect.c +++ b/reactos/drivers/network/afd/afd/connect.c @@ -77,7 +77,7 @@ static NTSTATUS NTAPI StreamSocketConnectComplete /* I was wrong about this before as we can have pending writes to a not * yet connected socket */ - if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); + if( !SocketAcquireStateLock( FCB ) ) return STATUS_FILE_CLOSED; AFD_DbgPrint(MID_TRACE,("Irp->IoStatus.Status = %x\n", Irp->IoStatus.Status)); @@ -108,7 +108,10 @@ static NTSTATUS NTAPI StreamSocketConnectComplete if( NT_SUCCESS(Status) ) { Status = MakeSocketIntoConnection( FCB ); - if( !NT_SUCCESS(Status) ) return Status; + if( !NT_SUCCESS(Status) ) { + SocketStateUnlock( FCB ); + return Status; + } if( !IsListEmpty( &FCB->PendingIrpList[FUNCTION_SEND] ) ) { NextIrpEntry = RemoveHeadList(&FCB->PendingIrpList[FUNCTION_SEND]); diff --git a/reactos/drivers/network/afd/afd/info.c b/reactos/drivers/network/afd/afd/info.c index 5e233ef80a2..231ce6a8d18 100644 --- a/reactos/drivers/network/afd/afd/info.c +++ b/reactos/drivers/network/afd/afd/info.c @@ -125,12 +125,20 @@ AfdGetSockOrPeerName( PDEVICE_OBJECT DeviceObject, PIRP Irp, } if( SysMdl ) { - MmBuildMdlForNonPagedPool( SysMdl ); + _SEH_TRY { + MmProbeAndLockPages( SysMdl, Irp->RequestorMode, IoModifyAccess ); + } _SEH_HANDLE { + AFD_DbgPrint(MIN_TRACE, ("MmProbeAndLockPages() failed.\n")); + Status = _SEH_GetExceptionCode(); + } _SEH_END; + } else Status = STATUS_NO_MEMORY; + + if( NT_SUCCESS(Status) ) { Status = TdiQueryInformation ( FCB->AddressFile.Object, TDI_QUERY_CONNECTION_INFO, SysMdl ); - } else Status = STATUS_NO_MEMORY; + } if( NT_SUCCESS(Status) ) { TransAddr = @@ -142,14 +150,15 @@ AfdGetSockOrPeerName( PDEVICE_OBJECT DeviceObject, PIRP Irp, RtlCopyMemory( TransAddr, ConnInfo->RemoteAddress, TaLengthOfTransportAddress ( ConnInfo->RemoteAddress ) ); + else Status = STATUS_INSUFFICIENT_RESOURCES; if( ConnInfo ) ExFreePool( ConnInfo ); if( SysMdl ) IoFreeMdl( SysMdl ); if( TransAddr ) MmUnmapLockedPages( TransAddr, Mdl ); + MmUnlockPages( Mdl ); + IoFreeMdl( Mdl ); } - /* MmUnlockPages( Mdl ); */ } - /* IoFreeMdl( Mdl ); */ } else { Status = STATUS_INSUFFICIENT_RESOURCES; } diff --git a/reactos/drivers/network/afd/afd/listen.c b/reactos/drivers/network/afd/afd/listen.c index fbd73b97479..0d3d26a7590 100644 --- a/reactos/drivers/network/afd/afd/listen.c +++ b/reactos/drivers/network/afd/afd/listen.c @@ -83,20 +83,19 @@ static NTSTATUS NTAPI ListenComplete ( PDEVICE_OBJECT DeviceObject, PIRP Irp, PVOID Context ) { - NTSTATUS Status = STATUS_UNSUCCESSFUL; + NTSTATUS Status = STATUS_FILE_CLOSED; PAFD_FCB FCB = (PAFD_FCB)Context; PAFD_TDI_OBJECT_QELT Qelt; - if ( Irp->Cancel ) { - /* FIXME: is this anything else we need to do? */ - FCB->ListenIrp.InFlightRequest = NULL; - return STATUS_SUCCESS; - } - if( !SocketAcquireStateLock( FCB ) ) return Status; FCB->ListenIrp.InFlightRequest = NULL; + if( Irp->Cancel ) { + SocketStateUnlock( FCB ); + return STATUS_SUCCESS; + } + if( FCB->State == SOCKET_STATE_CLOSED ) { SocketStateUnlock( FCB ); DestroySocket( FCB ); diff --git a/reactos/drivers/network/afd/afd/lock.c b/reactos/drivers/network/afd/afd/lock.c index d63fb56a2b8..9858b59d8ad 100644 --- a/reactos/drivers/network/afd/afd/lock.c +++ b/reactos/drivers/network/afd/afd/lock.c @@ -262,7 +262,7 @@ NTSTATUS NTAPI UnlockAndMaybeComplete NTSTATUS LostSocket( PIRP Irp ) { - NTSTATUS Status = STATUS_INVALID_PARAMETER; + NTSTATUS Status = STATUS_FILE_CLOSED; AFD_DbgPrint(MIN_TRACE,("Called.\n")); Irp->IoStatus.Information = 0; Irp->IoStatus.Status = Status; diff --git a/reactos/drivers/network/afd/afd/read.c b/reactos/drivers/network/afd/afd/read.c index 05f723ba9c2..048678c0e76 100644 --- a/reactos/drivers/network/afd/afd/read.c +++ b/reactos/drivers/network/afd/afd/read.c @@ -449,7 +449,7 @@ PacketSocketRecvComplete( AFD_DbgPrint(MID_TRACE,("Called on %x\n", FCB)); - if( !SocketAcquireStateLock( FCB ) ) return STATUS_UNSUCCESSFUL; + if( !SocketAcquireStateLock( FCB ) ) return STATUS_FILE_CLOSED; FCB->ReceiveIrp.InFlightRequest = NULL; diff --git a/reactos/drivers/network/afd/afd/select.c b/reactos/drivers/network/afd/afd/select.c index 1888340cd3d..82788123cde 100644 --- a/reactos/drivers/network/afd/afd/select.c +++ b/reactos/drivers/network/afd/afd/select.c @@ -277,6 +277,10 @@ AfdEventSelect( PDEVICE_OBJECT DeviceObject, PIRP Irp, (PAFD_EVENT_SELECT_INFO)LockRequest( Irp, IrpSp ); PAFD_FCB FCB = FileObject->FsContext; + if( !SocketAcquireStateLock( FCB ) ) { + return LostSocket( Irp ); + } + if ( !EventSelectInfo ) { return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, 0, NULL ); @@ -285,10 +289,6 @@ AfdEventSelect( PDEVICE_OBJECT DeviceObject, PIRP Irp, EventSelectInfo->EventObject, EventSelectInfo->Events)); - if( !SocketAcquireStateLock( FCB ) ) { - return LostSocket( Irp ); - } - FCB->EventSelectTriggers = FCB->EventsFired = 0; if( FCB->EventSelect ) ObDereferenceObject( FCB->EventSelect ); FCB->EventSelect = NULL; @@ -325,15 +325,15 @@ AfdEnumEvents( PDEVICE_OBJECT DeviceObject, PIRP Irp, AFD_DbgPrint(MID_TRACE,("Called (FCB %x)\n", FCB)); + if( !SocketAcquireStateLock( FCB ) ) { + return LostSocket( Irp ); + } + if ( !EnumReq ) { return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, 0, NULL ); } - if( !SocketAcquireStateLock( FCB ) ) { - return LostSocket( Irp ); - } - EnumReq->PollEvents = FCB->PollState; RtlZeroMemory( EnumReq->EventStatus, sizeof(EnumReq->EventStatus) ); diff --git a/reactos/drivers/network/afd/afd/tdi.c b/reactos/drivers/network/afd/afd/tdi.c index a80452d2284..c4501f1842c 100644 --- a/reactos/drivers/network/afd/afd/tdi.c +++ b/reactos/drivers/network/afd/afd/tdi.c @@ -608,7 +608,7 @@ NTSTATUS TdiQueryInformation( KeInitializeEvent(&Event, NotificationEvent, FALSE); - Irp = TdiBuildInternalDeviceControlIrp(IOCTL_TCP_QUERY_INFORMATION, /* Sub function */ + Irp = TdiBuildInternalDeviceControlIrp(TDI_QUERY_INFORMATION, /* Sub function */ DeviceObject, /* Device object */ ConnectionObject, /* File object */ &Event, /* Event */ diff --git a/reactos/include/ddk/tdikrnl.h b/reactos/include/ddk/tdikrnl.h index ef55f4ab93b..b0f05dd0752 100644 --- a/reactos/include/ddk/tdikrnl.h +++ b/reactos/include/ddk/tdikrnl.h @@ -577,7 +577,7 @@ TdiDefaultSendPossibleHandler( IrpSubFunction, DeviceObject, \ FileObject, Event, IoStatusBlock) \ IoBuildDeviceIoControlRequest( \ - 0x00000003, DeviceObject, \ + IrpSubFunction, DeviceObject, \ NULL, 0, NULL, 0, \ TRUE, Event, IoStatusBlock) diff --git a/reactos/lib/drivers/ip/transport/datagram/datagram.c b/reactos/lib/drivers/ip/transport/datagram/datagram.c index c26c56b3eef..0b701338075 100644 --- a/reactos/lib/drivers/ip/transport/datagram/datagram.c +++ b/reactos/lib/drivers/ip/transport/datagram/datagram.c @@ -177,6 +177,7 @@ VOID DGDeliverData( } else { + TcpipReleaseSpinLock(&AddrFile->Lock, OldIrql); TI_DbgPrint(MAX_TRACE, ("Discarding datagram.\n")); } From 524d084d4d019291a123aa93c4579b742473c969 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Tue, 19 Aug 2008 08:34:42 +0000 Subject: [PATCH 074/324] - Read class name from Software\Microsoft\Windows\CurrentVersion\Explorer\CLSID when available. Custom names like renamed MyComputer or MyDocuments are stored here svn path=/trunk/; revision=35448 --- reactos/dll/win32/shell32/classes.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/reactos/dll/win32/shell32/classes.c b/reactos/dll/win32/shell32/classes.c index 9b85d4efa2e..20e17594f90 100644 --- a/reactos/dll/win32/shell32/classes.c +++ b/reactos/dll/win32/shell32/classes.c @@ -345,15 +345,28 @@ BOOL HCR_GetClassNameW(REFIID riid, LPWSTR szDest, DWORD len) HKEY hkey; BOOL ret = FALSE; DWORD buflen = len; + WCHAR szName[100]; + LPOLESTR pStr; - szDest[0] = 0; - if (HCR_RegOpenClassIDKey(riid, &hkey)) + szDest[0] = 0; + + if (StringFromCLSID(riid, &pStr) == S_OK) { - static const WCHAR wszLocalizedString[] = - { 'L','o','c','a','l','i','z','e','d','S','t','r','i','n','g', 0 }; - if (!RegLoadMUIStringW(hkey, wszLocalizedString, szDest, len, NULL, 0, NULL) || + DWORD dwLen = buflen * sizeof(WCHAR); + swprintf(szName, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\CLSID\\%s", pStr); + if (RegGetValueW(HKEY_CURRENT_USER, szName, NULL, RRF_RT_REG_SZ, NULL, (PVOID)szDest, &dwLen) == ERROR_SUCCESS) + { + ret = TRUE; + } + CoTaskMemFree(pStr); + } + if (!ret && HCR_RegOpenClassIDKey(riid, &hkey)) + { + static const WCHAR wszLocalizedString[] = + { 'L','o','c','a','l','i','z','e','d','S','t','r','i','n','g', 0 }; + if (!RegLoadMUIStringW(hkey, wszLocalizedString, szDest, len, NULL, 0, NULL) || !RegQueryValueExW(hkey, swEmpty, 0, NULL, (LPBYTE)szDest, &len)) - { + { ret = TRUE; } RegCloseKey(hkey); From 1d8b6343f640ce23f953cc1e1d38cdd57697e22d Mon Sep 17 00:00:00 2001 From: Art Yerkes Date: Tue, 19 Aug 2008 12:39:46 +0000 Subject: [PATCH 075/324] Fix a leak when doing an immediate reply to a small packet (could be PSH|ACK with < 50 bytes, ACK|FIN, RST or similar). svn path=/trunk/; revision=35449 --- reactos/lib/drivers/oskittcp/oskittcp/tcp_subr.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/reactos/lib/drivers/oskittcp/oskittcp/tcp_subr.c b/reactos/lib/drivers/oskittcp/oskittcp/tcp_subr.c index 4632b688ef1..e3557eea13e 100644 --- a/reactos/lib/drivers/oskittcp/oskittcp/tcp_subr.c +++ b/reactos/lib/drivers/oskittcp/oskittcp/tcp_subr.c @@ -163,6 +163,7 @@ tcp_respond(tp, ti, m, ack, seq, flags) tcp_seq ack, seq; int flags; { + struct mbuf *n; register int tlen; int win = 0; struct route *ro = 0; @@ -221,6 +222,18 @@ tcp_respond(tp, ti, m, ack, seq, flags) tcp_trace(TA_OUTPUT, 0, tp, ti, 0); #endif (void) ip_output(m, NULL, ro, 0, NULL); +#ifdef __REACTOS__ + /* We allocated m, so we are responsible for freeing it. If the mbuf + contains a pointer to an external datablock, we (or rather, m_copy) + didn't allocate it but pointed it to the data to send. So we have + to cheat a little bit and keep M_FREE from freeing the external + data block */ + while (NULL != m) { + m->m_flags &= ~M_EXT; + MFREE(m, n); + m = n; + } +#endif } /* From f1a1cc745a054433b81b64959b0bb6e8d60bba4d Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Tue, 19 Aug 2008 13:03:16 +0000 Subject: [PATCH 076/324] * Create a IDataObject when cidl == 0 (click on TreeView) * Handle directories in ISFHelper_fnCopyItems * Should make copying directories work svn path=/trunk/; revision=35450 --- reactos/dll/win32/shell32/shfldr_fs.c | 79 ++++++++++++++++++++------- 1 file changed, 60 insertions(+), 19 deletions(-) diff --git a/reactos/dll/win32/shell32/shfldr_fs.c b/reactos/dll/win32/shell32/shfldr_fs.c index b7ac4deedaf..cc94009bc02 100644 --- a/reactos/dll/win32/shell32/shfldr_fs.c +++ b/reactos/dll/win32/shell32/shfldr_fs.c @@ -653,10 +653,17 @@ IShellFolder_fnGetUIObjectOf (IShellFolder2 * iface, if (IsEqualIID (riid, &IID_IContextMenu) && (cidl >= 1)) { hr = CDefFolderMenu_Create2(This->pidlRoot, hwndOwner, cidl, apidl, (IShellFolder*)iface, NULL, 0, NULL, (IContextMenu**)&pObj); - } else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1)) { + } else if (IsEqualIID (riid, &IID_IDataObject)){ + if (cidl >= 1) { pObj = (LPUNKNOWN) IDataObject_Constructor (hwndOwner, This->pidlRoot, apidl, cidl); hr = S_OK; + } + else + { + pObj = (LPUNKNOWN) IDataObject_Constructor (hwndOwner, This->pidlRoot, (LPCITEMIDLIST*)&This->pidlRoot, 1); + hr = S_OK; + } } else if (IsEqualIID (riid, &IID_IExtractIconA) && (cidl == 1)) { pidl = ILCombine (This->pidlRoot, apidl[0]); pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl); @@ -1274,9 +1281,9 @@ ISFHelper_fnCopyItems (ISFHelper * iface, IShellFolder * pSFFrom, UINT cidl, WCHAR szTargetPath[MAX_PATH]; SHFILEOPSTRUCTW op; LPITEMIDLIST pidl; - LPWSTR pszSrc, pszTarget; + LPWSTR pszSrc, pszTarget, pszSrcList, pszTargetList; int res; - + STRRET strRet; IGenericSFImpl *This = impl_from_ISFHelper(iface); @@ -1290,48 +1297,82 @@ ISFHelper_fnCopyItems (ISFHelper * iface, IShellFolder * pSFFrom, UINT cidl, IPersistFolder2_Release(ppf2); return E_FAIL; } + IPersistFolder2_Release(ppf2); - if (!SHGetPathFromIDListW (pidl, szSrcPath)) + if (FAILED(IShellFolder_GetDisplayNameOf(pSFFrom, pidl, SHGDN_FORPARSING, &strRet))) { SHFree (pidl); - IPersistFolder2_Release (ppf2); return E_FAIL; } + + if (FAILED(StrRetToBufW(&strRet, pidl, szSrcPath, MAX_PATH))) + { + SHFree (pidl); + return E_FAIL; + } + SHFree (pidl); + pszSrc = PathAddBackslashW (szSrcPath); + wcscpy(szTargetPath, This->sPathTarget); pszTarget = PathAddBackslashW (szTargetPath); - pszSrc = build_paths_list(szSrcPath, cidl, apidl); - pszTarget = build_paths_list(szTargetPath, cidl, apidl); + pszSrcList = build_paths_list(szSrcPath, cidl, apidl); + pszTargetList = build_paths_list(szTargetPath, cidl, apidl); - if (!pszSrc || !pszTarget) + if (!pszSrcList || !pszTargetList) { - if (pszSrc) - HeapFree(GetProcessHeap(), 0, pszSrc); + if (pszSrcList) + HeapFree(GetProcessHeap(), 0, pszSrcList); - if (pszTarget) - HeapFree(GetProcessHeap(), 0, pszTarget); + if (pszTargetList) + HeapFree(GetProcessHeap(), 0, pszTargetList); SHFree (pidl); IPersistFolder2_Release (ppf2); return E_OUTOFMEMORY; } - ZeroMemory(&op, sizeof(op)); + if (!pszSrcList[0]) + { + /* remove trailing backslash */ + pszSrc--; + pszSrc[0] = L'\0'; + op.pFrom = szSrcPath; + } + else + { + op.pFrom = pszSrcList; + } + + if (!pszTargetList[0]) + { + /* remove trailing backslash */ + if (pszTarget - szTargetPath > 3) + { + pszTarget--; + pszTarget[0] = L'\0'; + } + else + { + pszTarget[1] = L'\0'; + } + + op.pTo = szTargetPath; + } + else + { + op.pTo = pszTargetList; + } op.hwnd = GetActiveWindow(); op.wFunc = FO_COPY; - op.pFrom = pszSrc; - op.pTo = pszTarget; - op.fFlags = FOF_ALLOWUNDO; + op.fFlags = FOF_ALLOWUNDO | FOF_NOCONFIRMMKDIR; res = SHFileOperationW(&op); HeapFree(GetProcessHeap(), 0, pszSrc); HeapFree(GetProcessHeap(), 0, pszTarget); - SHFree (pidl); - IPersistFolder2_Release (ppf2); - if (res) return E_FAIL; else From 19ce17e295f51463b7f7029087cea3302dac62c2 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Tue, 19 Aug 2008 13:14:25 +0000 Subject: [PATCH 077/324] * Restore file with SHFileOperation svn path=/trunk/; revision=35451 --- reactos/lib/recyclebin/recyclebin_v5.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/reactos/lib/recyclebin/recyclebin_v5.c b/reactos/lib/recyclebin/recyclebin_v5.c index 385f312fb2e..1cacc925adb 100644 --- a/reactos/lib/recyclebin/recyclebin_v5.c +++ b/reactos/lib/recyclebin/recyclebin_v5.c @@ -472,6 +472,7 @@ RecycleBin5_RecycleBin5_Restore( PINFO2_HEADER pHeader; DELETED_FILE_RECORD *pRecord, *pLast; DWORD dwEntries, i; + SHFILEOPSTRUCTW op; TRACE("(%p, %s, %p)\n", This, debugstr_w(pDeletedFileName), pDeletedFile); @@ -496,7 +497,12 @@ RecycleBin5_RecycleBin5_Restore( if (pRecord->dwRecordUniqueId == pDeletedFile->dwRecordUniqueId) { /* Restore file */ - if (!MoveFileW(pDeletedFileName, pDeletedFile->FileNameW)) + ZeroMemory(&op, sizeof(op)); + op.wFunc = FO_COPY; + op.pFrom = pDeletedFileName; + op.pTo = pDeletedFile->FileNameW; + + if (!SHFileOperationW(&op)) { UnmapViewOfFile(pHeader); return HRESULT_FROM_WIN32(GetLastError()); From 9df926c8e0b26b72ee0b6eee2b858fb9da40650c Mon Sep 17 00:00:00 2001 From: Gregor Brunmar Date: Tue, 19 Aug 2008 15:42:23 +0000 Subject: [PATCH 078/324] * Removed d3d9's dependency on the missing strsafe library * Replaced .def file with a .spec file svn path=/trunk/; revision=35452 --- reactos/dll/directx/d3d9/adapter.c | 4 +- reactos/dll/directx/d3d9/d3d9.c | 13 +++--- reactos/dll/directx/d3d9/d3d9.def | 8 ---- reactos/dll/directx/d3d9/d3d9.rbuild | 4 +- reactos/dll/directx/d3d9/d3d9.spec | 6 +++ reactos/dll/directx/d3d9/d3d9_caps.c | 3 +- reactos/dll/directx/d3d9/d3d9_create.c | 1 - reactos/dll/directx/d3d9/d3d9_helpers.c | 53 +++++++++++++++++++++++++ reactos/dll/directx/d3d9/d3d9_helpers.h | 5 +++ reactos/dll/directx/d3d9/format.c | 1 + reactos/include/psdk/d3d9types.h | 5 +++ 11 files changed, 81 insertions(+), 22 deletions(-) delete mode 100644 reactos/dll/directx/d3d9/d3d9.def create mode 100644 reactos/dll/directx/d3d9/d3d9.spec diff --git a/reactos/dll/directx/d3d9/adapter.c b/reactos/dll/directx/d3d9/adapter.c index 62ebf3f1087..513888f9303 100644 --- a/reactos/dll/directx/d3d9/adapter.c +++ b/reactos/dll/directx/d3d9/adapter.c @@ -10,10 +10,10 @@ #include "d3d9_common.h" #include #include -#include #include #include #include "d3d9_private.h" +#include "d3d9_helpers.h" #include "adapter.h" #define D3D9_CAPS1 (D3DCAPS_READ_SCANLINE) @@ -58,7 +58,7 @@ static BOOL GetDriverName(LPDISPLAY_DEVICEA pDisplayDevice, D3DADAPTER_IDENTIFIE if (ERROR_SUCCESS == RegQueryValueExA(hKey, "InstalledDisplayDrivers", 0, &Type, (LPBYTE)pIdentifier->Driver, &DriverNameLength)) { pIdentifier->Driver[DriverNameLength] = '\0'; - StringCbCatA(pIdentifier->Driver, MAX_DEVICE_IDENTIFIER_STRING, ".dll"); + SafeAppendString(pIdentifier->Driver, MAX_DEVICE_IDENTIFIER_STRING, ".dll"); bResult = TRUE; } diff --git a/reactos/dll/directx/d3d9/d3d9.c b/reactos/dll/directx/d3d9/d3d9.c index 0afc2476b8d..5953eb5e775 100644 --- a/reactos/dll/directx/d3d9/d3d9.c +++ b/reactos/dll/directx/d3d9/d3d9.c @@ -11,7 +11,6 @@ #include "d3d9_helpers.h" #include "d3d9_create.h" #include -#include #define DEBUG_MESSAGE_BUFFER_SIZE 512 @@ -25,31 +24,31 @@ static LPCSTR D3dError_WrongSdkVersion = "Recompile the application against the appropriate SDK for the installed runtime.\n" "\n"; -HRESULT Direct3DShaderValidatorCreate9(void) +HRESULT WINAPI Direct3DShaderValidatorCreate9(void) { UNIMPLEMENTED return 0; } -HRESULT PSGPError(void) +HRESULT WINAPI PSGPError(void) { UNIMPLEMENTED return 0; } -HRESULT PSGPSampleTexture(void) +HRESULT WINAPI PSGPSampleTexture(void) { UNIMPLEMENTED return 0; } -HRESULT DebugSetLevel(void) +HRESULT WINAPI DebugSetLevel(void) { UNIMPLEMENTED return 0; } -HRESULT DebugSetMute(DWORD dw1) +HRESULT WINAPI DebugSetMute(DWORD dw1) { UNIMPLEMENTED return 0; @@ -86,7 +85,7 @@ IDirect3D9* WINAPI Direct3DCreate9(UINT SDKVersion) if (SDKVersion & DX_D3D9_DEBUG) { HRESULT hResult; - hResult = StringCbPrintfA(DebugMessageBuffer, DEBUG_MESSAGE_BUFFER_SIZE, D3dError_WrongSdkVersion, NoDebugSDKVersion, D3D_SDK_VERSION); + hResult = SafeFormatString(DebugMessageBuffer, DEBUG_MESSAGE_BUFFER_SIZE, D3dError_WrongSdkVersion, NoDebugSDKVersion, D3D_SDK_VERSION); if (SUCCEEDED(hResult)) OutputDebugStringA(DebugMessageBuffer); } diff --git a/reactos/dll/directx/d3d9/d3d9.def b/reactos/dll/directx/d3d9/d3d9.def deleted file mode 100644 index c42b78b1686..00000000000 --- a/reactos/dll/directx/d3d9/d3d9.def +++ /dev/null @@ -1,8 +0,0 @@ -LIBRARY d3d9 -EXPORTS - Direct3DShaderValidatorCreate9 - PSGPError - PSGPSampleTexture - DebugSetLevel - DebugSetMute - Direct3DCreate9 diff --git a/reactos/dll/directx/d3d9/d3d9.rbuild b/reactos/dll/directx/d3d9/d3d9.rbuild index c25fe8a88e2..e36e8b96e94 100644 --- a/reactos/dll/directx/d3d9/d3d9.rbuild +++ b/reactos/dll/directx/d3d9/d3d9.rbuild @@ -1,7 +1,7 @@ - + advapi32 kernel32 @@ -9,7 +9,6 @@ gdi32 uuid dxguid - strsafe version d3d8thk @@ -22,4 +21,5 @@ adapter.c format.c d3d9.rc + d3d9.spec diff --git a/reactos/dll/directx/d3d9/d3d9.spec b/reactos/dll/directx/d3d9/d3d9.spec new file mode 100644 index 00000000000..0be3067d594 --- /dev/null +++ b/reactos/dll/directx/d3d9/d3d9.spec @@ -0,0 +1,6 @@ +@ stdcall Direct3DShaderValidatorCreate9() +@ stdcall PSGPError() +@ stdcall PSGPSampleTexture() +@ stdcall DebugSetLevel() +@ stdcall DebugSetMute(long) +@ stdcall Direct3DCreate9(long) diff --git a/reactos/dll/directx/d3d9/d3d9_caps.c b/reactos/dll/directx/d3d9/d3d9_caps.c index 03f206eb22e..65e81a2e478 100644 --- a/reactos/dll/directx/d3d9/d3d9_caps.c +++ b/reactos/dll/directx/d3d9/d3d9_caps.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include "d3d9_helpers.h" #include "d3d9_caps.h" @@ -98,7 +97,7 @@ static void CreateInternalDeviceData(HDC hDC, LPCSTR lpszDeviceName, D3D9_Unknow } - StringCbCopyA(pUnknown6BC->szDeviceName, CCHDEVICENAME, lpszDeviceName); + SafeCopyString(pUnknown6BC->szDeviceName, CCHDEVICENAME, lpszDeviceName); //pUnknown6BC->DeviceUniq = DdQueryDisplaySettingsUniqueness(); pUnknown6BC->DeviceType = DeviceType; diff --git a/reactos/dll/directx/d3d9/d3d9_create.c b/reactos/dll/directx/d3d9/d3d9_create.c index e33fa373d76..2b8da3fdff5 100644 --- a/reactos/dll/directx/d3d9/d3d9_create.c +++ b/reactos/dll/directx/d3d9/d3d9_create.c @@ -13,7 +13,6 @@ #include #include #include -#include static const GUID DISPLAY_GUID = { 0x67685559, 0x3106, 0x11D0, { 0xB9, 0x71, 0x00, 0xAA, 0x00, 0x34, 0x2F, 0x9F } }; diff --git a/reactos/dll/directx/d3d9/d3d9_helpers.c b/reactos/dll/directx/d3d9/d3d9_helpers.c index 82e3beb90a1..53f8db80528 100644 --- a/reactos/dll/directx/d3d9/d3d9_helpers.c +++ b/reactos/dll/directx/d3d9/d3d9_helpers.c @@ -38,6 +38,59 @@ BOOL ReadRegistryValue(IN DWORD ValueType, IN LPCSTR ValueName, OUT LPBYTE DataB return TRUE; } +HRESULT SafeFormatString(OUT LPSTR Buffer, IN LONG BufferSize, IN LPCSTR FormatString, ... ) +{ + DWORD BytesWritten; + va_list vargs; + + if (BufferSize == 0) + return DDERR_INVALIDPARAMS; + + va_start(vargs, FormatString); + BytesWritten = _vsnprintf(Buffer, BufferSize-1, FormatString, vargs); + + if (BytesWritten < BufferSize) + return DDERR_GENERIC; + + Buffer[BufferSize-1] = '\0'; + + return ERROR_SUCCESS; +} + +HRESULT SafeCopyString(OUT LPSTR Dst, IN DWORD DstSize, IN LPCSTR Src) +{ + HRESULT hr = ERROR_SUCCESS; + + if (Dst == NULL || DstSize == 0 || Src == NULL) + return DDERR_INVALIDPARAMS; + + while (*Src != '\0' && DstSize > 0) + { + *Dst++ = *Src++; + --DstSize; + } + + if (DstSize == 0) + { + --Dst; + hr = DDERR_GENERIC; + } + + return hr; +} + +HRESULT SafeAppendString(IN OUT LPSTR Dst, IN DWORD DstSize, IN LPCSTR Src) +{ + DWORD CurrentDstLength; + + if (Dst == NULL || DstSize == 0) + return DDERR_INVALIDPARAMS; + + CurrentDstLength = strlen(Dst); + + return SafeCopyString(Dst + CurrentDstLength, DstSize - CurrentDstLength, Src); +} + HRESULT AlignedAlloc(IN OUT LPVOID *ppObject, IN SIZE_T dwSize) { ULONG AddressOffset; diff --git a/reactos/dll/directx/d3d9/d3d9_helpers.h b/reactos/dll/directx/d3d9/d3d9_helpers.h index ce5e356bb54..5e8d54cfe8a 100644 --- a/reactos/dll/directx/d3d9/d3d9_helpers.h +++ b/reactos/dll/directx/d3d9/d3d9_helpers.h @@ -15,6 +15,11 @@ /* Reads a registry value if it's of the correct value type */ BOOL ReadRegistryValue(IN DWORD ValueType, IN LPCSTR ValueName, OUT LPBYTE DataBuffer, IN OUT LPDWORD DataBufferSize); +/* Safe string formatting */ +HRESULT SafeFormatString(IN OUT LPSTR Buffer, IN LONG BufferSize, IN LPCSTR FormatString, ... ); +HRESULT SafeCopyString(OUT LPSTR Dst, IN DWORD DstSize, IN LPCSTR Src); +HRESULT SafeAppendString(IN OUT LPSTR Dst, IN DWORD DstSize, IN LPCSTR Src); + /* Allocates memory and returns an aligned pointer */ HRESULT AlignedAlloc(IN OUT LPVOID *ppObject, IN SIZE_T dwSize); diff --git a/reactos/dll/directx/d3d9/format.c b/reactos/dll/directx/d3d9/format.c index 9d64c4a673e..3c9c0453fd0 100644 --- a/reactos/dll/directx/d3d9/format.c +++ b/reactos/dll/directx/d3d9/format.c @@ -9,6 +9,7 @@ #include "format.h" #include #include +#include BOOL IsBackBufferFormat(D3DFORMAT Format) { diff --git a/reactos/include/psdk/d3d9types.h b/reactos/include/psdk/d3d9types.h index 4aae6f0b801..2d4267e1ce0 100644 --- a/reactos/include/psdk/d3d9types.h +++ b/reactos/include/psdk/d3d9types.h @@ -823,6 +823,11 @@ typedef enum _D3DFORMAT { D3DFMT_D32F_LOCKABLE = 82, D3DFMT_D24FS8 = 83, +#ifndef D3D_DISABLE_9EX + D3DFMT_D32_LOCKABLE = 84, + D3DFMT_S8_LOCKABLE = 85, +#endif + D3DFMT_VERTEXDATA = 100, D3DFMT_INDEX16 = 101, D3DFMT_INDEX32 = 102, From 2af4b1e5ca60c879b7428dff046cc70cda4dec34 Mon Sep 17 00:00:00 2001 From: Daniel Reimer Date: Tue, 19 Aug 2008 16:32:35 +0000 Subject: [PATCH 079/324] Bug 3631 Translate file/patch by Lars Martin Hambro (shell32 was outdated) Bug 3659 shell32 pl-PL update by Maciej Bialas Bug 3664 Italian resources update by Paolo Devoti Bug 3665 Some translations svn path=/trunk/; revision=35455 --- reactos/base/applications/calc/lang/no-NO.rc | 320 +++++++++++++++++- .../base/applications/msconfig/lang/no-NO.rc | 38 +-- reactos/base/applications/mstsc/lang/no-NO.rc | 4 +- .../network/ipconfig/lang/no-NO.rc | 2 +- .../screensavers/3dtext/lang/ko-KR.rc | 21 ++ .../applications/screensavers/3dtext/rsrc.rc | 1 + .../screensavers/logon/lang/ko-KR.rc | 11 + .../applications/screensavers/logon/logon.rc | 1 + .../base/applications/sndvol32/lang/ko-KR.rc | 46 +++ reactos/base/applications/sndvol32/rsrc.rc | 1 + reactos/dll/cpl/access/lang/no-NO.rc | 4 +- reactos/dll/cpl/appwiz-new/lang/no-NO.rc | 40 +-- reactos/dll/cpl/desk/lang/no-NO.rc | 24 +- reactos/dll/cpl/main/lang/no-NO.rc | 71 ++-- reactos/dll/cpl/sysdm/lang/no-NO.rc | 22 +- reactos/dll/cpl/telephon/lang/no-NO.rc | 16 + reactos/dll/cpl/telephon/rsrc.rc | 1 + reactos/dll/win32/netid/lang/no-NO.rc | 8 +- reactos/dll/win32/shell32/lang/it-IT.rc | 88 ++--- reactos/dll/win32/shell32/lang/pl-PL.rc | 32 +- .../subsystems/win32/csrss/win32csr/rsrc.rc | 1 + 21 files changed, 576 insertions(+), 176 deletions(-) create mode 100644 reactos/base/applications/screensavers/3dtext/lang/ko-KR.rc create mode 100644 reactos/base/applications/screensavers/logon/lang/ko-KR.rc create mode 100644 reactos/base/applications/sndvol32/lang/ko-KR.rc create mode 100644 reactos/dll/cpl/telephon/lang/no-NO.rc diff --git a/reactos/base/applications/calc/lang/no-NO.rc b/reactos/base/applications/calc/lang/no-NO.rc index b3df55a0a4e..ff5f0a5f830 100644 --- a/reactos/base/applications/calc/lang/no-NO.rc +++ b/reactos/base/applications/calc/lang/no-NO.rc @@ -9,14 +9,10 @@ MENU IDR_MENU_SCIENTIFIC_1 FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN GROUPBOX "",IDC_STATIC,4,16,132,21 - CONTROL "Heks",IDC_RADIO_HEX,"Button",BS_AUTORADIOBUTTON,8,24,29, - 10 - CONTROL "Des",IDC_RADIO_DEC,"Button",BS_AUTORADIOBUTTON,40,24,29, - 10 - CONTROL "Okt",IDC_RADIO_OCT,"Button",BS_AUTORADIOBUTTON,72,24,27, - 10 - CONTROL "Bin",IDC_RADIO_BIN,"Button",BS_AUTORADIOBUTTON,100,24, - 26,10 + CONTROL "Heks",IDC_RADIO_HEX,"Button",BS_AUTORADIOBUTTON,8,24,29,10 + CONTROL "Des",IDC_RADIO_DEC,"Button",BS_AUTORADIOBUTTON,40,24,29,10 + CONTROL "Okt",IDC_RADIO_OCT,"Button",BS_AUTORADIOBUTTON,72,24,27,10 + CONTROL "Bin",IDC_RADIO_BIN,"Button",BS_AUTORADIOBUTTON,100,24,26,10 GROUPBOX "",IDC_STATIC,4,36,76,21 CONTROL "Inv",IDC_CHECK_INV,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,44,26,10 @@ -150,7 +146,7 @@ BEGIN CONTROL "Radianer",IDC_RADIO_RAD,"Button",BS_AUTORADIOBUTTON,192, 24,42,10 CONTROL "Gradienter",IDC_RADIO_GRAD,"Button",BS_AUTORADIOBUTTON, - 236,24,44,10 + 236,24,48,10 PUSHBUTTON "C",IDC_BUTTON_CANC,272,40,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "CE",IDC_BUTTON_CE,228,40,40,17,BS_CENTER | BS_VCENTER | @@ -229,6 +225,84 @@ BEGIN DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5, NOT WS_VISIBLE END +IDD_DIALOG_CONVERSION DIALOGEX 0, 0, 320, 130 +STYLE WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "ReactOS Kalkulator" +MENU IDR_MENU_STANDARD +FONT 8, "MS Shell Dlg" +BEGIN + PUSHBUTTON "Konverter",IDC_BUTTON_CONVERT,35,105,76,17 + COMBOBOX IDC_COMBO_CATEGORY,4,31,140,168,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP | CBS_SORT + LTEXT "Kategori:",IDC_STATIC,4,20,56,8 + COMBOBOX IDC_COMBO_FROM,4,60,140,168,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP | CBS_SORT + LTEXT "Konverter fra:",IDC_STATIC,4,49,56,8 + COMBOBOX IDC_COMBO_TO,4,87,140,168,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP | CBS_SORT + LTEXT "Konverter til:",IDC_STATIC,4,76,56,8 + CONTROL "C",IDC_BUTTON_CANC,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,276,24,40,17 + CONTROL "CE",IDC_BUTTON_CE,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,232,24,40,17 + CONTROL "Tilbake",IDC_BUTTON_BACK,"Button",BS_OWNERDRAW | + BS_CENTER | BS_VCENTER | BS_NOTIFY | WS_TABSTOP,188,24, + 40,17 + RTEXT "",IDC_TEXT_OUTPUT,4,4,312,12,SS_CENTERIMAGE, + WS_EX_CLIENTEDGE + CONTROL "7",IDC_BUTTON_7,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,188,48,24,17 + CONTROL "4",IDC_BUTTON_4,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,188,67,24,17 + CONTROL "1",IDC_BUTTON_1,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,188,86,24,17 + CONTROL "0",IDC_BUTTON_0,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,188,105,24,17 + CONTROL "8",IDC_BUTTON_8,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,214,48,24,17 + CONTROL "5",IDC_BUTTON_5,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,214,67,24,17 + CONTROL "2",IDC_BUTTON_2,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,214,86,24,17 + CONTROL "+/-",IDC_BUTTON_SIGN,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,214,105,24,17 + CONTROL "9",IDC_BUTTON_9,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,240,48,24,17 + CONTROL "6",IDC_BUTTON_6,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,240,67,24,17 + CONTROL "3",IDC_BUTTON_3,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,240,86,24,17 + CONTROL ",",IDC_BUTTON_DOT,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,240,105,24,17 + CONTROL "/",IDC_BUTTON_DIV,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,266,48,24,17 + CONTROL "*",IDC_BUTTON_MULT,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,266,67,24,17 + CONTROL "-",IDC_BUTTON_SUB,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,266,86,24,17 + CONTROL "+",IDC_BUTTON_ADD,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,266,105,24,17 + CONTROL "Sqrt",IDC_BUTTON_SQRT,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,292,48,24,17 + CONTROL "%",IDC_BUTTON_PERCENT,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,292,67,24,17 + CONTROL "1/x",IDC_BUTTON_RX,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,292,86,24,17 + CONTROL "=",IDC_BUTTON_EQU,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,292,105,24,17 + CTEXT "",IDC_TEXT_MEMORY,152,24,24,17,SS_CENTERIMAGE, + WS_EX_CLIENTEDGE + CONTROL "MC",IDC_BUTTON_MC,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,152,48,24,17 + CONTROL "MR",IDC_BUTTON_MR,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,152,67,24,17 + CONTROL "MS",IDC_BUTTON_MS,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,152,86,24,17 + CONTROL "M+",IDC_BUTTON_MP,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,152,105,24,17 + DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5,NOT WS_VISIBLE +END + IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Om ReactOS kalkulator" @@ -321,7 +395,7 @@ BEGIN MENUITEM "Word\tF3", IDM_VIEW_WORD, CHECKED MENUITEM "Tegn\tF4", IDM_VIEW_BYTE, CHECKED MENUITEM SEPARATOR - MENUITEM "Group digits", IDM_VIEW_GROUP, CHECKED + MENUITEM "Digital gruppe", IDM_VIEW_GROUP, CHECKED END POPUP "Hjelp" BEGIN @@ -363,3 +437,229 @@ BEGIN IDS_QUICKHELP "Rask hjelp" END +// types of conversion +STRINGTABLE DISCARDABLE +BEGIN + IDS_CONV_AREA "Omrеde" + IDS_CONV_CONSUMPTION "Forbruk (maskin)" + IDS_CONV_CURRENCY "Valuta" + IDS_CONV_ENERGY "Energi" + IDS_CONV_LENGTH "Lengde" + IDS_CONV_POWER "Strшm" + IDS_CONV_PRESSURE "Trykk" + IDS_CONV_TEMPERATURE "Temperatur" + IDS_CONV_VELOCITY "Hastighet" + IDS_CONV_VOLUME "Volum" + IDS_CONV_WEIGHT "Vekt" +END + +// TYPES OF AREAS +STRINGTABLE DISCARDABLE +BEGIN + IDS_AREA_ACRES "Acres" + IDS_AREA_ACRES_BRAZIL "Acres (Brazil)" + IDS_AREA_ACRES_FRANCE "Acres (France)" + IDS_AREA_ACRES_SCOTS "Acres (Scots)" + IDS_AREA_ACRES_US "Acres (US)" + IDS_AREA_ARES "Ares" + IDS_AREA_CHOU "Chou" + IDS_AREA_DANBO "Danbo" + IDS_AREA_HECTARES "Hectares" + IDS_AREA_JEONGBO "Jeongbo" + IDS_AREA_MORGEN_HUNGARY "Morgen (Hungary)" + IDS_AREA_MU "Mu" + IDS_AREA_PING "Ping" + IDS_AREA_PYEONG "Pyeong" + IDS_AREA_PYEONGBANGJA "Pyeongbangja" + IDS_AREA_RAI "Rai" + IDS_AREA_SE "Se" + IDS_AREA_SQUARE_CENTIMETERS "Square centimeters" + IDS_AREA_SQUARE_CHR "Square chr" + IDS_AREA_SQUARE_FATHOMS "Square fathoms" + IDS_AREA_SQUARE_FATHOMS_HUNGARY "Square fathoms (Hungary)" + IDS_AREA_SQUARE_FEET "Square feet" + IDS_AREA_SQUARE_INCHES "Square inches" + IDS_AREA_SQUARE_KILOMETERS "Square kilometers" + IDS_AREA_SQUARE_LAR "Square lar" + IDS_AREA_SQUARE_METER "Square meter" + IDS_AREA_SQUARE_MILES "Square miles" + IDS_AREA_SQUARE_MILLIMETERS "Square millimeters" + IDS_AREA_SQUARE_SHAKU "Square shaku" + IDS_AREA_SQUARE_TSUEN "Square tsuen" + IDS_AREA_SQUARE_VA "Square va" + IDS_AREA_SQUARE_YARD "Square yard" + IDS_AREA_TAN "Tan" + IDS_AREA_TSUBO "Tsubo" +END + +// TYPES OF COMSUMPTIONS +STRINGTABLE DISCARDABLE +BEGIN + IDS_CONSUMPTION_KM_PER_L "Kilometer/liter" + IDS_CONSUMPTION_L_PER_100_KM "Liters/100 kilometers" + IDS_CONSUMPTION_MILES_GALLON_UK "Miles/gallon (UK)" + IDS_CONSUMPTION_MILES_GALLON_US "Miles/gallon (US)" +END + +// TYPES OF CURRENCIES +STRINGTABLE DISCARDABLE +BEGIN + IDS_CURRENCY_AUSTRIAN_SCHILLING "Austrian schilling" + IDS_CURRENCY_BELGIAN_FRANC "Belgian franc" + IDS_CURRENCY_CYPRIOT_POUND "Cypriot pound" + IDS_CURRENCY_DEUTSCHE_MARK "Deutsche Mark" + IDS_CURRENCY_DUTCH_GUILDER "Dutch guilder" + IDS_CURRENCY_EURO "Euro" + IDS_CURRENCY_FINNISH_MARKKA "Finnish markka" + IDS_CURRENCY_FRENCH_FRANC "French franc" + IDS_CURRENCY_GREEK_DRACHMA "Greek Drachma" + IDS_CURRENCY_IRISH_POUND "Irish pound" + IDS_CURRENCY_ITALIAN_LIRA "Italian lira" + IDS_CURRENCY_LUXEMBOURG_FRANC "Luxembourg franc" + IDS_CURRENCY_MALTESE_LIRA "Maltese lira" + IDS_CURRENCY_PORTOGUESE_ESCUDO "Portoguese escudo" + IDS_CURRENCY_SLOVENIAN_TOLAR "Slovenian tolar" + IDS_CURRENCY_SPANISH_PESETA "Spanish peseta" +END + +// TYPES OF ENERGIES +STRINGTABLE DISCARDABLE +BEGIN + IDS_ENERGY_15_C_CALORIES "15 ^C calories" + IDS_ENERGY_ERGS "Ergs" + IDS_ENERGY_IT_CALORIES "International Table calories" + IDS_ENERGY_JOULES "Joules" + IDS_ENERGY_KILOJOULES "Kilojoules" + IDS_ENERGY_KILOWATT_HOURS "Kilowatt hours" + IDS_ENERGY_NUTRITION_CALORIES "Nutrition calories" + IDS_ENERGY_TH_CALORIES "Thermochemical calorie" +END + +// TYPES OF LENGTHS +STRINGTABLE DISCARDABLE +BEGIN + IDS_LENGTH_ANGSTROMS "Angstroms" + IDS_LENGTH_ASTRONOMILA_UNITS "Astronomila units" + IDS_LENGTH_BARLEYCORNS "Barleycorns" + IDS_LENGTH_CENTIMETERS "Centimeters" + IDS_LENGTH_CHAINS_UK "Chains (UK)" + IDS_LENGTH_CHI "Chi" + IDS_LENGTH_CHOU "Chou" + IDS_LENGTH_CHR "Chr" + IDS_LENGTH_CUN "Cun" + IDS_LENGTH_FATHOMS "Fathoms" + IDS_LENGTH_FATHOMS_HUNGARY "Fathoms (Hungary)" + IDS_LENGTH_FEET "Feet" + IDS_LENGTH_FURLONGS "Furlongs" + IDS_LENGTH_GAN "Gan" + IDS_LENGTH_HANDS "Hands" + IDS_LENGTH_HUNH "Hunh" + IDS_LENGTH_INCHES "Inches" + IDS_LENGTH_JA "Ja" + IDS_LENGTH_JEONG "Jeong" + IDS_LENGTH_KABIET "Kabiet" + IDS_LENGTH_KEN "Ken" + IDS_LENGTH_KEUB "Keub" + IDS_LENGTH_KILOMETERS "Kilometers" + IDS_LENGTH_LAR "Lar" + IDS_LENGTH_LIGHT_YEARS "Light years" + IDS_LENGTH_LINKS_UK "Links (UK)" + IDS_LENGTH_METERS "Meters" + IDS_LENGTH_MILES "Miles" + IDS_LENGTH_MILLIMETERS "Millimeters" + IDS_LENGTH_NAUTICAL_MILES "Nautical miles" + IDS_LENGTH_NIEU "Nieu" + IDS_LENGTH_PARSECS "Parsecs" + IDS_LENGTH_PICAS "Picas" + IDS_LENGTH_RI_JAPAN "Ri (Japan)" + IDS_LENGTH_RI_KOREA "Ri (Korea)" + IDS_LENGTH_SAWK "Sawk" + IDS_LENGTH_SEN "Sen" + IDS_LENGTH_SHAKU "Shaku" + IDS_LENGTH_SPAN "Span" + IDS_LENGTH_SUN "Sun" + IDS_LENGTH_TSUEN "Tsuen" + IDS_LENGTH_VA "Va" + IDS_LENGTH_YARDS "Yards" + IDS_LENGTH_YOTE "Yote" + IDS_LENGTH_ZHANG "Zhang" +END + +// TYPES OF POWERS +STRINGTABLE DISCARDABLE +BEGIN + IDS_POWER_HORSEPOWER "hestekrefter" + IDS_POWER_KILOWATTS "Kilowatt" + IDS_POWER_MEGAWATTS "Megawatt" + IDS_POWER_WATTS "Watt" +END + +// TYPE OF PRESSURES +STRINGTABLE DISCARDABLE +BEGIN + IDS_PRESSURE_ATMOSPHERES "Atmosfжretrykk" + IDS_PRESSURE_BARS "Bars" + IDS_PRESSURE_MM_OF_MERCURY "Millimeters of mercury" + IDS_PRESSURE_PASCALS "Pascals" + IDS_PRESSURE_PSI "Pounds-force per square inch" +END + +// TYPES OF TEMPERATURES +STRINGTABLE DISCARDABLE +BEGIN + IDS_TEMPERATURE_CELSIUS "Celsius" + IDS_TEMPERATURE_FAHRENHEIT "Fahrenheit" + IDS_TEMPERATURE_KELVIN "Kelvin" + IDS_TEMPERATURE_RANKINE "Rankine" +END + +// TYPES OF VELOCITIES +STRINGTABLE DISCARDABLE +BEGIN + IDS_VELOCITY_FEET_HOUR "Feet/time" + IDS_VELOCITY_KILOMETERS_HOUR "kilometer/time" + IDS_VELOCITY_KNOTS "Knot" + IDS_VELOCITY_MACH "Mach" + IDS_VELOCITY_METERS_SECOND "Meter/sekunder" + IDS_VELOCITY_MILES_HOUR "Mil/time" +END + +// TYPES OF VOLUMES +STRINGTABLE DISCARDABLE +BEGIN + IDS_VOLUME_BARRELS_UK "Barrels (UK)" + IDS_VOLUME_BARRELS_OIL "Barrels oil" + IDS_VOLUME_BUN "Bun" + IDS_VOLUME_BUSHELS_UK "Bushels (UK)" + IDS_VOLUME_BUSHELS_US "Bushels (US)" + IDS_VOLUME_CUBIC_CENTIMETERS "Cubic centimeters" + IDS_VOLUME_CUBIC_FEET "Cubic feet" + IDS_VOLUME_CUBIC_INCHES "Cubic inches" + IDS_VOLUME_CUBIC_METERS "Cubic meters" + IDS_VOLUME_CUBIC_YARDS "Cubic yards" + IDS_VOLUME_DOE "Doe" + IDS_VOLUME_FLUID_OUNCES_UK "Fluid ounces (UK)" + IDS_VOLUME_FLUID_OUNCES_US "Fluid ounces (US)" + IDS_VOLUME_GALLONS_UK "Gallons (UK)" + IDS_VOLUME_GALLONS_DRY_US "Gallons, dry (US)" + IDS_VOLUME_GALLONS_LIQUID_US "Gallons, liquid (US)" + IDS_VOLUME_GOU "Gou" + IDS_VOLUME_HOP "Hop" + IDS_VOLUME_ICCE "Icce" + IDS_VOLUME_KWIAN "Kwian" + IDS_VOLUME_LITERS "Liters" + IDS_VOLUME_MAL "Mal" + IDS_VOLUME_MILLILITERS "Milliliters" + IDS_VOLUME_PINTS_UK "Pints (UK)" + IDS_VOLUME_PINTS_DRY_US "Pints, dry (US)" + IDS_VOLUME_PINTS_LIQUID_US "Pints, liquid (US)" + IDS_VOLUME_QUARTS_UK "Quarts (UK)" + IDS_VOLUME_QUARTS_DRY_US "Quarts, dry (US)" + IDS_VOLUME_QUARTS_LIQUID_US "Quarts, liquid (US)" + IDS_VOLUME_SEKI "Seki" + IDS_VOLUME_SYOU "Syou" + IDS_VOLUME_TANANLOUNG "Tananloung" + IDS_VOLUME_TANG "Tang" + IDS_VOLUME_TO "To" +END + diff --git a/reactos/base/applications/msconfig/lang/no-NO.rc b/reactos/base/applications/msconfig/lang/no-NO.rc index 0229bcfd6c2..9b4ec2f3741 100644 --- a/reactos/base/applications/msconfig/lang/no-NO.rc +++ b/reactos/base/applications/msconfig/lang/no-NO.rc @@ -38,8 +38,8 @@ BEGIN PUSHBUTTON "&Ny", IDC_BTN_SYSTEM_NEW, 290, 115, 66, 14 PUSHBUTTON "Re&diger", IDC_BTN_SYSTEM_EDIT, 290, 135, 66, 14 - PUSHBUTTON "A&ktiver Alt", IDC_BTN_SYSTEM_ACTIVATE, 123, 155, 66, 14 - PUSHBUTTON "Dektiver A<",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 + PUSHBUTTON "A&ktiver alt", IDC_BTN_SYSTEM_ACTIVATE, 123, 155, 66, 14 + PUSHBUTTON "D&eaktiver alt",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 END IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 @@ -64,13 +64,13 @@ IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Oppstarts utvalg", -1, 10, 10, 340, 150,0,WS_EX_TRANSPARENT - CONTROL "&Normal oppstart - laste inn alle enhetsdrivere og tjenester", IDC_CBX_NORMAL_START, "Button", 0x50010009, 20, 30, 180, 10 - CONTROL "&Diagnose oppstart - last bare inn grunnleggende enheter og tjenester", IDC_CBX_DIAGNOSTIC_START, "Button", 0x50010009, 20, 45, 195, 10 + GROUPBOX "Oppstarts valg", -1, 10, 10, 340, 150,0,WS_EX_TRANSPARENT + CONTROL "&Normal oppstart - last inn alle enhetsdrivere og tjenester", IDC_CBX_NORMAL_START, "Button", 0x50010009, 20, 30, 236, 10 + CONTROL "&Diagnose oppstart - last bare inn grunnleggende enheter og tjenester", IDC_CBX_DIAGNOSTIC_START, "Button", 0x50010009, 20, 45, 236, 10 CONTROL "&Selektiv oppstart", IDC_CBX_SELECTIVE_STARTUP, "Button", 0x50010009, 20, 60, 70, 10 AUTOCHECKBOX "L&ast inn SYSTEM.INI Filen", IDC_CBX_SYSTEM_INI, 30, 80, 95, 10 - AUTOCHECKBOX "&Last inn System tjenester", IDC_CBX_SYSTEM_SERVICE, 30, 95, 90, 10 - AUTOCHECKBOX "Las&t inn oppstartselementet", IDC_CBX_STARTUP_ITEM, 30, 110, 75, 10 + AUTOCHECKBOX "&Last inn Systemtjenester", IDC_CBX_SYSTEM_SERVICE, 30, 95, 105, 10 + AUTOCHECKBOX "Las&t inn oppstartselementet", IDC_CBX_STARTUP_ITEM, 30, 110, 105, 10 END IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 @@ -78,20 +78,20 @@ STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50, 0x00000200 - PUSHBUTTON "&Sjekk alle oppstartsbaner", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 70, 12 + PUSHBUTTON "&Sjekk oppstartsbaner", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 75, 12 PUSHBUTTON "&Sett som standard", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 70, 12 - PUSHBUTTON "Flytt &Opp", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12 - PUSHBUTTON "Flytt &Ned", IDC_BTN_MOVE_DOWN_BOOT_OPTION, 280, 65, 70, 12 - GROUPBOX "Oppstarts alternativer", -1, 10, 80, 250, 90,0,WS_EX_TRANSPARENT - CHECKBOX "/Sik&ker oppstart", IDC_CBX_SAFE_BOOT, 15, 90, 50, 10 - CHECKBOX "/&Ingen grafisk oppstart", IDC_CBX_NO_GUI_BOOT, 15, 105, 55, 10 - CHECKBOX "/&Oppstart logg", IDC_CBX_BOOT_LOG, 15, 120, 50, 10 - CHECKBOX "/Enkel& grafikk", IDC_CBX_BASE_VIDEO, 15, 135, 55, 10 + PUSHBUTTON "Flytt &opp", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12 + PUSHBUTTON "Flytt &ned", IDC_BTN_MOVE_DOWN_BOOT_OPTION, 280, 65, 70, 12 + GROUPBOX "Oppstarts alternativer", -1, 10, 80, 250, 95,0,WS_EX_TRANSPARENT + CHECKBOX "/Sik&ker oppstart", IDC_CBX_SAFE_BOOT, 15, 90, 95, 10 + CHECKBOX "/&Ingen grafisk oppstart", IDC_CBX_NO_GUI_BOOT, 15, 105, 95, 10 + CHECKBOX "/&Oppstart logg", IDC_CBX_BOOT_LOG, 15, 120, 80, 10 + CHECKBOX "/Enkel &grafikk", IDC_CBX_BASE_VIDEO, 15, 135, 95, 10 CHECKBOX "/H&jelp", IDC_CBX_SOS, 15, 150, 50, 10 - PUSHBUTTON "Av&anserte alternativer...", IDC_BTN_ADVANCED_OPTIONS, 100, 150, 70, 12 - LTEXT "&Tidsavbrudd:", -1, 280, 91, 30, 10 - EDITTEXT IDC_TXT_BOOT_TIMEOUT, 310, 90, 25, 12, ES_LEFT - LTEXT "sek.", -1, 340, 91, 15, 10 + PUSHBUTTON "Av&anserte alternativer...", IDC_BTN_ADVANCED_OPTIONS, 100, 150, 93, 12 + LTEXT "&Tidsavbrudd:", -1, 280, 91, 70, 10 + EDITTEXT IDC_TXT_BOOT_TIMEOUT, 280, 100, 25, 12, ES_LEFT + LTEXT "sekunder", -1, 310, 100, 85, 10 END IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175 diff --git a/reactos/base/applications/mstsc/lang/no-NO.rc b/reactos/base/applications/mstsc/lang/no-NO.rc index 21f0caf4a37..70585e74f8d 100644 --- a/reactos/base/applications/mstsc/lang/no-NO.rc +++ b/reactos/base/applications/mstsc/lang/no-NO.rc @@ -31,8 +31,8 @@ BEGIN COMBOBOX IDC_BPPCOMBO,56,102,128,80, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP CONTROL "",IDC_COLORIMAGE,"Static",SS_OWNERDRAW | SS_SUNKEN, 56,121,127,10 LTEXT "OBS: Innstillingen pе den eksterne datamaskinen kan overstyre denne innstillingen.",IDC_STATIC,56,143,165,18 - LTEXT "Mindre",IDC_STATIC,35,42,15,8 - LTEXT "Stшrre",IDC_STATIC,189,42,17,8 + LTEXT "Mindre",IDC_STATIC,35,42,22,8 + LTEXT "Stшrre",IDC_STATIC,189,42,19,8 LTEXT "", IDC_SETTINGS_RESOLUTION_TEXT, 56, 62, 120, 10, SS_CENTER END diff --git a/reactos/base/applications/network/ipconfig/lang/no-NO.rc b/reactos/base/applications/network/ipconfig/lang/no-NO.rc index df361e608b9..156878a0554 100644 --- a/reactos/base/applications/network/ipconfig/lang/no-NO.rc +++ b/reactos/base/applications/network/ipconfig/lang/no-NO.rc @@ -53,7 +53,7 @@ BEGIN \n \ For Setclassid, fjernes ClassId hvis det ikke angis en ClassId.\n \ \n \ - Examples:\n \ + Eksempler:\n \ > ipconfig ... Vis informasjon.\n \ > ipconfig /all ... Vis detaljert informasjon\n \ > ipconfig /renew ... Forny alle kort\n \ diff --git a/reactos/base/applications/screensavers/3dtext/lang/ko-KR.rc b/reactos/base/applications/screensavers/3dtext/lang/ko-KR.rc new file mode 100644 index 00000000000..3a6d609b8ce --- /dev/null +++ b/reactos/base/applications/screensavers/3dtext/lang/ko-KR.rc @@ -0,0 +1,21 @@ +/* + *Korean Translation by Seungju Kim(www.manatails007.org) manatails007* + */ + +LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT + +DLG_SCRNSAVECONFIGURE DIALOGEX 0, 0, 273, 178 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "3D ЕШЅєЖ® И­ёй єёИЈ±в јіБ¤" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + DEFPUSHBUTTON "И®АО",IDOK,216,7,50,14 + PUSHBUTTON "ГлјТ",IDCANCEL,216,24,50,14 + EDITTEXT IDC_MESSAGE_TEXT,18,28,122,14,ES_AUTOHSCROLL + LTEXT "ДїЅєЕТ ЕШЅєЖ®",IDC_STATIC,18,17,65,8 +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_DESCRIPTION "3D ЕШЅєЖ® И­ёй єёИЈ±в" +END diff --git a/reactos/base/applications/screensavers/3dtext/rsrc.rc b/reactos/base/applications/screensavers/3dtext/rsrc.rc index 6b9ded6e2f5..902f6e4479d 100644 --- a/reactos/base/applications/screensavers/3dtext/rsrc.rc +++ b/reactos/base/applications/screensavers/3dtext/rsrc.rc @@ -18,6 +18,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include "lang/eu-ES.rc" #include "lang/fr-FR.rc" #include "lang/it-IT.rc" +#include "lang/ko-KR.rc" #include "lang/lt-LT.rc" #include "lang/no-NO.rc" #include "lang/pl-PL.rc" diff --git a/reactos/base/applications/screensavers/logon/lang/ko-KR.rc b/reactos/base/applications/screensavers/logon/lang/ko-KR.rc new file mode 100644 index 00000000000..a5e8afe6f7f --- /dev/null +++ b/reactos/base/applications/screensavers/logon/lang/ko-KR.rc @@ -0,0 +1,11 @@ +/* + *Korean Translation by Seungju Kim(www.manatails007.org) manatails007* + */ + +LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT + +STRINGTABLE DISCARDABLE +BEGIN + IDS_DESCRIPTION "·О±ЧїВ И­ёй єёИЈ±в" + IDS_TEXT "јіБ¤ЗТ °НАМ ѕшЅАґПґЩ." +END diff --git a/reactos/base/applications/screensavers/logon/logon.rc b/reactos/base/applications/screensavers/logon/logon.rc index 5ab8c22d1b0..d954e935291 100644 --- a/reactos/base/applications/screensavers/logon/logon.rc +++ b/reactos/base/applications/screensavers/logon/logon.rc @@ -20,6 +20,7 @@ IDB_SERVER BITMAP DISCARDABLE "res/1.bmp" #include "lang/es-ES.rc" #include "lang/eu-ES.rc" #include "lang/fr-FR.rc" +#include "lang/ko-KR.rc" #include "lang/lt-LT.rc" #include "lang/nl-NL.rc" #include "lang/no-NO.rc" diff --git a/reactos/base/applications/sndvol32/lang/ko-KR.rc b/reactos/base/applications/sndvol32/lang/ko-KR.rc new file mode 100644 index 00000000000..c03a63b592b --- /dev/null +++ b/reactos/base/applications/sndvol32/lang/ko-KR.rc @@ -0,0 +1,46 @@ +/* + *Korean Translation by Seungju Kim(www.manatails007.org) manatails007* + */ +LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT + +IDM_MAINMENU MENU DISCARDABLE +BEGIN + POPUP "їЙјЗ(&P)" + BEGIN + MENUITEM "јУјє(&R)", IDC_PROPERTIES + MENUITEM "°н±Ю ДБЖ®·С(&A)", IDC_ADVANCED_CONTROLS + MENUITEM SEPARATOR + MENUITEM "Бѕ·б(&X)", IDC_EXIT + END + POPUP "µµїтё»(&H)" + BEGIN + MENUITEM "µµїтё» ЗЧёс(&H)", IDC_HELP_TOPICS + MENUITEM SEPARATOR + MENUITEM "єј·э ДБЖ®·С Б¤єё(&A)", IDC_ABOUT + END +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_SNDVOL32 "єј·э ДБЖ®·С" + IDS_NOMIXERDEVICES "»зїл °ЎґЙЗС №Нј­ АеДЎ°Ў ѕшЅАґПґЩ! АМ ЗБ·О±Ч·ҐАє Бѕ·бµЛґПґЩ." +END + +IDD_PREFERENCES DIALOGEX 0, 0, 224, 250 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "јУјє" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "№Нј­ АеДЎ(&M):", -1, 7,8,48,9 + COMBOBOX IDC_MIXERDEVICE, 55,8,162,80, CBS_DROPDOWNLIST | WS_TABSTOP + GROUPBOX "єј·э Б¶Аэ:", -1, 7,25,211,77 + PUSHBUTTON "Аз»э(&P)", IDC_PLAYBACK, 13,43,47,8, BS_AUTORADIOBUTTON + PUSHBUTTON "імАЅ(&R)", IDC_RECORDING, 13,61,47,8, BS_AUTORADIOBUTTON + PUSHBUTTON "±вЕё(&O):", IDC_OTHER, 13,80,42,8, BS_AUTORADIOBUTTON | WS_DISABLED + COMBOBOX IDC_LINE, 55,80,155,50, CBS_DROPDOWNLIST | WS_TABSTOP | WS_DISABLED + LTEXT "ґЩАЅ єј·э ДБЖ®·С ЗҐЅГ:", IDC_LABELCONTROLS, 7, 109, 162, 8 + CONTROL "", IDC_CONTROLS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | WS_TABSTOP | WS_BORDER, 7, 122, 211, 96 + + PUSHBUTTON "И®АО", IDOK, 114,226,50,14 + PUSHBUTTON "ГлјТ", IDCANCEL, 168,226,50,14 +END diff --git a/reactos/base/applications/sndvol32/rsrc.rc b/reactos/base/applications/sndvol32/rsrc.rc index a58d947ba2d..875fc670bd3 100644 --- a/reactos/base/applications/sndvol32/rsrc.rc +++ b/reactos/base/applications/sndvol32/rsrc.rc @@ -17,6 +17,7 @@ IDI_MAINAPP ICON DISCARDABLE resources/sndvol32.ico #include "lang/it-IT.rc" #include "lang/ja-JP.rc" #include "lang/lt-LT.rc" +#include "lang/ko-KR.rc" #include "lang/nl-NL.rc" #include "lang/no-NO.rc" #include "lang/pl-PL.rc" diff --git a/reactos/dll/cpl/access/lang/no-NO.rc b/reactos/dll/cpl/access/lang/no-NO.rc index 1c2914c47d2..92adee75ad2 100644 --- a/reactos/dll/cpl/access/lang/no-NO.rc +++ b/reactos/dll/cpl/access/lang/no-NO.rc @@ -223,7 +223,7 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Avanserte innstillinger for filtertaster" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Bounce Keys",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(5) + GROUPBOX "Gjentatt taster",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(5) LTEXT "&Ignorer tastetrykk som gjentas raskere enn:",-1,PROPSHEETPADDING(2),LABELLINE(2)+1,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) COMBOBOX IDC_BOUNCE_TIME_COMBO, PROPSHEETPADDING(2), LABELLINE(3)+5, PROPSHEETWIDTH-PROPSHEETPADDING(4), LABELLINE(6), CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP @@ -241,7 +241,7 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Avanserte innstillinger for filtertaster" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Repeat Keys",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(12) + GROUPBOX "Repetisjontaster",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(12) LTEXT "Overstyr innstillingene under tastatur i kontrollpanel:",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) AUTORADIOBUTTON "&Ingen repetisjon",IDC_REPEAT_NOREPEAT_RADIO,PROPSHEETPADDING(2),LABELLINE(3)+3,78,LABELLINE(1),WS_GROUP diff --git a/reactos/dll/cpl/appwiz-new/lang/no-NO.rc b/reactos/dll/cpl/appwiz-new/lang/no-NO.rc index 1f9c89d3c49..b85a4fcb07f 100644 --- a/reactos/dll/cpl/appwiz-new/lang/no-NO.rc +++ b/reactos/dll/cpl/appwiz-new/lang/no-NO.rc @@ -26,8 +26,8 @@ CAPTION "Opprett snarvei" FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDB_WATERMARK, "STATIC", SS_BITMAP | SS_REALSIZEIMAGE, 0, 0, WATERMARK_WIDTH, SHORTCUTDLG_HEIGHT - LTEXT "This wizard helps you to create shortcuts to local or network programs, files, folders, computers, or Internet addresses.", -1, 97, 7, 195, 28 - LTEXT "&Type the location of the item:", IDC_LOCATIONITEM, 98, 46, 196, 8 + LTEXT "Denne veiviseren vil hjelpe deg med е opprette en snarvei til lokale programmer eller nettverksprogrammer, filer, mapper, datamaskiner, eller internett addresser.", -1, 97, 7, 195, 28 + LTEXT "&Velg plasseringen for enheten:", IDC_LOCATIONITEM, 98, 46, 196, 8 EDITTEXT IDC_LOCITEMEDIT, 97, 58, 133, 14, ES_AUTOHSCROLL PUSHBUTTON "B&la gjennom...", IDC_LOCBROWSE, 233, 58, 60, 14 LTEXT "Klikk pе neste for е forsette.", -1, 97, 95, 198, 8 @@ -46,10 +46,10 @@ END IDD_SELPROGTITLE DIALOGEX 0, 0, SHORTCUTDLG_WIDTH, SHORTCUTDLG_HEIGHT STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "Select a Title for the Program" +CAPTION "Velg en tittel for programmet" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&Type a name for this shortcut:", -1, 100, 10, 194, 10 + LTEXT "&Velg et navn for denne snarveien:", -1, 100, 10, 194, 10 EDITTEXT IDC_NAMESCEDIT, 100, 23, 194, 14, ES_AUTOHSCROLL CONTROL "", IDB_WATERMARK, "STATIC", SS_BITMAP | SS_REALSIZEIMAGE, 0, 0, WATERMARK_WIDTH, SHORTCUTDLG_HEIGHT LTEXT "Klikk fullfшrt for е opprette snarveien.", -1, 100, 61, 194, 8 @@ -94,18 +94,18 @@ CAPTION "Endre bruker valg" FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDB_WATERMARK, "STATIC", SS_BITMAP | SS_REALSIZEIMAGE, 0, 0, WATERMARK_WIDTH, SHORTCUTDLG_HEIGHT - LTEXT "You have the option to make this new program available to every User.", 1012, 101, 5, 194, 40 + LTEXT "Du har valget for е gjшre dette nye programmet tilgjengelig for alle brukere.", 1012, 101, 5, 194, 40 AUTORADIOBUTTON "Installere", IDC_INSTALLRB, 108, 51, 146, 14, BS_MULTILINE | WS_GROUP AUTORADIOBUTTON "Kjшr", IDC_LOCATIONITEM, 108, 74, 146, 14, BS_MULTILINE | NOT WS_TABSTOP END IDD_FINISHADMINST DIALOG 0, 0, SHORTCUTDLG_WIDTH, SHORTCUTDLG_HEIGHT STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "Finish Admin Install" +CAPTION "Fullfшre admin installasjon" FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDB_WATERMARK, "STATIC", SS_BITMAP | SS_REALSIZEIMAGE, 0, 0, WATERMARK_WIDTH, SHORTCUTDLG_HEIGHT - LTEXT "Change ini mapping back by clicking Finish.", IDC_HEADTEXT, 98, 7, 196, 40 + LTEXT "Endre ini mapper tilbake ved е trykke pе Fullfшrt.", IDC_HEADTEXT, 98, 7, 196, 40 END IDD_AFTERINST DIALOG 0, 0, SHORTCUTDLG_WIDTH, SHORTCUTDLG_HEIGHT @@ -122,8 +122,8 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION CAPTION "Kjшr installasjons program" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Please specify the uninstall program location.", IDC_UNINSTLOCTEXT, 9, 8, 235, 37 - LTEXT "&Command line for the uninstall program:", IDC_LOCATIONITEM, 9, 57, 237, 8 + LTEXT "Vennligst velg avinnstalleringsprogram plassering.", IDC_UNINSTLOCTEXT, 9, 8, 235, 37 + LTEXT "&Komando linje for avinnstalleringsprogrammet:", IDC_LOCATIONITEM, 9, 57, 237, 8 EDITTEXT IDC_LOCITEMEDIT, 7, 69, 165, 14, ES_AUTOHSCROLL PUSHBUTTON "B&la gjennom...", IDC_LOCBROWSE, 178, 69, 66, 14 DEFPUSHBUTTON "OK", IDOK, 118, 100, 60, 14 @@ -136,9 +136,9 @@ CAPTION "Advarsel" FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_WARNINGICON, 8, 10, 20, 20 - LTEXT "There are other users logged on to this computer.", -1, 37, 8, 214, 10 - LTEXT "If you uninstall this program while another user is running it, the program might not uninstall completely.", -1, 37, 23, 212, 22 - LTEXT "To properly change or remove this program, switch to and log off each user before you continue.", IDC_WARNINGTEXT, 37, 46, 212, 26 + LTEXT "Det er andre brukere som er logget pе denne datamaskinen.", -1, 37, 8, 214, 10 + LTEXT "Hvis du vil avinstallere dette programmet mens en annen bruker det, vil ikke programmet bli fjernet fullstendig.", -1, 37, 23, 212, 22 + LTEXT "For е fullstendig endre eller fjerne dette programmet, bytt til og logg av alle brukere fшr du fortsetter.", IDC_WARNINGTEXT, 37, 46, 212, 26 PUSHBUTTON "&Bytt bruker", IDC_SWITCHUSER, 61, 81, 60, 14 PUSHBUTTON "&Fortsett", IDOK, 125, 81, 60, 14 PUSHBUTTON "Avbryt", IDCANCEL, 189, 81, 60, 14 @@ -149,7 +149,7 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBL CAPTION "Fjern snarveier/mapper" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&To remove an item from the Start menu, select the item and click Remove.", IDC_UNINSTLOCTEXT, 10, 7, 204, 16 + LTEXT "&For е fjerne en enhet fra Start menyen, velg en enhet og trykk pе Fjern.", IDC_UNINSTLOCTEXT, 10, 7, 204, 16 CONTROL "", IDC_SELFOLDER, "SYSTREEVIEW32", WS_BORDER | WS_TABSTOP | 0x00000023, 10, 28, 200, 145 PUSHBUTTON "&Fjern", IDC_REMOVEBTN, 84, 182, 60, 14 DEFPUSHBUTTON "Lukk", IDOK, 151, 182, 60, 14 @@ -160,10 +160,10 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTERMOUSE | WS_POPUPWINDOW | WS_CAPTIO CAPTION "Legg til senere" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "You may choose a date and time when you would like to add this program to your computer. For example, you can schedule this to happen when you are away from your computer.", IDC_UNINSTLOCTEXT, 7, 4, 208, 33 - AUTORADIOBUTTON "&Add program later", IDC_ADDPROGLATER, 7, 47, 207, 10, WS_GROUP + LTEXT "Du kan ha valgt en dato og tid nеr du vil legge til dette programmet til din datamaskin. For eksempel, kan du planlegge det som skal skje nеr du er borte din datamaskin.", IDC_UNINSTLOCTEXT, 7, 4, 208, 33 + AUTORADIOBUTTON "&Legg til et program senere", IDC_ADDPROGLATER, 7, 47, 207, 10, WS_GROUP CONTROL "Picker", 12368, "SYSDATETIMEPICK32", WS_BORDER | WS_TABSTOP | 0x0000000C, 29, 62, 107, 14 - AUTORADIOBUTTON "&Do not add program", IDC_NOTADDPROG, 7, 87, 208, 10 + AUTORADIOBUTTON "&Ikke legg til programmer", IDC_NOTADDPROG, 7, 87, 208, 10 DEFPUSHBUTTON "OK", IDOK, 89, 141, 60, 14, WS_GROUP PUSHBUTTON "Avbryt", IDCANCEL, 154, 141, 60, 14, NOT WS_TABSTOP END @@ -172,7 +172,7 @@ STRINGTABLE BEGIN IDS_CPLSYSTEMNAME "Legg til eller fjern programmer" IDS_CPLSYSTEMDESCRIPTION "Innstaller eller fjern programmer og ReactOS komponenter." - IDS_UNABLEOPEN_UNINSTKEY "Unable to open Uninstall Key" + IDS_UNABLEOPEN_UNINSTKEY "Ikke mulig е еpne avinnstallering nшkkel" IDS_LIST_TITLE "Liste" IDS_SIZE_TITLE "Stшrrelse (MB)" IDS_LAST_USED "Sist bruk" @@ -180,11 +180,11 @@ BEGIN IDS_PROGRAMS_ONLY "Bare programmer" IDS_UPDATES_ONLY "Bare oppdateringer" IDS_WELCOME_TITLE "Velkommen til assistenten for е legg til eller fjerne programmer" - IDS_WELCOME_MSG "Please choose a category on the left or select application on the list for removing or viewing information." + IDS_WELCOME_MSG "Venligst velg en kategori til venstre eller velg et program pе listen for е fjerne eller vise informasjon." IDS_SEARCH_TEXT "Sшk i listen..." IDS_REMOVE_BTN "&Fjern" IDS_MODIFY_BTN "&Endre" - IDS_UNABLEREAD_UNINSTSTR "Unable to read UninstallString. This entry is invalid or has been created by an MSI installer." + IDS_UNABLEREAD_UNINSTSTR "Ikke mulig е lese Avinnstallerings streng. Denne enheten er ugyldig eller har blitt opprettet av en MSI installering." IDS_INF_REG_OWNER "Registerert eier: " IDS_INF_PRODUCT_ID "Produkt ID: " IDS_INF_PUBLISHER "Utgiver: " @@ -193,7 +193,7 @@ BEGIN IDS_INF_SUP_INFO "Hjelp informasjon: " IDS_INF_SUP_PHONE "Hjelp telefon: " IDS_INF_PRODUCT_UPD "Produkt oppdateringer: " - IDS_INF_README "Readme: " + IDS_INF_README "Les meg: " IDS_INF_COMMENTS "Kommentarer: " IDS_NO_INFORMATION "Ingen informasjon om dette programmet." END diff --git a/reactos/dll/cpl/desk/lang/no-NO.rc b/reactos/dll/cpl/desk/lang/no-NO.rc index a7a1e6d6d2b..c8dd590f63d 100644 --- a/reactos/dll/cpl/desk/lang/no-NO.rc +++ b/reactos/dll/cpl/desk/lang/no-NO.rc @@ -37,8 +37,8 @@ BEGIN UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 54, 123, 12, 13 LTEXT "minutter", IDC_MINTEXT, 70, 125, 26, 9 - CONTROL "Spшr etter &passord ved gjennopptakelse.",IDC_SCREENS_USEPASSCHK,"button", - BS_AUTOCHECKBOX | WS_TABSTOP, 108, 120, 104, 19 + CONTROL "Krev &passord ved gjenopptakelse.",IDC_SCREENS_USEPASSCHK,"button", + BS_AUTOCHECKBOX | WS_TABSTOP, 108, 120, 125, 19 GROUPBOX "&Strшmsparing funksjon", IDC_SCREENS_DUMMY2, 6, 155, 232, 41 LTEXT "For е tilpasse strшminnstillingene for din skjerm, klikk pе strшm innstillingene.", IDC_STATIC, 14, 166, 146 ,20 @@ -53,7 +53,7 @@ FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDC_APPEARANCE_PREVIEW, "PreviewWndClass", WS_VISIBLE | WS_BORDER, 7, 7, 232, 120 - LTEXT "Fargevalg", IDC_STATIC, 7, 140, 64, 7 + LTEXT "Fargevalg", IDC_STATIC, 7, 140, 64, 9 COMBOBOX IDC_APPEARANCE_COLORSCHEME, 7, 150, 134, 90 , CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Avansert", IDC_APPEARANCE_ADVANCED, 182, 150, 56, 15 END @@ -70,23 +70,23 @@ BEGIN LTEXT "Element:", 8, 5, 160, 50, 9 COMBOBOX IDC_ADVAPPEARANCE_ELEMENT, 5, 170, 130, 90, CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_SORT | WS_CHILD | WS_VSCROLL | WS_TABSTOP - LTEXT "&Stшrrelse", IDC_ADVAPPEARANCE_SIZE_T, 142, 164, 20, 9 + LTEXT "&Stшrrelse", IDC_ADVAPPEARANCE_SIZE_T, 142, 160, 64, 9 EDITTEXT IDC_ADVAPPEARANCE_SIZE_E, 142, 170, 38, 13, ES_RIGHT | WS_GROUP CONTROL "", IDC_ADVAPPEARANCE_SIZE_UD, UPDOWN_CLASS, UDS_AUTOBUDDY | WS_BORDER | WS_GROUP | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_SETBUDDYINT | WS_CHILD | WS_VISIBLE, 172, 170, 10, 13 - LTEXT "&Farge 1:", IDC_ADVAPPEARANCE_COLOR1_T, 184, 160, 40, 9 + LTEXT "&Farge 1:", IDC_ADVAPPEARANCE_COLOR1_T, 184, 160, 44, 9 CHECKBOX "-", IDC_ADVAPPEARANCE_COLOR1_B, 184, 170, 28, 13, BS_PUSHLIKE | BS_BITMAP - LTEXT "&Farge 2:", IDC_ADVAPPEARANCE_COLOR2_T, 216, 160, 40, 9 + LTEXT "&Farge 2:", IDC_ADVAPPEARANCE_COLOR2_T, 216, 160, 44, 9 CHECKBOX "-", IDC_ADVAPPEARANCE_COLOR2_B, 216, 170, 28, 13, BS_PUSHLIKE | BS_BITMAP - LTEXT "Skrift:", IDC_ADVAPPEARANCE_FONT_T, 5, 190, 50, 8 + LTEXT "Skrift:", IDC_ADVAPPEARANCE_FONT_T, 5, 190, 60, 8 COMBOBOX IDC_ADVAPPEARANCE_FONT_C, 5, 200, 130, 90, CBS_DROPDOWN | CBS_HASSTRINGS | CBS_SORT | WS_VSCROLL | WS_TABSTOP - LTEXT "Skrift stшrrelse:", IDC_ADVAPPEARANCE_FONTSIZE_T, 142, 190, 41, 8 + LTEXT "Stшrrelse:", IDC_ADVAPPEARANCE_FONTSIZE_T, 142, 190, 64, 8 COMBOBOX IDC_ADVAPPEARANCE_FONTSIZE_E, 142, 200, 38, 200, CBS_DROPDOWN | WS_VSCROLL - LTEXT "Farger:", IDC_ADVAPPEARANCE_FONTCOLOR_T, 184, 194, 20, 9 + LTEXT "Farger:", IDC_ADVAPPEARANCE_FONTCOLOR_T, 184, 190, 25, 9 CHECKBOX "", IDC_ADVAPPEARANCE_FONTCOLOR_B, 184, 200, 28, 13, BS_PUSHLIKE | BS_BITMAP AUTOCHECKBOX "B", IDC_ADVAPPEARANCE_FONTBOLD, 216, 200, 14, 13, BS_PUSHLIKE @@ -108,7 +108,7 @@ BEGIN GROUPBOX "&Skjermomrеde",1818,3,127,115,43 CONTROL "",IDC_SETTINGS_RESOLUTION,"msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 30, 137, 58, 17 - LTEXT "Mindre",1815,9,137,15,8,NOT WS_GROUP + LTEXT "Mindre",1815,9,137,21,8,NOT WS_GROUP LTEXT "Mere",1816,93,137,21,8,NOT WS_GROUP LTEXT "",IDC_SETTINGS_RESOLUTION_TEXT,10,157,100,10,NOT WS_GROUP | SS_CENTER GROUPBOX "&Farger",1817,125,127,115,43 @@ -149,7 +149,7 @@ BEGIN MENUITEM "&Primary", ID_MENU_PRIMARY MENUITEM SEPARATOR MENUITEM "&Identify", ID_MENU_IDENTIFY - MENUITEM "P&roperties", ID_MENU_PROPERTIES + MENUITEM "E&genskaper", ID_MENU_PROPERTIES END END @@ -204,7 +204,7 @@ BEGIN IDS_ELEMENT_4 "Caption of active windows" IDS_ELEMENT_5 "Border of active windows" IDS_ELEMENT_6 "Meny" - IDS_ELEMENT_7 "Selected Items" + IDS_ELEMENT_7 "Valgt enhet" IDS_ELEMENT_8 "Vindu" IDS_ELEMENT_9 "Scrollbars" IDS_ELEMENT_10 "3D objects" diff --git a/reactos/dll/cpl/main/lang/no-NO.rc b/reactos/dll/cpl/main/lang/no-NO.rc index 01432755562..f7b9dab3c07 100644 --- a/reactos/dll/cpl/main/lang/no-NO.rc +++ b/reactos/dll/cpl/main/lang/no-NO.rc @@ -8,14 +8,14 @@ BEGIN GROUPBOX "Repetisjonshastighet", -1, 5, 5, 236, 135 ICON IDI_REPEAT_DELAY, IDC_ICON_REPEAT_DELAY, 13, 18, 15, 15 LTEXT "Repetisjon&forsinkelse:", -1, 40, 18, 100, 10 - LTEXT "Lang", -1, 40, 33, 20, 10 - LTEXT "Kort", -1, 200, 33, 20, 10 - CONTROL "",IDC_SLIDER_REPEAT_DELAY, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 65, 33, 130, 17 + LTEXT "Lang", -1, 40, 33, 52, 10 + LTEXT "Kort", -1, 210, 33, 20, 10 + CONTROL "",IDC_SLIDER_REPEAT_DELAY, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 75, 33, 130, 17 ICON IDI_REPEAT_RATE, IDC_ICON_REPEAT_RATE, 13, 70, 15, 15 LTEXT "&Repetisjonshastighet:", -1, 40, 70, 100, 10 - LTEXT "Langsom", -1, 40, 85, 20, 10 - LTEXT "Rask", -1, 200, 85, 20, 10 - CONTROL "",IDC_SLIDER_REPEAT_RATE, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 65, 85, 130, 17 + LTEXT "Langsom", -1, 40, 85, 62, 10 + LTEXT "Rask", -1, 210, 85, 20, 10 + CONTROL "",IDC_SLIDER_REPEAT_RATE, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 75, 85, 130, 17 LTEXT "Klikk her og hold nede en tast for е &teste repetisjonshastigheten:", -1, 15, 105, 216, 10 EDITTEXT IDC_EDIT_REPEAT_RATE, 15, 116, 216, 14, WS_CHILD | WS_VISIBLE | WS_GROUP GROUPBOX "Markшr&blinking:", -1, 5, 145, 236, 50 @@ -37,12 +37,12 @@ STYLE DS_SHELLFONT | WS_CAPTION | WS_SYSMENU CAPTION "Klikklеs" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Kort", -1, 50, 35, 27, 10 - LTEXT "Langt", -1, 157, 35, 27, 10 + LTEXT "Kort tid", -1, 50, 35, 40, 10 + LTEXT "Langt tid", -1, 157, 35, 40, 10 CONTROL "",IDC_SLIDER_CLICK_LOCK, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 78, 35, 70, 17 PUSHBUTTON "&OK", IDOK, 110, 59, 60, 14 PUSHBUTTON "&Avbryt", IDCANCEL, 174, 59, 60, 14 - LTEXT "&Adjust how long you need to hold down a mouse or trackball button before your click is locked",-1,37,5,200,27 + LTEXT "&Juster hvor lenge du mе holde mus eller styrekuleknappen nede fшr klikket er lеst.",-1,37,5,200,27 ICON IDI_LOOK_KEY, IDC_ICON_CLICK_LOCK, 5, 5, 15, 15 END @@ -57,9 +57,10 @@ BEGIN LTEXT "Merk av i denne avmerkningsboksen for е gjшre knappen til hшyre til den du bruker til primжrfunksjoner som е velge е dra.", -1, 10, 36, 156, 30 GROUPBOX "Hastighet pе dobbeltklikking", -1, 5, 78, 236, 70 LTEXT "Dobbeltklikk mappen for е teste innstillingen. Hvis mappen ikke lukkes eller еpnes, kan du prшve med en langsommere innstilling.", -1, 10, 90, 156, 28 - LTEXT "Hastig&het: Langsom", -1, 10, 123, 50, 10 - LTEXT "Rask", -1, 136, 123, 24, 10 - CONTROL "",IDC_SLIDER_DOUBLE_CLICK_SPEED, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 60, 123, 70, 17 + LTEXT "Hastig&het:", -1, 10, 123, 90, 10 + LTEXT "Langsom", -1, 10, 130, 90, 10 + LTEXT "Rask", -1, 140, 130, 24, 10 + CONTROL "",IDC_SLIDER_DOUBLE_CLICK_SPEED, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 40, 130, 90, 17 CONTROL "", IDC_IMAGE_DOUBLE_CLICK_SPEED, "Static", SS_ICON | SS_NOTIFY | SS_CENTERIMAGE | WS_VISIBLE, 171, 87, 65, 57, WS_EX_STATICEDGE GROUPBOX "Klikklеs", -1, 5, 150, 236, 70 CHECKBOX "&Slе pе klikklеs", IDC_CHECK_CLICK_LOCK, 10, 160, 70, 20 @@ -86,10 +87,10 @@ END IDD_CURSOR_SCHEME_SAVEAS DIALOGEX 0, 0, 192, 53 STYLE DS_SHELLFONT | WS_CAPTION | WS_SYSMENU -CAPTION "Lagre Scheme" +CAPTION "Lagre oppsett" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Lagre denne cursor scheme som:", -1, 5, 5, 181, 10 + LTEXT "Lagre dette markшroppsettet som:", -1, 5, 5, 190, 10 EDITTEXT IDC_EDIT_SCHEME_NAME, 5, 15, 180, 15, WS_CHILD | WS_VISIBLE | WS_GROUP PUSHBUTTON "&OK", IDOK, 63, 35, 60, 14 PUSHBUTTON "&Avbryt", IDCANCEL, 126, 35, 60, 14 @@ -103,7 +104,7 @@ FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Bevegelse", -1, 5, 5, 236, 60 LTEXT "Ve&lg en pekehastighet:", -1, 52, 15, 110, 10 - LTEXT "Langsomt", -1, 60, 30, 20, 10 + LTEXT "Langsom", -1, 54, 30, 40, 10 CONTROL "",IDC_SLIDER_MOUSE_SPEED, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 90, 30, 70, 17 LTEXT "Rask", -1, 170, 30, 20, 10 ICON IDI_MOUSE_SPEED, IDC_ICON_MOUSE_SPEED, 18, 20, 32, 32 @@ -134,7 +135,7 @@ BEGIN ICON IDI_MOUSE_WHEEL, IDC_ICON_WHEEL, 20, 20, 32, 32 LTEXT "Rull hjulet ett hakk for е rulle:", -1, 60, 15, 150, 10 RADIOBUTTON "Fшlgende &antall linjer om gangen:", IDC_RADIO_WHEEL_SCROLL_LINES, 60, 30, 150, 10, WS_VISIBLE | WS_GROUP | WS_TABSTOP - RADIOBUTTON "&En skjermhшyde av gangen", IDC_RADIO_WHEEL_SCROLL_PAGE, 60, 65, 90, 10 + RADIOBUTTON "&En skjermhшyde av gangen", IDC_RADIO_WHEEL_SCROLL_PAGE, 60, 65, 150, 10 EDITTEXT IDC_EDIT_WHEEL_SCROLL_LINES, 70, 45, 60, 15, ES_RIGHT | WS_VISIBLE | WS_GROUP | WS_TABSTOP CONTROL "", IDC_UPDOWN_WHEEL_SCROLL_LINES, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER, 125, 45, 12, 12 END @@ -146,27 +147,27 @@ BEGIN IDS_CPLNAME_2 "Tastatur" IDS_CPLDESCRIPTION_2 "Endre tastatur innstillinger." IDS_ARROW "Vanlig merkering" - IDS_HELP "Hjelp valg" + IDS_HELP "Hjelpemerking" IDS_APPSTARTING "Arbeider i bakgrunnen" - IDS_WAIT "Busy" - IDS_CROSSHAIR "Precision Select" - IDS_IBEAM "Tekst valgt" - IDS_NWPEN "Handskriving" - IDS_NO "Utilgjengelig" - IDS_SIZENS "Vertical Resize" - IDS_SIZEWE "Horizontal Resize" - IDS_SIZENWSE "Diagonal Resize 1" - IDS_SIZENESW "Diagonal Resize 2" + IDS_WAIT "Opptatt" + IDS_CROSSHAIR "Presisjonsmerking" + IDS_IBEAM "Tekstmerking" + IDS_NWPEN "Handskrift" + IDS_NO "Ikke tilgjengelig" + IDS_SIZENS "Endre stшrrelse loddrett" + IDS_SIZEWE "Endre stшrrelse vannrett" + IDS_SIZENWSE "Endre stшrrelse diagonalt 1" + IDS_SIZENESW "Endre stшrrelse diagonalt 2" IDS_SIZEALL "Flytt" - IDS_UPARROW "Alternative Select" - IDS_HAND "Link Select" + IDS_UPARROW "Valg alternativ" + IDS_HAND "Koblingspeker" IDS_NONE "(Ingen)" - IDS_SYSTEM_SCHEME "(system scheme)" - IDS_BROWSE_FILTER "Cursors (*.ani, *.cur)\0*.ani;*.cur\0Animated Cursors (*.ani)\0*.ani\0Static Cursors (*.cur)\0*.cur\0All Files\0*.*\0\0" + IDS_SYSTEM_SCHEME "(systemoppsett)" + IDS_BROWSE_FILTER "Markшrer (*.ani, *.cur)\0*.ani;*.cur\0Animerte markшrer (*.ani)\0*.ani\0Statiske markшrer (*.cur)\0*.cur\0Alle filer\0*.*\0\0" IDS_BROWSE_TITLE "Bla gjennom" - IDS_REMOVE_TITLE "Confirm Cursor Scheme Removal" - IDS_REMOVE_TEXT "Are you sure you want to remove the cursor scheme '%s'?" - IDS_OVERWRITE_TITLE "Confirm Cursor Scheme Overwrite" - IDS_OVERWRITE_TEXT "The cursor scheme name you chose is already in use. Do you want to overwrite the existing cursor scheme?" - IDS_ANIMATE_CURSOR "Animated Cursor" + IDS_REMOVE_TITLE "Bekreft markшroppsett fjerning" + IDS_REMOVE_TEXT "Er du sikker pе at du vil fjerne the markшroppsett '%s'?" + IDS_OVERWRITE_TITLE "Bekreft markшroppsett overskrivning" + IDS_OVERWRITE_TEXT "Fшlgene markшroppsett navnet som du valgte er i bruk. Vil du overskrive eksisterende markшroppsett?" + IDS_ANIMATE_CURSOR "Animerte markшr" END diff --git a/reactos/dll/cpl/sysdm/lang/no-NO.rc b/reactos/dll/cpl/sysdm/lang/no-NO.rc index b28e44c1db4..70ead201165 100644 --- a/reactos/dll/cpl/sysdm/lang/no-NO.rc +++ b/reactos/dll/cpl/sysdm/lang/no-NO.rc @@ -49,7 +49,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Avansert" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Du mе vжre logget pе som administrator for е kunne endre de fleste av disse innstillingene.", IDC_STATIC, 12, 5, 236, 8 + LTEXT "Du mе vжre logget pе som administrator for е kunne endre innstillingene.", IDC_STATIC, 12, 5, 255, 8 GROUPBOX "Ytelse", IDC_STATIC, 6, 18, 244, 50 LTEXT "Visuelle effekter, prosesorplanlegging, minnebruk og virtuelt minne.", IDC_STATIC, 16, 29, 228, 17 PUSHBUTTON "Innstillinger", IDC_PERFOR, 194, 48, 50, 15 @@ -177,15 +177,15 @@ BEGIN LTEXT "Sidevekslingsfilstшrrelse (MB)", IDC_STATIC, 115, 5, 96, 9 LISTBOX IDC_PAGEFILELIST, 10, 16, 204, 52, LBS_NOTIFY | LBS_USETABSTOPS GROUPBOX "Sidevekslingsfilstшrrelse for valgte enhet", IDC_DRIVEGROUP, 10, 70, 204, 104 - LTEXT "Stasjon:", IDC_STATIC, 20, 80, 20, 8 - LTEXT "", IDC_DRIVE, 88, 81, 100, 9 - LTEXT "Tilgjengelig ledig plass:", IDC_STATIC, 20, 92, 56, 9 - LTEXT "", IDC_SPACEAVAIL, 88, 92, 104, 9 + LTEXT "Stasjon:", IDC_STATIC, 20, 80, 24, 8 + LTEXT "", IDC_DRIVE, 100, 81, 100, 9 + LTEXT "Tilgjengelig ledig plass:", IDC_STATIC, 20, 92, 75, 9 + LTEXT "", IDC_SPACEAVAIL, 100, 92, 104, 9 LTEXT "&Startstшrrelse (MB):", -1, 22, 118, 75, 9 LTEXT "Ma&ksimalt stшrrelse (MB):", -1, 22, 131, 75, 9 - AUTORADIOBUTTON "&Tilpass stшrrelse", IDC_CUSTOM, 20, 105, 54, 9, WS_GROUP + AUTORADIOBUTTON "&Tilpass stшrrelse", IDC_CUSTOM, 20, 105, 69, 9, WS_GROUP AUTORADIOBUTTON "S&ystem styrt stшrrelse", IDC_SYSMANSIZE, 20, 145, 88, 9 - AUTORADIOBUTTON "&Ingen sidevekslingsfil", IDC_NOPAGEFILE, 20, 158, 78,9 + AUTORADIOBUTTON "&Ingen sidevekslingsfil", IDC_NOPAGEFILE, 20, 158, 79,9 EDITTEXT IDC_INITIALSIZE, 100, 114, 44, 13, NOT WS_BORDER, WS_EX_CLIENTEDGE EDITTEXT IDC_MAXSIZE, 100, 129, 44, 13, NOT WS_BORDER, WS_EX_CLIENTEDGE PUSHBUTTON "Still", IDC_SET, 158, 155, 50, 13 @@ -234,9 +234,9 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS CAPTION "Rediger variabel" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Variabel &Navn:", IDC_STATIC, 7, 14, 50, 8 + LTEXT "Variabel &navn:", IDC_STATIC, 7, 14, 50, 8 EDITTEXT IDC_VARIABLE_NAME, 75, 12, 145, 12, ES_AUTOHSCROLL - LTEXT "Variabel &Verdi:", IDC_STATIC, 7, 32, 50, 8 + LTEXT "Variabel &verdi:", IDC_STATIC, 7, 32, 50, 8 EDITTEXT IDC_VARIABLE_VALUE, 75, 30, 145, 12, ES_AUTOHSCROLL DEFPUSHBUTTON "OK", IDOK, 116, 50, 50, 14 PUSHBUTTON "Avbryt", IDCANCEL, 170, 50, 50, 14 @@ -256,12 +256,12 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_CPLSYSTEMNAME "System" - IDS_CPLSYSTEMDESCRIPTION "See information about your computer and change various system and hardware settings." + IDS_CPLSYSTEMDESCRIPTION "Se informasjon om din datamaskin og endre forskjellig system og maskinvare innstilling." IDS_MEGABYTE "MB Systemminne" IDS_GIGABYTE "GB Systemminne" IDS_TERABYTE "TB Systemminne" IDS_PETABYTE "PB Systemminne" - IDS_VARIABLE "Variable" + IDS_VARIABLE "Variabel" IDS_VALUE "Verdi" IDS_NO_DUMP "(Ingen)" IDS_MINI_DUMP "Minidump(64KB)" diff --git a/reactos/dll/cpl/telephon/lang/no-NO.rc b/reactos/dll/cpl/telephon/lang/no-NO.rc new file mode 100644 index 00000000000..487979907a9 --- /dev/null +++ b/reactos/dll/cpl/telephon/lang/no-NO.rc @@ -0,0 +1,16 @@ +// Norwegian (no) resources by LMH1 + +LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL + +IDD_PROPPAGE DIALOGEX 0, 0, 246, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "" +FONT 8, "MS Shell Dlg" +BEGIN +END + +STRINGTABLE +BEGIN + IDS_CPLSYSTEMNAME "Telefon og Modem valg" + IDS_CPLSYSTEMDESCRIPTION "Konfigurer din telefon nummerslеing regler og modem innstillinger." +END diff --git a/reactos/dll/cpl/telephon/rsrc.rc b/reactos/dll/cpl/telephon/rsrc.rc index 2d8985e87b5..e9def651aba 100644 --- a/reactos/dll/cpl/telephon/rsrc.rc +++ b/reactos/dll/cpl/telephon/rsrc.rc @@ -8,6 +8,7 @@ #include "lang/es-ES.rc" #include "lang/fr-FR.rc" #include "lang/it-IT.rc" +#include "lang/no-NO.rc" #include "lang/pl-PL.rc" #include "lang/ru-RU.rc" #include "lang/sk-SK.rc" diff --git a/reactos/dll/win32/netid/lang/no-NO.rc b/reactos/dll/win32/netid/lang/no-NO.rc index ec17355510f..b4122643be4 100644 --- a/reactos/dll/win32/netid/lang/no-NO.rc +++ b/reactos/dll/win32/netid/lang/no-NO.rc @@ -17,7 +17,7 @@ BEGIN PUSHBUTTON "&Nettverk-ID...", IDC_NETWORK_ID, 190, 114, 58, 15 LTEXT "Klikk Endre for е gi datamaskinen et nytt navn eller bli med i et domenet.", IDC_STATIC, 6, 149, 170, 17 PUSHBUTTON "&Endre...",IDC_NETWORK_PROPERTY, 190, 149, 58, 15 - LTEXT "OBS: Bare Administratorer kan endre disse innstillingene pе denne datamaskinen.", IDC_STATIC, 6, 179, 300, 9 + LTEXT "OBS: Bare Administratorer kan endre disse innstillingene pе datamaskinen.", IDC_STATIC, 6, 179, 300, 9 END IDD_PROPPAGECOMPNAMECHENGE DIALOGEX 0, 0, 232, 222 @@ -60,15 +60,15 @@ STRINGTABLE BEGIN 1 "* Ukjent *" 2 "ARBEIDSGRUPPE" - 3 "The following error occurred while attempting to read domain membership information:" + 3 "Fшlgende feil har oppstеtt mens datamaskinen prшvde е lese domene medlemskap informasjon:" 4 "Endring i datamaskinnavn" 5 "Arbeidsgruppe:" 6 "Domene:" 22 "Velkommen til %1 arbeidsgruppen." 23 "Velkommen til %1 domene." 24 "Du mе starte denne datamaskinen pе nytt for at endringene skal tre i kraft." - 1021 "Note: Only Administrators can change the identification of this computer." - 1022 "Note: The identification of the computer cannot be changed because:" + 1021 "OBS: Bare administratorer kan endre identifisering for denne datamaskinen." + 1022 "OBS: Identifisering for datamaskinen kunne ikke endres fordi:" 3210 "&Detaljer >>" 3220 "<< &Detaljer" END diff --git a/reactos/dll/win32/shell32/lang/it-IT.rc b/reactos/dll/win32/shell32/lang/it-IT.rc index 521541881e7..6cdbdabb22f 100644 --- a/reactos/dll/win32/shell32/lang/it-IT.rc +++ b/reactos/dll/win32/shell32/lang/it-IT.rc @@ -207,18 +207,18 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY - LTEXT "Type of file:", 14004, 8, 35, 50, 10 - LTEXT "Folder", 14005, 68, 35, 160, 10 - LTEXT "Location:", 14006, 8, 53, 50, 10 + LTEXT "Tipo del file:", 14004, 8, 35, 50, 10 + LTEXT "Cartella", 14005, 68, 35, 160, 10 + LTEXT "Posizione:", 14006, 8, 53, 50, 10 LTEXT "", 14007, 68, 53, 315, 10 - LTEXT "Size:", 14008, 8, 72, 45, 10 + LTEXT "Dimensione:", 14008, 8, 72, 45, 10 LTEXT "", 14009, 68, 72, 315, 10 - LTEXT "Contains:", 14010, 8, 93, 45, 10 + LTEXT "Contenente:", 14010, 8, 93, 45, 10 LTEXT "", 14011, 68, 93, 160, 10 - LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "Creato:", 14014, 8, 118, 45, 10 LTEXT "", 14015, 68, 118, 160, 10 - AUTOCHECKBOX "&Read-only", 14021, 45, 150, 67, 10 - AUTOCHECKBOX "&Hidden", 14022, 126, 150, 50, 10 + AUTOCHECKBOX "&Sola lettura", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "&Nascosto", 14022, 126, 150, 50, 10 END SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 @@ -569,11 +569,11 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBL CAPTION "Check Disk" FONT 8, "MS Shell Dlg" BEGIN - DEFPUSHBUTTON "Start", IDOK, 53, 100, 60, 14 - GROUPBOX "Check disk options", -1, 7, 6, 179, 50 - PUSHBUTTON "Cancel", IDCANCEL, 118, 100, 60, 14 - AUTOCHECKBOX "Automatically fix file system errors", 14000, 16, 15, 155, 10 - AUTOCHECKBOX "&Scan for and attempt recovery of bad sectors", 14001, 16, 30, 165, 10 + DEFPUSHBUTTON "Inizia", IDOK, 53, 100, 60, 14 + GROUPBOX "Opzioni per la verifica del disco", -1, 7, 6, 179, 50 + PUSHBUTTON "Annulla", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "Correggi automaticamente gli errori", 14000, 16, 15, 155, 10 + AUTOCHECKBOX "&Ricerca dei settori difettosi e tentativo di correzione", 14001, 16, 30, 165, 10 CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 LTEXT "", 14003, 60, 80, 170, 10 END @@ -606,25 +606,25 @@ BEGIN IDS_SHV_COLUMN9 "Commenti" IDS_SHV_COLUMN10 "Proprietario" IDS_SHV_COLUMN11 "Gruppo" - IDS_SHV_COLUMN12 "Filename" - IDS_SHV_COLUMN13 "Category" + IDS_SHV_COLUMN12 "Nome file" + IDS_SHV_COLUMN13 "Categoria" IDS_SHV_COLUMN_DELFROM "Posizione originale" IDS_SHV_COLUMN_DELDATE "Data di cancellazione" - IDS_SHV_COLUMN_FONTTYPE "Fonttype" - IDS_SHV_COLUMN_WORKGROUP "Workgroup" - IDS_SHV_NETWORKLOCATION "Network Location" - IDS_SHV_COLUMN_DOCUMENTS "Documents" - IDS_SHV_COLUMN_STATUS "Status" - IDS_SHV_COLUMN_COMMENTS "Comments" - IDS_SHV_COLUMN_LOCATION "Location" - IDS_SHV_COLUMN_MODEL "Model" + IDS_SHV_COLUMN_FONTTYPE "Tipo di font" + IDS_SHV_COLUMN_WORKGROUP "Gruppo di lavoro" + IDS_SHV_NETWORKLOCATION "Posizione in rete" + IDS_SHV_COLUMN_DOCUMENTS "Documenti" + IDS_SHV_COLUMN_STATUS "Stato" + IDS_SHV_COLUMN_COMMENTS "Commenti" + IDS_SHV_COLUMN_LOCATION "Posizione" + IDS_SHV_COLUMN_MODEL "Modello" /* special folders */ IDS_DESKTOP "Desktop" IDS_MYCOMPUTER "Risorse del Computer" IDS_RECYCLEBIN_FOLDER_NAME "Cestino" IDS_CONTROLPANEL "Pannello di controllo" - IDS_ADMINISTRATIVETOOLS "Administrative Tools" + IDS_ADMINISTRATIVETOOLS "Strumenti di amministrazione" /* context menus */ IDS_VIEW_LARGE "&Icone Grandi" @@ -638,10 +638,10 @@ BEGIN IDS_DELETE "&Cancella" IDS_PROPERTIES "&Proprietа" IDS_CUT "&Taglia" - IDS_RESTORE "Restore" - IDS_FORMATDRIVE "Format..." - IDS_RENAME "Rename" - IDS_INSERT "Insert" + IDS_RESTORE "Ripristina" + IDS_FORMATDRIVE "Formatta..." + IDS_RENAME "Rinomina" + IDS_INSERT "Inserisci" IDS_CREATEFOLDER_DENIED "Impossibile creare la cartella: Accesso negato." IDS_CREATEFOLDER_CAPTION "Errore durante la creazione della cartella" @@ -663,9 +663,9 @@ BEGIN /* message box strings */ IDS_RESTART_TITLE "Riavvia" - IDS_RESTART_PROMPT "Vuoi simulare un riavvio do Windows?" + IDS_RESTART_PROMPT "Volete riavviare il sistema?" IDS_SHUTDOWN_TITLE "Termina sessione" - IDS_SHUTDOWN_PROMPT "Vuoi terminare la sessione di ReactOS?" + IDS_SHUTDOWN_PROMPT "Volete terminare la sessione di ReactOS?" /* shell folder path default values */ IDS_PROGRAMS "Menu Avvio\\Programmi" @@ -679,7 +679,7 @@ BEGIN IDS_MYVIDEO "Video" IDS_DESKTOPDIRECTORY "Desktop" IDS_NETHOOD "Rete" - IDS_TEMPLATES "Templates" + IDS_TEMPLATES "Modelli" IDS_APPDATA "DatiApplicazioni" IDS_PRINTHOOD "Stampanti" IDS_LOCAL_APPDATA "Impostazioni locali\\Dati Applicazioni" @@ -727,7 +727,7 @@ BEGIN IDS_CUR_FILE "Cursore" IDS_DLL_FILE "Estensione di applicazione" IDS_DRV_FILE "Device Driver" - IDS_EXE_FILE "Applicatione" + IDS_EXE_FILE "Applicazione" IDS_FON_FILE "Font" IDS_TTF_FILE "TrueType Font" IDS_HLP_FILE "Help File" @@ -735,18 +735,18 @@ BEGIN IDS_LNK_FILE "Collegamento" IDS_SYS_FILE "File di sistema" - IDS_OPEN_VERB "Open" - IDS_RUNAS_VERB "Run as " - IDS_EDIT_VERB "Edit" - IDS_FIND_VERB "Find" - IDS_PRINT_VERB "Print" - IDS_PLAY_VERB "Play" - IDS_PREVIEW_VERB "Preview" + IDS_OPEN_VERB "Apri" + IDS_RUNAS_VERB "Eseguire come " + IDS_EDIT_VERB "Modifica" + IDS_FIND_VERB "Cerca" + IDS_PRINT_VERB "Stampa" + IDS_PLAY_VERB "Mostra" + IDS_PREVIEW_VERB "Anteprima" - IDS_FILE_FOLDER "%u Files, %u Folders" - IDS_PRINTERS "Printers" - IDS_FONTS "Fonts" - IDS_INSTALLNEWFONT "Install New Font..." + IDS_FILE_FOLDER "%u File, %u Cartelle" + IDS_PRINTERS "Stampanti" + IDS_FONTS "Font" + IDS_INSTALLNEWFONT "Installazione nuovi Font..." - IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" + IDS_DEFAULT_CLUSTER_SIZE "Dimensione predefinita di allocazione" END diff --git a/reactos/dll/win32/shell32/lang/pl-PL.rc b/reactos/dll/win32/shell32/lang/pl-PL.rc index cac26705dfc..10cd2d418ee 100644 --- a/reactos/dll/win32/shell32/lang/pl-PL.rc +++ b/reactos/dll/win32/shell32/lang/pl-PL.rc @@ -335,7 +335,7 @@ CAPTION "Uruchom jako" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "Ktуre konto uїytkownika chcesz uїyж do uruchomienia tego programu?", -1, 10, 20, 220, 20 - CHECKBOX "Bierz№cy uїytkownik %s", 14000, 10, 45, 150, 10 + CHECKBOX "Bieї№cy uїytkownik %s", 14000, 10, 45, 150, 10 LTEXT "Zabezpiecz mуj komputer i dane przed nieautoryzowanym dziaіaniem programуw", -1, 25, 57, 200, 10, WS_DISABLED CHECKBOX "Ta opcja moїe zabezpieczyж twуj komputer lub dane na nim przed szkodliwymi programami, ale uїycie jej moїe spowodowaж nieprawidіowe dziaіanie programуw.", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE CHECKBOX "Nastкpuj№cy uїytkownik:", 14002, 10, 100, 90, 10 @@ -396,8 +396,8 @@ BEGIN GROUPBOX "Dziaіanie przyciskуw myszki", -1, 7, 110, 249, 60 ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL AUTORADIOBUTTON "&Pojedyncze klikniкcie by otworzyж cel (najechanie by wskazaж)", 14007, 40, 120, 170, 10, WS_TABSTOP - AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP - AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Podkreњ&laj tytuіy ikon tak jak w przegl№darce", 14008, 50, 132, 170, 10, WS_TABSTOP + AUTORADIOBUTTON "Podkreњlaj &tytuіy ikon tylko po najechaniu na nie kursorem", 14009, 50, 144, 170, 10, WS_TABSTOP AUTORADIOBUTTON "Po&dwуjne klikniкcie by otworzyж (pojedyncze klikniкcie by wskazaж)", 14010, 40, 156, 170, 10, WS_TABSTOP PUSHBUTTON "&Ustawienia domyњlne", 14011, 180, 180, 60, 14, WS_TABSTOP END @@ -572,14 +572,14 @@ END CHKDSK_DLG DIALOGEX 50, 50, 194, 120 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "Check Disk" +CAPTION "Sprawdzanie dyskуw" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "Start", IDOK, 53, 100, 60, 14 - GROUPBOX "Check disk options", -1, 7, 6, 179, 50 - PUSHBUTTON "Cancel", IDCANCEL, 118, 100, 60, 14 - AUTOCHECKBOX "Automatically fix file system errors", 14000, 16, 15, 155, 10 - AUTOCHECKBOX "&Scan for and attempt recovery of bad sectors", 14001, 16, 30, 165, 10 + GROUPBOX "Opcje sprawdzania dyskуw", -1, 7, 6, 179, 50 + PUSHBUTTON "Anuluj", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "Automatycznie naprawiaj bікdy systemu plikуw", 14000, 16, 15, 155, 10 + AUTOCHECKBOX "&Szukaj i prуbuj odzyskaж uszkodzone sektory", 14001, 16, 30, 165, 10 CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 LTEXT "", 14003, 60, 80, 170, 10 END @@ -630,7 +630,7 @@ BEGIN IDS_MYCOMPUTER "Mуj komputer" IDS_RECYCLEBIN_FOLDER_NAME "Kosz" IDS_CONTROLPANEL "Panel Sterowania" - IDS_ADMINISTRATIVETOOLS "Administrative Tools" + IDS_ADMINISTRATIVETOOLS "Narzкdzia Administracyjne" /* context menus */ IDS_VIEW_LARGE "&Duїe Ikony" @@ -645,9 +645,9 @@ BEGIN IDS_PROPERTIES "Wіaњciwoњci" IDS_CUT "Wytnij" IDS_RESTORE "Przywrуж" - IDS_FORMATDRIVE "Format..." - IDS_RENAME "Rename" - IDS_INSERT "Insert" + IDS_FORMATDRIVE "Formatuj..." + IDS_RENAME "Zmieс nazwк" + IDS_INSERT "Wіуї" IDS_CREATEFOLDER_DENIED "Nie mogк utworzyж nowego katalogu: Brak dostкpu." IDS_CREATEFOLDER_CAPTION "Bі№d przy tworzeniu nowego katalogu." @@ -697,9 +697,9 @@ BEGIN IDS_PROGRAM_FILES_COMMON "Program Files\\Common Files" IDS_COMMON_DOCUMENTS "Dokumenty" IDS_ADMINTOOLS "Menu Start\\Programy\\Narzкdzia administracyjne" - IDS_COMMON_MUSIC "Documenty\\Moja muzyka" - IDS_COMMON_PICTURES "Documenty\\Moje obrazy" - IDS_COMMON_VIDEO "Documenty\\Moje wideo" + IDS_COMMON_MUSIC "Dokumenty\\Moja muzyka" + IDS_COMMON_PICTURES "Dokumenty\\Moje obrazy" + IDS_COMMON_VIDEO "Dokumenty\\Moje wideo" IDS_CDBURN_AREA "Ustawienia lokalne\\Dane aplikacji\\Microsoft\\Nagrywanie dyskуw CD" IDS_NETWORKPLACE "Moja sieж" @@ -754,5 +754,5 @@ BEGIN IDS_FONTS "Czcionki" IDS_INSTALLNEWFONT "Zainstaluj Now№ Czcionkк..." - IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" + IDS_DEFAULT_CLUSTER_SIZE "Domyњlny rozmiar jednostki alokacji" END diff --git a/reactos/subsystems/win32/csrss/win32csr/rsrc.rc b/reactos/subsystems/win32/csrss/win32csr/rsrc.rc index 2fc1e5e82b6..3ea5c5e057b 100644 --- a/reactos/subsystems/win32/csrss/win32csr/rsrc.rc +++ b/reactos/subsystems/win32/csrss/win32csr/rsrc.rc @@ -13,6 +13,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include "lang/fr-FR.rc" #include "lang/id-ID.rc" #include "lang/it-IT.rc" +#include "lang/no-NO.rc" #include "lang/pl-PL.rc" #include "lang/ru-RU.rc" #include "lang/sk-SK.rc" From f2573fe76021728bbd09f1768d8035c28bdff7f0 Mon Sep 17 00:00:00 2001 From: Daniel Reimer Date: Tue, 19 Aug 2008 17:00:40 +0000 Subject: [PATCH 080/324] Bug 3661: Bulgarian Update by CCTAHEB Bug 3668: Shell32 Update by Javier Remacha svn path=/trunk/; revision=35456 --- reactos/base/applications/calc/lang/bg-BG.rc | 240 +- .../mscutils/servman/lang/bg-BG.rc | 2 +- reactos/dll/cpl/desk/lang/bg-BG.rc | 2 +- reactos/dll/cpl/input/lang/bg-BG.rc | 38 +- reactos/dll/win32/aclui/aclui_Bg.rc | 2 +- reactos/dll/win32/kernel32/lang/bg-BG.mc | 17492 ++++++++++++++++ reactos/dll/win32/netid/lang/es-ES.rc | 2 +- reactos/dll/win32/newdev/lang/bg-BG.rc | 10 +- reactos/dll/win32/shell32/lang/es-ES.rc | 62 +- .../win32/csrss/win32csr/lang/bg-BG.rc | 2 +- 10 files changed, 17672 insertions(+), 180 deletions(-) create mode 100644 reactos/dll/win32/kernel32/lang/bg-BG.mc diff --git a/reactos/base/applications/calc/lang/bg-BG.rc b/reactos/base/applications/calc/lang/bg-BG.rc index 8c78bbd6cf3..e334840408a 100644 --- a/reactos/base/applications/calc/lang/bg-BG.rc +++ b/reactos/base/applications/calc/lang/bg-BG.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT IDD_DIALOG_SCIENTIFIC DIALOGEX 0, 0, 316, 161 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Изчислителян на РеактОС" +CAPTION "Изчислителят на РеактОС" MENU IDR_MENU_SCIENTIFIC_1 FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN @@ -444,31 +444,31 @@ END // types of conversion STRINGTABLE DISCARDABLE BEGIN - IDS_CONV_AREA "Area" - IDS_CONV_CONSUMPTION "Consumption (engines)" - IDS_CONV_CURRENCY "Currencies" - IDS_CONV_ENERGY "Energy" - IDS_CONV_LENGTH "Lenghts" - IDS_CONV_POWER "Power" - IDS_CONV_PRESSURE "Pressure" - IDS_CONV_TEMPERATURE "Temperature" - IDS_CONV_VELOCITY "Velocity" - IDS_CONV_VOLUME "Volume" - IDS_CONV_WEIGHT "Weights" + IDS_CONV_AREA "Площ" + IDS_CONV_CONSUMPTION "Потребление (двигатели)" + IDS_CONV_CURRENCY "Парични единици" + IDS_CONV_ENERGY "Енергия" + IDS_CONV_LENGTH "Дължини" + IDS_CONV_POWER "Мощност" + IDS_CONV_PRESSURE "Налягане" + IDS_CONV_TEMPERATURE "Температура" + IDS_CONV_VELOCITY "Скорост" + IDS_CONV_VOLUME "Обем" + IDS_CONV_WEIGHT "Тегло" END // TYPES OF AREAS STRINGTABLE DISCARDABLE BEGIN - IDS_AREA_ACRES "Acres" - IDS_AREA_ACRES_BRAZIL "Acres (Brazil)" - IDS_AREA_ACRES_FRANCE "Acres (France)" - IDS_AREA_ACRES_SCOTS "Acres (Scots)" - IDS_AREA_ACRES_US "Acres (US)" - IDS_AREA_ARES "Ares" + IDS_AREA_ACRES "Акри" + IDS_AREA_ACRES_BRAZIL "Акри (Бразилски)" + IDS_AREA_ACRES_FRANCE "Акри (Френски)" + IDS_AREA_ACRES_SCOTS "Акри (Шотландски)" + IDS_AREA_ACRES_US "Акри (САЩ)" + IDS_AREA_ARES "Арове" IDS_AREA_CHOU "Chou" IDS_AREA_DANBO "Danbo" - IDS_AREA_HECTARES "Hectares" + IDS_AREA_HECTARES "Хектари" IDS_AREA_JEONGBO "Jeongbo" IDS_AREA_MORGEN_HUNGARY "Morgen (Hungary)" IDS_AREA_MU "Mu" @@ -477,21 +477,21 @@ BEGIN IDS_AREA_PYEONGBANGJA "Pyeongbangja" IDS_AREA_RAI "Rai" IDS_AREA_SE "Se" - IDS_AREA_SQUARE_CENTIMETERS "Square centimeters" - IDS_AREA_SQUARE_CHR "Square chr" - IDS_AREA_SQUARE_FATHOMS "Square fathoms" - IDS_AREA_SQUARE_FATHOMS_HUNGARY "Square fathoms (Hungary)" - IDS_AREA_SQUARE_FEET "Square feet" - IDS_AREA_SQUARE_INCHES "Square inches" - IDS_AREA_SQUARE_KILOMETERS "Square kilometers" - IDS_AREA_SQUARE_LAR "Square lar" - IDS_AREA_SQUARE_METER "Square meter" - IDS_AREA_SQUARE_MILES "Square miles" - IDS_AREA_SQUARE_MILLIMETERS "Square millimeters" - IDS_AREA_SQUARE_SHAKU "Square shaku" - IDS_AREA_SQUARE_TSUEN "Square tsuen" - IDS_AREA_SQUARE_VA "Square va" - IDS_AREA_SQUARE_YARD "Square yard" + IDS_AREA_SQUARE_CENTIMETERS "Квадратни сантиметри" + IDS_AREA_SQUARE_CHR "Квадратни chr" + IDS_AREA_SQUARE_FATHOMS "Квадратни фадоми" + IDS_AREA_SQUARE_FATHOMS_HUNGARY "Квадратни фадоми (унгарски)" + IDS_AREA_SQUARE_FEET "Квадратни стъпки" + IDS_AREA_SQUARE_INCHES "Квадратни цолове" + IDS_AREA_SQUARE_KILOMETERS "Квадратни километри" + IDS_AREA_SQUARE_LAR "Квадратни lar" + IDS_AREA_SQUARE_METER "Квадратни метри" + IDS_AREA_SQUARE_MILES "Квадратни мили" + IDS_AREA_SQUARE_MILLIMETERS "Квадратни милиметри" + IDS_AREA_SQUARE_SHAKU "Квадратни shaku" + IDS_AREA_SQUARE_TSUEN "Квадратни tsuen" + IDS_AREA_SQUARE_VA "Квадратни va" + IDS_AREA_SQUARE_YARD "Квадратни ярдове" IDS_AREA_TAN "Tan" IDS_AREA_TSUBO "Tsubo" END @@ -499,10 +499,10 @@ END // TYPES OF COMSUMPTIONS STRINGTABLE DISCARDABLE BEGIN - IDS_CONSUMPTION_KM_PER_L "Kilometer/liter" - IDS_CONSUMPTION_L_PER_100_KM "Liters/100 kilometers" - IDS_CONSUMPTION_MILES_GALLON_UK "Miles/gallon (UK)" - IDS_CONSUMPTION_MILES_GALLON_US "Miles/gallon (US)" + IDS_CONSUMPTION_KM_PER_L "Километри/литър" + IDS_CONSUMPTION_L_PER_100_KM "Литри/100 километра" + IDS_CONSUMPTION_MILES_GALLON_UK "Мили/галон (ОК)" + IDS_CONSUMPTION_MILES_GALLON_US "Мили/галон (САЩ)" END // TYPES OF CURRENCIES @@ -529,54 +529,54 @@ END // TYPES OF ENERGIES STRINGTABLE DISCARDABLE BEGIN - IDS_ENERGY_15_C_CALORIES "15 ^C calories" - IDS_ENERGY_ERGS "Ergs" - IDS_ENERGY_IT_CALORIES "International Table calories" - IDS_ENERGY_JOULES "Joules" - IDS_ENERGY_KILOJOULES "Kilojoules" - IDS_ENERGY_KILOWATT_HOURS "Kilowatt hours" - IDS_ENERGY_NUTRITION_CALORIES "Nutrition calories" - IDS_ENERGY_TH_CALORIES "Thermochemical calorie" + IDS_ENERGY_15_C_CALORIES "15 ^C калории" + IDS_ENERGY_ERGS "Ергове" + IDS_ENERGY_IT_CALORIES "Международни таблични калории" + IDS_ENERGY_JOULES "Джаули" + IDS_ENERGY_KILOJOULES "Килоджаули" + IDS_ENERGY_KILOWATT_HOURS "Киловат/ часове" + IDS_ENERGY_NUTRITION_CALORIES "Хранителни калории" + IDS_ENERGY_TH_CALORIES "Топлинни калории" END // TYPES OF LENGTHS STRINGTABLE DISCARDABLE BEGIN - IDS_LENGTH_ANGSTROMS "Angstroms" + IDS_LENGTH_ANGSTROMS "Ангстрьоми" IDS_LENGTH_ASTRONOMILA_UNITS "Astronomila units" - IDS_LENGTH_BARLEYCORNS "Barleycorns" - IDS_LENGTH_CENTIMETERS "Centimeters" - IDS_LENGTH_CHAINS_UK "Chains (UK)" + IDS_LENGTH_BARLEYCORNS "Ечемичени зърна" + IDS_LENGTH_CENTIMETERS "Сантиметри" + IDS_LENGTH_CHAINS_UK "Вериги (ОК)" IDS_LENGTH_CHI "Chi" IDS_LENGTH_CHOU "Chou" IDS_LENGTH_CHR "Chr" IDS_LENGTH_CUN "Cun" - IDS_LENGTH_FATHOMS "Fathoms" - IDS_LENGTH_FATHOMS_HUNGARY "Fathoms (Hungary)" - IDS_LENGTH_FEET "Feet" - IDS_LENGTH_FURLONGS "Furlongs" + IDS_LENGTH_FATHOMS "Сажени" + IDS_LENGTH_FATHOMS_HUNGARY "Сажени (унгарски)" + IDS_LENGTH_FEET "Стъпки" + IDS_LENGTH_FURLONGS "Бразди" IDS_LENGTH_GAN "Gan" - IDS_LENGTH_HANDS "Hands" + IDS_LENGTH_HANDS "Длани" IDS_LENGTH_HUNH "Hunh" - IDS_LENGTH_INCHES "Inches" + IDS_LENGTH_INCHES "Цолове" IDS_LENGTH_JA "Ja" IDS_LENGTH_JEONG "Jeong" IDS_LENGTH_KABIET "Kabiet" IDS_LENGTH_KEN "Ken" IDS_LENGTH_KEUB "Keub" - IDS_LENGTH_KILOMETERS "Kilometers" + IDS_LENGTH_KILOMETERS "Километри" IDS_LENGTH_LAR "Lar" - IDS_LENGTH_LIGHT_YEARS "Light years" + IDS_LENGTH_LIGHT_YEARS "Светлинни години" IDS_LENGTH_LINKS_UK "Links (UK)" - IDS_LENGTH_METERS "Meters" - IDS_LENGTH_MILES "Miles" - IDS_LENGTH_MILLIMETERS "Millimeters" - IDS_LENGTH_NAUTICAL_MILES "Nautical miles" + IDS_LENGTH_METERS "Метри" + IDS_LENGTH_MILES "Мили" + IDS_LENGTH_MILLIMETERS "Милиметри" + IDS_LENGTH_NAUTICAL_MILES "Морски мили" IDS_LENGTH_NIEU "Nieu" - IDS_LENGTH_PARSECS "Parsecs" - IDS_LENGTH_PICAS "Picas" - IDS_LENGTH_RI_JAPAN "Ri (Japan)" - IDS_LENGTH_RI_KOREA "Ri (Korea)" + IDS_LENGTH_PARSECS "Парсеци" + IDS_LENGTH_PICAS "Дванадесетки (пики)" + IDS_LENGTH_RI_JAPAN "Ri (японски)" + IDS_LENGTH_RI_KOREA "Ri (корейски)" IDS_LENGTH_SAWK "Sawk" IDS_LENGTH_SEN "Sen" IDS_LENGTH_SHAKU "Shaku" @@ -584,7 +584,7 @@ BEGIN IDS_LENGTH_SUN "Sun" IDS_LENGTH_TSUEN "Tsuen" IDS_LENGTH_VA "Va" - IDS_LENGTH_YARDS "Yards" + IDS_LENGTH_YARDS "Ярдове" IDS_LENGTH_YOTE "Yote" IDS_LENGTH_ZHANG "Zhang" END @@ -592,74 +592,74 @@ END // TYPES OF POWERS STRINGTABLE DISCARDABLE BEGIN - IDS_POWER_HORSEPOWER "Horsepower" - IDS_POWER_KILOWATTS "Kilowatts" - IDS_POWER_MEGAWATTS "Megawatts" - IDS_POWER_WATTS "Watts" + IDS_POWER_HORSEPOWER "Конски сили" + IDS_POWER_KILOWATTS "Киловатове" + IDS_POWER_MEGAWATTS "Мегаватове" + IDS_POWER_WATTS "Ватове" END // TYPE OF PRESSURES STRINGTABLE DISCARDABLE BEGIN - IDS_PRESSURE_ATMOSPHERES "Atmospheres" - IDS_PRESSURE_BARS "Bars" - IDS_PRESSURE_MM_OF_MERCURY "Millimeters of mercury" - IDS_PRESSURE_PASCALS "Pascals" - IDS_PRESSURE_PSI "Pounds-force per square inch" + IDS_PRESSURE_ATMOSPHERES "Атмосфери" + IDS_PRESSURE_BARS "Барове" + IDS_PRESSURE_MM_OF_MERCURY "Милиметри живачен стълб" + IDS_PRESSURE_PASCALS "Паскали" + IDS_PRESSURE_PSI "Паундове на квадратен цол" END // TYPES OF TEMPERATURES STRINGTABLE DISCARDABLE BEGIN - IDS_TEMPERATURE_CELSIUS "Celsius" - IDS_TEMPERATURE_FAHRENHEIT "Fahrenheit" - IDS_TEMPERATURE_KELVIN "Kelvin" - IDS_TEMPERATURE_RANKINE "Rankine" + IDS_TEMPERATURE_CELSIUS "Целзий" + IDS_TEMPERATURE_FAHRENHEIT "Фаренхайт" + IDS_TEMPERATURE_KELVIN "Келвин" + IDS_TEMPERATURE_RANKINE "Ранкин" END // TYPES OF VELOCITIES STRINGTABLE DISCARDABLE BEGIN - IDS_VELOCITY_FEET_HOUR "Feet/hour" - IDS_VELOCITY_KILOMETERS_HOUR "Kilometers/hour" - IDS_VELOCITY_KNOTS "Knots" - IDS_VELOCITY_MACH "Mach" - IDS_VELOCITY_METERS_SECOND "Meters/second" - IDS_VELOCITY_MILES_HOUR "Miles/hour" + IDS_VELOCITY_FEET_HOUR "Стъпки/час" + IDS_VELOCITY_KILOMETERS_HOUR "Километри/час" + IDS_VELOCITY_KNOTS "Възли" + IDS_VELOCITY_MACH "Махове" + IDS_VELOCITY_METERS_SECOND "Метри/секунда" + IDS_VELOCITY_MILES_HOUR "Мили/час" END // TYPES OF VOLUMES STRINGTABLE DISCARDABLE BEGIN - IDS_VOLUME_BARRELS_UK "Barrels (UK)" - IDS_VOLUME_BARRELS_OIL "Barrels oil" + IDS_VOLUME_BARRELS_UK "Бъчви (барели) (ОК)" + IDS_VOLUME_BARRELS_OIL "Петролни бъчви" IDS_VOLUME_BUN "Bun" - IDS_VOLUME_BUSHELS_UK "Bushels (UK)" - IDS_VOLUME_BUSHELS_US "Bushels (US)" - IDS_VOLUME_CUBIC_CENTIMETERS "Cubic centimeters" - IDS_VOLUME_CUBIC_FEET "Cubic feet" - IDS_VOLUME_CUBIC_INCHES "Cubic inches" - IDS_VOLUME_CUBIC_METERS "Cubic meters" - IDS_VOLUME_CUBIC_YARDS "Cubic yards" + IDS_VOLUME_BUSHELS_UK "Бушели (ОК)" + IDS_VOLUME_BUSHELS_US "Бушели (САЩ)" + IDS_VOLUME_CUBIC_CENTIMETERS "Кубични сантиметри" + IDS_VOLUME_CUBIC_FEET "Кубични стъпки" + IDS_VOLUME_CUBIC_INCHES "Кубични цолове" + IDS_VOLUME_CUBIC_METERS "Кубични метри" + IDS_VOLUME_CUBIC_YARDS "Кубични ярдове" IDS_VOLUME_DOE "Doe" - IDS_VOLUME_FLUID_OUNCES_UK "Fluid ounces (UK)" - IDS_VOLUME_FLUID_OUNCES_US "Fluid ounces (US)" - IDS_VOLUME_GALLONS_UK "Gallons (UK)" - IDS_VOLUME_GALLONS_DRY_US "Gallons, dry (US)" - IDS_VOLUME_GALLONS_LIQUID_US "Gallons, liquid (US)" + IDS_VOLUME_FLUID_OUNCES_UK "Течни унции (ОК)" + IDS_VOLUME_FLUID_OUNCES_US "Течни унции (САЩ)" + IDS_VOLUME_GALLONS_UK "Галони (UK)" + IDS_VOLUME_GALLONS_DRY_US "Галони, сухи (САЩ)" + IDS_VOLUME_GALLONS_LIQUID_US "Галони, течни (САЩ)" IDS_VOLUME_GOU "Gou" IDS_VOLUME_HOP "Hop" IDS_VOLUME_ICCE "Icce" IDS_VOLUME_KWIAN "Kwian" - IDS_VOLUME_LITERS "Liters" + IDS_VOLUME_LITERS "Литри" IDS_VOLUME_MAL "Mal" - IDS_VOLUME_MILLILITERS "Milliliters" - IDS_VOLUME_PINTS_UK "Pints (UK)" - IDS_VOLUME_PINTS_DRY_US "Pints, dry (US)" - IDS_VOLUME_PINTS_LIQUID_US "Pints, liquid (US)" - IDS_VOLUME_QUARTS_UK "Quarts (UK)" - IDS_VOLUME_QUARTS_DRY_US "Quarts, dry (US)" - IDS_VOLUME_QUARTS_LIQUID_US "Quarts, liquid (US)" + IDS_VOLUME_MILLILITERS "Милиметри" + IDS_VOLUME_PINTS_UK "Пинти (ОК)" + IDS_VOLUME_PINTS_DRY_US "Пинти, сухи (САЩ)" + IDS_VOLUME_PINTS_LIQUID_US "Пинти, течни (САЩ)" + IDS_VOLUME_QUARTS_UK "Кварти (ОК)" + IDS_VOLUME_QUARTS_DRY_US "Кварти, сухи (САЩ)" + IDS_VOLUME_QUARTS_LIQUID_US "Кварти, течни (САЩ)" IDS_VOLUME_SEKI "Seki" IDS_VOLUME_SYOU "Syou" IDS_VOLUME_TANANLOUNG "Tananloung" @@ -671,29 +671,29 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_WEIGHT_BAHT "Baht" - IDS_WEIGHT_CARATS "Carats" + IDS_WEIGHT_CARATS "Карати" IDS_WEIGHT_CHUNG "Chung" IDS_WEIGHT_DON "Don" IDS_WEIGHT_GEUN "Geun" IDS_WEIGHT_GRAMS "Grams" IDS_WEIGHT_GWAN "Gwan" IDS_WEIGHT_HARB "Harb" - IDS_WEIGHT_JIN_CHINA "Jin (China)" - IDS_WEIGHT_JIN_TAIWAN "Jin (Taiwan)" + IDS_WEIGHT_JIN_CHINA "Джинове (Китай)" + IDS_WEIGHT_JIN_TAIWAN "Джинове (Тайван)" IDS_WEIGHT_KAN "Kan" - IDS_WEIGHT_KILOGRAMS "Kilograms" + IDS_WEIGHT_KILOGRAMS "Килограми" IDS_WEIGHT_KIN "Kin" IDS_WEIGHT_LIANG_CHINA "Liang (China)" IDS_WEIGHT_LIANG_TAIWAN "Liang (Taiwan)" IDS_WEIGHT_MONME "Monme" - IDS_WEIGHT_OUNCES_AVOIRDUPOIS "Ounces, avoirdupois" - IDS_WEIGHT_OUNCES_TROY "Ounces, troy" - IDS_WEIGHT_POUNDS "Pounds" - IDS_WEIGHT_QUINTAL_METRIC "Quintal (metric)" + IDS_WEIGHT_OUNCES_AVOIRDUPOIS "Унции, avoirdupois" + IDS_WEIGHT_OUNCES_TROY "Унции, трой" + IDS_WEIGHT_POUNDS "Фунтове" + IDS_WEIGHT_QUINTAL_METRIC "Центнери (метрични)" IDS_WEIGHT_SALOUNG "Saloung" - IDS_WEIGHT_STONES "Stones" + IDS_WEIGHT_STONES "Камъни" IDS_WEIGHT_TAMLUNG "Tamlung" - IDS_WEIGHT_TONNES "Tonnes" - IDS_WEIGHT_TONS_UK "Tons (UK)" - IDS_WEIGHT_TONS_US "Tons (US)" + IDS_WEIGHT_TONNES "Тонове" + IDS_WEIGHT_TONS_UK "Тонове (ОК)" + IDS_WEIGHT_TONS_US "Тонове (САЩ)" END diff --git a/reactos/base/applications/mscutils/servman/lang/bg-BG.rc b/reactos/base/applications/mscutils/servman/lang/bg-BG.rc index 37fabc70cbb..72bb184af6b 100644 --- a/reactos/base/applications/mscutils/servman/lang/bg-BG.rc +++ b/reactos/base/applications/mscutils/servman/lang/bg-BG.rc @@ -131,7 +131,7 @@ BEGIN LTEXT "Описание :", IDC_STATIC, 12, 86, 44, 9 PUSHBUTTON "Добре", IDOK, 126, 192, 44, 13 PUSHBUTTON "Отказ", IDCANCEL, 176, 192, 46, 13 - LTEXT "Допълнителни настройки (натиснете 'Помощ' за подробности)", IDC_STATIC, 10, 151, 134, 9 + LTEXT "Допълнителни настройки (натиснете „Помощ“ за подробности)", IDC_STATIC, 10, 151, 134, 9 PUSHBUTTON "Помощ", ID_CREATE_HELP, 10, 192, 44, 13 END diff --git a/reactos/dll/cpl/desk/lang/bg-BG.rc b/reactos/dll/cpl/desk/lang/bg-BG.rc index a3e0c427426..eedfe1ba9e8 100644 --- a/reactos/dll/cpl/desk/lang/bg-BG.rc +++ b/reactos/dll/cpl/desk/lang/bg-BG.rc @@ -42,7 +42,7 @@ BEGIN CONTROL "Искане на парола при изход",IDC_SCREENS_USEPASSCHK,"button", BS_AUTOCHECKBOX | WS_TABSTOP, 108, 120, 126, 19 GROUPBOX "&Енергоспестяващи възможности на монитора", IDC_SCREENS_DUMMY2, 6, 155, 232, 41 - LTEXT "За настройка захранването на монитора си, натиснете 'Захранване...'", + LTEXT "За настройка захранването на монитора си, натиснете „Захранване...“.", IDC_STATIC, 14, 166, 146 ,20 PUSHBUTTON "Захранване...", IDC_SCREENS_POWER_BUTTON, 176, 171, 60, 13 END diff --git a/reactos/dll/cpl/input/lang/bg-BG.rc b/reactos/dll/cpl/input/lang/bg-BG.rc index ac6fea2c55c..1386a665147 100644 --- a/reactos/dll/cpl/input/lang/bg-BG.rc +++ b/reactos/dll/cpl/input/lang/bg-BG.rc @@ -47,22 +47,22 @@ END IDD_CHANGE_KEY_SEQ DIALOGEX 5, 100, 230, 125 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "Change Key Sequence" +CAPTION "Смяна на клавишното съчетание" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "", -1, 9, 5, 155, 110 - AUTOCHECKBOX "&Switch input languages", IDC_SWITCH_INPUT_LANG_CB, 15, 15, 105, 12 + AUTOCHECKBOX "&Смяна езика на въвеждане", IDC_SWITCH_INPUT_LANG_CB, 15, 15, 105, 12 LTEXT "Shift", -1, 73, 37, 27, 12 CTEXT "+", -1, 62, 37, 8, 9 AUTORADIOBUTTON "&Ctrl", IDC_CTRL_LANG, 29, 31, 30, 11 - AUTORADIOBUTTON "Left &ALT", IDC_LEFT_ALT_LANG, 29, 45, 46, 12 - AUTOCHECKBOX "S&witch keyboard layouts", IDC_SWITCH_KBLAYOUTS_CB, 16, 65, 141, 12 + AUTORADIOBUTTON "Ляв &ALT", IDC_LEFT_ALT_LANG, 29, 45, 46, 12 + AUTOCHECKBOX "С&мяна на подредбите", IDC_SWITCH_KBLAYOUTS_CB, 16, 65, 141, 12 LTEXT "Shift", -1, 74, 87, 27, 12 CTEXT "+", -1, 63, 87, 8, 9 AUTORADIOBUTTON "C&trl", IDC_CTRL_LAYOUT, 30, 81, 30, 11 - AUTORADIOBUTTON "Left A<", IDC_LEFT_ALT_LAYOUT, 30, 95, 44, 12 - DEFPUSHBUTTON "OK", IDOK, 172, 9, 50, 14 - PUSHBUTTON "Cancel", IDCANCEL, 172, 27, 50, 14 + AUTORADIOBUTTON "Ляв A<", IDC_LEFT_ALT_LAYOUT, 30, 95, 44, 12 + DEFPUSHBUTTON "Добре", IDOK, 172, 9, 50, 14 + PUSHBUTTON "Отказ", IDCANCEL, 172, 27, 50, 14 END IDD_INPUT_LANG_PROP DIALOGEX 20, 20, 227, 75 @@ -89,13 +89,13 @@ BEGIN IDS_WHATS_THIS "Какво е това?" IDS_LANGUAGE "Език" IDS_LAYOUT "Клавиатурна подредба" - IDS_REM_QUESTION "Do you want to remove selected keyboard layout?" - IDS_CONFIRMATION "Confirmation" - IDS_LAYOUT_EXISTS "This layout already exists." - IDS_LAYOUT_EXISTS2 "This layout already exists and can not be added." + IDS_REM_QUESTION "Искате ли да премахнете избраната подредба?" + IDS_CONFIRMATION "Потвърждение" + IDS_LAYOUT_EXISTS "Подредбата вече съществува." + IDS_LAYOUT_EXISTS2 "Подредбата вече съществува и не може да бъде добавена." IDS_CTRL_SHIFT "Ctrl+Shift" - IDS_LEFT_ALT_SHIFT "Left Alt+Shift" - IDS_SWITCH_BET_INLANG "Switch between input languages" + IDS_LEFT_ALT_SHIFT "Ляв Alt+Shift" + IDS_SWITCH_BET_INLANG "Превключване на езиците за въвеждане" END STRINGTABLE @@ -232,10 +232,10 @@ BEGIN IDS_DIVEHI_TYPEWRITER_LAYOUT, "Дхивехска малтийска" IDS_BULGARIAN_PHONETIC_CLASSIC_LAYOUT, "Българска ЯВЕРТЪ" IDS_BULGARIAN_PHONETIC_BDS_LAYOUT, "Българска ЧШЕРТЪ" - IDS_BULGARIAN_BDS_LAYOUT, "Bulgarian BDS 5237-1978" - IDS_GERMAN_RISTOME_LAYOUT, "German (RISTOME)" - IDS_GERMAN_NEO_11_LAYOUT, "German (NEO-1.1)" - IDS_GERMAN_DE_ERGO_LAYOUT, "German (de_ergo)" - IDS_BURMESE_LAYOUT, "Burmese" - IDS_UKRAINIAN_STUDENT_LAYOUT, "Ukrainian (Student)" + IDS_BULGARIAN_BDS_LAYOUT, "Българска 5237-1978" + IDS_GERMAN_RISTOME_LAYOUT, "Немска (RISTOME)" + IDS_GERMAN_NEO_11_LAYOUT, "Немска (NEO-1.1)" + IDS_GERMAN_DE_ERGO_LAYOUT, "Немска (de_ergo)" + IDS_BURMESE_LAYOUT, "Бирманска" + IDS_UKRAINIAN_STUDENT_LAYOUT, "Украинска (Student)" END diff --git a/reactos/dll/win32/aclui/aclui_Bg.rc b/reactos/dll/win32/aclui/aclui_Bg.rc index 4a989469fdc..9497337b027 100644 --- a/reactos/dll/win32/aclui/aclui_Bg.rc +++ b/reactos/dll/win32/aclui/aclui_Bg.rc @@ -16,7 +16,7 @@ BEGIN LTEXT "Позволено", IDC_LABEL_ALLOW, 135, 107, 32, 8, SS_CENTER LTEXT "Забранено", IDC_LABEL_DENY, 176, 107, 32, 8, SS_CENTER CONTROL "", IDC_ACE_CHECKLIST, "CHECKLIST_ACLUI", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 7, 117, 213, 72, WS_EX_CLIENTEDGE - LTEXT "За извънредни права или разширени настройки, натиснете 'Разширени'.", IDC_LABEL_ADVANCED, 7, 194, 153, 16, SS_LEFT + LTEXT "За извънредни права или разширени настройки, натиснете „Разширени“.", IDC_LABEL_ADVANCED, 7, 194, 153, 16, SS_LEFT PUSHBUTTON "Раз&ширени", IDC_ADVANCED, 165, 194, 55, 14 END diff --git a/reactos/dll/win32/kernel32/lang/bg-BG.mc b/reactos/dll/win32/kernel32/lang/bg-BG.mc new file mode 100644 index 00000000000..1e49b37947e --- /dev/null +++ b/reactos/dll/win32/kernel32/lang/bg-BG.mc @@ -0,0 +1,17492 @@ +; +; kernel32.mc MESSAGE resources for kernel32.dll +; + +MessageIdTypedef=ULONG + +SeverityNames=(Success=0x0:STATUS_SEVERITY_SUCCESS + Informational=0x1:STATUS_SEVERITY_INFORMATIONAL + Warning=0x2:STATUS_SEVERITY_WARNING + Error=0x3:STATUS_SEVERITY_ERROR + ) + +FacilityNames=(System=0x0:FACILITY_SYSTEM + ITF=0x4:FACILITY_ITF + WIN32=0x7:FACILITY_GENERAL + ) + +LanguageNames=(Bulgarian=0x419:MSG00419) + + +; +; message definitions +; + +; Facility=System + +MessageId=0 +Severity=Success +Facility=System +SymbolicName=ERROR_SUCCESS +Language=Bulgarian +ERROR_SUCCESS - Действието е завършено успешно. +. + +MessageId=1 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_FUNCTION +Language=Bulgarian +ERROR_INVALID_FUNCTION - Грешна функция. +. + +MessageId=2 +Severity=Success +Facility=System +SymbolicName=ERROR_FILE_NOT_FOUND +Language=Bulgarian +ERROR_FILE_NOT_FOUND - Файлът не е открит. +. + +MessageId=3 +Severity=Success +Facility=System +SymbolicName=ERROR_PATH_NOT_FOUND +Language=Bulgarian +ERROR_PATH_NOT_FOUND - Пътят не е открит. +. + +MessageId=4 +Severity=Success +Facility=System +SymbolicName=ERROR_TOO_MANY_OPEN_FILES +Language=Bulgarian +ERROR_TOO_MANY_OPEN_FILES - Твърде много отворени файлове. +. + +MessageId=5 +Severity=Success +Facility=System +SymbolicName=ERROR_ACCESS_DENIED +Language=Bulgarian +ERROR_ACCESS_DENIED - Достъпът е отказан. +. + +MessageId=6 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_HANDLE +Language=Bulgarian +ERROR_INVALID_HANDLE - Грешен държател. +. + +MessageId=7 +Severity=Success +Facility=System +SymbolicName=ERROR_ARENA_TRASHED +Language=Bulgarian +ERROR_ARENA_TRASHED - The storage control blocks were destroyed. +. + +MessageId=8 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_ENOUGH_MEMORY +Language=Bulgarian +ERROR_NOT_ENOUGH_MEMORY - Not enough storage is available to process this command. +. + +MessageId=9 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_BLOCK +Language=Bulgarian +ERROR_INVALID_BLOCK - The storage control block address is invalid. +. + +MessageId=10 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_ENVIRONMENT +Language=Bulgarian +ERROR_BAD_ENVIRONMENT - Средата е неправилна. +. + +MessageId=11 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_FORMAT +Language=Bulgarian +ERROR_BAD_FORMAT - Направен е опит за зареждане на приложение с неправилен формат. +. + +MessageId=12 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_ACCESS +Language=Bulgarian +ERROR_INVALID_ACCESS - Кодът за достъп е грешен. +. + +MessageId=13 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_DATA +Language=Bulgarian +ERROR_INVALID_DATA - Неправилни данни. +. + +MessageId=14 +Severity=Success +Facility=System +SymbolicName=ERROR_OUTOFMEMORY +Language=Bulgarian +ERROR_OUTOFMEMORY - Not enough storage is available to complete this operation. +. + +MessageId=15 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_DRIVE +Language=Bulgarian +ERROR_INVALID_DRIVE - Уредбата не може да намери указаното устройство. +. + +MessageId=16 +Severity=Success +Facility=System +SymbolicName=ERROR_CURRENT_DIRECTORY +Language=Bulgarian +ERROR_CURRENT_DIRECTORY - Изтриването на папката е невъзможно. +. + +MessageId=17 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_SAME_DEVICE +Language=Bulgarian +ERROR_NOT_SAME_DEVICE - Уредбата не може да премести файла на друго дисково устройство. +. + +MessageId=18 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_MORE_FILES +Language=Bulgarian +ERROR_NO_MORE_FILES - Няма повече файлове. +. + +MessageId=19 +Severity=Success +Facility=System +SymbolicName=ERROR_WRITE_PROTECT +Language=Bulgarian +ERROR_WRITE_PROTECT - Носителят е защитен против запис. +. + +MessageId=20 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_UNIT +Language=Bulgarian +ERROR_BAD_UNIT - Уредбата не може да намери указаното устройство. +. + +MessageId=21 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_READY +Language=Bulgarian +ERROR_NOT_READY - Устройството не е готово. +. + +MessageId=22 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_COMMAND +Language=Bulgarian +ERROR_BAD_COMMAND - Устройството не разпознава командата. +. + +MessageId=23 +Severity=Success +Facility=System +SymbolicName=ERROR_CRC +Language=Bulgarian +ERROR_CRC - Грешка в данните (проверка на цикличния остатък (crc)). +. + +MessageId=24 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_LENGTH +Language=Bulgarian +ERROR_BAD_LENGTH - Програмата издаде команда, но дължината на командата е грешна. +. + +MessageId=25 +Severity=Success +Facility=System +SymbolicName=ERROR_SEEK +Language=Bulgarian +ERROR_SEEK - УСтройството не може да открие определена област или пътечката от диска. +. + +MessageId=26 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_DOS_DISK +Language=Bulgarian +ERROR_NOT_DOS_DISK - Указаният диск или дискета не може да бъде достъпен. +. + +MessageId=27 +Severity=Success +Facility=System +SymbolicName=ERROR_SECTOR_NOT_FOUND +Language=Bulgarian +ERROR_SECTOR_NOT_FOUND - Устройството не може да намери заявения отсек (сектор). +. + +MessageId=28 +Severity=Success +Facility=System +SymbolicName=ERROR_OUT_OF_PAPER +Language=Bulgarian +ERROR_OUT_OF_PAPER - Хартията в печатача свърши. +. + +MessageId=29 +Severity=Success +Facility=System +SymbolicName=ERROR_WRITE_FAULT +Language=Bulgarian +ERROR_WRITE_FAULT - Уредбата не може да пише на указаното устройство. +. + +MessageId=30 +Severity=Success +Facility=System +SymbolicName=ERROR_READ_FAULT +Language=Bulgarian +ERROR_READ_FAULT - Уредбата не може да чете от указаното устройство.. + +MessageId=31 +Severity=Success +Facility=System +SymbolicName=ERROR_GEN_FAILURE +Language=Bulgarian +ERROR_GEN_FAILURE - A device attached to the system is not functioning. +. + +MessageId=32 +Severity=Success +Facility=System +SymbolicName=ERROR_SHARING_VIOLATION +Language=Bulgarian +ERROR_SHARING_VIOLATION - The process cannot access the file because it is being used by another process. +. + +MessageId=33 +Severity=Success +Facility=System +SymbolicName=ERROR_LOCK_VIOLATION +Language=Bulgarian +ERROR_LOCK_VIOLATION - The process cannot access the file because another process has locked a portion of the file. +. + +MessageId=34 +Severity=Success +Facility=System +SymbolicName=ERROR_WRONG_DISK +Language=Bulgarian +ERROR_WRONG_DISK - The wrong diskette is in the drive. Insert %2 (Volume Serial Number: %3) into drive %1. +. + +MessageId=36 +Severity=Success +Facility=System +SymbolicName=ERROR_SHARING_BUFFER_EXCEEDED +Language=Bulgarian +ERROR_SHARING_BUFFER_EXCEEDED - Too many files opened for sharing. +. + +MessageId=38 +Severity=Success +Facility=System +SymbolicName=ERROR_HANDLE_EOF +Language=Bulgarian +ERROR_HANDLE_EOF - Reached the end of the file. +. + +MessageId=39 +Severity=Success +Facility=System +SymbolicName=ERROR_HANDLE_DISK_FULL +Language=Bulgarian +ERROR_HANDLE_DISK_FULL - Дискът е пълен. +. + +MessageId=50 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_SUPPORTED +Language=Bulgarian +ERROR_NOT_SUPPORTED - Заявката не се поддържа. +. + +MessageId=51 +Severity=Success +Facility=System +SymbolicName=ERROR_REM_NOT_LIST +Language=Bulgarian +ERROR_REM_NOT_LIST - Windows cannot find the network path. Verify that the network path is correct and the destination computer is not busy or turned off. If Windows still cannot find the network path, contact your network administrator. +. + +MessageId=52 +Severity=Success +Facility=System +SymbolicName=ERROR_DUP_NAME +Language=Bulgarian +ERROR_DUP_NAME - You were not connected because a duplicate name exists on the network. Go to System in the Control Panel to change the computer name and try again. +. + +MessageId=53 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_NETPATH +Language=Bulgarian +ERROR_BAD_NETPATH - Мрежовият път не е открит. +. + +MessageId=54 +Severity=Success +Facility=System +SymbolicName=ERROR_NETWORK_BUSY +Language=Bulgarian +ERROR_NETWORK_BUSY - Мрежата е заета. +. + +MessageId=55 +Severity=Success +Facility=System +SymbolicName=ERROR_DEV_NOT_EXIST +Language=Bulgarian +ERROR_DEV_NOT_EXIST - The specified network resource or device is no longer available. +. + +MessageId=56 +Severity=Success +Facility=System +SymbolicName=ERROR_TOO_MANY_CMDS +Language=Bulgarian +ERROR_TOO_MANY_CMDS - The network BIOS command limit has been reached. +. + +MessageId=57 +Severity=Success +Facility=System +SymbolicName=ERROR_ADAP_HDW_ERR +Language=Bulgarian +ERROR_ADAP_HDW_ERR - A network adapter hardware error occurred. +. + +MessageId=58 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_NET_RESP +Language=Bulgarian +ERROR_BAD_NET_RESP - The specified server cannot perform the requested operation. +. + +MessageId=59 +Severity=Success +Facility=System +SymbolicName=ERROR_UNEXP_NET_ERR +Language=Bulgarian +ERROR_UNEXP_NET_ERR - An unexpected network error occurred. +. + +MessageId=60 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_REM_ADAP +Language=Bulgarian +ERROR_BAD_REM_ADAP - The remote adapter is not compatible. +. + +MessageId=61 +Severity=Success +Facility=System +SymbolicName=ERROR_PRINTQ_FULL +Language=Bulgarian +ERROR_PRINTQ_FULL - The printer queue is full. +. + +MessageId=62 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_SPOOL_SPACE +Language=Bulgarian +ERROR_NO_SPOOL_SPACE - Space to store the file waiting to be printed is not available on the server. +. + +MessageId=63 +Severity=Success +Facility=System +SymbolicName=ERROR_PRINT_CANCELLED +Language=Bulgarian +ERROR_PRINT_CANCELLED - Your file waiting to be printed was deleted. +. + +MessageId=64 +Severity=Success +Facility=System +SymbolicName=ERROR_NETNAME_DELETED +Language=Bulgarian +ERROR_NETNAME_DELETED - The specified network name is no longer available. +. + +MessageId=65 +Severity=Success +Facility=System +SymbolicName=ERROR_NETWORK_ACCESS_DENIED +Language=Bulgarian +ERROR_NETWORK_ACCESS_DENIED - Network access is denied. +. + +MessageId=66 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_DEV_TYPE +Language=Bulgarian +ERROR_BAD_DEV_TYPE - The network resource type is not correct. +. + +MessageId=67 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_NET_NAME +Language=Bulgarian +ERROR_BAD_NET_NAME - Сетевое имя не найдено. +. + +MessageId=68 +Severity=Success +Facility=System +SymbolicName=ERROR_TOO_MANY_NAMES +Language=Bulgarian +ERROR_TOO_MANY_NAMES - The name limit for the local computer network adapter card was exceeded. +. + +MessageId=69 +Severity=Success +Facility=System +SymbolicName=ERROR_TOO_MANY_SESS +Language=Bulgarian +ERROR_TOO_MANY_SESS - The network BIOS session limit was exceeded. +. + +MessageId=70 +Severity=Success +Facility=System +SymbolicName=ERROR_SHARING_PAUSED +Language=Bulgarian +ERROR_SHARING_PAUSED - The remote server has been paused or is in the process of being started. +. + +MessageId=71 +Severity=Success +Facility=System +SymbolicName=ERROR_REQ_NOT_ACCEP +Language=Bulgarian +ERROR_REQ_NOT_ACCEP - No more connections can be made to this remote computer at this time because there are already as many connections as the computer can accept. +. + +MessageId=72 +Severity=Success +Facility=System +SymbolicName=ERROR_REDIR_PAUSED +Language=Bulgarian +ERROR_REDIR_PAUSED - The specified printer or disk device has been paused. +. + +MessageId=80 +Severity=Success +Facility=System +SymbolicName=ERROR_FILE_EXISTS +Language=Bulgarian +ERROR_FILE_EXISTS - Файл существует. +. + +MessageId=82 +Severity=Success +Facility=System +SymbolicName=ERROR_CANNOT_MAKE +Language=Bulgarian +ERROR_CANNOT_MAKE - Не удалось создать файл или директорию. +. + +MessageId=83 +Severity=Success +Facility=System +SymbolicName=ERROR_FAIL_I24 +Language=Bulgarian +ERROR_FAIL_I24 - Fail on INT 24. +. + +MessageId=84 +Severity=Success +Facility=System +SymbolicName=ERROR_OUT_OF_STRUCTURES +Language=Bulgarian +ERROR_OUT_OF_STRUCTURES - Storage to process this request is not available. +. + +MessageId=85 +Severity=Success +Facility=System +SymbolicName=ERROR_ALREADY_ASSIGNED +Language=Bulgarian +ERROR_ALREADY_ASSIGNED - The local device name is already in use. +. + +MessageId=86 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_PASSWORD +Language=Bulgarian +ERROR_INVALID_PASSWORD - The specified network password is not correct. +. + +MessageId=87 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_PARAMETER +Language=Bulgarian +ERROR_INVALID_PARAMETER - Некорректный параметр. +. + +MessageId=88 +Severity=Success +Facility=System +SymbolicName=ERROR_NET_WRITE_FAULT +Language=Bulgarian +ERROR_NET_WRITE_FAULT - A write fault occurred on the network. +. + +MessageId=89 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_PROC_SLOTS +Language=Bulgarian +ERROR_NO_PROC_SLOTS - The system cannot start another process at this time. +. + +MessageId=100 +Severity=Success +Facility=System +SymbolicName=ERROR_TOO_MANY_SEMAPHORES +Language=Bulgarian +ERROR_TOO_MANY_SEMAPHORES - Cannot create another system semaphore. +. + +MessageId=101 +Severity=Success +Facility=System +SymbolicName=ERROR_EXCL_SEM_ALREADY_OWNED +Language=Bulgarian +ERROR_EXCL_SEM_ALREADY_OWNED - The exclusive semaphore is owned by another process. +. + +MessageId=102 +Severity=Success +Facility=System +SymbolicName=ERROR_SEM_IS_SET +Language=Bulgarian +ERROR_SEM_IS_SET - The semaphore is set and cannot be closed. +. + +MessageId=103 +Severity=Success +Facility=System +SymbolicName=ERROR_TOO_MANY_SEM_REQUESTS +Language=Bulgarian +ERROR_TOO_MANY_SEM_REQUESTS - The semaphore cannot be set again. +. + +MessageId=104 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_AT_INTERRUPT_TIME +Language=Bulgarian +ERROR_INVALID_AT_INTERRUPT_TIME - Cannot request exclusive semaphores at interrupt time. +. + +MessageId=105 +Severity=Success +Facility=System +SymbolicName=ERROR_SEM_OWNER_DIED +Language=Bulgarian +ERROR_SEM_OWNER_DIED - The previous ownership of this semaphore has ended. +. + +MessageId=106 +Severity=Success +Facility=System +SymbolicName=ERROR_SEM_USER_LIMIT +Language=Bulgarian +ERROR_SEM_USER_LIMIT - Вставте дискету в дисковод %1. +. + +MessageId=107 +Severity=Success +Facility=System +SymbolicName=ERROR_DISK_CHANGE +Language=Bulgarian +ERROR_DISK_CHANGE - The program stopped because an alternate diskette was not inserted. +. + +MessageId=108 +Severity=Success +Facility=System +SymbolicName=ERROR_DRIVE_LOCKED +Language=Bulgarian +ERROR_DRIVE_LOCKED - The disk is in use or locked by another process. +. + +MessageId=109 +Severity=Success +Facility=System +SymbolicName=ERROR_BROKEN_PIPE +Language=Bulgarian +ERROR_BROKEN_PIPE - The pipe has been ended. +. + +MessageId=110 +Severity=Success +Facility=System +SymbolicName=ERROR_OPEN_FAILED +Language=Bulgarian +ERROR_OPEN_FAILED - Системе не удалось открыть указанный файл или устройство. +. + +MessageId=111 +Severity=Success +Facility=System +SymbolicName=ERROR_BUFFER_OVERFLOW +Language=Bulgarian +ERROR_BUFFER_OVERFLOW - Имя файла слишком длинное. +. + +MessageId=112 +Severity=Success +Facility=System +SymbolicName=ERROR_DISK_FULL +Language=Bulgarian +ERROR_DISK_FULL - There is not enough space on the disk. +. + +MessageId=113 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_MORE_SEARCH_HANDLES +Language=Bulgarian +ERROR_NO_MORE_SEARCH_HANDLES - No more internal file identifiers available. +. + +MessageId=114 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_TARGET_HANDLE +Language=Bulgarian +ERROR_INVALID_TARGET_HANDLE - The target internal file identifier is incorrect. +. + +MessageId=117 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_CATEGORY +Language=Bulgarian +ERROR_INVALID_CATEGORY - The IOCTL call made by the application program is not correct. +. + +MessageId=118 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_VERIFY_SWITCH +Language=Bulgarian +ERROR_INVALID_VERIFY_SWITCH - The verify-on-write switch parameter value is not correct. +. + +MessageId=119 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_DRIVER_LEVEL +Language=Bulgarian +ERROR_BAD_DRIVER_LEVEL - The system does not support the command requested. +. + +MessageId=120 +Severity=Success +Facility=System +SymbolicName=ERROR_CALL_NOT_IMPLEMENTED +Language=Bulgarian +ERROR_CALL_NOT_IMPLEMENTED - Эта функция не поддерживается в данной системе. +. + +MessageId=121 +Severity=Success +Facility=System +SymbolicName=ERROR_SEM_TIMEOUT +Language=Bulgarian +ERROR_SEM_TIMEOUT - The semaphore timeout period has expired. +. + +MessageId=122 +Severity=Success +Facility=System +SymbolicName=ERROR_INSUFFICIENT_BUFFER +Language=Bulgarian +ERROR_INSUFFICIENT_BUFFER - The data area passed to a system call is too small. +. + +MessageId=123 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_NAME +Language=Bulgarian +ERROR_INVALID_NAME - Имя файла, директории или метки диска имеют неверный синтаксис. +. + +MessageId=124 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_LEVEL +Language=Bulgarian +ERROR_INVALID_LEVEL - The system call level is not correct. +. + +MessageId=125 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_VOLUME_LABEL +Language=Bulgarian +ERROR_NO_VOLUME_LABEL - Диск не имеет метки тома. +. + +MessageId=126 +Severity=Success +Facility=System +SymbolicName=ERROR_MOD_NOT_FOUND +Language=Bulgarian +ERROR_MOD_NOT_FOUND - Указанный модуль не найден. +. + +MessageId=127 +Severity=Success +Facility=System +SymbolicName=ERROR_PROC_NOT_FOUND +Language=Bulgarian +ERROR_PROC_NOT_FOUND - Указанная процедура не найдена. +. + +MessageId=128 +Severity=Success +Facility=System +SymbolicName=ERROR_WAIT_NO_CHILDREN +Language=Bulgarian +ERROR_WAIT_NO_CHILDREN - There are no child processes to wait for. +. + +MessageId=129 +Severity=Success +Facility=System +SymbolicName=ERROR_CHILD_NOT_COMPLETE +Language=Bulgarian +ERROR_CHILD_NOT_COMPLETE - Приложение %1 не может быть запущено в режиме Win32. +. + +MessageId=130 +Severity=Success +Facility=System +SymbolicName=ERROR_DIRECT_ACCESS_HANDLE +Language=Bulgarian +ERROR_DIRECT_ACCESS_HANDLE - Attempt to use a file handle to an open disk partition for an operation other than raw disk I/O. +. + +MessageId=131 +Severity=Success +Facility=System +SymbolicName=ERROR_NEGATIVE_SEEK +Language=Bulgarian +ERROR_NEGATIVE_SEEK - An attempt was made to move the file pointer before the beginning of the file. +. + +MessageId=132 +Severity=Success +Facility=System +SymbolicName=ERROR_SEEK_ON_DEVICE +Language=Bulgarian +ERROR_SEEK_ON_DEVICE - The file pointer cannot be set on the specified device or file. +. + +MessageId=133 +Severity=Success +Facility=System +SymbolicName=ERROR_IS_JOIN_TARGET +Language=Bulgarian +ERROR_IS_JOIN_TARGET - A JOIN or SUBST command cannot be used for a drive that contains previously joined drives. +. + +MessageId=134 +Severity=Success +Facility=System +SymbolicName=ERROR_IS_JOINED +Language=Bulgarian +ERROR_IS_JOINED - An attempt was made to use a JOIN or SUBST command on a drive that has already been joined. +. + +MessageId=135 +Severity=Success +Facility=System +SymbolicName=ERROR_IS_SUBSTED +Language=Bulgarian +ERROR_IS_SUBSTED - An attempt was made to use a JOIN or SUBST command on a drive that has already been substituted. +. + +MessageId=136 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_JOINED +Language=Bulgarian +ERROR_NOT_JOINED - The system tried to delete the JOIN of a drive that is not joined. +. + +MessageId=137 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_SUBSTED +Language=Bulgarian +ERROR_NOT_SUBSTED - The system tried to delete the substitution of a drive that is not substituted. +. + +MessageId=138 +Severity=Success +Facility=System +SymbolicName=ERROR_JOIN_TO_JOIN +Language=Bulgarian +ERROR_JOIN_TO_JOIN - The system tried to join a drive to a directory on a joined drive. +. + +MessageId=139 +Severity=Success +Facility=System +SymbolicName=ERROR_SUBST_TO_SUBST +Language=Bulgarian +ERROR_SUBST_TO_SUBST - The system tried to substitute a drive to a directory on a substituted drive. +. + +MessageId=140 +Severity=Success +Facility=System +SymbolicName=ERROR_JOIN_TO_SUBST +Language=Bulgarian +ERROR_JOIN_TO_SUBST - The system tried to join a drive to a directory on a substituted drive. +. + +MessageId=141 +Severity=Success +Facility=System +SymbolicName=ERROR_SUBST_TO_JOIN +Language=Bulgarian +ERROR_SUBST_TO_JOIN - The system tried to SUBST a drive to a directory on a joined drive. +. + +MessageId=142 +Severity=Success +Facility=System +SymbolicName=ERROR_BUSY_DRIVE +Language=Bulgarian +ERROR_BUSY_DRIVE - The system cannot perform a JOIN or SUBST at this time. +. + +MessageId=143 +Severity=Success +Facility=System +SymbolicName=ERROR_SAME_DRIVE +Language=Bulgarian +ERROR_SAME_DRIVE - The system cannot join or substitute a drive to or for a directory on the same drive. +. + +MessageId=144 +Severity=Success +Facility=System +SymbolicName=ERROR_DIR_NOT_ROOT +Language=Bulgarian +ERROR_DIR_NOT_ROOT - The directory is not a subdirectory of the root directory. +. + +MessageId=145 +Severity=Success +Facility=System +SymbolicName=ERROR_DIR_NOT_EMPTY +Language=Bulgarian +ERROR_DIR_NOT_EMPTY - Директория не пустая. +. + +MessageId=146 +Severity=Success +Facility=System +SymbolicName=ERROR_IS_SUBST_PATH +Language=Bulgarian +ERROR_IS_SUBST_PATH - The path specified is being used in a substitute. +. + +MessageId=147 +Severity=Success +Facility=System +SymbolicName=ERROR_IS_JOIN_PATH +Language=Bulgarian +ERROR_IS_JOIN_PATH - Not enough resources are available to process this command. +. + +MessageId=148 +Severity=Success +Facility=System +SymbolicName=ERROR_PATH_BUSY +Language=Bulgarian +ERROR_PATH_BUSY - Указанный путь не может быть использован в данное время. +. + +MessageId=149 +Severity=Success +Facility=System +SymbolicName=ERROR_IS_SUBST_TARGET +Language=Bulgarian +ERROR_IS_SUBST_TARGET - An attempt was made to join or substitute a drive for which a directory on the drive is the target of a previous substitute. +. + +MessageId=150 +Severity=Success +Facility=System +SymbolicName=ERROR_SYSTEM_TRACE +Language=Bulgarian +ERROR_SYSTEM_TRACE - System trace information was not specified in your CONFIG.SYS file, or tracing is disallowed. +. + +MessageId=151 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_EVENT_COUNT +Language=Bulgarian +ERROR_INVALID_EVENT_COUNT - The number of specified semaphore events for DosMuxSemWait is not correct. +. + +MessageId=152 +Severity=Success +Facility=System +SymbolicName=ERROR_TOO_MANY_MUXWAITERS +Language=Bulgarian +ERROR_TOO_MANY_MUXWAITERS - DosMuxSemWait did not execute; too many semaphores are already set. +. + +MessageId=153 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_LIST_FORMAT +Language=Bulgarian +ERROR_INVALID_LIST_FORMAT - The DosMuxSemWait list is not correct. +. + +MessageId=154 +Severity=Success +Facility=System +SymbolicName=ERROR_LABEL_TOO_LONG +Language=Bulgarian +ERROR_LABEL_TOO_LONG - The volume label you entered exceeds the label character limit of the target file system. +. + +MessageId=155 +Severity=Success +Facility=System +SymbolicName=ERROR_TOO_MANY_TCBS +Language=Bulgarian +ERROR_TOO_MANY_TCBS - Невозможно создать другой поток. +. + +MessageId=156 +Severity=Success +Facility=System +SymbolicName=ERROR_SIGNAL_REFUSED +Language=Bulgarian +ERROR_SIGNAL_REFUSED - The recipient process has refused the signal. +. + +MessageId=157 +Severity=Success +Facility=System +SymbolicName=ERROR_DISCARDED +Language=Bulgarian +ERROR_DISCARDED - The segment is already discarded and cannot be locked. +. + +MessageId=158 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_LOCKED +Language=Bulgarian +ERROR_NOT_LOCKED - The segment is already unlocked. +. + +MessageId=159 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_THREADID_ADDR +Language=Bulgarian +ERROR_BAD_THREADID_ADDR - The address for the thread ID is not correct. +. + +MessageId=160 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_ARGUMENTS +Language=Bulgarian +ERROR_BAD_ARGUMENTS - The argument string passed to DosExecPgm is not correct. +. + +MessageId=161 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_PATHNAME +Language=Bulgarian +ERROR_BAD_PATHNAME - Указанный путь неверный. +. + +MessageId=162 +Severity=Success +Facility=System +SymbolicName=ERROR_SIGNAL_PENDING +Language=Bulgarian +ERROR_SIGNAL_PENDING - A signal is already pending. +. + +MessageId=164 +Severity=Success +Facility=System +SymbolicName=ERROR_MAX_THRDS_REACHED +Language=Bulgarian +ERROR_MAX_THRDS_REACHED - No more threads can be created in the system. +. + +MessageId=167 +Severity=Success +Facility=System +SymbolicName=ERROR_LOCK_FAILED +Language=Bulgarian +ERROR_LOCK_FAILED - Unable to lock a region of a file. +. + +MessageId=170 +Severity=Success +Facility=System +SymbolicName=ERROR_BUSY +Language=Bulgarian +ERROR_BUSY - Требуемый ресурс уже используется. +. + +MessageId=173 +Severity=Success +Facility=System +SymbolicName=ERROR_CANCEL_VIOLATION +Language=Bulgarian +ERROR_CANCEL_VIOLATION - A lock request was not outstanding for the supplied cancel region. +. + +MessageId=174 +Severity=Success +Facility=System +SymbolicName=ERROR_ATOMIC_LOCKS_NOT_SUPPORTED +Language=Bulgarian +ERROR_ATOMIC_LOCKS_NOT_SUPPORTED - The file system does not support atomic changes to the lock type. +. + +MessageId=180 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_SEGMENT_NUMBER +Language=Bulgarian +ERROR_INVALID_SEGMENT_NUMBER - The system detected a segment number that was not correct. +. + +MessageId=182 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_ORDINAL +Language=Bulgarian +ERROR_INVALID_ORDINAL - Операционная система не может запустить %1. +. + +MessageId=183 +Severity=Success +Facility=System +SymbolicName=ERROR_ALREADY_EXISTS +Language=Bulgarian +ERROR_ALREADY_EXISTS - Cannot create a file when that file already exists. +. + +MessageId=186 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_FLAG_NUMBER +Language=Bulgarian +ERROR_INVALID_FLAG_NUMBER - The flag passed is not correct. +. + +MessageId=187 +Severity=Success +Facility=System +SymbolicName=ERROR_SEM_NOT_FOUND +Language=Bulgarian +ERROR_SEM_NOT_FOUND - The specified system semaphore name was not found. +. + +MessageId=188 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_STARTING_CODESEG +Language=Bulgarian +ERROR_INVALID_STARTING_CODESEG - Операционная система не может запустить %1. +. + +MessageId=189 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_STACKSEG +Language=Bulgarian +ERROR_INVALID_STACKSEG - Операционная система не может запустить %1. +. + +MessageId=190 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_MODULETYPE +Language=Bulgarian +ERROR_INVALID_MODULETYPE - Операционная система не может запустить %1. +. + +MessageId=191 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_EXE_SIGNATURE +Language=Bulgarian +ERROR_INVALID_EXE_SIGNATURE - Невозможно запустить %1 в режиме Win32. +. + +MessageId=192 +Severity=Success +Facility=System +SymbolicName=ERROR_EXE_MARKED_INVALID +Language=Bulgarian +ERROR_EXE_MARKED_INVALID - Операционная система не может запустить %1. +. + +MessageId=193 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_EXE_FORMAT +Language=Bulgarian +ERROR_BAD_EXE_FORMAT - %1 некорретное Win32 приложение. +. + +MessageId=194 +Severity=Success +Facility=System +SymbolicName=ERROR_ITERATED_DATA_EXCEEDS_64k +Language=Bulgarian +ERROR_ITERATED_DATA_EXCEEDS_64k - Операционная система не может запустить %1. +. + +MessageId=195 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_MINALLOCSIZE +Language=Bulgarian +ERROR_INVALID_MINALLOCSIZE - Операционная система не может запустить %1. +. + +MessageId=196 +Severity=Success +Facility=System +SymbolicName=ERROR_DYNLINK_FROM_INVALID_RING +Language=Bulgarian +ERROR_DYNLINK_FROM_INVALID_RING - The operating system cannot run this application program. +. + +MessageId=197 +Severity=Success +Facility=System +SymbolicName=ERROR_IOPL_NOT_ENABLED +Language=Bulgarian +ERROR_IOPL_NOT_ENABLED - The operating system is not presently configured to run this application. +. + +MessageId=198 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_SEGDPL +Language=Bulgarian +ERROR_INVALID_SEGDPL - Операционная система не может запустить %1. +. + +MessageId=199 +Severity=Success +Facility=System +SymbolicName=ERROR_AUTODATASEG_EXCEEDS_64k +Language=Bulgarian +ERROR_AUTODATASEG_EXCEEDS_64k - The operating system cannot run this application program. +. + +MessageId=200 +Severity=Success +Facility=System +SymbolicName=ERROR_RING2SEG_MUST_BE_MOVABLE +Language=Bulgarian +ERROR_RING2SEG_MUST_BE_MOVABLE - The code segment cannot be greater than or equal to 64K. +. + +MessageId=201 +Severity=Success +Facility=System +SymbolicName=ERROR_RELOC_CHAIN_XEEDS_SEGLIM +Language=Bulgarian +ERROR_RELOC_CHAIN_XEEDS_SEGLIM - Операционная система не может запустить %1. +. + +MessageId=202 +Severity=Success +Facility=System +SymbolicName=ERROR_INFLOOP_IN_RELOC_CHAIN +Language=Bulgarian +ERROR_INFLOOP_IN_RELOC_CHAIN - Операционная система не может запустить %1. +. + +MessageId=203 +Severity=Success +Facility=System +SymbolicName=ERROR_ENVVAR_NOT_FOUND +Language=Bulgarian +ERROR_ENVVAR_NOT_FOUND - The system could not find the environment option that was entered. +. + +MessageId=205 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_SIGNAL_SENT +Language=Bulgarian +ERROR_NO_SIGNAL_SENT - No process in the command subtree has a signal handler. +. + +MessageId=206 +Severity=Success +Facility=System +SymbolicName=ERROR_FILENAME_EXCED_RANGE +Language=Bulgarian +ERROR_FILENAME_EXCED_RANGE - Имя файла или расширение слишком длинные. +. + +MessageId=207 +Severity=Success +Facility=System +SymbolicName=ERROR_RING2_STACK_IN_USE +Language=Bulgarian +ERROR_RING2_STACK_IN_USE - The ring 2 stack is in use. +. + +MessageId=208 +Severity=Success +Facility=System +SymbolicName=ERROR_META_EXPANSION_TOO_LONG +Language=Bulgarian +ERROR_META_EXPANSION_TOO_LONG - The global filename characters, * or ?, are entered incorrectly or too many global filename characters are specified. +. + +MessageId=209 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_SIGNAL_NUMBER +Language=Bulgarian +ERROR_INVALID_SIGNAL_NUMBER - The signal being posted is not correct. +. + +MessageId=210 +Severity=Success +Facility=System +SymbolicName=ERROR_THREAD_1_INACTIVE +Language=Bulgarian +ERROR_THREAD_1_INACTIVE - The signal handler cannot be set. +. + +MessageId=212 +Severity=Success +Facility=System +SymbolicName=ERROR_LOCKED +Language=Bulgarian +ERROR_LOCKED - The segment is locked and cannot be reallocated. +. + +MessageId=214 +Severity=Success +Facility=System +SymbolicName=ERROR_TOO_MANY_MODULES +Language=Bulgarian +ERROR_TOO_MANY_MODULES - Too many dynamic-link modules are attached to this program or dynamic-link module. +. + +MessageId=215 +Severity=Success +Facility=System +SymbolicName=ERROR_NESTING_NOT_ALLOWED +Language=Bulgarian +ERROR_NESTING_NOT_ALLOWED - Cannot nest calls to LoadModule. +. + +MessageId=216 +Severity=Success +Facility=System +SymbolicName=ERROR_EXE_MACHINE_TYPE_MISMATCH +Language=Bulgarian +ERROR_EXE_MACHINE_TYPE_MISMATCH - The image file %1 is valid, but is for a machine type other than the current machine. +. + +MessageId=217 +Severity=Success +Facility=System +SymbolicName=ERROR_EXE_CANNOT_MODIFY_SIGNED_BINARY +Language=Bulgarian +ERROR_EXE_CANNOT_MODIFY_SIGNED_BINARY - The image file %1 is signed, unable to modify. +. + +MessageId=218 +Severity=Success +Facility=System +SymbolicName=ERRO_EXE_CANNOT_MODIFY_STRONG_SIGNED_BINARY +Language=Bulgarian +ERRO_EXE_CANNOT_MODIFY_STRONG_SIGNED_BINARY - The image file %1 is strong signed, unable to modify. +. + +MessageId=230 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_PIPE +Language=Bulgarian +ERROR_BAD_PIPE - The pipe state is invalid. +. + +MessageId=231 +Severity=Success +Facility=System +SymbolicName=ERROR_PIPE_BUSY +Language=Bulgarian +ERROR_PIPE_BUSY - All pipe instances are busy. +. + +MessageId=232 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_DATA +Language=Bulgarian +ERROR_NO_DATA - The pipe is being closed. +. + +MessageId=233 +Severity=Success +Facility=System +SymbolicName=ERROR_PIPE_NOT_CONNECTED +Language=Bulgarian +ERROR_PIPE_NOT_CONNECTED - No process is on the other end of the pipe. +. + +MessageId=234 +Severity=Success +Facility=System +SymbolicName=ERROR_MORE_DATA +Language=Bulgarian +ERROR_MORE_DATA - Другие данные недоступны. +. + +MessageId=240 +Severity=Success +Facility=System +SymbolicName=ERROR_VC_DISCONNECTED +Language=Bulgarian +ERROR_VC_DISCONNECTED - Сессия была отменена. +. + +MessageId=254 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_EA_NAME +Language=Bulgarian +ERROR_INVALID_EA_NAME - The specified extended attribute name was invalid. +. + +MessageId=255 +Severity=Success +Facility=System +SymbolicName=ERROR_EA_LIST_INCONSISTENT +Language=Bulgarian +ERROR_EA_LIST_INCONSISTENT - Расширенные атрибуты протеворечивы. +. + +MessageId=258 +Severity=Success +Facility=System +SymbolicName=WAIT_TIMEOUT +Language=Bulgarian +WAIT_TIMEOUT - The wait operation timed out. +. + +MessageId=259 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_MORE_ITEMS +Language=Bulgarian +ERROR_NO_MORE_ITEMS - No more data is available. +. + +MessageId=266 +Severity=Success +Facility=System +SymbolicName=ERROR_CANNOT_COPY +Language=Bulgarian +ERROR_CANNOT_COPY - Функция копирования не может быть использована. +. + +MessageId=267 +Severity=Success +Facility=System +SymbolicName=ERROR_DIRECTORY +Language=Bulgarian +ERROR_DIRECTORY - Неверное имя директории. +. + +MessageId=275 +Severity=Success +Facility=System +SymbolicName=ERROR_EAS_DIDNT_FIT +Language=Bulgarian +ERROR_EAS_DIDNT_FIT - The extended attributes did not fit in the buffer. +. + +MessageId=276 +Severity=Success +Facility=System +SymbolicName=ERROR_EA_FILE_CORRUPT +Language=Bulgarian +ERROR_EA_FILE_CORRUPT - The extended attribute file on the mounted file system is corrupt. +. + +MessageId=277 +Severity=Success +Facility=System +SymbolicName=ERROR_EA_TABLE_FULL +Language=Bulgarian +ERROR_EA_TABLE_FULL - The extended attribute table file is full. +. + +MessageId=278 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_EA_HANDLE +Language=Bulgarian +ERROR_INVALID_EA_HANDLE - The specified extended attribute handle is invalid. +. + +MessageId=282 +Severity=Success +Facility=System +SymbolicName=ERROR_EAS_NOT_SUPPORTED +Language=Bulgarian +ERROR_EAS_NOT_SUPPORTED - Смонтированная файловая система не поддерживает расширенные атрибуты. +. + +MessageId=288 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_OWNER +Language=Bulgarian +ERROR_NOT_OWNER - Attempt to release mutex not owned by caller. +. + +MessageId=298 +Severity=Success +Facility=System +SymbolicName=ERROR_TOO_MANY_POSTS +Language=Bulgarian +ERROR_TOO_MANY_POSTS - Too many posts were made to a semaphore. +. + +MessageId=299 +Severity=Success +Facility=System +SymbolicName=ERROR_PARTIAL_COPY +Language=Bulgarian +ERROR_PARTIAL_COPY - Only part of a ReadProcessMemory or WriteProcessMemory request was completed. +. + +MessageId=300 +Severity=Success +Facility=System +SymbolicName=ERROR_OPLOCK_NOT_GRANTED +Language=Bulgarian +ERROR_OPLOCK_NOT_GRANTED - The oplock request is denied. +. + +MessageId=301 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_OPLOCK_PROTOCOL +Language=Bulgarian +ERROR_INVALID_OPLOCK_PROTOCOL - An invalid oplock acknowledgment was received by the system. +. + +MessageId=302 +Severity=Success +Facility=System +SymbolicName=ERROR_DISK_TOO_FRAGMENTED +Language=Bulgarian +ERROR_DISK_TOO_FRAGMENTED - The volume is too fragmented to complete this operation. +. + +MessageId=303 +Severity=Success +Facility=System +SymbolicName=ERROR_DELETE_PENDING +Language=Bulgarian +ERROR_DELETE_PENDING - The file cannot be opened because it is in the process of being deleted. +. + +MessageId=317 +Severity=Success +Facility=System +SymbolicName=ERROR_MR_MID_NOT_FOUND +Language=Bulgarian +ERROR_MR_MID_NOT_FOUND - The system cannot find message text for message number 0x%1 in the message file for %2. +. + +MessageId=318 +Severity=Success +Facility=System +SymbolicName=ERROR_SCOPE_NOT_FOUND +Language=Bulgarian +ERROR_SCOPE_NOT_FOUND - The scope specified was not found. +. + +MessageId=487 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_ADDRESS +Language=Bulgarian +ERROR_INVALID_ADDRESS - Attempt to access invalid address. +. + +MessageId=534 +Severity=Success +Facility=System +SymbolicName=ERROR_ARITHMETIC_OVERFLOW +Language=Bulgarian +ERROR_ARITHMETIC_OVERFLOW - Arithmetic result exceeded 32 bits. +. + +MessageId=535 +Severity=Success +Facility=System +SymbolicName=ERROR_PIPE_CONNECTED +Language=Bulgarian +ERROR_PIPE_CONNECTED - There is a process on other end of the pipe. +. + +MessageId=536 +Severity=Success +Facility=System +SymbolicName=ERROR_PIPE_LISTENING +Language=Bulgarian +ERROR_PIPE_LISTENING - Waiting for a process to open the other end of the pipe. +. + +MessageId=537 +Severity=Success +Facility=System +SymbolicName=ERROR_ACPI_ERROR +Language=Bulgarian +ERROR_ACPI_ERROR - Произошла ошибка в подсистеме ACPI. +. + +MessageId=538 +Severity=Success +Facility=System +SymbolicName=ERROR_ABIOS_ERROR +Language=Bulgarian +ERROR_ABIOS_ERROR - Произошла ошибка в подсистеме ABIOS. +. + +MessageId=539 +Severity=Success +Facility=System +SymbolicName=ERROR_WX86_WARNING +Language=Bulgarian +ERROR_WX86_WARNING - A warning occurred in the WX86 subsystem. +. + +MessageId=540 +Severity=Success +Facility=System +SymbolicName=ERROR_WX86_ERROR +Language=Bulgarian +ERROR_WX86_ERROR - Произошла ошибка в подсистеме WX86. +. + +MessageId=541 +Severity=Success +Facility=System +SymbolicName=ERROR_TIMER_NOT_CANCELED +Language=Bulgarian +ERROR_TIMER_NOT_CANCELED - An attempt was made to cancel or set a timer that has an associated APC and the subject thread is not the thread that originally set the timer with an associated APC routine. +. + +MessageId=542 +Severity=Success +Facility=System +SymbolicName=ERROR_UNWIND +Language=Bulgarian +ERROR_UNWIND - Unwind exception code. +. + +MessageId=543 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_STACK +Language=Bulgarian +ERROR_BAD_STACK - An invalid or unaligned stack was encountered during an unwind operation. +. + +MessageId=544 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_UNWIND_TARGET +Language=Bulgarian +ERROR_INVALID_UNWIND_TARGET - An invalid unwind target was encountered during an unwind operation. +. + +MessageId=545 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_PORT_ATTRIBUTES +Language=Bulgarian +ERROR_INVALID_PORT_ATTRIBUTES - Invalid Object Attributes specified to NtCreatePort or invalid Port Attributes specified to NtConnectPort +. + +MessageId=546 +Severity=Success +Facility=System +SymbolicName=ERROR_PORT_MESSAGE_TOO_LONG +Language=Bulgarian +ERROR_PORT_MESSAGE_TOO_LONG - Length of message passed to NtRequestPort or NtRequestWaitReplyPort was longer than the maximum message allowed by the port. +. + +MessageId=547 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_QUOTA_LOWER +Language=Bulgarian +ERROR_INVALID_QUOTA_LOWER - An attempt was made to lower a quota limit below the current usage. +. + +MessageId=548 +Severity=Success +Facility=System +SymbolicName=ERROR_DEVICE_ALREADY_ATTACHED +Language=Bulgarian +ERROR_DEVICE_ALREADY_ATTACHED - An attempt was made to attach to a device that was already attached to another device. +. + +MessageId=549 +Severity=Success +Facility=System +SymbolicName=ERROR_INSTRUCTION_MISALIGNMENT +Language=Bulgarian +ERROR_INSTRUCTION_MISALIGNMENT - An attempt was made to execute an instruction at an unaligned address and the host system does not support unaligned instruction references. +. + +MessageId=550 +Severity=Success +Facility=System +SymbolicName=ERROR_PROFILING_NOT_STARTED +Language=Bulgarian +ERROR_PROFILING_NOT_STARTED - Profiling not started. +. + +MessageId=551 +Severity=Success +Facility=System +SymbolicName=ERROR_PROFILING_NOT_STOPPED +Language=Bulgarian +ERROR_PROFILING_NOT_STOPPED - Profiling not stopped. +. + +MessageId=552 +Severity=Success +Facility=System +SymbolicName=ERROR_COULD_NOT_INTERPRET +Language=Bulgarian +ERROR_COULD_NOT_INTERPRET - The passed ACL did not contain the minimum required information. +. + +MessageId=553 +Severity=Success +Facility=System +SymbolicName=ERROR_PROFILING_AT_LIMIT +Language=Bulgarian +ERROR_PROFILING_AT_LIMIT - The number of active profiling objects is at the maximum and no more may be started. +. + +MessageId=554 +Severity=Success +Facility=System +SymbolicName=ERROR_CANT_WAIT +Language=Bulgarian +ERROR_CANT_WAIT - Used to indicate that an operation cannot continue without blocking for I/O. +. + +MessageId=555 +Severity=Success +Facility=System +SymbolicName=ERROR_CANT_TERMINATE_SELF +Language=Bulgarian +ERROR_CANT_TERMINATE_SELF - Indicates that a thread attempted to terminate itself by default (called NtTerminateThread with NULL) and it was the last thread in the current process. +. + +MessageId=556 +Severity=Success +Facility=System +SymbolicName=ERROR_UNEXPECTED_MM_CREATE_ERR +Language=Bulgarian +ERROR_UNEXPECTED_MM_CREATE_ERR - If an MM error is returned which is not defined in the standard FsRtl filter, it is converted to one of the following errors which is guaranteed to be in the filter. In this case information is lost, however, the filter correctly handles the exception. +. + +MessageId=557 +Severity=Success +Facility=System +SymbolicName=ERROR_UNEXPECTED_MM_MAP_ERROR +Language=Bulgarian +ERROR_UNEXPECTED_MM_MAP_ERROR - If an MM error is returned which is not defined in the standard FsRtl filter, it is converted to one of the following errors which is guaranteed to be in the filter. In this case information is lost, however, the filter correctly handles the exception. +. + +MessageId=558 +Severity=Success +Facility=System +SymbolicName=ERROR_UNEXPECTED_MM_EXTEND_ERR +Language=Bulgarian +ERROR_UNEXPECTED_MM_EXTEND_ERR - If an MM error is returned which is not defined in the standard FsRtl filter, it is converted to one of the following errors which is guaranteed to be in the filter. In this case information is lost, however, the filter correctly handles the exception. +. + +MessageId=559 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_FUNCTION_TABLE +Language=Bulgarian +ERROR_BAD_FUNCTION_TABLE - A malformed function table was encountered during an unwind operation. +. + +MessageId=560 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_GUID_TRANSLATION +Language=Bulgarian +ERROR_NO_GUID_TRANSLATION - Indicates that an attempt was made to assign protection to a file system file or directory and one of the SIDs in the security descriptor could not be translated into a GUID that could be stored by the file system. This causes the protection attempt to fail, which may cause a file creation attempt to fail. +. + +MessageId=561 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_LDT_SIZE +Language=Bulgarian +ERROR_INVALID_LDT_SIZE - Indicates that an attempt was made to grow an LDT by setting its size, or that the size was not an even number of selectors. +. + +MessageId=563 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_LDT_OFFSET +Language=Bulgarian +ERROR_INVALID_LDT_OFFSET - Indicates that the starting value for the LDT information was not an integral multiple of the selector size. +. + +MessageId=564 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_LDT_DESCRIPTOR +Language=Bulgarian +ERROR_INVALID_LDT_DESCRIPTOR - Indicates that the user supplied an invalid descriptor when trying to set up Ldt descriptors. +. + +MessageId=565 +Severity=Success +Facility=System +SymbolicName=ERROR_TOO_MANY_THREADS +Language=Bulgarian +ERROR_TOO_MANY_THREADS - Indicates a process has too many threads to perform the requested action. For example, assignment of a primary token may only be performed when a process has zero or one threads. +. + +MessageId=566 +Severity=Success +Facility=System +SymbolicName=ERROR_THREAD_NOT_IN_PROCESS +Language=Bulgarian +ERROR_THREAD_NOT_IN_PROCESS - An attempt was made to operate on a thread within a specific process, but the thread specified is not in the process specified. +. + +MessageId=567 +Severity=Success +Facility=System +SymbolicName=ERROR_PAGEFILE_QUOTA_EXCEEDED +Language=Bulgarian +ERROR_PAGEFILE_QUOTA_EXCEEDED - Page file quota was exceeded. +. + +MessageId=568 +Severity=Success +Facility=System +SymbolicName=ERROR_LOGON_SERVER_CONFLICT +Language=Bulgarian +ERROR_LOGON_SERVER_CONFLICT - The Netlogon service cannot start because another Netlogon service running in the domain conflicts with the specified role. +. + +MessageId=569 +Severity=Success +Facility=System +SymbolicName=ERROR_SYNCHRONIZATION_REQUIRED +Language=Bulgarian +ERROR_SYNCHRONIZATION_REQUIRED - The SAM database on a Windows Server is significantly out of synchronization with the copy on the Domain Controller. A complete synchronization is required. +. + +MessageId=570 +Severity=Success +Facility=System +SymbolicName=ERROR_NET_OPEN_FAILED +Language=Bulgarian +ERROR_NET_OPEN_FAILED - The NtCreateFile API failed. This error should never be returned to an application, it is a place holder for the Windows Lan Manager Redirector to use in its internal error mapping routines. +. + +MessageId=571 +Severity=Success +Facility=System +SymbolicName=ERROR_IO_PRIVILEGE_FAILED +Language=Bulgarian +ERROR_IO_PRIVILEGE_FAILED - The I/O permissions for the process could not be changed. +. + +MessageId=572 +Severity=Success +Facility=System +SymbolicName=ERROR_CONTROL_C_EXIT +Language=Bulgarian +ERROR_CONTROL_C_EXIT - The application terminated as a result of a CTRL+C. +. + +MessageId=573 +Severity=Success +Facility=System +SymbolicName=ERROR_MISSING_SYSTEMFILE +Language=Bulgarian +ERROR_MISSING_SYSTEMFILE - The required system file %hs is bad or missing. +. + +MessageId=574 +Severity=Success +Facility=System +SymbolicName=ERROR_UNHANDLED_EXCEPTION +Language=Bulgarian +ERROR_UNHANDLED_EXCEPTION - The exception %s (0x%08lx) occurred in the application at location 0x%08lx. +. + +MessageId=575 +Severity=Success +Facility=System +SymbolicName=ERROR_APP_INIT_FAILURE +Language=Bulgarian +ERROR_APP_INIT_FAILURE - The application failed to initialize properly (0x%lx). Click on OK to terminate the application. +. + +MessageId=576 +Severity=Success +Facility=System +SymbolicName=ERROR_PAGEFILE_CREATE_FAILED +Language=Bulgarian +ERROR_PAGEFILE_CREATE_FAILED - The creation of the paging file %hs failed (%lx). The requested size was %ld. +. + +MessageId=578 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_PAGEFILE +Language=Bulgarian +ERROR_NO_PAGEFILE - No paging file was specified in the system configuration. +. + +MessageId=579 +Severity=Success +Facility=System +SymbolicName=ERROR_ILLEGAL_FLOAT_CONTEXT +Language=Bulgarian +ERROR_ILLEGAL_FLOAT_CONTEXT - A real-mode application issued a floating-point instruction and floating-point hardware is not present. +. + +MessageId=580 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_EVENT_PAIR +Language=Bulgarian +ERROR_NO_EVENT_PAIR - An event pair synchronization operation was performed using the thread specific client/server event pair object, but no event pair object was associated with the thread. +. + +MessageId=581 +Severity=Success +Facility=System +SymbolicName=ERROR_DOMAIN_CTRLR_CONFIG_ERROR +Language=Bulgarian +ERROR_DOMAIN_CTRLR_CONFIG_ERROR - A Windows Server has an incorrect configuration. +. + +MessageId=582 +Severity=Success +Facility=System +SymbolicName=ERROR_ILLEGAL_CHARACTER +Language=Bulgarian +ERROR_ILLEGAL_CHARACTER - An illegal character was encountered. For a multi-byte character set this includes a lead byte without a succeeding trail byte. For the Unicode character set this includes the characters 0xFFFF and 0xFFFE. +. + +MessageId=583 +Severity=Success +Facility=System +SymbolicName=ERROR_UNDEFINED_CHARACTER +Language=Bulgarian +ERROR_UNDEFINED_CHARACTER - The Unicode character is not defined in the Unicode character set installed on the system. +. + +MessageId=584 +Severity=Success +Facility=System +SymbolicName=ERROR_FLOPPY_VOLUME +Language=Bulgarian +ERROR_FLOPPY_VOLUME - The paging file cannot be created on a floppy diskette. +. + +MessageId=585 +Severity=Success +Facility=System +SymbolicName=ERROR_BIOS_FAILED_TO_CONNECT_INTERRUPT +Language=Bulgarian +ERROR_BIOS_FAILED_TO_CONNECT_INTERRUPT - The system bios failed to connect a system interrupt to the device or bus for which the device is connected. +. + +MessageId=586 +Severity=Success +Facility=System +SymbolicName=ERROR_BACKUP_CONTROLLER +Language=Bulgarian +ERROR_BACKUP_CONTROLLER - This operation is only allowed for the Primary Domain Controller of the domain. +. + +MessageId=587 +Severity=Success +Facility=System +SymbolicName=ERROR_MUTANT_LIMIT_EXCEEDED +Language=Bulgarian +ERROR_MUTANT_LIMIT_EXCEEDED - An attempt was made to acquire a mutant such that its maximum count would have been exceeded. +. + +MessageId=588 +Severity=Success +Facility=System +SymbolicName=ERROR_FS_DRIVER_REQUIRED +Language=Bulgarian +ERROR_FS_DRIVER_REQUIRED - A volume has been accessed for which a file system driver is required that has not yet been loaded. +. + +MessageId=589 +Severity=Success +Facility=System +SymbolicName=ERROR_CANNOT_LOAD_REGISTRY_FILE +Language=Bulgarian +ERROR_CANNOT_LOAD_REGISTRY_FILE - The registry cannot load the hive (file): %hs or its log or alternate. It is corrupt, absent, or not writable. +. + +MessageId=590 +Severity=Success +Facility=System +SymbolicName=ERROR_DEBUG_ATTACH_FAILED +Language=Bulgarian +ERROR_DEBUG_ATTACH_FAILED - An unexpected failure occurred while processing a DebugActiveProcess API request. You may choose OK to terminate the process, or Cancel to ignore the error. +. + +MessageId=591 +Severity=Success +Facility=System +SymbolicName=ERROR_SYSTEM_PROCESS_TERMINATED +Language=Bulgarian +ERROR_SYSTEM_PROCESS_TERMINATED - The %hs system process terminated unexpectedly with a status of 0x%08x (0x%08x 0x%08x). The system has been shut down. +. + +MessageId=592 +Severity=Success +Facility=System +SymbolicName=ERROR_DATA_NOT_ACCEPTED +Language=Bulgarian +ERROR_DATA_NOT_ACCEPTED - The TDI client could not handle the data received during an indication. +. + +MessageId=593 +Severity=Success +Facility=System +SymbolicName=ERROR_VDM_HARD_ERROR +Language=Bulgarian +ERROR_VDM_HARD_ERROR - NTVDM encountered a hard error. +. + +MessageId=594 +Severity=Success +Facility=System +SymbolicName=ERROR_DRIVER_CANCEL_TIMEOUT +Language=Bulgarian +ERROR_DRIVER_CANCEL_TIMEOUT - The driver %hs failed to complete a cancelled I/O request in the allotted time. +. + +MessageId=595 +Severity=Success +Facility=System +SymbolicName=ERROR_REPLY_MESSAGE_MISMATCH +Language=Bulgarian +ERROR_REPLY_MESSAGE_MISMATCH - An attempt was made to reply to an LPC message, but the thread specified by the client ID in the message was not waiting on that message. +. + +MessageId=596 +Severity=Success +Facility=System +SymbolicName=ERROR_LOST_WRITEBEHIND_DATA +Language=Bulgarian +ERROR_LOST_WRITEBEHIND_DATA - Windows was unable to save all the data for the file %hs. The data has been lost. This error may be caused by a failure of your computer hardware or network connection. Please try to save this file elsewhere. +. + +MessageId=597 +Severity=Success +Facility=System +SymbolicName=ERROR_CLIENT_SERVER_PARAMETERS_INVALID +Language=Bulgarian +ERROR_CLIENT_SERVER_PARAMETERS_INVALID - The parameter(s) passed to the server in the client/server shared memory window were invalid. Too much data may have been put in the shared memory window. +. + +MessageId=598 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_TINY_STREAM +Language=Bulgarian +ERROR_NOT_TINY_STREAM - The stream is not a tiny stream. +. + +MessageId=599 +Severity=Success +Facility=System +SymbolicName=ERROR_STACK_OVERFLOW_READ +Language=Bulgarian +ERROR_STACK_OVERFLOW_READ - The request must be handled by the stack overflow code. +. + +MessageId=600 +Severity=Success +Facility=System +SymbolicName=ERROR_CONVERT_TO_LARGE +Language=Bulgarian +ERROR_CONVERT_TO_LARGE - Internal OFS status codes indicating how an allocation operation is handled. Either it is retried after the containing onode is moved or the extent stream is converted to a large stream. +. + +MessageId=601 +Severity=Success +Facility=System +SymbolicName=ERROR_FOUND_OUT_OF_SCOPE +Language=Bulgarian +ERROR_FOUND_OUT_OF_SCOPE - The attempt to find the object found an object matching by ID on the volume but it is out of the scope of the handle used for the operation. +. + +MessageId=602 +Severity=Success +Facility=System +SymbolicName=ERROR_ALLOCATE_BUCKET +Language=Bulgarian +ERROR_ALLOCATE_BUCKET - The bucket array must be grown. Retry transaction after doing so. +. + +MessageId=603 +Severity=Success +Facility=System +SymbolicName=ERROR_MARSHALL_OVERFLOW +Language=Bulgarian +ERROR_MARSHALL_OVERFLOW - The user/kernel marshalling buffer has overflowed. +. + +MessageId=604 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_VARIANT +Language=Bulgarian +ERROR_INVALID_VARIANT - The supplied variant structure contains invalid data. +. + +MessageId=605 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_COMPRESSION_BUFFER +Language=Bulgarian +ERROR_BAD_COMPRESSION_BUFFER - The specified buffer contains ill-formed data. +. + +MessageId=606 +Severity=Success +Facility=System +SymbolicName=ERROR_AUDIT_FAILED +Language=Bulgarian +ERROR_AUDIT_FAILED - An attempt to generate a security audit failed. +. + +MessageId=607 +Severity=Success +Facility=System +SymbolicName=ERROR_TIMER_RESOLUTION_NOT_SET +Language=Bulgarian +ERROR_TIMER_RESOLUTION_NOT_SET - The timer resolution was not previously set by the current process. +. + +MessageId=608 +Severity=Success +Facility=System +SymbolicName=ERROR_INSUFFICIENT_LOGON_INFO +Language=Bulgarian +ERROR_INSUFFICIENT_LOGON_INFO - There is insufficient account information to log you on. +. + +MessageId=609 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_DLL_ENTRYPOINT +Language=Bulgarian +ERROR_BAD_DLL_ENTRYPOINT - The dynamic link library %hs is not written correctly. The stack pointer has been left in an inconsistent state. The entrypoint should be declared as WINAPI or STDCALL. Select YES to fail the DLL load. Select NO to continue execution. Selecting NO may cause the application to operate incorrectly. +. + +MessageId=610 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_SERVICE_ENTRYPOINT +Language=Bulgarian +ERROR_BAD_SERVICE_ENTRYPOINT - The %hs service is not written correctly. The stack pointer has been left in an inconsistent state. The callback entrypoint should be declared as WINAPI or STDCALL. Selecting OK will cause the service to continue operation. However, the service process may operate incorrectly. +. + +MessageId=611 +Severity=Success +Facility=System +SymbolicName=ERROR_IP_ADDRESS_CONFLICT1 +Language=Bulgarian +ERROR_IP_ADDRESS_CONFLICT1 - There is an IP address conflict with another system on the network +. + +MessageId=612 +Severity=Success +Facility=System +SymbolicName=ERROR_IP_ADDRESS_CONFLICT2 +Language=Bulgarian +ERROR_IP_ADDRESS_CONFLICT2 - There is an IP address conflict with another system on the network +. + +MessageId=613 +Severity=Success +Facility=System +SymbolicName=ERROR_REGISTRY_QUOTA_LIMIT +Language=Bulgarian +ERROR_REGISTRY_QUOTA_LIMIT - The system has reached the maximum size allowed for the system part of the registry. Additional storage requests will be ignored. +. + +MessageId=614 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_CALLBACK_ACTIVE +Language=Bulgarian +ERROR_NO_CALLBACK_ACTIVE - A callback return system service cannot be executed when no callback is active. +. + +MessageId=615 +Severity=Success +Facility=System +SymbolicName=ERROR_PWD_TOO_SHORT +Language=Bulgarian +ERROR_PWD_TOO_SHORT - The password provided is too short to meet the policy of your user account. Please choose a longer password. +. + +MessageId=616 +Severity=Success +Facility=System +SymbolicName=ERROR_PWD_TOO_RECENT +Language=Bulgarian +ERROR_PWD_TOO_RECENT - The policy of your user account does not allow you to change passwords too frequently. This is done to prevent users from changing back to a familiar, but potentially discovered, password. If you feel your password has been compromised then please contact your administrator immediately to have a new one assigned. +. + +MessageId=617 +Severity=Success +Facility=System +SymbolicName=ERROR_PWD_HISTORY_CONFLICT +Language=Bulgarian +ERROR_PWD_HISTORY_CONFLICT - You have attempted to change your password to one that you have used in the past. The policy of your user account does not allow this. Please select a password that you have not previously used. +. + +MessageId=618 +Severity=Success +Facility=System +SymbolicName=ERROR_UNSUPPORTED_COMPRESSION +Language=Bulgarian +ERROR_UNSUPPORTED_COMPRESSION - The specified compression format is unsupported. +. + +MessageId=619 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_HW_PROFILE +Language=Bulgarian +ERROR_INVALID_HW_PROFILE - The specified hardware profile configuration is invalid. +. + +MessageId=620 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_PLUGPLAY_DEVICE_PATH +Language=Bulgarian +ERROR_INVALID_PLUGPLAY_DEVICE_PATH - The specified Plug and Play registry device path is invalid. +. + +MessageId=621 +Severity=Success +Facility=System +SymbolicName=ERROR_QUOTA_LIST_INCONSISTENT +Language=Bulgarian +ERROR_QUOTA_LIST_INCONSISTENT - The specified quota list is internally inconsistent with its descriptor. +. + +MessageId=622 +Severity=Success +Facility=System +SymbolicName=ERROR_EVALUATION_EXPIRATION +Language=Bulgarian +ERROR_EVALUATION_EXPIRATION - The evaluation period for this installation of Windows has expired. This system will shutdown in 1 hour. To restore access to this installation of Windows, please upgrade this installation using a licensed distribution of this product. +. + +MessageId=623 +Severity=Success +Facility=System +SymbolicName=ERROR_ILLEGAL_DLL_RELOCATION +Language=Bulgarian +ERROR_ILLEGAL_DLL_RELOCATION - The system DLL %hs was relocated in memory. The application will not run properly. The relocation occurred because the DLL %hs occupied an address range reserved for Windows system DLLs. The vendor supplying the DLL should be contacted for a new DLL. +. + +MessageId=624 +Severity=Success +Facility=System +SymbolicName=ERROR_DLL_INIT_FAILED_LOGOFF +Language=Bulgarian +ERROR_DLL_INIT_FAILED_LOGOFF - The application failed to initialize because the window station is shutting down. +. + +MessageId=625 +Severity=Success +Facility=System +SymbolicName=ERROR_VALIDATE_CONTINUE +Language=Bulgarian +ERROR_VALIDATE_CONTINUE - The validation process needs to continue on to the next step. +. + +MessageId=626 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_MORE_MATCHES +Language=Bulgarian +ERROR_NO_MORE_MATCHES - There are no more matches for the current index enumeration. +. + +MessageId=627 +Severity=Success +Facility=System +SymbolicName=ERROR_RANGE_LIST_CONFLICT +Language=Bulgarian +ERROR_RANGE_LIST_CONFLICT - The range could not be added to the range list because of a conflict. +. + +MessageId=628 +Severity=Success +Facility=System +SymbolicName=ERROR_SERVER_SID_MISMATCH +Language=Bulgarian +ERROR_SERVER_SID_MISMATCH - The server process is running under a SID different than that required by client. +. + +MessageId=629 +Severity=Success +Facility=System +SymbolicName=ERROR_CANT_ENABLE_DENY_ONLY +Language=Bulgarian +ERROR_CANT_ENABLE_DENY_ONLY - A group marked use for deny only cannot be enabled. +. + +MessageId=630 +Severity=Success +Facility=System +SymbolicName=ERROR_FLOAT_MULTIPLE_FAULTS +Language=Bulgarian +ERROR_FLOAT_MULTIPLE_FAULTS - Multiple floating point faults. +. + +MessageId=631 +Severity=Success +Facility=System +SymbolicName=ERROR_FLOAT_MULTIPLE_TRAPS +Language=Bulgarian +ERROR_FLOAT_MULTIPLE_TRAPS - Multiple floating point traps. +. + +MessageId=632 +Severity=Success +Facility=System +SymbolicName=ERROR_NOINTERFACE +Language=Bulgarian +ERROR_NOINTERFACE - The requested interface is not supported. +. + +MessageId=633 +Severity=Success +Facility=System +SymbolicName=ERROR_DRIVER_FAILED_SLEEP +Language=Bulgarian +ERROR_DRIVER_FAILED_SLEEP - The driver %hs does not support standby mode. Updating this driver may allow the system to go to standby mode. +. + +MessageId=634 +Severity=Success +Facility=System +SymbolicName=ERROR_CORRUPT_SYSTEM_FILE +Language=Bulgarian +ERROR_CORRUPT_SYSTEM_FILE - The system file %1 has become corrupt and has been replaced. +. + +MessageId=635 +Severity=Success +Facility=System +SymbolicName=ERROR_COMMITMENT_MINIMUM +Language=Bulgarian +ERROR_COMMITMENT_MINIMUM - Your system is low on virtual memory. Windows is increasing the size of your virtual memory paging file. During this process, memory requests for some applications may be denied. For more information, see Help. +. + +MessageId=636 +Severity=Success +Facility=System +SymbolicName=ERROR_PNP_RESTART_ENUMERATION +Language=Bulgarian +ERROR_PNP_RESTART_ENUMERATION - A device was removed so enumeration must be restarted. +. + +MessageId=637 +Severity=Success +Facility=System +SymbolicName=ERROR_SYSTEM_IMAGE_BAD_SIGNATURE +Language=Bulgarian +ERROR_SYSTEM_IMAGE_BAD_SIGNATURE - The system image %s is not properly signed. The file has been replaced with the signed file. The system has been shut down. +. + +MessageId=638 +Severity=Success +Facility=System +SymbolicName=ERROR_PNP_REBOOT_REQUIRED +Language=Bulgarian +ERROR_PNP_REBOOT_REQUIRED - Device will not start without a reboot. +. + +MessageId=639 +Severity=Success +Facility=System +SymbolicName=ERROR_INSUFFICIENT_POWER +Language=Bulgarian +ERROR_INSUFFICIENT_POWER - There is not enough power to complete the requested operation. +. + +MessageId=641 +Severity=Success +Facility=System +SymbolicName=ERROR_SYSTEM_SHUTDOWN +Language=Bulgarian +ERROR_SYSTEM_SHUTDOWN - The system is in the process of shutting down. +. + +MessageId=642 +Severity=Success +Facility=System +SymbolicName=ERROR_PORT_NOT_SET +Language=Bulgarian +ERROR_PORT_NOT_SET - An attempt to remove a processes DebugPort was made, but a port was not already associated with the process. +. + +MessageId=643 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_VERSION_CHECK_FAILURE +Language=Bulgarian +ERROR_DS_VERSION_CHECK_FAILURE - This version of Windows is not compatible with the behavior version of directory forest, domain or domain controller. +. + +MessageId=644 +Severity=Success +Facility=System +SymbolicName=ERROR_RANGE_NOT_FOUND +Language=Bulgarian +ERROR_RANGE_NOT_FOUND - The specified range could not be found in the range list. +. + +MessageId=646 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_SAFE_MODE_DRIVER +Language=Bulgarian +ERROR_NOT_SAFE_MODE_DRIVER - The driver was not loaded because the system is booting into safe mode. +. + +MessageId=647 +Severity=Success +Facility=System +SymbolicName=ERROR_FAILED_DRIVER_ENTRY +Language=Bulgarian +ERROR_FAILED_DRIVER_ENTRY - The driver was not loaded because it failed it's initialization call. +. + +MessageId=648 +Severity=Success +Facility=System +SymbolicName=ERROR_DEVICE_ENUMERATION_ERROR +Language=Bulgarian +ERROR_DEVICE_ENUMERATION_ERROR - The \"%hs\" encountered an error while applying power or reading the device configuration. This may be caused by a failure of your hardware or by a poor connection. +. + +MessageId=649 +Severity=Success +Facility=System +SymbolicName=ERROR_MOUNT_POINT_NOT_RESOLVED +Language=Bulgarian +ERROR_MOUNT_POINT_NOT_RESOLVED - The create operation failed because the name contained at least one mount point which resolves to a volume to which the specified device object is not attached. +. + +MessageId=650 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_DEVICE_OBJECT_PARAMETER +Language=Bulgarian +ERROR_INVALID_DEVICE_OBJECT_PARAMETER - The device object parameter is either not a valid device object or is not attached to the volume specified by the file name. +. + +MessageId=651 +Severity=Success +Facility=System +SymbolicName=ERROR_MCA_OCCURED +Language=Bulgarian +ERROR_MCA_OCCURED - A Machine Check Error has occurred. Please check the system eventlog for additional information. +. + +MessageId=652 +Severity=Success +Facility=System +SymbolicName=ERROR_DRIVER_DATABASE_ERROR +Language=Bulgarian +ERROR_DRIVER_DATABASE_ERROR - There was error [%2] processing the driver database. +. + +MessageId=653 +Severity=Success +Facility=System +SymbolicName=ERROR_SYSTEM_HIVE_TOO_LARGE +Language=Bulgarian +ERROR_SYSTEM_HIVE_TOO_LARGE - System hive size has exceeded its limit. +. + +MessageId=654 +Severity=Success +Facility=System +SymbolicName=ERROR_DRIVER_FAILED_PRIOR_UNLOAD +Language=Bulgarian +ERROR_DRIVER_FAILED_PRIOR_UNLOAD - The driver could not be loaded because a previous version of the driver is still in memory. +. + +MessageId=655 +Severity=Success +Facility=System +SymbolicName=ERROR_VOLSNAP_PREPARE_HIBERNATE +Language=Bulgarian +ERROR_VOLSNAP_PREPARE_HIBERNATE - Please wait while the Volume Shadow Copy Service prepares volume %hs for hibernation. +. + +MessageId=656 +Severity=Success +Facility=System +SymbolicName=ERROR_HIBERNATION_FAILURE +Language=Bulgarian +ERROR_HIBERNATION_FAILURE - The system has failed to hibernate (The error code is %hs). Hibernation will be disabled until the system is restarted. +. + +MessageId=657 +Severity=Success +Facility=System +SymbolicName=ERROR_HUNG_DISPLAY_DRIVER_THREAD +Language=Bulgarian +ERROR_HUNG_DISPLAY_DRIVER_THREAD - The %hs display driver has stopped working normally. Save your work and reboot the system to restore full display functionality. The next time you reboot the machine a dialog will be displayed giving you a chance to report this failure to Microsoft. +. + +MessageId=665 +Severity=Success +Facility=System +SymbolicName=ERROR_FILE_SYSTEM_LIMITATION +Language=Bulgarian +ERROR_FILE_SYSTEM_LIMITATION - The requested operation could not be completed due to a file system limitation. +. + +MessageId=668 +Severity=Success +Facility=System +SymbolicName=ERROR_ASSERTION_FAILURE +Language=Bulgarian +ERROR_ASSERTION_FAILURE - An assertion failure has occurred. +. + +MessageId=669 +Severity=Success +Facility=System +SymbolicName=ERROR_VERIFIER_STOP +Language=Bulgarian +ERROR_VERIFIER_STOP - Application verifier has found an error in the current process. +. + +MessageId=670 +Severity=Success +Facility=System +SymbolicName=ERROR_WOW_ASSERTION +Language=Bulgarian +ERROR_WOW_ASSERTION - WOW Assertion Error. +. + +MessageId=671 +Severity=Success +Facility=System +SymbolicName=ERROR_PNP_BAD_MPS_TABLE +Language=Bulgarian +ERROR_PNP_BAD_MPS_TABLE - A device is missing in the system BIOS MPS table. This device will not be used. Please contact your system vendor for system BIOS update. +. + +MessageId=672 +Severity=Success +Facility=System +SymbolicName=ERROR_PNP_TRANSLATION_FAILED +Language=Bulgarian +ERROR_PNP_TRANSLATION_FAILED - A translator failed to translate resources. +. + +MessageId=673 +Severity=Success +Facility=System +SymbolicName=ERROR_PNP_IRQ_TRANSLATION_FAILED +Language=Bulgarian +ERROR_PNP_IRQ_TRANSLATION_FAILED - A IRQ translator failed to translate resources. +. + +MessageId=674 +Severity=Success +Facility=System +SymbolicName=ERROR_PNP_INVALID_ID +Language=Bulgarian +ERROR_PNP_INVALID_ID - Driver %2 returned invalid ID for a child device (%3). +. + +MessageId=675 +Severity=Success +Facility=System +SymbolicName=ERROR_WAKE_SYSTEM_DEBUGGER +Language=Bulgarian +ERROR_WAKE_SYSTEM_DEBUGGER - The system debugger was awakened by an interrupt. +. + +MessageId=676 +Severity=Success +Facility=System +SymbolicName=ERROR_HANDLES_CLOSED +Language=Bulgarian +ERROR_HANDLES_CLOSED - Handles to objects have been automatically closed as a result of the requested operation. +. + +MessageId=677 +Severity=Success +Facility=System +SymbolicName=ERROR_EXTRANEOUS_INFORMATION +Language=Bulgarian +ERROR_EXTRANEOUS_INFORMATION - he specified access control list (ACL) contained more information than was expected. +. + +MessageId=678 +Severity=Success +Facility=System +SymbolicName=ERROR_RXACT_COMMIT_NECESSARY +Language=Bulgarian +ERROR_RXACT_COMMIT_NECESSARY - This warning level status indicates that the transaction state already exists for the registry sub-tree, but that a transaction commit was previously aborted. The commit has NOT been completed, but has not been rolled back either (so it may still be committed if desired). +. + +MessageId=679 +Severity=Success +Facility=System +SymbolicName=ERROR_MEDIA_CHECK +Language=Bulgarian +ERROR_MEDIA_CHECK - The media may have changed. +. + +MessageId=680 +Severity=Success +Facility=System +SymbolicName=ERROR_GUID_SUBSTITUTION_MADE +Language=Bulgarian +ERROR_GUID_SUBSTITUTION_MADE - During the translation of a global identifier (GUID) to a Windows security ID (SID), no administratively-defined GUID prefix was found. A substitute prefix was used, which will not compromise system security. However, this may provide a more restrictive access than intended. +. + +MessageId=681 +Severity=Success +Facility=System +SymbolicName=ERROR_STOPPED_ON_SYMLINK +Language=Bulgarian +ERROR_STOPPED_ON_SYMLINK - The create operation stopped after reaching a symbolic link. +. + +MessageId=682 +Severity=Success +Facility=System +SymbolicName=ERROR_LONGJUMP +Language=Bulgarian +ERROR_LONGJUMP - A long jump has been executed. +. + +MessageId=683 +Severity=Success +Facility=System +SymbolicName=ERROR_PLUGPLAY_QUERY_VETOED +Language=Bulgarian +ERROR_PLUGPLAY_QUERY_VETOED - The Plug and Play query operation was not successful. +. + +MessageId=684 +Severity=Success +Facility=System +SymbolicName=ERROR_UNWIND_CONSOLIDATE +Language=Bulgarian +ERROR_UNWIND_CONSOLIDATE - A frame consolidation has been executed. +. + +MessageId=685 +Severity=Success +Facility=System +SymbolicName=ERROR_REGISTRY_HIVE_RECOVERED +Language=Bulgarian +ERROR_REGISTRY_HIVE_RECOVERED - Registry hive (file): %hs was corrupted and it has been recovered. Some data might have been lost. +. + +MessageId=686 +Severity=Success +Facility=System +SymbolicName=ERROR_DLL_MIGHT_BE_INSECURE +Language=Bulgarian +ERROR_DLL_MIGHT_BE_INSECURE - The application is attempting to run executable code from the module %hs. This may be insecure. An alternative, %hs, is available. Should the application use the secure module %hs? +. + +MessageId=687 +Severity=Success +Facility=System +SymbolicName=ERROR_DLL_MIGHT_BE_INCOMPATIBLE +Language=Bulgarian +ERROR_DLL_MIGHT_BE_INCOMPATIBLE - The application is loading executable code from the module %hs. This is secure, but may be incompatible with previous releases of the operating system. An alternative, %hs, is available. Should the application use the secure module %hs? +. + +MessageId=688 +Severity=Success +Facility=System +SymbolicName=ERROR_DBG_EXCEPTION_NOT_HANDLED +Language=Bulgarian +ERROR_DBG_EXCEPTION_NOT_HANDLED - Debugger did not handle the exception. +. + +MessageId=689 +Severity=Success +Facility=System +SymbolicName=ERROR_DBG_REPLY_LATER +Language=Bulgarian +ERROR_DBG_REPLY_LATER - Debugger will reply later. +. + +MessageId=690 +Severity=Success +Facility=System +SymbolicName=ERROR_DBG_UNABLE_TO_PROVIDE_HANDLE +Language=Bulgarian +ERROR_DBG_UNABLE_TO_PROVIDE_HANDLE - Debugger can not provide handle. +. + +MessageId=691 +Severity=Success +Facility=System +SymbolicName=ERROR_DBG_TERMINATE_THREAD +Language=Bulgarian +ERROR_DBG_TERMINATE_THREAD - Debugger terminated thread. +. + +MessageId=692 +Severity=Success +Facility=System +SymbolicName=ERROR_DBG_TERMINATE_PROCESS +Language=Bulgarian +ERROR_DBG_TERMINATE_PROCESS - Debugger terminated process. +. + +MessageId=693 +Severity=Success +Facility=System +SymbolicName=ERROR_DBG_CONTROL_C +Language=Bulgarian +ERROR_DBG_CONTROL_C - Debugger got control C. +. + +MessageId=694 +Severity=Success +Facility=System +SymbolicName=ERROR_DBG_PRINTEXCEPTION_C +Language=Bulgarian +ERROR_DBG_PRINTEXCEPTION_C - Debugger printed exception on control C. +. + +MessageId=695 +Severity=Success +Facility=System +SymbolicName=ERROR_DBG_RIPEXCEPTION +Language=Bulgarian +ERROR_DBG_RIPEXCEPTION - Debugger received RIP exception. +. + +MessageId=696 +Severity=Success +Facility=System +SymbolicName=ERROR_DBG_CONTROL_BREAK +Language=Bulgarian +ERROR_DBG_CONTROL_BREAK - Debugger received control break. +. + +MessageId=697 +Severity=Success +Facility=System +SymbolicName=ERROR_DBG_COMMAND_EXCEPTION +Language=Bulgarian +ERROR_DBG_COMMAND_EXCEPTION - Debugger command communication exception. +. + +MessageId=698 +Severity=Success +Facility=System +SymbolicName=ERROR_OBJECT_NAME_EXISTS +Language=Bulgarian +ERROR_OBJECT_NAME_EXISTS - An attempt was made to create an object and the object name already existed. +. + +MessageId=699 +Severity=Success +Facility=System +SymbolicName=ERROR_THREAD_WAS_SUSPENDED +Language=Bulgarian +ERROR_THREAD_WAS_SUSPENDED - A thread termination occurred while the thread was suspended. The thread was resumed, and termination proceeded. +. + +MessageId=700 +Severity=Success +Facility=System +SymbolicName=ERROR_IMAGE_NOT_AT_BASE +Language=Bulgarian +ERROR_IMAGE_NOT_AT_BASE - An image file could not be mapped at the address specified in the image file. Local fixups must be performed on this image. +. + +MessageId=701 +Severity=Success +Facility=System +SymbolicName=ERROR_RXACT_STATE_CREATED +Language=Bulgarian +ERROR_RXACT_STATE_CREATED - This informational level status indicates that a specified registry sub-tree transaction state did not yet exist and had to be created. +. + +MessageId=702 +Severity=Success +Facility=System +SymbolicName=ERROR_SEGMENT_NOTIFICATION +Language=Bulgarian +ERROR_SEGMENT_NOTIFICATION - A virtual DOS machine (VDM) is loading, unloading, or moving an MS-DOS or Win16 program segment image. An exception is raised so a debugger can load, unload or track symbols and breakpoints within these 16-bit segments. +. + +MessageId=703 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_CURRENT_DIRECTORY +Language=Bulgarian +ERROR_BAD_CURRENT_DIRECTORY - The process cannot switch to the startup current directory %hs. Select OK to set current directory to %hs, or select CANCEL to exit. +. + +MessageId=704 +Severity=Success +Facility=System +SymbolicName=ERROR_FT_READ_RECOVERY_FROM_BACKUP +Language=Bulgarian +ERROR_FT_READ_RECOVERY_FROM_BACKUP - To satisfy a read request, the NT fault-tolerant file system successfully read the requested data from a redundant copy. This was done because the file system encountered a failure on a member of the fault-tolerant volume, but was unable to reassign the failing area of the device. +. + +MessageId=705 +Severity=Success +Facility=System +SymbolicName=ERROR_FT_WRITE_RECOVERY +Language=Bulgarian +ERROR_FT_WRITE_RECOVERY - To satisfy a write request, the NT fault-tolerant file system successfully wrote a redundant copy of the information. This was done because the file system encountered a failure on a member of the fault-tolerant volume, but was not able to reassign the failing area of the device. +. + +MessageId=706 +Severity=Success +Facility=System +SymbolicName=ERROR_IMAGE_MACHINE_TYPE_MISMATCH +Language=Bulgarian +ERROR_IMAGE_MACHINE_TYPE_MISMATCH - The image file %hs is valid, but is for a machine type other than the current machine. Select OK to continue, or CANCEL to fail the DLL load. +. + +MessageId=707 +Severity=Success +Facility=System +SymbolicName=ERROR_RECEIVE_PARTIAL +Language=Bulgarian +ERROR_RECEIVE_PARTIAL - The network transport returned partial data to its client. The remaining data will be sent later. +. + +MessageId=708 +Severity=Success +Facility=System +SymbolicName=ERROR_RECEIVE_EXPEDITED +Language=Bulgarian +ERROR_RECEIVE_EXPEDITED - The network transport returned data to its client that was marked as expedited by the remote system. +. + +MessageId=709 +Severity=Success +Facility=System +SymbolicName=ERROR_RECEIVE_PARTIAL_EXPEDITED +Language=Bulgarian +ERROR_RECEIVE_PARTIAL_EXPEDITED - The network transport returned partial data to its client and this data was marked as expedited by the remote system. The remaining data will be sent later. +. + +MessageId=710 +Severity=Success +Facility=System +SymbolicName=ERROR_EVENT_DONE +Language=Bulgarian +ERROR_EVENT_DONE - The TDI indication has completed successfully. +. + +MessageId=711 +Severity=Success +Facility=System +SymbolicName=ERROR_EVENT_PENDING +Language=Bulgarian +ERROR_EVENT_PENDING - The TDI indication has entered the pending state. +. + +MessageId=712 +Severity=Success +Facility=System +SymbolicName=ERROR_CHECKING_FILE_SYSTEM +Language=Bulgarian +ERROR_CHECKING_FILE_SYSTEM - Checking file system on %wZ. +. + +MessageId=714 +Severity=Success +Facility=System +SymbolicName=ERROR_PREDEFINED_HANDLE +Language=Bulgarian +ERROR_PREDEFINED_HANDLE - The specified registry key is referenced by a predefined handle. +. + +MessageId=715 +Severity=Success +Facility=System +SymbolicName=ERROR_WAS_UNLOCKED +Language=Bulgarian +ERROR_WAS_UNLOCKED - The page protection of a locked page was changed to 'No Access' and the page was unlocked from memory and from the process. +. + +MessageId=717 +Severity=Success +Facility=System +SymbolicName=ERROR_WAS_LOCKED +Language=Bulgarian +ERROR_WAS_LOCKED - One of the pages to lock was already locked. +. + +MessageId=720 +Severity=Success +Facility=System +SymbolicName=ERROR_IMAGE_MACHINE_TYPE_MISMATCH_EXE +Language=Bulgarian +ERROR_IMAGE_MACHINE_TYPE_MISMATCH_EXE - The image file %hs is valid, but is for a machine type other than the current machine. +. + +MessageId=721 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_YIELD_PERFORMED +Language=Bulgarian +ERROR_NO_YIELD_PERFORMED - A yield execution was performed and no thread was available to run. +. + +MessageId=722 +Severity=Success +Facility=System +SymbolicName=ERROR_TIMER_RESUME_IGNORED +Language=Bulgarian +ERROR_TIMER_RESUME_IGNORED - The resumable flag to a timer API was ignored. +. + +MessageId=723 +Severity=Success +Facility=System +SymbolicName=ERROR_ARBITRATION_UNHANDLED +Language=Bulgarian +ERROR_ARBITRATION_UNHANDLED - The arbiter has deferred arbitration of these resources to its parent. +. + +MessageId=724 +Severity=Success +Facility=System +SymbolicName=ERROR_CARDBUS_NOT_SUPPORTED +Language=Bulgarian +ERROR_CARDBUS_NOT_SUPPORTED - The device \"%hs\" has detected a CardBus card in its slot, but the firmware on this system is not configured to allow the CardBus controller to be run in CardBus mode. The operating system will currently accept only 16-bit (R2) pc-cards on this controller. +. + +MessageId=725 +Severity=Success +Facility=System +SymbolicName=ERROR_MP_PROCESSOR_MISMATCH +Language=Bulgarian +ERROR_MP_PROCESSOR_MISMATCH - The CPUs in this multiprocessor system are not all the same revision level. To use all processors the operating system restricts itself to the features of the least capable processor in the system. Should problems occur with this system, contact the CPU manufacturer to see if this mix of processors is supported. +. + +MessageId=726 +Severity=Success +Facility=System +SymbolicName=ERROR_HIBERNATED +Language=Bulgarian +ERROR_HIBERNATED - The system was put into hibernation. +. + +MessageId=727 +Severity=Success +Facility=System +SymbolicName=ERROR_RESUME_HIBERNATION +Language=Bulgarian +ERROR_RESUME_HIBERNATION - The system was resumed from hibernation. +. + +MessageId=728 +Severity=Success +Facility=System +SymbolicName=ERROR_FIRMWARE_UPDATED +Language=Bulgarian +ERROR_FIRMWARE_UPDATED - Windows has detected that the system firmware (BIOS) was updated [previous firmware date = %2, current firmware date %3]. +. + +MessageId=729 +Severity=Success +Facility=System +SymbolicName=ERROR_DRIVERS_LEAKING_LOCKED_PAGES +Language=Bulgarian +ERROR_DRIVERS_LEAKING_LOCKED_PAGES - A device driver is leaking locked I/O pages causing system degradation. The system has automatically enabled tracking code in order to try and catch the culprit. +. + +MessageId=730 +Severity=Success +Facility=System +SymbolicName=ERROR_WAKE_SYSTEM +Language=Bulgarian +ERROR_WAKE_SYSTEM - The system has awoken +. + +MessageId=741 +Severity=Success +Facility=System +SymbolicName=ERROR_REPARSE +Language=Bulgarian +ERROR_REPARSE - A reparse should be performed by the Object Manager since the name of the file resulted in a symbolic link. +. + +MessageId=742 +Severity=Success +Facility=System +SymbolicName=ERROR_OPLOCK_BREAK_IN_PROGRESS +Language=Bulgarian +ERROR_OPLOCK_BREAK_IN_PROGRESS - An open/create operation completed while an oplock break is underway. +. + +MessageId=743 +Severity=Success +Facility=System +SymbolicName=ERROR_VOLUME_MOUNTED +Language=Bulgarian +ERROR_VOLUME_MOUNTED - A new volume has been mounted by a file system. +. + +MessageId=744 +Severity=Success +Facility=System +SymbolicName=ERROR_RXACT_COMMITTED +Language=Bulgarian +ERROR_RXACT_COMMITTED - This success level status indicates that the transaction state already exists for the registry sub-tree, but that a transaction commit was previously aborted. The commit has now been completed. +. + +MessageId=745 +Severity=Success +Facility=System +SymbolicName=ERROR_NOTIFY_CLEANUP +Language=Bulgarian +ERROR_NOTIFY_CLEANUP - This indicates that a notify change request has been completed due to closing the handle which made the notify change request. +. + +MessageId=746 +Severity=Success +Facility=System +SymbolicName=ERROR_PRIMARY_TRANSPORT_CONNECT_FAILED +Language=Bulgarian +ERROR_PRIMARY_TRANSPORT_CONNECT_FAILED - An attempt was made to connect to the remote server %hs on the primary transport, but the connection failed. The computer WAS able to connect on a secondary transport. +. + +MessageId=747 +Severity=Success +Facility=System +SymbolicName=ERROR_PAGE_FAULT_TRANSITION +Language=Bulgarian +ERROR_PAGE_FAULT_TRANSITION - Page fault was a transition fault. +. + +MessageId=748 +Severity=Success +Facility=System +SymbolicName=ERROR_PAGE_FAULT_DEMAND_ZERO +Language=Bulgarian +ERROR_PAGE_FAULT_DEMAND_ZERO - Page fault was a demand zero fault. +. + +MessageId=749 +Severity=Success +Facility=System +SymbolicName=ERROR_PAGE_FAULT_COPY_ON_WRITE +Language=Bulgarian +ERROR_PAGE_FAULT_COPY_ON_WRITE - Page fault was a demand zero fault. +. + +MessageId=750 +Severity=Success +Facility=System +SymbolicName=ERROR_PAGE_FAULT_GUARD_PAGE +Language=Bulgarian +ERROR_PAGE_FAULT_GUARD_PAGE - Page fault was a demand zero fault. +. + +MessageId=751 +Severity=Success +Facility=System +SymbolicName=ERROR_PAGE_FAULT_PAGING_FILE +Language=Bulgarian +ERROR_PAGE_FAULT_PAGING_FILE - Page fault was satisfied by reading from a secondary storage device. +. + +MessageId=752 +Severity=Success +Facility=System +SymbolicName=ERROR_CACHE_PAGE_LOCKED +Language=Bulgarian +ERROR_CACHE_PAGE_LOCKED - Cached page was locked during operation. +. + +MessageId=753 +Severity=Success +Facility=System +SymbolicName=ERROR_CRASH_DUMP +Language=Bulgarian +ERROR_CRASH_DUMP - Crash dump exists in paging file. +. + +MessageId=754 +Severity=Success +Facility=System +SymbolicName=ERROR_BUFFER_ALL_ZEROS +Language=Bulgarian +ERROR_BUFFER_ALL_ZEROS - Specified buffer contains all zeros. +. + +MessageId=755 +Severity=Success +Facility=System +SymbolicName=ERROR_REPARSE_OBJECT +Language=Bulgarian +ERROR_REPARSE_OBJECT - A reparse should be performed by the Object Manager since the name of the file resulted in a symbolic link. +. + +MessageId=756 +Severity=Success +Facility=System +SymbolicName=ERROR_RESOURCE_REQUIREMENTS_CHANGED +Language=Bulgarian +ERROR_RESOURCE_REQUIREMENTS_CHANGED - The device has succeeded a query-stop and its resource requirements have changed. +. + +MessageId=757 +Severity=Success +Facility=System +SymbolicName=ERROR_TRANSLATION_COMPLETE +Language=Bulgarian +ERROR_TRANSLATION_COMPLETE - The translator has translated these resources into the global space and no further translations should be performed. +. + +MessageId=758 +Severity=Success +Facility=System +SymbolicName=ERROR_NOTHING_TO_TERMINATE +Language=Bulgarian +ERROR_NOTHING_TO_TERMINATE - A process being terminated has no threads to terminate. +. + +MessageId=759 +Severity=Success +Facility=System +SymbolicName=ERROR_PROCESS_NOT_IN_JOB +Language=Bulgarian +ERROR_PROCESS_NOT_IN_JOB - The specified process is not part of a job. +. + +MessageId=760 +Severity=Success +Facility=System +SymbolicName=ERROR_PROCESS_IN_JOB +Language=Bulgarian +ERROR_PROCESS_IN_JOB - The specified process is part of a job. +. + +MessageId=761 +Severity=Success +Facility=System +SymbolicName=ERROR_VOLSNAP_HIBERNATE_READY +Language=Bulgarian +ERROR_VOLSNAP_HIBERNATE_READY - The system is now ready for hibernation. +. + +MessageId=762 +Severity=Success +Facility=System +SymbolicName=ERROR_FSFILTER_OP_COMPLETED_SUCCESSFULLY +Language=Bulgarian +ERROR_FSFILTER_OP_COMPLETED_SUCCESSFULLY - A file system or file system filter driver has successfully completed an FsFilter operation. +. + +MessageId=763 +Severity=Success +Facility=System +SymbolicName=ERROR_INTERRUPT_VECTOR_ALREADY_CONNECTED +Language=Bulgarian +ERROR_INTERRUPT_VECTOR_ALREADY_CONNECTED - The specified interrupt vector was already connected. +. + +MessageId=764 +Severity=Success +Facility=System +SymbolicName=ERROR_INTERRUPT_STILL_CONNECTED +Language=Bulgarian +ERROR_INTERRUPT_STILL_CONNECTED - The specified interrupt vector is still connected. +. + +MessageId=765 +Severity=Success +Facility=System +SymbolicName=ERROR_WAIT_FOR_OPLOCK +Language=Bulgarian +ERROR_WAIT_FOR_OPLOCK - An operation is blocked waiting for an oplock. +. + +MessageId=766 +Severity=Success +Facility=System +SymbolicName=ERROR_DBG_EXCEPTION_HANDLED +Language=Bulgarian +ERROR_DBG_EXCEPTION_HANDLED - Debugger handled exception. +. + +MessageId=767 +Severity=Success +Facility=System +SymbolicName=ERROR_DBG_CONTINUE +Language=Bulgarian +ERROR_DBG_CONTINUE - Debugger continued +. + +MessageId=768 +Severity=Success +Facility=System +SymbolicName=ERROR_CALLBACK_POP_STACK +Language=Bulgarian +ERROR_CALLBACK_POP_STACK - An exception occurred in a user mode callback and the kernel callback frame should be removed. +. + +MessageId=769 +Severity=Success +Facility=System +SymbolicName=ERROR_COMPRESSION_DISABLED +Language=Bulgarian +ERROR_COMPRESSION_DISABLED - Compression is disabled for this volume. +. + +MessageId=770 +Severity=Success +Facility=System +SymbolicName=ERROR_CANTFETCHBACKWARDS +Language=Bulgarian +ERROR_CANTFETCHBACKWARDS - The data provider cannot fetch backwards through a result set. +. + +MessageId=771 +Severity=Success +Facility=System +SymbolicName=ERROR_CANTSCROLLBACKWARDS +Language=Bulgarian +ERROR_CANTSCROLLBACKWARDS - The data provider cannot scroll backwards through a result set. +. + +MessageId=772 +Severity=Success +Facility=System +SymbolicName=ERROR_ROWSNOTRELEASED +Language=Bulgarian +ERROR_ROWSNOTRELEASED - The data provider requires that previously fetched data is released before asking for more data. +. + +MessageId=773 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_ACCESSOR_FLAGS +Language=Bulgarian +ERROR_BAD_ACCESSOR_FLAGS - The data provider was not able to interpret the flags set for a column binding in an accessor. +. + +MessageId=774 +Severity=Success +Facility=System +SymbolicName=ERROR_ERRORS_ENCOUNTERED +Language=Bulgarian +ERROR_ERRORS_ENCOUNTERED - One or more errors occurred while processing the request. +. + +MessageId=775 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_CAPABLE +Language=Bulgarian +ERROR_NOT_CAPABLE - The implementation is not capable of performing the request. +. + +MessageId=776 +Severity=Success +Facility=System +SymbolicName=ERROR_REQUEST_OUT_OF_SEQUENCE +Language=Bulgarian +ERROR_REQUEST_OUT_OF_SEQUENCE - The client of a component requested an operation which is not valid given the state of the component instance. +. + +MessageId=777 +Severity=Success +Facility=System +SymbolicName=ERROR_VERSION_PARSE_ERROR +Language=Bulgarian +ERROR_VERSION_PARSE_ERROR - A version number could not be parsed. +. + +MessageId=778 +Severity=Success +Facility=System +SymbolicName=ERROR_BADSTARTPOSITION +Language=Bulgarian +ERROR_BADSTARTPOSITION - The iterator's start position is invalid. +. + +MessageId=994 +Severity=Success +Facility=System +SymbolicName=ERROR_EA_ACCESS_DENIED +Language=Bulgarian +ERROR_EA_ACCESS_DENIED - Access to the extended attribute was denied. +. + +MessageId=995 +Severity=Success +Facility=System +SymbolicName=ERROR_OPERATION_ABORTED +Language=Bulgarian +ERROR_OPERATION_ABORTED - The I/O operation has been aborted because of either a thread exit or an application request. +. + +MessageId=996 +Severity=Success +Facility=System +SymbolicName=ERROR_IO_INCOMPLETE +Language=Bulgarian +ERROR_IO_INCOMPLETE - Overlapped I/O event is not in a signaled state. +. + +MessageId=997 +Severity=Success +Facility=System +SymbolicName=ERROR_IO_PENDING +Language=Bulgarian +ERROR_IO_PENDING - Overlapped I/O operation is in progress. +. + +MessageId=998 +Severity=Success +Facility=System +SymbolicName=ERROR_NOACCESS +Language=Bulgarian +ERROR_NOACCESS - Invalid access to memory location. +. + +MessageId=999 +Severity=Success +Facility=System +SymbolicName=ERROR_SWAPERROR +Language=Bulgarian +ERROR_SWAPERROR - Error performing inpage operation. +. + +MessageId=1001 +Severity=Success +Facility=System +SymbolicName=ERROR_STACK_OVERFLOW +Language=Bulgarian +ERROR_STACK_OVERFLOW - Recursion too deep; the stack overflowed. +. + +MessageId=1002 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_MESSAGE +Language=Bulgarian +ERROR_INVALID_MESSAGE - The window cannot act on the sent message. +. + +MessageId=1003 +Severity=Success +Facility=System +SymbolicName=ERROR_CAN_NOT_COMPLETE +Language=Bulgarian +ERROR_CAN_NOT_COMPLETE - Cannot complete this function. +. + +MessageId=1004 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_FLAGS +Language=Bulgarian +ERROR_INVALID_FLAGS - Invalid flags. +. + +MessageId=1005 +Severity=Success +Facility=System +SymbolicName=ERROR_UNRECOGNIZED_VOLUME +Language=Bulgarian +ERROR_UNRECOGNIZED_VOLUME - The volume does not contain a recognized file system. Please make sure that all required file system drivers are loaded and that the volume is not corrupted. +. + +MessageId=1006 +Severity=Success +Facility=System +SymbolicName=ERROR_FILE_INVALID +Language=Bulgarian +ERROR_FILE_INVALID - The volume for a file has been externally altered so that the opened file is no longer valid. +. + +MessageId=1007 +Severity=Success +Facility=System +SymbolicName=ERROR_FULLSCREEN_MODE +Language=Bulgarian +ERROR_FULLSCREEN_MODE - The requested operation cannot be performed in full-screen mode. +. + +MessageId=1008 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_TOKEN +Language=Bulgarian +ERROR_NO_TOKEN - An attempt was made to reference a token that does not exist. +. + +MessageId=1009 +Severity=Success +Facility=System +SymbolicName=ERROR_BADDB +Language=Bulgarian +ERROR_BADDB - The configuration registry database is corrupt. +. + +MessageId=1010 +Severity=Success +Facility=System +SymbolicName=ERROR_BADKEY +Language=Bulgarian +ERROR_BADKEY - The configuration registry key is invalid. +. + +MessageId=1011 +Severity=Success +Facility=System +SymbolicName=ERROR_CANTOPEN +Language=Bulgarian +ERROR_CANTOPEN - The configuration registry key could not be opened. +. + +MessageId=1012 +Severity=Success +Facility=System +SymbolicName=ERROR_CANTREAD +Language=Bulgarian +ERROR_CANTREAD - The configuration registry key could not be read. +. + +MessageId=1013 +Severity=Success +Facility=System +SymbolicName=ERROR_CANTWRITE +Language=Bulgarian +ERROR_CANTWRITE - The configuration registry key could not be written. +. + +MessageId=1014 +Severity=Success +Facility=System +SymbolicName=ERROR_REGISTRY_RECOVERED +Language=Bulgarian +ERROR_REGISTRY_RECOVERED - One of the files in the registry database had to be recovered by use of a log or alternate copy. The recovery was successful. +. + +MessageId=1015 +Severity=Success +Facility=System +SymbolicName=ERROR_REGISTRY_CORRUPT +Language=Bulgarian +ERROR_REGISTRY_CORRUPT - The registry is corrupted. The structure of one of the files containing registry data is corrupted, or the system's memory image of the file is corrupted, or the file could not be recovered because the alternate copy or log was absent or corrupted. +. + +MessageId=1016 +Severity=Success +Facility=System +SymbolicName=ERROR_REGISTRY_IO_FAILED +Language=Bulgarian +ERROR_REGISTRY_IO_FAILED - An I/O operation initiated by the registry failed unrecoverably. The registry could not read in, or write out, or flush, one of the files that contain the system's image of the registry. +. + +MessageId=1017 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_REGISTRY_FILE +Language=Bulgarian +ERROR_NOT_REGISTRY_FILE - The system has attempted to load or restore a file into the registry, but the specified file is not in a registry file format. +. + +MessageId=1018 +Severity=Success +Facility=System +SymbolicName=ERROR_KEY_DELETED +Language=Bulgarian +ERROR_KEY_DELETED - Illegal operation attempted on a registry key that has been marked for deletion. +. + +MessageId=1019 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_LOG_SPACE +Language=Bulgarian +ERROR_NO_LOG_SPACE - System could not allocate the required space in a registry log. +. + +MessageId=1020 +Severity=Success +Facility=System +SymbolicName=ERROR_KEY_HAS_CHILDREN +Language=Bulgarian +ERROR_KEY_HAS_CHILDREN - Cannot create a symbolic link in a registry key that already has subkeys or values. +. + +MessageId=1021 +Severity=Success +Facility=System +SymbolicName=ERROR_CHILD_MUST_BE_VOLATILE +Language=Bulgarian +ERROR_CHILD_MUST_BE_VOLATILE - Cannot create a stable subkey under a volatile parent key. +. + +MessageId=1022 +Severity=Success +Facility=System +SymbolicName=ERROR_NOTIFY_ENUM_DIR +Language=Bulgarian +ERROR_NOTIFY_ENUM_DIR - A notify change request is being completed and the information is not being returned in the caller's buffer. The caller now needs to enumerate the files to find the changes. +. + +MessageId=1051 +Severity=Success +Facility=System +SymbolicName=ERROR_DEPENDENT_SERVICES_RUNNING +Language=Bulgarian +ERROR_DEPENDENT_SERVICES_RUNNING - A stop control has been sent to a service that other running services are dependent on. +. + +MessageId=1052 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_SERVICE_CONTROL +Language=Bulgarian +ERROR_INVALID_SERVICE_CONTROL - The requested control is not valid for this service. +. + +MessageId=1053 +Severity=Success +Facility=System +SymbolicName=ERROR_SERVICE_REQUEST_TIMEOUT +Language=Bulgarian +ERROR_SERVICE_REQUEST_TIMEOUT - The service did not respond to the start or control request in a timely fashion. +. + +MessageId=1054 +Severity=Success +Facility=System +SymbolicName=ERROR_SERVICE_NO_THREAD +Language=Bulgarian +ERROR_SERVICE_NO_THREAD - A thread could not be created for the service. +. + +MessageId=1055 +Severity=Success +Facility=System +SymbolicName=ERROR_SERVICE_DATABASE_LOCKED +Language=Bulgarian +ERROR_SERVICE_DATABASE_LOCKED - The service database is locked. +. + +MessageId=1056 +Severity=Success +Facility=System +SymbolicName=ERROR_SERVICE_ALREADY_RUNNING +Language=Bulgarian +ERROR_SERVICE_ALREADY_RUNNING - An instance of the service is already running. +. + +MessageId=1057 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_SERVICE_ACCOUNT +Language=Bulgarian +ERROR_INVALID_SERVICE_ACCOUNT - The account name is invalid or does not exist, or the password is invalid for the account name specified. +. + +MessageId=1058 +Severity=Success +Facility=System +SymbolicName=ERROR_SERVICE_DISABLED +Language=Bulgarian +ERROR_SERVICE_DISABLED - The service cannot be started, either because it is disabled or because it has no enabled devices associated with it. +. + +MessageId=1059 +Severity=Success +Facility=System +SymbolicName=ERROR_CIRCULAR_DEPENDENCY +Language=Bulgarian +ERROR_CIRCULAR_DEPENDENCY - Circular service dependency was specified. +. + +MessageId=1060 +Severity=Success +Facility=System +SymbolicName=ERROR_SERVICE_DOES_NOT_EXIST +Language=Bulgarian +ERROR_SERVICE_DOES_NOT_EXIST - The specified service does not exist as an installed service. +. + +MessageId=1061 +Severity=Success +Facility=System +SymbolicName=ERROR_SERVICE_CANNOT_ACCEPT_CTRL +Language=Bulgarian +ERROR_SERVICE_CANNOT_ACCEPT_CTRL - The service cannot accept control messages at this time. +. + +MessageId=1062 +Severity=Success +Facility=System +SymbolicName=ERROR_SERVICE_NOT_ACTIVE +Language=Bulgarian +ERROR_SERVICE_NOT_ACTIVE - The service has not been started. +. + +MessageId=1063 +Severity=Success +Facility=System +SymbolicName=ERROR_FAILED_SERVICE_CONTROLLER_CONNECT +Language=Bulgarian +ERROR_FAILED_SERVICE_CONTROLLER_CONNECT - The service process could not connect to the service controller. +. + +MessageId=1064 +Severity=Success +Facility=System +SymbolicName=ERROR_EXCEPTION_IN_SERVICE +Language=Bulgarian +ERROR_EXCEPTION_IN_SERVICE - An exception occurred in the service when handling the control request. +. + +MessageId=1065 +Severity=Success +Facility=System +SymbolicName=ERROR_DATABASE_DOES_NOT_EXIST +Language=Bulgarian +ERROR_DATABASE_DOES_NOT_EXIST - The database specified does not exist. +. + +MessageId=1066 +Severity=Success +Facility=System +SymbolicName=ERROR_SERVICE_SPECIFIC_ERROR +Language=Bulgarian +ERROR_SERVICE_SPECIFIC_ERROR - The service has returned a service-specific error code. +. + +MessageId=1067 +Severity=Success +Facility=System +SymbolicName=ERROR_PROCESS_ABORTED +Language=Bulgarian +ERROR_PROCESS_ABORTED - The process terminated unexpectedly. +. + +MessageId=1068 +Severity=Success +Facility=System +SymbolicName=ERROR_SERVICE_DEPENDENCY_FAIL +Language=Bulgarian +ERROR_SERVICE_DEPENDENCY_FAIL - The dependency service or group failed to start. +. + +MessageId=1069 +Severity=Success +Facility=System +SymbolicName=ERROR_SERVICE_LOGON_FAILED +Language=Bulgarian +ERROR_SERVICE_LOGON_FAILED - The service did not start due to a logon failure. +. + +MessageId=1070 +Severity=Success +Facility=System +SymbolicName=ERROR_SERVICE_START_HANG +Language=Bulgarian +ERROR_SERVICE_START_HANG - After starting, the service hung in a start-pending state. +. + +MessageId=1071 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_SERVICE_LOCK +Language=Bulgarian +ERROR_INVALID_SERVICE_LOCK - The specified service database lock is invalid. +. + +MessageId=1072 +Severity=Success +Facility=System +SymbolicName=ERROR_SERVICE_MARKED_FOR_DELETE +Language=Bulgarian +ERROR_SERVICE_MARKED_FOR_DELETE - The specified service has been marked for deletion. +. + +MessageId=1073 +Severity=Success +Facility=System +SymbolicName=ERROR_SERVICE_EXISTS +Language=Bulgarian +ERROR_SERVICE_EXISTS - The specified service already exists. +. + +MessageId=1074 +Severity=Success +Facility=System +SymbolicName=ERROR_ALREADY_RUNNING_LKG +Language=Bulgarian +ERROR_ALREADY_RUNNING_LKG - The system is currently running with the last-known-good configuration. +. + +MessageId=1075 +Severity=Success +Facility=System +SymbolicName=ERROR_SERVICE_DEPENDENCY_DELETED +Language=Bulgarian +ERROR_SERVICE_DEPENDENCY_DELETED - The dependency service does not exist or has been marked for deletion. +. + +MessageId=1076 +Severity=Success +Facility=System +SymbolicName=ERROR_BOOT_ALREADY_ACCEPTED +Language=Bulgarian +ERROR_BOOT_ALREADY_ACCEPTED - The current boot has already been accepted for use as the last-known-good control set. +. + +MessageId=1077 +Severity=Success +Facility=System +SymbolicName=ERROR_SERVICE_NEVER_STARTED +Language=Bulgarian +ERROR_SERVICE_NEVER_STARTED - No attempts to start the service have been made since the last boot. +. + +MessageId=1078 +Severity=Success +Facility=System +SymbolicName=ERROR_DUPLICATE_SERVICE_NAME +Language=Bulgarian +ERROR_DUPLICATE_SERVICE_NAME - The name is already in use as either a service name or a service display name. +. + +MessageId=1079 +Severity=Success +Facility=System +SymbolicName=ERROR_DIFFERENT_SERVICE_ACCOUNT +Language=Bulgarian +ERROR_DIFFERENT_SERVICE_ACCOUNT - The account specified for this service is different from the account specified for other services running in the same process. +. + +MessageId=1080 +Severity=Success +Facility=System +SymbolicName=ERROR_CANNOT_DETECT_DRIVER_FAILURE +Language=Bulgarian +ERROR_CANNOT_DETECT_DRIVER_FAILURE - Failure actions can only be set for Win32 services, not for drivers. +. + +MessageId=1081 +Severity=Success +Facility=System +SymbolicName=ERROR_CANNOT_DETECT_PROCESS_ABORT +Language=Bulgarian +ERROR_CANNOT_DETECT_PROCESS_ABORT - This service runs in the same process as the service control manager. Therefore, the service control manager cannot take action if this service's process terminates unexpectedly. +. + +MessageId=1082 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_RECOVERY_PROGRAM +Language=Bulgarian +ERROR_NO_RECOVERY_PROGRAM - No recovery program has been configured for this service. +. + +MessageId=1083 +Severity=Success +Facility=System +SymbolicName=ERROR_SERVICE_NOT_IN_EXE +Language=Bulgarian +ERROR_SERVICE_NOT_IN_EXE - The executable program that this service is configured to run in does not implement the service. +. + +MessageId=1084 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_SAFEBOOT_SERVICE +Language=Bulgarian +ERROR_NOT_SAFEBOOT_SERVICE - This service cannot be started in Safe Mode. +. + +MessageId=1100 +Severity=Success +Facility=System +SymbolicName=ERROR_END_OF_MEDIA +Language=Bulgarian +ERROR_END_OF_MEDIA - The physical end of the tape has been reached. +. + +MessageId=1101 +Severity=Success +Facility=System +SymbolicName=ERROR_FILEMARK_DETECTED +Language=Bulgarian +ERROR_FILEMARK_DETECTED - A tape access reached a filemark. +. + +MessageId=1102 +Severity=Success +Facility=System +SymbolicName=ERROR_BEGINNING_OF_MEDIA +Language=Bulgarian +ERROR_BEGINNING_OF_MEDIA - The beginning of the tape or a partition was encountered. +. + +MessageId=1103 +Severity=Success +Facility=System +SymbolicName=ERROR_SETMARK_DETECTED +Language=Bulgarian +ERROR_SETMARK_DETECTED - A tape access reached the end of a set of files. +. + +MessageId=1104 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_DATA_DETECTED +Language=Bulgarian +ERROR_NO_DATA_DETECTED - No more data is on the tape. +. + +MessageId=1105 +Severity=Success +Facility=System +SymbolicName=ERROR_PARTITION_FAILURE +Language=Bulgarian +ERROR_PARTITION_FAILURE - Tape could not be partitioned. +. + +MessageId=1106 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_BLOCK_LENGTH +Language=Bulgarian +ERROR_INVALID_BLOCK_LENGTH - When accessing a new tape of a multivolume partition, the current block size is incorrect. +. + +MessageId=1107 +Severity=Success +Facility=System +SymbolicName=ERROR_DEVICE_NOT_PARTITIONED +Language=Bulgarian +ERROR_DEVICE_NOT_PARTITIONED - Tape partition information could not be found when loading a tape. +. + +MessageId=1108 +Severity=Success +Facility=System +SymbolicName=ERROR_UNABLE_TO_LOCK_MEDIA +Language=Bulgarian +ERROR_UNABLE_TO_LOCK_MEDIA - Unable to lock the media eject mechanism. +. + +MessageId=1109 +Severity=Success +Facility=System +SymbolicName=ERROR_UNABLE_TO_UNLOAD_MEDIA +Language=Bulgarian +ERROR_UNABLE_TO_UNLOAD_MEDIA - Unable to unload the media. +. + +MessageId=1110 +Severity=Success +Facility=System +SymbolicName=ERROR_MEDIA_CHANGED +Language=Bulgarian +ERROR_MEDIA_CHANGED - The media in the drive may have changed. +. + +MessageId=1111 +Severity=Success +Facility=System +SymbolicName=ERROR_BUS_RESET +Language=Bulgarian +ERROR_BUS_RESET - The I/O bus was reset. +. + +MessageId=1112 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_MEDIA_IN_DRIVE +Language=Bulgarian +ERROR_NO_MEDIA_IN_DRIVE - No media in drive. +. + +MessageId=1113 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_UNICODE_TRANSLATION +Language=Bulgarian +ERROR_NO_UNICODE_TRANSLATION - No mapping for the Unicode character exists in the target multi-byte code page. +. + +MessageId=1114 +Severity=Success +Facility=System +SymbolicName=ERROR_DLL_INIT_FAILED +Language=Bulgarian +ERROR_DLL_INIT_FAILED - A dynamic link library (DLL) initialization routine failed. +. + +MessageId=1115 +Severity=Success +Facility=System +SymbolicName=ERROR_SHUTDOWN_IN_PROGRESS +Language=Bulgarian +ERROR_SHUTDOWN_IN_PROGRESS - A system shutdown is in progress. +. + +MessageId=1116 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_SHUTDOWN_IN_PROGRESS +Language=Bulgarian +ERROR_NO_SHUTDOWN_IN_PROGRESS - Unable to abort the system shutdown because no shutdown was in progress. +. + +MessageId=1117 +Severity=Success +Facility=System +SymbolicName=ERROR_IO_DEVICE +Language=Bulgarian +ERROR_IO_DEVICE - The request could not be performed because of an I/O device error. +. + +MessageId=1118 +Severity=Success +Facility=System +SymbolicName=ERROR_SERIAL_NO_DEVICE +Language=Bulgarian +ERROR_SERIAL_NO_DEVICE - No serial device was successfully initialized. The serial driver will unload. +. + +MessageId=1119 +Severity=Success +Facility=System +SymbolicName=ERROR_IRQ_BUSY +Language=Bulgarian +ERROR_IRQ_BUSY - Unable to open a device that was sharing an interrupt request (IRQ) with other devices. At least one other device that uses that IRQ was already opened. +. + +MessageId=1120 +Severity=Success +Facility=System +SymbolicName=ERROR_MORE_WRITES +Language=Bulgarian +ERROR_MORE_WRITES - A serial I/O operation was completed by another write to the serial port. (The IOCTL_SERIAL_XOFF_COUNTER reached zero.) +. + +MessageId=1121 +Severity=Success +Facility=System +SymbolicName=ERROR_COUNTER_TIMEOUT +Language=Bulgarian +ERROR_COUNTER_TIMEOUT - A serial I/O operation completed because the timeout period expired. (The IOCTL_SERIAL_XOFF_COUNTER did not reach zero.) +. + +MessageId=1122 +Severity=Success +Facility=System +SymbolicName=ERROR_FLOPPY_ID_MARK_NOT_FOUND +Language=Bulgarian +ERROR_FLOPPY_ID_MARK_NOT_FOUND - No ID address mark was found on the floppy disk. +. + +MessageId=1123 +Severity=Success +Facility=System +SymbolicName=ERROR_FLOPPY_WRONG_CYLINDER +Language=Bulgarian +ERROR_FLOPPY_WRONG_CYLINDER - Mismatch between the floppy disk sector ID field and the floppy disk controller track address. +. + +MessageId=1124 +Severity=Success +Facility=System +SymbolicName=ERROR_FLOPPY_UNKNOWN_ERROR +Language=Bulgarian +ERROR_FLOPPY_UNKNOWN_ERROR - The floppy disk controller reported an error that is not recognized by the floppy disk driver. +. + +MessageId=1125 +Severity=Success +Facility=System +SymbolicName=ERROR_FLOPPY_BAD_REGISTERS +Language=Bulgarian +ERROR_FLOPPY_BAD_REGISTERS - The floppy disk controller returned inconsistent results in its registers. +. + +MessageId=1126 +Severity=Success +Facility=System +SymbolicName=ERROR_DISK_RECALIBRATE_FAILED +Language=Bulgarian +ERROR_DISK_RECALIBRATE_FAILED - While accessing the hard disk, a recalibrate operation failed, even after retries. +. + +MessageId=1127 +Severity=Success +Facility=System +SymbolicName=ERROR_DISK_OPERATION_FAILED +Language=Bulgarian +ERROR_DISK_OPERATION_FAILED - While accessing the hard disk, a disk operation failed even after retries. +. + +MessageId=1128 +Severity=Success +Facility=System +SymbolicName=ERROR_DISK_RESET_FAILED +Language=Bulgarian +ERROR_DISK_RESET_FAILED - While accessing the hard disk, a disk controller reset was needed, but even that failed. +. + +MessageId=1129 +Severity=Success +Facility=System +SymbolicName=ERROR_EOM_OVERFLOW +Language=Bulgarian +ERROR_EOM_OVERFLOW - Physical end of tape encountered. +. + +MessageId=1130 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_ENOUGH_SERVER_MEMORY +Language=Bulgarian +ERROR_NOT_ENOUGH_SERVER_MEMORY - Not enough server storage is available to process this command. +. + +MessageId=1131 +Severity=Success +Facility=System +SymbolicName=ERROR_POSSIBLE_DEADLOCK +Language=Bulgarian +ERROR_POSSIBLE_DEADLOCK - A potential deadlock condition has been detected. +. + +MessageId=1132 +Severity=Success +Facility=System +SymbolicName=ERROR_MAPPED_ALIGNMENT +Language=Bulgarian +ERROR_MAPPED_ALIGNMENT - The base address or the file offset specified does not have the proper alignment. +. + +MessageId=1140 +Severity=Success +Facility=System +SymbolicName=ERROR_SET_POWER_STATE_VETOED +Language=Bulgarian +ERROR_SET_POWER_STATE_VETOED - An attempt to change the system power state was vetoed by another application or driver. +. + +MessageId=1141 +Severity=Success +Facility=System +SymbolicName=ERROR_SET_POWER_STATE_FAILED +Language=Bulgarian +ERROR_SET_POWER_STATE_FAILED - The system BIOS failed an attempt to change the system power state. +. + +MessageId=1142 +Severity=Success +Facility=System +SymbolicName=ERROR_TOO_MANY_LINKS +Language=Bulgarian +ERROR_TOO_MANY_LINKS - An attempt was made to create more links on a file than the file system supports. +. + +MessageId=1150 +Severity=Success +Facility=System +SymbolicName=ERROR_OLD_WIN_VERSION +Language=Bulgarian +ERROR_OLD_WIN_VERSION - The specified program requires a newer version of Windows. +. + +MessageId=1151 +Severity=Success +Facility=System +SymbolicName=ERROR_APP_WRONG_OS +Language=Bulgarian +ERROR_APP_WRONG_OS - The specified program is not a Windows or MS-DOS program. +. + +MessageId=1152 +Severity=Success +Facility=System +SymbolicName=ERROR_SINGLE_INSTANCE_APP +Language=Bulgarian +ERROR_SINGLE_INSTANCE_APP - Cannot start more than one instance of the specified program. +. + +MessageId=1153 +Severity=Success +Facility=System +SymbolicName=ERROR_RMODE_APP +Language=Bulgarian +ERROR_RMODE_APP - The specified program was written for an earlier version of Windows. +. + +MessageId=1154 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_DLL +Language=Bulgarian +ERROR_INVALID_DLL - One of the library files needed to run this application is damaged. +. + +MessageId=1155 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_ASSOCIATION +Language=Bulgarian +ERROR_NO_ASSOCIATION - No application is associated with the specified file for this operation. +. + +MessageId=1156 +Severity=Success +Facility=System +SymbolicName=ERROR_DDE_FAIL +Language=Bulgarian +ERROR_DDE_FAIL - An error occurred in sending the command to the application. +. + +MessageId=1157 +Severity=Success +Facility=System +SymbolicName=ERROR_DLL_NOT_FOUND +Language=Bulgarian +ERROR_DLL_NOT_FOUND - One of the library files needed to run this application cannot be found. +. + +MessageId=1158 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_MORE_USER_HANDLES +Language=Bulgarian +ERROR_NO_MORE_USER_HANDLES - The current process has used all of its system allowance of handles for Window Manager objects. +. + +MessageId=1159 +Severity=Success +Facility=System +SymbolicName=ERROR_MESSAGE_SYNC_ONLY +Language=Bulgarian +ERROR_MESSAGE_SYNC_ONLY - The message can be used only with synchronous operations. +. + +MessageId=1160 +Severity=Success +Facility=System +SymbolicName=ERROR_SOURCE_ELEMENT_EMPTY +Language=Bulgarian +ERROR_SOURCE_ELEMENT_EMPTY - The indicated source element has no media. +. + +MessageId=1161 +Severity=Success +Facility=System +SymbolicName=ERROR_DESTINATION_ELEMENT_FULL +Language=Bulgarian +ERROR_DESTINATION_ELEMENT_FULL - The indicated destination element already contains media. +. + +MessageId=1162 +Severity=Success +Facility=System +SymbolicName=ERROR_ILLEGAL_ELEMENT_ADDRESS +Language=Bulgarian +ERROR_ILLEGAL_ELEMENT_ADDRESS - The indicated element does not exist. +. + +MessageId=1163 +Severity=Success +Facility=System +SymbolicName=ERROR_MAGAZINE_NOT_PRESENT +Language=Bulgarian +ERROR_MAGAZINE_NOT_PRESENT - The indicated element is part of a magazine that is not present. +. + +MessageId=1164 +Severity=Success +Facility=System +SymbolicName=ERROR_DEVICE_REINITIALIZATION_NEEDED +Language=Bulgarian +ERROR_DEVICE_REINITIALIZATION_NEEDED - The indicated device requires reinitialization due to hardware errors. +. + +MessageId=1165 +Severity=Success +Facility=System +SymbolicName=ERROR_DEVICE_REQUIRES_CLEANING +Language=Bulgarian +ERROR_DEVICE_REQUIRES_CLEANING - The device has indicated that cleaning is required before further operations are attempted. +. + +MessageId=1166 +Severity=Success +Facility=System +SymbolicName=ERROR_DEVICE_DOOR_OPEN +Language=Bulgarian +ERROR_DEVICE_DOOR_OPEN - The device has indicated that its door is open. +. + +MessageId=1167 +Severity=Success +Facility=System +SymbolicName=ERROR_DEVICE_NOT_CONNECTED +Language=Bulgarian +ERROR_DEVICE_NOT_CONNECTED - The device is not connected. +. + +MessageId=1168 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_FOUND +Language=Bulgarian +ERROR_NOT_FOUND - Element not found. +. + +MessageId=1169 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_MATCH +Language=Bulgarian +ERROR_NO_MATCH - There was no match for the specified key in the index. +. + +MessageId=1170 +Severity=Success +Facility=System +SymbolicName=ERROR_SET_NOT_FOUND +Language=Bulgarian +ERROR_SET_NOT_FOUND - The property set specified does not exist on the object. +. + +MessageId=1171 +Severity=Success +Facility=System +SymbolicName=ERROR_POINT_NOT_FOUND +Language=Bulgarian +ERROR_POINT_NOT_FOUND - The point passed to GetMouseMovePointsEx is not in the buffer. +. + +MessageId=1172 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_TRACKING_SERVICE +Language=Bulgarian +ERROR_NO_TRACKING_SERVICE - The tracking (workstation) service is not running. +. + +MessageId=1173 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_VOLUME_ID +Language=Bulgarian +ERROR_NO_VOLUME_ID - The Volume ID could not be found. +. + +MessageId=1175 +Severity=Success +Facility=System +SymbolicName=ERROR_UNABLE_TO_REMOVE_REPLACED +Language=Bulgarian +ERROR_UNABLE_TO_REMOVE_REPLACED - Unable to remove the file to be replaced. +. + +MessageId=1176 +Severity=Success +Facility=System +SymbolicName=ERROR_UNABLE_TO_MOVE_REPLACEMENT +Language=Bulgarian +ERROR_UNABLE_TO_MOVE_REPLACEMENT - Unable to move the replacement file to the file to be replaced. The file to be replaced has retained its original name. +. + +MessageId=1177 +Severity=Success +Facility=System +SymbolicName=ERROR_UNABLE_TO_MOVE_REPLACEMENT_2 +Language=Bulgarian +ERROR_UNABLE_TO_MOVE_REPLACEMENT_2 - Unable to move the replacement file to the file to be replaced. The file to be replaced has been renamed using the backup name. +. + +MessageId=1178 +Severity=Success +Facility=System +SymbolicName=ERROR_JOURNAL_DELETE_IN_PROGRESS +Language=Bulgarian +ERROR_JOURNAL_DELETE_IN_PROGRESS - The volume change journal is being deleted. +. + +MessageId=1179 +Severity=Success +Facility=System +SymbolicName=ERROR_JOURNAL_NOT_ACTIVE +Language=Bulgarian +ERROR_JOURNAL_NOT_ACTIVE - The volume change journal is not active. +. + +MessageId=1180 +Severity=Success +Facility=System +SymbolicName=ERROR_POTENTIAL_FILE_FOUND +Language=Bulgarian +ERROR_POTENTIAL_FILE_FOUND - A file was found, but it may not be the correct file. +. + +MessageId=1181 +Severity=Success +Facility=System +SymbolicName=ERROR_JOURNAL_ENTRY_DELETED +Language=Bulgarian +ERROR_JOURNAL_ENTRY_DELETED - The journal entry has been deleted from the journal. +. + +MessageId=1200 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_DEVICE +Language=Bulgarian +ERROR_BAD_DEVICE - The specified device name is invalid. +. + +MessageId=1201 +Severity=Success +Facility=System +SymbolicName=ERROR_CONNECTION_UNAVAIL +Language=Bulgarian +ERROR_CONNECTION_UNAVAIL - The device is not currently connected but it is a remembered connection. +. + +MessageId=1202 +Severity=Success +Facility=System +SymbolicName=ERROR_DEVICE_ALREADY_REMEMBERED +Language=Bulgarian +ERROR_DEVICE_ALREADY_REMEMBERED - The local device name has a remembered connection to another network resource. +. + +MessageId=1203 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_NET_OR_BAD_PATH +Language=Bulgarian +ERROR_NO_NET_OR_BAD_PATH - The network path was either typed incorrectly, does not exist, or the network provider is not currently available. Please try retyping the path or contact your network administrator. +. + +MessageId=1204 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_PROVIDER +Language=Bulgarian +ERROR_BAD_PROVIDER - The specified network provider name is invalid. +. + +MessageId=1205 +Severity=Success +Facility=System +SymbolicName=ERROR_CANNOT_OPEN_PROFILE +Language=Bulgarian +ERROR_CANNOT_OPEN_PROFILE - Unable to open the network connection profile. +. + +MessageId=1206 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_PROFILE +Language=Bulgarian +ERROR_BAD_PROFILE - The network connection profile is corrupted. +. + +MessageId=1207 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_CONTAINER +Language=Bulgarian +ERROR_NOT_CONTAINER - Cannot enumerate a noncontainer. +. + +MessageId=1208 +Severity=Success +Facility=System +SymbolicName=ERROR_EXTENDED_ERROR +Language=Bulgarian +ERROR_EXTENDED_ERROR - An extended error has occurred. +. + +MessageId=1209 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_GROUPNAME +Language=Bulgarian +ERROR_INVALID_GROUPNAME - The format of the specified group name is invalid. +. + +MessageId=1210 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_COMPUTERNAME +Language=Bulgarian +ERROR_INVALID_COMPUTERNAME - The format of the specified computer name is invalid. +. + +MessageId=1211 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_EVENTNAME +Language=Bulgarian +ERROR_INVALID_EVENTNAME - The format of the specified event name is invalid. +. + +MessageId=1212 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_DOMAINNAME +Language=Bulgarian +ERROR_INVALID_DOMAINNAME - The format of the specified domain name is invalid. +. + +MessageId=1213 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_SERVICENAME +Language=Bulgarian +ERROR_INVALID_SERVICENAME - The format of the specified service name is invalid. +. + +MessageId=1214 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_NETNAME +Language=Bulgarian +ERROR_INVALID_NETNAME - The format of the specified network name is invalid. +. + +MessageId=1215 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_SHARENAME +Language=Bulgarian +ERROR_INVALID_SHARENAME - The format of the specified share name is invalid. +. + +MessageId=1216 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_PASSWORDNAME +Language=Bulgarian +ERROR_INVALID_PASSWORDNAME - The format of the specified password is invalid. +. + +MessageId=1217 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_MESSAGENAME +Language=Bulgarian +ERROR_INVALID_MESSAGENAME - The format of the specified message name is invalid. +. + +MessageId=1218 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_MESSAGEDEST +Language=Bulgarian +ERROR_INVALID_MESSAGEDEST - The format of the specified message destination is invalid. +. + +MessageId=1219 +Severity=Success +Facility=System +SymbolicName=ERROR_SESSION_CREDENTIAL_CONFLICT +Language=Bulgarian +ERROR_SESSION_CREDENTIAL_CONFLICT - Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again. +. + +MessageId=1220 +Severity=Success +Facility=System +SymbolicName=ERROR_REMOTE_SESSION_LIMIT_EXCEEDED +Language=Bulgarian +ERROR_REMOTE_SESSION_LIMIT_EXCEEDED - An attempt was made to establish a session to a network server, but there are already too many sessions established to that server. +. + +MessageId=1221 +Severity=Success +Facility=System +SymbolicName=ERROR_DUP_DOMAINNAME +Language=Bulgarian +ERROR_DUP_DOMAINNAME - The workgroup or domain name is already in use by another computer on the network. +. + +MessageId=1222 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_NETWORK +Language=Bulgarian +ERROR_NO_NETWORK - The network is not present or not started. +. + +MessageId=1223 +Severity=Success +Facility=System +SymbolicName=ERROR_CANCELLED +Language=Bulgarian +ERROR_CANCELLED - The operation was canceled by the user. +. + +MessageId=1224 +Severity=Success +Facility=System +SymbolicName=ERROR_USER_MAPPED_FILE +Language=Bulgarian +ERROR_USER_MAPPED_FILE - The requested operation cannot be performed on a file with a user-mapped section open. +. + +MessageId=1225 +Severity=Success +Facility=System +SymbolicName=ERROR_CONNECTION_REFUSED +Language=Bulgarian +ERROR_CONNECTION_REFUSED - The remote system refused the network connection. +. + +MessageId=1226 +Severity=Success +Facility=System +SymbolicName=ERROR_GRACEFUL_DISCONNECT +Language=Bulgarian +ERROR_GRACEFUL_DISCONNECT - The network connection was gracefully closed. +. + +MessageId=1227 +Severity=Success +Facility=System +SymbolicName=ERROR_ADDRESS_ALREADY_ASSOCIATED +Language=Bulgarian +ERROR_ADDRESS_ALREADY_ASSOCIATED - The network transport endpoint already has an address associated with it. +. + +MessageId=1228 +Severity=Success +Facility=System +SymbolicName=ERROR_ADDRESS_NOT_ASSOCIATED +Language=Bulgarian +ERROR_ADDRESS_NOT_ASSOCIATED - An address has not yet been associated with the network endpoint. +. + +MessageId=1229 +Severity=Success +Facility=System +SymbolicName=ERROR_CONNECTION_INVALID +Language=Bulgarian +ERROR_CONNECTION_INVALID - An operation was attempted on a nonexistent network connection. +. + +MessageId=1230 +Severity=Success +Facility=System +SymbolicName=ERROR_CONNECTION_ACTIVE +Language=Bulgarian +ERROR_CONNECTION_ACTIVE - An invalid operation was attempted on an active network connection. +. + +MessageId=1231 +Severity=Success +Facility=System +SymbolicName=ERROR_NETWORK_UNREACHABLE +Language=Bulgarian +ERROR_NETWORK_UNREACHABLE - The network location cannot be reached. For information about network troubleshooting, see Windows Help. +. + +MessageId=1232 +Severity=Success +Facility=System +SymbolicName=ERROR_HOST_UNREACHABLE +Language=Bulgarian +ERROR_HOST_UNREACHABLE - The network location cannot be reached. For information about network troubleshooting, see Windows Help. +. + +MessageId=1233 +Severity=Success +Facility=System +SymbolicName=ERROR_PROTOCOL_UNREACHABLE +Language=Bulgarian +ERROR_PROTOCOL_UNREACHABLE - The network location cannot be reached. For information about network troubleshooting, see Windows Help. +. + +MessageId=1234 +Severity=Success +Facility=System +SymbolicName=ERROR_PORT_UNREACHABLE +Language=Bulgarian +ERROR_PORT_UNREACHABLE - No service is operating at the destination network endpoint on the remote system. +. + +MessageId=1235 +Severity=Success +Facility=System +SymbolicName=ERROR_REQUEST_ABORTED +Language=Bulgarian +ERROR_REQUEST_ABORTED - The request was aborted. +. + +MessageId=1236 +Severity=Success +Facility=System +SymbolicName=ERROR_CONNECTION_ABORTED +Language=Bulgarian +ERROR_CONNECTION_ABORTED - The network connection was aborted by the local system. +. + +MessageId=1237 +Severity=Success +Facility=System +SymbolicName=ERROR_RETRY +Language=Bulgarian +ERROR_RETRY - The operation could not be completed. A retry should be performed. +. + +MessageId=1238 +Severity=Success +Facility=System +SymbolicName=ERROR_CONNECTION_COUNT_LIMIT +Language=Bulgarian +ERROR_CONNECTION_COUNT_LIMIT - A connection to the server could not be made because the limit on the number of concurrent connections for this account has been reached. +. + +MessageId=1239 +Severity=Success +Facility=System +SymbolicName=ERROR_LOGIN_TIME_RESTRICTION +Language=Bulgarian +ERROR_LOGIN_TIME_RESTRICTION - Attempting to log in during an unauthorized time of day for this account. +. + +MessageId=1240 +Severity=Success +Facility=System +SymbolicName=ERROR_LOGIN_WKSTA_RESTRICTION +Language=Bulgarian +ERROR_LOGIN_WKSTA_RESTRICTION - The account is not authorized to log in from this station. +. + +MessageId=1241 +Severity=Success +Facility=System +SymbolicName=ERROR_INCORRECT_ADDRESS +Language=Bulgarian +ERROR_INCORRECT_ADDRESS - The network address could not be used for the operation requested. +. + +MessageId=1242 +Severity=Success +Facility=System +SymbolicName=ERROR_ALREADY_REGISTERED +Language=Bulgarian +ERROR_ALREADY_REGISTERED - The service is already registered. +. + +MessageId=1243 +Severity=Success +Facility=System +SymbolicName=ERROR_SERVICE_NOT_FOUND +Language=Bulgarian +ERROR_SERVICE_NOT_FOUND - The specified service does not exist. +. + +MessageId=1244 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_AUTHENTICATED +Language=Bulgarian +ERROR_NOT_AUTHENTICATED - The operation being requested was not performed because the user has not been authenticated. +. + +MessageId=1245 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_LOGGED_ON +Language=Bulgarian +ERROR_NOT_LOGGED_ON - The operation being requested was not performed because the user has not logged on to the network. The specified service does not exist. +. + +MessageId=1246 +Severity=Success +Facility=System +SymbolicName=ERROR_CONTINUE +Language=Bulgarian +ERROR_CONTINUE - Continue with work in progress. +. + +MessageId=1247 +Severity=Success +Facility=System +SymbolicName=ERROR_ALREADY_INITIALIZED +Language=Bulgarian +ERROR_ALREADY_INITIALIZED - An attempt was made to perform an initialization operation when initialization has already been completed. +. + +MessageId=1248 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_MORE_DEVICES +Language=Bulgarian +ERROR_NO_MORE_DEVICES - No more local devices. +. + +MessageId=1249 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_SUCH_SITE +Language=Bulgarian +ERROR_NO_SUCH_SITE - The specified site does not exist. +. + +MessageId=1250 +Severity=Success +Facility=System +SymbolicName=ERROR_DOMAIN_CONTROLLER_EXISTS +Language=Bulgarian +ERROR_DOMAIN_CONTROLLER_EXISTS - A domain controller with the specified name already exists. +. + +MessageId=1251 +Severity=Success +Facility=System +SymbolicName=ERROR_ONLY_IF_CONNECTED +Language=Bulgarian +ERROR_ONLY_IF_CONNECTED - This operation is supported only when you are connected to the server. +. + +MessageId=1252 +Severity=Success +Facility=System +SymbolicName=ERROR_OVERRIDE_NOCHANGES +Language=Bulgarian +ERROR_OVERRIDE_NOCHANGES - The group policy framework should call the extension even if there are no changes. +. + +MessageId=1253 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_USER_PROFILE +Language=Bulgarian +ERROR_BAD_USER_PROFILE - The specified user does not have a valid profile. +. + +MessageId=1254 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_SUPPORTED_ON_SBS +Language=Bulgarian +ERROR_NOT_SUPPORTED_ON_SBS - This operation is not supported on a computer running Windows Server 2003 for Small Business Server. +. + +MessageId=1255 +Severity=Success +Facility=System +SymbolicName=ERROR_SERVER_SHUTDOWN_IN_PROGRESS +Language=Bulgarian +ERROR_SERVER_SHUTDOWN_IN_PROGRESS - The server machine is shutting down. +. + +MessageId=1256 +Severity=Success +Facility=System +SymbolicName=ERROR_HOST_DOWN +Language=Bulgarian +ERROR_HOST_DOWN - The remote system is not available. For information about network troubleshooting, see Windows Help. +. + +MessageId=1257 +Severity=Success +Facility=System +SymbolicName=ERROR_NON_ACCOUNT_SID +Language=Bulgarian +ERROR_NON_ACCOUNT_SID - The security identifier provided is not from an account domain. +. + +MessageId=1258 +Severity=Success +Facility=System +SymbolicName=ERROR_NON_DOMAIN_SID +Language=Bulgarian +ERROR_NON_DOMAIN_SID - The security identifier provided does not have a domain component. +. + +MessageId=1259 +Severity=Success +Facility=System +SymbolicName=ERROR_APPHELP_BLOCK +Language=Bulgarian +ERROR_APPHELP_BLOCK - AppHelp dialog canceled thus preventing the application from starting. +. + +MessageId=1260 +Severity=Success +Facility=System +SymbolicName=ERROR_ACCESS_DISABLED_BY_POLICY +Language=Bulgarian +ERROR_ACCESS_DISABLED_BY_POLICY - Windows cannot open this program because it has been prevented by a software restriction policy. For more information, open Event Viewer or contact your system administrator. +. + +MessageId=1261 +Severity=Success +Facility=System +SymbolicName=ERROR_REG_NAT_CONSUMPTION +Language=Bulgarian +ERROR_REG_NAT_CONSUMPTION - A program attempt to use an invalid register value. Normally caused by an uninitialized register. This error is Itanium specific. +. + +MessageId=1262 +Severity=Success +Facility=System +SymbolicName=ERROR_CSCSHARE_OFFLINE +Language=Bulgarian +ERROR_CSCSHARE_OFFLINE - The share is currently offline or does not exist. +. + +MessageId=1263 +Severity=Success +Facility=System +SymbolicName=ERROR_PKINIT_FAILURE +Language=Bulgarian +ERROR_PKINIT_FAILURE - The kerberos protocol encountered an error while validating the KDC certificate during smartcard logon. +. + +MessageId=1264 +Severity=Success +Facility=System +SymbolicName=ERROR_SMARTCARD_SUBSYSTEM_FAILURE +Language=Bulgarian +ERROR_SMARTCARD_SUBSYSTEM_FAILURE - The kerberos protocol encountered an error while attempting to utilize the smartcard subsystem. +. + +MessageId=1265 +Severity=Success +Facility=System +SymbolicName=ERROR_DOWNGRADE_DETECTED +Language=Bulgarian +ERROR_DOWNGRADE_DETECTED - The system detected a possible attempt to compromise security. Please ensure that you can contact the server that authenticated you. +. + +MessageId=1266 +Severity=Success +Facility=System +SymbolicName=SEC_E_SMARTCARD_CERT_REVOKED +Language=Bulgarian +SEC_E_SMARTCARD_CERT_REVOKED - The smartcard certificate used for authentication has been revoked. Please contact your system administrator. There may be additional information in the event log. +. + +MessageId=1267 +Severity=Success +Facility=System +SymbolicName=SEC_E_ISSUING_CA_UNTRUSTED +Language=Bulgarian +SEC_E_ISSUING_CA_UNTRUSTED - An untrusted certificate authority was detected while processing the smartcard certificate used for authentication. Please contact your system administrator. +. + +MessageId=1268 +Severity=Success +Facility=System +SymbolicName=SEC_E_REVOCATION_OFFLINE_C +Language=Bulgarian +SEC_E_REVOCATION_OFFLINE_C - The revocation status of the smartcard certificate used for authentication could not be determined. Please contact your system administrator. +. + +MessageId=1269 +Severity=Success +Facility=System +SymbolicName=SEC_E_PKINIT_CLIENT_FAILUR +Language=Bulgarian +SEC_E_PKINIT_CLIENT_FAILUR - The smartcard certificate used for authentication was not trusted. Please contact your system administrator. +. + +MessageId=1270 +Severity=Success +Facility=System +SymbolicName=SEC_E_SMARTCARD_CERT_EXPIRED +Language=Bulgarian +SEC_E_SMARTCARD_CERT_EXPIRED - The smartcard certificate used for authentication has expired. Please contact your system administrator. +. + +MessageId=1271 +Severity=Success +Facility=System +SymbolicName=ERROR_MACHINE_LOCKED +Language=Bulgarian +ERROR_MACHINE_LOCKED - The machine is locked and cannot be shut down without the force option. +. + +MessageId=1273 +Severity=Success +Facility=System +SymbolicName=ERROR_CALLBACK_SUPPLIED_INVALID_DATA +Language=Bulgarian +ERROR_CALLBACK_SUPPLIED_INVALID_DATA - An application-defined callback gave invalid data when called. +. + +MessageId=1274 +Severity=Success +Facility=System +SymbolicName=ERROR_SYNC_FOREGROUND_REFRESH_REQUIRED +Language=Bulgarian +ERROR_SYNC_FOREGROUND_REFRESH_REQUIRED - The group policy framework should call the extension in the synchronous foreground policy refresh. +. + +MessageId=1275 +Severity=Success +Facility=System +SymbolicName=ERROR_DRIVER_BLOCKED +Language=Bulgarian +ERROR_DRIVER_BLOCKED - This driver has been blocked from loading. +. + +MessageId=1276 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_IMPORT_OF_NON_DLL +Language=Bulgarian +ERROR_INVALID_IMPORT_OF_NON_DLL - A dynamic link library (DLL) referenced a module that was neither a DLL nor the process's executable image. +. + +MessageId=1277 +Severity=Success +Facility=System +SymbolicName=ERROR_ACCESS_DISABLED_WEBBLADE +Language=Bulgarian +ERROR_ACCESS_DISABLED_WEBBLADE - Windows cannot open this program since it has been disabled. +. + +MessageId=1278 +Severity=Success +Facility=System +SymbolicName=ERROR_ACCESS_DISABLED_WEBBLADE_TAMPER +Language=Bulgarian +ERROR_ACCESS_DISABLED_WEBBLADE_TAMPER - Windows cannot open this program because the license enforcement system has been tampered with or become corrupted. +. + +MessageId=1279 +Severity=Success +Facility=System +SymbolicName=ERROR_RECOVERY_FAILURE +Language=Bulgarian +ERROR_RECOVERY_FAILURE - A transaction recovery failed. +. + +MessageId=1280 +Severity=Success +Facility=System +SymbolicName=ERROR_ALREADY_FIBER +Language=Bulgarian +ERROR_ALREADY_FIBER - The current thread has already been converted to a fiber. +. + +MessageId=1281 +Severity=Success +Facility=System +SymbolicName=ERROR_ALREADY_THREAD +Language=Bulgarian +ERROR_ALREADY_THREAD - The current thread has already been converted from a fiber. +. + +MessageId=1282 +Severity=Success +Facility=System +SymbolicName=ERROR_STACK_BUFFER_OVERRUN +Language=Bulgarian +ERROR_STACK_BUFFER_OVERRUN - The system detected an overrun of a stack-based buffer in this application. This overrun could potentially allow a malicious user to gain control of this application. +. + +MessageId=1283 +Severity=Success +Facility=System +SymbolicName=ERROR_PARAMETER_QUOTA_EXCEEDED +Language=Bulgarian +ERROR_PARAMETER_QUOTA_EXCEEDED - Data present in one of the parameters is more than the function can operate on. +. + +MessageId=1284 +Severity=Success +Facility=System +SymbolicName=ERROR_DEBUGGER_INACTIVE +Language=Bulgarian +ERROR_DEBUGGER_INACTIVE - An attempt to do an operation on a debug object failed because the object is in the process of being deleted. +. + +MessageId=1285 +Severity=Success +Facility=System +SymbolicName=ERROR_DELAY_LOAD_FAILED +Language=Bulgarian +ERROR_DELAY_LOAD_FAILED - An attempt to delay-load a .dll or get a function address in a delay-loaded .dll failed. +. + +MessageId=1286 +Severity=Success +Facility=System +SymbolicName=ERROR_VDM_DISALLOWED +Language=Bulgarian +ERROR_VDM_DISALLOWED - %1 is a 16-bit application. You do not have permissions to execute 16-bit applications. Check your permissions with your system administrator. +. + +MessageId=1287 +Severity=Success +Facility=System +SymbolicName=ERROR_UNIDENTIFIED_ERROR +Language=Bulgarian +ERROR_UNIDENTIFIED_ERROR - Insufficient information exists to identify the cause of failure. +. + +MessageId=1288 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_BANDWIDTH_PARAMETERS +Language=Bulgarian +ERROR_INVALID_BANDWIDTH_PARAMETERS - An invalid budget or period parameter was specified. +. + +MessageId=1289 +Severity=Success +Facility=System +SymbolicName=ERROR_AFFINITY_NOT_COMPATIBLE +Language=Bulgarian +ERROR_AFFINITY_NOT_COMPATIBLE - An attempt was made to join a thread to a reserve whose affinity did not intersect the reserve affinity or an attempt was made to associate a process with a reserve whose affinity did not intersect the reserve affinity. +. + +MessageId=1290 +Severity=Success +Facility=System +SymbolicName=ERROR_THREAD_ALREADY_IN_RESERVE +Language=Bulgarian +ERROR_THREAD_ALREADY_IN_RESERVE - An attempt was made to join a thread to a reserve which was already joined to another reserve. +. + +MessageId=1291 +Severity=Success +Facility=System +SymbolicName=ERROR_THREAD_NOT_IN_RESERVE +Language=Bulgarian +ERROR_THREAD_NOT_IN_RESERVE - An attempt was made to disjoin a thread from a reserve, but the thread was not joined to the reserve. +. + +MessageId=1292 +Severity=Success +Facility=System +SymbolicName=ERROR_THREAD_PROCESS_IN_RESERVE +Language=Bulgarian +ERROR_THREAD_PROCESS_IN_RESERVE - An attempt was made to disjoin a thread from a reserve whose process is associated with a reserve. +. + +MessageId=1293 +Severity=Success +Facility=System +SymbolicName=ERROR_PROCESS_ALREADY_IN_RESERVE +Language=Bulgarian +ERROR_PROCESS_ALREADY_IN_RESERVE - An attempt was made to associate a process with a reserve that was already associated with a reserve. +. + +MessageId=1294 +Severity=Success +Facility=System +SymbolicName=ERROR_PROCESS_NOT_IN_RESERVE +Language=Bulgarian +ERROR_PROCESS_NOT_IN_RESERVE - An attempt was made to disassociate a process from a reserve, but the process did not have an associated reserve. +. + +MessageId=1295 +Severity=Success +Facility=System +SymbolicName=ERROR_PROCESS_THREADS_IN_RESERVE +Language=Bulgarian +ERROR_PROCESS_THREADS_IN_RESERVE - An attempt was made to associate a process with a reserve, but the process contained thread joined to a reserve. +. + +MessageId=1296 +Severity=Success +Facility=System +SymbolicName=ERROR_AFFINITY_NOT_SET_IN_RESERVE +Language=Bulgarian +ERROR_AFFINITY_NOT_SET_IN_RESERVE - An attempt was made to set the affinity of a thread or a process, but the thread or process was joined or associated with a reserve. +. + +MessageId=1297 +Severity=Success +Facility=System +SymbolicName=ERROR_IMPLEMENTATION_LIMIT +Language=Bulgarian +ERROR_IMPLEMENTATION_LIMIT - An operation attempted to exceed an implementation-defined limit. +. + +MessageId=1298 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CACHE_ONLY +Language=Bulgarian +ERROR_DS_CACHE_ONLY - The requested object is for internal DS operations only. +. + +MessageId=1300 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_ALL_ASSIGNED +Language=Bulgarian +ERROR_NOT_ALL_ASSIGNED - Not all privileges referenced are assigned to the caller. +. + +MessageId=1301 +Severity=Success +Facility=System +SymbolicName=ERROR_SOME_NOT_MAPPED +Language=Bulgarian +ERROR_SOME_NOT_MAPPED - Some mapping between account names and security IDs was not done. +. + +MessageId=1302 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_QUOTAS_FOR_ACCOUNT +Language=Bulgarian +ERROR_NO_QUOTAS_FOR_ACCOUNT - No system quota limits are specifically set for this account. +. + +MessageId=1303 +Severity=Success +Facility=System +SymbolicName=ERROR_LOCAL_USER_SESSION_KEY +Language=Bulgarian +ERROR_LOCAL_USER_SESSION_KEY - No encryption key is available. A well-known encryption key was returned. +. + +MessageId=1304 +Severity=Success +Facility=System +SymbolicName=ERROR_NULL_LM_PASSWORD +Language=Bulgarian +ERROR_NULL_LM_PASSWORD - The password is too complex to be converted to a LAN Manager password. The LAN Manager password returned is a NULL string. +. + +MessageId=1305 +Severity=Success +Facility=System +SymbolicName=ERROR_UNKNOWN_REVISION +Language=Bulgarian +ERROR_UNKNOWN_REVISION - The revision level is unknown. +. + +MessageId=1306 +Severity=Success +Facility=System +SymbolicName=ERROR_REVISION_MISMATCH +Language=Bulgarian +ERROR_REVISION_MISMATCH - Indicates two revision levels are incompatible. +. + +MessageId=1307 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_OWNER +Language=Bulgarian +ERROR_INVALID_OWNER - This security ID may not be assigned as the owner of this object. +. + +MessageId=1308 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_PRIMARY_GROUP +Language=Bulgarian +ERROR_INVALID_PRIMARY_GROUP - This security ID may not be assigned as the primary group of an object. +. + +MessageId=1309 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_IMPERSONATION_TOKEN +Language=Bulgarian +ERROR_NO_IMPERSONATION_TOKEN - An attempt has been made to operate on an impersonation token by a thread that is not currently impersonating a client. +. + +MessageId=1310 +Severity=Success +Facility=System +SymbolicName=ERROR_CANT_DISABLE_MANDATORY +Language=Bulgarian +ERROR_CANT_DISABLE_MANDATORY - The group may not be disabled. +. + +MessageId=1311 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_LOGON_SERVERS +Language=Bulgarian +ERROR_NO_LOGON_SERVERS - There are currently no logon servers available to service the logon request. +. + +MessageId=1312 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_SUCH_LOGON_SESSION +Language=Bulgarian +ERROR_NO_SUCH_LOGON_SESSION - A specified logon session does not exist. It may already have been terminated. +. + +MessageId=1313 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_SUCH_PRIVILEGE +Language=Bulgarian +ERROR_NO_SUCH_PRIVILEGE - A specified privilege does not exist. +. + +MessageId=1314 +Severity=Success +Facility=System +SymbolicName=ERROR_PRIVILEGE_NOT_HELD +Language=Bulgarian +ERROR_PRIVILEGE_NOT_HELD - A required privilege is not held by the client. +. + +MessageId=1315 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_ACCOUNT_NAME +Language=Bulgarian +ERROR_INVALID_ACCOUNT_NAME - The name provided is not a properly formed account name. +. + +MessageId=1316 +Severity=Success +Facility=System +SymbolicName=ERROR_USER_EXISTS +Language=Bulgarian +ERROR_USER_EXISTS - The specified user already exists. +. + +MessageId=1317 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_SUCH_USER +Language=Bulgarian +ERROR_NO_SUCH_USER - The specified user does not exist. +. + +MessageId=1318 +Severity=Success +Facility=System +SymbolicName=ERROR_GROUP_EXISTS +Language=Bulgarian +ERROR_GROUP_EXISTS - The specified group already exists. +. + +MessageId=1319 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_SUCH_GROUP +Language=Bulgarian +ERROR_NO_SUCH_GROUP - The specified group does not exist. +. + +MessageId=1320 +Severity=Success +Facility=System +SymbolicName=ERROR_MEMBER_IN_GROUP +Language=Bulgarian +ERROR_MEMBER_IN_GROUP - Either the specified user account is already a member of the specified group, or the specified group cannot be deleted because it contains a member. +. + +MessageId=1321 +Severity=Success +Facility=System +SymbolicName=ERROR_MEMBER_NOT_IN_GROUP +Language=Bulgarian +ERROR_MEMBER_NOT_IN_GROUP - The specified user account is not a member of the specified group account. +. + +MessageId=1322 +Severity=Success +Facility=System +SymbolicName=ERROR_LAST_ADMIN +Language=Bulgarian +ERROR_LAST_ADMIN - The last remaining administration account cannot be disabled or deleted. +. + +MessageId=1323 +Severity=Success +Facility=System +SymbolicName=ERROR_WRONG_PASSWORD +Language=Bulgarian +ERROR_WRONG_PASSWORD - Unable to update the password. The value provided as the current password is incorrect. +. + +MessageId=1324 +Severity=Success +Facility=System +SymbolicName=ERROR_ILL_FORMED_PASSWORD +Language=Bulgarian +ERROR_ILL_FORMED_PASSWORD - Unable to update the password. The value provided for the new password contains values that are not allowed in passwords. +. + +MessageId=1325 +Severity=Success +Facility=System +SymbolicName=ERROR_PASSWORD_RESTRICTION +Language=Bulgarian +ERROR_PASSWORD_RESTRICTION - Unable to update the password. The value provided for the new password does not meet the length, complexity, or history requirement of the domain. +. + +MessageId=1326 +Severity=Success +Facility=System +SymbolicName=ERROR_LOGON_FAILURE +Language=Bulgarian +ERROR_LOGON_FAILURE - Logon failure: unknown user name or bad password. +. + +MessageId=1327 +Severity=Success +Facility=System +SymbolicName=ERROR_ACCOUNT_RESTRICTION +Language=Bulgarian +ERROR_ACCOUNT_RESTRICTION - Logon failure: user account restriction. Possible reasons are blank passwords not allowed, logon hour restrictions, or a policy restriction has been enforced. +. + +MessageId=1328 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_LOGON_HOURS +Language=Bulgarian +ERROR_INVALID_LOGON_HOURS - Logon failure: account logon time restriction violation. +. + +MessageId=1329 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_WORKSTATION +Language=Bulgarian +ERROR_INVALID_WORKSTATION - Logon failure: user not allowed to log on to this computer. +. + +MessageId=1330 +Severity=Success +Facility=System +SymbolicName=ERROR_PASSWORD_EXPIRED +Language=Bulgarian +ERROR_PASSWORD_EXPIRED - Logon failure: the specified account password has expired. +. + +MessageId=1331 +Severity=Success +Facility=System +SymbolicName=ERROR_ACCOUNT_DISABLED +Language=Bulgarian +ERROR_ACCOUNT_DISABLED - Logon failure: account currently disabled. +. + +MessageId=1332 +Severity=Success +Facility=System +SymbolicName=ERROR_NONE_MAPPED +Language=Bulgarian +ERROR_NONE_MAPPED - No mapping between account names and security IDs was done. +. + +MessageId=1333 +Severity=Success +Facility=System +SymbolicName=ERROR_TOO_MANY_LUIDS_REQUESTED +Language=Bulgarian +ERROR_TOO_MANY_LUIDS_REQUESTED - Too many local user identifiers (LUIDs) were requested at one time. +. + +MessageId=1334 +Severity=Success +Facility=System +SymbolicName=ERROR_LUIDS_EXHAUSTED +Language=Bulgarian +ERROR_LUIDS_EXHAUSTED - No more local user identifiers (LUIDs) are available. +. + +MessageId=1335 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_SUB_AUTHORITY +Language=Bulgarian +ERROR_INVALID_SUB_AUTHORITY - The subauthority part of a security ID is invalid for this particular use. +. + +MessageId=1336 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_ACL +Language=Bulgarian +ERROR_INVALID_ACL - The access control list (ACL) structure is invalid. +. + +MessageId=1337 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_SID +Language=Bulgarian +ERROR_INVALID_SID - The security ID structure is invalid. +. + +MessageId=1338 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_SECURITY_DESCR +Language=Bulgarian +ERROR_INVALID_SECURITY_DESCR - The security descriptor structure is invalid. +. + +MessageId=1340 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_INHERITANCE_ACL +Language=Bulgarian +ERROR_BAD_INHERITANCE_ACL - The inherited access control list (ACL) or access control entry (ACE) could not be built. +. + +MessageId=1341 +Severity=Success +Facility=System +SymbolicName=ERROR_SERVER_DISABLED +Language=Bulgarian +ERROR_SERVER_DISABLED - The server is currently disabled. +. + +MessageId=1342 +Severity=Success +Facility=System +SymbolicName=ERROR_SERVER_NOT_DISABLED +Language=Bulgarian +ERROR_SERVER_NOT_DISABLED - The server is currently enabled. +. + +MessageId=1343 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_ID_AUTHORITY +Language=Bulgarian +ERROR_INVALID_ID_AUTHORITY - The value provided was an invalid value for an identifier authority. +. + +MessageId=1344 +Severity=Success +Facility=System +SymbolicName=ERROR_ALLOTTED_SPACE_EXCEEDED +Language=Bulgarian +ERROR_ALLOTTED_SPACE_EXCEEDED - No more memory is available for security information updates. +. + +MessageId=1345 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_GROUP_ATTRIBUTES +Language=Bulgarian +ERROR_INVALID_GROUP_ATTRIBUTES - The specified attributes are invalid, or incompatible with the attributes for the group as a whole. +. + +MessageId=1346 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_IMPERSONATION_LEVEL +Language=Bulgarian +ERROR_BAD_IMPERSONATION_LEVEL - Either a required impersonation level was not provided, or the provided impersonation level is invalid. +. + +MessageId=1347 +Severity=Success +Facility=System +SymbolicName=ERROR_CANT_OPEN_ANONYMOUS +Language=Bulgarian +ERROR_CANT_OPEN_ANONYMOUS - Cannot open an anonymous level security token. +. + +MessageId=1348 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_VALIDATION_CLASS +Language=Bulgarian +ERROR_BAD_VALIDATION_CLASS - The validation information class requested was invalid. +. + +MessageId=1349 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_TOKEN_TYPE +Language=Bulgarian +ERROR_BAD_TOKEN_TYPE - The type of the token is inappropriate for its attempted use. +. + +MessageId=1350 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_SECURITY_ON_OBJECT +Language=Bulgarian +ERROR_NO_SECURITY_ON_OBJECT - Unable to perform a security operation on an object that has no associated security. +. + +MessageId=1351 +Severity=Success +Facility=System +SymbolicName=ERROR_CANT_ACCESS_DOMAIN_INFO +Language=Bulgarian +ERROR_CANT_ACCESS_DOMAIN_INFO - Configuration information could not be read from the domain controller, either because the machine is unavailable, or access has been denied. +. + +MessageId=1352 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_SERVER_STATE +Language=Bulgarian +ERROR_INVALID_SERVER_STATE - The security account manager (SAM) or local security authority (LSA) server was in the wrong state to perform the security operation. +. + +MessageId=1353 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_DOMAIN_STATE +Language=Bulgarian +ERROR_INVALID_DOMAIN_STATE - The domain was in the wrong state to perform the security operation. +. + +MessageId=1354 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_DOMAIN_ROLE +Language=Bulgarian +ERROR_INVALID_DOMAIN_ROLE - This operation is only allowed for the Primary Domain Controller of the domain. +. + +MessageId=1355 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_SUCH_DOMAIN +Language=Bulgarian +ERROR_NO_SUCH_DOMAIN - The specified domain either does not exist or could not be contacted. +. + +MessageId=1356 +Severity=Success +Facility=System +SymbolicName=ERROR_DOMAIN_EXISTS +Language=Bulgarian +ERROR_DOMAIN_EXISTS - The specified domain already exists. +. + +MessageId=1357 +Severity=Success +Facility=System +SymbolicName=ERROR_DOMAIN_LIMIT_EXCEEDED +Language=Bulgarian +ERROR_DOMAIN_LIMIT_EXCEEDED - An attempt was made to exceed the limit on the number of domains per server. +. + +MessageId=1358 +Severity=Success +Facility=System +SymbolicName=ERROR_INTERNAL_DB_CORRUPTION +Language=Bulgarian +ERROR_INTERNAL_DB_CORRUPTION - Unable to complete the requested operation because of either a catastrophic media failure or a data structure corruption on the disk. +. + +MessageId=1359 +Severity=Success +Facility=System +SymbolicName=ERROR_INTERNAL_ERROR +Language=Bulgarian +ERROR_INTERNAL_ERROR - An internal error occurred. +. + +MessageId=1360 +Severity=Success +Facility=System +SymbolicName=ERROR_GENERIC_NOT_MAPPED +Language=Bulgarian +ERROR_GENERIC_NOT_MAPPED - Generic access types were contained in an access mask which should already be mapped to nongeneric types. +. + +MessageId=1361 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_DESCRIPTOR_FORMAT +Language=Bulgarian +ERROR_BAD_DESCRIPTOR_FORMAT - A security descriptor is not in the right format (absolute or self-relative). +. + +MessageId=1362 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_LOGON_PROCESS +Language=Bulgarian +ERROR_NOT_LOGON_PROCESS - The requested action is restricted for use by logon processes only. The calling process has not registered as a logon process. +. + +MessageId=1363 +Severity=Success +Facility=System +SymbolicName=ERROR_LOGON_SESSION_EXISTS +Language=Bulgarian +ERROR_LOGON_SESSION_EXISTS - Cannot start a new logon session with an ID that is already in use. +. + +MessageId=1364 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_SUCH_PACKAGE +Language=Bulgarian +ERROR_NO_SUCH_PACKAGE - A specified authentication package is unknown. +. + +MessageId=1365 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_LOGON_SESSION_STATE +Language=Bulgarian +ERROR_BAD_LOGON_SESSION_STATE - The logon session is not in a state that is consistent with the requested operation. +. + +MessageId=1366 +Severity=Success +Facility=System +SymbolicName=ERROR_LOGON_SESSION_COLLISION +Language=Bulgarian +ERROR_LOGON_SESSION_COLLISION - The logon session ID is already in use. +. + +MessageId=1367 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_LOGON_TYPE +Language=Bulgarian +ERROR_INVALID_LOGON_TYPE - A logon request contained an invalid logon type value. +. + +MessageId=1368 +Severity=Success +Facility=System +SymbolicName=ERROR_CANNOT_IMPERSONATE +Language=Bulgarian +ERROR_CANNOT_IMPERSONATE - Unable to impersonate using a named pipe until data has been read from that pipe. +. + +MessageId=1369 +Severity=Success +Facility=System +SymbolicName=ERROR_RXACT_INVALID_STATE +Language=Bulgarian +ERROR_RXACT_INVALID_STATE - The transaction state of a registry subtree is incompatible with the requested operation. +. + +MessageId=1370 +Severity=Success +Facility=System +SymbolicName=ERROR_RXACT_COMMIT_FAILURE +Language=Bulgarian +ERROR_RXACT_COMMIT_FAILURE - An internal security database corruption has been encountered. +. + +MessageId=1371 +Severity=Success +Facility=System +SymbolicName=ERROR_SPECIAL_ACCOUNT +Language=Bulgarian +ERROR_SPECIAL_ACCOUNT - Cannot perform this operation on built-in accounts. +. + +MessageId=1372 +Severity=Success +Facility=System +SymbolicName=ERROR_SPECIAL_GROUP +Language=Bulgarian +ERROR_SPECIAL_GROUP - Cannot perform this operation on this built-in special group. +. + +MessageId=1373 +Severity=Success +Facility=System +SymbolicName=ERROR_SPECIAL_USER +Language=Bulgarian +ERROR_SPECIAL_USER - Cannot perform this operation on this built-in special user. +. + +MessageId=1374 +Severity=Success +Facility=System +SymbolicName=ERROR_MEMBERS_PRIMARY_GROUP +Language=Bulgarian +ERROR_MEMBERS_PRIMARY_GROUP - The user cannot be removed from a group because the group is currently the user's primary group. +. + +MessageId=1375 +Severity=Success +Facility=System +SymbolicName=ERROR_TOKEN_ALREADY_IN_USE +Language=Bulgarian +ERROR_TOKEN_ALREADY_IN_USE - The token is already in use as a primary token. +. + +MessageId=1376 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_SUCH_ALIAS +Language=Bulgarian +ERROR_NO_SUCH_ALIAS - The specified local group does not exist. +. + +MessageId=1377 +Severity=Success +Facility=System +SymbolicName=ERROR_MEMBER_NOT_IN_ALIAS +Language=Bulgarian +ERROR_MEMBER_NOT_IN_ALIAS - The specified account name is not a member of the local group. +. + +MessageId=1378 +Severity=Success +Facility=System +SymbolicName=ERROR_MEMBER_IN_ALIAS +Language=Bulgarian +ERROR_MEMBER_IN_ALIAS - The specified account name is already a member of the local group. +. + +MessageId=1379 +Severity=Success +Facility=System +SymbolicName=ERROR_ALIAS_EXISTS +Language=Bulgarian +ERROR_ALIAS_EXISTS - The specified local group already exists. +. + +MessageId=1380 +Severity=Success +Facility=System +SymbolicName=ERROR_LOGON_NOT_GRANTED +Language=Bulgarian +ERROR_LOGON_NOT_GRANTED - Logon failure: the user has not been granted the requested logon type at this computer. +. + +MessageId=1381 +Severity=Success +Facility=System +SymbolicName=ERROR_TOO_MANY_SECRETS +Language=Bulgarian +ERROR_TOO_MANY_SECRETS - The maximum number of secrets that may be stored in a single system has been exceeded. +. + +MessageId=1382 +Severity=Success +Facility=System +SymbolicName=ERROR_SECRET_TOO_LONG +Language=Bulgarian +ERROR_SECRET_TOO_LONG - The length of a secret exceeds the maximum length allowed. +. + +MessageId=1383 +Severity=Success +Facility=System +SymbolicName=ERROR_INTERNAL_DB_ERROR +Language=Bulgarian +ERROR_INTERNAL_DB_ERROR - The local security authority database contains an internal inconsistency. +. + +MessageId=1384 +Severity=Success +Facility=System +SymbolicName=ERROR_TOO_MANY_CONTEXT_IDS +Language=Bulgarian +ERROR_TOO_MANY_CONTEXT_IDS - During a logon attempt, the user's security context accumulated too many security IDs. +. + +MessageId=1385 +Severity=Success +Facility=System +SymbolicName=ERROR_LOGON_TYPE_NOT_GRANTED +Language=Bulgarian +ERROR_LOGON_TYPE_NOT_GRANTED - Logon failure: the user has not been granted the requested logon type at this computer. +. + +MessageId=1386 +Severity=Success +Facility=System +SymbolicName=ERROR_NT_CROSS_ENCRYPTION_REQUIRED +Language=Bulgarian +ERROR_NT_CROSS_ENCRYPTION_REQUIRED - A cross-encrypted password is necessary to change a user password. +. + +MessageId=1387 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_SUCH_MEMBER +Language=Bulgarian +ERROR_NO_SUCH_MEMBER - A new member could not be added to or removed from the local group because the member does not exist. +. + +MessageId=1388 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_MEMBER +Language=Bulgarian +ERROR_INVALID_MEMBER - A new member could not be added to a local group because the member has the wrong account type. +. + +MessageId=1389 +Severity=Success +Facility=System +SymbolicName=ERROR_TOO_MANY_SIDS +Language=Bulgarian +ERROR_TOO_MANY_SIDS - Too many security IDs have been specified. +. + +MessageId=1390 +Severity=Success +Facility=System +SymbolicName=ERROR_LM_CROSS_ENCRYPTION_REQUIRED +Language=Bulgarian +ERROR_LM_CROSS_ENCRYPTION_REQUIRED - A cross-encrypted password is necessary to change this user password. +. + +MessageId=1391 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_INHERITANCE +Language=Bulgarian +ERROR_NO_INHERITANCE - Indicates an ACL contains no inheritable components. +. + +MessageId=1392 +Severity=Success +Facility=System +SymbolicName=ERROR_FILE_CORRUPT +Language=Bulgarian +ERROR_FILE_CORRUPT - The file or directory is corrupted and unreadable. +. + +MessageId=1393 +Severity=Success +Facility=System +SymbolicName=ERROR_DISK_CORRUPT +Language=Bulgarian +ERROR_DISK_CORRUPT - The disk structure is corrupted and unreadable. +. + +MessageId=1394 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_USER_SESSION_KEY +Language=Bulgarian +ERROR_NO_USER_SESSION_KEY - There is no user session key for the specified logon session. +. + +MessageId=1395 +Severity=Success +Facility=System +SymbolicName=ERROR_LICENSE_QUOTA_EXCEEDED +Language=Bulgarian +ERROR_LICENSE_QUOTA_EXCEEDED - The service being accessed is licensed for a particular number of connections. No more connections can be made to the service at this time because there are already as many connections as the service can accept. +. + +MessageId=1396 +Severity=Success +Facility=System +SymbolicName=ERROR_WRONG_TARGET_NAME +Language=Bulgarian +ERROR_WRONG_TARGET_NAME - Logon Failure: The target account name is incorrect. +. + +MessageId=1397 +Severity=Success +Facility=System +SymbolicName=ERROR_MUTUAL_AUTH_FAILED +Language=Bulgarian +ERROR_MUTUAL_AUTH_FAILED - Mutual Authentication failed. The server's password is out of date at the domain controller. +. + +MessageId=1398 +Severity=Success +Facility=System +SymbolicName=ERROR_TIME_SKEW +Language=Bulgarian +ERROR_TIME_SKEW - There is a time and/or date difference between the client and server. +. + +MessageId=1399 +Severity=Success +Facility=System +SymbolicName=ERROR_CURRENT_DOMAIN_NOT_ALLOWED +Language=Bulgarian +ERROR_CURRENT_DOMAIN_NOT_ALLOWED - This operation cannot be performed on the current domain. +. + +MessageId=1400 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_WINDOW_HANDLE +Language=Bulgarian +ERROR_INVALID_WINDOW_HANDLE - Invalid window handle. +. + +MessageId=1401 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_MENU_HANDLE +Language=Bulgarian +ERROR_INVALID_MENU_HANDLE - Invalid menu handle. +. + +MessageId=1402 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_CURSOR_HANDLE +Language=Bulgarian +ERROR_INVALID_CURSOR_HANDLE - Invalid cursor handle. +. + +MessageId=1403 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_ACCEL_HANDLE +Language=Bulgarian +ERROR_INVALID_ACCEL_HANDLE - Invalid accelerator table handle. +. + +MessageId=1404 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_HOOK_HANDLE +Language=Bulgarian +ERROR_INVALID_HOOK_HANDLE - Invalid hook handle. +. + +MessageId=1405 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_DWP_HANDLE +Language=Bulgarian +ERROR_INVALID_DWP_HANDLE - Invalid handle to a multiple-window position structure. +. + +MessageId=1406 +Severity=Success +Facility=System +SymbolicName=ERROR_TLW_WITH_WSCHILD +Language=Bulgarian +ERROR_TLW_WITH_WSCHILD - Cannot create a top-level child window. +. + +MessageId=1407 +Severity=Success +Facility=System +SymbolicName=ERROR_CANNOT_FIND_WND_CLASS +Language=Bulgarian +ERROR_CANNOT_FIND_WND_CLASS - Cannot find window class. +. + +MessageId=1408 +Severity=Success +Facility=System +SymbolicName=ERROR_WINDOW_OF_OTHER_THREAD +Language=Bulgarian +ERROR_WINDOW_OF_OTHER_THREAD - Invalid window; it belongs to other thread. +. + +MessageId=1409 +Severity=Success +Facility=System +SymbolicName=ERROR_HOTKEY_ALREADY_REGISTERED +Language=Bulgarian +ERROR_HOTKEY_ALREADY_REGISTERED - Hot key is already registered. +. + +MessageId=1410 +Severity=Success +Facility=System +SymbolicName=ERROR_CLASS_ALREADY_EXISTS +Language=Bulgarian +ERROR_CLASS_ALREADY_EXISTS - Class already exists. +. + +MessageId=1411 +Severity=Success +Facility=System +SymbolicName=ERROR_CLASS_DOES_NOT_EXIST +Language=Bulgarian +ERROR_CLASS_DOES_NOT_EXIST - Class does not exist. +. + +MessageId=1412 +Severity=Success +Facility=System +SymbolicName=ERROR_CLASS_HAS_WINDOWS +Language=Bulgarian +ERROR_CLASS_HAS_WINDOWS - Class still has open windows. +. + +MessageId=1413 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_INDEX +Language=Bulgarian +ERROR_INVALID_INDEX - Invalid index. +. + +MessageId=1414 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_ICON_HANDLE +Language=Bulgarian +ERROR_INVALID_ICON_HANDLE - Invalid icon handle. +. + +MessageId=1415 +Severity=Success +Facility=System +SymbolicName=ERROR_PRIVATE_DIALOG_INDEX +Language=Bulgarian +ERROR_PRIVATE_DIALOG_INDEX - Using private DIALOG window words. +. + +MessageId=1416 +Severity=Success +Facility=System +SymbolicName=ERROR_LISTBOX_ID_NOT_FOUND +Language=Bulgarian +ERROR_LISTBOX_ID_NOT_FOUND - The list box identifier was not found. +. + +MessageId=1417 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_WILDCARD_CHARACTERS +Language=Bulgarian +ERROR_NO_WILDCARD_CHARACTERS - No wildcards were found. +. + +MessageId=1418 +Severity=Success +Facility=System +SymbolicName=ERROR_CLIPBOARD_NOT_OPEN +Language=Bulgarian +ERROR_CLIPBOARD_NOT_OPEN - Thread does not have a clipboard open. +. + +MessageId=1419 +Severity=Success +Facility=System +SymbolicName=ERROR_HOTKEY_NOT_REGISTERED +Language=Bulgarian +ERROR_HOTKEY_NOT_REGISTERED - Hot key is not registered. +. + +MessageId=1420 +Severity=Success +Facility=System +SymbolicName=ERROR_WINDOW_NOT_DIALOG +Language=Bulgarian +ERROR_WINDOW_NOT_DIALOG - The window is not a valid dialog window. +. + +MessageId=1421 +Severity=Success +Facility=System +SymbolicName=ERROR_CONTROL_ID_NOT_FOUND +Language=Bulgarian +ERROR_CONTROL_ID_NOT_FOUND - Control ID not found. +. + +MessageId=1422 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_COMBOBOX_MESSAGE +Language=Bulgarian +ERROR_INVALID_COMBOBOX_MESSAGE - Invalid message for a combo box because it does not have an edit control. +. + +MessageId=1423 +Severity=Success +Facility=System +SymbolicName=ERROR_WINDOW_NOT_COMBOBOX +Language=Bulgarian +ERROR_WINDOW_NOT_COMBOBOX - The window is not a combo box. +. + +MessageId=1424 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_EDIT_HEIGHT +Language=Bulgarian +ERROR_INVALID_EDIT_HEIGHT - Height must be less than 256. +. + +MessageId=1425 +Severity=Success +Facility=System +SymbolicName=ERROR_DC_NOT_FOUND +Language=Bulgarian +ERROR_DC_NOT_FOUND - Invalid device context (DC) handle. +. + +MessageId=1426 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_HOOK_FILTER +Language=Bulgarian +ERROR_INVALID_HOOK_FILTER - Invalid hook procedure type. +. + +MessageId=1427 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_FILTER_PROC +Language=Bulgarian +ERROR_INVALID_FILTER_PROC - Invalid hook procedure. +. + +MessageId=1428 +Severity=Success +Facility=System +SymbolicName=ERROR_HOOK_NEEDS_HMOD +Language=Bulgarian +ERROR_HOOK_NEEDS_HMOD - Cannot set nonlocal hook without a module handle. +. + +MessageId=1429 +Severity=Success +Facility=System +SymbolicName=ERROR_GLOBAL_ONLY_HOOK +Language=Bulgarian +ERROR_GLOBAL_ONLY_HOOK - This hook procedure can only be set globally. +. + +MessageId=1430 +Severity=Success +Facility=System +SymbolicName=ERROR_JOURNAL_HOOK_SET +Language=Bulgarian +ERROR_JOURNAL_HOOK_SET - The journal hook procedure is already installed. +. + +MessageId=1431 +Severity=Success +Facility=System +SymbolicName=ERROR_HOOK_NOT_INSTALLED +Language=Bulgarian +ERROR_HOOK_NOT_INSTALLED - The hook procedure is not installed. +. + +MessageId=1432 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_LB_MESSAGE +Language=Bulgarian +ERROR_INVALID_LB_MESSAGE - Invalid message for single-selection list box. +. + +MessageId=1433 +Severity=Success +Facility=System +SymbolicName=ERROR_SETCOUNT_ON_BAD_LB +Language=Bulgarian +ERROR_SETCOUNT_ON_BAD_LB - LB_SETCOUNT sent to non-lazy list box. +. + +MessageId=1434 +Severity=Success +Facility=System +SymbolicName=ERROR_LB_WITHOUT_TABSTOPS +Language=Bulgarian +ERROR_LB_WITHOUT_TABSTOPS - This list box does not support tab stops. +. + +MessageId=1435 +Severity=Success +Facility=System +SymbolicName=ERROR_DESTROY_OBJECT_OF_OTHER_THREAD +Language=Bulgarian +ERROR_DESTROY_OBJECT_OF_OTHER_THREAD - Cannot destroy object created by another thread. +. + +MessageId=1436 +Severity=Success +Facility=System +SymbolicName=ERROR_CHILD_WINDOW_MENU +Language=Bulgarian +ERROR_CHILD_WINDOW_MENU - Child windows cannot have menus. +. + +MessageId=1437 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_SYSTEM_MENU +Language=Bulgarian +ERROR_NO_SYSTEM_MENU - The window does not have a system menu. +. + +MessageId=1438 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_MSGBOX_STYLE +Language=Bulgarian +ERROR_INVALID_MSGBOX_STYLE - Invalid message box style. +. + +MessageId=1439 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_SPI_VALUE +Language=Bulgarian +ERROR_INVALID_SPI_VALUE - Invalid system-wide (SPI_*) parameter. +. + +MessageId=1440 +Severity=Success +Facility=System +SymbolicName=ERROR_SCREEN_ALREADY_LOCKED +Language=Bulgarian +ERROR_SCREEN_ALREADY_LOCKED - Screen already locked. +. + +MessageId=1441 +Severity=Success +Facility=System +SymbolicName=ERROR_HWNDS_HAVE_DIFF_PARENT +Language=Bulgarian +ERROR_HWNDS_HAVE_DIFF_PARENT - All handles to windows in a multiple-window position structure must have the same parent. +. + +MessageId=1442 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_CHILD_WINDOW +Language=Bulgarian +ERROR_NOT_CHILD_WINDOW - The window is not a child window. +. + +MessageId=1443 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_GW_COMMAND +Language=Bulgarian +ERROR_INVALID_GW_COMMAND - Invalid GW_* command. +. + +MessageId=1444 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_THREAD_ID +Language=Bulgarian +ERROR_INVALID_THREAD_ID - Invalid thread identifier. +. + +MessageId=1445 +Severity=Success +Facility=System +SymbolicName=ERROR_NON_MDICHILD_WINDOW +Language=Bulgarian +ERROR_NON_MDICHILD_WINDOW - Cannot process a message from a window that is not a multiple document interface (MDI) window. +. + +MessageId=1446 +Severity=Success +Facility=System +SymbolicName=ERROR_POPUP_ALREADY_ACTIVE +Language=Bulgarian +ERROR_POPUP_ALREADY_ACTIVE - Popup menu already active. +. + +MessageId=1447 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_SCROLLBARS +Language=Bulgarian +ERROR_NO_SCROLLBARS - The window does not have scroll bars. +. + +MessageId=1448 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_SCROLLBAR_RANGE +Language=Bulgarian +ERROR_INVALID_SCROLLBAR_RANGE - Scroll bar range cannot be greater than MAXLONG. +. + +MessageId=1449 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_SHOWWIN_COMMAND +Language=Bulgarian +ERROR_INVALID_SHOWWIN_COMMAND - Cannot show or remove the window in the way specified. +. + +MessageId=1450 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_SYSTEM_RESOURCES +Language=Bulgarian +ERROR_NO_SYSTEM_RESOURCES - Insufficient system resources exist to complete the requested service. +. + +MessageId=1451 +Severity=Success +Facility=System +SymbolicName=ERROR_NONPAGED_SYSTEM_RESOURCES +Language=Bulgarian +ERROR_NONPAGED_SYSTEM_RESOURCES - Insufficient system resources exist to complete the requested service. +. + +MessageId=1452 +Severity=Success +Facility=System +SymbolicName=ERROR_PAGED_SYSTEM_RESOURCES +Language=Bulgarian +ERROR_PAGED_SYSTEM_RESOURCES - Insufficient system resources exist to complete the requested service. +. + +MessageId=1453 +Severity=Success +Facility=System +SymbolicName=ERROR_WORKING_SET_QUOTA +Language=Bulgarian +ERROR_WORKING_SET_QUOTA - Insufficient quota to complete the requested service. +. + +MessageId=1454 +Severity=Success +Facility=System +SymbolicName=ERROR_PAGEFILE_QUOTA +Language=Bulgarian +ERROR_PAGEFILE_QUOTA - Insufficient quota to complete the requested service. +. + +MessageId=1455 +Severity=Success +Facility=System +SymbolicName=ERROR_COMMITMENT_LIMIT +Language=Bulgarian +ERROR_COMMITMENT_LIMIT - The paging file is too small for this operation to complete. +. + +MessageId=1456 +Severity=Success +Facility=System +SymbolicName=ERROR_MENU_ITEM_NOT_FOUND +Language=Bulgarian +ERROR_MENU_ITEM_NOT_FOUND - A menu item was not found. +. + +MessageId=1457 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_KEYBOARD_HANDLE +Language=Bulgarian +ERROR_INVALID_KEYBOARD_HANDLE - Invalid keyboard layout handle. +. + +MessageId=1458 +Severity=Success +Facility=System +SymbolicName=ERROR_HOOK_TYPE_NOT_ALLOWED +Language=Bulgarian +ERROR_HOOK_TYPE_NOT_ALLOWED - Hook type not allowed. +. + +MessageId=1459 +Severity=Success +Facility=System +SymbolicName=ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION +Language=Bulgarian +ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION - This operation requires an interactive window station. +. + +MessageId=1460 +Severity=Success +Facility=System +SymbolicName=ERROR_TIMEOUT +Language=Bulgarian +ERROR_TIMEOUT - This operation returned because the timeout period expired. +. + +MessageId=1461 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_MONITOR_HANDLE +Language=Bulgarian +ERROR_INVALID_MONITOR_HANDLE - Invalid monitor handle. +. + +MessageId=1500 +Severity=Success +Facility=System +SymbolicName=ERROR_EVENTLOG_FILE_CORRUPT +Language=Bulgarian +ERROR_EVENTLOG_FILE_CORRUPT - The event log file is corrupted. +. + +MessageId=1501 +Severity=Success +Facility=System +SymbolicName=ERROR_EVENTLOG_CANT_START +Language=Bulgarian +ERROR_EVENTLOG_CANT_START - No event log file could be opened, so the event logging service did not start. +. + +MessageId=1502 +Severity=Success +Facility=System +SymbolicName=ERROR_LOG_FILE_FULL +Language=Bulgarian +ERROR_LOG_FILE_FULL - The event log file is full. +. + +MessageId=1503 +Severity=Success +Facility=System +SymbolicName=ERROR_EVENTLOG_FILE_CHANGED +Language=Bulgarian +ERROR_EVENTLOG_FILE_CHANGED - The event log file has changed between read operations. +. + +MessageId=1601 +Severity=Success +Facility=System +SymbolicName=ERROR_INSTALL_SERVICE_FAILURE +Language=Bulgarian +ERROR_INSTALL_SERVICE_FAILURE - The Windows Installer service could not be accessed. This can occur if you are running Windows in safe mode, or if the Windows Installer is not correctly installed. Contact your support personnel for assistance. +. + +MessageId=1602 +Severity=Success +Facility=System +SymbolicName=ERROR_INSTALL_USEREXIT +Language=Bulgarian +ERROR_INSTALL_USEREXIT - User cancelled installation. +. + +MessageId=1603 +Severity=Success +Facility=System +SymbolicName=ERROR_INSTALL_FAILURE +Language=Bulgarian +ERROR_INSTALL_FAILURE - Fatal error during installation. +. + +MessageId=1604 +Severity=Success +Facility=System +SymbolicName=ERROR_INSTALL_SUSPEND +Language=Bulgarian +ERROR_INSTALL_SUSPEND - Installation suspended, incomplete. +. + +MessageId=1605 +Severity=Success +Facility=System +SymbolicName=ERROR_UNKNOWN_PRODUCT +Language=Bulgarian +ERROR_UNKNOWN_PRODUCT - This action is only valid for products that are currently installed. +. + +MessageId=1606 +Severity=Success +Facility=System +SymbolicName=ERROR_UNKNOWN_FEATURE +Language=Bulgarian +ERROR_UNKNOWN_FEATURE - Feature ID not registered. +. + +MessageId=1607 +Severity=Success +Facility=System +SymbolicName=ERROR_UNKNOWN_COMPONENT +Language=Bulgarian +ERROR_UNKNOWN_COMPONENT - Component ID not registered. +. + +MessageId=1608 +Severity=Success +Facility=System +SymbolicName=ERROR_UNKNOWN_PROPERTY +Language=Bulgarian +ERROR_UNKNOWN_PROPERTY - Unknown property. +. + +MessageId=1609 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_HANDLE_STATE +Language=Bulgarian +ERROR_INVALID_HANDLE_STATE - Handle is in an invalid state. +. + +MessageId=1610 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_CONFIGURATION +Language=Bulgarian +ERROR_BAD_CONFIGURATION - The configuration data for this product is corrupt. Contact your support personnel. +. + +MessageId=1611 +Severity=Success +Facility=System +SymbolicName=ERROR_INDEX_ABSENT +Language=Bulgarian +ERROR_INDEX_ABSENT - Component qualifier not present. +. + +MessageId=1612 +Severity=Success +Facility=System +SymbolicName=ERROR_INSTALL_SOURCE_ABSENT +Language=Bulgarian +ERROR_INSTALL_SOURCE_ABSENT - The installation source for this product is not available. Verify that the source exists and that you can access it. +. + +MessageId=1613 +Severity=Success +Facility=System +SymbolicName=ERROR_INSTALL_PACKAGE_VERSION +Language=Bulgarian +ERROR_INSTALL_PACKAGE_VERSION - This installation package cannot be installed by the Windows Installer service. You must install a Windows service pack that contains a newer version of the Windows Installer service. +. + +MessageId=1614 +Severity=Success +Facility=System +SymbolicName=ERROR_PRODUCT_UNINSTALLED +Language=Bulgarian +ERROR_PRODUCT_UNINSTALLED - Product is uninstalled. +. + +MessageId=1615 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_QUERY_SYNTAX +Language=Bulgarian +ERROR_BAD_QUERY_SYNTAX - SQL query syntax invalid or unsupported. +. + +MessageId=1616 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_FIELD +Language=Bulgarian +ERROR_INVALID_FIELD - Record field does not exist. +. + +MessageId=1617 +Severity=Success +Facility=System +SymbolicName=ERROR_DEVICE_REMOVED +Language=Bulgarian +ERROR_DEVICE_REMOVED - The device has been removed. +. + +MessageId=1618 +Severity=Success +Facility=System +SymbolicName=ERROR_INSTALL_ALREADY_RUNNING +Language=Bulgarian +ERROR_INSTALL_ALREADY_RUNNING - Another installation is already in progress. Complete that installation before proceeding with this install. +. + +MessageId=1619 +Severity=Success +Facility=System +SymbolicName=ERROR_INSTALL_PACKAGE_OPEN_FAILED +Language=Bulgarian +ERROR_INSTALL_PACKAGE_OPEN_FAILED - This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package. +. + +MessageId=1620 +Severity=Success +Facility=System +SymbolicName=ERROR_INSTALL_PACKAGE_INVALID +Language=Bulgarian +ERROR_INSTALL_PACKAGE_INVALID - This installation package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer package. +. + +MessageId=1621 +Severity=Success +Facility=System +SymbolicName=ERROR_INSTALL_UI_FAILURE +Language=Bulgarian +ERROR_INSTALL_UI_FAILURE - There was an error starting the Windows Installer service user interface. Contact your support personnel. +. + +MessageId=1622 +Severity=Success +Facility=System +SymbolicName=ERROR_INSTALL_LOG_FAILURE +Language=Bulgarian +ERROR_INSTALL_LOG_FAILURE - Error opening installation log file. Verify that the specified log file location exists and that you can write to it. +. + +MessageId=1623 +Severity=Success +Facility=System +SymbolicName=ERROR_INSTALL_LANGUAGE_UNSUPPORTED +Language=Bulgarian +ERROR_INSTALL_LANGUAGE_UNSUPPORTED - The language of this installation package is not supported by your system. +. + +MessageId=1624 +Severity=Success +Facility=System +SymbolicName=ERROR_INSTALL_TRANSFORM_FAILURE +Language=Bulgarian +ERROR_INSTALL_TRANSFORM_FAILURE - Error applying transforms. Verify that the specified transform paths are valid. +. + +MessageId=1625 +Severity=Success +Facility=System +SymbolicName=ERROR_INSTALL_PACKAGE_REJECTED +Language=Bulgarian +ERROR_INSTALL_PACKAGE_REJECTED - This installation is forbidden by system policy. Contact your system administrator. +. + +MessageId=1626 +Severity=Success +Facility=System +SymbolicName=ERROR_FUNCTION_NOT_CALLED +Language=Bulgarian +ERROR_FUNCTION_NOT_CALLED - Function could not be executed. +. + +MessageId=1627 +Severity=Success +Facility=System +SymbolicName=ERROR_FUNCTION_FAILED +Language=Bulgarian +ERROR_FUNCTION_FAILED - Function failed during execution. +. + +MessageId=1628 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_TABLE +Language=Bulgarian +ERROR_INVALID_TABLE - Invalid or unknown table specified. +. + +MessageId=1629 +Severity=Success +Facility=System +SymbolicName=ERROR_DATATYPE_MISMATCH +Language=Bulgarian +ERROR_DATATYPE_MISMATCH - Data supplied is of wrong type. +. + +MessageId=1630 +Severity=Success +Facility=System +SymbolicName=ERROR_UNSUPPORTED_TYPE +Language=Bulgarian +ERROR_UNSUPPORTED_TYPE - Data of this type is not supported. +. + +MessageId=1631 +Severity=Success +Facility=System +SymbolicName=ERROR_CREATE_FAILED +Language=Bulgarian +ERROR_CREATE_FAILED - The Windows Installer service failed to start. Contact your support personnel. +. + +MessageId=1632 +Severity=Success +Facility=System +SymbolicName=ERROR_INSTALL_TEMP_UNWRITABLE +Language=Bulgarian +ERROR_INSTALL_TEMP_UNWRITABLE - The Temp folder is on a drive that is full or inaccessible. Free up space on the drive or verify that you have write permission on the Temp folder. +. + +MessageId=1633 +Severity=Success +Facility=System +SymbolicName=ERROR_INSTALL_PLATFORM_UNSUPPORTED +Language=Bulgarian +ERROR_INSTALL_PLATFORM_UNSUPPORTED - This installation package is not supported by this processor type. Contact your product vendor. +. + +MessageId=1634 +Severity=Success +Facility=System +SymbolicName=ERROR_INSTALL_NOTUSED +Language=Bulgarian +ERROR_INSTALL_NOTUSED - Component not used on this computer. +. + +MessageId=1635 +Severity=Success +Facility=System +SymbolicName=ERROR_PATCH_PACKAGE_OPEN_FAILED +Language=Bulgarian +ERROR_PATCH_PACKAGE_OPEN_FAILED - This patch package could not be opened. Verify that the patch package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer patch package. +. + +MessageId=1636 +Severity=Success +Facility=System +SymbolicName=ERROR_PATCH_PACKAGE_INVALID +Language=Bulgarian +ERROR_PATCH_PACKAGE_INVALID - This patch package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer patch package. +. + +MessageId=1637 +Severity=Success +Facility=System +SymbolicName=ERROR_PATCH_PACKAGE_UNSUPPORTED +Language=Bulgarian +ERROR_PATCH_PACKAGE_UNSUPPORTED - This patch package cannot be processed by the Windows Installer service. You must install a Windows service pack that contains a newer version of the Windows Installer service. +. + +MessageId=1638 +Severity=Success +Facility=System +SymbolicName=ERROR_PRODUCT_VERSION +Language=Bulgarian +ERROR_PRODUCT_VERSION - Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel. +. + +MessageId=1639 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_COMMAND_LINE +Language=Bulgarian +ERROR_INVALID_COMMAND_LINE - Invalid command line argument. Consult the Windows Installer SDK for detailed command line help. +. + +MessageId=1640 +Severity=Success +Facility=System +SymbolicName=ERROR_INSTALL_REMOTE_DISALLOWED +Language=Bulgarian +ERROR_INSTALL_REMOTE_DISALLOWED - Only administrators have permission to add, remove, or configure server software during a Terminal Services remote session. If you want to install or configure software on the server, contact your network administrator. +. + +MessageId=1641 +Severity=Success +Facility=System +SymbolicName=ERROR_SUCCESS_REBOOT_INITIATED +Language=Bulgarian +ERROR_SUCCESS_REBOOT_INITIATED - The requested operation completed successfully. The system will be restarted so the changes can take effect. +. + +MessageId=1642 +Severity=Success +Facility=System +SymbolicName=ERROR_PATCH_TARGET_NOT_FOUND +Language=Bulgarian +ERROR_PATCH_TARGET_NOT_FOUND - The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade patch. +. + +MessageId=1643 +Severity=Success +Facility=System +SymbolicName=ERROR_PATCH_PACKAGE_REJECTED +Language=Bulgarian +ERROR_PATCH_PACKAGE_REJECTED - The patch package is not permitted by software restriction policy. +. + +MessageId=1644 +Severity=Success +Facility=System +SymbolicName=ERROR_INSTALL_TRANSFORM_REJECTED +Language=Bulgarian +ERROR_INSTALL_TRANSFORM_REJECTED - One or more customizations are not permitted by software restriction policy. +. + +MessageId=1645 +Severity=Success +Facility=System +SymbolicName=ERROR_INSTALL_REMOTE_PROHIBITED +Language=Bulgarian +ERROR_INSTALL_REMOTE_PROHIBITED - The Windows Installer does not permit installation from a Remote Desktop Connection. +. + +MessageId=1700 +Severity=Success +Facility=System +SymbolicName=RPC_S_INVALID_STRING_BINDING +Language=Bulgarian +RPC_S_INVALID_STRING_BINDING - The string binding is invalid. +. + +MessageId=1701 +Severity=Success +Facility=System +SymbolicName=RPC_S_WRONG_KIND_OF_BINDING +Language=Bulgarian +RPC_S_WRONG_KIND_OF_BINDING - The binding handle is not the correct type. +. + +MessageId=1702 +Severity=Success +Facility=System +SymbolicName=RPC_S_INVALID_BINDING +Language=Bulgarian +RPC_S_INVALID_BINDING - The binding handle is invalid. +. + +MessageId=1703 +Severity=Success +Facility=System +SymbolicName=RPC_S_PROTSEQ_NOT_SUPPORTED +Language=Bulgarian +RPC_S_PROTSEQ_NOT_SUPPORTED - The RPC protocol sequence is not supported. +. + +MessageId=1704 +Severity=Success +Facility=System +SymbolicName=RPC_S_INVALID_RPC_PROTSEQ +Language=Bulgarian +RPC_S_INVALID_RPC_PROTSEQ - The RPC protocol sequence is invalid. +. + +MessageId=1705 +Severity=Success +Facility=System +SymbolicName=RPC_S_INVALID_STRING_UUID +Language=Bulgarian +RPC_S_INVALID_STRING_UUID - The string universal unique identifier (UUID) is invalid. +. + +MessageId=1706 +Severity=Success +Facility=System +SymbolicName=RPC_S_INVALID_ENDPOINT_FORMAT +Language=Bulgarian +RPC_S_INVALID_ENDPOINT_FORMAT - The endpoint format is invalid. +. + +MessageId=1707 +Severity=Success +Facility=System +SymbolicName=RPC_S_INVALID_NET_ADDR +Language=Bulgarian +RPC_S_INVALID_NET_ADDR - The network address is invalid. +. + +MessageId=1708 +Severity=Success +Facility=System +SymbolicName=RPC_S_NO_ENDPOINT_FOUND +Language=Bulgarian +RPC_S_NO_ENDPOINT_FOUND - No endpoint was found. +. + +MessageId=1709 +Severity=Success +Facility=System +SymbolicName=RPC_S_INVALID_TIMEOUT +Language=Bulgarian +RPC_S_INVALID_TIMEOUT - The timeout value is invalid. +. + +MessageId=1710 +Severity=Success +Facility=System +SymbolicName=RPC_S_OBJECT_NOT_FOUND +Language=Bulgarian +RPC_S_OBJECT_NOT_FOUND - The object universal unique identifier (UUID) was not found. +. + +MessageId=1711 +Severity=Success +Facility=System +SymbolicName=RPC_S_ALREADY_REGISTERED +Language=Bulgarian +RPC_S_ALREADY_REGISTERED - The object universal unique identifier (UUID) has already been registered. +. + +MessageId=1712 +Severity=Success +Facility=System +SymbolicName=RPC_S_TYPE_ALREADY_REGISTERED +Language=Bulgarian +RPC_S_TYPE_ALREADY_REGISTERED - The type universal unique identifier (UUID) has already been registered. +. + +MessageId=1713 +Severity=Success +Facility=System +SymbolicName=RPC_S_ALREADY_LISTENING +Language=Bulgarian +RPC_S_ALREADY_LISTENING - The RPC server is already listening. +. + +MessageId=1714 +Severity=Success +Facility=System +SymbolicName=RPC_S_NO_PROTSEQS_REGISTERED +Language=Bulgarian +RPC_S_NO_PROTSEQS_REGISTERED - No protocol sequences have been registered. +. + +MessageId=1715 +Severity=Success +Facility=System +SymbolicName=RPC_S_NOT_LISTENING +Language=Bulgarian +RPC_S_NOT_LISTENING - The RPC server is not listening. +. + +MessageId=1716 +Severity=Success +Facility=System +SymbolicName=RPC_S_UNKNOWN_MGR_TYPE +Language=Bulgarian +RPC_S_UNKNOWN_MGR_TYPE - The manager type is unknown. +. + +MessageId=1717 +Severity=Success +Facility=System +SymbolicName=RPC_S_UNKNOWN_IF +Language=Bulgarian +RPC_S_UNKNOWN_IF - The interface is unknown. +. + +MessageId=1718 +Severity=Success +Facility=System +SymbolicName=RPC_S_NO_BINDINGS +Language=Bulgarian +RPC_S_NO_BINDINGS - There are no bindings. +. + +MessageId=1719 +Severity=Success +Facility=System +SymbolicName=RPC_S_NO_PROTSEQS +Language=Bulgarian +RPC_S_NO_PROTSEQS - There are no protocol sequences. +. + +MessageId=1720 +Severity=Success +Facility=System +SymbolicName=RPC_S_CANT_CREATE_ENDPOINT +Language=Bulgarian +RPC_S_CANT_CREATE_ENDPOINT - The endpoint cannot be created. +. + +MessageId=1721 +Severity=Success +Facility=System +SymbolicName=RPC_S_OUT_OF_RESOURCES +Language=Bulgarian +RPC_S_OUT_OF_RESOURCES - Not enough resources are available to complete this operation. +. + +MessageId=1722 +Severity=Success +Facility=System +SymbolicName=RPC_S_SERVER_UNAVAILABLE +Language=Bulgarian +RPC_S_SERVER_UNAVAILABLE - The RPC server is unavailable. +. + +MessageId=1723 +Severity=Success +Facility=System +SymbolicName=RPC_S_SERVER_TOO_BUSY +Language=Bulgarian +RPC_S_SERVER_TOO_BUSY - The RPC server is too busy to complete this operation. +. + +MessageId=1724 +Severity=Success +Facility=System +SymbolicName=RPC_S_INVALID_NETWORK_OPTIONS +Language=Bulgarian +RPC_S_INVALID_NETWORK_OPTIONS - The network options are invalid. +. + +MessageId=1725 +Severity=Success +Facility=System +SymbolicName=RPC_S_NO_CALL_ACTIVE +Language=Bulgarian +RPC_S_NO_CALL_ACTIVE - There are no remote procedure calls active on this thread. +. + +MessageId=1726 +Severity=Success +Facility=System +SymbolicName=RPC_S_CALL_FAILED +Language=Bulgarian +RPC_S_CALL_FAILED - The remote procedure call failed. +. + +MessageId=1727 +Severity=Success +Facility=System +SymbolicName=RPC_S_CALL_FAILED_DNE +Language=Bulgarian +RPC_S_CALL_FAILED_DNE - The remote procedure call failed and did not execute. +. + +MessageId=1728 +Severity=Success +Facility=System +SymbolicName=RPC_S_PROTOCOL_ERROR +Language=Bulgarian +RPC_S_PROTOCOL_ERROR - A remote procedure call (RPC) protocol error occurred. +. + +MessageId=1730 +Severity=Success +Facility=System +SymbolicName=RPC_S_UNSUPPORTED_TRANS_SYN +Language=Bulgarian +RPC_S_UNSUPPORTED_TRANS_SYN - The transfer syntax is not supported by the RPC server. +. + +MessageId=1732 +Severity=Success +Facility=System +SymbolicName=RPC_S_UNSUPPORTED_TYPE +Language=Bulgarian +RPC_S_UNSUPPORTED_TYPE - The universal unique identifier (UUID) type is not supported. +. + +MessageId=1733 +Severity=Success +Facility=System +SymbolicName=RPC_S_INVALID_TAG +Language=Bulgarian +RPC_S_INVALID_TAG - The tag is invalid. +. + +MessageId=1734 +Severity=Success +Facility=System +SymbolicName=RPC_S_INVALID_BOUND +Language=Bulgarian +RPC_S_INVALID_BOUND - The array bounds are invalid. +. + +MessageId=1735 +Severity=Success +Facility=System +SymbolicName=RPC_S_NO_ENTRY_NAME +Language=Bulgarian +RPC_S_NO_ENTRY_NAME - The binding does not contain an entry name. +. + +MessageId=1736 +Severity=Success +Facility=System +SymbolicName=RPC_S_INVALID_NAME_SYNTAX +Language=Bulgarian +RPC_S_INVALID_NAME_SYNTAX - The name syntax is invalid. +. + +MessageId=1737 +Severity=Success +Facility=System +SymbolicName=RPC_S_UNSUPPORTED_NAME_SYNTAX +Language=Bulgarian +RPC_S_UNSUPPORTED_NAME_SYNTAX - The name syntax is not supported. +. + +MessageId=1739 +Severity=Success +Facility=System +SymbolicName=RPC_S_UUID_NO_ADDRESS +Language=Bulgarian +RPC_S_UUID_NO_ADDRESS - No network address is available to use to construct a universal unique identifier (UUID). +. + +MessageId=1740 +Severity=Success +Facility=System +SymbolicName=RPC_S_DUPLICATE_ENDPOINT +Language=Bulgarian +RPC_S_DUPLICATE_ENDPOINT - The endpoint is a duplicate. +. + +MessageId=1741 +Severity=Success +Facility=System +SymbolicName=RPC_S_UNKNOWN_AUTHN_TYPE +Language=Bulgarian +RPC_S_UNKNOWN_AUTHN_TYPE - The authentication type is unknown. +. + +MessageId=1742 +Severity=Success +Facility=System +SymbolicName=RPC_S_MAX_CALLS_TOO_SMALL +Language=Bulgarian +RPC_S_MAX_CALLS_TOO_SMALL - The maximum number of calls is too small. +. + +MessageId=1743 +Severity=Success +Facility=System +SymbolicName=RPC_S_STRING_TOO_LONG +Language=Bulgarian +RPC_S_STRING_TOO_LONG - The string is too long. +. + +MessageId=1744 +Severity=Success +Facility=System +SymbolicName=RPC_S_PROTSEQ_NOT_FOUND +Language=Bulgarian +RPC_S_PROTSEQ_NOT_FOUND - The RPC protocol sequence was not found. +. + +MessageId=1745 +Severity=Success +Facility=System +SymbolicName=RPC_S_PROCNUM_OUT_OF_RANGE +Language=Bulgarian +RPC_S_PROCNUM_OUT_OF_RANGE - The procedure number is out of range. +. + +MessageId=1746 +Severity=Success +Facility=System +SymbolicName=RPC_S_BINDING_HAS_NO_AUTH +Language=Bulgarian +RPC_S_BINDING_HAS_NO_AUTH - The binding does not contain any authentication information. +. + +MessageId=1747 +Severity=Success +Facility=System +SymbolicName=RPC_S_UNKNOWN_AUTHN_SERVICE +Language=Bulgarian +RPC_S_UNKNOWN_AUTHN_SERVICE - The authentication service is unknown. +. + +MessageId=1748 +Severity=Success +Facility=System +SymbolicName=RPC_S_UNKNOWN_AUTHN_LEVEL +Language=Bulgarian +RPC_S_UNKNOWN_AUTHN_LEVEL - The authentication level is unknown. +. + +MessageId=1749 +Severity=Success +Facility=System +SymbolicName=RPC_S_INVALID_AUTH_IDENTITY +Language=Bulgarian +RPC_S_INVALID_AUTH_IDENTITY - The security context is invalid. +. + +MessageId=1750 +Severity=Success +Facility=System +SymbolicName=RPC_S_UNKNOWN_AUTHZ_SERVICE +Language=Bulgarian +RPC_S_UNKNOWN_AUTHZ_SERVICE - The authorization service is unknown. +. + +MessageId=1751 +Severity=Success +Facility=System +SymbolicName=EPT_S_INVALID_ENTRY +Language=Bulgarian +EPT_S_INVALID_ENTRY - The entry is invalid. +. + +MessageId=1752 +Severity=Success +Facility=System +SymbolicName=EPT_S_CANT_PERFORM_OP +Language=Bulgarian +EPT_S_CANT_PERFORM_OP - The server endpoint cannot perform the operation. +. + +MessageId=1753 +Severity=Success +Facility=System +SymbolicName=EPT_S_NOT_REGISTERED +Language=Bulgarian +EPT_S_NOT_REGISTERED - There are no more endpoints available from the endpoint mapper. +. + +MessageId=1754 +Severity=Success +Facility=System +SymbolicName=RPC_S_NOTHING_TO_EXPORT +Language=Bulgarian +RPC_S_NOTHING_TO_EXPORT - No interfaces have been exported. +. + +MessageId=1755 +Severity=Success +Facility=System +SymbolicName=RPC_S_INCOMPLETE_NAME +Language=Bulgarian +RPC_S_INCOMPLETE_NAME - The entry name is incomplete. +. + +MessageId=1756 +Severity=Success +Facility=System +SymbolicName=RPC_S_INVALID_VERS_OPTION +Language=Bulgarian +RPC_S_INVALID_VERS_OPTION - The version option is invalid. +. + +MessageId=1757 +Severity=Success +Facility=System +SymbolicName=RPC_S_NO_MORE_MEMBERS +Language=Bulgarian +RPC_S_NO_MORE_MEMBERS - There are no more members. +. + +MessageId=1758 +Severity=Success +Facility=System +SymbolicName=RPC_S_NOT_ALL_OBJS_UNEXPORTED +Language=Bulgarian +RPC_S_NOT_ALL_OBJS_UNEXPORTED - There is nothing to unexport. +. + +MessageId=1759 +Severity=Success +Facility=System +SymbolicName=RPC_S_INTERFACE_NOT_FOUND +Language=Bulgarian +RPC_S_INTERFACE_NOT_FOUND - The interface was not found. +. + +MessageId=1760 +Severity=Success +Facility=System +SymbolicName=RPC_S_ENTRY_ALREADY_EXISTS +Language=Bulgarian +RPC_S_ENTRY_ALREADY_EXISTS - The entry already exists. +. + +MessageId=1761 +Severity=Success +Facility=System +SymbolicName=RPC_S_ENTRY_NOT_FOUND +Language=Bulgarian +RPC_S_ENTRY_NOT_FOUND - The entry is not found. +. + +MessageId=1762 +Severity=Success +Facility=System +SymbolicName=RPC_S_NAME_SERVICE_UNAVAILABLE +Language=Bulgarian +RPC_S_NAME_SERVICE_UNAVAILABLE - The name service is unavailable. +. + +MessageId=1763 +Severity=Success +Facility=System +SymbolicName=RPC_S_INVALID_NAF_ID +Language=Bulgarian +RPC_S_INVALID_NAF_ID - The network address family is invalid. +. + +MessageId=1764 +Severity=Success +Facility=System +SymbolicName=RPC_S_CANNOT_SUPPORT +Language=Bulgarian +RPC_S_CANNOT_SUPPORT - The requested operation is not supported. +. + +MessageId=1765 +Severity=Success +Facility=System +SymbolicName=RPC_S_NO_CONTEXT_AVAILABLE +Language=Bulgarian +RPC_S_NO_CONTEXT_AVAILABLE - No security context is available to allow impersonation. +. + +MessageId=1766 +Severity=Success +Facility=System +SymbolicName=RPC_S_INTERNAL_ERROR +Language=Bulgarian +RPC_S_INTERNAL_ERROR - An internal error occurred in a remote procedure call (RPC). +. + +MessageId=1767 +Severity=Success +Facility=System +SymbolicName=RPC_S_ZERO_DIVIDE +Language=Bulgarian +RPC_S_ZERO_DIVIDE - The RPC server attempted an integer division by zero. +. + +MessageId=1768 +Severity=Success +Facility=System +SymbolicName=RPC_S_ADDRESS_ERROR +Language=Bulgarian +RPC_S_ADDRESS_ERROR - An addressing error occurred in the RPC server. +. + +MessageId=1769 +Severity=Success +Facility=System +SymbolicName=RPC_S_FP_DIV_ZERO +Language=Bulgarian +RPC_S_FP_DIV_ZERO - A floating-point operation at the RPC server caused a division by zero. +. + +MessageId=1770 +Severity=Success +Facility=System +SymbolicName=RPC_S_FP_UNDERFLOW +Language=Bulgarian +RPC_S_FP_UNDERFLOW - A floating-point underflow occurred at the RPC server. +. + +MessageId=1771 +Severity=Success +Facility=System +SymbolicName=RPC_S_FP_OVERFLOW +Language=Bulgarian +RPC_S_FP_OVERFLOW - A floating-point overflow occurred at the RPC server. +. + +MessageId=1772 +Severity=Success +Facility=System +SymbolicName=RPC_X_NO_MORE_ENTRIES +Language=Bulgarian +RPC_X_NO_MORE_ENTRIES - The list of RPC servers available for the binding of auto handles has been exhausted. +. + +MessageId=1773 +Severity=Success +Facility=System +SymbolicName=RPC_X_SS_CHAR_TRANS_OPEN_FAIL +Language=Bulgarian +RPC_X_SS_CHAR_TRANS_OPEN_FAIL - Unable to open the character translation table file. +. + +MessageId=1774 +Severity=Success +Facility=System +SymbolicName=RPC_X_SS_CHAR_TRANS_SHORT_FILE +Language=Bulgarian +RPC_X_SS_CHAR_TRANS_SHORT_FILE - The file containing the character translation table has fewer than 512 bytes. +. + +MessageId=1775 +Severity=Success +Facility=System +SymbolicName=RPC_X_SS_IN_NULL_CONTEXT +Language=Bulgarian +RPC_X_SS_IN_NULL_CONTEXT - A null context handle was passed from the client to the host during a remote procedure call. +. + +MessageId=1777 +Severity=Success +Facility=System +SymbolicName=RPC_X_SS_CONTEXT_DAMAGED +Language=Bulgarian +RPC_X_SS_CONTEXT_DAMAGED - The context handle changed during a remote procedure call. +. + +MessageId=1778 +Severity=Success +Facility=System +SymbolicName=RPC_X_SS_HANDLES_MISMATCH +Language=Bulgarian +RPC_X_SS_HANDLES_MISMATCH - The binding handles passed to a remote procedure call do not match. +. + +MessageId=1779 +Severity=Success +Facility=System +SymbolicName=RPC_X_SS_CANNOT_GET_CALL_HANDLE +Language=Bulgarian +RPC_X_SS_CANNOT_GET_CALL_HANDLE - The stub is unable to get the remote procedure call handle. +. + +MessageId=1780 +Severity=Success +Facility=System +SymbolicName=RPC_X_NULL_REF_POINTER +Language=Bulgarian +RPC_X_NULL_REF_POINTER - A null reference pointer was passed to the stub. +. + +MessageId=1781 +Severity=Success +Facility=System +SymbolicName=RPC_X_ENUM_VALUE_OUT_OF_RANGE +Language=Bulgarian +RPC_X_ENUM_VALUE_OUT_OF_RANGE - The enumeration value is out of range. +. + +MessageId=1782 +Severity=Success +Facility=System +SymbolicName=RPC_X_BYTE_COUNT_TOO_SMALL +Language=Bulgarian +RPC_X_BYTE_COUNT_TOO_SMALL - The byte count is too small. +. + +MessageId=1783 +Severity=Success +Facility=System +SymbolicName=RPC_X_BAD_STUB_DATA +Language=Bulgarian +RPC_X_BAD_STUB_DATA - The stub received bad data. +. + +MessageId=1784 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_USER_BUFFER +Language=Bulgarian +ERROR_INVALID_USER_BUFFER - The supplied user buffer is not valid for the requested operation. +. + +MessageId=1785 +Severity=Success +Facility=System +SymbolicName=ERROR_UNRECOGNIZED_MEDIA +Language=Bulgarian +ERROR_UNRECOGNIZED_MEDIA - The disk media is not recognized. It may not be formatted. +. + +MessageId=1786 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_TRUST_LSA_SECRET +Language=Bulgarian +ERROR_NO_TRUST_LSA_SECRET - The workstation does not have a trust secret. +. + +MessageId=1787 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_TRUST_SAM_ACCOUNT +Language=Bulgarian +ERROR_NO_TRUST_SAM_ACCOUNT - The security database on the server does not have a computer account for this workstation trust relationship. +. + +MessageId=1788 +Severity=Success +Facility=System +SymbolicName=ERROR_TRUSTED_DOMAIN_FAILURE +Language=Bulgarian +ERROR_TRUSTED_DOMAIN_FAILURE - The trust relationship between the primary domain and the trusted domain failed. +. + +MessageId=1789 +Severity=Success +Facility=System +SymbolicName=ERROR_TRUSTED_RELATIONSHIP_FAILURE +Language=Bulgarian +ERROR_TRUSTED_RELATIONSHIP_FAILURE - The trust relationship between this workstation and the primary domain failed. +. + +MessageId=1790 +Severity=Success +Facility=System +SymbolicName=ERROR_TRUST_FAILURE +Language=Bulgarian +ERROR_TRUST_FAILURE - The network logon failed. +. + +MessageId=1791 +Severity=Success +Facility=System +SymbolicName=RPC_S_CALL_IN_PROGRESS +Language=Bulgarian +RPC_S_CALL_IN_PROGRESS - A remote procedure call is already in progress for this thread. +. + +MessageId=1792 +Severity=Success +Facility=System +SymbolicName=ERROR_NETLOGON_NOT_STARTED +Language=Bulgarian +ERROR_NETLOGON_NOT_STARTED - An attempt was made to logon, but the network logon service was not started. +. + +MessageId=1793 +Severity=Success +Facility=System +SymbolicName=ERROR_ACCOUNT_EXPIRED +Language=Bulgarian +ERROR_ACCOUNT_EXPIRED - The user's account has expired. +. + +MessageId=1794 +Severity=Success +Facility=System +SymbolicName=ERROR_REDIRECTOR_HAS_OPEN_HANDLES +Language=Bulgarian +ERROR_REDIRECTOR_HAS_OPEN_HANDLES - The redirector is in use and cannot be unloaded. +. + +MessageId=1795 +Severity=Success +Facility=System +SymbolicName=ERROR_PRINTER_DRIVER_ALREADY_INSTALLED +Language=Bulgarian +ERROR_PRINTER_DRIVER_ALREADY_INSTALLED - The specified printer driver is already installed. +. + +MessageId=1796 +Severity=Success +Facility=System +SymbolicName=ERROR_UNKNOWN_PORT +Language=Bulgarian +ERROR_UNKNOWN_PORT - The specified port is unknown. +. + +MessageId=1797 +Severity=Success +Facility=System +SymbolicName=ERROR_UNKNOWN_PRINTER_DRIVER +Language=Bulgarian +ERROR_UNKNOWN_PRINTER_DRIVER - The printer driver is unknown. +. + +MessageId=1798 +Severity=Success +Facility=System +SymbolicName=ERROR_UNKNOWN_PRINTPROCESSOR +Language=Bulgarian +ERROR_UNKNOWN_PRINTPROCESSOR - The print processor is unknown. +. + +MessageId=1799 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_SEPARATOR_FILE +Language=Bulgarian +ERROR_INVALID_SEPARATOR_FILE - The specified separator file is invalid. +. + +MessageId=1800 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_PRIORITY +Language=Bulgarian +ERROR_INVALID_PRIORITY - The specified priority is invalid. +. + +MessageId=1801 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_PRINTER_NAME +Language=Bulgarian +ERROR_INVALID_PRINTER_NAME - The printer name is invalid. +. + +MessageId=1802 +Severity=Success +Facility=System +SymbolicName=ERROR_PRINTER_ALREADY_EXISTS +Language=Bulgarian +ERROR_PRINTER_ALREADY_EXISTS - The printer already exists. +. + +MessageId=1803 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_PRINTER_COMMAND +Language=Bulgarian +ERROR_INVALID_PRINTER_COMMAND - The printer command is invalid. +. + +MessageId=1804 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_DATATYPE +Language=Bulgarian +ERROR_INVALID_DATATYPE - The specified datatype is invalid. +. + +MessageId=1805 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_ENVIRONMENT +Language=Bulgarian +ERROR_INVALID_ENVIRONMENT - The environment specified is invalid. +. + +MessageId=1806 +Severity=Success +Facility=System +SymbolicName=RPC_S_NO_MORE_BINDINGS +Language=Bulgarian +RPC_S_NO_MORE_BINDINGS - There are no more bindings. +. + +MessageId=1807 +Severity=Success +Facility=System +SymbolicName=ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT +Language=Bulgarian +ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT - The account used is an interdomain trust account. Use your global user account or local user account to access this server. +. + +MessageId=1808 +Severity=Success +Facility=System +SymbolicName=ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT +Language=Bulgarian +ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT - The account used is a computer account. Use your global user account or local user account to access this server. +. + +MessageId=1809 +Severity=Success +Facility=System +SymbolicName=ERROR_NOLOGON_SERVER_TRUST_ACCOUNT +Language=Bulgarian +ERROR_NOLOGON_SERVER_TRUST_ACCOUNT - The account used is a server trust account. Use your global user account or local user account to access this server. +. + +MessageId=1810 +Severity=Success +Facility=System +SymbolicName=ERROR_DOMAIN_TRUST_INCONSISTENT +Language=Bulgarian +ERROR_DOMAIN_TRUST_INCONSISTENT - The name or security ID (SID) of the domain specified is inconsistent with the trust information for that domain. +. + +MessageId=1811 +Severity=Success +Facility=System +SymbolicName=ERROR_SERVER_HAS_OPEN_HANDLES +Language=Bulgarian +ERROR_SERVER_HAS_OPEN_HANDLES - The server is in use and cannot be unloaded. +. + +MessageId=1812 +Severity=Success +Facility=System +SymbolicName=ERROR_RESOURCE_DATA_NOT_FOUND +Language=Bulgarian +ERROR_RESOURCE_DATA_NOT_FOUND - The specified image file did not contain a resource section. +. + +MessageId=1813 +Severity=Success +Facility=System +SymbolicName=ERROR_RESOURCE_TYPE_NOT_FOUND +Language=Bulgarian +ERROR_RESOURCE_TYPE_NOT_FOUND - The specified resource type cannot be found in the image file. +. + +MessageId=1814 +Severity=Success +Facility=System +SymbolicName=ERROR_RESOURCE_NAME_NOT_FOUND +Language=Bulgarian +ERROR_RESOURCE_NAME_NOT_FOUND - The specified resource name cannot be found in the image file. +. + +MessageId=1815 +Severity=Success +Facility=System +SymbolicName=ERROR_RESOURCE_LANG_NOT_FOUND +Language=Bulgarian +ERROR_RESOURCE_LANG_NOT_FOUND - The specified resource language ID cannot be found in the image file. +. + +MessageId=1816 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_ENOUGH_QUOTA +Language=Bulgarian +ERROR_NOT_ENOUGH_QUOTA - Not enough quota is available to process this command. +. + +MessageId=1817 +Severity=Success +Facility=System +SymbolicName=RPC_S_NO_INTERFACES +Language=Bulgarian +RPC_S_NO_INTERFACES - No interfaces have been registered. +. + +MessageId=1818 +Severity=Success +Facility=System +SymbolicName=RPC_S_CALL_CANCELLED +Language=Bulgarian +RPC_S_CALL_CANCELLED - The remote procedure call was cancelled. +. + +MessageId=1819 +Severity=Success +Facility=System +SymbolicName=RPC_S_BINDING_INCOMPLETE +Language=Bulgarian +RPC_S_BINDING_INCOMPLETE - The binding handle does not contain all required information. +. + +MessageId=1820 +Severity=Success +Facility=System +SymbolicName=RPC_S_COMM_FAILURE +Language=Bulgarian +RPC_S_COMM_FAILURE - A communications failure occurred during a remote procedure call. +. + +MessageId=1821 +Severity=Success +Facility=System +SymbolicName=RPC_S_UNSUPPORTED_AUTHN_LEVEL +Language=Bulgarian +RPC_S_UNSUPPORTED_AUTHN_LEVEL - The requested authentication level is not supported. +. + +MessageId=1822 +Severity=Success +Facility=System +SymbolicName=RPC_S_NO_PRINC_NAME +Language=Bulgarian +RPC_S_NO_PRINC_NAME - No principal name registered. +. + +MessageId=1823 +Severity=Success +Facility=System +SymbolicName=RPC_S_NOT_RPC_ERROR +Language=Bulgarian +RPC_S_NOT_RPC_ERROR - The error specified is not a valid Windows RPC error code. +. + +MessageId=1824 +Severity=Success +Facility=System +SymbolicName=RPC_S_UUID_LOCAL_ONLY +Language=Bulgarian +RPC_S_UUID_LOCAL_ONLY - A UUID that is valid only on this computer has been allocated. +. + +MessageId=1825 +Severity=Success +Facility=System +SymbolicName=RPC_S_SEC_PKG_ERROR +Language=Bulgarian +RPC_S_SEC_PKG_ERROR - A security package specific error occurred. +. + +MessageId=1826 +Severity=Success +Facility=System +SymbolicName=RPC_S_NOT_CANCELLED +Language=Bulgarian +RPC_S_NOT_CANCELLED - Thread is not canceled. +. + +MessageId=1827 +Severity=Success +Facility=System +SymbolicName=RPC_X_INVALID_ES_ACTION +Language=Bulgarian +RPC_X_INVALID_ES_ACTION - Invalid operation on the encoding/decoding handle. +. + +MessageId=1828 +Severity=Success +Facility=System +SymbolicName=RPC_X_WRONG_ES_VERSION +Language=Bulgarian +RPC_X_WRONG_ES_VERSION - Incompatible version of the serializing package. +. + +MessageId=1829 +Severity=Success +Facility=System +SymbolicName=RPC_X_WRONG_STUB_VERSION +Language=Bulgarian +RPC_X_WRONG_STUB_VERSION - Incompatible version of the RPC stub. +. + +MessageId=1830 +Severity=Success +Facility=System +SymbolicName=RPC_X_INVALID_PIPE_OBJECT +Language=Bulgarian +RPC_X_INVALID_PIPE_OBJECT - The RPC pipe object is invalid or corrupted. +. + +MessageId=1831 +Severity=Success +Facility=System +SymbolicName=RPC_X_WRONG_PIPE_ORDER +Language=Bulgarian +RPC_X_WRONG_PIPE_ORDER - An invalid operation was attempted on an RPC pipe object. +. + +MessageId=1832 +Severity=Success +Facility=System +SymbolicName=RPC_X_WRONG_PIPE_VERSION +Language=Bulgarian +RPC_X_WRONG_PIPE_VERSION - Unsupported RPC pipe version. +. + +MessageId=1898 +Severity=Success +Facility=System +SymbolicName=RPC_S_GROUP_MEMBER_NOT_FOUND +Language=Bulgarian +RPC_S_GROUP_MEMBER_NOT_FOUND - The group member was not found. +. + +MessageId=1899 +Severity=Success +Facility=System +SymbolicName=EPT_S_CANT_CREATE +Language=Bulgarian +EPT_S_CANT_CREATE - The endpoint mapper database entry could not be created. +. + +MessageId=1900 +Severity=Success +Facility=System +SymbolicName=RPC_S_INVALID_OBJECT +Language=Bulgarian +RPC_S_INVALID_OBJECT - The object universal unique identifier (UUID) is the nil UUID. +. + +MessageId=1901 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_TIME +Language=Bulgarian +ERROR_INVALID_TIME - The specified time is invalid. +. + +MessageId=1902 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_FORM_NAME +Language=Bulgarian +ERROR_INVALID_FORM_NAME - The specified form name is invalid. +. + +MessageId=1903 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_FORM_SIZE +Language=Bulgarian +ERROR_INVALID_FORM_SIZE - The specified form size is invalid. +. + +MessageId=1904 +Severity=Success +Facility=System +SymbolicName=ERROR_ALREADY_WAITING +Language=Bulgarian +ERROR_ALREADY_WAITING - The specified printer handle is already being waited on +. + +MessageId=1905 +Severity=Success +Facility=System +SymbolicName=ERROR_PRINTER_DELETED +Language=Bulgarian +ERROR_PRINTER_DELETED - The specified printer has been deleted. +. + +MessageId=1906 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_PRINTER_STATE +Language=Bulgarian +ERROR_INVALID_PRINTER_STATE - The state of the printer is invalid. +. + +MessageId=1907 +Severity=Success +Facility=System +SymbolicName=ERROR_PASSWORD_MUST_CHANGE +Language=Bulgarian +ERROR_PASSWORD_MUST_CHANGE - The user's password must be changed before logging on the first time. +. + +MessageId=1908 +Severity=Success +Facility=System +SymbolicName=ERROR_DOMAIN_CONTROLLER_NOT_FOUND +Language=Bulgarian +ERROR_DOMAIN_CONTROLLER_NOT_FOUND - Could not find the domain controller for this domain. +. + +MessageId=1909 +Severity=Success +Facility=System +SymbolicName=ERROR_ACCOUNT_LOCKED_OUT +Language=Bulgarian +ERROR_ACCOUNT_LOCKED_OUT - The referenced account is currently locked out and may not be used to log on. +. + +MessageId=1910 +Severity=Success +Facility=System +SymbolicName=OR_INVALID_OXID +Language=Bulgarian +OR_INVALID_OXID - The object exporter specified was not found. +. + +MessageId=1911 +Severity=Success +Facility=System +SymbolicName=OR_INVALID_OID +Language=Bulgarian +OR_INVALID_OID - The object specified was not found. +. + +MessageId=1912 +Severity=Success +Facility=System +SymbolicName=OR_INVALID_SET +Language=Bulgarian +OR_INVALID_SET - The object resolver set specified was not found. +. + +MessageId=1913 +Severity=Success +Facility=System +SymbolicName=RPC_S_SEND_INCOMPLETE +Language=Bulgarian +RPC_S_SEND_INCOMPLETE - Some data remains to be sent in the request buffer. +. + +MessageId=1914 +Severity=Success +Facility=System +SymbolicName=RPC_S_INVALID_ASYNC_HANDLE +Language=Bulgarian +RPC_S_INVALID_ASYNC_HANDLE - Invalid asynchronous remote procedure call handle. +. + +MessageId=1915 +Severity=Success +Facility=System +SymbolicName=RPC_S_INVALID_ASYNC_CALL +Language=Bulgarian +RPC_S_INVALID_ASYNC_CALL - Invalid asynchronous RPC call handle for this operation. +. + +MessageId=1916 +Severity=Success +Facility=System +SymbolicName=RPC_X_PIPE_CLOSED +Language=Bulgarian +RPC_X_PIPE_CLOSED - The RPC pipe object has already been closed. +. + +MessageId=1917 +Severity=Success +Facility=System +SymbolicName=RPC_X_PIPE_DISCIPLINE_ERROR +Language=Bulgarian +RPC_X_PIPE_DISCIPLINE_ERROR - The RPC call completed before all pipes were processed. +. + +MessageId=1918 +Severity=Success +Facility=System +SymbolicName=RPC_X_PIPE_EMPTY +Language=Bulgarian +RPC_X_PIPE_EMPTY - No more data is available from the RPC pipe. +. + +MessageId=1919 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_SITENAME +Language=Bulgarian +ERROR_NO_SITENAME - No site name is available for this machine. +. + +MessageId=1920 +Severity=Success +Facility=System +SymbolicName=ERROR_CANT_ACCESS_FILE +Language=Bulgarian +ERROR_CANT_ACCESS_FILE - The file cannot be accessed by the system. +. + +MessageId=1921 +Severity=Success +Facility=System +SymbolicName=ERROR_CANT_RESOLVE_FILENAME +Language=Bulgarian +ERROR_CANT_RESOLVE_FILENAME - The name of the file cannot be resolved by the system. +. + +MessageId=1922 +Severity=Success +Facility=System +SymbolicName=RPC_S_ENTRY_TYPE_MISMATCH +Language=Bulgarian +RPC_S_ENTRY_TYPE_MISMATCH - The entry is not of the expected type. +. + +MessageId=1923 +Severity=Success +Facility=System +SymbolicName=RPC_S_NOT_ALL_OBJS_EXPORTED +Language=Bulgarian +RPC_S_NOT_ALL_OBJS_EXPORTED - Not all object UUIDs could be exported to the specified entry. +. + +MessageId=1924 +Severity=Success +Facility=System +SymbolicName=RPC_S_INTERFACE_NOT_EXPORTED +Language=Bulgarian +RPC_S_INTERFACE_NOT_EXPORTED - Interface could not be exported to the specified entry. +. + +MessageId=1925 +Severity=Success +Facility=System +SymbolicName=RPC_S_PROFILE_NOT_ADDED +Language=Bulgarian +RPC_S_PROFILE_NOT_ADDED - The specified profile entry could not be added. +. + +MessageId=1926 +Severity=Success +Facility=System +SymbolicName=RPC_S_PRF_ELT_NOT_ADDED +Language=Bulgarian +RPC_S_PRF_ELT_NOT_ADDED - The specified profile element could not be added. +. + +MessageId=1927 +Severity=Success +Facility=System +SymbolicName=RPC_S_PRF_ELT_NOT_REMOVED +Language=Bulgarian +RPC_S_PRF_ELT_NOT_REMOVED - The specified profile element could not be removed. +. + +MessageId=1928 +Severity=Success +Facility=System +SymbolicName=RPC_S_GRP_ELT_NOT_ADDED +Language=Bulgarian +RPC_S_GRP_ELT_NOT_ADDED - The group element could not be added. +. + +MessageId=1929 +Severity=Success +Facility=System +SymbolicName=RPC_S_GRP_ELT_NOT_REMOVED +Language=Bulgarian +RPC_S_GRP_ELT_NOT_REMOVED - The group element could not be removed. +. + +MessageId=1930 +Severity=Success +Facility=System +SymbolicName=ERROR_KM_DRIVER_BLOCKED +Language=Bulgarian +ERROR_KM_DRIVER_BLOCKED - The printer driver is not compatible with a policy enabled on your computer that blocks NT 4.0 drivers. +. + +MessageId=1931 +Severity=Success +Facility=System +SymbolicName=ERROR_CONTEXT_EXPIRED +Language=Bulgarian +ERROR_CONTEXT_EXPIRED - The context has expired and can no longer be used. +. + +MessageId=1932 +Severity=Success +Facility=System +SymbolicName=ERROR_PER_USER_TRUST_QUOTA_EXCEEDED +Language=Bulgarian +ERROR_PER_USER_TRUST_QUOTA_EXCEEDED - The current user's delegated trust creation quota has been exceeded. +. + +MessageId=1933 +Severity=Success +Facility=System +SymbolicName=ERROR_ALL_USER_TRUST_QUOTA_EXCEEDED +Language=Bulgarian +ERROR_ALL_USER_TRUST_QUOTA_EXCEEDED - The total delegated trust creation quota has been exceeded. +. + +MessageId=1934 +Severity=Success +Facility=System +SymbolicName=ERROR_USER_DELETE_TRUST_QUOTA_EXCEEDED +Language=Bulgarian +ERROR_USER_DELETE_TRUST_QUOTA_EXCEEDED - The current user's delegated trust deletion quota has been exceeded. +. + +MessageId=2000 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_PIXEL_FORMAT +Language=Bulgarian +ERROR_INVALID_PIXEL_FORMAT - The pixel format is invalid. +. + +MessageId=2001 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_DRIVER +Language=Bulgarian +ERROR_BAD_DRIVER - The specified driver is invalid. +. + +MessageId=2002 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_WINDOW_STYLE +Language=Bulgarian +ERROR_INVALID_WINDOW_STYLE - The window style or class attribute is invalid for this operation. +. + +MessageId=2003 +Severity=Success +Facility=System +SymbolicName=ERROR_METAFILE_NOT_SUPPORTED +Language=Bulgarian +ERROR_METAFILE_NOT_SUPPORTED - The requested metafile operation is not supported. +. + +MessageId=2004 +Severity=Success +Facility=System +SymbolicName=ERROR_TRANSFORM_NOT_SUPPORTED +Language=Bulgarian +ERROR_TRANSFORM_NOT_SUPPORTED - The requested transformation operation is not supported. +. + +MessageId=2005 +Severity=Success +Facility=System +SymbolicName=ERROR_CLIPPING_NOT_SUPPORTED +Language=Bulgarian +ERROR_CLIPPING_NOT_SUPPORTED - The requested clipping operation is not supported. +. + +MessageId=2010 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_CMM +Language=Bulgarian +ERROR_INVALID_CMM - The specified color management module is invalid. +. + +MessageId=2011 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_PROFILE +Language=Bulgarian +ERROR_INVALID_PROFILE - The specified color profile is invalid. +. + +MessageId=2012 +Severity=Success +Facility=System +SymbolicName=ERROR_TAG_NOT_FOUND +Language=Bulgarian +ERROR_TAG_NOT_FOUND - The specified tag was not found. +. + +MessageId=2013 +Severity=Success +Facility=System +SymbolicName=ERROR_TAG_NOT_PRESENT +Language=Bulgarian +ERROR_TAG_NOT_PRESENT - A required tag is not present. +. + +MessageId=2014 +Severity=Success +Facility=System +SymbolicName=ERROR_DUPLICATE_TAG +Language=Bulgarian +ERROR_DUPLICATE_TAG - The specified tag is already present. +. + +MessageId=2015 +Severity=Success +Facility=System +SymbolicName=ERROR_PROFILE_NOT_ASSOCIATED_WITH_DEVICE +Language=Bulgarian +ERROR_PROFILE_NOT_ASSOCIATED_WITH_DEVICE - The specified color profile is not associated with any device. +. + +MessageId=2016 +Severity=Success +Facility=System +SymbolicName=ERROR_PROFILE_NOT_FOUND +Language=Bulgarian +ERROR_PROFILE_NOT_FOUND - The specified color profile was not found. +. + +MessageId=2017 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_COLORSPACE +Language=Bulgarian +ERROR_INVALID_COLORSPACE - The specified color space is invalid. +. + +MessageId=2018 +Severity=Success +Facility=System +SymbolicName=ERROR_ICM_NOT_ENABLED +Language=Bulgarian +ERROR_ICM_NOT_ENABLED - Image Color Management is not enabled. +. + +MessageId=2019 +Severity=Success +Facility=System +SymbolicName=ERROR_DELETING_ICM_XFORM +Language=Bulgarian +ERROR_DELETING_ICM_XFORM - There was an error while deleting the color transform. +. + +MessageId=2020 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_TRANSFORM +Language=Bulgarian +ERROR_INVALID_TRANSFORM - The specified color transform is invalid. +. + +MessageId=2021 +Severity=Success +Facility=System +SymbolicName=ERROR_COLORSPACE_MISMATCH +Language=Bulgarian +ERROR_COLORSPACE_MISMATCH - The specified transform does not match the bitmap's color space. +. + +MessageId=2022 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_COLORINDEX +Language=Bulgarian +ERROR_INVALID_COLORINDEX - The specified named color index is not present in the profile. +. + +MessageId=2108 +Severity=Success +Facility=System +SymbolicName=ERROR_CONNECTED_OTHER_PASSWORD +Language=Bulgarian +ERROR_CONNECTED_OTHER_PASSWORD - The network connection was made successfully, but the user had to be prompted for a password other than the one originally specified. +. + +MessageId=2109 +Severity=Success +Facility=System +SymbolicName=ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT +Language=Bulgarian +ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT - The network connection was made successfully using default credentials. +. + +MessageId=2202 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_USERNAME +Language=Bulgarian +ERROR_BAD_USERNAME - The specified username is invalid. +. + +MessageId=2250 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_CONNECTED +Language=Bulgarian +ERROR_NOT_CONNECTED - This network connection does not exist. +. + +MessageId=2401 +Severity=Success +Facility=System +SymbolicName=ERROR_OPEN_FILES +Language=Bulgarian +ERROR_OPEN_FILES - This network connection has files open or requests pending. +. + +MessageId=2402 +Severity=Success +Facility=System +SymbolicName=ERROR_ACTIVE_CONNECTIONS +Language=Bulgarian +ERROR_ACTIVE_CONNECTIONS - Active connections still exist. +. + +MessageId=2404 +Severity=Success +Facility=System +SymbolicName=ERROR_DEVICE_IN_USE +Language=Bulgarian +ERROR_DEVICE_IN_USE - The device is in use by an active process and cannot be disconnected. +. + +MessageId=3000 +Severity=Success +Facility=System +SymbolicName=ERROR_UNKNOWN_PRINT_MONITOR +Language=Bulgarian +ERROR_UNKNOWN_PRINT_MONITOR - The specified print monitor is unknown. +. + +MessageId=3001 +Severity=Success +Facility=System +SymbolicName=ERROR_PRINTER_DRIVER_IN_USE +Language=Bulgarian +ERROR_PRINTER_DRIVER_IN_USE - The specified printer driver is currently in use. +. + +MessageId=3002 +Severity=Success +Facility=System +SymbolicName=ERROR_SPOOL_FILE_NOT_FOUND +Language=Bulgarian +ERROR_SPOOL_FILE_NOT_FOUND - The spool file was not found. +. + +MessageId=3003 +Severity=Success +Facility=System +SymbolicName=ERROR_SPL_NO_STARTDOC +Language=Bulgarian +ERROR_SPL_NO_STARTDOC - A StartDocPrinter call was not issued. +. + +MessageId=3004 +Severity=Success +Facility=System +SymbolicName=ERROR_SPL_NO_ADDJOB +Language=Bulgarian +ERROR_SPL_NO_ADDJOB - An AddJob call was not issued. +. + +MessageId=3005 +Severity=Success +Facility=System +SymbolicName=ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED +Language=Bulgarian +ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED - The specified print processor has already been installed. +. + +MessageId=3006 +Severity=Success +Facility=System +SymbolicName=ERROR_PRINT_MONITOR_ALREADY_INSTALLED +Language=Bulgarian +ERROR_PRINT_MONITOR_ALREADY_INSTALLED - The specified print monitor has already been installed. +. + +MessageId=3007 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_PRINT_MONITOR +Language=Bulgarian +ERROR_INVALID_PRINT_MONITOR - The specified print monitor does not have the required functions. +. + +MessageId=3008 +Severity=Success +Facility=System +SymbolicName=ERROR_PRINT_MONITOR_IN_USE +Language=Bulgarian +ERROR_PRINT_MONITOR_IN_USE - The specified print monitor is currently in use. +. + +MessageId=3009 +Severity=Success +Facility=System +SymbolicName=ERROR_PRINTER_HAS_JOBS_QUEUED +Language=Bulgarian +ERROR_PRINTER_HAS_JOBS_QUEUED - The requested operation is not allowed when there are jobs queued to the printer. +. + +MessageId=3010 +Severity=Success +Facility=System +SymbolicName=ERROR_SUCCESS_REBOOT_REQUIRED +Language=Bulgarian +ERROR_SUCCESS_REBOOT_REQUIRED - The requested operation is successful. Changes will not be effective until the system is rebooted. +. + +MessageId=3011 +Severity=Success +Facility=System +SymbolicName=ERROR_SUCCESS_RESTART_REQUIRED +Language=Bulgarian +ERROR_SUCCESS_RESTART_REQUIRED - The requested operation is successful. Changes will not be effective until the service is restarted. +. + +MessageId=3012 +Severity=Success +Facility=System +SymbolicName=ERROR_PRINTER_NOT_FOUND +Language=Bulgarian +ERROR_PRINTER_NOT_FOUND - No printers were found. +. + +MessageId=3013 +Severity=Success +Facility=System +SymbolicName=ERROR_PRINTER_DRIVER_WARNED +Language=Bulgarian +ERROR_PRINTER_DRIVER_WARNED - The printer driver is known to be unreliable. +. + +MessageId=3014 +Severity=Success +Facility=System +SymbolicName=ERROR_PRINTER_DRIVER_BLOCKED +Language=Bulgarian +ERROR_PRINTER_DRIVER_BLOCKED - The printer driver is known to harm the system. +. + +MessageId=3100 +Severity=Success +Facility=System +SymbolicName=ERROR_XML_UNDEFINED_ENTITY +Language=Bulgarian +ERROR_XML_UNDEFINED_ENTITY - The XML contains an entity reference to an undefined entity. +. + +MessageId=3101 +Severity=Success +Facility=System +SymbolicName=ERROR_XML_MALFORMED_ENTITY +Language=Bulgarian +ERROR_XML_MALFORMED_ENTITY - The XML contains a malformed entity reference. +. + +MessageId=3102 +Severity=Success +Facility=System +SymbolicName=ERROR_XML_CHAR_NOT_IN_RANGE +Language=Bulgarian +ERROR_XML_CHAR_NOT_IN_RANGE - The XML contains a character which is not permitted in XML. +. + +MessageId=3200 +Severity=Success +Facility=System +SymbolicName=ERROR_PCM_COMPILER_DUPLICATE_EXTERNAL_PROXY +Language=Bulgarian +ERROR_PCM_COMPILER_DUPLICATE_EXTERNAL_PROXY - The manifest contained a duplicate definition for external proxy stub %1 at (%1:%2,%3) +. + +MessageId=3201 +Severity=Success +Facility=System +SymbolicName=ERROR_PCM_COMPILER_DUPLICATE_ASSEMBLY_REFERENCE +Language=Bulgarian +ERROR_PCM_COMPILER_DUPLICATE_ASSEMBLY_REFERENCE - The manifest already contains a reference to %4 - a second reference was found at (%1:%2,%3) +. + +MessageId=3202 +Severity=Success +Facility=System +SymbolicName=ERROR_PCM_COMPILER_INVALID_ASSEMBLY_REFERENCE +Language=Bulgarian +ERROR_PCM_COMPILER_INVALID_ASSEMBLY_REFERENCE - The assembly reference at (%1:%2,%3) is invalid. +. + +MessageId=3203 +Severity=Success +Facility=System +SymbolicName=ERROR_PCM_COMPILER_INVALID_ASSEMBLY_DEFINITION +Language=Bulgarian +ERROR_PCM_COMPILER_INVALID_ASSEMBLY_DEFINITION - The assembly definition at (%1:%2,%3) is invalid. +. + +MessageId=3204 +Severity=Success +Facility=System +SymbolicName=ERROR_PCM_COMPILER_DUPLICATE_WINDOW_CLASS +Language=Bulgarian +ERROR_PCM_COMPILER_DUPLICATE_WINDOW_CLASS - The manifest already contained the window class %4, found a second declaration at (%1:%2,%3) +. + +MessageId=3205 +Severity=Success +Facility=System +SymbolicName=ERROR_PCM_COMPILER_DUPLICATE_PROGID +Language=Bulgarian +ERROR_PCM_COMPILER_DUPLICATE_PROGID - The manifest already declared the progId %4, found a second declaration at (%1:%2,%3) +. + +MessageId=3206 +Severity=Success +Facility=System +SymbolicName=ERROR_PCM_COMPILER_DUPLICATE_NOINHERIT +Language=Bulgarian +ERROR_PCM_COMPILER_DUPLICATE_NOINHERIT - Only one noInherit tag may be present in a manifest, found a second tag at (%1:%2,%3) +. + +MessageId=3207 +Severity=Success +Facility=System +SymbolicName=ERROR_PCM_COMPILER_DUPLICATE_NOINHERITABLE +Language=Bulgarian +ERROR_PCM_COMPILER_DUPLICATE_NOINHERITABLE - Only one noInheritable tag may be present in a manifest, found a second tag at (%1:%2,%3) +. + +MessageId=3208 +Severity=Success +Facility=System +SymbolicName=ERROR_PCM_COMPILER_DUPLICATE_COM_CLASS +Language=Bulgarian +ERROR_PCM_COMPILER_DUPLICATE_COM_CLASS - The manifest contained a duplicate declaration of COM class %4 at (%1:%2,%3) +. + +MessageId=3209 +Severity=Success +Facility=System +SymbolicName=ERROR_PCM_COMPILER_DUPLICATE_FILE_NAME +Language=Bulgarian +ERROR_PCM_COMPILER_DUPLICATE_FILE_NAME - The manifest already declared the file %4, a second definition was found at (%1:%2,%3) +. + +MessageId=3210 +Severity=Success +Facility=System +SymbolicName=ERROR_PCM_COMPILER_DUPLICATE_CLR_SURROGATE +Language=Bulgarian +ERROR_PCM_COMPILER_DUPLICATE_CLR_SURROGATE - CLR surrogate %1 was already defined, second definition at (%1:%2,%3) is invalid. +. + +MessageId=3211 +Severity=Success +Facility=System +SymbolicName=ERROR_PCM_COMPILER_DUPLICATE_TYPE_LIBRARY +Language=Bulgarian +ERROR_PCM_COMPILER_DUPLICATE_TYPE_LIBRARY - Type library %1 was already defined, second definition at (%1:%2,%3) is invalid. +. + +MessageId=3212 +Severity=Success +Facility=System +SymbolicName=ERROR_PCM_COMPILER_DUPLICATE_PROXY_STUB +Language=Bulgarian +ERROR_PCM_COMPILER_DUPLICATE_PROXY_STUB - Proxy stub definition %1 was already defined, second definition at (%1:%2,%3) is invalid. +. + +MessageId=3213 +Severity=Success +Facility=System +SymbolicName=ERROR_PCM_COMPILER_DUPLICATE_CATEGORY_NAME +Language=Bulgarian +ERROR_PCM_COMPILER_DUPLICATE_CATEGORY_NAME - Category friendly name %4 was already used, second definition was found at (%1:%2,%3) is invalid. +. + +MessageId=3214 +Severity=Success +Facility=System +SymbolicName=ERROR_PCM_COMPILER_DUPLICATE_TOP_LEVEL_IDENTITY_FOUND +Language=Bulgarian +ERROR_PCM_COMPILER_DUPLICATE_TOP_LEVEL_IDENTITY_FOUND - Only one top-level assemblyIdentity tag may be present in a manifest. A second tag with identity %4 was found at (%1:%2,%3) +. + +MessageId=3215 +Severity=Success +Facility=System +SymbolicName=ERROR_PCM_COMPILER_UNKNOWN_ROOT_ELEMENT +Language=Bulgarian +ERROR_PCM_COMPILER_UNKNOWN_ROOT_ELEMENT - The root element for a manifest found at (%1:%2,%3) was not expected or was of the wrong version. +. + +MessageId=3216 +Severity=Success +Facility=System +SymbolicName=ERROR_PCM_COMPILER_INVALID_ELEMENT +Language=Bulgarian +ERROR_PCM_COMPILER_INVALID_ELEMENT - The element found at (%1:%2,%3) was not expected according to the manifest schema. +. + +MessageId=3217 +Severity=Success +Facility=System +SymbolicName=ERROR_PCM_COMPILER_MISSING_REQUIRED_ATTRIBUTE +Language=Bulgarian +ERROR_PCM_COMPILER_MISSING_REQUIRED_ATTRIBUTE - The element found at (%1:%2,%3) was missing the required attribute '%4'. See the manifest schema for more information +. + +MessageId=3218 +Severity=Success +Facility=System +SymbolicName=ERROR_PCM_COMPILER_INVALID_ATTRIBUTE_VALUE +Language=Bulgarian +ERROR_PCM_COMPILER_INVALID_ATTRIBUTE_VALUE - The attribute value %4 at (%1:%2,%3) was invalid according to the schema. +. + +MessageId=3219 +Severity=Success +Facility=System +SymbolicName=ERROR_PCM_COMPILER_UNEXPECTED_PCDATA +Language=Bulgarian +ERROR_PCM_COMPILER_UNEXPECTED_PCDATA - PCDATA or CDATA found at (%1:%2,%3) in the source document was not expected in the parent element %4. +. + +MessageId=3220 +Severity=Success +Facility=System +SymbolicName=ERROR_PCM_DUPLICATE_STRING_TABLE_ENT +Language=Bulgarian +ERROR_PCM_DUPLICATE_STRING_TABLE_ENT - The string table entry with culture %4, name %5, and value '%6' at (%1:%2,%3) duplicated a previous entry. +. + +MessageId=4000 +Severity=Success +Facility=System +SymbolicName=ERROR_WINS_INTERNAL +Language=Bulgarian +ERROR_WINS_INTERNAL - WINS encountered an error while processing the command. +. + +MessageId=4001 +Severity=Success +Facility=System +SymbolicName=ERROR_CAN_NOT_DEL_LOCAL_WINS +Language=Bulgarian +ERROR_CAN_NOT_DEL_LOCAL_WINS - The local WINS cannot be deleted. +. + +MessageId=4002 +Severity=Success +Facility=System +SymbolicName=ERROR_STATIC_INIT +Language=Bulgarian +ERROR_STATIC_INIT - The importation from the file failed. +. + +MessageId=4003 +Severity=Success +Facility=System +SymbolicName=ERROR_INC_BACKUP +Language=Bulgarian +ERROR_INC_BACKUP - The backup failed. Was a full backup done before? +. + +MessageId=4004 +Severity=Success +Facility=System +SymbolicName=ERROR_FULL_BACKUP +Language=Bulgarian +ERROR_FULL_BACKUP - The backup failed. Check the directory to which you are backing the database. +. + +MessageId=4005 +Severity=Success +Facility=System +SymbolicName=ERROR_REC_NON_EXISTENT +Language=Bulgarian +ERROR_REC_NON_EXISTENT - The name does not exist in the WINS database. +. + +MessageId=4006 +Severity=Success +Facility=System +SymbolicName=ERROR_RPL_NOT_ALLOWED +Language=Bulgarian +ERROR_RPL_NOT_ALLOWED - Replication with a nonconfigured partner is not allowed. +. + +MessageId=4100 +Severity=Success +Facility=System +SymbolicName=ERROR_DHCP_ADDRESS_CONFLICT +Language=Bulgarian +ERROR_DHCP_ADDRESS_CONFLICT - The DHCP client has obtained an IP address that is already in use on the network. The local interface will be disabled until the DHCP client can obtain a new address. +. + +MessageId=4200 +Severity=Success +Facility=System +SymbolicName=ERROR_WMI_GUID_NOT_FOUND +Language=Bulgarian +ERROR_WMI_GUID_NOT_FOUND - The GUID passed was not recognized as valid by a WMI data provider. +. + +MessageId=4201 +Severity=Success +Facility=System +SymbolicName=ERROR_WMI_INSTANCE_NOT_FOUND +Language=Bulgarian +ERROR_WMI_INSTANCE_NOT_FOUND - The instance name passed was not recognized as valid by a WMI data provider. +. + +MessageId=4202 +Severity=Success +Facility=System +SymbolicName=ERROR_WMI_ITEMID_NOT_FOUND +Language=Bulgarian +ERROR_WMI_ITEMID_NOT_FOUND - The data item ID passed was not recognized as valid by a WMI data provider. +. + +MessageId=4203 +Severity=Success +Facility=System +SymbolicName=ERROR_WMI_TRY_AGAIN +Language=Bulgarian +ERROR_WMI_TRY_AGAIN - The WMI request could not be completed and should be retried. +. + +MessageId=4204 +Severity=Success +Facility=System +SymbolicName=ERROR_WMI_DP_NOT_FOUND +Language=Bulgarian +ERROR_WMI_DP_NOT_FOUND - The WMI data provider could not be located. +. + +MessageId=4205 +Severity=Success +Facility=System +SymbolicName=ERROR_WMI_UNRESOLVED_INSTANCE_REF +Language=Bulgarian +ERROR_WMI_UNRESOLVED_INSTANCE_REF - The WMI data provider references an instance set that has not been registered. +. + +MessageId=4206 +Severity=Success +Facility=System +SymbolicName=ERROR_WMI_ALREADY_ENABLED +Language=Bulgarian +ERROR_WMI_ALREADY_ENABLED - The WMI data block or event notification has already been enabled. +. + +MessageId=4207 +Severity=Success +Facility=System +SymbolicName=ERROR_WMI_GUID_DISCONNECTED +Language=Bulgarian +ERROR_WMI_GUID_DISCONNECTED - The WMI data block is no longer available. +. + +MessageId=4208 +Severity=Success +Facility=System +SymbolicName=ERROR_WMI_SERVER_UNAVAILABLE +Language=Bulgarian +ERROR_WMI_SERVER_UNAVAILABLE - The WMI data service is not available. +. + +MessageId=4209 +Severity=Success +Facility=System +SymbolicName=ERROR_WMI_DP_FAILED +Language=Bulgarian +ERROR_WMI_DP_FAILED - The WMI data provider failed to carry out the request. +. + +MessageId=4210 +Severity=Success +Facility=System +SymbolicName=ERROR_WMI_INVALID_MOF +Language=Bulgarian +ERROR_WMI_INVALID_MOF - The WMI MOF information is not valid. +. + +MessageId=4211 +Severity=Success +Facility=System +SymbolicName=ERROR_WMI_INVALID_REGINFO +Language=Bulgarian +ERROR_WMI_INVALID_REGINFO - The WMI registration information is not valid. +. + +MessageId=4212 +Severity=Success +Facility=System +SymbolicName=ERROR_WMI_ALREADY_DISABLED +Language=Bulgarian +ERROR_WMI_ALREADY_DISABLED - The WMI data block or event notification has already been disabled. +. + +MessageId=4213 +Severity=Success +Facility=System +SymbolicName=ERROR_WMI_READ_ONLY +Language=Bulgarian +ERROR_WMI_READ_ONLY - The WMI data item or data block is read only. +. + +MessageId=4214 +Severity=Success +Facility=System +SymbolicName=ERROR_WMI_SET_FAILURE +Language=Bulgarian +ERROR_WMI_SET_FAILURE - The WMI data item or data block could not be changed. +. + +MessageId=4300 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_MEDIA +Language=Bulgarian +ERROR_INVALID_MEDIA - The media identifier does not represent a valid medium. +. + +MessageId=4301 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_LIBRARY +Language=Bulgarian +ERROR_INVALID_LIBRARY - The library identifier does not represent a valid library. +. + +MessageId=4302 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_MEDIA_POOL +Language=Bulgarian +ERROR_INVALID_MEDIA_POOL - The media pool identifier does not represent a valid media pool. +. + +MessageId=4303 +Severity=Success +Facility=System +SymbolicName=ERROR_DRIVE_MEDIA_MISMATCH +Language=Bulgarian +ERROR_DRIVE_MEDIA_MISMATCH - The drive and medium are not compatible or exist in different libraries. +. + +MessageId=4304 +Severity=Success +Facility=System +SymbolicName=ERROR_MEDIA_OFFLINE +Language=Bulgarian +ERROR_MEDIA_OFFLINE - The medium currently exists in an offline library and must be online to perform this operation. +. + +MessageId=4305 +Severity=Success +Facility=System +SymbolicName=ERROR_LIBRARY_OFFLINE +Language=Bulgarian +ERROR_LIBRARY_OFFLINE - The operation cannot be performed on an offline library. +. + +MessageId=4306 +Severity=Success +Facility=System +SymbolicName=ERROR_EMPTY +Language=Bulgarian +ERROR_EMPTY - The library, drive, or media pool is empty. +. + +MessageId=4307 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_EMPTY +Language=Bulgarian +ERROR_NOT_EMPTY - The library, drive, or media pool must be empty to perform this operation. +. + +MessageId=4308 +Severity=Success +Facility=System +SymbolicName=ERROR_MEDIA_UNAVAILABLE +Language=Bulgarian +ERROR_MEDIA_UNAVAILABLE - No media is currently available in this media pool or library. +. + +MessageId=4309 +Severity=Success +Facility=System +SymbolicName=ERROR_RESOURCE_DISABLED +Language=Bulgarian +ERROR_RESOURCE_DISABLED - A resource required for this operation is disabled. +. + +MessageId=4310 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_CLEANER +Language=Bulgarian +ERROR_INVALID_CLEANER - The media identifier does not represent a valid cleaner. +. + +MessageId=4311 +Severity=Success +Facility=System +SymbolicName=ERROR_UNABLE_TO_CLEAN +Language=Bulgarian +ERROR_UNABLE_TO_CLEAN - The drive cannot be cleaned or does not support cleaning. +. + +MessageId=4312 +Severity=Success +Facility=System +SymbolicName=ERROR_OBJECT_NOT_FOUND +Language=Bulgarian +ERROR_OBJECT_NOT_FOUND - The object identifier does not represent a valid object. +. + +MessageId=4313 +Severity=Success +Facility=System +SymbolicName=ERROR_DATABASE_FAILURE +Language=Bulgarian +ERROR_DATABASE_FAILURE - Unable to read from or write to the database. +. + +MessageId=4314 +Severity=Success +Facility=System +SymbolicName=ERROR_DATABASE_FULL +Language=Bulgarian +ERROR_DATABASE_FULL - The database is full. +. + +MessageId=4315 +Severity=Success +Facility=System +SymbolicName=ERROR_MEDIA_INCOMPATIBLE +Language=Bulgarian +ERROR_MEDIA_INCOMPATIBLE - The medium is not compatible with the device or media pool. +. + +MessageId=4316 +Severity=Success +Facility=System +SymbolicName=ERROR_RESOURCE_NOT_PRESENT +Language=Bulgarian +ERROR_RESOURCE_NOT_PRESENT - The resource required for this operation does not exist. +. + +MessageId=4317 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_OPERATION +Language=Bulgarian +ERROR_INVALID_OPERATION - The operation identifier is not valid. +. + +MessageId=4318 +Severity=Success +Facility=System +SymbolicName=ERROR_MEDIA_NOT_AVAILABLE +Language=Bulgarian +ERROR_MEDIA_NOT_AVAILABLE - The media is not mounted or ready for use. +. + +MessageId=4319 +Severity=Success +Facility=System +SymbolicName=ERROR_DEVICE_NOT_AVAILABLE +Language=Bulgarian +ERROR_DEVICE_NOT_AVAILABLE - The device is not ready for use. +. + +MessageId=4320 +Severity=Success +Facility=System +SymbolicName=ERROR_REQUEST_REFUSED +Language=Bulgarian +ERROR_REQUEST_REFUSED - The operator or administrator has refused the request. +. + +MessageId=4321 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_DRIVE_OBJECT +Language=Bulgarian +ERROR_INVALID_DRIVE_OBJECT - The drive identifier does not represent a valid drive. +. + +MessageId=4322 +Severity=Success +Facility=System +SymbolicName=ERROR_LIBRARY_FULL +Language=Bulgarian +ERROR_LIBRARY_FULL - Library is full. No slot is available for use. +. + +MessageId=4323 +Severity=Success +Facility=System +SymbolicName=ERROR_MEDIUM_NOT_ACCESSIBLE +Language=Bulgarian +ERROR_MEDIUM_NOT_ACCESSIBLE - The transport cannot access the medium. +. + +MessageId=4324 +Severity=Success +Facility=System +SymbolicName=ERROR_UNABLE_TO_LOAD_MEDIUM +Language=Bulgarian +ERROR_UNABLE_TO_LOAD_MEDIUM - Unable to load the medium into the drive. +. + +MessageId=4325 +Severity=Success +Facility=System +SymbolicName=ERROR_UNABLE_TO_INVENTORY_DRIVE +Language=Bulgarian +ERROR_UNABLE_TO_INVENTORY_DRIVE - Unable to retrieve status about the drive. +. + +MessageId=4326 +Severity=Success +Facility=System +SymbolicName=ERROR_UNABLE_TO_INVENTORY_SLOT +Language=Bulgarian +ERROR_UNABLE_TO_INVENTORY_SLOT - Unable to retrieve status about the slot. +. + +MessageId=4327 +Severity=Success +Facility=System +SymbolicName=ERROR_UNABLE_TO_INVENTORY_TRANSPORT +Language=Bulgarian +ERROR_UNABLE_TO_INVENTORY_TRANSPORT - Unable to retrieve status about the transport. +. + +MessageId=4328 +Severity=Success +Facility=System +SymbolicName=ERROR_TRANSPORT_FULL +Language=Bulgarian +ERROR_TRANSPORT_FULL - Cannot use the transport because it is already in use. +. + +MessageId=4329 +Severity=Success +Facility=System +SymbolicName=ERROR_CONTROLLING_IEPORT +Language=Bulgarian +ERROR_CONTROLLING_IEPORT - Unable to open or close the inject/eject port. +. + +MessageId=4330 +Severity=Success +Facility=System +SymbolicName=ERROR_UNABLE_TO_EJECT_MOUNTED_MEDIA +Language=Bulgarian +ERROR_UNABLE_TO_EJECT_MOUNTED_MEDIA - Unable to eject the media because it is in a drive. +. + +MessageId=4331 +Severity=Success +Facility=System +SymbolicName=ERROR_CLEANER_SLOT_SET +Language=Bulgarian +ERROR_CLEANER_SLOT_SET - A cleaner slot is already reserved. +. + +MessageId=4332 +Severity=Success +Facility=System +SymbolicName=ERROR_CLEANER_SLOT_NOT_SET +Language=Bulgarian +ERROR_CLEANER_SLOT_NOT_SET - A cleaner slot is not reserved. +. + +MessageId=4333 +Severity=Success +Facility=System +SymbolicName=ERROR_CLEANER_CARTRIDGE_SPENT +Language=Bulgarian +ERROR_CLEANER_CARTRIDGE_SPENT - The cleaner cartridge has performed the maximum number of drive cleanings. +. + +MessageId=4334 +Severity=Success +Facility=System +SymbolicName=ERROR_UNEXPECTED_OMID +Language=Bulgarian +ERROR_UNEXPECTED_OMID - Unexpected on-medium identifier. +. + +MessageId=4335 +Severity=Success +Facility=System +SymbolicName=ERROR_CANT_DELETE_LAST_ITEM +Language=Bulgarian +ERROR_CANT_DELETE_LAST_ITEM - The last remaining item in this group or resource cannot be deleted. +. + +MessageId=4336 +Severity=Success +Facility=System +SymbolicName=ERROR_MESSAGE_EXCEEDS_MAX_SIZE +Language=Bulgarian +ERROR_MESSAGE_EXCEEDS_MAX_SIZE - The message provided exceeds the maximum size allowed for this parameter. +. + +MessageId=4337 +Severity=Success +Facility=System +SymbolicName=ERROR_VOLUME_CONTAINS_SYS_FILES +Language=Bulgarian +ERROR_VOLUME_CONTAINS_SYS_FILES - The volume contains system or paging files. +. + +MessageId=4338 +Severity=Success +Facility=System +SymbolicName=ERROR_INDIGENOUS_TYPE +Language=Bulgarian +ERROR_INDIGENOUS_TYPE - The media type cannot be removed from this library since at least one drive in the library reports it can support this media type. +. + +MessageId=4339 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_SUPPORTING_DRIVES +Language=Bulgarian +ERROR_NO_SUPPORTING_DRIVES - This offline media cannot be mounted on this system since no enabled drives are present which can be used. +. + +MessageId=4340 +Severity=Success +Facility=System +SymbolicName=ERROR_CLEANER_CARTRIDGE_INSTALLED +Language=Bulgarian +ERROR_CLEANER_CARTRIDGE_INSTALLED - A cleaner cartridge is present in the tape library. +. + +MessageId=4350 +Severity=Success +Facility=System +SymbolicName=ERROR_FILE_OFFLINE +Language=Bulgarian +ERROR_FILE_OFFLINE - The remote storage service was not able to recall the file. +. + +MessageId=4351 +Severity=Success +Facility=System +SymbolicName=ERROR_REMOTE_STORAGE_NOT_ACTIVE +Language=Bulgarian +ERROR_REMOTE_STORAGE_NOT_ACTIVE - The remote storage service is not operational at this time. +. + +MessageId=4352 +Severity=Success +Facility=System +SymbolicName=ERROR_REMOTE_STORAGE_MEDIA_ERROR +Language=Bulgarian +ERROR_REMOTE_STORAGE_MEDIA_ERROR - The remote storage service encountered a media error. +. + +MessageId=4390 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_A_REPARSE_POINT +Language=Bulgarian +ERROR_NOT_A_REPARSE_POINT - The file or directory is not a reparse point. +. + +MessageId=4391 +Severity=Success +Facility=System +SymbolicName=ERROR_REPARSE_ATTRIBUTE_CONFLICT +Language=Bulgarian +ERROR_REPARSE_ATTRIBUTE_CONFLICT - The reparse point attribute cannot be set because it conflicts with an existing attribute. +. + +MessageId=4392 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_REPARSE_DATA +Language=Bulgarian +ERROR_INVALID_REPARSE_DATA - The data present in the reparse point buffer is invalid. +. + +MessageId=4393 +Severity=Success +Facility=System +SymbolicName=ERROR_REPARSE_TAG_INVALID +Language=Bulgarian +ERROR_REPARSE_TAG_INVALID - The tag present in the reparse point buffer is invalid. +. + +MessageId=4394 +Severity=Success +Facility=System +SymbolicName=ERROR_REPARSE_TAG_MISMATCH +Language=Bulgarian +ERROR_REPARSE_TAG_MISMATCH - There is a mismatch between the tag specified in the request and the tag present in the reparse point. +. + +MessageId=4500 +Severity=Success +Facility=System +SymbolicName=ERROR_VOLUME_NOT_SIS_ENABLED +Language=Bulgarian +ERROR_VOLUME_NOT_SIS_ENABLED - Single Instance Storage is not available on this volume. +. + +MessageId=5001 +Severity=Success +Facility=System +SymbolicName=ERROR_DEPENDENT_RESOURCE_EXISTS +Language=Bulgarian +ERROR_DEPENDENT_RESOURCE_EXISTS - The cluster resource cannot be moved to another group because other resources are dependent on it. +. + +MessageId=5002 +Severity=Success +Facility=System +SymbolicName=ERROR_DEPENDENCY_NOT_FOUND +Language=Bulgarian +ERROR_DEPENDENCY_NOT_FOUND - The cluster resource dependency cannot be found. +. + +MessageId=5003 +Severity=Success +Facility=System +SymbolicName=ERROR_DEPENDENCY_ALREADY_EXISTS +Language=Bulgarian +ERROR_DEPENDENCY_ALREADY_EXISTS - The cluster resource cannot be made dependent on the specified resource because it is already dependent. +. + +MessageId=5004 +Severity=Success +Facility=System +SymbolicName=ERROR_RESOURCE_NOT_ONLINE +Language=Bulgarian +ERROR_RESOURCE_NOT_ONLINE - The cluster resource is not online. +. + +MessageId=5005 +Severity=Success +Facility=System +SymbolicName=ERROR_HOST_NODE_NOT_AVAILABLE +Language=Bulgarian +ERROR_HOST_NODE_NOT_AVAILABLE - A cluster node is not available for this operation. +. + +MessageId=5006 +Severity=Success +Facility=System +SymbolicName=ERROR_RESOURCE_NOT_AVAILABLE +Language=Bulgarian +ERROR_RESOURCE_NOT_AVAILABLE - The cluster resource is not available. +. + +MessageId=5007 +Severity=Success +Facility=System +SymbolicName=ERROR_RESOURCE_NOT_FOUND +Language=Bulgarian +ERROR_RESOURCE_NOT_FOUND - The cluster resource could not be found. +. + +MessageId=5008 +Severity=Success +Facility=System +SymbolicName=ERROR_SHUTDOWN_CLUSTER +Language=Bulgarian +ERROR_SHUTDOWN_CLUSTER - The cluster is being shut down. +. + +MessageId=5009 +Severity=Success +Facility=System +SymbolicName=ERROR_CANT_EVICT_ACTIVE_NODE +Language=Bulgarian +ERROR_CANT_EVICT_ACTIVE_NODE - A cluster node cannot be evicted from the cluster unless the node is down. +. + +MessageId=5010 +Severity=Success +Facility=System +SymbolicName=ERROR_OBJECT_ALREADY_EXISTS +Language=Bulgarian +ERROR_OBJECT_ALREADY_EXISTS - The object already exists. +. + +MessageId=5011 +Severity=Success +Facility=System +SymbolicName=ERROR_OBJECT_IN_LIST +Language=Bulgarian +ERROR_OBJECT_IN_LIST - The object is already in the list. +. + +MessageId=5012 +Severity=Success +Facility=System +SymbolicName=ERROR_GROUP_NOT_AVAILABLE +Language=Bulgarian +ERROR_GROUP_NOT_AVAILABLE - The cluster group is not available for any new requests. +. + +MessageId=5013 +Severity=Success +Facility=System +SymbolicName=ERROR_GROUP_NOT_FOUND +Language=Bulgarian +ERROR_GROUP_NOT_FOUND - The cluster group could not be found. +. + +MessageId=5014 +Severity=Success +Facility=System +SymbolicName=ERROR_GROUP_NOT_ONLINE +Language=Bulgarian +ERROR_GROUP_NOT_ONLINE - The operation could not be completed because the cluster group is not online. +. + +MessageId=5015 +Severity=Success +Facility=System +SymbolicName=ERROR_HOST_NODE_NOT_RESOURCE_OWNER +Language=Bulgarian +ERROR_HOST_NODE_NOT_RESOURCE_OWNER - The cluster node is not the owner of the resource. +. + +MessageId=5016 +Severity=Success +Facility=System +SymbolicName=ERROR_HOST_NODE_NOT_GROUP_OWNER +Language=Bulgarian +ERROR_HOST_NODE_NOT_GROUP_OWNER - The cluster node is not the owner of the group. +. + +MessageId=5017 +Severity=Success +Facility=System +SymbolicName=ERROR_RESMON_CREATE_FAILED +Language=Bulgarian +ERROR_RESMON_CREATE_FAILED - The cluster resource could not be created in the specified resource monitor. +. + +MessageId=5018 +Severity=Success +Facility=System +SymbolicName=ERROR_RESMON_ONLINE_FAILED +Language=Bulgarian +ERROR_RESMON_ONLINE_FAILED - The cluster resource could not be brought online by the resource monitor. +. + +MessageId=5019 +Severity=Success +Facility=System +SymbolicName=ERROR_RESOURCE_ONLINE +Language=Bulgarian +ERROR_RESOURCE_ONLINE - The operation could not be completed because the cluster resource is online. +. + +MessageId=5020 +Severity=Success +Facility=System +SymbolicName=ERROR_QUORUM_RESOURCE +Language=Bulgarian +ERROR_QUORUM_RESOURCE - The cluster resource could not be deleted or brought offline because it is the quorum resource. +. + +MessageId=5021 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_QUORUM_CAPABLE +Language=Bulgarian +ERROR_NOT_QUORUM_CAPABLE - The cluster could not make the specified resource a quorum resource because it is not capable of being a quorum resource. +. + +MessageId=5022 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_SHUTTING_DOWN +Language=Bulgarian +ERROR_CLUSTER_SHUTTING_DOWN - The cluster software is shutting down. +. + +MessageId=5023 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_STATE +Language=Bulgarian +ERROR_INVALID_STATE - The group or resource is not in the correct state to perform the requested operation. +. + +MessageId=5024 +Severity=Success +Facility=System +SymbolicName=ERROR_RESOURCE_PROPERTIES_STORED +Language=Bulgarian +ERROR_RESOURCE_PROPERTIES_STORED - The properties were stored but not all changes will take effect until the next time the resource is brought online. +. + +MessageId=5025 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_QUORUM_CLASS +Language=Bulgarian +ERROR_NOT_QUORUM_CLASS - The cluster could not make the specified resource a quorum resource because it does not belong to a shared storage class. +. + +MessageId=5026 +Severity=Success +Facility=System +SymbolicName=ERROR_CORE_RESOURCE +Language=Bulgarian +ERROR_CORE_RESOURCE - The cluster resource could not be deleted since it is a core resource. +. + +MessageId=5027 +Severity=Success +Facility=System +SymbolicName=ERROR_QUORUM_RESOURCE_ONLINE_FAILED +Language=Bulgarian +ERROR_QUORUM_RESOURCE_ONLINE_FAILED - The quorum resource failed to come online. +. + +MessageId=5028 +Severity=Success +Facility=System +SymbolicName=ERROR_QUORUMLOG_OPEN_FAILED +Language=Bulgarian +ERROR_QUORUMLOG_OPEN_FAILED - The quorum log could not be created or mounted successfully. +. + +MessageId=5029 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTERLOG_CORRUPT +Language=Bulgarian +ERROR_CLUSTERLOG_CORRUPT - The cluster log is corrupt. +. + +MessageId=5030 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTERLOG_RECORD_EXCEEDS_MAXSIZE +Language=Bulgarian +ERROR_CLUSTERLOG_RECORD_EXCEEDS_MAXSIZE - The record could not be written to the cluster log since it exceeds the maximum size. +. + +MessageId=5031 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTERLOG_EXCEEDS_MAXSIZE +Language=Bulgarian +ERROR_CLUSTERLOG_EXCEEDS_MAXSIZE - The cluster log exceeds its maximum size. +. + +MessageId=5032 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTERLOG_CHKPOINT_NOT_FOUND +Language=Bulgarian +ERROR_CLUSTERLOG_CHKPOINT_NOT_FOUND - No checkpoint record was found in the cluster log. +. + +MessageId=5033 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTERLOG_NOT_ENOUGH_SPACE +Language=Bulgarian +ERROR_CLUSTERLOG_NOT_ENOUGH_SPACE - The minimum required disk space needed for logging is not available. +. + +MessageId=5034 +Severity=Success +Facility=System +SymbolicName=ERROR_QUORUM_OWNER_ALIVE +Language=Bulgarian +ERROR_QUORUM_OWNER_ALIVE - The cluster node failed to take control of the quorum resource because the resource is owned by another active node. +. + +MessageId=5035 +Severity=Success +Facility=System +SymbolicName=ERROR_NETWORK_NOT_AVAILABLE +Language=Bulgarian +ERROR_NETWORK_NOT_AVAILABLE - A cluster network is not available for this operation. +. + +MessageId=5036 +Severity=Success +Facility=System +SymbolicName=ERROR_NODE_NOT_AVAILABLE +Language=Bulgarian +ERROR_NODE_NOT_AVAILABLE - A cluster node is not available for this operation. +. + +MessageId=5037 +Severity=Success +Facility=System +SymbolicName=ERROR_ALL_NODES_NOT_AVAILABLE +Language=Bulgarian +ERROR_ALL_NODES_NOT_AVAILABLE - All cluster nodes must be running to perform this operation. +. + +MessageId=5038 +Severity=Success +Facility=System +SymbolicName=ERROR_RESOURCE_FAILED +Language=Bulgarian +ERROR_RESOURCE_FAILED - A cluster resource failed. +. + +MessageId=5039 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_INVALID_NODE +Language=Bulgarian +ERROR_CLUSTER_INVALID_NODE - The cluster node is not valid. +. + +MessageId=5040 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_NODE_EXISTS +Language=Bulgarian +ERROR_CLUSTER_NODE_EXISTS - The cluster node already exists. +. + +MessageId=5041 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_JOIN_IN_PROGRESS +Language=Bulgarian +ERROR_CLUSTER_JOIN_IN_PROGRESS - A node is in the process of joining the cluster. +. + +MessageId=5042 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_NODE_NOT_FOUND +Language=Bulgarian +ERROR_CLUSTER_NODE_NOT_FOUND - The cluster node was not found. +. + +MessageId=5043 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_LOCAL_NODE_NOT_FOUND +Language=Bulgarian +ERROR_CLUSTER_LOCAL_NODE_NOT_FOUND - The cluster local node information was not found. +. + +MessageId=5044 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_NETWORK_EXISTS +Language=Bulgarian +ERROR_CLUSTER_NETWORK_EXISTS - The cluster network already exists. +. + +MessageId=5045 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_NETWORK_NOT_FOUND +Language=Bulgarian +ERROR_CLUSTER_NETWORK_NOT_FOUND - The cluster network was not found. +. + +MessageId=5046 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_NETINTERFACE_EXISTS +Language=Bulgarian +ERROR_CLUSTER_NETINTERFACE_EXISTS - The cluster network interface already exists. +. + +MessageId=5047 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_NETINTERFACE_NOT_FOUND +Language=Bulgarian +ERROR_CLUSTER_NETINTERFACE_NOT_FOUND - The cluster network interface was not found. +. + +MessageId=5048 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_INVALID_REQUEST +Language=Bulgarian +ERROR_CLUSTER_INVALID_REQUEST - The cluster request is not valid for this object. +. + +MessageId=5049 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_INVALID_NETWORK_PROVIDER +Language=Bulgarian +ERROR_CLUSTER_INVALID_NETWORK_PROVIDER - The cluster network provider is not valid. +. + +MessageId=5050 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_NODE_DOWN +Language=Bulgarian +ERROR_CLUSTER_NODE_DOWN - The cluster node is down. +. + +MessageId=5051 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_NODE_UNREACHABLE +Language=Bulgarian +ERROR_CLUSTER_NODE_UNREACHABLE - The cluster node is not reachable. +. + +MessageId=5052 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_NODE_NOT_MEMBER +Language=Bulgarian +ERROR_CLUSTER_NODE_NOT_MEMBER - The cluster node is not a member of the cluster. +. + +MessageId=5053 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_JOIN_NOT_IN_PROGRESS +Language=Bulgarian +ERROR_CLUSTER_JOIN_NOT_IN_PROGRESS - A cluster join operation is not in progress. +. + +MessageId=5054 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_INVALID_NETWORK +Language=Bulgarian +ERROR_CLUSTER_INVALID_NETWORK - The cluster network is not valid. +. + +MessageId=5056 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_NODE_UP +Language=Bulgarian +ERROR_CLUSTER_NODE_UP - The cluster node is up. +. + +MessageId=5057 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_IPADDR_IN_USE +Language=Bulgarian +ERROR_CLUSTER_IPADDR_IN_USE - The cluster IP address is already in use. +. + +MessageId=5058 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_NODE_NOT_PAUSED +Language=Bulgarian +ERROR_CLUSTER_NODE_NOT_PAUSED - The cluster node is not paused. +. + +MessageId=5059 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_NO_SECURITY_CONTEXT +Language=Bulgarian +ERROR_CLUSTER_NO_SECURITY_CONTEXT - No cluster security context is available. +. + +MessageId=5060 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_NETWORK_NOT_INTERNAL +Language=Bulgarian +ERROR_CLUSTER_NETWORK_NOT_INTERNAL - The cluster network is not configured for internal cluster communication. +. + +MessageId=5061 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_NODE_ALREADY_UP +Language=Bulgarian +ERROR_CLUSTER_NODE_ALREADY_UP - The cluster node is already up. +. + +MessageId=5062 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_NODE_ALREADY_DOWN +Language=Bulgarian +ERROR_CLUSTER_NODE_ALREADY_DOWN - The cluster node is already down. +. + +MessageId=5063 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_NETWORK_ALREADY_ONLINE +Language=Bulgarian +ERROR_CLUSTER_NETWORK_ALREADY_ONLINE - The cluster network is already online. +. + +MessageId=5064 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_NETWORK_ALREADY_OFFLINE +Language=Bulgarian +ERROR_CLUSTER_NETWORK_ALREADY_OFFLINE - The cluster network is already offline. +. + +MessageId=5065 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_NODE_ALREADY_MEMBER +Language=Bulgarian +ERROR_CLUSTER_NODE_ALREADY_MEMBER - The cluster node is already a member of the cluster. +. + +MessageId=5066 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_LAST_INTERNAL_NETWORK +Language=Bulgarian +ERROR_CLUSTER_LAST_INTERNAL_NETWORK - The cluster network is the only one configured for internal cluster communication between two or more active cluster nodes. The internal communication capability cannot be removed from the network. +. + +MessageId=5067 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_NETWORK_HAS_DEPENDENTS +Language=Bulgarian +ERROR_CLUSTER_NETWORK_HAS_DEPENDENTS - One or more cluster resources depend on the network to provide service to clients. The client access capability cannot be removed from the network. +. + +MessageId=5068 +Severity=Success +Facility=System +SymbolicName=ERROR_INVALID_OPERATION_ON_QUORUM +Language=Bulgarian +ERROR_INVALID_OPERATION_ON_QUORUM - This operation cannot be performed on the cluster resource as it the quorum resource. You may not bring the quorum resource offline or modify its possible owners list. +. + +MessageId=5069 +Severity=Success +Facility=System +SymbolicName=ERROR_DEPENDENCY_NOT_ALLOWED +Language=Bulgarian +ERROR_DEPENDENCY_NOT_ALLOWED - The cluster quorum resource is not allowed to have any dependencies. +. + +MessageId=5070 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_NODE_PAUSED +Language=Bulgarian +ERROR_CLUSTER_NODE_PAUSED - The cluster node is paused. +. + +MessageId=5071 +Severity=Success +Facility=System +SymbolicName=ERROR_NODE_CANT_HOST_RESOURCE +Language=Bulgarian +ERROR_NODE_CANT_HOST_RESOURCE - The cluster resource cannot be brought online. The owner node cannot run this resource. +. + +MessageId=5072 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_NODE_NOT_READY +Language=Bulgarian +ERROR_CLUSTER_NODE_NOT_READY - The cluster node is not ready to perform the requested operation. +. + +MessageId=5073 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_NODE_SHUTTING_DOWN +Language=Bulgarian +ERROR_CLUSTER_NODE_SHUTTING_DOWN - The cluster node is shutting down. +. + +MessageId=5074 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_JOIN_ABORTED +Language=Bulgarian +ERROR_CLUSTER_JOIN_ABORTED - The cluster join operation was aborted. +. + +MessageId=5075 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_INCOMPATIBLE_VERSIONS +Language=Bulgarian +ERROR_CLUSTER_INCOMPATIBLE_VERSIONS - The cluster join operation failed due to incompatible software versions between the joining node and its sponsor. +. + +MessageId=5076 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_MAXNUM_OF_RESOURCES_EXCEEDED +Language=Bulgarian +ERROR_CLUSTER_MAXNUM_OF_RESOURCES_EXCEEDED - This resource cannot be created because the cluster has reached the limit on the number of resources it can monitor. +. + +MessageId=5077 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_SYSTEM_CONFIG_CHANGED +Language=Bulgarian +ERROR_CLUSTER_SYSTEM_CONFIG_CHANGED - The system configuration changed during the cluster join or form operation. The join or form operation was aborted. +. + +MessageId=5078 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_RESOURCE_TYPE_NOT_FOUND +Language=Bulgarian +ERROR_CLUSTER_RESOURCE_TYPE_NOT_FOUND - The specified resource type was not found. +. + +MessageId=5079 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_RESTYPE_NOT_SUPPORTED +Language=Bulgarian +ERROR_CLUSTER_RESTYPE_NOT_SUPPORTED - The specified node does not support a resource of this type. This may be due to version inconsistencies or due to the absence of the resource DLL on this node. +. + +MessageId=5080 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_RESNAME_NOT_FOUND +Language=Bulgarian +ERROR_CLUSTER_RESNAME_NOT_FOUND - The specified resource name is supported by this resource DLL. This may be due to a bad (or changed) name supplied to the resource DLL. +. + +MessageId=5081 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_NO_RPC_PACKAGES_REGISTERED +Language=Bulgarian +ERROR_CLUSTER_NO_RPC_PACKAGES_REGISTERED - No authentication package could be registered with the RPC server. +. + +MessageId=5082 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_OWNER_NOT_IN_PREFLIST +Language=Bulgarian +ERROR_CLUSTER_OWNER_NOT_IN_PREFLIST - You cannot bring the group online because the owner of the group is not in the preferred list for the group. To change the owner node for the group, move the group. +. + +MessageId=5083 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_DATABASE_SEQMISMATCH +Language=Bulgarian +ERROR_CLUSTER_DATABASE_SEQMISMATCH - The join operation failed because the cluster database sequence number has changed or is incompatible with the locker node. This may happen during a join operation if the cluster database was changing during the join. +. + +MessageId=5084 +Severity=Success +Facility=System +SymbolicName=ERROR_RESMON_INVALID_STATE +Language=Bulgarian +ERROR_RESMON_INVALID_STATE - The resource monitor will not allow the fail operation to be performed while the resource is in its current state. This may happen if the resource is in a pending state. +. + +MessageId=5085 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_GUM_NOT_LOCKER +Language=Bulgarian +ERROR_CLUSTER_GUM_NOT_LOCKER - A non locker code got a request to reserve the lock for making global updates. +. + +MessageId=5086 +Severity=Success +Facility=System +SymbolicName=ERROR_QUORUM_DISK_NOT_FOUND +Language=Bulgarian +ERROR_QUORUM_DISK_NOT_FOUND - The quorum disk could not be located by the cluster service. +. + +MessageId=5087 +Severity=Success +Facility=System +SymbolicName=ERROR_DATABASE_BACKUP_CORRUPT +Language=Bulgarian +ERROR_DATABASE_BACKUP_CORRUPT - The backup up cluster database is possibly corrupt. +. + +MessageId=5088 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_NODE_ALREADY_HAS_DFS_ROOT +Language=Bulgarian +ERROR_CLUSTER_NODE_ALREADY_HAS_DFS_ROOT - A DFS root already exists in this cluster node. +. + +MessageId=5089 +Severity=Success +Facility=System +SymbolicName=ERROR_RESOURCE_PROPERTY_UNCHANGEABLE +Language=Bulgarian +ERROR_RESOURCE_PROPERTY_UNCHANGEABLE - An attempt to modify a resource property failed because it conflicts with another existing property. +. + +MessageId=5890 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_MEMBERSHIP_INVALID_STATE +Language=Bulgarian +ERROR_CLUSTER_MEMBERSHIP_INVALID_STATE - An operation was attempted that is incompatible with the current membership state of the node. +. + +MessageId=5891 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_QUORUMLOG_NOT_FOUND +Language=Bulgarian +ERROR_CLUSTER_QUORUMLOG_NOT_FOUND - The quorum resource does not contain the quorum log. +. + +MessageId=5892 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_MEMBERSHIP_HALT +Language=Bulgarian +ERROR_CLUSTER_MEMBERSHIP_HALT - The membership engine requested shutdown of the cluster service on this node. +. + +MessageId=5893 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_INSTANCE_ID_MISMATCH +Language=Bulgarian +ERROR_CLUSTER_INSTANCE_ID_MISMATCH - The join operation failed because the cluster instance ID of the joining node does not match the cluster instance ID of the sponsor node. +. + +MessageId=5894 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_NETWORK_NOT_FOUND_FOR_IP +Language=Bulgarian +ERROR_CLUSTER_NETWORK_NOT_FOUND_FOR_IP - A matching network for the specified IP address could not be found. Please also specify a subnet mask and a cluster network. +. + +MessageId=5895 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_PROPERTY_DATA_TYPE_MISMATCH +Language=Bulgarian +ERROR_CLUSTER_PROPERTY_DATA_TYPE_MISMATCH - The actual data type of the property did not match the expected data type of the property. +. + +MessageId=5896 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_EVICT_WITHOUT_CLEANUP +Language=Bulgarian +ERROR_CLUSTER_EVICT_WITHOUT_CLEANUP - The cluster node was evicted from the cluster successfully, but the node was not cleaned up. Extended status information explaining why the node was not cleaned up is available. +. + +MessageId=5897 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_PARAMETER_MISMATCH +Language=Bulgarian +ERROR_CLUSTER_PARAMETER_MISMATCH - Two or more parameter values specified for a resource's properties are in conflict. +. + +MessageId=5898 +Severity=Success +Facility=System +SymbolicName=ERROR_NODE_CANNOT_BE_CLUSTERED +Language=Bulgarian +ERROR_NODE_CANNOT_BE_CLUSTERED - This computer cannot be made a member of a cluster. +. + +MessageId=5899 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_WRONG_OS_VERSION +Language=Bulgarian +ERROR_CLUSTER_WRONG_OS_VERSION - This computer cannot be made a member of a cluster because it does not have the correct version of Windows installed. +. + +MessageId=5900 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_CANT_CREATE_DUP_CLUSTER_NAME +Language=Bulgarian +ERROR_CLUSTER_CANT_CREATE_DUP_CLUSTER_NAME - A cluster cannot be created with the specified cluster name because that cluster name is already in use. Specify a different name for the cluster. +. + +MessageId=5901 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSCFG_ALREADY_COMMITTED +Language=Bulgarian +ERROR_CLUSCFG_ALREADY_COMMITTED - The cluster configuration action has already been committed. +. + +MessageId=5902 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSCFG_ROLLBACK_FAILED +Language=Bulgarian +ERROR_CLUSCFG_ROLLBACK_FAILED - The cluster configuration action could not be rolled back. +. + +MessageId=5903 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSCFG_SYSTEM_DISK_DRIVE_LETTER_CONFLICT +Language=Bulgarian +ERROR_CLUSCFG_SYSTEM_DISK_DRIVE_LETTER_CONFLICT - The drive letter assigned to a system disk on one node conflicted with the driver letter assigned to a disk on another node. +. + +MessageId=5904 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_OLD_VERSION +Language=Bulgarian +ERROR_CLUSTER_OLD_VERSION - One or more nodes in the cluster are running a version of Windows that does not support this operation. +. + +MessageId=5905 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_MISMATCHED_COMPUTER_ACCT_NAME +Language=Bulgarian +ERROR_CLUSTER_MISMATCHED_COMPUTER_ACCT_NAME - The name of the corresponding computer account doesn't match the Network Name for this resource. +. + +MessageId=5906 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_NO_NET_ADAPTERS +Language=Bulgarian +ERROR_CLUSTER_NO_NET_ADAPTERS - No network adapters are available. +. + +MessageId=5907 +Severity=Success +Facility=System +SymbolicName=ERROR_CLUSTER_POISONED +Language=Bulgarian +ERROR_CLUSTER_POISONED - The cluster node has been poisoned. +. + +MessageId=6000 +Severity=Success +Facility=System +SymbolicName=ERROR_ENCRYPTION_FAILED +Language=Bulgarian +ERROR_ENCRYPTION_FAILED - The specified file could not be encrypted. +. + +MessageId=6001 +Severity=Success +Facility=System +SymbolicName=ERROR_DECRYPTION_FAILED +Language=Bulgarian +ERROR_DECRYPTION_FAILED - The specified file could not be decrypted. +. + +MessageId=6002 +Severity=Success +Facility=System +SymbolicName=ERROR_FILE_ENCRYPTED +Language=Bulgarian +ERROR_FILE_ENCRYPTED - The specified file is encrypted and the user does not have the ability to decrypt it. +. + +MessageId=6003 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_RECOVERY_POLICY +Language=Bulgarian +ERROR_NO_RECOVERY_POLICY - There is no valid encryption recovery policy configured for this system. +. + +MessageId=6004 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_EFS +Language=Bulgarian +ERROR_NO_EFS - The required encryption driver is not loaded for this system. +. + +MessageId=6005 +Severity=Success +Facility=System +SymbolicName=ERROR_WRONG_EFS +Language=Bulgarian +ERROR_WRONG_EFS - The file was encrypted with a different encryption driver than is currently loaded. +. + +MessageId=6006 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_USER_KEYS +Language=Bulgarian +ERROR_NO_USER_KEYS - There are no EFS keys defined for the user. +. + +MessageId=6007 +Severity=Success +Facility=System +SymbolicName=ERROR_FILE_NOT_ENCRYPTED +Language=Bulgarian +ERROR_FILE_NOT_ENCRYPTED - The specified file is not encrypted. +. + +MessageId=6008 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_EXPORT_FORMAT +Language=Bulgarian +ERROR_NOT_EXPORT_FORMAT - The specified file is not in the defined EFS export format. +. + +MessageId=6009 +Severity=Success +Facility=System +SymbolicName=ERROR_FILE_READ_ONLY +Language=Bulgarian +ERROR_FILE_READ_ONLY - The specified file is read only. +. + +MessageId=6010 +Severity=Success +Facility=System +SymbolicName=ERROR_DIR_EFS_DISALLOWED +Language=Bulgarian +ERROR_DIR_EFS_DISALLOWED - The directory has been disabled for encryption. +. + +MessageId=6011 +Severity=Success +Facility=System +SymbolicName=ERROR_EFS_SERVER_NOT_TRUSTED +Language=Bulgarian +ERROR_EFS_SERVER_NOT_TRUSTED - The server is not trusted for remote encryption operation. +. + +MessageId=6012 +Severity=Success +Facility=System +SymbolicName=ERROR_BAD_RECOVERY_POLICY +Language=Bulgarian +ERROR_BAD_RECOVERY_POLICY - Recovery policy configured for this system contains invalid recovery certificate. +. + +MessageId=6013 +Severity=Success +Facility=System +SymbolicName=ERROR_EFS_ALG_BLOB_TOO_BIG +Language=Bulgarian +ERROR_EFS_ALG_BLOB_TOO_BIG - The encryption algorithm used on the source file needs a bigger key buffer than the one on the destination file. +. + +MessageId=6014 +Severity=Success +Facility=System +SymbolicName=ERROR_VOLUME_NOT_SUPPORT_EFS +Language=Bulgarian +ERROR_VOLUME_NOT_SUPPORT_EFS - The disk partition does not support file encryption. +. + +MessageId=6015 +Severity=Success +Facility=System +SymbolicName=ERROR_EFS_DISABLED +Language=Bulgarian +ERROR_EFS_DISABLED - This machine is disabled for file encryption. +. + +MessageId=6016 +Severity=Success +Facility=System +SymbolicName=ERROR_EFS_VERSION_NOT_SUPPORT +Language=Bulgarian +ERROR_EFS_VERSION_NOT_SUPPORT - A newer system is required to decrypt this encrypted file. +. + +MessageId=6118 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_BROWSER_SERVERS_FOUND +Language=Bulgarian +ERROR_NO_BROWSER_SERVERS_FOUND - The list of servers for this workgroup is not currently available. +. + +MessageId=6200 +Severity=Success +Facility=System +SymbolicName=SCHED_E_SERVICE_NOT_LOCALSYSTEM +Language=Bulgarian +SCHED_E_SERVICE_NOT_LOCALSYSTEM - The Task Scheduler service must be configured to run in the System account to function properly. Individual tasks may be configured to run in other accounts. +. + +MessageId=7001 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_WINSTATION_NAME_INVALID +Language=Bulgarian +ERROR_CTX_WINSTATION_NAME_INVALID - The specified session name is invalid. +. + +MessageId=7002 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_INVALID_PD +Language=Bulgarian +ERROR_CTX_INVALID_PD - The specified protocol driver is invalid. +. + +MessageId=7003 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_PD_NOT_FOUND +Language=Bulgarian +ERROR_CTX_PD_NOT_FOUND - The specified protocol driver was not found in the system path. +. + +MessageId=7004 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_WD_NOT_FOUND +Language=Bulgarian +ERROR_CTX_WD_NOT_FOUND - The specified terminal connection driver was not found in the system path. +. + +MessageId=7005 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_CANNOT_MAKE_EVENTLOG_ENTRY +Language=Bulgarian +ERROR_CTX_CANNOT_MAKE_EVENTLOG_ENTRY - A registry key for event logging could not be created for this session. +. + +MessageId=7006 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_SERVICE_NAME_COLLISION +Language=Bulgarian +ERROR_CTX_SERVICE_NAME_COLLISION - A service with the same name already exists on the system. +. + +MessageId=7007 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_CLOSE_PENDING +Language=Bulgarian +ERROR_CTX_CLOSE_PENDING - A close operation is pending on the session. +. + +MessageId=7008 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_NO_OUTBUF +Language=Bulgarian +ERROR_CTX_NO_OUTBUF - There are no free output buffers available. +. + +MessageId=7009 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_MODEM_INF_NOT_FOUND +Language=Bulgarian +ERROR_CTX_MODEM_INF_NOT_FOUND - The MODEM.INF file was not found. +. + +MessageId=7010 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_INVALID_MODEMNAME +Language=Bulgarian +ERROR_CTX_INVALID_MODEMNAME - The modem name was not found in MODEM.INF. +. + +MessageId=7011 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_MODEM_RESPONSE_ERROR +Language=Bulgarian +ERROR_CTX_MODEM_RESPONSE_ERROR - The modem did not accept the command sent to it. Verify that the configured modem name matches the attached modem. +. + +MessageId=7012 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_MODEM_RESPONSE_TIMEOUT +Language=Bulgarian +ERROR_CTX_MODEM_RESPONSE_TIMEOUT - The modem did not respond to the command sent to it. Verify that the modem is properly cabled and powered on. +. + +MessageId=7013 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_MODEM_RESPONSE_NO_CARRIER +Language=Bulgarian +ERROR_CTX_MODEM_RESPONSE_NO_CARRIER - Carrier detect has failed or carrier has been dropped due to disconnect. +. + +MessageId=7014 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_MODEM_RESPONSE_NO_DIALTONE +Language=Bulgarian +ERROR_CTX_MODEM_RESPONSE_NO_DIALTONE - Dial tone not detected within the required time. Verify that the phone cable is properly attached and functional. +. + +MessageId=7015 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_MODEM_RESPONSE_BUSY +Language=Bulgarian +ERROR_CTX_MODEM_RESPONSE_BUSY - Busy signal detected at remote site on callback. +. + +MessageId=7016 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_MODEM_RESPONSE_VOICE +Language=Bulgarian +ERROR_CTX_MODEM_RESPONSE_VOICE - Voice detected at remote site on callback. +. + +MessageId=7017 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_TD_ERROR +Language=Bulgarian +ERROR_CTX_TD_ERROR - Transport driver error +. + +MessageId=7022 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_WINSTATION_NOT_FOUND +Language=Bulgarian +ERROR_CTX_WINSTATION_NOT_FOUND - The specified session cannot be found. +. + +MessageId=7023 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_WINSTATION_ALREADY_EXISTS +Language=Bulgarian +ERROR_CTX_WINSTATION_ALREADY_EXISTS - The specified session name is already in use. +. + +MessageId=7024 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_WINSTATION_BUSY +Language=Bulgarian +ERROR_CTX_WINSTATION_BUSY - The requested operation cannot be completed because the terminal connection is currently busy processing a connect, disconnect, reset, or delete operation. +. + +MessageId=7025 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_BAD_VIDEO_MODE +Language=Bulgarian +ERROR_CTX_BAD_VIDEO_MODE - An attempt has been made to connect to a session whose video mode is not supported by the current client. +. + +MessageId=7035 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_GRAPHICS_INVALID +Language=Bulgarian +ERROR_CTX_GRAPHICS_INVALID - The application attempted to enable DOS graphics mode. DOS graphics mode is not supported. +. + +MessageId=7037 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_LOGON_DISABLED +Language=Bulgarian +ERROR_CTX_LOGON_DISABLED - Your interactive logon privilege has been disabled. Please contact your administrator. +. + +MessageId=7038 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_NOT_CONSOLE +Language=Bulgarian +ERROR_CTX_NOT_CONSOLE - The requested operation can be performed only on the system console. This is most often the result of a driver or system DLL requiring direct console access. +. + +MessageId=7040 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_CLIENT_QUERY_TIMEOUT +Language=Bulgarian +ERROR_CTX_CLIENT_QUERY_TIMEOUT - The client failed to respond to the server connect message. +. + +MessageId=7041 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_CONSOLE_DISCONNECT +Language=Bulgarian +ERROR_CTX_CONSOLE_DISCONNECT - Disconnecting the console session is not supported. +. + +MessageId=7042 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_CONSOLE_CONNECT +Language=Bulgarian +ERROR_CTX_CONSOLE_CONNECT - Reconnecting a disconnected session to the console is not supported. +. + +MessageId=7044 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_SHADOW_DENIED +Language=Bulgarian +ERROR_CTX_SHADOW_DENIED - The request to control another session remotely was denied. +. + +MessageId=7045 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_WINSTATION_ACCESS_DENIED +Language=Bulgarian +ERROR_CTX_WINSTATION_ACCESS_DENIED - The requested session access is denied. +. + +MessageId=7049 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_INVALID_WD +Language=Bulgarian +ERROR_CTX_INVALID_WD - The specified terminal connection driver is invalid. +. + +MessageId=7050 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_SHADOW_INVALID +Language=Bulgarian +ERROR_CTX_SHADOW_INVALID - The requested session cannot be controlled remotely. This may be because the session is disconnected or does not currently have a user logged on. +. + +MessageId=7051 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_SHADOW_DISABLED +Language=Bulgarian +ERROR_CTX_SHADOW_DISABLED - The requested session is not configured to allow remote control. +. + +MessageId=7052 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_CLIENT_LICENSE_IN_USE +Language=Bulgarian +ERROR_CTX_CLIENT_LICENSE_IN_USE - Your request to connect to this Terminal Server has been rejected. Your Terminal Server client license number is currently being used by another user. Please call your system administrator to obtain a unique license number. +. + +MessageId=7053 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_CLIENT_LICENSE_NOT_SET +Language=Bulgarian +ERROR_CTX_CLIENT_LICENSE_NOT_SET - Your request to connect to this Terminal Server has been rejected. Your Terminal Server client license number has not been entered for this copy of the Terminal Server client. Please contact your system administrator. +. + +MessageId=7054 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_LICENSE_NOT_AVAILABLE +Language=Bulgarian +ERROR_CTX_LICENSE_NOT_AVAILABLE - The system has reached its licensed logon limit. Please try again later. +. + +MessageId=7055 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_LICENSE_CLIENT_INVALID +Language=Bulgarian +ERROR_CTX_LICENSE_CLIENT_INVALID - The client you are using is not licensed to use this system. Your logon request is denied. +. + +MessageId=7056 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_LICENSE_EXPIRED +Language=Bulgarian +ERROR_CTX_LICENSE_EXPIRED - The system license has expired. Your logon request is denied. +. + +MessageId=7057 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_SHADOW_NOT_RUNNING +Language=Bulgarian +ERROR_CTX_SHADOW_NOT_RUNNING - Remote control could not be terminated because the specified session is not currently being remotely controlled. +. + +MessageId=7058 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_SHADOW_ENDED_BY_MODE_CHANGE +Language=Bulgarian +ERROR_CTX_SHADOW_ENDED_BY_MODE_CHANGE - The remote control of the console was terminated because the display mode was changed. Changing the display mode in a remote control session is not supported. +. + +MessageId=7059 +Severity=Success +Facility=System +SymbolicName=ERROR_ACTIVATION_COUNT_EXCEEDED +Language=Bulgarian +ERROR_ACTIVATION_COUNT_EXCEEDED - Activation has already been reset the maximum number of times for this installation. Your activation timer will not be cleared. +. + +MessageId=7060 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_WINSTATIONS_DISABLED +Language=Bulgarian +ERROR_CTX_WINSTATIONS_DISABLED - Remote logins are currently disabled. +. + +MessageId=7061 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_ENCRYPTION_LEVEL_REQUIRED +Language=Bulgarian +ERROR_CTX_ENCRYPTION_LEVEL_REQUIRED - You do not have the proper encryption level to access this Session. +. + +MessageId=7062 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_SESSION_IN_USE +Language=Bulgarian +ERROR_CTX_SESSION_IN_USE - The user %s\\%s is currently logged on to this computer. Only the current user or an administrator can log on to this computer. +. + +MessageId=7063 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_NO_FORCE_LOGOFF +Language=Bulgarian +ERROR_CTX_NO_FORCE_LOGOFF - The user %s\\%s is already logged on to the console of this computer. You do not have permission to log in at this time. To resolve this issue, contact %s\\%s and have them log off. +. + +MessageId=7064 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_ACCOUNT_RESTRICTION +Language=Bulgarian +ERROR_CTX_ACCOUNT_RESTRICTION - Unable to log you on because of an account restriction. +. + +MessageId=7065 +Severity=Success +Facility=System +SymbolicName=ERROR_RDP_PROTOCOL_ERROR +Language=Bulgarian +ERROR_RDP_PROTOCOL_ERROR - The RDP protocol component %2 detected an error in the protocol stream and has disconnected the client. +. + +MessageId=7066 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_CDM_CONNECT +Language=Bulgarian +ERROR_CTX_CDM_CONNECT - The Client Drive Mapping Service Has Connected on Terminal Connection. +. + +MessageId=7067 +Severity=Success +Facility=System +SymbolicName=ERROR_CTX_CDM_DISCONNECT +Language=Bulgarian +ERROR_CTX_CDM_DISCONNECT - The Client Drive Mapping Service Has Disconnected on Terminal Connection. +. + +MessageId=8001 +Severity=Success +Facility=System +SymbolicName=FRS_ERR_INVALID_API_SEQUENCE +Language=Bulgarian +FRS_ERR_INVALID_API_SEQUENCE - The file replication service API was called incorrectly. +. + +MessageId=8002 +Severity=Success +Facility=System +SymbolicName=FRS_ERR_STARTING_SERVICE +Language=Bulgarian +FRS_ERR_STARTING_SERVICE - The file replication service cannot be started. +. + +MessageId=8003 +Severity=Success +Facility=System +SymbolicName=FRS_ERR_STOPPING_SERVICE +Language=Bulgarian +FRS_ERR_STOPPING_SERVICE - The file replication service cannot be stopped. +. + +MessageId=8004 +Severity=Success +Facility=System +SymbolicName=FRS_ERR_INTERNAL_API +Language=Bulgarian +FRS_ERR_INTERNAL_API - The file replication service API terminated the request. The event log may have more information. +. + +MessageId=8005 +Severity=Success +Facility=System +SymbolicName=FRS_ERR_INTERNAL +Language=Bulgarian +FRS_ERR_INTERNAL - The file replication service terminated the request. The event log may have more information. +. + +MessageId=8006 +Severity=Success +Facility=System +SymbolicName=FRS_ERR_SERVICE_COMM +Language=Bulgarian +FRS_ERR_SERVICE_COMM - The file replication service cannot be contacted. The event log may have more information. +. + +MessageId=8007 +Severity=Success +Facility=System +SymbolicName=FRS_ERR_INSUFFICIENT_PRIV +Language=Bulgarian +FRS_ERR_INSUFFICIENT_PRIV - The file replication service cannot satisfy the request because the user has insufficient privileges. The event log may have more information. +. + +MessageId=8008 +Severity=Success +Facility=System +SymbolicName=FRS_ERR_AUTHENTICATION +Language=Bulgarian +FRS_ERR_AUTHENTICATION - The file replication service cannot satisfy the request because authenticated RPC is not available. The event log may have more information. +. + +MessageId=8009 +Severity=Success +Facility=System +SymbolicName=FRS_ERR_PARENT_INSUFFICIENT_PRIV +Language=Bulgarian +FRS_ERR_PARENT_INSUFFICIENT_PRIV - The file replication service cannot satisfy the request because the user has insufficient privileges on the domain controller. The event log may have more information. +. + +MessageId=8010 +Severity=Success +Facility=System +SymbolicName=FRS_ERR_PARENT_AUTHENTICATION +Language=Bulgarian +FRS_ERR_PARENT_AUTHENTICATION - The file replication service cannot satisfy the request because authenticated RPC is not available on the domain controller. The event log may have more information. +. + +MessageId=8011 +Severity=Success +Facility=System +SymbolicName=FRS_ERR_CHILD_TO_PARENT_COMM +Language=Bulgarian +FRS_ERR_CHILD_TO_PARENT_COMM - The file replication service cannot communicate with the file replication service on the domain controller. The event log may have more information. +. + +MessageId=8012 +Severity=Success +Facility=System +SymbolicName=FRS_ERR_PARENT_TO_CHILD_COMM +Language=Bulgarian +FRS_ERR_PARENT_TO_CHILD_COMM - The file replication service on the domain controller cannot communicate with the file replication service on this computer. The event log may have more information. +. + +MessageId=8013 +Severity=Success +Facility=System +SymbolicName=FRS_ERR_SYSVOL_POPULATE +Language=Bulgarian +FRS_ERR_SYSVOL_POPULATE - The file replication service cannot populate the system volume because of an internal error. The event log may have more information. +. + +MessageId=8014 +Severity=Success +Facility=System +SymbolicName=FRS_ERR_SYSVOL_POPULATE_TIMEOUT +Language=Bulgarian +FRS_ERR_SYSVOL_POPULATE_TIMEOUT - The file replication service cannot populate the system volume because of an internal timeout. The event log may have more information. +. + +MessageId=8015 +Severity=Success +Facility=System +SymbolicName=FRS_ERR_SYSVOL_IS_BUSY +Language=Bulgarian +FRS_ERR_SYSVOL_IS_BUSY - The file replication service cannot process the request. The system volume is busy with a previous request. +. + +MessageId=8016 +Severity=Success +Facility=System +SymbolicName=FRS_ERR_SYSVOL_DEMOTE +Language=Bulgarian +FRS_ERR_SYSVOL_DEMOTE - The file replication service cannot stop replicating the system volume because of an internal error. The event log may have more information. +. + +MessageId=8017 +Severity=Success +Facility=System +SymbolicName=FRS_ERR_INVALID_SERVICE_PARAMETER +Language=Bulgarian +FRS_ERR_INVALID_SERVICE_PARAMETER - The file replication service detected an invalid parameter. +. + +MessageId=8200 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NOT_INSTALLED +Language=Bulgarian +ERROR_DS_NOT_INSTALLED - An error occurred while installing the directory service. For more information, see the event log. +. + +MessageId=8201 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_MEMBERSHIP_EVALUATED_LOCALLY +Language=Bulgarian +ERROR_DS_MEMBERSHIP_EVALUATED_LOCALLY - The directory service evaluated group memberships locally. +. + +MessageId=8202 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NO_ATTRIBUTE_OR_VALUE +Language=Bulgarian +ERROR_DS_NO_ATTRIBUTE_OR_VALUE - The specified directory service attribute or value does not exist. +. + +MessageId=8203 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_INVALID_ATTRIBUTE_SYNTAX +Language=Bulgarian +ERROR_DS_INVALID_ATTRIBUTE_SYNTAX - The attribute syntax specified to the directory service is invalid. +. + +MessageId=8204 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_ATTRIBUTE_TYPE_UNDEFINED +Language=Bulgarian +ERROR_DS_ATTRIBUTE_TYPE_UNDEFINED - The attribute type specified to the directory service is not defined. +. + +MessageId=8205 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_ATTRIBUTE_OR_VALUE_EXISTS +Language=Bulgarian +ERROR_DS_ATTRIBUTE_OR_VALUE_EXISTS - The specified directory service attribute or value already exists. +. + +MessageId=8206 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_BUSY +Language=Bulgarian +ERROR_DS_BUSY - The directory service is busy. +. + +MessageId=8207 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_UNAVAILABLE +Language=Bulgarian +ERROR_DS_UNAVAILABLE - The directory service is unavailable. +. + +MessageId=8208 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NO_RIDS_ALLOCATED +Language=Bulgarian +ERROR_DS_NO_RIDS_ALLOCATED - The directory service was unable to allocate a relative identifier. +. + +MessageId=8209 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NO_MORE_RIDS +Language=Bulgarian +ERROR_DS_NO_MORE_RIDS - The directory service has exhausted the pool of relative identifiers. +. + +MessageId=8210 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_INCORRECT_ROLE_OWNER +Language=Bulgarian +ERROR_DS_INCORRECT_ROLE_OWNER - The requested operation could not be performed because the directory service is not the master for that type of operation. +. + +MessageId=8211 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_RIDMGR_INIT_ERROR +Language=Bulgarian +ERROR_DS_RIDMGR_INIT_ERROR - The directory service was unable to initialize the subsystem that allocates relative identifiers. +. + +MessageId=8212 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_OBJ_CLASS_VIOLATION +Language=Bulgarian +ERROR_DS_OBJ_CLASS_VIOLATION - The requested operation did not satisfy one or more constraints associated with the class of the object. +. + +MessageId=8213 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_ON_NON_LEAF +Language=Bulgarian +ERROR_DS_CANT_ON_NON_LEAF - The directory service can perform the requested operation only on a leaf object. +. + +MessageId=8214 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_ON_RDN +Language=Bulgarian +ERROR_DS_CANT_ON_RDN - The directory service cannot perform the requested operation on the RDN attribute of an object. +. + +MessageId=8215 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_MOD_OBJ_CLASS +Language=Bulgarian +ERROR_DS_CANT_MOD_OBJ_CLASS - The directory service detected an attempt to modify the object class of an object. +. + +MessageId=8216 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CROSS_DOM_MOVE_ERROR +Language=Bulgarian +ERROR_DS_CROSS_DOM_MOVE_ERROR - The requested cross-domain move operation could not be performed. +. + +MessageId=8217 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_GC_NOT_AVAILABLE +Language=Bulgarian +ERROR_DS_GC_NOT_AVAILABLE - Unable to contact the global catalog server. +. + +MessageId=8218 +Severity=Success +Facility=System +SymbolicName=ERROR_SHARED_POLICY +Language=Bulgarian +ERROR_SHARED_POLICY - The policy object is shared and can only be modified at the root. +. + +MessageId=8219 +Severity=Success +Facility=System +SymbolicName=ERROR_POLICY_OBJECT_NOT_FOUND +Language=Bulgarian +ERROR_POLICY_OBJECT_NOT_FOUND - The policy object does not exist. +. + +MessageId=8220 +Severity=Success +Facility=System +SymbolicName=ERROR_POLICY_ONLY_IN_DS +Language=Bulgarian +ERROR_POLICY_ONLY_IN_DS - The requested policy information is only in the directory service. +. + +MessageId=8221 +Severity=Success +Facility=System +SymbolicName=ERROR_PROMOTION_ACTIVE +Language=Bulgarian +ERROR_PROMOTION_ACTIVE - A domain controller promotion is currently active. +. + +MessageId=8222 +Severity=Success +Facility=System +SymbolicName=ERROR_NO_PROMOTION_ACTIVE +Language=Bulgarian +ERROR_NO_PROMOTION_ACTIVE - A domain controller promotion is not currently active +. + +MessageId=8224 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_OPERATIONS_ERROR +Language=Bulgarian +ERROR_DS_OPERATIONS_ERROR - An operations error occurred. +. + +MessageId=8225 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_PROTOCOL_ERROR +Language=Bulgarian +ERROR_DS_PROTOCOL_ERROR - A protocol error occurred. +. + +MessageId=8226 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_TIMELIMIT_EXCEEDED +Language=Bulgarian +ERROR_DS_TIMELIMIT_EXCEEDED - The time limit for this request was exceeded. +. + +MessageId=8227 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SIZELIMIT_EXCEEDED +Language=Bulgarian +ERROR_DS_SIZELIMIT_EXCEEDED - The size limit for this request was exceeded. +. + +MessageId=8228 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_ADMIN_LIMIT_EXCEEDED +Language=Bulgarian +ERROR_DS_ADMIN_LIMIT_EXCEEDED - The administrative limit for this request was exceeded. +. + +MessageId=8229 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_COMPARE_FALSE +Language=Bulgarian +ERROR_DS_COMPARE_FALSE - The compare response was false. +. + +MessageId=8230 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_COMPARE_TRUE +Language=Bulgarian +ERROR_DS_COMPARE_TRUE - The compare response was true. +. + +MessageId=8231 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_AUTH_METHOD_NOT_SUPPORTED +Language=Bulgarian +ERROR_DS_AUTH_METHOD_NOT_SUPPORTED - The requested authentication method is not supported by the server. +. + +MessageId=8232 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_STRONG_AUTH_REQUIRED +Language=Bulgarian +ERROR_DS_STRONG_AUTH_REQUIRED - A more secure authentication method is required for this server. +. + +MessageId=8233 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_INAPPROPRIATE_AUTH +Language=Bulgarian +ERROR_DS_INAPPROPRIATE_AUTH - Inappropriate authentication. +. + +MessageId=8234 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_AUTH_UNKNOWN +Language=Bulgarian +ERROR_DS_AUTH_UNKNOWN - The authentication mechanism is unknown. +. + +MessageId=8235 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_REFERRAL +Language=Bulgarian +ERROR_DS_REFERRAL - A referral was returned from the server. +. + +MessageId=8236 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_UNAVAILABLE_CRIT_EXTENSION +Language=Bulgarian +ERROR_DS_UNAVAILABLE_CRIT_EXTENSION - The server does not support the requested critical extension. +. + +MessageId=8237 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CONFIDENTIALITY_REQUIRED +Language=Bulgarian +ERROR_DS_CONFIDENTIALITY_REQUIRED - This request requires a secure connection. +. + +MessageId=8238 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_INAPPROPRIATE_MATCHING +Language=Bulgarian +ERROR_DS_INAPPROPRIATE_MATCHING - Inappropriate matching. +. + +MessageId=8239 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CONSTRAINT_VIOLATION +Language=Bulgarian +ERROR_DS_CONSTRAINT_VIOLATION - A constraint violation occurred. +. + +MessageId=8240 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NO_SUCH_OBJECT +Language=Bulgarian +ERROR_DS_NO_SUCH_OBJECT - There is no such object on the server. +. + +MessageId=8241 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_ALIAS_PROBLEM +Language=Bulgarian +ERROR_DS_ALIAS_PROBLEM - There is an alias problem. +. + +MessageId=8242 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_INVALID_DN_SYNTAX +Language=Bulgarian +ERROR_DS_INVALID_DN_SYNTAX - An invalid dn syntax has been specified. +. + +MessageId=8243 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_IS_LEAF +Language=Bulgarian +ERROR_DS_IS_LEAF - The object is a leaf object. +. + +MessageId=8244 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_ALIAS_DEREF_PROBLEM +Language=Bulgarian +ERROR_DS_ALIAS_DEREF_PROBLEM - There is an alias dereferencing problem. +. + +MessageId=8245 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_UNWILLING_TO_PERFORM +Language=Bulgarian +ERROR_DS_UNWILLING_TO_PERFORM - The server is unwilling to process the request. +. + +MessageId=8246 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_LOOP_DETECT +Language=Bulgarian +ERROR_DS_LOOP_DETECT - A loop has been detected. +. + +MessageId=8247 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NAMING_VIOLATION +Language=Bulgarian +ERROR_DS_NAMING_VIOLATION - There is a naming violation. +. + +MessageId=8248 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_OBJECT_RESULTS_TOO_LARGE +Language=Bulgarian +ERROR_DS_OBJECT_RESULTS_TOO_LARGE - The result set is too large. +. + +MessageId=8249 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_AFFECTS_MULTIPLE_DSAS +Language=Bulgarian +ERROR_DS_AFFECTS_MULTIPLE_DSAS - The operation affects multiple DSAs +. + +MessageId=8250 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SERVER_DOWN +Language=Bulgarian +ERROR_DS_SERVER_DOWN - The server is not operational. +. + +MessageId=8251 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_LOCAL_ERROR +Language=Bulgarian +ERROR_DS_LOCAL_ERROR - A local error has occurred. +. + +MessageId=8252 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_ENCODING_ERROR +Language=Bulgarian +ERROR_DS_ENCODING_ERROR - An encoding error has occurred. +. + +MessageId=8253 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DECODING_ERROR +Language=Bulgarian +ERROR_DS_DECODING_ERROR - A decoding error has occurred. +. + +MessageId=8254 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_FILTER_UNKNOWN +Language=Bulgarian +ERROR_DS_FILTER_UNKNOWN - The search filter cannot be recognized. +. + +MessageId=8255 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_PARAM_ERROR +Language=Bulgarian +ERROR_DS_PARAM_ERROR - One or more parameters are illegal. +. + +MessageId=8256 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NOT_SUPPORTED +Language=Bulgarian +ERROR_DS_NOT_SUPPORTED - The specified method is not supported. +. + +MessageId=8257 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NO_RESULTS_RETURNED +Language=Bulgarian +ERROR_DS_NO_RESULTS_RETURNED - No results were returned. +. + +MessageId=8258 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CONTROL_NOT_FOUND +Language=Bulgarian +ERROR_DS_CONTROL_NOT_FOUND - The specified control is not supported by the server. +. + +MessageId=8259 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CLIENT_LOOP +Language=Bulgarian +ERROR_DS_CLIENT_LOOP - A referral loop was detected by the client. +. + +MessageId=8260 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_REFERRAL_LIMIT_EXCEEDED +Language=Bulgarian +ERROR_DS_REFERRAL_LIMIT_EXCEEDED - The preset referral limit was exceeded. +. + +MessageId=8261 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SORT_CONTROL_MISSING +Language=Bulgarian +ERROR_DS_SORT_CONTROL_MISSING - The search requires a SORT control. +. + +MessageId=8262 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_OFFSET_RANGE_ERROR +Language=Bulgarian +ERROR_DS_OFFSET_RANGE_ERROR - The search results exceed the offset range specified. +. + +MessageId=8301 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_ROOT_MUST_BE_NC +Language=Bulgarian +ERROR_DS_ROOT_MUST_BE_NC - The root object must be the head of a naming context. The root object cannot have an instantiated parent. +. + +MessageId=8302 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_ADD_REPLICA_INHIBITED +Language=Bulgarian +ERROR_DS_ADD_REPLICA_INHIBITED - The add replica operation cannot be performed. The naming context must be writeable in order to create the replica. +. + +MessageId=8303 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_ATT_NOT_DEF_IN_SCHEMA +Language=Bulgarian +ERROR_DS_ATT_NOT_DEF_IN_SCHEMA - A reference to an attribute that is not defined in the schema occurred. +. + +MessageId=8304 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_MAX_OBJ_SIZE_EXCEEDED +Language=Bulgarian +ERROR_DS_MAX_OBJ_SIZE_EXCEEDED - The maximum size of an object has been exceeded. +. + +MessageId=8305 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_OBJ_STRING_NAME_EXISTS +Language=Bulgarian +ERROR_DS_OBJ_STRING_NAME_EXISTS - An attempt was made to add an object to the directory with a name that is already in use. +. + +MessageId=8306 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NO_RDN_DEFINED_IN_SCHEMA +Language=Bulgarian +ERROR_DS_NO_RDN_DEFINED_IN_SCHEMA - An attempt was made to add an object of a class that does not have an RDN defined in the schema. +. + +MessageId=8307 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_RDN_DOESNT_MATCH_SCHEMA +Language=Bulgarian +ERROR_DS_RDN_DOESNT_MATCH_SCHEMA - An attempt was made to add an object using an RDN that is not the RDN defined in the schema. +. + +MessageId=8308 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NO_REQUESTED_ATTS_FOUND +Language=Bulgarian +ERROR_DS_NO_REQUESTED_ATTS_FOUND - None of the requested attributes were found on the objects. +. + +MessageId=8309 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_USER_BUFFER_TO_SMALL +Language=Bulgarian +ERROR_DS_USER_BUFFER_TO_SMALL - The user buffer is too small. +. + +MessageId=8310 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_ATT_IS_NOT_ON_OBJ +Language=Bulgarian +ERROR_DS_ATT_IS_NOT_ON_OBJ - The attribute specified in the operation is not present on the object. +. + +MessageId=8311 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_ILLEGAL_MOD_OPERATION +Language=Bulgarian +ERROR_DS_ILLEGAL_MOD_OPERATION - Illegal modify operation. Some aspect of the modification is not permitted. +. + +MessageId=8312 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_OBJ_TOO_LARGE +Language=Bulgarian +ERROR_DS_OBJ_TOO_LARGE - The specified object is too large. +. + +MessageId=8313 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_BAD_INSTANCE_TYPE +Language=Bulgarian +ERROR_DS_BAD_INSTANCE_TYPE - The specified instance type is not valid. +. + +MessageId=8314 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_MASTERDSA_REQUIRED +Language=Bulgarian +ERROR_DS_MASTERDSA_REQUIRED - The operation must be performed at a master DSA. +. + +MessageId=8315 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_OBJECT_CLASS_REQUIRED +Language=Bulgarian +ERROR_DS_OBJECT_CLASS_REQUIRED - The object class attribute must be specified. +. + +MessageId=8316 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_MISSING_REQUIRED_ATT +Language=Bulgarian +ERROR_DS_MISSING_REQUIRED_ATT - A required attribute is missing. +. + +MessageId=8317 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_ATT_NOT_DEF_FOR_CLASS +Language=Bulgarian +ERROR_DS_ATT_NOT_DEF_FOR_CLASS - An attempt was made to modify an object to include an attribute that is not legal for its class +. + +MessageId=8318 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_ATT_ALREADY_EXISTS +Language=Bulgarian +ERROR_DS_ATT_ALREADY_EXISTS - The specified attribute is already present on the object. +. + +MessageId=8320 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_ADD_ATT_VALUES +Language=Bulgarian +ERROR_DS_CANT_ADD_ATT_VALUES - The specified attribute is not present, or has no values. +. + +MessageId=8321 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SINGLE_VALUE_CONSTRAINT +Language=Bulgarian +ERROR_DS_SINGLE_VALUE_CONSTRAINT - Multiple values were specified for an attribute that can have only one value. +. + +MessageId=8322 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_RANGE_CONSTRAINT +Language=Bulgarian +ERROR_DS_RANGE_CONSTRAINT - A value for the attribute was not in the acceptable range of values. +. + +MessageId=8323 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_ATT_VAL_ALREADY_EXISTS +Language=Bulgarian +ERROR_DS_ATT_VAL_ALREADY_EXISTS - The specified value already exists. +. + +MessageId=8324 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_REM_MISSING_ATT +Language=Bulgarian +ERROR_DS_CANT_REM_MISSING_ATT - The attribute cannot be removed because it is not present on the object. +. + +MessageId=8325 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_REM_MISSING_ATT_VAL +Language=Bulgarian +ERROR_DS_CANT_REM_MISSING_ATT_VAL - The attribute value cannot be removed because it is not present on the object. +. + +MessageId=8326 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_ROOT_CANT_BE_SUBREF +Language=Bulgarian +ERROR_DS_ROOT_CANT_BE_SUBREF - The specified root object cannot be a subref. +. + +MessageId=8327 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NO_CHAINING +Language=Bulgarian +ERROR_DS_NO_CHAINING - Chaining is not permitted. +. + +MessageId=8328 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NO_CHAINED_EVAL +Language=Bulgarian +ERROR_DS_NO_CHAINED_EVAL - Chained evaluation is not permitted. +. + +MessageId=8329 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NO_PARENT_OBJECT +Language=Bulgarian +ERROR_DS_NO_PARENT_OBJECT - The operation could not be performed because the object's parent is either uninstantiated or deleted. +. + +MessageId=8330 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_PARENT_IS_AN_ALIAS +Language=Bulgarian +ERROR_DS_PARENT_IS_AN_ALIAS - Having a parent that is an alias is not permitted. Aliases are leaf objects. +. + +MessageId=8331 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_MIX_MASTER_AND_REPS +Language=Bulgarian +ERROR_DS_CANT_MIX_MASTER_AND_REPS - The object and parent must be of the same type, either both masters or both replicas. +. + +MessageId=8332 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CHILDREN_EXIST +Language=Bulgarian +ERROR_DS_CHILDREN_EXIST - The operation cannot be performed because child objects exist. This operation can only be performed on a leaf object. +. + +MessageId=8333 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_OBJ_NOT_FOUND +Language=Bulgarian +ERROR_DS_OBJ_NOT_FOUND - Directory object not found. +. + +MessageId=8334 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_ALIASED_OBJ_MISSING +Language=Bulgarian +ERROR_DS_ALIASED_OBJ_MISSING - The aliased object is missing. +. + +MessageId=8335 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_BAD_NAME_SYNTAX +Language=Bulgarian +ERROR_DS_BAD_NAME_SYNTAX - The object name has bad syntax. +. + +MessageId=8336 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_ALIAS_POINTS_TO_ALIAS +Language=Bulgarian +ERROR_DS_ALIAS_POINTS_TO_ALIAS - It is not permitted for an alias to refer to another alias. +. + +MessageId=8337 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_DEREF_ALIAS +Language=Bulgarian +ERROR_DS_CANT_DEREF_ALIAS - The alias cannot be dereferenced. +. + +MessageId=8338 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_OUT_OF_SCOPE +Language=Bulgarian +ERROR_DS_OUT_OF_SCOPE - The operation is out of scope. +. + +MessageId=8339 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_OBJECT_BEING_REMOVED +Language=Bulgarian +ERROR_DS_OBJECT_BEING_REMOVED - The operation cannot continue because the object is in the process of being removed. +. + +MessageId=8340 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_DELETE_DSA_OBJ +Language=Bulgarian +ERROR_DS_CANT_DELETE_DSA_OBJ - The DSA object cannot be deleted. +. + +MessageId=8341 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_GENERIC_ERROR +Language=Bulgarian +ERROR_DS_GENERIC_ERROR - A directory service error has occurred. +. + +MessageId=8342 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DSA_MUST_BE_INT_MASTER +Language=Bulgarian +ERROR_DS_DSA_MUST_BE_INT_MASTER - The operation can only be performed on an internal master DSA object. +. + +MessageId=8343 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CLASS_NOT_DSA +Language=Bulgarian +ERROR_DS_CLASS_NOT_DSA - The object must be of class DSA. +. + +MessageId=8344 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_INSUFF_ACCESS_RIGHTS +Language=Bulgarian +ERROR_DS_INSUFF_ACCESS_RIGHTS - Insufficient access rights to perform the operation. +. + +MessageId=8345 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_ILLEGAL_SUPERIOR +Language=Bulgarian +ERROR_DS_ILLEGAL_SUPERIOR - The object cannot be added because the parent is not on the list of possible superiors. +. + +MessageId=8346 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_ATTRIBUTE_OWNED_BY_SAM +Language=Bulgarian +ERROR_DS_ATTRIBUTE_OWNED_BY_SAM - Access to the attribute is not permitted because the attribute is owned by the Security Accounts Manager (SAM). +. + +MessageId=8347 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NAME_TOO_MANY_PARTS +Language=Bulgarian +ERROR_DS_NAME_TOO_MANY_PARTS - The name has too many parts. +. + +MessageId=8348 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NAME_TOO_LONG +Language=Bulgarian +ERROR_DS_NAME_TOO_LONG - The name is too long. +. + +MessageId=8349 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NAME_VALUE_TOO_LONG +Language=Bulgarian +ERROR_DS_NAME_VALUE_TOO_LONG - The name value is too long. +. + +MessageId=8350 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NAME_UNPARSEABLE +Language=Bulgarian +ERROR_DS_NAME_UNPARSEABLE - The directory service encountered an error parsing a name. +. + +MessageId=8351 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NAME_TYPE_UNKNOWN +Language=Bulgarian +ERROR_DS_NAME_TYPE_UNKNOWN - The directory service cannot get the attribute type for a name. +. + +MessageId=8352 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NOT_AN_OBJECT +Language=Bulgarian +ERROR_DS_NOT_AN_OBJECT - The name does not identify an object; the name identifies a phantom. +. + +MessageId=8353 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SEC_DESC_TOO_SHORT +Language=Bulgarian +ERROR_DS_SEC_DESC_TOO_SHORT - The security descriptor is too short. +. + +MessageId=8354 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SEC_DESC_INVALID +Language=Bulgarian +ERROR_DS_SEC_DESC_INVALID - The security descriptor is invalid. +. + +MessageId=8355 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NO_DELETED_NAME +Language=Bulgarian +ERROR_DS_NO_DELETED_NAME - Failed to create name for deleted object. +. + +MessageId=8356 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SUBREF_MUST_HAVE_PARENT +Language=Bulgarian +ERROR_DS_SUBREF_MUST_HAVE_PARENT - The parent of a new subref must exist. +. + +MessageId=8357 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NCNAME_MUST_BE_NC +Language=Bulgarian +ERROR_DS_NCNAME_MUST_BE_NC - The object must be a naming context. +. + +MessageId=8358 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_ADD_SYSTEM_ONLY +Language=Bulgarian +ERROR_DS_CANT_ADD_SYSTEM_ONLY - It is not permitted to add an attribute which is owned by the system. +. + +MessageId=8359 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CLASS_MUST_BE_CONCRETE +Language=Bulgarian +ERROR_DS_CLASS_MUST_BE_CONCRETE - The class of the object must be structural; you cannot instantiate an abstract class. +. + +MessageId=8360 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_INVALID_DMD +Language=Bulgarian +ERROR_DS_INVALID_DMD - The schema object could not be found. +. + +MessageId=8361 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_OBJ_GUID_EXISTS +Language=Bulgarian +ERROR_DS_OBJ_GUID_EXISTS - A local object with this GUID (dead or alive) already exists. +. + +MessageId=8362 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NOT_ON_BACKLINK +Language=Bulgarian +ERROR_DS_NOT_ON_BACKLINK - The operation cannot be performed on a back link. +. + +MessageId=8363 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NO_CROSSREF_FOR_NC +Language=Bulgarian +ERROR_DS_NO_CROSSREF_FOR_NC - The cross reference for the specified naming context could not be found. +. + +MessageId=8364 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SHUTTING_DOWN +Language=Bulgarian +ERROR_DS_SHUTTING_DOWN - The operation could not be performed because the directory service is shutting down. +. + +MessageId=8365 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_UNKNOWN_OPERATION +Language=Bulgarian +ERROR_DS_UNKNOWN_OPERATION - The directory service request is invalid. +. + +MessageId=8366 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_INVALID_ROLE_OWNER +Language=Bulgarian +ERROR_DS_INVALID_ROLE_OWNER - The role owner attribute could not be read. +. + +MessageId=8367 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_COULDNT_CONTACT_FSMO +Language=Bulgarian +ERROR_DS_COULDNT_CONTACT_FSMO - The requested FSMO operation failed. The current FSMO holder could not be reached. +. + +MessageId=8368 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CROSS_NC_DN_RENAME +Language=Bulgarian +ERROR_DS_CROSS_NC_DN_RENAME - Modification of a DN across a naming context is not permitted. +. + +MessageId=8369 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_MOD_SYSTEM_ONLY +Language=Bulgarian +ERROR_DS_CANT_MOD_SYSTEM_ONLY - The attribute cannot be modified because it is owned by the system. +. + +MessageId=8370 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_REPLICATOR_ONLY +Language=Bulgarian +ERROR_DS_REPLICATOR_ONLY - Only the replicator can perform this function. +. + +MessageId=8371 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_OBJ_CLASS_NOT_DEFINED +Language=Bulgarian +ERROR_DS_OBJ_CLASS_NOT_DEFINED - The specified class is not defined. +. + +MessageId=8372 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_OBJ_CLASS_NOT_SUBCLASS +Language=Bulgarian +ERROR_DS_OBJ_CLASS_NOT_SUBCLASS - The specified class is not a subclass. +. + +MessageId=8373 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NAME_REFERENCE_INVALID +Language=Bulgarian +ERROR_DS_NAME_REFERENCE_INVALID - The name reference is invalid. +. + +MessageId=8374 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CROSS_REF_EXISTS +Language=Bulgarian +ERROR_DS_CROSS_REF_EXISTS - A cross reference already exists. +. + +MessageId=8375 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_DEL_MASTER_CROSSREF +Language=Bulgarian +ERROR_DS_CANT_DEL_MASTER_CROSSREF - It is not permitted to delete a master cross reference. +. + +MessageId=8376 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SUBTREE_NOTIFY_NOT_NC_HEAD +Language=Bulgarian +ERROR_DS_SUBTREE_NOTIFY_NOT_NC_HEAD - Subtree notifications are only supported on NC heads. +. + +MessageId=8377 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NOTIFY_FILTER_TOO_COMPLEX +Language=Bulgarian +ERROR_DS_NOTIFY_FILTER_TOO_COMPLEX - Notification filter is too complex. +. + +MessageId=8378 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DUP_RDN +Language=Bulgarian +ERROR_DS_DUP_RDN - Schema update failed: duplicate RDN. +. + +MessageId=8379 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DUP_OID +Language=Bulgarian +ERROR_DS_DUP_OID - Schema update failed: duplicate OID +. + +MessageId=8380 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DUP_MAPI_ID +Language=Bulgarian +ERROR_DS_DUP_MAPI_ID - Schema update failed: duplicate MAPI identifier. +. + +MessageId=8381 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DUP_SCHEMA_ID_GUID +Language=Bulgarian +ERROR_DS_DUP_SCHEMA_ID_GUID - Schema update failed: duplicate schema-id GUID. +. + +MessageId=8382 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DUP_LDAP_DISPLAY_NAME +Language=Bulgarian +ERROR_DS_DUP_LDAP_DISPLAY_NAME - Schema update failed: duplicate LDAP display name. +. + +MessageId=8383 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SEMANTIC_ATT_TEST +Language=Bulgarian +ERROR_DS_SEMANTIC_ATT_TEST - Schema update failed: range-lower less than range upper +. + +MessageId=8384 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SYNTAX_MISMATCH +Language=Bulgarian +ERROR_DS_SYNTAX_MISMATCH - Schema update failed: syntax mismatch +. + +MessageId=8385 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_EXISTS_IN_MUST_HAVE +Language=Bulgarian +ERROR_DS_EXISTS_IN_MUST_HAVE - Schema deletion failed: attribute is used in must-contain +. + +MessageId=8386 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_EXISTS_IN_MAY_HAVE +Language=Bulgarian +ERROR_DS_EXISTS_IN_MAY_HAVE - Schema deletion failed: attribute is used in may-contain +. + +MessageId=8387 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NONEXISTENT_MAY_HAVE +Language=Bulgarian +ERROR_DS_NONEXISTENT_MAY_HAVE - Schema update failed: attribute in may-contain does not exist +. + +MessageId=8388 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NONEXISTENT_MUST_HAVE +Language=Bulgarian +ERROR_DS_NONEXISTENT_MUST_HAVE - Schema update failed: attribute in must-contain does not exist +. + +MessageId=8389 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_AUX_CLS_TEST_FAIL +Language=Bulgarian +ERROR_DS_AUX_CLS_TEST_FAIL - Schema update failed: class in aux-class list does not exist or is not an auxiliary class +. + +MessageId=8390 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NONEXISTENT_POSS_SUP +Language=Bulgarian +ERROR_DS_NONEXISTENT_POSS_SUP - Schema update failed: class in poss-superiors does not exist +. + +MessageId=8391 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SUB_CLS_TEST_FAIL +Language=Bulgarian +ERROR_DS_SUB_CLS_TEST_FAIL - Schema update failed: class in subclassof list does not exist or does not satisfy hierarchy rules +. + +MessageId=8392 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_BAD_RDN_ATT_ID_SYNTAX +Language=Bulgarian +ERROR_DS_BAD_RDN_ATT_ID_SYNTAX - Schema update failed: Rdn-Att-Id has wrong syntax +. + +MessageId=8393 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_EXISTS_IN_AUX_CLS +Language=Bulgarian +ERROR_DS_EXISTS_IN_AUX_CLS - Schema deletion failed: class is used as auxiliary class +. + +MessageId=8394 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_EXISTS_IN_SUB_CLS +Language=Bulgarian +ERROR_DS_EXISTS_IN_SUB_CLS - Schema deletion failed: class is used as sub class +. + +MessageId=8395 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_EXISTS_IN_POSS_SUP +Language=Bulgarian +ERROR_DS_EXISTS_IN_POSS_SUP - Schema deletion failed: class is used as poss superior +. + +MessageId=8396 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_RECALCSCHEMA_FAILED +Language=Bulgarian +ERROR_DS_RECALCSCHEMA_FAILED - Schema update failed in recalculating validation cache. +. + +MessageId=8397 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_TREE_DELETE_NOT_FINISHED +Language=Bulgarian +ERROR_DS_TREE_DELETE_NOT_FINISHED - The tree deletion is not finished. +. + +MessageId=8398 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_DELETE +Language=Bulgarian +ERROR_DS_CANT_DELETE - The requested delete operation could not be performed. +. + +MessageId=8399 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_ATT_SCHEMA_REQ_ID +Language=Bulgarian +ERROR_DS_ATT_SCHEMA_REQ_ID - Cannot read the governs class identifier for the schema record. +. + +MessageId=8400 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_BAD_ATT_SCHEMA_SYNTAX +Language=Bulgarian +ERROR_DS_BAD_ATT_SCHEMA_SYNTAX - The attribute schema has bad syntax. +. + +MessageId=8401 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_CACHE_ATT +Language=Bulgarian +ERROR_DS_CANT_CACHE_ATT - The attribute could not be cached. +. + +MessageId=8402 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_CACHE_CLASS +Language=Bulgarian +ERROR_DS_CANT_CACHE_CLASS - The class could not be cached. +. + +MessageId=8403 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_REMOVE_ATT_CACHE +Language=Bulgarian +ERROR_DS_CANT_REMOVE_ATT_CACHE - The attribute could not be removed from the cache. +. + +MessageId=8404 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_REMOVE_CLASS_CACHE +Language=Bulgarian +ERROR_DS_CANT_REMOVE_CLASS_CACHE - The class could not be removed from the cache. +. + +MessageId=8405 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_RETRIEVE_DN +Language=Bulgarian +ERROR_DS_CANT_RETRIEVE_DN - The distinguished name attribute could not be read. +. + +MessageId=8406 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_MISSING_SUPREF +Language=Bulgarian +ERROR_DS_MISSING_SUPREF - No superior reference has been configured for the directory service. The directory service is therefore unable to issue referrals to objects outside this forest. +. + +MessageId=8407 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_RETRIEVE_INSTANCE +Language=Bulgarian +ERROR_DS_CANT_RETRIEVE_INSTANCE - The instance type attribute could not be retrieved. +. + +MessageId=8408 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CODE_INCONSISTENCY +Language=Bulgarian +ERROR_DS_CODE_INCONSISTENCY - An internal error has occurred. +. + +MessageId=8409 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DATABASE_ERROR +Language=Bulgarian +ERROR_DS_DATABASE_ERROR - A database error has occurred. +. + +MessageId=8410 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_GOVERNSID_MISSING +Language=Bulgarian +ERROR_DS_GOVERNSID_MISSING - The attribute GOVERNSID is missing. +. + +MessageId=8411 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_MISSING_EXPECTED_ATT +Language=Bulgarian +ERROR_DS_MISSING_EXPECTED_ATT - An expected attribute is missing. +. + +MessageId=8412 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NCNAME_MISSING_CR_REF +Language=Bulgarian +ERROR_DS_NCNAME_MISSING_CR_REF - The specified naming context is missing a cross reference. +. + +MessageId=8413 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SECURITY_CHECKING_ERROR +Language=Bulgarian +ERROR_DS_SECURITY_CHECKING_ERROR - A security checking error has occurred. +. + +MessageId=8414 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SCHEMA_NOT_LOADED +Language=Bulgarian +ERROR_DS_SCHEMA_NOT_LOADED - The schema is not loaded. +. + +MessageId=8415 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SCHEMA_ALLOC_FAILED +Language=Bulgarian +ERROR_DS_SCHEMA_ALLOC_FAILED - Schema allocation failed. Please check if the machine is running low on memory. +. + +MessageId=8416 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_ATT_SCHEMA_REQ_SYNTAX +Language=Bulgarian +ERROR_DS_ATT_SCHEMA_REQ_SYNTAX - Failed to obtain the required syntax for the attribute schema. +. + +MessageId=8417 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_GCVERIFY_ERROR +Language=Bulgarian +ERROR_DS_GCVERIFY_ERROR - The global catalog verification failed. The global catalog is not available or does not support the operation. Some part of the directory is currently not available. +. + +MessageId=8418 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_SCHEMA_MISMATCH +Language=Bulgarian +ERROR_DS_DRA_SCHEMA_MISMATCH - The replication operation failed because of a schema mismatch between the servers involved. +. + +MessageId=8419 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_FIND_DSA_OBJ +Language=Bulgarian +ERROR_DS_CANT_FIND_DSA_OBJ - The DSA object could not be found. +. + +MessageId=8420 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_FIND_EXPECTED_NC +Language=Bulgarian +ERROR_DS_CANT_FIND_EXPECTED_NC - The naming context could not be found. +. + +MessageId=8421 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_FIND_NC_IN_CACHE +Language=Bulgarian +ERROR_DS_CANT_FIND_NC_IN_CACHE - The naming context could not be found in the cache. +. + +MessageId=8422 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_RETRIEVE_CHILD +Language=Bulgarian +ERROR_DS_CANT_RETRIEVE_CHILD - The child object could not be retrieved. +. + +MessageId=8423 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SECURITY_ILLEGAL_MODIFY +Language=Bulgarian +ERROR_DS_SECURITY_ILLEGAL_MODIFY - The modification was not permitted for security reasons. +. + +MessageId=8424 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_REPLACE_HIDDEN_REC +Language=Bulgarian +ERROR_DS_CANT_REPLACE_HIDDEN_REC - The operation cannot replace the hidden record. +. + +MessageId=8425 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_BAD_HIERARCHY_FILE +Language=Bulgarian +ERROR_DS_BAD_HIERARCHY_FILE - The hierarchy file is invalid. +. + +MessageId=8426 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_BUILD_HIERARCHY_TABLE_FAILED +Language=Bulgarian +ERROR_DS_BUILD_HIERARCHY_TABLE_FAILED - The attempt to build the hierarchy table failed. +. + +MessageId=8427 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CONFIG_PARAM_MISSING +Language=Bulgarian +ERROR_DS_CONFIG_PARAM_MISSING - The directory configuration parameter is missing from the registry. +. + +MessageId=8428 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_COUNTING_AB_INDICES_FAILED +Language=Bulgarian +ERROR_DS_COUNTING_AB_INDICES_FAILED - The attempt to count the address book indices failed. +. + +MessageId=8429 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_HIERARCHY_TABLE_MALLOC_FAILED +Language=Bulgarian +ERROR_DS_HIERARCHY_TABLE_MALLOC_FAILED - The allocation of the hierarchy table failed. +. + +MessageId=8430 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_INTERNAL_FAILURE +Language=Bulgarian +ERROR_DS_INTERNAL_FAILURE - The directory service encountered an internal failure. +. + +MessageId=8431 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_UNKNOWN_ERROR +Language=Bulgarian +ERROR_DS_UNKNOWN_ERROR - The directory service encountered an unknown failure. +. + +MessageId=8432 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_ROOT_REQUIRES_CLASS_TOP +Language=Bulgarian +ERROR_DS_ROOT_REQUIRES_CLASS_TOP - A root object requires a class of 'top'. +. + +MessageId=8433 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_REFUSING_FSMO_ROLES +Language=Bulgarian +ERROR_DS_REFUSING_FSMO_ROLES - This directory server is shutting down, and cannot take ownership of new floating single-master operation roles. +. + +MessageId=8434 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_MISSING_FSMO_SETTINGS +Language=Bulgarian +ERROR_DS_MISSING_FSMO_SETTINGS - The directory service is missing mandatory configuration information, and is unable to determine the ownership of floating single-master operation roles. +. + +MessageId=8435 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_UNABLE_TO_SURRENDER_ROLES +Language=Bulgarian +ERROR_DS_UNABLE_TO_SURRENDER_ROLES - The directory service was unable to transfer ownership of one or more floating single-master operation roles to other servers. +. + +MessageId=8436 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_GENERIC +Language=Bulgarian +ERROR_DS_DRA_GENERIC - The replication operation failed. +. + +MessageId=8437 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_INVALID_PARAMETER +Language=Bulgarian +ERROR_DS_DRA_INVALID_PARAMETER - An invalid parameter was specified for this replication operation. +. + +MessageId=8438 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_BUSY +Language=Bulgarian +ERROR_DS_DRA_BUSY - The directory service is too busy to complete the replication operation at this time. +. + +MessageId=8439 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_BAD_DN +Language=Bulgarian +ERROR_DS_DRA_BAD_DN - The distinguished name specified for this replication operation is invalid. +. + +MessageId=8440 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_BAD_NC +Language=Bulgarian +ERROR_DS_DRA_BAD_NC - The naming context specified for this replication operation is invalid. +. + +MessageId=8441 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_DN_EXISTS +Language=Bulgarian +ERROR_DS_DRA_DN_EXISTS - The distinguished name specified for this replication operation already exists. +. + +MessageId=8442 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_INTERNAL_ERROR +Language=Bulgarian +ERROR_DS_DRA_INTERNAL_ERROR - The replication system encountered an internal error. +. + +MessageId=8443 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_INCONSISTENT_DIT +Language=Bulgarian +ERROR_DS_DRA_INCONSISTENT_DIT - The replication operation encountered a database inconsistency. +. + +MessageId=8444 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_CONNECTION_FAILED +Language=Bulgarian +ERROR_DS_DRA_CONNECTION_FAILED - The server specified for this replication operation could not be contacted. +. + +MessageId=8445 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_BAD_INSTANCE_TYPE +Language=Bulgarian +ERROR_DS_DRA_BAD_INSTANCE_TYPE - The replication operation encountered an object with an invalid instance type. +. + +MessageId=8446 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_OUT_OF_MEM +Language=Bulgarian +ERROR_DS_DRA_OUT_OF_MEM - The replication operation failed to allocate memory. +. + +MessageId=8447 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_MAIL_PROBLEM +Language=Bulgarian +ERROR_DS_DRA_MAIL_PROBLEM - The replication operation encountered an error with the mail system. +. + +MessageId=8448 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_REF_ALREADY_EXISTS +Language=Bulgarian +ERROR_DS_DRA_REF_ALREADY_EXISTS - The replication reference information for the target server already exists. +. + +MessageId=8449 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_REF_NOT_FOUND +Language=Bulgarian +ERROR_DS_DRA_REF_NOT_FOUND - The replication reference information for the target server does not exist. +. + +MessageId=8450 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_OBJ_IS_REP_SOURCE +Language=Bulgarian +ERROR_DS_DRA_OBJ_IS_REP_SOURCE - The naming context cannot be removed because it is replicated to another server. +. + +MessageId=8451 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_DB_ERROR +Language=Bulgarian +ERROR_DS_DRA_DB_ERROR - The replication operation encountered a database error. +. + +MessageId=8452 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_NO_REPLICA +Language=Bulgarian +ERROR_DS_DRA_NO_REPLICA - The naming context is in the process of being removed or is not replicated from the specified server. +. + +MessageId=8453 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_ACCESS_DENIED +Language=Bulgarian +ERROR_DS_DRA_ACCESS_DENIED - Replication access was denied. +. + +MessageId=8454 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_NOT_SUPPORTED +Language=Bulgarian +ERROR_DS_DRA_NOT_SUPPORTED - The requested operation is not supported by this version of the directory service. +. + +MessageId=8455 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_RPC_CANCELLED +Language=Bulgarian +ERROR_DS_DRA_RPC_CANCELLED - The replication remote procedure call was cancelled. +. + +MessageId=8456 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_SOURCE_DISABLED +Language=Bulgarian +ERROR_DS_DRA_SOURCE_DISABLED - The source server is currently rejecting replication requests. +. + +MessageId=8457 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_SINK_DISABLED +Language=Bulgarian +ERROR_DS_DRA_SINK_DISABLED - The destination server is currently rejecting replication requests. +. + +MessageId=8458 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_NAME_COLLISION +Language=Bulgarian +ERROR_DS_DRA_NAME_COLLISION - The replication operation failed due to a collision of object names. +. + +MessageId=8459 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_SOURCE_REINSTALLED +Language=Bulgarian +ERROR_DS_DRA_SOURCE_REINSTALLED - The replication source has been reinstalled. +. + +MessageId=8460 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_MISSING_PARENT +Language=Bulgarian +ERROR_DS_DRA_MISSING_PARENT - The replication operation failed because a required parent object is missing. +. + +MessageId=8461 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_PREEMPTED +Language=Bulgarian +ERROR_DS_DRA_PREEMPTED - The replication operation was preempted. +. + +MessageId=8462 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_ABANDON_SYNC +Language=Bulgarian +ERROR_DS_DRA_ABANDON_SYNC - The replication synchronization attempt was abandoned because of a lack of updates. +. + +MessageId=8463 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_SHUTDOWN +Language=Bulgarian +ERROR_DS_DRA_SHUTDOWN - The replication operation was terminated because the system is shutting down. +. + +MessageId=8464 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_INCOMPATIBLE_PARTIAL_SET +Language=Bulgarian +ERROR_DS_DRA_INCOMPATIBLE_PARTIAL_SET - Synchronization attempt failed because the destination DC is currently waiting to synchronize new partial attributes from source. This condition is normal if a recent schema change modified the partial attribute set. The destination partial attribute set is not a subset of the source partial attribute set. +. + +MessageId=8465 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_SOURCE_IS_PARTIAL_REPLICA +Language=Bulgarian +ERROR_DS_DRA_SOURCE_IS_PARTIAL_REPLICA - The replication synchronization attempt failed because a master replica attempted to sync from a partial replica. +. + +MessageId=8466 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_EXTN_CONNECTION_FAILED +Language=Bulgarian +ERROR_DS_DRA_EXTN_CONNECTION_FAILED - The server specified for this replication operation was contacted, but that server was unable to contact an additional server needed to complete the operation. +. + +MessageId=8467 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_INSTALL_SCHEMA_MISMATCH +Language=Bulgarian +ERROR_DS_INSTALL_SCHEMA_MISMATCH - The version of the Active Directory schema of the source forest is not compatible with the version of Active Directory on this computer. +. + +MessageId=8468 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DUP_LINK_ID +Language=Bulgarian +ERROR_DS_DUP_LINK_ID - Schema update failed: An attribute with the same link identifier already exists. +. + +MessageId=8469 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NAME_ERROR_RESOLVING +Language=Bulgarian +ERROR_DS_NAME_ERROR_RESOLVING - Name translation: Generic processing error. +. + +MessageId=8470 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NAME_ERROR_NOT_FOUND +Language=Bulgarian +ERROR_DS_NAME_ERROR_NOT_FOUND - Name translation: Could not find the name or insufficient right to see name. +. + +MessageId=8471 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NAME_ERROR_NOT_UNIQUE +Language=Bulgarian +ERROR_DS_NAME_ERROR_NOT_UNIQUE - Name translation: Input name mapped to more than one output name. +. + +MessageId=8472 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NAME_ERROR_NO_MAPPING +Language=Bulgarian +ERROR_DS_NAME_ERROR_NO_MAPPING - Name translation: Input name found, but not the associated output format. +. + +MessageId=8473 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NAME_ERROR_DOMAIN_ONLY +Language=Bulgarian +ERROR_DS_NAME_ERROR_DOMAIN_ONLY - Name translation: Unable to resolve completely, only the domain was found. +. + +MessageId=8474 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING +Language=Bulgarian +ERROR_DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING - Name translation: Unable to perform purely syntactical mapping at the client without going out to the wire. +. + +MessageId=8475 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CONSTRUCTED_ATT_MOD +Language=Bulgarian +ERROR_DS_CONSTRUCTED_ATT_MOD - Modification of a constructed attribute is not allowed. +. + +MessageId=8476 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_WRONG_OM_OBJ_CLASS +Language=Bulgarian +ERROR_DS_WRONG_OM_OBJ_CLASS - The OM-Object-Class specified is incorrect for an attribute with the specified syntax. +. + +MessageId=8477 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_REPL_PENDING +Language=Bulgarian +ERROR_DS_DRA_REPL_PENDING - The replication request has been posted; waiting for reply. +. + +MessageId=8478 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DS_REQUIRED +Language=Bulgarian +ERROR_DS_DS_REQUIRED - The requested operation requires a directory service, and none was available. +. + +MessageId=8479 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_INVALID_LDAP_DISPLAY_NAME +Language=Bulgarian +ERROR_DS_INVALID_LDAP_DISPLAY_NAME - The LDAP display name of the class or attribute contains non-ASCII characters. +. + +MessageId=8480 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NON_BASE_SEARCH +Language=Bulgarian +ERROR_DS_NON_BASE_SEARCH - The requested search operation is only supported for base searches. +. + +MessageId=8481 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_RETRIEVE_ATTS +Language=Bulgarian +ERROR_DS_CANT_RETRIEVE_ATTS - The search failed to retrieve attributes from the database. +. + +MessageId=8482 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_BACKLINK_WITHOUT_LINK +Language=Bulgarian +ERROR_DS_BACKLINK_WITHOUT_LINK - The schema update operation tried to add a backward link attribute that has no corresponding forward link. +. + +MessageId=8483 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_EPOCH_MISMATCH +Language=Bulgarian +ERROR_DS_EPOCH_MISMATCH - Source and destination of a cross domain move do not agree on the object's epoch number. Either source or destination does not have the latest version of the object. +. + +MessageId=8484 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SRC_NAME_MISMATCH +Language=Bulgarian +ERROR_DS_SRC_NAME_MISMATCH - Source and destination of a cross domain move do not agree on the object's current name. Either source or destination does not have the latest version of the object. +. + +MessageId=8485 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SRC_AND_DST_NC_IDENTICAL +Language=Bulgarian +ERROR_DS_SRC_AND_DST_NC_IDENTICAL - Source and destination of a cross domain move operation are identical. Caller should use local move operation instead of cross domain move operation. +. + +MessageId=8486 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DST_NC_MISMATCH +Language=Bulgarian +ERROR_DS_DST_NC_MISMATCH - Source and destination for a cross domain move are not in agreement on the naming contexts in the forest. Either source or destination does not have the latest version of the Partitions container. +. + +MessageId=8487 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NOT_AUTHORITIVE_FOR_DST_NC +Language=Bulgarian +ERROR_DS_NOT_AUTHORITIVE_FOR_DST_NC - Destination of a cross domain move is not authoritative for the destination naming context. +. + +MessageId=8488 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SRC_GUID_MISMATCH +Language=Bulgarian +ERROR_DS_SRC_GUID_MISMATCH - Source and destination of a cross domain move do not agree on the identity of the source object. Either source or destination does not have the latest version of the source object. +. + +MessageId=8489 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_MOVE_DELETED_OBJECT +Language=Bulgarian +ERROR_DS_CANT_MOVE_DELETED_OBJECT - Object being moved across domains is already known to be deleted by the destination server. The source server does not have the latest version of the source object. +. + +MessageId=8490 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_PDC_OPERATION_IN_PROGRESS +Language=Bulgarian +ERROR_DS_PDC_OPERATION_IN_PROGRESS - Another operation, which requires exclusive access to the PDC PSMO, is already in progress. +. + +MessageId=8491 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CROSS_DOMAIN_CLEANUP_REQD +Language=Bulgarian +ERROR_DS_CROSS_DOMAIN_CLEANUP_REQD - A cross domain move operation failed such that the two versions of the moved object exist - one each in the source and destination domains. The destination object needs to be removed to restore the system to a consistent state. +. + +MessageId=8492 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_ILLEGAL_XDOM_MOVE_OPERATION +Language=Bulgarian +ERROR_DS_ILLEGAL_XDOM_MOVE_OPERATION - This object may not be moved across domain boundaries either because cross domain moves for this class are disallowed, or the object has some special characteristics, e.g.: trust account or restricted RID, which prevent its move. +. + +MessageId=8493 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_WITH_ACCT_GROUP_MEMBERSHPS +Language=Bulgarian +ERROR_DS_CANT_WITH_ACCT_GROUP_MEMBERSHPS - Can't move objects with memberships across domain boundaries as once moved, this would violate the membership conditions of the account group. Remove the object from any account group memberships and retry. +. + +MessageId=8494 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NC_MUST_HAVE_NC_PARENT +Language=Bulgarian +ERROR_DS_NC_MUST_HAVE_NC_PARENT - A naming context head must be the immediate child of another naming context head, not of an interior node. +. + +MessageId=8495 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE +Language=Bulgarian +ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE - The directory cannot validate the proposed naming context name because it does not hold a replica of the naming context above the proposed naming context. Please ensure that the domain naming master role is held by a server that is configured as a global catalog server, and that the server is up to date with its replication partners. (Applies only to Windows 2000 Domain Naming masters) +. + +MessageId=8496 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DST_DOMAIN_NOT_NATIVE +Language=Bulgarian +ERROR_DS_DST_DOMAIN_NOT_NATIVE - Destination domain must be in native mode. +. + +MessageId=8497 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_MISSING_INFRASTRUCTURE_CONTAINER +Language=Bulgarian +ERROR_DS_MISSING_INFRASTRUCTURE_CONTAINER - The operation cannot be performed because the server does not have an infrastructure container in the domain of interest. +. + +MessageId=8498 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_MOVE_ACCOUNT_GROUP +Language=Bulgarian +ERROR_DS_CANT_MOVE_ACCOUNT_GROUP - Cross-domain move of non-empty account groups is not allowed. +. + +MessageId=8499 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_MOVE_RESOURCE_GROUP +Language=Bulgarian +ERROR_DS_CANT_MOVE_RESOURCE_GROUP - Cross-domain move of non-empty resource groups is not allowed. +. + +MessageId=8500 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_INVALID_SEARCH_FLAG +Language=Bulgarian +ERROR_DS_INVALID_SEARCH_FLAG - The search flags for the attribute are invalid. The ANR bit is valid only on attributes of Unicode or Teletex strings. +. + +MessageId=8501 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NO_TREE_DELETE_ABOVE_NC +Language=Bulgarian +ERROR_DS_NO_TREE_DELETE_ABOVE_NC - Tree deletions starting at an object which has an NC head as a descendant are not allowed. +. + +MessageId=8502 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_COULDNT_LOCK_TREE_FOR_DELETE +Language=Bulgarian +ERROR_DS_COULDNT_LOCK_TREE_FOR_DELETE - The directory service failed to lock a tree in preparation for a tree deletion because the tree was in use. +. + +MessageId=8503 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_COULDNT_IDENTIFY_OBJECTS_FOR_TREE_DELETE +Language=Bulgarian +ERROR_DS_COULDNT_IDENTIFY_OBJECTS_FOR_TREE_DELETE - The directory service failed to identify the list of objects to delete while attempting a tree deletion. +. + +MessageId=8504 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SAM_INIT_FAILURE +Language=Bulgarian +ERROR_DS_SAM_INIT_FAILURE - Security Accounts Manager initialization failed because of the following error: %1. +Error Status: 0x%2. Click OK to shut down the system and reboot into Directory Services Restore Mode. Check the event log for detailed information. +. + +MessageId=8505 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SENSITIVE_GROUP_VIOLATION +Language=Bulgarian +ERROR_DS_SENSITIVE_GROUP_VIOLATION - Only an administrator can modify the membership list of an administrative group. +. + +MessageId=8506 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_MOD_PRIMARYGROUPID +Language=Bulgarian +ERROR_DS_CANT_MOD_PRIMARYGROUPID - Cannot change the primary group ID of a domain controller account. +. + +MessageId=8507 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_ILLEGAL_BASE_SCHEMA_MOD +Language=Bulgarian +ERROR_DS_ILLEGAL_BASE_SCHEMA_MOD - An attempt is made to modify the base schema. +. + +MessageId=8508 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NONSAFE_SCHEMA_CHANGE +Language=Bulgarian +ERROR_DS_NONSAFE_SCHEMA_CHANGE - Adding a new mandatory attribute to an existing class, deleting a mandatory attribute from an existing class, or adding an optional attribute to the special class Top that is not a backlink attribute (directly or through inheritance, for example, by adding or deleting an auxiliary class) is not allowed. +. + +MessageId=8509 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SCHEMA_UPDATE_DISALLOWED +Language=Bulgarian +ERROR_DS_SCHEMA_UPDATE_DISALLOWED - Schema update is not allowed on this DC because the DC is not the schema FSMO Role Owner. +. + +MessageId=8510 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_CREATE_UNDER_SCHEMA +Language=Bulgarian +ERROR_DS_CANT_CREATE_UNDER_SCHEMA - An object of this class cannot be created under the schema container. You can only create attribute-schema and class-schema objects under the schema container. +. + +MessageId=8511 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_INSTALL_NO_SRC_SCH_VERSION +Language=Bulgarian +ERROR_DS_INSTALL_NO_SRC_SCH_VERSION - The replica/child install failed to get the objectVersion attribute on the schema container on the source DC. Either the attribute is missing on the schema container or the credentials supplied do not have permission to read it. +. + +MessageId=8512 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_INSTALL_NO_SCH_VERSION_IN_INIFILE +Language=Bulgarian +ERROR_DS_INSTALL_NO_SCH_VERSION_IN_INIFILE - The replica/child install failed to read the objectVersion attribute in the SCHEMA section of the file schema.ini in the system32 directory. +. + +MessageId=8513 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_INVALID_GROUP_TYPE +Language=Bulgarian +ERROR_DS_INVALID_GROUP_TYPE - The specified group type is invalid. +. + +MessageId=8514 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN +Language=Bulgarian +ERROR_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN - Cannot nest global groups in a mixed domain if the group is security-enabled. +. + +MessageId=8515 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN +Language=Bulgarian +ERROR_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN - Cannot nest local groups in a mixed domain if the group is security-enabled. +. + +MessageId=8516 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER +Language=Bulgarian +ERROR_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER - A global group cannot have a local group as a member. +. + +MessageId=8517 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER +Language=Bulgarian +ERROR_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER - A global group cannot have a universal group as a member. +. + +MessageId=8518 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER +Language=Bulgarian +ERROR_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER - A universal group cannot have a local group as a member. +. + +MessageId=8519 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER +Language=Bulgarian +ERROR_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER - A global group cannot have a cross-domain member. +. + +MessageId=8520 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER +Language=Bulgarian +ERROR_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER - A local group cannot have another cross-domain local group as a member. +. + +MessageId=8521 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_HAVE_PRIMARY_MEMBERS +Language=Bulgarian +ERROR_DS_HAVE_PRIMARY_MEMBERS - A group with primary members cannot change to a security-disabled group. +. + +MessageId=8522 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_STRING_SD_CONVERSION_FAILED +Language=Bulgarian +ERROR_DS_STRING_SD_CONVERSION_FAILED - The schema cache load failed to convert the string default SD on a class-schema object. +. + +MessageId=8523 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NAMING_MASTER_GC +Language=Bulgarian +ERROR_DS_NAMING_MASTER_GC - Only DSAs configured to be Global Catalog servers should be allowed to hold the Domain Naming Master FSMO role. (Applies only to Windows 2000 servers) +. + +MessageId=8524 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_LOOKUP_FAILURE +Language=Bulgarian +ERROR_DS_LOOKUP_FAILURE - The DSA operation is unable to proceed because of a DNS lookup failure. +. + +MessageId=8525 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_COULDNT_UPDATE_SPNS +Language=Bulgarian +ERROR_DS_COULDNT_UPDATE_SPNS - While processing a change to the DNS Host Name for an object, the Service Principal Name values could not be kept in sync. +. + +MessageId=8526 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_RETRIEVE_SD +Language=Bulgarian +ERROR_DS_CANT_RETRIEVE_SD - The Security Descriptor attribute could not be read. +. + +MessageId=8527 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_KEY_NOT_UNIQUE +Language=Bulgarian +ERROR_DS_KEY_NOT_UNIQUE - The object requested was not found, but an object with that key was found. +. + +MessageId=8528 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_WRONG_LINKED_ATT_SYNTAX +Language=Bulgarian +ERROR_DS_WRONG_LINKED_ATT_SYNTAX - The syntax of the linked attributed being added is incorrect. Forward links can only have syntax 2.5.5.1, 2.5.5.7, and 2.5.5.14, and backlinks can only have syntax 2.5.5.1. +. + +MessageId=8529 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SAM_NEED_BOOTKEY_PASSWORD +Language=Bulgarian +ERROR_DS_SAM_NEED_BOOTKEY_PASSWORD - Security Account Manager needs to get the boot password. +. + +MessageId=8530 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SAM_NEED_BOOTKEY_FLOPPY +Language=Bulgarian +ERROR_DS_SAM_NEED_BOOTKEY_FLOPPY - Security Account Manager needs to get the boot key from floppy disk. +. + +MessageId=8531 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_START +Language=Bulgarian +ERROR_DS_CANT_START - Directory Service cannot start. +. + +MessageId=8532 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_INIT_FAILURE +Language=Bulgarian +ERROR_DS_INIT_FAILURE - Directory Services could not start. +. + +MessageId=8533 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NO_PKT_PRIVACY_ON_CONNECTION +Language=Bulgarian +ERROR_DS_NO_PKT_PRIVACY_ON_CONNECTION - The connection between client and server requires packet privacy or better. +. + +MessageId=8534 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SOURCE_DOMAIN_IN_FOREST +Language=Bulgarian +ERROR_DS_SOURCE_DOMAIN_IN_FOREST - The source domain may not be in the same forest as destination. +. + +MessageId=8535 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DESTINATION_DOMAIN_NOT_IN_FOREST +Language=Bulgarian +ERROR_DS_DESTINATION_DOMAIN_NOT_IN_FOREST - The destination domain must be in the forest. +. + +MessageId=8536 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DESTINATION_AUDITING_NOT_ENABLED +Language=Bulgarian +ERROR_DS_DESTINATION_AUDITING_NOT_ENABLED - The operation requires that destination domain auditing be enabled. +. + +MessageId=8537 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_FIND_DC_FOR_SRC_DOMAIN +Language=Bulgarian +ERROR_DS_CANT_FIND_DC_FOR_SRC_DOMAIN - The operation couldn't locate a DC for the source domain. +. + +MessageId=8538 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SRC_OBJ_NOT_GROUP_OR_USER +Language=Bulgarian +ERROR_DS_SRC_OBJ_NOT_GROUP_OR_USER - The source object must be a group or user. +. + +MessageId=8539 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SRC_SID_EXISTS_IN_FOREST +Language=Bulgarian +ERROR_DS_SRC_SID_EXISTS_IN_FOREST - The source object's SID already exists in destination forest. +. + +MessageId=8540 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SRC_AND_DST_OBJECT_CLASS_MISMATCH +Language=Bulgarian +ERROR_DS_SRC_AND_DST_OBJECT_CLASS_MISMATCH - The source and destination object must be of the same type. +. + +MessageId=8541 +Severity=Success +Facility=System +SymbolicName=ERROR_SAM_INIT_FAILURE +Language=Bulgarian +ERROR_SAM_INIT_FAILURE - Security Accounts Manager initialization failed because of the following error: %1. +Error Status: 0x%2. Click OK to shut down the system and reboot into Safe Mode. Check the event log for detailed information. +. + +MessageId=8542 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_SCHEMA_INFO_SHIP +Language=Bulgarian +ERROR_DS_DRA_SCHEMA_INFO_SHIP - Schema information could not be included in the replication request. +. + +MessageId=8543 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_SCHEMA_CONFLICT +Language=Bulgarian +ERROR_DS_DRA_SCHEMA_CONFLICT - The replication operation could not be completed due to a schema incompatibility. +. + +MessageId=8544 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_EARLIER_SCHEMA_CONLICT +Language=Bulgarian +ERROR_DS_DRA_EARLIER_SCHEMA_CONLICT - The replication operation could not be completed due to a previous schema incompatibility. +. + +MessageId=8545 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_OBJ_NC_MISMATCH +Language=Bulgarian +ERROR_DS_DRA_OBJ_NC_MISMATCH - The replication update could not be applied because either the source or the destination has not yet received information regarding a recent cross-domain move operation. +. + +MessageId=8546 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NC_STILL_HAS_DSAS +Language=Bulgarian +ERROR_DS_NC_STILL_HAS_DSAS - The requested domain could not be deleted because there exist domain controllers that still host this domain. +. + +MessageId=8547 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_GC_REQUIRED +Language=Bulgarian +ERROR_DS_GC_REQUIRED - The requested operation can be performed only on a global catalog server. +. + +MessageId=8548 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_LOCAL_MEMBER_OF_LOCAL_ONLY +Language=Bulgarian +ERROR_DS_LOCAL_MEMBER_OF_LOCAL_ONLY - A local group can only be a member of other local groups in the same domain. +. + +MessageId=8549 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NO_FPO_IN_UNIVERSAL_GROUPS +Language=Bulgarian +ERROR_DS_NO_FPO_IN_UNIVERSAL_GROUPS - Foreign security principals cannot be members of universal groups. +. + +MessageId=8550 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_ADD_TO_GC +Language=Bulgarian +ERROR_DS_CANT_ADD_TO_GC - The attribute is not allowed to be replicated to the GC because of security reasons. +. + +MessageId=8551 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NO_CHECKPOINT_WITH_PDC +Language=Bulgarian +ERROR_DS_NO_CHECKPOINT_WITH_PDC - The checkpoint with the PDC could not be taken because there are too many modifications being processed currently. +. + +MessageId=8552 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SOURCE_AUDITING_NOT_ENABLED +Language=Bulgarian +ERROR_DS_SOURCE_AUDITING_NOT_ENABLED - The operation requires that source domain auditing be enabled. +. + +MessageId=8553 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_CREATE_IN_NONDOMAIN_NC +Language=Bulgarian +ERROR_DS_CANT_CREATE_IN_NONDOMAIN_NC - Security principal objects can only be created inside domain naming contexts. +. + +MessageId=8554 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_INVALID_NAME_FOR_SPN +Language=Bulgarian +ERROR_DS_INVALID_NAME_FOR_SPN - A Service Principal Name (SPN) could not be constructed because the provided hostname is not in the necessary format. +. + +MessageId=8555 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_FILTER_USES_CONTRUCTED_ATTRS +Language=Bulgarian +ERROR_DS_FILTER_USES_CONTRUCTED_ATTRS - A Filter was passed that uses constructed attributes. +. + +MessageId=8556 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_UNICODEPWD_NOT_IN_QUOTES +Language=Bulgarian +ERROR_DS_UNICODEPWD_NOT_IN_QUOTES - The unicodePwd attribute value must be enclosed in double quotes. +. + +MessageId=8557 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED +Language=Bulgarian +ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED - Your computer could not be joined to the domain. You have exceeded the maximum number of computer accounts you are allowed to create in this domain. Contact your system administrator to have this limit reset or increased. +. + +MessageId=8558 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_MUST_BE_RUN_ON_DST_DC +Language=Bulgarian +ERROR_DS_MUST_BE_RUN_ON_DST_DC - For security reasons, the operation must be run on the destination DC. +. + +MessageId=8559 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SRC_DC_MUST_BE_SP4_OR_GREATER +Language=Bulgarian +ERROR_DS_SRC_DC_MUST_BE_SP4_OR_GREATER - For security reasons, the source DC must be NT4SP4 or greater. +. + +MessageId=8560 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_TREE_DELETE_CRITICAL_OBJ +Language=Bulgarian +ERROR_DS_CANT_TREE_DELETE_CRITICAL_OBJ - Critical Directory Service System objects cannot be deleted during tree delete operations. The tree delete may have been partially performed. +. + +MessageId=8561 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_INIT_FAILURE_CONSOLE +Language=Bulgarian +ERROR_DS_INIT_FAILURE_CONSOLE - Directory Services could not start because of the following error: %1. +Error Status: 0x%2. Please click OK to shutdown the system. You can use the recovery console to diagnose the system further. +. + +MessageId=8562 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SAM_INIT_FAILURE_CONSOLE +Language=Bulgarian +ERROR_DS_SAM_INIT_FAILURE_CONSOLE - Security Accounts Manager initialization failed because of the following error: %1. +Error Status: 0x%2. Please click OK to shutdown the system. You can use the recovery console to diagnose the system further. +. + +MessageId=8563 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_FOREST_VERSION_TOO_HIGH +Language=Bulgarian +ERROR_DS_FOREST_VERSION_TOO_HIGH - The version of the operating system installed is incompatible with the current forest functional level. You must upgrade to a new version of the operating system before this server can become a domain controller in this forest. +. + +MessageId=8564 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DOMAIN_VERSION_TOO_HIGH +Language=Bulgarian +ERROR_DS_DOMAIN_VERSION_TOO_HIGH - The version of the operating system installed is incompatible with the current domain functional level. You must upgrade to a new version of the operating system before this server can become a domain controller in this domain. +. + +MessageId=8565 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_FOREST_VERSION_TOO_LOW +Language=Bulgarian +ERROR_DS_FOREST_VERSION_TOO_LOW - This version of the operating system installed on this server no longer supports the current forest functional level. You must raise the forest functional level before this server can become a domain controller in this forest. +. + +MessageId=8566 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DOMAIN_VERSION_TOO_LOW +Language=Bulgarian +ERROR_DS_DOMAIN_VERSION_TOO_LOW - This version of the operating system installed on this server no longer supports the current domain functional level. You must raise the domain functional level before this server can become a domain controller in this domain. +. + +MessageId=8567 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_INCOMPATIBLE_VERSION +Language=Bulgarian +ERROR_DS_INCOMPATIBLE_VERSION - The version of the operating system installed on this server is incompatible with the functional level of the domain or forest. +. + +MessageId=8568 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_LOW_DSA_VERSION +Language=Bulgarian +ERROR_DS_LOW_DSA_VERSION - The functional level of the domain (or forest) cannot be raised to the requested value, because there exist one or more domain controllers in the domain (or forest) that are at a lower incompatible functional level. +. + +MessageId=8569 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NO_BEHAVIOR_VERSION_IN_MIXEDDOMAIN +Language=Bulgarian +ERROR_DS_NO_BEHAVIOR_VERSION_IN_MIXEDDOMAIN - The forest functional level cannot be raised to the requested level since one or more domains are still in mixed domain mode. All domains in the forest must be in native mode before you can raise the forest functional level. +. + +MessageId=8570 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NOT_SUPPORTED_SORT_ORDER +Language=Bulgarian +ERROR_DS_NOT_SUPPORTED_SORT_ORDER - The sort order requested is not supported. +. + +MessageId=8571 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NAME_NOT_UNIQUE +Language=Bulgarian +ERROR_DS_NAME_NOT_UNIQUE - The requested name already exists as a unique identifier. +. + +MessageId=8572 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_MACHINE_ACCOUNT_CREATED_PRENT4 +Language=Bulgarian +ERROR_DS_MACHINE_ACCOUNT_CREATED_PRENT4 - The machine account was created pre-NT4. The account needs to be recreated. +. + +MessageId=8573 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_OUT_OF_VERSION_STORE +Language=Bulgarian +ERROR_DS_OUT_OF_VERSION_STORE - The database is out of version store. +. + +MessageId=8574 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_INCOMPATIBLE_CONTROLS_USED +Language=Bulgarian +ERROR_DS_INCOMPATIBLE_CONTROLS_USED - Unable to continue operation because multiple conflicting controls were used. +. + +MessageId=8575 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NO_REF_DOMAIN +Language=Bulgarian +ERROR_DS_NO_REF_DOMAIN - Unable to find a valid security descriptor reference domain for this partition. +. + +MessageId=8576 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_RESERVED_LINK_ID +Language=Bulgarian +ERROR_DS_RESERVED_LINK_ID - Schema update failed: The link identifier is reserved. +. + +MessageId=8577 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_LINK_ID_NOT_AVAILABLE +Language=Bulgarian +ERROR_DS_LINK_ID_NOT_AVAILABLE - Schema update failed: There are no link identifiers available. +. + +MessageId=8578 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER +Language=Bulgarian +ERROR_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER - An account group cannot have a universal group as a member. +. + +MessageId=8579 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_MODIFYDN_DISALLOWED_BY_INSTANCE_TYPE +Language=Bulgarian +ERROR_DS_MODIFYDN_DISALLOWED_BY_INSTANCE_TYPE - Rename or move operations on naming context heads or read-only objects are not allowed. +. + +MessageId=8580 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NO_OBJECT_MOVE_IN_SCHEMA_NC +Language=Bulgarian +ERROR_DS_NO_OBJECT_MOVE_IN_SCHEMA_NC - Move operations on objects in the schema naming context are not allowed. +. + +MessageId=8581 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_MODIFYDN_DISALLOWED_BY_FLAG +Language=Bulgarian +ERROR_DS_MODIFYDN_DISALLOWED_BY_FLAG - A system flag has been set on the object and does not allow the object to be moved or renamed. +. + +MessageId=8582 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_MODIFYDN_WRONG_GRANDPARENT +Language=Bulgarian +ERROR_DS_MODIFYDN_WRONG_GRANDPARENT - This object is not allowed to change its grandparent container. Moves are not forbidden on this object, but are restricted to sibling containers. +. + +MessageId=8583 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NAME_ERROR_TRUST_REFERRAL +Language=Bulgarian +ERROR_DS_NAME_ERROR_TRUST_REFERRAL - Unable to resolve completely, a referral to another forest is generated. +. + +MessageId=8584 +Severity=Success +Facility=System +SymbolicName=ERROR_NOT_SUPPORTED_ON_STANDARD_SERVER +Language=Bulgarian +ERROR_NOT_SUPPORTED_ON_STANDARD_SERVER - The requested action is not supported on standard server. +. + +MessageId=8585 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_ACCESS_REMOTE_PART_OF_AD +Language=Bulgarian +ERROR_DS_CANT_ACCESS_REMOTE_PART_OF_AD - Could not access a partition of the Active Directory located on a remote server. Make sure at least one server is running for the partition in question. +. + +MessageId=8586 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE_V2 +Language=Bulgarian +ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE_V2 - The directory cannot validate the proposed naming context (or partition) name because it does not hold a replica nor can it contact a replica of the naming context above the proposed naming context. Please ensure that the parent naming context is properly registered in DNS, and at least one replica of this naming context is reachable by the Domain Naming master. +. + +MessageId=8587 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_THREAD_LIMIT_EXCEEDED +Language=Bulgarian +ERROR_DS_THREAD_LIMIT_EXCEEDED - The thread limit for this request was exceeded. +. + +MessageId=8588 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NOT_CLOSEST +Language=Bulgarian +ERROR_DS_NOT_CLOSEST - The Global catalog server is not in the closet site. +. + +MessageId=8589 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_DERIVE_SPN_WITHOUT_SERVER_REF +Language=Bulgarian +ERROR_DS_CANT_DERIVE_SPN_WITHOUT_SERVER_REF - The DS cannot derive a service principal name (SPN) with which to mutually authenticate the target server because the corresponding server object in the local DS database has no serverReference attribute. +. + +MessageId=8590 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_SINGLE_USER_MODE_FAILED +Language=Bulgarian +ERROR_DS_SINGLE_USER_MODE_FAILED - The Directory Service failed to enter single user mode. +. + +MessageId=8591 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NTDSCRIPT_SYNTAX_ERROR +Language=Bulgarian +ERROR_DS_NTDSCRIPT_SYNTAX_ERROR - The Directory Service cannot parse the script because of a syntax error. +. + +MessageId=8592 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NTDSCRIPT_PROCESS_ERROR +Language=Bulgarian +ERROR_DS_NTDSCRIPT_PROCESS_ERROR - The Directory Service cannot process the script because of an error. +. + +MessageId=8593 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DIFFERENT_REPL_EPOCHS +Language=Bulgarian +ERROR_DS_DIFFERENT_REPL_EPOCHS - The directory service cannot perform the requested operation because the servers involved are of different replication epochs (which is usually related to a domain rename that is in progress). +. + +MessageId=8594 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRS_EXTENSIONS_CHANGED +Language=Bulgarian +ERROR_DS_DRS_EXTENSIONS_CHANGED - The directory service binding must be renegotiated due to a change in the server extensions information. +. + +MessageId=8595 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_REPLICA_SET_CHANGE_NOT_ALLOWED_ON_DISABLED_CR +Language=Bulgarian +ERROR_DS_REPLICA_SET_CHANGE_NOT_ALLOWED_ON_DISABLED_CR - Operation not allowed on a disabled cross ref. +. + +MessageId=8596 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_NO_MSDS_INTID +Language=Bulgarian +ERROR_DS_NO_MSDS_INTID - Schema update failed: No values for msDS-IntId are available. +. + +MessageId=8597 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DUP_MSDS_INTID +Language=Bulgarian +ERROR_DS_DUP_MSDS_INTID - Schema update failed: Duplicate msDS-IntId. Retry the operation. +. + +MessageId=8598 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_EXISTS_IN_RDNATTID +Language=Bulgarian +ERROR_DS_EXISTS_IN_RDNATTID - Schema deletion failed: attribute is used in rDNAttID. +. + +MessageId=8599 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_AUTHORIZATION_FAILED +Language=Bulgarian +ERROR_DS_AUTHORIZATION_FAILED - The directory service failed to authorize the request. +. + +MessageId=8600 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_INVALID_SCRIPT +Language=Bulgarian +ERROR_DS_INVALID_SCRIPT - The Directory Service cannot process the script because it is invalid. +. + +MessageId=8601 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_REMOTE_CROSSREF_OP_FAILED +Language=Bulgarian +ERROR_DS_REMOTE_CROSSREF_OP_FAILED - The remote create cross reference operation failed on the Domain Naming Master FSMO. The operation's error is in the extended data. +. + +MessageId=8602 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CROSS_REF_BUSY +Language=Bulgarian +ERROR_DS_CROSS_REF_BUSY - A cross reference is in use locally with the same name. +. + +MessageId=8603 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_DERIVE_SPN_FOR_DELETED_DOMAIN +Language=Bulgarian +ERROR_DS_CANT_DERIVE_SPN_FOR_DELETED_DOMAIN - The DS cannot derive a service principal name (SPN) with which to mutually authenticate the target server because the server's domain has been deleted from the forest. +. + +MessageId=8604 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_DEMOTE_WITH_WRITEABLE_NC +Language=Bulgarian +ERROR_DS_CANT_DEMOTE_WITH_WRITEABLE_NC - Writeable NCs prevent this DC from demoting. +. + +MessageId=8605 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DUPLICATE_ID_FOUND +Language=Bulgarian +ERROR_DS_DUPLICATE_ID_FOUND - The requested object has a non-unique identifier and cannot be retrieved. +. + +MessageId=8606 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_INSUFFICIENT_ATTR_TO_CREATE_OBJECT +Language=Bulgarian +ERROR_DS_INSUFFICIENT_ATTR_TO_CREATE_OBJECT - Insufficient attributes were given to create an object. This object may not exist because it may have been deleted and already garbage collected. +. + +MessageId=8607 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_GROUP_CONVERSION_ERROR +Language=Bulgarian +ERROR_DS_GROUP_CONVERSION_ERROR - The group cannot be converted due to attribute restrictions on the requested group type. +. + +MessageId=8608 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_MOVE_APP_BASIC_GROUP +Language=Bulgarian +ERROR_DS_CANT_MOVE_APP_BASIC_GROUP - Cross-domain move of non-empty basic application groups is not allowed. +. + +MessageId=8609 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_CANT_MOVE_APP_QUERY_GROUP +Language=Bulgarian +ERROR_DS_CANT_MOVE_APP_QUERY_GROUP - Cross-domain move on non-empty query based application groups is not allowed. +. + +MessageId=8610 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_ROLE_NOT_VERIFIED +Language=Bulgarian +ERROR_DS_ROLE_NOT_VERIFIED - The role owner could not be verified because replication of its partition has not occurred recently. +. + +MessageId=8611 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_WKO_CONTAINER_CANNOT_BE_SPECIAL +Language=Bulgarian +ERROR_DS_WKO_CONTAINER_CANNOT_BE_SPECIAL - The target container for a redirection of a well-known object container cannot already be a special container. +. + +MessageId=8612 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DOMAIN_RENAME_IN_PROGRESS +Language=Bulgarian +ERROR_DS_DOMAIN_RENAME_IN_PROGRESS - The Directory Service cannot perform the requested operation because a domain rename operation is in progress. +. + +MessageId=8613 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_EXISTING_AD_CHILD_NC +Language=Bulgarian +ERROR_DS_EXISTING_AD_CHILD_NC - The Active Directory detected an Active Directory child partition below the requested new partition name. The Active Directory's partition hierarchy must be created in a top-down method. +. + +MessageId=8614 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_REPL_LIFETIME_EXCEEDED +Language=Bulgarian +ERROR_DS_REPL_LIFETIME_EXCEEDED - The Active Directory cannot replicate with this server because the time since the last replication with this server has exceeded the tombstone lifetime. +. + +MessageId=8615 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DISALLOWED_IN_SYSTEM_CONTAINER +Language=Bulgarian +ERROR_DS_DISALLOWED_IN_SYSTEM_CONTAINER - The requested operation is not allowed on an object under the system container. +. + +MessageId=8616 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_LDAP_SEND_QUEUE_FULL +Language=Bulgarian +ERROR_DS_LDAP_SEND_QUEUE_FULL - The LDAP servers network send queue has filled up because the client is not processing the results of it's requests fast enough. No more requests will be processed until the client catches up. If the client does not catch up then it will be disconnected. +. + +MessageId=8617 +Severity=Success +Facility=System +SymbolicName=ERROR_DS_DRA_OUT_SCHEDULE_WINDOW +Language=Bulgarian +ERROR_DS_DRA_OUT_SCHEDULE_WINDOW - The scheduled replication did not take place because the system was too busy to execute the request within the schedule window. The replication queue is overloaded. Consider reducing the number of partners or decreasing the scheduled replication frequency. +. + +MessageId=9001 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_RCODE_FORMAT_ERROR +Language=Bulgarian +DNS_ERROR_RCODE_FORMAT_ERROR - DNS server unable to interpret format. +. + +MessageId=9002 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_RCODE_SERVER_FAILURE +Language=Bulgarian +DNS_ERROR_RCODE_SERVER_FAILURE - DNS server failure. +. + +MessageId=9003 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_RCODE_NAME_ERROR +Language=Bulgarian +DNS_ERROR_RCODE_NAME_ERROR - DNS name does not exist. +. + +MessageId=9004 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_RCODE_NOT_IMPLEMENTED +Language=Bulgarian +DNS_ERROR_RCODE_NOT_IMPLEMENTED - DNS request not supported by name server. +. + +MessageId=9005 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_RCODE_REFUSED +Language=Bulgarian +DNS_ERROR_RCODE_REFUSED - DNS operation refused. +. + +MessageId=9006 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_RCODE_YXDOMAIN +Language=Bulgarian +DNS_ERROR_RCODE_YXDOMAIN - DNS name that ought not exist, does exist. +. + +MessageId=9007 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_RCODE_YXRRSET +Language=Bulgarian +DNS_ERROR_RCODE_YXRRSET - DNS RR set that ought not exist, does exist. +. + +MessageId=9008 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_RCODE_NXRRSET +Language=Bulgarian +DNS_ERROR_RCODE_NXRRSET - DNS RR set that ought to exist, does not exist. +. + +MessageId=9009 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_RCODE_NOTAUTH +Language=Bulgarian +DNS_ERROR_RCODE_NOTAUTH - DNS server not authoritative for zone. +. + +MessageId=9010 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_RCODE_NOTZONE +Language=Bulgarian +DNS_ERROR_RCODE_NOTZONE - DNS name in update or prereq is not in zone. +. + +MessageId=9016 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_RCODE_BADSIG +Language=Bulgarian +DNS_ERROR_RCODE_BADSIG - DNS signature failed to verify. +. + +MessageId=9017 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_RCODE_BADKEY +Language=Bulgarian +DNS_ERROR_RCODE_BADKEY - DNS bad key. +. + +MessageId=9018 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_RCODE_BADTIME +Language=Bulgarian +DNS_ERROR_RCODE_BADTIME - DNS signature validity expired. +. + +MessageId=9501 +Severity=Success +Facility=System +SymbolicName=DNS_INFO_NO_RECORDS +Language=Bulgarian +DNS_INFO_NO_RECORDS - No records found for given DNS query. +. + +MessageId=9502 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_BAD_PACKET +Language=Bulgarian +DNS_ERROR_BAD_PACKET - Bad DNS packet. +. + +MessageId=9503 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_NO_PACKET +Language=Bulgarian +DNS_ERROR_NO_PACKET - No DNS packet. +. + +MessageId=9504 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_RCODE +Language=Bulgarian +DNS_ERROR_RCODE - DNS error, check rcode. +. + +MessageId=9505 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_UNSECURE_PACKET +Language=Bulgarian +DNS_ERROR_UNSECURE_PACKET - Unsecured DNS packet. +. + +MessageId=9551 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_INVALID_TYPE +Language=Bulgarian +DNS_ERROR_INVALID_TYPE - Invalid DNS type. +. + +MessageId=9552 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_INVALID_IP_ADDRESS +Language=Bulgarian +DNS_ERROR_INVALID_IP_ADDRESS - Invalid IP address. +. + +MessageId=9553 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_INVALID_PROPERTY +Language=Bulgarian +DNS_ERROR_INVALID_PROPERTY - Invalid property. +. + +MessageId=9554 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_TRY_AGAIN_LATER +Language=Bulgarian +DNS_ERROR_TRY_AGAIN_LATER - Try DNS operation again later. +. + +MessageId=9555 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_NOT_UNIQUE +Language=Bulgarian +DNS_ERROR_NOT_UNIQUE - Record for given name and type is not unique. +. + +MessageId=9556 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_NON_RFC_NAME +Language=Bulgarian +DNS_ERROR_NON_RFC_NAME - DNS name does not comply with RFC specifications. +. + +MessageId=9557 +Severity=Success +Facility=System +SymbolicName=DNS_STATUS_FQDN +Language=Bulgarian +DNS_STATUS_FQDN - DNS name is a fully-qualified DNS name. +. + +MessageId=9558 +Severity=Success +Facility=System +SymbolicName=DNS_STATUS_DOTTED_NAME +Language=Bulgarian +DNS_STATUS_DOTTED_NAME - DNS name is dotted (multi-label). +. + +MessageId=9559 +Severity=Success +Facility=System +SymbolicName=DNS_STATUS_SINGLE_PART_NAME +Language=Bulgarian +DNS_STATUS_SINGLE_PART_NAME - DNS name is a single-part name. +. + +MessageId=9560 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_INVALID_NAME_CHAR +Language=Bulgarian +DNS_ERROR_INVALID_NAME_CHAR - DSN name contains an invalid character. +. + +MessageId=9561 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_NUMERIC_NAME +Language=Bulgarian +DNS_ERROR_NUMERIC_NAME - DNS name is entirely numeric. +. + +MessageId=9562 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_NOT_ALLOWED_ON_ROOT_SERVER +Language=Bulgarian +DNS_ERROR_NOT_ALLOWED_ON_ROOT_SERVER - The operation requested is not permitted on a DNS root server. +. + +MessageId=9563 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_NOT_ALLOWED_UNDER_DELEGATION +Language=Bulgarian +DNS_ERROR_NOT_ALLOWED_UNDER_DELEGATION - The record could not be created because this part of the DNS namespace has been delegated to another server. +. + +MessageId=9564 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_CANNOT_FIND_ROOT_HINTS +Language=Bulgarian +DNS_ERROR_CANNOT_FIND_ROOT_HINTS - The DNS server could not find a set of root hints. +. + +MessageId=9565 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_INCONSISTENT_ROOT_HINTS +Language=Bulgarian +DNS_ERROR_INCONSISTENT_ROOT_HINTS - The DNS server found root hints but they were not consistent across all adapters. +. + +MessageId=9601 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_ZONE_DOES_NOT_EXIST +Language=Bulgarian +DNS_ERROR_ZONE_DOES_NOT_EXIST - DNS zone does not exist. +. + +MessageId=9602 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_NO_ZONE_INFO +Language=Bulgarian +DNS_ERROR_NO_ZONE_INFO - DNS zone information not available. +. + +MessageId=9603 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_INVALID_ZONE_OPERATION +Language=Bulgarian +DNS_ERROR_INVALID_ZONE_OPERATION - Invalid operation for DNS zone. +. + +MessageId=9604 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_ZONE_CONFIGURATION_ERROR +Language=Bulgarian +DNS_ERROR_ZONE_CONFIGURATION_ERROR - Invalid DNS zone configuration. +. + +MessageId=9605 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_ZONE_HAS_NO_SOA_RECORD +Language=Bulgarian +DNS_ERROR_ZONE_HAS_NO_SOA_RECORD - DNS zone has no start of authority (SOA) record. +. + +MessageId=9606 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_ZONE_HAS_NO_NS_RECORDS +Language=Bulgarian +DNS_ERROR_ZONE_HAS_NO_NS_RECORDS - DNS zone has no name server (NS) record. +. + +MessageId=9607 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_ZONE_LOCKED +Language=Bulgarian +DNS_ERROR_ZONE_LOCKED - DNS zone is locked. +. + +MessageId=9608 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_ZONE_CREATION_FAILED +Language=Bulgarian +DNS_ERROR_ZONE_CREATION_FAILED - DNS zone creation failed. +. + +MessageId=9609 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_ZONE_ALREADY_EXISTS +Language=Bulgarian +DNS_ERROR_ZONE_ALREADY_EXISTS - DNS zone already exists. +. + +MessageId=9610 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_AUTOZONE_ALREADY_EXISTS +Language=Bulgarian +DNS_ERROR_AUTOZONE_ALREADY_EXISTS - DNS automatic zone already exists. +. + +MessageId=9611 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_INVALID_ZONE_TYPE +Language=Bulgarian +DNS_ERROR_INVALID_ZONE_TYPE - Invalid DNS zone type. +. + +MessageId=9612 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP +Language=Bulgarian +DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP - Secondary DNS zone requires master IP address. +. + +MessageId=9613 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_ZONE_NOT_SECONDARY +Language=Bulgarian +DNS_ERROR_ZONE_NOT_SECONDARY - DNS zone not secondary. +. + +MessageId=9614 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_NEED_SECONDARY_ADDRESSES +Language=Bulgarian +DNS_ERROR_NEED_SECONDARY_ADDRESSES - Need secondary IP address. +. + +MessageId=9615 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_WINS_INIT_FAILED +Language=Bulgarian +DNS_ERROR_WINS_INIT_FAILED - WINS initialization failed. +. + +MessageId=9616 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_NEED_WINS_SERVERS +Language=Bulgarian +DNS_ERROR_NEED_WINS_SERVERS - Need WINS servers. +. + +MessageId=9617 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_NBSTAT_INIT_FAILED +Language=Bulgarian +DNS_ERROR_NBSTAT_INIT_FAILED - NBTSTAT initialization call failed. +. + +MessageId=9618 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_SOA_DELETE_INVALID +Language=Bulgarian +DNS_ERROR_SOA_DELETE_INVALID - Invalid delete of start of authority (SOA) +. + +MessageId=9619 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_FORWARDER_ALREADY_EXISTS +Language=Bulgarian +DNS_ERROR_FORWARDER_ALREADY_EXISTS - A conditional forwarding zone already exists for that name. +. + +MessageId=9620 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_ZONE_REQUIRES_MASTER_IP +Language=Bulgarian +DNS_ERROR_ZONE_REQUIRES_MASTER_IP - This zone must be configured with one or more master DNS server IP addresses. +. + +MessageId=9621 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_ZONE_IS_SHUTDOWN +Language=Bulgarian +DNS_ERROR_ZONE_IS_SHUTDOWN - The operation cannot be performed because this zone is shutdown. +. + +MessageId=9651 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_PRIMARY_REQUIRES_DATAFILE +Language=Bulgarian +DNS_ERROR_PRIMARY_REQUIRES_DATAFILE - Primary DNS zone requires datafile. +. + +MessageId=9652 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_INVALID_DATAFILE_NAME +Language=Bulgarian +DNS_ERROR_INVALID_DATAFILE_NAME - Invalid datafile name for DNS zone. +. + +MessageId=9653 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_DATAFILE_OPEN_FAILURE +Language=Bulgarian +DNS_ERROR_DATAFILE_OPEN_FAILURE - Failed to open datafile for DNS zone. +. + +MessageId=9654 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_FILE_WRITEBACK_FAILED +Language=Bulgarian +DNS_ERROR_FILE_WRITEBACK_FAILED - Failed to write datafile for DNS zone. +. + +MessageId=9655 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_DATAFILE_PARSING +Language=Bulgarian +DNS_ERROR_DATAFILE_PARSING - Failure while reading datafile for DNS zone. +. + +MessageId=9701 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_RECORD_DOES_NOT_EXIST +Language=Bulgarian +DNS_ERROR_RECORD_DOES_NOT_EXIST - DNS record does not exist. +. + +MessageId=9702 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_RECORD_FORMAT +Language=Bulgarian +DNS_ERROR_RECORD_FORMAT - DNS record format error. +. + +MessageId=9703 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_NODE_CREATION_FAILED +Language=Bulgarian +DNS_ERROR_NODE_CREATION_FAILED - Node creation failure in DNS. +. + +MessageId=9704 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_UNKNOWN_RECORD_TYPE +Language=Bulgarian +DNS_ERROR_UNKNOWN_RECORD_TYPE - Unknown DNS record type. +. + +MessageId=9705 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_RECORD_TIMED_OUT +Language=Bulgarian +DNS_ERROR_RECORD_TIMED_OUT - DNS record timed out. +. + +MessageId=9706 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_NAME_NOT_IN_ZONE +Language=Bulgarian +DNS_ERROR_NAME_NOT_IN_ZONE - Name not in DNS zone. +. + +MessageId=9707 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_CNAME_LOOP +Language=Bulgarian +DNS_ERROR_CNAME_LOOP - CNAME loop detected. +. + +MessageId=9708 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_NODE_IS_CNAME +Language=Bulgarian +DNS_ERROR_NODE_IS_CNAME - Node is a CNAME DNS record. +. + +MessageId=9709 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_CNAME_COLLISION +Language=Bulgarian +DNS_ERROR_CNAME_COLLISION - A CNAME record already exists for given name. +. + +MessageId=9710 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_RECORD_ONLY_AT_ZONE_ROOT +Language=Bulgarian +DNS_ERROR_RECORD_ONLY_AT_ZONE_ROOT - Record only at DNS zone root. +. + +MessageId=9711 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_RECORD_ALREADY_EXISTS +Language=Bulgarian +DNS_ERROR_RECORD_ALREADY_EXISTS - DNS record already exists. +. + +MessageId=9712 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_SECONDARY_DATA +Language=Bulgarian +DNS_ERROR_SECONDARY_DATA - Secondary DNS zone data error. +. + +MessageId=9713 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_NO_CREATE_CACHE_DATA +Language=Bulgarian +DNS_ERROR_NO_CREATE_CACHE_DATA - Could not create DNS cache data. +. + +MessageId=9714 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_NAME_DOES_NOT_EXIST +Language=Bulgarian +DNS_ERROR_NAME_DOES_NOT_EXIST - DNS name does not exist. +. + +MessageId=9715 +Severity=Success +Facility=System +SymbolicName=DNS_WARNING_PTR_CREATE_FAILED +Language=Bulgarian +DNS_WARNING_PTR_CREATE_FAILED - Could not create pointer (PTR) record. +. + +MessageId=9716 +Severity=Success +Facility=System +SymbolicName=DNS_WARNING_DOMAIN_UNDELETED +Language=Bulgarian +DNS_WARNING_DOMAIN_UNDELETED - DNS domain was undeleted. +. + +MessageId=9717 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_DS_UNAVAILABLE +Language=Bulgarian +DNS_ERROR_DS_UNAVAILABLE - The directory service is unavailable. +. + +MessageId=9718 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_DS_ZONE_ALREADY_EXISTS +Language=Bulgarian +DNS_ERROR_DS_ZONE_ALREADY_EXISTS - DNS zone already exists in the directory service. +. + +MessageId=9719 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_NO_BOOTFILE_IF_DS_ZONE +Language=Bulgarian +DNS_ERROR_NO_BOOTFILE_IF_DS_ZONE - DNS server not creating or reading the boot file for the directory service integrated DNS zone. +. + +MessageId=9751 +Severity=Success +Facility=System +SymbolicName=DNS_INFO_AXFR_COMPLETE +Language=Bulgarian +DNS_INFO_AXFR_COMPLETE - DNS AXFR (zone transfer) complete. +. + +MessageId=9752 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_AXFR +Language=Bulgarian +DNS_ERROR_AXFR - DNS zone transfer failed. +. + +MessageId=9753 +Severity=Success +Facility=System +SymbolicName=DNS_INFO_ADDED_LOCAL_WINS +Language=Bulgarian +DNS_INFO_ADDED_LOCAL_WINS - Added local WINS server. +. + +MessageId=9801 +Severity=Success +Facility=System +SymbolicName=DNS_STATUS_CONTINUE_NEEDED +Language=Bulgarian +DNS_STATUS_CONTINUE_NEEDED - Secure update call needs to continue update request. +. + +MessageId=9851 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_NO_TCPIP +Language=Bulgarian +DNS_ERROR_NO_TCPIP - TCP/IP network protocol not installed. +. + +MessageId=9852 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_NO_DNS_SERVERS +Language=Bulgarian +DNS_ERROR_NO_DNS_SERVERS - No DNS servers configured for local system. +. + +MessageId=9901 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_DP_DOES_NOT_EXIST +Language=Bulgarian +DNS_ERROR_DP_DOES_NOT_EXIST - The specified directory partition does not exist. +. + +MessageId=9902 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_DP_ALREADY_EXISTS +Language=Bulgarian +DNS_ERROR_DP_ALREADY_EXISTS - The specified directory partition already exists. +. + +MessageId=9903 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_DP_NOT_ENLISTED +Language=Bulgarian +DNS_ERROR_DP_NOT_ENLISTED - The DNS server is not enlisted in the specified directory partition. +. + +MessageId=9904 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_DP_ALREADY_ENLISTED +Language=Bulgarian +DNS_ERROR_DP_ALREADY_ENLISTED - The DNS server is already enlisted in the specified directory partition. +. + +MessageId=9905 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_DP_NOT_AVAILABLE +Language=Bulgarian +DNS_ERROR_DP_NOT_AVAILABLE - The directory partition is not available at this time. Please wait a few minutes and try again. +. + +MessageId=9906 +Severity=Success +Facility=System +SymbolicName=DNS_ERROR_DP_FSMO_ERROR +Language=Bulgarian +DNS_ERROR_DP_FSMO_ERROR - The application directory partition operation failed. The domain controller holding the domain naming master role is down or unable to service the request or is not running Windows Server 2003. +. + +MessageId=10004 +Severity=Success +Facility=System +SymbolicName=WSAEINTR +Language=Bulgarian +WSAEINTR - A blocking operation was interrupted by a call to WSACancelBlockingCall. +. + +MessageId=10009 +Severity=Success +Facility=System +SymbolicName=WSAEBADF +Language=Bulgarian +WSAEBADF - The file handle supplied is not valid. +. + +MessageId=10013 +Severity=Success +Facility=System +SymbolicName=WSAEACCES +Language=Bulgarian +WSAEACCES - An attempt was made to access a socket in a way forbidden by its access permissions. +. + +MessageId=10014 +Severity=Success +Facility=System +SymbolicName=WSAEFAULT +Language=Bulgarian +WSAEFAULT - The system detected an invalid pointer address in attempting to use a pointer argument in a call. +. + +MessageId=10022 +Severity=Success +Facility=System +SymbolicName=WSAEINVAL +Language=Bulgarian +WSAEINVAL - An invalid argument was supplied. +. + +MessageId=10024 +Severity=Success +Facility=System +SymbolicName=WSAEMFILE +Language=Bulgarian +WSAEMFILE - Too many open sockets. +. + +MessageId=10035 +Severity=Success +Facility=System +SymbolicName=WSAEWOULDBLOCK +Language=Bulgarian +WSAEWOULDBLOCK - A non-blocking socket operation could not be completed immediately. +. + +MessageId=10036 +Severity=Success +Facility=System +SymbolicName=WSAEINPROGRESS +Language=Bulgarian +WSAEINPROGRESS - A blocking operation is currently executing. +. + +MessageId=10037 +Severity=Success +Facility=System +SymbolicName=WSAEALREADY +Language=Bulgarian +WSAEALREADY - An operation was attempted on a non-blocking socket that already had an operation in progress. +. + +MessageId=10038 +Severity=Success +Facility=System +SymbolicName=WSAENOTSOCK +Language=Bulgarian +WSAENOTSOCK - An operation was attempted on something that is not a socket. +. + +MessageId=10039 +Severity=Success +Facility=System +SymbolicName=WSAEDESTADDRREQ +Language=Bulgarian +WSAEDESTADDRREQ - A required address was omitted from an operation on a socket. +. + +MessageId=10040 +Severity=Success +Facility=System +SymbolicName=WSAEMSGSIZE +Language=Bulgarian +WSAEMSGSIZE - A message sent on a datagram socket was larger than the internal message buffer or some other network limit, or the buffer used to receive a datagram into was smaller than the datagram itself. +. + +MessageId=10041 +Severity=Success +Facility=System +SymbolicName=WSAEPROTOTYPE +Language=Bulgarian +WSAEPROTOTYPE - A protocol was specified in the socket function call that does not support the semantics of the socket type requested. +. + +MessageId=10042 +Severity=Success +Facility=System +SymbolicName=WSAENOPROTOOPT +Language=Bulgarian +WSAENOPROTOOPT - An unknown, invalid, or unsupported option or level was specified in a getsockopt or setsockopt call. +. + +MessageId=10043 +Severity=Success +Facility=System +SymbolicName=WSAEPROTONOSUPPORT +Language=Bulgarian +WSAEPROTONOSUPPORT - The requested protocol has not been configured into the system, or no implementation for it exists. +. + +MessageId=10044 +Severity=Success +Facility=System +SymbolicName=WSAESOCKTNOSUPPORT +Language=Bulgarian +WSAESOCKTNOSUPPORT - The support for the specified socket type does not exist in this address family. +. + +MessageId=10045 +Severity=Success +Facility=System +SymbolicName=WSAEOPNOTSUPP +Language=Bulgarian +WSAEOPNOTSUPP - The attempted operation is not supported for the type of object referenced. +. + +MessageId=10046 +Severity=Success +Facility=System +SymbolicName=WSAEPFNOSUPPORT +Language=Bulgarian +WSAEPFNOSUPPORT - The protocol family has not been configured into the system or no implementation for it exists. +. + +MessageId=10047 +Severity=Success +Facility=System +SymbolicName=WSAEAFNOSUPPORT +Language=Bulgarian +WSAEAFNOSUPPORT - An address incompatible with the requested protocol was used. +. + +MessageId=10048 +Severity=Success +Facility=System +SymbolicName=WSAEADDRINUSE +Language=Bulgarian +WSAEADDRINUSE - Only one usage of each socket address (protocol/network address/port) is normally permitted. +. + +MessageId=10049 +Severity=Success +Facility=System +SymbolicName=WSAEADDRNOTAVAIL +Language=Bulgarian +WSAEADDRNOTAVAIL - The requested address is not valid in its context. +. + +MessageId=10050 +Severity=Success +Facility=System +SymbolicName=WSAENETDOWN +Language=Bulgarian +WSAENETDOWN - A socket operation encountered a dead network. +. + +MessageId=10051 +Severity=Success +Facility=System +SymbolicName=WSAENETUNREACH +Language=Bulgarian +WSAENETUNREACH - A socket operation was attempted to an unreachable network. +. + +MessageId=10052 +Severity=Success +Facility=System +SymbolicName=WSAENETRESET +Language=Bulgarian +WSAENETRESET - The connection has been broken due to keep-alive activity detecting a failure while the operation was in progress. +. + +MessageId=10053 +Severity=Success +Facility=System +SymbolicName=WSAECONNABORTED +Language=Bulgarian +WSAECONNABORTED - An established connection was aborted by the software in your host machine. +. + +MessageId=10054 +Severity=Success +Facility=System +SymbolicName=WSAECONNRESET +Language=Bulgarian +WSAECONNRESET - An existing connection was forcibly closed by the remote host. +. + +MessageId=10055 +Severity=Success +Facility=System +SymbolicName=WSAENOBUFS +Language=Bulgarian +WSAENOBUFS - An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full. +. + +MessageId=10056 +Severity=Success +Facility=System +SymbolicName=WSAEISCONN +Language=Bulgarian +WSAEISCONN - A connect request was made on an already connected socket. +. + +MessageId=10057 +Severity=Success +Facility=System +SymbolicName=WSAENOTCONN +Language=Bulgarian +WSAENOTCONN - A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied. +. + +MessageId=10058 +Severity=Success +Facility=System +SymbolicName=WSAESHUTDOWN +Language=Bulgarian +WSAESHUTDOWN - A request to send or receive data was disallowed because the socket had already been shut down in that direction with a previous shutdown call. +. + +MessageId=10059 +Severity=Success +Facility=System +SymbolicName=WSAETOOMANYREFS +Language=Bulgarian +WSAETOOMANYREFS - Too many references to some kernel object. +. + +MessageId=10060 +Severity=Success +Facility=System +SymbolicName=WSAETIMEDOUT +Language=Bulgarian +WSAETIMEDOUT - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. +. + +MessageId=10061 +Severity=Success +Facility=System +SymbolicName=WSAECONNREFUSED +Language=Bulgarian +WSAECONNREFUSED - No connection could be made because the target machine actively refused it. +. + +MessageId=10062 +Severity=Success +Facility=System +SymbolicName=WSAELOOP +Language=Bulgarian +WSAELOOP - Cannot translate name. +. + +MessageId=10063 +Severity=Success +Facility=System +SymbolicName=WSAENAMETOOLONG +Language=Bulgarian +WSAENAMETOOLONG - Name component or name was too long. +. + +MessageId=10064 +Severity=Success +Facility=System +SymbolicName=WSAEHOSTDOWN +Language=Bulgarian +WSAEHOSTDOWN - A socket operation failed because the destination host was down. +. + +MessageId=10065 +Severity=Success +Facility=System +SymbolicName=WSAEHOSTUNREACH +Language=Bulgarian +WSAEHOSTUNREACH - A socket operation was attempted to an unreachable host. +. + +MessageId=10066 +Severity=Success +Facility=System +SymbolicName=WSAENOTEMPTY +Language=Bulgarian +WSAENOTEMPTY - Cannot remove a directory that is not empty. +. + +MessageId=10067 +Severity=Success +Facility=System +SymbolicName=WSAEPROCLIM +Language=Bulgarian +WSAEPROCLIM - A Windows Sockets implementation may have a limit on the number of applications that may use it simultaneously. +. + +MessageId=10068 +Severity=Success +Facility=System +SymbolicName=WSAEUSERS +Language=Bulgarian +WSAEUSERS - Ran out of quota. +. + +MessageId=10069 +Severity=Success +Facility=System +SymbolicName=WSAEDQUOT +Language=Bulgarian +WSAEDQUOT - Ran out of disk quota. +. + +MessageId=10070 +Severity=Success +Facility=System +SymbolicName=WSAESTALE +Language=Bulgarian +WSAESTALE - File handle reference is no longer available. +. + +MessageId=10071 +Severity=Success +Facility=System +SymbolicName=WSAEREMOTE +Language=Bulgarian +WSAEREMOTE - Item is not available locally. +. + +MessageId=10091 +Severity=Success +Facility=System +SymbolicName=WSASYSNOTREADY +Language=Bulgarian +WSASYSNOTREADY - WSAStartup cannot function at this time because the underlying system it uses to provide network services is currently unavailable. +. + +MessageId=10092 +Severity=Success +Facility=System +SymbolicName=WSAVERNOTSUPPORTED +Language=Bulgarian +WSAVERNOTSUPPORTED - The Windows Sockets version requested is not supported. +. + +MessageId=10093 +Severity=Success +Facility=System +SymbolicName=WSANOTINITIALISED +Language=Bulgarian +WSANOTINITIALISED - Either the application has not called WSAStartup, or WSAStartup failed. +. + +MessageId=10101 +Severity=Success +Facility=System +SymbolicName=WSAEDISCON +Language=Bulgarian +WSAEDISCON - Returned by WSARecv or WSARecvFrom to indicate the remote party has initiated a graceful shutdown sequence. +. + +MessageId=10102 +Severity=Success +Facility=System +SymbolicName=WSAENOMORE +Language=Bulgarian +WSAENOMORE - No more results can be returned by WSALookupServiceNext. +. + +MessageId=10103 +Severity=Success +Facility=System +SymbolicName=WSAECANCELLED +Language=Bulgarian +WSAECANCELLED - A call to WSALookupServiceEnd was made while this call was still processing. The call has been canceled. +. + +MessageId=10104 +Severity=Success +Facility=System +SymbolicName=WSAEINVALIDPROCTABLE +Language=Bulgarian +WSAEINVALIDPROCTABLE - The procedure call table is invalid. +. + +MessageId=10105 +Severity=Success +Facility=System +SymbolicName=WSAEINVALIDPROVIDER +Language=Bulgarian +WSAEINVALIDPROVIDER - The requested service provider is invalid. +. + +MessageId=10106 +Severity=Success +Facility=System +SymbolicName=WSAEPROVIDERFAILEDINIT +Language=Bulgarian +WSAEPROVIDERFAILEDINIT - The requested service provider could not be loaded or initialized. +. + +MessageId=10107 +Severity=Success +Facility=System +SymbolicName=WSASYSCALLFAILURE +Language=Bulgarian +WSASYSCALLFAILURE - A system call that should never fail has failed. +. + +MessageId=10108 +Severity=Success +Facility=System +SymbolicName=WSASERVICE_NOT_FOUND +Language=Bulgarian +WSASERVICE_NOT_FOUND - No such service is known. The service cannot be found in the specified name space. +. + +MessageId=10109 +Severity=Success +Facility=System +SymbolicName=WSATYPE_NOT_FOUND +Language=Bulgarian +WSATYPE_NOT_FOUND - The specified class was not found. +. + +MessageId=10110 +Severity=Success +Facility=System +SymbolicName=WSA_E_NO_MORE +Language=Bulgarian +WSA_E_NO_MORE - No more results can be returned by WSALookupServiceNext. +. + +MessageId=10111 +Severity=Success +Facility=System +SymbolicName=WSA_E_CANCELLED +Language=Bulgarian +WSA_E_CANCELLED - A call to WSALookupServiceEnd was made while this call was still processing. The call has been canceled. +. + +MessageId=10112 +Severity=Success +Facility=System +SymbolicName=WSAEREFUSED +Language=Bulgarian +WSAEREFUSED - A database query failed because it was actively refused. +. + +MessageId=11001 +Severity=Success +Facility=System +SymbolicName=WSAHOST_NOT_FOUND +Language=Bulgarian +WSAHOST_NOT_FOUND - No such host is known. +. + +MessageId=11002 +Severity=Success +Facility=System +SymbolicName=WSATRY_AGAIN +Language=Bulgarian +WSATRY_AGAIN - This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server. +. + +MessageId=11003 +Severity=Success +Facility=System +SymbolicName=WSANO_RECOVERY +Language=Bulgarian +WSANO_RECOVERY - A non-recoverable error occurred during a database lookup. +. + +MessageId=11004 +Severity=Success +Facility=System +SymbolicName=WSANO_DATA +Language=Bulgarian +WSANO_DATA - The requested name is valid, but no data of the requested type was found. +. + +MessageId=11005 +Severity=Success +Facility=System +SymbolicName=WSA_QOS_RECEIVERS +Language=Bulgarian +WSA_QOS_RECEIVERS - At least one reserve has arrived. +. + +MessageId=11006 +Severity=Success +Facility=System +SymbolicName=WSA_QOS_SENDERS +Language=Bulgarian +WSA_QOS_SENDERS - At least one path has arrived. +. + +MessageId=11007 +Severity=Success +Facility=System +SymbolicName=WSA_QOS_NO_SENDERS +Language=Bulgarian +WSA_QOS_NO_SENDERS - There are no senders. +. + +MessageId=11008 +Severity=Success +Facility=System +SymbolicName=WSA_QOS_NO_RECEIVERS +Language=Bulgarian +WSA_QOS_NO_RECEIVERS - There are no receivers. +. + +MessageId=11009 +Severity=Success +Facility=System +SymbolicName=WSA_QOS_REQUEST_CONFIRMED +Language=Bulgarian +WSA_QOS_REQUEST_CONFIRMED - Reserve has been confirmed. +. + +MessageId=11010 +Severity=Success +Facility=System +SymbolicName=WSA_QOS_ADMISSION_FAILURE +Language=Bulgarian +WSA_QOS_ADMISSION_FAILURE - Error due to lack of resources. +. + +MessageId=11011 +Severity=Success +Facility=System +SymbolicName=WSA_QOS_POLICY_FAILURE +Language=Bulgarian +WSA_QOS_POLICY_FAILURE - Rejected for administrative reasons - bad credentials. +. + +MessageId=11012 +Severity=Success +Facility=System +SymbolicName=WSA_QOS_BAD_STYLE +Language=Bulgarian +WSA_QOS_BAD_STYLE - Unknown or conflicting style. +. + +MessageId=11013 +Severity=Success +Facility=System +SymbolicName=WSA_QOS_BAD_OBJECT +Language=Bulgarian +WSA_QOS_BAD_OBJECT - Problem with some part of the filterspec or providerspecific buffer in general. +. + +MessageId=11014 +Severity=Success +Facility=System +SymbolicName=WSA_QOS_TRAFFIC_CTRL_ERROR +Language=Bulgarian +WSA_QOS_TRAFFIC_CTRL_ERROR - Problem with some part of the flowspec. +. + +MessageId=11015 +Severity=Success +Facility=System +SymbolicName=WSA_QOS_GENERIC_ERROR +Language=Bulgarian +WSA_QOS_GENERIC_ERROR - General QOS error. +. + +MessageId=11016 +Severity=Success +Facility=System +SymbolicName=WSA_QOS_ESERVICETYPE +Language=Bulgarian +WSA_QOS_ESERVICETYPE - An invalid or unrecognized service type was found in the flowspec. +. + +MessageId=11017 +Severity=Success +Facility=System +SymbolicName=WSA_QOS_EFLOWSPEC +Language=Bulgarian +WSA_QOS_EFLOWSPEC - An invalid or inconsistent flowspec was found in the QOS structure. +. + +MessageId=11018 +Severity=Success +Facility=System +SymbolicName=WSA_QOS_EPROVSPECBUF +Language=Bulgarian +WSA_QOS_EPROVSPECBUF - Invalid QOS provider-specific buffer. +. + +MessageId=11019 +Severity=Success +Facility=System +SymbolicName=WSA_QOS_EFILTERSTYLE +Language=Bulgarian +WSA_QOS_EFILTERSTYLE - An invalid QOS filter style was used. +. + +MessageId=11020 +Severity=Success +Facility=System +SymbolicName=WSA_QOS_EFILTERTYPE +Language=Bulgarian +WSA_QOS_EFILTERTYPE - An invalid QOS filter type was used. +. + +MessageId=11021 +Severity=Success +Facility=System +SymbolicName=WSA_QOS_EFILTERCOUNT +Language=Bulgarian +WSA_QOS_EFILTERCOUNT - An incorrect number of QOS FILTERSPECs were specified in the FLOWDESCRIPTOR. +. + +MessageId=11022 +Severity=Success +Facility=System +SymbolicName=WSA_QOS_EOBJLENGTH +Language=Bulgarian +WSA_QOS_EOBJLENGTH - An object with an invalid ObjectLength field was specified in the QOS provider-specific buffer. +. + +MessageId=11023 +Severity=Success +Facility=System +SymbolicName=WSA_QOS_EFLOWCOUNT +Language=Bulgarian +WSA_QOS_EFLOWCOUNT - An incorrect number of flow descriptors was specified in the QOS structure. +. + +MessageId=11024 +Severity=Success +Facility=System +SymbolicName=WSA_QOS_EUNKNOWNPSOBJ +Language=Bulgarian +WSA_QOS_EUNKNOWNPSOBJ - An unrecognized object was found in the QOS provider-specific buffer. +. + +MessageId=11025 +Severity=Success +Facility=System +SymbolicName=WSA_QOS_EPOLICYOBJ +Language=Bulgarian +WSA_QOS_EPOLICYOBJ - An invalid policy object was found in the QOS provider-specific buffer. +. + +MessageId=11026 +Severity=Success +Facility=System +SymbolicName=WSA_QOS_EFLOWDESC +Language=Bulgarian +WSA_QOS_EFLOWDESC - An invalid QOS flow descriptor was found in the flow descriptor list. +. + +MessageId=11027 +Severity=Success +Facility=System +SymbolicName=WSA_QOS_EPSFLOWSPEC +Language=Bulgarian +WSA_QOS_EPSFLOWSPEC - An invalid or inconsistent flowspec was found in the QOS provider-specific buffer. +. + +MessageId=11028 +Severity=Success +Facility=System +SymbolicName=WSA_QOS_EPSFILTERSPEC +Language=Bulgarian +WSA_QOS_EPSFILTERSPEC - An invalid FILTERSPEC was found in the QOS provider-specific buffer. +. + +MessageId=11029 +Severity=Success +Facility=System +SymbolicName=WSA_QOS_ESDMODEOBJ +Language=Bulgarian +WSA_QOS_ESDMODEOBJ - An invalid shape discard mode object was found in the QOS provider-specific buffer. +. + +MessageId=11030 +Severity=Success +Facility=System +SymbolicName=WSA_QOS_ESHAPERATEOBJ +Language=Bulgarian +WSA_QOS_ESHAPERATEOBJ - An invalid shaping rate object was found in the QOS provider-specific buffer. +. + +MessageId=11031 +Severity=Success +Facility=System +SymbolicName=WSA_QOS_RESERVED_PETYPE +Language=Bulgarian +WSA_QOS_RESERVED_PETYPE - A reserved policy element was found in the QOS provider-specific buffer. +. + +MessageId=12000 +Severity=Success +Facility=System +SymbolicName=ERROR_FLT_IO_COMPLETE +Language=Bulgarian +ERROR_FLT_IO_COMPLETE - The IO was completed by a filter. +. + +MessageId=12001 +Severity=Success +Facility=System +SymbolicName=ERROR_FLT_BUFFER_TOO_SMALL +Language=Bulgarian +ERROR_FLT_BUFFER_TOO_SMALL - The buffer is too small to contain the entry. No information has been written to the buffer. +. + +MessageId=12002 +Severity=Success +Facility=System +SymbolicName=ERROR_FLT_NO_HANDLER_DEFINED +Language=Bulgarian +ERROR_FLT_NO_HANDLER_DEFINED - A handler was not defined by the filter for this operation. +. + +MessageId=12003 +Severity=Success +Facility=System +SymbolicName=ERROR_FLT_CONTEXT_ALREADY_DEFINED +Language=Bulgarian +ERROR_FLT_CONTEXT_ALREADY_DEFINED - A context is already defined for this object. +. + +MessageId=12004 +Severity=Success +Facility=System +SymbolicName=ERROR_FLT_INVALID_ASYNCHRONOUS_REQUEST +Language=Bulgarian +ERROR_FLT_INVALID_ASYNCHRONOUS_REQUEST - Asynchronous requests are not valid for this operation. +. + +MessageId=12005 +Severity=Success +Facility=System +SymbolicName=ERROR_FLT_DISALLOW_FAST_IO +Language=Bulgarian +ERROR_FLT_DISALLOW_FAST_IO - Disallow the Fast IO path for this operation. +. + +MessageId=12006 +Severity=Success +Facility=System +SymbolicName=ERROR_FLT_INVALID_NAME_REQUEST +Language=Bulgarian +ERROR_FLT_INVALID_NAME_REQUEST - An invalid name request was made. The name requested cannot be retrieved at this time. +. + +MessageId=12007 +Severity=Success +Facility=System +SymbolicName=ERROR_FLT_NOT_SAFE_TO_POST_OPERATION +Language=Bulgarian +ERROR_FLT_NOT_SAFE_TO_POST_OPERATION - Posting this operation to a worker thread for further processing is not safe at this time because it could lead to a system deadlock. +. + +MessageId=12008 +Severity=Success +Facility=System +SymbolicName=ERROR_FLT_NOT_INITIALIZED +Language=Bulgarian +ERROR_FLT_NOT_INITIALIZED - The Filter Manager was not initialized when a filter tried to register. Make sure that the Filter Manager is getting loaded as a driver. +. + +MessageId=12009 +Severity=Success +Facility=System +SymbolicName=ERROR_FLT_FILTER_NOT_READY +Language=Bulgarian +ERROR_FLT_FILTER_NOT_READY - The filter is not ready for attachment to volumes because it has not finished initializing (FltStartFiltering has not been called). +. + +MessageId=12010 +Severity=Success +Facility=System +SymbolicName=ERROR_FLT_POST_OPERATION_CLEANUP +Language=Bulgarian +ERROR_FLT_POST_OPERATION_CLEANUP - The filter must cleanup any operation specific context at this time because it is being removed from the system before the operation is completed by the lower drivers. +. + +MessageId=12011 +Severity=Success +Facility=System +SymbolicName=ERROR_FLT_INTERNAL_ERROR +Language=Bulgarian +ERROR_FLT_INTERNAL_ERROR - The Filter Manager had an internal error from which it cannot recover, therefore the operation has been failed. This is usually the result of a filter returning an invalid value from a pre-operation callback. +. + +MessageId=12012 +Severity=Success +Facility=System +SymbolicName=ERROR_FLT_DELETING_OBJECT +Language=Bulgarian +ERROR_FLT_DELETING_OBJECT - The object specified for this action is in the process of being deleted, therefore the action requested cannot be completed at this time. +. + +MessageId=12013 +Severity=Success +Facility=System +SymbolicName=ERROR_FLT_MUST_BE_NONPAGED_POOL +Language=Bulgarian +ERROR_FLT_MUST_BE_NONPAGED_POOL - Non-paged pool must be used for this type of context. +. + +MessageId=12014 +Severity=Success +Facility=System +SymbolicName=ERROR_FLT_DUPLICATE_ENTRY +Language=Bulgarian +ERROR_FLT_DUPLICATE_ENTRY - A duplicate handler definition has been provided for an operation. +. + +MessageId=12015 +Severity=Success +Facility=System +SymbolicName=ERROR_FLT_CBDQ_DISABLED +Language=Bulgarian +ERROR_FLT_CBDQ_DISABLED - The callback data queue has been disabled. +. + +MessageId=12016 +Severity=Success +Facility=System +SymbolicName=ERROR_FLT_DO_NOT_ATTACH +Language=Bulgarian +ERROR_FLT_DO_NOT_ATTACH - Do not attach the filter to the volume at this time. +. + +MessageId=12017 +Severity=Success +Facility=System +SymbolicName=ERROR_FLT_DO_NOT_DETACH +Language=Bulgarian +ERROR_FLT_DO_NOT_DETACH - Do not detach the filter from the volume at this time. +. + +MessageId=12018 +Severity=Success +Facility=System +SymbolicName=ERROR_FLT_INSTANCE_ALTITUDE_COLLISION +Language=Bulgarian +ERROR_FLT_INSTANCE_ALTITUDE_COLLISION - An instance already exists at this altitude on the volume specified. +. + +MessageId=12019 +Severity=Success +Facility=System +SymbolicName=ERROR_FLT_INSTANCE_NAME_COLLISION +Language=Bulgarian +ERROR_FLT_INSTANCE_NAME_COLLISION - An instance already exists with this name on the volume specified. +. + +MessageId=12020 +Severity=Success +Facility=System +SymbolicName=ERROR_FLT_FILTER_NOT_FOUND +Language=Bulgarian +ERROR_FLT_FILTER_NOT_FOUND - The system could not find the filter specified. +. + +MessageId=12021 +Severity=Success +Facility=System +SymbolicName=ERROR_FLT_VOLUME_NOT_FOUND +Language=Bulgarian +ERROR_FLT_VOLUME_NOT_FOUND - The system could not find the volume specified. +. + +MessageId=12022 +Severity=Success +Facility=System +SymbolicName=ERROR_FLT_INSTANCE_NOT_FOUND +Language=Bulgarian +ERROR_FLT_INSTANCE_NOT_FOUND - The system could not find the instance specified. +. + +MessageId=12023 +Severity=Success +Facility=System +SymbolicName=ERROR_FLT_CONTEXT_ALLOCATION_NOT_FOUND +Language=Bulgarian +ERROR_FLT_CONTEXT_ALLOCATION_NOT_FOUND - No registered context allocation definition was found for the given request. +. + +MessageId=12024 +Severity=Success +Facility=System +SymbolicName=ERROR_FLT_INVALID_CONTEXT_REGISTRATION +Language=Bulgarian +ERROR_FLT_INVALID_CONTEXT_REGISTRATION - An invalid parameter was specified during context registration. +. + +MessageId=12025 +Severity=Success +Facility=System +SymbolicName=ERROR_FLT_NAME_CACHE_MISS +Language=Bulgarian +ERROR_FLT_NAME_CACHE_MISS - The name requested was not found in Filter Manager's name cache and could not be retrieved from the file system. +. + +MessageId=12026 +Severity=Success +Facility=System +SymbolicName=ERROR_FLT_NO_DEVICE_OBJECT +Language=Bulgarian +ERROR_FLT_NO_DEVICE_OBJECT - The requested device object does not exist for the given volume. +. + +MessageId=12027 +Severity=Success +Facility=System +SymbolicName=ERROR_FLT_VOLUME_ALREADY_MOUNTED +Language=Bulgarian +ERROR_FLT_VOLUME_ALREADY_MOUNTED - The specified volume is already mounted. +. + +MessageId=12028 +Severity=Success +Facility=System +SymbolicName=ERROR_FLT_NO_WAITER_FOR_REPLY +Language=Bulgarian +ERROR_FLT_NO_WAITER_FOR_REPLY - No waiter is present for the filter's reply to this message. +. + +MessageId=13000 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_QM_POLICY_EXISTS +Language=Bulgarian +ERROR_IPSEC_QM_POLICY_EXISTS - The specified quick mode policy already exists. +. + +MessageId=13001 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_QM_POLICY_NOT_FOUND +Language=Bulgarian +ERROR_IPSEC_QM_POLICY_NOT_FOUND - The specified quick mode policy was not found. +. + +MessageId=13002 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_QM_POLICY_IN_USE +Language=Bulgarian +ERROR_IPSEC_QM_POLICY_IN_USE - The specified quick mode policy is being used. +. + +MessageId=13003 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_MM_POLICY_EXISTS +Language=Bulgarian +ERROR_IPSEC_MM_POLICY_EXISTS - The specified main mode policy already exists. +. + +MessageId=13004 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_MM_POLICY_NOT_FOUND +Language=Bulgarian +ERROR_IPSEC_MM_POLICY_NOT_FOUND - The specified main mode policy was not found. +. + +MessageId=13005 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_MM_POLICY_IN_USE +Language=Bulgarian +ERROR_IPSEC_MM_POLICY_IN_USE - The specified main mode policy is being used. +. + +MessageId=13006 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_MM_FILTER_EXISTS +Language=Bulgarian +ERROR_IPSEC_MM_FILTER_EXISTS - The specified main mode filter already exists. +. + +MessageId=13007 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_MM_FILTER_NOT_FOUND +Language=Bulgarian +ERROR_IPSEC_MM_FILTER_NOT_FOUND - The specified main mode filter was not found. +. + +MessageId=13008 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_TRANSPORT_FILTER_EXISTS +Language=Bulgarian +ERROR_IPSEC_TRANSPORT_FILTER_EXISTS - The specified transport mode filter already exists. +. + +MessageId=13009 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_TRANSPORT_FILTER_NOT_FOUND +Language=Bulgarian +ERROR_IPSEC_TRANSPORT_FILTER_NOT_FOUND - The specified transport mode filter does not exist. +. + +MessageId=13010 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_MM_AUTH_EXISTS +Language=Bulgarian +ERROR_IPSEC_MM_AUTH_EXISTS - The specified main mode authentication list exists. +. + +MessageId=13011 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_MM_AUTH_NOT_FOUND +Language=Bulgarian +ERROR_IPSEC_MM_AUTH_NOT_FOUND - The specified main mode authentication list was not found. +. + +MessageId=13012 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_MM_AUTH_IN_USE +Language=Bulgarian +ERROR_IPSEC_MM_AUTH_IN_USE - The specified quick mode policy is being used. +. + +MessageId=13013 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_DEFAULT_MM_POLICY_NOT_FOUND +Language=Bulgarian +ERROR_IPSEC_DEFAULT_MM_POLICY_NOT_FOUND - The specified main mode policy was not found. +. + +MessageId=13014 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_DEFAULT_MM_AUTH_NOT_FOUND +Language=Bulgarian +ERROR_IPSEC_DEFAULT_MM_AUTH_NOT_FOUND - The specified quick mode policy was not found. +. + +MessageId=13015 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_DEFAULT_QM_POLICY_NOT_FOUND +Language=Bulgarian +ERROR_IPSEC_DEFAULT_QM_POLICY_NOT_FOUND - The manifest file contains one or more syntax errors. +. + +MessageId=13016 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_TUNNEL_FILTER_EXISTS +Language=Bulgarian +ERROR_IPSEC_TUNNEL_FILTER_EXISTS - The application attempted to activate a disabled activation context. +. + +MessageId=13017 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_TUNNEL_FILTER_NOT_FOUND +Language=Bulgarian +ERROR_IPSEC_TUNNEL_FILTER_NOT_FOUND - The requested lookup key was not found in any active activation context. +. + +MessageId=13018 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_MM_FILTER_PENDING_DELETION +Language=Bulgarian +ERROR_IPSEC_MM_FILTER_PENDING_DELETION - The Main Mode filter is pending deletion. +. + +MessageId=13019 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_TRANSPORT_FILTER_PENDING_DELETION +Language=Bulgarian +ERROR_IPSEC_TRANSPORT_FILTER_PENDING_DELETION - The transport filter is pending deletion. +. + +MessageId=13020 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_TUNNEL_FILTER_PENDING_DELETION +Language=Bulgarian +ERROR_IPSEC_TUNNEL_FILTER_PENDING_DELETION - The tunnel filter is pending deletion. +. + +MessageId=13021 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_MM_POLICY_PENDING_DELETION +Language=Bulgarian +ERROR_IPSEC_MM_POLICY_PENDING_DELETION - The Main Mode policy is pending deletion. +. + +MessageId=13022 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_MM_AUTH_PENDING_DELETION +Language=Bulgarian +ERROR_IPSEC_MM_AUTH_PENDING_DELETION - The Main Mode authentication bundle is pending deletion. +. + +MessageId=13023 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_QM_POLICY_PENDING_DELETION +Language=Bulgarian +ERROR_IPSEC_QM_POLICY_PENDING_DELETION - The Quick Mode policy is pending deletion. +. + +MessageId=13024 +Severity=Success +Facility=System +SymbolicName=WARNING_IPSEC_MM_POLICY_PRUNED +Language=Bulgarian +WARNING_IPSEC_MM_POLICY_PRUNED - The Main Mode policy was successfully added, but some of the requested offers are not supported. +. + +MessageId=13025 +Severity=Success +Facility=System +SymbolicName=WARNING_IPSEC_QM_POLICY_PRUNED +Language=Bulgarian +WARNING_IPSEC_QM_POLICY_PRUNED - The Quick Mode policy was successfully added, but some of the requested offers are not supported. +. + +MessageId=13801 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_AUTH_FAIL +Language=Bulgarian +ERROR_IPSEC_IKE_AUTH_FAIL - IKE authentication credentials are unacceptable. +. + +MessageId=13802 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_ATTRIB_FAIL +Language=Bulgarian +ERROR_IPSEC_IKE_ATTRIB_FAIL - IKE security attributes are unacceptable. +. + +MessageId=13803 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_NEGOTIATION_PENDING +Language=Bulgarian +ERROR_IPSEC_IKE_NEGOTIATION_PENDING - IKE Negotiation in progress. +. + +MessageId=13804 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_GENERAL_PROCESSING_ERROR +Language=Bulgarian +ERROR_IPSEC_IKE_GENERAL_PROCESSING_ERROR - General processing error. +. + +MessageId=13805 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_TIMED_OUT +Language=Bulgarian +ERROR_IPSEC_IKE_TIMED_OUT - Negotiation timed out. +. + +MessageId=13806 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_NO_CERT +Language=Bulgarian +ERROR_IPSEC_IKE_NO_CERT - IKE failed to find valid machine certificate. +. + +MessageId=13807 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_SA_DELETED +Language=Bulgarian +ERROR_IPSEC_IKE_SA_DELETED - IKE SA deleted by peer before establishment completed. +. + +MessageId=13808 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_SA_REAPED +Language=Bulgarian +ERROR_IPSEC_IKE_SA_REAPED - IKE SA deleted before establishment completed. +. + +MessageId=13809 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_MM_ACQUIRE_DROP +Language=Bulgarian +ERROR_IPSEC_IKE_MM_ACQUIRE_DROP - Negotiation request sat in Queue too long. +. + +MessageId=13810 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_QM_ACQUIRE_DROP +Language=Bulgarian +ERROR_IPSEC_IKE_QM_ACQUIRE_DROP - Negotiation request sat in Queue too long. +. + +MessageId=13811 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_QUEUE_DROP_MM +Language=Bulgarian +ERROR_IPSEC_IKE_QUEUE_DROP_MM - Negotiation request sat in Queue too long. +. + +MessageId=13812 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_QUEUE_DROP_NO_MM +Language=Bulgarian +ERROR_IPSEC_IKE_QUEUE_DROP_NO_MM - Negotiation request sat in Queue too long. +. + +MessageId=13813 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_DROP_NO_RESPONSE +Language=Bulgarian +ERROR_IPSEC_IKE_DROP_NO_RESPONSE - No response from peer. +. + +MessageId=13814 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_MM_DELAY_DROP +Language=Bulgarian +ERROR_IPSEC_IKE_MM_DELAY_DROP - Negotiation took too long. +. + +MessageId=13815 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_QM_DELAY_DROP +Language=Bulgarian +ERROR_IPSEC_IKE_QM_DELAY_DROP - Negotiation took too long. +. + +MessageId=13816 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_ERROR +Language=Bulgarian +ERROR_IPSEC_IKE_ERROR - Unknown error occurred. +. + +MessageId=13817 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_CRL_FAILED +Language=Bulgarian +ERROR_IPSEC_IKE_CRL_FAILED - Certificate Revocation Check failed. +. + +MessageId=13818 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_INVALID_KEY_USAGE +Language=Bulgarian +ERROR_IPSEC_IKE_INVALID_KEY_USAGE - Invalid certificate key usage. +. + +MessageId=13819 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_INVALID_CERT_TYPE +Language=Bulgarian +ERROR_IPSEC_IKE_INVALID_CERT_TYPE - Invalid certificate type. +. + +MessageId=13820 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_NO_PRIVATE_KEY +Language=Bulgarian +ERROR_IPSEC_IKE_NO_PRIVATE_KEY - No private key associated with machine certificate. +. + +MessageId=13822 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_DH_FAIL +Language=Bulgarian +ERROR_IPSEC_IKE_DH_FAIL - Failure in Diffie-Hellman computation. +. + +MessageId=13824 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_INVALID_HEADER +Language=Bulgarian +ERROR_IPSEC_IKE_INVALID_HEADER - Invalid header. +. + +MessageId=13825 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_NO_POLICY +Language=Bulgarian +ERROR_IPSEC_IKE_NO_POLICY - No policy configured. +. + +MessageId=13826 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_INVALID_SIGNATURE +Language=Bulgarian +ERROR_IPSEC_IKE_INVALID_SIGNATURE - Failed to verify signature. +. + +MessageId=13827 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_KERBEROS_ERROR +Language=Bulgarian +ERROR_IPSEC_IKE_KERBEROS_ERROR - Failed to authenticate using Kerberos. +. + +MessageId=13828 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_NO_PUBLIC_KEY +Language=Bulgarian +ERROR_IPSEC_IKE_NO_PUBLIC_KEY - Peer's certificate did not have a public key. +. + +MessageId=13829 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_PROCESS_ERR +Language=Bulgarian +ERROR_IPSEC_IKE_PROCESS_ERR - Error processing error payload. +. + +MessageId=13830 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_PROCESS_ERR_SA +Language=Bulgarian +ERROR_IPSEC_IKE_PROCESS_ERR_SA - Error processing SA payload. +. + +MessageId=13831 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_PROCESS_ERR_PROP +Language=Bulgarian +ERROR_IPSEC_IKE_PROCESS_ERR_PROP - Error processing Proposal payload. +. + +MessageId=13832 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_PROCESS_ERR_TRANS +Language=Bulgarian +ERROR_IPSEC_IKE_PROCESS_ERR_TRANS - Error processing Transform payload. +. + +MessageId=13833 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_PROCESS_ERR_KE +Language=Bulgarian +ERROR_IPSEC_IKE_PROCESS_ERR_KE - Error processing KE payload. +. + +MessageId=13834 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_PROCESS_ERR_ID +Language=Bulgarian +ERROR_IPSEC_IKE_PROCESS_ERR_ID - Error processing ID payload. +. + +MessageId=13835 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_PROCESS_ERR_CERT +Language=Bulgarian +ERROR_IPSEC_IKE_PROCESS_ERR_CERT - Error processing Cert payload. +. + +MessageId=13836 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_PROCESS_ERR_CERT_REQ +Language=Bulgarian +ERROR_IPSEC_IKE_PROCESS_ERR_CERT_REQ - Error processing Certificate Request payload. +. + +MessageId=13837 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_PROCESS_ERR_HASH +Language=Bulgarian +ERROR_IPSEC_IKE_PROCESS_ERR_HASH - Error processing Hash payload. +. + +MessageId=13838 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_PROCESS_ERR_SIG +Language=Bulgarian +ERROR_IPSEC_IKE_PROCESS_ERR_SIG - Error processing Signature payload. +. + +MessageId=13839 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_PROCESS_ERR_NONCE +Language=Bulgarian +ERROR_IPSEC_IKE_PROCESS_ERR_NONCE - Error processing Nonce payload. +. + +MessageId=13840 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_PROCESS_ERR_NOTIFY +Language=Bulgarian +ERROR_IPSEC_IKE_PROCESS_ERR_NOTIFY - Error processing Notify payload. +. + +MessageId=13841 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_PROCESS_ERR_DELETE +Language=Bulgarian +ERROR_IPSEC_IKE_PROCESS_ERR_DELETE - Error processing Delete Payload. +. + +MessageId=13842 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_PROCESS_ERR_VENDOR +Language=Bulgarian +ERROR_IPSEC_IKE_PROCESS_ERR_VENDOR - Error processing VendorId payload. +. + +MessageId=13843 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_INVALID_PAYLOAD +Language=Bulgarian +ERROR_IPSEC_IKE_INVALID_PAYLOAD - Invalid payload received. +. + +MessageId=13844 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_LOAD_SOFT_SA +Language=Bulgarian +ERROR_IPSEC_IKE_LOAD_SOFT_SA - Soft SA loaded. +. + +MessageId=13845 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_SOFT_SA_TORN_DOWN +Language=Bulgarian +ERROR_IPSEC_IKE_SOFT_SA_TORN_DOWN - Soft SA torn down. +. + +MessageId=13846 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_INVALID_COOKIE +Language=Bulgarian +ERROR_IPSEC_IKE_INVALID_COOKIE - Invalid cookie received.. +. + +MessageId=13847 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_NO_PEER_CERT +Language=Bulgarian +ERROR_IPSEC_IKE_NO_PEER_CERT - Peer failed to send valid machine certificate. +. + +MessageId=13848 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_PEER_CRL_FAILED +Language=Bulgarian +ERROR_IPSEC_IKE_PEER_CRL_FAILED - Certification Revocation check of peer's certificate failed. +. + +MessageId=13849 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_POLICY_CHANGE +Language=Bulgarian +ERROR_IPSEC_IKE_POLICY_CHANGE - New policy invalidated SAs formed with old policy. +. + +MessageId=13850 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_NO_MM_POLICY +Language=Bulgarian +ERROR_IPSEC_IKE_NO_MM_POLICY - There is no available Main Mode IKE policy. +. + +MessageId=13851 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_NOTCBPRIV +Language=Bulgarian +ERROR_IPSEC_IKE_NOTCBPRIV - Failed to enabled TCB privilege. +. + +MessageId=13852 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_SECLOADFAIL +Language=Bulgarian +ERROR_IPSEC_IKE_SECLOADFAIL - Failed to load SECURITY.DLL. +. + +MessageId=13853 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_FAILSSPINIT +Language=Bulgarian +ERROR_IPSEC_IKE_FAILSSPINIT - Failed to obtain security function table dispatch address from SSPI. +. + +MessageId=13854 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_FAILQUERYSSP +Language=Bulgarian +ERROR_IPSEC_IKE_FAILQUERYSSP - Failed to query Kerberos package to obtain max token size. +. + +MessageId=13855 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_SRVACQFAIL +Language=Bulgarian +ERROR_IPSEC_IKE_SRVACQFAIL - Failed to obtain Kerberos server credentials for ISAKMP/ERROR_IPSEC_IKE service. Kerberos authentication will not function. The most likely reason for this is lack of domain membership. This is normal if your computer is a member of a workgroup. +. + +MessageId=13856 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_SRVQUERYCRED +Language=Bulgarian +ERROR_IPSEC_IKE_SRVQUERYCRED - Failed to determine SSPI principal name for ISAKMP/ERROR_IPSEC_IKE service (QueryCredentialsAttributes). +. + +MessageId=13857 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_GETSPIFAIL +Language=Bulgarian +ERROR_IPSEC_IKE_GETSPIFAIL - Failed to obtain new SPI for the inbound SA from IPSec driver. The most common cause for this is that the driver does not have the correct filter. Check your policy to verify the filters. +. + +MessageId=13858 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_INVALID_FILTER +Language=Bulgarian +ERROR_IPSEC_IKE_INVALID_FILTER - Given filter is invalid. +. + +MessageId=13859 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_OUT_OF_MEMORY +Language=Bulgarian +ERROR_IPSEC_IKE_OUT_OF_MEMORY - Memory allocation failed. +. + +MessageId=13860 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_ADD_UPDATE_KEY_FAILED +Language=Bulgarian +ERROR_IPSEC_IKE_ADD_UPDATE_KEY_FAILED - Failed to add Security Association to IPSec Driver. The most common cause for this is if the IKE negotiation took too long to complete. If the problem persists, reduce the load on the faulting machine. +. + +MessageId=13861 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_INVALID_POLICY +Language=Bulgarian +ERROR_IPSEC_IKE_INVALID_POLICY - Invalid policy. +. + +MessageId=13862 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_UNKNOWN_DOI +Language=Bulgarian +ERROR_IPSEC_IKE_UNKNOWN_DOI - Invalid DOI. +. + +MessageId=13863 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_INVALID_SITUATION +Language=Bulgarian +ERROR_IPSEC_IKE_INVALID_SITUATION - Invalid situation. +. + +MessageId=13864 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_DH_FAILURE +Language=Bulgarian +ERROR_IPSEC_IKE_DH_FAILURE - Diffie-Hellman failure. +. + +MessageId=13865 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_INVALID_GROUP +Language=Bulgarian +ERROR_IPSEC_IKE_INVALID_GROUP - Invalid Diffie-Hellman group. +. + +MessageId=13866 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_ENCRYPT +Language=Bulgarian +ERROR_IPSEC_IKE_ENCRYPT - Error encrypting payload. +. + +MessageId=13867 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_DECRYPT +Language=Bulgarian +ERROR_IPSEC_IKE_DECRYPT - Error decrypting payload. +. + +MessageId=13868 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_POLICY_MATCH +Language=Bulgarian +ERROR_IPSEC_IKE_POLICY_MATCH - Policy match error. +. + +MessageId=13869 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_UNSUPPORTED_ID +Language=Bulgarian +ERROR_IPSEC_IKE_UNSUPPORTED_ID - Unsupported ID. +. + +MessageId=13870 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_INVALID_HASH +Language=Bulgarian +ERROR_IPSEC_IKE_INVALID_HASH - Hash verification failed. +. + +MessageId=13871 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_INVALID_HASH_ALG +Language=Bulgarian +ERROR_IPSEC_IKE_INVALID_HASH_ALG - Invalid hash algorithm. +. + +MessageId=13872 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_INVALID_HASH_SIZE +Language=Bulgarian +ERROR_IPSEC_IKE_INVALID_HASH_SIZE - Invalid hash size. +. + +MessageId=13873 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_INVALID_ENCRYPT_ALG +Language=Bulgarian +ERROR_IPSEC_IKE_INVALID_ENCRYPT_ALG - Invalid encryption algorithm. +. + +MessageId=13874 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_INVALID_AUTH_ALG +Language=Bulgarian +ERROR_IPSEC_IKE_INVALID_AUTH_ALG - Invalid authentication algorithm. +. + +MessageId=13875 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_INVALID_SIG +Language=Bulgarian +ERROR_IPSEC_IKE_INVALID_SIG - Invalid certificate signature. +. + +MessageId=13876 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_LOAD_FAILED +Language=Bulgarian +ERROR_IPSEC_IKE_LOAD_FAILED - Load failed. +. + +MessageId=13877 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_RPC_DELETE +Language=Bulgarian +ERROR_IPSEC_IKE_RPC_DELETE - Deleted via RPC call. +. + +MessageId=13878 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_BENIGN_REINIT +Language=Bulgarian +ERROR_IPSEC_IKE_BENIGN_REINIT - Temporary state created to perform reinit. This is not a real failure. +. + +MessageId=13879 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_INVALID_RESPONDER_LIFETIME_NOTIFY +Language=Bulgarian +ERROR_IPSEC_IKE_INVALID_RESPONDER_LIFETIME_NOTIFY - The lifetime value received in the Responder Lifetime Notify is below the Windows 2000 configured minimum value. Please fix the policy on the peer machine. +. + +MessageId=13881 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_INVALID_CERT_KEYLEN +Language=Bulgarian +ERROR_IPSEC_IKE_INVALID_CERT_KEYLEN - Key length in certificate is too small for configured security requirements. +. + +MessageId=13882 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_MM_LIMIT +Language=Bulgarian +ERROR_IPSEC_IKE_MM_LIMIT - Max number of established MM SAs to peer exceeded. +. + +MessageId=13883 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_NEGOTIATION_DISABLED +Language=Bulgarian +ERROR_IPSEC_IKE_NEGOTIATION_DISABLED - IKE received a policy that disables negotiation. +. + +MessageId=13884 +Severity=Success +Facility=System +SymbolicName=ERROR_IPSEC_IKE_NEG_STATUS_END +Language=Bulgarian +ERROR_IPSEC_IKE_NEG_STATUS_END - ERROR_IPSEC_IKE_NEG_STATUS_END +. + +MessageId=14000 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_SECTION_NOT_FOUND +Language=Bulgarian +ERROR_SXS_SECTION_NOT_FOUND - The requested section was not present in the activation context. +. + +MessageId=14001 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_CANT_GEN_ACTCTX +Language=Bulgarian +ERROR_SXS_CANT_GEN_ACTCTX - This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. +. + +MessageId=14002 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_INVALID_ACTCTXDATA_FORMAT +Language=Bulgarian +ERROR_SXS_INVALID_ACTCTXDATA_FORMAT - The application binding data format is invalid. +. + +MessageId=14003 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_ASSEMBLY_NOT_FOUND +Language=Bulgarian +ERROR_SXS_ASSEMBLY_NOT_FOUND - The referenced assembly is not installed on your system. +. + +MessageId=14004 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_MANIFEST_FORMAT_ERROR +Language=Bulgarian +ERROR_SXS_MANIFEST_FORMAT_ERROR - The manifest file does not begin with the required tag and format information. +. + +MessageId=14005 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_MANIFEST_PARSE_ERROR +Language=Bulgarian +ERROR_SXS_MANIFEST_PARSE_ERROR - The manifest file contains one or more syntax errors. +. + +MessageId=14006 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_ACTIVATION_CONTEXT_DISABLED +Language=Bulgarian +ERROR_SXS_ACTIVATION_CONTEXT_DISABLED - The application attempted to activate a disabled activation context. +. + +MessageId=14007 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_KEY_NOT_FOUND +Language=Bulgarian +ERROR_SXS_KEY_NOT_FOUND - The requested lookup key was not found in any active activation context. +. + +MessageId=14008 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_VERSION_CONFLICT +Language=Bulgarian +ERROR_SXS_VERSION_CONFLICT - A component version required by the application conflicts with another component version already active. +. + +MessageId=14009 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_WRONG_SECTION_TYPE +Language=Bulgarian +ERROR_SXS_WRONG_SECTION_TYPE - The type requested activation context section does not match the query API used. +. + +MessageId=14010 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_THREAD_QUERIES_DISABLED +Language=Bulgarian +ERROR_SXS_THREAD_QUERIES_DISABLED - Lack of system resources has required isolated activation to be disabled for the current thread of execution. +. + +MessageId=14011 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_PROCESS_DEFAULT_ALREADY_SET +Language=Bulgarian +ERROR_SXS_PROCESS_DEFAULT_ALREADY_SET - An attempt to set the process default activation context failed because the process default activation context was already set. +. + +MessageId=14012 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_UNKNOWN_ENCODING_GROUP +Language=Bulgarian +ERROR_SXS_UNKNOWN_ENCODING_GROUP - The encoding group identifier specified is not recognized. +. + +MessageId=14013 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_UNKNOWN_ENCODING +Language=Bulgarian +ERROR_SXS_UNKNOWN_ENCODING - The encoding requested is not recognized. +. + +MessageId=14014 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_INVALID_XML_NAMESPACE_URI +Language=Bulgarian +ERROR_SXS_INVALID_XML_NAMESPACE_URI - The manifest contains a reference to an invalid URI. +. + +MessageId=14015 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_ROOT_MANIFEST_DEPENDENCY_NOT_INSTALLED +Language=Bulgarian +ERROR_SXS_ROOT_MANIFEST_DEPENDENCY_NOT_INSTALLED - The application manifest contains a reference to a dependent assembly which is not installed. +. + +MessageId=14016 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_LEAF_MANIFEST_DEPENDENCY_NOT_INSTALLED +Language=Bulgarian +ERROR_SXS_LEAF_MANIFEST_DEPENDENCY_NOT_INSTALLED - The manifest for an assembly used by the application has a reference to a dependent assembly which is not installed. +. + +MessageId=14017 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE +Language=Bulgarian +ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE - The manifest contains an attribute for the assembly identity which is not valid. +. + +MessageId=14018 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_MANIFEST_MISSING_REQUIRED_DEFAULT_NAMESPACE +Language=Bulgarian +ERROR_SXS_MANIFEST_MISSING_REQUIRED_DEFAULT_NAMESPACE - The manifest is missing the required default namespace specification on the assembly element. +. + +MessageId=14019 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_MANIFEST_INVALID_REQUIRED_DEFAULT_NAMESPACE +Language=Bulgarian +ERROR_SXS_MANIFEST_INVALID_REQUIRED_DEFAULT_NAMESPACE - The manifest has a default namespace specified on the assembly element but its value is not \"urn:schemas-microsoft-com:asm.v1\". +. + +MessageId=14020 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_PRIVATE_MANIFEST_CROSS_PATH_WITH_REPARSE_POINT +Language=Bulgarian +ERROR_SXS_PRIVATE_MANIFEST_CROSS_PATH_WITH_REPARSE_POINT - The private manifest probe has crossed the reparse-point-associated path. +. + +MessageId=14021 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_DUPLICATE_DLL_NAME +Language=Bulgarian +ERROR_SXS_DUPLICATE_DLL_NAME - Two or more components referenced directly or indirectly by the application manifest have files by the same name. +. + +MessageId=14022 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_DUPLICATE_WINDOWCLASS_NAME +Language=Bulgarian +ERROR_SXS_DUPLICATE_WINDOWCLASS_NAME - Two or more components referenced directly or indirectly by the application manifest have window classes with the same name. +. + +MessageId=14023 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_DUPLICATE_CLSID +Language=Bulgarian +ERROR_SXS_DUPLICATE_CLSID - Two or more components referenced directly or indirectly by the application manifest have the same COM server CLSIDs. +. + +MessageId=14024 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_DUPLICATE_IID +Language=Bulgarian +ERROR_SXS_DUPLICATE_IID - Two or more components referenced directly or indirectly by the application manifest have proxies for the same COM interface IIDs. +. + +MessageId=14025 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_DUPLICATE_TLBID +Language=Bulgarian +ERROR_SXS_DUPLICATE_TLBID - Two or more components referenced directly or indirectly by the application manifest have the same COM type library TLBIDs. +. + +MessageId=14026 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_DUPLICATE_PROGID +Language=Bulgarian +ERROR_SXS_DUPLICATE_PROGID - Two or more components referenced directly or indirectly by the application manifest have the same COM ProgIDs. +. + +MessageId=14027 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_DUPLICATE_ASSEMBLY_NAME +Language=Bulgarian +ERROR_SXS_DUPLICATE_ASSEMBLY_NAME - Two or more components referenced directly or indirectly by the application manifest are different versions of the same component which is not permitted. +. + +MessageId=14028 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_FILE_HASH_MISMATCH +Language=Bulgarian +ERROR_SXS_FILE_HASH_MISMATCH - A component's file does not match the verification information present in the component manifest. +. + +MessageId=14029 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_POLICY_PARSE_ERROR +Language=Bulgarian +ERROR_SXS_POLICY_PARSE_ERROR - The policy manifest contains one or more syntax errors. +. + +MessageId=14030 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_MISSINGQUOTE +Language=Bulgarian +ERROR_SXS_XML_E_MISSINGQUOTE - Manifest Parse Error : A string literal was expected, but no opening quote character was found. +. + +MessageId=14031 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_COMMENTSYNTAX +Language=Bulgarian +ERROR_SXS_XML_E_COMMENTSYNTAX - Manifest Parse Error : Incorrect syntax was used in a comment. +. + +MessageId=14032 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_BADSTARTNAMECHAR +Language=Bulgarian +ERROR_SXS_XML_E_BADSTARTNAMECHAR - Manifest Parse Error : A name was started with an invalid character. +. + +MessageId=14033 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_BADNAMECHAR +Language=Bulgarian +ERROR_SXS_XML_E_BADNAMECHAR - Manifest Parse Error : A name contained an invalid character. +. + +MessageId=14034 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_BADCHARINSTRING +Language=Bulgarian +ERROR_SXS_XML_E_BADCHARINSTRING - Manifest Parse Error : A string literal contained an invalid character. +. + +MessageId=14035 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_XMLDECLSYNTAX +Language=Bulgarian +ERROR_SXS_XML_E_XMLDECLSYNTAX - Manifest Parse Error : Invalid syntax for an XML declaration. +. + +MessageId=14036 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_BADCHARDATA +Language=Bulgarian +ERROR_SXS_XML_E_BADCHARDATA - Manifest Parse Error : An invalid character was found in text content. +. + +MessageId=14037 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_MISSINGWHITESPACE +Language=Bulgarian +ERROR_SXS_XML_E_MISSINGWHITESPACE - Manifest Parse Error : Required white space was missing. +. + +MessageId=14038 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_EXPECTINGTAGEND +Language=Bulgarian +ERROR_SXS_XML_E_EXPECTINGTAGEND - Manifest Parse Error : The character '>' was expected. +. + +MessageId=14039 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_MISSINGSEMICOLON +Language=Bulgarian +ERROR_SXS_XML_E_MISSINGSEMICOLON - Manifest Parse Error : A semi colon character was expected. +. + +MessageId=14040 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_UNBALANCEDPAREN +Language=Bulgarian +ERROR_SXS_XML_E_UNBALANCEDPAREN - Manifest Parse Error : Unbalanced parentheses. +. + +MessageId=14041 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_INTERNALERROR +Language=Bulgarian +ERROR_SXS_XML_E_INTERNALERROR - Manifest Parse Error : Internal error. +. + +MessageId=14042 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_UNEXPECTED_WHITESPACE +Language=Bulgarian +ERROR_SXS_XML_E_UNEXPECTED_WHITESPACE - Manifest Parse Error : White space is not allowed at this location. +. + +MessageId=14043 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_INCOMPLETE_ENCODING +Language=Bulgarian +ERROR_SXS_XML_E_INCOMPLETE_ENCODING - Manifest Parse Error : End of file reached in invalid state for current encoding. +. + +MessageId=14044 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_MISSING_PAREN +Language=Bulgarian +ERROR_SXS_XML_E_MISSING_PAREN - Manifest Parse Error : Missing parenthesis. +. + +MessageId=14045 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_EXPECTINGCLOSEQUOTE +Language=Bulgarian +ERROR_SXS_XML_E_EXPECTINGCLOSEQUOTE - Manifest Parse Error : A single or double closing quote character (\' or \") is missing. +. + +MessageId=14046 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_MULTIPLE_COLONS +Language=Bulgarian +ERROR_SXS_XML_E_MULTIPLE_COLONS - Manifest Parse Error : Multiple colons are not allowed in a name. +. + +MessageId=14047 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_INVALID_DECIMAL +Language=Bulgarian +ERROR_SXS_XML_E_INVALID_DECIMAL - Manifest Parse Error : Invalid character for decimal digit. +. + +MessageId=14048 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_INVALID_HEXIDECIMAL +Language=Bulgarian +ERROR_SXS_XML_E_INVALID_HEXIDECIMAL - Manifest Parse Error : Invalid character for hexadecimal digit. +. + +MessageId=14049 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_INVALID_UNICODE +Language=Bulgarian +ERROR_SXS_XML_E_INVALID_UNICODE - Manifest Parse Error : Invalid Unicode character value for this platform. +. + +MessageId=14050 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_WHITESPACEORQUESTIONMARK +Language=Bulgarian +ERROR_SXS_XML_E_WHITESPACEORQUESTIONMARK - Manifest Parse Error : Expecting white space or '?'. +. + +MessageId=14051 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_UNEXPECTEDENDTAG +Language=Bulgarian +ERROR_SXS_XML_E_UNEXPECTEDENDTAG - Manifest Parse Error : End tag was not expected at this location. +. + +MessageId=14052 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_UNCLOSEDTAG +Language=Bulgarian +ERROR_SXS_XML_E_UNCLOSEDTAG - Manifest Parse Error : The following tags were not closed: %1. +. + +MessageId=14053 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_DUPLICATEATTRIBUTE +Language=Bulgarian +ERROR_SXS_XML_E_DUPLICATEATTRIBUTE - Manifest Parse Error : Duplicate attribute. +. + +MessageId=14054 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_MULTIPLEROOTS +Language=Bulgarian +ERROR_SXS_XML_E_MULTIPLEROOTS - Manifest Parse Error : Only one top level element is allowed in an XML document. +. + +MessageId=14055 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_INVALIDATROOTLEVEL +Language=Bulgarian +ERROR_SXS_XML_E_INVALIDATROOTLEVEL - Manifest Parse Error : Invalid at the top level of the document. +. + +MessageId=14056 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_BADXMLDECL +Language=Bulgarian +ERROR_SXS_XML_E_BADXMLDECL - Manifest Parse Error : Invalid XML declaration. +. + +MessageId=14057 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_MISSINGROOT +Language=Bulgarian +ERROR_SXS_XML_E_MISSINGROOT - Manifest Parse Error : XML document must have a top level element. +. + +MessageId=14058 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_UNEXPECTEDEOF +Language=Bulgarian +ERROR_SXS_XML_E_UNEXPECTEDEOF - Manifest Parse Error : Unexpected end of file. +. + +MessageId=14059 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_BADPEREFINSUBSET +Language=Bulgarian +ERROR_SXS_XML_E_BADPEREFINSUBSET - Manifest Parse Error : Parameter entities cannot be used inside markup declarations in an internal subset. +. + +MessageId=14060 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_UNCLOSEDSTARTTAG +Language=Bulgarian +ERROR_SXS_XML_E_UNCLOSEDSTARTTAG - Manifest Parse Error : Element was not closed. +. + +MessageId=14061 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_UNCLOSEDENDTAG +Language=Bulgarian +ERROR_SXS_XML_E_UNCLOSEDENDTAG - Manifest Parse Error : End element was missing the character '>'. +. + +MessageId=14062 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_UNCLOSEDSTRING +Language=Bulgarian +ERROR_SXS_XML_E_UNCLOSEDSTRING - Manifest Parse Error : A string literal was not closed. +. + +MessageId=14063 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_UNCLOSEDCOMMENT +Language=Bulgarian +ERROR_SXS_XML_E_UNCLOSEDCOMMENT - Manifest Parse Error : A comment was not closed. +. + +MessageId=14064 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_UNCLOSEDDECL +Language=Bulgarian +ERROR_SXS_XML_E_UNCLOSEDDECL - Manifest Parse Error : A declaration was not closed. +. + +MessageId=14065 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_UNCLOSEDCDATA +Language=Bulgarian +ERROR_SXS_XML_E_UNCLOSEDCDATA - Manifest Parse Error : A CDATA section was not closed. +. + +MessageId=14066 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_RESERVEDNAMESPACE +Language=Bulgarian +ERROR_SXS_XML_E_RESERVEDNAMESPACE - Manifest Parse Error : The namespace prefix is not allowed to start with the reserved string \"xml\". +. + +MessageId=14067 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_INVALIDENCODING +Language=Bulgarian +ERROR_SXS_XML_E_INVALIDENCODING - Manifest Parse Error : System does not support the specified encoding. +. + +MessageId=14068 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_INVALIDSWITCH +Language=Bulgarian +ERROR_SXS_XML_E_INVALIDSWITCH - Manifest Parse Error : Switch from current encoding to specified encoding not supported. +. + +MessageId=14069 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_BADXMLCASE +Language=Bulgarian +ERROR_SXS_XML_E_BADXMLCASE - Manifest Parse Error : The name 'xml' is reserved and must be lower case. +. + +MessageId=14070 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_INVALID_STANDALONE +Language=Bulgarian +ERROR_SXS_XML_E_INVALID_STANDALONE - Manifest Parse Error : The standalone attribute must have the value 'yes' or 'no'. +. + +MessageId=14071 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_UNEXPECTED_STANDALONE +Language=Bulgarian +ERROR_SXS_XML_E_UNEXPECTED_STANDALONE - Manifest Parse Error : The standalone attribute cannot be used in external entities. +. + +MessageId=14072 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_INVALID_VERSION +Language=Bulgarian +ERROR_SXS_XML_E_INVALID_VERSION - Manifest Parse Error : Invalid version number. +. + +MessageId=14073 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_XML_E_MISSINGEQUALS +Language=Bulgarian +ERROR_SXS_XML_E_MISSINGEQUALS - Manifest Parse Error : Missing equals sign between attribute and attribute value. +. + +MessageId=14074 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_PROTECTION_RECOVERY_FAILED +Language=Bulgarian +ERROR_SXS_PROTECTION_RECOVERY_FAILED - Assembly Protection Error: Unable to recover the specified assembly. +. + +MessageId=14075 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_PROTECTION_PUBLIC_KEY_TOO_SHORT +Language=Bulgarian +ERROR_SXS_PROTECTION_PUBLIC_KEY_TOO_SHORT - Assembly Protection Error: The public key for an assembly was too short to be allowed. +. + +MessageId=14076 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_PROTECTION_CATALOG_NOT_VALID +Language=Bulgarian +ERROR_SXS_PROTECTION_CATALOG_NOT_VALID - Assembly Protection Error: The catalog for an assembly is not valid, or does not match the assembly's manifest. +. + +MessageId=14077 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_UNTRANSLATABLE_HRESULT +Language=Bulgarian +ERROR_SXS_UNTRANSLATABLE_HRESULT - An HRESULT could not be translated to a corresponding Win32 error code. +. + +MessageId=14078 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_PROTECTION_CATALOG_FILE_MISSING +Language=Bulgarian +ERROR_SXS_PROTECTION_CATALOG_FILE_MISSING - Assembly Protection Error: The catalog for an assembly is missing. +. + +MessageId=14079 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_MISSING_ASSEMBLY_IDENTITY_ATTRIBUTE +Language=Bulgarian +ERROR_SXS_MISSING_ASSEMBLY_IDENTITY_ATTRIBUTE - The supplied assembly identity is missing one or more attributes which must be present in this context. +. + +MessageId=14080 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME +Language=Bulgarian +ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME - The supplied assembly identity has one or more attribute names that contain characters not permitted in XML names. +. + +MessageId=14081 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_ASSEMBLY_MISSING +Language=Bulgarian +ERROR_SXS_ASSEMBLY_MISSING - The referenced assembly could not be found. +. + +MessageId=14082 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_CORRUPT_ACTIVATION_STACK +Language=Bulgarian +ERROR_SXS_CORRUPT_ACTIVATION_STACK - The activation context activation stack for the running thread of execution is corrupt. +. + +MessageId=14083 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_CORRUPTION +Language=Bulgarian +ERROR_SXS_CORRUPTION - The application isolation metadata for this process or thread has become corrupt. +. + +MessageId=14084 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_EARLY_DEACTIVATION +Language=Bulgarian +ERROR_SXS_EARLY_DEACTIVATION - The activation context being deactivated is not the most recently activated one. +. + +MessageId=14085 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_INVALID_DEACTIVATION +Language=Bulgarian +ERROR_SXS_INVALID_DEACTIVATION - The activation context being deactivated is not active for the current thread of execution. +. + +MessageId=14086 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_MULTIPLE_DEACTIVATION +Language=Bulgarian +ERROR_SXS_MULTIPLE_DEACTIVATION - The activation context being deactivated has already been deactivated. +. + +MessageId=14087 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_PROCESS_TERMINATION_REQUESTED +Language=Bulgarian +ERROR_SXS_PROCESS_TERMINATION_REQUESTED - A component used by the isolation facility has requested to terminate the process. +. + +MessageId=14088 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_RELEASE_ACTIVATION_CONTEXT +Language=Bulgarian +ERROR_SXS_RELEASE_ACTIVATION_CONTEXT - A kernel mode component is releasing a reference on an activation context. +. + +MessageId=14089 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY +Language=Bulgarian +ERROR_SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY - The activation context of system default assembly could not be generated. +. + +MessageId=14090 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE +Language=Bulgarian +ERROR_SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE - The value of an attribute in an identity is not within the legal range. +. + +MessageId=14091 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_INVALID_IDENTITY_ATTRIBUTE_NAME +Language=Bulgarian +ERROR_SXS_INVALID_IDENTITY_ATTRIBUTE_NAME - The name of an attribute in an identity is not within the legal range. +. + +MessageId=14092 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_IDENTITY_DUPLICATE_ATTRIBUTE +Language=Bulgarian +ERROR_SXS_IDENTITY_DUPLICATE_ATTRIBUTE - An identity contains two definitions for the same attribute. +. + +MessageId=14093 +Severity=Success +Facility=System +SymbolicName=ERROR_SXS_IDENTITY_PARSE_ERROR +Language=Bulgarian +ERROR_SXS_IDENTITY_PARSE_ERROR - The identity string is malformed. This may be due to a trailing comma, more than two unnamed attributes, missing attribute name or missing attribute value. +. + +MessageId=15000 +Severity=Success +Facility=System +SymbolicName=ERROR_EVT_INVALID_CHANNEL_PATH +Language=Bulgarian +ERROR_EVT_INVALID_CHANNEL_PATH - The specified channel path is invalid. See extended error info for more details. +. + +MessageId=15001 +Severity=Success +Facility=System +SymbolicName=ERROR_EVT_INVALID_QUERY +Language=Bulgarian +ERROR_EVT_INVALID_QUERY - The specified query is invalid. See extended error info for more details. +. + +MessageId=15002 +Severity=Success +Facility=System +SymbolicName=ERROR_EVT_PUBLISHER_MANIFEST_NOT_FOUND +Language=Bulgarian +ERROR_EVT_PUBLISHER_MANIFEST_NOT_FOUND - The publisher did indicate they have a manifest/resource but a manifest/resource could not be found. +. + +MessageId=15003 +Severity=Success +Facility=System +SymbolicName=ERROR_EVT_PUBLISHER_MANIFEST_NOT_SPECIFIED +Language=Bulgarian +ERROR_EVT_PUBLISHER_MANIFEST_NOT_SPECIFIED - The publisher does not have a manifest and is performing an operation which requires they have a manifest. +. + +MessageId=15004 +Severity=Success +Facility=System +SymbolicName=ERROR_EVT_NO_REGISTERED_TEMPLATE +Language=Bulgarian +ERROR_EVT_NO_REGISTERED_TEMPLATE - There is no registered template for specified event id. +. + +MessageId=15005 +Severity=Success +Facility=System +SymbolicName=ERROR_EVT_EVENT_CHANNEL_MISMATCH +Language=Bulgarian +ERROR_EVT_EVENT_CHANNEL_MISMATCH - The specified event was declared in the manifest to go a different channel than the one this publisher handle is bound to. +. + +MessageId=15006 +Severity=Success +Facility=System +SymbolicName=ERROR_EVT_UNEXPECTED_VALUE_TYPE +Language=Bulgarian +ERROR_EVT_UNEXPECTED_VALUE_TYPE - The type of a specified substitution value does not match the type expected from the template definition. +. + +MessageId=15007 +Severity=Success +Facility=System +SymbolicName=ERROR_EVT_UNEXPECTED_NUM_VALUES +Language=Bulgarian +ERROR_EVT_UNEXPECTED_NUM_VALUES - The number of specified substitution values does not match the number expected from the template definition. +. + +MessageId=15008 +Severity=Success +Facility=System +SymbolicName=ERROR_EVT_CHANNEL_NOT_FOUND +Language=Bulgarian +ERROR_EVT_CHANNEL_NOT_FOUND - The specified channel could not be found. Check channel configuration. +. + +MessageId=15009 +Severity=Success +Facility=System +SymbolicName=ERROR_EVT_MALFORMED_XML_TEXT +Language=Bulgarian +ERROR_EVT_MALFORMED_XML_TEXT - The specified xml text was not well-formed. See Extended Error for more details. +. + +MessageId=15010 +Severity=Success +Facility=System +SymbolicName=ERROR_EVT_CHANNEL_PATH_TOO_GENERAL +Language=Bulgarian +ERROR_EVT_CHANNEL_PATH_TOO_GENERAL - The specified channel path selects more than one instance of a channel. The operation requires that only one channel be selected. It may be necessary to scope channel path to version / publicKeyToken to select only one instance. +. + + +; Facility=WIN32 + +MessageId=0x000E +Severity=Warning +Facility=WIN32 +SymbolicName=E_OUTOFMEMORY +Language=Bulgarian +E_OUTOFMEMORY - Out of memory +. + +MessageId=0x0057 +Severity=Warning +Facility=WIN32 +SymbolicName=E_INVALIDARG +Language=Bulgarian +E_INVALIDARG - One or more arguments are invalid +. + +MessageId=0x0006 +Severity=Warning +Facility=WIN32 +SymbolicName=E_HANDLE +Language=Bulgarian +E_POINTER - Invalid handle +. + +MessageId=0x0005 +Severity=Warning +Facility=WIN32 +SymbolicName=E_ACCESSDENIED +Language=Bulgarian +E_ACCESSDENIED - WIN32 access denied error +. + + +; Facility=ITF + +MessageId=0x0000 +Severity=Warning +Facility=ITF +SymbolicName=OLE_E_OLEVERB +Language=Bulgarian +OLE_E_OLEVERB - Invalid OLEVERB structure +. + +MessageId=0x0001 +Severity=Warning +Facility=ITF +SymbolicName=OLE_E_ADVF +Language=Bulgarian +OLE_E_ADVF - Invalid advise flags +. + +MessageId=0x0002 +Severity=Warning +Facility=ITF +SymbolicName=OLE_E_ENUM_NOMORE +Language=Bulgarian +OLE_E_ENUM_NOMORE - Can't enumerate any more, because the associated data is missing +. + +MessageId=0x0003 +Severity=Warning +Facility=ITF +SymbolicName=OLE_E_ADVISENOTSUPPORTED +Language=Bulgarian +OLE_E_ADVISENOTSUPPORTED - This implementation doesn't take advises +. + +MessageId=0x0004 +Severity=Warning +Facility=ITF +SymbolicName=OLE_E_NOCONNECTION +Language=Bulgarian +OLE_E_NOCONNECTION - There is no connection for this connection ID +. + +MessageId=0x0005 +Severity=Warning +Facility=ITF +SymbolicName=OLE_E_NOTRUNNING +Language=Bulgarian +OLE_E_NOTRUNNING - Need to run the object to perform this operation +. + +MessageId=0x0006 +Severity=Warning +Facility=ITF +SymbolicName=OLE_E_NOCACHE +Language=Bulgarian +OLE_E_NOCACHE - There is no cache to operate on +. + +MessageId=0x0007 +Severity=Warning +Facility=ITF +SymbolicName=OLE_E_BLANK +Language=Bulgarian +OLE_E_BLANK - Uninitialized object +. + +MessageId=0x0008 +Severity=Warning +Facility=ITF +SymbolicName=OLE_E_CLASSDIFF +Language=Bulgarian +OLE_E_CLASSDIFF - Linked object's source class has changed +. + +MessageId=0x0009 +Severity=Warning +Facility=ITF +SymbolicName=OLE_E_CANT_GETMONIKER +Language=Bulgarian +OLE_E_CANT_GETMONIKER - Not able to get the moniker of the object +. + +MessageId=0x000A +Severity=Warning +Facility=ITF +SymbolicName=OLE_E_CANT_BINDTOSOURCE +Language=Bulgarian +OLE_E_CANT_BINDTOSOURCE - Not able to bind to the source +. + +MessageId=0x000B +Severity=Warning +Facility=ITF +SymbolicName=OLE_E_STATIC +Language=Bulgarian +OLE_E_STATIC - Object is static; operation not allowed +. + +MessageId=0x000C +Severity=Warning +Facility=ITF +SymbolicName=OLE_E_PROMPTSAVECANCELLED +Language=Bulgarian +OLE_E_PROMPTSAVECANCELLED - User canceled out of save dialog +. + +MessageId=0x000D +Severity=Warning +Facility=ITF +SymbolicName=OLE_E_INVALIDRECT +Language=Bulgarian +OLE_E_INVALIDRECT - Invalid rectangle +. + +MessageId=0x000E +Severity=Warning +Facility=ITF +SymbolicName=OLE_E_WRONGCOMPOBJ +Language=Bulgarian +OLE_E_WRONGCOMPOBJ - compobj.dll is too old for the ole2.dll initialized +. + +MessageId=0x000F +Severity=Warning +Facility=ITF +SymbolicName=OLE_E_INVALIDHWND +Language=Bulgarian +OLE_E_INVALIDHWND - Invalid window handle +. + +MessageId=0x0010 +Severity=Warning +Facility=ITF +SymbolicName=OLE_E_NOT_INPLACEACTIVE +Language=Bulgarian +OLE_E_NOT_INPLACEACTIVE - Object is not in any of the inplace active states +. + +MessageId=0x0011 +Severity=Warning +Facility=ITF +SymbolicName=OLE_E_CANTCONVERT +Language=Bulgarian +OLE_E_CANTCONVERT - Not able to convert object +. + +MessageId=0x0012 +Severity=Warning +Facility=ITF +SymbolicName=OLE_E_NOSTORAGE +Language=Bulgarian +OLE_E_NOSTORAGE - Not able to perform the operation because object is not given storage yet +. + +MessageId=0x0064 +Severity=Warning +Facility=ITF +SymbolicName=DV_E_FORMATETC +Language=Bulgarian +DV_E_FORMATETC - Invalid FORMATETC structure +. + +MessageId=0x0065 +Severity=Warning +Facility=ITF +SymbolicName=DV_E_DVTARGETDEVICE +Language=Bulgarian +DV_E_DVTARGETDEVICE - Invalid DVTARGETDEVICE structure +. + +MessageId=0x0066 +Severity=Warning +Facility=ITF +SymbolicName=DV_E_STGMEDIUM +Language=Bulgarian +DV_E_STGMEDIUM - Invalid STDGMEDIUM structure +. + +MessageId=0x0067 +Severity=Warning +Facility=ITF +SymbolicName=DV_E_STATDATA +Language=Bulgarian +DV_E_STATDATA - Invalid STATDATA structure +. + +MessageId=0x0068 +Severity=Warning +Facility=ITF +SymbolicName=DV_E_LINDEX +Language=Bulgarian +DV_E_LINDEX - Invalid lindex +. + +MessageId=0x0069 +Severity=Warning +Facility=ITF +SymbolicName=DV_E_TYMED +Language=Bulgarian +DV_E_TYMED - Invalid tymed +. + +MessageId=0x006A +Severity=Warning +Facility=ITF +SymbolicName=DV_E_CLIPFORMAT +Language=Bulgarian +DV_E_CLIPFORMAT - Invalid clipboard format +. + +MessageId=0x006B +Severity=Warning +Facility=ITF +SymbolicName=DV_E_DVASPECT +Language=Bulgarian +DV_E_DVASPECT - Invalid aspect(s) +. + +MessageId=0x006C +Severity=Warning +Facility=ITF +SymbolicName=DV_E_DVTARGETDEVICE_SIZE +Language=Bulgarian +DV_E_DVTARGETDEVICE_SIZE - tdSize parameter of the DVTARGETDEVICE structure is invalid +. + +MessageId=0x006D +Severity=Warning +Facility=ITF +SymbolicName=DV_E_NOIVIEWOBJECT +Language=Bulgarian +DV_E_NOIVIEWOBJECT - Object doesn't support IViewObject interface +. + +MessageId=0x0100 +Severity=Warning +Facility=ITF +SymbolicName=DRAGDROP_E_NOTREGISTERED +Language=Bulgarian +DRAGDROP_E_NOTREGISTERED - Trying to revoke a drop target that has not been registered +. + +MessageId=0x0101 +Severity=Warning +Facility=ITF +SymbolicName=DRAGDROP_E_ALREADYREGISTERED +Language=Bulgarian +DRAGDROP_E_ALREADYREGISTERED - This window has already been registered as a drop target +. + +MessageId=0x0102 +Severity=Warning +Facility=ITF +SymbolicName=DRAGDROP_E_INVALIDHWND +Language=Bulgarian +DRAGDROP_E_INVALIDHWND - Invalid window handle +. + +MessageId=0x0110 +Severity=Warning +Facility=ITF +SymbolicName=CLASS_E_NOAGGREGATION +Language=Bulgarian +CLASS_E_NOAGGREGATION - Class does not support aggregation (or class object is remote) +. + +MessageId=0x0111 +Severity=Warning +Facility=ITF +SymbolicName=CLASS_E_CLASSNOTAVAILABLE +Language=Bulgarian +CLASS_E_CLASSNOTAVAILABLE - ClassFactory cannot supply requested class +. + +MessageId=0x0112 +Severity=Warning +Facility=ITF +SymbolicName=CLASS_E_NOTLICENSED +Language=Bulgarian +CLASS_E_NOTLICENSED - Class is not licensed for use +. + +; EOF diff --git a/reactos/dll/win32/netid/lang/es-ES.rc b/reactos/dll/win32/netid/lang/es-ES.rc index 7e1dd802ca2..e3ace94b891 100644 --- a/reactos/dll/win32/netid/lang/es-ES.rc +++ b/reactos/dll/win32/netid/lang/es-ES.rc @@ -14,7 +14,7 @@ BEGIN LTEXT "ReactOS usa la siguiente informaciуn para identificar su equipo en la red.", IDC_STATIC, 40, 5, 204, 20 LTEXT "Descripciуn del equipo:", IDC_STATIC, 6, 40, 85, 9 EDITTEXT IDC_COMPDESC, 98, 38, 146, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP - LTEXT "Nombre completo de equipo:", IDC_STATIC, 6, 66, 64, 14 + LTEXT "Nombre completo del equipo:", IDC_STATIC, 6, 66, 64, 16 LTEXT "(Defecto)", IDC_COMPUTERNAME, 98, 68, 144, 11 LTEXT "Grupo de trabajo:", IDC_WORKGROUPDOMAIN, 6, 84, 64, 9 LTEXT "(vacнo)", IDC_WORKGROUPDOMAIN_NAME, 98, 84, 144, 9 diff --git a/reactos/dll/win32/newdev/lang/bg-BG.rc b/reactos/dll/win32/newdev/lang/bg-BG.rc index 07e38b70958..6a3235829a0 100644 --- a/reactos/dll/win32/newdev/lang/bg-BG.rc +++ b/reactos/dll/win32/newdev/lang/bg-BG.rc @@ -9,9 +9,9 @@ BEGIN LTEXT "Здравейте",IDC_WELCOMETITLE,120,8,195,24 LTEXT "Вълшебникът ще сложи водач за ново устройство:", IDC_STATIC,120,21,195,16 - LTEXT "Натиснете 'Напред' за продължение.",IDC_STATIC,120,169,195,17 + LTEXT "Натиснете „Напред“ за продължение.",IDC_STATIC,120,169,195,17 LTEXT "НЕИЗВЕСТНО УСТРОЙСТВО",IDC_DEVICE,134,36,164,11 - LTEXT "WARNING! INSTALLING A CUSTOM DEVICE MAY FREEZE YOUR COMPUTER OR RENDER IT UNBOOTABLE!",IDC_STATIC,120,59,195,16 + LTEXT "ВБИМАНИЕ! СЛАГАНЕТО НА ИЗБРАНО ОТ ПОТРЕБИТЕЛЯ УСТРОЙСТВО МОЖЕ ДА ДОВЕДЕ ДО ЗАБИВАНЕ НА КОМПЮТЪРА ВИ ИЛИ ДА ГО НАПРАВИ НЕЗАПУСКАЕМ!",IDC_STATIC,120,59,195,16 CONTROL "Сам сложи водача",IDC_RADIO_AUTO,"Button", BS_AUTORADIOBUTTON,120,112,178,13 CONTROL "Слагане на водача от определено място",IDC_RADIO_MANUAL, @@ -27,7 +27,7 @@ BEGIN LTEXT "Слагането неуспешно",IDC_FINISHTITLE,120,8,195,24 LTEXT "Устройството не можа да бъде подкарано, защото не бе намерен водач.", IDC_STATIC,120,40,195,19 - LTEXT "натиснете 'Назад', ако имате диск с водач или знаете пътя към него.", + LTEXT "Натиснете „Назад“, ако имате диск с водач или знаете пътя към него.", IDC_STATIC,120,98,181,24 CONTROL "Този прозорец да не се показва повече",IDC_DONOTSHOWDLG,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,120,170,180,11 @@ -88,7 +88,7 @@ BEGIN LTEXT "Слагането приключи",IDC_FINISHTITLE,120,8,195,11 LTEXT "Трябва да презапуснете компютъра, за да завърши слагането на:", IDC_STATIC,120,32,195,19 - LTEXT "натиснете 'Край', за да затворите вълшебника.",IDC_STATIC,120,174, + LTEXT "Натиснете „Край“, за да затворите вълшебника.",IDC_STATIC,120,174, 179,11 LTEXT "НЕИЗВЕСТНО УСТРОЙСТВО",IDC_DEVICE,148,53,147,12 END @@ -102,7 +102,7 @@ BEGIN LTEXT "Слагането завърши",IDC_FINISHTITLE,120,8,195,11 LTEXT "Вълшебникът завърши слагането на водач за:", IDC_STATIC,120,32,195,19 - LTEXT "Натиснете 'Край' за затваряне на вълшебника.",IDC_STATIC,120,174, + LTEXT "Натиснете „Край“ за затваряне на вълшебника.",IDC_STATIC,120,174, 179,11 LTEXT "НЕИЗВЕСТНО УСТРОЙСТВО",IDC_DEVICE,148,53,147,12 END diff --git a/reactos/dll/win32/shell32/lang/es-ES.rc b/reactos/dll/win32/shell32/lang/es-ES.rc index 214fc23c44b..7e335a62e07 100644 --- a/reactos/dll/win32/shell32/lang/es-ES.rc +++ b/reactos/dll/win32/shell32/lang/es-ES.rc @@ -297,9 +297,9 @@ BEGIN CONTROL "", 14015, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 20, 140, 200, 20 LTEXT "Unidad %s", 14010, 100, 170, 40, 10 - PUSHBUTTON "Liberar espacio en disco", 14011, 180, 175, 50, 15, WS_TABSTOP - CHECKBOX "Comprimir contenido para ahorrar espacio en disco", 14012, 15, 205, 180, 10, WS_DISABLED - CHECKBOX "Permitir a Index Server indizar el disco para acelerar la bъsqueda", 14012, 15, 220, 200, 10, WS_DISABLED + PUSHBUTTON "Liberar espacio en disco", 14011, 160, 175, 80, 15, WS_TABSTOP + CHECKBOX "Comprimir contenido para ahorrar espacio en disco", 14012, 5, 205, 180, 10, WS_DISABLED + CHECKBOX "Permitir a Index Server indizar el disco para acelerar la bъsqueda", 14012, 5, 220, 220, 10, WS_DISABLED END DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 @@ -315,7 +315,7 @@ BEGIN PUSHBUTTON "Desfragmentar ahora...", 14001, 130, 105, 90, 15, WS_TABSTOP GROUPBOX "Copia de seguridad ", -1, 5, 130, 230, 60 LTEXT "Esta opciуn realizarб una copia de seguridad de\nlos archivos almacenados en la unidad.", -1, 40, 150, 160, 20 - PUSHBUTTON "Realizar copia de seguridad ahora...", 14002, 130, 170, 90, 15, WS_TABSTOP + PUSHBUTTON "Realizar copia de seguridad ahora...", 14002, 90, 170, 130, 15, WS_TABSTOP END DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 @@ -566,17 +566,17 @@ BEGIN AUTOCHECKBOX "&Habilitar compresiуn", 28675, 16, 152, 155, 10 END -CHKDSK_DLG DIALOGEX 50, 50, 194, 120 +CHKDSK_DLG DIALOGEX 50, 50, 240, 120 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "Check Disk" +CAPTION "Comprobar disco" FONT 8, "MS Shell Dlg" BEGIN - DEFPUSHBUTTON "Start", IDOK, 53, 100, 60, 14 - GROUPBOX "Check disk options", -1, 7, 6, 179, 50 - PUSHBUTTON "Cancel", IDCANCEL, 118, 100, 60, 14 - AUTOCHECKBOX "Automatically fix file system errors", 14000, 16, 15, 155, 10 - AUTOCHECKBOX "&Scan for and attempt recovery of bad sectors", 14001, 16, 30, 165, 10 - CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 + DEFPUSHBUTTON "Iniciar", IDOK, 53, 100, 60, 14 + GROUPBOX "Opciones de comprobaciуn de disco ", -1, 7, 6, 225, 50 + PUSHBUTTON "Cancelar", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "Reparar &automбticamente errores en el sistema de archivos", 14000, 16, 15, 200, 10 + AUTOCHECKBOX "&Examinar e intentar recuperar los sectores defectuosos", 14001, 16, 30, 200, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 225, 8 LTEXT "", 14003, 60, 80, 170, 10 END @@ -608,25 +608,25 @@ BEGIN IDS_SHV_COLUMN9 "Comentarios" IDS_SHV_COLUMN10 "Propietario" IDS_SHV_COLUMN11 "Grupo" - IDS_SHV_COLUMN12 "Filename" - IDS_SHV_COLUMN13 "Category" + IDS_SHV_COLUMN12 "Nombre del archivo" + IDS_SHV_COLUMN13 "Categorнa" IDS_SHV_COLUMN_DELFROM "Ubicaciуn original" IDS_SHV_COLUMN_DELDATE "Fecha de eliminaciуn" - IDS_SHV_COLUMN_FONTTYPE "Fonttype" - IDS_SHV_COLUMN_WORKGROUP "Workgroup" - IDS_SHV_NETWORKLOCATION "Network Location" - IDS_SHV_COLUMN_DOCUMENTS "Documents" - IDS_SHV_COLUMN_STATUS "Status" - IDS_SHV_COLUMN_COMMENTS "Comments" - IDS_SHV_COLUMN_LOCATION "Location" - IDS_SHV_COLUMN_MODEL "Model" + IDS_SHV_COLUMN_FONTTYPE "Tipo de fuente" + IDS_SHV_COLUMN_WORKGROUP "Grupo de trabajo" + IDS_SHV_NETWORKLOCATION "Ubicaciуn en red" + IDS_SHV_COLUMN_DOCUMENTS "Documentos" + IDS_SHV_COLUMN_STATUS "Estado" + IDS_SHV_COLUMN_COMMENTS "Comentarios" + IDS_SHV_COLUMN_LOCATION "Ubicaciуn" + IDS_SHV_COLUMN_MODEL "Modelo" /* special folders */ IDS_DESKTOP "Escritorio" IDS_MYCOMPUTER "Mi PC" IDS_RECYCLEBIN_FOLDER_NAME "Papelera de reciclaje" IDS_CONTROLPANEL "Panel de control" - IDS_ADMINISTRATIVETOOLS "Administrative Tools" + IDS_ADMINISTRATIVETOOLS "Herramientas Administrativas" /* context menus */ IDS_VIEW_LARGE "Iconos &grandes" @@ -641,11 +641,11 @@ BEGIN IDS_PROPERTIES "&Propiedades" IDS_CUT "C&ortar" IDS_RESTORE "Restaurar" - IDS_FORMATDRIVE "Format..." - IDS_RENAME "Rename" - IDS_INSERT "Insert" + IDS_FORMATDRIVE "Formatear..." + IDS_RENAME "Renombrar" + IDS_INSERT "Insertar" - IDS_CREATEFOLDER_DENIED "No se puede crear nueva carpeta: Permiso denegado." + IDS_CREATEFOLDER_DENIED "No se puede crear una nueva carpeta: Permiso denegado." IDS_CREATEFOLDER_CAPTION "Error durante la creaciуn de una nueva carpeta" IDS_DELETEITEM_CAPTION "Confirmar eliminaciуn de archivos" IDS_DELETEFOLDER_CAPTION "Confirmar eliminaciуn de carpetas" @@ -746,9 +746,9 @@ BEGIN IDS_PREVIEW_VERB "Vista previa" IDS_FILE_FOLDER "%u Archivos, %u Carpetas" - IDS_PRINTERS "Printers" - IDS_FONTS "Fonts" - IDS_INSTALLNEWFONT "Install New Font..." + IDS_PRINTERS "Impresoras" + IDS_FONTS "Fuentes" + IDS_INSTALLNEWFONT "Instalar Nueva Fuente..." - IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" + IDS_DEFAULT_CLUSTER_SIZE "Tamaсo asignado por defecto" END diff --git a/reactos/subsystems/win32/csrss/win32csr/lang/bg-BG.rc b/reactos/subsystems/win32/csrss/win32csr/lang/bg-BG.rc index d358f5703c7..69d97786ad4 100644 --- a/reactos/subsystems/win32/csrss/win32csr/lang/bg-BG.rc +++ b/reactos/subsystems/win32/csrss/win32csr/lang/bg-BG.rc @@ -27,7 +27,7 @@ BEGIN DEFPUSHBUTTON "Отказ",IDCANCEL,142,98,43,17 PUSHBUTTON "&Прекратяване веднага",IDC_END_NOW,150,71,60,17 LTEXT "Приложението не отговаря",IDC_STATIC,7,7,178,8 - LTEXT "За да се върнете в РеактОС и да проверите състоянието на приложението, натиснете „Отказ„.", + LTEXT "За да се върнете в РеактОС и да проверите състоянието на приложението, натиснете „Отказ“.", IDC_STATIC,7,26,178,16 LTEXT "Ако решите да затворите приложението веднага, ще изгубите всички незаписани данни. За да прекратите приложението веднага, натиснете „Прекратяване веднага“.", IDC_STATIC,7,53,178,26 From b736cabdae70bed42104f71ebc28deaa5e75285d Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Tue, 19 Aug 2008 21:09:58 +0000 Subject: [PATCH 081/324] - Remove dead code svn path=/trunk/; revision=35462 --- reactos/ntoskrnl/rtl/libsupp.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/reactos/ntoskrnl/rtl/libsupp.c b/reactos/ntoskrnl/rtl/libsupp.c index 4b4559df287..b67235086fc 100644 --- a/reactos/ntoskrnl/rtl/libsupp.c +++ b/reactos/ntoskrnl/rtl/libsupp.c @@ -557,30 +557,6 @@ RtlpGetAtomEntry(PRTL_ATOM_TABLE AtomTable, ULONG Index) return Entry; } -/* FIXME - RtlpCreateUnicodeString is obsolete and should be removed ASAP! */ -BOOLEAN FASTCALL -RtlpCreateUnicodeString( - IN OUT PUNICODE_STRING UniDest, - IN PCWSTR Source, - IN POOL_TYPE PoolType) -{ - ULONG Length; - - Length = (wcslen (Source) + 1) * sizeof(WCHAR); - UniDest->Buffer = ExAllocatePoolWithTag(PoolType, Length, TAG('U', 'S', 'T', 'R')); - if (UniDest->Buffer == NULL) - return FALSE; - - RtlCopyMemory (UniDest->Buffer, - Source, - Length); - - UniDest->MaximumLength = (USHORT)Length; - UniDest->Length = (USHORT)Length - sizeof (WCHAR); - - return TRUE; -} - /* * Ldr Resource support code */ From 9080c0c2e746669d0dc4164fe631abb58efd91a8 Mon Sep 17 00:00:00 2001 From: Daniel Reimer Date: Tue, 19 Aug 2008 21:45:56 +0000 Subject: [PATCH 082/324] Last remnants of Bug 3649. Hopefully... svn path=/trunk/; revision=35464 --- reactos/dll/win32/shell32/lang/sk-SK.rc | 44 ++++++++++++------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/reactos/dll/win32/shell32/lang/sk-SK.rc b/reactos/dll/win32/shell32/lang/sk-SK.rc index 880be7e0111..8b660b39d26 100644 --- a/reactos/dll/win32/shell32/lang/sk-SK.rc +++ b/reactos/dll/win32/shell32/lang/sk-SK.rc @@ -1,7 +1,7 @@ /* TRANSLATOR : Mбrio Kaиmбr /Mario Kacmar/ aka Kario (kario@szm.sk) * NOTE : partially translated * TRANSLATED : 26-12-2007 - * LAST CHANGE: 30-07-2008 + * LAST CHANGE: 16-08-2008 */ /* @@ -56,12 +56,12 @@ BEGIN END MENUITEM "Zarovnaќ ikony", FCIDM_SHVIEW_SNAPTOGRID MENUITEM SEPARATOR - MENUITEM "Obnoviќ", FCIDM_SHVIEW_REFRESH + MENUITEM "&Obnoviќ", FCIDM_SHVIEW_REFRESH MENUITEM SEPARATOR MENUITEM "&Prilepiќ", FCIDM_SHVIEW_INSERT MENUITEM "Prilepiќ od&kaz", FCIDM_SHVIEW_INSERTLINK MENUITEM SEPARATOR - MENUITEM "Vlastnosti", FCIDM_SHVIEW_PROPERTIES + MENUITEM "Vl&astnosti", FCIDM_SHVIEW_PROPERTIES END END @@ -571,14 +571,14 @@ END CHKDSK_DLG DIALOGEX 50, 50, 194, 120 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "Check Disk" +CAPTION "Kontrola disku" FONT 8, "MS Shell Dlg" BEGIN - DEFPUSHBUTTON "Start", IDOK, 53, 100, 60, 14 - GROUPBOX "Check disk options", -1, 7, 6, 179, 50 - PUSHBUTTON "Cancel", IDCANCEL, 118, 100, 60, 14 - AUTOCHECKBOX "Automatically fix file system errors", 14000, 16, 15, 155, 10 - AUTOCHECKBOX "&Scan for and attempt recovery of bad sectors", 14001, 16, 30, 165, 10 + DEFPUSHBUTTON "&Spustiќ", IDOK, 53, 100, 60, 14 + GROUPBOX "Moћnosti kontroly disku", -1, 7, 6, 179, 50 + PUSHBUTTON "Zruљiќ", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "&Automaticky opraviќ chyby v systэme sъborov", 14000, 16, 15, 155, 10 + AUTOCHECKBOX "Vy&hѕadaќ a pokъsiќ sa obnoviќ chybnй sektory", 14001, 16, 30, 165, 10 CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 LTEXT "", 14003, 60, 80, 170, 10 END @@ -612,14 +612,14 @@ BEGIN IDS_SHV_COLUMN10 "Vlastnнk" IDS_SHV_COLUMN11 "Skupina" IDS_SHV_COLUMN12 "Filename" - IDS_SHV_COLUMN13 "Category" + IDS_SHV_COLUMN13 "Kategуria" IDS_SHV_COLUMN_DELFROM "Pфvod" //Pфvodnй umiestnenie IDS_SHV_COLUMN_DELDATE "Odstrбnenэ" //Dбtum zmazania IDS_SHV_COLUMN_FONTTYPE "Fonttype" IDS_SHV_COLUMN_WORKGROUP "Workgroup" IDS_SHV_NETWORKLOCATION "Network Location" - IDS_SHV_COLUMN_DOCUMENTS "Documents" - IDS_SHV_COLUMN_STATUS "Status" + IDS_SHV_COLUMN_DOCUMENTS "Dokumenty" + IDS_SHV_COLUMN_STATUS "Stav" IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" @@ -629,7 +629,7 @@ BEGIN IDS_MYCOMPUTER "Tento poинtaи" IDS_RECYCLEBIN_FOLDER_NAME "Kфљ" IDS_CONTROLPANEL "Ovlбdacн panel" - IDS_ADMINISTRATIVETOOLS "Administrative Tools" + IDS_ADMINISTRATIVETOOLS "Nбstroje na sprбvu" /* context menus */ IDS_VIEW_LARGE "&Veѕkй ikony" @@ -637,13 +637,13 @@ BEGIN IDS_VIEW_LIST "&Zoznam" IDS_VIEW_DETAILS "&Podrobnosti" IDS_SELECT "Vybraќ" - IDS_OPEN "Otvoriќ" + IDS_OPEN "&Otvoriќ" IDS_CREATELINK "Vytvoriќ o&dkaz" - IDS_COPY "&Kopнrova" - IDS_DELETE "&Odstrбni" + IDS_COPY "&Kopнrovaќ" + IDS_DELETE "Odstrбniќ" IDS_PROPERTIES "Vl&astnosti" IDS_CUT "&Vystrihnъќ" - IDS_RESTORE "Restore" + IDS_RESTORE "&Obnoviќ" IDS_FORMATDRIVE "Format..." IDS_RENAME "Rename" IDS_INSERT "Insert" @@ -729,7 +729,7 @@ BEGIN IDS_CMD_FILE "ReactOS Command Script" IDS_COM_FILE "DOS aplikбcia" IDS_CPL_FILE "Poloћka ovlбdacieho panela" - IDS_CUR_FILE "Cursor" + IDS_CUR_FILE "Kurzor" IDS_DLL_FILE "Application Extension" IDS_DRV_FILE "Ovlбdaи zariadenia" IDS_EXE_FILE "Aplikбcia" @@ -749,9 +749,9 @@ BEGIN IDS_PREVIEW_VERB "Preview" //Nбhѕad, Ukбћka, Prezrieќ ??? IDS_FILE_FOLDER "sъbory: %u, prieиinky: %u" - IDS_PRINTERS "Printers" - IDS_FONTS "Fonts" - IDS_INSTALLNEWFONT "Install New Font..." + IDS_PRINTERS "Tlaиiarne" + IDS_FONTS "Pнsma" + IDS_INSTALLNEWFONT "&Nainљtalovaќ novй pнsmo..." - IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" + IDS_DEFAULT_CLUSTER_SIZE "Predvolenб alokaиnб veѕkosќ" //Default allocation size END From 6d22ab59235627fb9fded5862ffcfd79b3821699 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Tue, 19 Aug 2008 22:40:05 +0000 Subject: [PATCH 083/324] * The CLSID of a PropertySheet handler can either be present as subkey or as a default value. * Fixes WinRar file property sheet handler and etc... svn path=/trunk/; revision=35465 --- reactos/dll/win32/shell32/shellord.c | 60 +++++++++++++++------------- 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/reactos/dll/win32/shell32/shellord.c b/reactos/dll/win32/shell32/shellord.c index f3811d54c46..0fa51324751 100644 --- a/reactos/dll/win32/shell32/shellord.c +++ b/reactos/dll/win32/shell32/shellord.c @@ -1662,6 +1662,7 @@ HPSXA WINAPI SHCreatePropSheetExtArrayEx(HKEY hKey, LPCWSTR pszSubKey, UINT max_ IShellPropSheetExt *pspsx; HKEY hkBase, hkPropSheetHandlers; PPSXA psxa = NULL; + HRESULT hr; TRACE("(%p,%s,%u)\n", hKey, debugstr_w(pszSubKey), max_iface); @@ -1699,38 +1700,41 @@ HPSXA WINAPI SHCreatePropSheetExtArrayEx(HKEY hKey, LPCWSTR pszSubKey, UINT max_ lRet = ERROR_SUCCESS; break; } - - dwClsidSize = sizeof(szClsidHandler); - if (SHGetValueW(hkPropSheetHandlers, szHandler, NULL, NULL, szClsidHandler, &dwClsidSize) == ERROR_SUCCESS) + szHandler[(sizeof(szHandler) / sizeof(szHandler[0])) - 1] = 0; + hr = SHCLSIDFromStringW(szHandler, &clsid); + if (FAILED(hr)) { - /* Force a NULL-termination and convert the string */ - szClsidHandler[(sizeof(szClsidHandler) / sizeof(szClsidHandler[0])) - 1] = 0; - if (SUCCEEDED(SHCLSIDFromStringW(szClsidHandler, &clsid))) + dwClsidSize = sizeof(szClsidHandler); + if (SHGetValueW(hkPropSheetHandlers, szHandler, NULL, NULL, szClsidHandler, &dwClsidSize) == ERROR_SUCCESS) { - /* Attempt to get an IShellPropSheetExt and an IShellExtInit instance. - Only if both interfaces are supported it's a real shell extension. - Then call IShellExtInit's Initialize method. */ - if (SUCCEEDED(CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_SERVER/* | CLSCTX_NO_CODE_DOWNLOAD */, &IID_IShellPropSheetExt, (LPVOID *)&pspsx))) - { - if (SUCCEEDED(pspsx->lpVtbl->QueryInterface(pspsx, &IID_IShellExtInit, (PVOID *)&psxi))) - { - if (SUCCEEDED(psxi->lpVtbl->Initialize(psxi, NULL, pDataObj, hKey))) - { - /* Add the IShellPropSheetExt instance to the array */ - psxa->pspsx[psxa->uiCount++] = pspsx; - } - else - { - psxi->lpVtbl->Release(psxi); - pspsx->lpVtbl->Release(pspsx); - } - } - else - pspsx->lpVtbl->Release(pspsx); - } + szClsidHandler[(sizeof(szClsidHandler) / sizeof(szClsidHandler[0])) - 1] = 0; + hr = SHCLSIDFromStringW(szClsidHandler, &clsid); + } + } + if (SUCCEEDED(hr)) + { + /* Attempt to get an IShellPropSheetExt and an IShellExtInit instance. + Only if both interfaces are supported it's a real shell extension. + Then call IShellExtInit's Initialize method. */ + if (SUCCEEDED(CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_SERVER/* | CLSCTX_NO_CODE_DOWNLOAD */, &IID_IShellPropSheetExt, (LPVOID *)&pspsx))) + { + if (SUCCEEDED(pspsx->lpVtbl->QueryInterface(pspsx, &IID_IShellExtInit, (PVOID *)&psxi))) + { + if (SUCCEEDED(psxi->lpVtbl->Initialize(psxi, NULL, pDataObj, hKey))) + { + /* Add the IShellPropSheetExt instance to the array */ + psxa->pspsx[psxa->uiCount++] = pspsx; + } + else + { + psxi->lpVtbl->Release(psxi); + pspsx->lpVtbl->Release(pspsx); + } + } + else + pspsx->lpVtbl->Release(pspsx); } } - } while (psxa->uiCount != psxa->uiAllocated); } else From e577021a2b347867c8685cecb79b6b34ca655899 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Wed, 20 Aug 2008 13:47:47 +0000 Subject: [PATCH 084/324] - Do not pass SHGDN_INFOLDER flag - Implement IPersistFolder2 for control panel shell folder - Replace _InsertMenuItem with unicode - Pass the pidl of shellfolder and selected drive to SH_ShowDriveProperties to construct a valid IDataObject which is passed to drive PropertySheet handlers - Release HPSX array only if it was constructed - Optimize AddShellPropSheetExCallback for file property dialog - Pass the pidl of the parent shell folder and selected item to SH_ShowPropertiesDialog and construct a IDataObject from it - Check for success for created IDataObject and HPSX array - Add a lot of buffer checks for the OpenNew shell extension - Pass the full filename of the item from Admin Tools shellfolder when IShellFolder_GetDisplayNameOf is called with SHGDN_FORPARSING - Implement initializing the AdminTools folder - Implement IShellFolder_SetNameOf for the desktop shell folder to support renaming desktop items and sub folders - Implement ISFHelper interface for desktop shell folder to support deleting with backspace key and fixes the new item shell service for items and directories - Implement hiding (deleting) shell extensions from desktop - Display a messagebox if shell extensions should be really deleted - Fix the IShellFolder_GetAttributesOf for the Mycomputer shell folder - Implement changing drive name with rename verb using IShellFolder_SetNameOf (MyComputer) - Implement Initializing the MyComputer shell folder properly - Fix Shellfolder attributes for MyDocuments shell folder - Fix Shellfolder attributes for Netplaces shell folder - Implement Initializing the Netplaces shell folder properly - Remove the 'properties' and 'open' verb from recycle bin shell folder, these verbs are statically generated - Directories cannot have the link attribute - Implement IShellExtInit interface for the new item shell service - Implement the default context menu based on the existing item context menu and background context menu and delete old implementation - Implement copy&paste of files and directories - Implement creating links to files - Check if a dynamic shell extension has already been loaded - Free static / dynamic shell extensions on release svn path=/trunk/; revision=35476 --- reactos/dll/win32/shell32/autocomplete.c | 2 +- reactos/dll/win32/shell32/cpanelfolder.c | 25 +- reactos/dll/win32/shell32/dialogs.c | 1 + reactos/dll/win32/shell32/drive.c | 33 +- reactos/dll/win32/shell32/folder_options.c | 84 +- reactos/dll/win32/shell32/fprop.c | 91 +- reactos/dll/win32/shell32/pidl.c | 16 + reactos/dll/win32/shell32/she_ocmenu.c | 65 +- reactos/dll/win32/shell32/shell32.rbuild | 3 +- reactos/dll/win32/shell32/shell32_main.h | 8 +- reactos/dll/win32/shell32/shfldr_admintools.c | 34 +- reactos/dll/win32/shell32/shfldr_desktop.c | 313 ++- reactos/dll/win32/shell32/shfldr_fonts.c | 34 +- reactos/dll/win32/shell32/shfldr_mycomp.c | 34 +- .../dll/win32/shell32/shfldr_mydocuments.c | 4 +- reactos/dll/win32/shell32/shfldr_netplaces.c | 19 +- reactos/dll/win32/shell32/shfldr_printers.c | 7 +- reactos/dll/win32/shell32/shfldr_recyclebin.c | 85 +- reactos/dll/win32/shell32/shlexec.c | 6 +- reactos/dll/win32/shell32/shlfileop.c | 2 +- reactos/dll/win32/shell32/shlfolder.c | 5 +- reactos/dll/win32/shell32/shlmenu.c | 16 +- reactos/dll/win32/shell32/shlview.c | 29 +- reactos/dll/win32/shell32/shv_bg_cmenu.c | 500 ----- reactos/dll/win32/shell32/shv_def_cmenu.c | 1726 +++++++++++++++++ reactos/dll/win32/shell32/shv_item_cmenu.c | 1373 ------------- reactos/dll/win32/shell32/shv_item_new.c | 108 +- reactos/dll/win32/shell32/undocshell.h | 4 +- 28 files changed, 2459 insertions(+), 2168 deletions(-) delete mode 100644 reactos/dll/win32/shell32/shv_bg_cmenu.c create mode 100644 reactos/dll/win32/shell32/shv_def_cmenu.c delete mode 100644 reactos/dll/win32/shell32/shv_item_cmenu.c diff --git a/reactos/dll/win32/shell32/autocomplete.c b/reactos/dll/win32/shell32/autocomplete.c index 0e3663fa9db..b25d7449b28 100644 --- a/reactos/dll/win32/shell32/autocomplete.c +++ b/reactos/dll/win32/shell32/autocomplete.c @@ -78,7 +78,7 @@ typedef struct static const IAutoCompleteVtbl acvt; static const IAutoComplete2Vtbl ac2vt; -static inline IAutoCompleteImpl *impl_from_IAutoComplete2( IAutoComplete2 *iface ) +static IAutoCompleteImpl * impl_from_IAutoComplete2( IAutoComplete2 *iface ) { return (IAutoCompleteImpl *)((char*)iface - FIELD_OFFSET(IAutoCompleteImpl, lpvtblAutoComplete2)); } diff --git a/reactos/dll/win32/shell32/cpanelfolder.c b/reactos/dll/win32/shell32/cpanelfolder.c index 36aadb03a06..b00467838d2 100644 --- a/reactos/dll/win32/shell32/cpanelfolder.c +++ b/reactos/dll/win32/shell32/cpanelfolder.c @@ -703,7 +703,7 @@ static HRESULT WINAPI ISF_ControlPanel_fnGetDisplayNameOf(IShellFolder2 * iface, len = lstrlenW(wszPath); if (!SUCCEEDED - (SHELL32_GetDisplayNameOfChild(iface, pidl, dwFlags | SHGDN_INFOLDER, wszPath + len, MAX_PATH + 1 - len))) + (SHELL32_GetDisplayNameOfChild(iface, pidl, dwFlags, wszPath + len, MAX_PATH + 1 - len))) return E_OUTOFMEMORY; if (!WideCharToMultiByte(CP_ACP, 0, wszPath, -1, szPath, MAX_PATH, NULL, NULL)) wszPath[0] = '\0'; @@ -907,8 +907,11 @@ static HRESULT WINAPI ICPanel_PersistFolder2_GetClassID(IPersistFolder2 * iface, static HRESULT WINAPI ICPanel_PersistFolder2_Initialize(IPersistFolder2 * iface, LPCITEMIDLIST pidl) { ICPanelImpl *This = impl_from_IPersistFolder2(iface); - TRACE("(%p)->(%p)\n", This, pidl); - return E_NOTIMPL; + if (This->pidlRoot) + SHFree((LPVOID)This->pidlRoot); + + This->pidlRoot = ILClone(pidl); + return S_OK; } /************************************************************************** @@ -1222,7 +1225,7 @@ static HRESULT WINAPI ICPanel_IContextMenu2_QueryContextMenu( UINT idCmdLast, UINT uFlags) { - char szBuffer[30] = {0}; + WCHAR szBuffer[30] = {0}; ULONG Count = 1; ICPanelImpl *This = impl_from_IContextMenu(iface); @@ -1230,22 +1233,22 @@ static HRESULT WINAPI ICPanel_IContextMenu2_QueryContextMenu( TRACE("(%p)->(hmenu=%p indexmenu=%x cmdfirst=%x cmdlast=%x flags=%x )\n", This, hMenu, indexMenu, idCmdFirst, idCmdLast, uFlags); - if (LoadStringA(shell32_hInstance, IDS_OPEN, szBuffer, sizeof(szBuffer)/sizeof(char))) + if (LoadStringW(shell32_hInstance, IDS_OPEN, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) { - szBuffer[(sizeof(szBuffer)/sizeof(char))-1] = L'\0'; - _InsertMenuItem(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_DEFAULT); + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_DEFAULT); Count++; } - if (LoadStringA(shell32_hInstance, IDS_CREATELINK, szBuffer, sizeof(szBuffer)/sizeof(char))) + if (LoadStringW(shell32_hInstance, IDS_CREATELINK, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) { if (Count) { - _InsertMenuItem(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_SEPARATOR, NULL, MFS_ENABLED); + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_SEPARATOR, NULL, MFS_ENABLED); } - szBuffer[(sizeof(szBuffer)/sizeof(char))-1] = L'\0'; + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; - _InsertMenuItem(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_ENABLED); + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_ENABLED); Count++; } return MAKE_HRESULT(SEVERITY_SUCCESS, 0, Count); diff --git a/reactos/dll/win32/shell32/dialogs.c b/reactos/dll/win32/shell32/dialogs.c index 05e962c8479..528037b5be3 100644 --- a/reactos/dll/win32/shell32/dialogs.c +++ b/reactos/dll/win32/shell32/dialogs.c @@ -244,6 +244,7 @@ INT_PTR CALLBACK PickIconProc(HWND hwndDlg, DI_NORMAL); break; } + break; } return FALSE; diff --git a/reactos/dll/win32/shell32/drive.c b/reactos/dll/win32/shell32/drive.c index 8f963fc65ab..32de6a50194 100644 --- a/reactos/dll/win32/shell32/drive.c +++ b/reactos/dll/win32/shell32/drive.c @@ -31,6 +31,7 @@ #define NTOS_MODE_USER #define UNICODE #define _UNICODE +#define COBJMACROS #include #include @@ -121,7 +122,7 @@ typedef struct BOOL InitializeFmifsLibrary(PFORMAT_DRIVE_CONTEXT pContext); BOOL GetDefaultClusterSize(LPWSTR szFs, PDWORD pClusterSize, PULARGE_INTEGER TotalNumberOfBytes); - +HPSXA WINAPI SHCreatePropSheetExtArrayEx(HKEY hKey, LPCWSTR pszSubKey, UINT max_iface, IDataObject *pDataObj); HWND WINAPI DeviceCreateHardwarePageEx(HWND hWndParent, LPGUID lpGuids, @@ -667,7 +668,7 @@ struct { "DRIVE_HARDWARE_DLG", DriveHardwareDlg }, }; -BOOL +HRESULT CALLBACK AddPropSheetPageProc(HPROPSHEETPAGE hpage, LPARAM lParam) { @@ -681,15 +682,16 @@ AddPropSheetPageProc(HPROPSHEETPAGE hpage, LPARAM lParam) } BOOL -SH_ShowDriveProperties(WCHAR * drive) +SH_ShowDriveProperties(WCHAR * drive, LPCITEMIDLIST pidlFolder, LPCITEMIDLIST * apidl) { - HPSXA hpsx; + HPSXA hpsx = NULL; HPROPSHEETPAGE hpsp[MAX_PROPERTY_SHEET_PAGE]; PROPSHEETHEADERW psh; BOOL ret; UINT i; WCHAR szName[MAX_PATH]; DWORD dwMaxComponent, dwFileSysFlags; + IDataObject * pDataObj = NULL; ZeroMemory(&psh, sizeof(PROPSHEETHEADERW)); psh.dwSize = sizeof(PROPSHEETHEADERW); @@ -721,7 +723,6 @@ SH_ShowDriveProperties(WCHAR * drive) } } - for (i = 0; i < DRIVE_PROPERTY_PAGES; i++) { HPROPSHEETPAGE hprop = SH_CreatePropertySheetPage(PropPages[i].resname, PropPages[i].dlgproc, (LPARAM)drive, NULL); @@ -731,16 +732,22 @@ SH_ShowDriveProperties(WCHAR * drive) psh.nPages++; } } - - hpsx = SHCreatePropSheetExtArray(HKEY_CLASSES_ROOT, - L"Drive", - MAX_PROPERTY_SHEET_PAGE-DRIVE_PROPERTY_PAGES); - - SHAddFromPropSheetExtArray(hpsx, - (LPFNADDPROPSHEETPAGE)AddPropSheetPageProc, - (LPARAM)&psh); + if (SHCreateDataObject(pidlFolder, 1, apidl, NULL, &IID_IDataObject, (void**)&pDataObj) == S_OK) + { + hpsx = SHCreatePropSheetExtArrayEx(HKEY_CLASSES_ROOT, L"Drive", MAX_PROPERTY_SHEET_PAGE-DRIVE_PROPERTY_PAGES, pDataObj); + if (hpsx) + { + SHAddFromPropSheetExtArray(hpsx, (LPFNADDPROPSHEETPAGE)AddPropSheetPageProc, (LPARAM)&psh); + } + } ret = PropertySheetW(&psh); + if (pDataObj) + IDataObject_Release(pDataObj); + + if (hpsx) + SHDestroyPropSheetExtArray(hpsx); + if (ret < 0) return FALSE; else diff --git a/reactos/dll/win32/shell32/folder_options.c b/reactos/dll/win32/shell32/folder_options.c index f7fb6c239e0..6b86636ed47 100644 --- a/reactos/dll/win32/shell32/folder_options.c +++ b/reactos/dll/win32/shell32/folder_options.c @@ -60,6 +60,48 @@ typedef struct WCHAR szFolderPath[MAX_PATH]; }FOLDER_PROPERTIES_CONTEXT, *PFOLDER_PROPERTIES_CONTEXT; +typedef struct +{ + LPCWSTR szKeyName; + UINT ResourceID; +}FOLDER_VIEW_ENTRY, PFOLDER_VIEW_ENTRY; +/* +static FOLDER_VIEW_ENTRY s_Options[] = +{ + { L"AlwaysShowMenus", IDS_ALWAYSSHOWMENUS }, + { L"AutoCheckSelect", -1 }, + { L"ClassicViewState", -1 }, + { L"DontPrettyPath", -1 }, + { L"Filter", -1 }, + { L"FolderContentsInfoTip", IDS_FOLDERCONTENTSTIP }, + { L"FriendlyTree", -1 }, + { L"Hidden", -1, }, + { L"HideFileExt", IDS_HIDEFILEEXT }, + { L"HideIcons", -1}, + { L"IconsOnly", -1}, + { L"ListviewAlphaSelect", -1}, + { L"ListviewShadow", -1}, + { L"ListviewWatermark", -1}, + { L"MapNetDrvBtn", -1}, + { L"PersistBrowsers", -1}, + { L"SeperateProcess", IDS_SEPERATEPROCESS}, + { L"ServerAdminUI", -1}, + { L"SharingWizardOn", IDS_USESHAREWIZARD}, + { L"ShowCompColor", IDS_COMPCOLOR}, + { L"ShowInfoTip", IDS_SHOWINFOTIP}, + { L"ShowPreviewHandlers", -1}, + { L"ShowSuperHidden", IDS_HIDEOSFILES}, + { L"ShowTypeOverlay", -1}, + { L"Start_ShowMyGames", -1}, + { L"StartMenuInit", -1}, + { L"SuperHidden", -1}, + { L"TypeAhead", -1}, + { L"Webview", -1}, + { NULL, -1} + +}; +*/ + INT_PTR CALLBACK @@ -76,6 +118,35 @@ FolderOptionsGeneralDlg( return FALSE; } +static +VOID +InitializeFolderOptionsListCtrl(HWND hwndDlg) +{ + RECT clientRect; + LVCOLUMNW col; + WCHAR szName[50]; + HWND hDlgCtrl; + + hDlgCtrl = GetDlgItem(hwndDlg, 14003); + + if (!LoadStringW(shell32_hInstance, IDS_COLUMN_EXTENSION, szName, sizeof(szName) / sizeof(WCHAR))) + szName[0] = 0; + szName[(sizeof(szName)/sizeof(WCHAR))-1] = 0; + + GetClientRect(hDlgCtrl, &clientRect); + ZeroMemory(&col, sizeof(LV_COLUMN)); + col.mask = LVCF_SUBITEM | LVCF_WIDTH | LVCF_FMT; + col.iSubItem = 0; + col.pszText = szName; + col.fmt = LVCFMT_LEFT; + col.cx = (clientRect.right - clientRect.left) - GetSystemMetrics(SM_CXVSCROLL); + (void)ListView_InsertColumnW(hDlgCtrl, 0, &col); + + + +} + + INT_PTR CALLBACK FolderOptionsViewDlg( @@ -85,10 +156,15 @@ FolderOptionsViewDlg( LPARAM lParam ) { - - + switch(uMsg) + { + case WM_INITDIALOG: + InitializeFolderOptionsListCtrl(hwndDlg); + return TRUE; + } return FALSE; + } VOID @@ -173,12 +249,9 @@ InitializeFileTypesListCtrl(HWND hwndDlg) DWORD dwName; INT iItem = 0; - hDlgCtrl = GetDlgItem(hwndDlg, 14000); InitializeFileTypesListCtrlColumns(hDlgCtrl); - - dwName = sizeof(szName) / sizeof(WCHAR); while(RegEnumKeyExW(HKEY_CLASSES_ROOT, dwIndex++, szName, &dwName, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) @@ -206,7 +279,6 @@ FolderOptionsFileTypesDlg( return TRUE; } - return FALSE; } diff --git a/reactos/dll/win32/shell32/fprop.c b/reactos/dll/win32/shell32/fprop.c index 6cb44310181..2a72394649f 100644 --- a/reactos/dll/win32/shell32/fprop.c +++ b/reactos/dll/win32/shell32/fprop.c @@ -650,24 +650,19 @@ SH_FileGeneralDlgProc( BOOL CALLBACK AddShellPropSheetExCallback(HPROPSHEETPAGE hPage, LPARAM lParam) { - UINT iIndex; - HPROPSHEETPAGE * hppages = (HPROPSHEETPAGE *)lParam; + PROPSHEETHEADERW *pinfo = (PROPSHEETHEADERW *)lParam; - TRACE("AddShellPropSheetExCallback called\n"); - for(iIndex = 0; iIndex < MAX_PROPERTY_SHEET_PAGE; iIndex++) + if (pinfo->nPages < MAX_PROPERTY_SHEET_PAGE) { - if (hppages[iIndex] == NULL) - { - hppages[iIndex] = hPage; - return TRUE; - } + pinfo->u3.phpage[pinfo->nPages++] = hPage; + return TRUE; } return FALSE; } int -EnumPropSheetExt(LPWSTR wFileName, HPROPSHEETPAGE * hppages, int NumPages, HPSXA * hpsxa, IDataObject *pDataObj) +EnumPropSheetExt(LPWSTR wFileName, PROPSHEETHEADERW *pinfo, int NumPages, HPSXA * hpsxa, IDataObject *pDataObj) { WCHAR szName[100]; WCHAR * pOffset; @@ -702,7 +697,7 @@ EnumPropSheetExt(LPWSTR wFileName, HPROPSHEETPAGE * hppages, int NumPages, HPSXA } TRACE("EnumPropSheetExt szName %s\n", debugstr_w(szName)); hpsxa[0] = SHCreatePropSheetExtArrayEx(HKEY_CLASSES_ROOT, szName, NumPages, pDataObj); - Pages = SHAddFromPropSheetExtArray(hpsxa[0], AddShellPropSheetExCallback, (LPARAM)hppages); + Pages = SHAddFromPropSheetExtArray(hpsxa[0], AddShellPropSheetExCallback, (LPARAM)pinfo); if (pOffset) @@ -714,7 +709,7 @@ EnumPropSheetExt(LPWSTR wFileName, HPROPSHEETPAGE * hppages, int NumPages, HPSXA TRACE("EnumPropSheetExt szName %s, pOffset %s\n", debugstr_w(szName), debugstr_w(pOffset)); szName[(sizeof(szName)/sizeof(WCHAR))-1] = L'\0'; hpsxa[1] = SHCreatePropSheetExtArrayEx(HKEY_CLASSES_ROOT, szName, NumPages - Pages, pDataObj); - Pages +=SHAddFromPropSheetExtArray(hpsxa[1], AddShellPropSheetExCallback, (LPARAM)hppages); + Pages +=SHAddFromPropSheetExtArray(hpsxa[1], AddShellPropSheetExCallback, (LPARAM)pinfo); } } return Pages; @@ -735,19 +730,15 @@ EnumPropSheetExt(LPWSTR wFileName, HPROPSHEETPAGE * hppages, int NumPages, HPSXA */ BOOL -SH_ShowPropertiesDialog(PCWSTR lpf) +SH_ShowPropertiesDialog(WCHAR * lpf, LPCITEMIDLIST pidlFolder, LPCITEMIDLIST * apidl) { PROPSHEETHEADERW pinfo; HPROPSHEETPAGE hppages[MAX_PROPERTY_SHEET_PAGE]; - HPROPSHEETPAGE hpage; WCHAR wFileName[MAX_PATH]; - UINT num_pages = 0; DWORD dwHandle = 0; WCHAR * pFileName; HPSXA hpsxa[2]; INT_PTR res; - LPITEMIDLIST pidlChild, pidlFolder; - WCHAR szTemp[MAX_PATH]; IDataObject* pDataObj = NULL; HRESULT hResult; @@ -783,45 +774,9 @@ SH_ShowPropertiesDialog(PCWSTR lpf) if (wcslen(wFileName) == 3) { - return SH_ShowDriveProperties(wFileName); + return SH_ShowDriveProperties(wFileName, pidlFolder, apidl); } - wcscpy(szTemp, wFileName); - pFileName = wcsrchr(szTemp, '\\'); - if (pFileName) - { - pFileName[0] = L'\0'; - pFileName++; - pidlChild = ILCreateFromPathW(pFileName); - pidlFolder = ILCreateFromPathW(szTemp); - if (pidlChild && pidlFolder) - { - hResult = SHCreateDataObject(pidlFolder, 1, (LPCITEMIDLIST*)&pidlChild, NULL, &IID_IDataObject, (LPVOID*)&pDataObj); - ILFree(pidlChild); - ILFree(pidlFolder); - if (hResult != S_OK) - pDataObj = NULL; - } - } - - - hpage = SH_CreatePropertySheetPage("SHELL_FILE_GENERAL_DLG", SH_FileGeneralDlgProc, (LPARAM)wFileName, NULL); - - if (hpage == NULL) - return FALSE; - - hppages[num_pages] = hpage; - num_pages++; - num_pages += EnumPropSheetExt(wFileName, hppages, MAX_PROPERTY_SHEET_PAGE-1, hpsxa, pDataObj); - - if ( GetFileVersionInfoSizeW(lpf, &dwHandle) && num_pages) - { - if ( (hpage = SH_CreatePropertySheetPage("SHELL_FILE_VERSION_DLG",SH_FileVersionDlgProc, (LPARAM)wFileName, NULL))!= NULL) - { - hppages[num_pages] = hpage; - num_pages++; - } - } pFileName = wcsrchr(wFileName, '\\'); if (!pFileName) @@ -833,17 +788,35 @@ SH_ShowPropertiesDialog(PCWSTR lpf) memset(&pinfo, 0x0, sizeof(PROPSHEETHEADERW)); pinfo.dwSize = sizeof(PROPSHEETHEADERW); pinfo.dwFlags = PSH_NOCONTEXTHELP | PSH_PROPTITLE; - pinfo.nPages = num_pages; pinfo.u3.phpage = hppages; pinfo.pszCaption = pFileName; - TRACE("SH_ShowPropertiesDialog pages %u\n", num_pages); + hppages[pinfo.nPages] = SH_CreatePropertySheetPage("SHELL_FILE_GENERAL_DLG", SH_FileGeneralDlgProc, (LPARAM)wFileName, NULL); + if (hppages[pinfo.nPages]) + pinfo.nPages++; + + + hResult = SHCreateDataObject(pidlFolder, 1, apidl, NULL, &IID_IDataObject, (LPVOID*)&pDataObj); + if (hResult == S_OK) + { + EnumPropSheetExt(wFileName, &pinfo, MAX_PROPERTY_SHEET_PAGE-1, hpsxa, pDataObj); + } + + if ( GetFileVersionInfoSizeW(lpf, &dwHandle)) + { + hppages[pinfo.nPages] = SH_CreatePropertySheetPage("SHELL_FILE_VERSION_DLG",SH_FileVersionDlgProc, (LPARAM)wFileName, NULL); + if (hppages[pinfo.nPages]) + pinfo.nPages++; + } + res = PropertySheetW(&pinfo); - SHDestroyPropSheetExtArray(hpsxa[0]); - SHDestroyPropSheetExtArray(hpsxa[1]); - if (pDataObj) + if (hResult == S_OK) + { + SHDestroyPropSheetExtArray(hpsxa[0]); + SHDestroyPropSheetExtArray(hpsxa[1]); IDataObject_Release(pDataObj); + } return (res != -1); } diff --git a/reactos/dll/win32/shell32/pidl.c b/reactos/dll/win32/shell32/pidl.c index 452e85695e7..fd009716d96 100644 --- a/reactos/dll/win32/shell32/pidl.c +++ b/reactos/dll/win32/shell32/pidl.c @@ -1382,6 +1382,22 @@ LPITEMIDLIST _ILCreateIExplore(void) LPITEMIDLIST _ILCreateControlPanel(void) { + TRACE("()\n"); + LPITEMIDLIST parent = _ILCreateGuid(PT_GUID, &CLSID_MyComputer), ret = NULL; + + if (parent) + { + LPITEMIDLIST printers = _ILCreateGuid(PT_YAGUID, &CLSID_ControlPanel); + + if (printers) + { + ret = ILCombine(parent, printers); + SHFree(printers); + } + SHFree(parent); + } + return ret; + return _ILCreateGuid(PT_SHELLEXT, &CLSID_ControlPanel); } diff --git a/reactos/dll/win32/shell32/she_ocmenu.c b/reactos/dll/win32/shell32/she_ocmenu.c index ec57da1ba77..671d0afd031 100644 --- a/reactos/dll/win32/shell32/she_ocmenu.c +++ b/reactos/dll/win32/shell32/she_ocmenu.c @@ -143,8 +143,8 @@ HRESULT WINAPI SHEOW_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *ppv) SHEOWImpl * ow; HRESULT res; - ow = LocalAlloc(LMEM_ZEROINIT, sizeof(SHEOWImpl)); - if (!ow) + ow = LocalAlloc(LMEM_ZEROINIT, sizeof(SHEOWImpl)); + if (!ow) { return E_OUTOFMEMORY; } @@ -241,6 +241,8 @@ AddItem(HMENU hMenu, UINT idCmdFirst) if (!LoadStringW(shell32_hInstance, IDS_OPEN_WITH_CHOOSE, szBuffer, sizeof(szBuffer) / sizeof(WCHAR))) wcscpy(szBuffer, szChoose); + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE; mii.fType = MFT_STRING; mii.fState = MFS_ENABLED; @@ -279,6 +281,7 @@ LoadOWItems(POPEN_WITH_CONTEXT pContext, WCHAR * szName) szPath[0] = 0; if (RegGetValueW(HKEY_CLASSES_ROOT, szExt, NULL, RRF_RT_REG_SZ, NULL, szPath, &dwPath) == ERROR_SUCCESS) { + szPath[(sizeof(szPath)/sizeof(WCHAR))-1] = L'\0'; LoadItemFromHKCR(pContext, szPath); } } @@ -294,17 +297,18 @@ static HRESULT WINAPI SHEOWCm_fnQueryContextMenu( UINT uFlags) { MENUITEMINFOW mii; - WCHAR szBuffer[100]; + WCHAR szBuffer[100] = {0}; INT pos; HMENU hSubMenu = NULL; OPEN_WITH_CONTEXT Context; SHEOWImpl *This = impl_from_IContextMenu(iface); - if (LoadStringW(shell32_hInstance, IDS_OPEN_WITH, szBuffer, 100) < 0) + if (LoadStringW(shell32_hInstance, IDS_OPEN_WITH, szBuffer, sizeof(szBuffer)/sizeof(WCHAR)) < 0) { TRACE("failed to load string\n"); return E_FAIL; } + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; hSubMenu = CreatePopupMenu(); @@ -383,12 +387,16 @@ FreeListItems(HWND hwndDlg) BOOL HideApplicationFromList(WCHAR * pFileName) { - WCHAR szBuffer[100]; + WCHAR szBuffer[100] = {'A','p','p','l','i','c','a','t','i','o','n','s','\\',0}; DWORD dwSize = 0; LONG result; - wcscpy(szBuffer, L"Applications\\"); - wcscat(szBuffer, pFileName); + if (wcslen(pFileName) > (sizeof(szBuffer)/sizeof(WCHAR)) - 14) + { + ERR("insufficient buffer\n"); + return FALSE; + } + wcscpy(&szBuffer[13], pFileName); result = RegGetValueW(HKEY_CLASSES_ROOT, szBuffer, L"NoOpenWith", RRF_RT_REG_SZ, NULL, NULL, &dwSize); @@ -405,11 +413,17 @@ WriteStaticShellExtensionKey(HKEY hRootKey, WCHAR * pVerb, WCHAR *pFullPath) { HKEY hShell; LONG result; - WCHAR szBuffer[MAX_PATH+10]; + WCHAR szBuffer[MAX_PATH+10] = {'s','h','e','l','l','\\', 0 }; + + if (wcslen(pVerb) > (sizeof(szBuffer)/sizeof(WCHAR)) - 15 || + wcslen(pFullPath) > (sizeof(szBuffer)/sizeof(WCHAR)) - 4) + { + ERR("insufficient buffer\n"); + return; + } /* construct verb reg path */ - wcscpy(szBuffer, L"shell\\"); - wcscat(szBuffer, pVerb); + wcscpy(&szBuffer[6], pVerb); wcscat(szBuffer, L"\\command"); /* create verb reg key */ @@ -427,7 +441,7 @@ WriteStaticShellExtensionKey(HKEY hRootKey, WCHAR * pVerb, WCHAR *pFullPath) VOID StoreNewSettings(WCHAR * szFileName, WCHAR *szAppName) { - WCHAR szBuffer[100]; + WCHAR szBuffer[100] = { L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\"}; WCHAR * pFileExt; HKEY hKey; LONG result; @@ -435,9 +449,12 @@ StoreNewSettings(WCHAR * szFileName, WCHAR *szAppName) /* get file extension */ pFileExt = wcsrchr(szFileName, L'.'); - wcscpy(szBuffer, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\"); - wcscat(szBuffer, pFileExt); - + if (wcslen(pFileExt) > (sizeof(szBuffer)/sizeof(WCHAR)) - 60) + { + ERR("insufficient buffer\n"); + return; + } + wcscpy(&szBuffer[60], pFileExt); /* open base key for this file extension */ if (RegCreateKeyExW(HKEY_CURRENT_USER, szBuffer, 0, NULL, 0, KEY_WRITE | KEY_READ, NULL, &hKey, NULL) != ERROR_SUCCESS) return; @@ -464,7 +481,7 @@ VOID SetProgrammAsDefaultHandler(WCHAR * szFileName, WCHAR * szAppName) { HKEY hKey; - HKEY hAppKey; + HKEY hAppKey; DWORD dwDisposition; WCHAR szBuffer[100]; DWORD dwSize; @@ -541,18 +558,17 @@ SetProgrammAsDefaultHandler(WCHAR * szFileName, WCHAR * szAppName) void BrowseForApplication(HWND hwndDlg) { - WCHAR szBuffer[30]; - WCHAR szFilter[30]; + WCHAR szBuffer[30] = {0}; + WCHAR szFilter[30] = {0}; WCHAR szPath[MAX_PATH]; OPENFILENAMEW ofn; OPEN_WITH_CONTEXT Context; INT count; /* load resource open with */ - szBuffer[0] = 0; if (LoadStringW(shell32_hInstance, IDS_OPEN_WITH, szBuffer, sizeof(szBuffer) / sizeof(WCHAR))) { - szBuffer[99] = 0; + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; ofn.lpstrTitle = szBuffer; ofn.nMaxFileTitle = strlenW(szBuffer); } @@ -565,10 +581,9 @@ BrowseForApplication(HWND hwndDlg) ofn.lpstrFile = szPath; /* load the filter resource string */ - szFilter[0] = 0; if (LoadStringW(shell32_hInstance, IDS_OPEN_WITH_FILTER, szFilter, sizeof(szFilter) / sizeof(WCHAR))) { - szFilter[99] = 0; + szFilter[(sizeof(szFilter)/sizeof(WCHAR))-1] = 0; ofn.lpstrFilter = szFilter; } ZeroMemory(szPath, sizeof(szPath)); @@ -658,12 +673,16 @@ static BOOL CALLBACK OpenWithProgrammDlg(HWND hwndDlg, UINT uMsg, WPARAM wParam, { szBuffer[0] = L'\0'; SendDlgItemMessageA(hwndDlg, 14001, WM_GETTEXT, sizeof(szBuffer), (LPARAM)szBuffer); - strcat((char*)szBuffer, poainfo->pcszFile); + index = strlen((char*)szBuffer); + if (index + strlen(poainfo->pcszFile) + 1 < sizeof(szBuffer)) + strcat((char*)szBuffer, poainfo->pcszFile); + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; SendDlgItemMessageA(hwndDlg, 14001, WM_SETTEXT, 0, (LPARAM)szBuffer); } if (MultiByteToWideChar(CP_ACP, 0,poainfo->pcszFile, -1, szBuffer, MAX_PATH)) { OPEN_WITH_CONTEXT Context; + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; ZeroMemory(&Context, sizeof(OPEN_WITH_CONTEXT)); Context.hDlgCtrl = GetDlgItem(hwndDlg, 14002); LoadOWItems(&Context, szBuffer); @@ -1231,7 +1250,7 @@ SHEOW_LoadOpenWithItems(SHEOWImpl *This, IDataObject *pdtobj) return E_OUTOFMEMORY; } if (_ILIsDesktop(pidl_child) || _ILIsMyDocuments(pidl_child) || _ILIsControlPanel(pidl_child) || _ILIsNetHood(pidl_child) || - _ILIsBitBucket(pidl_child) || _ILIsDrive(pidl_child) || _ILIsCPanelStruct(pidl_child) || _ILIsFolder(pidl_child)) + _ILIsBitBucket(pidl_child) || _ILIsDrive(pidl_child) || _ILIsCPanelStruct(pidl_child) || _ILIsFolder(pidl_child) || _ILIsControlPanel(pidl_folder)) { TRACE("pidl is a folder\n"); SHFree((void*)pidl); diff --git a/reactos/dll/win32/shell32/shell32.rbuild b/reactos/dll/win32/shell32/shell32.rbuild index 991848772af..630d995f15c 100644 --- a/reactos/dll/win32/shell32/shell32.rbuild +++ b/reactos/dll/win32/shell32/shell32.rbuild @@ -65,8 +65,7 @@ shlmenu.c shlview.c shpolicy.c - shv_bg_cmenu.c - shv_item_cmenu.c + shv_def_cmenu.c startmenu.c ros-systray.c shell32.rc diff --git a/reactos/dll/win32/shell32/shell32_main.h b/reactos/dll/win32/shell32/shell32_main.h index ec01b3b5a69..14b1915b3ef 100644 --- a/reactos/dll/win32/shell32/shell32_main.h +++ b/reactos/dll/win32/shell32/shell32_main.h @@ -176,8 +176,8 @@ HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16,LPCSTR,UINT16,WORD); BOOL16 WINAPI ShellAbout16(HWND16,LPCSTR,LPCSTR,HICON16); BOOL16 WINAPI AboutDlgProc16(HWND16,UINT16,WPARAM16,LPARAM); -void WINAPI _InsertMenuItem (HMENU hmenu, UINT indexMenu, BOOL fByPosition, - UINT wID, UINT fType, LPCSTR dwTypeData, UINT fState); +void WINAPI _InsertMenuItemW (HMENU hmenu, UINT indexMenu, BOOL fByPosition, + UINT wID, UINT fType, LPCWSTR dwTypeData, UINT fState); static inline BOOL SHELL_OsIsUnicode(void) { @@ -246,8 +246,8 @@ BOOL SHELL_IsShortcut(LPCITEMIDLIST); INT_PTR CALLBACK SH_FileGeneralDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); INT_PTR CALLBACK SH_FileVersionDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); HPROPSHEETPAGE SH_CreatePropertySheetPage(LPSTR resname, DLGPROC dlgproc, LPARAM lParam, LPWSTR szTitle); -BOOL SH_ShowDriveProperties(WCHAR * drive); +BOOL SH_ShowDriveProperties(WCHAR * drive, LPCITEMIDLIST pidlFolder, LPCITEMIDLIST * apidl); BOOL SH_ShowRecycleBinProperties(WCHAR sDrive); -BOOL SH_ShowPropertiesDialog(PCWSTR lpf); +BOOL SH_ShowPropertiesDialog(LPWSTR lpf, LPCITEMIDLIST pidlFolder, LPCITEMIDLIST * apidl); BOOL SH_ShowFolderProperties(LPWSTR pwszFolder); #endif diff --git a/reactos/dll/win32/shell32/shfldr_admintools.c b/reactos/dll/win32/shell32/shfldr_admintools.c index bc67dd2b020..959c76a98ec 100644 --- a/reactos/dll/win32/shell32/shfldr_admintools.c +++ b/reactos/dll/win32/shell32/shfldr_admintools.c @@ -163,7 +163,8 @@ static ULONG WINAPI ISF_AdminTools_fnRelease (IShellFolder2 * iface) TRACE ("-- destroying IShellFolder(%p)\n", This); if (This->pidlRoot) SHFree (This->pidlRoot); - LocalFree ((HLOCAL) This); + HeapFree(GetProcessHeap(), 0, This->szTarget); + HeapFree(GetProcessHeap(), 0, This); return 0; } return refCount; @@ -187,6 +188,8 @@ static HRESULT WINAPI ISF_AdminTools_fnParseDisplayName (IShellFolder2 * iface, if (pchEaten) *pchEaten = 0; + MessageBoxW(NULL, lpszDisplayName, L"ParseDisplayName", MB_OK); + return E_NOTIMPL; } @@ -433,7 +436,8 @@ static HRESULT WINAPI ISF_AdminTools_fnGetDisplayNameOf (IShellFolder2 * iface, { IGenericSFImpl *This = (IGenericSFImpl *)iface; HRESULT hr = S_OK; - LPWSTR pszPath; + LPWSTR pszPath, pOffset; + TRACE ("(%p)->(pidl=%p,0x%08x,%p)\n", This, pidl, dwFlags, strRet); pdump (pidl); @@ -457,7 +461,19 @@ static HRESULT WINAPI ISF_AdminTools_fnGetDisplayNameOf (IShellFolder2 * iface, } else if (_ILIsPidlSimple(pidl)) { - _ILSimpleGetTextW(pidl, pszPath, MAX_PATH); + if ((GET_SHGDN_FOR(dwFlags) & SHGDN_FORPARSING) && + (GET_SHGDN_RELATION(dwFlags) != SHGDN_INFOLDER) && + This->szTarget) + { + wcscpy(pszPath, This->szTarget); + pOffset = PathAddBackslashW(pszPath); + if (pOffset) + _ILSimpleGetTextW(pidl, pOffset, MAX_PATH + 1 - (pOffset - pszPath)); + } + else + { + _ILSimpleGetTextW(pidl, pszPath, MAX_PATH + 1); + } } else if (_ILIsSpecialFolder(pidl)) { @@ -467,10 +483,6 @@ static HRESULT WINAPI ISF_AdminTools_fnGetDisplayNameOf (IShellFolder2 * iface, { _ILSimpleGetTextW(pidl, pszPath, MAX_PATH); } - else - { - FIXME("special pidl\n"); - } if ((dwFlags & SHGDN_FORPARSING) && !bSimplePidl) { @@ -709,8 +721,11 @@ static HRESULT WINAPI IPF_AdminTools_Initialize ( IPersistFolder2 * iface, LPCITEMIDLIST pidl) { _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - FIXME ("(%p)->(%p): stub\n", This, pidl); - return E_NOTIMPL; + if (This->pidlRoot) + SHFree((LPVOID)This->pidlRoot); + + This->pidlRoot = ILClone(pidl); + return S_OK; } /************************************************************************** @@ -765,6 +780,7 @@ HRESULT WINAPI ISF_AdminTools_Constructor ( { HeapFree(GetProcessHeap(), 0, sf->szTarget); HeapFree(GetProcessHeap(), 0, sf); + return E_FAIL; } sf->ref = 1; diff --git a/reactos/dll/win32/shell32/shfldr_desktop.c b/reactos/dll/win32/shell32/shfldr_desktop.c index 15c09cb7a3d..bbe8e6844da 100644 --- a/reactos/dll/win32/shell32/shfldr_desktop.c +++ b/reactos/dll/win32/shell32/shfldr_desktop.c @@ -62,6 +62,7 @@ WINE_DEFAULT_DEBUG_CHANNEL (shell); typedef struct { const IShellFolder2Vtbl *lpVtbl; const IPersistFolder2Vtbl *lpPF2; + const ISFHelperVtbl *lpvtblSFHelper; LONG ref; /* both paths are parsible from the desktop */ @@ -72,6 +73,9 @@ typedef struct { BOOL fAcceptFmt; /* flag for pending Drop */ } IGenericSFImpl; +WCHAR *build_paths_list(LPCWSTR wszBasePath, int cidl, LPCITEMIDLIST *pidls); +int SHELL_ConfirmMsgBox(HWND hWnd, LPWSTR lpszText, LPWSTR lpszCaption, HICON hIcon, BOOL bYesToAll); + #define _IUnknown_(This) (IShellFolder*)&(This->lpVtbl) #define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl) @@ -110,6 +114,10 @@ static HRESULT WINAPI ISF_Desktop_fnQueryInterface( { *ppvObj = &This->lpPF2; } + else if (IsEqualIID(riid, &IID_ISFHelper)) + { + *ppvObj = &This->lpvtblSFHelper; + } if (*ppvObj) { IUnknown_AddRef ((IUnknown *) (*ppvObj)); @@ -120,6 +128,11 @@ static HRESULT WINAPI ISF_Desktop_fnQueryInterface( return E_NOINTERFACE; } +static inline IGenericSFImpl *impl_from_ISFHelper( ISFHelper *iface ) +{ + return (IGenericSFImpl *)((char*)iface - FIELD_OFFSET(IGenericSFImpl, lpvtblSFHelper)); +} + static ULONG WINAPI ISF_Desktop_fnAddRef (IShellFolder2 * iface) { return 2; /* non-heap based object */ @@ -246,7 +259,7 @@ static const WCHAR ClassicStartMenuW[] = {'S','O','F','T','W','A','R','E','\\', 'C','l','a','s','s','i','c','S','t','a','r','t','M','e','n','u','\0' }; INT -HideNamespaceExtension(WCHAR *iid) +IsNamespaceExtensionHidden(WCHAR *iid) { DWORD Result, dwResult; dwResult = sizeof(DWORD); @@ -265,6 +278,19 @@ HideNamespaceExtension(WCHAR *iid) return Result; } +static +VOID +SetNamespaceExtensionVisibleStatus(WCHAR * iid, DWORD dwStatus) +{ + HKEY hKey; + + if (RegOpenKeyExW(HKEY_CURRENT_USER, ClassicStartMenuW, 0, KEY_WRITE, &hKey) == ERROR_SUCCESS) + { + RegSetValueExW(hKey, iid, 0, REG_DWORD, (LPBYTE)&dwStatus, sizeof(DWORD)); + RegCloseKey(hKey); + } +} + /************************************************************************** @@ -280,6 +306,7 @@ static BOOL CreateDesktopEnumList(IEnumIDList *list, DWORD dwFlags) { BOOL ret = TRUE; WCHAR szPath[MAX_PATH]; + static WCHAR MyDocumentsClassString[] = L"{450D8FBA-AD25-11D0-98A8-0800361B1103}"; @@ -293,7 +320,7 @@ static BOOL CreateDesktopEnumList(IEnumIDList *list, DWORD dwFlags) DWORD dwResult; /* create the pidl for This item */ - if (HideNamespaceExtension(MyDocumentsClassString) < 1) + if (IsNamespaceExtensionHidden(MyDocumentsClassString) < 1) { ret = AddToEnumList(list, _ILCreateMyDocuments()); } @@ -321,7 +348,7 @@ static BOOL CreateDesktopEnumList(IEnumIDList *list, DWORD dwFlags) r = RegEnumKeyExW(hkey, i, iid, &size, 0, NULL, NULL, NULL); if (ERROR_SUCCESS == r) { - if (HideNamespaceExtension(iid) < 1) + if (IsNamespaceExtensionHidden(iid) < 1) { pidl = _ILCreateGuidFromStrW(iid); if (!HasItemWithCLSID(list, pidl)) @@ -388,7 +415,7 @@ static BOOL CreateDesktopEnumList(IEnumIDList *list, DWORD dwFlags) } /* enumerate the elements in %windir%\desktop */ - SHGetSpecialFolderPathW(0, szPath, CSIDL_DESKTOPDIRECTORY, FALSE); + ret = ret && SHGetSpecialFolderPathW(0, szPath, CSIDL_DESKTOPDIRECTORY, FALSE); ret = ret && CreateFolderEnumList(list, szPath, dwFlags); return ret; @@ -741,7 +768,6 @@ static HRESULT WINAPI ISF_Desktop_fnGetDisplayNameOf (IShellFolder2 * iface, } _ILSimpleGetTextW(pidl, pszPath + cLen, MAX_PATH - cLen); - if (!_ILIsFolder(pidl)) SHELL_FS_ProcessDisplayFilename(pszPath, dwFlags); } @@ -796,13 +822,63 @@ static HRESULT WINAPI ISF_Desktop_fnSetNameOf (IShellFolder2 * iface, LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) { IGenericSFImpl *This = (IGenericSFImpl *)iface; + IShellFolder2 * psf; + HRESULT hr; + WCHAR szSrc[MAX_PATH + 1], szDest[MAX_PATH + 1]; + LPWSTR ptr; + BOOL bIsFolder = _ILIsFolder (ILFindLastID (pidl)); - FIXME ("(%p)->(%p,pidl=%p,%s,%u,%p)\n", This, hwndOwner, pidl, + TRACE ("(%p)->(%p,pidl=%p,%s,%u,%p)\n", This, hwndOwner, pidl, debugstr_w (lpName), dwFlags, pPidlOut); + if (_ILGetGUIDPointer(pidl)) + { + if (SUCCEEDED(IShellFolder2_BindToObject(iface, pidl, NULL, &IID_IShellFolder2, (LPVOID*)&psf))) + { + hr = IShellFolder2_SetNameOf(psf, hwndOwner, pidl, lpName, dwFlags, pPidlOut); + IShellFolder2_Release(psf); + return hr; + } + } + + /* build source path */ + lstrcpynW(szSrc, This->sPathTarget, MAX_PATH); + ptr = PathAddBackslashW (szSrc); + if (ptr) + _ILSimpleGetTextW (pidl, ptr, MAX_PATH + 1 - (ptr - szSrc)); + + /* build destination path */ + if (dwFlags == SHGDN_NORMAL || dwFlags & SHGDN_INFOLDER) { + lstrcpynW(szDest, This->sPathTarget, MAX_PATH); + ptr = PathAddBackslashW (szDest); + if (ptr) + lstrcpynW(ptr, lpName, MAX_PATH + 1 - (ptr - szDest)); + } else + lstrcpynW(szDest, lpName, MAX_PATH); + + if(!(dwFlags & SHGDN_FORPARSING) && SHELL_FS_HideExtension(szSrc)) { + WCHAR *ext = PathFindExtensionW(szSrc); + if(*ext != '\0') { + INT len = strlenW(szDest); + lstrcpynW(szDest + len, ext, MAX_PATH - len); + } + } + + TRACE ("src=%s dest=%s\n", debugstr_w(szSrc), debugstr_w(szDest)); + if (MoveFileW (szSrc, szDest)) + { + hr = S_OK; + + if (pPidlOut) + hr = _ILCreateFromPathW(szDest, pPidlOut); + + SHChangeNotify (bIsFolder ? SHCNE_RENAMEFOLDER : SHCNE_RENAMEITEM, + SHCNF_PATHW, szSrc, szDest); + + return hr; + } return E_FAIL; } - static HRESULT WINAPI ISF_Desktop_fnGetDefaultSearchGUID(IShellFolder2 *iface, GUID * pguid) { @@ -1024,6 +1100,228 @@ static const IPersistFolder2Vtbl vt_FSFldr_PersistFolder2 = ISF_Desktop_PersistFolder2_fnGetCurFolder, }; +static HRESULT WINAPI +ISF_Desktop_ISFHelper_fnQueryInterface (ISFHelper * iface, REFIID riid, LPVOID * ppvObj) +{ + IGenericSFImpl *This = impl_from_ISFHelper(iface); + + TRACE ("(%p)->(count=%u)\n", This, This->ref); + + return ISF_Desktop_fnQueryInterface ((IShellFolder2*)This, riid, ppvObj); +} + +static ULONG WINAPI +ISF_Desktop_ISFHelper_fnAddRef (ISFHelper * iface) +{ + IGenericSFImpl *This = impl_from_ISFHelper(iface); + + TRACE ("(%p)->(count=%u)\n", This, This->ref); + + return ISF_Desktop_fnAddRef((IShellFolder2*)This); +} + +static ULONG WINAPI +ISF_Desktop_ISFHelper_fnRelease (ISFHelper * iface) +{ + IGenericSFImpl *This = impl_from_ISFHelper(iface); + + TRACE ("(%p)\n", This); + + return ISF_Desktop_fnRelease ((IShellFolder2*)This); +} + +static HRESULT WINAPI +ISF_Desktop_ISFHelper_fnGetUniqueName (ISFHelper * iface, LPWSTR pwszName, UINT uLen) +{ + IGenericSFImpl *This = impl_from_ISFHelper(iface); + IEnumIDList *penum; + HRESULT hr; + WCHAR wszText[MAX_PATH]; + WCHAR wszNewFolder[25]; + const WCHAR wszFormat[] = {'%','s',' ','%','d',0 }; + + LoadStringW(shell32_hInstance, IDS_NEWFOLDER, wszNewFolder, sizeof(wszNewFolder)/sizeof(WCHAR)); + + TRACE ("(%p)(%p %u)\n", This, pwszName, uLen); + + if (uLen < sizeof(wszNewFolder)/sizeof(WCHAR) + 3) + return E_POINTER; + + lstrcpynW (pwszName, wszNewFolder, uLen); + + hr = IShellFolder_EnumObjects ((IShellFolder2*)This, 0, + SHCONTF_FOLDERS | SHCONTF_NONFOLDERS | SHCONTF_INCLUDEHIDDEN, &penum); + if (penum) { + LPITEMIDLIST pidl; + DWORD dwFetched; + int i = 1; + +next: + IEnumIDList_Reset (penum); + while (S_OK == IEnumIDList_Next (penum, 1, &pidl, &dwFetched) && + dwFetched) { + _ILSimpleGetTextW (pidl, wszText, MAX_PATH); + if (0 == lstrcmpiW (wszText, pwszName)) { + snprintfW (pwszName, uLen, wszFormat, wszNewFolder, i++); + if (i > 99) { + hr = E_FAIL; + break; + } + goto next; + } + } + + IEnumIDList_Release (penum); + } + return hr; +} + +static HRESULT WINAPI +ISF_Desktop_ISFHelper_fnAddFolder (ISFHelper * iface, HWND hwnd, LPCWSTR pwszName, + LPITEMIDLIST * ppidlOut) +{ + IGenericSFImpl *This = impl_from_ISFHelper(iface); + WCHAR wszNewDir[MAX_PATH]; + DWORD bRes; + HRESULT hres = E_FAIL; + + TRACE ("(%p)(%s %p)\n", This, debugstr_w(pwszName), ppidlOut); + + wszNewDir[0] = 0; + if (This->sPathTarget) + lstrcpynW(wszNewDir, This->sPathTarget, MAX_PATH); + PathAppendW(wszNewDir, pwszName); + bRes = CreateDirectoryW (wszNewDir, NULL); + if (bRes) + { + SHChangeNotify (SHCNE_MKDIR, SHCNF_PATHW, wszNewDir, NULL); + hres = S_OK; + if (ppidlOut) + hres = _ILCreateFromPathW(wszNewDir, ppidlOut); + } + + return hres; +} +static HRESULT WINAPI +ISF_Desktop_ISFHelper_fnDeleteItems (ISFHelper * iface, UINT cidl, LPCITEMIDLIST * apidl) +{ + IGenericSFImpl *This = impl_from_ISFHelper(iface); + UINT i; + SHFILEOPSTRUCTW op; + WCHAR wszPath[MAX_PATH]; + WCHAR wszCaption[50]; + WCHAR *wszPathsList; + HRESULT ret; + WCHAR *wszCurrentPath; + UINT bRestoreWithDeskCpl = FALSE; + int res; + + TRACE ("(%p)(%u %p)\n", This, cidl, apidl); + if (cidl==0) return S_OK; + + for(i = 0; i < cidl; i++) + { + if (_ILIsMyComputer(apidl[i])) + bRestoreWithDeskCpl++; + else if (_ILIsNetHood(apidl[i])) + bRestoreWithDeskCpl++; + else if (_ILIsMyDocuments(apidl[i])) + bRestoreWithDeskCpl++; + } + + if (bRestoreWithDeskCpl) + { + /* FIXME use FormatMessage + * use a similar message resource as in windows + */ + LoadStringW(shell32_hInstance, IDS_DELETEMULTIPLE_TEXT, wszPath, sizeof(wszPath)/sizeof(WCHAR)); + wszPath[(sizeof(wszPath)/sizeof(WCHAR))-1] = 0; + + LoadStringW(shell32_hInstance, IDS_DELETEITEM_CAPTION, wszCaption, sizeof(wszCaption)/sizeof(WCHAR)); + wszCaption[(sizeof(wszCaption)/sizeof(WCHAR))-1] = 0; + + res = SHELL_ConfirmMsgBox(GetActiveWindow(), wszPath, wszCaption, NULL, cidl > 1); + if (res == IDD_YESTOALL || res == IDYES) + { + for(i = 0; i < cidl; i++) + { + if (_ILIsMyComputer(apidl[i])) + SetNamespaceExtensionVisibleStatus(L"{20D04FE0-3AEA-1069-A2D8-08002B30309D}", 0x1); + else if (_ILIsNetHood(apidl[i])) + SetNamespaceExtensionVisibleStatus(L"{208D2C60-3AEA-1069-A2D7-08002B30309D}", 0x1); + else if (_ILIsMyDocuments(apidl[i])) + SetNamespaceExtensionVisibleStatus(L"{450D8FBA-AD25-11D0-98A8-0800361B1103}", 0x1); + } + } + } + if (This->sPathTarget) + lstrcpynW(wszPath, This->sPathTarget, MAX_PATH); + else + wszPath[0] = '\0'; + + PathAddBackslashW(wszPath); + wszPathsList = build_paths_list(wszPath, cidl, apidl); + + ZeroMemory(&op, sizeof(op)); + op.hwnd = GetActiveWindow(); + op.wFunc = FO_DELETE; + op.pFrom = wszPathsList; + op.fFlags = FOF_ALLOWUNDO; + if (SHFileOperationW(&op)) + { + WARN("SHFileOperation failed\n"); + ret = E_FAIL; + } + else + ret = S_OK; + + /* we currently need to manually send the notifies */ + wszCurrentPath = wszPathsList; + for (i = 0; i < cidl; i++) + { + LONG wEventId; + + if (_ILIsFolder(apidl[i])) + wEventId = SHCNE_RMDIR; + else if (_ILIsValue(apidl[i])) + wEventId = SHCNE_DELETE; + else + continue; + + /* check if file exists */ + if (GetFileAttributesW(wszCurrentPath) == INVALID_FILE_ATTRIBUTES) + { + LPITEMIDLIST pidl = ILCombine(This->pidlRoot, apidl[i]); + SHChangeNotify(wEventId, SHCNF_IDLIST, pidl, NULL); + SHFree(pidl); + } + + wszCurrentPath += lstrlenW(wszCurrentPath)+1; + } + HeapFree(GetProcessHeap(), 0, wszPathsList); + return ret; +} + +static HRESULT WINAPI +ISF_Desktop_ISFHelper_fnCopyItems (ISFHelper * iface, IShellFolder * pSFFrom, UINT cidl, LPCITEMIDLIST * apidl) +{ + IGenericSFImpl *This = impl_from_ISFHelper(iface); + + TRACE ("(%p)->(%p,%u,%p)\n", This, pSFFrom, cidl, apidl); + return E_NOTIMPL; +} + +static const ISFHelperVtbl vt_FSFldr_ISFHelper = +{ + ISF_Desktop_ISFHelper_fnQueryInterface, + ISF_Desktop_ISFHelper_fnAddRef, + ISF_Desktop_ISFHelper_fnRelease, + ISF_Desktop_ISFHelper_fnGetUniqueName, + ISF_Desktop_ISFHelper_fnAddFolder, + ISF_Desktop_ISFHelper_fnDeleteItems, + ISF_Desktop_ISFHelper_fnCopyItems +}; + /************************************************************************** * ISF_Desktop_Constructor @@ -1055,6 +1353,7 @@ HRESULT WINAPI ISF_Desktop_Constructor ( sf->ref = 1; sf->lpVtbl = &vt_MCFldr_ShellFolder2; sf->lpPF2 = &vt_FSFldr_PersistFolder2; + sf->lpvtblSFHelper = &vt_FSFldr_ISFHelper; sf->pidlRoot = _ILCreateDesktop(); /* my qualified pidl */ sf->sPathTarget = SHAlloc( (lstrlenW(szMyPath) + 1)*sizeof(WCHAR) ); lstrcpyW( sf->sPathTarget, szMyPath ); diff --git a/reactos/dll/win32/shell32/shfldr_fonts.c b/reactos/dll/win32/shell32/shfldr_fonts.c index 10b0595e107..4ed7e7acc03 100644 --- a/reactos/dll/win32/shell32/shfldr_fonts.c +++ b/reactos/dll/win32/shell32/shfldr_fonts.c @@ -918,7 +918,7 @@ static HRESULT WINAPI ISF_Fonts_IContextMenu2_QueryContextMenu( UINT idCmdLast, UINT uFlags) { - char szBuffer[30] = {0}; + WCHAR szBuffer[30] = {0}; ULONG Count = 1; _ICOM_THIS_From_IContextMenu2FontItem(IGenericSFImpl, iface); @@ -926,38 +926,38 @@ static HRESULT WINAPI ISF_Fonts_IContextMenu2_QueryContextMenu( TRACE("(%p)->(hmenu=%p indexmenu=%x cmdfirst=%x cmdlast=%x flags=%x )\n", This, hMenu, indexMenu, idCmdFirst, idCmdLast, uFlags); - if (LoadStringA(shell32_hInstance, IDS_OPEN, szBuffer, sizeof(szBuffer)/sizeof(char))) + if (LoadStringW(shell32_hInstance, IDS_OPEN, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) { szBuffer[(sizeof(szBuffer)/sizeof(char))-1] = L'\0'; - _InsertMenuItem(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_DEFAULT); + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_DEFAULT); Count++; } - if (LoadStringA(shell32_hInstance, IDS_PRINT_VERB, szBuffer, sizeof(szBuffer)/sizeof(char))) + if (LoadStringW(shell32_hInstance, IDS_PRINT_VERB, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) { szBuffer[(sizeof(szBuffer)/sizeof(char))-1] = L'\0'; - _InsertMenuItem(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_STRING, szBuffer, MFS_ENABLED); + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_STRING, szBuffer, MFS_ENABLED); } - if (LoadStringA(shell32_hInstance, IDS_COPY, szBuffer, sizeof(szBuffer)/sizeof(char))) + if (LoadStringW(shell32_hInstance, IDS_COPY, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) { - szBuffer[(sizeof(szBuffer)/sizeof(char))-1] = L'\0'; - _InsertMenuItem(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_SEPARATOR, NULL, MFS_ENABLED); - _InsertMenuItem(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_STRING, szBuffer, MFS_ENABLED); + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_SEPARATOR, NULL, MFS_ENABLED); + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_STRING, szBuffer, MFS_ENABLED); } - if (LoadStringA(shell32_hInstance, IDS_DELETE, szBuffer, sizeof(szBuffer)/sizeof(char))) + if (LoadStringW(shell32_hInstance, IDS_DELETE, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) { - szBuffer[(sizeof(szBuffer)/sizeof(char))-1] = L'\0'; - _InsertMenuItem(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_SEPARATOR, NULL, MFS_ENABLED); - _InsertMenuItem(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_ENABLED); + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_SEPARATOR, NULL, MFS_ENABLED); + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_ENABLED); } - if (LoadStringA(shell32_hInstance, IDS_PROPERTIES, szBuffer, sizeof(szBuffer)/sizeof(char))) + if (LoadStringW(shell32_hInstance, IDS_PROPERTIES, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) { - szBuffer[(sizeof(szBuffer)/sizeof(char))-1] = L'\0'; - _InsertMenuItem(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_SEPARATOR, NULL, MFS_ENABLED); - _InsertMenuItem(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_ENABLED); + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_SEPARATOR, NULL, MFS_ENABLED); + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_ENABLED); } return MAKE_HRESULT(SEVERITY_SUCCESS, 0, Count); diff --git a/reactos/dll/win32/shell32/shfldr_mycomp.c b/reactos/dll/win32/shell32/shfldr_mycomp.c index b54e7d2e9ee..7c2bc90fb49 100644 --- a/reactos/dll/win32/shell32/shfldr_mycomp.c +++ b/reactos/dll/win32/shell32/shfldr_mycomp.c @@ -451,6 +451,9 @@ static HRESULT WINAPI ISF_MyComputer_fnGetAttributesOf (IShellFolder2 * iface, { IGenericSFImpl *This = (IGenericSFImpl *)iface; HRESULT hr = S_OK; + static const DWORD dwComputerAttributes = + SFGAO_STORAGE | SFGAO_HASPROPSHEET | SFGAO_STORAGEANCESTOR | SFGAO_CANCOPY | + SFGAO_FILESYSANCESTOR | SFGAO_FOLDER | SFGAO_FILESYSTEM | SFGAO_HASSUBFOLDER | SFGAO_CANRENAME | SFGAO_CANDELETE; TRACE ("(%p)->(cidl=%d apidl=%p mask=%p (0x%08x))\n", This, cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0); @@ -463,15 +466,8 @@ static HRESULT WINAPI ISF_MyComputer_fnGetAttributesOf (IShellFolder2 * iface, if (*rgfInOut == 0) *rgfInOut = ~0; - if(cidl == 0){ - IShellFolder *psfParent = NULL; - LPCITEMIDLIST rpidl = NULL; - - hr = SHBindToParent(This->pidlRoot, &IID_IShellFolder, (LPVOID*)&psfParent, (LPCITEMIDLIST*)&rpidl); - if(SUCCEEDED(hr)) { - SHELL32_GetItemAttributes (psfParent, rpidl, rgfInOut); - IShellFolder_Release(psfParent); - } + if(cidl == 0) { + *rgfInOut &= dwComputerAttributes; } else { while (cidl > 0 && *apidl) { pdump (*apidl); @@ -778,10 +774,23 @@ static HRESULT WINAPI ISF_MyComputer_fnSetNameOf ( LPWSTR sName; HKEY hKey; UINT length; + WCHAR szName[30]; TRACE ("(%p)->(%p,pidl=%p,%s,%u,%p)\n", This, hwndOwner, pidl, debugstr_w (lpName), dwFlags, pPidlOut); + if (_ILIsDrive(pidl)) + { + if (_ILSimpleGetTextW(pidl, szName, sizeof(szName)/sizeof(WCHAR))) + { + SetVolumeLabelW(szName, lpName); + } + if (pPidlOut) + *pPidlOut = _ILCreateDrive(szName); + return S_OK; + } + + if (pPidlOut != NULL) { *pPidlOut = _ILCreateMyComputer(); @@ -1021,7 +1030,12 @@ static HRESULT WINAPI IMCFldr_PersistFolder2_Initialize ( { IGenericSFImpl *This = impl_from_IPersistFolder2(iface); TRACE ("(%p)->(%p)\n", This, pidl); - return E_NOTIMPL; + + if (This->pidlRoot) + SHFree((LPVOID)This->pidlRoot); + + This->pidlRoot = ILClone(pidl); + return S_OK; } /************************************************************************** diff --git a/reactos/dll/win32/shell32/shfldr_mydocuments.c b/reactos/dll/win32/shell32/shfldr_mydocuments.c index 94a680b5a6c..143c4b74e83 100644 --- a/reactos/dll/win32/shell32/shfldr_mydocuments.c +++ b/reactos/dll/win32/shell32/shfldr_mydocuments.c @@ -368,8 +368,8 @@ static HRESULT WINAPI ISF_MyDocuments_fnGetAttributesOf (IShellFolder2 * iface, IGenericSFImpl *This = (IGenericSFImpl *)iface; HRESULT hr = S_OK; static const DWORD dwMyDocumentsAttributes = - SFGAO_STORAGE | SFGAO_HASPROPSHEET | SFGAO_STORAGEANCESTOR | - SFGAO_FILESYSANCESTOR | SFGAO_FOLDER | SFGAO_FILESYSTEM | SFGAO_HASSUBFOLDER; + SFGAO_STORAGE | SFGAO_HASPROPSHEET | SFGAO_STORAGEANCESTOR | SFGAO_CANCOPY | + SFGAO_FILESYSANCESTOR | SFGAO_FOLDER | SFGAO_FILESYSTEM | SFGAO_HASSUBFOLDER | SFGAO_CANRENAME | SFGAO_CANDELETE; TRACE ("(%p)->(cidl=%d apidl=%p mask=%p (0x%08x))\n", This, cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0); diff --git a/reactos/dll/win32/shell32/shfldr_netplaces.c b/reactos/dll/win32/shell32/shfldr_netplaces.c index adf27f33fb6..361496bebac 100644 --- a/reactos/dll/win32/shell32/shfldr_netplaces.c +++ b/reactos/dll/win32/shell32/shfldr_netplaces.c @@ -317,6 +317,9 @@ static HRESULT WINAPI ISF_NetworkPlaces_fnGetAttributesOf (IShellFolder2 * iface UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut) { IGenericSFImpl *This = (IGenericSFImpl *)iface; + static const DWORD dwNethoodAttributes = + SFGAO_STORAGE | SFGAO_HASPROPSHEET | SFGAO_STORAGEANCESTOR | + SFGAO_FILESYSANCESTOR | SFGAO_FOLDER | SFGAO_FILESYSTEM | SFGAO_HASSUBFOLDER | SFGAO_CANRENAME | SFGAO_CANDELETE; HRESULT hr = S_OK; TRACE ("(%p)->(cidl=%d apidl=%p mask=%p (0x%08x))\n", This, @@ -330,17 +333,8 @@ static HRESULT WINAPI ISF_NetworkPlaces_fnGetAttributesOf (IShellFolder2 * iface if (*rgfInOut == 0) *rgfInOut = ~0; - if (cidl == 0) - { - IShellFolder *psfParent = NULL; - LPCITEMIDLIST rpidl = NULL; - - hr = SHBindToParent(This->pidlRoot, &IID_IShellFolder, (LPVOID*)&psfParent, (LPCITEMIDLIST*)&rpidl); - if(SUCCEEDED(hr)) - { - SHELL32_GetItemAttributes (psfParent, rpidl, rgfInOut); - IShellFolder_Release(psfParent); - } + if(cidl == 0) { + *rgfInOut = dwNethoodAttributes; } else { @@ -392,8 +386,7 @@ static HRESULT WINAPI ISF_NetworkPlaces_fnGetUIObjectOf (IShellFolder2 * iface, if (IsEqualIID (riid, &IID_IContextMenu) && (cidl >= 1)) { - pObj = (LPUNKNOWN) ISvItemCm_Constructor ((IShellFolder *) iface, This->pidlRoot, apidl, cidl); - hr = S_OK; + hr = CDefFolderMenu_Create2(This->pidlRoot, hwndOwner, cidl, apidl, (IShellFolder*)iface, NULL, 0, NULL, (IContextMenu**)&pObj); } else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1)) { diff --git a/reactos/dll/win32/shell32/shfldr_printers.c b/reactos/dll/win32/shell32/shfldr_printers.c index 9e31aa2abee..c61d37241ff 100644 --- a/reactos/dll/win32/shell32/shfldr_printers.c +++ b/reactos/dll/win32/shell32/shfldr_printers.c @@ -923,8 +923,11 @@ static HRESULT WINAPI IPF_Printers_Initialize ( IPersistFolder2 * iface, LPCITEMIDLIST pidl) { _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - FIXME ("(%p)->(%p): stub\n", This, pidl); - return E_NOTIMPL; + if (This->pidlRoot) + SHFree((LPVOID)This->pidlRoot); + + This->pidlRoot = ILClone(pidl); + return S_OK; } /************************************************************************** diff --git a/reactos/dll/win32/shell32/shfldr_recyclebin.c b/reactos/dll/win32/shell32/shfldr_recyclebin.c index aae4772cdf5..f6996107ba6 100644 --- a/reactos/dll/win32/shell32/shfldr_recyclebin.c +++ b/reactos/dll/win32/shell32/shfldr_recyclebin.c @@ -88,11 +88,7 @@ typedef struct tagRecycleBin const IContextMenu2Vtbl *lpContextMenu2; const IShellExtInitVtbl *lpSEI; LONG refCount; - - INT iIdOpen; INT iIdEmpty; - INT iIdProperties; - LPITEMIDLIST pidl; LPCITEMIDLIST apidl; } RecycleBin; @@ -180,12 +176,12 @@ static HRESULT WINAPI RecycleBin_QueryInterface(IShellFolder2 *iface, REFIID rii || IsEqualGUID(riid, &IID_IPersistFolder2)) *ppvObject = &This->lpPersistFolderVtbl; - if (IsEqualIID(riid, &IID_IContextMenu) || IsEqualGUID(riid, &IID_IContextMenu2)) + else if (IsEqualIID(riid, &IID_IContextMenu) || IsEqualGUID(riid, &IID_IContextMenu2)) { This->lpContextMenu2 = &recycleBincmVtblFolder; *ppvObject = &This->lpContextMenu2; } - if(IsEqualIID(riid, &IID_IShellExtInit)) + else if(IsEqualIID(riid, &IID_IShellExtInit)) { *ppvObject = &(This->lpSEI); } @@ -533,10 +529,12 @@ static HRESULT WINAPI RecycleBin_GetDisplayNameOf(IShellFolder2 *This, LPCITEMID { WCHAR pszPath[100]; - HCR_GetClassNameW(&CLSID_RecycleBin, pszPath, MAX_PATH); - pName->uType = STRRET_WSTR; - pName->u.pOleStr = StrDupW(pszPath); - return S_OK; + if (HCR_GetClassNameW(&CLSID_RecycleBin, pszPath, MAX_PATH)) + { + pName->uType = STRRET_WSTR; + pName->u.pOleStr = StrDupW(pszPath); + return S_OK; + } } pFileDetails = _ILGetRecycleStruct(pidl); @@ -747,6 +745,7 @@ static HRESULT WINAPI RecycleBin_IPersistFolder2_Initialize(IPersistFolder2 *ifa RecycleBin *This = impl_from_IPersistFolder(iface); TRACE("(%p, %p)\n", This, pidl); + SHFree((LPVOID)This->pidl); This->pidl = ILClone(pidl); if (This->pidl == NULL) return E_OUTOFMEMORY; @@ -874,31 +873,19 @@ RecycleBin_IContextMenu2Folder_QueryContextMenu( IContextMenu2* iface, HMENU hme memset( &mii, 0, sizeof(mii) ); mii.cbSize = sizeof(mii); mii.fMask = MIIM_TYPE | MIIM_ID | MIIM_STATE; - szBuffer[0] = L'\0'; - LoadStringW(shell32_hInstance, IDS_OPEN, szBuffer, sizeof(szBuffer)/sizeof(WCHAR)); - szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; - mii.dwTypeData = (LPWSTR)szBuffer; - mii.cch = strlenW( mii.dwTypeData ); - mii.wID = idCmdFirst + id++; - mii.fState = MFS_ENABLED; - mii.fType = MFT_STRING; - - if (!InsertMenuItemW( hmenu, indexMenu, TRUE, &mii )) - return E_FAIL; - This->iIdOpen = 1; - mii.fState = MFS_ENABLED; szBuffer[0] = L'\0'; LoadStringW(shell32_hInstance, IDS_EMPTY_BITBUCKET, szBuffer, sizeof(szBuffer)/sizeof(WCHAR)); szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + mii.dwTypeData = szBuffer; mii.cch = strlenW( mii.dwTypeData ); mii.wID = idCmdFirst + id++; - if (!InsertMenuItemW( hmenu, idCmdLast, TRUE, &mii )) - { - TRACE("RecycleBin_IContextMenu2Folder_QueryContextMenu failed to insert item properties"); + mii.fType = MFT_STRING; + This->iIdEmpty = 1; + + if (!InsertMenuItemW( hmenu, indexMenu, TRUE, &mii )) return E_FAIL; - } - This->iIdEmpty = 2; + return MAKE_HRESULT( SEVERITY_SUCCESS, 0, id ); } @@ -908,7 +895,6 @@ RecycleBin_IContextMenu2Folder_InvokeCommand( IContextMenu2* iface, LPCMINVOKECO HRESULT hr; LPSHELLBROWSER lpSB; LPSHELLVIEW lpSV = NULL; - RecycleBin * This = impl_from_IContextMenu2(iface); TRACE("%p %p verb %p\n", This, lpici, lpici->lpVerb); @@ -932,15 +918,6 @@ RecycleBin_IContextMenu2Folder_InvokeCommand( IContextMenu2* iface, LPCMINVOKECO } } } - - - if ( LOWORD(lpici->lpVerb) == This->iIdProperties) - { - WCHAR szDrive = 'C'; - SH_ShowRecycleBinProperties(szDrive); - return S_OK; - } - return S_OK; } @@ -1036,7 +1013,7 @@ static HRESULT WINAPI RecycleBin_IContextMenu2Item_QueryContextMenu( UINT idCmdLast, UINT uFlags) { - char szBuffer[30] = {0}; + WCHAR szBuffer[30] = {0}; ULONG Count = 1; RecycleBin * This = impl_from_IContextMenu2(iface); @@ -1044,32 +1021,32 @@ static HRESULT WINAPI RecycleBin_IContextMenu2Item_QueryContextMenu( TRACE("(%p)->(hmenu=%p indexmenu=%x cmdfirst=%x cmdlast=%x flags=%x )\n", This, hMenu, indexMenu, idCmdFirst, idCmdLast, uFlags); - if (LoadStringA(shell32_hInstance, IDS_RESTORE, szBuffer, sizeof(szBuffer)/sizeof(char))) + if (LoadStringW(shell32_hInstance, IDS_RESTORE, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) { - szBuffer[(sizeof(szBuffer)/sizeof(char))-1] = L'\0'; - _InsertMenuItem(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_ENABLED); + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_ENABLED); Count++; } - if (LoadStringA(shell32_hInstance, IDS_CUT, szBuffer, sizeof(szBuffer)/sizeof(char))) + if (LoadStringW(shell32_hInstance, IDS_CUT, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) { - _InsertMenuItem(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_SEPARATOR, NULL, MFS_ENABLED); - szBuffer[(sizeof(szBuffer)/sizeof(char))-1] = L'\0'; - _InsertMenuItem(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_STRING, szBuffer, MFS_ENABLED); + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_SEPARATOR, NULL, MFS_ENABLED); + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_STRING, szBuffer, MFS_ENABLED); } - if (LoadStringA(shell32_hInstance, IDS_DELETE, szBuffer, sizeof(szBuffer)/sizeof(char))) + if (LoadStringW(shell32_hInstance, IDS_DELETE, szBuffer, sizeof(szBuffer)/sizeof(char))) { - szBuffer[(sizeof(szBuffer)/sizeof(char))-1] = L'\0'; - _InsertMenuItem(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_SEPARATOR, NULL, MFS_ENABLED); - _InsertMenuItem(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_STRING, szBuffer, MFS_ENABLED); + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_SEPARATOR, NULL, MFS_ENABLED); + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_STRING, szBuffer, MFS_ENABLED); } - if (LoadStringA(shell32_hInstance, IDS_PROPERTIES, szBuffer, sizeof(szBuffer)/sizeof(char))) + if (LoadStringW(shell32_hInstance, IDS_PROPERTIES, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) { - szBuffer[(sizeof(szBuffer)/sizeof(char))-1] = L'\0'; - _InsertMenuItem(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_SEPARATOR, NULL, MFS_ENABLED); - _InsertMenuItem(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_DEFAULT); + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_SEPARATOR, NULL, MFS_ENABLED); + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_DEFAULT); } return MAKE_HRESULT(SEVERITY_SUCCESS, 0, Count); diff --git a/reactos/dll/win32/shell32/shlexec.c b/reactos/dll/win32/shell32/shlexec.c index ce88e563607..72735d72d51 100644 --- a/reactos/dll/win32/shell32/shlexec.c +++ b/reactos/dll/win32/shell32/shlexec.c @@ -1298,7 +1298,7 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc ) static const WCHAR wFile[] = {'f','i','l','e',0}; static const WCHAR wHttp[] = {'h','t','t','p',':','/','/',0}; static const WCHAR wExplorer[] = {'e','x','p','l','o','r','e','r','.','e','x','e',0}; - static const WCHAR wProperties[] = { 'p','r','o','p','e','r','t','i','e','s',0 }; + //static const WCHAR wProperties[] = { 'p','r','o','p','e','r','t','i','e','s',0 }; static const DWORD unsupportedFlags = SEE_MASK_INVOKEIDLIST | SEE_MASK_ICON | SEE_MASK_HOTKEY | SEE_MASK_CONNECTNETDRV | SEE_MASK_FLAG_DDEWAIT | SEE_MASK_FLAG_NO_UI | @@ -1403,14 +1403,14 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc ) HeapFree(GetProcessHeap(), 0, wszApplicationName); return TRUE; } - +#if 0 if (sei_tmp.lpVerb && !wcscmp(sei_tmp.lpVerb, wProperties)) { SH_ShowPropertiesDialog(sei_tmp.lpFile); sei->hInstApp = (HINSTANCE) 33; return TRUE; } - +#endif if (sei_tmp.fMask & SEE_MASK_CLASSALL) { /* launch a document by fileclass like 'WordPad.Document.1' */ diff --git a/reactos/dll/win32/shell32/shlfileop.c b/reactos/dll/win32/shell32/shlfileop.c index 6f99819e690..6eccbb18f58 100644 --- a/reactos/dll/win32/shell32/shlfileop.c +++ b/reactos/dll/win32/shell32/shlfileop.c @@ -190,7 +190,7 @@ static INT_PTR CALLBACK ConfirmMsgBoxProc(HWND hDlg, UINT uMsg, WPARAM wParam, L return FALSE; } -static int SHELL_ConfirmMsgBox(HWND hWnd, LPWSTR lpszText, LPWSTR lpszCaption, HICON hIcon, BOOL bYesToAll) +int SHELL_ConfirmMsgBox(HWND hWnd, LPWSTR lpszText, LPWSTR lpszCaption, HICON hIcon, BOOL bYesToAll) { static const WCHAR wszTemplate[] = {'S','H','E','L','L','_','Y','E','S','T','O','A','L','L','_','M','S','G','B','O','X',0}; struct confirm_msg_info info; diff --git a/reactos/dll/win32/shell32/shlfolder.c b/reactos/dll/win32/shell32/shlfolder.c index 71351113725..44d5150d38f 100644 --- a/reactos/dll/win32/shell32/shlfolder.c +++ b/reactos/dll/win32/shell32/shlfolder.c @@ -418,7 +418,7 @@ HRESULT SHELL32_GetItemAttributes (IShellFolder * psf, LPCITEMIDLIST pidl, LPDWO if (_ILIsDrive (pidl)) { *pdwAttributes &= SFGAO_HASSUBFOLDER|SFGAO_FILESYSTEM|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR| - SFGAO_DROPTARGET|SFGAO_HASPROPSHEET|SFGAO_CANLINK|SFGAO_CANRENAME; + SFGAO_DROPTARGET|SFGAO_HASPROPSHEET|SFGAO_CANRENAME; } else if (has_guid && HCR_GetFolderAttributes(pidl, &dwAttributes)) { *pdwAttributes = dwAttributes; } else if (_ILGetDataPointer (pidl)) { @@ -446,7 +446,10 @@ HRESULT SHELL32_GetItemAttributes (IShellFolder * psf, LPCITEMIDLIST pidl, LPDWO SFGAO_CANRENAME | SFGAO_CANLINK | SFGAO_CANMOVE | SFGAO_CANCOPY; if (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) + { *pdwAttributes |= (SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSANCESTOR); + *pdwAttributes &= ~SFGAO_CANLINK; + } else *pdwAttributes &= ~(SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSANCESTOR); diff --git a/reactos/dll/win32/shell32/shlmenu.c b/reactos/dll/win32/shell32/shlmenu.c index cdd08c9fcc4..87b2ac7ea12 100644 --- a/reactos/dll/win32/shell32/shlmenu.c +++ b/reactos/dll/win32/shell32/shlmenu.c @@ -907,6 +907,7 @@ HRESULT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uI if (!GetMenuItemInfoW(hmSrc, nItem, TRUE, &miiSrc)) { +MessageBoxW(NULL, L"GetMenuItemInfoW failed", NULL, MB_OK); continue; } @@ -916,8 +917,10 @@ HRESULT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uI { /* This is a separator; don't put two of them in a row */ if (bAlreadySeparated) + { +MessageBoxW(NULL, L"bAlreadySeparated failed", NULL, MB_OK); continue; - + } bAlreadySeparated = TRUE; } else if (miiSrc.hSubMenu) @@ -926,9 +929,10 @@ HRESULT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uI { miiSrc.wID += uIDAdjust; /* add uIDAdjust to the ID */ - if (miiSrc.wID > uIDAdjustMax) /* skip ID's higher uIDAdjustMax */ + if (miiSrc.wID > uIDAdjustMax) /* skip ID's higher uIDAdjustMax */ + {MessageBoxW(NULL, L"uIDAdjustMax 111 failed", NULL, MB_OK); continue; - + } if (uIDMax <= miiSrc.wID) /* remember the highest ID */ uIDMax = miiSrc.wID + 1; } @@ -953,9 +957,10 @@ HRESULT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uI { miiSrc.wID += uIDAdjust; /* add uIDAdjust to the ID */ - if (miiSrc.wID > uIDAdjustMax) /* skip ID's higher uIDAdjustMax */ + if (miiSrc.wID > uIDAdjustMax) /* skip ID's higher uIDAdjustMax */{ +MessageBoxW(NULL, L"uIDAdjustMax max 222 failed", NULL, MB_OK); continue; - + } if (uIDMax <= miiSrc.wID) /* remember the highest ID */ uIDMax = miiSrc.wID + 1; @@ -966,6 +971,7 @@ HRESULT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uI */ if (!InsertMenuItemW(hmDst, uInsert, TRUE, &miiSrc)) { +MessageBoxW(NULL, L"InsertMenuItemW failed", NULL, MB_OK); return(uIDMax); } } diff --git a/reactos/dll/win32/shell32/shlview.c b/reactos/dll/win32/shell32/shlview.c index 9c03d8a7271..1a2b6d7fa53 100644 --- a/reactos/dll/win32/shell32/shlview.c +++ b/reactos/dll/win32/shell32/shlview.c @@ -774,8 +774,8 @@ static void ShellView_MergeFileMenu(IShellViewImpl * This, HMENU hSubMenu) if(hSubMenu) { /*insert This item at the beginning of the menu */ - _InsertMenuItem(hSubMenu, 0, TRUE, 0, MFT_SEPARATOR, NULL, MFS_ENABLED); - _InsertMenuItem(hSubMenu, 0, TRUE, IDM_MYFILEITEM, MFT_STRING, "dummy45", MFS_ENABLED); + _InsertMenuItemW(hSubMenu, 0, TRUE, 0, MFT_SEPARATOR, NULL, MFS_ENABLED); + _InsertMenuItemW(hSubMenu, 0, TRUE, IDM_MYFILEITEM, MFT_STRING, L"dummy45", MFS_ENABLED); } TRACE("--\n"); @@ -791,18 +791,18 @@ static void ShellView_MergeViewMenu(IShellViewImpl * This, HMENU hSubMenu) if(hSubMenu) { /*add a separator at the correct position in the menu*/ - MENUITEMINFOA mii; - static char view[] = "View"; + MENUITEMINFOW mii; + static WCHAR view[] = L"View"; - _InsertMenuItem(hSubMenu, FCIDM_MENU_VIEW_SEP_OPTIONS, FALSE, 0, MFT_SEPARATOR, NULL, MFS_ENABLED); + _InsertMenuItemW(hSubMenu, FCIDM_MENU_VIEW_SEP_OPTIONS, FALSE, 0, MFT_SEPARATOR, NULL, MFS_ENABLED); ZeroMemory(&mii, sizeof(mii)); mii.cbSize = sizeof(mii); mii.fMask = MIIM_SUBMENU | MIIM_TYPE | MIIM_DATA; mii.fType = MFT_STRING; mii.dwTypeData = view; - mii.hSubMenu = LoadMenuA(shell32_hInstance, "MENU_001"); - InsertMenuItemA(hSubMenu, FCIDM_MENU_VIEW_SEP_OPTIONS, FALSE, &mii); + mii.hSubMenu = LoadMenuW(shell32_hInstance, L"MENU_001"); + InsertMenuItemW(hSubMenu, FCIDM_MENU_VIEW_SEP_OPTIONS, FALSE, &mii); } } @@ -841,6 +841,8 @@ static UINT ShellView_GetSelections(IShellViewImpl * This) { This->apidl[i] = (LPITEMIDLIST)lvItem.lParam; i++; + if (i == This->cidl) + break; TRACE("-- selected Item found\n"); } lvItem.iItem++; @@ -1030,7 +1032,7 @@ static void ShellView_DoContextMenu(IShellViewImpl * This, WORD x, WORD y, BOOL { hMenu = CreatePopupMenu(); - This->pCM = ISvBgCm_Constructor(This->pSFParent, FALSE); + CDefFolderMenu_Create2(NULL, NULL, This->cidl, (LPCITEMIDLIST*)This->apidl, This->pSFParent, NULL, 0, NULL, (IContextMenu**)&This->pCM); IContextMenu2_QueryContextMenu(This->pCM, hMenu, 0, FCIDM_SHVIEWFIRST, FCIDM_SHVIEWLAST, 0); uCommand = TrackPopupMenu( hMenu, TPM_LEFTALIGN | TPM_RETURNCMD,x,y,0,This->hWnd,NULL); @@ -2063,6 +2065,7 @@ static HRESULT WINAPI IShellView_fnSelectItem( static HRESULT WINAPI IShellView_fnGetItemObject(IShellView * iface, UINT uItem, REFIID riid, LPVOID *ppvOut) { + HRESULT hr = E_FAIL; IShellViewImpl *This = (IShellViewImpl *)iface; TRACE("(%p)->(uItem=0x%08x,\n\tIID=%s, ppv=%p)\n",This, uItem, debugstr_guid(riid), ppvOut); @@ -2072,19 +2075,19 @@ static HRESULT WINAPI IShellView_fnGetItemObject(IShellView * iface, UINT uItem, switch(uItem) { case SVGIO_BACKGROUND: - *ppvOut = ISvBgCm_Constructor(This->pSFParent, FALSE); + //*ppvOut = ISvBgCm_Constructor(This->pSFParent, FALSE); + CDefFolderMenu_Create2(NULL, NULL, This->cidl, (LPCITEMIDLIST*)This->apidl, This->pSFParent, NULL, 0, NULL, (IContextMenu**)ppvOut); + if (!ppvOut) hr = E_OUTOFMEMORY; break; case SVGIO_SELECTION: ShellView_GetSelections(This); - IShellFolder_GetUIObjectOf(This->pSFParent, This->hWnd, This->cidl, (LPCITEMIDLIST*)This->apidl, riid, 0, ppvOut); + hr = IShellFolder_GetUIObjectOf(This->pSFParent, This->hWnd, This->cidl, (LPCITEMIDLIST*)This->apidl, riid, 0, ppvOut); break; } TRACE("-- (%p)->(interface=%p)\n",This, *ppvOut); - if(!*ppvOut) return E_OUTOFMEMORY; - - return S_OK; + return hr; } static const IShellViewVtbl svvt = diff --git a/reactos/dll/win32/shell32/shv_bg_cmenu.c b/reactos/dll/win32/shell32/shv_bg_cmenu.c deleted file mode 100644 index d5a4ff8afd7..00000000000 --- a/reactos/dll/win32/shell32/shv_bg_cmenu.c +++ /dev/null @@ -1,500 +0,0 @@ -/* - * IContextMenu - * ShellView Background Context Menu (shv_bg_cm) - * - * Copyright 1999 Juergen Schmied - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ -#include - -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT -#include "wine/debug.h" - -#include "windef.h" -#include "wingdi.h" -#include "pidl.h" -#include "shlobj.h" -#include "shtypes.h" -#include "shell32_main.h" -#include "shellfolder.h" -#include "undocshell.h" -#include "shlwapi.h" -#include "stdio.h" -#include "winuser.h" - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -/************************************************************************** -* IContextMenu Implementation -*/ -typedef struct -{ - const IContextMenu2Vtbl *lpVtbl; - IShellFolder* pSFParent; - LONG ref; - BOOL bDesktop; - IContextMenu2 * icm_new; -} BgCmImpl; - -static const IContextMenu2Vtbl cmvt; - -BOOL -HasClipboardData() -{ - BOOL ret = FALSE; - IDataObject * pda; - - if(SUCCEEDED(OleGetClipboard(&pda))) - { - STGMEDIUM medium; - FORMATETC formatetc; - - TRACE("pda=%p\n", pda); - - /* Set the FORMATETC structure*/ - InitFormatEtc(formatetc, RegisterClipboardFormatA(CFSTR_SHELLIDLIST), TYMED_HGLOBAL); - if(SUCCEEDED(IDataObject_GetData(pda,&formatetc,&medium))) - { - ret = TRUE; - } - - IDataObject_Release(pda); - ReleaseStgMedium(&medium); - } - - return ret; -} - - -/************************************************************************** -* ISVBgCm_Constructor() -*/ -IContextMenu2 *ISvBgCm_Constructor(IShellFolder* pSFParent, BOOL bDesktop) -{ - BgCmImpl* cm; - - cm = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(BgCmImpl)); - cm->lpVtbl = &cmvt; - cm->ref = 1; - cm->pSFParent = pSFParent; - cm->bDesktop = bDesktop; - if(pSFParent) IShellFolder_AddRef(pSFParent); - - TRACE("(%p)->()\n",cm); - return (IContextMenu2*)cm; -} - -/************************************************************************** -* ISVBgCm_fnQueryInterface -*/ -static HRESULT WINAPI ISVBgCm_fnQueryInterface(IContextMenu2 *iface, REFIID riid, LPVOID *ppvObj) -{ - BgCmImpl *This = (BgCmImpl *)iface; - - TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); - - *ppvObj = NULL; - - if(IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IContextMenu) || - IsEqualIID(riid, &IID_IContextMenu2)) - { - *ppvObj = This; - } - else if(IsEqualIID(riid, &IID_IShellExtInit)) /*IShellExtInit*/ - { - FIXME("-- LPSHELLEXTINIT pointer requested\n"); - } - - if(*ppvObj) - { - IUnknown_AddRef((IUnknown*)*ppvObj); - TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); - return S_OK; - } - TRACE("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -/************************************************************************** -* ISVBgCm_fnAddRef -*/ -static ULONG WINAPI ISVBgCm_fnAddRef(IContextMenu2 *iface) -{ - BgCmImpl *This = (BgCmImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE("(%p)->(count=%u)\n", This, refCount - 1); - - return refCount; -} - -/************************************************************************** -* ISVBgCm_fnRelease -*/ -static ULONG WINAPI ISVBgCm_fnRelease(IContextMenu2 *iface) -{ - BgCmImpl *This = (BgCmImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->ref); - - TRACE("(%p)->(count=%i)\n", This, refCount + 1); - - if (!refCount) - { - TRACE(" destroying IContextMenu(%p)\n",This); - - if(This->pSFParent) - IShellFolder_Release(This->pSFParent); - - HeapFree(GetProcessHeap(),0,This); - } - return refCount; -} - -/************************************************************************** -* ISVBgCm_fnQueryContextMenu() -*/ - -VOID INewItem_SetParent(LPSHELLFOLDER pSFParent); /* FIXME: remove that, shouldn't be needed */ - -static HRESULT WINAPI ISVBgCm_fnQueryContextMenu( - IContextMenu2 *iface, - HMENU hMenu, - UINT indexMenu, - UINT idCmdFirst, - UINT idCmdLast, - UINT uFlags) -{ - HMENU hMyMenu; - UINT idMax; - MENUITEMINFOW mii; - HRESULT hr; - - IContextMenu2 * icm; - BgCmImpl *This = (BgCmImpl *)iface; - - TRACE("(%p)->(hmenu=%p indexmenu=%x cmdfirst=%x cmdlast=%x flags=%x )\n", - This, hMenu, indexMenu, idCmdFirst, idCmdLast, uFlags); - - - hMyMenu = LoadMenuA(shell32_hInstance, "MENU_002"); - if (uFlags & CMF_DEFAULTONLY) - { - HMENU ourMenu = GetSubMenu(hMyMenu,0); - UINT oldDef = GetMenuDefaultItem(hMenu,TRUE,GMDI_USEDISABLED); - UINT newDef = GetMenuDefaultItem(ourMenu,TRUE,GMDI_USEDISABLED); - if (newDef != oldDef) - SetMenuDefaultItem(hMenu,newDef,TRUE); - if (newDef!=0xFFFFFFFF) - hr = MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_NULL, newDef+1); - else - hr = MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_NULL, 0); - } - else - { - idMax = Shell_MergeMenus (hMenu, GetSubMenu(hMyMenu,0), indexMenu, - idCmdFirst, idCmdLast, MM_SUBMENUSHAVEIDS); - hr = MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_NULL, idMax-idCmdFirst+1); - } - DestroyMenu(hMyMenu); - - if (!HasClipboardData()) - { - mii.cbSize = sizeof(mii); - mii.fMask = MIIM_STATE; - mii.fState = MFS_DISABLED; - mii.fType = 0; - SetMenuItemInfoW(hMenu, FCIDM_SHVIEW_INSERT, FALSE, &mii); - SetMenuItemInfoW(hMenu, FCIDM_SHVIEW_INSERTLINK, FALSE, &mii); - } - - /* - * FIXME - * load other shell extensions - */ - if (SUCCEEDED(INewItem_Constructor(NULL, &IID_IContextMenu2, (LPVOID*)&icm))) - { - if (SUCCEEDED(IContextMenu_QueryContextMenu(icm, hMenu, 10, idCmdFirst, idCmdLast, uFlags))) - { - This->icm_new = icm; - _InsertMenuItem(hMenu, 11, TRUE, -1, MFT_SEPARATOR, NULL, MFS_ENABLED); - } - else - { - This->icm_new = NULL; - } - } - - /* Prepare 'New item' shell extension */ - /* FIXME: shouldn't be needed... */ - INewItem_SetParent(This->pSFParent); - - if (This->bDesktop) - { - /* desktop menu has no view option */ - DeleteMenu(hMenu, 0, MF_BYPOSITION); - DeleteMenu(hMenu, 0, MF_BYPOSITION); - } - TRACE("(%p)->returning 0x%x\n",This,hr); - return hr; -} - - -/************************************************************************** -* DoPaste -*/ -static BOOL DoPaste( - IContextMenu2 *iface) -{ - BgCmImpl *This = (BgCmImpl *)iface; - BOOL bSuccess = FALSE; - IDataObject * pda; - - TRACE("\n"); - - if(SUCCEEDED(OleGetClipboard(&pda))) - { - STGMEDIUM medium; - FORMATETC formatetc; - - TRACE("pda=%p\n", pda); - - /* Set the FORMATETC structure*/ - InitFormatEtc(formatetc, RegisterClipboardFormatA(CFSTR_SHELLIDLIST), TYMED_HGLOBAL); - - /* Get the pidls from IDataObject */ - if(SUCCEEDED(IDataObject_GetData(pda,&formatetc,&medium))) - { - LPITEMIDLIST * apidl; - LPITEMIDLIST pidl; - IShellFolder *psfFrom = NULL, *psfDesktop; - - LPIDA lpcida = GlobalLock(medium.u.hGlobal); - TRACE("cida=%p\n", lpcida); - - apidl = _ILCopyCidaToaPidl(&pidl, lpcida); - - /* bind to the source shellfolder */ - SHGetDesktopFolder(&psfDesktop); - if(psfDesktop) - { - IShellFolder_BindToObject(psfDesktop, pidl, NULL, &IID_IShellFolder, (LPVOID*)&psfFrom); - IShellFolder_Release(psfDesktop); - } - - if (psfFrom) - { - /* get source and destination shellfolder */ - ISFHelper *psfhlpdst, *psfhlpsrc; - IShellFolder_QueryInterface(This->pSFParent, &IID_ISFHelper, (LPVOID*)&psfhlpdst); - IShellFolder_QueryInterface(psfFrom, &IID_ISFHelper, (LPVOID*)&psfhlpsrc); - - /* do the copy/move */ - if (psfhlpdst && psfhlpsrc) - { - ISFHelper_CopyItems(psfhlpdst, psfFrom, lpcida->cidl, (LPCITEMIDLIST*)apidl); - /* FIXME handle move - ISFHelper_DeleteItems(psfhlpsrc, lpcida->cidl, apidl); - */ - } - if(psfhlpdst) ISFHelper_Release(psfhlpdst); - if(psfhlpsrc) ISFHelper_Release(psfhlpsrc); - IShellFolder_Release(psfFrom); - } - - _ILFreeaPidl(apidl, lpcida->cidl); - SHFree(pidl); - - /* release the medium*/ - ReleaseStgMedium(&medium); - } - IDataObject_Release(pda); - } -#if 0 - HGLOBAL hMem; - - OpenClipboard(NULL); - hMem = GetClipboardData(CF_HDROP); - - if(hMem) - { - char * pDropFiles = (char *)GlobalLock(hMem); - if(pDropFiles) - { - int len, offset = sizeof(DROPFILESTRUCT); - - while( pDropFiles[offset] != 0) - { - len = strlen(pDropFiles + offset); - TRACE("%s\n", pDropFiles + offset); - offset += len+1; - } - } - GlobalUnlock(hMem); - } - CloseClipboard(); -#endif - return bSuccess; -} - -/************************************************************************** -* ISVBgCm_fnInvokeCommand() -*/ -static HRESULT WINAPI ISVBgCm_fnInvokeCommand( - IContextMenu2 *iface, - LPCMINVOKECOMMANDINFO lpcmi) -{ - BgCmImpl *This = (BgCmImpl *)iface; - - LPSHELLBROWSER lpSB; - LPSHELLVIEW lpSV = NULL; - HWND hWndSV = 0; - - TRACE("(%p)->(invcom=%p verb=%p wnd=%p)\n",This,lpcmi,lpcmi->lpVerb, lpcmi->hwnd); - - /* get the active IShellView */ - if((lpSB = (LPSHELLBROWSER)SendMessageA(lpcmi->hwnd, CWM_GETISHELLBROWSER,0,0))) - { - if(SUCCEEDED(IShellBrowser_QueryActiveShellView(lpSB, &lpSV))) - { - IShellView_GetWindow(lpSV, &hWndSV); - } - } - - if(HIWORD(lpcmi->lpVerb)) - { - TRACE("%s\n",lpcmi->lpVerb); - - if (! strcmp(lpcmi->lpVerb,CMDSTR_VIEWLISTA)) - { - if(hWndSV) SendMessageA(hWndSV, WM_COMMAND, MAKEWPARAM(FCIDM_SHVIEW_LISTVIEW,0),0 ); - } - else if (! strcmp(lpcmi->lpVerb,CMDSTR_VIEWDETAILSA)) - { - if(hWndSV) SendMessageA(hWndSV, WM_COMMAND, MAKEWPARAM(FCIDM_SHVIEW_REPORTVIEW,0),0 ); - } - else - { - FIXME("please report: unknown verb %s\n",lpcmi->lpVerb); - } - } - else - { - switch(LOWORD(lpcmi->lpVerb)) - { - case FCIDM_SHVIEW_REFRESH: - if (lpSV) IShellView_Refresh(lpSV); - break; - case FCIDM_SHVIEW_INSERT: - DoPaste(iface); - break; - - case FCIDM_SHVIEW_PROPERTIES: - if (This->bDesktop) { - ShellExecuteA(lpcmi->hwnd, "open", "rundll32.exe shell32.dll,Control_RunDLL desk.cpl", NULL, NULL, SW_SHOWNORMAL); - } else { - FIXME("launch item properties dialog\n"); - } - break; - - default: - - if (This->icm_new && SUCCEEDED(IContextMenu2_InvokeCommand(This->icm_new, lpcmi))) - return S_OK; - - /* if it's an id just pass it to the parent shv */ - if (hWndSV) SendMessageA(hWndSV, WM_COMMAND, MAKEWPARAM(LOWORD(lpcmi->lpVerb), 0),0 ); - break; - } - } - - if (lpSV) - IShellView_Release(lpSV); /* QueryActiveShellView does AddRef */ - - return NOERROR; -} - -/************************************************************************** - * ISVBgCm_fnGetCommandString() - * - */ -static HRESULT WINAPI ISVBgCm_fnGetCommandString( - IContextMenu2 *iface, - UINT_PTR idCommand, - UINT uFlags, - UINT* lpReserved, - LPSTR lpszName, - UINT uMaxNameLen) -{ - BgCmImpl *This = (BgCmImpl *)iface; - - TRACE("(%p)->(idcom=%lx flags=%x %p name=%p len=%x)\n",This, idCommand, uFlags, lpReserved, lpszName, uMaxNameLen); - - /* test the existence of the menu items, the file dialog enables - the buttons according to this */ - if (uFlags == GCS_VALIDATEA) - { - if(HIWORD(idCommand)) - { - if (!strcmp((LPSTR)idCommand, CMDSTR_VIEWLISTA) || - !strcmp((LPSTR)idCommand, CMDSTR_VIEWDETAILSA)) - { - return NOERROR; - } - } - } - - FIXME("unknown command string\n"); - return E_FAIL; -} - -/************************************************************************** -* ISVBgCm_fnHandleMenuMsg() -*/ -static HRESULT WINAPI ISVBgCm_fnHandleMenuMsg( - IContextMenu2 *iface, - UINT uMsg, - WPARAM wParam, - LPARAM lParam) -{ - BgCmImpl *This = (BgCmImpl *)iface; - - TRACE("ISVBgCm_fnHandleMenuMsg (%p)->(msg=%x wp=%lx lp=%lx)\n",This, uMsg, wParam, lParam); - - if (This->icm_new) - { - IContextMenu2_HandleMenuMsg(This->icm_new, uMsg, wParam, lParam); - } - - return E_NOTIMPL; -} - -/************************************************************************** -* IContextMenu2 VTable -* -*/ -static const IContextMenu2Vtbl cmvt = -{ - ISVBgCm_fnQueryInterface, - ISVBgCm_fnAddRef, - ISVBgCm_fnRelease, - ISVBgCm_fnQueryContextMenu, - ISVBgCm_fnInvokeCommand, - ISVBgCm_fnGetCommandString, - ISVBgCm_fnHandleMenuMsg -}; diff --git a/reactos/dll/win32/shell32/shv_def_cmenu.c b/reactos/dll/win32/shell32/shv_def_cmenu.c new file mode 100644 index 00000000000..445b5747cbc --- /dev/null +++ b/reactos/dll/win32/shell32/shv_def_cmenu.c @@ -0,0 +1,1726 @@ +/* + * PROJECT: shell32 + * LICENSE: GPL - See COPYING in the top level directory + * FILE: dll/win32/shell32/shv_item_new.c + * PURPOSE: provides default context menu implementation + * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + */ + +#include + +#define COBJMACROS +#define NONAMELESSUNION +#define NONAMELESSSTRUCT +#define YDEBUG +#include "winerror.h" +#include "wine/debug.h" + +#include "windef.h" +#include "wingdi.h" +#include "pidl.h" +#include "undocshell.h" +#include "shlobj.h" +#include "objbase.h" + +#include "shlwapi.h" +#include "shell32_main.h" +#include "shellfolder.h" +#include "debughlp.h" +#include "shresdef.h" +#include "shlguid.h" + +WINE_DEFAULT_DEBUG_CHANNEL(dmenu); + +typedef struct _DynamicShellEntry_ +{ + UINT iIdCmdFirst; + UINT NumIds; + CLSID ClassID; + IContextMenu * CMenu; + struct _DynamicShellEntry_ * Next; +}DynamicShellEntry, *PDynamicShellEntry; + +typedef struct _StaticShellEntry_ +{ + LPWSTR szVerb; + LPWSTR szClass; + struct _StaticShellEntry_ * Next; +}StaticShellEntry, *PStaticShellEntry; + + +typedef struct +{ + const IContextMenu2Vtbl *lpVtbl; + LONG ref; + DEFCONTEXTMENU dcm; + IDataObject * pDataObj; + DWORD bGroupPolicyActive; + PDynamicShellEntry dhead; /* first dynamic shell extension entry */ + UINT iIdSHEFirst; /* first used id */ + UINT iIdSHELast; /* last used id */ + PStaticShellEntry shead; /* first static shell extension entry */ + UINT iIdSCMFirst; /* first static used id */ + UINT iIdSCMLast; /* last static used id */ +}IDefaultContextMenuImpl; + +static inline IDefaultContextMenuImpl *impl_from_IContextMenu( IContextMenu2 *iface ) +{ + return (IDefaultContextMenuImpl *)((char*)iface - FIELD_OFFSET(IDefaultContextMenuImpl, lpVtbl)); +} + +VOID INewItem_SetCurrentShellFolder(IShellFolder * psfParent); // HACK + + +static +HRESULT +WINAPI +IDefaultContextMenu_fnQueryInterface( + IContextMenu2 *iface, + REFIID riid, + LPVOID *ppvObj) +{ + IDefaultContextMenuImpl *This = (IDefaultContextMenuImpl *)iface; + + TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); + + *ppvObj = NULL; + + if(IsEqualIID(riid, &IID_IUnknown) || + IsEqualIID(riid, &IID_IContextMenu) || + IsEqualIID(riid, &IID_IContextMenu2)) + { + *ppvObj = This; + } + + if(*ppvObj) + { + IUnknown_AddRef((IUnknown*)*ppvObj); + TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); + return S_OK; + } + TRACE("-- Interface: E_NOINTERFACE\n"); + return E_NOINTERFACE; +} + + +static +ULONG +WINAPI +IDefaultContextMenu_fnAddRef( + IContextMenu2 *iface) +{ + IDefaultContextMenuImpl *This = (IDefaultContextMenuImpl *)iface; + ULONG refCount = InterlockedIncrement(&This->ref); + + TRACE("(%p)->(count=%u)\n", This, refCount - 1); + + return refCount; +} + +static +ULONG +WINAPI +IDefaultContextMenu_fnRelease( + IContextMenu2 *iface) +{ + PDynamicShellEntry dEntry, dNext; + PStaticShellEntry sEntry, sNext; + IDefaultContextMenuImpl *This = (IDefaultContextMenuImpl *)iface; + ULONG refCount = InterlockedDecrement(&This->ref); + + TRACE("(%p)->(count=%u)\n", This, refCount + 1); + if (!refCount) + { + /* free dynamic shell extension entries */ + dEntry = This->dhead; + while(dEntry) + { + dNext = dEntry->Next; + IContextMenu_Release(dEntry->CMenu); + HeapFree(GetProcessHeap(), 0, dEntry); + dEntry = dNext; + } + /* free static shell extension entries */ + sEntry = This->shead; + while(sEntry) + { + sNext = sEntry->Next; + HeapFree(GetProcessHeap(), 0, sEntry->szClass); + HeapFree(GetProcessHeap(), 0, sEntry->szVerb); + HeapFree(GetProcessHeap(), 0, sEntry); + sEntry = sNext; + } + HeapFree(GetProcessHeap(),0,This); + } + + return refCount; +} + +static +void +SH_AddStaticEntry(IDefaultContextMenuImpl * This, WCHAR *szVerb, WCHAR * szClass) +{ + PStaticShellEntry curEntry; + PStaticShellEntry lastEntry = NULL; + + curEntry = This->shead; + while(curEntry) + { + if (!wcsicmp(curEntry->szVerb, szVerb)) + { + /* entry already exists */ + return; + } + lastEntry = curEntry; + curEntry = curEntry->Next; + } + + TRACE("adding verb %s szClass %s\n", debugstr_w(szVerb), debugstr_w(szClass)); + + curEntry = HeapAlloc(GetProcessHeap(), 0, sizeof(StaticShellEntry)); + if (curEntry) + { + curEntry->Next = NULL; + curEntry->szVerb = HeapAlloc(GetProcessHeap(), 0, (wcslen(szVerb)+1) * sizeof(WCHAR)); + if (curEntry->szVerb) + wcscpy(curEntry->szVerb, szVerb); + curEntry->szClass = HeapAlloc(GetProcessHeap(), 0, (wcslen(szClass)+1) * sizeof(WCHAR)); + if (curEntry->szClass) + wcscpy(curEntry->szClass, szClass); + } + + if (lastEntry) + { + lastEntry->Next = curEntry; + } + else + { + This->shead = curEntry; + } +} + +static +void +SH_AddStaticEntryForKey(IDefaultContextMenuImpl * This, HKEY hKey, WCHAR * szClass) +{ + LONG result; + DWORD dwIndex; + WCHAR szName[40]; + DWORD dwName; + + dwIndex = 0; + do + { + szName[0] = 0; + dwName = sizeof(szName) / sizeof(WCHAR); + result = RegEnumKeyExW(hKey, dwIndex, szName, &dwName, NULL, NULL, NULL, NULL); + szName[(sizeof(szName)/sizeof(WCHAR))-1] = 0; + if (result == ERROR_SUCCESS) + { + SH_AddStaticEntry(This, szName, szClass); + } + dwIndex++; + }while(result == ERROR_SUCCESS); +} + +static +void +SH_AddStaticEntryForFileClass(IDefaultContextMenuImpl * This, WCHAR * szExt) +{ + WCHAR szBuffer[100]; + HKEY hKey; + LONG result; + DWORD dwBuffer; + UINT Length; + static WCHAR szShell[] = L"\\shell"; + static WCHAR szShellAssoc[] = L"SystemFileAssociations\\"; + + TRACE("SH_AddStaticEntryForFileClass entered with %s\n", debugstr_w(szExt)); + + Length = wcslen(szExt); + if (Length + (sizeof(szShell)/sizeof(WCHAR)) + 1 < sizeof(szBuffer)/sizeof(WCHAR)) + { + wcscpy(szBuffer, szExt); + wcscpy(&szBuffer[Length], szShell); + result = RegOpenKeyExW(HKEY_CLASSES_ROOT, szBuffer, 0, KEY_READ | KEY_QUERY_VALUE, &hKey); + if (result == ERROR_SUCCESS) + { + szBuffer[Length] = 0; + SH_AddStaticEntryForKey(This, hKey, szExt); + RegCloseKey(hKey); + } + } + + dwBuffer = sizeof(szBuffer); + result = RegGetValueW(HKEY_CLASSES_ROOT, szExt, NULL, RRF_RT_REG_SZ, NULL, (LPBYTE)szBuffer, &dwBuffer); + if (result == ERROR_SUCCESS) + { + Length = strlenW(szBuffer); + if (Length + (sizeof(szShell)/sizeof(WCHAR)) + 1 < sizeof(szBuffer)/sizeof(WCHAR)) + { + wcscpy(&szBuffer[Length], szShell); + TRACE("szBuffer %s\n", debugstr_w(szBuffer)); + + result = RegOpenKeyExW(HKEY_CLASSES_ROOT, szBuffer, 0, KEY_READ | KEY_QUERY_VALUE, &hKey); + if (result == ERROR_SUCCESS) + { + szBuffer[Length] = 0; + SH_AddStaticEntryForKey(This, hKey, szBuffer); + RegCloseKey(hKey); + } + } + } + + wcscpy(szBuffer, szShellAssoc); + dwBuffer = sizeof(szBuffer) - sizeof(szShellAssoc) - sizeof(WCHAR); + result = RegGetValueW(HKEY_CLASSES_ROOT, szExt, L"PerceivedType", RRF_RT_REG_SZ, NULL, (LPBYTE)&szBuffer[(sizeof(szShellAssoc)/sizeof(WCHAR))], &dwBuffer); + if (result == ERROR_SUCCESS) + { + Length = strlenW(&szBuffer[(sizeof(szShellAssoc)/sizeof(WCHAR))]) + (sizeof(szShellAssoc)/sizeof(WCHAR)); + wcscat(&szBuffer[(sizeof(szShellAssoc)/sizeof(WCHAR))], szShell); + TRACE("szBuffer %s\n", debugstr_w(szBuffer)); + + result = RegOpenKeyExW(HKEY_CLASSES_ROOT, szBuffer, 0, KEY_READ | KEY_QUERY_VALUE, &hKey); + if (result == ERROR_SUCCESS) + { + szBuffer[Length] = 0; + SH_AddStaticEntryForKey(This, hKey, szBuffer); + RegCloseKey(hKey); + } + } + RegCloseKey(hKey); +} + +static +BOOL +HasClipboardData() +{ + BOOL ret = FALSE; + IDataObject * pda; + + if(SUCCEEDED(OleGetClipboard(&pda))) + { + STGMEDIUM medium; + FORMATETC formatetc; + + TRACE("pda=%p\n", pda); + + /* Set the FORMATETC structure*/ + InitFormatEtc(formatetc, RegisterClipboardFormatA(CFSTR_SHELLIDLIST), TYMED_HGLOBAL); + if(SUCCEEDED(IDataObject_GetData(pda,&formatetc,&medium))) + { + ret = TRUE; + } + + IDataObject_Release(pda); + ReleaseStgMedium(&medium); + } + + return ret; +} + +VOID +DisablePasteOptions(HMENU hMenu) +{ + MENUITEMINFOW mii; + + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_STATE; + mii.fState = MFS_DISABLED; + + TRACE("result %d\n", SetMenuItemInfoW(hMenu, FCIDM_SHVIEW_INSERT, FALSE, &mii)); + TRACE("result %d\n", SetMenuItemInfoW(hMenu, FCIDM_SHVIEW_INSERTLINK, FALSE, &mii)); +} + +BOOL +IsShellExtensionAlreadyLoaded(IDefaultContextMenuImpl * This, const CLSID * szClass) +{ + PDynamicShellEntry curEntry = This->dhead; + + while(curEntry) + { + if (!memcmp(&curEntry->ClassID, szClass, sizeof(CLSID))) + return TRUE; + curEntry = curEntry->Next; + } + return FALSE; +} + + +static +HRESULT +SH_LoadDynamicContextMenuHandler(IDefaultContextMenuImpl * This, HKEY hKey, const CLSID * szClass, BOOL bExternalInit) +{ + HRESULT hr; + IContextMenu * cmobj; + IShellExtInit *shext; + PDynamicShellEntry curEntry; + //WCHAR szTemp[100]; + LPOLESTR pstr; + + StringFromCLSID(szClass, &pstr); + + TRACE("SH_LoadDynamicContextMenuHandler entered with This %p hKey %p szClass %s bExternalInit %u\n",This, hKey, wine_dbgstr_guid(szClass), bExternalInit); + //swprintf(szTemp, L"This %p hKey %p szClass %s bExternalInit %u", This, hKey, pstr, bExternalInit); + //MessageBoxW(NULL, szTemp, NULL, MB_OK); + + if (IsShellExtensionAlreadyLoaded(This, szClass)) + return S_OK; + + hr = SHCoCreateInstance(NULL, szClass, NULL, &IID_IContextMenu, (void**)&cmobj); + if (hr != S_OK) + { + TRACE("SHCoCreateInstance failed %x\n", GetLastError()); + return hr; + } + + if (bExternalInit) + { + hr = IContextMenu_QueryInterface(cmobj, &IID_IShellExtInit, (void**)&shext); + if (hr != S_OK) + { + TRACE("Failed to query for interface IID_IShellExtInit\n"); + IContextMenu_Release(cmobj); + return FALSE; + } + hr = IShellExtInit_Initialize(shext, NULL, This->pDataObj, hKey); + IShellExtInit_Release(shext); + if (hr != S_OK) + { + TRACE("Failed to initialize shell extension error %x\n", hr); + IContextMenu_Release(cmobj); + return hr; + } + } + + curEntry = HeapAlloc(GetProcessHeap(), 0, sizeof(DynamicShellEntry)); + if(!curEntry) + { + IContextMenu_Release(cmobj); + return E_OUTOFMEMORY; + } + + curEntry->iIdCmdFirst = 0; + curEntry->Next = NULL; + curEntry->NumIds = 0; + curEntry->CMenu = cmobj; + memcpy(&curEntry->ClassID, szClass, sizeof(CLSID)); + + if (This->dhead) + { + PDynamicShellEntry pEntry = This->dhead; + + while(pEntry->Next) + { + pEntry = pEntry->Next; + } + + pEntry->Next = curEntry; + } + else + { + This->dhead = curEntry; + } + + + if (!memcmp(szClass, &CLSID_NewMenu, sizeof(CLSID))) + { + /* A REAL UGLY HACK */ + INewItem_SetCurrentShellFolder(This->dcm.psf); + } + + + return hr; +} + +static +UINT +EnumerateDynamicContextHandlerForKey(IDefaultContextMenuImpl *This, HKEY hRootKey) +{ + WCHAR szKey[MAX_PATH] = {0}; + WCHAR szName[MAX_PATH] = {0}; + DWORD dwIndex, dwName; + LONG res; + HRESULT hResult; + UINT index; + CLSID clsid; + HKEY hKey; + + static const WCHAR szShellEx[] = { 's','h','e','l','l','e','x','\\','C','o','n','t','e','x','t','M','e','n','u','H','a','n','d','l','e','r','s',0 }; + + if (RegOpenKeyExW(hRootKey, szShellEx, 0, KEY_READ, &hKey) != ERROR_SUCCESS) + { + TRACE("RegOpenKeyExW failed for key %s\n", debugstr_w(szKey)); + return 0; + } + + dwIndex = 0; + index = 0; + do + { + dwName = MAX_PATH; + res = RegEnumKeyExW(hKey, dwIndex, szName, &dwName, NULL, NULL, NULL, NULL); + if (res == ERROR_SUCCESS) + { + hResult = CLSIDFromString(szName, &clsid); + if (hResult != S_OK) + { + dwName = MAX_PATH; + if (RegGetValueW(hKey, szName, NULL, RRF_RT_REG_SZ, NULL, szKey, &dwName) == ERROR_SUCCESS) + { + hResult = CLSIDFromString(szKey, &clsid); + } + } + if (SUCCEEDED(hResult)) + { + if (This->bGroupPolicyActive) + { + if (RegGetValueW(HKEY_LOCAL_MACHINE, + L"Software\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved", + szKey, + RRF_RT_REG_SZ, + NULL, + NULL, + &dwName) == ERROR_SUCCESS) + { + SH_LoadDynamicContextMenuHandler(This, hKey, &clsid, TRUE); + } + } + else + { + SH_LoadDynamicContextMenuHandler(This, hKey, &clsid, TRUE); + } + } + } + dwIndex++; + }while(res == ERROR_SUCCESS); + + RegCloseKey(hKey); + return index; +} + + +static +UINT +InsertMenuItemsOfDynamicContextMenuExtension(IDefaultContextMenuImpl * This, HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast) +{ + PDynamicShellEntry curEntry; + HRESULT hResult; + + if (!This->dhead) + { + This->iIdSHEFirst = 0; + This->iIdSHELast = 0; + return indexMenu; + } + + curEntry = This->dhead; + idCmdFirst = 0x5000; + idCmdLast = 0x6000; + This->iIdSHEFirst = idCmdFirst; + do + { + hResult = IContextMenu_QueryContextMenu(curEntry->CMenu, hMenu, indexMenu++, idCmdFirst, idCmdLast, CMF_NORMAL); + if (SUCCEEDED(hResult)) + { + curEntry->iIdCmdFirst = idCmdFirst; + curEntry->NumIds = LOWORD(hResult); + indexMenu += curEntry->NumIds; + idCmdFirst += curEntry->NumIds + 0x10; + } + TRACE("curEntry %p hresult %x contextmenu %p cmdfirst %x num ids %x\n", curEntry, hResult, curEntry->CMenu, curEntry->iIdCmdFirst, curEntry->NumIds); + curEntry = curEntry->Next; + }while(curEntry); + + This->iIdSHELast = idCmdFirst; + TRACE("SH_LoadContextMenuHandlers first %x last %x\n", This->iIdSHEFirst, This->iIdSHELast); + return indexMenu; +} + +UINT +BuildBackgroundContextMenu( + IDefaultContextMenuImpl * This, + HMENU hMenu, + UINT iIdCmdFirst, + UINT iIdCmdLast, + UINT uFlags) +{ + MENUITEMINFOW mii; + WCHAR szBuffer[MAX_PATH]; + UINT indexMenu = 0; + HMENU hSubMenu; + HKEY hKey; + + ZeroMemory(&mii, sizeof(mii)); + + TRACE("BuildBackgroundContextMenu entered\n"); + + if (!_ILIsDesktop(This->dcm.pidlFolder)) + { + /* view option is only available in browsing mode */ + hSubMenu = LoadMenuA(shell32_hInstance, "MENU_001"); + if (hSubMenu) + { + szBuffer[0] = 0; + LoadStringW(shell32_hInstance, FCIDM_SHVIEW_VIEW, szBuffer, MAX_PATH); + szBuffer[MAX_PATH-1] = 0; + + TRACE("szBuffer %s\n", debugstr_w(szBuffer)); + + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_TYPE | MIIM_STATE | MIIM_SUBMENU | MIIM_ID; + mii.fType = MFT_STRING; + mii.wID = iIdCmdFirst++; + mii.dwTypeData = szBuffer; + mii.cch = strlenW( mii.dwTypeData ); + mii.fState = MFS_ENABLED; + mii.hSubMenu = hSubMenu; + InsertMenuItemW(hMenu, indexMenu++, TRUE, &mii); + DestroyMenu(hSubMenu); + } + } + hSubMenu = LoadMenuW(shell32_hInstance, L"MENU_002"); + if (hSubMenu) + { + /* merge general background context menu in */ + iIdCmdFirst = Shell_MergeMenus(hMenu, GetSubMenu(hSubMenu, 0), indexMenu, 0, 0xFFFF, MM_DONTREMOVESEPS | MM_SUBMENUSHAVEIDS) + 1; + DestroyMenu(hSubMenu); + } + + if (!HasClipboardData()) + { + TRACE("disabling paste options\n"); + DisablePasteOptions(hMenu); + } + /* load extensions from HKCR\* key */ + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, + L"*", + 0, + KEY_READ, + &hKey) == ERROR_SUCCESS) + { + EnumerateDynamicContextHandlerForKey(This, hKey); + RegCloseKey(hKey); + } + + /* load create new shell extension */ + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, + L"CLSID\\{D969A300-E7FF-11d0-A93B-00A0C90F2719}", + 0, + KEY_READ, + &hKey) == ERROR_SUCCESS) + { + SH_LoadDynamicContextMenuHandler(This, hKey, &CLSID_NewMenu, TRUE); + RegCloseKey(hKey); + } + + if (InsertMenuItemsOfDynamicContextMenuExtension(This, hMenu, GetMenuItemCount(hMenu)-1, iIdCmdFirst, iIdCmdLast)) + { + /* seperate dynamic context menu items */ + _InsertMenuItemW(hMenu, GetMenuItemCount(hMenu)-1, TRUE, -1, MFT_SEPARATOR, NULL, MFS_ENABLED); + } + + return iIdCmdLast; +} + +static +UINT +AddStaticContextMenusToMenu( + HMENU hMenu, + UINT indexMenu, + IDefaultContextMenuImpl * This) +{ + MENUITEMINFOW mii; + UINT idResource; + PStaticShellEntry curEntry; + WCHAR szVerb[40]; + WCHAR szTemp[50]; + DWORD dwSize; + UINT fState; + UINT Length; + + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE | MIIM_DATA; + mii.fType = MFT_STRING; + mii.fState = MFS_ENABLED | MFS_DEFAULT; + mii.wID = 0x4000; + This->iIdSCMFirst = mii.wID; + + curEntry = This->shead; + + while(curEntry) + { + fState = MFS_ENABLED; + if (!wcsicmp(curEntry->szVerb, L"open")) + { + fState |= MFS_DEFAULT; + idResource = IDS_OPEN_VERB; + } + else if (!wcsicmp(curEntry->szVerb, L"runas")) + idResource = IDS_RUNAS_VERB; + else if (!wcsicmp(curEntry->szVerb, L"edit")) + idResource = IDS_EDIT_VERB; + else if (!wcsicmp(curEntry->szVerb, L"find")) + idResource = IDS_FIND_VERB; + else if (!wcsicmp(curEntry->szVerb, L"print")) + idResource = IDS_PRINT_VERB; + else if (!wcsicmp(curEntry->szVerb, L"play")) + idResource = IDS_PLAY_VERB; + else if (!wcsicmp(curEntry->szVerb, L"preview")) + idResource = IDS_PREVIEW_VERB; + else + idResource = 0; + + if (idResource > 0) + { + if (LoadStringW(shell32_hInstance, idResource, szVerb, sizeof(szVerb)/sizeof(WCHAR))) + { + /* use translated verb */ + szVerb[(sizeof(szVerb)/sizeof(WCHAR))-1] = L'\0'; + mii.dwTypeData = szVerb; + } + } + else + { + Length = wcslen(curEntry->szClass) + wcslen(curEntry->szVerb) + 8; + if (Length < sizeof(szTemp)/sizeof(WCHAR)) + { + wcscpy(szTemp, curEntry->szClass); + wcscat(szTemp, L"\\shell\\"); + wcscat(szTemp, curEntry->szVerb); + dwSize = sizeof(szVerb); + + if (RegGetValueW(HKEY_CLASSES_ROOT, szTemp, NULL, RRF_RT_REG_SZ, NULL, szVerb, &dwSize) == ERROR_SUCCESS) + { + /* use description for the menu entry */ + mii.dwTypeData = szVerb; + } + else + { + /* use verb for the menu entry */ + mii.dwTypeData = curEntry->szVerb; + } + } + + } + + mii.cch = strlenW(mii.dwTypeData); + InsertMenuItemW(hMenu, indexMenu++, TRUE, &mii); + mii.fState = fState; + mii.wID++; + curEntry = curEntry->Next; + } + This->iIdSCMLast = mii.wID - 1; + return indexMenu; +} + +void WINAPI _InsertMenuItemW ( + HMENU hmenu, + UINT indexMenu, + BOOL fByPosition, + UINT wID, + UINT fType, + LPCWSTR dwTypeData, + UINT fState) +{ + MENUITEMINFOW mii; + WCHAR szText[100]; + + ZeroMemory(&mii, sizeof(mii)); + mii.cbSize = sizeof(mii); + if (fType == MFT_SEPARATOR) + { + mii.fMask = MIIM_ID | MIIM_TYPE; + } + else if (fType == MFT_STRING) + { + mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE; + if ((ULONG_PTR)HIWORD((ULONG_PTR)dwTypeData) == 0) + { + if (LoadStringW(shell32_hInstance, LOWORD((ULONG_PTR)dwTypeData), szText, sizeof(szText)/sizeof(WCHAR))) + { + szText[(sizeof(szText)/sizeof(WCHAR))-1] = 0; + mii.dwTypeData = szText; + } + else + { + TRACE("failed to load string %p\n", dwTypeData); + return; + } + } + else + { + mii.dwTypeData = (LPWSTR) dwTypeData; + } + mii.fState = fState; + } + + mii.wID = wID; + mii.fType = fType; + InsertMenuItemW( hmenu, indexMenu, fByPosition, &mii); +} + +UINT +BuildShellItemContextMenu( + IDefaultContextMenuImpl * This, + HMENU hMenu, + UINT iIdCmdFirst, + UINT iIdCmdLast, + UINT uFlags) +{ + WCHAR szPath[MAX_PATH]; + WCHAR szTemp[40]; + HKEY hKey; + UINT indexMenu; + SFGAOF rfg; + HRESULT hr; + BOOL bAddSep; + GUID * guid; + BOOL bClipboardData; + STRRET strFile; + LPWSTR pOffset; + DWORD dwSize; + + TRACE("BuildShellItemContextMenu entered\n"); + + if (IShellFolder2_GetDisplayNameOf(This->dcm.psf, This->dcm.apidl[0], SHGDN_FORPARSING, &strFile) == S_OK) + { + if (StrRetToBufW(&strFile, This->dcm.apidl[0], szPath, MAX_PATH) == S_OK) + { + pOffset = wcsrchr(szPath, L'.'); + if (pOffset) + { + /* enumerate dynamic/static for a given file class */ + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, pOffset, 0, KEY_READ, &hKey) == ERROR_SUCCESS) + { + /* add static verbs */ + SH_AddStaticEntryForFileClass(This, pOffset); + /* load dynamic extensions from file extension key */ + EnumerateDynamicContextHandlerForKey(This, hKey); + RegCloseKey(hKey); + } + dwSize = sizeof(szTemp); + if (RegGetValueW(HKEY_CLASSES_ROOT, pOffset, NULL, RRF_RT_REG_SZ, NULL, szTemp, &dwSize) == ERROR_SUCCESS) + { + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, szTemp, 0, KEY_READ, &hKey) == ERROR_SUCCESS) + { + /* add static verbs from progid key */ + SH_AddStaticEntryForFileClass(This, szTemp); + /* load dynamic extensions from progid key */ + EnumerateDynamicContextHandlerForKey(This, hKey); + RegCloseKey(hKey); + } + } + } + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, L"*", 0, KEY_READ, &hKey) == ERROR_SUCCESS) + { + /* load default extensions */ + EnumerateDynamicContextHandlerForKey(This, hKey); + RegCloseKey(hKey); + } + } + } + + guid = _ILGetGUIDPointer(This->dcm.apidl[0]); + if (guid) + { + LPOLESTR pwszCLSID; + WCHAR buffer[60]; + + wcscpy(buffer, L"CLSID\\"); + hr = StringFromCLSID(guid, &pwszCLSID); + if (hr == S_OK) + { + wcscpy(&buffer[6], pwszCLSID); + TRACE("buffer %s\n", debugstr_w(buffer)); + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, buffer, 0, KEY_READ, &hKey) == ERROR_SUCCESS) + { + EnumerateDynamicContextHandlerForKey(This, hKey); + SH_AddStaticEntryForFileClass(This, buffer); + RegCloseKey(hKey); + } + CoTaskMemFree(pwszCLSID); + } + } + + + if (_ILIsDrive(This->dcm.apidl[0])) + { + SH_AddStaticEntryForFileClass(This, L"Drive"); + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, L"Drive", 0, KEY_READ, &hKey) == ERROR_SUCCESS) + { + EnumerateDynamicContextHandlerForKey(This, hKey); + RegCloseKey(hKey); + } + + } + + /* add static actions */ + rfg = SFGAO_BROWSABLE | SFGAO_CANCOPY | SFGAO_CANLINK | SFGAO_CANMOVE | SFGAO_CANDELETE | SFGAO_CANRENAME | SFGAO_HASPROPSHEET | SFGAO_FILESYSTEM | SFGAO_FOLDER; + hr = IShellFolder_GetAttributesOf(This->dcm.psf, This->dcm.cidl, This->dcm.apidl, &rfg); + if (!SUCCEEDED(hr)) + rfg = 0; + + if (rfg & SFGAO_FOLDER) + { + /* add the default verbs open / explore */ + SH_AddStaticEntryForFileClass(This, L"Folder"); + SH_AddStaticEntryForFileClass(This, L"Directory"); + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, L"Folder", 0, KEY_READ, &hKey) == ERROR_SUCCESS) + { + EnumerateDynamicContextHandlerForKey(This, hKey); + RegCloseKey(hKey); + } + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, L"Directory", 0, KEY_READ, &hKey) == ERROR_SUCCESS) + { + EnumerateDynamicContextHandlerForKey(This, hKey); + RegCloseKey(hKey); + } + } + + + if (rfg & SFGAO_FILESYSTEM) + { + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, L"AllFilesystemObjects", 0, KEY_READ, &hKey) == ERROR_SUCCESS) + { + /* sendto service is registered here */ + EnumerateDynamicContextHandlerForKey(This, hKey); + RegCloseKey(hKey); + } + } + + /* add static context menu handlers */ + indexMenu = AddStaticContextMenusToMenu(hMenu, 0, This); + /* now process dynamic context menu handlers */ + indexMenu = InsertMenuItemsOfDynamicContextMenuExtension(This, hMenu, indexMenu, iIdCmdFirst, iIdCmdLast); + TRACE("indexMenu %d\n", indexMenu); + + if (_ILIsDrive(This->dcm.apidl[0])) + { + /* The 'Format' option must be always available, + * thus it is not registered as a static shell extension + */ + _InsertMenuItemW(hMenu, indexMenu++, TRUE, 0, MFT_SEPARATOR, NULL, 0); + _InsertMenuItemW(hMenu, indexMenu++, TRUE, 0x7ABC, MFT_STRING, MAKEINTRESOURCEW(IDS_FORMATDRIVE), MFS_ENABLED); + bAddSep = TRUE; + } + + bClipboardData = (HasClipboardData() && (rfg & SFGAO_FILESYSTEM)); + if (rfg & (SFGAO_CANCOPY | SFGAO_CANMOVE) || bClipboardData) + { + _InsertMenuItemW(hMenu, indexMenu++, TRUE, 0, MFT_SEPARATOR, NULL, 0); + if (rfg & SFGAO_CANMOVE) + _InsertMenuItemW(hMenu, indexMenu++, TRUE, FCIDM_SHVIEW_CUT, MFT_STRING, MAKEINTRESOURCEW(IDS_CUT), MFS_ENABLED); + if (rfg & SFGAO_CANCOPY) + _InsertMenuItemW(hMenu, indexMenu++, TRUE, FCIDM_SHVIEW_COPY, MFT_STRING, MAKEINTRESOURCEW(IDS_COPY), MFS_ENABLED); + if (bClipboardData) + _InsertMenuItemW(hMenu, indexMenu++, TRUE, FCIDM_SHVIEW_INSERT, MFT_STRING, MAKEINTRESOURCEW(IDS_INSERT), MFS_ENABLED); + + bAddSep = TRUE; + } + + + if (rfg & SFGAO_CANLINK) + { + bAddSep = FALSE; + _InsertMenuItemW(hMenu, indexMenu++, TRUE, 0, MFT_SEPARATOR, NULL, 0); + _InsertMenuItemW(hMenu, indexMenu++, TRUE, FCIDM_SHVIEW_CREATELINK, MFT_STRING, MAKEINTRESOURCEW(IDS_CREATELINK), MFS_ENABLED); + } + + + if (rfg & SFGAO_CANDELETE) + { + if (bAddSep) + { + bAddSep = FALSE; + _InsertMenuItemW(hMenu, indexMenu++, TRUE, 0, MFT_SEPARATOR, NULL, 0); + } + _InsertMenuItemW(hMenu, indexMenu++, TRUE, FCIDM_SHVIEW_DELETE, MFT_STRING, MAKEINTRESOURCEW(IDS_DELETE), MFS_ENABLED); + } + + if (rfg & SFGAO_CANRENAME) + { + if (bAddSep) + { + _InsertMenuItemW(hMenu, indexMenu++, TRUE, 0, MFT_SEPARATOR, NULL, 0); + } + _InsertMenuItemW(hMenu, indexMenu++, TRUE, FCIDM_SHVIEW_RENAME, MFT_STRING, MAKEINTRESOURCEW(IDS_RENAME), MFS_ENABLED); + bAddSep = TRUE; + } + + if (rfg & SFGAO_HASPROPSHEET) + { + _InsertMenuItemW(hMenu, indexMenu++, TRUE, 0, MFT_SEPARATOR, NULL, 0); + _InsertMenuItemW(hMenu, indexMenu++, TRUE, FCIDM_SHVIEW_PROPERTIES, MFT_STRING, MAKEINTRESOURCEW(IDS_PROPERTIES), MFS_ENABLED); + } + + return iIdCmdLast; +} + +static +HRESULT +WINAPI +IDefaultContextMenu_fnQueryContextMenu( + IContextMenu2 *iface, + HMENU hmenu, + UINT indexMenu, + UINT idCmdFirst, + UINT idCmdLast, + UINT uFlags) +{ + IDefaultContextMenuImpl * This = impl_from_IContextMenu(iface); + if (This->dcm.cidl) + { + idCmdFirst = BuildShellItemContextMenu(This, hmenu, idCmdFirst, idCmdLast, uFlags); + } + else + { + idCmdFirst = BuildBackgroundContextMenu(This, hmenu, idCmdFirst, idCmdLast, uFlags); + } + + return S_OK; +} + +static +HRESULT +NotifyShellViewWindow(LPCMINVOKECOMMANDINFO lpcmi, BOOL bRefresh) +{ + LPSHELLBROWSER lpSB; + LPSHELLVIEW lpSV = NULL; + HWND hwndSV = NULL; + + if((lpSB = (LPSHELLBROWSER)SendMessageA(lpcmi->hwnd, CWM_GETISHELLBROWSER,0,0))) + { + if(SUCCEEDED(IShellBrowser_QueryActiveShellView(lpSB, &lpSV))) + { + IShellView_GetWindow(lpSV, &hwndSV); + } + } + + if (LOWORD(lpcmi->lpVerb) == FCIDM_SHVIEW_REFRESH || bRefresh) + { + if (lpSV) + IShellView_Refresh(lpSV); + + return S_OK; + } + + SendMessageW(hwndSV, WM_COMMAND, MAKEWPARAM(LOWORD(lpcmi->lpVerb), 0), 0); + + return S_OK; +} + +static +HRESULT +DoPaste( + IDefaultContextMenuImpl *This, + LPCMINVOKECOMMANDINFO lpcmi) +{ + IDataObject * pda; + STGMEDIUM medium; + FORMATETC formatetc; + LPITEMIDLIST * apidl; + LPITEMIDLIST pidl; + IShellFolder *psfFrom = NULL, *psfDesktop, *psfTarget = NULL; + LPIDA lpcida; + ISFHelper *psfhlpdst, *psfhlpsrc; + HRESULT hr; + + if (OleGetClipboard(&pda) != S_OK) + return E_FAIL; + + InitFormatEtc(formatetc, RegisterClipboardFormatA(CFSTR_SHELLIDLIST), TYMED_HGLOBAL); + hr = IDataObject_GetData(pda,&formatetc,&medium); + + if (FAILED(hr)) + { + IDataObject_Release(pda); + return E_FAIL; + } + + /* lock the handle */ + lpcida = GlobalLock(medium.u.hGlobal); + if (!lpcida) + { + ReleaseStgMedium(&medium); + IDataObject_Release(pda); + return E_FAIL; + } + + /* convert the data into pidl */ + apidl = _ILCopyCidaToaPidl(&pidl, lpcida); + + if (!apidl) + return E_FAIL; + + if (FAILED(SHGetDesktopFolder(&psfDesktop))) + { + SHFree(pidl); + _ILFreeaPidl(apidl, lpcida->cidl); + ReleaseStgMedium(&medium); + IDataObject_Release(pda); + return E_FAIL; + } + + if (FAILED(IShellFolder_BindToObject(psfDesktop, pidl, NULL, &IID_IShellFolder, (LPVOID*)&psfFrom))) + { + ERR("no IShellFolder\n"); + + IShellFolder_Release(psfDesktop); + SHFree(pidl); + _ILFreeaPidl(apidl, lpcida->cidl); + ReleaseStgMedium(&medium); + IDataObject_Release(pda); + + return E_FAIL; + } + + IShellFolder_Release(psfDesktop); + + if (FAILED(IShellFolder_BindToObject(This->dcm.psf, This->dcm.apidl[0], NULL, &IID_IShellFolder, (LPVOID*)&psfTarget))) + { + ERR("no IShellFolder\n"); + + IShellFolder_Release(psfFrom); + SHFree(pidl); + _ILFreeaPidl(apidl, lpcida->cidl); + ReleaseStgMedium(&medium); + IDataObject_Release(pda); + + return E_FAIL; + } + + + /* get source and destination shellfolder */ + if (FAILED(IShellFolder_QueryInterface(psfTarget, &IID_ISFHelper, (LPVOID*)&psfhlpdst))) + { + ERR("no IID_ISFHelper for destination\n"); + + IShellFolder_Release(psfFrom); + IShellFolder_Release(psfTarget); + SHFree(pidl); + _ILFreeaPidl(apidl, lpcida->cidl); + ReleaseStgMedium(&medium); + IDataObject_Release(pda); + + return E_FAIL; + } + + if (FAILED(IShellFolder_QueryInterface(psfFrom, &IID_ISFHelper, (LPVOID*)&psfhlpsrc))) + { + ERR("no IID_ISFHelper for source\n"); + + ISFHelper_Release(psfhlpdst); + IShellFolder_Release(psfFrom); + IShellFolder_Release(psfTarget); + SHFree(pidl); + _ILFreeaPidl(apidl, lpcida->cidl); + ReleaseStgMedium(&medium); + IDataObject_Release(pda); + return E_FAIL; + } + + /* FIXXME + * do we want to perform a copy or move ??? + */ + hr = ISFHelper_CopyItems(psfhlpdst, psfFrom, lpcida->cidl, (LPCITEMIDLIST*)apidl); + + ISFHelper_Release(psfhlpdst); + ISFHelper_Release(psfhlpsrc); + IShellFolder_Release(psfFrom); + IShellFolder_Release(psfTarget); + SHFree(pidl); + _ILFreeaPidl(apidl, lpcida->cidl); + ReleaseStgMedium(&medium); + IDataObject_Release(pda); + return S_OK; +} + +static +HRESULT +DoOpenOrExplore( + IDefaultContextMenuImpl *iface, + LPCMINVOKECOMMANDINFO lpcmi) +{ + + + return E_FAIL; +} + +BOOL +GetUniqueFileName(LPWSTR szBasePath, LPWSTR szExt, LPWSTR szTarget, BOOL bShortcut) +{ + UINT RetryCount = 0, Length; + WCHAR szLnk[40]; + HANDLE hFile; + + if (!bShortcut) + { + Length = LoadStringW(shell32_hInstance, IDS_LNK_FILE, szLnk, sizeof(szLnk)/sizeof(WCHAR)); + } + + do + { + if (!bShortcut) + { + if (RetryCount) + swprintf(szTarget, L"%s%s(%u).%s", szLnk, szBasePath, RetryCount, szExt); + else + swprintf(szTarget, L"%s%s.%s", szLnk, szBasePath, szExt); + } + else + { + if (RetryCount) + swprintf(szTarget, L"%s(%u).%s", szBasePath, RetryCount, szExt); + else + swprintf(szTarget, L"%s.%s", szBasePath, szExt); + } + + hFile = CreateFileW(szTarget, GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL); + if (hFile != INVALID_HANDLE_VALUE) + { + CloseHandle(hFile); + return TRUE; + } + + }while(RetryCount++ < 100); + + return FALSE; + +} + +static +HRESULT +DoCreateLink( + IDefaultContextMenuImpl *This, + LPCMINVOKECOMMANDINFO lpcmi) +{ + WCHAR szPath[MAX_PATH]; + WCHAR szTarget[MAX_PATH] = {0}; + STRRET strFile; + LPWSTR pszExt; + HRESULT hr; + IShellLinkW * nLink; + IPersistFile * ipf; + static WCHAR szLnk[] = L"lnk"; + + if (IShellFolder2_GetDisplayNameOf(This->dcm.psf, This->dcm.apidl[0], SHGDN_FORPARSING, &strFile) != S_OK) + { + ERR("IShellFolder_GetDisplayNameOf failed for apidl\n"); + return E_FAIL; + } + + if (StrRetToBufW(&strFile, This->dcm.apidl[0], szPath, MAX_PATH) != S_OK) + return E_FAIL; + + + pszExt = wcsrchr(szPath, L'.'); + pszExt[0] = 0; + + if (!wcsicmp(pszExt + 1, szLnk)) + { + if (!GetUniqueFileName(szPath, pszExt + 1, szTarget, TRUE)) + return E_FAIL; + + hr = IShellLink_ConstructFromFile(NULL, &IID_IPersistFile, This->dcm.apidl[0], (LPVOID*)&ipf); + if (hr != S_OK) + { + return hr; + } + hr = IPersistFile_Save(ipf, szTarget, FALSE); + IPersistFile_Release(ipf); + NotifyShellViewWindow(lpcmi, TRUE); + return hr; + } + else + { + if (!GetUniqueFileName(szPath, szLnk, szTarget, TRUE)) + return E_FAIL; + + hr = IShellLink_Constructor(NULL, &IID_IShellLinkW, (LPVOID*)&nLink); + if (hr != S_OK) + { + return E_FAIL; + } + pszExt[0] = '.'; + if (SUCCEEDED(IShellLinkW_SetPath(nLink, szPath))) + { + if (SUCCEEDED(IShellLinkW_QueryInterface(nLink, &IID_IPersistFile, (LPVOID*)&ipf))) + { + hr = IPersistFile_Save(ipf, szTarget, TRUE); + IPersistFile_Release(ipf); + } + } + IShellLinkW_Release(nLink); + NotifyShellViewWindow(lpcmi, TRUE); + return hr; + } +} + +static +HRESULT +DoDelete( + IDefaultContextMenuImpl *This, + LPCMINVOKECOMMANDINFO lpcmi) +{ + HRESULT hr; + STRRET strTemp; + WCHAR szPath[MAX_PATH]; + SHFILEOPSTRUCTW op; + int ret; + LPSHELLBROWSER lpSB; + HWND hwnd; + + + hr = IShellFolder2_GetDisplayNameOf(This->dcm.psf, This->dcm.apidl[0], SHGDN_FORPARSING, &strTemp); + if(hr != S_OK) + { + ERR("IShellFolder_GetDisplayNameOf failed with %x\n", hr); + return hr; + } + ZeroMemory(szPath, sizeof(szPath)); + hr = StrRetToBufW(&strTemp, This->dcm.apidl[0], szPath, MAX_PATH); + if (hr != S_OK) + { + ERR("StrRetToBufW failed with %x\n", hr); + return hr; + } + /* FIXME + * implement deletion with multiple files + */ + + ZeroMemory(&op, sizeof(op)); + op.hwnd = GetActiveWindow(); + op.wFunc = FO_DELETE; + op.pFrom = szPath; + op.fFlags = FOF_ALLOWUNDO; + ret = SHFileOperationW(&op); + + if (ret) + { + TRACE("SHFileOperation failed with %0x%x", GetLastError()); + return S_OK; + } + + /* get the active IShellView */ + if ((lpSB = (LPSHELLBROWSER)SendMessageA(lpcmi->hwnd, CWM_GETISHELLBROWSER,0,0))) + { + /* is the treeview focused */ + if (SUCCEEDED(IShellBrowser_GetControlWindow(lpSB, FCW_TREE, &hwnd))) + { + HTREEITEM hItem = TreeView_GetSelection(hwnd); + if (hItem) + { + (void)TreeView_DeleteItem(hwnd, hItem); + } + return S_OK; + } + } + NotifyShellViewWindow(lpcmi, TRUE); + + return S_OK; + +} + +static +HRESULT +DoCopyOrCut( + IDefaultContextMenuImpl *iface, + LPCMINVOKECOMMANDINFO lpcmi, + BOOL bCopy) +{ + LPSHELLBROWSER lpSB; + LPSHELLVIEW lpSV; + LPDATAOBJECT lpDo; + HRESULT hr; + + lpSB = (LPSHELLBROWSER)SendMessageA(lpcmi->hwnd, CWM_GETISHELLBROWSER,0,0); + if (!lpSB) + { + TRACE("failed to get shellbrowser\n"); + return E_FAIL; + } + + hr = IShellBrowser_QueryActiveShellView(lpSB, &lpSV); + if (FAILED(hr)) + { + TRACE("failed to query the active shellview\n"); + return hr; + } + + hr = IShellView_GetItemObject(lpSV, SVGIO_SELECTION, &IID_IDataObject, (LPVOID*)&lpDo); + if (FAILED(hr)) + { + TRACE("failed to get item object\n"); + return hr; + } + + hr = OleSetClipboard(lpDo); + if (FAILED(hr)) + { + WARN("OleSetClipboard failed"); + } + IDataObject_Release(lpDo); + IShellView_Release(lpSV); + return S_OK; +} + +static +HRESULT +DoRename( + IDefaultContextMenuImpl *This, + LPCMINVOKECOMMANDINFO lpcmi) +{ + LPSHELLBROWSER lpSB; + LPSHELLVIEW lpSV; + HWND hwnd; + + /* get the active IShellView */ + if ((lpSB = (LPSHELLBROWSER)SendMessageA(lpcmi->hwnd, CWM_GETISHELLBROWSER,0,0))) + { + /* is the treeview focused */ + if (SUCCEEDED(IShellBrowser_GetControlWindow(lpSB, FCW_TREE, &hwnd))) + { + HTREEITEM hItem = TreeView_GetSelection(hwnd); + if (hItem) + { + (void)TreeView_EditLabel(hwnd, hItem); + } + } + + if(SUCCEEDED(IShellBrowser_QueryActiveShellView(lpSB, &lpSV))) + { + IShellView_SelectItem(lpSV, This->dcm.apidl[0], + SVSI_DESELECTOTHERS|SVSI_EDIT|SVSI_ENSUREVISIBLE|SVSI_FOCUSED|SVSI_SELECT); + IShellView_Release(lpSV); + return S_OK; + } + } + return E_FAIL; +} + +static +HRESULT +DoProperties( + IDefaultContextMenuImpl *This, + LPCMINVOKECOMMANDINFO lpcmi) +{ + WCHAR szDrive[MAX_PATH]; + STRRET strFile; + + if (_ILIsMyComputer(This->dcm.apidl[0])) + { + ShellExecuteW(lpcmi->hwnd, L"open", L"rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl", NULL, NULL, SW_SHOWNORMAL); + return S_OK; + } + else if (_ILIsDesktop(This->dcm.apidl[0])) + { + ShellExecuteW(lpcmi->hwnd, L"open", L"rundll32.exe shell32.dll,Control_RunDLL desk.cpl", NULL, NULL, SW_SHOWNORMAL); + return S_OK; + } + else if (_ILIsDrive(This->dcm.apidl[0])) + { + ILGetDisplayName(This->dcm.apidl[0], szDrive); + SH_ShowDriveProperties(szDrive, This->dcm.pidlFolder, This->dcm.apidl); + return S_OK; + } + else if (_ILIsNetHood(This->dcm.apidl[0])) + { + /* FIXME + * implement nethood properties + */ + FIXME("implement network connection shell folder\n"); + return S_OK; + } + else if (_ILIsBitBucket(This->dcm.apidl[0])) + { + /* FIXME + * detect the drive path of bitbucket if appropiate + */ + + SH_ShowRecycleBinProperties(L'C'); + return S_OK; + } + + if (This->dcm.cidl > 1) + WARN("SHMultiFileProperties is not yet implemented\n"); + + if (IShellFolder2_GetDisplayNameOf(This->dcm.psf, This->dcm.apidl[0], SHGDN_FORPARSING, &strFile) != S_OK) + { + ERR("IShellFolder_GetDisplayNameOf failed for apidl\n"); + return E_FAIL; + } + + if (StrRetToBufW(&strFile, This->dcm.apidl[0], szDrive, MAX_PATH) != S_OK) + return E_FAIL; + + return SH_ShowPropertiesDialog(szDrive, This->dcm.pidlFolder, This->dcm.apidl); +} + +static +HRESULT +DoFormat( + IDefaultContextMenuImpl *This, + LPCMINVOKECOMMANDINFO lpcmi) +{ + char sDrive[5] = {0}; + + if (!_ILGetDrive(This->dcm.apidl[0], sDrive, sizeof(sDrive))) + { + ERR("pidl is not a drive\n"); + return E_FAIL; + } + + SHFormatDrive(lpcmi->hwnd, sDrive[0] - 'A', SHFMT_ID_DEFAULT, 0); + return S_OK; +} + +static +HRESULT +DoDynamicShellExtensions( + IDefaultContextMenuImpl *This, + LPCMINVOKECOMMANDINFO lpcmi) +{ + UINT verb = LOWORD(lpcmi->lpVerb); + PDynamicShellEntry pCurrent = This->dhead; + + TRACE("verb %p first %x last %x", lpcmi->lpVerb, This->iIdSHEFirst, This->iIdSHELast); + + while(pCurrent && verb > pCurrent->iIdCmdFirst + pCurrent->NumIds) + pCurrent = pCurrent->Next; + + if (!pCurrent) + return E_FAIL; + + if (verb >= pCurrent->iIdCmdFirst && verb <= pCurrent->iIdCmdFirst + pCurrent->NumIds) + { + /* invoke the dynamic context menu */ + lpcmi->lpVerb = MAKEINTRESOURCE(verb - pCurrent->iIdCmdFirst); + return IContextMenu_InvokeCommand(pCurrent->CMenu, lpcmi); + } + + return E_FAIL; +} + + +static +HRESULT +DoStaticShellExtensions( + IDefaultContextMenuImpl *This, + LPCMINVOKECOMMANDINFO lpcmi) +{ + SHELLEXECUTEINFOW sei; + PStaticShellEntry pCurrent = This->shead; + int verb = LOWORD(lpcmi->lpVerb) - This->iIdSCMFirst; + + + while(pCurrent && verb-- > 0) + pCurrent = pCurrent->Next; + + if (verb > 0) + return E_FAIL; + + + ZeroMemory(&sei, sizeof(sei)); + sei.cbSize = sizeof(sei); + sei.fMask = SEE_MASK_CLASSNAME | SEE_MASK_IDLIST; + sei.lpClass = pCurrent->szClass; + sei.hwnd = lpcmi->hwnd; + sei.nShow = SW_SHOWNORMAL; + sei.lpVerb = pCurrent->szVerb; + sei.lpIDList = ILCombine(This->dcm.pidlFolder, This->dcm.apidl[0]); + ShellExecuteExW(&sei); + SHFree(sei.lpIDList); + return S_OK; + +} + +static +HRESULT +WINAPI +IDefaultContextMenu_fnInvokeCommand( + IContextMenu2 *iface, + LPCMINVOKECOMMANDINFO lpcmi) +{ + IDefaultContextMenuImpl * This = impl_from_IContextMenu(iface); + + switch(LOWORD(lpcmi->lpVerb)) + { + case FCIDM_SHVIEW_BIGICON: + case FCIDM_SHVIEW_SMALLICON: + case FCIDM_SHVIEW_LISTVIEW: + case FCIDM_SHVIEW_REPORTVIEW: + case 0x30: /* FIX IDS in resource files */ + case 0x31: + case 0x32: + case 0x33: + case FCIDM_SHVIEW_AUTOARRANGE: + case FCIDM_SHVIEW_SNAPTOGRID: + case FCIDM_SHVIEW_REFRESH: + return NotifyShellViewWindow(lpcmi, FALSE); + case FCIDM_SHVIEW_INSERT: + case FCIDM_SHVIEW_INSERTLINK: + return DoPaste(This, lpcmi); + case FCIDM_SHVIEW_OPEN: + case FCIDM_SHVIEW_EXPLORE: + return DoOpenOrExplore(This, lpcmi); + case FCIDM_SHVIEW_COPY: + case FCIDM_SHVIEW_CUT: + return DoCopyOrCut(This, lpcmi, LOWORD(lpcmi->lpVerb) == FCIDM_SHVIEW_COPY); + case FCIDM_SHVIEW_CREATELINK: + return DoCreateLink(This, lpcmi); + case FCIDM_SHVIEW_DELETE: + return DoDelete(This, lpcmi); + case FCIDM_SHVIEW_RENAME: + return DoRename(This, lpcmi); + case FCIDM_SHVIEW_PROPERTIES: + return DoProperties(This, lpcmi); + case 0x7ABC: + return DoFormat(This, lpcmi); + } + + if (This->iIdSHEFirst && This->iIdSHELast) + { + if (LOWORD(lpcmi->lpVerb) >= This->iIdSHEFirst && LOWORD(lpcmi->lpVerb) <= This->iIdSHELast) + { + return DoDynamicShellExtensions(This, lpcmi); + } + } + + if (This->iIdSCMFirst && This->iIdSCMLast) + { + if (LOWORD(lpcmi->lpVerb) >= This->iIdSCMFirst && LOWORD(lpcmi->lpVerb) <= This->iIdSCMLast) + { + return DoStaticShellExtensions(This, lpcmi); + } + } + + FIXME("Unhandled Verb %xl\n",LOWORD(lpcmi->lpVerb)); + return E_UNEXPECTED; +} + +static +HRESULT +WINAPI +IDefaultContextMenu_fnGetCommandString( + IContextMenu2 *iface, + UINT_PTR idCommand, + UINT uFlags, + UINT* lpReserved, + LPSTR lpszName, + UINT uMaxNameLen) +{ + + return S_OK; +} + +static +HRESULT +WINAPI +IDefaultContextMenu_fnHandleMenuMsg( + IContextMenu2 *iface, + UINT uMsg, + WPARAM wParam, + LPARAM lParam) +{ + + return S_OK; +} + +static const IContextMenu2Vtbl cmvt = +{ + IDefaultContextMenu_fnQueryInterface, + IDefaultContextMenu_fnAddRef, + IDefaultContextMenu_fnRelease, + IDefaultContextMenu_fnQueryContextMenu, + IDefaultContextMenu_fnInvokeCommand, + IDefaultContextMenu_fnGetCommandString, + IDefaultContextMenu_fnHandleMenuMsg +}; +static +HRESULT +IDefaultContextMenu_Constructor( + const DEFCONTEXTMENU *pdcm, + REFIID riid, + void **ppv) +{ + IDefaultContextMenuImpl * This; + HRESULT hr = E_FAIL; + IDataObject * pDataObj; + + This = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDefaultContextMenuImpl)); + if (This) + { + This->lpVtbl = &cmvt; + This->ref = 1; + TRACE("cidl %u\n", This->dcm.cidl); + if (SUCCEEDED(SHCreateDataObject(pdcm->pidlFolder, pdcm->cidl, pdcm->apidl, NULL, &IID_IDataObject, (void**)&pDataObj))) + { + This->pDataObj = pDataObj; + } + CopyMemory(&This->dcm, pdcm, sizeof(DEFCONTEXTMENU)); + hr = IDefaultContextMenu_fnQueryInterface((IContextMenu2*)This, riid, ppv); + if (SUCCEEDED(hr)) + IContextMenu_Release((IContextMenu2*)This); + } + + TRACE("This(%p)(%x) cidl %u\n",This, hr, This->dcm.cidl); + return hr; +} + +/************************************************************************* + * SHCreateDefaultContextMenu [SHELL32.325] Vista API + * + */ + +HRESULT +WINAPI +SHCreateDefaultContextMenu( + const DEFCONTEXTMENU *pdcm, + REFIID riid, + void **ppv) +{ + HRESULT hr = E_FAIL; + + *ppv = NULL; + hr = IDefaultContextMenu_Constructor( pdcm, riid, ppv ); + + TRACE("pcm %p hr %x\n", pdcm, hr); + return hr; +} + +/************************************************************************* + * CDefFolderMenu_Create2 [SHELL32.701] + * + */ + +INT +WINAPI +CDefFolderMenu_Create2( + LPCITEMIDLIST pidlFolder, + HWND hwnd, + UINT cidl, + LPCITEMIDLIST *apidl, + IShellFolder *psf, + LPFNDFMCALLBACK lpfn, + UINT nKeys, + HKEY *ahkeyClsKeys, + IContextMenu **ppcm) +{ + DEFCONTEXTMENU pdcm; + HRESULT hr; + + pdcm.hwnd = hwnd; + pdcm.pcmcb = NULL; + pdcm.pidlFolder = pidlFolder; + pdcm.psf = psf; + pdcm.cidl = cidl; + pdcm.apidl = apidl; + pdcm.punkAssociationInfo = NULL; + pdcm.cKeys = nKeys; + pdcm.aKeys = ahkeyClsKeys; + + hr = SHCreateDefaultContextMenu(&pdcm, &IID_IContextMenu, (void**)ppcm); + return hr; +} + diff --git a/reactos/dll/win32/shell32/shv_item_cmenu.c b/reactos/dll/win32/shell32/shv_item_cmenu.c deleted file mode 100644 index 257f89152db..00000000000 --- a/reactos/dll/win32/shell32/shv_item_cmenu.c +++ /dev/null @@ -1,1373 +0,0 @@ -/* - * IContextMenu for items in the shellview - * - * Copyright 1998, 2000 Juergen Schmied - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include - -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT -#include "winerror.h" -#include "wine/debug.h" - -#include "windef.h" -#include "wingdi.h" -#include "pidl.h" -#include "undocshell.h" -#include "shlobj.h" -#include "objbase.h" - -#include "shlwapi.h" -#include "shell32_main.h" -#include "shellfolder.h" -#include "debughlp.h" -#include "shresdef.h" -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -/* ugly hack for cut&paste files */ -BOOL fileMoving = FALSE; - -typedef struct _StaticShellEntry_ -{ - LPWSTR szVerb; - LPWSTR szClass; - struct _StaticShellEntry_ * Next; -}StaticShellEntry, *PStaticShellEntry; - -typedef struct _DynamicShellEntry_ -{ - UINT iIdCmdFirst; - UINT NumIds; - IContextMenu * CMenu; - struct _DynamicShellEntry_ * Next; -}DynamicShellEntry, *PDynamicShellEntry; - -/************************************************************************** -* IContextMenu Implementation -*/ - -typedef struct -{ const IContextMenu2Vtbl *lpVtbl; - LONG ref; - IShellFolder* pSFParent; - LPITEMIDLIST pidl; /* root pidl */ - LPITEMIDLIST *apidl; /* array of child pidls */ - UINT cidl; - BOOL bAllValues; - PDynamicShellEntry dhead; - PStaticShellEntry head; - UINT iIdSCMFirst; - UINT iIdSCMLast; - UINT iIdSHEFirst; - UINT iIdSHELast; - SFGAOF rfg; -} ItemCmImpl; - -UINT -SH_EnumerateDynamicContextHandlerForKey(LPWSTR szFileClass, ItemCmImpl *This, IDataObject * pDataObj, DWORD bGroupPolicyActive); -WCHAR *build_paths_list(LPCWSTR wszBasePath, int cidl, LPCITEMIDLIST *pidls); -WCHAR *strdupW(LPWSTR str); -static const IContextMenu2Vtbl cmvt; - -/************************************************************************** -* ISvItemCm_CanRenameItems() -*/ -static BOOL ISvItemCm_CanRenameItems(ItemCmImpl *This) -{ UINT i; - DWORD dwAttributes; - - TRACE("(%p)->()\n",This); - - if(This->apidl) - { - for(i = 0; i < This->cidl; i++){} - if(i > 1) return FALSE; /* can't rename more than one item at a time*/ - dwAttributes = SFGAO_CANRENAME; - IShellFolder_GetAttributesOf(This->pSFParent, 1, (LPCITEMIDLIST*)This->apidl, &dwAttributes); - return dwAttributes & SFGAO_CANRENAME; - } - return FALSE; -} - -/************************************************************************** -* ISvItemCm_Constructor() -*/ -IContextMenu2 *ISvItemCm_Constructor(LPSHELLFOLDER pSFParent, LPCITEMIDLIST pidl, const LPCITEMIDLIST *apidl, UINT cidl) -{ ItemCmImpl* cm; - UINT u; - - cm = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(ItemCmImpl)); - cm->lpVtbl = &cmvt; - cm->ref = 1; - cm->pidl = ILClone(pidl); - cm->pSFParent = pSFParent; - - if(pSFParent) - { - HRESULT hr; - IShellFolder_AddRef(pSFParent); - cm->rfg = SFGAO_BROWSABLE | SFGAO_CANCOPY | SFGAO_CANMOVE | SFGAO_CANDELETE | SFGAO_CANRENAME | SFGAO_HASPROPSHEET; - hr = IShellFolder_GetAttributesOf(pSFParent, cidl, (LPCITEMIDLIST *)apidl, &cm->rfg); - if (!SUCCEEDED(hr)) - cm->rfg = 0; /* No action available */ - } - - cm->apidl = _ILCopyaPidl(apidl, cidl); - cm->cidl = cidl; - - cm->bAllValues = 1; - for(u = 0; u < cidl; u++) - { - cm->bAllValues &= (_ILIsValue(apidl[u]) ? 1 : 0); - } - - TRACE("(%p)->()\n",cm); - - return (IContextMenu2*)cm; -} - -/************************************************************************** -* ISvItemCm_fnQueryInterface -*/ -static HRESULT WINAPI ISvItemCm_fnQueryInterface(IContextMenu2 *iface, REFIID riid, LPVOID *ppvObj) -{ - ItemCmImpl *This = (ItemCmImpl *)iface; - - TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); - - *ppvObj = NULL; - - if(IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IContextMenu) || - IsEqualIID(riid, &IID_IContextMenu2)) - { - *ppvObj = This; - } - else if(IsEqualIID(riid, &IID_IShellExtInit)) /*IShellExtInit*/ - { - FIXME("-- LPSHELLEXTINIT pointer requested\n"); - } - - if(*ppvObj) - { - IUnknown_AddRef((IUnknown*)*ppvObj); - TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); - return S_OK; - } - TRACE("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -/************************************************************************** -* ISvItemCm_fnAddRef -*/ -static ULONG WINAPI ISvItemCm_fnAddRef(IContextMenu2 *iface) -{ - ItemCmImpl *This = (ItemCmImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE("(%p)->(count=%u)\n", This, refCount - 1); - - return refCount; -} - -/************************************************************************** -* ISvItemCm_fnRelease -*/ -static ULONG WINAPI ISvItemCm_fnRelease(IContextMenu2 *iface) -{ - ItemCmImpl *This = (ItemCmImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->ref); - PStaticShellEntry curEntry; - PStaticShellEntry nextEntry; - - - TRACE("(%p)->(count=%i)\n", This, refCount + 1); - - if (!refCount) - { - TRACE(" destroying IContextMenu(%p)\n",This); - - curEntry = nextEntry = This->head; - while(nextEntry) - { - nextEntry = nextEntry->Next; - free(curEntry->szVerb); - free(curEntry->szClass); - free(curEntry); - curEntry = nextEntry; - } - - if(This->pSFParent) - IShellFolder_Release(This->pSFParent); - - SHFree(This->pidl); - - /*make sure the pidl is freed*/ - _ILFreeaPidl(This->apidl, This->cidl); - - HeapFree(GetProcessHeap(),0,This); - } - return refCount; -} - -/************************************************************************** -* ICM_InsertItem() -*/ -void WINAPI _InsertMenuItem ( - HMENU hmenu, - UINT indexMenu, - BOOL fByPosition, - UINT wID, - UINT fType, - LPCSTR dwTypeData, - UINT fState) -{ - MENUITEMINFOA mii; - - ZeroMemory(&mii, sizeof(mii)); - mii.cbSize = sizeof(mii); - if (fType == MFT_SEPARATOR) - { - mii.fMask = MIIM_ID | MIIM_TYPE; - } - else - { - mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE; - mii.dwTypeData = (LPSTR) dwTypeData; - mii.fState = fState; - } - mii.wID = wID; - mii.fType = fType; - InsertMenuItemA( hmenu, indexMenu, fByPosition, &mii); -} - -HRESULT -DoCustomItemAction(ItemCmImpl *This, LPARAM lParam, UINT uMsg) -{ - IContextMenu2 * cmenu; - MEASUREITEMSTRUCT * lpmis = (MEASUREITEMSTRUCT *)lParam; - HRESULT hResult; - UINT i; - PDynamicShellEntry curEntry; - - TRACE("DoCustomItemAction entered with uMsg %x lParam %p\n", uMsg, lParam); - - curEntry = This->dhead; - i = This->iIdSHEFirst; - - - while(curEntry) - { - if (i == lpmis->itemID) - break; - - i++; - curEntry = curEntry->Next; - } - - if (!curEntry) - return E_FAIL; - - hResult = IContextMenu_QueryInterface(curEntry->CMenu, &IID_IContextMenu2, (void**)&cmenu); - if (hResult != S_OK) - { - ERR("failed to get IID_IContextMenu2 interface\n"); - return hResult; - } - - hResult = IContextMenu2_HandleMenuMsg(cmenu, uMsg, (WPARAM)0, lParam); - IContextMenu2_Release(cmenu); - - TRACE("returning hResult %x\n", hResult); - return hResult; -} - -UINT -SH_LoadContextMenuHandlers(ItemCmImpl *This, IDataObject * pDataObj, HMENU hMenu, UINT indexMenu ) -{ - UINT i; - WCHAR buffer[111]; - WCHAR szProgKey[20]; - char ebuf[10]; - HRESULT hr; - HRESULT hResult; - UINT idCmdFirst = 0x6000; - UINT idCmdLast = 0xFFF0; - PDynamicShellEntry curEntry; - DWORD bGroupPolicyActive = FALSE; - DWORD dwSize; - static WCHAR szAny[] = { '*',0}; - - dwSize = sizeof(DWORD); - RegGetValueW(HKEY_CURRENT_USER, - L"Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer", - L"EnforceShellExtensionSecurity", - RRF_RT_DWORD, - NULL, - &bGroupPolicyActive, - &dwSize); - - SH_EnumerateDynamicContextHandlerForKey(szAny, This, pDataObj, bGroupPolicyActive); - - for (i = 0; i < This->cidl; i++) - { - GUID * guid = _ILGetGUIDPointer(This->apidl[i]); - if (guid) - { - LPOLESTR pwszCLSID; - static const WCHAR CLSID[] = { 'C','L','S','I','D','\\',0 }; - wcscpy(buffer, CLSID); - hr = StringFromCLSID(guid, &pwszCLSID); - if (hr == S_OK) - { - wcscpy(&buffer[6], pwszCLSID); - TRACE("buffer %s\n", debugstr_w(buffer)); - SH_EnumerateDynamicContextHandlerForKey(buffer, This, pDataObj, bGroupPolicyActive); - } - } - - if (_ILGetExtension(This->apidl[i], &ebuf[1], sizeof(ebuf) / sizeof(char))) - { - ebuf[0] = L'.'; - buffer[0] = L'\0'; - if (MultiByteToWideChar(CP_ACP, 0, ebuf, -1, buffer, 111)) - { - SH_EnumerateDynamicContextHandlerForKey(buffer, This, pDataObj, bGroupPolicyActive); - dwSize = sizeof(szProgKey); - if (RegGetValueW(HKEY_CLASSES_ROOT, buffer, NULL, RRF_RT_REG_SZ, NULL, szProgKey, &dwSize) == ERROR_SUCCESS) - { - szProgKey[(sizeof(szProgKey)/sizeof(WCHAR))-1] = L'\0'; - SH_EnumerateDynamicContextHandlerForKey(szProgKey, This, pDataObj, bGroupPolicyActive); - } - } - } - } - TRACE("-- done loading\n"); - if (!This->dhead) - { - This->iIdSHEFirst = 0; - This->iIdSHELast = 0; - return indexMenu; - } - - curEntry = This->dhead; - This->iIdSHEFirst = idCmdFirst; - do - { - - hResult = IContextMenu_QueryContextMenu(curEntry->CMenu, hMenu, indexMenu, idCmdFirst, idCmdLast, CMF_NORMAL); - if (SUCCEEDED(hResult)) - { - curEntry->iIdCmdFirst = idCmdFirst; - curEntry->NumIds = LOWORD(hResult); - indexMenu += curEntry->NumIds; - idCmdFirst += curEntry->NumIds + 0x10; - } - TRACE("curEntry %p hresult %x contextmenu %p cmdfirst %x num ids %x\n", curEntry, hResult, curEntry->CMenu, curEntry->iIdCmdFirst, curEntry->NumIds); - curEntry = curEntry->Next; - }while(curEntry); - - This->iIdSHELast = idCmdFirst; - TRACE("SH_LoadContextMenuHandlers first %x last %x\n", This->iIdSHEFirst, This->iIdSHELast); - return indexMenu; -} - -void -SH_AddStaticEntry(ItemCmImpl * This, HKEY hKey, WCHAR *szVerb, WCHAR * szClass) -{ - PStaticShellEntry curEntry; - PStaticShellEntry lastEntry = NULL; - - curEntry = This->head; - - while(curEntry) - { - if (!wcsicmp(curEntry->szVerb, szVerb)) - { - /* entry already exists */ - return; - } - lastEntry = curEntry; - curEntry = curEntry->Next; - } - - TRACE("adding verb %s szClass %s\n", debugstr_w(szVerb), debugstr_w(szClass)); - - curEntry = malloc(sizeof(StaticShellEntry)); - if (curEntry) - { - curEntry->Next = NULL; - curEntry->szVerb = wcsdup(szVerb); - curEntry->szClass = wcsdup(szClass); - } - - if (lastEntry) - { - lastEntry->Next = curEntry; - } - else - { - This->head = curEntry; - } -} - -void -SH_AddStaticEntryForKey(ItemCmImpl * This, HKEY hKey, WCHAR * szClass) -{ - LONG result; - DWORD dwIndex; - WCHAR szName[40]; - DWORD dwName; - - dwIndex = 0; - do - { - szName[0] = 0; - dwName = sizeof(szName) / sizeof(WCHAR); - result = RegEnumKeyExW(hKey, dwIndex, szName, &dwName, NULL, NULL, NULL, NULL); - szName[39] = 0; - if (result == ERROR_SUCCESS) - { - SH_AddStaticEntry(This, hKey, szName, szClass); - } - dwIndex++; - }while(result == ERROR_SUCCESS); -} - -void -SH_AddStaticEntryForFileClass(ItemCmImpl * This, WCHAR * szExt) -{ - WCHAR szBuffer[100]; - HKEY hKey; - LONG result; - DWORD dwBuffer; - - TRACE("SH_AddStaticEntryForFileClass entered with %s\n", debugstr_w(szExt)); - - wcscpy(szBuffer, szExt); - wcscat(szBuffer, L"\\shell"); - result = RegOpenKeyExW(HKEY_CLASSES_ROOT, szBuffer, 0, KEY_READ | KEY_QUERY_VALUE, &hKey); - if (result == ERROR_SUCCESS) - { - SH_AddStaticEntryForKey(This, hKey, szExt); - RegCloseKey(hKey); - } - - dwBuffer = sizeof(szBuffer); - result = RegGetValueW(HKEY_CLASSES_ROOT, szExt, NULL, RRF_RT_REG_SZ, NULL, (LPBYTE)szBuffer, &dwBuffer); - if (result == ERROR_SUCCESS) - { - UINT length = strlenW(szBuffer); - wcscat(szBuffer, L"\\shell"); - TRACE("szBuffer %s\n", debugstr_w(szBuffer)); - - result = RegOpenKeyExW(HKEY_CLASSES_ROOT, szBuffer, 0, KEY_READ | KEY_QUERY_VALUE, &hKey); - if (result == ERROR_SUCCESS) - { - szBuffer[length] = 0; - SH_AddStaticEntryForKey(This, hKey, szBuffer); - RegCloseKey(hKey); - } - } - - strcpyW(szBuffer, "SystemFileAssociations\\"); - dwBuffer = sizeof(szBuffer) - strlenW(szBuffer) * sizeof(WCHAR); - result = RegGetValueW(HKEY_CLASSES_ROOT, szExt, L"PerceivedType", RRF_RT_REG_SZ, NULL, (LPBYTE)&szBuffer[23], &dwBuffer); - if (result == ERROR_SUCCESS) - { - UINT length = strlenW(szBuffer); - wcscat(szBuffer, L"\\shell"); - TRACE("szBuffer %s\n", debugstr_w(szBuffer)); - - result = RegOpenKeyExW(HKEY_CLASSES_ROOT, szBuffer, 0, KEY_READ | KEY_QUERY_VALUE, &hKey); - if (result == ERROR_SUCCESS) - { - szBuffer[length] = 0; - SH_AddStaticEntryForKey(This, hKey, szBuffer); - RegCloseKey(hKey); - } - } - RegCloseKey(hKey); -} - -void -SH_AddStaticEntrySpecial(ItemCmImpl * This) -{ - if (_ILIsFolder(This->apidl[0])) // && (This->rfg & SFGAO_BROWSABLE)) - { - SH_AddStaticEntryForFileClass(This, L"Folder"); - } - else if (_ILIsDrive(This->apidl[0])) - { - SH_AddStaticEntryForFileClass(This, L"Drive"); - } -} - - -UINT -SH_AddStaticEntryToMenu(HMENU hMenu, UINT indexMenu, ItemCmImpl * This) -{ - MENUITEMINFOW mii; - PStaticShellEntry curEntry; - WCHAR szVerb[20]; - UINT idResource; - - mii.cbSize = sizeof(mii); - mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE | MIIM_DATA; - mii.fType = MFT_STRING; - mii.fState = MFS_ENABLED | MFS_DEFAULT; - mii.wID = 0x4000; - This->iIdSCMFirst = mii.wID; - - curEntry = This->head; - - while(curEntry) - { - if (!wcsicmp(curEntry->szVerb, L"open")) - idResource = IDS_OPEN_VERB; - else if (!wcsicmp(curEntry->szVerb, L"runas")) - idResource = IDS_RUNAS_VERB; - else if (!wcsicmp(curEntry->szVerb, L"edit")) - idResource = IDS_EDIT_VERB; - else if (!wcsicmp(curEntry->szVerb, L"find")) - idResource = IDS_FIND_VERB; - else if (!wcsicmp(curEntry->szVerb, L"print")) - idResource = IDS_PRINT_VERB; - else if (!wcsicmp(curEntry->szVerb, L"play")) - idResource = IDS_PLAY_VERB; - else if (!wcsicmp(curEntry->szVerb, L"preview")) - idResource = IDS_PREVIEW_VERB; - else if (!wcsicmp(curEntry->szVerb, L"cplopen")) - idResource = IDS_OPEN_VERB; - - else - idResource = 0; - - if (idResource > 0) - { - if (LoadStringW(shell32_hInstance, idResource, szVerb, sizeof(szVerb)/sizeof(WCHAR))) - { - szVerb[(sizeof(szVerb)/sizeof(WCHAR))-1] = L'\0'; - mii.dwTypeData = szVerb; - } - else - { - WARN("unknown verb %s\n", debugstr_w(curEntry->szVerb)); - mii.dwTypeData = curEntry->szVerb; - } - } - else - { - WARN("unknown verb %s\n", debugstr_w(curEntry->szVerb)); - mii.dwTypeData = curEntry->szVerb; - } - - mii.cch = strlenW(mii.dwTypeData); - InsertMenuItemW(hMenu, indexMenu++, TRUE, &mii); - mii.fState = MFS_ENABLED; - mii.wID++; - curEntry = curEntry->Next; - } - This->iIdSCMLast = mii.wID - 1; - return indexMenu; -} - -const char * GetLocalizedString(HMENU hMenu, UINT wID, const char * sDefault, char * sResult) -{ - MENUITEMINFOA mii; - if (!hMenu) - { - return sDefault; - } - - mii.cbSize = sizeof(mii); - mii.fMask = MIIM_TYPE; - mii.fType = MFT_STRING; - mii.dwTypeData = sResult; - mii.cch = 100; - - if (GetMenuItemInfoA(hMenu, wID, FALSE, &mii)) - { - return sResult; - } - else - { - return sDefault; - } -} - -/************************************************************************** -* ISvItemCm_fnQueryContextMenu() -* FIXME: load menu MENU_SHV_FILE out of resources instead if creating -* each menu item by calling _InsertMenuItem() -*/ -static HRESULT WINAPI ISvItemCm_fnQueryContextMenu( - IContextMenu2 *iface, - HMENU hmenu, - UINT indexMenu, - UINT idCmdFirst, - UINT idCmdLast, - UINT uFlags) -{ - IDataObject * pDataObj; - ItemCmImpl *This = (ItemCmImpl *)iface; - USHORT lastindex = 0; - HMENU hLocalMenu; - char sBuffer[100]; - WCHAR szExt[10]; - - static const char sCopy[] = { '&','C','o','p','y',0 }; - static const char sCut[] = { '&','C','u','t',0 }; - static const char sDelete[] = { '&','D','e','l','e','t','e',0 }; - static const char sRename[] = { '&','R','e','n','a','m','e',0 }; - static const char sProperties[] = { '&','P','r','o','p','e','r','t','i','e','s',0 }; - static const WCHAR szSHVFile[] = { 'M','E','N','U','_','S','H','V','_','F','I','L','E',0 }; - - - TRACE("(%p)->(hmenu=%p indexmenu=%x cmdfirst=%x cmdlast=%x flags=%x )\n",This, hmenu, indexMenu, idCmdFirst, idCmdLast, uFlags); - - hLocalMenu = LoadMenuW(shell32_hInstance, szSHVFile); - - if (_ILGetExtension(This->apidl[0], &sBuffer[1], sizeof(sBuffer)-1)) - { - sBuffer[0] = '.'; - MultiByteToWideChar( CP_ACP, 0, sBuffer, -1, (LPWSTR)szExt, 10); - SH_AddStaticEntryForFileClass(This, szExt); - } - else - { - SH_AddStaticEntrySpecial(This); - - } - indexMenu = SH_AddStaticEntryToMenu(hmenu, indexMenu, This); - - SetMenuDefaultItem(hmenu, 0, MF_BYPOSITION); - pDataObj = IDataObject_Constructor(NULL, This->pidl, (LPCITEMIDLIST *)This->apidl, This->cidl); - if (pDataObj) - { - indexMenu = SH_LoadContextMenuHandlers(This, pDataObj, hmenu, indexMenu); - IDataObject_Release(pDataObj); - } - - if(!(CMF_DEFAULTONLY & uFlags) && This->cidl>0) - { - if(!(uFlags & CMF_EXPLORE)) - _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_OPEN, MFT_STRING, "&Select", MFS_ENABLED); - - TRACE("rfg %x\n", This->rfg); - - - if (This->rfg & (SFGAO_CANCOPY | SFGAO_CANMOVE)) - { - _InsertMenuItem(hmenu, indexMenu++, TRUE, 0, MFT_SEPARATOR, NULL, 0); - if (This->rfg & SFGAO_CANCOPY) - _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_COPY, MFT_STRING, GetLocalizedString(hLocalMenu, FCIDM_SHVIEW_COPY, sCopy, sBuffer), MFS_ENABLED); - if (This->rfg & SFGAO_CANMOVE) - _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_CUT, MFT_STRING, GetLocalizedString(hLocalMenu, FCIDM_SHVIEW_CUT, sCut, sBuffer), MFS_ENABLED); - } - - if (This->rfg & SFGAO_CANDELETE) - { - _InsertMenuItem(hmenu, indexMenu++, TRUE, 0, MFT_SEPARATOR, NULL, 0); - _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_DELETE, MFT_STRING, GetLocalizedString(hLocalMenu, FCIDM_SHVIEW_DELETE, sDelete, sBuffer), MFS_ENABLED); - } - - if ((uFlags & CMF_CANRENAME) && (This->rfg & SFGAO_CANRENAME)) - _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_RENAME, MFT_STRING, GetLocalizedString(hLocalMenu, FCIDM_SHVIEW_RENAME, sRename, sBuffer), ISvItemCm_CanRenameItems(This) ? MFS_ENABLED : MFS_DISABLED); - - if (This->rfg & SFGAO_HASPROPSHEET) - { - _InsertMenuItem(hmenu, indexMenu++, TRUE, 0, MFT_SEPARATOR, NULL, 0); - _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_PROPERTIES, MFT_STRING, GetLocalizedString(hLocalMenu, FCIDM_SHVIEW_PROPERTIES, sProperties, sBuffer), MFS_ENABLED); - } - - lastindex = FCIDM_SHVIEWLAST; - } - - if (hLocalMenu) - { - DestroyMenu(hLocalMenu); - } - - return MAKE_HRESULT(SEVERITY_SUCCESS, 0, lastindex); -} - -/************************************************************************** -* DoRename -*/ -static void DoRename( - IContextMenu2 *iface, - HWND hwnd) -{ - ItemCmImpl *This = (ItemCmImpl *)iface; - - LPSHELLBROWSER lpSB; - LPSHELLVIEW lpSV; - - TRACE("(%p)->(wnd=%p)\n",This, hwnd); - - /* get the active IShellView */ - if ((lpSB = (LPSHELLBROWSER)SendMessageA(hwnd, CWM_GETISHELLBROWSER,0,0))) - { - if(SUCCEEDED(IShellBrowser_QueryActiveShellView(lpSB, &lpSV))) - { - TRACE("(sv=%p)\n",lpSV); - IShellView_SelectItem(lpSV, This->apidl[0], - SVSI_DESELECTOTHERS|SVSI_EDIT|SVSI_ENSUREVISIBLE|SVSI_FOCUSED|SVSI_SELECT); - IShellView_Release(lpSV); - } - } -} - -/************************************************************************** - * DoDelete - * - * deletes the currently selected items - */ -static void DoDelete(IContextMenu2 *iface, HWND hwnd) -{ - WCHAR szPath[MAX_PATH]; - WCHAR * szTarget; - SHFILEOPSTRUCTW op; - LPSHELLBROWSER lpSB; - LPSHELLVIEW lpSV; - IPersistFolder2 * psf; - LPITEMIDLIST pidl; - STRRET strTemp; - ItemCmImpl *This = (ItemCmImpl *)iface; - - if (IShellFolder2_QueryInterface(This->pSFParent, &IID_IPersistFolder2, (LPVOID*)&psf) != S_OK) - { - ERR("Failed to get interface IID_IPersistFolder2\n"); - return; - } - - if (IPersistFolder2_GetCurFolder(psf, &pidl) != S_OK) - { - ERR("IPersistFolder2_GetCurFolder failed\n"); - IPersistFolder2_Release(psf); - return; - } - - if (IShellFolder2_GetDisplayNameOf(This->pSFParent, pidl, SHGDN_FORPARSING, &strTemp) != S_OK) - { - ERR("IShellFolder_GetDisplayNameOf failed\n"); - IPersistFolder2_Release(psf); - return; - } - szPath[MAX_PATH-1] = 0; - StrRetToBufW(&strTemp, pidl, szPath, MAX_PATH); - PathAddBackslashW(szPath); - IPersistFolder2_Release(psf); - - szTarget = build_paths_list(szPath, This->cidl, (LPCITEMIDLIST *)This->apidl); - - if (pidl) - { - if (SHGetPathFromIDListW(pidl, szPath)) - { - ZeroMemory(&op, sizeof(op)); - op.hwnd = GetActiveWindow(); - op.wFunc = FO_DELETE; - op.pFrom = szTarget; - op.fFlags = FOF_ALLOWUNDO; - SHFileOperationW(&op); - } - ILFree(pidl); - } - - if ((lpSB = (LPSHELLBROWSER)SendMessageA(hwnd, CWM_GETISHELLBROWSER,0,0))) - { - if (SUCCEEDED(IShellBrowser_QueryActiveShellView(lpSB, &lpSV))) - { - IShellView_Refresh(lpSV); - } - } -} - -/************************************************************************** - * DoCopyOrCut - * - * copies the currently selected items into the clipboard - */ -static BOOL DoCopyOrCut( - IContextMenu2 *iface, - HWND hwnd, - BOOL bCut) -{ - ItemCmImpl *This = (ItemCmImpl *)iface; - - LPSHELLBROWSER lpSB; - LPSHELLVIEW lpSV; - LPDATAOBJECT lpDo; - - TRACE("(%p)->(wnd=%p,bCut=0x%08x)\n",This, hwnd, bCut); - - /* get the active IShellView */ - if ((lpSB = (LPSHELLBROWSER)SendMessageA(hwnd, CWM_GETISHELLBROWSER,0,0))) - { - if (SUCCEEDED(IShellBrowser_QueryActiveShellView(lpSB, &lpSV))) - { - if (SUCCEEDED(IShellView_GetItemObject(lpSV, SVGIO_SELECTION, &IID_IDataObject, (LPVOID*)&lpDo))) - { - OleSetClipboard(lpDo); - IDataObject_Release(lpDo); - } - IShellView_Release(lpSV); - } - } - return TRUE; -} -static void DoProperties( - IContextMenu2 *iface, - HWND hwnd) -{ - ItemCmImpl *This = (ItemCmImpl *)iface; - LPITEMIDLIST pidlFQ = NULL; - SHELLEXECUTEINFOA sei; - - /* - * FIXXME - * - * The IShellFolder interface GetUIObject should create the specific item and then query if it has an IContextMenu interface - * If yes return interface to it. - */ - - if (_ILIsMyComputer(This->apidl[0])) - { - ShellExecuteA(hwnd, "open", "rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl", NULL, NULL, SW_SHOWNORMAL); - return; - } - else if (_ILIsDesktop(This->apidl[0])) - { - ShellExecuteA(hwnd, "open", "rundll32.exe shell32.dll,Control_RunDLL desk.cpl", NULL, NULL, SW_SHOWNORMAL); - return; - } - else if (_ILIsDrive(This->apidl[0])) - { - WCHAR buffer[111]; - ILGetDisplayName(This->apidl[0], buffer); - SH_ShowDriveProperties(buffer); - return; - } - else if (_ILIsNetHood(This->apidl[0])) - { - /* FIXME - * implement nethood properties - */ - FIXME("implement nethood property dialog\n"); - return; - } - else if (_ILIsBitBucket(This->apidl[0])) - { - ///FIXME - WCHAR szDrive = 'C'; - SH_ShowRecycleBinProperties(szDrive); - } - else - { - pidlFQ = ILCombine(This->pidl, This->apidl[0]); - } - - ZeroMemory(&sei, sizeof(sei)); - sei.cbSize = sizeof(sei); - sei.fMask = SEE_MASK_INVOKEIDLIST; - sei.lpIDList = pidlFQ; - sei.hwnd = hwnd; - sei.nShow = SW_SHOWNORMAL; - sei.lpVerb = "properties"; - - TRACE("DoProperties before ShellExecuteEx\n"); - ShellExecuteExA(&sei); - TRACE("DoProperties after ShellExecuteEx\n"); - - if (pidlFQ) - { - SHFree(pidlFQ); - } -} -HRESULT -DoStaticShellExtensions(ItemCmImpl *This, LPCMINVOKECOMMANDINFO lpcmi) -{ - UINT i; - PStaticShellEntry curEntry; - LPITEMIDLIST pidl; - UINT bFolderFound = FALSE; - SHELLEXECUTEINFOW sei; - - TRACE("DoStaticShellExtensions entered with lpVerb %x first %x last %x\n", LOWORD(lpcmi->lpVerb), This->iIdSCMFirst, This->iIdSCMLast); - - i = This->iIdSCMFirst; - curEntry = This->head; - - while(curEntry) - { - if (i == LOWORD(lpcmi->lpVerb)) - break; - - i++; - curEntry = curEntry->Next; - } - - if (!curEntry) - { - ERR("unexpected\n"); - return E_UNEXPECTED; - } - - for(i = 0; icidl; i++) - { - if(!_ILIsValue(This->apidl[i])) - { - bFolderFound = TRUE; - break; - } - } - - if (bFolderFound && wcsicmp(curEntry->szClass, L"Folder")) - { - /* when there is a folder with item selected - * do nothing - */ - return S_OK; - } - - TRACE("curEntry %p verb %s szClass %s\n", curEntry, debugstr_w(curEntry->szVerb), debugstr_w(curEntry->szClass)); - - pidl = ILCombine(This->pidl, This->apidl[0]); - - ZeroMemory(&sei, sizeof(sei)); - sei.cbSize = sizeof(sei); - sei.fMask = SEE_MASK_CLASSNAME | SEE_MASK_IDLIST; - sei.lpIDList = pidl; - sei.lpClass = curEntry->szClass; - sei.hwnd = lpcmi->hwnd; - sei.nShow = SW_SHOWNORMAL; - sei.lpVerb = curEntry->szVerb; - ShellExecuteExW(&sei); - SHFree(pidl); - return S_OK; -} - -HRESULT -DoDynamicShellExtensions(ItemCmImpl *This, LPCMINVOKECOMMANDINFO lpcmi) -{ - HRESULT hResult = NOERROR; - PDynamicShellEntry curEntry; - UINT id; - - curEntry = This->dhead; - id = LOWORD(lpcmi->lpVerb); - - while(curEntry) - { - if (curEntry->iIdCmdFirst <= id && curEntry->iIdCmdFirst + curEntry->NumIds >= id) - break; - - curEntry = curEntry->Next; - } - - if (!curEntry) - return E_FAIL; - - lpcmi->lpVerb -= curEntry->iIdCmdFirst; - - hResult = IContextMenu_InvokeCommand(curEntry->CMenu, lpcmi); - - TRACE("DoDynamicShellExtensions hResult %x verb %x first %x\n", hResult, lpcmi->lpVerb, curEntry->iIdCmdFirst); - return hResult; -} - - -/************************************************************************** -* ISvItemCm_fnInvokeCommand() -*/ -static HRESULT WINAPI ISvItemCm_fnInvokeCommand( - IContextMenu2 *iface, - LPCMINVOKECOMMANDINFO lpcmi) -{ - ItemCmImpl *This = (ItemCmImpl *)iface; - - if (lpcmi->cbSize != sizeof(CMINVOKECOMMANDINFO)) - FIXME("Is an EX structure\n"); - - TRACE("ISvItemCm_fnInvokeCommand (%p)->(invcom=%p verb=%p wnd=%p)\n",This,lpcmi,lpcmi->lpVerb, lpcmi->hwnd); - - if( HIWORD(lpcmi->lpVerb)==0 && LOWORD(lpcmi->lpVerb) > FCIDM_SHVIEWLAST) - { - TRACE("Invalid Verb %x\n",LOWORD(lpcmi->lpVerb)); - return E_INVALIDARG; - } - - if (HIWORD(lpcmi->lpVerb) == 0) - { - switch(LOWORD(lpcmi->lpVerb)) - { - case FCIDM_SHVIEW_RENAME: - TRACE("Verb FCIDM_SHVIEW_RENAME\n"); - DoRename(iface, lpcmi->hwnd); - break; - case FCIDM_SHVIEW_DELETE: - TRACE("Verb FCIDM_SHVIEW_DELETE\n"); - DoDelete(iface, lpcmi->hwnd); - break; - case FCIDM_SHVIEW_COPY: - TRACE("Verb FCIDM_SHVIEW_COPY\n"); - DoCopyOrCut(iface, lpcmi->hwnd, FALSE); - break; - case FCIDM_SHVIEW_CUT: - TRACE("Verb FCIDM_SHVIEW_CUT\n"); - DoCopyOrCut(iface, lpcmi->hwnd, TRUE); - break; - case FCIDM_SHVIEW_PROPERTIES: - TRACE("Verb FCIDM_SHVIEW_PROPERTIES\n"); - DoProperties(iface, lpcmi->hwnd); - break; - default: - TRACE("iIdSHEFirst %x iIdSHELast %x iIdSCMFirst %x iIdSCMLast %x\n", This->iIdSHEFirst, This->iIdSHELast, This->iIdSCMFirst, This->iIdSCMLast); - if (This->iIdSHEFirst && This->iIdSHELast) - { - if (LOWORD(lpcmi->lpVerb) >= This->iIdSHEFirst && LOWORD(lpcmi->lpVerb) <= This->iIdSHELast) - { - return DoDynamicShellExtensions(This, lpcmi); - } - } - if (This->iIdSCMFirst && This->iIdSCMLast) - { - if (LOWORD(lpcmi->lpVerb) >= This->iIdSCMFirst && LOWORD(lpcmi->lpVerb) <= This->iIdSCMLast) - { - return DoStaticShellExtensions(This, lpcmi); - } - } - FIXME("Unhandled Verb %xl\n",LOWORD(lpcmi->lpVerb)); - } - } - else - { - TRACE("Verb is %s\n",debugstr_a(lpcmi->lpVerb)); - if (strcmp(lpcmi->lpVerb,"delete")==0) - DoDelete(iface, lpcmi->hwnd); - else - FIXME("Unhandled string verb %s\n",debugstr_a(lpcmi->lpVerb)); - } - return NOERROR; -} - -/************************************************************************** -* ISvItemCm_fnGetCommandString() -*/ -static HRESULT WINAPI ISvItemCm_fnGetCommandString( - IContextMenu2 *iface, - UINT_PTR idCommand, - UINT uFlags, - UINT* lpReserved, - LPSTR lpszName, - UINT uMaxNameLen) -{ - ItemCmImpl *This = (ItemCmImpl *)iface; - - HRESULT hr = E_INVALIDARG; - - TRACE("(%p)->(idcom=%lx flags=%x %p name=%p len=%x)\n",This, idCommand, uFlags, lpReserved, lpszName, uMaxNameLen); - - switch(uFlags) - { - case GCS_HELPTEXTA: - case GCS_HELPTEXTW: - hr = E_NOTIMPL; - break; - - case GCS_VERBA: - switch(idCommand) - { - case FCIDM_SHVIEW_RENAME: - strcpy((LPSTR)lpszName, "rename"); - hr = NOERROR; - break; - } - break; - - /* NT 4.0 with IE 3.0x or no IE will always call This with GCS_VERBW. In This - case, you need to do the lstrcpyW to the pointer passed.*/ - case GCS_VERBW: - switch(idCommand) - { case FCIDM_SHVIEW_RENAME: - MultiByteToWideChar( CP_ACP, 0, "rename", -1, (LPWSTR)lpszName, uMaxNameLen ); - hr = NOERROR; - break; - } - break; - - case GCS_VALIDATEA: - case GCS_VALIDATEW: - hr = NOERROR; - break; - } - TRACE("-- (%p)->(name=%s)\n",This, lpszName); - return hr; -} - -/************************************************************************** -* ISvItemCm_fnHandleMenuMsg() -* NOTES -* should be only in IContextMenu2 and IContextMenu3 -* is nevertheless called from word95 -*/ -static HRESULT WINAPI ISvItemCm_fnHandleMenuMsg( - IContextMenu2 *iface, - UINT uMsg, - WPARAM wParam, - LPARAM lParam) -{ - ItemCmImpl *This = (ItemCmImpl *)iface; - LPMEASUREITEMSTRUCT lpmis = (LPMEASUREITEMSTRUCT) lParam; - TRACE("(%p)->(msg=%x wp=%lx lp=%lx)\n",This, uMsg, wParam, lParam); - - switch(uMsg) - { - case WM_MEASUREITEM: - case WM_DRAWITEM: - if (lpmis->itemID >= This->iIdSHEFirst && lpmis->itemID <= This->iIdSHELast) - return DoCustomItemAction(This, lParam, uMsg); - break; - - } - - return E_NOTIMPL; -} - -static const IContextMenu2Vtbl cmvt = -{ - ISvItemCm_fnQueryInterface, - ISvItemCm_fnAddRef, - ISvItemCm_fnRelease, - ISvItemCm_fnQueryContextMenu, - ISvItemCm_fnInvokeCommand, - ISvItemCm_fnGetCommandString, - ISvItemCm_fnHandleMenuMsg -}; - -HRESULT -SH_LoadDynamicContextMenuHandler(HKEY hKey, const CLSID * szClass, ItemCmImpl *This, IDataObject * pDataObj) -{ - HRESULT hr; - IContextMenu * cmobj; - IShellExtInit *shext; - PDynamicShellEntry curEntry; - TRACE("SH_LoadDynamicContextMenuHandler entered with %s\n",wine_dbgstr_guid(szClass)); - - hr = SHCoCreateInstance(NULL, szClass, NULL, &IID_IContextMenu, (void**)&cmobj); - if (hr != S_OK) - { - TRACE("SHCoCreateInstance failed %x\n", GetLastError()); - return hr; - } - hr = cmobj->lpVtbl->QueryInterface(cmobj, &IID_IShellExtInit, (void**)&shext); - if (hr != S_OK) - { - TRACE("Failed to query for interface IID_IShellExtInit\n"); - cmobj->lpVtbl->Release(cmobj); - return FALSE; - } - hr = shext->lpVtbl->Initialize(shext, NULL, pDataObj, hKey); - if (hr != S_OK) - { - TRACE("Failed to initialize shell extension error %x\n", hr); - shext->lpVtbl->Release(shext); - cmobj->lpVtbl->Release(cmobj); - return hr; - } - curEntry = malloc(sizeof(DynamicShellEntry)); - if(!curEntry) - { - return E_OUTOFMEMORY; - } - - curEntry->iIdCmdFirst = 0; - curEntry->Next = NULL; - curEntry->NumIds = 0; - curEntry->CMenu = cmobj; - - if (This->dhead) - { - PDynamicShellEntry pEntry = This->dhead; - - while(pEntry->Next) - { - pEntry = pEntry->Next; - } - - pEntry->Next = curEntry; - } - else - { - This->dhead = curEntry; - } - - return hr; -} - -UINT -SH_EnumerateDynamicContextHandlerForKey(const LPWSTR szFileClass, ItemCmImpl *This, IDataObject * pDataObj, DWORD bGroupPolicyActive) -{ - HKEY hKey; - WCHAR szKey[MAX_PATH] = {0}; - WCHAR szName[MAX_PATH] = {0}; - DWORD dwIndex, dwName; - LONG res; - HRESULT hResult; - UINT index; - CLSID clsid; - static const WCHAR szShellEx[] = { '\\','s','h','e','l','l','e','x','\\','C','o','n','t','e','x','t','M','e','n','u','H','a','n','d','l','e','r','s',0 }; - - wcscpy(szKey, szFileClass); - wcscat(szKey, szShellEx); - - TRACE("SH_EnumerateDynamicContextHandlerForKey key %s\n", debugstr_w(szFileClass)); - - if (RegOpenKeyExW(HKEY_CLASSES_ROOT, szKey, 0, KEY_READ, &hKey) != ERROR_SUCCESS) - { - TRACE("RegOpenKeyExW failed for key %s\n", debugstr_w(szKey)); - return 0; - } - - dwIndex = 0; - index = 0; - do - { - dwName = MAX_PATH; - res = RegEnumKeyExW(hKey, dwIndex, szName, &dwName, NULL, NULL, NULL, NULL); - if (res == ERROR_SUCCESS) - { - hResult = CLSIDFromString(szName, &clsid); - if (hResult != S_OK) - { - dwName = MAX_PATH; - if (RegGetValueW(hKey, szName, NULL, RRF_RT_REG_SZ, NULL, szKey, &dwName) == ERROR_SUCCESS) - { - if (CLSIDFromString(szKey, &clsid) == S_OK) - { - if (bGroupPolicyActive) - { - if (RegGetValueW(HKEY_LOCAL_MACHINE, - L"Software\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved", - szKey, - RRF_RT_REG_SZ, - NULL, - NULL, - &dwName) == ERROR_SUCCESS) - { - SH_LoadDynamicContextMenuHandler(hKey, &clsid, This, pDataObj); - } - - } - else - { - SH_LoadDynamicContextMenuHandler(hKey, &clsid, This, pDataObj); - } - } - } - } - if (hResult == S_OK) - { - if (bGroupPolicyActive) - { - if (RegGetValueW(HKEY_LOCAL_MACHINE, - L"Software\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved", - szKey, - RRF_RT_REG_SZ, - NULL, - NULL, - &dwName) == ERROR_SUCCESS) - { - SH_LoadDynamicContextMenuHandler(hKey, &clsid, This, pDataObj); - } - } - else - { - SH_LoadDynamicContextMenuHandler(hKey, &clsid, This, pDataObj); - } - } - } - dwIndex++; - }while(res == ERROR_SUCCESS); - - RegCloseKey(hKey); - return index; -} - -/************************************************************************* - * SHCreateDefaultContextMenu [SHELL32.325] Vista API - * - */ - -HRESULT WINAPI SHCreateDefaultContextMenu( - const DEFCONTEXTMENU *pdcm, - REFIID riid, - void **ppv) -{ - HRESULT hr; - IContextMenu2 * pcm; - - if (pdcm->cidl > 0) - pcm = ISvItemCm_Constructor( pdcm->psf, pdcm->pidlFolder, pdcm->apidl, pdcm->cidl ); - else - pcm = ISvBgCm_Constructor( pdcm->psf, TRUE ); - - hr = S_OK; - *ppv = pcm; - - return hr; -} - -/************************************************************************* - * CDefFolderMenu_Create2 [SHELL32.701] - * - */ - -INT -WINAPI -CDefFolderMenu_Create2( - LPCITEMIDLIST pidlFolder, - HWND hwnd, - UINT cidl, - LPCITEMIDLIST *apidl, - IShellFolder *psf, - LPFNDFMCALLBACK lpfn, - UINT nKeys, - HKEY *ahkeyClsKeys, - IContextMenu **ppcm) -{ - DEFCONTEXTMENU pdcm; - HRESULT hr; - - pdcm.hwnd = hwnd; - pdcm.pcmcb = NULL; //FIXME - pdcm.pidlFolder = pidlFolder; - pdcm.psf = psf; - pdcm.cidl = cidl; - pdcm.apidl = apidl; - pdcm.punkAssociationInfo = NULL; - pdcm.cKeys = nKeys; - pdcm.aKeys = ahkeyClsKeys; - - hr = SHCreateDefaultContextMenu(&pdcm, &IID_IContextMenu, (void**)ppcm); - return hr; -} diff --git a/reactos/dll/win32/shell32/shv_item_new.c b/reactos/dll/win32/shell32/shv_item_new.c index f8f52c057f3..24454c9fac7 100644 --- a/reactos/dll/win32/shell32/shv_item_new.c +++ b/reactos/dll/win32/shell32/shv_item_new.c @@ -50,11 +50,14 @@ typedef struct __SHELLNEW_ITEM__ typedef struct { const IContextMenu2Vtbl *lpVtblContextMenu; - LPSHELLFOLDER pSFParent; + const IShellExtInitVtbl *lpvtblShellExtInit; + LPWSTR szPath; + IShellFolder *pSFParent; PSHELLNEW_ITEM s_SnHead; }INewMenuImpl; static const IContextMenu2Vtbl cmvt; +static const IShellExtInitVtbl sei; static WCHAR szNew[MAX_PATH]; @@ -552,15 +555,20 @@ static void DoNewFolder( if (psfhlp) { LPITEMIDLIST pidl; - ISFHelper_GetUniqueName(psfhlp, wszName, MAX_PATH); - ISFHelper_AddFolder(psfhlp, 0, wszName, &pidl); + + if (ISFHelper_GetUniqueName(psfhlp, wszName, MAX_PATH) != S_OK) + return; + if (ISFHelper_AddFolder(psfhlp, 0, wszName, &pidl) != S_OK) + return; if(psv) { + IShellView_Refresh(psv); /* if we are in a shellview do labeledit */ IShellView_SelectItem(psv, pidl,(SVSI_DESELECTOTHERS | SVSI_EDIT | SVSI_ENSUREVISIBLE |SVSI_FOCUSED|SVSI_SELECT)); + IShellView_Refresh(psv); } SHFree(pidl); @@ -569,12 +577,10 @@ static void DoNewFolder( } -#if 0 static inline INewMenuImpl *impl_from_IShellExtInit( IShellExtInit *iface ) { return (INewMenuImpl *)((char*)iface - FIELD_OFFSET(INewMenuImpl, lpvtblShellExtInit)); } -#endif static __inline INewMenuImpl * impl_from_IContextMenu( IContextMenu2 *iface ) { @@ -583,22 +589,21 @@ static __inline INewMenuImpl * impl_from_IContextMenu( IContextMenu2 *iface ) static HRESULT WINAPI INewItem_fnQueryInterface(INewMenuImpl * This, REFIID riid, LPVOID *ppvObj) { - TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); + TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); - *ppvObj = NULL; + *ppvObj = NULL; if(IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IContextMenu) || IsEqualIID(riid, &IID_IContextMenu2)) - { - *ppvObj = &This->lpVtblContextMenu; - } -#if 0 - else if(IsEqualIID(riid, &IID_IShellExtInit)) - { - *ppvObj = &This->lpvtblShellExtInit; - } -#endif + { + *ppvObj = &This->lpVtblContextMenu; + } + else if(IsEqualIID(riid, &IID_IShellExtInit)) + { + *ppvObj = &This->lpvtblShellExtInit; + } + if(*ppvObj) { @@ -757,12 +762,12 @@ INewItem_IContextMenu_fnHandleMenuMsg(IContextMenu2 *iface, LPARAM lParam) { INewMenuImpl *This = impl_from_IContextMenu(iface); - //DRAWITEMSTRUCT * lpids = (DRAWITEMSTRUCT*) lParam; - //MEASUREITEMSTRUCT *lpmis = (MEASUREITEMSTRUCT*) lParam; + DRAWITEMSTRUCT * lpids = (DRAWITEMSTRUCT*) lParam; + MEASUREITEMSTRUCT *lpmis = (MEASUREITEMSTRUCT*) lParam; + + TRACE("INewItem_IContextMenu_fnHandleMenuMsg (%p)->(msg=%x wp=%lx lp=%lx)\n",This, uMsg, wParam, lParam); - TRACE("INewItem_IContextMenu_fnHandleMenuMsg (%p)->(msg=%x wp=%lx lp=%lx)\n",This, uMsg, wParam, lParam); -#if 0 switch(uMsg) { case WM_MEASUREITEM: @@ -772,9 +777,7 @@ INewItem_IContextMenu_fnHandleMenuMsg(IContextMenu2 *iface, return DoDrawItem(This, (HWND)wParam, lpids); break; } -#else return S_OK; -#endif return E_UNEXPECTED; } @@ -790,7 +793,48 @@ static const IContextMenu2Vtbl cmvt = INewItem_IContextMenu_fnHandleMenuMsg }; -static INewMenuImpl *cached_ow; +static HRESULT WINAPI +INewItem_ExtInit_fnQueryInterface( IShellExtInit* iface, REFIID riid, void** ppvObject ) +{ + return INewItem_fnQueryInterface(impl_from_IShellExtInit(iface), riid, ppvObject); +} + +static ULONG WINAPI +INewItem_ExtInit_AddRef( IShellExtInit* iface ) +{ + return INewItem_fnAddRef(impl_from_IShellExtInit(iface)); +} + +static ULONG WINAPI +INewItem_ExtInit_Release( IShellExtInit* iface ) +{ + return INewItem_fnRelease(impl_from_IShellExtInit(iface)); +} + +static HRESULT WINAPI +INewItem_ExtInit_Initialize( IShellExtInit* iface, LPCITEMIDLIST pidlFolder, + IDataObject *pdtobj, HKEY hkeyProgID ) +{ + + return S_OK; +} + +static const IShellExtInitVtbl sei = +{ + INewItem_ExtInit_fnQueryInterface, + INewItem_ExtInit_AddRef, + INewItem_ExtInit_Release, + INewItem_ExtInit_Initialize +}; +static INewMenuImpl *cached_ow = NULL; + +VOID +INewItem_SetCurrentShellFolder(IShellFolder * psfParent) +{ + if (cached_ow) + cached_ow->pSFParent = psfParent; +} + HRESULT WINAPI INewItem_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *ppv) { INewMenuImpl * ow; @@ -798,14 +842,16 @@ HRESULT WINAPI INewItem_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *p if (!cached_ow) { - ow = LocalAlloc(LMEM_ZEROINIT, sizeof(INewMenuImpl)); - if (!ow) + ow = LocalAlloc(LMEM_ZEROINIT, sizeof(INewMenuImpl)); + if (!ow) { return E_OUTOFMEMORY; } ow->lpVtblContextMenu = &cmvt; + ow->lpvtblShellExtInit = &sei; ow->s_SnHead = NULL; + ow->szPath = NULL; if (InterlockedCompareExchangePointer((void *)&cached_ow, ow, NULL) != NULL) { @@ -814,18 +860,6 @@ HRESULT WINAPI INewItem_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *p } } - TRACE("(%p)->()\n",cached_ow); - res = INewItem_fnQueryInterface( cached_ow, riid, ppv ); return res; } - -VOID INewItem_SetParent(LPSHELLFOLDER pSFParent) -{ - if (cached_ow->pSFParent) - { - IShellFolder_Release(cached_ow->pSFParent); - } - cached_ow->pSFParent = pSFParent; - IShellFolder_AddRef(pSFParent); -} diff --git a/reactos/dll/win32/shell32/undocshell.h b/reactos/dll/win32/shell32/undocshell.h index d4ebf03c1cd..2d2600f98a8 100644 --- a/reactos/dll/win32/shell32/undocshell.h +++ b/reactos/dll/win32/shell32/undocshell.h @@ -178,8 +178,8 @@ typedef struct int WINAPI Shell_GetCachedImageIndex( LPCSTR lpszFileName, - UINT nIconIndex, - BOOL bSimulateDoc); + int nIconIndex, + UINT bSimulateDoc); BOOL WINAPI Shell_GetImageLists( HIMAGELIST *lphimlLarge, From 46ba64139f8ec187c973e4deed3cc1111143db30 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Wed, 20 Aug 2008 17:29:18 +0000 Subject: [PATCH 085/324] - Implement SHParseDisplayName by Paul paulvgenderen at gmail.com svn path=/trunk/; revision=35482 --- reactos/dll/win32/shell32/shellord.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/reactos/dll/win32/shell32/shellord.c b/reactos/dll/win32/shell32/shellord.c index 0fa51324751..98853c7cca2 100644 --- a/reactos/dll/win32/shell32/shellord.c +++ b/reactos/dll/win32/shell32/shellord.c @@ -2128,3 +2128,29 @@ BOOL WINAPI LinkWindow_UnregisterClass(void) return TRUE; } +/************************************************************************* + * SHParseDisplayName [shell version 6.0] + */ +HRESULT WINAPI SHParseDisplayName(LPCWSTR pszName, IBindCtx *pbc, +LPITEMIDLIST *ppidl, SFGAOF sfgaoIn, SFGAOF *psfgaoOut) +{ + IShellFolder * psfDesktop; + HRESULT hr=E_FAIL; + ULONG dwAttr=sfgaoIn; + + if (!pszName || !ppidl || !psfgaoOut) + return E_INVALIDARG; + + hr = SHGetDesktopFolder(&psfDesktop); + if (FAILED(hr)) + return hr; + + hr = IShellFolder_ParseDisplayName(psfDesktop, (HWND)NULL, pbc, (LPOLESTR)pszName, (ULONG *)NULL, ppidl, &dwAttr); + + IShellFolder_Release(psfDesktop); + + if (SUCCEEDED(hr)) + *psfgaoOut = dwAttr; + + return hr; +} From fca286cbda20cd93e8bfd4174d15f4a57e3ca5b7 Mon Sep 17 00:00:00 2001 From: Jeffrey Morlan Date: Wed, 20 Aug 2008 19:15:00 +0000 Subject: [PATCH 086/324] Fix infinite loop during generic table lookups. Patch by Alex Ionescu svn path=/trunk/; revision=35487 --- reactos/lib/rtl/generictable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/lib/rtl/generictable.c b/reactos/lib/rtl/generictable.c index 508eea3f8f8..8f8c0ee91ed 100644 --- a/reactos/lib/rtl/generictable.c +++ b/reactos/lib/rtl/generictable.c @@ -57,7 +57,7 @@ RtlpFindGenericTableNodeOrParent(IN PRTL_GENERIC_TABLE Table, if ((ChildNode = RtlLeftChild(CurrentNode))) { /* Continue searching from this node */ - ChildNode = CurrentNode; + CurrentNode = ChildNode; } else { @@ -72,7 +72,7 @@ RtlpFindGenericTableNodeOrParent(IN PRTL_GENERIC_TABLE Table, if ((ChildNode = RtlRightChild(CurrentNode))) { /* Continue searching from this node */ - ChildNode = CurrentNode; + CurrentNode = ChildNode; } else { From ed0615e6ac437a3269a384d37c75036ac2cc2f0f Mon Sep 17 00:00:00 2001 From: Jeffrey Morlan Date: Wed, 20 Aug 2008 20:55:39 +0000 Subject: [PATCH 087/324] Always set the console's event on any keypress, even in line input mode. svn path=/trunk/; revision=35489 --- reactos/subsystems/win32/csrss/win32csr/conio.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/reactos/subsystems/win32/csrss/win32csr/conio.c b/reactos/subsystems/win32/csrss/win32csr/conio.c index 19223ad0c20..97abfc71d29 100644 --- a/reactos/subsystems/win32/csrss/win32csr/conio.c +++ b/reactos/subsystems/win32/csrss/win32csr/conio.c @@ -960,7 +960,6 @@ ConioProcessChar(PCSRSS_CONSOLE Console, ConsoleInput *KeyEventRecord) { BOOL updown; - BOOL bClientWake = FALSE; ConsoleInput *TempInput; if (0 != (Console->Mode & (ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT))) @@ -1004,8 +1003,6 @@ ConioProcessChar(PCSRSS_CONSOLE Console, { Console->WaitingLines++; } - bClientWake = TRUE; - SetEvent(Console->ActiveEvent); } KeyEventRecord->Echoed = FALSE; if (0 != (Console->Mode & (ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT)) @@ -1037,10 +1034,7 @@ ConioProcessChar(PCSRSS_CONSOLE Console, RemoveEntryList(&KeyEventRecord->ListEntry); HeapFree(Win32CsrApiHeap, 0, KeyEventRecord); Console->WaitingChars -= 2; - } - else - { - SetEvent(Console->ActiveEvent); + return; } } else @@ -1061,10 +1055,7 @@ ConioProcessChar(PCSRSS_CONSOLE Console, } /* Console->WaitingChars++; */ - if (bClientWake || 0 == (Console->Mode & ENABLE_LINE_INPUT)) - { - SetEvent(Console->ActiveEvent); - } + SetEvent(Console->ActiveEvent); } static DWORD FASTCALL From 52aa41d8e0ee0c58648d9cceb6084298a68a193e Mon Sep 17 00:00:00 2001 From: Gregor Brunmar Date: Thu, 21 Aug 2008 02:34:28 +0000 Subject: [PATCH 088/324] * Removed unused header file * Fixed signed/unsigned comparison warning svn path=/trunk/; revision=35497 --- reactos/dll/directx/d3d9/d3d9.h | 3 --- reactos/dll/directx/d3d9/d3d9_helpers.c | 2 +- reactos/dll/directx/d3d9/d3d9_helpers.h | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 reactos/dll/directx/d3d9/d3d9.h diff --git a/reactos/dll/directx/d3d9/d3d9.h b/reactos/dll/directx/d3d9/d3d9.h deleted file mode 100644 index ba1f5287713..00000000000 --- a/reactos/dll/directx/d3d9/d3d9.h +++ /dev/null @@ -1,3 +0,0 @@ -#include - -#define DLLAPI __declspec(dllexport) diff --git a/reactos/dll/directx/d3d9/d3d9_helpers.c b/reactos/dll/directx/d3d9/d3d9_helpers.c index 53f8db80528..7aa331e2c4d 100644 --- a/reactos/dll/directx/d3d9/d3d9_helpers.c +++ b/reactos/dll/directx/d3d9/d3d9_helpers.c @@ -38,7 +38,7 @@ BOOL ReadRegistryValue(IN DWORD ValueType, IN LPCSTR ValueName, OUT LPBYTE DataB return TRUE; } -HRESULT SafeFormatString(OUT LPSTR Buffer, IN LONG BufferSize, IN LPCSTR FormatString, ... ) +HRESULT SafeFormatString(OUT LPSTR Buffer, IN DWORD BufferSize, IN LPCSTR FormatString, ... ) { DWORD BytesWritten; va_list vargs; diff --git a/reactos/dll/directx/d3d9/d3d9_helpers.h b/reactos/dll/directx/d3d9/d3d9_helpers.h index 5e8d54cfe8a..a7556e9653f 100644 --- a/reactos/dll/directx/d3d9/d3d9_helpers.h +++ b/reactos/dll/directx/d3d9/d3d9_helpers.h @@ -16,7 +16,7 @@ BOOL ReadRegistryValue(IN DWORD ValueType, IN LPCSTR ValueName, OUT LPBYTE DataBuffer, IN OUT LPDWORD DataBufferSize); /* Safe string formatting */ -HRESULT SafeFormatString(IN OUT LPSTR Buffer, IN LONG BufferSize, IN LPCSTR FormatString, ... ); +HRESULT SafeFormatString(IN OUT LPSTR Buffer, IN DWORD BufferSize, IN LPCSTR FormatString, ... ); HRESULT SafeCopyString(OUT LPSTR Dst, IN DWORD DstSize, IN LPCSTR Src); HRESULT SafeAppendString(IN OUT LPSTR Dst, IN DWORD DstSize, IN LPCSTR Src); From 4d54d71f8f89c51a6032cdb846d7b83f6bea60c7 Mon Sep 17 00:00:00 2001 From: Gregor Brunmar Date: Thu, 21 Aug 2008 03:19:02 +0000 Subject: [PATCH 089/324] Added some more parameter error checking to D3D9::CreateDevice() svn path=/trunk/; revision=35498 --- reactos/dll/directx/d3d9/d3d9_impl.c | 37 +++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/reactos/dll/directx/d3d9/d3d9_impl.c b/reactos/dll/directx/d3d9/d3d9_impl.c index e6bf562b695..b482afe1672 100644 --- a/reactos/dll/directx/d3d9/d3d9_impl.c +++ b/reactos/dll/directx/d3d9/d3d9_impl.c @@ -923,7 +923,42 @@ static HRESULT WINAPI IDirect3D9Impl_CreateDevice(LPDIRECT3D9 iface, UINT Adapte if (hFocusWindow != NULL && FALSE == IsWindow(hFocusWindow)) { - DPRINT1("Invalid hFocusWindow parameter specified"); + DPRINT1("Invalid hFocusWindow parameter specified, expected NULL or a valid HWND"); + UNLOCK_D3D9(); + return D3DERR_INVALIDCALL; + } + + if (NULL == pPresentationParameters) + { + DPRINT1("Invalid pPresentationParameters parameter specified"); + UNLOCK_D3D9(); + return D3DERR_INVALIDCALL; + } + + if (pPresentationParameters->hDeviceWindow != NULL && FALSE == IsWindow(pPresentationParameters->hDeviceWindow)) + { + DPRINT1("Invalid pPresentationParameters->hDeviceWindow parameter specified, expected NULL or a valid HWND"); + UNLOCK_D3D9(); + return D3DERR_INVALIDCALL; + } + + if (FALSE == pPresentationParameters->Windowed && hFocusWindow == NULL) + { + DPRINT1("When pPresentationParameters->Windowed is not set, hFocusWindow must be a valid HWND"); + UNLOCK_D3D9(); + return D3DERR_INVALIDCALL; + } + + if (NULL == hFocusWindow && NULL == pPresentationParameters->hDeviceWindow) + { + DPRINT1("Any of pPresentationParameters->Windowed and hFocusWindow must be set to a valid HWND"); + UNLOCK_D3D9(); + return D3DERR_INVALIDCALL; + } + + if (Adapter > 0 && NULL == pPresentationParameters->hDeviceWindow) + { + DPRINT1("Invalid pPresentationParameters->hDeviceWindow, must be set to a valid unique HWND when Adapter is greater than 0"); UNLOCK_D3D9(); return D3DERR_INVALIDCALL; } From 36b8b4a111d91ec837723a52c74b2c4f640dca00 Mon Sep 17 00:00:00 2001 From: Art Yerkes Date: Thu, 21 Aug 2008 03:38:49 +0000 Subject: [PATCH 090/324] Merge aicom-network-fixes up to 35486 svn path=/trunk/; revision=35499 --- reactos/drivers/network/afd/afd/info.c | 17 ++++--- reactos/drivers/network/afd/afd/listen.c | 10 ++-- reactos/drivers/network/afd/afd/lock.c | 24 +++++++++- reactos/drivers/network/afd/afd/main.c | 4 +- reactos/drivers/network/afd/afd/read.c | 10 ++++ reactos/drivers/network/afd/afd/write.c | 41 +++++++++------- .../drivers/network/tcpip/tcpip/dispatch.c | 41 ++-------------- reactos/drivers/network/tcpip/tcpip/main.c | 48 +------------------ 8 files changed, 76 insertions(+), 119 deletions(-) diff --git a/reactos/drivers/network/afd/afd/info.c b/reactos/drivers/network/afd/afd/info.c index 231ce6a8d18..3d2c48d9eec 100644 --- a/reactos/drivers/network/afd/afd/info.c +++ b/reactos/drivers/network/afd/afd/info.c @@ -135,22 +135,21 @@ AfdGetSockOrPeerName( PDEVICE_OBJECT DeviceObject, PIRP Irp, if( NT_SUCCESS(Status) ) { Status = TdiQueryInformation - ( FCB->AddressFile.Object, + ( FCB->Connection.Object, TDI_QUERY_CONNECTION_INFO, SysMdl ); } if( NT_SUCCESS(Status) ) { TransAddr = - (PTRANSPORT_ADDRESS)MmMapLockedPages - ( Mdl, IoModifyAccess ); - } + (PTRANSPORT_ADDRESS)MmGetSystemAddressForMdlSafe( Mdl, NormalPagePriority ); - if( TransAddr ) - RtlCopyMemory( TransAddr, ConnInfo->RemoteAddress, - TaLengthOfTransportAddress - ( ConnInfo->RemoteAddress ) ); - else Status = STATUS_INSUFFICIENT_RESOURCES; + if( TransAddr ) + RtlCopyMemory( TransAddr, ConnInfo->RemoteAddress, + TaLengthOfTransportAddress + ( ConnInfo->RemoteAddress ) ); + else Status = STATUS_INSUFFICIENT_RESOURCES; + } if( ConnInfo ) ExFreePool( ConnInfo ); if( SysMdl ) IoFreeMdl( SysMdl ); diff --git a/reactos/drivers/network/afd/afd/listen.c b/reactos/drivers/network/afd/afd/listen.c index 0d3d26a7590..82397106aee 100644 --- a/reactos/drivers/network/afd/afd/listen.c +++ b/reactos/drivers/network/afd/afd/listen.c @@ -87,15 +87,15 @@ static NTSTATUS NTAPI ListenComplete PAFD_FCB FCB = (PAFD_FCB)Context; PAFD_TDI_OBJECT_QELT Qelt; + if( Irp->Cancel ) { + if( FCB ) FCB->ListenIrp.InFlightRequest = NULL; + return STATUS_CANCELLED; + } + if( !SocketAcquireStateLock( FCB ) ) return Status; FCB->ListenIrp.InFlightRequest = NULL; - if( Irp->Cancel ) { - SocketStateUnlock( FCB ); - return STATUS_SUCCESS; - } - if( FCB->State == SOCKET_STATE_CLOSED ) { SocketStateUnlock( FCB ); DestroySocket( FCB ); diff --git a/reactos/drivers/network/afd/afd/lock.c b/reactos/drivers/network/afd/afd/lock.c index 9858b59d8ad..ed7227e5708 100644 --- a/reactos/drivers/network/afd/afd/lock.c +++ b/reactos/drivers/network/afd/afd/lock.c @@ -15,6 +15,8 @@ /* Lock a method_neither request so it'll be available from DISPATCH_LEVEL */ PVOID LockRequest( PIRP Irp, PIO_STACK_LOCATION IrpSp ) { + BOOLEAN LockFailed = FALSE; + Irp->MdlAddress = IoAllocateMdl( IrpSp->Parameters.DeviceIoControl.Type3InputBuffer, IrpSp->Parameters.DeviceIoControl.InputBufferLength, @@ -22,14 +24,34 @@ PVOID LockRequest( PIRP Irp, PIO_STACK_LOCATION IrpSp ) { FALSE, NULL ); if( Irp->MdlAddress ) { - MmProbeAndLockPages( Irp->MdlAddress, KernelMode, IoModifyAccess ); + _SEH_TRY { + MmProbeAndLockPages( Irp->MdlAddress, KernelMode, IoModifyAccess ); + } _SEH_HANDLE { + LockFailed = TRUE; + } _SEH_END; + + if( LockFailed ) { + IoFreeMdl( Irp->MdlAddress ); + Irp->MdlAddress = NULL; + return NULL; + } + IrpSp->Parameters.DeviceIoControl.Type3InputBuffer = MmMapLockedPages( Irp->MdlAddress, KernelMode ); + + if( !IrpSp->Parameters.DeviceIoControl.Type3InputBuffer ) { + IoFreeMdl( Irp->MdlAddress ); + Irp->MdlAddress = NULL; + return NULL; + } + return IrpSp->Parameters.DeviceIoControl.Type3InputBuffer; } else return NULL; } VOID UnlockRequest( PIRP Irp, PIO_STACK_LOCATION IrpSp ) { + if( !IrpSp->Parameters.DeviceIoControl.Type3InputBuffer || !Irp->MdlAddress ) return; + MmUnmapLockedPages( IrpSp->Parameters.DeviceIoControl.Type3InputBuffer, Irp->MdlAddress ); MmUnlockPages( Irp->MdlAddress ); diff --git a/reactos/drivers/network/afd/afd/main.c b/reactos/drivers/network/afd/afd/main.c index ae461883196..1da4a927220 100644 --- a/reactos/drivers/network/afd/afd/main.c +++ b/reactos/drivers/network/afd/afd/main.c @@ -190,9 +190,7 @@ VOID DestroySocket( PAFD_FCB FCB ) { if( InFlightRequest[i]->InFlightRequest ) { AFD_DbgPrint(MID_TRACE,("Cancelling in flight irp %d (%x)\n", i, InFlightRequest[i]->InFlightRequest)); - InFlightRequest[i]->InFlightRequest->IoStatus.Status = STATUS_CANCELLED; - InFlightRequest[i]->InFlightRequest->IoStatus.Information = 0; - IoCancelIrp( InFlightRequest[i]->InFlightRequest ); + InFlightRequest[i]->InFlightRequest = NULL; } } diff --git a/reactos/drivers/network/afd/afd/read.c b/reactos/drivers/network/afd/afd/read.c index 048678c0e76..59f076ddf25 100644 --- a/reactos/drivers/network/afd/afd/read.c +++ b/reactos/drivers/network/afd/afd/read.c @@ -233,6 +233,11 @@ NTSTATUS NTAPI ReceiveComplete ASSERT_IRQL(APC_LEVEL); + if( Irp->Cancel ) { + if( FCB ) FCB->ReceiveIrp.InFlightRequest = NULL; + return STATUS_CANCELLED; + } + if( !SocketAcquireStateLock( FCB ) ) return Status; FCB->ReceiveIrp.InFlightRequest = NULL; @@ -449,6 +454,11 @@ PacketSocketRecvComplete( AFD_DbgPrint(MID_TRACE,("Called on %x\n", FCB)); + if( Irp->Cancel ) { + if( FCB ) FCB->ReceiveIrp.InFlightRequest = NULL; + return STATUS_CANCELLED; + } + if( !SocketAcquireStateLock( FCB ) ) return STATUS_FILE_CLOSED; FCB->ReceiveIrp.InFlightRequest = NULL; diff --git a/reactos/drivers/network/afd/afd/write.c b/reactos/drivers/network/afd/afd/write.c index c2341e66faf..dc9ada72e30 100644 --- a/reactos/drivers/network/afd/afd/write.c +++ b/reactos/drivers/network/afd/afd/write.c @@ -40,6 +40,11 @@ static NTSTATUS NTAPI SendComplete ASSERT_IRQL(APC_LEVEL); + if( Irp->Cancel ) { + if( FCB ) FCB->SendIrp.InFlightRequest = NULL; + return STATUS_CANCELLED; + } + if( !SocketAcquireStateLock( FCB ) ) return Status; FCB->SendIrp.InFlightRequest = NULL; @@ -170,6 +175,11 @@ static NTSTATUS NTAPI PacketSocketSendComplete Irp->IoStatus.Status, Irp->IoStatus.Information)); + if( Irp->Cancel ) { + if( FCB ) FCB->SendIrp.InFlightRequest = NULL; + return STATUS_CANCELLED; + } + /* It's ok if the FCB already died */ if( !SocketAcquireStateLock( FCB ) ) return STATUS_SUCCESS; @@ -264,22 +274,6 @@ AfdConnectedSocketWriteData(PDEVICE_OBJECT DeviceObject, PIRP Irp, return UnlockAndMaybeComplete ( FCB, STATUS_NO_MEMORY, Irp, TotalBytesCopied, NULL ); - AFD_DbgPrint(MID_TRACE,("Socket state %d\n", FCB->State)); - - if( FCB->State != SOCKET_STATE_CONNECTED ) { - if( SendReq->AfdFlags & AFD_IMMEDIATE ) { - AFD_DbgPrint(MID_TRACE,("Nonblocking\n")); - return UnlockAndMaybeComplete - ( FCB, STATUS_CANT_WAIT, Irp, 0, NULL ); - } else { - AFD_DbgPrint(MID_TRACE,("Queuing request\n")); - return LeaveIrpUntilLater( FCB, Irp, FUNCTION_SEND ); - } - } - - AFD_DbgPrint(MID_TRACE,("We already have %d bytes waiting.\n", - FCB->Send.BytesUsed)); - SendReq->BufferArray = LockBuffers( SendReq->BufferArray, SendReq->BufferCount, NULL, NULL, @@ -290,6 +284,20 @@ AfdConnectedSocketWriteData(PDEVICE_OBJECT DeviceObject, PIRP Irp, Irp, 0, NULL ); } + AFD_DbgPrint(MID_TRACE,("Socket state %d\n", FCB->State)); + + if( FCB->State != SOCKET_STATE_CONNECTED ) { + if( SendReq->AfdFlags & AFD_IMMEDIATE ) { + AFD_DbgPrint(MID_TRACE,("Nonblocking\n")); + UnlockBuffers( SendReq->BufferArray, SendReq->BufferCount, FALSE ); + return UnlockAndMaybeComplete + ( FCB, STATUS_CANT_WAIT, Irp, 0, NULL ); + } else { + AFD_DbgPrint(MID_TRACE,("Queuing request\n")); + return LeaveIrpUntilLater( FCB, Irp, FUNCTION_SEND ); + } + } + AFD_DbgPrint(MID_TRACE,("FCB->Send.BytesUsed = %d\n", FCB->Send.BytesUsed)); @@ -362,6 +370,7 @@ AfdConnectedSocketWriteData(PDEVICE_OBJECT DeviceObject, PIRP Irp, if( SendReq->AfdFlags & AFD_IMMEDIATE ) { AFD_DbgPrint(MID_TRACE,("Nonblocking\n")); + UnlockBuffers( SendReq->BufferArray, SendReq->BufferCount, FALSE ); return UnlockAndMaybeComplete ( FCB, STATUS_CANT_WAIT, Irp, 0, NULL ); } else { diff --git a/reactos/drivers/network/tcpip/tcpip/dispatch.c b/reactos/drivers/network/tcpip/tcpip/dispatch.c index 9c7cbeca6b5..d48653d1c40 100644 --- a/reactos/drivers/network/tcpip/tcpip/dispatch.c +++ b/reactos/drivers/network/tcpip/tcpip/dispatch.c @@ -53,34 +53,6 @@ NTSTATUS DispPrepareIrpForCancel( return IRPFinish(Irp, STATUS_CANCELLED); } - -VOID DispCancelComplete( - PVOID Context) -/* - * FUNCTION: Completes a cancel request - * ARGUMENTS: - * Context = Pointer to context information (FILE_OBJECT) - */ -{ - /*KIRQL OldIrql;*/ - PFILE_OBJECT FileObject; - PTRANSPORT_CONTEXT TranContext; - - TI_DbgPrint(DEBUG_IRP, ("Called.\n")); - - FileObject = (PFILE_OBJECT)Context; - TranContext = (PTRANSPORT_CONTEXT)FileObject->FsContext; - - /* Set the cleanup event */ - KeSetEvent(&TranContext->CleanupEvent, 0, FALSE); - - /* We are expected to release the cancel spin lock */ - /*IoReleaseCancelSpinLock(OldIrql);*/ - - TI_DbgPrint(DEBUG_IRP, ("Leaving.\n")); -} - - VOID DispDataRequestComplete( PVOID Context, NTSTATUS Status, @@ -155,8 +127,6 @@ VOID DispDoDisconnect( PVOID Data ) { TI_DbgPrint(DEBUG_IRP, ("PostCancel: DoDisconnect done\n")); DispDataRequestComplete(DisType->Irp, STATUS_CANCELLED, 0); - - DispCancelComplete(DisType->FileObject); } VOID NTAPI DispCancelRequest( @@ -209,24 +179,20 @@ VOID NTAPI DispCancelRequest( if( !ChewCreate( &WorkItem, sizeof(DISCONNECT_TYPE), DispDoDisconnect, &DisType ) ) ASSERT(0); - break; + return; case TDI_SEND_DATAGRAM: if (FileObject->FsContext2 != (PVOID)TDI_TRANSPORT_ADDRESS_FILE) { TI_DbgPrint(MIN_TRACE, ("TDI_SEND_DATAGRAM, but no address file.\n")); - break; } - - /*DGCancelSendRequest(TranContext->Handle.AddressHandle, Irp);*/ break; case TDI_RECEIVE_DATAGRAM: if (FileObject->FsContext2 != (PVOID)TDI_TRANSPORT_ADDRESS_FILE) { TI_DbgPrint(MIN_TRACE, ("TDI_RECEIVE_DATAGRAM, but no address file.\n")); - break; } - /*DGCancelReceiveRequest(TranContext->Handle.AddressHandle, Irp);*/ + DGRemoveIRP(TranContext->Handle.AddressHandle, Irp); break; default: @@ -235,6 +201,7 @@ VOID NTAPI DispCancelRequest( } IoReleaseCancelSpinLock(Irp->CancelIrql); + IoCompleteRequest(Irp, IO_NO_INCREMENT); TI_DbgPrint(MAX_TRACE, ("Leaving.\n")); } @@ -280,8 +247,6 @@ VOID NTAPI DispCancelListenRequest( DispDataRequestComplete(Irp, STATUS_CANCELLED, 0); - DispCancelComplete(FileObject); - TI_DbgPrint(MAX_TRACE, ("Leaving.\n")); } diff --git a/reactos/drivers/network/tcpip/tcpip/main.c b/reactos/drivers/network/tcpip/tcpip/main.c index 19c5a67a681..a7ef85812df 100644 --- a/reactos/drivers/network/tcpip/tcpip/main.c +++ b/reactos/drivers/network/tcpip/tcpip/main.c @@ -138,7 +138,6 @@ CP } CP Context->CancelIrps = FALSE; - KeInitializeEvent(&Context->CleanupEvent, NotificationEvent, FALSE); CP IrpSp = IoGetCurrentIrpStackLocation(Irp); IrpSp->FileObject->FsContext = Context; @@ -253,36 +252,6 @@ CP return Status; } - -VOID TiCleanupFileObjectComplete( - PVOID Context, - NTSTATUS Status) -/* - * FUNCTION: Completes an object cleanup IRP I/O request - * ARGUMENTS: - * Context = Pointer to the IRP for this request - * Status = Final status of the operation - */ -{ - PIRP Irp; - PIO_STACK_LOCATION IrpSp; - PTRANSPORT_CONTEXT TranContext; - KIRQL OldIrql; - - Irp = (PIRP)Context; - IrpSp = IoGetCurrentIrpStackLocation(Irp); - TranContext = (PTRANSPORT_CONTEXT)IrpSp->FileObject->FsContext; - - Irp->IoStatus.Status = Status; - - IoAcquireCancelSpinLock(&OldIrql); - - KeSetEvent(&TranContext->CleanupEvent, 0, FALSE); - - IoReleaseCancelSpinLock(OldIrql); -} - - /* * FUNCTION: Releases resources used by a file object * ARGUMENTS: @@ -313,13 +282,9 @@ NTSTATUS TiCleanupFileObject( IoAcquireCancelSpinLock(&OldIrql); Context->CancelIrps = TRUE; - KeResetEvent(&Context->CleanupEvent); IoReleaseCancelSpinLock(OldIrql); - Request.RequestNotifyObject = TiCleanupFileObjectComplete; - Request.RequestContext = Irp; - switch ((ULONG_PTR)IrpSp->FileObject->FsContext2) { case TDI_TRANSPORT_ADDRESS_FILE: Request.Handle.AddressHandle = Context->Handle.AddressHandle; @@ -345,19 +310,8 @@ NTSTATUS TiCleanupFileObject( Context->CancelIrps = FALSE; IoReleaseCancelSpinLock(OldIrql); - Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; + Status = STATUS_INVALID_PARAMETER; - return Irp->IoStatus.Status; - } - - if (Status != STATUS_PENDING) - { - IoAcquireCancelSpinLock(&OldIrql); - KeSetEvent(&Context->CleanupEvent, 0, FALSE); - IoReleaseCancelSpinLock(OldIrql); - - KeWaitForSingleObject(&Context->CleanupEvent, - UserRequest, KernelMode, FALSE, NULL); } Irp->IoStatus.Status = Status; From d1213e5977cba5a2e926add30006ae690719a67c Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Thu, 21 Aug 2008 10:58:53 +0000 Subject: [PATCH 091/324] - Fix definition of BOOT_DRIVER_LIST_ENTRY (Information provided by Alex Ionescu). svn path=/trunk/; revision=35502 --- reactos/boot/freeldr/freeldr/windows/winldr.c | 16 ++++++++-------- .../boot/freeldr/freeldr/windows/wlregistry.c | 4 ++-- reactos/include/reactos/arc/arc.h | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/reactos/boot/freeldr/freeldr/windows/winldr.c b/reactos/boot/freeldr/freeldr/windows/winldr.c index 4bd5ee5002f..5b2976e033b 100644 --- a/reactos/boot/freeldr/freeldr/windows/winldr.c +++ b/reactos/boot/freeldr/freeldr/windows/winldr.c @@ -332,16 +332,16 @@ WinLdrLoadBootDrivers(PLOADER_PARAMETER_BLOCK LoaderBlock, while (NextBd != &LoaderBlock->BootDriverListHead) { - BootDriver = CONTAINING_RECORD(NextBd, BOOT_DRIVER_LIST_ENTRY, ListEntry); + BootDriver = CONTAINING_RECORD(NextBd, BOOT_DRIVER_LIST_ENTRY, Link); DbgPrint((DPRINT_WINDOWS, "BootDriver %wZ DTE %08X RegPath: %wZ\n", &BootDriver->FilePath, - BootDriver->DataTableEntry, &BootDriver->RegistryPath)); + BootDriver->LdrEntry, &BootDriver->RegistryPath)); // Paths are relative (FIXME: Are they always relative?) // Load it Status = WinLdrLoadDeviceDriver(LoaderBlock, BootPath, &BootDriver->FilePath, - 0, &BootDriver->DataTableEntry); + 0, &BootDriver->LdrEntry); // If loading failed - cry loudly //FIXME: Maybe remove it from the list and try to continue? @@ -353,9 +353,9 @@ WinLdrLoadBootDrivers(PLOADER_PARAMETER_BLOCK LoaderBlock, // Convert the RegistryPath and DTE addresses to VA since we are not going to use it anymore BootDriver->RegistryPath.Buffer = PaToVa(BootDriver->RegistryPath.Buffer); - BootDriver->DataTableEntry = PaToVa(BootDriver->DataTableEntry); + BootDriver->LdrEntry = PaToVa(BootDriver->LdrEntry); - NextBd = BootDriver->ListEntry.Flink; + NextBd = BootDriver->Link.Flink; } return TRUE; @@ -620,12 +620,12 @@ WinLdrpDumpBootDriver(PLOADER_PARAMETER_BLOCK LoaderBlock) while (NextBd != &LoaderBlock->BootDriverListHead) { - BootDriver = CONTAINING_RECORD(NextBd, BOOT_DRIVER_LIST_ENTRY, ListEntry); + BootDriver = CONTAINING_RECORD(NextBd, BOOT_DRIVER_LIST_ENTRY, Link); DbgPrint((DPRINT_WINDOWS, "BootDriver %wZ DTE %08X RegPath: %wZ\n", &BootDriver->FilePath, - BootDriver->DataTableEntry, &BootDriver->RegistryPath)); + BootDriver->LdrEntry, &BootDriver->RegistryPath)); - NextBd = BootDriver->ListEntry.Flink; + NextBd = BootDriver->Link.Flink; } } diff --git a/reactos/boot/freeldr/freeldr/windows/wlregistry.c b/reactos/boot/freeldr/freeldr/windows/wlregistry.c index 026b61050cb..20693ed0e2d 100644 --- a/reactos/boot/freeldr/freeldr/windows/wlregistry.c +++ b/reactos/boot/freeldr/freeldr/windows/wlregistry.c @@ -685,7 +685,7 @@ WinLdrAddDriverToList(LIST_ENTRY *BootDriverListHead, return FALSE; // DTE will be filled during actual load of the driver - BootDriverEntry->DataTableEntry = NULL; + BootDriverEntry->LdrEntry = NULL; // Check - if we have a valid ImagePath, if not - we need to build it // like "System32\\Drivers\\blah.sys" @@ -768,7 +768,7 @@ WinLdrAddDriverToList(LIST_ENTRY *BootDriverListHead, return FALSE; // Insert entry at top of the list - InsertTailList(BootDriverListHead, &BootDriverEntry->ListEntry); + InsertTailList(BootDriverListHead, &BootDriverEntry->Link); return TRUE; } diff --git a/reactos/include/reactos/arc/arc.h b/reactos/include/reactos/arc/arc.h index b57001bae81..1e3f7d738f0 100644 --- a/reactos/include/reactos/arc/arc.h +++ b/reactos/include/reactos/arc/arc.h @@ -118,10 +118,10 @@ typedef struct _MEMORY_ALLOCATION_DESCRIPTOR typedef struct _BOOT_DRIVER_LIST_ENTRY { - LIST_ENTRY ListEntry; + LIST_ENTRY Link; UNICODE_STRING FilePath; UNICODE_STRING RegistryPath; - struct _LDR_DATA_TABLE_ENTRY *DataTableEntry; + struct _LDR_DATA_TABLE_ENTRY *LdrEntry; } BOOT_DRIVER_LIST_ENTRY, *PBOOT_DRIVER_LIST_ENTRY; typedef struct _ARC_DISK_SIGNATURE From 4af75670080e97169135974def68f1926604cb78 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Thu, 21 Aug 2008 11:04:50 +0000 Subject: [PATCH 092/324] - Add missing MmCallDllInitialize prototype. - Make IopOpenRegistryKeyEx NTAPI. - Patch by Alex Ionescu. svn path=/trunk/; revision=35503 --- reactos/ntoskrnl/include/internal/io.h | 1 + reactos/ntoskrnl/include/internal/mm.h | 7 +++++++ reactos/ntoskrnl/io/pnpmgr/pnpmgr.c | 1 + 3 files changed, 9 insertions(+) diff --git a/reactos/ntoskrnl/include/internal/io.h b/reactos/ntoskrnl/include/internal/io.h index 235ab7ffda1..ca656d2b8a0 100644 --- a/reactos/ntoskrnl/include/internal/io.h +++ b/reactos/ntoskrnl/include/internal/io.h @@ -583,6 +583,7 @@ IopInitializePnpServices( IN BOOLEAN BootDrivers); NTSTATUS +NTAPI IopOpenRegistryKeyEx( PHANDLE KeyHandle, HANDLE ParentKey, diff --git a/reactos/ntoskrnl/include/internal/mm.h b/reactos/ntoskrnl/include/internal/mm.h index fb0cb2c0779..6ef55cb4277 100644 --- a/reactos/ntoskrnl/include/internal/mm.h +++ b/reactos/ntoskrnl/include/internal/mm.h @@ -1547,6 +1547,13 @@ MmCheckSystemImage( IN BOOLEAN PurgeSection ); +NTSTATUS +NTAPI +MmCallDllInitialize( + IN PLDR_DATA_TABLE_ENTRY LdrEntry, + IN PLIST_ENTRY ListHead +); + /* ReactOS Mm Hack */ VOID FASTCALL diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c index 7d5068d306a..ae63ab0c0e0 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c @@ -2669,6 +2669,7 @@ IopUpdateRootKey(VOID) } NTSTATUS +NTAPI IopOpenRegistryKeyEx(PHANDLE KeyHandle, HANDLE ParentKey, PUNICODE_STRING Name, From 07912f2b23068a98e1374cbb0b999a2b4a08b153 Mon Sep 17 00:00:00 2001 From: Jeffrey Morlan Date: Thu, 21 Aug 2008 15:33:59 +0000 Subject: [PATCH 093/324] - Implement X>&Y redirections. Hold redirections in a linked list structure, because order matters (>x 2>&1 is not the same as 2>&1 >x). Allow redirection of any handle number from 0 to 9. - Allow quotes around the redirection file name. - Batch: Fix buffer overflow bug (incorrect size for bc->BatchFilePath) svn path=/trunk/; revision=35508 --- reactos/base/shell/cmd/batch.c | 29 ++-- reactos/base/shell/cmd/batch.h | 6 +- reactos/base/shell/cmd/call.c | 13 +- reactos/base/shell/cmd/cmd.c | 206 ++---------------------- reactos/base/shell/cmd/cmd.h | 20 ++- reactos/base/shell/cmd/for.c | 4 +- reactos/base/shell/cmd/misc.c | 12 ++ reactos/base/shell/cmd/redir.c | 283 +++++++++++++++++++-------------- reactos/base/shell/cmd/start.c | 11 -- 9 files changed, 221 insertions(+), 363 deletions(-) diff --git a/reactos/base/shell/cmd/batch.c b/reactos/base/shell/cmd/batch.c index bbf1ff5a63f..752eb1f9bc7 100644 --- a/reactos/base/shell/cmd/batch.c +++ b/reactos/base/shell/cmd/batch.c @@ -194,6 +194,9 @@ VOID ExitBatch (LPTSTR msg) if (bc->ffind) cmd_free(bc->ffind); + UndoRedirection(bc->RedirList, NULL); + FreeRedirection(bc->RedirList); + /* Preserve echo state across batch calls */ bEcho = bc->bEcho; @@ -248,9 +251,7 @@ BOOL Batch (LPTSTR fullname, LPTSTR firstword, LPTSTR param) n->prev = bc; bc = n; - bc->In[0] = _T('\0'); - bc->Out[0] = _T('\0'); - bc->Err[0] = _T('\0'); + bc->RedirList = NULL; } else if (bc->hBatchFile != INVALID_HANDLE_VALUE) { @@ -263,7 +264,7 @@ BOOL Batch (LPTSTR fullname, LPTSTR firstword, LPTSTR param) cmd_free (bc->raw_params); } - GetFullPathName(fullname, sizeof(bc->BatchFilePath), bc->BatchFilePath, &tmp); + GetFullPathName(fullname, sizeof(bc->BatchFilePath) / sizeof(TCHAR), bc->BatchFilePath, &tmp); *tmp = '\0'; bc->hBatchFile = hFile; @@ -300,17 +301,23 @@ BOOL Batch (LPTSTR fullname, LPTSTR firstword, LPTSTR param) return TRUE; } -VOID AddBatchRedirection(TCHAR * ifn, TCHAR * ofn, TCHAR * efn) +VOID AddBatchRedirection(REDIRECTION **RedirList) { + REDIRECTION **ListEnd; + if(!bc) return; - if(_tcslen(ifn)) - _tcscpy(bc->In,ifn); - if(_tcslen(ofn)) - _tcscpy(bc->Out,ofn); - if(_tcslen(efn)) - _tcscpy(bc->Err,efn); + /* Prepend the list to the batch context's list */ + ListEnd = RedirList; + while (*ListEnd) + ListEnd = &(*ListEnd)->Next; + *ListEnd = bc->RedirList; + bc->RedirList = *RedirList; + + /* Null out the pointer so that the list will not be cleared prematurely. + * These redirections should persist until the batch file exits. */ + *RedirList = NULL; } /* diff --git a/reactos/base/shell/cmd/batch.h b/reactos/base/shell/cmd/batch.h index 85e8edd7252..badf2b57e38 100644 --- a/reactos/base/shell/cmd/batch.h +++ b/reactos/base/shell/cmd/batch.h @@ -19,9 +19,7 @@ typedef struct tagBATCHCONTEXT INT shiftlevel; BOOL bEcho; /* Preserve echo flag across batch calls */ HANDLE hFind; /* Preserve find handle when doing a for */ - TCHAR In[MAX_PATH]; - TCHAR Out[MAX_PATH]; - TCHAR Err[MAX_PATH]; + REDIRECTION *RedirList; TCHAR forvar; INT bCmdBlock; BOOL bExecuteBlock[MAX_PATH]; @@ -47,6 +45,6 @@ LPTSTR BatchParams (LPTSTR, LPTSTR); VOID ExitBatch (LPTSTR); BOOL Batch (LPTSTR, LPTSTR, LPTSTR); LPTSTR ReadBatchLine (LPBOOL); -VOID AddBatchRedirection(TCHAR *, TCHAR *, TCHAR *); +VOID AddBatchRedirection(REDIRECTION **); #endif /* _BATCH_H_INCLUDED_ */ diff --git a/reactos/base/shell/cmd/call.c b/reactos/base/shell/cmd/call.c index f90dfeeab9c..084bfda3ba3 100644 --- a/reactos/base/shell/cmd/call.c +++ b/reactos/base/shell/cmd/call.c @@ -76,19 +76,8 @@ INT cmd_call (LPTSTR cmd, LPTSTR param) bc->shiftlevel = 0; bc->forvar = 0; /* HBP004 */ bc->forproto = NULL; /* HBP004 */ + bc->RedirList = NULL; ParseCommandLine (param); - if (bc->prev) - { - _tcscpy(bc->In, bc->prev->In); - _tcscpy(bc->Out, bc->prev->Out); - _tcscpy(bc->Err, bc->prev->Err); - } - else - { - bc->In[0] = _T('\0'); - bc->Out[0] = _T('\0'); - bc->Err[0] = _T('\0'); - } /* Wasn't a batch file so remove conext */ diff --git a/reactos/base/shell/cmd/cmd.c b/reactos/base/shell/cmd/cmd.c index 84c1e959069..3b916332b4c 100644 --- a/reactos/base/shell/cmd/cmd.c +++ b/reactos/base/shell/cmd/cmd.c @@ -690,21 +690,16 @@ VOID ParseCommandLine (LPTSTR cmd) TCHAR cmdline[CMDLINE_LENGTH]; LPTSTR s; #ifdef FEATURE_REDIRECTION - TCHAR in[CMDLINE_LENGTH] = _T(""); - TCHAR out[CMDLINE_LENGTH] = _T(""); - TCHAR err[CMDLINE_LENGTH] = _T(""); + REDIRECTION *RedirList = NULL; TCHAR szTempPath[MAX_PATH] = _T(".\\"); TCHAR szFileName[2][MAX_PATH] = {_T(""), _T("")}; HANDLE hFile[2] = {INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE}; - LPTSTR t = NULL; INT num = 0; - INT nRedirFlags = 0; INT Length; UINT Attributes; BOOL bNewBatch = TRUE; HANDLE hOldConIn; HANDLE hOldConOut; - HANDLE hOldConErr; #endif /* FEATURE_REDIRECTION */ _tcscpy (cmdline, cmd); @@ -732,65 +727,18 @@ VOID ParseCommandLine (LPTSTR cmd) _tcscat (szTempPath, _T("\\")); /* get the redirections from the command line */ - num = GetRedirection (s, in, out, err, &nRedirFlags); + num = GetRedirection (s, &RedirList); - /* more efficient, but do we really need to do this? */ - for (t = in; _istspace (*t); t++) - ; - _tcscpy (in, t); - - for (t = out; _istspace (*t); t++) - ; - _tcscpy (out, t); - - for (t = err; _istspace (*t); t++) - ; - _tcscpy (err, t); - - if(bc && !_tcslen (in) && _tcslen (bc->In)) - _tcscpy(in, bc->In); - if(bc && !out[0] && _tcslen(bc->Out)) + if (!PerformRedirection(RedirList)) { - nRedirFlags |= OUTPUT_APPEND; - _tcscpy(out, bc->Out); - } - if(bc && !_tcslen (err) && _tcslen (bc->Err)) - { - nRedirFlags |= ERROR_APPEND; - _tcscpy(err, bc->Err); + FreeRedirection(RedirList); + return; } /* Set up the initial conditions ... */ - /* preserve STDIN, STDOUT and STDERR handles */ + /* preserve STDIN and STDOUT handles */ hOldConIn = GetStdHandle (STD_INPUT_HANDLE); hOldConOut = GetStdHandle (STD_OUTPUT_HANDLE); - hOldConErr = GetStdHandle (STD_ERROR_HANDLE); - - /* redirect STDIN */ - if (in[0]) - { - HANDLE hFile; - SECURITY_ATTRIBUTES sa = {sizeof(SECURITY_ATTRIBUTES), NULL, TRUE}; - - /* we need make sure the LastError msg is zero before calling CreateFile */ - SetLastError(0); - - /* Set up pipe for the standard input handler */ - hFile = CreateFile (in, GENERIC_READ, FILE_SHARE_READ, &sa, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, NULL); - if (hFile == INVALID_HANDLE_VALUE) - { - ConErrResPrintf(STRING_CMD_ERROR1, in); - return; - } - - if (!SetStdHandle (STD_INPUT_HANDLE, hFile)) - { - ConErrResPrintf(STRING_CMD_ERROR1, in); - return; - } - TRACE ("Input redirected from: %s\n", debugstr_aw(in)); - } /* Now do all but the last pipe command */ *szFileName[0] = _T('\0'); @@ -855,123 +803,7 @@ VOID ParseCommandLine (LPTSTR cmd) } /* Now set up the end conditions... */ - /* redirect STDOUT */ - if (out[0]) - { - /* Final output to here */ - HANDLE hFile; - SECURITY_ATTRIBUTES sa = {sizeof(SECURITY_ATTRIBUTES), NULL, TRUE}; - - /* we need make sure the LastError msg is zero before calling CreateFile */ - SetLastError(0); - - hFile = CreateFile (out, GENERIC_WRITE, FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE, &sa, - (nRedirFlags & OUTPUT_APPEND) ? OPEN_ALWAYS : CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL | FILE_FLAG_WRITE_THROUGH, NULL); - - if (hFile == INVALID_HANDLE_VALUE) - { - INT size = _tcslen(out)-1; - - if (out[size] != _T(':')) - { - ConErrResPrintf(STRING_CMD_ERROR3, out); - return; - } - - out[size]=_T('\0'); - hFile = CreateFile (out, GENERIC_WRITE, FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE, &sa, - (nRedirFlags & OUTPUT_APPEND) ? OPEN_ALWAYS : CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL | FILE_FLAG_WRITE_THROUGH, NULL); - - if (hFile == INVALID_HANDLE_VALUE) - { - ConErrResPrintf(STRING_CMD_ERROR3, out); - return; - } - - } - - if (!SetStdHandle (STD_OUTPUT_HANDLE, hFile)) - { - ConErrResPrintf(STRING_CMD_ERROR3, out); - return; - } - - if (nRedirFlags & OUTPUT_APPEND) - { - LONG lHighPos = 0; - - if (GetFileType (hFile) == FILE_TYPE_DISK) - SetFilePointer (hFile, 0, &lHighPos, FILE_END); - } - TRACE ("Output redirected to: %s\n", debugstr_aw(out)); - } - else if (hOldConOut != INVALID_HANDLE_VALUE) - { - /* Restore original stdout */ - HANDLE hOut = GetStdHandle (STD_OUTPUT_HANDLE); - SetStdHandle (STD_OUTPUT_HANDLE, hOldConOut); - if (hOldConOut != hOut) - CloseHandle (hOut); - hOldConOut = INVALID_HANDLE_VALUE; - } - - /* redirect STDERR */ - if (err[0]) - { - /* Final output to here */ - HANDLE hFile; - SECURITY_ATTRIBUTES sa = {sizeof(SECURITY_ATTRIBUTES), NULL, TRUE}; - - if (!_tcscmp (err, out)) - { - TRACE ("Stdout and stderr will use the same file!!\n"); - DuplicateHandle (GetCurrentProcess (), - GetStdHandle (STD_OUTPUT_HANDLE), - GetCurrentProcess (), - &hFile, 0, TRUE, DUPLICATE_SAME_ACCESS); - } - else - { - hFile = CreateFile (err, - GENERIC_WRITE, - FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE, - &sa, - (nRedirFlags & ERROR_APPEND) ? OPEN_ALWAYS : CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL | FILE_FLAG_WRITE_THROUGH, - NULL); - if (hFile == INVALID_HANDLE_VALUE) - { - ConErrResPrintf(STRING_CMD_ERROR3, err); - return; - } - } - - if (!SetStdHandle (STD_ERROR_HANDLE, hFile)) - { - ConErrResPrintf(STRING_CMD_ERROR3, err); - return; - } - - if (nRedirFlags & ERROR_APPEND) - { - LONG lHighPos = 0; - - if (GetFileType (hFile) == FILE_TYPE_DISK) - SetFilePointer (hFile, 0, &lHighPos, FILE_END); - } - TRACE ("Error redirected to: %s\n", debugstr_aw(err)); - } - else if (hOldConErr != INVALID_HANDLE_VALUE) - { - /* Restore original stderr */ - HANDLE hErr = GetStdHandle (STD_ERROR_HANDLE); - SetStdHandle (STD_ERROR_HANDLE, hOldConErr); - if (hOldConErr != hErr) - CloseHandle (hErr); - hOldConErr = INVALID_HANDLE_VALUE; - } + SetStdHandle(STD_OUTPUT_HANDLE, hOldConOut); if(bc) bNewBatch = FALSE; @@ -982,7 +814,7 @@ VOID ParseCommandLine (LPTSTR cmd) #ifdef FEATURE_REDIRECTION if(bNewBatch && bc) - AddBatchRedirection(in, out, err); + AddBatchRedirection(&RedirList); /* close old stdin file */ #if 0 /* buggy implementation */ SetStdHandle (STD_INPUT_HANDLE, hOldConIn); @@ -1039,26 +871,8 @@ VOID ParseCommandLine (LPTSTR cmd) } } - - /* Restore original STDOUT */ - if (hOldConOut != INVALID_HANDLE_VALUE) - { - HANDLE hOut = GetStdHandle (STD_OUTPUT_HANDLE); - SetStdHandle (STD_OUTPUT_HANDLE, hOldConOut); - if (hOldConOut != hOut) - CloseHandle (hOut); - hOldConOut = INVALID_HANDLE_VALUE; - } - - /* Restore original STDERR */ - if (hOldConErr != INVALID_HANDLE_VALUE) - { - HANDLE hErr = GetStdHandle (STD_ERROR_HANDLE); - SetStdHandle (STD_ERROR_HANDLE, hOldConErr); - if (hOldConErr != hErr) - CloseHandle (hErr); - hOldConErr = INVALID_HANDLE_VALUE; - } + UndoRedirection(RedirList, NULL); + FreeRedirection(RedirList); #endif /* FEATURE_REDIRECTION */ } diff --git a/reactos/base/shell/cmd/cmd.h b/reactos/base/shell/cmd/cmd.h index 2d7f68519c7..b0470640235 100644 --- a/reactos/base/shell/cmd/cmd.h +++ b/reactos/base/shell/cmd/cmd.h @@ -301,6 +301,7 @@ BOOL add_entry (LPINT ac, LPTSTR **arg, LPCTSTR entry); LPTSTR *split (LPTSTR, LPINT, BOOL); VOID freep (LPTSTR *); LPTSTR _stpcpy (LPTSTR, LPCTSTR); +VOID StripQuotes(LPTSTR); BOOL IsValidPathName (LPCTSTR); BOOL IsExistingFile (LPCTSTR); BOOL IsExistingDirectory (LPCTSTR); @@ -335,12 +336,19 @@ INT cmd_prompt (LPTSTR, LPTSTR); /* Prototypes for REDIR.C */ -#define INPUT_REDIRECTION 1 -#define OUTPUT_REDIRECTION 2 -#define OUTPUT_APPEND 4 -#define ERROR_REDIRECTION 8 -#define ERROR_APPEND 16 -INT GetRedirection (LPTSTR, LPTSTR, LPTSTR, LPTSTR, LPINT); +enum { REDIR_READ, REDIR_WRITE, REDIR_APPEND }; +typedef struct _REDIRECTION +{ + struct _REDIRECTION *Next; + HANDLE OldHandle; + BYTE Number; + BYTE Type; + TCHAR Filename[]; +} REDIRECTION; +BOOL PerformRedirection(REDIRECTION *); +VOID UndoRedirection(REDIRECTION *, REDIRECTION *End); +INT GetRedirection(LPTSTR, REDIRECTION **); +VOID FreeRedirection(REDIRECTION *); /* Prototypes for REN.C */ diff --git a/reactos/base/shell/cmd/for.c b/reactos/base/shell/cmd/for.c index 6800eab7ddd..ff586c912dc 100644 --- a/reactos/base/shell/cmd/for.c +++ b/reactos/base/shell/cmd/for.c @@ -138,9 +138,7 @@ INT cmd_for (LPTSTR cmd, LPTSTR param) bc->bEcho = bc->prev->bEcho; else bc->bEcho = bEcho; - bc->In[0] = _T('\0'); - bc->Out[0] = _T('\0'); - bc->Err[0] = _T('\0'); + bc->RedirList = NULL; return 0; diff --git a/reactos/base/shell/cmd/misc.c b/reactos/base/shell/cmd/misc.c index 0a0ad75fc9f..3739cf996fa 100644 --- a/reactos/base/shell/cmd/misc.c +++ b/reactos/base/shell/cmd/misc.c @@ -411,6 +411,18 @@ LPTSTR _stpcpy (LPTSTR dest, LPCTSTR src) return (dest + _tcslen (src)); } +VOID +StripQuotes(TCHAR *in) +{ + TCHAR *out = in; + for (; *in; in++) + { + if (*in != _T('"')) + *out++ = *in; + } + *out = _T('\0'); +} + /* diff --git a/reactos/base/shell/cmd/redir.c b/reactos/base/shell/cmd/redir.c index 0d476e4ed2f..6456c92137d 100644 --- a/reactos/base/shell/cmd/redir.c +++ b/reactos/base/shell/cmd/redir.c @@ -51,11 +51,12 @@ IsRedirection (TCHAR c) * */ -INT GetRedirection (LPTSTR s, LPTSTR ifn, LPTSTR ofn, LPTSTR efn, LPINT lpnFlags) +INT GetRedirection (LPTSTR s, REDIRECTION **RedirList) { INT num = 1; LPTSTR dp = s; LPTSTR sp = s; + TCHAR Filename[MAX_PATH]; #ifdef INCLUDE_CMD_REM @@ -68,10 +69,6 @@ INT GetRedirection (LPTSTR s, LPTSTR ifn, LPTSTR ofn, LPTSTR efn, LPINT lpnFlags /*first thing first. check to see if this is "rem" and hope out*/ if(!_tcsncmp (line, _T("rem "), 4)) { - lpnFlags = 0; - *ifn=('\0'); - *ofn=('\0'); - *efn=_T('\0'); return 1; } #endif @@ -94,148 +91,74 @@ INT GetRedirection (LPTSTR s, LPTSTR ifn, LPTSTR ofn, LPTSTR efn, LPINT lpnFlags while (*sp && *sp != qc); *dp++ = *sp++; + continue; } - else if ((*sp == _T('<')) || (*sp == _T('>')) || - (*sp == _T('1')) || (*sp == _T('2')) || (*sp == _T('&'))) + + int NumberGiven = (*sp >= _T('0') && *sp <= _T('9')) ? 1 : 0; + if (sp[NumberGiven] == _T('<') || sp[NumberGiven] == _T('>')) { - /* MS-DOS ignores multiple redirection symbols and uses the last */ - /* redirection, so we'll emulate that and not check */ + BYTE HandleNumber; + BYTE Type; + BOOL bInQuote = FALSE; + TCHAR *fn = Filename; + REDIRECTION *Redir, **ListPtr; + + if (NumberGiven) + HandleNumber = *sp++ - _T('0'); + else + HandleNumber = *sp == _T('<') ? 0 : 1; if (*sp == _T('<')) { /* input redirection */ - *lpnFlags |= INPUT_REDIRECTION; - do sp++; - while( _istspace (*sp) ); - - /* copy file name */ - while (*sp && !IsRedirection (*sp) && !_istspace (*sp)) - *ifn++ = *sp++; - *ifn = _T('\0'); + Type = REDIR_READ; + sp++; } - else if (*sp == _T('>')) + else { /* output redirection */ - *lpnFlags |= OUTPUT_REDIRECTION; + Type = REDIR_WRITE; sp++; /* append request ? */ if (*sp == _T('>')) { - *lpnFlags |= OUTPUT_APPEND; + Type = REDIR_APPEND; sp++; } - - while (_istspace (*sp)) - sp++; - - /* copy file name */ - while (*sp && !IsRedirection (*sp) && !_istspace (*sp)) - *ofn++ = *sp++; - *ofn = _T('\0'); } - else if (*sp == _T('1')) - { - /* output redirection */ + while (_istspace(*sp)) sp++; - if (*sp == _T('>')) - { - /* output redirection */ - *lpnFlags |= OUTPUT_REDIRECTION; - sp++; - - /* append request ? */ - if (*sp == _T('>')) - { - *lpnFlags |= OUTPUT_APPEND; - sp++; - } - } - else - { - /* no redirection!! copy the '1' character! */ - sp--; - *dp++ = *sp++; - continue; - } - - while (_istspace (*sp)) - sp++; - - /* copy file name */ - while (*sp && !IsRedirection (*sp) && !_istspace (*sp)) - *ofn++ = *sp++; - *ofn = _T('\0'); - } - - else if (*sp == _T('2')) + /* copy file name */ + while (*sp && (bInQuote || (!IsRedirection (*sp) && !_istspace (*sp)))) { - /* error redirection */ - sp++; - - if (*sp == _T('>')) - { - *lpnFlags |= ERROR_REDIRECTION; - sp++; - - /* append request ? */ - if (*sp == _T('>')) - { - *lpnFlags |= ERROR_APPEND; - sp++; - } - } - else - { - /* no redirection!! copy the '2' character! */ - sp--; - *dp++ = *sp++; - continue; - } - - while (_istspace (*sp)) - sp++; - - /* copy file name */ - while (*sp && !IsRedirection (*sp) && !_istspace (*sp)) - *efn++ = *sp++; - *efn = _T('\0'); + bInQuote ^= (*sp == _T('"')); + *fn++ = *sp++; } - else if (*sp == _T('&')) + *fn++ = _T('\0'); + + /* Delete any existing redirection for the same handle number */ + ListPtr = RedirList; + while ((Redir = *ListPtr)) { - /* output AND error redirection */ - sp++; - - if (*sp == _T('>')) + if (Redir->Number == HandleNumber) { - *lpnFlags |= (ERROR_REDIRECTION | OUTPUT_REDIRECTION); - sp++; - - /* append request ? */ - if (*sp == _T('>')) - { - *lpnFlags |= (ERROR_APPEND | OUTPUT_APPEND); - sp++; - } - } - else - { - /* no redirection!! copy the '&' character! */ - sp--; - *dp++ = *sp++; + *ListPtr = Redir->Next; + cmd_free(Redir); continue; } - - while (_istspace (*sp)) - sp++; - - /* copy file name */ - while (*sp && !IsRedirection (*sp) && !_istspace (*sp)) - *ofn++ = *efn++ = *sp++; - *ofn = *efn = _T('\0'); + ListPtr = &Redir->Next; } + + Redir = cmd_alloc(FIELD_OFFSET(REDIRECTION, Filename[fn - Filename])); + Redir->Next = NULL; + Redir->OldHandle = INVALID_HANDLE_VALUE; + Redir->Number = HandleNumber; + Redir->Type = Type; + _tcscpy(Redir->Filename, Filename); + *ListPtr = Redir; } else *dp++ = *sp++; @@ -276,4 +199,124 @@ INT GetRedirection (LPTSTR s, LPTSTR ifn, LPTSTR ofn, LPTSTR efn, LPINT lpnFlags return num; } +/* cmd allows redirection of handles numbered 3-9 even though these don't + * correspond to any STD_ constant. */ +static HANDLE ExtraHandles[10 - 3]; + +static HANDLE GetHandle(UINT Number) +{ + if (Number < 3) + return GetStdHandle(STD_INPUT_HANDLE - Number); + else + return ExtraHandles[Number - 3]; +} + +static VOID SetHandle(UINT Number, HANDLE Handle) +{ + if (Number < 3) + SetStdHandle(STD_INPUT_HANDLE - Number, Handle); + else + ExtraHandles[Number - 3] = Handle; +} + +BOOL +PerformRedirection(REDIRECTION *RedirList) +{ + REDIRECTION *Redir; + TCHAR Filename[MAX_PATH]; + HANDLE hNew; + UINT DupNumber; + static SECURITY_ATTRIBUTES SecAttr = { sizeof(SECURITY_ATTRIBUTES), NULL, TRUE }; + + /* Some parameters used for read, write, and append, respectively */ + static const DWORD dwAccess[] = { + GENERIC_READ, + GENERIC_WRITE, + GENERIC_WRITE + }; + static const DWORD dwShareMode[] = { + FILE_SHARE_READ | FILE_SHARE_WRITE, + FILE_SHARE_READ, + FILE_SHARE_READ + }; + static const DWORD dwCreationDisposition[] = { + OPEN_EXISTING, + CREATE_ALWAYS, + OPEN_ALWAYS + }; + + for (Redir = RedirList; Redir; Redir = Redir->Next) + { + *Filename = _T('\0'); + _tcsncat(Filename, Redir->Filename, MAX_PATH - 1); + StripQuotes(Filename); + + if (*Filename == _T('&')) + { + DupNumber = Filename[1] - _T('0'); + if (DupNumber >= 10 || + !DuplicateHandle(GetCurrentProcess(), + GetHandle(DupNumber), + GetCurrentProcess(), + &hNew, + 0, + TRUE, + DUPLICATE_SAME_ACCESS)) + { + hNew = INVALID_HANDLE_VALUE; + } + } + else + { + hNew = CreateFile(Filename, + dwAccess[Redir->Type], + dwShareMode[Redir->Type], + &SecAttr, + dwCreationDisposition[Redir->Type], + 0, + NULL); + } + + if (hNew == INVALID_HANDLE_VALUE) + { + ConErrResPrintf(Redir->Type == REDIR_READ ? STRING_CMD_ERROR1 : STRING_CMD_ERROR3, + Filename); + /* Undo all the redirections before this one */ + UndoRedirection(RedirList, Redir); + return FALSE; + } + + if (Redir->Type == REDIR_APPEND) + SetFilePointer(hNew, 0, NULL, FILE_END); + Redir->OldHandle = GetHandle(Redir->Number); + SetHandle(Redir->Number, hNew); + + TRACE("%d redirected to: %s\n", Redir->Number, debugstr_aw(Filename)); + } + return TRUE; +} + +VOID +UndoRedirection(REDIRECTION *Redir, REDIRECTION *End) +{ + for (; Redir != End; Redir = Redir->Next) + { + CloseHandle(GetHandle(Redir->Number)); + SetHandle(Redir->Number, Redir->OldHandle); + Redir->OldHandle = INVALID_HANDLE_VALUE; + } +} + +VOID +FreeRedirection(REDIRECTION *Redir) +{ + REDIRECTION *Next; + for (; Redir; Redir = Next) + { + Next = Redir->Next; + ASSERT(Redir->OldHandle == INVALID_HANDLE_VALUE); + cmd_free(Redir); + } +} + #endif /* FEATURE_REDIRECTION */ diff --git a/reactos/base/shell/cmd/start.c b/reactos/base/shell/cmd/start.c index 5532c542268..1c9d5877e30 100644 --- a/reactos/base/shell/cmd/start.c +++ b/reactos/base/shell/cmd/start.c @@ -34,17 +34,6 @@ static TCHAR *GetParameter(TCHAR **pPointer) return start - 1; } -static void StripQuotes(TCHAR *in) -{ - TCHAR *out = in; - for (; *in; in++) - { - if (*in != _T('"')) - *out++ = *in; - } - *out = _T('\0'); -} - INT cmd_start (LPTSTR First, LPTSTR Rest) { TCHAR szFullName[CMDLINE_LENGTH]; From 4cdc27c1a231a4f83143ef843f83afb8cdfb96db Mon Sep 17 00:00:00 2001 From: Jeffrey Morlan Date: Thu, 21 Aug 2008 20:18:35 +0000 Subject: [PATCH 094/324] - Begin writing a real parser for cmd. &, &&, ||, and () are implemented. The parenthesized blocks aren't too useful yet as the parser can't read additional lines; doing this will require some restructuring in cmd.c. - Remove ^-removing hacks in echo and set. svn path=/trunk/; revision=35514 --- reactos/base/shell/cmd/cmd.c | 114 +++++--- reactos/base/shell/cmd/cmd.h | 19 +- reactos/base/shell/cmd/cmd.rbuild | 1 + reactos/base/shell/cmd/echo.c | 10 - reactos/base/shell/cmd/parser.c | 456 ++++++++++++++++++++++++++++++ reactos/base/shell/cmd/redir.c | 169 ----------- reactos/base/shell/cmd/set.c | 10 - 7 files changed, 550 insertions(+), 229 deletions(-) create mode 100644 reactos/base/shell/cmd/parser.c diff --git a/reactos/base/shell/cmd/cmd.c b/reactos/base/shell/cmd/cmd.c index 3b916332b4c..572ffb0ca95 100644 --- a/reactos/base/shell/cmd/cmd.c +++ b/reactos/base/shell/cmd/cmd.c @@ -323,7 +323,7 @@ static BOOL RunFile(LPTSTR filename) * Rest - rest of command line */ -static VOID +static BOOL Execute (LPTSTR Full, LPTSTR First, LPTSTR Rest) { TCHAR *szFullName=NULL; @@ -345,7 +345,7 @@ Execute (LPTSTR Full, LPTSTR First, LPTSTR Rest) { error_out_of_memory(); nErrorLevel = 1; - return ; + return FALSE; } rest = cmd_alloc ( (_tcslen(Rest) + 512) * sizeof(TCHAR)); @@ -354,7 +354,7 @@ Execute (LPTSTR Full, LPTSTR First, LPTSTR Rest) cmd_free (first); error_out_of_memory(); nErrorLevel = 1; - return ; + return FALSE; } full = cmd_alloc ( (_tcslen(Full) + 512) * sizeof(TCHAR)); @@ -364,7 +364,7 @@ Execute (LPTSTR Full, LPTSTR First, LPTSTR Rest) cmd_free (rest); error_out_of_memory(); nErrorLevel = 1; - return ; + return FALSE; } szFullName = cmd_alloc ( (_tcslen(Full) + 512) * sizeof(TCHAR)); @@ -375,7 +375,7 @@ Execute (LPTSTR Full, LPTSTR First, LPTSTR Rest) cmd_free (full); error_out_of_memory(); nErrorLevel = 1; - return ; + return FALSE; } @@ -446,7 +446,7 @@ Execute (LPTSTR Full, LPTSTR First, LPTSTR Rest) cmd_free (full); cmd_free (szFullName); nErrorLevel = 1; - return; + return working; } /* get the PATH environment variable and parse it */ @@ -459,7 +459,7 @@ Execute (LPTSTR Full, LPTSTR First, LPTSTR Rest) cmd_free (full); cmd_free (szFullName); nErrorLevel = 1; - return; + return FALSE; } @@ -554,6 +554,7 @@ Execute (LPTSTR Full, LPTSTR First, LPTSTR Rest) cmd_free(rest); cmd_free(full); cmd_free (szFullName); + return nErrorLevel == 0; } @@ -566,7 +567,7 @@ Execute (LPTSTR Full, LPTSTR First, LPTSTR Rest) * */ -VOID +BOOL DoCommand (LPTSTR line) { TCHAR *com = NULL; /* the first word in the command */ @@ -575,6 +576,7 @@ DoCommand (LPTSTR line) LPTSTR rest; /* pointer to the rest of the command line */ INT cl; LPCOMMAND cmdptr; + BOOL ret = TRUE; TRACE ("DoCommand: (\'%s\')\n", debugstr_aw(line)); @@ -582,7 +584,7 @@ DoCommand (LPTSTR line) if (com == NULL) { error_out_of_memory(); - return; + return FALSE; } cp = com; @@ -640,7 +642,7 @@ DoCommand (LPTSTR line) /* If end of table execute ext cmd */ if (cmdptr->name == NULL) { - Execute (line, com, rest); + ret = Execute (line, com, rest); break; } @@ -677,6 +679,7 @@ DoCommand (LPTSTR line) } } cmd_free(com); + return ret; } @@ -687,25 +690,28 @@ DoCommand (LPTSTR line) VOID ParseCommandLine (LPTSTR cmd) { - TCHAR cmdline[CMDLINE_LENGTH]; - LPTSTR s; + PARSED_COMMAND *Cmd = ParseCommand(cmd); + if (Cmd) + { + ExecuteCommand(Cmd); + FreeCommand(Cmd); + } +} + +static VOID +ExecutePipeline(PARSED_COMMAND *Cmd) +{ #ifdef FEATURE_REDIRECTION - REDIRECTION *RedirList = NULL; TCHAR szTempPath[MAX_PATH] = _T(".\\"); TCHAR szFileName[2][MAX_PATH] = {_T(""), _T("")}; HANDLE hFile[2] = {INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE}; - INT num = 0; INT Length; UINT Attributes; - BOOL bNewBatch = TRUE; HANDLE hOldConIn; HANDLE hOldConOut; #endif /* FEATURE_REDIRECTION */ - _tcscpy (cmdline, cmd); - s = &cmdline[0]; - - TRACE ("ParseCommandLine: (\'%s\')\n", debugstr_aw(s)); + //TRACE ("ParseCommandLine: (\'%s\')\n", debugstr_aw(s)); #ifdef FEATURE_REDIRECTION /* find the temp path to store temporary files */ @@ -726,15 +732,6 @@ VOID ParseCommandLine (LPTSTR cmd) if (szTempPath[_tcslen (szTempPath) - 1] != _T('\\')) _tcscat (szTempPath, _T("\\")); - /* get the redirections from the command line */ - num = GetRedirection (s, &RedirList); - - if (!PerformRedirection(RedirList)) - { - FreeRedirection(RedirList); - return; - } - /* Set up the initial conditions ... */ /* preserve STDIN and STDOUT handles */ hOldConIn = GetStdHandle (STD_INPUT_HANDLE); @@ -744,7 +741,7 @@ VOID ParseCommandLine (LPTSTR cmd) *szFileName[0] = _T('\0'); hFile[0] = INVALID_HANDLE_VALUE; - while (num-- > 1) + while (Cmd->Type == C_PIPE) { SECURITY_ATTRIBUTES sa = {sizeof(SECURITY_ATTRIBUTES), NULL, TRUE}; @@ -766,7 +763,7 @@ VOID ParseCommandLine (LPTSTR cmd) SetStdHandle (STD_OUTPUT_HANDLE, hFile[1]); - DoCommand (s); + ExecuteCommand(Cmd->Subcommands); /* close stdout file */ SetStdHandle (STD_OUTPUT_HANDLE, hOldConOut); @@ -799,22 +796,18 @@ VOID ParseCommandLine (LPTSTR cmd) OPEN_EXISTING, FILE_ATTRIBUTE_TEMPORARY, NULL); SetStdHandle (STD_INPUT_HANDLE, hFile[0]); - s = s + _tcslen (s) + 1; + Cmd = Cmd->Subcommands->Next; } /* Now set up the end conditions... */ SetStdHandle(STD_OUTPUT_HANDLE, hOldConOut); - if(bc) - bNewBatch = FALSE; #endif /* process final command */ - DoCommand (s); + ExecuteCommand(Cmd); #ifdef FEATURE_REDIRECTION - if(bNewBatch && bc) - AddBatchRedirection(&RedirList); /* close old stdin file */ #if 0 /* buggy implementation */ SetStdHandle (STD_INPUT_HANDLE, hOldConIn); @@ -870,12 +863,55 @@ VOID ParseCommandLine (LPTSTR cmd) } } } - - UndoRedirection(RedirList, NULL); - FreeRedirection(RedirList); #endif /* FEATURE_REDIRECTION */ } +BOOL +ExecuteCommand(PARSED_COMMAND *Cmd) +{ + BOOL bNewBatch = TRUE; + PARSED_COMMAND *Sub; + BOOL Success = TRUE; + + if (!PerformRedirection(Cmd->Redirections)) + return FALSE; + + switch (Cmd->Type) + { + case C_COMMAND: + if(bc) + bNewBatch = FALSE; + + Success = DoCommand(Cmd->CommandLine); + + if(bNewBatch && bc) + AddBatchRedirection(&Cmd->Redirections); + break; + case C_QUIET: + case C_BLOCK: + case C_MULTI: + for (Sub = Cmd->Subcommands; Sub; Sub = Sub->Next) + Success = ExecuteCommand(Sub); + break; + case C_IFFAILURE: + case C_IFSUCCESS: + Sub = Cmd->Subcommands; + Success = ExecuteCommand(Sub); + if (Success == (Cmd->Type - C_IFFAILURE)) + { + Sub = Sub->Next; + Success = ExecuteCommand(Sub); + } + break; + case C_PIPE: + ExecutePipeline(Cmd); + break; + } + + UndoRedirection(Cmd->Redirections, NULL); + return Success; +} + BOOL GrowIfNecessary_dbg ( UINT needed, LPTSTR* ret, UINT* retlen, const char *file, int line ) { diff --git a/reactos/base/shell/cmd/cmd.h b/reactos/base/shell/cmd/cmd.h index b0470640235..87dce182016 100644 --- a/reactos/base/shell/cmd/cmd.h +++ b/reactos/base/shell/cmd/cmd.h @@ -97,10 +97,12 @@ INT cmd_cls (LPTSTR, LPTSTR); /* Prototypes for CMD.C */ INT ConvertULargeInteger (ULARGE_INTEGER num, LPTSTR des, INT len, BOOL bPutSeperator); VOID ParseCommandLine (LPTSTR); +struct _PARSED_COMMAND; +BOOL ExecuteCommand(struct _PARSED_COMMAND *Cmd); LPCTSTR GetEnvVarOrSpecial ( LPCTSTR varName ); VOID AddBreakHandler (VOID); VOID RemoveBreakHandler (VOID); -VOID DoCommand (LPTSTR line); +BOOL DoCommand (LPTSTR line); int cmd_main (int argc, const TCHAR *argv[]); extern HANDLE CMD_ModuleHandle; @@ -326,6 +328,21 @@ INT cmd_move (LPTSTR, LPTSTR); INT CommandMsgbox (LPTSTR, LPTSTR); +/* Prototypes from PARSER.C */ +enum { C_COMMAND, C_QUIET, C_BLOCK, C_MULTI, C_IFFAILURE, C_IFSUCCESS, C_PIPE }; +typedef struct _PARSED_COMMAND +{ + struct _PARSED_COMMAND *Subcommands; + struct _PARSED_COMMAND *Next; + struct _REDIRECTION *Redirections; + TCHAR *Tail; + BYTE Type; + TCHAR CommandLine[]; +} PARSED_COMMAND; +PARSED_COMMAND *ParseCommand(LPTSTR Line); +VOID FreeCommand(PARSED_COMMAND *Cmd); + + /* Prototypes from PATH.C */ INT cmd_path (LPTSTR, LPTSTR); diff --git a/reactos/base/shell/cmd/cmd.rbuild b/reactos/base/shell/cmd/cmd.rbuild index 12027af7208..2fc1444b7d1 100644 --- a/reactos/base/shell/cmd/cmd.rbuild +++ b/reactos/base/shell/cmd/cmd.rbuild @@ -44,6 +44,7 @@ misc.c move.c msgbox.c + parser.c path.c pause.c prompt.c diff --git a/reactos/base/shell/cmd/echo.c b/reactos/base/shell/cmd/echo.c index 2ec644ca624..0706be4d70d 100644 --- a/reactos/base/shell/cmd/echo.c +++ b/reactos/base/shell/cmd/echo.c @@ -83,16 +83,6 @@ INT CommandEcho (LPTSTR cmd, LPTSTR param) } if (*p1 != _T('\0')) { - p1 = param; - while (NULL != (p1 = _tcschr(p1, _T('^')))) - { - memmove(p1, p1 + 1, (_tcslen(p1 + 1) + 1) * sizeof(TCHAR)); - if (*p1) - { - //skip past the char being escaped - p1++; - } - } ConOutPuts (param); } else diff --git a/reactos/base/shell/cmd/parser.c b/reactos/base/shell/cmd/parser.c new file mode 100644 index 00000000000..a2cdb6c29ad --- /dev/null +++ b/reactos/base/shell/cmd/parser.c @@ -0,0 +1,456 @@ +#include + +#define C_OP_LOWEST C_MULTI +#define C_OP_HIGHEST C_PIPE +static const TCHAR OpString[][3] = { _T("&"), _T("||"), _T("&&"), _T("|") }; + +static const TCHAR RedirString[][3] = { _T("<"), _T(">"), _T(">>") }; + +static BOOL IsSeparator(TCHAR Char) +{ + /* These three characters act like spaces to the parser */ + return _istspace(Char) || (Char && _tcschr(_T(",;="), Char)); +} + +enum { TOK_END, TOK_NORMAL, TOK_OPERATOR, TOK_REDIRECTION, + TOK_BEGIN_BLOCK, TOK_END_BLOCK }; + +static BOOL bParseError; +static BOOL bLineContinuations; +static TCHAR ParseLine[CMDLINE_LENGTH]; +static TCHAR *ParsePos; +static TCHAR CurChar; + +static TCHAR CurrentToken[CMDLINE_LENGTH]; +static int CurrentTokenType; +static int InsideBlock; + +static TCHAR ParseChar() +{ + TCHAR Char; + +//restart: + /* Although CRs can be injected into a line via an environment + * variable substitution, the parser ignores them - they won't + * even separate tokens. */ + do + Char = *ParsePos++; + while (Char == _T('\r')); + + if (!Char) + { + /*if (bLineContinuations) + if (ReadLine(ParseLine, TRUE) && *(ParsePos = ParseLine)) + goto restart;*/ + } + return CurChar = Char; +} + +static void ParseError() +{ + if (CurrentTokenType == TOK_END) + ConOutResPuts(STRING_SYNTAX_COMMAND_INCORRECT); + else + ConOutPrintf(_T("%s was unexpected at this time.\n"), CurrentToken); + bParseError = TRUE; +} + +/* Yes, cmd has a Lexical Analyzer. Whenever the parser gives an "xxx was + * unexpected at this time." message, it shows what the last token read was */ +static int ParseToken(TCHAR ExtraEnd, BOOL PreserveSpace) +{ + TCHAR *Out = CurrentToken; + TCHAR Char = CurChar; + int Type; + BOOL bInQuote = FALSE; + + if (!PreserveSpace) + { + while (Char != _T('\n') && IsSeparator(Char)) + Char = ParseChar(); + } + + while (Char && Char != _T('\n')) + { + bInQuote ^= (Char == _T('"')); + if (!bInQuote) + { + /* Check for all the myriad ways in which this token + * may be brought to an untimely end. */ + if ((Char >= _T('0') && Char <= _T('9') && + (ParsePos == &ParseLine[1] || IsSeparator(ParsePos[-2])) + && (*ParsePos == _T('<') || *ParsePos == _T('>'))) + || _tcschr(_T(")&|<>") + (InsideBlock ? 0 : 1), Char) + || (!PreserveSpace && IsSeparator(Char)) + || (Char == ExtraEnd)) + { + break; + } + + if (Char == _T('^')) + { + Char = ParseChar(); + /* Eat up a \n, allowing line continuation */ + if (Char == _T('\n')) + Char = ParseChar(); + /* Next character is a forced literal */ + } + } + /* FIXME: potential buffer overflow here */ + *Out++ = Char; + Char = ParseChar(); + } + + /* Check if we got at least one character before reaching a special one. + * If so, return them and leave the special for the next call. */ + if (Out != CurrentToken) + { + Type = TOK_NORMAL; + } + else if (Char == _T('(')) + { + Type = TOK_BEGIN_BLOCK; + *Out++ = Char; + ParseChar(); + } + else if (Char == _T(')')) + { + Type = TOK_END_BLOCK; + *Out++ = Char; + ParseChar(); + } + else if (Char == _T('&') || Char == _T('|')) + { + Type = TOK_OPERATOR; + *Out++ = Char; + Char = ParseChar(); + /* check for && or || */ + if (Char == Out[-1]) + { + *Out++ = Char; + ParseChar(); + } + } + else if ((Char >= _T('0') && Char <= _T('9')) + || (Char == _T('<') || Char == _T('>'))) + { + Type = TOK_REDIRECTION; + if (Char >= _T('0') && Char <= _T('9')) + { + *Out++ = Char; + Char = ParseChar(); + } + *Out++ = Char; + Char = ParseChar(); + if (Char == Out[-1]) + { + /* Strangely, the tokenizer allows << as well as >>... (it + * will cause an error when trying to parse it though) */ + *Out++ = Char; + Char = ParseChar(); + } + if (Char == _T('&')) + { + *Out++ = Char; + while (IsSeparator(Char = ParseChar())) + ; + if (Char >= _T('0') && Char <= _T('9')) + { + *Out++ = Char; + ParseChar(); + } + } + } + else + { + Type = TOK_END; + } + *Out = _T('\0'); + return CurrentTokenType = Type; +} + +static BOOL ParseRedirection(REDIRECTION **List) +{ + TCHAR *Tok = CurrentToken; + BYTE Number; + BYTE RedirType; + REDIRECTION *Redir; + + if (*Tok >= _T('0') && *Tok <= _T('9')) + Number = *Tok++ - _T('0'); + else + Number = *Tok == _T('<') ? 0 : 1; + + if (*Tok++ == _T('<')) + { + RedirType = REDIR_READ; + if (*Tok == _T('<')) + goto fail; + } + else + { + RedirType = REDIR_WRITE; + if (*Tok == _T('>')) + { + RedirType = REDIR_APPEND; + Tok++; + } + } + + if (!*Tok) + { + /* The file name was not part of this token, so it'll be the next one */ + if (ParseToken(0, FALSE) != TOK_NORMAL) + goto fail; + Tok = CurrentToken; + } + + /* If a redirection for this handle number already exists, delete it */ + while ((Redir = *List)) + { + if (Redir->Number == Number) + { + *List = Redir->Next; + cmd_free(Redir); + continue; + } + List = &Redir->Next; + } + + Redir = cmd_alloc(FIELD_OFFSET(REDIRECTION, Filename[_tcslen(Tok) + 1])); + Redir->Next = NULL; + Redir->OldHandle = INVALID_HANDLE_VALUE; + Redir->Number = Number; + Redir->Type = RedirType; + _tcscpy(Redir->Filename, Tok); + *List = Redir; + return TRUE; +fail: + ParseError(); + FreeRedirection(*List); + *List = NULL; + return FALSE; +} + +static PARSED_COMMAND *ParseCommandOp(int OpType); + +/* Parse a parenthesized block */ +static PARSED_COMMAND *ParseBlock(REDIRECTION *RedirList) +{ + PARSED_COMMAND *Cmd, *Sub, **NextPtr; + Cmd = cmd_alloc(sizeof(PARSED_COMMAND)); + Cmd->Type = C_BLOCK; + Cmd->Next = NULL; + Cmd->Subcommands = NULL; + Cmd->Redirections = RedirList; + + /* Read the block contents */ + NextPtr = &Cmd->Subcommands; + InsideBlock++; + do + { + Sub = ParseCommandOp(C_OP_LOWEST); + if (Sub) + { + *NextPtr = Sub; + NextPtr = &Sub->Next; + } + else if (bParseError) + { + InsideBlock--; + FreeCommand(Cmd); + return NULL; + } + } while (CurrentTokenType != TOK_END_BLOCK); + InsideBlock--; + + /* Process any trailing redirections */ + while (ParseToken(0, FALSE) == TOK_REDIRECTION) + { + if (!ParseRedirection(&Cmd->Redirections)) + { + FreeCommand(Cmd); + return NULL; + } + } + return Cmd; +} + +static PARSED_COMMAND *ParseCommandPart(void) +{ + TCHAR ParsedLine[CMDLINE_LENGTH]; + TCHAR *Pos; + DWORD TailOffset; + PARSED_COMMAND *Cmd; + REDIRECTION *RedirList = NULL; + int Type; + + while (IsSeparator(CurChar)) + { + if (CurChar == _T('\n')) + return NULL; + ParseChar(); + } + + if (!CurChar) + return NULL; + + if (CurChar == _T(':')) + { + /* "Ignore" the rest of the line. + * (Line continuations will still be parsed, though.) */ + while (ParseToken(0, TRUE) != TOK_END) + ; + return NULL; + } + + if (CurChar == _T('@')) + { + ParseChar(); + Cmd = cmd_alloc(sizeof(PARSED_COMMAND)); + Cmd->Type = C_QUIET; + Cmd->Next = NULL; + /* @ acts like a unary operator with low precedence, + * so call the top-level parser */ + Cmd->Subcommands = ParseCommandOp(C_OP_LOWEST); + Cmd->Redirections = NULL; + return Cmd; + } + + /* Get the head of the command */ + while (1) + { + Type = ParseToken(_T('('), FALSE); + if (Type == TOK_NORMAL) + { + Pos = _stpcpy(ParsedLine, CurrentToken); + break; + } + else if (Type == TOK_REDIRECTION) + { + if (!ParseRedirection(&RedirList)) + return NULL; + } + else if (Type == TOK_BEGIN_BLOCK) + { + return ParseBlock(RedirList); + } + else + { + ParseError(); + FreeRedirection(RedirList); + return NULL; + } + } + TailOffset = Pos - ParsedLine; + + /* FIXME: FOR, IF, and REM need special processing by the parser. */ + + /* Now get the tail */ + while (1) + { + Type = ParseToken(0, TRUE); + if (Type == TOK_NORMAL) + { + /* FIXME: potential buffer overflow here */ + Pos = _stpcpy(Pos, CurrentToken); + } + else if (Type == TOK_REDIRECTION) + { + if (!ParseRedirection(&RedirList)) + return NULL; + } + else + { + break; + } + } + + Cmd = cmd_alloc(FIELD_OFFSET(PARSED_COMMAND, CommandLine[Pos + 1 - ParsedLine])); + Cmd->Type = C_COMMAND; + Cmd->Next = NULL; + Cmd->Subcommands = NULL; + Cmd->Redirections = RedirList; + _tcscpy(Cmd->CommandLine, ParsedLine); + Cmd->Tail = Cmd->CommandLine + TailOffset; + return Cmd; +} + +static PARSED_COMMAND *ParseCommandOp(int OpType) +{ + PARSED_COMMAND *Cmd, *Left, *Right; + + if (OpType == C_OP_HIGHEST) + Cmd = ParseCommandPart(); + else + Cmd = ParseCommandOp(OpType + 1); + + if (Cmd && !_tcscmp(CurrentToken, OpString[OpType - C_OP_LOWEST])) + { + Left = Cmd; + Right = ParseCommandOp(OpType); + if (!Right) + { + if (!bParseError) + { + /* & is allowed to have an empty RHS */ + if (OpType == C_MULTI) + return Left; + ParseError(); + } + FreeCommand(Left); + return NULL; + } + + Cmd = cmd_alloc(sizeof(PARSED_COMMAND)); + Cmd->Type = OpType; + Cmd->Next = NULL; + Cmd->Redirections = NULL; + Cmd->Subcommands = Left; + Left->Next = Right; + Right->Next = NULL; + } + + return Cmd; +} + +PARSED_COMMAND * +ParseCommand(LPTSTR Line) +{ + PARSED_COMMAND *Cmd; + + if (Line) + { + _tcscpy(ParseLine, Line); + bLineContinuations = FALSE; + } + else + { + /*if (!ReadLine(ParseLine, FALSE))*/ + return NULL; + bLineContinuations = TRUE; + } + bParseError = FALSE; + ParsePos = ParseLine; + CurChar = _T(' '); + + Cmd = ParseCommandOp(C_OP_LOWEST); + if (Cmd && CurrentTokenType != TOK_END) + { + ParseError(); + FreeCommand(Cmd); + Cmd = NULL; + } + return Cmd; +} + +VOID +FreeCommand(PARSED_COMMAND *Cmd) +{ + if (Cmd->Subcommands) + FreeCommand(Cmd->Subcommands); + if (Cmd->Next) + FreeCommand(Cmd->Next); + FreeRedirection(Cmd->Redirections); + cmd_free(Cmd); +} diff --git a/reactos/base/shell/cmd/redir.c b/reactos/base/shell/cmd/redir.c index 6456c92137d..a550c055b52 100644 --- a/reactos/base/shell/cmd/redir.c +++ b/reactos/base/shell/cmd/redir.c @@ -30,175 +30,6 @@ #ifdef FEATURE_REDIRECTION -static BOOL -IsRedirection (TCHAR c) -{ - return (c == _T('<')) || (c == _T('>')) || (c == _T('|')); -} - - -/* - * Gets the redirection info from the command line and copies the - * file names into ifn, ofn and efn removing them from the command - * line. - * - * Converts remaining command line into a series of null terminated - * strings defined by the pipe char '|'. Each string corresponds - * to a single executable command. A double null terminates the - * command strings. - * - * Return number of command strings found. - * - */ - -INT GetRedirection (LPTSTR s, REDIRECTION **RedirList) -{ - INT num = 1; - LPTSTR dp = s; - LPTSTR sp = s; - TCHAR Filename[MAX_PATH]; - -#ifdef INCLUDE_CMD_REM - - TCHAR * line = s; - - - while (_istspace (*line)) - line++; - - /*first thing first. check to see if this is "rem" and hope out*/ - if(!_tcsncmp (line, _T("rem "), 4)) - { - return 1; - } -#endif - /* find and remove all the redirections first */ - while (*sp) - { - if (*sp == _T('^')) - { - *dp++ = *sp++; - *dp++ = *sp++; - continue; - } - if ((*sp == _T('"')) || (*sp == _T('\''))) - { - /* No redirects inside quotes */ - TCHAR qc = *sp; - - do - *dp++ = *sp++; - while (*sp && *sp != qc); - - *dp++ = *sp++; - continue; - } - - int NumberGiven = (*sp >= _T('0') && *sp <= _T('9')) ? 1 : 0; - if (sp[NumberGiven] == _T('<') || sp[NumberGiven] == _T('>')) - { - BYTE HandleNumber; - BYTE Type; - BOOL bInQuote = FALSE; - TCHAR *fn = Filename; - REDIRECTION *Redir, **ListPtr; - - if (NumberGiven) - HandleNumber = *sp++ - _T('0'); - else - HandleNumber = *sp == _T('<') ? 0 : 1; - - if (*sp == _T('<')) - { - /* input redirection */ - Type = REDIR_READ; - sp++; - } - else - { - /* output redirection */ - Type = REDIR_WRITE; - sp++; - - /* append request ? */ - if (*sp == _T('>')) - { - Type = REDIR_APPEND; - sp++; - } - } - - while (_istspace(*sp)) - sp++; - - /* copy file name */ - while (*sp && (bInQuote || (!IsRedirection (*sp) && !_istspace (*sp)))) - { - bInQuote ^= (*sp == _T('"')); - *fn++ = *sp++; - } - *fn++ = _T('\0'); - - /* Delete any existing redirection for the same handle number */ - ListPtr = RedirList; - while ((Redir = *ListPtr)) - { - if (Redir->Number == HandleNumber) - { - *ListPtr = Redir->Next; - cmd_free(Redir); - continue; - } - ListPtr = &Redir->Next; - } - - Redir = cmd_alloc(FIELD_OFFSET(REDIRECTION, Filename[fn - Filename])); - Redir->Next = NULL; - Redir->OldHandle = INVALID_HANDLE_VALUE; - Redir->Number = HandleNumber; - Redir->Type = Type; - _tcscpy(Redir->Filename, Filename); - *ListPtr = Redir; - } - else - *dp++ = *sp++; - } - - *dp++ = _T('\0'); - *dp = _T('\0'); - - /* now go for the pipes */ - sp = s; - while (*sp) - { - if (*sp == _T('^')) - { - sp++; - sp++; - continue; - } - else if ((*sp == _T('"')) || (*sp == _T('\''))) - { - TCHAR qc = *sp; - - do - sp++; - while (*sp && *sp != qc); - - sp++; - } - else if (*sp == _T('|')) - { - *sp++ = _T('\0'); - num++; - } - else - sp++; - } - - return num; -} - /* cmd allows redirection of handles numbered 3-9 even though these don't * correspond to any STD_ constant. */ static HANDLE ExtraHandles[10 - 3]; diff --git a/reactos/base/shell/cmd/set.c b/reactos/base/shell/cmd/set.c index 07cb8c25c23..dda4d945fe0 100644 --- a/reactos/base/shell/cmd/set.c +++ b/reactos/base/shell/cmd/set.c @@ -53,7 +53,6 @@ skip_ws ( LPCTSTR p ) INT cmd_set (LPTSTR cmd, LPTSTR param) { - INT i; LPTSTR p; if ( !_tcsncmp (param, _T("/?"), 2) ) @@ -62,15 +61,6 @@ INT cmd_set (LPTSTR cmd, LPTSTR param) return 0; } - /* remove escapes */ - if ( param[0] ) for ( i = 0; param[i+1]; i++ ) - { - if ( param[i] == _T('^') ) - { - memmove ( ¶m[i], ¶m[i+1], _tcslen(¶m[i]) * sizeof(TCHAR) ); - } - } - /* if no parameters, show the environment */ if (param[0] == _T('\0')) { From 83029d2dd891e79d7d82a03643b5b4341675b669 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Thu, 21 Aug 2008 21:07:52 +0000 Subject: [PATCH 095/324] - "When releasing the gmutex my awesome code was removing the woken flag" (c) Alex Ionescu. svn path=/trunk/; revision=35516 --- reactos/ntoskrnl/ke/gmutex.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/ke/gmutex.c b/reactos/ntoskrnl/ke/gmutex.c index fb7dadbe096..78a1f78333d 100644 --- a/reactos/ntoskrnl/ke/gmutex.c +++ b/reactos/ntoskrnl/ke/gmutex.c @@ -79,6 +79,9 @@ KiAcquireGuardedMutexContented(IN OUT PKGUARDED_MUTEX GuardedMutex) /* Ok, the wait is done, so set the new bits */ BitsToRemove = GM_LOCK_BIT | GM_LOCK_WAITER_WOKEN; BitsToAdd = GM_LOCK_WAITER_WOKEN; + + /* We depend on these bits being just right */ + ASSERT((GM_LOCK_WAITER_WOKEN * 2) == GM_LOCK_WAITER_INC); } } @@ -103,7 +106,7 @@ FORCEINLINE FASTCALL KiReleaseGuardedMutex(IN OUT PKGUARDED_MUTEX GuardedMutex) { - LONG OldValue; + LONG OldValue, NewValue; /* Destroy the Owner */ GuardedMutex->Owner = NULL; @@ -117,10 +120,14 @@ KiReleaseGuardedMutex(IN OUT PKGUARDED_MUTEX GuardedMutex) { /* Update the Oldvalue to what it should be now */ OldValue |= GM_LOCK_BIT; + + /* The mutex will be woken, minus one waiter */ + NewValue = (OldValue | GM_LOCK_WAITER_WOKEN); + NewValue &= ~GM_LOCK_WAITER_INC; /* Remove the Woken bit */ if (InterlockedCompareExchange(&GuardedMutex->Count, - OldValue - GM_LOCK_WAITER_WOKEN, + NewValue, OldValue) == OldValue) { /* Signal the Gate */ From ea3057f8620cafd167506a6a3de17778c10da09c Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Thu, 21 Aug 2008 21:25:16 +0000 Subject: [PATCH 096/324] - Change ASSERT to C_ASSERT svn path=/trunk/; revision=35519 --- reactos/ntoskrnl/ke/gmutex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/ke/gmutex.c b/reactos/ntoskrnl/ke/gmutex.c index 78a1f78333d..79c267d8e6c 100644 --- a/reactos/ntoskrnl/ke/gmutex.c +++ b/reactos/ntoskrnl/ke/gmutex.c @@ -81,7 +81,7 @@ KiAcquireGuardedMutexContented(IN OUT PKGUARDED_MUTEX GuardedMutex) BitsToAdd = GM_LOCK_WAITER_WOKEN; /* We depend on these bits being just right */ - ASSERT((GM_LOCK_WAITER_WOKEN * 2) == GM_LOCK_WAITER_INC); + C_ASSERT((GM_LOCK_WAITER_WOKEN * 2) == GM_LOCK_WAITER_INC); } } From b9a32878e1a2e6e332ae59a97fed00a4be5f9f03 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Thu, 21 Aug 2008 22:41:17 +0000 Subject: [PATCH 097/324] - Patch by Alex Ionescu: Fix a typo, and code cleanup svn path=/trunk/; revision=35520 --- reactos/lib/rtl/debug.c | 67 +++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/reactos/lib/rtl/debug.c b/reactos/lib/rtl/debug.c index 5993cd02e8e..adf85b47709 100644 --- a/reactos/lib/rtl/debug.c +++ b/reactos/lib/rtl/debug.c @@ -54,51 +54,46 @@ vDbgPrintExWithPrefixInternal(IN LPCSTR Prefix, IN va_list ap, IN BOOLEAN HandleBreakpoint) { - NTSTATUS Status; + NTSTATUS Status = STATUS_SUCCESS; ANSI_STRING DebugString; CHAR Buffer[512]; - PCHAR pBuffer = Buffer; - ULONG pBufferSize = sizeof(Buffer); - ULONG Length; + ULONG Length, PrefixLength; EXCEPTION_RECORD ExceptionRecord; /* Check if we should print it or not */ - if (ComponentId != -1 && !NtQueryDebugFilterState(ComponentId, Level)) + if ((ComponentId != -1) && !(NtQueryDebugFilterState(ComponentId, Level))) { /* This message is masked */ - return STATUS_SUCCESS; + return Status; } /* For user mode, don't recursively DbgPrint */ - if (RtlpSetInDbgPrint(TRUE)) return STATUS_SUCCESS; + if (RtlpSetInDbgPrint(TRUE)) return Status; - /* Initialize the length to 8 */ - DebugString.Length = 0; - - /* Handle the prefix */ - if (Prefix && *Prefix) + /* Guard against incorrect pointers */ + _SEH_TRY { - /* Get the length */ - DebugString.Length = strlen(Prefix); - - /* Normalize it */ - if(DebugString.Length > sizeof(Buffer)) - { - DebugString.Length = sizeof(Buffer); - } + /* Get the length and normalize it */ + PrefixLength = strlen(Prefix); + if (PrefixLength > sizeof(Buffer)) PrefixLength = sizeof(Buffer); /* Copy it */ - strncpy(Buffer, Prefix, DebugString.Length); - - /* Set the pointer and update the size */ - pBuffer = &Buffer[DebugString.Length]; - pBufferSize -= DebugString.Length; + strncpy(Buffer, Prefix, PrefixLength); + + /* Do the printf */ + Length = _vsnprintf(Buffer + PrefixLength, + sizeof(Buffer) - PrefixLength, + Format, + ap); } - - /* Setup the ANSI String */ - DebugString.Buffer = Buffer; - DebugString.MaximumLength = sizeof(Buffer); - Length = _vsnprintf(pBuffer, pBufferSize, Format, ap); + _SEH_HANDLE + { + /* Fail */ + Length = PrefixLength = 0; + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + if (!NT_SUCCESS(Status)) return Status; /* Check if we went past the buffer */ if (Length == -1) @@ -109,9 +104,15 @@ vDbgPrintExWithPrefixInternal(IN LPCSTR Prefix, /* Put maximum */ Length = sizeof(Buffer); } - - /* Update length */ - DebugString.Length += (USHORT)Length; + else + { + /* Add the prefix */ + Length += PrefixLength; + } + + /* Build the string */ + DebugString.Length = Length; + DebugString.Buffer = Buffer; /* First, let the debugger know as well */ if (RtlpCheckForActiveDebugger(FALSE)) From 81af67a6fee7775ae0b39bb43d149cab7f8bde6b Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Fri, 22 Aug 2008 00:26:52 +0000 Subject: [PATCH 098/324] - Use correct bug code when crashing due to closing a protected handle - Add INVALID_KERNEL_HANDLE bug code svn path=/trunk/; revision=35521 --- reactos/include/reactos/mc/bugcodes.mc | 8 ++++++++ reactos/ntoskrnl/ob/obhandle.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/reactos/include/reactos/mc/bugcodes.mc b/reactos/include/reactos/mc/bugcodes.mc index 0a45c74956d..9583b39e94b 100644 --- a/reactos/include/reactos/mc/bugcodes.mc +++ b/reactos/include/reactos/mc/bugcodes.mc @@ -1097,6 +1097,14 @@ Language=English PP1_INITIALIZATION_FAILED . +MessageId=0x93 +Severity=Success +Facility=System +SymbolicName=INVALID_KERNEL_HANDLE +Language=English +INVALID_KERNEL_HANDLE +. + MessageId=0x94 Severity=Success Facility=System diff --git a/reactos/ntoskrnl/ob/obhandle.c b/reactos/ntoskrnl/ob/obhandle.c index a82595f477c..1096c01f073 100644 --- a/reactos/ntoskrnl/ob/obhandle.c +++ b/reactos/ntoskrnl/ob/obhandle.c @@ -697,7 +697,7 @@ ObpCloseHandleTableEntry(IN PHANDLE_TABLE HandleTable, else { /* Otherwise, bugcheck the OS */ - KeBugCheckEx(0x8B, (ULONG_PTR)Handle, 0, 0, 0); + KeBugCheckEx(INVALID_KERNEL_HANDLE, (ULONG_PTR)Handle, 0, 0, 0); } } From 7e8e8407d05baa24f9e639f2b5925378090bce58 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Fri, 22 Aug 2008 00:39:26 +0000 Subject: [PATCH 099/324] - Fix kernel mode debug output broken in 35520 - Patch by Alex svn path=/trunk/; revision=35522 --- reactos/lib/rtl/debug.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reactos/lib/rtl/debug.c b/reactos/lib/rtl/debug.c index adf85b47709..bfde2e0f2f3 100644 --- a/reactos/lib/rtl/debug.c +++ b/reactos/lib/rtl/debug.c @@ -186,7 +186,7 @@ vDbgPrintEx(IN ULONG ComponentId, IN va_list ap) { /* Call the internal routine that also handles ControlC */ - return vDbgPrintExWithPrefixInternal(NULL, + return vDbgPrintExWithPrefixInternal("", ComponentId, Level, Format, @@ -206,7 +206,7 @@ DbgPrint(PCCH Format, /* Call the internal routine that also handles ControlC */ va_start(ap, Format); - return vDbgPrintExWithPrefixInternal(NULL, + return vDbgPrintExWithPrefixInternal("", -1, DPFLTR_ERROR_LEVEL, Format, @@ -229,7 +229,7 @@ DbgPrintEx(IN ULONG ComponentId, /* Call the internal routine that also handles ControlC */ va_start(ap, Format); - return vDbgPrintExWithPrefixInternal(NULL, + return vDbgPrintExWithPrefixInternal("", ComponentId, Level, Format, @@ -250,7 +250,7 @@ DbgPrintReturnControlC(PCH Format, /* Call the internal routine that also handles ControlC */ va_start(ap, Format); - return vDbgPrintExWithPrefixInternal(NULL, + return vDbgPrintExWithPrefixInternal("", -1, DPFLTR_ERROR_LEVEL, Format, From f1fe2984b356ae7316ac2a60f9100156403acc3e Mon Sep 17 00:00:00 2001 From: Art Yerkes Date: Fri, 22 Aug 2008 05:58:56 +0000 Subject: [PATCH 100/324] Commit bugboy's patch from bug 2392, and remove DeviceDesc, which isn't needed anymore. svn path=/trunk/; revision=35523 --- reactos/base/services/dhcp/adapter.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/reactos/base/services/dhcp/adapter.c b/reactos/base/services/dhcp/adapter.c index f708998cd2f..a669bd25a5d 100644 --- a/reactos/base/services/dhcp/adapter.c +++ b/reactos/base/services/dhcp/adapter.c @@ -108,7 +108,7 @@ HKEY FindAdapterKey( PDHCP_ADAPTER Adapter ) { PCHAR TargetKeyName = NULL; PCHAR *EnumKeysLinkage = GetSubkeyNames( EnumKeyName, "\\Linkage" ); PCHAR *EnumKeysTop = GetSubkeyNames( EnumKeyName, "" ); - PCHAR RootDevice = NULL, DriverDesc = NULL; + PCHAR RootDevice = NULL; HKEY EnumKey, OutKey = NULL; DWORD Error = ERROR_SUCCESS; @@ -121,12 +121,9 @@ HKEY FindAdapterKey( PDHCP_ADAPTER Adapter ) { for( i = 0; EnumKeysLinkage[i]; i++ ) { RootDevice = RegReadString ( EnumKey, EnumKeysLinkage[i], "RootDevice" ); - DriverDesc = RegReadString - ( EnumKey, EnumKeysTop[i], "DriverDesc" ); - if( DriverDesc && - RootDevice && - !strcmp( DriverDesc, Adapter->DhclientInfo.name ) ) { + if( RootDevice && + !strcmp( RootDevice, Adapter->DhclientInfo.name ) ) { TargetKeyName = (CHAR*) malloc( strlen( TargetKeyNameStart ) + strlen( RootDevice ) + @@ -138,13 +135,11 @@ HKEY FindAdapterKey( PDHCP_ADAPTER Adapter ) { break; } else { free( RootDevice ); RootDevice = 0; - free( DriverDesc ); DriverDesc = 0; } } cleanup: if( RootDevice ) free( RootDevice ); - if( DriverDesc ) free( DriverDesc ); if( EnumKeysLinkage ) free( EnumKeysLinkage ); if( EnumKeysTop ) free( EnumKeysTop ); if( TargetKeyName ) free( TargetKeyName ); From 16ab5c9a07438dd51c0e2649aaa4751db2ea73b1 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Fri, 22 Aug 2008 14:29:01 +0000 Subject: [PATCH 101/324] - Add EFLAGS_IOPL to asm.h and make use of it in assembly - Fix a potential 64-bit warning in handle.c - Comment fixes svn path=/trunk/; revision=35529 --- reactos/include/ndk/asm.h | 1 + reactos/ntoskrnl/ex/handle.c | 4 ++-- reactos/ntoskrnl/ex/locale.c | 2 +- reactos/ntoskrnl/ke/i386/boot.S | 2 +- reactos/ntoskrnl/ke/i386/exp.c | 10 +++++----- reactos/ntoskrnl/ke/i386/thrdini.c | 2 +- reactos/ntoskrnl/ke/i386/trap.s | 2 +- reactos/ntoskrnl/ke/i386/v86m_sup.S | 8 ++++---- reactos/ntoskrnl/ps/kill.c | 4 ++-- 9 files changed, 18 insertions(+), 17 deletions(-) diff --git a/reactos/include/ndk/asm.h b/reactos/include/ndk/asm.h index 771fa8242ad..dc7b3b22829 100644 --- a/reactos/include/ndk/asm.h +++ b/reactos/include/ndk/asm.h @@ -450,6 +450,7 @@ Author: #ifdef __ASM__ #define EFLAGS_TF 0x100 #define EFLAGS_INTERRUPT_MASK 0x200 +#define EFLAGS_IOPL 0x3000 #define EFLAGS_NESTED_TASK 0x4000 #define EFLAGS_V86_MASK 0x20000 #define EFLAGS_ALIGN_CHECK 0x40000 diff --git a/reactos/ntoskrnl/ex/handle.c b/reactos/ntoskrnl/ex/handle.c index 70d181edd42..0cea474313e 100644 --- a/reactos/ntoskrnl/ex/handle.c +++ b/reactos/ntoskrnl/ex/handle.c @@ -59,7 +59,7 @@ ExpLookupHandleTableEntry(IN PHANDLE_TABLE HandleTable, /* Direct index */ case 0: - /* Use level 1 and just get the entry directlry */ + /* Use level 1 and just get the entry directly */ Level1 = (PUCHAR)TableBase; Entry = (PVOID)&Level1[Handle.Value * (sizeof(HANDLE_TABLE_ENTRY) / @@ -210,8 +210,8 @@ ExpFreeHandleTable(IN PHANDLE_TABLE HandleTable) PEPROCESS Process = HandleTable->QuotaProcess; ULONG i, j; ULONG_PTR TableCode = HandleTable->TableCode; - ULONG TableLevel = TableCode & 3; ULONG_PTR TableBase = TableCode & ~3; + ULONG TableLevel = (ULONG)(TableCode & 3); PHANDLE_TABLE_ENTRY Level1, *Level2, **Level3; PAGED_CODE(); diff --git a/reactos/ntoskrnl/ex/locale.c b/reactos/ntoskrnl/ex/locale.c index b8589dd3a29..b50eef2a396 100644 --- a/reactos/ntoskrnl/ex/locale.c +++ b/reactos/ntoskrnl/ex/locale.c @@ -74,7 +74,7 @@ ExpGetCurrentUserUILanguage(IN PWSTR MuiName, /* Success, is the value the right type? */ if (ValueInfo->Type == REG_SZ) { - /* It is. Initailize the data and convert it */ + /* It is. Initialize the data and convert it */ RtlInitUnicodeString(&ValueString, (PWSTR)ValueInfo->Data); Status = RtlUnicodeStringToInteger(&ValueString, 16, &Value); if (NT_SUCCESS(Status)) diff --git a/reactos/ntoskrnl/ke/i386/boot.S b/reactos/ntoskrnl/ke/i386/boot.S index 24dd19cde4b..1cf68a52f36 100644 --- a/reactos/ntoskrnl/ke/i386/boot.S +++ b/reactos/ntoskrnl/ke/i386/boot.S @@ -36,7 +36,7 @@ _KiSystemStartup: test dword ptr [esp+4], 0x80000000 jnz _KiSystemStartupReal@4 - /* FREELDR Boot: Cal the FreeLDR wrapper */ + /* FREELDR Boot: Call the FreeLDR wrapper */ jmp @KiRosPrepareForSystemStartup@8 .endfunc diff --git a/reactos/ntoskrnl/ke/i386/exp.c b/reactos/ntoskrnl/ke/i386/exp.c index 0af453bffb0..5bddfd7fa12 100644 --- a/reactos/ntoskrnl/ke/i386/exp.c +++ b/reactos/ntoskrnl/ke/i386/exp.c @@ -72,7 +72,7 @@ KeInitExceptions(VOID) extern KIDTENTRY KiIdt[MAXIMUM_IDTVECTOR]; /* Loop the IDT */ - for (i = 0; i <= MAXIMUM_IDTVECTOR; i ++) + for (i = 0; i <= MAXIMUM_IDTVECTOR; i++) { /* Save the current Selector */ FlippedSelector = KiIdt[i].Selector; @@ -113,7 +113,7 @@ KiRecordDr7(OUT PULONG Dr7Ptr, /* Check if the caller gave us a mask */ if (!DrMask) { - /* He didn't use the one from the thread */ + /* He didn't, use the one from the thread */ Mask = KeGetCurrentThread()->DispatcherHeader.DebugActive; } else @@ -266,7 +266,7 @@ ULONG NTAPI KiSsFromTrapFrame(IN PKTRAP_FRAME TrapFrame) { - /* If this was V86 Mode */ + /* Check if this was V86 Mode */ if (TrapFrame->EFlags & EFLAGS_V86_MASK) { /* Just return it */ @@ -274,7 +274,7 @@ KiSsFromTrapFrame(IN PKTRAP_FRAME TrapFrame) } else if (TrapFrame->SegCs & MODE_MASK) { - /* Usermode, return the User SS */ + /* User mode, return the User SS */ return TrapFrame->HardwareSegSs | RPL_MASK; } else @@ -599,7 +599,7 @@ KeContextToTrapFrame(IN PCONTEXT Context, } /* Check if thread has IOPL and force it enabled if so */ - if (KeGetCurrentThread()->Iopl) TrapFrame->EFlags |= 0x3000; + if (KeGetCurrentThread()->Iopl) TrapFrame->EFlags |= EFLAGS_IOPL; /* Restore IRQL */ if (OldIrql < APC_LEVEL) KeLowerIrql(OldIrql); diff --git a/reactos/ntoskrnl/ke/i386/thrdini.c b/reactos/ntoskrnl/ke/i386/thrdini.c index ec4043980a2..9428d6a0a8a 100644 --- a/reactos/ntoskrnl/ke/i386/thrdini.c +++ b/reactos/ntoskrnl/ke/i386/thrdini.c @@ -132,7 +132,7 @@ Ke386InitThreadWithContext(IN PKTHREAD Thread, Thread->NpxState = NPX_STATE_NOT_LOADED &~ CR0_MP; } - /* Disable any debug regiseters */ + /* Disable any debug registers */ Context->ContextFlags &= ~CONTEXT_DEBUG_REGISTERS; /* Setup the Trap Frame */ diff --git a/reactos/ntoskrnl/ke/i386/trap.s b/reactos/ntoskrnl/ke/i386/trap.s index 65ecc781906..2f3aec94e87 100644 --- a/reactos/ntoskrnl/ke/i386/trap.s +++ b/reactos/ntoskrnl/ke/i386/trap.s @@ -1836,7 +1836,7 @@ NotGdt: CheckRing3Io: /* Get EFLAGS and IOPL */ mov ebx, [ebp+KTRAP_FRAME_EFLAGS] - and ebx, 0x3000 + and ebx, EFLAGS_IOPL shr ebx, 12 /* Check the CS's RPL mask */ diff --git a/reactos/ntoskrnl/ke/i386/v86m_sup.S b/reactos/ntoskrnl/ke/i386/v86m_sup.S index 8db3c4c7cc3..fe64aef0dc7 100644 --- a/reactos/ntoskrnl/ke/i386/v86m_sup.S +++ b/reactos/ntoskrnl/ke/i386/v86m_sup.S @@ -215,7 +215,7 @@ _OpcodePUSHFV86: or eax, edx /* Add IOPL Mask */ - or eax, 0x3000 + or eax, EFLAGS_IOPL /* Get flat ESP */ movzx ecx, word ptr [ebp+KTRAP_FRAME_SS] @@ -277,7 +277,7 @@ NoPrefix: mov [ebp+KTRAP_FRAME_ESP], edx /* Mask out EFLAGS */ - and eax, ~0x3000 + and eax, ~EFLAGS_IOPL mov ebx, ebx and ebx, ~0x4000 and ecx, EFLAGS_ALIGN_CHECK + 0x4000 + EFLAGS_INTERRUPT_MASK @@ -353,7 +353,7 @@ _OpcodeINTnnV86: mov [ebp+KTRAP_FRAME_EFLAGS], edx /* Set the IOPL Mask */ - or eax, 0x3000 + or eax, EFLAGS_IOPL /* Get stack flat address */ movzx ecx, word ptr [ebp+KTRAP_FRAME_SS] @@ -450,7 +450,7 @@ _OpcodeIRETV86: MaskEFlags: /* Mask out EFLAGS */ - and ebx, ~(0x3000 + EFLAGS_VIF + 0x4000 + EFLAGS_VIP) + and ebx, ~(EFLAGS_IOPL + EFLAGS_VIF + 0x4000 + EFLAGS_VIP) mov ecx, ebx /* FIXME: Check for VME support */ diff --git a/reactos/ntoskrnl/ps/kill.c b/reactos/ntoskrnl/ps/kill.c index 042b0c987d0..a6ec97faea4 100644 --- a/reactos/ntoskrnl/ps/kill.c +++ b/reactos/ntoskrnl/ps/kill.c @@ -1142,7 +1142,7 @@ NtTerminateProcess(IN HANDLE ProcessHandle OPTIONAL, /* Lock the Process */ if (!ExAcquireRundownProtection(&Process->RundownProtect)) { - /* Failed to lock, fal */ + /* Failed to lock, fail */ ObDereferenceObject (Process); return STATUS_PROCESS_IS_TERMINATING; } @@ -1182,7 +1182,7 @@ NtTerminateProcess(IN HANDLE ProcessHandle OPTIONAL, /* Also make sure the caller gave us our handle */ if (KillByHandle) { - /* Dereference the project */ + /* Dereference the process */ ObDereferenceObject(Process); /* Terminate ourselves */ From 8b52a8e50a7221984053b4e3785eeefe248fec4b Mon Sep 17 00:00:00 2001 From: Jeffrey Morlan Date: Fri, 22 Aug 2008 14:37:11 +0000 Subject: [PATCH 102/324] - Extract the line-reading code in ProcessInput to a separate function (ReadLine) that the parser can call. Now line continuations (using ^ at the end of a line) and multi-line parenthesized blocks work. - ReadBatchLine: Don't strip the trailing \n, the parser needs it. Remove handling of :labels and @quiet commands, now done by the parser. - ReadCommand: Add a \n to the line. Move PrintPrompt call out, since the prompt shouldn't be printed for additional lines read in a command beyond the first. svn path=/trunk/; revision=35530 --- reactos/base/shell/cmd/batch.c | 30 +-------- reactos/base/shell/cmd/batch.h | 2 +- reactos/base/shell/cmd/cmd.c | 106 +++++++++++++++++++----------- reactos/base/shell/cmd/cmd.h | 2 + reactos/base/shell/cmd/cmdinput.c | 6 +- reactos/base/shell/cmd/parser.c | 100 ++++++++++++++++++++++++---- 6 files changed, 160 insertions(+), 86 deletions(-) diff --git a/reactos/base/shell/cmd/batch.c b/reactos/base/shell/cmd/batch.c index 752eb1f9bc7..aae78e7f2e5 100644 --- a/reactos/base/shell/cmd/batch.c +++ b/reactos/base/shell/cmd/batch.c @@ -332,10 +332,9 @@ VOID AddBatchRedirection(REDIRECTION **RedirList) * Set eflag to 0 if line is not to be echoed else 1 */ -LPTSTR ReadBatchLine (LPBOOL bLocalEcho) +LPTSTR ReadBatchLine () { LPTSTR first; - LPTSTR ip; /* No batch */ if (bc == NULL) @@ -428,8 +427,6 @@ LPTSTR ReadBatchLine (LPBOOL bLocalEcho) *dp = _T('\0'); - *bLocalEcho = bEcho; - return textline; } @@ -446,14 +443,7 @@ LPTSTR ReadBatchLine (LPBOOL bLocalEcho) } TRACE ("ReadBatchLine(): textline: \'%s\'\n", debugstr_aw(textline)); - /* Strip leading spaces and trailing space/control chars */ - for (first = textline; _istspace (*first); first++) - ; - - for (ip = first + _tcslen (first) - 1; _istspace (*ip) || _istcntrl (*ip); ip--) - ; - - *++ip = _T('\0'); + first = textline; /* cmd block over multiple lines (..) */ if (bc->bCmdBlock >= 0) @@ -488,22 +478,6 @@ LPTSTR ReadBatchLine (LPBOOL bLocalEcho) } } - /* ignore labels and empty lines */ - if (*first == _T(':') || *first == 0) - continue; - - if (*first == _T('@')) - { - /* don't echo this line */ - do - first++; - while (_istspace (*first)); - - *bLocalEcho = 0; - } - else - *bLocalEcho = bEcho; - break; } diff --git a/reactos/base/shell/cmd/batch.h b/reactos/base/shell/cmd/batch.h index badf2b57e38..e93e3254cee 100644 --- a/reactos/base/shell/cmd/batch.h +++ b/reactos/base/shell/cmd/batch.h @@ -44,7 +44,7 @@ LPTSTR FindArg (INT); LPTSTR BatchParams (LPTSTR, LPTSTR); VOID ExitBatch (LPTSTR); BOOL Batch (LPTSTR, LPTSTR, LPTSTR); -LPTSTR ReadBatchLine (LPBOOL); +LPTSTR ReadBatchLine(); VOID AddBatchRedirection(REDIRECTION **); #endif /* _BATCH_H_INCLUDED_ */ diff --git a/reactos/base/shell/cmd/cmd.c b/reactos/base/shell/cmd/cmd.c index 572ffb0ca95..d3e6d03d920 100644 --- a/reactos/base/shell/cmd/cmd.c +++ b/reactos/base/shell/cmd/cmd.c @@ -1239,60 +1239,86 @@ too_long: * */ +BOOL bNoInteractive; +BOOL bIsBatch; + +BOOL +ReadLine (TCHAR *commandline, BOOL bMore) +{ + TCHAR readline[CMDLINE_LENGTH]; + LPTSTR ip; + + /* if no batch input then... */ + if (!(ip = ReadBatchLine())) + { + if (bNoInteractive) + { + bExit = TRUE; + return FALSE; + } + + if (bMore) + { + ConOutPrintf(_T("More? ")); + } + else + { + /* JPP 19980807 - if echo off, don't print prompt */ + if (bEcho) + PrintPrompt(); + } + + ReadCommand (readline, CMDLINE_LENGTH - 1); + if (CheckCtrlBreak(BREAK_INPUT)) + { + ConOutPuts(_T("\n")); + return FALSE; + } + ip = readline; + bIsBatch = FALSE; + } + else + { + bIsBatch = TRUE; + } + + if (!SubstituteVars(ip, commandline, _T('%'), bIsBatch)) + return FALSE; + + /* FIXME: !vars! should be substituted later, after parsing. */ + if (!SubstituteVars(commandline, readline, _T('!'), bIsBatch)) + return FALSE; + _tcscpy(commandline, readline); + + return TRUE; +} + static INT ProcessInput (BOOL bFlag) { - TCHAR commandline[CMDLINE_LENGTH]; - TCHAR readline[CMDLINE_LENGTH]; - LPTSTR ip; - BOOL bEchoThisLine; - BOOL bIsBatch; + PARSED_COMMAND *Cmd; + bNoInteractive = bFlag; do { - /* if no batch input then... */ - if (!(ip = ReadBatchLine (&bEchoThisLine))) - { - if (bFlag) - return nErrorLevel; - - ReadCommand (readline, CMDLINE_LENGTH); - ip = readline; - bEchoThisLine = FALSE; - bIsBatch = FALSE; - } - else - { - bIsBatch = TRUE; - } - - /* skip leading blanks */ - while ( _istspace(*ip) ) - ++ip; - - if (!SubstituteVars(ip, commandline, _T('%'), bIsBatch)) + Cmd = ParseCommand(NULL); + if (!Cmd) continue; /* JPP 19980807 */ /* Echo batch file line */ - if (bEchoThisLine) + if (bIsBatch && bEcho && Cmd->Type != C_QUIET) { PrintPrompt (); - ConOutPuts (commandline); + EchoCommand(Cmd); + ConOutChar(_T('\n')); } - /* FIXME: !vars! should be substituted later, after parsing. */ - if (!SubstituteVars(commandline, readline, _T('!'), bIsBatch)) - continue; - _tcscpy(commandline, readline); - - if (!CheckCtrlBreak(BREAK_INPUT) && *commandline) - { - ParseCommandLine (commandline); - if (bEcho && !bIgnoreEcho && (!bIsBatch || bEchoThisLine)) - ConOutChar ('\n'); - bIgnoreEcho = FALSE; - } + ExecuteCommand(Cmd); + if (bEcho && !bIgnoreEcho && (!bIsBatch || Cmd->Type != C_QUIET)) + ConOutChar ('\n'); + FreeCommand(Cmd); + bIgnoreEcho = FALSE; } while (!bCanExit || !bExit); diff --git a/reactos/base/shell/cmd/cmd.h b/reactos/base/shell/cmd/cmd.h index 87dce182016..9d709e6247a 100644 --- a/reactos/base/shell/cmd/cmd.h +++ b/reactos/base/shell/cmd/cmd.h @@ -103,6 +103,7 @@ LPCTSTR GetEnvVarOrSpecial ( LPCTSTR varName ); VOID AddBreakHandler (VOID); VOID RemoveBreakHandler (VOID); BOOL DoCommand (LPTSTR line); +BOOL ReadLine(TCHAR *commandline, BOOL bMore); int cmd_main (int argc, const TCHAR *argv[]); extern HANDLE CMD_ModuleHandle; @@ -340,6 +341,7 @@ typedef struct _PARSED_COMMAND TCHAR CommandLine[]; } PARSED_COMMAND; PARSED_COMMAND *ParseCommand(LPTSTR Line); +VOID EchoCommand(PARSED_COMMAND *Cmd); VOID FreeCommand(PARSED_COMMAND *Cmd); diff --git a/reactos/base/shell/cmd/cmdinput.c b/reactos/base/shell/cmd/cmdinput.c index 573a21b62ac..fd3560a43b3 100644 --- a/reactos/base/shell/cmd/cmdinput.c +++ b/reactos/base/shell/cmd/cmdinput.c @@ -152,10 +152,6 @@ VOID ReadCommand (LPTSTR str, INT maxlen) /* get screen size */ GetScreenSize (&maxx, &maxy); - /* JPP 19980807 - if echo off, don't print prompt */ - if (bEcho) - PrintPrompt(); - GetCursorXY (&orgx, &orgy); GetCursorXY (&curx, &cury); @@ -431,6 +427,8 @@ VOID ReadCommand (LPTSTR str, INT maxlen) if (str[0]) History (0, str); #endif + str[charcount++] = _T('\n'); + str[charcount] = _T('\0'); ConInDummy (); ConOutChar (_T('\n')); bReturn = TRUE; diff --git a/reactos/base/shell/cmd/parser.c b/reactos/base/shell/cmd/parser.c index a2cdb6c29ad..287110a2dfa 100644 --- a/reactos/base/shell/cmd/parser.c +++ b/reactos/base/shell/cmd/parser.c @@ -29,7 +29,10 @@ static TCHAR ParseChar() { TCHAR Char; -//restart: + if (bParseError) + return CurChar = 0; + +restart: /* Although CRs can be injected into a line via an environment * variable substitution, the parser ignores them - they won't * even separate tokens. */ @@ -39,9 +42,19 @@ static TCHAR ParseChar() if (!Char) { - /*if (bLineContinuations) - if (ReadLine(ParseLine, TRUE) && *(ParsePos = ParseLine)) - goto restart;*/ + ParsePos--; + if (bLineContinuations) + { + if (!ReadLine(ParseLine, TRUE)) + { + /* ^C pressed, or line was too long */ + bParseError = TRUE; + } + else if (*(ParsePos = ParseLine)) + { + goto restart; + } + } } return CurChar = Char; } @@ -96,7 +109,8 @@ static int ParseToken(TCHAR ExtraEnd, BOOL PreserveSpace) /* Next character is a forced literal */ } } - /* FIXME: potential buffer overflow here */ + if (Out == &CurrentToken[CMDLINE_LENGTH - 1]) + break; *Out++ = Char; Char = ParseChar(); } @@ -247,7 +261,7 @@ static PARSED_COMMAND *ParseBlock(REDIRECTION *RedirList) /* Read the block contents */ NextPtr = &Cmd->Subcommands; InsideBlock++; - do + while (1) { Sub = ParseCommandOp(C_OP_LOWEST); if (Sub) @@ -261,7 +275,12 @@ static PARSED_COMMAND *ParseBlock(REDIRECTION *RedirList) FreeCommand(Cmd); return NULL; } - } while (CurrentTokenType != TOK_END_BLOCK); + + if (CurrentTokenType == TOK_END_BLOCK) + break; + /* Skip past the \n */ + ParseChar(); + } InsideBlock--; /* Process any trailing redirections */ @@ -335,6 +354,10 @@ static PARSED_COMMAND *ParseCommandPart(void) { return ParseBlock(RedirList); } + else if (Type == TOK_END_BLOCK && !RedirList) + { + return NULL; + } else { ParseError(); @@ -352,7 +375,12 @@ static PARSED_COMMAND *ParseCommandPart(void) Type = ParseToken(0, TRUE); if (Type == TOK_NORMAL) { - /* FIXME: potential buffer overflow here */ + if (Pos + _tcslen(CurrentToken) >= &ParsedLine[CMDLINE_LENGTH]) + { + ParseError(); + FreeRedirection(RedirList); + return NULL; + } Pos = _stpcpy(Pos, CurrentToken); } else if (Type == TOK_REDIRECTION) @@ -426,7 +454,7 @@ ParseCommand(LPTSTR Line) } else { - /*if (!ReadLine(ParseLine, FALSE))*/ + if (!ReadLine(ParseLine, FALSE)) return NULL; bLineContinuations = TRUE; } @@ -435,15 +463,61 @@ ParseCommand(LPTSTR Line) CurChar = _T(' '); Cmd = ParseCommandOp(C_OP_LOWEST); - if (Cmd && CurrentTokenType != TOK_END) + if (Cmd) { - ParseError(); - FreeCommand(Cmd); - Cmd = NULL; + if (CurrentTokenType != TOK_END) + ParseError(); + if (bParseError) + { + FreeCommand(Cmd); + Cmd = NULL; + } } return Cmd; } +/* Reconstruct a parse tree into text form; + * used for echoing batch file commands */ +VOID +EchoCommand(PARSED_COMMAND *Cmd) +{ + PARSED_COMMAND *Sub; + REDIRECTION *Redir; + + switch (Cmd->Type) + { + case C_COMMAND: + ConOutPrintf(_T("%s"), Cmd->CommandLine); + break; + case C_QUIET: + return; + case C_BLOCK: + ConOutChar(_T('(')); + for (Sub = Cmd->Subcommands; Sub; Sub = Sub->Next) + { + EchoCommand(Sub); + ConOutChar(_T('\n')); + } + ConOutChar(_T(')')); + break; + case C_MULTI: + case C_IFFAILURE: + case C_IFSUCCESS: + case C_PIPE: + Sub = Cmd->Subcommands; + EchoCommand(Sub); + ConOutPrintf(_T(" %s "), OpString[Cmd->Type - C_OP_LOWEST]); + EchoCommand(Sub->Next); + break; + } + + for (Redir = Cmd->Redirections; Redir; Redir = Redir->Next) + { + ConOutPrintf(_T(" %c%s%s"), _T('0') + Redir->Number, + RedirString[Redir->Type], Redir->Filename); + } +} + VOID FreeCommand(PARSED_COMMAND *Cmd) { From b129412701b31b74d9045e637eb8f8c92d3a45e6 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Fri, 22 Aug 2008 14:55:20 +0000 Subject: [PATCH 103/324] - Replace more magic values with symbolic constants - Fix a peculiar header duplication svn path=/trunk/; revision=35531 --- reactos/ntoskrnl/include/internal/i386/v86m.h | 65 ------------------- reactos/ntoskrnl/ke/i386/v86m_sup.S | 24 +++---- 2 files changed, 12 insertions(+), 77 deletions(-) diff --git a/reactos/ntoskrnl/include/internal/i386/v86m.h b/reactos/ntoskrnl/include/internal/i386/v86m.h index 0596b362d7f..dcbaf7e2f8a 100644 --- a/reactos/ntoskrnl/include/internal/i386/v86m.h +++ b/reactos/ntoskrnl/include/internal/i386/v86m.h @@ -59,68 +59,3 @@ typedef struct _KV86M_TRAP_FRAME } KV86M_TRAP_FRAME, *PKV86M_TRAP_FRAME; #endif - -/* EOF */ -#ifndef __V86M_ -#define __V86M_ - -#include "ketypes.h" - -/* Emulate cli/sti instructions */ -#define KV86M_EMULATE_CLI_STI (0x1) -/* Allow the v86 mode code to access i/o ports */ -#define KV86M_ALLOW_IO_PORT_ACCESS (0x2) - -typedef struct _KV86M_REGISTERS -{ - /* - * General purpose registers - */ - ULONG Ebp; - ULONG Edi; - ULONG Esi; - ULONG Edx; - ULONG Ecx; - ULONG Ebx; - ULONG Eax; - ULONG Ds; - ULONG Es; - ULONG Fs; - ULONG Gs; - - /* - * Control registers - */ - ULONG Eip; - ULONG Cs; - ULONG Eflags; - ULONG Esp; - ULONG Ss; - - /* - * Control structures - */ - ULONG RecoveryAddress; - UCHAR RecoveryInstruction[4]; - ULONG Vif; - ULONG Flags; - PNTSTATUS PStatus; -} KV86M_REGISTERS, *PKV86M_REGISTERS; - -typedef struct _KV86M_TRAP_FRAME -{ - KTRAP_FRAME Tf; - - ULONG SavedExceptionStack; - - /* - * These are put on the top of the stack by the routine that entered - * v86 mode so the exception handlers can find the control information - */ - struct _KV86M_REGISTERS* regs; - ULONG orig_ebp; -} KV86M_TRAP_FRAME, *PKV86M_TRAP_FRAME; - -#endif - -/* EOF */ diff --git a/reactos/ntoskrnl/ke/i386/v86m_sup.S b/reactos/ntoskrnl/ke/i386/v86m_sup.S index fe64aef0dc7..a6ff1a7c153 100644 --- a/reactos/ntoskrnl/ke/i386/v86m_sup.S +++ b/reactos/ntoskrnl/ke/i386/v86m_sup.S @@ -203,7 +203,7 @@ _OpcodeOUTSWV86: _OpcodePUSHFV86: /* Get VDM state */ - mov eax, 0x714 + mov eax, FIXED_NTVDMSTATE_LINEAR_PC_AT mov eax, [eax] /* Get EFLAGS and mask out IF */ @@ -211,7 +211,7 @@ _OpcodePUSHFV86: and eax, ~EFLAGS_INTERRUPT_MASK /* Mask align check and interrupt mask */ - and eax, EFLAGS_ALIGN_CHECK + 0x4000 + EFLAGS_INTERRUPT_MASK + and eax, EFLAGS_ALIGN_CHECK + EFLAGS_NESTED_TASK + EFLAGS_INTERRUPT_MASK or eax, edx /* Add IOPL Mask */ @@ -252,7 +252,7 @@ SkipPrefix: _OpcodePOPFV86: /* Get VDM state */ - mov eax, 0x714 + mov eax, FIXED_NTVDMSTATE_LINEAR_PC_AT /* Get flat ESP */ mov ecx, [ebp+KTRAP_FRAME_SS] @@ -279,8 +279,8 @@ NoPrefix: /* Mask out EFLAGS */ and eax, ~EFLAGS_IOPL mov ebx, ebx - and ebx, ~0x4000 - and ecx, EFLAGS_ALIGN_CHECK + 0x4000 + EFLAGS_INTERRUPT_MASK + and ebx, ~EFLAGS_NESTED_TASK + and ecx, EFLAGS_ALIGN_CHECK + EFLAGS_NESTED_TASK + EFLAGS_INTERRUPT_MASK /* FIXME: Support VME */ @@ -314,7 +314,7 @@ NoAdjustEsp0: pop eax /* Update the flags in the VDM State */ - LOCK and dword ptr [eax], ~(EFLAGS_ALIGN_CHECK + 0x4000 + EFLAGS_INTERRUPT_MASK) + LOCK and dword ptr [eax], ~(EFLAGS_ALIGN_CHECK + EFLAGS_NESTED_TASK + EFLAGS_INTERRUPT_MASK) LOCK or [eax], ecx /* Update EIP */ @@ -334,7 +334,7 @@ _OpcodeINTnnV86: mov edx, [ebp+KTRAP_FRAME_EFLAGS] /* Remove the flag in the VDM State */ - mov eax, 0x714 + mov eax, FIXED_NTVDMSTATE_LINEAR_PC_AT mov ecx, [eax] LOCK and dword ptr [eax], ~EFLAGS_INTERRUPT_MASK @@ -349,7 +349,7 @@ _OpcodeINTnnV86: /* Now mask out VIF and TF */ or eax, ecx - and edx, ~(EFLAGS_VIF + 0x4000 + EFLAGS_TF) + and edx, ~(EFLAGS_VIF + EFLAGS_NESTED_TASK + EFLAGS_TF) mov [ebp+KTRAP_FRAME_EFLAGS], edx /* Set the IOPL Mask */ @@ -422,7 +422,7 @@ _OpcodeINTOV86: _OpcodeIRETV86: /* Get the VDM State */ - mov eax, 0x714 + mov eax, FIXED_NTVDMSTATE_LINEAR_PC_AT /* Get flat ESP */ movzx ecx, word ptr [ebp+KTRAP_FRAME_SS] @@ -450,7 +450,7 @@ _OpcodeIRETV86: MaskEFlags: /* Mask out EFLAGS */ - and ebx, ~(EFLAGS_IOPL + EFLAGS_VIF + 0x4000 + EFLAGS_VIP) + and ebx, ~(EFLAGS_IOPL + EFLAGS_VIF + EFLAGS_NESTED_TASK + EFLAGS_VIP) mov ecx, ebx /* FIXME: Check for VME support */ @@ -595,7 +595,7 @@ _OpcodeREPPrefixV86: _OpcodeCLIV86: /* Get VDM State */ - mov eax, 0x714 + mov eax, FIXED_NTVDMSTATE_LINEAR_PC_AT /* FIXME: Support VME */ @@ -616,7 +616,7 @@ _OpcodeCLIV86: _OpcodeSTIV86: /* Get VDM State */ - mov eax, 0x714 + mov eax, FIXED_NTVDMSTATE_LINEAR_PC_AT /* FIXME: Support VME */ From bf702f35f25ec63f31eec10ab49eade5a0647159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Fri, 22 Aug 2008 17:47:13 +0000 Subject: [PATCH 104/324] Clean up code by removing now useless parts Replace 3rd arg of IopActionInitChildServices by a global variable (removes a pointer cast) IopStartDevice: no need to get top of stack, IopInitiatePnpIrp does it for us svn path=/trunk/; revision=35532 --- reactos/ntoskrnl/include/internal/io.h | 6 +- reactos/ntoskrnl/io/iomgr/driver.c | 21 ----- reactos/ntoskrnl/io/iomgr/iomgr.c | 4 +- reactos/ntoskrnl/io/pnpmgr/plugplay.c | 2 +- reactos/ntoskrnl/io/pnpmgr/pnpmgr.c | 122 ++++--------------------- 5 files changed, 24 insertions(+), 131 deletions(-) diff --git a/reactos/ntoskrnl/include/internal/io.h b/reactos/ntoskrnl/include/internal/io.h index ca656d2b8a0..65dec1a517f 100644 --- a/reactos/ntoskrnl/include/internal/io.h +++ b/reactos/ntoskrnl/include/internal/io.h @@ -553,8 +553,7 @@ IopActionConfigureChildServices( NTSTATUS IopActionInitChildServices( IN PDEVICE_NODE DeviceNode, - IN PVOID Context, - IN BOOLEAN BootDrivers + IN PVOID Context ); NTSTATUS @@ -579,8 +578,7 @@ IopQueueTargetDeviceEvent( NTSTATUS IopInitializePnpServices( - IN PDEVICE_NODE DeviceNode, - IN BOOLEAN BootDrivers); + IN PDEVICE_NODE DeviceNode); NTSTATUS NTAPI diff --git a/reactos/ntoskrnl/io/iomgr/driver.c b/reactos/ntoskrnl/io/iomgr/driver.c index d69b47eb8ac..c5a8bee7034 100644 --- a/reactos/ntoskrnl/io/iomgr/driver.c +++ b/reactos/ntoskrnl/io/iomgr/driver.c @@ -782,10 +782,6 @@ IopInitializeBuiltinDriver(IN PLDR_DATA_TABLE_ENTRY LdrEntry) LPWSTR FileExtension; PUNICODE_STRING ModuleName = &LdrEntry->BaseDllName; UNICODE_STRING ServiceName; -#if 1 // Disable for FreeLDR 2.5 - UNICODE_STRING ServiceNameWithExtension; - PLDR_DATA_TABLE_ENTRY ModuleObject; -#endif /* * Display 'Loading XXX...' message @@ -805,19 +801,6 @@ IopInitializeBuiltinDriver(IN PLDR_DATA_TABLE_ENTRY LdrEntry) FileNameWithoutPath++; } - /* - * Load the module. - */ -#if 1 // Remove for FreeLDR 2.5. - RtlCreateUnicodeString(&ServiceNameWithExtension, FileNameWithoutPath); - Status = LdrProcessDriverModule(LdrEntry, &ServiceNameWithExtension, &ModuleObject); - if (!NT_SUCCESS(Status)) - { - CPRINT("Driver '%wZ' load failed, status (%x)\n", ModuleName, Status); - return Status; - } -#endif - /* * Strip the file extension from ServiceName */ @@ -844,7 +827,6 @@ IopInitializeBuiltinDriver(IN PLDR_DATA_TABLE_ENTRY LdrEntry) /* * Initialize the driver */ - DeviceNode->Flags |= DN_DRIVER_LOADED; Status = IopInitializeDriverModule(DeviceNode, LdrEntry, &DeviceNode->ServiceName, FALSE, &DriverObject); @@ -1729,9 +1711,6 @@ IopLoadUnloadDriver(PLOAD_UNLOAD_PARAMS LoadParams) /* Store its DriverSection, so that it could be unloaded */ DriverObject->DriverSection = ModuleObject; - - /* We have a driver for this DeviceNode */ - DeviceNode->Flags |= DN_DRIVER_LOADED; } IopInitializeDevice(DeviceNode, DriverObject); diff --git a/reactos/ntoskrnl/io/iomgr/iomgr.c b/reactos/ntoskrnl/io/iomgr/iomgr.c index f9cf68a94b4..d53ef808e74 100644 --- a/reactos/ntoskrnl/io/iomgr/iomgr.c +++ b/reactos/ntoskrnl/io/iomgr/iomgr.c @@ -14,6 +14,7 @@ #include ULONG IopTraceLevel = 0; +BOOLEAN PnpSystemInit = FALSE; // should go into a proper header VOID @@ -535,9 +536,10 @@ IoInitSystem(IN PLOADER_PARAMETER_BLOCK LoaderBlock) #endif /* Load services for devices found by PnP manager */ - IopInitializePnpServices(IopRootDeviceNode, FALSE); + IopInitializePnpServices(IopRootDeviceNode); /* Load system start drivers */ + PnpSystemInit = TRUE; IopInitializeSystemDrivers(); /* Destroy the group driver list */ diff --git a/reactos/ntoskrnl/io/pnpmgr/plugplay.c b/reactos/ntoskrnl/io/pnpmgr/plugplay.c index c0370787d25..e7bdf2ffd7c 100644 --- a/reactos/ntoskrnl/io/pnpmgr/plugplay.c +++ b/reactos/ntoskrnl/io/pnpmgr/plugplay.c @@ -576,7 +576,7 @@ IopResetDevice(PPLUGPLAY_CONTROL_RESET_DEVICE_DATA ResetDeviceData) Status = IopActionConfigureChildServices(DeviceNode, DeviceNode->Parent); if (NT_SUCCESS(Status)) - Status = IopActionInitChildServices(DeviceNode, DeviceNode->Parent, FALSE); + Status = IopActionInitChildServices(DeviceNode, DeviceNode->Parent); ObDereferenceObject(DeviceObject); diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c index ae63ab0c0e0..e6005c00b6b 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c @@ -24,6 +24,7 @@ KGUARDED_MUTEX PpDeviceReferenceTableLock; RTL_AVL_TABLE PpDeviceReferenceTable; extern ULONG ExpInitializationPhase; +extern BOOLEAN PnpSystemInit; /* DATA **********************************************************************/ @@ -139,16 +140,13 @@ IopStartDevice( IO_STATUS_BLOCK IoStatusBlock; IO_STACK_LOCATION Stack; ULONG RequiredLength; - PDEVICE_OBJECT Fdo; NTSTATUS Status; - Fdo = IoGetAttachedDeviceReference(DeviceNode->PhysicalDeviceObject); - IopDeviceNodeSetFlag(DeviceNode, DNF_ASSIGNING_RESOURCES); DPRINT("Sending IRP_MN_FILTER_RESOURCE_REQUIREMENTS to device stack\n"); Stack.Parameters.FilterResourceRequirements.IoResourceRequirementList = DeviceNode->ResourceRequirements; Status = IopInitiatePnpIrp( - Fdo, + DeviceNode->PhysicalDeviceObject, &IoStatusBlock, IRP_MN_FILTER_RESOURCE_REQUIREMENTS, &Stack); @@ -190,7 +188,7 @@ IopStartDevice( KeEnterCriticalRegion(); Status = IopInitiatePnpIrp( - Fdo, + DeviceNode->PhysicalDeviceObject, &IoStatusBlock, IRP_MN_START_DEVICE, &Stack); @@ -213,10 +211,8 @@ IopStartDevice( } } - ObDereferenceObject(Fdo); - if (NT_SUCCESS(Status)) - DeviceNode->Flags |= DN_STARTED; + IopDeviceNodeSetFlag(DeviceNode, DNF_STARTED); return Status; } @@ -1784,7 +1780,6 @@ IopActionConfigureChildServices(PDEVICE_NODE DeviceNode, * device is started */ DPRINT1("%wZ is using NULL driver\n", &DeviceNode->InstancePath); IopDeviceNodeSetFlag(DeviceNode, DNF_STARTED); - DeviceNode->Flags |= DN_STARTED; } return STATUS_SUCCESS; } @@ -1805,8 +1800,6 @@ IopActionConfigureChildServices(PDEVICE_NODE DeviceNode, * Pointer to device node. * Context * Pointer to parent node to initialize child node services for. - * BootDrivers - * Load only driver marked as boot start. * * Remarks * If the driver image for a service is not loaded and initialized @@ -1819,14 +1812,13 @@ IopActionConfigureChildServices(PDEVICE_NODE DeviceNode, NTSTATUS IopActionInitChildServices(PDEVICE_NODE DeviceNode, - PVOID Context, - BOOLEAN BootDrivers) + PVOID Context) { PDEVICE_NODE ParentDeviceNode; NTSTATUS Status; + BOOLEAN BootDrivers = !PnpSystemInit; - DPRINT("IopActionInitChildServices(%p, %p, %d)\n", DeviceNode, Context, - BootDrivers); + DPRINT("IopActionInitChildServices(%p, %p)\n", DeviceNode, Context); ParentDeviceNode = (PDEVICE_NODE)Context; @@ -1900,8 +1892,6 @@ IopActionInitChildServices(PDEVICE_NODE DeviceNode, /* Driver is loaded and initialized at this point */ if (NT_SUCCESS(Status)) { - /* We have a driver for this DeviceNode */ - DeviceNode->Flags |= DN_DRIVER_LOADED; /* Attach lower level filter drivers. */ IopAttachFilterDrivers(DeviceNode, TRUE); /* Initialize the function driver for the device node */ @@ -1945,34 +1935,6 @@ IopActionInitChildServices(PDEVICE_NODE DeviceNode, return STATUS_SUCCESS; } -/* - * IopActionInitAllServices - * - * Initialize the service for all (direct) child nodes of a parent node. This - * function just calls IopActionInitChildServices with BootDrivers = FALSE. - */ - -NTSTATUS -IopActionInitAllServices(PDEVICE_NODE DeviceNode, - PVOID Context) -{ - return IopActionInitChildServices(DeviceNode, Context, FALSE); -} - -/* - * IopActionInitBootServices - * - * Initialize the boot start services for all (direct) child nodes of a - * parent node. This function just calls IopActionInitChildServices with - * BootDrivers = TRUE. - */ -NTSTATUS -IopActionInitBootServices(PDEVICE_NODE DeviceNode, - PVOID Context) -{ - return IopActionInitChildServices(DeviceNode, Context, TRUE); -} - /* * IopInitializePnpServices * @@ -1982,37 +1944,21 @@ IopActionInitBootServices(PDEVICE_NODE DeviceNode, * DeviceNode * Top device node to start initializing services. * - * BootDrivers - * When set to TRUE, only drivers marked as boot start will - * be loaded. Otherwise, all drivers will be loaded. - * * Return Value * Status */ NTSTATUS -IopInitializePnpServices(IN PDEVICE_NODE DeviceNode, - IN BOOLEAN BootDrivers) +IopInitializePnpServices(IN PDEVICE_NODE DeviceNode) { DEVICETREE_TRAVERSE_CONTEXT Context; - DPRINT("IopInitializePnpServices(%p, %d)\n", DeviceNode, BootDrivers); + DPRINT("IopInitializePnpServices(%p)\n", DeviceNode); - if (BootDrivers) - { - IopInitDeviceTreeTraverseContext( - &Context, - DeviceNode, - IopActionInitBootServices, - DeviceNode); - } - else - { - IopInitDeviceTreeTraverseContext( - &Context, - DeviceNode, - IopActionInitAllServices, - DeviceNode); - } + IopInitDeviceTreeTraverseContext( + &Context, + DeviceNode, + IopActionInitChildServices, + DeviceNode); return IopTraverseDeviceTree(&Context); } @@ -3051,12 +2997,11 @@ IoGetDeviceProperty(IN PDEVICE_OBJECT DeviceObject, if (!NT_SUCCESS(Status)) { - DPRINT1("Problem: Status=0x%08x, ResultLength = %d\n", Status, *ResultLength); ExFreePool(ValueInformation); if (Status == STATUS_BUFFER_OVERFLOW) return STATUS_BUFFER_TOO_SMALL; - else - return Status; + DPRINT1("Problem: Status=0x%08x, ResultLength = %d\n", Status, *ResultLength); + return Status; } /* FIXME: Verify the value (NULL-terminated, correct format). */ @@ -3339,10 +3284,6 @@ IoSynchronousInvalidateDeviceRelations( IO_STATUS_BLOCK IoStatusBlock; PDEVICE_NODE ChildDeviceNode; IO_STACK_LOCATION Stack; - BOOLEAN BootDrivers; - OBJECT_ATTRIBUTES ObjectAttributes; - UNICODE_STRING LinkName = RTL_CONSTANT_STRING(L"\\SystemRoot"); - HANDLE Handle; NTSTATUS Status; ULONG i; @@ -3437,36 +3378,9 @@ IoSynchronousInvalidateDeviceRelations( } /* - * Get the state of the system boot. If the \\SystemRoot link isn't - * created yet, we will assume that it's possible to load only boot - * drivers. + * Initialize services for discovered children. */ - InitializeObjectAttributes( - &ObjectAttributes, - &LinkName, - 0, - NULL, - NULL); - Status = ZwOpenFile( - &Handle, - FILE_ALL_ACCESS, - &ObjectAttributes, - &IoStatusBlock, - 0, - 0); - if (NT_SUCCESS(Status)) - { - BootDrivers = FALSE; - ZwClose(Handle); - } - else - BootDrivers = TRUE; - - /* - * Initialize services for discovered children. Only boot drivers will - * be loaded from boot driver! - */ - Status = IopInitializePnpServices(DeviceNode, BootDrivers); + Status = IopInitializePnpServices(DeviceNode); if (!NT_SUCCESS(Status)) { DPRINT("IopInitializePnpServices() failed with status 0x%08lx\n", Status); From 70f34a3756834414c26f8942e9354bccdb5def05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Fri, 22 Aug 2008 19:00:31 +0000 Subject: [PATCH 105/324] Move most of the code of IoSynchronousInvalidateDeviceRelations to IopEnumerateDevice, and use it when possible Fix IoSynchronousInvalidateDeviceRelations prototype svn path=/trunk/; revision=35533 --- reactos/include/ndk/iofuncs.h | 7 + reactos/ntoskrnl/include/internal/io.h | 5 + reactos/ntoskrnl/io/iomgr/iomgr.c | 14 +- reactos/ntoskrnl/io/pnpmgr/pnpmgr.c | 250 +++++++++++++------------ 4 files changed, 147 insertions(+), 129 deletions(-) diff --git a/reactos/include/ndk/iofuncs.h b/reactos/include/ndk/iofuncs.h index 3ff89f4bc00..06648fd596c 100644 --- a/reactos/include/ndk/iofuncs.h +++ b/reactos/include/ndk/iofuncs.h @@ -37,6 +37,13 @@ IoAssignDriveLetters( OUT PUCHAR NtSystemPath, OUT PSTRING NtSystemPathString ); + +NTSTATUS +NTAPI +IoSynchronousInvalidateDeviceRelations( + IN PDEVICE_OBJECT DeviceObject, + IN DEVICE_RELATION_TYPE Type +); #endif // diff --git a/reactos/ntoskrnl/include/internal/io.h b/reactos/ntoskrnl/include/internal/io.h index 65dec1a517f..914d67fc393 100644 --- a/reactos/ntoskrnl/include/internal/io.h +++ b/reactos/ntoskrnl/include/internal/io.h @@ -556,6 +556,11 @@ IopActionInitChildServices( IN PVOID Context ); +NTSTATUS +IopEnumerateDevice( + IN PDEVICE_OBJECT DeviceObject +); + NTSTATUS IoCreateDriverList( VOID diff --git a/reactos/ntoskrnl/io/iomgr/iomgr.c b/reactos/ntoskrnl/io/iomgr/iomgr.c index d53ef808e74..2e44a5c0cfd 100644 --- a/reactos/ntoskrnl/io/iomgr/iomgr.c +++ b/reactos/ntoskrnl/io/iomgr/iomgr.c @@ -16,14 +16,6 @@ ULONG IopTraceLevel = 0; BOOLEAN PnpSystemInit = FALSE; -// should go into a proper header -VOID -NTAPI -IoSynchronousInvalidateDeviceRelations( - IN PDEVICE_OBJECT DeviceObject, - IN DEVICE_RELATION_TYPE Type -); - VOID NTAPI IopTimerDispatch( @@ -510,10 +502,8 @@ IoInitSystem(IN PLOADER_PARAMETER_BLOCK LoaderBlock) IopReinitializeBootDrivers(); /* Initialize PnP root relations */ - IoSynchronousInvalidateDeviceRelations(IopRootDeviceNode-> - PhysicalDeviceObject, - BusRelations); - + IopEnumerateDevice(IopRootDeviceNode->PhysicalDeviceObject); + /* Check if this was a ramdisk boot */ if (!_strnicmp(LoaderBlock->ArcBootDeviceName, "ramdisk(0)", 10)) { diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c index e6005c00b6b..53a49f4c855 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c @@ -43,13 +43,6 @@ typedef struct _INVALIDATE_DEVICE_RELATION_DATA PIO_WORKITEM WorkItem; } INVALIDATE_DEVICE_RELATION_DATA, *PINVALIDATE_DEVICE_RELATION_DATA; -VOID -NTAPI -IoSynchronousInvalidateDeviceRelations( - IN PDEVICE_OBJECT DeviceObject, - IN DEVICE_RELATION_TYPE Type); - - /* FUNCTIONS *****************************************************************/ static NTSTATUS @@ -206,7 +199,7 @@ IopStartDevice( DPRINT("Device needs enumeration, invalidating bus relations\n"); /* Invalidate device relations synchronously (otherwise there will be dirty read of DeviceNode) */ - IoSynchronousInvalidateDeviceRelations(DeviceNode->PhysicalDeviceObject, BusRelations); + IopEnumerateDevice(DeviceNode->PhysicalDeviceObject); IopDeviceNodeClearFlag(DeviceNode, DNF_NEED_ENUMERATION_ONLY); } } @@ -1670,6 +1663,125 @@ IopActionInterrogateDeviceStack(PDEVICE_NODE DeviceNode, return STATUS_SUCCESS; } + +NTSTATUS +IopEnumerateDevice( + IN PDEVICE_OBJECT DeviceObject) +{ + PDEVICE_NODE DeviceNode = IopGetDeviceNode(DeviceObject); + DEVICETREE_TRAVERSE_CONTEXT Context; + PDEVICE_RELATIONS DeviceRelations; + IO_STATUS_BLOCK IoStatusBlock; + PDEVICE_NODE ChildDeviceNode; + IO_STACK_LOCATION Stack; + NTSTATUS Status; + ULONG i; + + DPRINT("DeviceObject 0x%p\n", DeviceObject); + + DPRINT("Sending IRP_MN_QUERY_DEVICE_RELATIONS to device stack\n"); + + Stack.Parameters.QueryDeviceRelations.Type = BusRelations; + + Status = IopInitiatePnpIrp( + DeviceObject, + &IoStatusBlock, + IRP_MN_QUERY_DEVICE_RELATIONS, + &Stack); + if (!NT_SUCCESS(Status) || Status == STATUS_PENDING) + { + DPRINT("IopInitiatePnpIrp() failed with status 0x%08lx\n", Status); + return Status; + } + + DeviceRelations = (PDEVICE_RELATIONS)IoStatusBlock.Information; + + if (!DeviceRelations || DeviceRelations->Count < 0) + { + DPRINT("No PDOs\n"); + if (DeviceRelations) + { + ExFreePool(DeviceRelations); + } + return STATUS_UNSUCCESSFUL; + } + + DPRINT("Got %d PDOs\n", DeviceRelations->Count); + + /* + * Create device nodes for all discovered devices + */ + for (i = 0; i < DeviceRelations->Count; i++) + { + if (IopGetDeviceNode(DeviceRelations->Objects[i]) != NULL) + { + ObDereferenceObject(DeviceRelations->Objects[i]); + continue; + } + Status = IopCreateDeviceNode( + DeviceNode, + DeviceRelations->Objects[i], + NULL, + &ChildDeviceNode); + DeviceNode->Flags |= DNF_ENUMERATED; + if (!NT_SUCCESS(Status)) + { + DPRINT("No resources\n"); + for (i = 0; i < DeviceRelations->Count; i++) + ObDereferenceObject(DeviceRelations->Objects[i]); + ExFreePool(DeviceRelations); + return Status; + } + } + ExFreePool(DeviceRelations); + + /* + * Retrieve information about all discovered children from the bus driver + */ + IopInitDeviceTreeTraverseContext( + &Context, + DeviceNode, + IopActionInterrogateDeviceStack, + DeviceNode); + + Status = IopTraverseDeviceTree(&Context); + if (!NT_SUCCESS(Status)) + { + DPRINT("IopTraverseDeviceTree() failed with status 0x%08lx\n", Status); + return Status; + } + + /* + * Retrieve configuration from the registry for discovered children + */ + IopInitDeviceTreeTraverseContext( + &Context, + DeviceNode, + IopActionConfigureChildServices, + DeviceNode); + + Status = IopTraverseDeviceTree(&Context); + if (!NT_SUCCESS(Status)) + { + DPRINT("IopTraverseDeviceTree() failed with status 0x%08lx\n", Status); + return Status; + } + + /* + * Initialize services for discovered children. + */ + Status = IopInitializePnpServices(DeviceNode); + if (!NT_SUCCESS(Status)) + { + DPRINT("IopInitializePnpServices() failed with status 0x%08lx\n", Status); + return Status; + } + + DPRINT("IopEnumerateDevice() finished\n"); + return STATUS_SUCCESS; +} + + /* * IopActionConfigureChildServices * @@ -3272,120 +3384,24 @@ IoInvalidateDeviceRelations( /* * @implemented */ -VOID +NTSTATUS NTAPI IoSynchronousInvalidateDeviceRelations( IN PDEVICE_OBJECT DeviceObject, IN DEVICE_RELATION_TYPE Type) { - PDEVICE_NODE DeviceNode = IopGetDeviceNode(DeviceObject); - DEVICETREE_TRAVERSE_CONTEXT Context; - PDEVICE_RELATIONS DeviceRelations; - IO_STATUS_BLOCK IoStatusBlock; - PDEVICE_NODE ChildDeviceNode; - IO_STACK_LOCATION Stack; - NTSTATUS Status; - ULONG i; - - DPRINT("DeviceObject 0x%p\n", DeviceObject); - - DPRINT("Sending IRP_MN_QUERY_DEVICE_RELATIONS to device stack\n"); - - Stack.Parameters.QueryDeviceRelations.Type = Type; - - Status = IopInitiatePnpIrp( - DeviceObject, - &IoStatusBlock, - IRP_MN_QUERY_DEVICE_RELATIONS, - &Stack); - if (!NT_SUCCESS(Status)) + PAGED_CODE(); + + switch (Type) { - DPRINT("IopInitiatePnpIrp() failed with status 0x%08lx\n", Status); - return; + case BusRelations: + /* Enumerate the device */ + return IopEnumerateDevice(DeviceObject); + case PowerRelations: + /* Not handled yet */ + return STATUS_NOT_IMPLEMENTED; + default: + /* Ejection relations and target relations are not supported */ + return STATUS_NOT_SUPPORTED; } - - DeviceRelations = (PDEVICE_RELATIONS)IoStatusBlock.Information; - - if (!DeviceRelations || DeviceRelations->Count <= 0) - { - DPRINT("No PDOs\n"); - if (DeviceRelations) - { - ExFreePool(DeviceRelations); - } - return; - } - - DPRINT("Got %d PDOs\n", DeviceRelations->Count); - - /* - * Create device nodes for all discovered devices - */ - for (i = 0; i < DeviceRelations->Count; i++) - { - if (IopGetDeviceNode(DeviceRelations->Objects[i]) != NULL) - { - ObDereferenceObject(DeviceRelations->Objects[i]); - continue; - } - Status = IopCreateDeviceNode( - DeviceNode, - DeviceRelations->Objects[i], - NULL, - &ChildDeviceNode); - DeviceNode->Flags |= DNF_ENUMERATED; - if (!NT_SUCCESS(Status)) - { - DPRINT("No resources\n"); - for (i = 0; i < DeviceRelations->Count; i++) - ObDereferenceObject(DeviceRelations->Objects[i]); - ExFreePool(DeviceRelations); - return; - } - } - ExFreePool(DeviceRelations); - - /* - * Retrieve information about all discovered children from the bus driver - */ - IopInitDeviceTreeTraverseContext( - &Context, - DeviceNode, - IopActionInterrogateDeviceStack, - DeviceNode); - - Status = IopTraverseDeviceTree(&Context); - if (!NT_SUCCESS(Status)) - { - DPRINT("IopTraverseDeviceTree() failed with status 0x%08lx\n", Status); - return; - } - - /* - * Retrieve configuration from the registry for discovered children - */ - IopInitDeviceTreeTraverseContext( - &Context, - DeviceNode, - IopActionConfigureChildServices, - DeviceNode); - - Status = IopTraverseDeviceTree(&Context); - if (!NT_SUCCESS(Status)) - { - DPRINT("IopTraverseDeviceTree() failed with status 0x%08lx\n", Status); - return; - } - - /* - * Initialize services for discovered children. - */ - Status = IopInitializePnpServices(DeviceNode); - if (!NT_SUCCESS(Status)) - { - DPRINT("IopInitializePnpServices() failed with status 0x%08lx\n", Status); - return; - } - - DPRINT("IopInvalidateDeviceRelations() finished\n"); } From 44fdf97ae29146287f3dd08c5f83407cb3b0a2b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Fri, 22 Aug 2008 19:06:25 +0000 Subject: [PATCH 106/324] Calling IoSynchronousInvalidateDeviceRelations with type TargetDeviceRelation returns success. Spotted by Alex svn path=/trunk/; revision=35534 --- reactos/ntoskrnl/io/pnpmgr/pnpmgr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c index 53a49f4c855..f5a68c11114 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c @@ -3400,8 +3400,11 @@ IoSynchronousInvalidateDeviceRelations( case PowerRelations: /* Not handled yet */ return STATUS_NOT_IMPLEMENTED; + case TargetDeviceRelation: + /* Nothing to do */ + return STATUS_SUCCESS; default: - /* Ejection relations and target relations are not supported */ + /* Ejection relations are not supported */ return STATUS_NOT_SUPPORTED; } } From 60ef511bb8639376602352e1ba7e595956aa1bca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Fri, 22 Aug 2008 19:08:25 +0000 Subject: [PATCH 107/324] DEVICE_RELATIONS->Count is ULONG svn path=/trunk/; revision=35535 --- reactos/ntoskrnl/io/pnpmgr/pnpmgr.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c index f5a68c11114..bce99201e6e 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c @@ -1696,17 +1696,13 @@ IopEnumerateDevice( DeviceRelations = (PDEVICE_RELATIONS)IoStatusBlock.Information; - if (!DeviceRelations || DeviceRelations->Count < 0) + if (!DeviceRelations) { DPRINT("No PDOs\n"); - if (DeviceRelations) - { - ExFreePool(DeviceRelations); - } return STATUS_UNSUCCESSFUL; } - DPRINT("Got %d PDOs\n", DeviceRelations->Count); + DPRINT("Got %u PDOs\n", DeviceRelations->Count); /* * Create device nodes for all discovered devices From df9f666602b0f5596d3388cbe42ba8a742bcf746 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Fri, 22 Aug 2008 20:07:14 +0000 Subject: [PATCH 108/324] * When clicking on the desktop background, there is no item selected, thus, apidl is null * Fixes bug 3676 svn path=/trunk/; revision=35540 --- reactos/dll/win32/shell32/shv_def_cmenu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/dll/win32/shell32/shv_def_cmenu.c b/reactos/dll/win32/shell32/shv_def_cmenu.c index 445b5747cbc..ca202e9c562 100644 --- a/reactos/dll/win32/shell32/shv_def_cmenu.c +++ b/reactos/dll/win32/shell32/shv_def_cmenu.c @@ -1408,12 +1408,12 @@ DoProperties( WCHAR szDrive[MAX_PATH]; STRRET strFile; - if (_ILIsMyComputer(This->dcm.apidl[0])) + if (This->dcm.cidl &&_ILIsMyComputer(This->dcm.apidl[0])) { ShellExecuteW(lpcmi->hwnd, L"open", L"rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl", NULL, NULL, SW_SHOWNORMAL); return S_OK; } - else if (_ILIsDesktop(This->dcm.apidl[0])) + else if (This->dcm.cidl == 0 && _ILIsDesktop(This->dcm.pidlFolder)) { ShellExecuteW(lpcmi->hwnd, L"open", L"rundll32.exe shell32.dll,Control_RunDLL desk.cpl", NULL, NULL, SW_SHOWNORMAL); return S_OK; From 03d12cf07b0df938ec278257d82caf70221e5ea1 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Fri, 22 Aug 2008 21:24:31 +0000 Subject: [PATCH 109/324] - Remove a LIST_FOR_EACH - ASSERTify 2 assumptions - Rename "ListEntry" to "NextEntry" for clarification svn path=/trunk/; revision=35542 --- reactos/ntoskrnl/ke/devqueue.c | 66 +++++++++++++++++++++------------- 1 file changed, 42 insertions(+), 24 deletions(-) diff --git a/reactos/ntoskrnl/ke/devqueue.c b/reactos/ntoskrnl/ke/devqueue.c index 5377105efb8..337df9306ca 100644 --- a/reactos/ntoskrnl/ke/devqueue.c +++ b/reactos/ntoskrnl/ke/devqueue.c @@ -197,7 +197,7 @@ NTAPI KeRemoveByKeyDeviceQueue(IN PKDEVICE_QUEUE DeviceQueue, IN ULONG SortKey) { - PLIST_ENTRY ListEntry; + PLIST_ENTRY NextEntry; PKDEVICE_QUEUE_ENTRY ReturnEntry; KLOCK_QUEUE_HANDLE DeviceLock; ASSERT_DEVICE_QUEUE(DeviceQueue); @@ -218,8 +218,8 @@ KeRemoveByKeyDeviceQueue(IN PKDEVICE_QUEUE DeviceQueue, else { /* If SortKey is greater than the last key, then return the first entry right away */ - ListEntry = &DeviceQueue->DeviceListHead; - ReturnEntry = CONTAINING_RECORD(ListEntry->Blink, + NextEntry = &DeviceQueue->DeviceListHead; + ReturnEntry = CONTAINING_RECORD(NextEntry->Blink, KDEVICE_QUEUE_ENTRY, DeviceListEntry); @@ -227,24 +227,27 @@ KeRemoveByKeyDeviceQueue(IN PKDEVICE_QUEUE DeviceQueue, if (ReturnEntry->SortKey <= SortKey) { /* Get the first entry */ - ReturnEntry = CONTAINING_RECORD(ListEntry->Flink, + ReturnEntry = CONTAINING_RECORD(NextEntry->Flink, KDEVICE_QUEUE_ENTRY, DeviceListEntry); } else { /* Loop the list */ - ListEntry = DeviceQueue->DeviceListHead.Flink; + NextEntry = DeviceQueue->DeviceListHead.Flink; while (TRUE) { + /* Make sure we don't go beyond the end of the queue */ + ASSERT(NextEntry != &DeviceQueue->DeviceListHead); + /* Get the next entry and check if the key is low enough */ - ReturnEntry = CONTAINING_RECORD(ListEntry, + ReturnEntry = CONTAINING_RECORD(NextEntry, KDEVICE_QUEUE_ENTRY, DeviceListEntry); if (SortKey <= ReturnEntry->SortKey) break; /* Try the next one */ - ListEntry = ListEntry->Flink; + NextEntry = NextEntry->Flink; } } @@ -270,7 +273,7 @@ NTAPI KeRemoveByKeyDeviceQueueIfBusy(IN PKDEVICE_QUEUE DeviceQueue, IN ULONG SortKey) { - PLIST_ENTRY ListEntry; + PLIST_ENTRY NextEntry; PKDEVICE_QUEUE_ENTRY ReturnEntry; KLOCK_QUEUE_HANDLE DeviceLock; ASSERT_DEVICE_QUEUE(DeviceQueue); @@ -289,27 +292,42 @@ KeRemoveByKeyDeviceQueueIfBusy(IN PKDEVICE_QUEUE DeviceQueue, } else { - /* Find entry with SortKey greater than or equal to the passed-in SortKey */ - LIST_FOR_EACH(ReturnEntry, &DeviceQueue->DeviceListHead, KDEVICE_QUEUE_ENTRY, DeviceListEntry) - { - /* Check if keys match */ - if (ReturnEntry->SortKey >= SortKey) - { - /* We found it, so just remove it */ - RemoveEntryList(&ReturnEntry->DeviceListEntry); - break; - } - } + /* If SortKey is greater than the last key, then return the first entry right away */ + NextEntry = &DeviceQueue->DeviceListHead; + ReturnEntry = CONTAINING_RECORD(NextEntry->Blink, + KDEVICE_QUEUE_ENTRY, + DeviceListEntry); - /* Check if we found something */ - if (!ReturnEntry) + /* Check if we can just get the first entry */ + if (ReturnEntry->SortKey <= SortKey) { - /* Not found, return the first entry */ - ListEntry = RemoveHeadList(&DeviceQueue->DeviceListHead); - ReturnEntry = CONTAINING_RECORD(ListEntry, + /* Get the first entry */ + ReturnEntry = CONTAINING_RECORD(NextEntry->Flink, KDEVICE_QUEUE_ENTRY, DeviceListEntry); } + else + { + /* Loop the list */ + NextEntry = DeviceQueue->DeviceListHead.Flink; + while (TRUE) + { + /* Make sure we don't go beyond the end of the queue */ + ASSERT(NextEntry != &DeviceQueue->DeviceListHead); + + /* Get the next entry and check if the key is low enough */ + ReturnEntry = CONTAINING_RECORD(NextEntry, + KDEVICE_QUEUE_ENTRY, + DeviceListEntry); + if (SortKey <= ReturnEntry->SortKey) break; + + /* Try the next one */ + NextEntry = NextEntry->Flink; + } + } + + /* We have an entry, remove it now */ + RemoveEntryList(&ReturnEntry->DeviceListEntry); /* Set it as non-inserted */ ReturnEntry->Inserted = FALSE; From dcc142c4a1d3ac48b82c2c239e0ab25710c874a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Fri, 22 Aug 2008 21:43:42 +0000 Subject: [PATCH 110/324] Fix device node structure to be compatible with MS Windows Vista Send GUID_DEVICE_ENUMERATED event umpnpmgr: react on GUID_DEVICE_ENUMERATED, not GUID_DEVICE_ARRIVAL IopEnumerateDevice: Set DNF_ENUMERATED and DO_BUS_ENUMERATED_DEVICE when required IopEnumerateDevice: Continue to process PDOs, even if one failed svn path=/trunk/; revision=35543 --- reactos/base/services/umpnpmgr/umpnpmgr.c | 2 +- reactos/base/setup/usetup/interface/devinst.c | 2 +- reactos/include/ndk/iotypes.h | 30 ++++- reactos/include/ndk/potypes.h | 16 +++ reactos/ntoskrnl/io/pnpmgr/plugplay.c | 4 +- reactos/ntoskrnl/io/pnpmgr/pnpmgr.c | 122 +++++++++++------- 6 files changed, 121 insertions(+), 55 deletions(-) diff --git a/reactos/base/services/umpnpmgr/umpnpmgr.c b/reactos/base/services/umpnpmgr/umpnpmgr.c index 0253fc536c0..c778c228f68 100644 --- a/reactos/base/services/umpnpmgr/umpnpmgr.c +++ b/reactos/base/services/umpnpmgr/umpnpmgr.c @@ -2165,7 +2165,7 @@ PnpEventThread(LPVOID lpParameter) /* Process the pnp event */ DPRINT("Received PnP Event\n"); - if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_ARRIVAL, &RpcStatus)) + if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_ENUMERATED, &RpcStatus)) { DeviceInstallParams* Params; DWORD len; diff --git a/reactos/base/setup/usetup/interface/devinst.c b/reactos/base/setup/usetup/interface/devinst.c index f5ae9c0a1f4..a646624113f 100644 --- a/reactos/base/setup/usetup/interface/devinst.c +++ b/reactos/base/setup/usetup/interface/devinst.c @@ -366,7 +366,7 @@ EventThread(IN LPVOID lpParameter) /* Process the pnp event */ DPRINT("Received PnP Event\n"); - if (IsEqualIID(&PnpEvent->EventGuid, (REFGUID)&GUID_DEVICE_ARRIVAL)) + if (IsEqualIID(&PnpEvent->EventGuid, (REFGUID)&GUID_DEVICE_ENUMERATED)) { DPRINT1("Device arrival event: %S\n", PnpEvent->TargetDevice.DeviceIds); InstallDevice(hInf, hEnum, hServices, PnpEvent->TargetDevice.DeviceIds); diff --git a/reactos/include/ndk/iotypes.h b/reactos/include/ndk/iotypes.h index 42f7644ef95..d19d4ad0307 100644 --- a/reactos/include/ndk/iotypes.h +++ b/reactos/include/ndk/iotypes.h @@ -23,6 +23,7 @@ Author: // #include #include +#include // // I/O Completion Access Rights @@ -321,6 +322,18 @@ typedef enum _FSINFOCLASS #endif +// +// Dock Profile Status +// +typedef enum _PROFILE_STATUS +{ + DOCK_NOTDOCKDEVICE, + DOCK_QUIESCENT, + DOCK_ARRIVING, + DOCK_DEPARTING, + DOCK_EJECTIRP_COMPLETED +} PROFILE_STATUS, *PPROFILE_STATUS; + // // Device Node States // @@ -740,17 +753,18 @@ typedef struct _IO_CLIENT_EXTENSION // typedef struct _DEVICE_NODE { - struct _DEVICE_NODE *Parent; - struct _DEVICE_NODE *PrevSibling; - struct _DEVICE_NODE *NextSibling; + struct _DEVICE_NODE *Sibling; struct _DEVICE_NODE *Child; + struct _DEVICE_NODE *Parent; + struct _DEVICE_NODE *LastChild; ULONG Level; struct _PO_DEVICE_NOTIFY *Notify; + PO_IRP_MANAGER PoIrpManager; PNP_DEVNODE_STATE State; PNP_DEVNODE_STATE PreviousState; PNP_DEVNODE_STATE StateHistory[20]; ULONG StateHistoryEntry; - INT CompletionStatus; + LONG CompletionStatus; PIRP PendingIrp; ULONG Flags; ULONG UserFlags; @@ -786,10 +800,13 @@ typedef struct _DEVICE_NODE struct _DEVICE_NODE *NextResourceDeviceNode; } OverUsed2; PCM_RESOURCE_LIST BootResources; +#if (NTDDI_VERSION >= NTDDI_LONGHORN) + PCM_RESOURCE_LIST BootResourcesTranslated; +#endif ULONG CapabilityFlags; struct { - ULONG DockStatus; + PROFILE_STATUS DockStatus; LIST_ENTRY ListEntry; WCHAR *SerialNumber; } DockInfo; @@ -799,6 +816,9 @@ typedef struct _DEVICE_NODE ULONG DriverUnloadRetryCount; struct _DEVICE_NODE *PreviousParent; ULONG DeletedChidren; +#if (NTDDI_VERSION >= NTDDI_LONGHORN) + ULONG NumaNodeIndex; +#endif } DEVICE_NODE, *PDEVICE_NODE; // diff --git a/reactos/include/ndk/potypes.h b/reactos/include/ndk/potypes.h index 6627aabe037..91f7f6be3d7 100644 --- a/reactos/include/ndk/potypes.h +++ b/reactos/include/ndk/potypes.h @@ -107,6 +107,22 @@ typedef struct _PO_DEVICE_NOTIFY ULONG ActiveChild; } PO_DEVICE_NOTIFY, *PPO_DEVICE_NOTIFY; +// +// Power IRP Queue +// +typedef struct _PO_IRP_QUEUE +{ + PIRP CurrentIrp; + PIRP PendingIrpList; +} PO_IRP_QUEUE, *PPO_IRP_QUEUE; + +// Power IRP Manager +typedef struct _PO_IRP_MANAGER +{ + PO_IRP_QUEUE DeviceIrpQueue; + PO_IRP_QUEUE SystemIrpQueue; +} PO_IRP_MANAGER, *PPO_IRP_MANAGER; + #endif // !NTOS_MODE_USER #endif // _POTYPES_H diff --git a/reactos/ntoskrnl/io/pnpmgr/plugplay.c b/reactos/ntoskrnl/io/pnpmgr/plugplay.c index e7bdf2ffd7c..fda41f45eb8 100644 --- a/reactos/ntoskrnl/io/pnpmgr/plugplay.c +++ b/reactos/ntoskrnl/io/pnpmgr/plugplay.c @@ -128,7 +128,7 @@ IopTraverseDeviceNode(PDEVICE_NODE Node, PUNICODE_STRING DeviceInstance) /* Traversal of all children nodes */ for (ChildNode = Node->Child; ChildNode != NULL; - ChildNode = ChildNode->NextSibling) + ChildNode = ChildNode->Sibling) { DeviceObject = IopTraverseDeviceNode(ChildNode, DeviceInstance); if (DeviceObject != NULL) @@ -360,7 +360,7 @@ IopGetRelatedDevice(PPLUGPLAY_CONTROL_RELATED_DEVICE_DATA RelatedDeviceData) break; case PNP_GET_SIBLING_DEVICE: - RelatedDeviceNode = DeviceNode->NextSibling; + RelatedDeviceNode = DeviceNode->Sibling; break; default: diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c index bce99201e6e..4b96764b935 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c @@ -384,19 +384,21 @@ IopCreateDeviceNode(PDEVICE_NODE ParentNode, ((PEXTENDED_DEVOBJ_EXTENSION)PhysicalDeviceObject->DeviceObjectExtension)->DeviceNode = Node; - if (ParentNode) - { - KeAcquireSpinLock(&IopDeviceTreeLock, &OldIrql); - Node->Parent = ParentNode; - Node->NextSibling = ParentNode->Child; - if (ParentNode->Child != NULL) - { - ParentNode->Child->PrevSibling = Node; - } - ParentNode->Child = Node; - KeReleaseSpinLock(&IopDeviceTreeLock, OldIrql); - Node->Level = ParentNode->Level + 1; - } + if (ParentNode) + { + KeAcquireSpinLock(&IopDeviceTreeLock, &OldIrql); + Node->Parent = ParentNode; + if (ParentNode->LastChild != NULL) + ParentNode->LastChild->Sibling = Node; + else + ParentNode->Child = Node; + ParentNode->LastChild = Node; + KeReleaseSpinLock(&IopDeviceTreeLock, OldIrql); + Node->Level = ParentNode->Level + 1; + } + + if (PhysicalDeviceObject) + PhysicalDeviceObject->Flags &= ~DO_DEVICE_INITIALIZING; *DeviceNode = Node; @@ -407,6 +409,7 @@ NTSTATUS IopFreeDeviceNode(PDEVICE_NODE DeviceNode) { KIRQL OldIrql; + PDEVICE_NODE PrevSibling = NULL; /* All children must be deleted before a parent is deleted */ ASSERT(!DeviceNode->Child); @@ -417,24 +420,30 @@ IopFreeDeviceNode(PDEVICE_NODE DeviceNode) ObDereferenceObject(DeviceNode->PhysicalDeviceObject); - /* Unlink from parent if it exists */ + /* Get previous sibling */ + if (DeviceNode->Parent && DeviceNode->Parent->Child != DeviceNode) + { + PrevSibling = DeviceNode->Parent->Child; + while (PrevSibling->Sibling != DeviceNode) + PrevSibling = PrevSibling->Sibling; + } - if ((DeviceNode->Parent) && (DeviceNode->Parent->Child == DeviceNode)) - { - DeviceNode->Parent->Child = DeviceNode->NextSibling; - } + /* Unlink from parent if it exists */ + if (DeviceNode->Parent) + { + if (DeviceNode->Parent->LastChild == DeviceNode) + { + DeviceNode->Parent->LastChild = PrevSibling; + if (PrevSibling) + PrevSibling->Sibling = NULL; + } + if (DeviceNode->Parent->Child == DeviceNode) + DeviceNode->Parent->Child = DeviceNode->Sibling; + } - /* Unlink from sibling list */ - - if (DeviceNode->PrevSibling) - { - DeviceNode->PrevSibling->NextSibling = DeviceNode->NextSibling; - } - - if (DeviceNode->NextSibling) - { - DeviceNode->NextSibling->PrevSibling = DeviceNode->PrevSibling; - } + /* Unlink from sibling list */ + if (PrevSibling) + PrevSibling->Sibling = DeviceNode->Sibling; KeReleaseSpinLock(&IopDeviceTreeLock, OldIrql); @@ -547,7 +556,7 @@ IopTraverseDeviceTreeNode(PDEVICETREE_TRAVERSE_CONTEXT Context) /* Traversal of all children nodes */ for (ChildDeviceNode = ParentDeviceNode->Child; ChildDeviceNode != NULL; - ChildDeviceNode = ChildDeviceNode->NextSibling) + ChildDeviceNode = ChildDeviceNode->Sibling) { /* Pass the current device node to the action routine */ Context->DeviceNode = ChildDeviceNode; @@ -1656,7 +1665,7 @@ IopActionInterrogateDeviceStack(PDEVICE_NODE DeviceNode, if (!IopDeviceNodeHasFlag(DeviceNode, DNF_LEGACY_DRIVER)) { /* Report the device to the user-mode pnp manager */ - IopQueueTargetDeviceEvent(&GUID_DEVICE_ARRIVAL, + IopQueueTargetDeviceEvent(&GUID_DEVICE_ENUMERATED, &DeviceNode->InstancePath); } @@ -1671,6 +1680,7 @@ IopEnumerateDevice( PDEVICE_NODE DeviceNode = IopGetDeviceNode(DeviceObject); DEVICETREE_TRAVERSE_CONTEXT Context; PDEVICE_RELATIONS DeviceRelations; + PDEVICE_OBJECT ChildDeviceObject; IO_STATUS_BLOCK IoStatusBlock; PDEVICE_NODE ChildDeviceNode; IO_STACK_LOCATION Stack; @@ -1679,6 +1689,12 @@ IopEnumerateDevice( DPRINT("DeviceObject 0x%p\n", DeviceObject); + DPRINT("Sending GUID_DEVICE_ARRIVAL\n"); + + /* Report the device to the user-mode pnp manager */ + IopQueueTargetDeviceEvent(&GUID_DEVICE_ARRIVAL, + &DeviceNode->InstancePath); + DPRINT("Sending IRP_MN_QUERY_DEVICE_RELATIONS to device stack\n"); Stack.Parameters.QueryDeviceRelations.Type = BusRelations; @@ -1709,24 +1725,38 @@ IopEnumerateDevice( */ for (i = 0; i < DeviceRelations->Count; i++) { - if (IopGetDeviceNode(DeviceRelations->Objects[i]) != NULL) + ChildDeviceObject = DeviceRelations->Objects[i]; + ASSERT((ChildDeviceObject->Flags & DO_DEVICE_INITIALIZING) == 0); + + ChildDeviceNode = IopGetDeviceNode(ChildDeviceObject); + if (!ChildDeviceNode) { - ObDereferenceObject(DeviceRelations->Objects[i]); - continue; + /* One doesn't exist, create it */ + Status = IopCreateDeviceNode( + DeviceNode, + ChildDeviceObject, + NULL, + &ChildDeviceNode); + if (NT_SUCCESS(Status)) + { + /* Mark the node as enumerated */ + ChildDeviceNode->Flags |= DNF_ENUMERATED; + + /* Mark the DO as bus enumerated */ + ChildDeviceObject->Flags |= DO_BUS_ENUMERATED_DEVICE; + } + else + { + /* Ignore this DO */ + DPRINT1("IopCreateDeviceNode() failed with status 0x%08x. Skipping PDO %u\n", Status, i); + ObDereferenceObject(ChildDeviceNode); + } } - Status = IopCreateDeviceNode( - DeviceNode, - DeviceRelations->Objects[i], - NULL, - &ChildDeviceNode); - DeviceNode->Flags |= DNF_ENUMERATED; - if (!NT_SUCCESS(Status)) + else { - DPRINT("No resources\n"); - for (i = 0; i < DeviceRelations->Count; i++) - ObDereferenceObject(DeviceRelations->Objects[i]); - ExFreePool(DeviceRelations); - return Status; + /* Mark it as enumerated */ + ChildDeviceNode->Flags |= DNF_ENUMERATED; + ObDereferenceObject(ChildDeviceObject); } } ExFreePool(DeviceRelations); From 7380fcd1f4b67d94b04f26789c28241970f692a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Fri, 22 Aug 2008 22:11:49 +0000 Subject: [PATCH 111/324] LONG -> NTSTATUS svn path=/trunk/; revision=35544 --- reactos/include/ndk/iotypes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/include/ndk/iotypes.h b/reactos/include/ndk/iotypes.h index d19d4ad0307..5f7f2655f30 100644 --- a/reactos/include/ndk/iotypes.h +++ b/reactos/include/ndk/iotypes.h @@ -764,7 +764,7 @@ typedef struct _DEVICE_NODE PNP_DEVNODE_STATE PreviousState; PNP_DEVNODE_STATE StateHistory[20]; ULONG StateHistoryEntry; - LONG CompletionStatus; + NTSTATUS CompletionStatus; PIRP PendingIrp; ULONG Flags; ULONG UserFlags; From 16553f0003177b7d79425e0ef0adeb2289dddb23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Fri, 22 Aug 2008 22:13:46 +0000 Subject: [PATCH 112/324] Remove useless 'if' svn path=/trunk/; revision=35545 --- reactos/ntoskrnl/io/pnpmgr/pnpmgr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c index 4b96764b935..1c4354b37d1 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c @@ -397,8 +397,7 @@ IopCreateDeviceNode(PDEVICE_NODE ParentNode, Node->Level = ParentNode->Level + 1; } - if (PhysicalDeviceObject) - PhysicalDeviceObject->Flags &= ~DO_DEVICE_INITIALIZING; + PhysicalDeviceObject->Flags &= ~DO_DEVICE_INITIALIZING; *DeviceNode = Node; From db4dc32f9f506c0ba9dcf6db4f1713bafca7f73d Mon Sep 17 00:00:00 2001 From: Art Yerkes Date: Sat, 23 Aug 2008 07:20:22 +0000 Subject: [PATCH 113/324] Merge aicom-network-fixes up to 35538 svn path=/trunk/; revision=35550 --- reactos/dll/win32/msafd/misc/dllmain.c | 1 + reactos/drivers/network/afd/afd/bind.c | 2 +- reactos/drivers/network/afd/afd/info.c | 2 +- reactos/drivers/network/afd/afd/lock.c | 28 ++++++++++++++++++------- reactos/drivers/network/afd/afd/read.c | 6 +++--- reactos/drivers/network/afd/afd/write.c | 4 ++-- 6 files changed, 28 insertions(+), 15 deletions(-) diff --git a/reactos/dll/win32/msafd/misc/dllmain.c b/reactos/dll/win32/msafd/misc/dllmain.c index 1343c99a936..084257aafc5 100644 --- a/reactos/dll/win32/msafd/misc/dllmain.c +++ b/reactos/dll/win32/msafd/misc/dllmain.c @@ -291,6 +291,7 @@ DWORD MsafdReturnWithErrno( NTSTATUS Status, LPINT Errno, DWORD Received, case STATUS_INVALID_CONNECTION: AFD_DbgPrint(MID_TRACE,("MSAFD: STATUS_INVALID_CONNECTION\n")); *Errno = WSAEAFNOSUPPORT; break; case STATUS_REMOTE_NOT_LISTENING: AFD_DbgPrint(MID_TRACE, ("MSAFD: STATUS_REMOTE_NOT_LISTENING\n")); *Errno = WSAECONNRESET; break; case STATUS_FILE_CLOSED: AFD_DbgPrint(MID_TRACE, ("MSAFD: STATUS_FILE_CLOSED\n")); *Errno = WSAENOTSOCK; break; + case STATUS_INVALID_PARAMETER: DbgPrint("MSAFD: STATUS_INVALID_PARAMETER\n"); *Errno = WSAEINVAL; break; default: DbgPrint("MSAFD: Error %x is unknown\n", Status); *Errno = WSAEINVAL; break; diff --git a/reactos/drivers/network/afd/afd/bind.c b/reactos/drivers/network/afd/afd/bind.c index 73bb6a617ab..840da0b7867 100644 --- a/reactos/drivers/network/afd/afd/bind.c +++ b/reactos/drivers/network/afd/afd/bind.c @@ -25,7 +25,7 @@ NTSTATUS WarmSocketForBind( PAFD_FCB FCB ) { } if( !FCB->LocalAddress ) { AFD_DbgPrint(MID_TRACE,("No local address\n")); - return STATUS_UNSUCCESSFUL; + return STATUS_INVALID_PARAMETER; } Status = TdiOpenAddressFile(&FCB->TdiDeviceName, diff --git a/reactos/drivers/network/afd/afd/info.c b/reactos/drivers/network/afd/afd/info.c index 3d2c48d9eec..f2833af7b0d 100644 --- a/reactos/drivers/network/afd/afd/info.c +++ b/reactos/drivers/network/afd/afd/info.c @@ -84,7 +84,7 @@ AfdGetSockOrPeerName( PDEVICE_OBJECT DeviceObject, PIRP Irp, if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); if( FCB->AddressFile.Object == NULL) { - return UnlockAndMaybeComplete( FCB, STATUS_UNSUCCESSFUL, Irp, 0, + return UnlockAndMaybeComplete( FCB, STATUS_INVALID_PARAMETER, Irp, 0, NULL ); } diff --git a/reactos/drivers/network/afd/afd/lock.c b/reactos/drivers/network/afd/afd/lock.c index ed7227e5708..764c6e64f93 100644 --- a/reactos/drivers/network/afd/afd/lock.c +++ b/reactos/drivers/network/afd/afd/lock.c @@ -37,7 +37,7 @@ PVOID LockRequest( PIRP Irp, PIO_STACK_LOCATION IrpSp ) { } IrpSp->Parameters.DeviceIoControl.Type3InputBuffer = - MmMapLockedPages( Irp->MdlAddress, KernelMode ); + MmGetSystemAddressForMdlSafe( Irp->MdlAddress, NormalPagePriority ); if( !IrpSp->Parameters.DeviceIoControl.Type3InputBuffer ) { IoFreeMdl( Irp->MdlAddress ); @@ -50,12 +50,13 @@ PVOID LockRequest( PIRP Irp, PIO_STACK_LOCATION IrpSp ) { } VOID UnlockRequest( PIRP Irp, PIO_STACK_LOCATION IrpSp ) { - if( !IrpSp->Parameters.DeviceIoControl.Type3InputBuffer || !Irp->MdlAddress ) return; + PVOID Buffer = MmGetSystemAddressForMdlSafe( Irp->MdlAddress, NormalPagePriority ); + if( IrpSp->Parameters.DeviceIoControl.Type3InputBuffer == Buffer || Buffer == NULL ) { + MmUnmapLockedPages( IrpSp->Parameters.DeviceIoControl.Type3InputBuffer, Irp->MdlAddress ); + MmUnlockPages( Irp->MdlAddress ); + IoFreeMdl( Irp->MdlAddress ); + } - MmUnmapLockedPages( IrpSp->Parameters.DeviceIoControl.Type3InputBuffer, - Irp->MdlAddress ); - MmUnlockPages( Irp->MdlAddress ); - IoFreeMdl( Irp->MdlAddress ); Irp->MdlAddress = NULL; } @@ -72,6 +73,7 @@ PAFD_WSABUF LockBuffers( PAFD_WSABUF Buf, UINT Count, UINT Size = sizeof(AFD_WSABUF) * (Count + Lock); PAFD_WSABUF NewBuf = ExAllocatePool( PagedPool, Size * 2 ); PMDL NewMdl; + BOOLEAN LockFailed = FALSE; AFD_DbgPrint(MID_TRACE,("Called(%08x)\n", NewBuf)); @@ -117,9 +119,19 @@ PAFD_WSABUF LockBuffers( PAFD_WSABUF Buf, UINT Count, if( MapBuf[i].Mdl ) { AFD_DbgPrint(MID_TRACE,("Probe and lock pages\n")); - MmProbeAndLockPages( MapBuf[i].Mdl, KernelMode, - Write ? IoModifyAccess : IoReadAccess ); + _SEH_TRY { + MmProbeAndLockPages( MapBuf[i].Mdl, KernelMode, + Write ? IoModifyAccess : IoReadAccess ); + } _SEH_HANDLE { + LockFailed = TRUE; + } _SEH_END; AFD_DbgPrint(MID_TRACE,("MmProbeAndLock finished\n")); + + if( LockFailed ) { + IoFreeMdl( MapBuf[i].Mdl ); + MapBuf[i].Mdl = NULL; + LockFailed = FALSE; + } } } } diff --git a/reactos/drivers/network/afd/afd/read.c b/reactos/drivers/network/afd/afd/read.c index 59f076ddf25..a95ffb139f3 100644 --- a/reactos/drivers/network/afd/afd/read.c +++ b/reactos/drivers/network/afd/afd/read.c @@ -252,7 +252,7 @@ NTSTATUS NTAPI ReceiveComplete } else if( FCB->State == SOCKET_STATE_LISTENING ) { AFD_DbgPrint(MIN_TRACE,("!!! LISTENER GOT A RECEIVE COMPLETE !!!\n")); SocketStateUnlock( FCB ); - return STATUS_UNSUCCESSFUL; + return STATUS_INVALID_PARAMETER; } HandleEOFOnIrp( FCB, Irp->IoStatus.Status, Irp->IoStatus.Information ); @@ -285,7 +285,7 @@ AfdConnectedSocketReadData(PDEVICE_OBJECT DeviceObject, PIRP Irp, FCB->State != SOCKET_STATE_CONNECTING ) { AFD_DbgPrint(MID_TRACE,("Called recv on wrong kind of socket (s%x)\n", FCB->State)); - return UnlockAndMaybeComplete( FCB, STATUS_UNSUCCESSFUL, + return UnlockAndMaybeComplete( FCB, STATUS_INVALID_PARAMETER, Irp, 0, NULL ); } @@ -576,7 +576,7 @@ AfdPacketSocketReadData(PDEVICE_OBJECT DeviceObject, PIRP Irp, /* Check that the socket is bound */ if( FCB->State != SOCKET_STATE_BOUND ) return UnlockAndMaybeComplete - ( FCB, STATUS_UNSUCCESSFUL, Irp, 0, NULL ); + ( FCB, STATUS_INVALID_PARAMETER, Irp, 0, NULL ); if( !(RecvReq = LockRequest( Irp, IrpSp )) ) return UnlockAndMaybeComplete ( FCB, STATUS_NO_MEMORY, Irp, 0, NULL ); diff --git a/reactos/drivers/network/afd/afd/write.c b/reactos/drivers/network/afd/afd/write.c index dc9ada72e30..1efc96e6d04 100644 --- a/reactos/drivers/network/afd/afd/write.c +++ b/reactos/drivers/network/afd/afd/write.c @@ -223,7 +223,7 @@ AfdConnectedSocketWriteData(PDEVICE_OBJECT DeviceObject, PIRP Irp, /* Check that the socket is bound */ if( FCB->State != SOCKET_STATE_BOUND ) - return UnlockAndMaybeComplete( FCB, STATUS_UNSUCCESSFUL, Irp, + return UnlockAndMaybeComplete( FCB, STATUS_INVALID_PARAMETER, Irp, 0, NULL ); if( !(SendReq = LockRequest( Irp, IrpSp )) ) @@ -398,7 +398,7 @@ AfdPacketSocketWriteData(PDEVICE_OBJECT DeviceObject, PIRP Irp, /* Check that the socket is bound */ if( FCB->State != SOCKET_STATE_BOUND ) return UnlockAndMaybeComplete - ( FCB, STATUS_UNSUCCESSFUL, Irp, 0, NULL ); + ( FCB, STATUS_INVALID_PARAMETER, Irp, 0, NULL ); if( !(SendReq = LockRequest( Irp, IrpSp )) ) return UnlockAndMaybeComplete ( FCB, STATUS_NO_MEMORY, Irp, 0, NULL ); From 1a6f6971b8b41f4e550f3cf0a27dc298ad96fa75 Mon Sep 17 00:00:00 2001 From: Art Yerkes Date: Sat, 23 Aug 2008 07:39:02 +0000 Subject: [PATCH 114/324] Hand merge a lost change from aicom-network-fixes. svn path=/trunk/; revision=35551 --- reactos/drivers/network/afd/afd/listen.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/reactos/drivers/network/afd/afd/listen.c b/reactos/drivers/network/afd/afd/listen.c index 82397106aee..7dc15cea12e 100644 --- a/reactos/drivers/network/afd/afd/listen.c +++ b/reactos/drivers/network/afd/afd/listen.c @@ -216,7 +216,6 @@ NTSTATUS AfdListenSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp, NTSTATUS AfdWaitForListen( PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp ) { - NTSTATUS Status = STATUS_SUCCESS; PFILE_OBJECT FileObject = IrpSp->FileObject; PAFD_FCB FCB = FileObject->FsContext; @@ -239,7 +238,7 @@ NTSTATUS AfdWaitForListen( PDEVICE_OBJECT DeviceObject, PIRP Irp, PollReeval( FCB->DeviceExt, FCB->FileObject ); SocketStateUnlock( FCB ); - return Status; + return Irp->IoStatus.Status; } else { AFD_DbgPrint(MID_TRACE,("Holding\n")); @@ -328,10 +327,9 @@ NTSTATUS AfdAccept( PDEVICE_OBJECT DeviceObject, PIRP Irp, FCB->PollState &= ~AFD_EVENT_ACCEPT; SocketStateUnlock( FCB ); - return Status; + return Irp->IoStatus.Status; } } - SocketStateUnlock( FCB ); - return STATUS_UNSUCCESSFUL; + return UnlockAndMaybeComplete( FCB, STATUS_UNSUCCESSFUL, Irp, 0, NULL ); } From c0e1bccba7c372b1c7eecf5be8935b9e5e13085e Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Sat, 23 Aug 2008 08:10:15 +0000 Subject: [PATCH 115/324] - Silence "Font loaded" debug print, which was mistakingly promoted to DPRINT in r35184. svn path=/trunk/; revision=35552 --- reactos/subsystems/win32/win32k/objects/text.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/subsystems/win32/win32k/objects/text.c b/reactos/subsystems/win32/win32k/objects/text.c index 77606d81765..e46f8234d97 100644 --- a/reactos/subsystems/win32/win32k/objects/text.c +++ b/reactos/subsystems/win32/win32k/objects/text.c @@ -385,7 +385,7 @@ IntGdiAddFontResource(PUNICODE_STRING FileName, DWORD Characteristics) - DPRINT1("Font loaded: %s (%s)\n", Face->family_name, Face->style_name); + DPRINT("Font loaded: %s (%s)\n", Face->family_name, Face->style_name); DPRINT("Num glyphs: %u\n", Face->num_glyphs); /* Add this font resource to the font table */ From 30108cfd3199b0cc8de75c4b353122bc4a596c51 Mon Sep 17 00:00:00 2001 From: Art Yerkes Date: Sat, 23 Aug 2008 09:01:29 +0000 Subject: [PATCH 116/324] Should've done this a long time ago. Just noticed that we're potentially sending a bunch of 0 handles into AfdSelect. svn path=/trunk/; revision=35553 --- reactos/dll/win32/msafd/misc/dllmain.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/reactos/dll/win32/msafd/misc/dllmain.c b/reactos/dll/win32/msafd/misc/dllmain.c index 084257aafc5..7987075552e 100644 --- a/reactos/dll/win32/msafd/misc/dllmain.c +++ b/reactos/dll/win32/msafd/misc/dllmain.c @@ -15,8 +15,8 @@ #include #ifdef DBG -//DWORD DebugTraceLevel = DEBUG_ULTRA; -DWORD DebugTraceLevel = 0; +DWORD DebugTraceLevel = DEBUG_ULTRA; +//DWORD DebugTraceLevel = 0; #endif /* DBG */ HANDLE GlobalHeap; @@ -598,7 +598,7 @@ WSPSelect( IO_STATUS_BLOCK IOSB; PAFD_POLL_INFO PollInfo; NTSTATUS Status; - ULONG HandleCount, OutCount = 0; + LONG HandleCount, OutCount = 0; ULONG PollBufferSize; PVOID PollBuffer; ULONG i, j = 0, x; @@ -661,7 +661,6 @@ WSPSelect( RtlZeroMemory( PollInfo, PollBufferSize ); /* Number of handles for AFD to Check */ - PollInfo->HandleCount = HandleCount; PollInfo->Exclusive = FALSE; PollInfo->Timeout = Timeout; @@ -689,6 +688,9 @@ WSPSelect( } } + PollInfo->HandleCount = j; + PollBufferSize = ((PCHAR)&PollInfo->Handles[j+1]) - ((PCHAR)PollInfo); + /* Send IOCTL */ Status = NtDeviceIoControlFile( (HANDLE)PollInfo->Handles[0].Handle, SockEvent, From 0720856576852b011a882f1d3d0ec52473b5c820 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sat, 23 Aug 2008 09:43:56 +0000 Subject: [PATCH 117/324] Add new devices at start of list, not end. Order is now like in pre-r35543 svn path=/trunk/; revision=35554 --- reactos/ntoskrnl/io/pnpmgr/pnpmgr.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c index 1c4354b37d1..34be9ee1c19 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c @@ -388,11 +388,10 @@ IopCreateDeviceNode(PDEVICE_NODE ParentNode, { KeAcquireSpinLock(&IopDeviceTreeLock, &OldIrql); Node->Parent = ParentNode; - if (ParentNode->LastChild != NULL) - ParentNode->LastChild->Sibling = Node; - else - ParentNode->Child = Node; - ParentNode->LastChild = Node; + Node->Sibling = ParentNode->Child; + ParentNode->Child = Node; + if (ParentNode->LastChild == NULL) + ParentNode->LastChild = Node; KeReleaseSpinLock(&IopDeviceTreeLock, OldIrql); Node->Level = ParentNode->Level + 1; } From f2bd7ae8a093993d952200f7d968eae6faa62d93 Mon Sep 17 00:00:00 2001 From: Art Yerkes Date: Sat, 23 Aug 2008 09:49:57 +0000 Subject: [PATCH 118/324] Restore cancellation for proper socket shutdown. svn path=/trunk/; revision=35555 --- reactos/drivers/network/afd/afd/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reactos/drivers/network/afd/afd/main.c b/reactos/drivers/network/afd/afd/main.c index 1da4a927220..7938a071fcb 100644 --- a/reactos/drivers/network/afd/afd/main.c +++ b/reactos/drivers/network/afd/afd/main.c @@ -155,6 +155,7 @@ AfdCreateSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp, VOID DestroySocket( PAFD_FCB FCB ) { UINT i; BOOLEAN ReturnEarly = FALSE; + KIRQL Irql = KeGetCurrentIrql(); PAFD_IN_FLIGHT_REQUEST InFlightRequest[IN_FLIGHT_REQUESTS]; AFD_DbgPrint(MIN_TRACE,("Called (%x)\n", FCB)); @@ -190,7 +191,9 @@ VOID DestroySocket( PAFD_FCB FCB ) { if( InFlightRequest[i]->InFlightRequest ) { AFD_DbgPrint(MID_TRACE,("Cancelling in flight irp %d (%x)\n", i, InFlightRequest[i]->InFlightRequest)); + IoCancelIrp(InFlightRequest[i]->InFlightRequest); InFlightRequest[i]->InFlightRequest = NULL; + IoReleaseCancelSpinLock(Irql); } } From 61563201035eff4e2c3672a064decfdaeec83683 Mon Sep 17 00:00:00 2001 From: Art Yerkes Date: Sat, 23 Aug 2008 10:13:14 +0000 Subject: [PATCH 119/324] Silence debug spew. svn path=/trunk/; revision=35557 --- reactos/dll/win32/msafd/misc/dllmain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/dll/win32/msafd/misc/dllmain.c b/reactos/dll/win32/msafd/misc/dllmain.c index 7987075552e..4a15e47fcb8 100644 --- a/reactos/dll/win32/msafd/misc/dllmain.c +++ b/reactos/dll/win32/msafd/misc/dllmain.c @@ -15,8 +15,8 @@ #include #ifdef DBG -DWORD DebugTraceLevel = DEBUG_ULTRA; -//DWORD DebugTraceLevel = 0; +//DWORD DebugTraceLevel = DEBUG_ULTRA; +DWORD DebugTraceLevel = 0; #endif /* DBG */ HANDLE GlobalHeap; From f460c4e31c8cab2f3e1aef58e77c99a1258e6ffb Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Sat, 23 Aug 2008 10:47:52 +0000 Subject: [PATCH 120/324] - Remove a hack around sending FSCTL_ to an opened volume handle, it works good enough without the need to open another handle to the file system. svn path=/trunk/; revision=35558 --- reactos/lib/fslib/vfatlib/check/io.c | 44 ++++------------------------ 1 file changed, 5 insertions(+), 39 deletions(-) diff --git a/reactos/lib/fslib/vfatlib/check/io.c b/reactos/lib/fslib/vfatlib/check/io.c index cea6654d56e..19b446cb32a 100644 --- a/reactos/lib/fslib/vfatlib/check/io.c +++ b/reactos/lib/fslib/vfatlib/check/io.c @@ -72,6 +72,8 @@ void fs_open(PUNICODE_STRING DriveRoot,int rw) return; } + // Query geometry and partition info, to have bytes per sector, etc + CurrentOffset.QuadPart = 0LL; changes = last = NULL; @@ -80,43 +82,12 @@ void fs_open(PUNICODE_STRING DriveRoot,int rw) BOOLEAN fs_isdirty(PUNICODE_STRING DriveRoot) { - OBJECT_ATTRIBUTES ObjectAttributes; ULONG DirtyMask = 0; - WCHAR TempRootBuf[128]; - UNICODE_STRING TempRoot; - HANDLE FileSystem; - IO_STATUS_BLOCK IoSb; NTSTATUS Status; - - /* Add backslash to the end, so FS will be opened */ - TempRoot.Length = 0; - TempRoot.MaximumLength = sizeof(TempRootBuf); - TempRoot.Buffer = TempRootBuf; - RtlCopyUnicodeString(&TempRoot, DriveRoot); - if (TempRoot.Length == (TempRoot.MaximumLength-1)) return FALSE; - wcscat(TempRoot.Buffer, L"\\"); - TempRoot.Length += sizeof(WCHAR); - - InitializeObjectAttributes(&ObjectAttributes, - &TempRoot, - 0, - NULL, - NULL); - - Status = NtOpenFile(&FileSystem, - FILE_GENERIC_READ, - &ObjectAttributes, - &IoSb, - 0, - 0); - if (!NT_SUCCESS(Status)) - { - DPRINT1("NtOpenFile() failed with status 0x%.08x\n", Status); - return FALSE; - } + IO_STATUS_BLOCK IoSb; /* Check if volume is dirty */ - Status = NtFsControlFile(FileSystem, + Status = NtFsControlFile(fd/*FileSystem*/, NULL, NULL, NULL, &IoSb, FSCTL_IS_VOLUME_DIRTY, NULL, 0, &DirtyMask, sizeof(DirtyMask)); @@ -124,18 +95,13 @@ BOOLEAN fs_isdirty(PUNICODE_STRING DriveRoot) if (!NT_SUCCESS(Status)) { DPRINT1("NtFsControlFile() failed with Status 0x%08x\n", Status); - /* Close FS handle */ - NtClose(FileSystem); return FALSE; } - /* Close FS handle */ - NtClose(FileSystem); - + /* Convert Dirty mask to a boolean value */ return (DirtyMask & 1); } - void fs_read(loff_t pos,int size,void *data) { CHANGE *walk; From ccfc2dc23dbaaba53c5f25efdef4d50a3b2c22c9 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Sat, 23 Aug 2008 10:49:57 +0000 Subject: [PATCH 121/324] - Fix fs_isdirty prototype, since there is no need to pass DriveRoot there. svn path=/trunk/; revision=35559 --- reactos/lib/fslib/vfatlib/check/io.c | 4 ++-- reactos/lib/fslib/vfatlib/check/io.h | 2 +- reactos/lib/fslib/vfatlib/vfatlib.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/reactos/lib/fslib/vfatlib/check/io.c b/reactos/lib/fslib/vfatlib/check/io.c index 19b446cb32a..e9cdcbb6ccf 100644 --- a/reactos/lib/fslib/vfatlib/check/io.c +++ b/reactos/lib/fslib/vfatlib/check/io.c @@ -80,14 +80,14 @@ void fs_open(PUNICODE_STRING DriveRoot,int rw) did_change = 0; } -BOOLEAN fs_isdirty(PUNICODE_STRING DriveRoot) +BOOLEAN fs_isdirty() { ULONG DirtyMask = 0; NTSTATUS Status; IO_STATUS_BLOCK IoSb; /* Check if volume is dirty */ - Status = NtFsControlFile(fd/*FileSystem*/, + Status = NtFsControlFile(fd, NULL, NULL, NULL, &IoSb, FSCTL_IS_VOLUME_DIRTY, NULL, 0, &DirtyMask, sizeof(DirtyMask)); diff --git a/reactos/lib/fslib/vfatlib/check/io.h b/reactos/lib/fslib/vfatlib/check/io.h index 6c6675f0f9b..9dfce9b7574 100644 --- a/reactos/lib/fslib/vfatlib/check/io.h +++ b/reactos/lib/fslib/vfatlib/check/io.h @@ -21,7 +21,7 @@ void fs_open(PUNICODE_STRING DriveRoot,int rw); /* Opens the file system PATH. If RW is zero, the file system is opened read-only, otherwise, it is opened read-write. */ -BOOLEAN fs_isdirty(PUNICODE_STRING DriveRoot); +BOOLEAN fs_isdirty(); /* Checks if filesystem is dirty */ diff --git a/reactos/lib/fslib/vfatlib/vfatlib.c b/reactos/lib/fslib/vfatlib/vfatlib.c index bbe72705429..0a096807a2c 100755 --- a/reactos/lib/fslib/vfatlib/vfatlib.c +++ b/reactos/lib/fslib/vfatlib/vfatlib.c @@ -256,7 +256,7 @@ VfatChkdsk( /* Open filesystem */ fs_open(DriveRoot,FixErrors); - if (CheckOnlyIfDirty && !fs_isdirty(DriveRoot)) + if (CheckOnlyIfDirty && !fs_isdirty()) { /* No need to check FS */ return fs_close(FALSE); From fed8bf35b48fec9f2b6ec9431d5a9069fe78921e Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Sat, 23 Aug 2008 11:41:04 +0000 Subject: [PATCH 122/324] - Perform volume operations as described in http://msdn.microsoft.com/en-us/library/aa364562(VS.85).aspx : Open, Lock, Work, Dismount, Unlock, Close. - Our fastfat driver doesn't support lock/unlock and dismount operations, so no improvement yet. svn path=/trunk/; revision=35560 --- reactos/lib/fslib/vfatlib/check/io.c | 40 ++++++++++++++++++++++++++++ reactos/lib/fslib/vfatlib/check/io.h | 8 ++++++ reactos/lib/fslib/vfatlib/vfatlib.c | 10 +++++++ 3 files changed, 58 insertions(+) diff --git a/reactos/lib/fslib/vfatlib/check/io.c b/reactos/lib/fslib/vfatlib/check/io.c index e9cdcbb6ccf..7899134d935 100644 --- a/reactos/lib/fslib/vfatlib/check/io.c +++ b/reactos/lib/fslib/vfatlib/check/io.c @@ -72,6 +72,9 @@ void fs_open(PUNICODE_STRING DriveRoot,int rw) return; } + // If rw is specified, then the volume should be exclusively locked + if (rw) fs_lock(TRUE); + // Query geometry and partition info, to have bytes per sector, etc CurrentOffset.QuadPart = 0LL; @@ -102,6 +105,43 @@ BOOLEAN fs_isdirty() return (DirtyMask & 1); } +NTSTATUS fs_lock(BOOLEAN LockVolume) +{ + NTSTATUS Status; + IO_STATUS_BLOCK IoSb; + + /* Check if volume is dirty */ + Status = NtFsControlFile(fd, + NULL, NULL, NULL, &IoSb, + LockVolume ? FSCTL_LOCK_VOLUME : + FSCTL_UNLOCK_VOLUME, + NULL, 0, NULL, 0); + + if (!NT_SUCCESS(Status)) + { + DPRINT1("NtFsControlFile() failed with Status 0x%08x\n", Status); + } + + return Status; +} + +void fs_dismount() +{ + NTSTATUS Status; + IO_STATUS_BLOCK IoSb; + + /* Check if volume is dirty */ + Status = NtFsControlFile(fd, + NULL, NULL, NULL, &IoSb, + FSCTL_DISMOUNT_VOLUME, + NULL, 0, NULL, 0); + + if (!NT_SUCCESS(Status)) + { + DPRINT1("NtFsControlFile() failed with Status 0x%08x\n", Status); + } +} + void fs_read(loff_t pos,int size,void *data) { CHANGE *walk; diff --git a/reactos/lib/fslib/vfatlib/check/io.h b/reactos/lib/fslib/vfatlib/check/io.h index 9dfce9b7574..7b23462f515 100644 --- a/reactos/lib/fslib/vfatlib/check/io.h +++ b/reactos/lib/fslib/vfatlib/check/io.h @@ -51,6 +51,14 @@ int fs_changed(void); /* Determines whether the file system has changed. See fs_close. */ +NTSTATUS fs_lock(BOOLEAN LockVolume); + +/* Lock or unlocks the volume */ + +void fs_dismount(); + +/* Dismounts the volume */ + extern unsigned device_no; /* Major number of device (0 if file) and size (in 512 byte sectors) */ diff --git a/reactos/lib/fslib/vfatlib/vfatlib.c b/reactos/lib/fslib/vfatlib/vfatlib.c index 0a096807a2c..02f1d9b1447 100755 --- a/reactos/lib/fslib/vfatlib/vfatlib.c +++ b/reactos/lib/fslib/vfatlib/vfatlib.c @@ -300,6 +300,16 @@ VfatChkdsk( VfatPrint("%wZ: %u files, %lu/%lu clusters\n", DriveRoot, FsCheckTotalFiles, fs.clusters - free_clusters, fs.clusters ); + if (FixErrors) + { + /* Dismount the volume */ + fs_dismount(); + + /* Unlock the volume */ + fs_lock(FALSE); + } + + /* Close the volume */ return fs_close(FixErrors) ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL; #else return STATUS_SUCCESS; From 94c1c807bc051b1ff64f71645d2403224084a4c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sat, 23 Aug 2008 14:43:30 +0000 Subject: [PATCH 123/324] Fix typo svn path=/trunk/; revision=35562 --- reactos/dll/win32/browseui/bandsite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/dll/win32/browseui/bandsite.c b/reactos/dll/win32/browseui/bandsite.c index 0630aa16a7c..125389464ac 100644 --- a/reactos/dll/win32/browseui/bandsite.c +++ b/reactos/dll/win32/browseui/bandsite.c @@ -1,7 +1,7 @@ /* * Rebar band site * - * Copyright 2007 Hervй Poussineua + * Copyright 2007 Hervй Poussineau * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public From ce56b08815d5bb316d8d8c739b0227ef1824b6d8 Mon Sep 17 00:00:00 2001 From: Gregor Brunmar Date: Sat, 23 Aug 2008 15:01:19 +0000 Subject: [PATCH 124/324] * Refactored D3D9 structures a bit * Started implementing IDirect3D9::CreateDevice() svn path=/trunk/; revision=35563 --- reactos/dll/directx/d3d9/d3d9.rbuild | 3 + reactos/dll/directx/d3d9/d3d9_baseobject.c | 36 ++++ reactos/dll/directx/d3d9/d3d9_baseobject.h | 35 ++++ reactos/dll/directx/d3d9/d3d9_device.h | 191 +++------------------ reactos/dll/directx/d3d9/d3d9_helpers.c | 2 +- reactos/dll/directx/d3d9/d3d9_impl.c | 7 +- reactos/dll/directx/d3d9/d3d9_private.h | 18 +- reactos/dll/directx/d3d9/d3d9_surface.h | 41 +++++ reactos/dll/directx/d3d9/d3d9_swapchain.c | 153 +++++++++++++++++ reactos/dll/directx/d3d9/d3d9_swapchain.h | 72 ++++++++ reactos/dll/directx/d3d9/device.c | 108 ++++++++++++ reactos/dll/directx/d3d9/device.h | 20 +++ 12 files changed, 503 insertions(+), 183 deletions(-) create mode 100644 reactos/dll/directx/d3d9/d3d9_baseobject.c create mode 100644 reactos/dll/directx/d3d9/d3d9_baseobject.h create mode 100644 reactos/dll/directx/d3d9/d3d9_surface.h create mode 100644 reactos/dll/directx/d3d9/d3d9_swapchain.c create mode 100644 reactos/dll/directx/d3d9/d3d9_swapchain.h create mode 100644 reactos/dll/directx/d3d9/device.c create mode 100644 reactos/dll/directx/d3d9/device.h diff --git a/reactos/dll/directx/d3d9/d3d9.rbuild b/reactos/dll/directx/d3d9/d3d9.rbuild index e36e8b96e94..a908ac4c1ac 100644 --- a/reactos/dll/directx/d3d9/d3d9.rbuild +++ b/reactos/dll/directx/d3d9/d3d9.rbuild @@ -15,10 +15,13 @@ d3d9.c d3d9_helpers.c d3d9_impl.c + d3d9_baseobject.c d3d9_create.c d3d9_caps.c d3d9_device.c + d3d9_swapchain.c adapter.c + device.c format.c d3d9.rc d3d9.spec diff --git a/reactos/dll/directx/d3d9/d3d9_baseobject.c b/reactos/dll/directx/d3d9/d3d9_baseobject.c new file mode 100644 index 00000000000..a60593e28a6 --- /dev/null +++ b/reactos/dll/directx/d3d9/d3d9_baseobject.c @@ -0,0 +1,36 @@ +#include "d3d9_baseobject.h" +#include "d3d9_device.h" + +#include + +VOID D3D9BaseObject_Destroy() +{ +} + +ID3D9BaseObjectVtbl D3D9BaseObject_Vtbl = +{ + /* D3D9BaseObject */ + D3D9BaseObject_Destroy +}; + +VOID InitD3D9BaseObject(D3D9BaseObject* pBaseObject, enum REF_TYPE RefType, struct _Direct3DDevice9_INT* pBaseDevice) +{ + // TODO: Add dtor to vtbl + pBaseObject->lpVtbl = &D3D9BaseObject_Vtbl; + pBaseObject->RefType = RefType; + pBaseObject->pBaseDevice = pBaseDevice; +} + +ULONG D3D9BaseObject_AddRef(D3D9BaseObject* pBaseObject) +{ + // TODO: Implement ref counting + UNIMPLEMENTED + return 1; +} + +ULONG D3D9BaseObject_Release(D3D9BaseObject* pBaseObject) +{ + // TODO: Implement ref counting + UNIMPLEMENTED + return 0; +} diff --git a/reactos/dll/directx/d3d9/d3d9_baseobject.h b/reactos/dll/directx/d3d9/d3d9_baseobject.h new file mode 100644 index 00000000000..14c4e261853 --- /dev/null +++ b/reactos/dll/directx/d3d9/d3d9_baseobject.h @@ -0,0 +1,35 @@ +#ifndef _D3D9_BASEOBJECT_H_ +#define _D3D9_BASEOBJECT_H_ + +#include "d3d9_common.h" + +enum REF_TYPE +{ + RT_EXTERNAL, + RT_BUILTIN, + RT_INTERNAL, +}; + +typedef struct _D3D9BaseObjectVtbl +{ + VOID (*Destroy)(); +} ID3D9BaseObjectVtbl; + +typedef struct _D3D9BaseObject +{ +/* 0x0000 */ ID3D9BaseObjectVtbl* lpVtbl; +/* 0x0004 */ DWORD dwUnknown0004; +/* 0x0008 */ DWORD dwUnknown0008; +/* 0x000c */ struct _Direct3DDevice9_INT* pBaseDevice; +/* 0x0010 */ DWORD dwUnknown0010; // Index? Unique id? +/* 0x0014 */ HANDLE hKernelHandle; +/* 0x0018 */ LPDWORD dwUnknown0018; +/* 0x001c */ enum REF_TYPE RefType; +} D3D9BaseObject; + +VOID InitD3D9BaseObject(D3D9BaseObject* pBaseObject, enum REF_TYPE RefType, struct _Direct3DDevice9_INT* pBaseDevice); + +ULONG D3D9BaseObject_AddRef(D3D9BaseObject* pBaseObject); +ULONG D3D9BaseObject_Release(D3D9BaseObject* pBaseObject); + +#endif // _D3D9_BASEOBJECT_H_ diff --git a/reactos/dll/directx/d3d9/d3d9_device.h b/reactos/dll/directx/d3d9/d3d9_device.h index 10436456860..5dd82327cba 100644 --- a/reactos/dll/directx/d3d9/d3d9_device.h +++ b/reactos/dll/directx/d3d9/d3d9_device.h @@ -11,83 +11,32 @@ #include "d3d9_common.h" #include #include "d3d9_private.h" +#include "d3d9_swapchain.h" +#include "d3d9_surface.h" extern struct IDirect3DDevice9Vtbl Direct3DDevice9_Vtbl; -enum REF_TYPE +typedef struct _D3D9HeapTexture { - RT_EXTERNAL, - RT_BUILTIN, - RT_INTERNAL, -}; +/* 0x0000 */ DWORD dwUnknown00; +/* 0x0004 */ DWORD dwUnknown04; +/* 0x0008 */ LPDWORD pUnknown08; +} D3D9HeapTexture; -typedef struct _tagD3D9BaseObject_ -{ -/* 0x0000 */ LPDWORD lpVtbl; -/* 0x0004 */ DWORD dwUnknown0004; -/* 0x0008 */ DWORD dwUnknown0008; -/* 0x000c */ struct _tagDirect3DDevice9_INT_* pBaseDevice; -/* 0x0010 */ DWORD dwUnknown0010; // Index? Unique id? -/* 0x0014 */ HANDLE hKernelHandle; -/* 0x0018 */ LPDWORD dwUnknown0018; -/* 0x001c */ enum REF_TYPE RefType; -} D3D9BaseObject; - -typedef struct _tagD3D9BaseSurface_ -{ -/* 0x0000 */ LPDWORD lpVtbl; -/* 0x0024 */ D3DFORMAT DisplayFormat2; // Back buffer format? -/* 0x0028 */ DWORD dwUnknown0028; // Constant/ref count? (1) -/* 0x002c */ DWORD dwUnknown002c; // Refresh rate? -/* 0x0030 */ D3DPOOL SurfacePool; -/* 0x0034 */ DWORD dwUnknown0034; -/* 0x0038 */ DWORD dwUnknown0038; -/* 0x003c */ DWORD dwWidth; -/* 0x0040 */ DWORD dwHeight; -/* 0x0044 */ D3DPOOL ResourcePool; -/* 0x0048 */ D3DFORMAT DisplayFormat; -/* 0x004c */ DWORD dwUnknown004c; -/* 0x0050 */ DWORD dwUnknown0050; -/* 0x0054 */ DWORD dwUnknown0054; -/* 0x0058 */ DWORD dwBpp; -} D3D9BaseSurface; - -typedef struct _tagD3D9Surface_ -{ -/* 0x0000 */ D3D9BaseObject BaseObject; -/* 0x0020 */ D3D9BaseSurface BaseSurface; -} D3D9Surface; - -typedef struct _tagD3D9DriverSurface_ -{ -/* 0x0000 */ D3D9Surface BaseD3D9Surface; -/* 0x005c */ DWORD dwUnknown5c; -/* 0x0060 */ DWORD dwUnknown60; -/* 0x0064 */ struct _tagD3D9DriverSurface_* pPreviousDriverSurface; -/* 0x0068 */ struct _tagD3D9DriverSurface_* pNextDriverSurface; -/* 0x006c */ DWORD dwUnknown6c[8]; -} D3D9DriverSurface; - -typedef struct _tagD3D9TextureHeap_ -{ -/* 0x0000 */ DWORD NumTextures; -/* 0x0004 */ LPDWORD pFirstTexture; -} D3D9TextureHeap; - -typedef struct _tagD3D9ResourceManager_ +typedef struct _D3D9ResourceManager { #ifdef D3D_DEBUG_INFO /* N/A - 0x0000 */ DDSURFACEDESC SurfaceDesc[8]; #endif -/* 0x0000 - 0x0160 */ struct _tagDirect3DDevice9_INT_* pBaseDevice; +/* 0x0000 - 0x0160 */ struct _Direct3DDevice9_INT* pBaseDevice; /* 0x0004 - 0x0164 */ DWORD dwUnknown0004; /* 0x0008 - 0x0168 */ DWORD dwUnknown0008; /* 0x000c - 0x016c */ DWORD MaxSimultaneousTextures; /* 0x0010 - 0x0170 */ DWORD dwUnknown0010; -/* 0x0014 - 0x0174 */ LPDWORD pFirstHeapTexture; +/* 0x0014 - 0x0174 */ D3D9HeapTexture* pTextureHeap; } D3D9ResourceManager; -typedef struct _tagDirect3D9Cursor_ +typedef struct _D3D9Cursor { /* 0x0000 */ DWORD dwUnknown0000; /* 0x0004 */ DWORD dwUnknown0004; @@ -98,71 +47,15 @@ typedef struct _tagDirect3D9Cursor_ /* 0x0018 */ DWORD dwWidth; /* 0x001c */ DWORD dwHeight; /* 0x0020 */ DWORD dwUnknown0020[18]; -/* 0x0070 */ struct _tagD3D9BaseDevice_* pBaseDevice; -/* 0x0074 */ struct _tagD3D9SwapChain_* pSwapChain; +/* 0x0070 */ struct _Direct3DDevice9_INT* pBaseDevice; +/* 0x0074 */ struct _Direct3DSwapChain9_INT* pSwapChain; /* 0x0078 */ DWORD dwUnknown0078; /* 0x007c */ DWORD dwMonitorVirtualX; /* 0x0080 */ DWORD dwMonitorVirtualY; /* 0x0084 */ DWORD dwUnknown0084; } D3D9Cursor; -typedef struct _tagDirect3DSwapChain9_INT_ -{ -/* 0x0000 */ D3D9BaseObject BaseObject; -/* 0x0020 */ struct IDirect3DSwapChain9Vtbl* lpVtbl; -/* 0x0024 */ DWORD dwUnknown0024; -/* 0x0028 */ D3D9Surface* pPrimarySurface; -/* 0x002c */ D3D9Surface* pExtendedPrimarySurface; -/* 0x0030 */ DWORD dwUnknown0030; -/* 0x0034 */ D3D9DriverSurface** ppBackBufferList; -/* 0x0038 */ DWORD dwNumBackBuffers; -/* 0x003c */ DWORD ChainIndex; -/* 0x0040 */ DWORD AdapterGroupIndex; -/* 0x0044 */ D3DPRESENT_PARAMETERS PresentParameters; -/* 0x007c */ DWORD dwUnknown007c; -/* 0x0080 */ DWORD dwUnknown0080[2]; /* Extended format? */ -/* 0x0088 */ D3D9Cursor* pCursor; -/* 0x008c */ DWORD dwUnknown008c[4]; -/* 0x009c */ D3D9_Unknown6BC* pUnknown6BC; -/* 0x00a0 */ LPDWORD dwUnknown00a0; -/* 0x00a4 */ DWORD dwUnknown00a4; -/* 0x00a8 */ DWORD dwUnknown00a8; -/* 0x00ac */ DWORD dwWidth; -/* 0x00b0 */ DWORD dwHeight; -/* 0x00b4 */ DWORD dwUnknown00b4; -/* 0x00b8 */ DWORD dwUnknown00b8; -/* 0x00bc */ DWORD dwUnknown00bc; -/* 0x00c0 */ DWORD dwWidth2; -/* 0x00c4 */ DWORD dwHeight2; -/* 0x00c8 */ DWORD dwUnknown00c8; -/* 0x00cc */ DWORD dwUnknown00cc; -/* 0x00d0 */ DWORD dwUnknown00d0; -/* 0x00d4 */ DWORD dwUnknown00d4; -/* 0x00d8 */ DWORD dwUnknown00d8; -/* 0x00dc */ DWORD dwUnknown00dc; -/* 0x00e0 */ DWORD dwDevModeScale; -/* 0x00e4 */ DWORD dwUnknown00e4; -/* 0x00e8 */ DWORD dwUnknown00e8; -/* 0x00ec */ DWORD dwUnknown00ec; -/* 0x00f0 */ DWORD dwUnknown00f0[27]; - -/* 0x015c */ LPDWORD pUnknown015c; -/* 0x0160 */ DWORD dwUnknown0160[4]; -/* 0x0170 */ HRESULT hResult; - -/* 0x0174 */ DWORD dwUnknown0174[26]; - -/* 0x01DC */ DWORD dwUnknownFlags; /* 1 = Show frame rate, 2 = Flip without vsync */ -/* 0x01E0 */ BOOL bForceRefreshRate; -/* 0x01E4 */ DWORD dwUnknown01dc[4]; - -/* 0x01f4 */ D3DSWAPEFFECT SwapEffect; -/* 0x01f8 */ DWORD dwUnknown01f8; -/* 0x01fc */ DWORD dwUnknown01fc; -/* 0x0200 */ DDGAMMARAMP GammaRamp; -} Direct3DSwapChain9_INT, FAR* LPDIRECT3DSWAPCHAIN9_INT; - -typedef struct _tagDirect3DDevice9_INT_ +typedef struct _Direct3DDevice9_INT { /* 0x0000 */ struct IDirect3DDevice9Vtbl* lpVtbl; /* 0x0004 */ CRITICAL_SECTION CriticalSection; @@ -184,7 +77,7 @@ typedef struct _tagDirect3DDevice9_INT_ #endif /* 0x001c - 0x0054 */ BOOL bLockDevice; /* 0x0020 - 0x0058 */ DWORD dwProcessId; -/* 0x0024 - 0x005c */ struct _tagD3D9PUREDEVICE_* lpThis; +/* 0x0024 - 0x005c */ struct _D3D9PUREDEVICE* lpThis; /* 0x0028 - 0x0060 */ DWORD dwDXVersion; /* 0x002c - 0x0064 */ DWORD unknown000011; /* 0x0030 - 0x0068 */ LONG lRefCnt; @@ -195,51 +88,7 @@ typedef struct _tagDirect3DDevice9_INT_ /* 0x0044 - 0x007c */ DWORD BehaviourFlags; /* 0x0048 - 0x0080 */ D3D9BaseSurface* pUnknown0010; /* 0x004c - 0x0084 */ DWORD NumAdaptersInDevice; -/* 0x0050 - 0x0088 */ D3DDISPLAYMODE CurrentDisplayMode; -/* 0x0060 - 0x0098 */ DWORD unknown000024; -/* 0x0064 - 0x009c */ DWORD unknown000025; -/* 0x0068 - 0x00a0 */ DWORD unknown000026; -/* 0x006c - 0x00a4 */ DWORD unknown000027; -/* 0x0070 - 0x00a8 */ DWORD unknown000028; -/* 0x0074 - 0x00ac */ DWORD unknown000029; -/* 0x0078 - 0x00b0 */ DWORD unknown000030; -/* 0x007c - 0x00b4 */ DWORD unknown000031; -/* 0x0080 - 0x00b8 */ DWORD unknown000032; -/* 0x0084 - 0x00bc */ DWORD unknown000033; -/* 0x0088 - 0x00c0 */ DWORD unknown000034; -/* 0x008c - 0x00c4 */ DWORD unknown000035; -/* 0x0090 - 0x00c8 */ DWORD unknown000036; -/* 0x0094 - 0x00cc */ DWORD unknown000037; -/* 0x0098 - 0x00d0 */ DWORD unknown000038; -/* 0x009c - 0x00d4 */ DWORD unknown000039; -/* 0x00a0 - 0x00d8 */ DWORD unknown000040; -/* 0x00a4 - 0x00dc */ DWORD unknown000041; -/* 0x00a8 - 0x00e0 */ DWORD unknown000042; -/* 0x00ac - 0x00e4 */ DWORD unknown000043; -/* 0x00b0 - 0x00e8 */ DWORD unknown000044; -/* 0x00b4 - 0x00ec */ DWORD unknown000045; -/* 0x00b8 - 0x00f0 */ DWORD unknown000046; -/* 0x00bc - 0x00f4 */ DWORD unknown000047; -/* 0x00c0 - 0x00f8 */ DWORD unknown000048; -/* 0x00c4 - 0x00fc */ DWORD unknown000049; -/* 0x00c8 - 0x0100 */ DWORD unknown000050; -/* 0x00cc - 0x0104 */ DWORD unknown000051; -/* 0x00d0 - 0x0108 */ DWORD unknown000052; -/* 0x00d4 - 0x010c */ DWORD unknown000053; -/* 0x00d8 - 0x0110 */ DWORD unknown000054; -/* 0x00dc - 0x0114 */ DWORD unknown000055; -/* 0x00e0 - 0x0118 */ DWORD unknown000056; -/* 0x00e4 - 0x011c */ DWORD unknown000057; -/* 0x00e8 - 0x0120 */ DWORD unknown000058; -/* 0x00ec - 0x0124 */ DWORD unknown000059; -/* 0x00f0 - 0x0128 */ DWORD unknown000060; -/* 0x00f4 - 0x012c */ DWORD unknown000061; -/* 0x00f8 - 0x0130 */ DWORD unknown000062; -/* 0x00fc - 0x0134 */ DWORD unknown000063; -/* 0x0100 - 0x0138 */ DWORD unknown000064; -/* 0x0104 - 0x013c */ DWORD unknown000065; -/* 0x0108 - 0x0140 */ DWORD unknown000066; -/* 0x010c - 0x0144 */ DWORD unknown000067; +/* 0x0050 - 0x0088 */ D3DDISPLAYMODE CurrentDisplayMode[D3D9_INT_MAX_NUM_ADAPTERS]; /* 0x0110 - 0x0148 */ DWORD AdapterIndexInGroup[D3D9_INT_MAX_NUM_ADAPTERS]; /* 0x0140 - 0x0178 */ D3D9_DEVICEDATA DeviceData[D3D9_INT_MAX_NUM_ADAPTERS]; /* 0x1df0 - 0x1e28 */ LPDIRECT3DSWAPCHAIN9_INT pSwapChains[D3D9_INT_MAX_NUM_ADAPTERS]; @@ -308,7 +157,7 @@ typedef struct _tagDirect3DDevice9_INT_ /* 0x1f44 */ DWORD unknown002001; } DIRECT3DDEVICE9_INT, FAR* LPDIRECT3DDEVICE9_INT; -typedef struct _tagD3D9PUREDEVICE_ +typedef struct _D3D9PUREDEVICE { /* 0x0000 - 0x0000 */ DIRECT3DDEVICE9_INT BaseDevice; /* 0x1f48 */ DWORD unknown002002; @@ -392,7 +241,7 @@ typedef struct _tagD3D9PUREDEVICE_ /* 0x2080 */ DWORD unknown002080; /* 0x2084 */ DWORD unknown002081; /* 0x2088 */ DWORD unknown002082; -/* 0x208c */ DWORD unknown002083; +/* 0x208c */ DWORD unknown002083; /* 0x2090 */ DWORD unknown002084; /* 0x2094 */ DWORD unknown002085; /* 0x2098 */ DWORD unknown002086; @@ -409,7 +258,7 @@ typedef struct _tagD3D9PUREDEVICE_ /* 0x20c4 */ DWORD unknown002097; /* 0x20c8 */ DWORD unknown002098; /* 0x20cc */ DWORD unknown002099; -/* 0x20d0 */ DWORD unknown002100; +/* 0x20d0 */ DWORD unknown002100; /* 0x20d4 */ DWORD unknown002101; /* 0x20d8 */ DWORD unknown002102; /* 0x20dc */ DWORD unknown002103; @@ -629,7 +478,7 @@ typedef struct _tagD3D9PUREDEVICE_ /* 0x2434 */ DWORD unknown002317; } D3D9PUREDEVICE, FAR *LPD3D9PUREDEVICE; -typedef struct _tagD3D9HALDEVICE_ +typedef struct _D3D9HALDEVICE { /* 0x0000 */ D3D9PUREDEVICE PureDevice; #ifdef D3D_DEBUG_INFO diff --git a/reactos/dll/directx/d3d9/d3d9_helpers.c b/reactos/dll/directx/d3d9/d3d9_helpers.c index 7aa331e2c4d..fac9ef4d267 100644 --- a/reactos/dll/directx/d3d9/d3d9_helpers.c +++ b/reactos/dll/directx/d3d9/d3d9_helpers.c @@ -81,7 +81,7 @@ HRESULT SafeCopyString(OUT LPSTR Dst, IN DWORD DstSize, IN LPCSTR Src) HRESULT SafeAppendString(IN OUT LPSTR Dst, IN DWORD DstSize, IN LPCSTR Src) { - DWORD CurrentDstLength; + size_t CurrentDstLength; if (Dst == NULL || DstSize == 0) return DDERR_INVALIDPARAMS; diff --git a/reactos/dll/directx/d3d9/d3d9_impl.c b/reactos/dll/directx/d3d9/d3d9_impl.c index b482afe1672..6ecd7f73796 100644 --- a/reactos/dll/directx/d3d9/d3d9_impl.c +++ b/reactos/dll/directx/d3d9/d3d9_impl.c @@ -11,6 +11,7 @@ #include #include "d3d9_helpers.h" #include "adapter.h" +#include "device.h" #include "format.h" #define LOCK_D3D9() EnterCriticalSection(&This->d3d9_cs); @@ -894,6 +895,7 @@ static HRESULT WINAPI IDirect3D9Impl_CreateDevice(LPDIRECT3D9 iface, UINT Adapte struct IDirect3DDevice9** ppReturnedDeviceInterface) { DWORD NumAdaptersToCreate; + HRESULT Ret; LPDIRECT3D9_INT This = impl_from_IDirect3D9(iface); LOCK_D3D9(); @@ -977,9 +979,10 @@ static HRESULT WINAPI IDirect3D9Impl_CreateDevice(LPDIRECT3D9 iface, UINT Adapte *ppReturnedDeviceInterface = 0; - UNIMPLEMENTED + Ret = CreateD3D9HalDevice(This, Adapter, hFocusWindow, BehaviourFlags, pPresentationParameters, NumAdaptersToCreate, ppReturnedDeviceInterface); - return D3D_OK; + UNLOCK_D3D9(); + return Ret; } IDirect3D9Vtbl Direct3D9_Vtbl = diff --git a/reactos/dll/directx/d3d9/d3d9_private.h b/reactos/dll/directx/d3d9/d3d9_private.h index e89dfbb6066..44fc02f7df3 100644 --- a/reactos/dll/directx/d3d9/d3d9_private.h +++ b/reactos/dll/directx/d3d9/d3d9_private.h @@ -8,7 +8,7 @@ #ifndef _D3D9_PRIVATE_H_ #define _D3D9_PRIVATE_H_ -#include +#include "d3d9_common.h" #include #define D3D9_INT_MAX_NUM_ADAPTERS 12 @@ -25,14 +25,14 @@ typedef enum _D3D9_GETAVAILDRIVERMEMORY_TYPE typedef struct _D3D9_GETAVAILDRIVERMEMORYDATA { -/* 0x0000 */ struct _D3D9Unknown6BC_* pUnknown6BC; +/* 0x0000 */ struct _D3D9_Unknown6BC* pUnknown6BC; /* 0x0004 */ D3D9_GETAVAILDRIVERMEMORY_TYPE dwMemoryType; /* 0x0008 */ DWORD dwTextureType; /* 0x000c */ DWORD dwFree; } D3D9_GETAVAILDRIVERMEMORYDATA, FAR* LPD3D9_GETAVAILDRIVERMEMORYDATA; typedef BOOL (WINAPI FAR* LPD3D9_GETAVAILDRIVERMEMORY)(LPD3D9_GETAVAILDRIVERMEMORYDATA); -typedef struct _D3D9Unknown6BC_ +typedef struct _D3D9_Unknown6BC { /* 0x0000 */ HANDLE hDirectDrawLocal; /* 0x0004 */ LPDWORD pUnknown0004; @@ -78,7 +78,7 @@ typedef struct _D3D9Unknown6BC_ /* 0x00BC */ DDGAMMARAMP GammaRamp; } D3D9_Unknown6BC; -typedef struct _tagD3D9_DRIVERCAPS +typedef struct _D3D9_DRIVERCAPS { /* 0x0000 */ D3DCAPS9 DriverCaps9; /* 0x0130 */ DWORD dwDisplayWidth; @@ -147,20 +147,20 @@ typedef struct _tagD3D9_CALLBACKS /* 0x00a4 */ D3DDEVTYPE DeviceType; } D3D9_CALLBACKS; -typedef struct _tagD3D9_DEVICEDATA_ +typedef struct _D3D9_DEVICEDATA { /* 0x0000 */ D3D9_DRIVERCAPS DriverCaps; /* 0x0178 */ D3D9_CALLBACKS D3D9Callbacks; /* 0x0220 */ CHAR szDeviceName[CCHDEVICENAME]; /* 0x0240 */ HDC hDC; /* 0x0244 */ GUID DisplayGuid; -/* 0x0254 */ D3D9_Unknown6BC* pUnknown6BC; +/* 0x0254 */ struct _D3D9_Unknown6BC* pUnknown6BC; /* 0x0258 */ D3DDEVTYPE DeviceType; /* 0x025c */ HMODULE hD3DRefDll; /* 0x0260 */ DWORD unknown0152; } D3D9_DEVICEDATA, FAR *LPD3D9_DEVICEDATA; -typedef struct _tagDIRECT3D9DisplayAdapterInfo_ +typedef struct _Direct3D9DisplayAdapterInfo { /* 0x0000 */ GUID DisplayGuid; /* 0x0010 */ CHAR szDeviceName[MAX_PATH]; @@ -179,13 +179,13 @@ typedef struct _tagDIRECT3D9DisplayAdapterInfo_ /* 0x02b8 */ DWORD unknown000105; } Direct3D9DisplayAdapterInfo, FAR* LPDIRECT3D9_DISPLAYADAPTER; -typedef struct _tagDIRECT3D9_INT_ +typedef struct _DIRECT3D9_INT { /* 0x0000 */ struct IDirect3D9Vtbl *lpVtbl; /* LPDIRECTD3D9 function table */ /* 0x0004 */ CRITICAL_SECTION d3d9_cs; /* 0x001c */ DWORD unknown000007; /* 0x00000001 */ /* 0x0020 */ DWORD dwProcessId; -/* 0x0024 */ struct _tagDIRECT3D9_INT_ *lpInt; +/* 0x0024 */ struct _DIRECT3D9_INT *lpInt; /* 0x0028 */ LONG lRefCnt; /* Increases and decreases by AddRef() and Release() */ /* 0x002c */ UINT NumDisplayAdapters; /* 0x0030 */ Direct3D9DisplayAdapterInfo DisplayAdapters[D3D9_INT_MAX_NUM_ADAPTERS]; diff --git a/reactos/dll/directx/d3d9/d3d9_surface.h b/reactos/dll/directx/d3d9/d3d9_surface.h new file mode 100644 index 00000000000..b877c4a3b38 --- /dev/null +++ b/reactos/dll/directx/d3d9/d3d9_surface.h @@ -0,0 +1,41 @@ +#ifndef _D3D9_SURFACE_H_ +#define _D3D9_SURFACE_H_ + +#include "d3d9_baseobject.h" + +typedef struct _D3D9BaseSurface +{ +/* 0x0000 */ LPDWORD lpVtbl; +/* 0x0024 */ D3DFORMAT DisplayFormat2; // Back buffer format? +/* 0x0028 */ DWORD dwUnknown0028; // Constant/ref count? (1) +/* 0x002c */ DWORD dwUnknown002c; // Refresh rate? +/* 0x0030 */ D3DPOOL SurfacePool; +/* 0x0034 */ DWORD dwUnknown0034; +/* 0x0038 */ DWORD dwUnknown0038; +/* 0x003c */ DWORD dwWidth; +/* 0x0040 */ DWORD dwHeight; +/* 0x0044 */ D3DPOOL ResourcePool; +/* 0x0048 */ D3DFORMAT DisplayFormat; +/* 0x004c */ DWORD dwUnknown004c; +/* 0x0050 */ DWORD dwUnknown0050; +/* 0x0054 */ DWORD dwUnknown0054; +/* 0x0058 */ DWORD dwBpp; +} D3D9BaseSurface; + +typedef struct _D3D9Surface +{ +/* 0x0000 */ D3D9BaseObject BaseObject; +/* 0x0020 */ D3D9BaseSurface BaseSurface; +} D3D9Surface; + +typedef struct _D3D9DriverSurface +{ +/* 0x0000 */ D3D9Surface BaseD3D9Surface; +/* 0x005c */ DWORD dwUnknown5c; +/* 0x0060 */ DWORD dwUnknown60; +/* 0x0064 */ struct _D3D9DriverSurface* pPreviousDriverSurface; +/* 0x0068 */ struct _D3D9DriverSurface* pNextDriverSurface; +/* 0x006c */ DWORD dwUnknown6c[8]; +} D3D9DriverSurface; + +#endif // _D3D9_SURFACE_H_ diff --git a/reactos/dll/directx/d3d9/d3d9_swapchain.c b/reactos/dll/directx/d3d9/d3d9_swapchain.c new file mode 100644 index 00000000000..58c6fdb2b72 --- /dev/null +++ b/reactos/dll/directx/d3d9/d3d9_swapchain.c @@ -0,0 +1,153 @@ +#include "d3d9_swapchain.h" + +#include +#include + +#include "d3d9_helpers.h" +#include "d3d9_device.h" + +/* Convert a IDirect3DSwapChain9 pointer safely to the internal implementation struct */ +static LPDIRECT3DSWAPCHAIN9_INT IDirect3DSwapChain9ToImpl(LPDIRECT3DSWAPCHAIN9 iface) +{ + if (IsBadWritePtr(iface, sizeof(LPDIRECT3DSWAPCHAIN9_INT))) + return NULL; + + return (LPDIRECT3DSWAPCHAIN9_INT)((ULONG_PTR)iface - FIELD_OFFSET(Direct3DSwapChain9_INT, lpVtbl)); +} + +/* IDirect3DSwapChain9: IUnknown implementation */ +static HRESULT WINAPI Direct3DSwapChain9_QueryInterface(LPDIRECT3DSWAPCHAIN9 iface, REFIID riid, void** ppvObject) +{ + LPDIRECT3DSWAPCHAIN9_INT This = IDirect3DSwapChain9ToImpl(iface); + + if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirect3DSwapChain9)) + { + IUnknown_AddRef(iface); + *ppvObject = &This->lpVtbl; + return S_OK; + } + + *ppvObject = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI Direct3DSwapChain9_AddRef(LPDIRECT3DSWAPCHAIN9 iface) +{ + LPDIRECT3DSWAPCHAIN9_INT This = IDirect3DSwapChain9ToImpl(iface); + D3D9BaseObject* BaseObject = (D3D9BaseObject*)((ULONG_PTR)This - FIELD_OFFSET(Direct3DSwapChain9_INT, lpVtbl) - FIELD_OFFSET(Direct3DSwapChain9_INT, BaseObject)); + return D3D9BaseObject_AddRef(BaseObject); +} + +static ULONG WINAPI Direct3DSwapChain9_Release(LPDIRECT3DSWAPCHAIN9 iface) +{ + LPDIRECT3DSWAPCHAIN9_INT This = IDirect3DSwapChain9ToImpl(iface); + D3D9BaseObject* BaseObject = (D3D9BaseObject*)((ULONG_PTR)This - FIELD_OFFSET(Direct3DSwapChain9_INT, lpVtbl) - FIELD_OFFSET(Direct3DSwapChain9_INT, BaseObject)); + return D3D9BaseObject_Release(BaseObject); +} + +/* IDirect3DSwapChain9 interface */ +static HRESULT WINAPI Direct3DSwapChain9_Present(LPDIRECT3DSWAPCHAIN9 iface, CONST RECT* pSourceRect,CONST RECT* pDestRect,HWND hDestWindowOverride,CONST RGNDATA* pDirtyRegion,DWORD dwFlags) +{ + UNIMPLEMENTED + return D3D_OK; +} + +static HRESULT WINAPI Direct3DSwapChain9_GetFrontBufferData(LPDIRECT3DSWAPCHAIN9 iface, IDirect3DSurface9* pDestSurface) +{ + UNIMPLEMENTED + return D3D_OK; +} + +static HRESULT WINAPI Direct3DSwapChain9_GetBackBuffer(LPDIRECT3DSWAPCHAIN9 iface, UINT iBackBuffer,D3DBACKBUFFER_TYPE Type,IDirect3DSurface9** ppBackBuffer) +{ + UNIMPLEMENTED + return D3D_OK; +} + +static HRESULT WINAPI Direct3DSwapChain9_GetRasterStatus(LPDIRECT3DSWAPCHAIN9 iface, D3DRASTER_STATUS* pRasterStatus) +{ + UNIMPLEMENTED + return D3D_OK; +} + +static HRESULT WINAPI Direct3DSwapChain9_GetDisplayMode(LPDIRECT3DSWAPCHAIN9 iface, D3DDISPLAYMODE* pMode) +{ + UNIMPLEMENTED + return D3D_OK; +} + +static HRESULT WINAPI Direct3DSwapChain9_GetDevice(LPDIRECT3DSWAPCHAIN9 iface, IDirect3DDevice9** ppDevice) +{ + UNIMPLEMENTED + return D3D_OK; +} + +static HRESULT WINAPI Direct3DSwapChain9_GetPresentParameters(LPDIRECT3DSWAPCHAIN9 iface, D3DPRESENT_PARAMETERS* pPresentationParameters) +{ + UNIMPLEMENTED + return D3D_OK; +} + +static IDirect3DSwapChain9Vtbl Direct3DSwapChain9_Vtbl = +{ + /* IUnknown */ + Direct3DSwapChain9_QueryInterface, + Direct3DSwapChain9_AddRef, + Direct3DSwapChain9_Release, + + /* IDirect3DSwapChain9 */ + Direct3DSwapChain9_Present, + Direct3DSwapChain9_GetFrontBufferData, + Direct3DSwapChain9_GetBackBuffer, + Direct3DSwapChain9_GetRasterStatus, + Direct3DSwapChain9_GetDisplayMode, + Direct3DSwapChain9_GetDevice, + Direct3DSwapChain9_GetPresentParameters, +}; + +Direct3DSwapChain9_INT* CreateDirect3DSwapChain9(enum REF_TYPE RefType, struct _Direct3DDevice9_INT* pBaseDevice, DWORD ChainIndex) +{ + Direct3DSwapChain9_INT* pThisSwapChain; + if (FAILED(AlignedAlloc((LPVOID *)&pThisSwapChain, sizeof(Direct3DSwapChain9_INT)))) + { + DPRINT1("Could not create Direct3DSwapChain9_INT"); + return NULL; + } + + InitD3D9BaseObject(&pThisSwapChain->BaseObject, RefType, pBaseDevice); + + pThisSwapChain->lpVtbl = &Direct3DSwapChain9_Vtbl; + + pThisSwapChain->ChainIndex = ChainIndex; + pThisSwapChain->AdapterGroupIndex = ChainIndex; + pThisSwapChain->pUnknown6BC = pBaseDevice->DeviceData[ChainIndex].pUnknown6BC; + pThisSwapChain->pUnknown015c = (LPVOID)0xD3D9D3D9; + + return pThisSwapChain; +} + +VOID Direct3DSwapChain9_SetDisplayMode(Direct3DSwapChain9_INT* pThisSwapChain, D3DDISPLAYMODE* pMode) +{ + pThisSwapChain->dwWidth = pMode->Width; + pThisSwapChain->dwHeight = pMode->Height; +} + +HRESULT Direct3DSwapChain9_Init(Direct3DSwapChain9_INT* pThisSwapChain, D3DPRESENT_PARAMETERS* pPresentationParameters) +{ + int i; + + for (i = 0; i < 256; i++) + { + pThisSwapChain->GammaRamp.red[i] = + pThisSwapChain->GammaRamp.green[i] = + pThisSwapChain->GammaRamp.blue[i] = i; + } + + return Direct3DSwapChain9_Reset(pThisSwapChain, pPresentationParameters); +} + +HRESULT Direct3DSwapChain9_Reset(Direct3DSwapChain9_INT* pThisSwapChain, D3DPRESENT_PARAMETERS* pPresentationParameters) +{ + // TODO: Do all the dirty work... + return D3D_OK; +} diff --git a/reactos/dll/directx/d3d9/d3d9_swapchain.h b/reactos/dll/directx/d3d9/d3d9_swapchain.h new file mode 100644 index 00000000000..1513d9bf54d --- /dev/null +++ b/reactos/dll/directx/d3d9/d3d9_swapchain.h @@ -0,0 +1,72 @@ +#ifndef _D3D9_SWAPCHAIN_H_ +#define _D3D9_SWAPCHAIN_H_ + +#include "d3d9_common.h" +#include +#include +#include "d3d9_baseobject.h" + +typedef struct _Direct3DSwapChain9_INT +{ +/* 0x0000 */ D3D9BaseObject BaseObject; +/* 0x0020 */ struct IDirect3DSwapChain9Vtbl* lpVtbl; +/* 0x0024 */ DWORD dwUnknown0024; +/* 0x0028 */ struct _D3D9Surface* pPrimarySurface; +/* 0x002c */ struct _D3D9Surface* pExtendedPrimarySurface; +/* 0x0030 */ DWORD dwUnknown0030; +/* 0x0034 */ struct _D3D9DriverSurface** ppBackBufferList; +/* 0x0038 */ DWORD dwNumBackBuffers; +/* 0x003c */ DWORD ChainIndex; +/* 0x0040 */ DWORD AdapterGroupIndex; +/* 0x0044 */ D3DPRESENT_PARAMETERS PresentParameters; +/* 0x007c */ DWORD dwUnknown007c; +/* 0x0080 */ DWORD dwUnknown0080[2]; /* Extended format? */ +/* 0x0088 */ struct _D3D9Cursor* pCursor; +/* 0x008c */ DWORD dwUnknown008c[4]; +/* 0x009c */ struct _D3D9_Unknown6BC* pUnknown6BC; +/* 0x00a0 */ LPDWORD dwUnknown00a0; +/* 0x00a4 */ DWORD dwUnknown00a4; +/* 0x00a8 */ DWORD dwUnknown00a8; +/* 0x00ac */ DWORD dwWidth; +/* 0x00b0 */ DWORD dwHeight; +/* 0x00b4 */ DWORD dwUnknown00b4; +/* 0x00b8 */ DWORD dwUnknown00b8; +/* 0x00bc */ DWORD dwUnknown00bc; +/* 0x00c0 */ DWORD dwWidth2; +/* 0x00c4 */ DWORD dwHeight2; +/* 0x00c8 */ DWORD dwUnknown00c8; +/* 0x00cc */ DWORD dwUnknown00cc; +/* 0x00d0 */ DWORD dwUnknown00d0; +/* 0x00d4 */ DWORD dwUnknown00d4; +/* 0x00d8 */ DWORD dwUnknown00d8; +/* 0x00dc */ DWORD dwUnknown00dc; +/* 0x00e0 */ DWORD dwDevModeScale; +/* 0x00e4 */ DWORD dwUnknown00e4; +/* 0x00e8 */ DWORD dwUnknown00e8; +/* 0x00ec */ DWORD dwUnknown00ec; +/* 0x00f0 */ DWORD dwUnknown00f0[27]; + +/* 0x015c */ LPVOID pUnknown015c; +/* 0x0160 */ DWORD dwUnknown0160[4]; +/* 0x0170 */ HRESULT hResult; + +/* 0x0174 */ DWORD dwUnknown0174[26]; + +/* 0x01DC */ DWORD dwUnknownFlags; /* 1 = Show frame rate, 2 = Flip without vsync */ +/* 0x01E0 */ BOOL bForceRefreshRate; +/* 0x01E4 */ DWORD dwUnknown01dc[4]; + +/* 0x01f4 */ D3DSWAPEFFECT SwapEffect; +/* 0x01f8 */ DWORD dwUnknown01f8; +/* 0x01fc */ DWORD dwUnknown01fc; +/* 0x0200 */ DDGAMMARAMP GammaRamp; +} Direct3DSwapChain9_INT, FAR* LPDIRECT3DSWAPCHAIN9_INT; + + +Direct3DSwapChain9_INT* CreateDirect3DSwapChain9(enum REF_TYPE RefType, struct _Direct3DDevice9_INT* pBaseDevice, DWORD ChainIndex); + +VOID Direct3DSwapChain9_SetDisplayMode(Direct3DSwapChain9_INT* pThisSwapChain, D3DDISPLAYMODE* pMode); +HRESULT Direct3DSwapChain9_Init(Direct3DSwapChain9_INT* pThisSwapChain, D3DPRESENT_PARAMETERS* pPresentationParameters); +HRESULT Direct3DSwapChain9_Reset(Direct3DSwapChain9_INT* pThisSwapChain, D3DPRESENT_PARAMETERS* pPresentationParameters); + +#endif // _D3D9_SWAPCHAIN_H_ diff --git a/reactos/dll/directx/d3d9/device.c b/reactos/dll/directx/d3d9/device.c new file mode 100644 index 00000000000..c6ec6b22d47 --- /dev/null +++ b/reactos/dll/directx/d3d9/device.c @@ -0,0 +1,108 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS ReactX + * FILE: dll/directx/d3d9/device.c + * PURPOSE: Direct3D9's device creation + * PROGRAMERS: Gregor Gullwi + */ + +#include "device.h" +#include +#include "d3d9_helpers.h" + +static HRESULT InitD3D9ResourceManager(D3D9ResourceManager* pThisResourceManager, LPDIRECT3DDEVICE9_INT pDirect3DDevice9) +{ + DWORD MaxSimultaneousTextures; + + MaxSimultaneousTextures = max(1, pDirect3DDevice9->DeviceData[0].DriverCaps.DriverCaps9.MaxSimultaneousTextures); + + if (FAILED(AlignedAlloc((LPVOID *)&pThisResourceManager->pTextureHeap, sizeof(DWORD) + MaxSimultaneousTextures * sizeof(int) * 3))) + { + DPRINT1("Could not allocate texture heap"); + return DDERR_OUTOFMEMORY; + } + + // TODO: Init texture heap + + pThisResourceManager->MaxSimultaneousTextures = MaxSimultaneousTextures; + pThisResourceManager->pBaseDevice = pDirect3DDevice9; + + return D3D_OK; +} + +HRESULT InitD3D9BaseDevice(LPDIRECT3DDEVICE9_INT pThisBaseDevice, LPDIRECT3D9_INT pDirect3D9, + UINT Adapter, D3DDEVTYPE DeviceType, HWND hFocusWindow, DWORD BehaviourFlags, + D3DPRESENT_PARAMETERS* pPresentationParameters, DWORD NumAdaptersToCreate) +{ + D3D9ResourceManager* pResourceManager; + DWORD i; + D3DDISPLAYMODE DisplayMode; + + // Insert Reset/Ctor here + + if (FAILED(AlignedAlloc((LPVOID *)&pResourceManager, sizeof(D3D9ResourceManager))) || + FAILED(InitD3D9ResourceManager(pResourceManager, pThisBaseDevice))) + { + DPRINT1("Could not create resource manager"); + return DDERR_OUTOFMEMORY; + } + + pThisBaseDevice->pResourceManager = pResourceManager; + + pThisBaseDevice->pDirect3D9 = pDirect3D9; + pThisBaseDevice->DeviceType = DeviceType; + pThisBaseDevice->hWnd = hFocusWindow; + pThisBaseDevice->AdjustedBehaviourFlags = BehaviourFlags; + pThisBaseDevice->BehaviourFlags = BehaviourFlags; + pThisBaseDevice->NumAdaptersInDevice = NumAdaptersToCreate; + + // TODO: Query driver for correct DX version + pThisBaseDevice->dwDXVersion = 9; + + DisplayMode = pThisBaseDevice->CurrentDisplayMode[0]; + for (i = 0; i < NumAdaptersToCreate; i++) + { + pThisBaseDevice->CurrentDisplayMode[i] = pThisBaseDevice->CurrentDisplayMode[0]; + pThisBaseDevice->AdapterIndexInGroup[i] = i; + // TODO: Fill pThisBaseDevice->DeviceData[i] + + pThisBaseDevice->pSwapChains[i] = CreateDirect3DSwapChain9(RT_BUILTIN, pThisBaseDevice, i); + pThisBaseDevice->pSwapChains2[i] = pThisBaseDevice->pSwapChains[i]; + Direct3DSwapChain9_SetDisplayMode(pThisBaseDevice->pSwapChains[i], &DisplayMode); + + if (FAILED(Direct3DSwapChain9_Init(pThisBaseDevice->pSwapChains[i], pPresentationParameters))) + { + DPRINT1("Failed to init swap chain: %d", i); + return DDERR_GENERIC; + } + } + + return D3D_OK; +} + +HRESULT CreateD3D9HalDevice(LPDIRECT3D9_INT pDirect3D9, UINT Adapter, + HWND hFocusWindow, DWORD BehaviourFlags, + D3DPRESENT_PARAMETERS* pPresentationParameters, + DWORD NumAdaptersToCreate, + struct IDirect3DDevice9** ppReturnedDeviceInterface) +{ + HRESULT Ret; + + if (FAILED(AlignedAlloc((LPVOID *)ppReturnedDeviceInterface, sizeof(D3D9HALDEVICE)))) + { + DPRINT1("Not enough memory to create HAL device"); + return DDERR_OUTOFMEMORY; + } + + Ret = InitD3D9BaseDevice((LPDIRECT3DDEVICE9_INT)*ppReturnedDeviceInterface, pDirect3D9, Adapter, + D3DDEVTYPE_HAL, hFocusWindow, BehaviourFlags, + pPresentationParameters, NumAdaptersToCreate); + + if (FAILED(Ret)) + { + AlignedFree((LPVOID)*ppReturnedDeviceInterface); + return Ret; + } + + return D3D_OK; +} diff --git a/reactos/dll/directx/d3d9/device.h b/reactos/dll/directx/d3d9/device.h new file mode 100644 index 00000000000..88cc105e987 --- /dev/null +++ b/reactos/dll/directx/d3d9/device.h @@ -0,0 +1,20 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS ReactX + * FILE: dll/directx/d3d9/device.h + * PURPOSE: Direct3D9's device creation + * PROGRAMERS: Gregor Gullwi + */ + +#ifndef _DEVICE_H_ +#define _DEVICE_H_ + +#include "d3d9_device.h" + +HRESULT CreateD3D9HalDevice(LPDIRECT3D9_INT pDirect3D9, UINT Adapter, + HWND hFocusWindow, DWORD BehaviourFlags, + D3DPRESENT_PARAMETERS* pPresentationParameters, + DWORD NumAdaptersToCreate, + struct IDirect3DDevice9** ppReturnedDeviceInterface); + +#endif // _DEVICE_H_ From 3291fc11c0769a65f8cdda0c3c1d60857b770cd1 Mon Sep 17 00:00:00 2001 From: Gregor Brunmar Date: Sat, 23 Aug 2008 15:17:00 +0000 Subject: [PATCH 125/324] Added missing documentation svn path=/trunk/; revision=35564 --- reactos/dll/directx/d3d9/d3d9_baseobject.c | 7 ++++ reactos/dll/directx/d3d9/d3d9_baseobject.h | 7 ++++ reactos/dll/directx/d3d9/d3d9_impl.c | 40 ++++++++++++++++++++++ reactos/dll/directx/d3d9/d3d9_swapchain.c | 7 ++++ reactos/dll/directx/d3d9/d3d9_swapchain.h | 7 ++++ 5 files changed, 68 insertions(+) diff --git a/reactos/dll/directx/d3d9/d3d9_baseobject.c b/reactos/dll/directx/d3d9/d3d9_baseobject.c index a60593e28a6..04a70a4779b 100644 --- a/reactos/dll/directx/d3d9/d3d9_baseobject.c +++ b/reactos/dll/directx/d3d9/d3d9_baseobject.c @@ -1,3 +1,10 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS ReactX + * FILE: dll/directx/d3d9/d3d9_baseobject.c + * PURPOSE: Direct3D9's base object + * PROGRAMERS: Gregor Gullwi + */ #include "d3d9_baseobject.h" #include "d3d9_device.h" diff --git a/reactos/dll/directx/d3d9/d3d9_baseobject.h b/reactos/dll/directx/d3d9/d3d9_baseobject.h index 14c4e261853..e61282c1c16 100644 --- a/reactos/dll/directx/d3d9/d3d9_baseobject.h +++ b/reactos/dll/directx/d3d9/d3d9_baseobject.h @@ -1,3 +1,10 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS ReactX + * FILE: dll/directx/d3d9/d3d9_baseobject.h + * PURPOSE: Direct3D9's base object + * PROGRAMERS: Gregor Gullwi + */ #ifndef _D3D9_BASEOBJECT_H_ #define _D3D9_BASEOBJECT_H_ diff --git a/reactos/dll/directx/d3d9/d3d9_impl.c b/reactos/dll/directx/d3d9/d3d9_impl.c index 6ecd7f73796..9bb2109883b 100644 --- a/reactos/dll/directx/d3d9/d3d9_impl.c +++ b/reactos/dll/directx/d3d9/d3d9_impl.c @@ -889,6 +889,46 @@ static HMONITOR WINAPI IDirect3D9Impl_GetAdapterMonitor(LPDIRECT3D9 iface, UINT return hAdapterMonitor; } +/*++ +* @name IDirect3D9::CreateDevice +* @implemented +* +* The function IDirect3D9Impl_CreateDevice creates an IDirect3DDevice9 object +* that represents the display adapter. +* +* @param LPDIRECT3D iface +* Pointer to the IDirect3D9 object returned from Direct3DCreate9() +* +* @param UINT Adapter +* Adapter index to get information about. D3DADAPTER_DEFAULT is the primary display. +* The maximum value for this is the value returned by IDirect3D::GetAdapterCount() - 1. +* +* @param D3DDEVTYPE DeviceType +* One of the D3DDEVTYPE enum members. +* +* @param HWND hFocusWindow +* A window handle that is used as a reference when Direct3D should switch between +* foreground mode and background mode. +* +* @param DWORD BehaviourFlags +* Any valid combination of the D3DCREATE constants. +* +* @param D3DPRESENT_PARAMETERS* pPresentationParameters +* Pointer to a D3DPRESENT_PARAMETERS structure describing the parameters for the device +* to be created. If D3DCREATE_ADAPTERGROUP_DEVICE is specified in the BehaviourFlags parameter, +* the pPresentationParameters is treated as an array. +* +* @param IDirect3DDevice9** ppReturnedDeviceInterface +* Return object that represents the created device. +* +* @return HRESULT +* If the method successfully creates a device and returns a valid ppReturnedDeviceInterface object, +* the return value is D3D_OK. +* If Adapter is out of range, DeviceType is invalid, hFocusWindow is not a valid, BehaviourFlags is invalid +* pPresentationParameters is invalid or ppReturnedDeviceInterface is a bad pointer, the return value +* will be D3DERR_INVALIDCALL. +* +*/ static HRESULT WINAPI IDirect3D9Impl_CreateDevice(LPDIRECT3D9 iface, UINT Adapter, D3DDEVTYPE DeviceType, HWND hFocusWindow, DWORD BehaviourFlags, D3DPRESENT_PARAMETERS* pPresentationParameters, diff --git a/reactos/dll/directx/d3d9/d3d9_swapchain.c b/reactos/dll/directx/d3d9/d3d9_swapchain.c index 58c6fdb2b72..d91369897bb 100644 --- a/reactos/dll/directx/d3d9/d3d9_swapchain.c +++ b/reactos/dll/directx/d3d9/d3d9_swapchain.c @@ -1,3 +1,10 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS ReactX + * FILE: dll/directx/d3d9/d3d9_swapchain.c + * PURPOSE: Direct3D9's swap chain object + * PROGRAMERS: Gregor Gullwi + */ #include "d3d9_swapchain.h" #include diff --git a/reactos/dll/directx/d3d9/d3d9_swapchain.h b/reactos/dll/directx/d3d9/d3d9_swapchain.h index 1513d9bf54d..1fa23b14df9 100644 --- a/reactos/dll/directx/d3d9/d3d9_swapchain.h +++ b/reactos/dll/directx/d3d9/d3d9_swapchain.h @@ -1,3 +1,10 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS ReactX + * FILE: dll/directx/d3d9/d3d9_swapchain.h + * PURPOSE: Direct3D9's swap chain object + * PROGRAMERS: Gregor Gullwi + */ #ifndef _D3D9_SWAPCHAIN_H_ #define _D3D9_SWAPCHAIN_H_ From 5cf8b3121157f6be465ca872765dd1108a4a32e5 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Sat, 23 Aug 2008 16:30:14 +0000 Subject: [PATCH 126/324] - In IoAcquire/ReleaseCancelSpinLock, use the queued "IopCancelSpinLock" instead of a ros-specific "CancelSpinLock" standard spinlock - Misc fixes svn path=/trunk/; revision=35565 --- reactos/ntoskrnl/io/iomgr/error.c | 14 ++++----- reactos/ntoskrnl/io/iomgr/iofunc.c | 10 +++--- reactos/ntoskrnl/io/iomgr/iomgr.c | 2 -- reactos/ntoskrnl/io/iomgr/irp.c | 49 +++++++++++++++++------------- reactos/ntoskrnl/io/iomgr/util.c | 20 ++++++------ 5 files changed, 48 insertions(+), 47 deletions(-) diff --git a/reactos/ntoskrnl/io/iomgr/error.c b/reactos/ntoskrnl/io/iomgr/error.c index b6899d3a95c..69c9ccae087 100644 --- a/reactos/ntoskrnl/io/iomgr/error.c +++ b/reactos/ntoskrnl/io/iomgr/error.c @@ -122,7 +122,7 @@ IopConnectLogPort(VOID) NULL); if (NT_SUCCESS(Status)) { - /* Remmeber we're connected */ + /* Remember we're connected */ IopLogPortConnected = TRUE; return TRUE; } @@ -583,7 +583,7 @@ IoWriteErrorLogEntry(IN PVOID ElEntry) KeAcquireSpinLock(&IopLogListLock, &Irql); InsertHeadList(&IopErrorLogListHead, &LogEntry->ListEntry); - /* Check if the worker is runnign */ + /* Check if the worker is running */ if (!IopLogWorkerRunning) { #if 0 @@ -648,7 +648,7 @@ IoRaiseInformationalHardError(IN NTSTATUS ErrorStatus, IN PKTHREAD Thread) { UNIMPLEMENTED; - return(FALSE); + return FALSE; } /* @@ -659,14 +659,12 @@ NTAPI IoSetThreadHardErrorMode(IN BOOLEAN HardErrorEnabled) { PETHREAD Thread = PsGetCurrentThread(); - BOOLEAN Old; + BOOLEAN OldMode; /* Get the current value */ - Old = !Thread->HardErrorsAreDisabled; + OldMode = !Thread->HardErrorsAreDisabled; /* Set the new one and return the old */ Thread->HardErrorsAreDisabled = !HardErrorEnabled; - return Old; + return OldMode; } - -/* EOF */ diff --git a/reactos/ntoskrnl/io/iomgr/iofunc.c b/reactos/ntoskrnl/io/iomgr/iofunc.c index e210a183fb5..bc4bc770977 100644 --- a/reactos/ntoskrnl/io/iomgr/iofunc.c +++ b/reactos/ntoskrnl/io/iomgr/iofunc.c @@ -682,7 +682,7 @@ IoSynchronousPageWrite(IN PFILE_OBJECT FileObject, StackPtr->FileObject = FileObject; /* Call the Driver */ - return IofCallDriver(DeviceObject, Irp); + return IoCallDriver(DeviceObject, Irp); } /* @@ -732,7 +732,7 @@ IoPageRead(IN PFILE_OBJECT FileObject, StackPtr->FileObject = FileObject; /* Call the Driver */ - return IofCallDriver(DeviceObject, Irp); + return IoCallDriver(DeviceObject, Irp); } /* @@ -776,7 +776,7 @@ IoQueryVolumeInformation(IN PFILE_OBJECT FileObject, } /* - * @unimplemented + * @implemented */ NTSTATUS NTAPI @@ -2045,7 +2045,7 @@ NtReadFile(IN HANDLE FileHandle, CapturedByteOffset = FileObject->CurrentByteOffset; } - /* Rememer we are sync */ + /* Remember we are sync */ Synchronous = TRUE; } else if (!(ByteOffset) && @@ -2904,7 +2904,7 @@ NtWriteFile(IN HANDLE FileHandle, CapturedByteOffset = FileObject->CurrentByteOffset; } - /* Rememer we are sync */ + /* Remember we are sync */ Synchronous = TRUE; } else if (!(ByteOffset) && diff --git a/reactos/ntoskrnl/io/iomgr/iomgr.c b/reactos/ntoskrnl/io/iomgr/iomgr.c index 2e44a5c0cfd..336cb0c81b6 100644 --- a/reactos/ntoskrnl/io/iomgr/iomgr.c +++ b/reactos/ntoskrnl/io/iomgr/iomgr.c @@ -68,7 +68,6 @@ extern LIST_ENTRY IopErrorLogListHead; extern LIST_ENTRY IopTimerQueueHead; extern KDPC IopTimerDpc; extern KTIMER IopTimer; -extern KSPIN_LOCK CancelSpinLock; extern KSPIN_LOCK IoVpbLock; extern KSPIN_LOCK IoStatisticsLock; extern KSPIN_LOCK DriverReinitListLock; @@ -463,7 +462,6 @@ IoInitSystem(IN PLOADER_PARAMETER_BLOCK LoaderBlock) InitializeListHead(&LastChanceShutdownListHead); InitializeListHead(&FsChangeNotifyListHead); InitializeListHead(&IopErrorLogListHead); - KeInitializeSpinLock(&CancelSpinLock); KeInitializeSpinLock(&IoVpbLock); KeInitializeSpinLock(&IoStatisticsLock); KeInitializeSpinLock(&DriverReinitListLock); diff --git a/reactos/ntoskrnl/io/iomgr/irp.c b/reactos/ntoskrnl/io/iomgr/irp.c index 4b6842d84d8..0f7b11e19f1 100644 --- a/reactos/ntoskrnl/io/iomgr/irp.c +++ b/reactos/ntoskrnl/io/iomgr/irp.c @@ -1,8 +1,7 @@ - /* * PROJECT: ReactOS Kernel * LICENSE: GPL - See COPYING in the top level directory - * FILE: ntoskrnl/io/irp.c + * FILE: ntoskrnl/io/iomgr/irp.c * PURPOSE: IRP Handling Functions * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org) * Gunnar Dalsnes @@ -627,7 +626,7 @@ IoBuildAsynchronousFsdRequest(IN ULONG MajorFunction, /* Allocate IRP */ Irp = IoAllocateIrp(DeviceObject->StackSize, FALSE); - if (!Irp) return Irp; + if (!Irp) return NULL; /* Get the Stack */ StackPtr = IoGetNextIrpStackLocation(Irp); @@ -731,7 +730,7 @@ IoBuildAsynchronousFsdRequest(IN ULONG MajorFunction, Irp->UserIosb = IoStatusBlock; Irp->Tail.Overlay.Thread = PsGetCurrentThread(); - /* Set the Status Block after all is done */ + /* Return the IRP */ IOTRACE(IO_IRP_DEBUG, "%s - Built IRP %p with Major, Buffer, DO %lx %p %p\n", __FUNCTION__, @@ -763,7 +762,7 @@ IoBuildDeviceIoControlRequest(IN ULONG IoControlCode, /* Allocate IRP */ Irp = IoAllocateIrp(DeviceObject->StackSize, FALSE); - if (!Irp) return Irp; + if (!Irp) return NULL; /* Get the Stack */ StackPtr = IoGetNextIrpStackLocation(Irp); @@ -857,6 +856,7 @@ IoBuildDeviceIoControlRequest(IN ULONG IoControlCode, } else { + /* Clear the flags */ Irp->Flags = 0; } @@ -1058,7 +1058,12 @@ IoCancelThreadIo(IN PETHREAD Thread) * Don't stay here forever if some broken driver doesn't complete * the IRP. */ - if (!(Retries--)) IopRemoveThreadIrp(); + if (!(Retries--)) + { + /* Print out a message and remove the IRP */ + DPRINT1("Broken driver did not complete!\n"); + IopRemoveThreadIrp(); + } /* Raise the IRQL Again */ KeRaiseIrql(APC_LEVEL, &OldIrql); @@ -1076,7 +1081,7 @@ NTAPI IoCallDriver(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { - /* Call fast call */ + /* Call fastcall */ return IofCallDriver(DeviceObject, Irp); } @@ -1112,7 +1117,7 @@ IofCallDriver(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { PDRIVER_OBJECT DriverObject; - PIO_STACK_LOCATION Param; + PIO_STACK_LOCATION StackPtr; /* Get the Driver Object */ DriverObject = DeviceObject->DriverObject; @@ -1126,15 +1131,15 @@ IofCallDriver(IN PDEVICE_OBJECT DeviceObject, } /* Now update the stack location */ - Param = IoGetNextIrpStackLocation(Irp); - Irp->Tail.Overlay.CurrentStackLocation = Param; + StackPtr = IoGetNextIrpStackLocation(Irp); + Irp->Tail.Overlay.CurrentStackLocation = StackPtr; /* Get the Device Object */ - Param->DeviceObject = DeviceObject; + StackPtr->DeviceObject = DeviceObject; /* Call it */ - return DriverObject->MajorFunction[Param->MajorFunction](DeviceObject, - Irp); + return DriverObject->MajorFunction[StackPtr->MajorFunction](DeviceObject, + Irp); } FORCEINLINE @@ -1417,10 +1422,9 @@ IofCompleteRequest(IN PIRP Irp, NTSTATUS NTAPI -IopSynchronousCompletion( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp, - IN PVOID Context) +IopSynchronousCompletion(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp, + IN PVOID Context) { if (Irp->PendingReturned) KeSetEvent((PKEVENT)Context, IO_NO_INCREMENT, FALSE); @@ -1464,6 +1468,7 @@ IoForwardIrpSynchronously(IN PDEVICE_OBJECT DeviceObject, KeWaitForSingleObject(&Event, Suspended, KernelMode, FALSE, NULL); } + /* Return success */ return TRUE; } @@ -1550,10 +1555,12 @@ IoGetPagingIoPriority(IN PIRP Irp) /* * @implemented */ -PEPROCESS NTAPI +PEPROCESS +NTAPI IoGetRequestorProcess(IN PIRP Irp) { - return(Irp->Tail.Overlay.Thread->ThreadsProcess); + /* Return the requestor process */ + return Irp->Tail.Overlay.Thread->ThreadsProcess; } /* @@ -1563,6 +1570,7 @@ ULONG NTAPI IoGetRequestorProcessId(IN PIRP Irp) { + /* Return the requestor process' id */ return (ULONG)(IoGetRequestorProcess(Irp)->UniqueProcessId); } @@ -1586,6 +1594,7 @@ PIRP NTAPI IoGetTopLevelIrp(VOID) { + /* Return the IRP */ return (PIRP)PsGetCurrentThread()->TopLevelIrp; } @@ -1736,5 +1745,3 @@ IoSetTopLevelIrp(IN PIRP Irp) /* Set the IRP */ PsGetCurrentThread()->TopLevelIrp = (ULONG)Irp; } - -/* EOF */ diff --git a/reactos/ntoskrnl/io/iomgr/util.c b/reactos/ntoskrnl/io/iomgr/util.c index d9bbd860866..02e971241ce 100644 --- a/reactos/ntoskrnl/io/iomgr/util.c +++ b/reactos/ntoskrnl/io/iomgr/util.c @@ -1,9 +1,11 @@ /* * PROJECT: ReactOS Kernel * LICENSE: GPL - See COPYING in the top level directory - * FILE: ntoskrnl/io/util.c + * FILE: ntoskrnl/io/iomgr/util.c * PURPOSE: I/O Utility Functions - * PROGRAMMERS: + * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org) + * Aleksey Bragin (aleksey@reactos.org) + * Daniel Zimmerman (netzimme@aim.com) */ /* INCLUDES *****************************************************************/ @@ -17,10 +19,6 @@ NTAPI RtlpGetStackLimits(PULONG_PTR StackBase, PULONG_PTR StackLimit); -/* DATA **********************************************************************/ - -KSPIN_LOCK CancelSpinLock; - /* FUNCTIONS *****************************************************************/ /* @@ -28,10 +26,10 @@ KSPIN_LOCK CancelSpinLock; */ VOID NTAPI -IoAcquireCancelSpinLock(PKIRQL Irql) +IoAcquireCancelSpinLock(OUT PKIRQL Irql) { /* Just acquire the internal lock */ - KeAcquireSpinLock(&CancelSpinLock,Irql); + *Irql = KeAcquireQueuedSpinLock(LockQueueIoCancelLock); } /* @@ -113,6 +111,7 @@ PEPROCESS NTAPI IoGetCurrentProcess(VOID) { + /* Return the current thread's process */ return (PEPROCESS)PsGetCurrentThread()->Tcb.ApcState.Process; } @@ -121,10 +120,10 @@ IoGetCurrentProcess(VOID) */ VOID NTAPI -IoReleaseCancelSpinLock(KIRQL Irql) +IoReleaseCancelSpinLock(IN KIRQL Irql) { /* Release the internal lock */ - KeReleaseSpinLock(&CancelSpinLock,Irql); + KeReleaseQueuedSpinLock(LockQueueIoCancelLock, Irql); } /* @@ -315,4 +314,3 @@ IoCheckQuerySetVolumeInformation(IN FS_INFORMATION_CLASS FsInformationClass, UNIMPLEMENTED; return STATUS_NOT_IMPLEMENTED; } -/* EOF */ From e8d5b46ac465a2e547555be1a20e09729142ab09 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Sat, 23 Aug 2008 17:11:12 +0000 Subject: [PATCH 127/324] - Implement IopGetRegistryValue (complementary function to IopOpenRegistryKeyEx). Not used yet. svn path=/trunk/; revision=35566 --- reactos/ntoskrnl/include/internal/io.h | 7 ++++ reactos/ntoskrnl/io/pnpmgr/pnpmgr.c | 45 ++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/reactos/ntoskrnl/include/internal/io.h b/reactos/ntoskrnl/include/internal/io.h index 914d67fc393..3f18138a968 100644 --- a/reactos/ntoskrnl/include/internal/io.h +++ b/reactos/ntoskrnl/include/internal/io.h @@ -593,6 +593,13 @@ IopOpenRegistryKeyEx( PUNICODE_STRING Name, ACCESS_MASK DesiredAccess); +NTSTATUS +NTAPI +IopGetRegistryValue(IN HANDLE Handle, + IN PWSTR ValueName, + OUT PKEY_VALUE_FULL_INFORMATION *Information); + + // // Initialization Routines // diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c index 34be9ee1c19..dfefe0e9f80 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c @@ -2775,6 +2775,51 @@ IopOpenRegistryKeyEx(PHANDLE KeyHandle, return Status; } +NTSTATUS +NTAPI +IopGetRegistryValue(IN HANDLE Handle, + IN PWSTR ValueName, + OUT PKEY_VALUE_FULL_INFORMATION *Information) +{ + UNICODE_STRING ValueString; + NTSTATUS Status; + PKEY_VALUE_FULL_INFORMATION FullInformation; + ULONG Size; + PAGED_CODE(); + + RtlInitUnicodeString(&ValueString, ValueName); + + Status = ZwQueryValueKey(Handle, + &ValueString, + KeyValueFullInformation, + NULL, + 0, + &Size); + if ((Status != STATUS_BUFFER_OVERFLOW) && + (Status != STATUS_BUFFER_TOO_SMALL)) + { + return Status; + } + + FullInformation = ExAllocatePool(NonPagedPool, Size); + if (!FullInformation) return STATUS_INSUFFICIENT_RESOURCES; + + Status = ZwQueryValueKey(Handle, + &ValueString, + KeyValueFullInformation, + FullInformation, + Size, + &Size); + if (!NT_SUCCESS(Status)) + { + ExFreePool(FullInformation); + return Status; + } + + *Information = FullInformation; + return STATUS_SUCCESS; +} + static NTSTATUS INIT_FUNCTION NTAPI PnpDriverInitializeEmpty(IN struct _DRIVER_OBJECT *DriverObject, IN PUNICODE_STRING RegistryPath) From 48021764b44072e4b6defc447912e2e53933d928 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Sat, 23 Aug 2008 17:16:16 +0000 Subject: [PATCH 128/324] - Add THREAD_TERMINATE_HELD_MUTEX bugcode and make use of it svn path=/trunk/; revision=35567 --- reactos/include/reactos/mc/bugcodes.mc | 8 ++++++++ reactos/ntoskrnl/ke/thrdobj.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/reactos/include/reactos/mc/bugcodes.mc b/reactos/include/reactos/mc/bugcodes.mc index 9583b39e94b..b3f8dac9cb1 100644 --- a/reactos/include/reactos/mc/bugcodes.mc +++ b/reactos/include/reactos/mc/bugcodes.mc @@ -1397,6 +1397,14 @@ Language=English MultiProcessor Kernel . +MessageId=0x8A +Severity=Informational +Facility=System +SymbolicName=THREAD_TERMINATE_HELD_MUTEX +Language=English +A kernel thread terminated while holding a mutex +. + MessageId=0x9D Severity=Informational Facility=System diff --git a/reactos/ntoskrnl/ke/thrdobj.c b/reactos/ntoskrnl/ke/thrdobj.c index 14520ebecf0..500ffd05fbc 100644 --- a/reactos/ntoskrnl/ke/thrdobj.c +++ b/reactos/ntoskrnl/ke/thrdobj.c @@ -416,7 +416,7 @@ KeRundownThread(VOID) if (Mutant->ApcDisable) { /* Bugcheck the system */ - KEBUGCHECKEX(0, //THREAD_TERMINATE_HELD_MUTEX, + KeBugCheckEx(THREAD_TERMINATE_HELD_MUTEX, (ULONG_PTR)Thread, (ULONG_PTR)Mutant, 0, From 07147e6a3ca86dec8f0fafe6eae950eeb352c6d7 Mon Sep 17 00:00:00 2001 From: Gregor Brunmar Date: Sat, 23 Aug 2008 17:24:27 +0000 Subject: [PATCH 129/324] * Refactored GetDirect3D9AdapterInfo() to make life a little easier in InitD3D9BaseDevice(). * Filled IDirect3DDevice9::DeviceData[] with correct info svn path=/trunk/; revision=35568 --- reactos/dll/directx/d3d9/d3d9_create.c | 55 +++++++++++++++-------- reactos/dll/directx/d3d9/d3d9_create.h | 3 ++ reactos/dll/directx/d3d9/d3d9_device.c | 11 ++++- reactos/dll/directx/d3d9/d3d9_private.h | 2 +- reactos/dll/directx/d3d9/d3d9_swapchain.c | 2 + reactos/dll/directx/d3d9/device.c | 19 +++++--- 6 files changed, 66 insertions(+), 26 deletions(-) diff --git a/reactos/dll/directx/d3d9/d3d9_create.c b/reactos/dll/directx/d3d9/d3d9_create.c index 2b8da3fdff5..b92308f05e1 100644 --- a/reactos/dll/directx/d3d9/d3d9_create.c +++ b/reactos/dll/directx/d3d9/d3d9_create.c @@ -112,21 +112,14 @@ void GetDisplayAdapterFromDevice(IN OUT LPDIRECT3D9_DISPLAYADAPTER pDisplayAdapt } } -static BOOL GetDirect3D9AdapterInfo(IN OUT LPDIRECT3D9_DISPLAYADAPTER pDisplayAdapters, IN DWORD AdapterIndex) +BOOL CreateD3D9DeviceData(IN LPDIRECT3D9_DISPLAYADAPTER pDisplayAdapter, IN LPD3D9_DEVICEDATA pDeviceData) { HDC hDC; - LPD3D9_DEVICEDATA pDeviceData; - LPDIRECT3D9_DISPLAYADAPTER pDisplayAdapter = &pDisplayAdapters[AdapterIndex]; /* Test DC creation for the display device */ if (NULL == (hDC = CreateDCA(NULL, pDisplayAdapter->szDeviceName, NULL, NULL))) - return FALSE; - - pDeviceData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(D3D9_DEVICEDATA)); - if (NULL == pDeviceData) { - DPRINT1("Out of memory, could not initialize Direct3D adapter"); - DeleteDC(hDC); + DPRINT1("Could not create dc for display adapter: %s", pDisplayAdapter->szDeviceName); return FALSE; } @@ -147,17 +140,39 @@ static BOOL GetDirect3D9AdapterInfo(IN OUT LPDIRECT3D9_DISPLAYADAPTER pDisplayAd if (FALSE == GetDeviceData(pDeviceData)) { - DeleteDC(hDC); - HeapFree(GetProcessHeap(), 0, pDeviceData->pUnknown6BC); - HeapFree(GetProcessHeap(), 0, pDeviceData); + DPRINT1("Could not get device data for display adapter: %s", pDisplayAdapter->szDeviceName); return FALSE; } - DeleteDC(hDC); + return TRUE; +} + +VOID DestroyD3D9DeviceData(IN LPD3D9_DEVICEDATA pDeviceData) +{ + DeleteDC(pDeviceData->hDC); + HeapFree(GetProcessHeap(), 0, pDeviceData->pUnknown6BC); +} + +static BOOL GetDirect3D9AdapterInfo(IN OUT LPDIRECT3D9_DISPLAYADAPTER pDisplayAdapters, IN DWORD AdapterIndex) +{ + LPD3D9_DEVICEDATA pDeviceData; + + pDeviceData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(D3D9_DEVICEDATA)); + if (NULL == pDeviceData) + { + DPRINT1("Out of memory, could not initialize Direct3D adapter"); + return FALSE; + } + + if (FALSE == CreateD3D9DeviceData(&pDisplayAdapters[AdapterIndex], pDeviceData)) + { + DPRINT1("Could not create device data for adapter: %d", AdapterIndex); + return FALSE; + } GetDisplayAdapterFromDevice(pDisplayAdapters, AdapterIndex, pDeviceData); - HeapFree(GetProcessHeap(), 0, pDeviceData->pUnknown6BC); + DestroyD3D9DeviceData(pDeviceData); HeapFree(GetProcessHeap(), 0, pDeviceData); return TRUE; @@ -232,9 +247,6 @@ HRESULT CreateD3D9(OUT LPDIRECT3D9 *ppDirect3D9, UINT SDKVersion) if (pDirect3D9 == 0) return DDERR_OUTOFMEMORY; - pDirect3D9->unknown000007 = 0; - pDirect3D9->lpInt = 0; - pDirect3D9->lpVtbl = &Direct3D9_Vtbl; pDirect3D9->dwProcessId = GetCurrentThreadId(); pDirect3D9->lRefCnt = 1; @@ -246,10 +258,15 @@ HRESULT CreateD3D9(OUT LPDIRECT3D9 *ppDirect3D9, UINT SDKVersion) InitializeCriticalSection(&pDirect3D9->d3d9_cs); - GetDisplayDeviceInfo(pDirect3D9); + if (FALSE == GetDisplayDeviceInfo(pDirect3D9)) + { + DPRINT1("Could not create Direct3D9 object"); + AlignedFree(pDirect3D9); + return DDERR_GENERIC; + } *ppDirect3D9 = (LPDIRECT3D9)&pDirect3D9->lpVtbl; - return ERROR_SUCCESS; + return D3D_OK; } diff --git a/reactos/dll/directx/d3d9/d3d9_create.h b/reactos/dll/directx/d3d9/d3d9_create.h index ce2c866c1cc..a9e31e3e0bd 100644 --- a/reactos/dll/directx/d3d9/d3d9_create.h +++ b/reactos/dll/directx/d3d9/d3d9_create.h @@ -15,4 +15,7 @@ /* Creates a Direct3D9 object */ HRESULT CreateD3D9(OUT LPDIRECT3D9 *ppDirect3D9, UINT SDKVersion); +BOOL CreateD3D9DeviceData(IN LPDIRECT3D9_DISPLAYADAPTER pDisplayAdapter, IN LPD3D9_DEVICEDATA pDeviceData); +VOID DestroyD3D9DeviceData(IN LPD3D9_DEVICEDATA pDeviceData); + #endif // _D3D9_CREATE_H_ diff --git a/reactos/dll/directx/d3d9/d3d9_device.c b/reactos/dll/directx/d3d9/d3d9_device.c index c922ea237bc..b9153135c47 100644 --- a/reactos/dll/directx/d3d9/d3d9_device.c +++ b/reactos/dll/directx/d3d9/d3d9_device.c @@ -8,7 +8,8 @@ #include "d3d9_device.h" #include "d3d9_helpers.h" #include "adapter.h" -#include "debug.h" +#include +#include "d3d9_create.h" #define LOCK_D3DDEVICE9() if (This->bLockDevice) EnterCriticalSection(&This->CriticalSection); #define UNLOCK_D3DDEVICE9() if (This->bLockDevice) LeaveCriticalSection(&This->CriticalSection); @@ -53,8 +54,16 @@ static ULONG WINAPI IDirect3DDevice9Impl_Release(LPDIRECT3DDEVICE9 iface) if (ref == 0) { + DWORD iAdapter; + EnterCriticalSection(&This->CriticalSection); + /* TODO: Free resources here */ + for (iAdapter = 0; iAdapter < This->NumAdaptersInDevice; iAdapter++) + { + DestroyD3D9DeviceData(&This->DeviceData[iAdapter]); + } + LeaveCriticalSection(&This->CriticalSection); AlignedFree(This); } diff --git a/reactos/dll/directx/d3d9/d3d9_private.h b/reactos/dll/directx/d3d9/d3d9_private.h index 44fc02f7df3..cba2c867d70 100644 --- a/reactos/dll/directx/d3d9/d3d9_private.h +++ b/reactos/dll/directx/d3d9/d3d9_private.h @@ -2667,6 +2667,6 @@ typedef struct _DIRECT3D9_INT /* 0x47ac */ DWORD unknown004587; /* 0x47b0 */ DWORD unknown004588; /* 0x47b4 */ UINT SDKVersion; -} DIRECT3D9_INT, *LPDIRECT3D9_INT; +} DIRECT3D9_INT, FAR *LPDIRECT3D9_INT; #endif // _D3D9_PRIVATE_H_ diff --git a/reactos/dll/directx/d3d9/d3d9_swapchain.c b/reactos/dll/directx/d3d9/d3d9_swapchain.c index d91369897bb..d9feed52f07 100644 --- a/reactos/dll/directx/d3d9/d3d9_swapchain.c +++ b/reactos/dll/directx/d3d9/d3d9_swapchain.c @@ -150,6 +150,8 @@ HRESULT Direct3DSwapChain9_Init(Direct3DSwapChain9_INT* pThisSwapChain, D3DPRESE pThisSwapChain->GammaRamp.blue[i] = i; } + pThisSwapChain->PresentParameters = pPresentationParameters[pThisSwapChain->ChainIndex]; + return Direct3DSwapChain9_Reset(pThisSwapChain, pPresentationParameters); } diff --git a/reactos/dll/directx/d3d9/device.c b/reactos/dll/directx/d3d9/device.c index c6ec6b22d47..de043b9a344 100644 --- a/reactos/dll/directx/d3d9/device.c +++ b/reactos/dll/directx/d3d9/device.c @@ -9,6 +9,7 @@ #include "device.h" #include #include "d3d9_helpers.h" +#include "d3d9_create.h" static HRESULT InitD3D9ResourceManager(D3D9ResourceManager* pThisResourceManager, LPDIRECT3DDEVICE9_INT pDirect3DDevice9) { @@ -36,7 +37,6 @@ HRESULT InitD3D9BaseDevice(LPDIRECT3DDEVICE9_INT pThisBaseDevice, LPDIRECT3D9_IN { D3D9ResourceManager* pResourceManager; DWORD i; - D3DDISPLAYMODE DisplayMode; // Insert Reset/Ctor here @@ -59,16 +59,25 @@ HRESULT InitD3D9BaseDevice(LPDIRECT3DDEVICE9_INT pThisBaseDevice, LPDIRECT3D9_IN // TODO: Query driver for correct DX version pThisBaseDevice->dwDXVersion = 9; - DisplayMode = pThisBaseDevice->CurrentDisplayMode[0]; + pThisBaseDevice->CurrentDisplayMode[0].Width = pDirect3D9->DisplayAdapters[0].DriverCaps.dwDisplayWidth; + pThisBaseDevice->CurrentDisplayMode[0].Height = pDirect3D9->DisplayAdapters[0].DriverCaps.dwDisplayHeight; + pThisBaseDevice->CurrentDisplayMode[0].RefreshRate = pDirect3D9->DisplayAdapters[0].DriverCaps.dwRefreshRate; + pThisBaseDevice->CurrentDisplayMode[0].Format = pDirect3D9->DisplayAdapters[0].DriverCaps.DisplayFormat; + for (i = 0; i < NumAdaptersToCreate; i++) { - pThisBaseDevice->CurrentDisplayMode[i] = pThisBaseDevice->CurrentDisplayMode[0]; + if (FALSE == CreateD3D9DeviceData(&pDirect3D9->DisplayAdapters[i], &pThisBaseDevice->DeviceData[i])) + { + DPRINT1("Failed to get device data for adapter: %d", i); + return DDERR_GENERIC; + } + pThisBaseDevice->AdapterIndexInGroup[i] = i; - // TODO: Fill pThisBaseDevice->DeviceData[i] + pThisBaseDevice->CurrentDisplayMode[i] = pThisBaseDevice->CurrentDisplayMode[0]; pThisBaseDevice->pSwapChains[i] = CreateDirect3DSwapChain9(RT_BUILTIN, pThisBaseDevice, i); pThisBaseDevice->pSwapChains2[i] = pThisBaseDevice->pSwapChains[i]; - Direct3DSwapChain9_SetDisplayMode(pThisBaseDevice->pSwapChains[i], &DisplayMode); + Direct3DSwapChain9_SetDisplayMode(pThisBaseDevice->pSwapChains[i], &pThisBaseDevice->CurrentDisplayMode[i]); if (FAILED(Direct3DSwapChain9_Init(pThisBaseDevice->pSwapChains[i], pPresentationParameters))) { From 91c726edc7d0a0e59e50ae9b0c65a33af2d6e381 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Sat, 23 Aug 2008 17:26:26 +0000 Subject: [PATCH 130/324] - Pass the msi package in quotes - Fixes launching msi packages from directories with spaces - See bug 3342 svn path=/trunk/; revision=35569 --- reactos/boot/bootdata/hivecls_arm.inf | 6 +++--- reactos/boot/bootdata/hivecls_i386.inf | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/reactos/boot/bootdata/hivecls_arm.inf b/reactos/boot/bootdata/hivecls_arm.inf index 8167b2d011f..e1ae338347a 100644 --- a/reactos/boot/bootdata/hivecls_arm.inf +++ b/reactos/boot/bootdata/hivecls_arm.inf @@ -211,9 +211,9 @@ HKCR,"xmlfile\shell\open\command","",0x00020000,"%SystemRoot%\system32\notepad.e ; MSI files HKCR,".msi","",0x00000000,"MSI.Package" HKCR,"Msi.Package\DefaultIcon","",0x00000000,"msiexec.exe" -HKCR,"Msi.Package\shell\Open\command","",0x00020000,"%SystemRoot%\system32\msiexec /i %1" -HKCR,"Msi.Package\shell\Repair\command","",0x00020000,"%SystemRoot%\system32\msiexec /f %1" -HKCR,"Msi.Package\shell\Uninstall\command","",0x00020000,"%SystemRoot%\system32\msiexec /x %1" +HKCR,"Msi.Package\shell\Open\command","",0x00020000,"%SystemRoot%\system32\msiexec /i ""%1""" +HKCR,"Msi.Package\shell\Repair\command","",0x00020000,"%SystemRoot%\system32\msiexec /f ""%1""" +HKCR,"Msi.Package\shell\Uninstall\command","",0x00020000,"%SystemRoot%\system32\msiexec /x ""%1""" HKCR,".pif","",0x00000000,"piffile" diff --git a/reactos/boot/bootdata/hivecls_i386.inf b/reactos/boot/bootdata/hivecls_i386.inf index 8167b2d011f..e1ae338347a 100644 --- a/reactos/boot/bootdata/hivecls_i386.inf +++ b/reactos/boot/bootdata/hivecls_i386.inf @@ -211,9 +211,9 @@ HKCR,"xmlfile\shell\open\command","",0x00020000,"%SystemRoot%\system32\notepad.e ; MSI files HKCR,".msi","",0x00000000,"MSI.Package" HKCR,"Msi.Package\DefaultIcon","",0x00000000,"msiexec.exe" -HKCR,"Msi.Package\shell\Open\command","",0x00020000,"%SystemRoot%\system32\msiexec /i %1" -HKCR,"Msi.Package\shell\Repair\command","",0x00020000,"%SystemRoot%\system32\msiexec /f %1" -HKCR,"Msi.Package\shell\Uninstall\command","",0x00020000,"%SystemRoot%\system32\msiexec /x %1" +HKCR,"Msi.Package\shell\Open\command","",0x00020000,"%SystemRoot%\system32\msiexec /i ""%1""" +HKCR,"Msi.Package\shell\Repair\command","",0x00020000,"%SystemRoot%\system32\msiexec /f ""%1""" +HKCR,"Msi.Package\shell\Uninstall\command","",0x00020000,"%SystemRoot%\system32\msiexec /x ""%1""" HKCR,".pif","",0x00000000,"piffile" From c607aa3f2bfeb4170055251af40e849206a6931c Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Sat, 23 Aug 2008 17:32:17 +0000 Subject: [PATCH 131/324] - Check if source and destination is the same. Fixes creating a new directory and using the default name - Prevent a potential buffer overflow in the file properties dialog svn path=/trunk/; revision=35570 --- reactos/dll/win32/shell32/fprop.c | 16 ++++++++++------ reactos/dll/win32/shell32/shfldr_desktop.c | 10 ++++++++++ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/reactos/dll/win32/shell32/fprop.c b/reactos/dll/win32/shell32/fprop.c index 2a72394649f..a037b8ff225 100644 --- a/reactos/dll/win32/shell32/fprop.c +++ b/reactos/dll/win32/shell32/fprop.c @@ -664,7 +664,7 @@ BOOL CALLBACK AddShellPropSheetExCallback(HPROPSHEETPAGE hPage, LPARAM lParam) int EnumPropSheetExt(LPWSTR wFileName, PROPSHEETHEADERW *pinfo, int NumPages, HPSXA * hpsxa, IDataObject *pDataObj) { - WCHAR szName[100]; + WCHAR szName[MAX_PATH] = {0}; WCHAR * pOffset; UINT Length; DWORD dwName; @@ -675,7 +675,7 @@ EnumPropSheetExt(LPWSTR wFileName, PROPSHEETHEADERW *pinfo, int NumPages, HPSXA if (!pOffset) { Length = wcslen(szName); - if (Length >=94) + if (Length + 6 > sizeof(szName)/sizeof(szName[0])) return 0; if (CLSIDFromString(wFileName, &clsid) == NOERROR) @@ -691,7 +691,7 @@ EnumPropSheetExt(LPWSTR wFileName, PROPSHEETHEADERW *pinfo, int NumPages, HPSXA else { Length = wcslen(pOffset); - if (Length >= 100) + if (Length >= sizeof(szName)/sizeof(szName[0])) return 0; wcscpy(szName, pOffset); } @@ -799,7 +799,11 @@ SH_ShowPropertiesDialog(WCHAR * lpf, LPCITEMIDLIST pidlFolder, LPCITEMIDLIST * a hResult = SHCreateDataObject(pidlFolder, 1, apidl, NULL, &IID_IDataObject, (LPVOID*)&pDataObj); if (hResult == S_OK) { - EnumPropSheetExt(wFileName, &pinfo, MAX_PROPERTY_SHEET_PAGE-1, hpsxa, pDataObj); + if (!EnumPropSheetExt(wFileName, &pinfo, MAX_PROPERTY_SHEET_PAGE-1, hpsxa, pDataObj)) + { + hpsxa[0] = NULL; + hpsxa[1] = NULL; + } } if ( GetFileVersionInfoSizeW(lpf, &dwHandle)) @@ -813,8 +817,8 @@ SH_ShowPropertiesDialog(WCHAR * lpf, LPCITEMIDLIST pidlFolder, LPCITEMIDLIST * a if (hResult == S_OK) { - SHDestroyPropSheetExtArray(hpsxa[0]); - SHDestroyPropSheetExtArray(hpsxa[1]); + SHDestroyPropSheetExtArray(hpsxa[0]); + SHDestroyPropSheetExtArray(hpsxa[1]); IDataObject_Release(pDataObj); } diff --git a/reactos/dll/win32/shell32/shfldr_desktop.c b/reactos/dll/win32/shell32/shfldr_desktop.c index bbe8e6844da..a14cb443f9f 100644 --- a/reactos/dll/win32/shell32/shfldr_desktop.c +++ b/reactos/dll/win32/shell32/shfldr_desktop.c @@ -864,6 +864,16 @@ static HRESULT WINAPI ISF_Desktop_fnSetNameOf (IShellFolder2 * iface, } } + if (!memcmp(szSrc, szDest, (wcslen(szDest)+1) * sizeof(WCHAR))) + { + /* src and destination is the same */ + hr = S_OK; + if (pPidlOut) + hr = _ILCreateFromPathW(szDest, pPidlOut); + + return hr; + } + TRACE ("src=%s dest=%s\n", debugstr_w(szSrc), debugstr_w(szDest)); if (MoveFileW (szSrc, szDest)) { From 8a1dfee7cecd0beb9dcdbdb2c74779a3ece74c61 Mon Sep 17 00:00:00 2001 From: Gregor Brunmar Date: Sat, 23 Aug 2008 17:52:35 +0000 Subject: [PATCH 132/324] This seems to be more correct svn path=/trunk/; revision=35571 --- reactos/dll/directx/d3d9/device.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/reactos/dll/directx/d3d9/device.c b/reactos/dll/directx/d3d9/device.c index de043b9a344..fa893a45a12 100644 --- a/reactos/dll/directx/d3d9/device.c +++ b/reactos/dll/directx/d3d9/device.c @@ -59,11 +59,6 @@ HRESULT InitD3D9BaseDevice(LPDIRECT3DDEVICE9_INT pThisBaseDevice, LPDIRECT3D9_IN // TODO: Query driver for correct DX version pThisBaseDevice->dwDXVersion = 9; - pThisBaseDevice->CurrentDisplayMode[0].Width = pDirect3D9->DisplayAdapters[0].DriverCaps.dwDisplayWidth; - pThisBaseDevice->CurrentDisplayMode[0].Height = pDirect3D9->DisplayAdapters[0].DriverCaps.dwDisplayHeight; - pThisBaseDevice->CurrentDisplayMode[0].RefreshRate = pDirect3D9->DisplayAdapters[0].DriverCaps.dwRefreshRate; - pThisBaseDevice->CurrentDisplayMode[0].Format = pDirect3D9->DisplayAdapters[0].DriverCaps.DisplayFormat; - for (i = 0; i < NumAdaptersToCreate; i++) { if (FALSE == CreateD3D9DeviceData(&pDirect3D9->DisplayAdapters[i], &pThisBaseDevice->DeviceData[i])) @@ -73,7 +68,10 @@ HRESULT InitD3D9BaseDevice(LPDIRECT3DDEVICE9_INT pThisBaseDevice, LPDIRECT3D9_IN } pThisBaseDevice->AdapterIndexInGroup[i] = i; - pThisBaseDevice->CurrentDisplayMode[i] = pThisBaseDevice->CurrentDisplayMode[0]; + pThisBaseDevice->CurrentDisplayMode[i].Width = pDirect3D9->DisplayAdapters[i].DriverCaps.dwDisplayWidth; + pThisBaseDevice->CurrentDisplayMode[i].Height = pDirect3D9->DisplayAdapters[i].DriverCaps.dwDisplayHeight; + pThisBaseDevice->CurrentDisplayMode[i].RefreshRate = pDirect3D9->DisplayAdapters[i].DriverCaps.dwRefreshRate; + pThisBaseDevice->CurrentDisplayMode[i].Format = pDirect3D9->DisplayAdapters[i].DriverCaps.RawDisplayFormat; pThisBaseDevice->pSwapChains[i] = CreateDirect3DSwapChain9(RT_BUILTIN, pThisBaseDevice, i); pThisBaseDevice->pSwapChains2[i] = pThisBaseDevice->pSwapChains[i]; From 132a5a7354488cef35b23b91e3b1fe92df387ae6 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Sat, 23 Aug 2008 18:10:04 +0000 Subject: [PATCH 133/324] - Refresh treeview when a folder item is deleted svn path=/trunk/; revision=35572 --- reactos/dll/win32/shell32/shv_def_cmenu.c | 1 - 1 file changed, 1 deletion(-) diff --git a/reactos/dll/win32/shell32/shv_def_cmenu.c b/reactos/dll/win32/shell32/shv_def_cmenu.c index ca202e9c562..3e8c511f8bf 100644 --- a/reactos/dll/win32/shell32/shv_def_cmenu.c +++ b/reactos/dll/win32/shell32/shv_def_cmenu.c @@ -1313,7 +1313,6 @@ DoDelete( { (void)TreeView_DeleteItem(hwnd, hItem); } - return S_OK; } } NotifyShellViewWindow(lpcmi, TRUE); From 5194ea09e313e4193806fa9dd2fbc4348a72e810 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 23 Aug 2008 20:21:15 +0000 Subject: [PATCH 134/324] - Release the cancel spin lock before returning - Revert some unintentional changes made in r35485 svn path=/trunk/; revision=35575 --- reactos/drivers/network/tcpip/tcpip/dispatch.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/reactos/drivers/network/tcpip/tcpip/dispatch.c b/reactos/drivers/network/tcpip/tcpip/dispatch.c index d48653d1c40..c6f552bdfb7 100644 --- a/reactos/drivers/network/tcpip/tcpip/dispatch.c +++ b/reactos/drivers/network/tcpip/tcpip/dispatch.c @@ -179,17 +179,21 @@ VOID NTAPI DispCancelRequest( if( !ChewCreate( &WorkItem, sizeof(DISCONNECT_TYPE), DispDoDisconnect, &DisType ) ) ASSERT(0); + + IoReleaseCancelSpinLock(Irp->CancelIrql); return; case TDI_SEND_DATAGRAM: if (FileObject->FsContext2 != (PVOID)TDI_TRANSPORT_ADDRESS_FILE) { TI_DbgPrint(MIN_TRACE, ("TDI_SEND_DATAGRAM, but no address file.\n")); + break; } break; case TDI_RECEIVE_DATAGRAM: if (FileObject->FsContext2 != (PVOID)TDI_TRANSPORT_ADDRESS_FILE) { TI_DbgPrint(MIN_TRACE, ("TDI_RECEIVE_DATAGRAM, but no address file.\n")); + break; } DGRemoveIRP(TranContext->Handle.AddressHandle, Irp); From 6d866748fb653efc57a7d5b2726d1b862bd08d9c Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 23 Aug 2008 20:27:26 +0000 Subject: [PATCH 135/324] - Remove a hack not needed because of r35575 svn path=/trunk/; revision=35576 --- reactos/drivers/network/afd/afd/main.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/reactos/drivers/network/afd/afd/main.c b/reactos/drivers/network/afd/afd/main.c index 7938a071fcb..6fd2a83a0c6 100644 --- a/reactos/drivers/network/afd/afd/main.c +++ b/reactos/drivers/network/afd/afd/main.c @@ -155,7 +155,6 @@ AfdCreateSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp, VOID DestroySocket( PAFD_FCB FCB ) { UINT i; BOOLEAN ReturnEarly = FALSE; - KIRQL Irql = KeGetCurrentIrql(); PAFD_IN_FLIGHT_REQUEST InFlightRequest[IN_FLIGHT_REQUESTS]; AFD_DbgPrint(MIN_TRACE,("Called (%x)\n", FCB)); @@ -193,7 +192,6 @@ VOID DestroySocket( PAFD_FCB FCB ) { i, InFlightRequest[i]->InFlightRequest)); IoCancelIrp(InFlightRequest[i]->InFlightRequest); InFlightRequest[i]->InFlightRequest = NULL; - IoReleaseCancelSpinLock(Irql); } } From 0819ff13a1960ecd0c079cc9d1f32a1b5fba55a8 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 23 Aug 2008 22:42:44 +0000 Subject: [PATCH 136/324] - Enable the failure debug prints in MsafdReturnWithErrno - They shouldn't spam the debug log and they're a great way to tell if something is going wrong in the network stack svn path=/trunk/; revision=35580 --- reactos/dll/win32/msafd/misc/dllmain.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/reactos/dll/win32/msafd/misc/dllmain.c b/reactos/dll/win32/msafd/misc/dllmain.c index 4a15e47fcb8..48d6e314085 100644 --- a/reactos/dll/win32/msafd/misc/dllmain.c +++ b/reactos/dll/win32/msafd/misc/dllmain.c @@ -285,12 +285,12 @@ DWORD MsafdReturnWithErrno( NTSTATUS Status, LPINT Errno, DWORD Received, if( ReturnedBytes ) *ReturnedBytes = Received; break; case STATUS_END_OF_FILE: *Errno = WSAESHUTDOWN; break; case STATUS_PENDING: *Errno = WSA_IO_PENDING; break; - case STATUS_BUFFER_OVERFLOW: AFD_DbgPrint(MID_TRACE,("MSAFD: STATUS_BUFFER_TOO_SMALL/STATUS_BUFFER_OVERFLOW\n")); *Errno = WSAEMSGSIZE; break; + case STATUS_BUFFER_OVERFLOW: DbgPrint("MSAFD: STATUS_BUFFER_TOO_SMALL/STATUS_BUFFER_OVERFLOW\n"); *Errno = WSAEMSGSIZE; break; case STATUS_NO_MEMORY: /* Fall through to STATUS_INSUFFICIENT_RESOURCES */ - case STATUS_INSUFFICIENT_RESOURCES: AFD_DbgPrint(MID_TRACE,("MSAFD: STATUS_NO_MEMORY/STATUS_INSUFFICIENT_RESOURCES\n")); *Errno = WSA_NOT_ENOUGH_MEMORY; break; - case STATUS_INVALID_CONNECTION: AFD_DbgPrint(MID_TRACE,("MSAFD: STATUS_INVALID_CONNECTION\n")); *Errno = WSAEAFNOSUPPORT; break; - case STATUS_REMOTE_NOT_LISTENING: AFD_DbgPrint(MID_TRACE, ("MSAFD: STATUS_REMOTE_NOT_LISTENING\n")); *Errno = WSAECONNRESET; break; - case STATUS_FILE_CLOSED: AFD_DbgPrint(MID_TRACE, ("MSAFD: STATUS_FILE_CLOSED\n")); *Errno = WSAENOTSOCK; break; + case STATUS_INSUFFICIENT_RESOURCES: DbgPrint("MSAFD: STATUS_NO_MEMORY/STATUS_INSUFFICIENT_RESOURCES\n"); *Errno = WSA_NOT_ENOUGH_MEMORY; break; + case STATUS_INVALID_CONNECTION: DbgPrint("MSAFD: STATUS_INVALID_CONNECTION\n"); *Errno = WSAEAFNOSUPPORT; break; + case STATUS_REMOTE_NOT_LISTENING: DbgPrint("MSAFD: STATUS_REMOTE_NOT_LISTENING\n"); *Errno = WSAECONNRESET; break; + case STATUS_FILE_CLOSED: DbgPrint("MSAFD: STATUS_FILE_CLOSED\n"); *Errno = WSAENOTSOCK; break; case STATUS_INVALID_PARAMETER: DbgPrint("MSAFD: STATUS_INVALID_PARAMETER\n"); *Errno = WSAEINVAL; break; default: DbgPrint("MSAFD: Error %x is unknown\n", Status); From 978a879fe90c76fa1ef27389eb76275a13040649 Mon Sep 17 00:00:00 2001 From: Art Yerkes Date: Sat, 23 Aug 2008 23:04:15 +0000 Subject: [PATCH 137/324] Catch failure to release the cancel spinlock. Would've spotted my error in tcpip.sys. svn path=/trunk/; revision=35581 --- reactos/ntoskrnl/io/iomgr/irp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reactos/ntoskrnl/io/iomgr/irp.c b/reactos/ntoskrnl/io/iomgr/irp.c index 0f7b11e19f1..d9e6b9ebe6a 100644 --- a/reactos/ntoskrnl/io/iomgr/irp.c +++ b/reactos/ntoskrnl/io/iomgr/irp.c @@ -970,12 +970,14 @@ NTAPI IoCancelIrp(IN PIRP Irp) { KIRQL OldIrql; + KIRQL IrqlAtEntry; PDRIVER_CANCEL CancelRoutine; IOTRACE(IO_IRP_DEBUG, "%s - Canceling IRP %p\n", __FUNCTION__, Irp); ASSERT(Irp->Type == IO_TYPE_IRP); + IrqlAtEntry = KeGetCurrentIrql(); /* Acquire the cancel lock and cancel the IRP */ IoAcquireCancelSpinLock(&OldIrql); @@ -999,6 +1001,7 @@ IoCancelIrp(IN PIRP Irp) /* Set the cancel IRQL And call the routine */ Irp->CancelIrql = OldIrql; CancelRoutine(IoGetCurrentIrpStackLocation(Irp)->DeviceObject, Irp); + ASSERT(IrqlAtEntry == KeGetCurrentIrql()); return TRUE; } From dbc052ab8419fa402e46393b881e1838b147d075 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 24 Aug 2008 01:53:58 +0000 Subject: [PATCH 138/324] - Merge aicom-network-fixes up to r35583 svn path=/trunk/; revision=35584 --- reactos/drivers/network/afd/afd/bind.c | 2 ++ reactos/drivers/network/afd/afd/connect.c | 30 ++++++++++---------- reactos/drivers/network/afd/afd/listen.c | 9 +++++- reactos/drivers/network/afd/afd/lock.c | 34 ++++++++++++++++------- 4 files changed, 50 insertions(+), 25 deletions(-) diff --git a/reactos/drivers/network/afd/afd/bind.c b/reactos/drivers/network/afd/afd/bind.c index 840da0b7867..74967aa8bc0 100644 --- a/reactos/drivers/network/afd/afd/bind.c +++ b/reactos/drivers/network/afd/afd/bind.c @@ -70,6 +70,8 @@ AfdBindSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp, TdiBuildConnectionInfo( &FCB->AddressFrom, FCB->LocalAddress ); + if( !FCB->AddressFrom ) return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, 0, NULL ); + AFD_DbgPrint(MID_TRACE,("Calling TdiReceiveDatagram\n")); Status = TdiReceiveDatagram diff --git a/reactos/drivers/network/afd/afd/connect.c b/reactos/drivers/network/afd/afd/connect.c index ff55ef8ea2b..905b9ccd997 100644 --- a/reactos/drivers/network/afd/afd/connect.c +++ b/reactos/drivers/network/afd/afd/connect.c @@ -33,7 +33,6 @@ NTSTATUS WarmSocketForConnection( PAFD_FCB FCB ) { } NTSTATUS MakeSocketIntoConnection( PAFD_FCB FCB ) { - NTSTATUS Status; /* Allocate the receive area and start receiving */ FCB->Recv.Window = @@ -51,16 +50,14 @@ NTSTATUS MakeSocketIntoConnection( PAFD_FCB FCB ) { FCB->State = SOCKET_STATE_CONNECTED; - Status = TdiReceive( &FCB->ReceiveIrp.InFlightRequest, - FCB->Connection.Object, - TDI_RECEIVE_NORMAL, - FCB->Recv.Window, - FCB->Recv.Size, - &FCB->ReceiveIrp.Iosb, - ReceiveComplete, - FCB ); - - return Status; + return TdiReceive( &FCB->ReceiveIrp.InFlightRequest, + FCB->Connection.Object, + TDI_RECEIVE_NORMAL, + FCB->Recv.Window, + FCB->Recv.Size, + &FCB->ReceiveIrp.Iosb, + ReceiveComplete, + FCB ); } static NTSTATUS NTAPI StreamSocketConnectComplete @@ -84,16 +81,16 @@ static NTSTATUS NTAPI StreamSocketConnectComplete if( NT_SUCCESS(Irp->IoStatus.Status) ) { FCB->PollState |= AFD_EVENT_CONNECT | AFD_EVENT_SEND; - FCB->State = SOCKET_STATE_CONNECTED; AFD_DbgPrint(MID_TRACE,("Going to connected state %d\n", FCB->State)); - PollReeval( FCB->DeviceExt, FCB->FileObject ); + FCB->State = SOCKET_STATE_CONNECTED; } else { FCB->PollState |= AFD_EVENT_CONNECT_FAIL | AFD_EVENT_RECEIVE; AFD_DbgPrint(MID_TRACE,("Going to bound state\n")); FCB->State = SOCKET_STATE_BOUND; - PollReeval( FCB->DeviceExt, FCB->FileObject ); } + PollReeval( FCB->DeviceExt, FCB->FileObject ); + /* Succeed pending irps on the FUNCTION_CONNECT list */ while( !IsListEmpty( &FCB->PendingIrpList[FUNCTION_CONNECT] ) ) { NextIrpEntry = RemoveHeadList(&FCB->PendingIrpList[FUNCTION_CONNECT]); @@ -199,6 +196,11 @@ AfdStreamSocketConnect(PDEVICE_OBJECT DeviceObject, PIRP Irp, FCB->RemoteAddress = TaCopyTransportAddress( &ConnectReq->RemoteAddress ); + if( !FCB->RemoteAddress ) { + Status = STATUS_NO_MEMORY; + break; + } + if( FCB->Flags & AFD_ENDPOINT_CONNECTIONLESS ) { Status = STATUS_SUCCESS; diff --git a/reactos/drivers/network/afd/afd/listen.c b/reactos/drivers/network/afd/afd/listen.c index 7dc15cea12e..0d7094cb0fa 100644 --- a/reactos/drivers/network/afd/afd/listen.c +++ b/reactos/drivers/network/afd/afd/listen.c @@ -61,6 +61,13 @@ static VOID SatisfyPreAccept( PIRP Irp, PAFD_TDI_OBJECT_QELT Qelt ) { IPAddr = (PTA_IP_ADDRESS)&ListenReceive->Address; + if( !IPAddr ) { + if( Irp->MdlAddress ) UnlockRequest( Irp, IoGetCurrentIrpStackLocation( Irp ) ); + Irp->IoStatus.Status = STATUS_NO_MEMORY; + Irp->IoStatus.Information = 0; + IoCompleteRequest( Irp, IO_NETWORK_INCREMENT ); + } + AFD_DbgPrint(MID_TRACE,("IPAddr->TAAddressCount %d\n", IPAddr->TAAddressCount)); AFD_DbgPrint(MID_TRACE,("IPAddr->Address[0].AddressType %d\n", @@ -172,7 +179,7 @@ NTSTATUS AfdListenSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp, 0, NULL ); if( FCB->State != SOCKET_STATE_BOUND ) { - Status = STATUS_UNSUCCESSFUL; + Status = STATUS_INVALID_PARAMETER; AFD_DbgPrint(MID_TRACE,("Could not listen an unbound socket\n")); return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL ); } diff --git a/reactos/drivers/network/afd/afd/lock.c b/reactos/drivers/network/afd/afd/lock.c index 764c6e64f93..d75156cc4dc 100644 --- a/reactos/drivers/network/afd/afd/lock.c +++ b/reactos/drivers/network/afd/afd/lock.c @@ -130,9 +130,13 @@ PAFD_WSABUF LockBuffers( PAFD_WSABUF Buf, UINT Count, if( LockFailed ) { IoFreeMdl( MapBuf[i].Mdl ); MapBuf[i].Mdl = NULL; - LockFailed = FALSE; + ExFreePool( NewBuf ); + return NULL; } - } + } else { + ExFreePool( NewBuf ); + return NULL; + } } } @@ -164,7 +168,7 @@ VOID UnlockBuffers( PAFD_WSABUF Buf, UINT Count, BOOL Address ) { * pointers. This will allow the system to do proper alerting */ PAFD_HANDLE LockHandles( PAFD_HANDLE HandleArray, UINT HandleCount ) { UINT i; - NTSTATUS Status; + NTSTATUS Status = STATUS_SUCCESS; PAFD_HANDLE FileObjects = ExAllocatePool ( NonPagedPool, HandleCount * sizeof(AFD_HANDLE) ); @@ -173,13 +177,21 @@ PAFD_HANDLE LockHandles( PAFD_HANDLE HandleArray, UINT HandleCount ) { HandleArray[i].Status = 0; HandleArray[i].Events = HandleArray[i].Events; FileObjects[i].Handle = 0; - Status = ObReferenceObjectByHandle - ( (PVOID)HandleArray[i].Handle, - FILE_ALL_ACCESS, - NULL, - KernelMode, - (PVOID*)&FileObjects[i].Handle, - NULL ); + if( !HandleArray[i].Handle ) continue; + if( NT_SUCCESS(Status) ) { + Status = ObReferenceObjectByHandle + ( (PVOID)HandleArray[i].Handle, + FILE_ALL_ACCESS, + NULL, + KernelMode, + (PVOID*)&FileObjects[i].Handle, + NULL ); + } + } + + if( !NT_SUCCESS(Status) ) { + UnlockHandles( FileObjects, HandleCount ); + return NULL; } return FileObjects; @@ -312,12 +324,14 @@ NTSTATUS LeaveIrpUntilLater( PAFD_FCB FCB, PIRP Irp, UINT Function ) { } VOID SocketCalloutEnter( PAFD_FCB FCB ) { + ASSERT(!FCB->Critical); ASSERT(FCB->Locked); FCB->Critical = TRUE; SocketStateUnlock( FCB ); } VOID SocketCalloutLeave( PAFD_FCB FCB ) { + ASSERT(FCB->Critical); FCB->Critical = FALSE; SocketAcquireStateLock( FCB ); } From 86ab49ef005017eb90a78d9d2ed64f6291704f92 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 24 Aug 2008 01:56:56 +0000 Subject: [PATCH 139/324] - Add myself to credits :) svn path=/trunk/; revision=35585 --- reactos/CREDITS | 1 + 1 file changed, 1 insertion(+) diff --git a/reactos/CREDITS b/reactos/CREDITS index a99f87b813d..f4096a4ca72 100644 --- a/reactos/CREDITS +++ b/reactos/CREDITS @@ -9,6 +9,7 @@ Art Yerkes Ariadne Brandon Turner Brian Palmer +Cameron M. Gutman Casper S. Hornstrup Christoph von Wittich Daniel Reimer From 5ed0e9015cb1d3006f520a8a24717e5b46f31266 Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Sun, 24 Aug 2008 06:58:19 +0000 Subject: [PATCH 140/324] update XMLStorage: correctly handle dots and colons in attribute names svn path=/trunk/; revision=35590 --- reactos/base/shell/explorer/utility/xmlstorage.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reactos/base/shell/explorer/utility/xmlstorage.cpp b/reactos/base/shell/explorer/utility/xmlstorage.cpp index 3dba1ba0fbf..b1a18ad6c63 100644 --- a/reactos/base/shell/explorer/utility/xmlstorage.cpp +++ b/reactos/base/shell/explorer/utility/xmlstorage.cpp @@ -666,9 +666,10 @@ const char* get_xmlsym_end_utf8(const char* p) for(; *p; ++p) { char c = *p; + // NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender if (c == '\xC3') // UTF-8 escape character ++p; //TODO only continue on umlaut characters - else if (!isalnum(c) && c!='_' && c!='-') + else if (!isalnum(c) && c!='.' && c!='-' && c!='_' && c!=':') break; } From 72d7445528df6dba764a84f8e84e4aa40c5c448a Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Sun, 24 Aug 2008 08:37:25 +0000 Subject: [PATCH 141/324] - Use the name of the cpl as the mutex name - The mutex name is a unicode buffer, pass it to CreateMutexW function - fixes bug 3489 svn path=/trunk/; revision=35591 --- reactos/dll/win32/shell32/control.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/reactos/dll/win32/shell32/control.c b/reactos/dll/win32/shell32/control.c index cd3241b7d7b..34bae718d72 100644 --- a/reactos/dll/win32/shell32/control.c +++ b/reactos/dll/win32/shell32/control.c @@ -348,21 +348,34 @@ static void Control_DoLaunch(CPanel* panel, HWND hWnd, LPCWSTR wszCmd) LPWSTR beg = NULL; LPWSTR end; WCHAR ch; - LPWSTR ptr; + LPWSTR ptr, ptr2; + WCHAR szName[MAX_PATH]; unsigned sp = 0; LPWSTR extraPmts = NULL; int quoted = 0; BOOL spSet = FALSE; - HANDLE hMutex; + HANDLE hMutex; + UINT Length; + + ptr = wcsrchr(wszCmd, L'\\'); + ptr2 = wcsrchr(wszCmd, L','); + if (!ptr || !ptr2) + return; + + Length = (ptr2 - ptr - 1); + if (Length >= MAX_PATH) + return; + + memcpy(szName, ptr + 1, Length * sizeof(WCHAR)); + szName[Length] = L'\0'; + hMutex = CreateMutexW(NULL, FALSE, szName); - hMutex = CreateMutex(NULL, FALSE, (LPCTSTR) wszCmd); if ((!hMutex) || (GetLastError() == ERROR_ALREADY_EXISTS)) return; buffer = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(wszCmd) + 1) * sizeof(*wszCmd)); if (!buffer) return; end = lstrcpyW(buffer, wszCmd); - for (;;) { ch = *end; if (ch == '"') quoted = !quoted; From 57fad8bdc49e7031a0238eebbad7d851b30a393c Mon Sep 17 00:00:00 2001 From: Gregor Brunmar Date: Sun, 24 Aug 2008 09:34:16 +0000 Subject: [PATCH 142/324] D3D9: * Fixed incomplete HAL device * Fixed IDirect3DSwapChain9 and D3D9BaseObject ref counting svn path=/trunk/; revision=35592 --- reactos/dll/directx/d3d9/d3d9_baseobject.c | 36 +++++++++++++++++----- reactos/dll/directx/d3d9/d3d9_baseobject.h | 6 ++-- reactos/dll/directx/d3d9/d3d9_swapchain.c | 8 ++--- reactos/dll/directx/d3d9/device.c | 2 ++ 4 files changed, 36 insertions(+), 16 deletions(-) diff --git a/reactos/dll/directx/d3d9/d3d9_baseobject.c b/reactos/dll/directx/d3d9/d3d9_baseobject.c index 04a70a4779b..beef0990a5d 100644 --- a/reactos/dll/directx/d3d9/d3d9_baseobject.c +++ b/reactos/dll/directx/d3d9/d3d9_baseobject.c @@ -9,9 +9,14 @@ #include "d3d9_device.h" #include +#include "d3d9_helpers.h" -VOID D3D9BaseObject_Destroy() +VOID D3D9BaseObject_Destroy(D3D9BaseObject* pBaseObject, BOOL bFreeThis) { + if (bFreeThis) + { + AlignedFree((LPVOID*) pBaseObject); + } } ID3D9BaseObjectVtbl D3D9BaseObject_Vtbl = @@ -22,7 +27,6 @@ ID3D9BaseObjectVtbl D3D9BaseObject_Vtbl = VOID InitD3D9BaseObject(D3D9BaseObject* pBaseObject, enum REF_TYPE RefType, struct _Direct3DDevice9_INT* pBaseDevice) { - // TODO: Add dtor to vtbl pBaseObject->lpVtbl = &D3D9BaseObject_Vtbl; pBaseObject->RefType = RefType; pBaseObject->pBaseDevice = pBaseDevice; @@ -30,14 +34,30 @@ VOID InitD3D9BaseObject(D3D9BaseObject* pBaseObject, enum REF_TYPE RefType, stru ULONG D3D9BaseObject_AddRef(D3D9BaseObject* pBaseObject) { - // TODO: Implement ref counting - UNIMPLEMENTED - return 1; + if (pBaseObject->pBaseDevice) + { + pBaseObject->pBaseDevice->lpVtbl->AddRef((IDirect3DDevice9*)&pBaseObject->pBaseDevice->lpVtbl); + } + + return InterlockedIncrement(&pBaseObject->lRefCnt); } ULONG D3D9BaseObject_Release(D3D9BaseObject* pBaseObject) { - // TODO: Implement ref counting - UNIMPLEMENTED - return 0; + ULONG Ref = 0; + + if (pBaseObject) + { + Ref = InterlockedDecrement(&pBaseObject->lRefCnt); + + if (Ref == 0) + { + if (pBaseObject->pBaseDevice) + { + pBaseObject->pBaseDevice->lpVtbl->Release((IDirect3DDevice9*)&pBaseObject->pBaseDevice->lpVtbl); + } + } + } + + return Ref; } diff --git a/reactos/dll/directx/d3d9/d3d9_baseobject.h b/reactos/dll/directx/d3d9/d3d9_baseobject.h index e61282c1c16..1390b8d2c7a 100644 --- a/reactos/dll/directx/d3d9/d3d9_baseobject.h +++ b/reactos/dll/directx/d3d9/d3d9_baseobject.h @@ -19,14 +19,14 @@ enum REF_TYPE typedef struct _D3D9BaseObjectVtbl { - VOID (*Destroy)(); + VOID (*Destroy)(struct _D3D9BaseObject* pBaseObject, BOOL bFreeThis); } ID3D9BaseObjectVtbl; typedef struct _D3D9BaseObject { /* 0x0000 */ ID3D9BaseObjectVtbl* lpVtbl; -/* 0x0004 */ DWORD dwUnknown0004; -/* 0x0008 */ DWORD dwUnknown0008; +/* 0x0004 */ LONG lRefCnt; +/* 0x0008 */ DWORD dwNumUsed; /* 0x000c */ struct _Direct3DDevice9_INT* pBaseDevice; /* 0x0010 */ DWORD dwUnknown0010; // Index? Unique id? /* 0x0014 */ HANDLE hKernelHandle; diff --git a/reactos/dll/directx/d3d9/d3d9_swapchain.c b/reactos/dll/directx/d3d9/d3d9_swapchain.c index d9feed52f07..2c9ede6daef 100644 --- a/reactos/dll/directx/d3d9/d3d9_swapchain.c +++ b/reactos/dll/directx/d3d9/d3d9_swapchain.c @@ -41,15 +41,13 @@ static HRESULT WINAPI Direct3DSwapChain9_QueryInterface(LPDIRECT3DSWAPCHAIN9 ifa static ULONG WINAPI Direct3DSwapChain9_AddRef(LPDIRECT3DSWAPCHAIN9 iface) { LPDIRECT3DSWAPCHAIN9_INT This = IDirect3DSwapChain9ToImpl(iface); - D3D9BaseObject* BaseObject = (D3D9BaseObject*)((ULONG_PTR)This - FIELD_OFFSET(Direct3DSwapChain9_INT, lpVtbl) - FIELD_OFFSET(Direct3DSwapChain9_INT, BaseObject)); - return D3D9BaseObject_AddRef(BaseObject); + return D3D9BaseObject_AddRef((D3D9BaseObject*) &This->BaseObject.lpVtbl); } static ULONG WINAPI Direct3DSwapChain9_Release(LPDIRECT3DSWAPCHAIN9 iface) { LPDIRECT3DSWAPCHAIN9_INT This = IDirect3DSwapChain9ToImpl(iface); - D3D9BaseObject* BaseObject = (D3D9BaseObject*)((ULONG_PTR)This - FIELD_OFFSET(Direct3DSwapChain9_INT, lpVtbl) - FIELD_OFFSET(Direct3DSwapChain9_INT, BaseObject)); - return D3D9BaseObject_Release(BaseObject); + return D3D9BaseObject_Release((D3D9BaseObject*) &This->BaseObject.lpVtbl); } /* IDirect3DSwapChain9 interface */ @@ -121,7 +119,7 @@ Direct3DSwapChain9_INT* CreateDirect3DSwapChain9(enum REF_TYPE RefType, struct _ return NULL; } - InitD3D9BaseObject(&pThisSwapChain->BaseObject, RefType, pBaseDevice); + InitD3D9BaseObject((D3D9BaseObject*) &pThisSwapChain->BaseObject.lpVtbl, RefType, pBaseDevice); pThisSwapChain->lpVtbl = &Direct3DSwapChain9_Vtbl; diff --git a/reactos/dll/directx/d3d9/device.c b/reactos/dll/directx/d3d9/device.c index fa893a45a12..8f9c7514eff 100644 --- a/reactos/dll/directx/d3d9/device.c +++ b/reactos/dll/directx/d3d9/device.c @@ -49,6 +49,8 @@ HRESULT InitD3D9BaseDevice(LPDIRECT3DDEVICE9_INT pThisBaseDevice, LPDIRECT3D9_IN pThisBaseDevice->pResourceManager = pResourceManager; + pThisBaseDevice->lpVtbl = &Direct3DDevice9_Vtbl; + pThisBaseDevice->lRefCnt = 1; pThisBaseDevice->pDirect3D9 = pDirect3D9; pThisBaseDevice->DeviceType = DeviceType; pThisBaseDevice->hWnd = hFocusWindow; From f3890a8a5cd88e247cca9778737e1ef1090f9c98 Mon Sep 17 00:00:00 2001 From: Gregor Brunmar Date: Sun, 24 Aug 2008 10:15:44 +0000 Subject: [PATCH 143/324] D3D9: * Replace D3D9BaseObject's dependency on Direct3DDevice9 * More HAL device init stuff svn path=/trunk/; revision=35593 --- reactos/dll/directx/d3d9/d3d9_baseobject.c | 12 ++++++------ reactos/dll/directx/d3d9/d3d9_baseobject.h | 4 ++-- reactos/dll/directx/d3d9/d3d9_swapchain.c | 3 ++- reactos/dll/directx/d3d9/device.c | 4 ++++ 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/reactos/dll/directx/d3d9/d3d9_baseobject.c b/reactos/dll/directx/d3d9/d3d9_baseobject.c index beef0990a5d..3064b561d6b 100644 --- a/reactos/dll/directx/d3d9/d3d9_baseobject.c +++ b/reactos/dll/directx/d3d9/d3d9_baseobject.c @@ -25,18 +25,18 @@ ID3D9BaseObjectVtbl D3D9BaseObject_Vtbl = D3D9BaseObject_Destroy }; -VOID InitD3D9BaseObject(D3D9BaseObject* pBaseObject, enum REF_TYPE RefType, struct _Direct3DDevice9_INT* pBaseDevice) +VOID InitD3D9BaseObject(D3D9BaseObject* pBaseObject, enum REF_TYPE RefType, IUnknown* pUnknown) { pBaseObject->lpVtbl = &D3D9BaseObject_Vtbl; pBaseObject->RefType = RefType; - pBaseObject->pBaseDevice = pBaseDevice; + pBaseObject->pUnknown = pUnknown; } ULONG D3D9BaseObject_AddRef(D3D9BaseObject* pBaseObject) { - if (pBaseObject->pBaseDevice) + if (pBaseObject->pUnknown) { - pBaseObject->pBaseDevice->lpVtbl->AddRef((IDirect3DDevice9*)&pBaseObject->pBaseDevice->lpVtbl); + pBaseObject->pUnknown->lpVtbl->AddRef((IUnknown*) &pBaseObject->pUnknown->lpVtbl); } return InterlockedIncrement(&pBaseObject->lRefCnt); @@ -52,9 +52,9 @@ ULONG D3D9BaseObject_Release(D3D9BaseObject* pBaseObject) if (Ref == 0) { - if (pBaseObject->pBaseDevice) + if (pBaseObject->pUnknown) { - pBaseObject->pBaseDevice->lpVtbl->Release((IDirect3DDevice9*)&pBaseObject->pBaseDevice->lpVtbl); + pBaseObject->pUnknown->lpVtbl->Release((IUnknown*) &pBaseObject->pUnknown->lpVtbl); } } } diff --git a/reactos/dll/directx/d3d9/d3d9_baseobject.h b/reactos/dll/directx/d3d9/d3d9_baseobject.h index 1390b8d2c7a..3b87b44b538 100644 --- a/reactos/dll/directx/d3d9/d3d9_baseobject.h +++ b/reactos/dll/directx/d3d9/d3d9_baseobject.h @@ -27,14 +27,14 @@ typedef struct _D3D9BaseObject /* 0x0000 */ ID3D9BaseObjectVtbl* lpVtbl; /* 0x0004 */ LONG lRefCnt; /* 0x0008 */ DWORD dwNumUsed; -/* 0x000c */ struct _Direct3DDevice9_INT* pBaseDevice; +/* 0x000c */ IUnknown* pUnknown; /* 0x0010 */ DWORD dwUnknown0010; // Index? Unique id? /* 0x0014 */ HANDLE hKernelHandle; /* 0x0018 */ LPDWORD dwUnknown0018; /* 0x001c */ enum REF_TYPE RefType; } D3D9BaseObject; -VOID InitD3D9BaseObject(D3D9BaseObject* pBaseObject, enum REF_TYPE RefType, struct _Direct3DDevice9_INT* pBaseDevice); +VOID InitD3D9BaseObject(D3D9BaseObject* pBaseObject, enum REF_TYPE RefType, IUnknown* pUnknown); ULONG D3D9BaseObject_AddRef(D3D9BaseObject* pBaseObject); ULONG D3D9BaseObject_Release(D3D9BaseObject* pBaseObject); diff --git a/reactos/dll/directx/d3d9/d3d9_swapchain.c b/reactos/dll/directx/d3d9/d3d9_swapchain.c index 2c9ede6daef..363485a43b1 100644 --- a/reactos/dll/directx/d3d9/d3d9_swapchain.c +++ b/reactos/dll/directx/d3d9/d3d9_swapchain.c @@ -119,7 +119,7 @@ Direct3DSwapChain9_INT* CreateDirect3DSwapChain9(enum REF_TYPE RefType, struct _ return NULL; } - InitD3D9BaseObject((D3D9BaseObject*) &pThisSwapChain->BaseObject.lpVtbl, RefType, pBaseDevice); + InitD3D9BaseObject((D3D9BaseObject*) &pThisSwapChain->BaseObject.lpVtbl, RefType, (IUnknown*) &pBaseDevice->lpVtbl); pThisSwapChain->lpVtbl = &Direct3DSwapChain9_Vtbl; @@ -149,6 +149,7 @@ HRESULT Direct3DSwapChain9_Init(Direct3DSwapChain9_INT* pThisSwapChain, D3DPRESE } pThisSwapChain->PresentParameters = pPresentationParameters[pThisSwapChain->ChainIndex]; + pThisSwapChain->SwapEffect = pPresentationParameters->SwapEffect; return Direct3DSwapChain9_Reset(pThisSwapChain, pPresentationParameters); } diff --git a/reactos/dll/directx/d3d9/device.c b/reactos/dll/directx/d3d9/device.c index 8f9c7514eff..48ed888fd59 100644 --- a/reactos/dll/directx/d3d9/device.c +++ b/reactos/dll/directx/d3d9/device.c @@ -51,6 +51,10 @@ HRESULT InitD3D9BaseDevice(LPDIRECT3DDEVICE9_INT pThisBaseDevice, LPDIRECT3D9_IN pThisBaseDevice->lpVtbl = &Direct3DDevice9_Vtbl; pThisBaseDevice->lRefCnt = 1; + pThisBaseDevice->dwProcessId = GetCurrentThreadId(); + pThisBaseDevice->pUnknown = (IUnknown*) &pThisBaseDevice->lpVtbl; + InitializeCriticalSection(&pThisBaseDevice->CriticalSection); + pThisBaseDevice->pDirect3D9 = pDirect3D9; pThisBaseDevice->DeviceType = DeviceType; pThisBaseDevice->hWnd = hFocusWindow; From 10daaf90a6a85bf84f6bc276e3de7d201902f0d6 Mon Sep 17 00:00:00 2001 From: Gregor Brunmar Date: Sun, 24 Aug 2008 11:18:30 +0000 Subject: [PATCH 144/324] D3D9: * Implemented IDirect3DSwapChain9::GetDevice() and GetPresentParameters() * Added helper function to D3D9BaseObject to convert IUnknown* to IDirect3D9Device* * Fixed behavior in IDirect3DDevice9::GetSwapChain() when an invalid index was specified svn path=/trunk/; revision=35594 --- reactos/dll/directx/d3d9/d3d9_baseobject.c | 10 +++ reactos/dll/directx/d3d9/d3d9_baseobject.h | 4 ++ reactos/dll/directx/d3d9/d3d9_device.c | 10 +-- reactos/dll/directx/d3d9/d3d9_swapchain.c | 75 +++++++++++++++++++++- reactos/dll/directx/d3d9/d3d9_swapchain.h | 2 + 5 files changed, 95 insertions(+), 6 deletions(-) diff --git a/reactos/dll/directx/d3d9/d3d9_baseobject.c b/reactos/dll/directx/d3d9/d3d9_baseobject.c index 3064b561d6b..aef859673df 100644 --- a/reactos/dll/directx/d3d9/d3d9_baseobject.c +++ b/reactos/dll/directx/d3d9/d3d9_baseobject.c @@ -61,3 +61,13 @@ ULONG D3D9BaseObject_Release(D3D9BaseObject* pBaseObject) return Ref; } + +HRESULT D3D9BaseObject_GetDevice(D3D9BaseObject* pBaseObject, IDirect3DDevice9** ppDevice) +{ + if (pBaseObject->pUnknown) + { + return pBaseObject->pUnknown->lpVtbl->QueryInterface((IUnknown*) &pBaseObject->pUnknown->lpVtbl, &IID_IDirect3DDevice9, (void**)ppDevice); + } + + return E_NOINTERFACE; +} diff --git a/reactos/dll/directx/d3d9/d3d9_baseobject.h b/reactos/dll/directx/d3d9/d3d9_baseobject.h index 3b87b44b538..73bfbab06b3 100644 --- a/reactos/dll/directx/d3d9/d3d9_baseobject.h +++ b/reactos/dll/directx/d3d9/d3d9_baseobject.h @@ -9,6 +9,9 @@ #define _D3D9_BASEOBJECT_H_ #include "d3d9_common.h" +#include + +struct _D3D9BaseObject; enum REF_TYPE { @@ -38,5 +41,6 @@ VOID InitD3D9BaseObject(D3D9BaseObject* pBaseObject, enum REF_TYPE RefType, IUnk ULONG D3D9BaseObject_AddRef(D3D9BaseObject* pBaseObject); ULONG D3D9BaseObject_Release(D3D9BaseObject* pBaseObject); +HRESULT D3D9BaseObject_GetDevice(D3D9BaseObject* pBaseObject, IDirect3DDevice9** ppDevice); #endif // _D3D9_BASEOBJECT_H_ diff --git a/reactos/dll/directx/d3d9/d3d9_device.c b/reactos/dll/directx/d3d9/d3d9_device.c index b9153135c47..376658eedbb 100644 --- a/reactos/dll/directx/d3d9/d3d9_device.c +++ b/reactos/dll/directx/d3d9/d3d9_device.c @@ -341,16 +341,18 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetSwapChain(LPDIRECT3DDEVICE9 iface, LPDIRECT3DDEVICE9_INT This = impl_from_IDirect3DDevice9(iface); LOCK_D3DDEVICE9(); - if (iSwapChain >= IDirect3DDevice9_GetNumberOfSwapChains(iface)) + if (IsBadWritePtr(ppSwapChain, sizeof(IDirect3DSwapChain9*))) { - DPRINT1("Invalid iSwapChain parameter specified"); + DPRINT1("Invalid ppSwapChain parameter specified"); UNLOCK_D3DDEVICE9(); return D3DERR_INVALIDCALL; } - if (IsBadWritePtr(ppSwapChain, sizeof(IDirect3DSwapChain9*))) + *ppSwapChain = NULL; + + if (iSwapChain >= IDirect3DDevice9_GetNumberOfSwapChains(iface)) { - DPRINT1("Invalid ppSwapChain parameter specified"); + DPRINT1("Invalid iSwapChain parameter specified"); UNLOCK_D3DDEVICE9(); return D3DERR_INVALIDCALL; } diff --git a/reactos/dll/directx/d3d9/d3d9_swapchain.c b/reactos/dll/directx/d3d9/d3d9_swapchain.c index 363485a43b1..661d6ed36f4 100644 --- a/reactos/dll/directx/d3d9/d3d9_swapchain.c +++ b/reactos/dll/directx/d3d9/d3d9_swapchain.c @@ -13,6 +13,11 @@ #include "d3d9_helpers.h" #include "d3d9_device.h" +#define LOCK_D3DDEVICE9() if (This->BaseObject.pUnknown && ((LPDIRECT3DDEVICE9_INT)This->BaseObject.pUnknown)->bLockDevice) \ + EnterCriticalSection(&((LPDIRECT3DDEVICE9_INT)This->BaseObject.pUnknown)->CriticalSection); +#define UNLOCK_D3DDEVICE9() if (This->BaseObject.pUnknown && ((LPDIRECT3DDEVICE9_INT)This->BaseObject.pUnknown)->bLockDevice) \ + LeaveCriticalSection(&((LPDIRECT3DDEVICE9_INT)This->BaseObject.pUnknown)->CriticalSection); + /* Convert a IDirect3DSwapChain9 pointer safely to the internal implementation struct */ static LPDIRECT3DSWAPCHAIN9_INT IDirect3DSwapChain9ToImpl(LPDIRECT3DSWAPCHAIN9 iface) { @@ -81,15 +86,81 @@ static HRESULT WINAPI Direct3DSwapChain9_GetDisplayMode(LPDIRECT3DSWAPCHAIN9 ifa return D3D_OK; } +/*++ +* @name IDirect3DSwapChain9::GetDevice +* @implemented +* +* The function Direct3DSwapChain9_GetDevice sets the ppDevice argument +* to the device connected to create the swap chain. +* +* @param LPDIRECT3DSWAPCHAIN9 iface +* Pointer to a IDirect3DSwapChain9 object returned from IDirect3D9Device::GetSwapChain() +* +* @param IDirect3DDevice9** ppDevice +* Pointer to a IDirect3DDevice9* structure to be set to the device object. +* +* @return HRESULT +* If the method successfully sets the ppDevice value, the return value is D3D_OK. +* If ppDevice is a bad pointer the return value will be D3DERR_INVALIDCALL. +* If the swap chain didn't contain any device, the return value will be D3DERR_INVALIDDEVICE. +* +*/ static HRESULT WINAPI Direct3DSwapChain9_GetDevice(LPDIRECT3DSWAPCHAIN9 iface, IDirect3DDevice9** ppDevice) { - UNIMPLEMENTED + LPDIRECT3DSWAPCHAIN9_INT This = IDirect3DSwapChain9ToImpl(iface); + LOCK_D3DDEVICE9(); + + if (IsBadWritePtr(ppDevice, sizeof(IDirect3DDevice9**))) + { + DPRINT1("Invalid ppDevice parameter specified"); + UNLOCK_D3DDEVICE9(); + return D3DERR_INVALIDCALL; + } + + if (FAILED(D3D9BaseObject_GetDevice(&This->BaseObject, ppDevice))) + { + DPRINT1("Invalid This parameter speficied"); + UNLOCK_D3DDEVICE9(); + return D3DERR_INVALIDDEVICE; + } + + UNLOCK_D3DDEVICE9(); return D3D_OK; } +/*++ +* @name IDirect3DSwapChain9::GetPresentParameters +* @implemented +* +* The function Direct3DSwapChain9_GetPresentParameters fills the pPresentationParameters +* argument with the D3DPRESENT_PARAMETERS parameters that was used to create the swap chain. +* +* @param LPDIRECT3DSWAPCHAIN9 iface +* Pointer to a IDirect3DSwapChain9 object returned from IDirect3D9Device::GetSwapChain() +* +* @param D3DPRESENT_PARAMETERS* pPresentationParameters +* Pointer to a D3DPRESENT_PARAMETERS structure to be filled with the creation parameters. +* +* @return HRESULT +* If the method successfully fills the pPresentationParameters structure, the return value is D3D_OK. +* If pPresentationParameters is a bad pointer the return value will be D3DERR_INVALIDCALL. +* +*/ static HRESULT WINAPI Direct3DSwapChain9_GetPresentParameters(LPDIRECT3DSWAPCHAIN9 iface, D3DPRESENT_PARAMETERS* pPresentationParameters) { - UNIMPLEMENTED + LPDIRECT3DSWAPCHAIN9_INT This = IDirect3DSwapChain9ToImpl(iface); + LOCK_D3DDEVICE9(); + + if (IsBadWritePtr(pPresentationParameters, sizeof(D3DPRESENT_PARAMETERS))) + { + DPRINT1("Invalid pPresentationParameters parameter specified"); + UNLOCK_D3DDEVICE9(); + return D3DERR_INVALIDCALL; + } + + *pPresentationParameters = This->PresentParameters; + + UNLOCK_D3DDEVICE9(); return D3D_OK; } diff --git a/reactos/dll/directx/d3d9/d3d9_swapchain.h b/reactos/dll/directx/d3d9/d3d9_swapchain.h index 1fa23b14df9..4a2de2210c8 100644 --- a/reactos/dll/directx/d3d9/d3d9_swapchain.h +++ b/reactos/dll/directx/d3d9/d3d9_swapchain.h @@ -13,6 +13,8 @@ #include #include "d3d9_baseobject.h" +struct _Direct3DDevice9_INT; + typedef struct _Direct3DSwapChain9_INT { /* 0x0000 */ D3D9BaseObject BaseObject; From 168fa9b5434a009c07ac7314ade16bd4df20a6af Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Sun, 24 Aug 2008 15:41:13 +0000 Subject: [PATCH 145/324] - Formatting and comment fixes (no code change) svn path=/trunk/; revision=35598 --- reactos/ntoskrnl/ke/profobj.c | 65 ++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 31 deletions(-) diff --git a/reactos/ntoskrnl/ke/profobj.c b/reactos/ntoskrnl/ke/profobj.c index 274da416035..e0646297f93 100644 --- a/reactos/ntoskrnl/ke/profobj.c +++ b/reactos/ntoskrnl/ke/profobj.c @@ -1,13 +1,13 @@ /* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/ke/profile.c + * COPYRIGHT: GPL - See COPYING in the top level directory + * PROJECT: ReactOS Kernel + * FILE: ntoskrnl/ke/profobj.c * PURPOSE: Kernel Profiling - * * PROGRAMMERS: Alex Ionescu (alex@relsoft.net) */ /* INCLUDES *****************************************************************/ + #include #define NDEBUG #include @@ -68,8 +68,8 @@ KeStartProfile(PKPROFILE Profile, KeAcquireSpinLockAtDpcLevel(&KiProfileLock); /* Make sure it's not running */ - if (!Profile->Started) { - + if (!Profile->Started) + { /* Set it as Started */ Profile->Buffer = Buffer; Profile->Started = TRUE; @@ -77,13 +77,15 @@ KeStartProfile(PKPROFILE Profile, /* Get the process, if any */ ProfileProcess = Profile->Process; - /* Insert it into the Process List or Global List */ - if (ProfileProcess) { - + /* Check where we should insert it */ + if (ProfileProcess) + { + /* Insert it into the Process List */ InsertTailList(&ProfileProcess->ProfileListHead, &Profile->ProfileListEntry); - - } else { - + } + else + { + /* Insert it into the Global List */ InsertTailList(&KiProfileListHead, &Profile->ProfileListEntry); } @@ -91,14 +93,15 @@ KeStartProfile(PKPROFILE Profile, LIST_FOR_EACH(CurrentSource, &KiProfileSourceListHead, KPROFILE_SOURCE_OBJECT, ListEntry) { /* Check if it's the same as the one being requested now */ - if (CurrentSource->Source == Profile->Source) { + if (CurrentSource->Source == Profile->Source) + { break; } } /* See if the loop found something */ - if (!CurrentSource) { - + if (!CurrentSource) + { /* Nothing found, use our allocated buffer */ CurrentSource = SourceBuffer; @@ -134,8 +137,8 @@ KeStopProfile(PKPROFILE Profile) KeAcquireSpinLockAtDpcLevel(&KiProfileLock); /* Make sure it's running */ - if (Profile->Started) { - + if (Profile->Started) + { /* Remove it from the list and disable */ RemoveEntryList(&Profile->ProfileListEntry); Profile->Started = FALSE; @@ -143,7 +146,8 @@ KeStopProfile(PKPROFILE Profile) /* Find the Source Object */ LIST_FOR_EACH(CurrentSource, &KiProfileSourceListHead, KPROFILE_SOURCE_OBJECT, ListEntry) { - if (CurrentSource->Source == Profile->Source) { + if (CurrentSource->Source == Profile->Source) + { /* Remove it */ RemoveEntryList(&CurrentSource->ListEntry); break; @@ -171,13 +175,13 @@ STDCALL KeQueryIntervalProfile(KPROFILE_SOURCE ProfileSource) { /* Check if this is the timer profile */ - if (ProfileSource == ProfileTime) { - + if (ProfileSource == ProfileTime) + { /* Return the good old 100ns sampling interval */ return KiProfileTimeInterval; - - } else { - + } + else + { /* Request it from HAL. FIXME: What structure is used? */ HalQuerySystemInformation(HalProfileSourceInformation, sizeof(NULL), @@ -194,18 +198,17 @@ KeSetIntervalProfile(KPROFILE_SOURCE ProfileSource, ULONG Interval) { /* Check if this is the timer profile */ - if (ProfileSource == ProfileTime) { - + if (ProfileSource == ProfileTime) + { /* Set the good old 100ns sampling interval */ KiProfileTimeInterval = Interval; - - } else { - + } + else + { /* Set it with HAL. FIXME: What structure is used? */ HalSetSystemInformation(HalProfileSourceInformation, sizeof(NULL), NULL); - } } @@ -236,8 +239,8 @@ KiParseProfileList(IN PKTRAP_FRAME TrapFrame, #ifdef _M_IX86 if ((Profile->Source != Source) || (TrapFrame->Eip < (ULONG_PTR)Profile->RangeBase) || - (TrapFrame->Eip > (ULONG_PTR)Profile->RangeLimit)) { - + (TrapFrame->Eip > (ULONG_PTR)Profile->RangeLimit)) + { continue; } From e0e86d609231308a8eab797fb33f7582544a6526 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Sun, 24 Aug 2008 15:42:30 +0000 Subject: [PATCH 146/324] - Remove deprecated makefile svn path=/trunk/; revision=35599 --- reactos/boot/freeldr/rules.mak | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 reactos/boot/freeldr/rules.mak diff --git a/reactos/boot/freeldr/rules.mak b/reactos/boot/freeldr/rules.mak deleted file mode 100644 index 67729c97081..00000000000 --- a/reactos/boot/freeldr/rules.mak +++ /dev/null @@ -1,4 +0,0 @@ -include $(PATH_TO_TOP)/rules.mak - -BIN2C = ..$(SEP)tools$(SEP)bin2c -FREELDR_TOOLS_PATH = ..$(SEP)tools From 13362ee99beb5b8bb72b133e57e547dd72d6841e Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Sun, 24 Aug 2008 15:48:05 +0000 Subject: [PATCH 147/324] - Remove KEBUGCHECK and KEBUGCHECKEX macros - Replace "KeBugCheck(0)" by ASSERT(FALSE) - Replace deprecated "CPRINT" by DRINT1 svn path=/trunk/; revision=35600 --- reactos/drivers/filesystems/fastfat/fcb.c | 2 +- reactos/drivers/filesystems/fastfat/rw.c | 6 +- reactos/drivers/filesystems/npfs/rw.c | 10 +- reactos/hal/hal/hal.c | 6 +- reactos/hal/halx86/generic/bus.c | 2 +- reactos/hal/halx86/generic/dma.c | 2 +- reactos/hal/halx86/generic/profil.c | 6 +- reactos/hal/halx86/mp/apic.c | 6 +- reactos/hal/halx86/mp/halinit_mp.c | 4 +- reactos/hal/halx86/mp/ioapic.c | 4 +- reactos/hal/halx86/mp/mpconfig.c | 20 ++-- reactos/hal/halx86/mp/mpsirql.c | 16 +-- reactos/hal/halx86/mp/processor_mp.c | 6 +- reactos/ntoskrnl/cc/copy.c | 4 +- reactos/ntoskrnl/cc/fs.c | 4 +- reactos/ntoskrnl/cc/view.c | 14 +-- reactos/ntoskrnl/config/cmse.c | 16 +-- reactos/ntoskrnl/config/cmsysini.c | 28 ++--- reactos/ntoskrnl/config/cmvalue.c | 2 +- reactos/ntoskrnl/dbgk/dbgkobj.c | 4 +- reactos/ntoskrnl/ex/callback.c | 2 +- reactos/ntoskrnl/ex/handle.c | 4 +- reactos/ntoskrnl/ex/init.c | 14 +-- reactos/ntoskrnl/ex/locale.c | 4 +- reactos/ntoskrnl/ex/shutdown.c | 6 +- reactos/ntoskrnl/ex/work.c | 6 +- reactos/ntoskrnl/include/internal/cc.h | 9 -- reactos/ntoskrnl/include/internal/ob_x.h | 2 +- reactos/ntoskrnl/io/iomgr/device.c | 2 +- reactos/ntoskrnl/io/iomgr/driver.c | 2 +- reactos/ntoskrnl/io/iomgr/file.c | 4 +- reactos/ntoskrnl/io/iomgr/remlock.c | 6 +- reactos/ntoskrnl/io/iomgr/volume.c | 2 +- reactos/ntoskrnl/io/pnpmgr/pnpmgr.c | 34 +++--- reactos/ntoskrnl/io/pnpmgr/pnproot.c | 6 +- reactos/ntoskrnl/kd/kdmain.c | 2 +- reactos/ntoskrnl/kdbg/kdb.c | 2 +- reactos/ntoskrnl/kdbg/kdb_cli.c | 2 +- reactos/ntoskrnl/ke/apc.c | 2 +- reactos/ntoskrnl/ke/clock.c | 2 +- reactos/ntoskrnl/ke/freeldr.c | 2 +- reactos/ntoskrnl/ke/i386/kiinit.c | 2 +- reactos/ntoskrnl/ke/i386/usercall.c | 2 +- reactos/ntoskrnl/ke/powerpc/exp.c | 2 +- reactos/ntoskrnl/ke/procobj.c | 6 +- reactos/ntoskrnl/ke/thrdschd.c | 6 +- reactos/ntoskrnl/ke/wait.c | 4 +- reactos/ntoskrnl/lpc/close.c | 2 +- reactos/ntoskrnl/mm/anonmem.c | 16 +-- reactos/ntoskrnl/mm/balance.c | 18 +-- reactos/ntoskrnl/mm/freelist.c | 44 ++++---- reactos/ntoskrnl/mm/i386/page.c | 74 ++++++------ reactos/ntoskrnl/mm/i386/pagepae.c | 130 +++++++++++----------- reactos/ntoskrnl/mm/iospace.c | 2 +- reactos/ntoskrnl/mm/marea.c | 6 +- reactos/ntoskrnl/mm/mdlsup.c | 4 +- reactos/ntoskrnl/mm/mm.c | 6 +- reactos/ntoskrnl/mm/mpw.c | 2 +- reactos/ntoskrnl/mm/npool.c | 34 +++--- reactos/ntoskrnl/mm/pagefile.c | 22 ++-- reactos/ntoskrnl/mm/pageop.c | 4 +- reactos/ntoskrnl/mm/pool.c | 2 +- reactos/ntoskrnl/mm/powerpc/page.c | 28 ++--- reactos/ntoskrnl/mm/procsup.c | 8 +- reactos/ntoskrnl/mm/rmap.c | 22 ++-- reactos/ntoskrnl/mm/section.c | 116 +++++++++---------- reactos/ntoskrnl/ob/obdir.c | 4 +- reactos/ntoskrnl/ob/obhandle.c | 14 +-- reactos/ntoskrnl/ob/oblink.c | 2 +- reactos/ntoskrnl/po/power.c | 2 +- reactos/ntoskrnl/ps/kill.c | 16 +-- reactos/ntoskrnl/ps/process.c | 2 +- reactos/ntoskrnl/ps/security.c | 2 +- reactos/ntoskrnl/rtl/libsupp.c | 10 +- reactos/ntoskrnl/se/audit.c | 2 +- reactos/ntoskrnl/se/token.c | 2 +- 76 files changed, 443 insertions(+), 452 deletions(-) diff --git a/reactos/drivers/filesystems/fastfat/fcb.c b/reactos/drivers/filesystems/fastfat/fcb.c index 8ae22b8411d..f4323048f2b 100644 --- a/reactos/drivers/filesystems/fastfat/fcb.c +++ b/reactos/drivers/filesystems/fastfat/fcb.c @@ -81,7 +81,7 @@ vfatInitFcb(PVFATFCB Fcb, PUNICODE_STRING NameU) { /* FIXME: what to do if no more memory? */ DPRINT1("Unable to initialize FCB for filename '%wZ'\n", NameU); - KEBUGCHECKEX(0, (ULONG_PTR)Fcb, (ULONG_PTR)NameU, 0, 0); + KeBugCheckEx(0, (ULONG_PTR)Fcb, (ULONG_PTR)NameU, 0, 0); } Fcb->PathNameU.Length = 0; diff --git a/reactos/drivers/filesystems/fastfat/rw.c b/reactos/drivers/filesystems/fastfat/rw.c index 11ed87212ae..fb7083dd1c5 100644 --- a/reactos/drivers/filesystems/fastfat/rw.c +++ b/reactos/drivers/filesystems/fastfat/rw.c @@ -69,7 +69,7 @@ OffsetToCluster(PDEVICE_EXTENSION DeviceExt, if (FirstCluster == 0) { DbgPrint("OffsetToCluster is called with FirstCluster = 0!\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (FirstCluster == 1) @@ -233,7 +233,7 @@ VfatReadFileData (PVFAT_IRP_CONTEXT IrpContext, ROUND_DOWN(ReadOffset.u.LowPart, BytesPerCluster), &CorrectCluster, FALSE); if (CorrectCluster != CurrentCluster) - KEBUGCHECK(FAT_FILE_SYSTEM); + KeBugCheck(FAT_FILE_SYSTEM); } #endif } @@ -442,7 +442,7 @@ VfatWriteFileData(PVFAT_IRP_CONTEXT IrpContext, ROUND_DOWN(WriteOffset.u.LowPart, BytesPerCluster), &CorrectCluster, FALSE); if (CorrectCluster != CurrentCluster) - KEBUGCHECK(FAT_FILE_SYSTEM); + KeBugCheck(FAT_FILE_SYSTEM); } #endif } diff --git a/reactos/drivers/filesystems/npfs/rw.c b/reactos/drivers/filesystems/npfs/rw.c index e5793b5bab2..f0e65f0f8bc 100644 --- a/reactos/drivers/filesystems/npfs/rw.c +++ b/reactos/drivers/filesystems/npfs/rw.c @@ -80,7 +80,7 @@ NpfsReadWriteCancelRoutine(IN PDEVICE_OBJECT DeviceObject, } break; default: - KEBUGCHECK(0); + ASSERT(FALSE); } ExReleaseFastMutex(&Ccb->DataListLock); KeUnlockMutex(&DeviceExt->PipeListLock); @@ -130,7 +130,7 @@ NpfsWaiterThread(PVOID InitContext) NpfsRead(IoStack->DeviceObject, Irp); break; default: - KEBUGCHECK(0); + ASSERT(FALSE); } } } @@ -148,7 +148,7 @@ NpfsWaiterThread(PVOID InitContext) ThreadContext->WaitBlockArray); if (!NT_SUCCESS(Status)) { - KEBUGCHECK(0); + ASSERT(FALSE); } KeLockMutex(&ThreadContext->DeviceExt->PipeListLock); Count = Status - STATUS_SUCCESS; @@ -185,7 +185,7 @@ NpfsWaiterThread(PVOID InitContext) } break; default: - KEBUGCHECK(0); + ASSERT(FALSE); } ExReleaseFastMutex(&Ccb->DataListLock); } @@ -357,7 +357,7 @@ NpfsRead(IN PDEVICE_OBJECT DeviceObject, NULL); if (!NT_SUCCESS(Status)) { - KEBUGCHECK(0); + ASSERT(FALSE); } ExAcquireFastMutex(&Ccb->DataListLock); } diff --git a/reactos/hal/hal/hal.c b/reactos/hal/hal/hal.c index 6448f3b2051..93190959ddf 100644 --- a/reactos/hal/hal/hal.c +++ b/reactos/hal/hal/hal.c @@ -49,7 +49,7 @@ VOID NTAPI HalStopProfileInterrupt(IN KPROFILE_SOURCE ProfileSource) { - KEBUGCHECK(0); + ASSERT(FALSE); return; } @@ -60,7 +60,7 @@ VOID NTAPI HalStartProfileInterrupt(IN KPROFILE_SOURCE ProfileSource) { - KEBUGCHECK(0); + ASSERT(FALSE); return; } @@ -71,7 +71,7 @@ ULONG_PTR NTAPI HalSetProfileInterval(IN ULONG_PTR Interval) { - KEBUGCHECK(0); + ASSERT(FALSE); return Interval; } diff --git a/reactos/hal/halx86/generic/bus.c b/reactos/hal/halx86/generic/bus.c index a35adbe315a..9b708a296a5 100644 --- a/reactos/hal/halx86/generic/bus.c +++ b/reactos/hal/halx86/generic/bus.c @@ -222,7 +222,7 @@ HalGetBusDataByOffset(IN BUS_DATA_TYPE BusDataType, else if (BusDataType == EisaConfiguration) { /* FIXME: TODO */ - KEBUGCHECK(0); + ASSERT(FALSE); } else if ((BusDataType == PCIConfiguration) && (HalpPCIConfigInitialized) && diff --git a/reactos/hal/halx86/generic/dma.c b/reactos/hal/halx86/generic/dma.c index 804bf782f6b..d55a56b5a6f 100644 --- a/reactos/hal/halx86/generic/dma.c +++ b/reactos/hal/halx86/generic/dma.c @@ -1487,7 +1487,7 @@ HalpCopyBufferMap( */ /* FIXME: The correct bug check code isn't defined. */ /* KEBUGCHECKEX(HAL_MEMORY_ALLOCATION, PAGE_SIZE, 0, (ULONG_PTR)__FILE__, 0); */ - KEBUGCHECK(0); + ASSERT(FALSE);; } CurrentAddress = (ULONG_PTR)VirtualAddress + diff --git a/reactos/hal/halx86/generic/profil.c b/reactos/hal/halx86/generic/profil.c index e98e982a906..4db4839d0eb 100644 --- a/reactos/hal/halx86/generic/profil.c +++ b/reactos/hal/halx86/generic/profil.c @@ -21,7 +21,7 @@ VOID NTAPI HalStopProfileInterrupt(IN KPROFILE_SOURCE ProfileSource) { - KEBUGCHECK(0); + ASSERT(FALSE); return; } @@ -32,7 +32,7 @@ VOID NTAPI HalStartProfileInterrupt(IN KPROFILE_SOURCE ProfileSource) { - KEBUGCHECK(0); + ASSERT(FALSE); return; } @@ -43,6 +43,6 @@ ULONG_PTR NTAPI HalSetProfileInterval(IN ULONG_PTR Interval) { - KEBUGCHECK(0); + ASSERT(FALSE); return Interval; } diff --git a/reactos/hal/halx86/mp/apic.c b/reactos/hal/halx86/mp/apic.c index aec51e4fc2a..80c1184f420 100644 --- a/reactos/hal/halx86/mp/apic.c +++ b/reactos/hal/halx86/mp/apic.c @@ -939,7 +939,7 @@ VOID HaliInitBSP(VOID) /* Only initialize the BSP once */ if (BSPInitialized) { - KEBUGCHECK(0); + ASSERT(FALSE); return; } @@ -961,7 +961,7 @@ VOID HaliInitBSP(VOID) else { DPRINT("No APIC found\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (APICMode == amPIC) @@ -1013,7 +1013,7 @@ HaliStartApplicationProcessor(ULONG Cpu, ULONG Stack) Cpu >= CPUCount || OnlineCPUs & (1 << Cpu)) { - KEBUGCHECK(0); + ASSERT(FALSE); } DPRINT1("Attempting to boot CPU %d\n", Cpu); diff --git a/reactos/hal/halx86/mp/halinit_mp.c b/reactos/hal/halx86/mp/halinit_mp.c index f22d932225b..89f023f2122 100644 --- a/reactos/hal/halx86/mp/halinit_mp.c +++ b/reactos/hal/halx86/mp/halinit_mp.c @@ -43,14 +43,14 @@ HalpInitPhase0(PLOADER_PARAMETER_BLOCK LoaderBlock) if (MPSInitialized) { - KEBUGCHECK(0); + ASSERT(FALSE); } MPSInitialized = TRUE; if (!HaliFindSmpConfig()) { - KEBUGCHECK(0); + ASSERT(FALSE); } /* store the kernel base for later use */ diff --git a/reactos/hal/halx86/mp/ioapic.c b/reactos/hal/halx86/mp/ioapic.c index 34dbb6cdf51..a9366e64e71 100644 --- a/reactos/hal/halx86/mp/ioapic.c +++ b/reactos/hal/halx86/mp/ioapic.c @@ -256,7 +256,7 @@ AssignIrqVector(ULONG irq) else if (current_vector == FIRST_SYSTEM_VECTOR) { DPRINT1("Ran out of interrupt sources!"); - KEBUGCHECK(0); + ASSERT(FALSE); } vector = current_vector; @@ -489,7 +489,7 @@ IOAPICSetupIds(VOID) if (GET_IOAPIC_ID(tmp) != IOAPICMap[apic].ApicId) { DPRINT1("Could not set I/O APIC ID!\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } } } diff --git a/reactos/hal/halx86/mp/mpconfig.c b/reactos/hal/halx86/mp/mpconfig.c index f14e50865aa..88e6e009bf8 100644 --- a/reactos/hal/halx86/mp/mpconfig.c +++ b/reactos/hal/halx86/mp/mpconfig.c @@ -45,7 +45,7 @@ HaliMPIntSrcInfo(PMP_CONFIGURATION_INTSRC m) if (IRQCount > MAX_IRQ_SOURCE) { DPRINT1("Max # of irq sources exceeded!!\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } IRQMap[IRQCount] = *m; @@ -217,7 +217,7 @@ HaliMPIOApicInfo(PMP_CONFIGURATION_IOAPIC m) DPRINT("Max # of I/O APICs (%d) exceeded (found %d).\n", MAX_IOAPIC, IOAPICCount); DPRINT1("Recompile with bigger MAX_IOAPIC!.\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } IOAPICMap[IOAPICCount].ApicId = m->ApicId; @@ -245,12 +245,12 @@ HaliMPIntLocalInfo(PMP_CONFIGURATION_INTLOCAL m) if ((m->IrqType == INT_EXTINT) && (m->DstApicLInt != 0)) { DPRINT1("Invalid MP table!\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if ((m->IrqType == INT_NMI) && (m->DstApicLInt != 1)) { DPRINT1("Invalid MP table!\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } } @@ -271,14 +271,14 @@ HaliReadMPConfigTable(PMP_CONFIGURATION_TABLE Table) DPRINT1("Bad MP configuration block signature: %c%c%c%c\n", pc[0], pc[1], pc[2], pc[3]); - KEBUGCHECKEX(0, pc[0], pc[1], pc[2], pc[3]); + KeBugCheckEx(0, pc[0], pc[1], pc[2], pc[3]); return FALSE; } if (MPChecksum((PUCHAR)Table, Table->Length)) { DPRINT1("Bad MP configuration block checksum\n"); - KEBUGCHECK(0); + ASSERT(FALSE); return FALSE; } @@ -286,7 +286,7 @@ HaliReadMPConfigTable(PMP_CONFIGURATION_TABLE Table) { DPRINT1("Bad MP configuration table version (%d)\n", Table->Specification); - KEBUGCHECK(0); + ASSERT(FALSE); return FALSE; } @@ -294,7 +294,7 @@ HaliReadMPConfigTable(PMP_CONFIGURATION_TABLE Table) { DPRINT1("APIC base address is at 0x%X. I cannot handle non-standard adresses\n", Table->LocalAPICAddress); - KEBUGCHECK(0); + ASSERT(FALSE); return FALSE; } @@ -346,7 +346,7 @@ HaliReadMPConfigTable(PMP_CONFIGURATION_TABLE Table) } default: DPRINT1("Unknown entry in MPC table\n"); - KEBUGCHECK(0); + ASSERT(FALSE); return FALSE; } } @@ -597,7 +597,7 @@ HaliGetSmpConfig(VOID) } else { - KEBUGCHECK(0); + ASSERT(FALSE); } return TRUE; } diff --git a/reactos/hal/halx86/mp/mpsirql.c b/reactos/hal/halx86/mp/mpsirql.c index 3919b1e94ab..673ac5af844 100644 --- a/reactos/hal/halx86/mp/mpsirql.c +++ b/reactos/hal/halx86/mp/mpsirql.c @@ -37,7 +37,7 @@ KIRQL STDCALL KeGetCurrentIrql (VOID) if (irql > HIGH_LEVEL) { DPRINT1 ("CurrentIrql %x\n", irql); - KEBUGCHECK (0); + ASSERT(FALSE); } if (Flags & EFLAGS_INTERRUPT_MASK) { @@ -57,7 +57,7 @@ VOID KeSetCurrentIrql (KIRQL NewIrql) if (NewIrql > HIGH_LEVEL) { DPRINT1 ("NewIrql %x\n", NewIrql); - KEBUGCHECK (0); + ASSERT(FALSE); } Ke386SaveFlags(Flags); _disable(); @@ -138,7 +138,7 @@ KfLowerIrql (KIRQL NewIrql) if (NewIrql > oldIrql) { DPRINT1 ("NewIrql %x CurrentIrql %x\n", NewIrql, oldIrql); - KEBUGCHECK (0); + ASSERT(FALSE); } HalpLowerIrql (NewIrql, FALSE); } @@ -198,7 +198,7 @@ KfRaiseIrql (KIRQL NewIrql) if (NewIrql < OldIrql) { DPRINT1 ("CurrentIrql %x NewIrql %x\n", KeGetCurrentIrql (), NewIrql); - KEBUGCHECK (0); + ASSERT(FALSE); } @@ -301,14 +301,14 @@ HalBeginSystemInterrupt (KIRQL Irql, if (KeGetCurrentIrql () >= Irql) { DPRINT1("current irql %d, new irql %d\n", KeGetCurrentIrql(), Irql); - KEBUGCHECK(0); + ASSERT(FALSE); } Ke386SaveFlags(Flags); if (Flags & EFLAGS_INTERRUPT_MASK) { DPRINT1("HalBeginSystemInterrupt was called with interrupt's enabled\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } APICWrite (APIC_TPR, IRQL2TPR (Irql) & APIC_TPR_PRI); *OldIrql = KeGetCurrentIrql (); @@ -330,7 +330,7 @@ HalEndSystemInterrupt (KIRQL Irql, if (Flags & EFLAGS_INTERRUPT_MASK) { DPRINT1("HalEndSystemInterrupt was called with interrupt's enabled\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } APICSendEOI(); HalpLowerIrql (Irql, TRUE); @@ -394,7 +394,7 @@ HalRequestSoftwareInterrupt(IN KIRQL Request) break; default: - KEBUGCHECK(0); + ASSERT(FALSE); } } diff --git a/reactos/hal/halx86/mp/processor_mp.c b/reactos/hal/halx86/mp/processor_mp.c index 442d403d948..2deb0f5eb68 100644 --- a/reactos/hal/halx86/mp/processor_mp.c +++ b/reactos/hal/halx86/mp/processor_mp.c @@ -31,7 +31,7 @@ HalInitializeProcessor(ULONG ProcessorNumber, CPU = ThisCPU(); if (OnlineCPUs & (1 << CPU)) { - KEBUGCHECK(0); + ASSERT(FALSE); } if (ProcessorNumber == 0) @@ -70,7 +70,7 @@ HalAllProcessorsStarted (VOID) } if (CPUs > CPUCount) { - KEBUGCHECK(0); + ASSERT(FALSE); } else if (CPUs == CPUCount) { @@ -108,7 +108,7 @@ HalStartNextProcessor( if (CPU >= CPUCount) { - KEBUGCHECK(0); + ASSERT(FALSE); } DPRINT1("Attempting to boot CPU %d\n", CPU); diff --git a/reactos/ntoskrnl/cc/copy.c b/reactos/ntoskrnl/cc/copy.c index c7c5ea532f9..8397d912951 100644 --- a/reactos/ntoskrnl/cc/copy.c +++ b/reactos/ntoskrnl/cc/copy.c @@ -47,13 +47,13 @@ CcInitCacheZeroPage(VOID) if (!NT_SUCCESS(Status)) { DbgPrint("Can't allocate CcZeroPage.\n"); - KEBUGCHECKCC; + KeBugCheck(CACHE_MANAGER); } Status = MiZeroPage(CcZeroPage); if (!NT_SUCCESS(Status)) { DbgPrint("Can't zero out CcZeroPage.\n"); - KEBUGCHECKCC; + KeBugCheck(CACHE_MANAGER); } } diff --git a/reactos/ntoskrnl/cc/fs.c b/reactos/ntoskrnl/cc/fs.c index 9f7324c9c22..e6fa791a7f5 100644 --- a/reactos/ntoskrnl/cc/fs.c +++ b/reactos/ntoskrnl/cc/fs.c @@ -183,7 +183,7 @@ CcSetFileSizes (IN PFILE_OBJECT FileObject, else { DPRINT1("Anyone has referenced a cache segment behind the new size.\n"); - KEBUGCHECKCC; + KeBugCheck(CACHE_MANAGER); } } } @@ -202,7 +202,7 @@ CcSetFileSizes (IN PFILE_OBJECT FileObject, if (!NT_SUCCESS(Status)) { DPRINT1("CcRosInternalFreeCacheSegment failed, status = %x\n", Status); - KEBUGCHECK(0); + KeBugCheck(CACHE_MANAGER); } } } diff --git a/reactos/ntoskrnl/cc/view.c b/reactos/ntoskrnl/cc/view.c index 5155b2296c1..982c85add3d 100644 --- a/reactos/ntoskrnl/cc/view.c +++ b/reactos/ntoskrnl/cc/view.c @@ -485,7 +485,7 @@ CcRosMarkDirtyCacheSegment(PBCB Bcb, ULONG FileOffset) CacheSeg = CcRosLookupCacheSegment(Bcb, FileOffset); if (CacheSeg == NULL) { - KEBUGCHECKCC; + KeBugCheck(CACHE_MANAGER); } if (!CacheSeg->Dirty) { @@ -674,7 +674,7 @@ CcRosCreateCacheSegment(PBCB Bcb, if (StartingOffset == 0xffffffff) { DPRINT1("Out of CacheSeg mapping space\n"); - KEBUGCHECKCC; + KeBugCheck(CACHE_MANAGER); } current->BaseAddress = CiCacheSegMappingRegionBase + StartingOffset * PAGE_SIZE; @@ -700,7 +700,7 @@ CcRosCreateCacheSegment(PBCB Bcb, MmUnlockAddressSpace(MmGetKernelAddressSpace()); if (!NT_SUCCESS(Status)) { - KEBUGCHECKCC; + KeBugCheck(CACHE_MANAGER); } #endif @@ -834,9 +834,9 @@ CcRosRequestCacheSegment(PBCB Bcb, if ((FileOffset % Bcb->CacheSegmentSize) != 0) { - CPRINT("Bad fileoffset %x should be multiple of %x", + DPRINT1("Bad fileoffset %x should be multiple of %x", FileOffset, Bcb->CacheSegmentSize); - KEBUGCHECKCC; + KeBugCheck(CACHE_MANAGER); } return(CcRosGetCacheSegment(Bcb, @@ -1339,7 +1339,7 @@ CmLazyCloseThreadMain(PVOID Ignored) if (!NT_SUCCESS(Status)) { DbgPrint("LazyCloseThread: Wait failed\n"); - KEBUGCHECKCC; + KeBugCheck(CACHE_MANAGER); break; } if (LazyCloseThreadShouldTerminate) @@ -1401,7 +1401,7 @@ CcInitView(VOID) MmUnlockAddressSpace(MmGetKernelAddressSpace()); if (!NT_SUCCESS(Status)) { - KEBUGCHECKCC; + KeBugCheck(CACHE_MANAGER); } Buffer = ExAllocatePool(NonPagedPool, CI_CACHESEG_MAPPING_REGION_SIZE / (PAGE_SIZE * 8)); diff --git a/reactos/ntoskrnl/config/cmse.c b/reactos/ntoskrnl/config/cmse.c index 80d56dde569..16e91241688 100644 --- a/reactos/ntoskrnl/config/cmse.c +++ b/reactos/ntoskrnl/config/cmse.c @@ -43,7 +43,7 @@ CmpHiveRootSecurityDescriptor(VOID) if (!(Sid[0]) || !(Sid[1]) || !(Sid[2]) || !(Sid[3])) { /* Bugcheck */ - KEBUGCHECKEX(REGISTRY_ERROR, 11, 1, 0, 0); + KeBugCheckEx(REGISTRY_ERROR, 11, 1, 0, 0); } /* Phase 2: Initialize all SIDs */ @@ -51,7 +51,7 @@ CmpHiveRootSecurityDescriptor(VOID) Status |= RtlInitializeSid(Sid[1], &NtAuthority, 1); Status |= RtlInitializeSid(Sid[2], &NtAuthority, 1); Status |= RtlInitializeSid(Sid[3], &NtAuthority, 2); - if (!NT_SUCCESS(Status)) KEBUGCHECKEX(REGISTRY_ERROR, 11, 2, 0, 0); + if (!NT_SUCCESS(Status)) KeBugCheckEx(REGISTRY_ERROR, 11, 2, 0, 0); /* Phase 2: Setup SID Sub Authorities */ *RtlSubAuthoritySid(Sid[0], 0) = SECURITY_WORLD_RID; @@ -78,18 +78,18 @@ CmpHiveRootSecurityDescriptor(VOID) /* Phase 3: Allocate the ACL */ Acl = ExAllocatePoolWithTag(PagedPool, AclLength, TAG_CM); - if (!Acl) KEBUGCHECKEX(REGISTRY_ERROR, 11, 3, 0, 0); + if (!Acl) KeBugCheckEx(REGISTRY_ERROR, 11, 3, 0, 0); /* Phase 4: Create the ACL */ Status = RtlCreateAcl(Acl, AclLength, ACL_REVISION); - if (!NT_SUCCESS(Status)) KEBUGCHECKEX(REGISTRY_ERROR, 11, 4, Status, 0); + if (!NT_SUCCESS(Status)) KeBugCheckEx(REGISTRY_ERROR, 11, 4, Status, 0); /* Phase 5: Build the ACL */ Status = RtlAddAccessAllowedAce(Acl, ACL_REVISION, KEY_ALL_ACCESS, Sid[0]); Status |= RtlAddAccessAllowedAce(Acl, ACL_REVISION, KEY_ALL_ACCESS, Sid[1]); Status |= RtlAddAccessAllowedAce(Acl, ACL_REVISION, KEY_READ, Sid[2]); Status |= RtlAddAccessAllowedAce(Acl, ACL_REVISION, KEY_READ, Sid[3]); - if (!NT_SUCCESS(Status)) KEBUGCHECKEX(REGISTRY_ERROR, 11, 5, Status, 0); + if (!NT_SUCCESS(Status)) KeBugCheckEx(REGISTRY_ERROR, 11, 5, Status, 0); /* Phase 5: Make the ACEs inheritable */ Status = RtlGetAce(Acl, 0,( PVOID*)&AceHeader); @@ -110,7 +110,7 @@ CmpHiveRootSecurityDescriptor(VOID) sizeof(SECURITY_DESCRIPTOR) + AclLength, TAG_CM); - if (!SecurityDescriptor) KEBUGCHECKEX(REGISTRY_ERROR, 11, 6, 0, 0); + if (!SecurityDescriptor) KeBugCheckEx(REGISTRY_ERROR, 11, 6, 0, 0); /* Phase 6: Make a copy of the ACL */ AclCopy = (PACL)((PISECURITY_DESCRIPTOR)SecurityDescriptor + 1); @@ -119,14 +119,14 @@ CmpHiveRootSecurityDescriptor(VOID) /* Phase 7: Create the security descriptor */ Status = RtlCreateSecurityDescriptor(SecurityDescriptor, SECURITY_DESCRIPTOR_REVISION); - if (!NT_SUCCESS(Status)) KEBUGCHECKEX(REGISTRY_ERROR, 11, 7, Status, 0); + if (!NT_SUCCESS(Status)) KeBugCheckEx(REGISTRY_ERROR, 11, 7, Status, 0); /* Phase 8: Set the ACL as a DACL */ Status = RtlSetDaclSecurityDescriptor(SecurityDescriptor, TRUE, AclCopy, FALSE); - if (!NT_SUCCESS(Status)) KEBUGCHECKEX(REGISTRY_ERROR, 11, 8, Status, 0); + if (!NT_SUCCESS(Status)) KeBugCheckEx(REGISTRY_ERROR, 11, 8, Status, 0); /* Free the SIDs and original ACL */ for (i = 0; i < 4; i++) ExFreePool(Sid[i]); diff --git a/reactos/ntoskrnl/config/cmsysini.c b/reactos/ntoskrnl/config/cmsysini.c index d96919bfa45..50c40eb5460 100644 --- a/reactos/ntoskrnl/config/cmsysini.c +++ b/reactos/ntoskrnl/config/cmsysini.c @@ -643,7 +643,7 @@ CmpInitializeSystemHive(IN PLOADER_PARAMETER_BLOCK LoaderBlock) if (!Buffer) { /* Fail */ - KEBUGCHECKEX(BAD_SYSTEM_CONFIG_INFO, 3, 1, (ULONG_PTR)LoaderBlock, 0); + KeBugCheckEx(BAD_SYSTEM_CONFIG_INFO, 3, 1, (ULONG_PTR)LoaderBlock, 0); } /* Setup the unicode string */ @@ -716,7 +716,7 @@ CmpInitializeSystemHive(IN PLOADER_PARAMETER_BLOCK LoaderBlock) if (CmpBootType & 4) { /* We're disabled, so bugcheck */ - KEBUGCHECKEX(BAD_SYSTEM_CONFIG_INFO, + KeBugCheckEx(BAD_SYSTEM_CONFIG_INFO, 3, 3, (ULONG_PTR)SystemHive, @@ -1346,7 +1346,7 @@ CmInitSystem1(VOID) if (!NT_SUCCESS(Status)) { /* Bugcheck */ - KEBUGCHECKEX(CONFIG_INITIALIZATION_FAILED, 1, 1, Status, 0); + KeBugCheckEx(CONFIG_INITIALIZATION_FAILED, 1, 1, Status, 0); } /* Build the master hive */ @@ -1363,14 +1363,14 @@ CmInitSystem1(VOID) if (!NT_SUCCESS(Status)) { /* Bugcheck */ - KEBUGCHECKEX(CONFIG_INITIALIZATION_FAILED, 1, 2, Status, 0); + KeBugCheckEx(CONFIG_INITIALIZATION_FAILED, 1, 2, Status, 0); } /* Create the \REGISTRY key node */ if (!CmpCreateRegistryRoot()) { /* Bugcheck */ - KEBUGCHECKEX(CONFIG_INITIALIZATION_FAILED, 1, 3, 0, 0); + KeBugCheckEx(CONFIG_INITIALIZATION_FAILED, 1, 3, 0, 0); } /* Create the default security descriptor */ @@ -1393,7 +1393,7 @@ CmInitSystem1(VOID) if (!NT_SUCCESS(Status)) { /* Bugcheck */ - KEBUGCHECKEX(CONFIG_INITIALIZATION_FAILED, 1, 5, Status, 0); + KeBugCheckEx(CONFIG_INITIALIZATION_FAILED, 1, 5, Status, 0); } /* Close the handle */ @@ -1416,7 +1416,7 @@ CmInitSystem1(VOID) if (!NT_SUCCESS(Status)) { /* Bugcheck */ - KEBUGCHECKEX(CONFIG_INITIALIZATION_FAILED, 1, 6, Status, 0); + KeBugCheckEx(CONFIG_INITIALIZATION_FAILED, 1, 6, Status, 0); } /* Close the handle */ @@ -1426,7 +1426,7 @@ CmInitSystem1(VOID) if (!CmpInitializeSystemHive(KeLoaderBlock)) { /* Bugcheck */ - KEBUGCHECKEX(CONFIG_INITIALIZATION_FAILED, 1, 7, 0, 0); + KeBugCheckEx(CONFIG_INITIALIZATION_FAILED, 1, 7, 0, 0); } /* Create the 'CurrentControlSet' link. */ @@ -1434,7 +1434,7 @@ CmInitSystem1(VOID) if (!NT_SUCCESS(Status)) { /* Bugcheck */ - KEBUGCHECKEX(CONFIG_INITIALIZATION_FAILED, 1, 8, Status, 0); + KeBugCheckEx(CONFIG_INITIALIZATION_FAILED, 1, 8, Status, 0); } /* Create the hardware hive */ @@ -1451,7 +1451,7 @@ CmInitSystem1(VOID) if (!NT_SUCCESS(Status)) { /* Bugcheck */ - KEBUGCHECKEX(CONFIG_INITIALIZATION_FAILED, 1, 11, Status, 0); + KeBugCheckEx(CONFIG_INITIALIZATION_FAILED, 1, 11, Status, 0); } /* Add the hive to the hive list */ @@ -1467,7 +1467,7 @@ CmInitSystem1(VOID) if (!NT_SUCCESS(Status)) { /* Bugcheck */ - KEBUGCHECKEX(CONFIG_INITIALIZATION_FAILED, 1, 12, Status, 0); + KeBugCheckEx(CONFIG_INITIALIZATION_FAILED, 1, 12, Status, 0); } /* FIXME: Add to HiveList key */ @@ -1480,7 +1480,7 @@ CmInitSystem1(VOID) if (!NT_SUCCESS(Status)) { /* Bugcheck */ - KEBUGCHECKEX(CONFIG_INITIALIZATION_FAILED, 1, 13, Status, 0); + KeBugCheckEx(CONFIG_INITIALIZATION_FAILED, 1, 13, Status, 0); } /* Initialize machine-dependent information into the registry */ @@ -1488,7 +1488,7 @@ CmInitSystem1(VOID) if (!NT_SUCCESS(Status)) { /* Bugcheck */ - KEBUGCHECKEX(CONFIG_INITIALIZATION_FAILED, 1, 14, Status, 0); + KeBugCheckEx(CONFIG_INITIALIZATION_FAILED, 1, 14, Status, 0); } /* Initialize volatile registry settings */ @@ -1496,7 +1496,7 @@ CmInitSystem1(VOID) if (!NT_SUCCESS(Status)) { /* Bugcheck */ - KEBUGCHECKEX(CONFIG_INITIALIZATION_FAILED, 1, 15, Status, 0); + KeBugCheckEx(CONFIG_INITIALIZATION_FAILED, 1, 15, Status, 0); } /* Free the load options */ diff --git a/reactos/ntoskrnl/config/cmvalue.c b/reactos/ntoskrnl/config/cmvalue.c index 5eb5976e568..5ccd8372bfc 100644 --- a/reactos/ntoskrnl/config/cmvalue.c +++ b/reactos/ntoskrnl/config/cmvalue.c @@ -189,7 +189,7 @@ CmpValueToData(IN PHHIVE Hive, { /* Free the buffer and bugcheck */ ExFreePool(Buffer); - KEBUGCHECKEX(REGISTRY_ERROR, 8, 0, (ULONG_PTR)Hive, (ULONG_PTR)Value); + KeBugCheckEx(REGISTRY_ERROR, 8, 0, (ULONG_PTR)Hive, (ULONG_PTR)Value); } /* Otherwise, return the cell data */ diff --git a/reactos/ntoskrnl/dbgk/dbgkobj.c b/reactos/ntoskrnl/dbgk/dbgkobj.c index 2495dc51551..bc8c0c4c96b 100644 --- a/reactos/ntoskrnl/dbgk/dbgkobj.c +++ b/reactos/ntoskrnl/dbgk/dbgkobj.c @@ -712,7 +712,7 @@ DbgkpPostFakeThreadMessages(IN PEPROCESS Process, { /* We failed. FIXME: Handle this */ DPRINT1("Unhandled Dbgk codepath!\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } /* Check if this was the first message */ @@ -736,7 +736,7 @@ DbgkpPostFakeThreadMessages(IN PEPROCESS Process, { /* We failed. FIXME: Handle this */ DPRINT1("Unhandled Dbgk codepath!\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } /* Make sure we have a first thread */ diff --git a/reactos/ntoskrnl/ex/callback.c b/reactos/ntoskrnl/ex/callback.c index e5c21205b1e..429b0953719 100644 --- a/reactos/ntoskrnl/ex/callback.c +++ b/reactos/ntoskrnl/ex/callback.c @@ -177,7 +177,7 @@ ExReferenceCallBackBlock(IN OUT PEX_CALLBACK CallBack) /* FIXME: Race */ CallbackRoutineBlock = NULL; DPRINT1("Unhandled callback race condition\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } else { diff --git a/reactos/ntoskrnl/ex/handle.c b/reactos/ntoskrnl/ex/handle.c index 0cea474313e..efd27aea42c 100644 --- a/reactos/ntoskrnl/ex/handle.c +++ b/reactos/ntoskrnl/ex/handle.c @@ -661,7 +661,7 @@ ExpMoveFreeHandles(IN PHANDLE_TABLE HandleTable) } /* We are strict FIFO, we need to reverse the entries */ - KEBUGCHECK(0); + ASSERT(FALSE); return LastFree; } @@ -958,7 +958,7 @@ ExDestroyHandleTable(IN PHANDLE_TABLE HandleTable, if (DestroyHandleProcedure) { /* FIXME: */ - KEBUGCHECK(0); + ASSERT(FALSE); } /* Free the handle table */ diff --git a/reactos/ntoskrnl/ex/init.c b/reactos/ntoskrnl/ex/init.c index 2ecfb63d53a..4ce02eb6a69 100644 --- a/reactos/ntoskrnl/ex/init.c +++ b/reactos/ntoskrnl/ex/init.c @@ -981,7 +981,7 @@ ExpInitializeExecutive(IN ULONG Cpu, /* Now fill it in */ Status = RtlAnsiStringToUnicodeString(&NtSystemRoot, &AnsiPath, FALSE); - if (!NT_SUCCESS(Status)) KEBUGCHECK(SESSION3_INITIALIZATION_FAILED); + if (!NT_SUCCESS(Status)) KeBugCheck(SESSION3_INITIALIZATION_FAILED); /* Setup bugcheck messages */ KiInitializeBugCheck(); @@ -1002,7 +1002,7 @@ ExpInitializeExecutive(IN ULONG Cpu, } /* Initialize the executive at phase 0 */ - if (!ExInitSystem()) KEBUGCHECK(PHASE0_INITIALIZATION_FAILED); + if (!ExInitSystem()) KeBugCheck(PHASE0_INITIALIZATION_FAILED); /* Initialize the memory manager at phase 0 */ if (!MmInitSystem(0, LoaderBlock)) KeBugCheck(PHASE0_INITIALIZATION_FAILED); @@ -1203,16 +1203,16 @@ ExpInitializeExecutive(IN ULONG Cpu, #endif /* Create the Basic Object Manager Types to allow new Object Types */ - if (!ObInitSystem()) KEBUGCHECK(OBJECT_INITIALIZATION_FAILED); + if (!ObInitSystem()) KeBugCheck(OBJECT_INITIALIZATION_FAILED); /* Load basic Security for other Managers */ - if (!SeInitSystem()) KEBUGCHECK(SECURITY_INITIALIZATION_FAILED); + if (!SeInitSystem()) KeBugCheck(SECURITY_INITIALIZATION_FAILED); /* Initialize the Process Manager */ - if (!PsInitSystem(LoaderBlock)) KEBUGCHECK(PROCESS_INITIALIZATION_FAILED); + if (!PsInitSystem(LoaderBlock)) KeBugCheck(PROCESS_INITIALIZATION_FAILED); /* Initialize the PnP Manager */ - if (!PpInitSystem()) KEBUGCHECK(PP0_INITIALIZATION_FAILED); + if (!PpInitSystem()) KeBugCheck(PP0_INITIALIZATION_FAILED); /* Initialize the User-Mode Debugging Subsystem */ DbgkInitialize(); @@ -1532,7 +1532,7 @@ Phase1InitializationDiscard(IN PVOID Context) } /* Initialize the SRM in Phase 1 */ - if (!SeInitSystem()) KEBUGCHECK(SECURITY1_INITIALIZATION_FAILED); + if (!SeInitSystem()) KeBugCheck(SECURITY1_INITIALIZATION_FAILED); /* Update the progress bar */ InbvUpdateProgressBar(10); diff --git a/reactos/ntoskrnl/ex/locale.c b/reactos/ntoskrnl/ex/locale.c index b50eef2a396..bf1bf5047de 100644 --- a/reactos/ntoskrnl/ex/locale.c +++ b/reactos/ntoskrnl/ex/locale.c @@ -245,7 +245,7 @@ NtSetDefaultLocale(IN BOOLEAN UserProfile, { DPRINT1("TODO\n"); Status = STATUS_SUCCESS; - KEBUGCHECK(0); + ASSERT(FALSE); } else { @@ -395,7 +395,7 @@ NtSetDefaultUILanguage(IN LANGID LanguageId) { /* FIXME */ DPRINT1("TODO\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } /* Otherwise, call the internal routine */ diff --git a/reactos/ntoskrnl/ex/shutdown.c b/reactos/ntoskrnl/ex/shutdown.c index cee5482b087..bb3a0e74fc8 100644 --- a/reactos/ntoskrnl/ex/shutdown.c +++ b/reactos/ntoskrnl/ex/shutdown.c @@ -185,7 +185,7 @@ ShutdownThreadMain(PVOID Context) PKDPC Dpc = ExAllocatePool(NonPagedPool, sizeof(KDPC)); if (Dpc == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } KeInitializeDpc(Dpc, KiHaltProcessorDpcRoutine, (PVOID)Dpc); KeSetTargetProcessorDpc(Dpc, i); @@ -245,7 +245,7 @@ NtShutdownSystem(IN SHUTDOWN_ACTION Action) (PVOID)Action); if (!NT_SUCCESS(Status)) { - KEBUGCHECK(0); + ASSERT(FALSE); } Status = ObReferenceObjectByHandle(ThreadHandle, THREAD_ALL_ACCESS, @@ -256,7 +256,7 @@ NtShutdownSystem(IN SHUTDOWN_ACTION Action) NtClose(ThreadHandle); if (!NT_SUCCESS(Status)) { - KEBUGCHECK(0); + ASSERT(FALSE); } KeSetPriorityThread(&ShutdownThread->Tcb, LOW_REALTIME_PRIORITY + 1); diff --git a/reactos/ntoskrnl/ex/work.c b/reactos/ntoskrnl/ex/work.c index c17f498e4ed..f735b1749f3 100644 --- a/reactos/ntoskrnl/ex/work.c +++ b/reactos/ntoskrnl/ex/work.c @@ -177,7 +177,7 @@ ProcessLoop: if (KeGetCurrentIrql() != PASSIVE_LEVEL) { /* It didn't, bugcheck! */ - KEBUGCHECKEX(WORKER_THREAD_RETURNED_AT_BAD_IRQL, + KeBugCheckEx(WORKER_THREAD_RETURNED_AT_BAD_IRQL, (ULONG_PTR)WorkItem->WorkerRoutine, KeGetCurrentIrql(), (ULONG_PTR)WorkItem->Parameter, @@ -188,7 +188,7 @@ ProcessLoop: if (Thread->ActiveImpersonationInfo) { /* It didn't, bugcheck! */ - KEBUGCHECKEX(IMPERSONATING_WORKER_THREAD, + KeBugCheckEx(IMPERSONATING_WORKER_THREAD, (ULONG_PTR)WorkItem->WorkerRoutine, (ULONG_PTR)WorkItem->Parameter, (ULONG_PTR)WorkItem, @@ -628,7 +628,7 @@ ExQueueWorkItem(IN PWORK_QUEUE_ITEM WorkItem, if ((ULONG_PTR)WorkItem->WorkerRoutine < MmUserProbeAddress) { /* Bugcheck the system */ - KEBUGCHECKEX(WORKER_INVALID, + KeBugCheckEx(WORKER_INVALID, 1, (ULONG_PTR)WorkItem, (ULONG_PTR)WorkItem->WorkerRoutine, diff --git a/reactos/ntoskrnl/include/internal/cc.h b/reactos/ntoskrnl/include/internal/cc.h index c1ab3cffbd9..9993fc81f11 100644 --- a/reactos/ntoskrnl/include/internal/cc.h +++ b/reactos/ntoskrnl/include/internal/cc.h @@ -301,13 +301,4 @@ NTSTATUS NTAPI CcTryToInitializeFileCache(PFILE_OBJECT FileObject); -/* - * Macro for generic cache manage bugchecking. Note that this macro assumes - * that the file name including extension is always longer than 4 characters. - */ -#define KEBUGCHECKCC \ - KEBUGCHECKEX(CACHE_MANAGER, \ - (*(ULONG*)(__FILE__ + sizeof(__FILE__) - 4) << 16) | \ - (__LINE__ & 0xFFFF), 0, 0, 0) - #endif diff --git a/reactos/ntoskrnl/include/internal/ob_x.h b/reactos/ntoskrnl/include/internal/ob_x.h index 91877a4c661..f1bc04ce57d 100644 --- a/reactos/ntoskrnl/include/internal/ob_x.h +++ b/reactos/ntoskrnl/include/internal/ob_x.h @@ -113,7 +113,7 @@ ObpReferenceNameInfo(IN POBJECT_HEADER ObjectHeader) { /* FIXME: Unhandled*/ DbgPrint("OB: Unhandled path\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } /* Return the name information */ diff --git a/reactos/ntoskrnl/io/iomgr/device.c b/reactos/ntoskrnl/io/iomgr/device.c index 1fa5d0d6721..3c79e0250fc 100644 --- a/reactos/ntoskrnl/io/iomgr/device.c +++ b/reactos/ntoskrnl/io/iomgr/device.c @@ -1195,7 +1195,7 @@ IoGetRelatedDeviceObject(IN PFILE_OBJECT FileObject) { /* FIXME: Unhandled yet */ DPRINT1("FOEs not supported\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } } diff --git a/reactos/ntoskrnl/io/iomgr/driver.c b/reactos/ntoskrnl/io/iomgr/driver.c index c5a8bee7034..6db9421a465 100644 --- a/reactos/ntoskrnl/io/iomgr/driver.c +++ b/reactos/ntoskrnl/io/iomgr/driver.c @@ -819,7 +819,7 @@ IopInitializeBuiltinDriver(IN PLDR_DATA_TABLE_ENTRY LdrEntry) Status = IopCreateDeviceNode(IopRootDeviceNode, NULL, &ServiceName, &DeviceNode); if (!NT_SUCCESS(Status)) { - CPRINT("Driver '%wZ' load failed, status (%x)\n", ModuleName, Status); + DPRINT1("Driver '%wZ' load failed, status (%x)\n", ModuleName, Status); return(Status); } DeviceNode->ServiceName = ServiceName; diff --git a/reactos/ntoskrnl/io/iomgr/file.c b/reactos/ntoskrnl/io/iomgr/file.c index da7dfce3345..fd92560aee0 100644 --- a/reactos/ntoskrnl/io/iomgr/file.c +++ b/reactos/ntoskrnl/io/iomgr/file.c @@ -786,7 +786,7 @@ IopParseDevice(IN PVOID ParseObject, else if (Status == STATUS_REPARSE) { /* FIXME: We don't handle this at all! */ - KEBUGCHECK(0); + ASSERT(FALSE); } /* Get the owner of the File Object */ @@ -1405,7 +1405,7 @@ IopCloseFile(IN PEPROCESS Process OPTIONAL, if ((FileObject->LockOperation) && (SystemHandleCount != 1)) { DPRINT1("We need to unlock this file!\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } /* Make sure this is the last handle */ diff --git a/reactos/ntoskrnl/io/iomgr/remlock.c b/reactos/ntoskrnl/io/iomgr/remlock.c index 60b037b750a..2bd05720344 100644 --- a/reactos/ntoskrnl/io/iomgr/remlock.c +++ b/reactos/ntoskrnl/io/iomgr/remlock.c @@ -74,7 +74,7 @@ IoAcquireRemoveLockEx(IN PIO_REMOVE_LOCK RemoveLock, { /* FIXME: Not yet supported */ DPRINT1("UNIMPLEMENTED\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } } else @@ -110,7 +110,7 @@ IoReleaseRemoveLockEx(IN PIO_REMOVE_LOCK RemoveLock, { /* FIXME: Not yet supported */ DPRINT1("UNIMPLEMENTED\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } /* Decrement the lock count */ @@ -150,7 +150,7 @@ IoReleaseRemoveLockAndWaitEx(IN PIO_REMOVE_LOCK RemoveLock, { /* FIXME: Not yet supported */ DPRINT1("UNIMPLEMENTED\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } } diff --git a/reactos/ntoskrnl/io/iomgr/volume.c b/reactos/ntoskrnl/io/iomgr/volume.c index 14adb252c10..102ae54e860 100644 --- a/reactos/ntoskrnl/io/iomgr/volume.c +++ b/reactos/ntoskrnl/io/iomgr/volume.c @@ -140,7 +140,7 @@ IopDereferenceVpb(IN PVPB Vpb) if (!Vpb->ReferenceCount) { /* FIXME: IMPLEMENT CLEANUP! */ - KEBUGCHECK(0); + ASSERT(FALSE); } /* Release VPB lock */ diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c index dfefe0e9f80..b06f3d4893b 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c @@ -937,7 +937,7 @@ IopAssignDeviceResources( 0x3c /* PCI_INTERRUPT_LINE */, sizeof(UCHAR)); if (ret == 0 || ret == 2) - KEBUGCHECK(0); + ASSERT(FALSE); } } } @@ -2057,7 +2057,7 @@ IopActionInitChildServices(PDEVICE_NODE DeviceNode, IopDeviceNodeSetFlag(DeviceNode, DNF_DISABLED); IopDeviceNodeSetFlag(DeviceNode, DNF_START_FAILED); /* FIXME: Log the error (possibly in IopInitializeDeviceNodeService) */ - CPRINT("Initialization of service %S failed (Status %x)\n", + DPRINT1("Initialization of service %S failed (Status %x)\n", DeviceNode->ServiceName.Buffer, Status); } } @@ -2846,8 +2846,8 @@ PnpInit(VOID) Status = IopInitPlugPlayEvents(); if (!NT_SUCCESS(Status)) { - CPRINT("IopInitPlugPlayEvents() failed\n"); - KEBUGCHECKEX(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0); + DPRINT1("IopInitPlugPlayEvents() failed\n"); + KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0); } /* @@ -2857,30 +2857,30 @@ PnpInit(VOID) Status = IopCreateDriver(NULL, PnpDriverInitializeEmpty, NULL, 0, 0, &IopRootDriverObject); if (!NT_SUCCESS(Status)) { - CPRINT("IoCreateDriverObject() failed\n"); - KEBUGCHECKEX(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0); + DPRINT1("IoCreateDriverObject() failed\n"); + KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0); } Status = IoCreateDevice(IopRootDriverObject, 0, NULL, FILE_DEVICE_CONTROLLER, 0, FALSE, &Pdo); if (!NT_SUCCESS(Status)) { - CPRINT("IoCreateDevice() failed\n"); - KEBUGCHECKEX(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0); + DPRINT1("IoCreateDevice() failed\n"); + KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0); } Status = IopCreateDeviceNode(NULL, Pdo, NULL, &IopRootDeviceNode); if (!NT_SUCCESS(Status)) { - CPRINT("Insufficient resources\n"); - KEBUGCHECKEX(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0); + DPRINT1("Insufficient resources\n"); + KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0); } if (!RtlCreateUnicodeString(&IopRootDeviceNode->InstancePath, L"HTREE\\ROOT\\0")) { - CPRINT("Failed to create the instance path!\n"); - KEBUGCHECKEX(PHASE1_INITIALIZATION_FAILED, STATUS_NO_MEMORY, 0, 0, 0); + DPRINT1("Failed to create the instance path!\n"); + KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, STATUS_NO_MEMORY, 0, 0, 0); } /* Report the device to the user-mode pnp manager */ @@ -2898,8 +2898,8 @@ PnpInit(VOID) Status = IopUpdateRootKey(); if (!NT_SUCCESS(Status)) { - CPRINT("IopUpdateRootKey() failed\n"); - KEBUGCHECKEX(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0); + DPRINT1("IopUpdateRootKey() failed\n"); + KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0); } } @@ -2910,7 +2910,7 @@ PiCompareInstancePath(IN PRTL_AVL_TABLE Table, IN PVOID SecondStruct) { /* FIXME: TODO */ - KEBUGCHECK(0); + ASSERT(FALSE); return 0; } @@ -2925,7 +2925,7 @@ PiAllocateGenericTableEntry(IN PRTL_AVL_TABLE Table, IN CLONG ByteSize) { /* FIXME: TODO */ - KEBUGCHECK(0); + ASSERT(FALSE); return NULL; } @@ -2935,7 +2935,7 @@ PiFreeGenericTableEntry(IN PRTL_AVL_TABLE Table, IN PVOID Buffer) { /* FIXME: TODO */ - KEBUGCHECK(0); + ASSERT(FALSE); } VOID diff --git a/reactos/ntoskrnl/io/pnpmgr/pnproot.c b/reactos/ntoskrnl/io/pnpmgr/pnproot.c index 3742ad85d92..3643446926c 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnproot.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnproot.c @@ -1076,7 +1076,7 @@ PnpRootAddDevice( { DPRINT("PhysicalDeviceObject 0x%p\n", PhysicalDeviceObject); Status = STATUS_INSUFFICIENT_RESOURCES; - KEBUGCHECKEX(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0); + KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0); } Status = IoCreateDevice( @@ -1090,7 +1090,7 @@ PnpRootAddDevice( if (!NT_SUCCESS(Status)) { DPRINT("IoCreateDevice() failed with status 0x%08lx\n", Status); - KEBUGCHECKEX(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0); + KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0); } DPRINT("Created FDO %p\n", PnpRootDeviceObject); @@ -1110,7 +1110,7 @@ PnpRootAddDevice( if (!NT_SUCCESS(Status)) { DPRINT("IoAttachDeviceToDeviceStackSafe() failed with status 0x%08lx\n", Status); - KEBUGCHECKEX(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0); + KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0); } PnpRootDeviceObject->Flags &= ~DO_DEVICE_INITIALIZING; diff --git a/reactos/ntoskrnl/kd/kdmain.c b/reactos/ntoskrnl/kd/kdmain.c index eacf3ef8e7d..0858982cce5 100644 --- a/reactos/ntoskrnl/kd/kdmain.c +++ b/reactos/ntoskrnl/kd/kdmain.c @@ -59,7 +59,7 @@ KdpServiceDispatcher(ULONG Service, break; case ManualBugCheck: - KEBUGCHECK(MANUALLY_INITIATED_CRASH); + KeBugCheck(MANUALLY_INITIATED_CRASH); break; case DumpNonPagedPoolStats: diff --git a/reactos/ntoskrnl/kdbg/kdb.c b/reactos/ntoskrnl/kdbg/kdb.c index cbe4b9a72eb..9e6c843659a 100644 --- a/reactos/ntoskrnl/kdbg/kdb.c +++ b/reactos/ntoskrnl/kdbg/kdb.c @@ -1331,7 +1331,7 @@ KdbEnterDebuggerException( BreakPoint->Data.SavedInstruction, NULL))) { KdbpPrint("Couldn't restore original instruction after INT3! Cannot continue execution.\n"); - KEBUGCHECK(0); + KeBugCheck(0); // FIXME: Proper bugcode! } } diff --git a/reactos/ntoskrnl/kdbg/kdb_cli.c b/reactos/ntoskrnl/kdbg/kdb_cli.c index 6c157563583..9d907818f72 100644 --- a/reactos/ntoskrnl/kdbg/kdb_cli.c +++ b/reactos/ntoskrnl/kdbg/kdb_cli.c @@ -1689,7 +1689,7 @@ KdbpCmdTss(ULONG Argc, PCHAR Argv[]) STATIC BOOLEAN KdbpCmdBugCheck(ULONG Argc, PCHAR Argv[]) { - KEBUGCHECK(0xDEADDEAD); + KeBugCheck(0xDEADDEAD); return TRUE; } diff --git a/reactos/ntoskrnl/ke/apc.c b/reactos/ntoskrnl/ke/apc.c index 688585526e8..0f658e988f9 100644 --- a/reactos/ntoskrnl/ke/apc.c +++ b/reactos/ntoskrnl/ke/apc.c @@ -478,7 +478,7 @@ Quickie: if (Process != Thread->ApcState.Process) { /* Erm, we got attached or something! BAD! */ - KEBUGCHECKEX(INVALID_PROCESS_ATTACH_ATTEMPT, + KeBugCheckEx(INVALID_PROCESS_ATTACH_ATTEMPT, (ULONG_PTR)Process, (ULONG_PTR)Thread->ApcState.Process, Thread->ApcStateIndex, diff --git a/reactos/ntoskrnl/ke/clock.c b/reactos/ntoskrnl/ke/clock.c index 71b46c60c0d..938399bb62b 100644 --- a/reactos/ntoskrnl/ke/clock.c +++ b/reactos/ntoskrnl/ke/clock.c @@ -76,7 +76,7 @@ KeSetSystemTime(IN PLARGE_INTEGER NewTime, KeLowerIrql(OldIrql2); /* Check if we need to adjust interrupt time */ - if (FixInterruptTime) KEBUGCHECK(0); + if (FixInterruptTime) ASSERT(FALSE); /* Setup a temporary list of absolute timers */ InitializeListHead(&TempList); diff --git a/reactos/ntoskrnl/ke/freeldr.c b/reactos/ntoskrnl/ke/freeldr.c index 8c406bbbd78..c69a2c2f9aa 100644 --- a/reactos/ntoskrnl/ke/freeldr.c +++ b/reactos/ntoskrnl/ke/freeldr.c @@ -73,7 +73,7 @@ NTAPI KiRosGetMdFromArray(VOID) { /* Return the next MD from the list, but make sure we don't overflow */ - if (BldrCurrentMd > 60) KEBUGCHECK(0); + if (BldrCurrentMd > 60) ASSERT(FALSE); return &BldrMemoryDescriptors[BldrCurrentMd++]; } diff --git a/reactos/ntoskrnl/ke/i386/kiinit.c b/reactos/ntoskrnl/ke/i386/kiinit.c index a87d09638f7..416b3433f20 100644 --- a/reactos/ntoskrnl/ke/i386/kiinit.c +++ b/reactos/ntoskrnl/ke/i386/kiinit.c @@ -294,7 +294,7 @@ KiInitMachineDependent(VOID) if (KiMXCsrMask != MXCsrMask) { /* No, something is definitely wrong */ - KEBUGCHECKEX(MULTIPROCESSOR_CONFIGURATION_NOT_SUPPORTED, + KeBugCheckEx(MULTIPROCESSOR_CONFIGURATION_NOT_SUPPORTED, KF_FXSR, KiMXCsrMask, MXCsrMask, diff --git a/reactos/ntoskrnl/ke/i386/usercall.c b/reactos/ntoskrnl/ke/i386/usercall.c index 71221e49447..cc2f418a22f 100644 --- a/reactos/ntoskrnl/ke/i386/usercall.c +++ b/reactos/ntoskrnl/ke/i386/usercall.c @@ -116,7 +116,7 @@ KiInitializeUserApc(IN PKEXCEPTION_FRAME ExceptionFrame, TrapFrame->EFlags = Ke386SanitizeFlags(Context.EFlags, UserMode); /* Check if thread has IOPL and force it enabled if so */ - if (KeGetCurrentThread()->Iopl) TrapFrame->EFlags |= 0x3000; + if (KeGetCurrentThread()->Iopl) TrapFrame->EFlags |= EFLAGS_IOPL; /* Setup the stack */ *(PULONG_PTR)(Stack + 0 * sizeof(ULONG_PTR)) = (ULONG_PTR)NormalRoutine; diff --git a/reactos/ntoskrnl/ke/powerpc/exp.c b/reactos/ntoskrnl/ke/powerpc/exp.c index 3d9a04459e2..8534a57ee1f 100644 --- a/reactos/ntoskrnl/ke/powerpc/exp.c +++ b/reactos/ntoskrnl/ke/powerpc/exp.c @@ -104,7 +104,7 @@ KiDispatchException(IN PEXCEPTION_RECORD ExceptionRecord, DbgPrint("EXCEPTION! Record %08x Frame %08x\n", ExceptionRecord, ExceptionFrame); MmuDumpMap(); - KEBUGCHECK(0); + KeBugCheck(0); } /* diff --git a/reactos/ntoskrnl/ke/procobj.c b/reactos/ntoskrnl/ke/procobj.c index 242dc28a298..a2bd61401cb 100644 --- a/reactos/ntoskrnl/ke/procobj.c +++ b/reactos/ntoskrnl/ke/procobj.c @@ -458,7 +458,7 @@ KeAttachProcess(IN PKPROCESS Process) (KeIsExecutingDpc())) { /* Invalid attempt */ - KEBUGCHECKEX(INVALID_PROCESS_ATTACH_ATTEMPT, + KeBugCheckEx(INVALID_PROCESS_ATTACH_ATTEMPT, (ULONG_PTR)Process, (ULONG_PTR)Thread->ApcState.Process, Thread->ApcStateIndex, @@ -580,7 +580,7 @@ KeStackAttachProcess(IN PKPROCESS Process, if (KeIsExecutingDpc()) { /* Executing a DPC, crash! */ - KEBUGCHECKEX(INVALID_PROCESS_ATTACH_ATTEMPT, + KeBugCheckEx(INVALID_PROCESS_ATTACH_ATTEMPT, (ULONG_PTR)Process, (ULONG_PTR)Thread->ApcState.Process, Thread->ApcStateIndex, @@ -662,7 +662,7 @@ KeUnstackDetachProcess(IN PRKAPC_STATE ApcState) (!IsListEmpty(&Thread->ApcState.ApcListHead[UserMode]))) { /* Bugcheck the system */ - KEBUGCHECK(INVALID_PROCESS_DETACH_ATTEMPT); + KeBugCheck(INVALID_PROCESS_DETACH_ATTEMPT); } /* Get the process */ diff --git a/reactos/ntoskrnl/ke/thrdschd.c b/reactos/ntoskrnl/ke/thrdschd.c index 04db88dd24b..8f1f52570ee 100644 --- a/reactos/ntoskrnl/ke/thrdschd.c +++ b/reactos/ntoskrnl/ke/thrdschd.c @@ -378,7 +378,7 @@ KiReadyThread(IN PKTHREAD Thread) if (Process->State != ProcessInMemory) { /* We don't page out processes in ROS */ - KEBUGCHECK(0); + ASSERT(FALSE); } else if (!Thread->KernelStackResident) { @@ -391,7 +391,7 @@ KiReadyThread(IN PKTHREAD Thread) Thread->State = Transition; /* The stack is always resident in ROS */ - KEBUGCHECK(0); + ASSERT(FALSE); } else { @@ -610,7 +610,7 @@ KiSetPriorityThread(IN PKTHREAD Thread, { /* FIXME: TODO */ DPRINT1("Deferred state not yet supported\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } else { diff --git a/reactos/ntoskrnl/ke/wait.c b/reactos/ntoskrnl/ke/wait.c index a37b4a092ae..2ec2cec5159 100644 --- a/reactos/ntoskrnl/ke/wait.c +++ b/reactos/ntoskrnl/ke/wait.c @@ -520,7 +520,7 @@ KeWaitForMultipleObjects(IN ULONG Count, if (Count > THREAD_WAIT_OBJECTS) { /* Bugcheck */ - KEBUGCHECK(MAXIMUM_WAIT_OBJECTS_EXCEEDED); + KeBugCheck(MAXIMUM_WAIT_OBJECTS_EXCEEDED); } /* Use the Thread's Wait Block */ @@ -532,7 +532,7 @@ KeWaitForMultipleObjects(IN ULONG Count, if (Count > MAXIMUM_WAIT_OBJECTS) { /* Bugcheck */ - KEBUGCHECK(MAXIMUM_WAIT_OBJECTS_EXCEEDED); + KeBugCheck(MAXIMUM_WAIT_OBJECTS_EXCEEDED); } } diff --git a/reactos/ntoskrnl/lpc/close.c b/reactos/ntoskrnl/lpc/close.c index d142d0f50a9..173fcdf8794 100644 --- a/reactos/ntoskrnl/lpc/close.c +++ b/reactos/ntoskrnl/lpc/close.c @@ -40,7 +40,7 @@ LpcExitThread(IN PETHREAD Thread) if (Message) { /* FIXME: TODO */ - KEBUGCHECK(0); + ASSERT(FALSE); } /* Release the lock */ diff --git a/reactos/ntoskrnl/mm/anonmem.c b/reactos/ntoskrnl/mm/anonmem.c index b10a4e0af97..2bd93fc658d 100644 --- a/reactos/ntoskrnl/mm/anonmem.c +++ b/reactos/ntoskrnl/mm/anonmem.c @@ -163,7 +163,7 @@ MmPageOutVirtualMemory(PMM_AVL_TABLE AddressSpace, if (Page == 0) { - KEBUGCHECK(0); + ASSERT(FALSE); } /* @@ -301,7 +301,7 @@ MmNotPresentFaultVirtualMemory(PMM_AVL_TABLE AddressSpace, if (PageOp == NULL) { DPRINT1("MmGetPageOp failed"); - KEBUGCHECK(0); + ASSERT(FALSE); } /* @@ -322,12 +322,12 @@ MmNotPresentFaultVirtualMemory(PMM_AVL_TABLE AddressSpace, if (Status != STATUS_SUCCESS) { DPRINT1("Failed to wait for page op\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (PageOp->Status == STATUS_PENDING) { DPRINT1("Woke for page op before completion\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } /* * If this wasn't a pagein then we need to restart the handling @@ -373,7 +373,7 @@ MmNotPresentFaultVirtualMemory(PMM_AVL_TABLE AddressSpace, if (!NT_SUCCESS(Status)) { DPRINT1("MmRequestPageMemoryConsumer failed, status = %x\n", Status); - KEBUGCHECK(0); + ASSERT(FALSE); } /* @@ -387,7 +387,7 @@ MmNotPresentFaultVirtualMemory(PMM_AVL_TABLE AddressSpace, Status = MmReadFromSwapPage(SwapEntry, Page); if (!NT_SUCCESS(Status)) { - KEBUGCHECK(0); + ASSERT(FALSE); } MmSetSavedSwapEntryPage(Page, SwapEntry); } @@ -414,7 +414,7 @@ MmNotPresentFaultVirtualMemory(PMM_AVL_TABLE AddressSpace, if (!NT_SUCCESS(Status)) { DPRINT1("MmCreateVirtualMapping failed, not out of memory\n"); - KEBUGCHECK(0); + ASSERT(FALSE); return(Status); } @@ -870,7 +870,7 @@ MmFreeVirtualMemory(PEPROCESS Process, if (Status != STATUS_SUCCESS) { DPRINT1("Failed to wait for page op\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } MmLockAddressSpace(&Process->VadRoot); MmReleasePageOp(PageOp); diff --git a/reactos/ntoskrnl/mm/balance.c b/reactos/ntoskrnl/mm/balance.c index 03608ea3086..5c23dc588b0 100644 --- a/reactos/ntoskrnl/mm/balance.c +++ b/reactos/ntoskrnl/mm/balance.c @@ -97,7 +97,7 @@ MmReleasePageMemoryConsumer(ULONG Consumer, PFN_TYPE Page) if (Page == 0) { DPRINT1("Tried to release page zero.\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } KeAcquireSpinLock(&AllocationListLock, &oldIrql); @@ -169,7 +169,7 @@ MmRebalanceMemoryConsumers(VOID) Status = MiMemoryConsumers[i].Trim(Target, 0, &NrFreedPages); if (!NT_SUCCESS(Status)) { - KEBUGCHECK(0); + ASSERT(FALSE); } Target = Target - NrFreedPages; } @@ -215,7 +215,7 @@ MmRequestPageMemoryConsumer(ULONG Consumer, BOOLEAN CanWait, Page = MmAllocPage(Consumer, 0); if (Page == 0) { - KEBUGCHECK(NO_PAGES_AVAILABLE); + KeBugCheck(NO_PAGES_AVAILABLE); } *AllocatedPage = Page; if (MmStats.NrFreePages <= MiMinimumAvailablePages && @@ -263,7 +263,7 @@ MmRequestPageMemoryConsumer(ULONG Consumer, BOOLEAN CanWait, Page = Request.Page; if (Page == 0) { - KEBUGCHECK(NO_PAGES_AVAILABLE); + KeBugCheck(NO_PAGES_AVAILABLE); } /* Update the Consumer */ MiGetPfnEntry(Page)->Flags.Consumer = Consumer; @@ -279,7 +279,7 @@ MmRequestPageMemoryConsumer(ULONG Consumer, BOOLEAN CanWait, Page = MmAllocPage(Consumer, 0); if (Page == 0) { - KEBUGCHECK(NO_PAGES_AVAILABLE); + KeBugCheck(NO_PAGES_AVAILABLE); } if(Consumer == MC_USER) MmInsertLRULastUserPage(Page); *AllocatedPage = Page; @@ -327,7 +327,7 @@ MiBalancerThread(PVOID Unused) Status = MiMemoryConsumers[i].Trim(MiMinimumPagesPerRun, 0, &NrFreedPages); if (!NT_SUCCESS(Status)) { - KEBUGCHECK(0); + ASSERT(FALSE); } } } @@ -359,7 +359,7 @@ MiBalancerThread(PVOID Unused) Status = MiMemoryConsumers[i].Trim(Target, 0, &NrFreedPages); if (!NT_SUCCESS(Status)) { - KEBUGCHECK(0); + ASSERT(FALSE); } } } @@ -368,7 +368,7 @@ MiBalancerThread(PVOID Unused) else { DPRINT1("KeWaitForMultipleObjects failed, status = %x\n", Status); - KEBUGCHECK(0); + ASSERT(FALSE); } } } @@ -409,7 +409,7 @@ MiInitBalancerThread(VOID) NULL); if (!NT_SUCCESS(Status)) { - KEBUGCHECK(0); + ASSERT(FALSE); } Priority = LOW_REALTIME_PRIORITY + 1; diff --git a/reactos/ntoskrnl/mm/freelist.c b/reactos/ntoskrnl/mm/freelist.c index 0327faf8f99..0f5bda54bb3 100644 --- a/reactos/ntoskrnl/mm/freelist.c +++ b/reactos/ntoskrnl/mm/freelist.c @@ -270,7 +270,7 @@ MmInitializePageList(VOID) if (!NT_SUCCESS(Status)) { DPRINT1("Unable to create virtual mapping\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } } else @@ -416,7 +416,7 @@ MmMarkPageMapped(PFN_TYPE Pfn) if (Page->Flags.Type == MM_PHYSICAL_PAGE_FREE) { DPRINT1("Mapping non-used page\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } Page->MapCount++; Page->ReferenceCount++; @@ -438,12 +438,12 @@ MmMarkPageUnmapped(PFN_TYPE Pfn) if (Page->Flags.Type == MM_PHYSICAL_PAGE_FREE) { DPRINT1("Unmapping non-used page\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (Page->MapCount == 0) { DPRINT1("Unmapping not mapped page\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } Page->MapCount--; Page->ReferenceCount--; @@ -511,7 +511,7 @@ MmReferencePageUnsafe(PFN_TYPE Pfn) if (Page->Flags.Type != MM_PHYSICAL_PAGE_USED) { DPRINT1("Referencing non-used page\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } Page->ReferenceCount++; @@ -542,7 +542,7 @@ MmGetReferenceCountPage(PFN_TYPE Pfn) if (Page->Flags.Type != MM_PHYSICAL_PAGE_USED) { DPRINT1("Getting reference count for free page\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } RCount = Page->ReferenceCount; @@ -577,12 +577,12 @@ MmDereferencePage(PFN_TYPE Pfn) if (Page->Flags.Type != MM_PHYSICAL_PAGE_USED) { DPRINT1("Dereferencing free page\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (Page->ReferenceCount == 0) { DPRINT1("Derefrencing page with reference count 0\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } Page->ReferenceCount--; @@ -594,29 +594,29 @@ MmDereferencePage(PFN_TYPE Pfn) if (Page->RmapListHead != NULL) { DPRINT1("Freeing page with rmap entries.\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (Page->MapCount != 0) { DPRINT1("Freeing mapped page (0x%x count %d)\n", Pfn << PAGE_SHIFT, Page->MapCount); - KEBUGCHECK(0); + ASSERT(FALSE); } if (Page->LockCount > 0) { DPRINT1("Freeing locked page\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (Page->SavedSwapEntry != 0) { DPRINT1("Freeing page with swap entry.\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (Page->Flags.Type != MM_PHYSICAL_PAGE_USED) { DPRINT1("Freeing page with flags %x\n", Page->Flags.Type); - KEBUGCHECK(0); + ASSERT(FALSE); } Page->Flags.Type = MM_PHYSICAL_PAGE_FREE; Page->Flags.Consumer = MC_MAXIMUM; @@ -647,7 +647,7 @@ MmGetLockCountPage(PFN_TYPE Pfn) if (Page->Flags.Type != MM_PHYSICAL_PAGE_USED) { DPRINT1("Getting lock count for free page\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } LockCount = Page->LockCount; @@ -671,7 +671,7 @@ MmLockPageUnsafe(PFN_TYPE Pfn) if (Page->Flags.Type != MM_PHYSICAL_PAGE_USED) { DPRINT1("Locking free page\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } Page->LockCount++; @@ -702,7 +702,7 @@ MmUnlockPage(PFN_TYPE Pfn) if (Page->Flags.Type != MM_PHYSICAL_PAGE_USED) { DPRINT1("Unlocking free page\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } Page->LockCount--; @@ -757,17 +757,17 @@ MmAllocPage(ULONG Consumer, SWAPENTRY SavedSwapEntry) if (PageDescriptor->Flags.Type != MM_PHYSICAL_PAGE_FREE) { DPRINT1("Got non-free page from freelist\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (PageDescriptor->MapCount != 0) { DPRINT1("Got mapped page from freelist\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (PageDescriptor->ReferenceCount != 0) { DPRINT1("%d\n", PageDescriptor->ReferenceCount); - KEBUGCHECK(0); + ASSERT(FALSE); } PageDescriptor->Flags.Type = MM_PHYSICAL_PAGE_USED; PageDescriptor->Flags.Consumer = Consumer; @@ -789,7 +789,7 @@ MmAllocPage(ULONG Consumer, SWAPENTRY SavedSwapEntry) if (PageDescriptor->MapCount != 0) { DPRINT1("Returning mapped page.\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } return PfnOffset; } @@ -970,7 +970,7 @@ MmZeroPageThreadMain(PVOID Ignored) if (!NT_SUCCESS(Status)) { DPRINT1("ZeroPageThread: Wait failed\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (ZeroPageThreadShouldTerminate) @@ -995,7 +995,7 @@ MmZeroPageThreadMain(PVOID Ignored) if (PageDescriptor->MapCount != 0) { DPRINT1("Mapped page on freelist.\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } PageDescriptor->Flags.Zero = 1; PageDescriptor->Flags.Type = MM_PHYSICAL_PAGE_FREE; diff --git a/reactos/ntoskrnl/mm/i386/page.c b/reactos/ntoskrnl/mm/i386/page.c index ba1c9916994..7adff6a6493 100644 --- a/reactos/ntoskrnl/mm/i386/page.c +++ b/reactos/ntoskrnl/mm/i386/page.c @@ -97,7 +97,7 @@ ProtectToPTE(ULONG flProtect) else { DPRINT1("Unknown main protection type.\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (flProtect & PAGE_SYSTEM) @@ -241,7 +241,7 @@ MmDeletePageTable(PEPROCESS Process, PVOID Address) if (Address >= MmSystemRangeStart) { - KEBUGCHECK(0); + ASSERT(FALSE); // MmGlobalKernelPageDirectory[ADDR_TO_PDE_OFFSET(Address)] = 0; } if (Process != NULL && Process != CurrentProcess) @@ -264,7 +264,7 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create) PageDir = MmCreateHyperspaceMapping(PTE_TO_PFN(Process->Pcb.DirectoryTableBase[0])); if (PageDir == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } if (0 == InterlockedCompareExchangePte(&PageDir[PdeOffset], 0, 0)) { @@ -276,7 +276,7 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create) Status = MmRequestPageMemoryConsumer(MC_NPPOOL, FALSE, &Pfn); if (!NT_SUCCESS(Status) || Pfn == 0) { - KEBUGCHECK(0); + ASSERT(FALSE); } Entry = InterlockedCompareExchangePte(&PageDir[PdeOffset], PFN_TO_PTE(Pfn) | PA_PRESENT | PA_READWRITE | PA_USER, 0); if (Entry != 0) @@ -293,7 +293,7 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create) Pt = MmCreateHyperspaceMapping(Pfn); if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } return Pt + ADDR_TO_PTE_OFFSET(Address); } @@ -311,7 +311,7 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create) Status = MmRequestPageMemoryConsumer(MC_NPPOOL, FALSE, &Pfn); if (!NT_SUCCESS(Status) || Pfn == 0) { - KEBUGCHECK(0); + ASSERT(FALSE); } Entry = PFN_TO_PTE(Pfn) | PA_PRESENT | PA_READWRITE; if (Ke386GlobalPagesEnabled) @@ -334,7 +334,7 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create) Status = MmRequestPageMemoryConsumer(MC_NPPOOL, FALSE, &Pfn); if (!NT_SUCCESS(Status) || Pfn == 0) { - KEBUGCHECK(0); + ASSERT(FALSE); } Entry = InterlockedCompareExchangePte(PageDir, PFN_TO_PTE(Pfn) | PA_PRESENT | PA_READWRITE | PA_USER, 0); if (Entry != 0) @@ -403,7 +403,7 @@ MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPF Pt = MmGetPageTableForProcess(Process, Address, FALSE); if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } /* * Atomically disable the present bit and get the old value. @@ -417,7 +417,7 @@ MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPF WasValid = (PAGE_MASK(Pte) != 0); if (!WasValid) { - KEBUGCHECK(0); + ASSERT(FALSE); } /* @@ -582,14 +582,14 @@ MmSetCleanPage(PEPROCESS Process, PVOID Address) if (Address < MmSystemRangeStart && Process == NULL) { DPRINT1("MmSetCleanPage is called for user space without a process.\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } Pt = MmGetPageTableForProcess(Process, Address, FALSE); if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } do @@ -617,13 +617,13 @@ MmSetDirtyPage(PEPROCESS Process, PVOID Address) if (Address < MmSystemRangeStart && Process == NULL) { DPRINT1("MmSetDirtyPage is called for user space without a process.\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } Pt = MmGetPageTableForProcess(Process, Address, FALSE); if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } do @@ -650,7 +650,7 @@ MmEnableVirtualMapping(PEPROCESS Process, PVOID Address) Pt = MmGetPageTableForProcess(Process, Address, FALSE); if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } do @@ -704,7 +704,7 @@ MmCreateVirtualMappingForKernel(PVOID Address, if (Address < MmSystemRangeStart) { DPRINT1("MmCreateVirtualMappingForKernel is called for user space\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } Attributes = ProtectToPTE(flProtect); @@ -724,7 +724,7 @@ MmCreateVirtualMappingForKernel(PVOID Address, Pt = MmGetPageTableForProcess(NULL, Addr, TRUE); if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } Pt--; @@ -735,7 +735,7 @@ MmCreateVirtualMappingForKernel(PVOID Address, DPRINT1("Setting physical address but not allowing access at address " "0x%.8X with attributes %x/%x.\n", Addr, Attributes, flProtect); - KEBUGCHECK(0); + ASSERT(FALSE); } PdeOffset = ADDR_TO_PDE_OFFSET(Addr); @@ -744,7 +744,7 @@ MmCreateVirtualMappingForKernel(PVOID Address, Pt = MmGetPageTableForProcess(NULL, Addr, TRUE); if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } } else @@ -756,7 +756,7 @@ MmCreateVirtualMappingForKernel(PVOID Address, Pte = *Pt; if (Pte != 0) { - KEBUGCHECK(0); + ASSERT(FALSE); } InterlockedExchangePte(Pt, PFN_TO_PTE(Pages[i]) | Attributes); } @@ -776,22 +776,22 @@ MmCreatePageFileMapping(PEPROCESS Process, if (Process == NULL && Address < MmSystemRangeStart) { DPRINT1("No process\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (Process != NULL && Address >= MmSystemRangeStart) { DPRINT1("Setting kernel address with process context\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (SwapEntry & (1 << 31)) { - KEBUGCHECK(0); + ASSERT(FALSE); } Pt = MmGetPageTableForProcess(Process, Address, TRUE); if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } Pte = *Pt; if (PAGE_MASK((Pte)) != 0) @@ -836,13 +836,13 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process, if (Address < MmSystemRangeStart) { DPRINT1("No process\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (PageCount > 0x10000 || (ULONG_PTR) Address / PAGE_SIZE + PageCount > 0x100000) { DPRINT1("Page count to large\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } } else @@ -850,14 +850,14 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process, if (Address >= MmSystemRangeStart) { DPRINT1("Setting kernel address with process context\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (PageCount > (ULONG_PTR)MmSystemRangeStart / PAGE_SIZE || (ULONG_PTR) Address / PAGE_SIZE + PageCount > (ULONG_PTR)MmSystemRangeStart / PAGE_SIZE) { DPRINT1("Page Count to large\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } } @@ -889,7 +889,7 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process, DPRINT1("Setting physical address but not allowing access at address " "0x%.8X with attributes %x/%x.\n", Addr, Attributes, flProtect); - KEBUGCHECK(0); + ASSERT(FALSE); } PdeOffset = ADDR_TO_PDE_OFFSET(Addr); if (oldPdeOffset != PdeOffset) @@ -898,7 +898,7 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process, Pt = MmGetPageTableForProcess(Process, Addr, TRUE); if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } } else @@ -911,7 +911,7 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process, MmMarkPageMapped(Pages[i]); if (PAGE_MASK((Pte)) != 0 && !((Pte) & PA_PRESENT)) { - KEBUGCHECK(0); + ASSERT(FALSE); } if (PAGE_MASK((Pte)) != 0) { @@ -950,7 +950,7 @@ MmCreateVirtualMapping(PEPROCESS Process, if (!MmIsPageInUse(Pages[i])) { DPRINT1("Page at address %x not in use\n", PFN_TO_PTE(Pages[i])); - KEBUGCHECK(0); + ASSERT(FALSE); } } @@ -1035,7 +1035,7 @@ MmSetPageProtect(PEPROCESS Process, PVOID Address, ULONG flProtect) Pt = MmGetPageTableForProcess(Process, Address, FALSE); if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } InterlockedExchangePte(Pt, PAGE_MASK(*Pt) | Attributes | (*Pt & (PA_ACCESSED|PA_DIRTY))); MiFlushTlb(Pt, Address); @@ -1099,7 +1099,7 @@ MmCreateHyperspaceMapping(PFN_TYPE Page) } if (i >= Page % 1024) { - KEBUGCHECK(0); + ASSERT(FALSE); } } } @@ -1124,7 +1124,7 @@ MmCreateHyperspaceMapping(PFN_TYPE Page) } if (i <= Page % 1024) { - KEBUGCHECK(0); + ASSERT(FALSE); } } } @@ -1158,7 +1158,7 @@ MmUpdatePageDir(PEPROCESS Process, PVOID Address, ULONG Size) if (Address < MmSystemRangeStart) { - KEBUGCHECK(0); + ASSERT(FALSE); } StartOffset = ADDR_TO_PDE_OFFSET(Address); @@ -1237,7 +1237,7 @@ MiInitPageDirectoryMap(VOID) BoundaryAddressMultiple); if (!NT_SUCCESS(Status)) { - KEBUGCHECK(0); + ASSERT(FALSE); } BaseAddress = (PVOID)HYPERSPACE; Status = MmCreateMemoryArea(MmGetKernelAddressSpace(), @@ -1251,7 +1251,7 @@ MiInitPageDirectoryMap(VOID) BoundaryAddressMultiple); if (!NT_SUCCESS(Status)) { - KEBUGCHECK(0); + ASSERT(FALSE); } } diff --git a/reactos/ntoskrnl/mm/i386/pagepae.c b/reactos/ntoskrnl/mm/i386/pagepae.c index 45ca9f32fd0..64ef87c3390 100644 --- a/reactos/ntoskrnl/mm/i386/pagepae.c +++ b/reactos/ntoskrnl/mm/i386/pagepae.c @@ -145,7 +145,7 @@ ProtectToPTE(ULONG flProtect) else { DPRINT1("Unknown main protection type.\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (Ke386NoExecute && !(flProtect & PAGE_IS_EXECUTABLE)) @@ -444,7 +444,7 @@ MmDeletePageTable(PEPROCESS Process, PVOID Address) } if (Address >= MmSystemRangeStart) { - KEBUGCHECK(0); + ASSERT(FALSE); // MmGlobalKernelPageDirectory[ADDR_TO_PDE_OFFSET(Address)] = 0; } if (Process != NULL && Process != CurrentProcess) @@ -477,7 +477,7 @@ MmFreePageTable(PEPROCESS Process, PVOID Address) { DbgPrint("Page table entry not clear at %x/%x (is %I64x)\n", ((ULONG)Address / (4*1024*1024)), i, PageTable[i]); - KEBUGCHECK(0); + ASSERT(FALSE); } } Pfn = PAE_PTE_TO_PFN(*(PAE_ADDR_TO_PDE(Address))); @@ -494,7 +494,7 @@ MmFreePageTable(PEPROCESS Process, PVOID Address) { DbgPrint("Page table entry not clear at %x/%x (is %x)\n", ((ULONG)Address / (4*1024*1024)), i, PageTable[i]); - KEBUGCHECK(0); + ASSERT(FALSE); } } Pfn = PTE_TO_PFN(*(ADDR_TO_PDE(Address))); @@ -505,7 +505,7 @@ MmFreePageTable(PEPROCESS Process, PVOID Address) if (Address >= MmSystemRangeStart) { // MmGlobalKernelPageDirectory[ADDR_TO_PDE_OFFSET(Address)] = 0; - KEBUGCHECK(0); + ASSERT(FALSE); } else { @@ -532,20 +532,20 @@ MmGetPageTableForProcessForPAE(PEPROCESS Process, PVOID Address, BOOLEAN Create) Process, Address, Create); if (Address >= (PVOID)PAGETABLE_MAP && Address < (PVOID)((ULONG_PTR)PAGETABLE_MAP + 0x800000)) { - KEBUGCHECK(0); + ASSERT(FALSE); } if (Address < MmSystemRangeStart && Process && Process != PsGetCurrentProcess()) { PageDirTable = MmCreateHyperspaceMapping(PAE_PTE_TO_PFN(Process->Pcb.DirectoryTableBase.QuadPart)); if (PageDirTable == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } PageDir = MmCreateHyperspaceMapping(PAE_PTE_TO_PFN(PageDirTable[PAE_ADDR_TO_PDTE_OFFSET(Address)])); MmDeleteHyperspaceMapping(PageDirTable); if (PageDir == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } PageDir += PAE_ADDR_TO_PDE_PAGE_OFFSET(Address); Entry = ExfInterlockedCompareExchange64UL(PageDir, &ZeroEntry, &ZeroEntry); @@ -559,7 +559,7 @@ MmGetPageTableForProcessForPAE(PEPROCESS Process, PVOID Address, BOOLEAN Create) Status = MmRequestPageMemoryConsumer(MC_NPPOOL, FALSE, &Pfn); if (!NT_SUCCESS(Status)) { - KEBUGCHECK(0); + ASSERT(FALSE); } Entry = PFN_TO_PTE(Pfn) | PA_PRESENT | PA_READWRITE | PA_USER; Entry = ExfInterlockedCompareExchange64UL(PageDir, &Entry, &ZeroEntry); @@ -577,7 +577,7 @@ MmGetPageTableForProcessForPAE(PEPROCESS Process, PVOID Address, BOOLEAN Create) Pt = MmCreateHyperspaceMapping(Pfn); if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } return Pt + PAE_ADDR_TO_PTE_OFFSET(Address); } @@ -595,7 +595,7 @@ MmGetPageTableForProcessForPAE(PEPROCESS Process, PVOID Address, BOOLEAN Create) Status = MmRequestPageMemoryConsumer(MC_NPPOOL, FALSE, &Pfn); if (!NT_SUCCESS(Status)) { - KEBUGCHECK(0); + ASSERT(FALSE); } Entry = PAE_PFN_TO_PTE(Pfn) | PA_PRESENT | PA_READWRITE; if (Ke386GlobalPagesEnabled) @@ -618,7 +618,7 @@ MmGetPageTableForProcessForPAE(PEPROCESS Process, PVOID Address, BOOLEAN Create) Status = MmRequestPageMemoryConsumer(MC_NPPOOL, FALSE, &Pfn); if (!NT_SUCCESS(Status)) { - KEBUGCHECK(0); + ASSERT(FALSE); } Entry = PFN_TO_PTE(Pfn) | PA_PRESENT | PA_READWRITE | PA_USER; Entry = ExfInterlockedCompareExchange64UL(PageDir, &Entry, &ZeroEntry); @@ -645,7 +645,7 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create) PageDir = MmCreateHyperspaceMapping(PTE_TO_PFN(Process->Pcb.DirectoryTableBase.LowPart)); if (PageDir == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } if (0 == InterlockedCompareExchangeUL(&PageDir[PdeOffset], 0, 0)) { @@ -657,7 +657,7 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create) Status = MmRequestPageMemoryConsumer(MC_NPPOOL, FALSE, &Pfn); if (!NT_SUCCESS(Status) || Pfn == 0) { - KEBUGCHECK(0); + ASSERT(FALSE); } Entry = InterlockedCompareExchangeUL(&PageDir[PdeOffset], PFN_TO_PTE(Pfn) | PA_PRESENT | PA_READWRITE | PA_USER, 0); if (Entry != 0) @@ -674,7 +674,7 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create) Pt = MmCreateHyperspaceMapping(Pfn); if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } return Pt + ADDR_TO_PTE_OFFSET(Address); } @@ -692,7 +692,7 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create) Status = MmRequestPageMemoryConsumer(MC_NPPOOL, FALSE, &Pfn); if (!NT_SUCCESS(Status) || Pfn == 0) { - KEBUGCHECK(0); + ASSERT(FALSE); } Entry = PFN_TO_PTE(Pfn) | PA_PRESENT | PA_READWRITE; if (Ke386GlobalPagesEnabled) @@ -715,7 +715,7 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create) Status = MmRequestPageMemoryConsumer(MC_NPPOOL, FALSE, &Pfn); if (!NT_SUCCESS(Status) || Pfn == 0) { - KEBUGCHECK(0); + ASSERT(FALSE); } Entry = InterlockedCompareExchangeUL(PageDir, PFN_TO_PTE(Pfn) | PA_PRESENT | PA_READWRITE | PA_USER, 0); if (Entry != 0) @@ -825,7 +825,7 @@ MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPF Pt = MmGetPageTableForProcessForPAE(Process, Address, FALSE); if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } /* * Atomically disable the present bit and get the old value. @@ -840,7 +840,7 @@ MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPF WasValid = PAE_PAGE_MASK(Pte) != 0LL ? TRUE : FALSE; if (!WasValid) { - KEBUGCHECK(0); + ASSERT(FALSE); } /* @@ -863,7 +863,7 @@ MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPF Pt = MmGetPageTableForProcess(Process, Address, FALSE); if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } /* * Atomically disable the present bit and get the old value. @@ -877,7 +877,7 @@ MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPF WasValid = (PAGE_MASK(Pte) != 0); if (!WasValid) { - KEBUGCHECK(0); + ASSERT(FALSE); } /* @@ -1232,7 +1232,7 @@ MmIsAccessedAndResetAccessPage(PEPROCESS Process, PVOID Address) if (Address < MmSystemRangeStart && Process == NULL) { DPRINT1("MmIsAccessedAndResetAccessPage is called for user space without a process.\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (Ke386Pae) { @@ -1243,7 +1243,7 @@ MmIsAccessedAndResetAccessPage(PEPROCESS Process, PVOID Address) Pt = MmGetPageTableForProcessForPAE(Process, Address, FALSE); if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } do @@ -1271,7 +1271,7 @@ MmIsAccessedAndResetAccessPage(PEPROCESS Process, PVOID Address) Pt = MmGetPageTableForProcess(Process, Address, FALSE); if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } do @@ -1299,7 +1299,7 @@ MmSetCleanPage(PEPROCESS Process, PVOID Address) if (Address < MmSystemRangeStart && Process == NULL) { DPRINT1("MmSetCleanPage is called for user space without a process.\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (Ke386Pae) { @@ -1311,7 +1311,7 @@ MmSetCleanPage(PEPROCESS Process, PVOID Address) if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } do @@ -1338,7 +1338,7 @@ MmSetCleanPage(PEPROCESS Process, PVOID Address) if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } do @@ -1364,7 +1364,7 @@ MmSetDirtyPage(PEPROCESS Process, PVOID Address) if (Address < MmSystemRangeStart && Process == NULL) { DPRINT1("MmSetDirtyPage is called for user space without a process.\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (Ke386Pae) { @@ -1375,7 +1375,7 @@ MmSetDirtyPage(PEPROCESS Process, PVOID Address) Pt = MmGetPageTableForProcessForPAE(Process, Address, FALSE); if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } do @@ -1400,7 +1400,7 @@ MmSetDirtyPage(PEPROCESS Process, PVOID Address) Pt = MmGetPageTableForProcess(Process, Address, FALSE); if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } do @@ -1431,7 +1431,7 @@ MmEnableVirtualMapping(PEPROCESS Process, PVOID Address) Pt = MmGetPageTableForProcessForPAE(Process, Address, FALSE); if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } do @@ -1456,7 +1456,7 @@ MmEnableVirtualMapping(PEPROCESS Process, PVOID Address) Pt = MmGetPageTableForProcess(Process, Address, FALSE); if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } do @@ -1525,7 +1525,7 @@ MmCreateVirtualMappingForKernel(PVOID Address, if (Address < MmSystemRangeStart) { DPRINT1("MmCreateVirtualMappingForKernel is called for user space\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } Attributes = ProtectToPTE(flProtect); @@ -1554,7 +1554,7 @@ MmCreateVirtualMappingForKernel(PVOID Address, DPRINT1("Setting physical address but not allowing access at address " "0x%.8X with attributes %x/%x.\n", Addr, Attributes, flProtect); - KEBUGCHECK(0); + ASSERT(FALSE); } PdeOffset = PAE_ADDR_TO_PDE_OFFSET(Addr); @@ -1563,7 +1563,7 @@ MmCreateVirtualMappingForKernel(PVOID Address, Pt = MmGetPageTableForProcessForPAE(NULL, Addr, TRUE); if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } } else @@ -1580,7 +1580,7 @@ MmCreateVirtualMappingForKernel(PVOID Address, Pte = ExfpInterlockedExchange64UL(Pt, &Pte); if (Pte != 0LL) { - KEBUGCHECK(0); + ASSERT(FALSE); } } } @@ -1593,7 +1593,7 @@ MmCreateVirtualMappingForKernel(PVOID Address, Pt = MmGetPageTableForProcess(NULL, Addr, TRUE); if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } Pt--; @@ -1604,7 +1604,7 @@ MmCreateVirtualMappingForKernel(PVOID Address, DPRINT1("Setting physical address but not allowing access at address " "0x%.8X with attributes %x/%x.\n", Addr, Attributes, flProtect); - KEBUGCHECK(0); + ASSERT(FALSE); } PdeOffset = ADDR_TO_PDE_OFFSET(Addr); @@ -1613,7 +1613,7 @@ MmCreateVirtualMappingForKernel(PVOID Address, Pt = MmGetPageTableForProcess(NULL, Addr, TRUE); if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } } else @@ -1625,7 +1625,7 @@ MmCreateVirtualMappingForKernel(PVOID Address, Pte = *Pt; if (Pte != 0) { - KEBUGCHECK(0); + ASSERT(FALSE); } (void)InterlockedExchangeUL(Pt, PFN_TO_PTE(Pages[i]) | Attributes); } @@ -1643,16 +1643,16 @@ MmCreatePageFileMapping(PEPROCESS Process, if (Process == NULL && Address < MmSystemRangeStart) { DPRINT1("No process\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (Process != NULL && Address >= MmSystemRangeStart) { DPRINT1("Setting kernel address with process context\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (SwapEntry & (1 << 31)) { - KEBUGCHECK(0); + ASSERT(FALSE); } if (Ke386Pae) @@ -1664,7 +1664,7 @@ MmCreatePageFileMapping(PEPROCESS Process, Pt = MmGetPageTableForProcessForPAE(Process, Address, TRUE); if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } tmpPte = SwapEntry << 1; Pte = ExfpInterlockedExchange64UL(Pt, &tmpPte); @@ -1690,7 +1690,7 @@ MmCreatePageFileMapping(PEPROCESS Process, Pt = MmGetPageTableForProcess(Process, Address, TRUE); if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } Pte = *Pt; if (PAGE_MASK((Pte)) != 0) @@ -1744,13 +1744,13 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process, if (Address < MmSystemRangeStart) { DPRINT1("No process\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (PageCount > 0x10000 || (ULONG_PTR) Address / PAGE_SIZE + PageCount > 0x100000) { DPRINT1("Page count to large\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } } else @@ -1758,14 +1758,14 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process, if (Address >= MmSystemRangeStart) { DPRINT1("Setting kernel address with process context\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (PageCount > (ULONG_PTR)MmSystemRangeStart / PAGE_SIZE || (ULONG_PTR) Address / PAGE_SIZE + PageCount > (ULONG_PTR)MmSystemRangeStart / PAGE_SIZE) { DPRINT1("Page Count to large\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } } @@ -1803,7 +1803,7 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process, DPRINT1("Setting physical address but not allowing access at address " "0x%.8X with attributes %x/%x.\n", Addr, Attributes, flProtect); - KEBUGCHECK(0); + ASSERT(FALSE); } PdeOffset = PAE_ADDR_TO_PDE_OFFSET(Addr); if (oldPdeOffset != PdeOffset) @@ -1812,7 +1812,7 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process, Pt = MmGetPageTableForProcessForPAE(Process, Addr, TRUE); if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } } else @@ -1830,7 +1830,7 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process, Pte = ExfpInterlockedExchange64UL(Pt, &tmpPte); if (PAE_PAGE_MASK((Pte)) != 0LL && !((Pte) & PA_PRESENT)) { - KEBUGCHECK(0); + ASSERT(FALSE); } if (PAE_PAGE_MASK((Pte)) != 0LL) { @@ -1872,7 +1872,7 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process, DPRINT1("Setting physical address but not allowing access at address " "0x%.8X with attributes %x/%x.\n", Addr, Attributes, flProtect); - KEBUGCHECK(0); + ASSERT(FALSE); } PdeOffset = ADDR_TO_PDE_OFFSET(Addr); if (oldPdeOffset != PdeOffset) @@ -1881,7 +1881,7 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process, Pt = MmGetPageTableForProcess(Process, Addr, TRUE); if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } } else @@ -1894,7 +1894,7 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process, MmMarkPageMapped(Pages[i]); if (PAGE_MASK((Pte)) != 0 && !((Pte) & PA_PRESENT)) { - KEBUGCHECK(0); + ASSERT(FALSE); } if (PAGE_MASK((Pte)) != 0) { @@ -1943,7 +1943,7 @@ MmCreateVirtualMapping(PEPROCESS Process, if (!MmIsPageInUse(Pages[i])) { DPRINT1("Page at address %x not in use\n", PFN_TO_PTE(Pages[i])); - KEBUGCHECK(0); + ASSERT(FALSE); } } @@ -2037,7 +2037,7 @@ MmSetPageProtect(PEPROCESS Process, PVOID Address, ULONG flProtect) if (Pt == NULL) { DPRINT1("Address %x\n", Address); - KEBUGCHECK(0); + ASSERT(FALSE); } do { @@ -2062,7 +2062,7 @@ MmSetPageProtect(PEPROCESS Process, PVOID Address, ULONG flProtect) Pt = MmGetPageTableForProcess(Process, Address, FALSE); if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } InterlockedExchange((PLONG)Pt, PAGE_MASK(*Pt) | Attributes | (*Pt & (PA_ACCESSED|PA_DIRTY))); MiFlushTlb(Pt, Address); @@ -2149,7 +2149,7 @@ MmCreateHyperspaceMapping(PFN_TYPE Page) } if (i >= Page % 1024) { - KEBUGCHECK(0); + ASSERT(FALSE); } } } @@ -2174,7 +2174,7 @@ MmCreateHyperspaceMapping(PFN_TYPE Page) } if (i <= Page % 1024) { - KEBUGCHECK(0); + ASSERT(FALSE); } } } @@ -2206,7 +2206,7 @@ MmCreateHyperspaceMapping(PFN_TYPE Page) } if (i >= Page % 1024) { - KEBUGCHECK(0); + ASSERT(FALSE); } } } @@ -2231,7 +2231,7 @@ MmCreateHyperspaceMapping(PFN_TYPE Page) } if (i <= Page % 1024) { - KEBUGCHECK(0); + ASSERT(FALSE); } } } @@ -2293,7 +2293,7 @@ MmUpdatePageDir(PEPROCESS Process, PVOID Address, ULONG Size) if (Address < MmSystemRangeStart) { - KEBUGCHECK(0); + ASSERT(FALSE); } if (Ke386Pae) { @@ -2450,7 +2450,7 @@ MiInitPageDirectoryMap(VOID) BoundaryAddressMultiple); if (!NT_SUCCESS(Status)) { - KEBUGCHECK(0); + ASSERT(FALSE); } BaseAddress = (PVOID)HYPERSPACE; Status = MmCreateMemoryArea(MmGetKernelAddressSpace(), @@ -2464,7 +2464,7 @@ MiInitPageDirectoryMap(VOID) BoundaryAddressMultiple); if (!NT_SUCCESS(Status)) { - KEBUGCHECK(0); + ASSERT(FALSE); } } diff --git a/reactos/ntoskrnl/mm/iospace.c b/reactos/ntoskrnl/mm/iospace.c index e19d5ce2d9d..944ba9022b7 100644 --- a/reactos/ntoskrnl/mm/iospace.c +++ b/reactos/ntoskrnl/mm/iospace.c @@ -104,7 +104,7 @@ MmMapIoSpace (IN PHYSICAL_ADDRESS PhysicalAddress, if (!NT_SUCCESS(Status)) { DbgPrint("Unable to create virtual mapping\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } } return (PVOID)((ULONG_PTR)Result + Offset); diff --git a/reactos/ntoskrnl/mm/marea.c b/reactos/ntoskrnl/mm/marea.c index 0dee681e585..04e77c2f223 100644 --- a/reactos/ntoskrnl/mm/marea.c +++ b/reactos/ntoskrnl/mm/marea.c @@ -899,7 +899,7 @@ MmFreeMemoryAreaByPtr( BaseAddress); if (MemoryArea == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); return(STATUS_UNSUCCESSFUL); } @@ -1041,7 +1041,7 @@ MmMapMemoryArea(PVOID BaseAddress, if (!NT_SUCCESS(Status)) { DPRINT1("Unable to allocate page\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } Status = MmCreateVirtualMapping (NULL, (PVOID)((ULONG_PTR)BaseAddress + (i * PAGE_SIZE)), @@ -1051,7 +1051,7 @@ MmMapMemoryArea(PVOID BaseAddress, if (!NT_SUCCESS(Status)) { DPRINT1("Unable to create virtual mapping\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } } } diff --git a/reactos/ntoskrnl/mm/mdlsup.c b/reactos/ntoskrnl/mm/mdlsup.c index df52db6787c..70038cf0070 100644 --- a/reactos/ntoskrnl/mm/mdlsup.c +++ b/reactos/ntoskrnl/mm/mdlsup.c @@ -57,7 +57,7 @@ MmInitializeMdlImplementation(VOID) if (!NT_SUCCESS(Status)) { MmUnlockAddressSpace(MmGetKernelAddressSpace()); - KEBUGCHECK(0); + ASSERT(FALSE); } MmUnlockAddressSpace(MmGetKernelAddressSpace()); @@ -692,7 +692,7 @@ MmMapLockedPagesSpecifyCache(IN PMDL Mdl, { return NULL; } - KEBUGCHECK(0); + ASSERT(FALSE); } Base = (PVOID)((ULONG_PTR)MiMdlMappingRegionBase + StartingOffset * PAGE_SIZE); if (MiMdlMappingRegionHint == StartingOffset) MiMdlMappingRegionHint += PageCount; diff --git a/reactos/ntoskrnl/mm/mm.c b/reactos/ntoskrnl/mm/mm.c index dc880dc5313..4bced911cc0 100644 --- a/reactos/ntoskrnl/mm/mm.c +++ b/reactos/ntoskrnl/mm/mm.c @@ -103,7 +103,7 @@ MmpAccessFault(KPROCESSOR_MODE Mode, if (KeGetCurrentIrql() >= DISPATCH_LEVEL) { - CPRINT("Page fault at high IRQL was %d\n", KeGetCurrentIrql()); + DPRINT1("Page fault at high IRQL was %d\n", KeGetCurrentIrql()); return(STATUS_UNSUCCESSFUL); } if (PsGetCurrentProcess() == NULL) @@ -205,7 +205,7 @@ MmNotPresentFault(KPROCESSOR_MODE Mode, if (KeGetCurrentIrql() >= DISPATCH_LEVEL) { - CPRINT("Page fault at high IRQL was %d, address %x\n", KeGetCurrentIrql(), Address); + DPRINT1("Page fault at high IRQL was %d, address %x\n", KeGetCurrentIrql(), Address); return(STATUS_UNSUCCESSFUL); } @@ -219,7 +219,7 @@ MmNotPresentFault(KPROCESSOR_MODE Mode, */ if (Mode != KernelMode) { - CPRINT("Address: %x\n", Address); + DPRINT1("Address: %x\n", Address); return(STATUS_ACCESS_VIOLATION); } AddressSpace = MmGetKernelAddressSpace(); diff --git a/reactos/ntoskrnl/mm/mpw.c b/reactos/ntoskrnl/mm/mpw.c index b17199858f2..3c631691907 100644 --- a/reactos/ntoskrnl/mm/mpw.c +++ b/reactos/ntoskrnl/mm/mpw.c @@ -71,7 +71,7 @@ MmMpwThreadMain(PVOID Ignored) if (!NT_SUCCESS(Status)) { DbgPrint("MpwThread: Wait failed\n"); - KEBUGCHECK(0); + ASSERT(FALSE); return(STATUS_UNSUCCESSFUL); } if (MpwThreadShouldTerminate) diff --git a/reactos/ntoskrnl/mm/npool.c b/reactos/ntoskrnl/mm/npool.c index f0c8cc4551b..ed9ee5bed00 100644 --- a/reactos/ntoskrnl/mm/npool.c +++ b/reactos/ntoskrnl/mm/npool.c @@ -936,7 +936,7 @@ static void validate_free_list(void) { DbgPrint("Bad block magic (probable pool corruption) at %x\n", current); - KEBUGCHECK(/*KBUG_POOL_FREE_LIST_CORRUPT*/0); + ASSERT(FALSE); } if (base_addr < MiNonPagedPoolStart || @@ -946,13 +946,13 @@ static void validate_free_list(void) DbgPrint("Size %d\n",current->hdr.Size); DbgPrint("Limits are %x %x\n",MiNonPagedPoolStart, (ULONG_PTR)MiNonPagedPoolStart+MiNonPagedPoolLength); - KEBUGCHECK(/*KBUG_POOL_FREE_LIST_CORRUPT*/0); + ASSERT(FALSE); } blocks_seen++; if (blocks_seen > EiNrFreeBlocks) { DbgPrint("Too many blocks on free list\n"); - KEBUGCHECK(/*KBUG_POOL_FREE_LIST_CORRUPT*/0); + ASSERT(FALSE); } p = avl_get_next(FreeBlockListRoot, p); } @@ -979,7 +979,7 @@ static void validate_used_list(void) { DbgPrint("Bad block magic (probable pool corruption) at %x\n", current); - KEBUGCHECK(/*KBUG_POOL_FREE_LIST_CORRUPT*/0); + ASSERT(FALSE); } if (base_addr < MiNonPagedPoolStart || ((ULONG_PTR)base_addr+current->hdr.Size) > @@ -989,13 +989,13 @@ static void validate_used_list(void) DbgPrint("Size %d\n",current->hdr.Size); DbgPrint("Limits are %x %x\n",MiNonPagedPoolStart, (ULONG_PTR)MiNonPagedPoolStart+MiNonPagedPoolLength); - KEBUGCHECK(/*KBUG_POOL_FREE_LIST_CORRUPT*/0); + ASSERT(FALSE); } blocks_seen++; if (blocks_seen > EiNrUsedBlocks) { DbgPrint("Too many blocks on used list\n"); - KEBUGCHECK(/*KBUG_POOL_FREE_LIST_CORRUPT*/0); + ASSERT(FALSE); } if (current->ListEntry.Flink != &UsedBlockListHead && current->ListEntry.Flink->Blink != ¤t->ListEntry) @@ -1004,7 +1004,7 @@ static void validate_used_list(void) "current->next->previous %x)\n", __FILE__,__LINE__,current, current->ListEntry.Flink, current->ListEntry.Flink->Blink); - KEBUGCHECK(/*KBUG_POOL_FREE_LIST_CORRUPT*/0); + ASSERT(FALSE); } current_entry = current_entry->Flink; @@ -1035,19 +1035,19 @@ static void check_duplicates(HDR* blk) { DbgPrint("Bad block magic (probable pool corruption) at %x\n", free); - KEBUGCHECK(/*KBUG_POOL_FREE_LIST_CORRUPT*/0); + ASSERT(FALSE); } if ( (ULONG_PTR)free > base && (ULONG_PTR)free < last ) { DbgPrint("intersecting blocks on list\n"); - KEBUGCHECK(/*KBUG_POOL_FREE_LIST_CORRUPT*/0); + ASSERT(FALSE); } if ( (ULONG_PTR)free < base && ((ULONG_PTR)free + free->hdr.Size) > base ) { DbgPrint("intersecting blocks on list\n"); - KEBUGCHECK(/*KBUG_POOL_FREE_LIST_CORRUPT*/0); + ASSERT(FALSE); } p = avl_get_next(FreeBlockListRoot, p); } @@ -1060,13 +1060,13 @@ static void check_duplicates(HDR* blk) if ( (ULONG_PTR)used > base && (ULONG_PTR)used < last ) { DbgPrint("intersecting blocks on list\n"); - KEBUGCHECK(/*KBUG_POOL_FREE_LIST_CORRUPT*/0); + ASSERT(FALSE); } if ( (ULONG_PTR)used < base && ((ULONG_PTR)used + used->hdr.Size) > base ) { DbgPrint("intersecting blocks on list\n"); - KEBUGCHECK(/*KBUG_POOL_FREE_LIST_CORRUPT*/0); + ASSERT(FALSE); } current_entry = current_entry->Flink; @@ -1460,7 +1460,7 @@ ExRosQueryNonPagedPoolTag ( PVOID Addr ) { HDR_USED* blk=(HDR_USED*)((ULONG_PTR)Addr - HDR_USED_SIZE); if (blk->hdr.Magic != BLOCK_HDR_USED_MAGIC) - KEBUGCHECK(0); + ASSERT(FALSE); return blk->Tag; } @@ -1510,7 +1510,7 @@ void check_redzone_header(HDR_USED* hdr) DbgPrint("NPPOL: High-side redzone overwritten, Block %x, Size %d, Tag %x(%s), Caller %x\n", (ULONG_PTR)hdr + HDR_USED_SIZE, hdr->UserSize, hdr->Tag, c, hdr->Caller); } - KEBUGCHECK(0); + ASSERT(FALSE); } } #endif @@ -1563,7 +1563,7 @@ VOID STDCALL ExFreeNonPagedPool (PVOID block) DbgPrint("ExFreePool of non-allocated address %x (magic %x)\n", block, blk->hdr.Magic); } - KEBUGCHECK(0); + ASSERT(FALSE); return; } @@ -1724,7 +1724,7 @@ MiInitializeNonPagedPool(VOID) if (!NT_SUCCESS(Status)) { DbgPrint("Unable to allocate a page\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } Status = MmCreateVirtualMapping(NULL, @@ -1735,7 +1735,7 @@ MiInitializeNonPagedPool(VOID) if (!NT_SUCCESS(Status)) { DbgPrint("Unable to create virtual mapping\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } Address = (PVOID)((ULONG_PTR)Address + PAGE_SIZE); } diff --git a/reactos/ntoskrnl/mm/pagefile.c b/reactos/ntoskrnl/mm/pagefile.c index 4188bb13e7e..356d6e33684 100644 --- a/reactos/ntoskrnl/mm/pagefile.c +++ b/reactos/ntoskrnl/mm/pagefile.c @@ -205,7 +205,7 @@ MmGetOffsetPageFile(PRETRIEVAL_POINTERS_BUFFER RetrievalPointers, LARGE_INTEGER first = mid + 1; } } - KEBUGCHECK(0); + ASSERT(FALSE); #if defined(__GNUC__) return (LARGE_INTEGER)0LL; @@ -237,7 +237,7 @@ MmWriteToSwapPage(SWAPENTRY SwapEntry, PFN_TYPE Page) if (SwapEntry == 0) { - KEBUGCHECK(0); + ASSERT(FALSE); return(STATUS_UNSUCCESSFUL); } @@ -247,13 +247,13 @@ MmWriteToSwapPage(SWAPENTRY SwapEntry, PFN_TYPE Page) if (i >= MAX_PAGING_FILES) { DPRINT1("Bad swap entry 0x%.8X\n", SwapEntry); - KEBUGCHECK(0); + ASSERT(FALSE); } if (PagingFileList[i]->FileObject == NULL || PagingFileList[i]->FileObject->DeviceObject == NULL) { DPRINT1("Bad paging file 0x%.8X\n", SwapEntry); - KEBUGCHECK(0); + ASSERT(FALSE); } MmInitializeMdl(Mdl, NULL, PAGE_SIZE); @@ -298,7 +298,7 @@ MmReadFromSwapPage(SWAPENTRY SwapEntry, PFN_TYPE Page) if (SwapEntry == 0) { - KEBUGCHECK(0); + ASSERT(FALSE); return(STATUS_UNSUCCESSFUL); } @@ -308,13 +308,13 @@ MmReadFromSwapPage(SWAPENTRY SwapEntry, PFN_TYPE Page) if (i >= MAX_PAGING_FILES) { DPRINT1("Bad swap entry 0x%.8X\n", SwapEntry); - KEBUGCHECK(0); + ASSERT(FALSE); } if (PagingFileList[i]->FileObject == NULL || PagingFileList[i]->FileObject->DeviceObject == NULL) { DPRINT1("Bad paging file 0x%.8X\n", SwapEntry); - KEBUGCHECK(0); + ASSERT(FALSE); } MmInitializeMdl(Mdl, NULL, PAGE_SIZE); @@ -450,13 +450,13 @@ MmFreeSwapPage(SWAPENTRY Entry) if (i >= MAX_PAGING_FILES) { DPRINT1("Bad swap entry 0x%.8X\n", Entry); - KEBUGCHECK(0); + ASSERT(FALSE); } KeAcquireSpinLock(&PagingFileListLock, &oldIrql); if (PagingFileList[i] == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } KeAcquireSpinLockAtDpcLevel(&PagingFileList[i]->AllocMapLock); @@ -504,7 +504,7 @@ MmAllocSwapPage(VOID) off = MiAllocPageFromPagingFile(PagingFileList[i]); if (off == 0xFFFFFFFF) { - KEBUGCHECK(0); + ASSERT(FALSE); KeReleaseSpinLock(&PagingFileListLock, oldIrql); return(STATUS_UNSUCCESSFUL); } @@ -518,7 +518,7 @@ MmAllocSwapPage(VOID) } KeReleaseSpinLock(&PagingFileListLock, oldIrql); - KEBUGCHECK(0); + ASSERT(FALSE); return(0); } diff --git a/reactos/ntoskrnl/mm/pageop.c b/reactos/ntoskrnl/mm/pageop.c index deb4d128bd3..099b915921f 100644 --- a/reactos/ntoskrnl/mm/pageop.c +++ b/reactos/ntoskrnl/mm/pageop.c @@ -66,7 +66,7 @@ MmReleasePageOp(PMM_PAGEOP PageOp) PrevPageOp = PrevPageOp->Next; } KeReleaseSpinLock(&MmPageOpHashTableLock, oldIrql); - KEBUGCHECK(0); + ASSERT(FALSE); } PMM_PAGEOP @@ -211,7 +211,7 @@ MmGetPageOp(PMEMORY_AREA MArea, HANDLE Pid, PVOID Address, if (PageOp == NULL) { KeReleaseSpinLock(&MmPageOpHashTableLock, oldIrql); - KEBUGCHECK(0); + ASSERT(FALSE); return(NULL); } diff --git a/reactos/ntoskrnl/mm/pool.c b/reactos/ntoskrnl/mm/pool.c index 743bca6c121..6febb0adc3f 100644 --- a/reactos/ntoskrnl/mm/pool.c +++ b/reactos/ntoskrnl/mm/pool.c @@ -41,7 +41,7 @@ EiAllocatePool(POOL_TYPE PoolType, if ((PoolType & MUST_SUCCEED_POOL_MASK) && Block==NULL) { - KEBUGCHECK(MUST_SUCCEED_POOL_EMPTY); + KeBugCheck(MUST_SUCCEED_POOL_EMPTY); } return(Block); } diff --git a/reactos/ntoskrnl/mm/powerpc/page.c b/reactos/ntoskrnl/mm/powerpc/page.c index 73b46616680..2dd9e2b76b1 100644 --- a/reactos/ntoskrnl/mm/powerpc/page.c +++ b/reactos/ntoskrnl/mm/powerpc/page.c @@ -98,7 +98,7 @@ MmCopyMmInfo(PEPROCESS Src, { DPRINT("MmCopyMmInfo(Src %x, Dest %x)\n", Src, Dest); - KeBugCheck(0); + ASSERT(FALSE); return(STATUS_SUCCESS); } @@ -125,7 +125,7 @@ MmCreateProcessAddressSpace(IN ULONG MinWs, IN PEPROCESS Process, IN PLARGE_INTEGER DirectoryTableBase) { - KeBugCheck(0); + ASSERT(FALSE); return TRUE; } @@ -302,7 +302,7 @@ MmIsAccessedAndResetAccessPage(PEPROCESS Process, PVOID Address) if (Address < MmSystemRangeStart && Process == NULL) { DPRINT1("MmIsAccessedAndResetAccessPage is called for user space without a process.\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } info.proc = Process ? (int)Process->UniqueProcessId : 0; @@ -370,7 +370,7 @@ MmCreateVirtualMappingForKernel(PVOID Address, if (Address < MmSystemRangeStart) { DPRINT1("MmCreateVirtualMappingForKernel is called for user space\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } Addr = Address; @@ -383,7 +383,7 @@ MmCreateVirtualMappingForKernel(PVOID Address, DPRINT1("Setting physical address but not allowing access at address " "0x%.8X with attributes %x/%x.\n", Addr, Attributes, flProtect); - KEBUGCHECK(0); + ASSERT(FALSE); } (void)InterlockedExchangeUL(Pt, PFN_TO_PTE(Pages[i]) | Attributes); #endif @@ -401,16 +401,16 @@ MmCreatePageFileMapping(PEPROCESS Process, if (Process == NULL && Address < MmSystemRangeStart) { DPRINT1("No process\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (Process != NULL && Address >= MmSystemRangeStart) { DPRINT1("Setting kernel address with process context\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (SwapEntry & (1 << 31)) { - KEBUGCHECK(0); + ASSERT(FALSE); } // XXX arty @@ -440,13 +440,13 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process, if (Address < MmSystemRangeStart) { DPRINT1("No process\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (PageCount > 0x10000 || (ULONG_PTR) Address / PAGE_SIZE + PageCount > 0x100000) { DPRINT1("Page count to large\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } } else @@ -454,14 +454,14 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process, if (Address >= MmSystemRangeStart) { DPRINT1("Setting kernel address with process context\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (PageCount > (ULONG_PTR)MmSystemRangeStart / PAGE_SIZE || (ULONG_PTR) Address / PAGE_SIZE + PageCount > (ULONG_PTR)MmSystemRangeStart / PAGE_SIZE) { DPRINT1("Page Count to large\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } } @@ -508,7 +508,7 @@ MmCreateVirtualMapping(PEPROCESS Process, if (!MmIsUsablePage(Pages[i])) { DPRINT1("Page at address %x not usable\n", PFN_TO_PTE(Pages[i])); - KEBUGCHECK(0); + ASSERT(FALSE); } } @@ -564,7 +564,7 @@ MmSetPageProtect(PEPROCESS Process, PVOID Address, ULONG flProtect) Pt = MmGetPageTableForProcess(Process, Address, FALSE); if (Pt == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } InterlockedExchange((PLONG)Pt, PAGE_MASK(*Pt) | Attributes | (*Pt & (PA_ACCESSED|PA_DIRTY))); MiFlushTlb(Pt, Address); diff --git a/reactos/ntoskrnl/mm/procsup.c b/reactos/ntoskrnl/mm/procsup.c index b679a892856..fdfd902b4aa 100644 --- a/reactos/ntoskrnl/mm/procsup.c +++ b/reactos/ntoskrnl/mm/procsup.c @@ -215,7 +215,7 @@ MmCreateKernelStack(BOOLEAN GuiStack, if (!NT_SUCCESS(Status)) { DPRINT1("Failed to create thread stack\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } /* @@ -239,7 +239,7 @@ MmCreateKernelStack(BOOLEAN GuiStack, if (!NT_SUCCESS(Status)) { DPRINT1("Could not create Virtual Mapping for Kernel Stack\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } /* Return the stack base */ @@ -709,11 +709,11 @@ MmDeleteProcessAddressSpace(PEPROCESS Process) break; case MEMORY_AREA_MDL_MAPPING: - KEBUGCHECK(PROCESS_HAS_LOCKED_PAGES); + KeBugCheck(PROCESS_HAS_LOCKED_PAGES); break; default: - KEBUGCHECK(0); + ASSERT(FALSE); } } diff --git a/reactos/ntoskrnl/mm/rmap.c b/reactos/ntoskrnl/mm/rmap.c index e2120a072b1..3607d9136ae 100644 --- a/reactos/ntoskrnl/mm/rmap.c +++ b/reactos/ntoskrnl/mm/rmap.c @@ -81,7 +81,7 @@ MmWritePagePhysicalAddress(PFN_TYPE Page) Address = entry->Address; if ((((ULONG_PTR)Address) & 0xFFF) != 0) { - KEBUGCHECK(0); + ASSERT(FALSE); } if (Address < MmSystemRangeStart) { @@ -177,7 +177,7 @@ MmWritePagePhysicalAddress(PFN_TYPE Page) } else { - KEBUGCHECK(0); + ASSERT(FALSE); } if (Address < MmSystemRangeStart) { @@ -211,7 +211,7 @@ MmPageOutPhysicalAddress(PFN_TYPE Page) Address = entry->Address; if ((((ULONG_PTR)Address) & 0xFFF) != 0) { - KEBUGCHECK(0); + ASSERT(FALSE); } if (Address < MmSystemRangeStart) @@ -301,7 +301,7 @@ MmPageOutPhysicalAddress(PFN_TYPE Page) } else { - KEBUGCHECK(0); + ASSERT(FALSE); } if (Address < MmSystemRangeStart) { @@ -321,7 +321,7 @@ MmSetCleanAllRmaps(PFN_TYPE Page) if (current_entry == NULL) { DPRINT1("MmIsDirtyRmap: No rmaps.\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } while (current_entry != NULL) { @@ -342,7 +342,7 @@ MmSetDirtyAllRmaps(PFN_TYPE Page) if (current_entry == NULL) { DPRINT1("MmIsDirtyRmap: No rmaps.\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } while (current_entry != NULL) { @@ -392,7 +392,7 @@ MmInsertRmap(PFN_TYPE Page, PEPROCESS Process, new_entry = ExAllocateFromNPagedLookasideList(&RmapLookasideList); if (new_entry == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } new_entry->Address = Address; new_entry->Process = (PEPROCESS)Process; @@ -410,7 +410,7 @@ MmInsertRmap(PFN_TYPE Page, PEPROCESS Process, "address 0x%.8X\n", Process->UniqueProcessId, Address, MmGetPfnForProcess(Process, Address) << PAGE_SHIFT, Page << PAGE_SHIFT); - KEBUGCHECK(0); + ASSERT(FALSE); } ExAcquireFastMutex(&RmapListLock); @@ -427,7 +427,7 @@ MmInsertRmap(PFN_TYPE Page, PEPROCESS Process, DbgPrint("\n previous caller "); DbgPrint("%p", current_entry->Caller); DbgPrint("\n"); - KeBugCheck(0); + ASSERT(FALSE); } current_entry = current_entry->Next; } @@ -463,7 +463,7 @@ MmDeleteAllRmaps(PFN_TYPE Page, PVOID Context, if (current_entry == NULL) { DPRINT1("MmDeleteAllRmaps: No rmaps.\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } MmSetRmapListHeadPage(Page, NULL); ExReleaseFastMutex(&RmapListLock); @@ -527,5 +527,5 @@ MmDeleteRmap(PFN_TYPE Page, PEPROCESS Process, previous_entry = current_entry; current_entry = current_entry->Next; } - KEBUGCHECK(0); + ASSERT(FALSE); } diff --git a/reactos/ntoskrnl/mm/section.c b/reactos/ntoskrnl/mm/section.c index 53e9c9d80ec..3e93f00bf4a 100644 --- a/reactos/ntoskrnl/mm/section.c +++ b/reactos/ntoskrnl/mm/section.c @@ -250,7 +250,7 @@ MmFreeSectionSegments(PFILE_OBJECT FileObject) { DPRINT1("Image segment %d still referenced (was %d)\n", i, SectionSegments[i].ReferenceCount); - KEBUGCHECK(0); + ASSERT(FALSE); } MmFreePageTablesSectionSegment(&SectionSegments[i]); } @@ -268,7 +268,7 @@ MmFreeSectionSegments(PFILE_OBJECT FileObject) if (Segment->ReferenceCount != 0) { DPRINT1("Data segment still referenced\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } MmFreePageTablesSectionSegment(Segment); ExFreePool(Segment); @@ -316,7 +316,7 @@ MmSetPageEntrySectionSegment(PMM_SECTION_SEGMENT Segment, TAG_SECTION_PAGE_TABLE); if (Table == NULL) { - KEBUGCHECK(0); + ASSERT(FALSE); } memset(Table, 0, sizeof(SECTION_PAGE_TABLE)); DPRINT("Table %x\n", Table); @@ -369,16 +369,16 @@ MmSharePageEntrySectionSegment(PMM_SECTION_SEGMENT Segment, if (Entry == 0) { DPRINT1("Entry == 0 for MmSharePageEntrySectionSegment\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (SHARE_COUNT_FROM_SSE(Entry) == MAX_SHARE_COUNT) { DPRINT1("Maximum share count reached\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (IS_SWAP_FROM_SSE(Entry)) { - KEBUGCHECK(0); + ASSERT(FALSE); } Entry = MAKE_SSE(PAGE_FROM_SSE(Entry), SHARE_COUNT_FROM_SSE(Entry) + 1); MmSetPageEntrySectionSegment(Segment, Offset, Entry); @@ -399,16 +399,16 @@ MmUnsharePageEntrySectionSegment(PROS_SECTION_OBJECT Section, if (Entry == 0) { DPRINT1("Entry == 0 for MmUnsharePageEntrySectionSegment\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (SHARE_COUNT_FROM_SSE(Entry) == 0) { DPRINT1("Zero share count for unshare\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (IS_SWAP_FROM_SSE(Entry)) { - KEBUGCHECK(0); + ASSERT(FALSE); } Entry = MAKE_SSE(PAGE_FROM_SSE(Entry), SHARE_COUNT_FROM_SSE(Entry) - 1); /* @@ -444,7 +444,7 @@ MmUnsharePageEntrySectionSegment(PROS_SECTION_OBJECT Section, if (!NT_SUCCESS(Status)) { DPRINT1("CcRosUnmapCacheSegment failed, status = %x\n", Status); - KEBUGCHECK(0); + ASSERT(FALSE); } } } @@ -493,7 +493,7 @@ MmUnsharePageEntrySectionSegment(PROS_SECTION_OBJECT Section, if (!NT_SUCCESS(Status)) { DPRINT1("MM: Failed to write to swap page (Status was 0x%.8X)\n", Status); - KEBUGCHECK(0); + ASSERT(FALSE); } } MmSetPageEntrySectionSegment(Segment, Offset, MAKE_SWAP_SSE(SavedSwapEntry)); @@ -504,7 +504,7 @@ MmUnsharePageEntrySectionSegment(PROS_SECTION_OBJECT Section, else { DPRINT1("Found a swapentry for a non private page in an image or data file sgment\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } } } @@ -775,7 +775,7 @@ MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace, if (PageOp == NULL) { DPRINT1("MmGetPageOp failed\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } /* @@ -793,12 +793,12 @@ MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace, if (Status != STATUS_SUCCESS) { DPRINT1("Failed to wait for page op, status = %x\n", Status); - KEBUGCHECK(0); + ASSERT(FALSE); } if (PageOp->Status == STATUS_PENDING) { DPRINT1("Woke for page op before completion\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } MmLockAddressSpace(AddressSpace); /* @@ -856,7 +856,7 @@ MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace, if (!NT_SUCCESS(Status)) { DPRINT1("Unable to create virtual mapping\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } MmInsertRmap(Page, Process, (PVOID)PAddress); } @@ -885,7 +885,7 @@ MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace, if (Segment->Flags & MM_PAGEFILE_SEGMENT) { DPRINT1("Found a swaped out private page in a pagefile section.\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } MmUnlockSectionSegment(Segment); @@ -895,14 +895,14 @@ MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace, Status = MmRequestPageMemoryConsumer(MC_USER, TRUE, &Page); if (!NT_SUCCESS(Status)) { - KEBUGCHECK(0); + ASSERT(FALSE); } Status = MmReadFromSwapPage(SwapEntry, Page); if (!NT_SUCCESS(Status)) { DPRINT1("MmReadFromSwapPage failed, status = %x\n", Status); - KEBUGCHECK(0); + ASSERT(FALSE); } MmLockAddressSpace(AddressSpace); Status = MmCreateVirtualMapping(Process, @@ -913,7 +913,7 @@ MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace, if (!NT_SUCCESS(Status)) { DPRINT("MmCreateVirtualMapping failed, not out of memory\n"); - KEBUGCHECK(0); + ASSERT(FALSE); return(Status); } @@ -958,7 +958,7 @@ MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace, if (!NT_SUCCESS(Status)) { DPRINT("MmCreateVirtualMappingUnsafe failed, not out of memory\n"); - KEBUGCHECK(0); + ASSERT(FALSE); return(Status); } /* @@ -994,7 +994,7 @@ MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace, } if (!NT_SUCCESS(Status)) { - KEBUGCHECK(0); + ASSERT(FALSE); } Status = MmCreateVirtualMapping(Process, Address, @@ -1004,7 +1004,7 @@ MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace, if (!NT_SUCCESS(Status)) { DPRINT("MmCreateVirtualMapping failed, not out of memory\n"); - KEBUGCHECK(0); + ASSERT(FALSE); return(Status); } MmInsertRmap(Page, Process, (PVOID)PAddress); @@ -1085,7 +1085,7 @@ MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace, if (Entry != Entry1) { DPRINT1("Someone changed ppte entry while we slept\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } /* @@ -1104,7 +1104,7 @@ MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace, if (!NT_SUCCESS(Status)) { DPRINT1("Unable to create virtual mapping\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } MmInsertRmap(Page, Process, (PVOID)PAddress); @@ -1133,13 +1133,13 @@ MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace, Status = MmRequestPageMemoryConsumer(MC_USER, TRUE, &Page); if (!NT_SUCCESS(Status)) { - KEBUGCHECK(0); + ASSERT(FALSE); } Status = MmReadFromSwapPage(SwapEntry, Page); if (!NT_SUCCESS(Status)) { - KEBUGCHECK(0); + ASSERT(FALSE); } /* @@ -1156,7 +1156,7 @@ MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace, if (Entry != Entry1) { DPRINT1("Someone changed ppte entry while we slept\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } /* @@ -1179,7 +1179,7 @@ MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace, if (!NT_SUCCESS(Status)) { DPRINT1("Unable to create virtual mapping\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } MmInsertRmap(Page, Process, (PVOID)PAddress); if (Locked) @@ -1211,7 +1211,7 @@ MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace, if (!NT_SUCCESS(Status)) { DPRINT1("Unable to create virtual mapping\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } MmInsertRmap(Page, Process, (PVOID)PAddress); if (Locked) @@ -1305,7 +1305,7 @@ MmAccessFaultSectionView(PMM_AVL_TABLE AddressSpace, if (PageOp == NULL) { DPRINT1("MmGetPageOp failed\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } /* @@ -1321,12 +1321,12 @@ MmAccessFaultSectionView(PMM_AVL_TABLE AddressSpace, if (Status == STATUS_TIMEOUT) { DPRINT1("Failed to wait for page op, status = %x\n", Status); - KEBUGCHECK(0); + ASSERT(FALSE); } if (PageOp->Status == STATUS_PENDING) { DPRINT1("Woke for page op before completion\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } /* * Restart the operation @@ -1348,7 +1348,7 @@ MmAccessFaultSectionView(PMM_AVL_TABLE AddressSpace, Status = MmRequestPageMemoryConsumer(MC_USER, TRUE, &NewPage); if (!NT_SUCCESS(Status)) { - KEBUGCHECK(0); + ASSERT(FALSE); } /* @@ -1373,13 +1373,13 @@ MmAccessFaultSectionView(PMM_AVL_TABLE AddressSpace, if (!NT_SUCCESS(Status)) { DPRINT("MmCreateVirtualMapping failed, not out of memory\n"); - KEBUGCHECK(0); + ASSERT(FALSE); return(Status); } if (!NT_SUCCESS(Status)) { DPRINT1("Unable to create virtual mapping\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } if (Locked) { @@ -1509,7 +1509,7 @@ MmPageOutSectionView(PMM_AVL_TABLE AddressSpace, DPRINT1("Trying to page out from physical memory section address 0x%X " "process %d\n", Address, Process ? Process->UniqueProcessId : 0); - KEBUGCHECK(0); + ASSERT(FALSE); } /* @@ -1520,7 +1520,7 @@ MmPageOutSectionView(PMM_AVL_TABLE AddressSpace, { DPRINT1("Trying to page out not-present page at (%d,0x%.8X).\n", Process ? Process->UniqueProcessId : 0, Address); - KEBUGCHECK(0); + ASSERT(FALSE); } Page = MmGetPfnForProcess(Process, Address); SwapEntry = MmGetSavedSwapEntryPage(Page); @@ -1548,7 +1548,7 @@ MmPageOutSectionView(PMM_AVL_TABLE AddressSpace, if(!MiIsPageFromCache(MemoryArea, Context.Offset)) { DPRINT1("Direct mapped non private page is not associated with the cache.\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } } else @@ -1567,7 +1567,7 @@ MmPageOutSectionView(PMM_AVL_TABLE AddressSpace, if (!(Context.Segment->Flags & MM_PAGEFILE_SEGMENT) && !(Context.Segment->Characteristics & IMAGE_SCN_MEM_SHARED)) { - KEBUGCHECK(0); + ASSERT(FALSE); } } @@ -1585,7 +1585,7 @@ MmPageOutSectionView(PMM_AVL_TABLE AddressSpace, { DPRINT1("Found a %s private page (address %x) in a pagefile segment.\n", Context.WasDirty ? "dirty" : "clean", Address); - KEBUGCHECK(0); + ASSERT(FALSE); } if (!Context.WasDirty && SwapEntry != 0) { @@ -1603,7 +1603,7 @@ MmPageOutSectionView(PMM_AVL_TABLE AddressSpace, { DPRINT1("Found a %s private page (address %x) in a shared section segment.\n", Context.WasDirty ? "dirty" : "clean", Address); - KEBUGCHECK(0); + ASSERT(FALSE); } if (!Context.WasDirty || SwapEntry != 0) { @@ -1624,13 +1624,13 @@ MmPageOutSectionView(PMM_AVL_TABLE AddressSpace, { DPRINT1("Found a swapentry for a non private and direct mapped page (address %x)\n", Address); - KEBUGCHECK(0); + ASSERT(FALSE); } Status = CcRosUnmapCacheSegment(Bcb, FileOffset, FALSE); if (!NT_SUCCESS(Status)) { DPRINT1("CCRosUnmapCacheSegment failed, status = %x\n", Status); - KEBUGCHECK(0); + ASSERT(FALSE); } PageOp->Status = STATUS_SUCCESS; MmspCompleteAndReleasePageOp(PageOp); @@ -1642,7 +1642,7 @@ MmPageOutSectionView(PMM_AVL_TABLE AddressSpace, { DPRINT1("Found a swap entry for a non dirty, non private and not direct mapped page (address %x)\n", Address); - KEBUGCHECK(0); + ASSERT(FALSE); } MmReleasePageMemoryConsumer(MC_USER, Page); PageOp->Status = STATUS_SUCCESS; @@ -1659,7 +1659,7 @@ MmPageOutSectionView(PMM_AVL_TABLE AddressSpace, MmUnlockAddressSpace(AddressSpace); if (!NT_SUCCESS(Status)) { - KEBUGCHECK(0); + ASSERT(FALSE); } MmReleasePageMemoryConsumer(MC_USER, Page); PageOp->Status = STATUS_SUCCESS; @@ -1787,7 +1787,7 @@ MmPageOutSectionView(PMM_AVL_TABLE AddressSpace, MmUnlockAddressSpace(AddressSpace); if (!NT_SUCCESS(Status)) { - KEBUGCHECK(0); + ASSERT(FALSE); } } else @@ -1862,7 +1862,7 @@ MmWritePageSectionView(PMM_AVL_TABLE AddressSpace, DPRINT1("Trying to write back page from physical memory mapped at %X " "process %d\n", Address, Process ? Process->UniqueProcessId : 0); - KEBUGCHECK(0); + ASSERT(FALSE); } /* @@ -1873,7 +1873,7 @@ MmWritePageSectionView(PMM_AVL_TABLE AddressSpace, { DPRINT1("Trying to page out not-present page at (%d,0x%.8X).\n", Process ? Process->UniqueProcessId : 0, Address); - KEBUGCHECK(0); + ASSERT(FALSE); } Page = MmGetPfnForProcess(Process, Address); SwapEntry = MmGetSavedSwapEntryPage(Page); @@ -2242,7 +2242,7 @@ MmCreatePhysicalMemorySection(VOID) if (!NT_SUCCESS(Status)) { DPRINT1("Failed to create PhysicalMemory section\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } Status = ObInsertObject(PhysSection, NULL, @@ -2683,7 +2683,7 @@ ExeFmtpReadFile(IN PVOID File, if(Length == 0) { - KEBUGCHECK(STATUS_INVALID_PARAMETER_4); + ASSERT(FALSE); } FileOffset = *Offset; @@ -2691,7 +2691,7 @@ ExeFmtpReadFile(IN PVOID File, /* Negative/special offset: it cannot be used in this context */ if(FileOffset.u.HighPart < 0) { - KEBUGCHECK(STATUS_INVALID_PARAMETER_5); + ASSERT(FALSE); } AdjustOffset = PAGE_ROUND_DOWN(FileOffset.u.LowPart); @@ -3865,7 +3865,7 @@ MmFreeSectionPage(PVOID Context, MEMORY_AREA* MemoryArea, PVOID Address, if (Status != STATUS_SUCCESS) { DPRINT1("Failed to wait for page op, status = %x\n", Status); - KEBUGCHECK(0); + ASSERT(FALSE); } MmLockAddressSpace(AddressSpace); @@ -3899,7 +3899,7 @@ MmFreeSectionPage(PVOID Context, MEMORY_AREA* MemoryArea, PVOID Address, if (Segment->Flags & MM_PAGEFILE_SEGMENT) { DPRINT1("Found a swap entry for a page in a pagefile section.\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } MmFreeSwapPage(SwapEntry); } @@ -3914,7 +3914,7 @@ MmFreeSectionPage(PVOID Context, MEMORY_AREA* MemoryArea, PVOID Address, if (Segment->Flags & MM_PAGEFILE_SEGMENT) { DPRINT1("Found a private page in a pagefile section.\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } /* * Just dereference private pages @@ -4040,7 +4040,7 @@ MmUnmapViewOfSection(PEPROCESS Process, if (Status != STATUS_SUCCESS) { DPRINT1("Failed to wait for page op, status = %x\n", Status); - KEBUGCHECK(0); + ASSERT(FALSE); } MmLockAddressSpace(AddressSpace); MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, @@ -4086,7 +4086,7 @@ MmUnmapViewOfSection(PEPROCESS Process, } if (i >= NrSegments) { - KEBUGCHECK(0); + ASSERT(FALSE); } for (i = 0; i < NrSegments; i++) @@ -4627,7 +4627,7 @@ MmMapViewOfSection(IN PVOID SectionObject, { /* Following this pointer would lead to us to the dark side */ /* What to do? Bugcheck? Return status? Do the mambo? */ - KEBUGCHECK(MEMORY_MANAGEMENT); + KeBugCheck(MEMORY_MANAGEMENT); } if (SectionOffset == NULL) diff --git a/reactos/ntoskrnl/ob/obdir.c b/reactos/ntoskrnl/ob/obdir.c index b7da8e05b00..7fc6c1acb51 100644 --- a/reactos/ntoskrnl/ob/obdir.c +++ b/reactos/ntoskrnl/ob/obdir.c @@ -62,7 +62,7 @@ ObpInsertEntryDirectory(IN POBJECT_DIRECTORY Parent, /* Invalid context */ DPRINT1("OB: ObpInsertEntryDirectory - invalid context %p %ld\n", Context, Context->DirectoryLocked); - KEBUGCHECK(0); + ASSERT(FALSE); return FALSE; } @@ -252,7 +252,7 @@ ObpLookupEntryDirectory(IN POBJECT_DIRECTORY Directory, if ((SearchShadow) && (Directory->DeviceMap)) { /* FIXME: We don't support this yet */ - KEBUGCHECK(0); + ASSERT(FALSE); } } diff --git a/reactos/ntoskrnl/ob/obhandle.c b/reactos/ntoskrnl/ob/obhandle.c index 1096c01f073..9ec6266471e 100644 --- a/reactos/ntoskrnl/ob/obhandle.c +++ b/reactos/ntoskrnl/ob/obhandle.c @@ -916,7 +916,7 @@ ObpIncrementHandleCount(IN PVOID Object, { /* FIXME: This should never happen for now */ DPRINT1("Unhandled case\n"); - KEBUGCHECK(0); + ASSERT(FALSE); goto Quickie; } } @@ -945,7 +945,7 @@ ObpIncrementHandleCount(IN PVOID Object, { /* FIXME: This should never happen for now */ DPRINT1("Unhandled case\n"); - KEBUGCHECK(0); + ASSERT(FALSE); return Status; } } @@ -1143,7 +1143,7 @@ ObpIncrementUnnamedHandleCount(IN PVOID Object, { /* FIXME: This should never happen for now */ DPRINT1("Unhandled case\n"); - KEBUGCHECK(0); + ASSERT(FALSE); goto Quickie; } } @@ -1169,7 +1169,7 @@ ObpIncrementUnnamedHandleCount(IN PVOID Object, { /* FIXME: This should never happen for now */ DPRINT1("Unhandled case\n"); - KEBUGCHECK(0); + ASSERT(FALSE); return Status; } } @@ -1753,7 +1753,7 @@ ObpCloseHandle(IN HANDLE Handle, if (KdDebuggerEnabled) { /* Bugcheck */ - KeBugCheckEx(0, (ULONG_PTR)Handle, 1, 0, 0); + KeBugCheckEx(INVALID_KERNEL_HANDLE, (ULONG_PTR)Handle, 1, 0, 0); } } } @@ -3034,7 +3034,7 @@ ObInsertObject(IN PVOID Object, { /* Weird case where we need to do a manual delete */ DPRINT1("Unhandled path\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } /* Cleanup the lookup */ @@ -3052,7 +3052,7 @@ ObInsertObject(IN PVOID Object, } /* Return failure code */ - KEBUGCHECK(0); + ASSERT(FALSE); return Status; } } diff --git a/reactos/ntoskrnl/ob/oblink.c b/reactos/ntoskrnl/ob/oblink.c index bc742e339d8..fa083fc16d6 100644 --- a/reactos/ntoskrnl/ob/oblink.c +++ b/reactos/ntoskrnl/ob/oblink.c @@ -49,7 +49,7 @@ ObpCreateSymbolicLinkName(IN POBJECT_SYMBOLIC_LINK SymbolicLink) /* FIXME: We don't support device maps yet */ DPRINT1("Unhandled path!\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } /*++ diff --git a/reactos/ntoskrnl/po/power.c b/reactos/ntoskrnl/po/power.c index e656446afed..6dd7d636c1f 100644 --- a/reactos/ntoskrnl/po/power.c +++ b/reactos/ntoskrnl/po/power.c @@ -78,7 +78,7 @@ PopSetSystemPowerState(SYSTEM_POWER_STATE PowerState) Status = IopGetSystemPowerDeviceObject(&DeviceObject); if (!NT_SUCCESS(Status)) { - CPRINT("No system power driver available\n"); + DPRINT1("No system power driver available\n"); return STATUS_UNSUCCESSFUL; } diff --git a/reactos/ntoskrnl/ps/kill.c b/reactos/ntoskrnl/ps/kill.c index a6ec97faea4..afb9623a7b9 100644 --- a/reactos/ntoskrnl/ps/kill.c +++ b/reactos/ntoskrnl/ps/kill.c @@ -310,7 +310,7 @@ PspDeleteProcess(IN PVOID ObjectBody) if (!(ExDestroyHandle(PspCidTable, Process->UniqueProcessId, NULL))) { /* Something wrong happened, bugcheck */ - KEBUGCHECK(CID_HANDLE_DELETION); + KeBugCheck(CID_HANDLE_DELETION); } } @@ -360,7 +360,7 @@ PspDeleteThread(IN PVOID ObjectBody) if (!(ExDestroyHandle(PspCidTable, Thread->Cid.UniqueThread, NULL))) { /* Something wrong happened, bugcheck */ - KEBUGCHECK(CID_HANDLE_DELETION); + KeBugCheck(CID_HANDLE_DELETION); } } @@ -421,7 +421,7 @@ PspExitThread(IN NTSTATUS ExitStatus) if (KeIsAttachedProcess()) { /* Bugcheck */ - KEBUGCHECKEX(INVALID_PROCESS_ATTACH_ATTEMPT, + KeBugCheckEx(INVALID_PROCESS_ATTACH_ATTEMPT, (ULONG_PTR)CurrentProcess, (ULONG_PTR)Thread->Tcb.ApcState.Process, (ULONG_PTR)Thread->Tcb.ApcStateIndex, @@ -435,7 +435,7 @@ PspExitThread(IN NTSTATUS ExitStatus) if (Thread->ActiveExWorker) { /* Bugcheck */ - KEBUGCHECKEX(ACTIVE_EX_WORKER_THREAD_TERMINATION, + KeBugCheckEx(ACTIVE_EX_WORKER_THREAD_TERMINATION, (ULONG_PTR)Thread, 0, 0, @@ -446,7 +446,7 @@ PspExitThread(IN NTSTATUS ExitStatus) if (Thread->Tcb.CombinedApcDisable != 0) { /* Bugcheck */ - KEBUGCHECKEX(KERNEL_APC_PENDING_DURING_EXIT, + KeBugCheckEx(KERNEL_APC_PENDING_DURING_EXIT, 0, Thread->Tcb.CombinedApcDisable, 0, @@ -578,7 +578,7 @@ PspExitThread(IN NTSTATUS ExitStatus) else { /* Bugcheck, we can't allow this */ - KEBUGCHECKEX(CRITICAL_PROCESS_DIED, + KeBugCheckEx(CRITICAL_PROCESS_DIED, (ULONG_PTR)CurrentProcess, 0, 0, @@ -701,7 +701,7 @@ PspExitThread(IN NTSTATUS ExitStatus) if (!Thread->Tcb.EnableStackSwap) { /* Stack swap really shouldn't be disabled during exit! */ - KEBUGCHECKEX(KERNEL_STACK_LOCKED_AT_EXIT, 0, 0, 0, 0); + KeBugCheckEx(KERNEL_STACK_LOCKED_AT_EXIT, 0, 0, 0, 0); } /* Cancel I/O for the thread. */ @@ -849,7 +849,7 @@ PspExitThread(IN NTSTATUS ExitStatus) if ((FirstEntry) || (Thread->Tcb.CombinedApcDisable != 0)) { /* Bugcheck time */ - KEBUGCHECKEX(KERNEL_APC_PENDING_DURING_EXIT, + KeBugCheckEx(KERNEL_APC_PENDING_DURING_EXIT, (ULONG_PTR)FirstEntry, Thread->Tcb.CombinedApcDisable, KeGetCurrentIrql(), diff --git a/reactos/ntoskrnl/ps/process.c b/reactos/ntoskrnl/ps/process.c index 3e549ff9bd8..6b92a99e8c0 100644 --- a/reactos/ntoskrnl/ps/process.c +++ b/reactos/ntoskrnl/ps/process.c @@ -698,7 +698,7 @@ PspCreateProcess(OUT PHANDLE ProcessHandle, { /* FIXME: We need to insert this process */ DPRINT1("Jobs not yet supported\n"); - KEBUGCHECK(0); + ASSERT(FALSE); } /* Create PEB only for User-Mode Processes */ diff --git a/reactos/ntoskrnl/ps/security.c b/reactos/ntoskrnl/ps/security.c index 525b130c076..27ea3162350 100644 --- a/reactos/ntoskrnl/ps/security.c +++ b/reactos/ntoskrnl/ps/security.c @@ -647,7 +647,7 @@ PsImpersonateClient(IN PETHREAD Thread, } /* Check if this is a job, which we don't support yet */ - if (Thread->ThreadsProcess->Job) KEBUGCHECK(0); + if (Thread->ThreadsProcess->Job) ASSERT(FALSE); /* Lock thread security */ PspLockThreadSecurityExclusive(Thread); diff --git a/reactos/ntoskrnl/rtl/libsupp.c b/reactos/ntoskrnl/rtl/libsupp.c index b67235086fc..5221937b58d 100644 --- a/reactos/ntoskrnl/rtl/libsupp.c +++ b/reactos/ntoskrnl/rtl/libsupp.c @@ -121,7 +121,7 @@ STDCALL RtlDeleteHeapLock( PRTL_CRITICAL_SECTION CriticalSection) { - KEBUGCHECK(0); + ASSERT(FALSE); return STATUS_SUCCESS; } @@ -130,7 +130,7 @@ STDCALL RtlEnterHeapLock( PRTL_CRITICAL_SECTION CriticalSection) { - KEBUGCHECK(0); + ASSERT(FALSE); return STATUS_SUCCESS; } @@ -139,7 +139,7 @@ STDCALL RtlInitializeHeapLock( PRTL_CRITICAL_SECTION CriticalSection) { - KEBUGCHECK(0); + ASSERT(FALSE); return STATUS_SUCCESS; } @@ -148,7 +148,7 @@ STDCALL RtlLeaveHeapLock( PRTL_CRITICAL_SECTION CriticalSection) { - KEBUGCHECK(0); + ASSERT(FALSE); return STATUS_SUCCESS; } @@ -159,7 +159,7 @@ CHECK_PAGED_CODE_RTL(char *file, int line) if(KeGetCurrentIrql() > APC_LEVEL) { DbgPrint("%s:%i: Pagable code called at IRQL > APC_LEVEL (%d)\n", file, line, KeGetCurrentIrql()); - KEBUGCHECK(0); + ASSERT(FALSE); } } #endif diff --git a/reactos/ntoskrnl/se/audit.c b/reactos/ntoskrnl/se/audit.c index de535b3f161..cafd282d2f2 100644 --- a/reactos/ntoskrnl/se/audit.c +++ b/reactos/ntoskrnl/se/audit.c @@ -84,7 +84,7 @@ SeInitializeProcessAuditName(IN PFILE_OBJECT FileObject, (!(NT_SUCCESS(Status)) || (ReturnLength == sizeof(LocalNameInfo)))) { /* First, free any buffer we might've allocated */ - KEBUGCHECK(0); + ASSERT(FALSE); if (ObjectNameInfo) ExFreePool(ObjectNameInfo); /* Now allocate a temporary one */ diff --git a/reactos/ntoskrnl/se/token.c b/reactos/ntoskrnl/se/token.c index c80a5da97f4..47832556b18 100644 --- a/reactos/ntoskrnl/se/token.c +++ b/reactos/ntoskrnl/se/token.c @@ -2277,7 +2277,7 @@ NtOpenThreadTokenEx(IN HANDLE ThreadHandle, PrimaryToken = PsReferencePrimaryToken(Thread->ThreadsProcess); Status = SepCreateImpersonationTokenDacl(Token, PrimaryToken, &Dacl); - KEBUGCHECK(0); + ASSERT(FALSE); ObfDereferenceObject(PrimaryToken); ObfDereferenceObject(Thread); if (!NT_SUCCESS(Status)) From 5486706e218375441811a6a5d47638c9ceac54b6 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 24 Aug 2008 16:37:15 +0000 Subject: [PATCH 148/324] - Remove one of the ASSERTs in SocketCalloutEnter svn path=/trunk/; revision=35602 --- reactos/drivers/network/afd/afd/lock.c | 1 - 1 file changed, 1 deletion(-) diff --git a/reactos/drivers/network/afd/afd/lock.c b/reactos/drivers/network/afd/afd/lock.c index d75156cc4dc..0395937a230 100644 --- a/reactos/drivers/network/afd/afd/lock.c +++ b/reactos/drivers/network/afd/afd/lock.c @@ -325,7 +325,6 @@ NTSTATUS LeaveIrpUntilLater( PAFD_FCB FCB, PIRP Irp, UINT Function ) { VOID SocketCalloutEnter( PAFD_FCB FCB ) { ASSERT(!FCB->Critical); - ASSERT(FCB->Locked); FCB->Critical = TRUE; SocketStateUnlock( FCB ); } From 1e3bc51e7158c3b3b80aaa765cdaff0ed879c613 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Sun, 24 Aug 2008 16:43:08 +0000 Subject: [PATCH 149/324] - Check if source and destination is the same. Fixes creating a new directory and using the default name svn path=/trunk/; revision=35603 --- reactos/dll/win32/shell32/shfldr_fs.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/reactos/dll/win32/shell32/shfldr_fs.c b/reactos/dll/win32/shell32/shfldr_fs.c index cc94009bc02..a67907ed4e1 100644 --- a/reactos/dll/win32/shell32/shfldr_fs.c +++ b/reactos/dll/win32/shell32/shfldr_fs.c @@ -886,6 +886,16 @@ static HRESULT WINAPI IShellFolder_fnSetNameOf (IShellFolder2 * iface, } TRACE ("src=%s dest=%s\n", debugstr_w(szSrc), debugstr_w(szDest)); + if (!memcmp(szSrc, szDest, (wcslen(szDest)+1) * sizeof(WCHAR))) + { + /* src and destination is the same */ + HRESULT hr = S_OK; + if (pPidlOut) + hr = _ILCreateFromPathW(szDest, pPidlOut); + + return hr; + } + if (MoveFileW (szSrc, szDest)) { HRESULT hr = S_OK; From 413b6d969f1528b0ead32ea5946c99dbc7290ad1 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sun, 24 Aug 2008 18:08:17 +0000 Subject: [PATCH 150/324] Hack the declaration of RQueryServiceConfigA. This hack has already been applied to RQueryServiceConfigW. Based on patches from Bug #3669 by bugboy . svn path=/trunk/; revision=35604 --- reactos/base/system/services/rpcserver.c | 2 +- reactos/dll/win32/advapi32/service/scm.c | 2 +- reactos/include/reactos/idl/svcctl.idl | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/reactos/base/system/services/rpcserver.c b/reactos/base/system/services/rpcserver.c index 92be3aa5a1c..77baac1c323 100644 --- a/reactos/base/system/services/rpcserver.c +++ b/reactos/base/system/services/rpcserver.c @@ -2475,7 +2475,7 @@ DWORD ROpenServiceA( DWORD RQueryServiceConfigA( handle_t BindingHandle, SC_RPC_HANDLE hService, - LPQUERY_SERVICE_CONFIGA lpServiceConfig, + LPBYTE lpBuf, //LPQUERY_SERVICE_CONFIGA lpServiceConfig, DWORD cbBufSize, LPBOUNDED_DWORD_8K pcbBytesNeeded) { diff --git a/reactos/dll/win32/advapi32/service/scm.c b/reactos/dll/win32/advapi32/service/scm.c index 61105fb835f..8e93b16cc36 100644 --- a/reactos/dll/win32/advapi32/service/scm.c +++ b/reactos/dll/win32/advapi32/service/scm.c @@ -1461,7 +1461,7 @@ QueryServiceConfigA(SC_HANDLE hService, /* Call to services.exe using RPC */ dwError = RQueryServiceConfigA(BindingHandle, (SC_RPC_HANDLE)hService, - lpServiceConfig, + (LPBYTE)lpServiceConfig, cbBufSize, pcbBytesNeeded); if (dwError != ERROR_SUCCESS) diff --git a/reactos/include/reactos/idl/svcctl.idl b/reactos/include/reactos/idl/svcctl.idl index 761ecc135a1..2f737a5a489 100644 --- a/reactos/include/reactos/idl/svcctl.idl +++ b/reactos/include/reactos/idl/svcctl.idl @@ -578,7 +578,8 @@ interface svcctl DWORD RQueryServiceConfigA( [in] handle_t BindingHandle, [in] SC_RPC_HANDLE hService, - [out] LPQUERY_SERVICE_CONFIGA lpServiceConfig, + [out, unique, size_is(cbBufSize)] LPBYTE lpServiceConfig, + /* FIXME: should be [out] LPQUERY_SERVICE_CONFIGA lpServiceConfig, */ [in, range(0, 1024*8)] DWORD cbBufSize, [out] LPBOUNDED_DWORD_8K pcbBytesNeeded); From 866b97d444bc2bf0161174575ccc2d698d44b7fc Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sun, 24 Aug 2008 18:27:17 +0000 Subject: [PATCH 151/324] SEH-protect all calls to remote functions. Based on patches from Bug #3669 by bugboy . svn path=/trunk/; revision=35605 --- reactos/dll/win32/advapi32/service/scm.c | 849 ++++++++++++++++------- 1 file changed, 597 insertions(+), 252 deletions(-) diff --git a/reactos/dll/win32/advapi32/service/scm.c b/reactos/dll/win32/advapi32/service/scm.c index 8e93b16cc36..52c36981709 100644 --- a/reactos/dll/win32/advapi32/service/scm.c +++ b/reactos/dll/win32/advapi32/service/scm.c @@ -78,6 +78,26 @@ HandleUnbind(VOID) #endif +static DWORD +ScmRpcStatusToWinError(RPC_STATUS Status) +{ + switch (Status) + { + case RPC_X_SS_IN_NULL_CONTEXT: + return ERROR_INVALID_HANDLE; + + case RPC_X_NULL_REF_POINTER: + return ERROR_INVALID_PARAMETER; + + case STATUS_ACCESS_VIOLATION: + return ERROR_INVALID_ADDRESS; + + default: + return (DWORD)Status; + } +} + + /********************************************************************** * ChangeServiceConfig2A * @@ -116,9 +136,18 @@ ChangeServiceConfig2A(SC_HANDLE hService, HandleBind(); - dwError = RChangeServiceConfig2A(BindingHandle, - (SC_RPC_HANDLE)hService, - Info); + _SEH_TRY + { + dwError = RChangeServiceConfig2A(BindingHandle, + (SC_RPC_HANDLE)hService, + Info); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; + if (dwError != ERROR_SUCCESS) { ERR("RChangeServiceConfig2A() failed (Error %lu)\n", dwError); @@ -170,9 +199,18 @@ ChangeServiceConfig2W(SC_HANDLE hService, HandleBind(); - dwError = RChangeServiceConfig2W(BindingHandle, - (SC_RPC_HANDLE)hService, - Info); + _SEH_TRY + { + dwError = RChangeServiceConfig2W(BindingHandle, + (SC_RPC_HANDLE)hService, + Info); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; + if (dwError != ERROR_SUCCESS) { ERR("RChangeServiceConfig2W() failed (Error %lu)\n", dwError); @@ -226,21 +264,30 @@ ChangeServiceConfigA(SC_HANDLE hService, HandleBind(); - /* Call to services.exe using RPC */ - dwError = RChangeServiceConfigA(BindingHandle, - (SC_RPC_HANDLE)hService, - dwServiceType, - dwStartType, - dwErrorControl, - (LPSTR)lpBinaryPathName, - (LPSTR)lpLoadOrderGroup, - lpdwTagId, - (LPSTR)lpDependencies, - dwDependenciesLength, - (LPSTR)lpServiceStartName, - NULL, /* FIXME: lpPassword */ - 0, /* FIXME: dwPasswordLength */ - (LPSTR)lpDisplayName); + _SEH_TRY + { + /* Call to services.exe using RPC */ + dwError = RChangeServiceConfigA(BindingHandle, + (SC_RPC_HANDLE)hService, + dwServiceType, + dwStartType, + dwErrorControl, + (LPSTR)lpBinaryPathName, + (LPSTR)lpLoadOrderGroup, + lpdwTagId, + (LPSTR)lpDependencies, + dwDependenciesLength, + (LPSTR)lpServiceStartName, + NULL, /* FIXME: lpPassword */ + 0, /* FIXME: dwPasswordLength */ + (LPSTR)lpDisplayName); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; + if (dwError != ERROR_SUCCESS) { ERR("RChangeServiceConfigA() failed (Error %lu)\n", dwError); @@ -294,21 +341,30 @@ ChangeServiceConfigW(SC_HANDLE hService, HandleBind(); - /* Call to services.exe using RPC */ - dwError = RChangeServiceConfigW(BindingHandle, - (SC_RPC_HANDLE)hService, - dwServiceType, - dwStartType, - dwErrorControl, - (LPWSTR)lpBinaryPathName, - (LPWSTR)lpLoadOrderGroup, - lpdwTagId, - (LPBYTE)lpDependencies, - dwDependenciesLength, - (LPWSTR)lpServiceStartName, - NULL, /* FIXME: lpPassword */ - 0, /* FIXME: dwPasswordLength */ - (LPWSTR)lpDisplayName); + _SEH_TRY + { + /* Call to services.exe using RPC */ + dwError = RChangeServiceConfigW(BindingHandle, + (SC_RPC_HANDLE)hService, + dwServiceType, + dwStartType, + dwErrorControl, + (LPWSTR)lpBinaryPathName, + (LPWSTR)lpLoadOrderGroup, + lpdwTagId, + (LPBYTE)lpDependencies, + dwDependenciesLength, + (LPWSTR)lpServiceStartName, + NULL, /* FIXME: lpPassword */ + 0, /* FIXME: dwPasswordLength */ + (LPWSTR)lpDisplayName); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; + if (dwError != ERROR_SUCCESS) { ERR("RChangeServiceConfigW() failed (Error %lu)\n", dwError); @@ -334,9 +390,18 @@ CloseServiceHandle(SC_HANDLE hSCObject) HandleBind(); - /* Call to services.exe using RPC */ - dwError = RCloseServiceHandle(BindingHandle, - (LPSC_RPC_HANDLE)&hSCObject); + _SEH_TRY + { + /* Call to services.exe using RPC */ + dwError = RCloseServiceHandle(BindingHandle, + (LPSC_RPC_HANDLE)&hSCObject); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; + if (dwError) { ERR("RCloseServiceHandle() failed (Error %lu)\n", dwError); @@ -367,11 +432,20 @@ ControlService(SC_HANDLE hService, HandleBind(); - /* Call to services.exe using RPC */ - dwError = RControlService(BindingHandle, - (SC_RPC_HANDLE)hService, - dwControl, - lpServiceStatus); + _SEH_TRY + { + /* Call to services.exe using RPC */ + dwError = RControlService(BindingHandle, + (SC_RPC_HANDLE)hService, + dwControl, + lpServiceStatus); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; + if (dwError != ERROR_SUCCESS) { ERR("RControlService() failed (Error %lu)\n", dwError); @@ -403,7 +477,6 @@ ControlServiceEx(IN SC_HANDLE hService, } - /********************************************************************** * CreateServiceA * @@ -616,24 +689,33 @@ CreateServiceW(SC_HANDLE hSCManager, HandleBind(); - /* Call to services.exe using RPC */ - dwError = RCreateServiceW(BindingHandle, - (SC_RPC_HANDLE)hSCManager, - (LPWSTR)lpServiceName, - (LPWSTR)lpDisplayName, - dwDesiredAccess, - dwServiceType, - dwStartType, - dwErrorControl, - (LPWSTR)lpBinaryPathName, - (LPWSTR)lpLoadOrderGroup, - lpdwTagId, - (LPBYTE)lpDependencies, - dwDependenciesLength, - (LPWSTR)lpServiceStartName, - NULL, /* FIXME: lpPassword */ - 0, /* FIXME: dwPasswordLength */ - (SC_RPC_HANDLE *)&hService); + _SEH_TRY + { + /* Call to services.exe using RPC */ + dwError = RCreateServiceW(BindingHandle, + (SC_RPC_HANDLE)hSCManager, + (LPWSTR)lpServiceName, + (LPWSTR)lpDisplayName, + dwDesiredAccess, + dwServiceType, + dwStartType, + dwErrorControl, + (LPWSTR)lpBinaryPathName, + (LPWSTR)lpLoadOrderGroup, + lpdwTagId, + (LPBYTE)lpDependencies, + dwDependenciesLength, + (LPWSTR)lpServiceStartName, + NULL, /* FIXME: lpPassword */ + 0, /* FIXME: dwPasswordLength */ + (SC_RPC_HANDLE *)&hService); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; + if (dwError != ERROR_SUCCESS) { ERR("RCreateServiceW() failed (Error %lu)\n", dwError); @@ -659,9 +741,18 @@ DeleteService(SC_HANDLE hService) HandleBind(); - /* Call to services.exe using RPC */ - dwError = RDeleteService(BindingHandle, - (SC_RPC_HANDLE)hService); + _SEH_TRY + { + /* Call to services.exe using RPC */ + dwError = RDeleteService(BindingHandle, + (SC_RPC_HANDLE)hService); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; + if (dwError != ERROR_SUCCESS) { ERR("RDeleteService() failed (Error %lu)\n", dwError); @@ -687,20 +778,28 @@ EnumDependentServicesA(SC_HANDLE hService, LPDWORD lpServicesReturned) { LPENUM_SERVICE_STATUSA lpStatusPtr; - DWORD dwError = ERROR_SUCCESS; + DWORD dwError; DWORD dwCount; TRACE("EnumServicesStatusA() called\n"); HandleBind(); - dwError = REnumDependentServicesA(BindingHandle, - (SC_RPC_HANDLE)hService, - dwServiceState, - (LPBYTE)lpServices, - cbBufSize, - pcbBytesNeeded, - lpServicesReturned); + _SEH_TRY + { + dwError = REnumDependentServicesA(BindingHandle, + (SC_RPC_HANDLE)hService, + dwServiceState, + (LPBYTE)lpServices, + cbBufSize, + pcbBytesNeeded, + lpServicesReturned); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; lpStatusPtr = (LPENUM_SERVICE_STATUSA)lpServices; for (dwCount = 0; dwCount < *lpServicesReturned; dwCount++) @@ -743,20 +842,28 @@ EnumDependentServicesW(SC_HANDLE hService, LPDWORD lpServicesReturned) { LPENUM_SERVICE_STATUSW lpStatusPtr; - DWORD dwError = ERROR_SUCCESS; + DWORD dwError; DWORD dwCount; TRACE("EnumServicesStatusW() called\n"); HandleBind(); - dwError = REnumDependentServicesW(BindingHandle, - (SC_RPC_HANDLE)hService, - dwServiceState, - (LPBYTE)lpServices, - cbBufSize, - pcbBytesNeeded, - lpServicesReturned); + _SEH_TRY + { + dwError = REnumDependentServicesW(BindingHandle, + (SC_RPC_HANDLE)hService, + dwServiceState, + (LPBYTE)lpServices, + cbBufSize, + pcbBytesNeeded, + lpServicesReturned); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; lpStatusPtr = (LPENUM_SERVICE_STATUSW)lpServices; for (dwCount = 0; dwCount < *lpServicesReturned; dwCount++) @@ -825,22 +932,30 @@ EnumServicesStatusA(SC_HANDLE hSCManager, LPDWORD lpResumeHandle) { LPENUM_SERVICE_STATUSA lpStatusPtr; - DWORD dwError = ERROR_SUCCESS; + DWORD dwError; DWORD dwCount; TRACE("EnumServicesStatusA() called\n"); HandleBind(); - dwError = REnumServicesStatusA(BindingHandle, - (SC_RPC_HANDLE)hSCManager, - dwServiceType, - dwServiceState, - (LPBYTE)lpServices, - cbBufSize, - pcbBytesNeeded, - lpServicesReturned, - lpResumeHandle); + _SEH_TRY + { + dwError = REnumServicesStatusA(BindingHandle, + (SC_RPC_HANDLE)hSCManager, + dwServiceType, + dwServiceState, + (LPBYTE)lpServices, + cbBufSize, + pcbBytesNeeded, + lpServicesReturned, + lpResumeHandle); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; lpStatusPtr = (LPENUM_SERVICE_STATUSA)lpServices; for (dwCount = 0; dwCount < *lpServicesReturned; dwCount++) @@ -885,22 +1000,30 @@ EnumServicesStatusW(SC_HANDLE hSCManager, LPDWORD lpResumeHandle) { LPENUM_SERVICE_STATUSW lpStatusPtr; - DWORD dwError = ERROR_SUCCESS; + DWORD dwError; DWORD dwCount; TRACE("EnumServicesStatusW() called\n"); HandleBind(); - dwError = REnumServicesStatusW(BindingHandle, - (SC_RPC_HANDLE)hSCManager, - dwServiceType, - dwServiceState, - (LPBYTE)lpServices, - cbBufSize, - pcbBytesNeeded, - lpServicesReturned, - lpResumeHandle); + _SEH_TRY + { + dwError = REnumServicesStatusW(BindingHandle, + (SC_RPC_HANDLE)hSCManager, + dwServiceType, + dwServiceState, + (LPBYTE)lpServices, + cbBufSize, + pcbBytesNeeded, + lpServicesReturned, + lpResumeHandle); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; lpStatusPtr = (LPENUM_SERVICE_STATUSW)lpServices; for (dwCount = 0; dwCount < *lpServicesReturned; dwCount++) @@ -947,24 +1070,32 @@ EnumServicesStatusExA(SC_HANDLE hSCManager, LPCSTR pszGroupName) { LPENUM_SERVICE_STATUS_PROCESSA lpStatusPtr; - DWORD dwError = ERROR_SUCCESS; + DWORD dwError; DWORD dwCount; TRACE("EnumServicesStatusExA() called\n"); HandleBind(); - dwError = REnumServicesStatusExA(BindingHandle, - (SC_RPC_HANDLE)hSCManager, - InfoLevel, - dwServiceType, - dwServiceState, - (LPBYTE)lpServices, - cbBufSize, - pcbBytesNeeded, - lpServicesReturned, - lpResumeHandle, - (LPSTR)pszGroupName); + _SEH_TRY + { + dwError = REnumServicesStatusExA(BindingHandle, + (SC_RPC_HANDLE)hSCManager, + InfoLevel, + dwServiceType, + dwServiceState, + (LPBYTE)lpServices, + cbBufSize, + pcbBytesNeeded, + lpServicesReturned, + lpResumeHandle, + (LPSTR)pszGroupName); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; if (dwError == ERROR_MORE_DATA) { @@ -1019,24 +1150,32 @@ EnumServicesStatusExW(SC_HANDLE hSCManager, LPCWSTR pszGroupName) { LPENUM_SERVICE_STATUS_PROCESSW lpStatusPtr; - DWORD dwError = ERROR_SUCCESS; + DWORD dwError; DWORD dwCount; TRACE("EnumServicesStatusExW() called\n"); HandleBind(); - dwError = REnumServicesStatusExW(BindingHandle, - (SC_RPC_HANDLE)hSCManager, - InfoLevel, - dwServiceType, - dwServiceState, - (LPBYTE)lpServices, - cbBufSize, - pcbBytesNeeded, - lpServicesReturned, - lpResumeHandle, - (LPWSTR)pszGroupName); + _SEH_TRY + { + dwError = REnumServicesStatusExW(BindingHandle, + (SC_RPC_HANDLE)hSCManager, + InfoLevel, + dwServiceType, + dwServiceState, + (LPBYTE)lpServices, + cbBufSize, + pcbBytesNeeded, + lpServicesReturned, + lpResumeHandle, + (LPWSTR)pszGroupName); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; if (dwError == ERROR_MORE_DATA) { @@ -1090,11 +1229,23 @@ GetServiceDisplayNameA(SC_HANDLE hSCManager, HandleBind(); - dwError = RGetServiceDisplayNameA(BindingHandle, - (SC_RPC_HANDLE)hSCManager, - (LPSTR)lpServiceName, - lpDisplayName, - lpcchBuffer); + _SEH_TRY + { + dwError = RGetServiceDisplayNameA(BindingHandle, + (SC_RPC_HANDLE)hSCManager, + (LPSTR)lpServiceName, + lpDisplayName, + lpcchBuffer); + } + _SEH_HANDLE + { + /* HACK: because of a problem with rpcrt4, rpcserver is hacked to return 6 for ERROR_SERVICE_DOES_NOT_EXIST */ + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + + + _SEH_END; + if (dwError != ERROR_SUCCESS) { ERR("RGetServiceDisplayNameA() failed (Error %lu)\n", dwError); @@ -1125,11 +1276,20 @@ GetServiceDisplayNameW(SC_HANDLE hSCManager, HandleBind(); - dwError = RGetServiceDisplayNameW(BindingHandle, - (SC_RPC_HANDLE)hSCManager, - (LPWSTR)lpServiceName, - lpDisplayName, - lpcchBuffer); + _SEH_TRY + { + dwError = RGetServiceDisplayNameW(BindingHandle, + (SC_RPC_HANDLE)hSCManager, + (LPWSTR)lpServiceName, + lpDisplayName, + lpcchBuffer); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; + if (dwError != ERROR_SUCCESS) { ERR("RGetServiceDisplayNameW() failed (Error %lu)\n", dwError); @@ -1160,11 +1320,20 @@ GetServiceKeyNameA(SC_HANDLE hSCManager, HandleBind(); - dwError = RGetServiceKeyNameA(BindingHandle, - (SC_RPC_HANDLE)hSCManager, - (LPSTR)lpDisplayName, - lpServiceName, - lpcchBuffer); + _SEH_TRY + { + dwError = RGetServiceKeyNameA(BindingHandle, + (SC_RPC_HANDLE)hSCManager, + (LPSTR)lpDisplayName, + lpServiceName, + lpcchBuffer); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; + if (dwError != ERROR_SUCCESS) { ERR("RGetServiceKeyNameA() failed (Error %lu)\n", dwError); @@ -1195,11 +1364,20 @@ GetServiceKeyNameW(SC_HANDLE hSCManager, HandleBind(); - dwError = RGetServiceKeyNameW(BindingHandle, - (SC_RPC_HANDLE)hSCManager, - (LPWSTR)lpDisplayName, - lpServiceName, - lpcchBuffer); + _SEH_TRY + { + dwError = RGetServiceKeyNameW(BindingHandle, + (SC_RPC_HANDLE)hSCManager, + (LPWSTR)lpDisplayName, + lpServiceName, + lpcchBuffer); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; + if (dwError != ERROR_SUCCESS) { ERR("RGetServiceKeyNameW() failed (Error %lu)\n", dwError); @@ -1228,10 +1406,19 @@ LockServiceDatabase(SC_HANDLE hSCManager) HandleBind(); - /* Call to services.exe using RPC */ - dwError = RLockServiceDatabase(BindingHandle, - (SC_RPC_HANDLE)hSCManager, - (SC_RPC_LOCK *)&hLock); + _SEH_TRY + { + /* Call to services.exe using RPC */ + dwError = RLockServiceDatabase(BindingHandle, + (SC_RPC_HANDLE)hSCManager, + (SC_RPC_LOCK *)&hLock); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; + if (dwError != ERROR_SUCCESS) { ERR("RLockServiceDatabase() failed (Error %lu)\n", dwError); @@ -1305,12 +1492,21 @@ OpenSCManagerA(LPCSTR lpMachineName, HandleBind(); - /* Call to services.exe using RPC */ - dwError = ROpenSCManagerA(BindingHandle, - (LPSTR)lpMachineName, - (LPSTR)lpDatabaseName, - dwDesiredAccess, - (SC_RPC_HANDLE *)&hScm); + _SEH_TRY + { + /* Call to services.exe using RPC */ + dwError = ROpenSCManagerA(BindingHandle, + (LPSTR)lpMachineName, + (LPSTR)lpDatabaseName, + dwDesiredAccess, + (SC_RPC_HANDLE *)&hScm); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; + if (dwError != ERROR_SUCCESS) { ERR("ROpenSCManagerA() failed (Error %lu)\n", dwError); @@ -1344,12 +1540,21 @@ OpenSCManagerW(LPCWSTR lpMachineName, HandleBind(); - /* Call to services.exe using RPC */ - dwError = ROpenSCManagerW(BindingHandle, - (LPWSTR)lpMachineName, - (LPWSTR)lpDatabaseName, - dwDesiredAccess, - (SC_RPC_HANDLE *)&hScm); + _SEH_TRY + { + /* Call to services.exe using RPC */ + dwError = ROpenSCManagerW(BindingHandle, + (LPWSTR)lpMachineName, + (LPWSTR)lpDatabaseName, + dwDesiredAccess, + (SC_RPC_HANDLE *)&hScm); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; + if (dwError != ERROR_SUCCESS) { ERR("ROpenSCManagerW() failed (Error %lu)\n", dwError); @@ -1381,12 +1586,21 @@ OpenServiceA(SC_HANDLE hSCManager, HandleBind(); - /* Call to services.exe using RPC */ - dwError = ROpenServiceA(BindingHandle, - (SC_RPC_HANDLE)hSCManager, - (LPSTR)lpServiceName, - dwDesiredAccess, - (SC_RPC_HANDLE *)&hService); + _SEH_TRY + { + /* Call to services.exe using RPC */ + dwError = ROpenServiceA(BindingHandle, + (SC_RPC_HANDLE)hSCManager, + (LPSTR)lpServiceName, + dwDesiredAccess, + (SC_RPC_HANDLE *)&hService); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; + if (dwError != ERROR_SUCCESS) { ERR("ROpenServiceA() failed (Error %lu)\n", dwError); @@ -1418,12 +1632,21 @@ OpenServiceW(SC_HANDLE hSCManager, HandleBind(); - /* Call to services.exe using RPC */ - dwError = ROpenServiceW(BindingHandle, - (SC_RPC_HANDLE)hSCManager, - (LPWSTR)lpServiceName, - dwDesiredAccess, - (SC_RPC_HANDLE *)&hService); + _SEH_TRY + { + /* Call to services.exe using RPC */ + dwError = ROpenServiceW(BindingHandle, + (SC_RPC_HANDLE)hSCManager, + (LPWSTR)lpServiceName, + dwDesiredAccess, + (SC_RPC_HANDLE *)&hService); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; + if (dwError != ERROR_SUCCESS) { if (dwError == ERROR_SERVICE_DOES_NOT_EXIST) @@ -1458,12 +1681,21 @@ QueryServiceConfigA(SC_HANDLE hService, HandleBind(); - /* Call to services.exe using RPC */ - dwError = RQueryServiceConfigA(BindingHandle, - (SC_RPC_HANDLE)hService, - (LPBYTE)lpServiceConfig, - cbBufSize, - pcbBytesNeeded); + _SEH_TRY + { + /* Call to services.exe using RPC */ + dwError = RQueryServiceConfigA(BindingHandle, + (SC_RPC_HANDLE)hService, + (LPBYTE)lpServiceConfig, + cbBufSize, + pcbBytesNeeded); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; + if (dwError != ERROR_SUCCESS) { ERR("RQueryServiceConfigA() failed (Error %lu)\n", dwError); @@ -1521,12 +1753,21 @@ QueryServiceConfigW(SC_HANDLE hService, HandleBind(); - /* Call to services.exe using RPC */ - dwError = RQueryServiceConfigW(BindingHandle, - (SC_RPC_HANDLE)hService, - (LPBYTE)lpServiceConfig, - cbBufSize, - pcbBytesNeeded); + _SEH_TRY + { + /* Call to services.exe using RPC */ + dwError = RQueryServiceConfigW(BindingHandle, + (SC_RPC_HANDLE)hService, + (LPBYTE)lpServiceConfig, + cbBufSize, + pcbBytesNeeded); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; + if (dwError != ERROR_SUCCESS) { if (dwError == ERROR_INSUFFICIENT_BUFFER) @@ -1588,13 +1829,22 @@ QueryServiceConfig2A(SC_HANDLE hService, HandleBind(); - /* Call to services.exe using RPC */ - dwError = RQueryServiceConfig2A(BindingHandle, - (SC_RPC_HANDLE)hService, - dwInfoLevel, - lpBuffer, - cbBufSize, - pcbBytesNeeded); + _SEH_TRY + { + /* Call to services.exe using RPC */ + dwError = RQueryServiceConfig2A(BindingHandle, + (SC_RPC_HANDLE)hService, + dwInfoLevel, + lpBuffer, + cbBufSize, + pcbBytesNeeded); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; + if (dwError != ERROR_SUCCESS) { ERR("RQueryServiceConfig2A() failed (Error %lu)\n", dwError); @@ -1663,13 +1913,22 @@ QueryServiceConfig2W(SC_HANDLE hService, HandleBind(); - /* Call to services.exe using RPC */ - dwError = RQueryServiceConfig2W(BindingHandle, - (SC_RPC_HANDLE)hService, - dwInfoLevel, - lpBuffer, - cbBufSize, - pcbBytesNeeded); + _SEH_TRY + { + /* Call to services.exe using RPC */ + dwError = RQueryServiceConfig2W(BindingHandle, + (SC_RPC_HANDLE)hService, + dwInfoLevel, + lpBuffer, + cbBufSize, + pcbBytesNeeded); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; + if (dwError != ERROR_SUCCESS) { ERR("RQueryServiceConfig2W() failed (Error %lu)\n", dwError); @@ -1736,12 +1995,21 @@ QueryServiceLockStatusA(SC_HANDLE hSCManager, HandleBind(); - /* Call to services.exe using RPC */ - dwError = RQueryServiceLockStatusA(BindingHandle, - (SC_RPC_HANDLE)hSCManager, - lpLockStatus, - cbBufSize, - pcbBytesNeeded); + _SEH_TRY + { + /* Call to services.exe using RPC */ + dwError = RQueryServiceLockStatusA(BindingHandle, + (SC_RPC_HANDLE)hSCManager, + lpLockStatus, + cbBufSize, + pcbBytesNeeded); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; + if (dwError != ERROR_SUCCESS) { ERR("RQueryServiceLockStatusA() failed (Error %lu)\n", dwError); @@ -1778,12 +2046,21 @@ QueryServiceLockStatusW(SC_HANDLE hSCManager, HandleBind(); - /* Call to services.exe using RPC */ - dwError = RQueryServiceLockStatusW(BindingHandle, - (SC_RPC_HANDLE)hSCManager, - lpLockStatus, - cbBufSize, - pcbBytesNeeded); + _SEH_TRY + { + /* Call to services.exe using RPC */ + dwError = RQueryServiceLockStatusW(BindingHandle, + (SC_RPC_HANDLE)hSCManager, + lpLockStatus, + cbBufSize, + pcbBytesNeeded); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; + if (dwError != ERROR_SUCCESS) { ERR("RQueryServiceLockStatusW() failed (Error %lu)\n", dwError); @@ -1822,13 +2099,22 @@ QueryServiceObjectSecurity(SC_HANDLE hService, HandleBind(); - /* Call to services.exe using RPC */ - dwError = RQueryServiceObjectSecurity(BindingHandle, - (SC_RPC_HANDLE)hService, - dwSecurityInformation, - (LPBYTE)lpSecurityDescriptor, - cbBufSize, - pcbBytesNeeded); + _SEH_TRY + { + /* Call to services.exe using RPC */ + dwError = RQueryServiceObjectSecurity(BindingHandle, + (SC_RPC_HANDLE)hService, + dwSecurityInformation, + (LPBYTE)lpSecurityDescriptor, + cbBufSize, + pcbBytesNeeded); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; + if (dwError != ERROR_SUCCESS) { ERR("QueryServiceObjectSecurity() failed (Error %lu)\n", dwError); @@ -1883,12 +2169,20 @@ SetServiceObjectSecurity(SC_HANDLE hService, HandleBind(); - /* Call to services.exe using RPC */ - dwError = RSetServiceObjectSecurity(BindingHandle, - (SC_RPC_HANDLE)hService, - dwSecurityInformation, - (LPBYTE)SelfRelativeSD, - Length); + _SEH_TRY + { + /* Call to services.exe using RPC */ + dwError = RSetServiceObjectSecurity(BindingHandle, + (SC_RPC_HANDLE)hService, + dwSecurityInformation, + (LPBYTE)SelfRelativeSD, + Length); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; HeapFree(GetProcessHeap(), 0, SelfRelativeSD); @@ -1919,10 +2213,19 @@ QueryServiceStatus(SC_HANDLE hService, HandleBind(); - /* Call to services.exe using RPC */ - dwError = RQueryServiceStatus(BindingHandle, - (SC_RPC_HANDLE)hService, - lpServiceStatus); + _SEH_TRY + { + /* Call to services.exe using RPC */ + dwError = RQueryServiceStatus(BindingHandle, + (SC_RPC_HANDLE)hService, + lpServiceStatus); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; + if (dwError != ERROR_SUCCESS) { ERR("RQueryServiceStatus() failed (Error %lu)\n", dwError); @@ -1952,13 +2255,22 @@ QueryServiceStatusEx(SC_HANDLE hService, HandleBind(); - /* Call to services.exe using RPC */ - dwError = RQueryServiceStatusEx(BindingHandle, - (SC_RPC_HANDLE)hService, - InfoLevel, - lpBuffer, - cbBufSize, - pcbBytesNeeded); + _SEH_TRY + { + /* Call to services.exe using RPC */ + dwError = RQueryServiceStatusEx(BindingHandle, + (SC_RPC_HANDLE)hService, + InfoLevel, + lpBuffer, + cbBufSize, + pcbBytesNeeded); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; + if (dwError != ERROR_SUCCESS) { ERR("RQueryServiceStatusEx() failed (Error %lu)\n", dwError); @@ -1982,11 +2294,18 @@ StartServiceA(SC_HANDLE hService, { DWORD dwError; - dwError = RStartServiceA(BindingHandle, - (SC_RPC_HANDLE)hService, - dwNumServiceArgs, - (LPSTRING_PTRSA)lpServiceArgVectors); - + _SEH_TRY + { + dwError = RStartServiceA(BindingHandle, + (SC_RPC_HANDLE)hService, + dwNumServiceArgs, + (LPSTRING_PTRSA)lpServiceArgVectors); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; if (dwError != ERROR_SUCCESS) { @@ -2011,10 +2330,18 @@ StartServiceW(SC_HANDLE hService, { DWORD dwError; - dwError = RStartServiceW(BindingHandle, - (SC_RPC_HANDLE)hService, - dwNumServiceArgs, - (LPSTRING_PTRSW)lpServiceArgVectors); + _SEH_TRY + { + dwError = RStartServiceW(BindingHandle, + (SC_RPC_HANDLE)hService, + dwNumServiceArgs, + (LPSTRING_PTRSW)lpServiceArgVectors); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; if (dwError != ERROR_SUCCESS) { @@ -2041,9 +2368,18 @@ UnlockServiceDatabase(SC_LOCK ScLock) HandleBind(); - /* Call to services.exe using RPC */ - dwError = RUnlockServiceDatabase(BindingHandle, - (SC_RPC_LOCK)ScLock); + _SEH_TRY + { + /* Call to services.exe using RPC */ + dwError = RUnlockServiceDatabase(BindingHandle, + (SC_RPC_LOCK)ScLock); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; + if (dwError != ERROR_SUCCESS) { ERR("RUnlockServiceDatabase() failed (Error %lu)\n", dwError); @@ -2069,10 +2405,19 @@ NotifyBootConfigStatus(BOOL BootAcceptable) HandleBind(); - /* Call to services.exe using RPC */ - dwError = RNotifyBootConfigStatus(BindingHandle, - NULL, - BootAcceptable); + _SEH_TRY + { + /* Call to services.exe using RPC */ + dwError = RNotifyBootConfigStatus(BindingHandle, + NULL, + BootAcceptable); + } + _SEH_HANDLE + { + dwError = ScmRpcStatusToWinError(RpcExceptionCode()); + } + _SEH_END; + if (dwError != ERROR_SUCCESS) { ERR("NotifyBootConfigStatus() failed (Error %lu)\n", dwError); From 0eaca617d3693b5b52f165ebe24aed4968b0d34c Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sun, 24 Aug 2008 18:30:59 +0000 Subject: [PATCH 152/324] Don't try to print information about a service that doesn't exist. svn path=/trunk/; revision=35606 --- reactos/base/applications/sc/query.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/reactos/base/applications/sc/query.c b/reactos/base/applications/sc/query.c index 128c587b3af..e15573b92f9 100644 --- a/reactos/base/applications/sc/query.c +++ b/reactos/base/applications/sc/query.c @@ -227,17 +227,11 @@ Query(LPCTSTR *ServiceArgs, LPCTSTR ServiceName = *ServiceArgs; pStatus = QueryService(ServiceName); - if (bExtended) + if (pStatus) { PrintService(ServiceName, pStatus, - TRUE); - } - else - { - PrintService(ServiceName, - pStatus, - FALSE); + bExtended); } } From 3250ec8a0153c8d2cef40efe6b3a6c1a3dc6baeb Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Sun, 24 Aug 2008 18:47:14 +0000 Subject: [PATCH 153/324] - [FORMATTING] Code style and comment cleanup. No code change. svn path=/trunk/; revision=35608 --- reactos/ntoskrnl/io/iomgr/drvrlist.c | 146 ++++++++++++++------------- 1 file changed, 78 insertions(+), 68 deletions(-) diff --git a/reactos/ntoskrnl/io/iomgr/drvrlist.c b/reactos/ntoskrnl/io/iomgr/drvrlist.c index dfdc2a3efe5..264dc02ea20 100644 --- a/reactos/ntoskrnl/io/iomgr/drvrlist.c +++ b/reactos/ntoskrnl/io/iomgr/drvrlist.c @@ -350,39 +350,44 @@ IoCreateDriverList(VOID) NTSTATUS INIT_FUNCTION IoDestroyDriverList(VOID) { - PSERVICE_GROUP CurrentGroup, tmp1; - PSERVICE CurrentService, tmp2; + PSERVICE_GROUP CurrentGroup, tmp1; + PSERVICE CurrentService, tmp2; - DPRINT("IoDestroyDriverList() called\n"); + DPRINT("IoDestroyDriverList() called\n"); - /* Destroy group list */ - LIST_FOR_EACH_SAFE(CurrentGroup, tmp1, &GroupListHead, SERVICE_GROUP, GroupListEntry) + /* Destroy the Group List */ + LIST_FOR_EACH_SAFE(CurrentGroup, tmp1, &GroupListHead, SERVICE_GROUP, GroupListEntry) { - ExFreePool(CurrentGroup->GroupName.Buffer); - RemoveEntryList(&CurrentGroup->GroupListEntry); - if (CurrentGroup->TagArray) - { - ExFreePool(CurrentGroup->TagArray); - } - ExFreePool(CurrentGroup); + /* Remove it from the list */ + RemoveEntryList(&CurrentGroup->GroupListEntry); + + /* Free buffers */ + ExFreePool(CurrentGroup->GroupName.Buffer); + if (CurrentGroup->TagArray) + ExFreePool(CurrentGroup->TagArray); + ExFreePool(CurrentGroup); } - /* Destroy service list */ - LIST_FOR_EACH_SAFE(CurrentService, tmp2, &ServiceListHead, SERVICE, ServiceListEntry) + /* Destroy the Service List */ + LIST_FOR_EACH_SAFE(CurrentService, tmp2, &ServiceListHead, SERVICE, ServiceListEntry) { - ExFreePool(CurrentService->ServiceName.Buffer); - ExFreePool(CurrentService->RegistryPath.Buffer); - if (CurrentService->ServiceGroup.Buffer) - ExFreePool(CurrentService->ServiceGroup.Buffer); - if (CurrentService->ImagePath.Buffer) - ExFreePool(CurrentService->ImagePath.Buffer); - RemoveEntryList(&CurrentService->ServiceListEntry); - ExFreePool(CurrentService); + /* Remove it from the list */ + RemoveEntryList(&CurrentService->ServiceListEntry); + + /* Free buffers */ + ExFreePool(CurrentService->ServiceName.Buffer); + ExFreePool(CurrentService->RegistryPath.Buffer); + if (CurrentService->ServiceGroup.Buffer) + ExFreePool(CurrentService->ServiceGroup.Buffer); + if (CurrentService->ImagePath.Buffer) + ExFreePool(CurrentService->ImagePath.Buffer); + ExFreePool(CurrentService); } - DPRINT("IoDestroyDriverList() done\n"); + DPRINT("IoDestroyDriverList() done\n"); - return(STATUS_SUCCESS); + /* Return success */ + return STATUS_SUCCESS; } static INIT_FUNCTION NTSTATUS @@ -435,8 +440,8 @@ IopLoadDriver(PSERVICE Service) * Return Value * None */ - -VOID FASTCALL +VOID +FASTCALL IopInitializeSystemDrivers(VOID) { PSERVICE_GROUP CurrentGroup; @@ -446,50 +451,55 @@ IopInitializeSystemDrivers(VOID) DPRINT("IopInitializeSystemDrivers()\n"); - LIST_FOR_EACH(CurrentGroup, &GroupListHead, SERVICE_GROUP, GroupListEntry) - { - DPRINT("Group: %wZ\n", &CurrentGroup->GroupName); + /* Loop the list */ + LIST_FOR_EACH(CurrentGroup, &GroupListHead, SERVICE_GROUP, GroupListEntry) + { - /* Load all drivers with a valid tag */ - for (i = 0; i < CurrentGroup->TagCount; i++) - { - LIST_FOR_EACH(CurrentService, &ServiceListHead, SERVICE, ServiceListEntry) - { - if ((RtlCompareUnicodeString(&CurrentGroup->GroupName, - &CurrentService->ServiceGroup, TRUE) == 0) && - (CurrentService->Start == 1 /*SERVICE_SYSTEM_START*/) && - (CurrentService->Tag == CurrentGroup->TagArray[i])) - { - DPRINT(" Path: %wZ\n", &CurrentService->RegistryPath); - Status = IopLoadDriver(CurrentService); - } - } - } + DPRINT("Group: %wZ\n", &CurrentGroup->GroupName); - /* Load all drivers without a tag or with an invalid tag */ - LIST_FOR_EACH(CurrentService, &ServiceListHead, SERVICE, ServiceListEntry) - { - if ((RtlCompareUnicodeString(&CurrentGroup->GroupName, - &CurrentService->ServiceGroup, TRUE) == 0) && - (CurrentService->Start == 1 /*SERVICE_SYSTEM_START*/)) - { - for (i = 0; i < CurrentGroup->TagCount; i++) - { - if (CurrentGroup->TagArray[i] == CurrentService->Tag) - { - break; - } - } - if (i >= CurrentGroup->TagCount) - { - DPRINT(" Path: %wZ\n", &CurrentService->RegistryPath); - Status = IopLoadDriver(CurrentService); - } - } - } + /* Load all drivers with a valid tag */ + for (i = 0; i < CurrentGroup->TagCount; i++) + { + /* Loop the list */ + LIST_FOR_EACH(CurrentService, &ServiceListHead, SERVICE, ServiceListEntry) + { + if ((!RtlCompareUnicodeString(&CurrentGroup->GroupName, + &CurrentService->ServiceGroup, + TRUE)) && + (CurrentService->Start == SERVICE_SYSTEM_START) && + (CurrentService->Tag == CurrentGroup->TagArray[i])) - } + { + DPRINT(" Path: %wZ\n", &CurrentService->RegistryPath); + Status = IopLoadDriver(CurrentService); + } + } + } - DPRINT("IopInitializeSystemDrivers() done\n"); + /* Load all drivers without a tag or with an invalid tag */ + LIST_FOR_EACH(CurrentService, &ServiceListHead, SERVICE, ServiceListEntry) + { + if ((!RtlCompareUnicodeString(&CurrentGroup->GroupName, + &CurrentService->ServiceGroup, + TRUE)) && + (CurrentService->Start == SERVICE_SYSTEM_START)) + { + for (i = 0; i < CurrentGroup->TagCount; i++) + { + if (CurrentGroup->TagArray[i] == CurrentService->Tag) + { + break; + } + } + + if (i >= CurrentGroup->TagCount) + { + DPRINT(" Path: %wZ\n", &CurrentService->RegistryPath); + Status = IopLoadDriver(CurrentService); + } + } + } + } + + DPRINT("IopInitializeSystemDrivers() done\n"); } -/* EOF */ From 6f97ab13eb0567e22764d68e05c9bb3d943b5f4a Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 24 Aug 2008 19:54:50 +0000 Subject: [PATCH 154/324] - Same fix as my last commit svn path=/trunk/; revision=35612 --- reactos/drivers/network/afd/afd/lock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/reactos/drivers/network/afd/afd/lock.c b/reactos/drivers/network/afd/afd/lock.c index 0395937a230..d4ede599e0b 100644 --- a/reactos/drivers/network/afd/afd/lock.c +++ b/reactos/drivers/network/afd/afd/lock.c @@ -324,13 +324,12 @@ NTSTATUS LeaveIrpUntilLater( PAFD_FCB FCB, PIRP Irp, UINT Function ) { } VOID SocketCalloutEnter( PAFD_FCB FCB ) { - ASSERT(!FCB->Critical); + ASSERT(FCB->Locked); FCB->Critical = TRUE; SocketStateUnlock( FCB ); } VOID SocketCalloutLeave( PAFD_FCB FCB ) { - ASSERT(FCB->Critical); FCB->Critical = FALSE; SocketAcquireStateLock( FCB ); } From ca33f36d34e149d63a7c9ba1b2f61a606e6329dd Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Sun, 24 Aug 2008 20:40:27 +0000 Subject: [PATCH 155/324] - [FORMATTING] Comment and formatting fixes for LocateChildDevice. No code change. svn path=/trunk/; revision=35613 --- reactos/ntoskrnl/io/pnpmgr/pnproot.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/io/pnpmgr/pnproot.c b/reactos/ntoskrnl/io/pnpmgr/pnproot.c index 3643446926c..315f2951694 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnproot.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnproot.c @@ -100,19 +100,24 @@ LocateChildDevice( PPNPROOT_DEVICE Device; UNICODE_STRING DeviceIdU, InstanceIdU; + /* Initialize the strings to compare */ RtlInitUnicodeString(&DeviceIdU, DeviceId); RtlInitUnicodeString(&InstanceIdU, InstanceId); + /* Start looping */ LIST_FOR_EACH(Device, &DeviceExtension->DeviceListHead, PNPROOT_DEVICE, ListEntry) { - if (RtlEqualUnicodeString(&DeviceIdU, &Device->DeviceID, TRUE) - && RtlEqualUnicodeString(&InstanceIdU, &Device->InstanceID, TRUE)) + /* See if the strings match */ + if (RtlEqualUnicodeString(&DeviceIdU, &Device->DeviceID, TRUE) && + RtlEqualUnicodeString(&InstanceIdU, &Device->InstanceID, TRUE)) { + /* They do, so set the pointer and return success */ *ChildDevice = Device; return STATUS_SUCCESS; } } + /* No device found */ return STATUS_NO_SUCH_DEVICE; } From 3a7a8f1f08c3b8f698cade8bf20779ddc9e3cb50 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 24 Aug 2008 20:50:17 +0000 Subject: [PATCH 156/324] - Merge aicom-network-fixes up to r35611 svn path=/trunk/; revision=35614 --- reactos/drivers/network/afd/afd/listen.c | 4 +++- reactos/drivers/network/afd/afd/read.c | 7 ++++++- reactos/drivers/network/afd/afd/tdiconn.c | 6 ++++-- reactos/drivers/network/afd/afd/write.c | 5 ++++- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/reactos/drivers/network/afd/afd/listen.c b/reactos/drivers/network/afd/afd/listen.c index 0d7094cb0fa..62fa22b8bf3 100644 --- a/reactos/drivers/network/afd/afd/listen.c +++ b/reactos/drivers/network/afd/afd/listen.c @@ -330,8 +330,10 @@ NTSTATUS AfdAccept( PDEVICE_OBJECT DeviceObject, PIRP Irp, ExFreePool( PendingConnObj ); - if( IsListEmpty( &FCB->PendingConnections ) ) + if( IsListEmpty( &FCB->PendingConnections ) ) { FCB->PollState &= ~AFD_EVENT_ACCEPT; + PollReeval( FCB->DeviceExt, FCB->FileObject ); + } SocketStateUnlock( FCB ); return Irp->IoStatus.Status; diff --git a/reactos/drivers/network/afd/afd/read.c b/reactos/drivers/network/afd/afd/read.c index a95ffb139f3..65183288ca7 100644 --- a/reactos/drivers/network/afd/afd/read.c +++ b/reactos/drivers/network/afd/afd/read.c @@ -98,6 +98,7 @@ static NTSTATUS TryToSatisfyRecvRequestFromBuffer( PAFD_FCB FCB, if( FCB->Recv.BytesUsed == FCB->Recv.Content ) { FCB->Recv.BytesUsed = FCB->Recv.Content = 0; FCB->PollState &= ~AFD_EVENT_RECEIVE; + PollReeval( FCB->DeviceExt, FCB->FileObject ); if( !FCB->ReceiveIrp.InFlightRequest ) { AFD_DbgPrint(MID_TRACE,("Replenishing buffer\n")); @@ -480,12 +481,16 @@ PacketSocketRecvComplete( DatagramRecv->Address = TaCopyTransportAddress( FCB->AddressFrom->RemoteAddress ); - InsertTailList( &FCB->DatagramList, &DatagramRecv->ListEntry ); + if( !DatagramRecv->Address ) Status = STATUS_NO_MEMORY; + } else Status = STATUS_NO_MEMORY; if( !NT_SUCCESS( Status ) ) { + if( DatagramRecv ) ExFreePool( DatagramRecv ); SocketStateUnlock( FCB ); return Status; + } else { + InsertTailList( &FCB->DatagramList, &DatagramRecv->ListEntry ); } /* Satisfy as many requests as we can */ diff --git a/reactos/drivers/network/afd/afd/tdiconn.c b/reactos/drivers/network/afd/afd/tdiconn.c index 392adc8c885..b574020a6aa 100644 --- a/reactos/drivers/network/afd/afd/tdiconn.c +++ b/reactos/drivers/network/afd/afd/tdiconn.c @@ -122,8 +122,10 @@ NTSTATUS TdiBuildNullConnectionInfo ExAllocatePool(NonPagedPool, sizeof(TDI_CONNECTION_INFORMATION) + TdiAddressSize); - if (!ConnInfo) - return STATUS_INSUFFICIENT_RESOURCES; + if (!ConnInfo) { + *ConnectionInfo = NULL; + return STATUS_INSUFFICIENT_RESOURCES; + } Status = TdiBuildNullConnectionInfoInPlace( ConnInfo, Type ); diff --git a/reactos/drivers/network/afd/afd/write.c b/reactos/drivers/network/afd/afd/write.c index 1efc96e6d04..a6bdd134427 100644 --- a/reactos/drivers/network/afd/afd/write.c +++ b/reactos/drivers/network/afd/afd/write.c @@ -140,9 +140,10 @@ static NTSTATUS NTAPI SendComplete SocketCalloutLeave( FCB ); } else { FCB->PollState |= AFD_EVENT_SEND; - PollReeval( FCB->DeviceExt, FCB->FileObject ); } + PollReeval( FCB->DeviceExt, FCB->FileObject ); + if( TotalBytesCopied > 0 ) { UnlockBuffers( SendReq->BufferArray, SendReq->BufferCount, FALSE ); @@ -395,6 +396,8 @@ AfdPacketSocketWriteData(PDEVICE_OBJECT DeviceObject, PIRP Irp, FCB->EventsFired &= ~AFD_EVENT_SEND; FCB->PollState &= ~AFD_EVENT_SEND; + PollReeval( FCB->DeviceExt, FCB->FileObject ); + /* Check that the socket is bound */ if( FCB->State != SOCKET_STATE_BOUND ) return UnlockAndMaybeComplete From 5979e2e4630ce4ea8e7b2731909dbf4089e1499a Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sun, 24 Aug 2008 23:07:39 +0000 Subject: [PATCH 157/324] Add "Boot Acceptance Application for Registry". Such a big name for such a small utility ;) svn path=/trunk/; revision=35615 --- reactos/base/system/bootok/bootok.c | 31 ++++++++++++++++++++++ reactos/base/system/bootok/bootok.rbuild | 12 +++++++++ reactos/base/system/bootok/bootok.rc | 4 +++ reactos/base/system/system.rbuild | 3 +++ reactos/boot/bootdata/packages/reactos.dff | 1 + 5 files changed, 51 insertions(+) create mode 100644 reactos/base/system/bootok/bootok.c create mode 100644 reactos/base/system/bootok/bootok.rbuild create mode 100644 reactos/base/system/bootok/bootok.rc diff --git a/reactos/base/system/bootok/bootok.c b/reactos/base/system/bootok/bootok.c new file mode 100644 index 00000000000..f9aec2c9fe3 --- /dev/null +++ b/reactos/base/system/bootok/bootok.c @@ -0,0 +1,31 @@ +/* + * PROJECT: ReactOS Kernel + * LICENSE: GPL - See COPYING in the top level directory + * FILE: base/system/bootok/bootok.c + * PURPOSE: Boot Acceptance Application + * PROGRAMMERS: Eric Kohl + */ + +/* INCLUDES *****************************************************************/ + +#include +#include +#define WIN32_NO_STATUS +#include + +/* FUNCTIONS ****************************************************************/ + +int +_tmain(int argc, TCHAR *argv[]) +{ + UNREFERENCED_PARAMETER(argc); + UNREFERENCED_PARAMETER(argv); + + if (!NotifyBootConfigStatus(TRUE)) + { + _tprintf(_T("NotifyBootConfigStatus failed! (Error: %lu)\n"), + GetLastError()); + } + + return 0; +} diff --git a/reactos/base/system/bootok/bootok.rbuild b/reactos/base/system/bootok/bootok.rbuild new file mode 100644 index 00000000000..317b31d6112 --- /dev/null +++ b/reactos/base/system/bootok/bootok.rbuild @@ -0,0 +1,12 @@ + + + + . + 0x600 + 0x0500 + 0x0600 + kernel32 + advapi32 + bootok.c + bootok.rc + diff --git a/reactos/base/system/bootok/bootok.rc b/reactos/base/system/bootok/bootok.rc new file mode 100644 index 00000000000..c86155f6bc9 --- /dev/null +++ b/reactos/base/system/bootok/bootok.rc @@ -0,0 +1,4 @@ +#define REACTOS_STR_FILE_DESCRIPTION "Boot Acceptance Application for Registry\0" +#define REACTOS_STR_INTERNAL_NAME "bootok\0" +#define REACTOS_STR_ORIGINAL_FILENAME "bootok.exe\0" +#include diff --git a/reactos/base/system/system.rbuild b/reactos/base/system/system.rbuild index c70e061d76c..61a76f48c95 100644 --- a/reactos/base/system/system.rbuild +++ b/reactos/base/system/system.rbuild @@ -4,6 +4,9 @@ + + + diff --git a/reactos/boot/bootdata/packages/reactos.dff b/reactos/boot/bootdata/packages/reactos.dff index f312f8aedee..a82a425db55 100644 --- a/reactos/boot/bootdata/packages/reactos.dff +++ b/reactos/boot/bootdata/packages/reactos.dff @@ -92,6 +92,7 @@ base\shell\explorer\notifyhook\notifyhook.dll 1 base\shell\explorer-new\explorer_new.exe 4 optional base\system\autochk\autochk.exe 1 +base\system\bootok\bootok.exe 1 base\system\format\format.exe 1 base\system\lsass\lsass.exe 1 base\system\msiexec\msiexec.exe 1 From 239ad826457db006256a0bace5a3e89492dfd63c Mon Sep 17 00:00:00 2001 From: Andrew Munger Date: Mon, 25 Aug 2008 07:49:46 +0000 Subject: [PATCH 158/324] Add odbc32 to the build system and bootcd. It builds and it's mere presence allows php to load. Please have a look at the .rbuild, it probably needs tweaked. svn path=/trunk/; revision=35623 --- reactos/boot/bootdata/packages/reactos.dff | 1 + reactos/dll/win32/odbc32/odbc32.rbuild | 16 ++++++++++++++++ reactos/dll/win32/win32.rbuild | 3 +++ 3 files changed, 20 insertions(+) create mode 100644 reactos/dll/win32/odbc32/odbc32.rbuild diff --git a/reactos/boot/bootdata/packages/reactos.dff b/reactos/boot/bootdata/packages/reactos.dff index a82a425db55..51b23c557db 100644 --- a/reactos/boot/bootdata/packages/reactos.dff +++ b/reactos/boot/bootdata/packages/reactos.dff @@ -291,6 +291,7 @@ dll\win32\newdev\newdev.dll 1 dll\win32\ntdsapi\ntdsapi.dll 1 dll\win32\ntmarta\ntmarta.dll 1 dll\win32\objsel\objsel.dll 1 +dll\win32\odbc32\odbc32.dll 1 dll\win32\odbccp32\odbccp32.dll 1 dll\win32\ole32\ole32.dll 1 dll\win32\oleacc\oleacc.dll 1 diff --git a/reactos/dll/win32/odbc32/odbc32.rbuild b/reactos/dll/win32/odbc32/odbc32.rbuild new file mode 100644 index 00000000000..4a968919a51 --- /dev/null +++ b/reactos/dll/win32/odbc32/odbc32.rbuild @@ -0,0 +1,16 @@ + + + + + + . + include/reactos/wine + + 0x600 + 0x600 + wine + kernel32 + proxyodbc.c + odbc32.spec + + diff --git a/reactos/dll/win32/win32.rbuild b/reactos/dll/win32/win32.rbuild index ef58b5e7b08..27242319771 100644 --- a/reactos/dll/win32/win32.rbuild +++ b/reactos/dll/win32/win32.rbuild @@ -211,6 +211,9 @@ + + + From d1813375f54a34b5a4528759ee9d4f7df5e2c60d Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Mon, 25 Aug 2008 07:54:19 +0000 Subject: [PATCH 159/324] - Partly fix launching control panel applets svn path=/trunk/; revision=35624 --- reactos/dll/win32/shell32/control.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/reactos/dll/win32/shell32/control.c b/reactos/dll/win32/shell32/control.c index 34bae718d72..1494df9c49a 100644 --- a/reactos/dll/win32/shell32/control.c +++ b/reactos/dll/win32/shell32/control.c @@ -348,7 +348,7 @@ static void Control_DoLaunch(CPanel* panel, HWND hWnd, LPCWSTR wszCmd) LPWSTR beg = NULL; LPWSTR end; WCHAR ch; - LPWSTR ptr, ptr2; + LPCWSTR ptr, ptr2; WCHAR szName[MAX_PATH]; unsigned sp = 0; LPWSTR extraPmts = NULL; @@ -359,22 +359,32 @@ static void Control_DoLaunch(CPanel* panel, HWND hWnd, LPCWSTR wszCmd) ptr = wcsrchr(wszCmd, L'\\'); ptr2 = wcsrchr(wszCmd, L','); - if (!ptr || !ptr2) - return; + if (!ptr2) + { + ptr2 = wszCmd + wcslen(wszCmd) + 1; + } - Length = (ptr2 - ptr - 1); + if (ptr) + ptr++; + else + ptr = wszCmd; + + Length = (ptr2 - ptr); if (Length >= MAX_PATH) return; - memcpy(szName, ptr + 1, Length * sizeof(WCHAR)); + memcpy(szName, (LPVOID)ptr, Length * sizeof(WCHAR)); szName[Length] = L'\0'; hMutex = CreateMutexW(NULL, FALSE, szName); if ((!hMutex) || (GetLastError() == ERROR_ALREADY_EXISTS)) return; buffer = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(wszCmd) + 1) * sizeof(*wszCmd)); - if (!buffer) return; - + if (!buffer) + { + CloseHandle(hMutex); + return; + } end = lstrcpyW(buffer, wszCmd); for (;;) { ch = *end; @@ -399,10 +409,10 @@ static void Control_DoLaunch(CPanel* panel, HWND hWnd, LPCWSTR wszCmd) end++; } while ((ptr = StrChrW(buffer, '"'))) - memmove(ptr, ptr+1, lstrlenW(ptr)*sizeof(WCHAR)); + memmove((LPVOID)ptr, ptr+1, lstrlenW(ptr)*sizeof(WCHAR)); while ((ptr = StrChrW(extraPmts, '"'))) - memmove(ptr, ptr+1, lstrlenW(ptr)*sizeof(WCHAR)); + memmove((LPVOID)ptr, ptr+1, lstrlenW(ptr)*sizeof(WCHAR)); TRACE("cmd %s, extra %s, sp %d\n", debugstr_w(buffer), debugstr_w(extraPmts), sp); From 8dbbc041c32c70b6f81888a404b01f73a0dcc62c Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Mon, 25 Aug 2008 13:42:17 +0000 Subject: [PATCH 160/324] - Undefine KdPrint before redefining it. svn path=/trunk/; revision=35626 --- reactos/drivers/storage/ide/uniata/atapi.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/reactos/drivers/storage/ide/uniata/atapi.h b/reactos/drivers/storage/ide/uniata/atapi.h index 2f9dce60029..3b7a0fbf7fb 100644 --- a/reactos/drivers/storage/ide/uniata/atapi.h +++ b/reactos/drivers/storage/ide/uniata/atapi.h @@ -138,6 +138,10 @@ ScsiDebugPrint( #else // _DEBUG +#ifdef KdPrint +#undef KdPrint +#endif + #define PRINT_PREFIX "UniATA: " //#define KdPrint3(_x_) {if(LOG_ON_RAISED_IRQL_W2K || MajorVersion < 0x05 || KeGetCurrentIrql() <= 2){/*DbgPrint("%x: ", PsGetCurrentThread()) ;*/ DbgPrint _x_ ; if(g_LogToDisplay){ PrintNtConsole _x_ ;} }} From 6805ef19360f84933e4572bdf6cdb260a65d7a17 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Mon, 25 Aug 2008 14:51:22 +0000 Subject: [PATCH 161/324] merge 34702 and 34987 from ros-amd64-bringup branch: - convert LDR_RESOURCE_INFO members from ULONG to ULONG_PTR - fix SECURITY_DESCRIPTOR_RELATIVE and KDPC_DATA svn path=/trunk/; revision=35628 --- reactos/include/ddk/ntifs.h | 8 ++++---- reactos/include/ndk/ketypes.h | 2 +- reactos/include/ndk/ldrtypes.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/reactos/include/ddk/ntifs.h b/reactos/include/ddk/ntifs.h index 53ab4a08fb8..ef8b4e521f9 100644 --- a/reactos/include/ddk/ntifs.h +++ b/reactos/include/ddk/ntifs.h @@ -787,10 +787,10 @@ typedef struct _SECURITY_DESCRIPTOR_RELATIVE { BYTE Revision; BYTE Sbz1; SECURITY_DESCRIPTOR_CONTROL Control; - DWORD Owner; - DWORD Group; - DWORD Sacl; - DWORD Dacl; + DWORD_PTR Owner; + DWORD_PTR Group; + DWORD_PTR Sacl; + DWORD_PTR Dacl; } SECURITY_DESCRIPTOR_RELATIVE, *PISECURITY_DESCRIPTOR_RELATIVE; typedef enum _TOKEN_INFORMATION_CLASS { TokenUser=1,TokenGroups,TokenPrivileges,TokenOwner, diff --git a/reactos/include/ndk/ketypes.h b/reactos/include/ndk/ketypes.h index f7b7b9a3f33..3c6f5a954c6 100644 --- a/reactos/include/ndk/ketypes.h +++ b/reactos/include/ndk/ketypes.h @@ -558,7 +558,7 @@ typedef enum _PROCESSOR_CACHE_TYPE typedef struct _KDPC_DATA { LIST_ENTRY DpcListHead; - ULONG DpcLock; + ULONG_PTR DpcLock; volatile ULONG DpcQueueDepth; ULONG DpcCount; } KDPC_DATA, *PKDPC_DATA; diff --git a/reactos/include/ndk/ldrtypes.h b/reactos/include/ndk/ldrtypes.h index f5043084953..e274294f6e3 100644 --- a/reactos/include/ndk/ldrtypes.h +++ b/reactos/include/ndk/ldrtypes.h @@ -138,8 +138,8 @@ typedef struct _LOAD_IMPORTS // typedef struct _LDR_RESOURCE_INFO { - ULONG Type; - ULONG Name; + ULONG_PTR Type; + ULONG_PTR Name; ULONG Language; } LDR_RESOURCE_INFO, *PLDR_RESOURCE_INFO; From a362028c864ee7939c53433fab5aca13b8d3fab4 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Mon, 25 Aug 2008 15:10:27 +0000 Subject: [PATCH 162/324] - NtLoadKey: Call NtLoadKeyEx directly instead of calling NtLoadKey2 (which forwards to NtLoadKeyEx) svn path=/trunk/; revision=35629 --- reactos/ntoskrnl/config/ntapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/config/ntapi.c b/reactos/ntoskrnl/config/ntapi.c index 62a2232d9a1..4c734d44043 100644 --- a/reactos/ntoskrnl/config/ntapi.c +++ b/reactos/ntoskrnl/config/ntapi.c @@ -707,7 +707,7 @@ NtLoadKey(IN POBJECT_ATTRIBUTES KeyObjectAttributes, IN POBJECT_ATTRIBUTES FileObjectAttributes) { /* Call the newer API */ - return NtLoadKey2(KeyObjectAttributes, FileObjectAttributes, 0); + return NtLoadKeyEx(KeyObjectAttributes, FileObjectAttributes, 0, NULL); } NTSTATUS From b81b76caab4d043c6c3b0a965f42ba507db3a6d4 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Mon, 25 Aug 2008 15:22:30 +0000 Subject: [PATCH 163/324] - Remove a header duplication and move a prototype to the correct place svn path=/trunk/; revision=35630 --- reactos/ntoskrnl/include/internal/cm.h | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/reactos/ntoskrnl/include/internal/cm.h b/reactos/ntoskrnl/include/internal/cm.h index fc54a4af59d..0c3768eb656 100644 --- a/reactos/ntoskrnl/include/internal/cm.h +++ b/reactos/ntoskrnl/include/internal/cm.h @@ -520,21 +520,6 @@ typedef struct _KEY_INFORMATION NTSTATUS CmiCallRegisteredCallbacks(IN REG_NOTIFY_CLASS Argument1, IN PVOID Argument2); /////////////////////////////////////////////////////////////////////////////// -// -// Startup and Shutdown Functions -// -BOOLEAN -NTAPI -CmInitSystem1( - VOID -); - -VOID -NTAPI -CmShutdownSystem( - VOID -); - // // Mapped View Hive Functions // @@ -1420,6 +1405,12 @@ CmLoadKey( // // Startup and Shutdown // +BOOLEAN +NTAPI +CmInitSystem1( + VOID +); + VOID NTAPI CmShutdownSystem( From 016e9111567a1c7832ab3506da429c562787f9fb Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Mon, 25 Aug 2008 16:38:02 +0000 Subject: [PATCH 164/324] merge 35359 from ros-amd64-bringup branch: The TEB member is called ClientId not Cid on all Windows versions I could check (XP, 2k3, vista). svn path=/trunk/; revision=35631 --- reactos/dll/ntdll/csr/api.c | 2 +- reactos/dll/ntdll/csr/connect.c | 2 +- reactos/dll/win32/gdi32/main/dllmain.c | 2 +- reactos/dll/win32/kernel32/file/pipe.c | 2 +- reactos/dll/win32/kernel32/process/proc.c | 2 +- reactos/dll/win32/kernel32/thread/thread.c | 2 +- reactos/dll/win32/user32/windows/window.c | 4 ++-- reactos/include/ndk/pstypes.h | 2 +- reactos/lib/rtl/critical.c | 12 ++++++------ reactos/lib/rtl/dbgbuffer.c | 2 +- reactos/lib/rtl/resource.c | 10 +++++----- reactos/ntoskrnl/mm/procsup.c | 2 +- reactos/subsystems/win32/win32k/ntuser/event.c | 8 ++++---- 13 files changed, 26 insertions(+), 26 deletions(-) diff --git a/reactos/dll/ntdll/csr/api.c b/reactos/dll/ntdll/csr/api.c index ad1033fd72a..20e0ae7cbf1 100644 --- a/reactos/dll/ntdll/csr/api.c +++ b/reactos/dll/ntdll/csr/api.c @@ -73,7 +73,7 @@ CsrIdentifyAlertableThread (VOID) /* Set up the data for CSR */ DbgBreakPoint(); IdentifyAlertableThread = &ApiMessage.IdentifyAlertableThread; - IdentifyAlertableThread->Cid = NtCurrentTeb()->Cid; + IdentifyAlertableThread->Cid = NtCurrentTeb()->ClientId; /* Call it */ Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage, diff --git a/reactos/dll/ntdll/csr/connect.c b/reactos/dll/ntdll/csr/connect.c index 658cd3c1030..dc6bb7c49fd 100644 --- a/reactos/dll/ntdll/csr/connect.c +++ b/reactos/dll/ntdll/csr/connect.c @@ -152,7 +152,7 @@ CsrClientCallServer(PCSR_API_MESSAGE ApiMessage, { /* This is a server-to-server call. Save our CID and do a direct call */ DbgBreakPoint(); - ApiMessage->Header.ClientId = NtCurrentTeb()->Cid; + ApiMessage->Header.ClientId = NtCurrentTeb()->ClientId; Status = CsrServerApiRoutine(&ApiMessage->Header, &ApiMessage->Header); diff --git a/reactos/dll/win32/gdi32/main/dllmain.c b/reactos/dll/win32/gdi32/main/dllmain.c index 0e06d490e34..afd9764e912 100644 --- a/reactos/dll/win32/gdi32/main/dllmain.c +++ b/reactos/dll/win32/gdi32/main/dllmain.c @@ -48,7 +48,7 @@ GdiProcessSetup (VOID) GdiHandleTable = NtCurrentTeb()->ProcessEnvironmentBlock->GdiSharedHandleTable; GdiSharedHandleTable = NtCurrentTeb()->ProcessEnvironmentBlock->GdiSharedHandleTable; GdiDevCaps = &GdiSharedHandleTable->DevCaps; - CurrentProcessId = NtCurrentTeb()->Cid.UniqueProcess; + CurrentProcessId = NtCurrentTeb()->ClientId.UniqueProcess; GDI_BatchLimit = (DWORD) NtCurrentTeb()->ProcessEnvironmentBlock->GdiDCAttributeList; GdiHandleCache = (PGDIHANDLECACHE)NtCurrentTeb()->ProcessEnvironmentBlock->GdiHandleBuffer; } diff --git a/reactos/dll/win32/kernel32/file/pipe.c b/reactos/dll/win32/kernel32/file/pipe.c index a44f2c42681..fe4ff1e00d8 100644 --- a/reactos/dll/win32/kernel32/file/pipe.c +++ b/reactos/dll/win32/kernel32/file/pipe.c @@ -55,7 +55,7 @@ CreatePipe(PHANDLE hReadPipe, /* Create the pipe name */ swprintf(Buffer, L"\\Device\\NamedPipe\\Win32Pipes.%08x.%08x", - NtCurrentTeb()->Cid.UniqueProcess, + NtCurrentTeb()->ClientId.UniqueProcess, PipeId); RtlInitUnicodeString(&PipeName, Buffer); diff --git a/reactos/dll/win32/kernel32/process/proc.c b/reactos/dll/win32/kernel32/process/proc.c index 06e5f21a35e..7fe90e6844a 100644 --- a/reactos/dll/win32/kernel32/process/proc.c +++ b/reactos/dll/win32/kernel32/process/proc.c @@ -272,7 +272,7 @@ GetCurrentThread(VOID) DWORD STDCALL GetCurrentProcessId(VOID) { - return((DWORD)GetTeb()->Cid.UniqueProcess); + return((DWORD)GetTeb()->ClientId.UniqueProcess); } diff --git a/reactos/dll/win32/kernel32/thread/thread.c b/reactos/dll/win32/kernel32/thread/thread.c index 1d003ef6b3e..e5247a38ef1 100644 --- a/reactos/dll/win32/kernel32/thread/thread.c +++ b/reactos/dll/win32/kernel32/thread/thread.c @@ -319,7 +319,7 @@ DWORD WINAPI GetCurrentThreadId(VOID) { - return (DWORD)(NtCurrentTeb()->Cid).UniqueThread; + return (DWORD)(NtCurrentTeb()->ClientId).UniqueThread; } /* diff --git a/reactos/dll/win32/user32/windows/window.c b/reactos/dll/win32/user32/windows/window.c index f598c38f999..6fe94533d6d 100644 --- a/reactos/dll/win32/user32/windows/window.c +++ b/reactos/dll/win32/user32/windows/window.c @@ -1313,8 +1313,8 @@ GetWindowThreadProcessId(HWND hWnd, { // We are current. //FIXME("Current!\n"); if ( lpdwProcessId ) - *lpdwProcessId = (DWORD)NtCurrentTeb()->Cid.UniqueProcess; - Ret = (DWORD)NtCurrentTeb()->Cid.UniqueThread; + *lpdwProcessId = (DWORD)NtCurrentTeb()->ClientId.UniqueProcess; + Ret = (DWORD)NtCurrentTeb()->ClientId.UniqueThread; } else { // Ask kernel for info. diff --git a/reactos/include/ndk/pstypes.h b/reactos/include/ndk/pstypes.h index 77498367863..d19f7ef3604 100644 --- a/reactos/include/ndk/pstypes.h +++ b/reactos/include/ndk/pstypes.h @@ -729,7 +729,7 @@ typedef struct _TEB { NT_TIB Tib; PVOID EnvironmentPointer; - CLIENT_ID Cid; + CLIENT_ID ClientId; PVOID ActiveRpcHandle; PVOID ThreadLocalStoragePointer; struct _PEB *ProcessEnvironmentBlock; diff --git a/reactos/lib/rtl/critical.c b/reactos/lib/rtl/critical.c index 5dda956f6f6..da7314429a1 100644 --- a/reactos/lib/rtl/critical.c +++ b/reactos/lib/rtl/critical.c @@ -310,7 +310,7 @@ RtlpFreeDebugInfo(PRTL_CRITICAL_SECTION_DEBUG DebugInfo) DPRINT("Freeing from Buffer: %p. Entry: %lu inside Process: %p\n", DebugInfo, EntryId, - NtCurrentTeb()->Cid.UniqueProcess); + NtCurrentTeb()->ClientId.UniqueProcess); RtlpDebugInfoFreeList[EntryId] = FALSE; } else { @@ -318,7 +318,7 @@ RtlpFreeDebugInfo(PRTL_CRITICAL_SECTION_DEBUG DebugInfo) /* It's a dynamic one, so free from the heap */ DPRINT("Freeing from Heap: %p inside Process: %p\n", DebugInfo, - NtCurrentTeb()->Cid.UniqueProcess); + NtCurrentTeb()->ClientId.UniqueProcess); RtlFreeHeap(NtCurrentPeb()->ProcessHeap, 0, DebugInfo); } @@ -424,7 +424,7 @@ NTSTATUS NTAPI RtlEnterCriticalSection(PRTL_CRITICAL_SECTION CriticalSection) { - HANDLE Thread = (HANDLE)NtCurrentTeb()->Cid.UniqueThread; + HANDLE Thread = (HANDLE)NtCurrentTeb()->ClientId.UniqueThread; /* Try to Lock it */ if (_InterlockedIncrement(&CriticalSection->LockCount) != 0) { @@ -522,7 +522,7 @@ RtlInitializeCriticalSectionAndSpinCount(PRTL_CRITICAL_SECTION CriticalSection, CritcalSectionDebugData = RtlpAllocateDebugInfo(); DPRINT("Allocated Debug Data: %p inside Process: %p\n", CritcalSectionDebugData, - NtCurrentTeb()->Cid.UniqueProcess); + NtCurrentTeb()->ClientId.UniqueProcess); if (!CritcalSectionDebugData) { @@ -657,11 +657,11 @@ RtlTryEnterCriticalSection(PRTL_CRITICAL_SECTION CriticalSection) -1) == -1) { /* It's ours */ - CriticalSection->OwningThread = NtCurrentTeb()->Cid.UniqueThread; + CriticalSection->OwningThread = NtCurrentTeb()->ClientId.UniqueThread; CriticalSection->RecursionCount = 1; return TRUE; - } else if (CriticalSection->OwningThread == NtCurrentTeb()->Cid.UniqueThread) { + } else if (CriticalSection->OwningThread == NtCurrentTeb()->ClientId.UniqueThread) { /* It's already ours */ _InterlockedIncrement(&CriticalSection->LockCount); diff --git a/reactos/lib/rtl/dbgbuffer.c b/reactos/lib/rtl/dbgbuffer.c index f723fe12839..323940956c3 100644 --- a/reactos/lib/rtl/dbgbuffer.c +++ b/reactos/lib/rtl/dbgbuffer.c @@ -234,7 +234,7 @@ RtlQueryProcessDebugInformation(IN ULONG ProcessId, IN OUT PRTL_DEBUG_INFORMATION Buf) { NTSTATUS Status = STATUS_SUCCESS; - ULONG Pid = (ULONG) NtCurrentTeb()->Cid.UniqueProcess; + ULONG Pid = (ULONG) NtCurrentTeb()->ClientId.UniqueProcess; Buf->Flags = DebugInfoMask; Buf->OffsetFree = sizeof(RTL_DEBUG_INFORMATION); diff --git a/reactos/lib/rtl/resource.c b/reactos/lib/rtl/resource.c index 2861b6bc8b4..8a21e0aefbc 100644 --- a/reactos/lib/rtl/resource.c +++ b/reactos/lib/rtl/resource.c @@ -94,7 +94,7 @@ start: } else if (Resource->NumberActive < 0) /* exclusive lock in progress */ { - if (Resource->OwningThread == NtCurrentTeb()->Cid.UniqueThread) + if (Resource->OwningThread == NtCurrentTeb()->ClientId.UniqueThread) { retVal = TRUE; Resource->NumberActive--; @@ -120,7 +120,7 @@ wait: goto wait; } if (retVal == TRUE) - Resource->OwningThread = NtCurrentTeb()->Cid.UniqueThread; + Resource->OwningThread = NtCurrentTeb()->ClientId.UniqueThread; done: RtlLeaveCriticalSection(&Resource->Lock); return retVal; @@ -141,7 +141,7 @@ start: RtlEnterCriticalSection(&Resource->Lock); if (Resource->NumberActive < 0) { - if (Resource->OwningThread == NtCurrentTeb()->Cid.UniqueThread) + if (Resource->OwningThread == NtCurrentTeb()->ClientId.UniqueThread) { Resource->NumberActive--; retVal = TRUE; @@ -218,7 +218,7 @@ RtlConvertSharedToExclusive(PRTL_RESOURCE Resource) if (Resource->NumberActive == 1) { - Resource->OwningThread = NtCurrentTeb()->Cid.UniqueThread; + Resource->OwningThread = NtCurrentTeb()->ClientId.UniqueThread; Resource->NumberActive = -1; } else @@ -233,7 +233,7 @@ RtlConvertSharedToExclusive(PRTL_RESOURCE Resource) return; RtlEnterCriticalSection(&Resource->Lock); - Resource->OwningThread = NtCurrentTeb()->Cid.UniqueThread; + Resource->OwningThread = NtCurrentTeb()->ClientId.UniqueThread; Resource->NumberActive = -1; } RtlLeaveCriticalSection(&Resource->Lock); diff --git a/reactos/ntoskrnl/mm/procsup.c b/reactos/ntoskrnl/mm/procsup.c index fdfd902b4aa..83e1af8f003 100644 --- a/reactos/ntoskrnl/mm/procsup.c +++ b/reactos/ntoskrnl/mm/procsup.c @@ -452,7 +452,7 @@ MmCreateTeb(PEPROCESS Process, Teb->Tib.Self = (PNT_TIB)Teb; /* Set TEB Data */ - Teb->Cid = *ClientId; + Teb->ClientId = *ClientId; Teb->RealClientId = *ClientId; Teb->ProcessEnvironmentBlock = Process->Peb; Teb->CurrentLocale = PsDefaultThreadLocaleId; diff --git a/reactos/subsystems/win32/win32k/ntuser/event.c b/reactos/subsystems/win32/win32k/ntuser/event.c index 5c379685435..12cca3a551b 100644 --- a/reactos/subsystems/win32/win32k/ntuser/event.c +++ b/reactos/subsystems/win32/win32k/ntuser/event.c @@ -155,7 +155,7 @@ co_EVENT_CallEvents( DWORD event, hwnd, pEP->idObject, pEP->idChild, - (DWORD)(NtCurrentTeb()->Cid).UniqueThread, + (DWORD)(NtCurrentTeb()->ClientId).UniqueThread, (DWORD)EngGetTickCount(), pEH->Proc); return Result; @@ -185,14 +185,14 @@ IntNotifyWinEvent( if ((pEH->Thread != PsGetCurrentThread()) && (pEH->Thread != NULL)) { // if all process || all thread || other thread same process if (!(pEH->idProcess) || !(pEH->idThread) || - ((DWORD)(NtCurrentTeb()->Cid).UniqueProcess == pEH->idProcess)) + ((DWORD)(NtCurrentTeb()->ClientId).UniqueProcess == pEH->idProcess)) { Result = IntCallLowLevelEvent(pEH, Event, Window->hSelf, idObject, idChild); } }// if ^skip own thread && ((Pid && CPid == Pid && ^skip own process) || all process) else if ( !(pEH->Flags & WINEVENT_SKIPOWNTHREAD) && ( ((pEH->idProcess && - (DWORD)(NtCurrentTeb()->Cid).UniqueProcess == pEH->idProcess) && + (DWORD)(NtCurrentTeb()->ClientId).UniqueProcess == pEH->idProcess) && !(pEH->Flags & WINEVENT_SKIPOWNPROCESS)) || !pEH->idProcess ) ) { @@ -201,7 +201,7 @@ IntNotifyWinEvent( Window->hSelf, idObject, idChild, - (DWORD)(NtCurrentTeb()->Cid).UniqueThread, + (DWORD)(NtCurrentTeb()->ClientId).UniqueThread, (DWORD)EngGetTickCount(), pEH->Proc); } From f3b92fa090687006e5a054535339286d3a42cceb Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Mon, 25 Aug 2008 18:21:19 +0000 Subject: [PATCH 165/324] - Remove LIST_FOR_EACH and LIST_FOR_EACH_SAFE from the kernel - Fix a bug in KeStartProfile (a missing negation) which caused us to either free buffer when we shouldn't, or leak it svn path=/trunk/; revision=35633 --- reactos/ntoskrnl/io/iomgr/drvrlist.c | 54 +++++++++++++++++++++++----- reactos/ntoskrnl/io/pnpmgr/pnproot.c | 18 ++++++++-- reactos/ntoskrnl/ke/profobj.c | 49 +++++++++++++++++++------ 3 files changed, 100 insertions(+), 21 deletions(-) diff --git a/reactos/ntoskrnl/io/iomgr/drvrlist.c b/reactos/ntoskrnl/io/iomgr/drvrlist.c index 264dc02ea20..1dbb4d87b12 100644 --- a/reactos/ntoskrnl/io/iomgr/drvrlist.c +++ b/reactos/ntoskrnl/io/iomgr/drvrlist.c @@ -350,14 +350,22 @@ IoCreateDriverList(VOID) NTSTATUS INIT_FUNCTION IoDestroyDriverList(VOID) { - PSERVICE_GROUP CurrentGroup, tmp1; - PSERVICE CurrentService, tmp2; + PSERVICE_GROUP CurrentGroup; + PSERVICE CurrentService; + PLIST_ENTRY NextEntry, TempEntry; DPRINT("IoDestroyDriverList() called\n"); /* Destroy the Group List */ - LIST_FOR_EACH_SAFE(CurrentGroup, tmp1, &GroupListHead, SERVICE_GROUP, GroupListEntry) + for (NextEntry = GroupListHead.Flink, TempEntry = NextEntry->Flink; + NextEntry != &GroupListHead; + NextEntry = TempEntry, TempEntry = NextEntry->Flink) { + /* Get the entry */ + CurrentGroup = CONTAINING_RECORD(NextEntry, + SERVICE_GROUP, + GroupListEntry); + /* Remove it from the list */ RemoveEntryList(&CurrentGroup->GroupListEntry); @@ -369,8 +377,15 @@ IoDestroyDriverList(VOID) } /* Destroy the Service List */ - LIST_FOR_EACH_SAFE(CurrentService, tmp2, &ServiceListHead, SERVICE, ServiceListEntry) + for (NextEntry = ServiceListHead.Flink, TempEntry = NextEntry->Flink; + NextEntry != &ServiceListHead; + NextEntry = TempEntry, TempEntry = NextEntry->Flink) { + /* Get the entry */ + CurrentService = CONTAINING_RECORD(NextEntry, + SERVICE, + ServiceListEntry); + /* Remove it from the list */ RemoveEntryList(&CurrentService->ServiceListEntry); @@ -448,21 +463,35 @@ IopInitializeSystemDrivers(VOID) PSERVICE CurrentService; NTSTATUS Status; ULONG i; + PLIST_ENTRY NextGroupEntry, NextServiceEntry; DPRINT("IopInitializeSystemDrivers()\n"); - /* Loop the list */ - LIST_FOR_EACH(CurrentGroup, &GroupListHead, SERVICE_GROUP, GroupListEntry) + /* Start looping */ + for (NextGroupEntry = GroupListHead.Flink; + NextGroupEntry != &GroupListHead; + NextGroupEntry = NextGroupEntry->Flink) { + /* Get the entry */ + CurrentGroup = CONTAINING_RECORD(NextGroupEntry, + SERVICE_GROUP, + GroupListEntry); DPRINT("Group: %wZ\n", &CurrentGroup->GroupName); /* Load all drivers with a valid tag */ for (i = 0; i < CurrentGroup->TagCount; i++) { - /* Loop the list */ - LIST_FOR_EACH(CurrentService, &ServiceListHead, SERVICE, ServiceListEntry) + /* Start looping */ + for (NextServiceEntry = ServiceListHead.Flink; + NextServiceEntry != &ServiceListHead; + NextServiceEntry = NextServiceEntry->Flink) { + /* Get the entry */ + CurrentService = CONTAINING_RECORD(NextServiceEntry, + SERVICE, + ServiceListEntry); + if ((!RtlCompareUnicodeString(&CurrentGroup->GroupName, &CurrentService->ServiceGroup, TRUE)) && @@ -477,8 +506,15 @@ IopInitializeSystemDrivers(VOID) } /* Load all drivers without a tag or with an invalid tag */ - LIST_FOR_EACH(CurrentService, &ServiceListHead, SERVICE, ServiceListEntry) + for (NextServiceEntry = ServiceListHead.Flink; + NextServiceEntry != &ServiceListHead; + NextServiceEntry = NextServiceEntry->Flink) { + /* Get the entry */ + CurrentService = CONTAINING_RECORD(NextServiceEntry, + SERVICE, + ServiceListEntry); + if ((!RtlCompareUnicodeString(&CurrentGroup->GroupName, &CurrentService->ServiceGroup, TRUE)) && diff --git a/reactos/ntoskrnl/io/pnpmgr/pnproot.c b/reactos/ntoskrnl/io/pnpmgr/pnproot.c index 315f2951694..997a60c8cd4 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnproot.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnproot.c @@ -99,14 +99,20 @@ LocateChildDevice( { PPNPROOT_DEVICE Device; UNICODE_STRING DeviceIdU, InstanceIdU; + PLIST_ENTRY NextEntry; /* Initialize the strings to compare */ RtlInitUnicodeString(&DeviceIdU, DeviceId); RtlInitUnicodeString(&InstanceIdU, InstanceId); /* Start looping */ - LIST_FOR_EACH(Device, &DeviceExtension->DeviceListHead, PNPROOT_DEVICE, ListEntry) + for (NextEntry = DeviceExtension->DeviceListHead.Flink; + NextEntry != &DeviceExtension->DeviceListHead; + NextEntry = NextEntry->Flink) { + /* Get the entry */ + Device = CONTAINING_RECORD(NextEntry, PNPROOT_DEVICE, ListEntry); + /* See if the strings match */ if (RtlEqualUnicodeString(&DeviceIdU, &Device->DeviceID, TRUE) && RtlEqualUnicodeString(&InstanceIdU, &Device->InstanceID, TRUE)) @@ -521,6 +527,7 @@ PnpRootQueryDeviceRelations( PPNPROOT_DEVICE Device = NULL; ULONG Size; NTSTATUS Status; + PLIST_ENTRY NextEntry; DPRINT("PnpRootQueryDeviceRelations(FDO %p, Irp %p)\n", DeviceObject, Irp); @@ -556,8 +563,15 @@ PnpRootQueryDeviceRelations( } KeAcquireGuardedMutex(&DeviceExtension->DeviceListLock); - LIST_FOR_EACH(Device, &DeviceExtension->DeviceListHead, PNPROOT_DEVICE, ListEntry) + + /* Start looping */ + for (NextEntry = DeviceExtension->DeviceListHead.Flink; + NextEntry != &DeviceExtension->DeviceListHead; + NextEntry = NextEntry->Flink) { + /* Get the entry */ + Device = CONTAINING_RECORD(NextEntry, PNPROOT_DEVICE, ListEntry); + if (!Device->Pdo) { /* Create a physical device object for the diff --git a/reactos/ntoskrnl/ke/profobj.c b/reactos/ntoskrnl/ke/profobj.c index e0646297f93..88c052c1513 100644 --- a/reactos/ntoskrnl/ke/profobj.c +++ b/reactos/ntoskrnl/ke/profobj.c @@ -54,8 +54,9 @@ KeStartProfile(PKPROFILE Profile, KIRQL OldIrql; PKPROFILE_SOURCE_OBJECT SourceBuffer; PKPROFILE_SOURCE_OBJECT CurrentSource; - BOOLEAN FreeBuffer = TRUE; + BOOLEAN FreeBuffer = TRUE, SourceFound = FALSE;; PKPROCESS ProfileProcess; + PLIST_ENTRY NextEntry; /* Allocate a buffer first, before we raise IRQL */ SourceBuffer = ExAllocatePoolWithTag(NonPagedPool, @@ -89,18 +90,27 @@ KeStartProfile(PKPROFILE Profile, InsertTailList(&KiProfileListHead, &Profile->ProfileListEntry); } - /* Check if this type of profile (source) is already running */ - LIST_FOR_EACH(CurrentSource, &KiProfileSourceListHead, KPROFILE_SOURCE_OBJECT, ListEntry) + /* Start looping */ + for (NextEntry = KiProfileSourceListHead.Flink; + NextEntry != &KiProfileSourceListHead; + NextEntry = NextEntry->Flink) { + /* Get the entry */ + CurrentSource = CONTAINING_RECORD(NextEntry, + KPROFILE_SOURCE_OBJECT, + ListEntry); + /* Check if it's the same as the one being requested now */ if (CurrentSource->Source == Profile->Source) { + /* It is, break out */ + SourceFound = TRUE; break; } } /* See if the loop found something */ - if (!CurrentSource) + if (!SourceFound) { /* Nothing found, use our allocated buffer */ CurrentSource = SourceBuffer; @@ -122,7 +132,7 @@ KeStartProfile(PKPROFILE Profile, //HalStartProfileInterrupt(Profile->Source); /* Free the pool */ - if (!FreeBuffer) ExFreePool(SourceBuffer); + if (FreeBuffer) ExFreePool(SourceBuffer); } BOOLEAN @@ -131,6 +141,8 @@ KeStopProfile(PKPROFILE Profile) { KIRQL OldIrql; PKPROFILE_SOURCE_OBJECT CurrentSource = NULL; + PLIST_ENTRY NextEntry; + BOOLEAN SourceFound = FALSE; /* Raise to PROFILE_LEVEL and acquire spinlock */ KeRaiseIrql(PROFILE_LEVEL, &OldIrql); @@ -143,12 +155,23 @@ KeStopProfile(PKPROFILE Profile) RemoveEntryList(&Profile->ProfileListEntry); Profile->Started = FALSE; - /* Find the Source Object */ - LIST_FOR_EACH(CurrentSource, &KiProfileSourceListHead, KPROFILE_SOURCE_OBJECT, ListEntry) + /* Start looping */ + for (NextEntry = KiProfileSourceListHead.Flink; + NextEntry != &KiProfileSourceListHead; + NextEntry = NextEntry->Flink) { + /* Get the entry */ + CurrentSource = CONTAINING_RECORD(NextEntry, + KPROFILE_SOURCE_OBJECT, + ListEntry); + + /* Check if this is the Source Object */ if (CurrentSource->Source == Profile->Source) { - /* Remove it */ + /* Remember we found one */ + SourceFound = TRUE; + + /* Remove it and break out */ RemoveEntryList(&CurrentSource->ListEntry); break; } @@ -164,7 +187,7 @@ KeStopProfile(PKPROFILE Profile) //HalStopProfileInterrupt(Profile->Source); /* Free the Source Object */ - if (CurrentSource) ExFreePool(CurrentSource); + if (SourceFound) ExFreePool(CurrentSource); /* FIXME */ return FALSE; @@ -231,10 +254,16 @@ KiParseProfileList(IN PKTRAP_FRAME TrapFrame, { PULONG BucketValue; PKPROFILE Profile; + PLIST_ENTRY NextEntry; /* Loop the List */ - LIST_FOR_EACH(Profile, ListHead, KPROFILE, ProfileListEntry) + for (NextEntry = ListHead->Flink; + NextEntry != ListHead; + NextEntry = NextEntry->Flink) { + /* Get the entry */ + Profile = CONTAINING_RECORD(NextEntry, KPROFILE, ProfileListEntry); + /* Check if the source is good, and if it's within the range */ #ifdef _M_IX86 if ((Profile->Source != Source) || From a27e2fd423743696f901891bbe295ba40bce3bb9 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Mon, 25 Aug 2008 18:42:40 +0000 Subject: [PATCH 166/324] - Use MiSyncForProcessAttach and MiSyncForContextSwitch instead of MiSyncThreadProcessViews to avoid some unneeded mm hack-syncing svn path=/trunk/; revision=35635 --- reactos/ntoskrnl/include/internal/mm.h | 10 +++++++-- reactos/ntoskrnl/ke/i386/ctxswitch.S | 3 +-- reactos/ntoskrnl/ke/procobj.c | 4 ++-- reactos/ntoskrnl/ke/thrdobj.c | 2 +- reactos/ntoskrnl/ke/thrdschd.c | 4 ++-- reactos/ntoskrnl/mm/mm.c | 28 +++++++++++++++++++------- 6 files changed, 35 insertions(+), 16 deletions(-) diff --git a/reactos/ntoskrnl/include/internal/mm.h b/reactos/ntoskrnl/include/internal/mm.h index 6ef55cb4277..0b53676950a 100644 --- a/reactos/ntoskrnl/include/internal/mm.h +++ b/reactos/ntoskrnl/include/internal/mm.h @@ -1554,14 +1554,20 @@ MmCallDllInitialize( IN PLIST_ENTRY ListHead ); -/* ReactOS Mm Hack */ +/* ReactOS Mm Hacks */ VOID FASTCALL -MiSyncThreadProcessViews( +MiSyncForProcessAttach( IN PKTHREAD NextThread, IN PEPROCESS Process ); +VOID +FASTCALL +MiSyncForContextSwitch( + IN PKTHREAD Thread +); + extern PMM_AVL_TABLE MmKernelAddressSpace; FORCEINLINE diff --git a/reactos/ntoskrnl/ke/i386/ctxswitch.S b/reactos/ntoskrnl/ke/i386/ctxswitch.S index dbbebd66527..73fe48388ee 100644 --- a/reactos/ntoskrnl/ke/i386/ctxswitch.S +++ b/reactos/ntoskrnl/ke/i386/ctxswitch.S @@ -738,8 +738,7 @@ CheckNext: SwapContext: /* ReactOS Mm Hack */ mov ecx, esi - mov edx, [edi+KTHREAD_APCSTATE_PROCESS] - call @MiSyncThreadProcessViews@8 + call @MiSyncForContextSwitch@4 /* Swap context at APC_LEVEL */ mov ecx, APC_LEVEL diff --git a/reactos/ntoskrnl/ke/procobj.c b/reactos/ntoskrnl/ke/procobj.c index a2bd61401cb..49a61da4f13 100644 --- a/reactos/ntoskrnl/ke/procobj.c +++ b/reactos/ntoskrnl/ke/procobj.c @@ -448,7 +448,7 @@ KeAttachProcess(IN PKPROCESS Process) ASSERT_IRQL_LESS_OR_EQUAL(DISPATCH_LEVEL); /* Make sure that we are in the right page directory (ReactOS Mm Hack) */ - MiSyncThreadProcessViews(Thread, (PEPROCESS)Process); + MiSyncForProcessAttach(Thread, (PEPROCESS)Process); /* Check if we're already in that process */ if (Thread->ApcState.Process == Process) return; @@ -574,7 +574,7 @@ KeStackAttachProcess(IN PKPROCESS Process, ASSERT_IRQL_LESS_OR_EQUAL(DISPATCH_LEVEL); /* Make sure that we are in the right page directory (ReactOS Mm Hack) */ - MiSyncThreadProcessViews(Thread, (PEPROCESS)Process); + MiSyncForProcessAttach(Thread, (PEPROCESS)Process); /* Crash system if DPC is being executed! */ if (KeIsExecutingDpc()) diff --git a/reactos/ntoskrnl/ke/thrdobj.c b/reactos/ntoskrnl/ke/thrdobj.c index 500ffd05fbc..cd930222008 100644 --- a/reactos/ntoskrnl/ke/thrdobj.c +++ b/reactos/ntoskrnl/ke/thrdobj.c @@ -811,7 +811,7 @@ KeInitThread(IN OUT PKTHREAD Thread, Thread->KernelStackResident = TRUE; /* Make sure that we are in the right page directory (ReactOS Mm Hack) */ - MiSyncThreadProcessViews(Thread, (PEPROCESS)Process); + MiSyncForProcessAttach(Thread, (PEPROCESS)Process); /* Enter SEH to avoid crashes due to user mode */ Status = STATUS_SUCCESS; diff --git a/reactos/ntoskrnl/ke/thrdschd.c b/reactos/ntoskrnl/ke/thrdschd.c index 8f1f52570ee..ff64d40cf5b 100644 --- a/reactos/ntoskrnl/ke/thrdschd.c +++ b/reactos/ntoskrnl/ke/thrdschd.c @@ -344,7 +344,7 @@ KiSwapThread(IN PKTHREAD CurrentThread, WaitIrql = CurrentThread->WaitIrql; /* REACTOS Mm Hack of Doom */ - MiSyncThreadProcessViews(NextThread, PsGetCurrentProcess()); + MiSyncForContextSwitch(NextThread); /* Swap contexts */ ApcState = KiSwapContext(CurrentThread, NextThread); @@ -714,7 +714,7 @@ NtYieldExecution(VOID) ASSERT(OldIrql <= DISPATCH_LEVEL); /* REACTOS Mm Hack of Doom */ - MiSyncThreadProcessViews(NextThread, PsGetCurrentProcess()); + MiSyncForContextSwitch(NextThread); /* Swap to new thread */ KiSwapContext(Thread, NextThread); diff --git a/reactos/ntoskrnl/mm/mm.c b/reactos/ntoskrnl/mm/mm.c index 4bced911cc0..7f0bd5ae3da 100644 --- a/reactos/ntoskrnl/mm/mm.c +++ b/reactos/ntoskrnl/mm/mm.c @@ -26,17 +26,31 @@ MM_STATS MmStats; VOID FASTCALL -MiSyncThreadProcessViews(IN PKTHREAD NextThread, - IN PEPROCESS Process) +MiSyncForProcessAttach(IN PKTHREAD Thread, + IN PEPROCESS Process) { - PETHREAD Thread = CONTAINING_RECORD(NextThread, ETHREAD, Tcb); + PETHREAD Ethread = CONTAINING_RECORD(Thread, ETHREAD, Tcb); /* Hack Sync because Mm is broken */ - MmUpdatePageDir(Process, Thread, sizeof(ETHREAD)); - MmUpdatePageDir(Process, Thread->ThreadsProcess, sizeof(EPROCESS)); + MmUpdatePageDir(Process, Ethread->ThreadsProcess, sizeof(EPROCESS)); MmUpdatePageDir(Process, - (PVOID)Thread->Tcb.StackLimit, - NextThread->LargeStack ? + (PVOID)Thread->StackLimit, + Thread->LargeStack ? + KERNEL_LARGE_STACK_SIZE : KERNEL_STACK_SIZE); +} + +VOID +FASTCALL +MiSyncForContextSwitch(IN PKTHREAD Thread) +{ + PVOID Process = PsGetCurrentProcess(); + PETHREAD Ethread = CONTAINING_RECORD(Thread, ETHREAD, Tcb); + + /* Hack Sync because Mm is broken */ + MmUpdatePageDir(Process, Ethread->ThreadsProcess, sizeof(EPROCESS)); + MmUpdatePageDir(Process, + (PVOID)Thread->StackLimit, + Thread->LargeStack ? KERNEL_LARGE_STACK_SIZE : KERNEL_STACK_SIZE); } From a872a161808ac6e7f16374853d1f5934ededf3af Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Mon, 25 Aug 2008 18:47:44 +0000 Subject: [PATCH 167/324] Merge 34703, 34704, 34705, 34706, 34707, 34708, 34709 and 34710 from ros-amd64-bringup branch: - Fix inline versions of integer <-> pointer conversion functions. - Implement _InterlockedAnd64, _InterlockedOr64, _interlockedbittestandreset64, _interlockedbittestandset64 and gs-segment-adressing functions - As amd64 shares most of the intrinsics of x86, implement them in intrin_x86.h - Fix IMAGE_FIRST_SECTION macro - Implement GetCurrentFiber(), NtCurrentTeb() and YieldProcessor() - Fix ENUMRESLANGPROC, ENUMRESNAMEPROC and ENUMRESTYPEPROC - Add Interlocked functions for pointers - Add InterlockedCompareExchangePointer and InterlockedExchangePointer - Add intrinsic port and register access functions fix LIST_ENTRY() macro for 64 bits add size_t definition to _mingw.h (ported from mingw) - Update some loader structs ULONG -> ULONG_PTR / SIZE_T svn path=/trunk/; revision=35636 --- reactos/include/crt/_mingw.h | 14 ++ reactos/include/ddk/winddk.h | 271 ++++++++++++++++++++++++++-- reactos/include/psdk/basetsd.h | 49 +++-- reactos/include/psdk/intrin.h | 2 +- reactos/include/psdk/intrin_x86.h | 123 +++++++++++++ reactos/include/psdk/winbase.h | 33 ++-- reactos/include/psdk/winnt.h | 33 +++- reactos/include/reactos/rosldr.h | 28 +-- reactos/include/reactos/wine/list.h | 5 + 9 files changed, 491 insertions(+), 67 deletions(-) diff --git a/reactos/include/crt/_mingw.h b/reactos/include/crt/_mingw.h index 9323d4722ec..dd0e13d5c46 100644 --- a/reactos/include/crt/_mingw.h +++ b/reactos/include/crt/_mingw.h @@ -178,6 +178,20 @@ # define __MSVCRT_VERSION__ 0x0600 #endif +#ifndef _SIZE_T_DEFINED +#define _SIZE_T_DEFINED +#undef size_t +#ifdef _WIN64 +#if defined(__GNUC__) && defined(__STRICT_ANSI__) + typedef unsigned int size_t __attribute__ ((mode (DI))); +#else + typedef unsigned __int64 size_t; +#endif +#else + typedef unsigned int size_t; +#endif +#endif + #define __MINGW32_VERSION 3.13 #define __MINGW32_MAJOR_VERSION 3 #define __MINGW32_MINOR_VERSION 13 diff --git a/reactos/include/ddk/winddk.h b/reactos/include/ddk/winddk.h index bf02239231b..4d827e7e10c 100644 --- a/reactos/include/ddk/winddk.h +++ b/reactos/include/ddk/winddk.h @@ -228,7 +228,7 @@ typedef struct _ADAPTER_OBJECT *PADAPTER_OBJECT; #define ZwCurrentProcess() NtCurrentProcess() #define NtCurrentThread() ( (HANDLE)(LONG_PTR) -2 ) #define ZwCurrentThread() NtCurrentThread() - + #if (_M_IX86) #define KIP0PCRADDRESS 0xffdff000 #endif @@ -5404,7 +5404,7 @@ typedef VOID */ #define PCR_MINOR_VERSION 1 #define PCR_MAJOR_VERSION 1 - + #ifdef _X86_ typedef ULONG PFN_NUMBER, *PPFN_NUMBER; @@ -5493,19 +5493,19 @@ KeGetCurrentProcessorNumber(VOID) #error Unknown compiler #endif } - + NTHALAPI KIRQL DDKAPI KeGetCurrentIrql( VOID); - + NTKERNELAPI PRKTHREAD NTAPI KeGetCurrentThread( VOID); - + #define KI_USER_SHARED_DATA 0xffdf0000 #elif defined(__x86_64__) @@ -5586,7 +5586,7 @@ KeGetCurrentProcessorNumber(VOID) #elif defined(_MIPS_) #error MIPS Headers are totally incorrect - + typedef ULONG PFN_NUMBER, *PPFN_NUMBER; #define PASSIVE_LEVEL 0 @@ -5620,16 +5620,16 @@ KeGetCurrentProcessorNumber(VOID) // NT-ARM is not documented, need DDK-ARM // #include - + #else #error Unknown architecture #endif - + #define PAGE_SIZE 0x1000 #define PAGE_SHIFT 12L #define SharedUserData ((KUSER_SHARED_DATA * CONST) KI_USER_SHARED_DATA) - + extern NTKERNELAPI PVOID MmHighestUserAddress; extern NTKERNELAPI PVOID MmSystemRangeStart; extern NTKERNELAPI ULONG_PTR MmUserProbeAddress; @@ -5744,8 +5744,12 @@ InterlockedExchangeAdd( * IN OUT PVOID VOLATILE *Target, * IN PVOID Value) */ +#if defined (_M_AMD64) +#define InterlockedExchangePointer _InterlockedExchangePointer +#else #define InterlockedExchangePointer(Target, Value) \ ((PVOID) InterlockedExchange((PLONG) Target, (LONG) Value)) +#endif /* * PVOID @@ -5754,8 +5758,12 @@ InterlockedExchangeAdd( * IN PVOID Exchange, * IN PVOID Comparand) */ +#if defined (_M_AMD64) +#define InterlockedCompareExchangePointer _InterlockedCompareExchangePointer +#else #define InterlockedCompareExchangePointer(Destination, Exchange, Comparand) \ ((PVOID) InterlockedCompareExchange((PLONG) Destination, (LONG) Exchange, (LONG) Comparand)) +#endif #define InterlockedExchangeAddSizeT(a, b) InterlockedExchangeAdd((LONG *)a, b) #define InterlockedIncrementSizeT(a) InterlockedIncrement((LONG *)a) @@ -7569,6 +7577,9 @@ IoAllocateAdapterChannel( IN PVOID Context ); +/** Io access routines **/ + +#if !defined(_M_AMD64) NTHALAPI VOID NTAPI @@ -7743,6 +7754,244 @@ WRITE_REGISTER_USHORT( IN PUSHORT Register, IN USHORT Value); +#else + +FORCEINLINE +VOID +READ_PORT_BUFFER_UCHAR( + IN PUCHAR Port, + IN PUCHAR Buffer, + IN ULONG Count) +{ + __inbytestring((USHORT)(ULONG_PTR)Port, Buffer, Count); +} + +FORCEINLINE +VOID +READ_PORT_BUFFER_ULONG( + IN PULONG Port, + IN PULONG Buffer, + IN ULONG Count) +{ + __indwordstring((USHORT)(ULONG_PTR)Port, Buffer, Count); +} + +FORCEINLINE +VOID +READ_PORT_BUFFER_USHORT( + IN PUSHORT Port, + IN PUSHORT Buffer, + IN ULONG Count) +{ + __inwordstring((USHORT)(ULONG_PTR)Port, Buffer, Count); +} + +FORCEINLINE +UCHAR +READ_PORT_UCHAR( + IN PUCHAR Port) +{ + return __inbyte((USHORT)(ULONG_PTR)Port); +} + +FORCEINLINE +ULONG +READ_PORT_ULONG( + IN PULONG Port) +{ + return __indword((USHORT)(ULONG_PTR)Port); +} + +FORCEINLINE +USHORT +READ_PORT_USHORT( + IN PUSHORT Port) +{ + return __inword((USHORT)(ULONG_PTR)Port); +} + +FORCEINLINE +VOID +READ_REGISTER_BUFFER_UCHAR( + IN PUCHAR Register, + IN PUCHAR Buffer, + IN ULONG Count) +{ + __movsb(Register, Buffer, Count); +} + +FORCEINLINE +VOID +READ_REGISTER_BUFFER_ULONG( + IN PULONG Register, + IN PULONG Buffer, + IN ULONG Count) +{ + __movsd(Register, Buffer, Count); +} + +FORCEINLINE +VOID +READ_REGISTER_BUFFER_USHORT( + IN PUSHORT Register, + IN PUSHORT Buffer, + IN ULONG Count) +{ + __movsw(Register, Buffer, Count); +} + +FORCEINLINE +UCHAR +READ_REGISTER_UCHAR( + IN PUCHAR Register) +{ + return *Register; +} + +FORCEINLINE +ULONG +READ_REGISTER_ULONG( + IN PULONG Register) +{ + return *Register; +} + +FORCEINLINE +USHORT +READ_REGISTER_USHORT( + IN PUSHORT Register) +{ + return *Register; +} + +FORCEINLINE +VOID +WRITE_PORT_BUFFER_UCHAR( + IN PUCHAR Port, + IN PUCHAR Buffer, + IN ULONG Count) +{ + __outbytestring((USHORT)(ULONG_PTR)Port, Buffer, Count); +} + +FORCEINLINE +VOID +WRITE_PORT_BUFFER_ULONG( + IN PULONG Port, + IN PULONG Buffer, + IN ULONG Count) +{ + __outdwordstring((USHORT)(ULONG_PTR)Port, Buffer, Count); +} + +FORCEINLINE +VOID +WRITE_PORT_BUFFER_USHORT( + IN PUSHORT Port, + IN PUSHORT Buffer, + IN ULONG Count) +{ + __outwordstring((USHORT)(ULONG_PTR)Port, Buffer, Count); +} + +FORCEINLINE +VOID +WRITE_PORT_UCHAR( + IN PUCHAR Port, + IN UCHAR Value) +{ + __outbyte((USHORT)(ULONG_PTR)Port, Value); +} + +FORCEINLINE +VOID +WRITE_PORT_ULONG( + IN PULONG Port, + IN ULONG Value) +{ + __outdword((USHORT)(ULONG_PTR)Port, Value); +} + +FORCEINLINE +VOID +WRITE_PORT_USHORT( + IN PUSHORT Port, + IN USHORT Value) +{ + __outword((USHORT)(ULONG_PTR)Port, Value); +} + +FORCEINLINE +VOID +WRITE_REGISTER_BUFFER_UCHAR( + IN PUCHAR Register, + IN PUCHAR Buffer, + IN ULONG Count) +{ + LONG Synch; + __movsb(Register, Buffer, Count); + InterlockedOr(&Synch, 1); +} + +FORCEINLINE +VOID +WRITE_REGISTER_BUFFER_ULONG( + IN PULONG Register, + IN PULONG Buffer, + IN ULONG Count) +{ + LONG Synch; + __movsd(Register, Buffer, Count); + InterlockedOr(&Synch, 1); +} + +FORCEINLINE +VOID +WRITE_REGISTER_BUFFER_USHORT( + IN PUSHORT Register, + IN PUSHORT Buffer, + IN ULONG Count) +{ + LONG Synch; + __movsw(Register, Buffer, Count); + InterlockedOr(&Synch, 1); +} + +FORCEINLINE +VOID +WRITE_REGISTER_UCHAR( + IN PUCHAR Register, + IN UCHAR Value) +{ + LONG Synch; + *Register = Value; + InterlockedOr(&Synch, 1); +} + +FORCEINLINE +VOID +WRITE_REGISTER_ULONG( + IN PULONG Register, + IN ULONG Value) +{ + LONG Synch; + *Register = Value; + InterlockedOr(&Synch, 1); +} + +FORCEINLINE +VOID +WRITE_REGISTER_USHORT( + IN PUSHORT Register, + IN USHORT Value) +{ + LONG Sync; + *Register = Value; + InterlockedOr(&Sync, 1); +} + +#endif + /** I/O manager routines **/ NTKERNELAPI @@ -9599,9 +9848,9 @@ KIRQL DDKAPI KeRaiseIrqlToSynchLevel( VOID); - + #elif defined(_M_ARM) - + #include #else diff --git a/reactos/include/psdk/basetsd.h b/reactos/include/psdk/basetsd.h index f17435ae6e5..e6e99a53236 100644 --- a/reactos/include/psdk/basetsd.h +++ b/reactos/include/psdk/basetsd.h @@ -65,37 +65,36 @@ typedef unsigned __int64 HANDLE_PTR; typedef unsigned int UHALF_PTR, *PUHALF_PTR; typedef int HALF_PTR, *PHALF_PTR; -#if 0 /* TODO when WIN64 is here */ -inline unsigned long HandleToUlong(const void* h ) - { return((unsigned long) h ); } -inline long HandleToLong( const void* h ) - { return((long) h ); } -inline void* ULongToHandle( const long h ) +#if !defined(__midl) && !defined(__WIDL__) +static inline unsigned long HandleToUlong(const void* h ) + { return((unsigned long)(ULONG_PTR) h ); } +static inline long HandleToLong( const void* h ) + { return((long)(LONG_PTR) h ); } +static inline void* ULongToHandle( const long h ) { return((void*) (UINT_PTR) h ); } -inline void* LongToHandle( const long h ) +static inline void* LongToHandle( const long h ) { return((void*) (INT_PTR) h ); } -inline unsigned long PtrToUlong( const void* p) - { return((unsigned long) p ); } -inline unsigned int PtrToUint( const void* p ) - { return((unsigned int) p ); } -inline unsigned short PtrToUshort( const void* p ) - { return((unsigned short) p ); } -inline long PtrToLong( const void* p ) - { return((long) p ); } -inline int PtrToInt( const void* p ) - { return((int) p ); } -inline short PtrToShort( const void* p ) - { return((short) p ); } -inline void* IntToPtr( const int i ) +static inline unsigned long PtrToUlong( const void* p) + { return((unsigned long)(ULONG_PTR) p ); } +static inline unsigned int PtrToUint( const void* p ) + { return((unsigned int)(UINT_PTR) p ); } +static inline unsigned short PtrToUshort( const void* p ) + { return((unsigned short)(ULONG_PTR) p ); } +static inline long PtrToLong( const void* p ) + { return((long)(LONG_PTR) p ); } +static inline int PtrToInt( const void* p ) + { return((int)(INT_PTR) p ); } +static inline short PtrToShort( const void* p ) + { return((short)(INT_PTR) p ); } +static inline void* IntToPtr( const int i ) { return( (void*)(INT_PTR)i ); } -inline void* UIntToPtr(const unsigned int ui) +static inline void* UIntToPtr(const unsigned int ui) { return( (void*)(UINT_PTR)ui ); } -inline void* LongToPtr( const long l ) +static inline void* LongToPtr( const long l ) { return( (void*)(LONG_PTR)l ); } -inline void* ULongToPtr( const unsigned long ul ) +static inline void* ULongToPtr( const unsigned long ul ) { return( (void*)(ULONG_PTR)ul ); } -#endif /* 0_ */ - +#endif /* !__midl */ #else /* !_WIN64 */ typedef int INT_PTR, *PINT_PTR; typedef unsigned int UINT_PTR, *PUINT_PTR; diff --git a/reactos/include/psdk/intrin.h b/reactos/include/psdk/intrin.h index 6908c4f383a..c04cd2fdd23 100644 --- a/reactos/include/psdk/intrin.h +++ b/reactos/include/psdk/intrin.h @@ -79,7 +79,7 @@ #include "intrin_arm.h" #elif defined(__x86_64__) /* TODO: the x64 architecture shares most of the i386 intrinsics. It should be easy to support */ -#include "intrin_x86_64.h" +#include "intrin_x86.h" #else #error Unsupported architecture #endif diff --git a/reactos/include/psdk/intrin_x86.h b/reactos/include/psdk/intrin_x86.h index a13a007b09d..e1d41c83fa6 100644 --- a/reactos/include/psdk/intrin_x86.h +++ b/reactos/include/psdk/intrin_x86.h @@ -153,6 +153,13 @@ static __inline__ __attribute__((always_inline)) long _InterlockedAnd(volatile l return __sync_fetch_and_and(value, mask); } +#if defined(_M_AMD64) +static __inline__ __attribute__((always_inline)) long _InterlockedAnd64(volatile long long * const value, const long long mask) +{ + return __sync_fetch_and_and(value, mask); +} +#endif + static __inline__ __attribute__((always_inline)) char _InterlockedOr8(volatile char * const value, const char mask) { return __sync_fetch_and_or(value, mask); @@ -168,6 +175,13 @@ static __inline__ __attribute__((always_inline)) long _InterlockedOr(volatile lo return __sync_fetch_and_or(value, mask); } +#if defined(_M_AMD64) +static __inline__ __attribute__((always_inline)) long _InterlockedOr64(volatile long long * const value, const long long mask) +{ + return __sync_fetch_and_or(value, mask); +} +#endif + static __inline__ __attribute__((always_inline)) char _InterlockedXor8(volatile char * const value, const char mask) { return __sync_fetch_and_xor(value, mask); @@ -455,6 +469,15 @@ static __inline__ __attribute__((always_inline)) unsigned char _interlockedbitte return retval; } +#if defined(_M_AMD64) +static __inline__ __attribute__((always_inline)) unsigned char _interlockedbittestandreset64(volatile long long * a, const long long b) +{ + unsigned char retval; + __asm__("lock; btrq %[b], %[a]; setb %b[retval]" : [retval] "=r" (retval), [a] "=m" (a) : [b] "Ir" (b) : "memory"); + return retval; +} +#endif + static __inline__ __attribute__((always_inline)) unsigned char _interlockedbittestandset(volatile long * a, const long b) { unsigned char retval; @@ -462,6 +485,14 @@ static __inline__ __attribute__((always_inline)) unsigned char _interlockedbitte return retval; } +#if defined(_M_AMD64) +static __inline__ __attribute__((always_inline)) unsigned char _interlockedbittestandset64(volatile long long * a, const long long b) +{ + unsigned char retval; + __asm__("lock; btsq %[b], %[a]; setc %b[retval]" : [retval] "=r" (retval), [a] "=m" (a) : [b] "Ir" (b) : "memory"); + return retval; +} +#endif /*** String operations ***/ /* NOTE: we don't set a memory clobber in the __stosX functions because Visual C++ doesn't */ @@ -525,7 +556,98 @@ static __inline__ __attribute__((always_inline)) void __movsd(unsigned long * De ); } +#if defined(_M_AMD64) +/*** GS segment addressing ***/ +static __inline__ __attribute__((always_inline)) void __writegsbyte(const unsigned long Offset, const unsigned char Data) +{ + __asm__("movb %b[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data)); +} + +static __inline__ __attribute__((always_inline)) void __writegsword(const unsigned long Offset, const unsigned short Data) +{ + __asm__("movw %w[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data)); +} + +static __inline__ __attribute__((always_inline)) void __writegsdword(const unsigned long Offset, const unsigned long Data) +{ + __asm__("movl %k[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data)); +} + +static __inline__ __attribute__((always_inline)) void __writegsqword(const unsigned long Offset, const unsigned __int64 Data) +{ + __asm__("movq %q[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data)); +} + +static __inline__ __attribute__((always_inline)) unsigned char __readgsbyte(const unsigned long Offset) +{ + unsigned char value; + __asm__("movb %%gs:%a[Offset], %b[value]" : [value] "=q" (value) : [Offset] "irm" (Offset)); + return value; +} + +static __inline__ __attribute__((always_inline)) unsigned short __readgsword(const unsigned long Offset) +{ + unsigned short value; + __asm__("movw %%gs:%a[Offset], %w[value]" : [value] "=q" (value) : [Offset] "irm" (Offset)); + return value; +} + +static __inline__ __attribute__((always_inline)) unsigned long __readgsdword(const unsigned long Offset) +{ + unsigned long value; + __asm__("movl %%gs:%a[Offset], %k[value]" : [value] "=q" (value) : [Offset] "irm" (Offset)); + return value; +} + +static __inline__ __attribute__((always_inline)) unsigned __int64 __readgsqword(const unsigned long Offset) +{ + unsigned long value; + __asm__("movq %%gs:%a[Offset], %q[value]" : [value] "=q" (value) : [Offset] "irm" (Offset)); + return value; +} + +static __inline__ __attribute__((always_inline)) void __incgsbyte(const unsigned long Offset) +{ + __asm__("incb %%gs:%a[Offset]" : : [Offset] "ir" (Offset)); +} + +static __inline__ __attribute__((always_inline)) void __incgsword(const unsigned long Offset) +{ + __asm__("incw %%gs:%a[Offset]" : : [Offset] "ir" (Offset)); +} + +static __inline__ __attribute__((always_inline)) void __incgsdword(const unsigned long Offset) +{ + __asm__("incl %%gs:%a[Offset]" : : [Offset] "ir" (Offset)); +} + +/* NOTE: the bizarre implementation of __addgsxxx mimics the broken Visual C++ behavior */ +static __inline__ __attribute__((always_inline)) void __addgsbyte(const unsigned long Offset, const unsigned char Data) +{ + if(!__builtin_constant_p(Offset)) + __asm__("addb %k[Offset], %%gs:%a[Offset]" : : [Offset] "r" (Offset)); + else + __asm__("addb %b[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data)); +} + +static __inline__ __attribute__((always_inline)) void __addgsword(const unsigned long Offset, const unsigned short Data) +{ + if(!__builtin_constant_p(Offset)) + __asm__("addw %k[Offset], %%gs:%a[Offset]" : : [Offset] "r" (Offset)); + else + __asm__("addw %w[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data)); +} + +static __inline__ __attribute__((always_inline)) void __addgsdword(const unsigned long Offset, const unsigned int Data) +{ + if(!__builtin_constant_p(Offset)) + __asm__("addl %k[Offset], %%gs:%a[Offset]" : : [Offset] "r" (Offset)); + else + __asm__("addl %k[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data)); +} + +#else /*** FS segment addressing ***/ static __inline__ __attribute__((always_inline)) void __writefsbyte(const unsigned long Offset, const unsigned char Data) { @@ -602,6 +724,7 @@ static __inline__ __attribute__((always_inline)) void __addfsdword(const unsigne else __asm__("addl %k[Data], %%fs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data)); } +#endif /*** Bit manipulation ***/ diff --git a/reactos/include/psdk/winbase.h b/reactos/include/psdk/winbase.h index 4da67ada16e..fbcb7f37a7d 100644 --- a/reactos/include/psdk/winbase.h +++ b/reactos/include/psdk/winbase.h @@ -23,7 +23,7 @@ extern "C" { #define FILE_SYSTEM_NOT_SUPPORT 6 #define FILE_USER_DISALLOWED 7 #define FILE_READ_ONLY 8 -#define FILE_DIR_DISALOWED 9 +#define FILE_DIR_DISALOWED 9 #define COMMPROP_INITIALIZED 0xE73CF52E #define SP_SERIALCOMM 1 @@ -1081,12 +1081,12 @@ typedef RTL_CONDITION_VARIABLE CONDITION_VARIABLE, *PCONDITION_VARIABLE; typedef DWORD(WINAPI *LPPROGRESS_ROUTINE)(LARGE_INTEGER,LARGE_INTEGER,LARGE_INTEGER,LARGE_INTEGER,DWORD,DWORD,HANDLE,HANDLE,LPVOID); typedef void(WINAPI *LPFIBER_START_ROUTINE)(PVOID); typedef VOID (WINAPI *PFLS_CALLBACK_FUNCTION)(PVOID); -typedef BOOL(CALLBACK *ENUMRESLANGPROCA)(HMODULE,LPCSTR,LPCSTR,WORD,LONG); -typedef BOOL(CALLBACK *ENUMRESLANGPROCW)(HMODULE,LPCWSTR,LPCWSTR,WORD,LONG); -typedef BOOL(CALLBACK *ENUMRESNAMEPROCA)(HMODULE,LPCSTR,LPSTR,LONG); -typedef BOOL(CALLBACK *ENUMRESNAMEPROCW)(HMODULE,LPCWSTR,LPWSTR,LONG); -typedef BOOL(CALLBACK *ENUMRESTYPEPROCA)(HMODULE,LPSTR,LONG); -typedef BOOL(CALLBACK *ENUMRESTYPEPROCW)(HMODULE,LPWSTR,LONG); +typedef BOOL(CALLBACK *ENUMRESLANGPROCA)(HMODULE,LPCSTR,LPCSTR,WORD,LONG_PTR); +typedef BOOL(CALLBACK *ENUMRESLANGPROCW)(HMODULE,LPCWSTR,LPCWSTR,WORD,LONG_PTR); +typedef BOOL(CALLBACK *ENUMRESNAMEPROCA)(HMODULE,LPCSTR,LPSTR,LONG_PTR); +typedef BOOL(CALLBACK *ENUMRESNAMEPROCW)(HMODULE,LPCWSTR,LPWSTR,LONG_PTR); +typedef BOOL(CALLBACK *ENUMRESTYPEPROCA)(HMODULE,LPSTR,LONG_PTR); +typedef BOOL(CALLBACK *ENUMRESTYPEPROCW)(HMODULE,LPWSTR,LONG_PTR); typedef void(CALLBACK *LPOVERLAPPED_COMPLETION_ROUTINE)(DWORD,DWORD,LPOVERLAPPED); typedef LONG(CALLBACK *PTOP_LEVEL_EXCEPTION_FILTER)(LPEXCEPTION_POINTERS); typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER; @@ -1707,14 +1707,23 @@ VOID WINAPI InitializeSRWLock(PSRWLOCK); #ifndef __INTERLOCKED_DECLARED #define __INTERLOCKED_DECLARED LONG WINAPI InterlockedCompareExchange(IN OUT LONG volatile *,LONG,LONG); -/* PVOID WINAPI InterlockedCompareExchangePointer(PVOID*,PVOID,PVOID); */ -#define InterlockedCompareExchangePointer(d,e,c) \ - (PVOID)InterlockedCompareExchange((LPLONG)(d),(LONG)(e),(LONG)(c)) LONG WINAPI InterlockedDecrement(IN OUT LONG volatile *); LONG WINAPI InterlockedExchange(IN OUT LONG volatile *,LONG); -/* PVOID WINAPI InterlockedExchangePointer(PVOID*,PVOID); */ -#define InterlockedExchangePointer(t,v) \ +#if defined(_WIN64) + /* PVOID WINAPI InterlockedExchangePointer(PVOID*,PVOID); */ + #define InterlockedExchangePointer(t,v) \ + (PVOID)InterlockedExchange64((LONGLONG*)(t),(LONGLONG)(v)) + /* PVOID WINAPI InterlockedCompareExchangePointer(PVOID*,PVOID,PVOID); */ + #define InterlockedCompareExchangePointer(d,e,c) \ + (PVOID)InterlockedCompareExchange64((LONGLONG*)(d),(LONGLONG)(e),(LONGLONG)(c)) +#else + /* PVOID WINAPI InterlockedExchangePointer(PVOID*,PVOID); */ + #define InterlockedExchangePointer(t,v) \ (PVOID)InterlockedExchange((LPLONG)(t),(LONG)(v)) + /* PVOID WINAPI InterlockedCompareExchangePointer(PVOID*,PVOID,PVOID); */ + #define InterlockedCompareExchangePointer(d,e,c) \ + (PVOID)InterlockedCompareExchange((LPLONG)(d),(LONG)(e),(LONG)(c)) +#endif LONG WINAPI InterlockedExchangeAdd(IN OUT LONG volatile *,LONG); #if (_WIN32_WINNT >= 0x0501) PSLIST_ENTRY WINAPI InterlockedFlushSList(PSLIST_HEADER); diff --git a/reactos/include/psdk/winnt.h b/reactos/include/psdk/winnt.h index f76a2f77c2c..33ed3230971 100644 --- a/reactos/include/psdk/winnt.h +++ b/reactos/include/psdk/winnt.h @@ -1350,7 +1350,7 @@ typedef enum #define IMAGE_DLLCHARACTERISTICS_NO_BIND 0x0800 #define IMAGE_DLLCHARACTERISTICS_WDM_DRIVER 0x2000 #define IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE 0x8000 -#define IMAGE_FIRST_SECTION(h) ((PIMAGE_SECTION_HEADER) ((DWORD)h+FIELD_OFFSET(IMAGE_NT_HEADERS,OptionalHeader)+((PIMAGE_NT_HEADERS)(h))->FileHeader.SizeOfOptionalHeader)) +#define IMAGE_FIRST_SECTION(h) ((PIMAGE_SECTION_HEADER) ((DWORD_PTR)h+FIELD_OFFSET(IMAGE_NT_HEADERS,OptionalHeader)+((PIMAGE_NT_HEADERS)(h))->FileHeader.SizeOfOptionalHeader)) #define IMAGE_DIRECTORY_ENTRY_EXPORT 0 #define IMAGE_DIRECTORY_ENTRY_IMPORT 1 #define IMAGE_DIRECTORY_ENTRY_RESOURCE 2 @@ -2902,7 +2902,7 @@ typedef struct _RTL_CRITICAL_SECTION { #endif NTSYSAPI -WORD +WORD NTAPI RtlCaptureStackBackTrace( IN DWORD FramesToSkip, @@ -4090,6 +4090,11 @@ static __inline__ PVOID GetCurrentFiber(void) ); return ret; } +#elif defined (_M_AMD64) +FORCEINLINE PVOID GetCurrentFiber(VOID) +{ + return (PVOID)__readgsqword(FIELD_OFFSET(NT_TIB, FiberData)); +} #elif defined (_M_ARM) PVOID WINAPI GetCurrentFiber(VOID); #else @@ -4130,13 +4135,18 @@ static __inline__ struct _TEB * NtCurrentTeb(void) return ret; } #elif _M_ARM - + // // NT-ARM is not documented // #define KIRQL ULONG // Hack! #include - + +#elif defined (_M_AMD64) +FORCEINLINE struct _TEB * NtCurrentTeb(VOID) +{ + return __readgsqword(FIELD_OFFSET(NT_TIB, Self)); +} #else static __inline__ struct _TEB * NtCurrentTeb(void) { @@ -4267,6 +4277,8 @@ BitScanReverse(OUT ULONG *Index, #if defined(_M_IX86) #define YieldProcessor() __asm__ __volatile__("pause"); +#elif defined (_M_AMD64) +#define YieldProcessor() __asm__ __volatile__("pause"); #elif defined(_M_PPC) #define YieldProcessor() __asm__ __volatile__("nop"); #elif defined(_M_MIPS) @@ -4282,6 +4294,19 @@ BitScanReverse(OUT ULONG *Index, #define InterlockedExchangeAddSizeT(a, b) InterlockedExchangeAdd64((LONG64 *)a, b) +#define InterlockedAnd _InterlockedAnd +#define InterlockedExchange _InterlockedExchange +#define InterlockedOr _InterlockedOr + +#define InterlockedAnd64 _InterlockedAnd64 +#define InterlockedOr64 _InterlockedOr64 + +#define InterlockedBitTestAndSet _interlockedbittestandset +#define InterlockedBitTestAndSet64 _interlockedbittestandset64 +#define InterlockedBitTestAndReset _interlockedbittestandreset +#define InterlockedBitTestAndReset64 _interlockedbittestandreset64 + + #endif #else diff --git a/reactos/include/reactos/rosldr.h b/reactos/include/reactos/rosldr.h index c7a76f810d0..0663a26091f 100644 --- a/reactos/include/reactos/rosldr.h +++ b/reactos/include/reactos/rosldr.h @@ -17,34 +17,34 @@ typedef struct _LOADER_MODULE { - ULONG ModStart; - ULONG ModEnd; - ULONG String; - ULONG Reserved; + ULONG_PTR ModStart; + ULONG_PTR ModEnd; + ULONG_PTR String; + ULONG_PTR Reserved; } LOADER_MODULE, *PLOADER_MODULE; typedef struct _ROS_LOADER_PARAMETER_BLOCK { ULONG Flags; - ULONG MemLower; - ULONG MemHigher; + ULONG_PTR MemLower; + ULONG_PTR MemHigher; ULONG BootDevice; PCHAR CommandLine; ULONG ModsCount; PLOADER_MODULE ModsAddr; UCHAR Syms[12]; - ULONG MmapLength; - ULONG MmapAddr; - ULONG RdLength; - ULONG RdAddr; + SIZE_T MmapLength; + ULONG_PTR MmapAddr; + SIZE_T RdLength; + ULONG_PTR RdAddr; ULONG DrivesCount; PARC_DISK_SIGNATURE DrivesAddr; ULONG ConfigTable; ULONG BootLoaderName; - ULONG PageDirectoryStart; - ULONG PageDirectoryEnd; - ULONG KernelBase; - ULONG ArchExtra; + ULONG_PTR PageDirectoryStart; + ULONG_PTR PageDirectoryEnd; + ULONG_PTR KernelBase; + ULONG_PTR ArchExtra; } ROS_LOADER_PARAMETER_BLOCK, *PROS_LOADER_PARAMETER_BLOCK; extern BOOLEAN AcpiTableDetected; diff --git a/reactos/include/reactos/wine/list.h b/reactos/include/reactos/wine/list.h index b610e5e5ca9..68cd4cfd083 100644 --- a/reactos/include/reactos/wine/list.h +++ b/reactos/include/reactos/wine/list.h @@ -224,7 +224,12 @@ static inline void list_move_head( struct list *dst, struct list *src ) #define LIST_INIT(list) { &(list), &(list) } /* get pointer to object containing list element */ +#ifdef _WIN64 +#define LIST_ENTRY(elem, type, field) \ + ((type *)((char *)(elem) - (unsigned long long)(&((type *)0)->field))) +#else #define LIST_ENTRY(elem, type, field) \ ((type *)((char *)(elem) - (unsigned long)(&((type *)0)->field))) +#endif #endif /* __WINE_SERVER_LIST_H */ From 7afb74e857859e4b807336b856577fcb4e5e3eed Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Mon, 25 Aug 2008 18:48:18 +0000 Subject: [PATCH 168/324] - Remove CHECKPOINT macros from green.sys svn path=/trunk/; revision=35637 --- rosapps/drivers/green/keyboard.c | 1 - rosapps/drivers/green/screen.c | 4 ---- 2 files changed, 5 deletions(-) diff --git a/rosapps/drivers/green/keyboard.c b/rosapps/drivers/green/keyboard.c index 0a4b1950154..511b8567ccc 100644 --- a/rosapps/drivers/green/keyboard.c +++ b/rosapps/drivers/green/keyboard.c @@ -213,7 +213,6 @@ KeyboardDeviceWorker( if (!Irp) { /* no memory actually, try later */ - CHECKPOINT; KeStallExecutionProcessor(10); continue; } diff --git a/rosapps/drivers/green/screen.c b/rosapps/drivers/green/screen.c index 618dbb44793..ed7bf841ac1 100644 --- a/rosapps/drivers/green/screen.c +++ b/rosapps/drivers/green/screen.c @@ -301,7 +301,6 @@ ScreenWrite( if (!(DeviceExtension->Mode & ENABLE_PROCESSED_OUTPUT)) { /* raw output mode */ - CHECKPOINT; Irp->IoStatus.Status = STATUS_NOT_SUPPORTED; IoCompleteRequest (Irp, IO_NO_INCREMENT); @@ -594,7 +593,6 @@ ScreenDeviceControl( && ConsoleDraw->SizeX == DeviceExtension->Columns && ConsoleDraw->SizeY == DeviceExtension->Rows) { - CHECKPOINT1; /* search if we need to clear all screen */ DoOptimization = TRUE; Video = (PUCHAR)(ConsoleDraw + 1); @@ -603,14 +601,12 @@ ScreenDeviceControl( { if (Video[x++] != ' ') { - CHECKPOINT1; DoOptimization = FALSE; } /*if (Video[x++] != DeviceExtension->CharAttribute) DoOptimization = FALSE; */ } if (DoOptimization) { - CHECKPOINT1; AddToSendBuffer(DeviceExtension, 4, ESC, '[', '2', 'J'); } } From 7876a9fe0ddd0e6471d540ec57deb244d8eb52e6 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Mon, 25 Aug 2008 18:52:38 +0000 Subject: [PATCH 169/324] - Remove deprecated CHECKPOINT/CHECKPOINT1 macros which basically translated into DPRINT/DPRINT1("\n") svn path=/trunk/; revision=35638 --- reactos/base/setup/usetup/bootsup.c | 1 - reactos/drivers/filesystems/cdfs/dirctl.c | 1 - reactos/drivers/filesystems/fastfat/create.c | 2 -- reactos/drivers/filesystems/fastfat/dir.c | 1 - reactos/drivers/filesystems/fastfat/direntry.c | 4 ---- reactos/drivers/filesystems/fastfat/dirwr.c | 5 ----- reactos/drivers/filesystems/fastfat/fat.c | 1 - reactos/drivers/filesystems/fastfat/fcb.c | 3 --- reactos/drivers/filesystems/fastfat/fsctl.c | 1 - reactos/drivers/filesystems/fastfat/rw.c | 9 --------- reactos/drivers/filesystems/fastfat/volume.c | 1 - reactos/drivers/setup/blue/blue.c | 1 - reactos/hal/halx86/mp/ioapic.c | 8 +++----- reactos/lib/fslib/ext2lib/Mke2fs.c | 12 ------------ reactos/lib/rtl/dos8dot3.c | 2 -- reactos/ntoskrnl/ex/shutdown.c | 2 +- reactos/ntoskrnl/io/iomgr/bootlog.c | 4 ---- reactos/ntoskrnl/mm/balance.c | 3 --- reactos/ntoskrnl/mm/marea.c | 2 -- reactos/ntoskrnl/mm/section.c | 8 -------- reactos/subsystems/win32/csrss/win32csr/conio.c | 1 - reactos/subsystems/win32/csrss/win32csr/tuiconsole.c | 2 -- reactos/subsystems/win32/win32k/ntuser/focus.c | 2 -- 23 files changed, 4 insertions(+), 72 deletions(-) diff --git a/reactos/base/setup/usetup/bootsup.c b/reactos/base/setup/usetup/bootsup.c index aeb57bd70b4..9c3c9c93f71 100644 --- a/reactos/base/setup/usetup/bootsup.c +++ b/reactos/base/setup/usetup/bootsup.c @@ -979,7 +979,6 @@ InstallFat32BootCodeToFile(PWSTR SrcPath, NtClose(FileHandle); if (!NT_SUCCESS(Status)) { -CHECKPOINT1; RtlFreeHeap(ProcessHeap, 0, OrigBootSector); return(Status); } diff --git a/reactos/drivers/filesystems/cdfs/dirctl.c b/reactos/drivers/filesystems/cdfs/dirctl.c index 50be672295c..10381f549bd 100644 --- a/reactos/drivers/filesystems/cdfs/dirctl.c +++ b/reactos/drivers/filesystems/cdfs/dirctl.c @@ -189,7 +189,6 @@ CdfsFindFile(PDEVICE_EXTENSION DeviceExt, if (FileToFind == NULL || FileToFind->Length == 0) { - CHECKPOINT; RtlInitUnicodeString(&TempString, L"."); FileToFind = &TempString; } diff --git a/reactos/drivers/filesystems/fastfat/create.c b/reactos/drivers/filesystems/fastfat/create.c index 6d2bf54fa3c..35f2194a4f6 100644 --- a/reactos/drivers/filesystems/fastfat/create.c +++ b/reactos/drivers/filesystems/fastfat/create.c @@ -204,7 +204,6 @@ FindFile ( PathNameBuffer = ExAllocatePoolWithTag(NonPagedPool, PathNameBufferLength + sizeof(WCHAR), TAG_VFAT); if (!PathNameBuffer) { - CHECKPOINT1; return STATUS_INSUFFICIENT_RESOURCES; } @@ -263,7 +262,6 @@ FindFile ( Status = RtlUpcaseUnicodeString(&FileToFindUpcase, FileToFindU, TRUE); if (!NT_SUCCESS(Status)) { - CHECKPOINT; ExFreePool(PathNameBuffer); return Status; } diff --git a/reactos/drivers/filesystems/fastfat/dir.c b/reactos/drivers/filesystems/fastfat/dir.c index 674ba56f4f3..e94546e6657 100644 --- a/reactos/drivers/filesystems/fastfat/dir.c +++ b/reactos/drivers/filesystems/fastfat/dir.c @@ -478,7 +478,6 @@ NTSTATUS VfatDirectoryControl (PVFAT_IRP_CONTEXT IrpContext) */ { NTSTATUS RC = STATUS_SUCCESS; - CHECKPOINT; IrpContext->Irp->IoStatus.Information = 0; switch (IrpContext->MinorFunction) { diff --git a/reactos/drivers/filesystems/fastfat/direntry.c b/reactos/drivers/filesystems/fastfat/direntry.c index 3dda26a5db0..c796b167131 100644 --- a/reactos/drivers/filesystems/fastfat/direntry.c +++ b/reactos/drivers/filesystems/fastfat/direntry.c @@ -205,7 +205,6 @@ NTSTATUS FATGetNextDirEntry(PVOID * pContext, if (FileOffset.u.LowPart >= pDirFcb->RFCB.FileSize.u.LowPart || !CcMapData(pDirFcb->FileObject, &FileOffset, PAGE_SIZE, TRUE, pContext, pPage)) { - CHECKPOINT; *pContext = NULL; return STATUS_NO_MORE_ENTRIES; } @@ -230,7 +229,6 @@ NTSTATUS FATGetNextDirEntry(PVOID * pContext, if (FileOffset.u.LowPart >= pDirFcb->RFCB.FileSize.u.LowPart || !CcMapData(pDirFcb->FileObject, &FileOffset, PAGE_SIZE, TRUE, pContext, pPage)) { - CHECKPOINT; *pContext = NULL; return STATUS_NO_MORE_ENTRIES; } @@ -328,7 +326,6 @@ NTSTATUS FATGetNextDirEntry(PVOID * pContext, if (FileOffset.u.LowPart >= pDirFcb->RFCB.FileSize.u.LowPart || !CcMapData(pDirFcb->FileObject, &FileOffset, PAGE_SIZE, TRUE, pContext, pPage)) { - CHECKPOINT; *pContext = NULL; return STATUS_NO_MORE_ENTRIES; } @@ -440,7 +437,6 @@ NTSTATUS FATXGetNextDirEntry(PVOID * pContext, if (FileOffset.u.LowPart >= pDirFcb->RFCB.FileSize.u.LowPart || !CcMapData(pDirFcb->FileObject, &FileOffset, PAGE_SIZE, TRUE, pContext, pPage)) { - CHECKPOINT; *pContext = NULL; return STATUS_NO_MORE_ENTRIES; } diff --git a/reactos/drivers/filesystems/fastfat/dirwr.c b/reactos/drivers/filesystems/fastfat/dirwr.c index baedfd5c7ce..df3fd658961 100644 --- a/reactos/drivers/filesystems/fastfat/dirwr.c +++ b/reactos/drivers/filesystems/fastfat/dirwr.c @@ -137,7 +137,6 @@ vfatFindDirSpace( if (*start + nbSlots > count) { LARGE_INTEGER AllocationSize; - CHECKPOINT; /* extend the directory */ if (vfatFCBIsRoot(pDirFcb) && DeviceExt->FatInfo.FatType != FAT32) { @@ -270,7 +269,6 @@ FATAddEntry( if (i == 100) /* FIXME : what to do after this ? */ { ExFreePoolWithTag(Buffer, TAG_VFAT); - CHECKPOINT; return STATUS_UNSUCCESSFUL; } IsNameLegal = RtlIsNameLegalDOS8Dot3(&DirContext.ShortNameU, &NameA, &SpacesFound); @@ -440,7 +438,6 @@ FATAddEntry( if (DirContext.StartIndex / i == DirContext.DirIndex / i) { /* one cluster */ - CHECKPOINT; CcPinRead(ParentFcb->FileObject, &FileOffset, nbSlots * sizeof(FAT_DIR_ENTRY), TRUE, &Context, (PVOID*)&pFatEntry); if (nbSlots > 1) @@ -452,7 +449,6 @@ FATAddEntry( else { /* two clusters */ - CHECKPOINT; size = DeviceExt->FatInfo.BytesPerCluster - (DirContext.StartIndex * sizeof(FAT_DIR_ENTRY)) % DeviceExt->FatInfo.BytesPerCluster; i = size / sizeof(FAT_DIR_ENTRY); @@ -533,7 +529,6 @@ FATXAddEntry( if (DirContext.LongNameU.Length / sizeof(WCHAR) > 42) { /* name too long */ - CHECKPOINT; return STATUS_NAME_TOO_LONG; } diff --git a/reactos/drivers/filesystems/fastfat/fat.c b/reactos/drivers/filesystems/fastfat/fat.c index 4f64508c4f8..c9fb49ea57d 100644 --- a/reactos/drivers/filesystems/fastfat/fat.c +++ b/reactos/drivers/filesystems/fastfat/fat.c @@ -653,7 +653,6 @@ GetNextClusterExtend(PDEVICE_EXTENSION DeviceExt, DeviceExt, CurrentCluster); ExAcquireResourceExclusiveLite(&DeviceExt->FatResource, TRUE); - CHECKPOINT; /* * If the file hasn't any clusters allocated then we need special * handling diff --git a/reactos/drivers/filesystems/fastfat/fcb.c b/reactos/drivers/filesystems/fastfat/fcb.c index f4323048f2b..d015966ee08 100644 --- a/reactos/drivers/filesystems/fastfat/fcb.c +++ b/reactos/drivers/filesystems/fastfat/fcb.c @@ -300,14 +300,12 @@ vfatGrabFCBFromTable(PDEVICE_EXTENSION pVCB, PUNICODE_STRING PathNameU) if (RtlEqualUnicodeString(&FileNameU, FcbNameU, TRUE)) { rcFCB->RefCount++; - CHECKPOINT; return rcFCB; } } } entry = entry->next; } - CHECKPOINT; return NULL; } @@ -536,7 +534,6 @@ vfatAttachFCBToFileObject ( newCCB = ExAllocateFromNPagedLookasideList(&VfatGlobalData->CcbLookasideList); if (newCCB == NULL) { - CHECKPOINT; return STATUS_INSUFFICIENT_RESOURCES; } RtlZeroMemory (newCCB, sizeof (VFATCCB)); diff --git a/reactos/drivers/filesystems/fastfat/fsctl.c b/reactos/drivers/filesystems/fastfat/fsctl.c index fed155a672b..0ecb51fcc54 100644 --- a/reactos/drivers/filesystems/fastfat/fsctl.c +++ b/reactos/drivers/filesystems/fastfat/fsctl.c @@ -241,7 +241,6 @@ VfatHasFileSystem(PDEVICE_OBJECT DeviceToMount, if (PartitionInfoIsValid && FatInfo.Sectors > PartitionInfo.PartitionLength.QuadPart / FatInfo.BytesPerSector) { - CHECKPOINT1; *RecognizedFS = FALSE; } diff --git a/reactos/drivers/filesystems/fastfat/rw.c b/reactos/drivers/filesystems/fastfat/rw.c index fb7083dd1c5..76518016118 100644 --- a/reactos/drivers/filesystems/fastfat/rw.c +++ b/reactos/drivers/filesystems/fastfat/rw.c @@ -194,7 +194,6 @@ VfatReadFileData (PVFAT_IRP_CONTEXT IrpContext, if (FirstCluster == 1) { // Directory of FAT12/16 needs a special handling - CHECKPOINT; if (ReadOffset.u.LowPart + Length > DeviceExt->FatInfo.rootDirectorySectors * BytesPerSector) { Length = DeviceExt->FatInfo.rootDirectorySectors * BytesPerSector - ReadOffset.u.LowPart; @@ -660,7 +659,6 @@ VfatRead(PVFAT_IRP_CONTEXT IrpContext) !(Fcb->Flags & (FCB_IS_PAGE_FILE|FCB_IS_VOLUME))) { // cached read - CHECKPOINT; Status = STATUS_SUCCESS; if (ByteOffset.u.LowPart + Length > Fcb->RFCB.FileSize.u.LowPart) { @@ -668,7 +666,6 @@ VfatRead(PVFAT_IRP_CONTEXT IrpContext) Status = /*STATUS_END_OF_FILE*/STATUS_SUCCESS; } - CHECKPOINT; if (IrpContext->FileObject->PrivateCacheMap == NULL) { CcInitializeCacheMap(IrpContext->FileObject, @@ -684,7 +681,6 @@ VfatRead(PVFAT_IRP_CONTEXT IrpContext) Status = IrpContext->Irp->IoStatus.Status;//STATUS_PENDING; goto ByeBye; } - CHECKPOINT; if (!NT_SUCCESS(IrpContext->Irp->IoStatus.Status)) { Status = IrpContext->Irp->IoStatus.Status; @@ -693,7 +689,6 @@ VfatRead(PVFAT_IRP_CONTEXT IrpContext) else { // non cached read - CHECKPOINT; if (ByteOffset.QuadPart + Length > ROUND_UP(Fcb->RFCB.FileSize.QuadPart, BytesPerSector)) { Length = (ULONG)(ROUND_UP(Fcb->RFCB.FileSize.QuadPart, BytesPerSector) - ByteOffset.QuadPart); @@ -951,7 +946,6 @@ NTSTATUS VfatWrite (PVFAT_IRP_CONTEXT IrpContext) IrpContext->DeviceExt, &AllocationSize); if (!NT_SUCCESS (Status)) { - CHECKPOINT; goto ByeBye; } } @@ -960,7 +954,6 @@ NTSTATUS VfatWrite (PVFAT_IRP_CONTEXT IrpContext) !(Fcb->Flags & (FCB_IS_PAGE_FILE|FCB_IS_VOLUME))) { // cached write - CHECKPOINT; if (IrpContext->FileObject->PrivateCacheMap == NULL) { @@ -984,12 +977,10 @@ NTSTATUS VfatWrite (PVFAT_IRP_CONTEXT IrpContext) { Status = STATUS_UNSUCCESSFUL; } - CHECKPOINT; } else { // non cached write - CHECKPOINT; if (ByteOffset.QuadPart > OldFileSize.QuadPart) { diff --git a/reactos/drivers/filesystems/fastfat/volume.c b/reactos/drivers/filesystems/fastfat/volume.c index 89f2f66b735..4bf4ffeea40 100644 --- a/reactos/drivers/filesystems/fastfat/volume.c +++ b/reactos/drivers/filesystems/fastfat/volume.c @@ -179,7 +179,6 @@ FsdSetFsLabelInformation(PDEVICE_OBJECT DeviceObject, if (sizeof(DeviceObject->Vpb->VolumeLabel) < FsLabelInfo->VolumeLabelLength) { - CHECKPOINT; return STATUS_NAME_TOO_LONG; } diff --git a/reactos/drivers/setup/blue/blue.c b/reactos/drivers/setup/blue/blue.c index a343e9c3b6e..7e4f6e8984e 100644 --- a/reactos/drivers/setup/blue/blue.c +++ b/reactos/drivers/setup/blue/blue.c @@ -627,7 +627,6 @@ ScrIoControl(PDEVICE_OBJECT DeviceObject, offset = (Buf->dwCoord.Y * DeviceExtension->Columns * 2) + (Buf->dwCoord.X * 2); - CHECKPOINT for (dwCount = 0; dwCount < Buf->nLength; dwCount++) { diff --git a/reactos/hal/halx86/mp/ioapic.c b/reactos/hal/halx86/mp/ioapic.c index a9366e64e71..6015f0dbf4c 100644 --- a/reactos/hal/halx86/mp/ioapic.c +++ b/reactos/hal/halx86/mp/ioapic.c @@ -648,15 +648,13 @@ HaliReconfigurePciInterrupts(VOID) i, IRQMap[i].IrqType, IRQMap[i].IrqFlag, IRQMap[i].SrcBusId, IRQMap[i].SrcBusIrq, IRQMap[i].DstApicId, IRQMap[i].DstApicInt); - if(1 != HalSetBusDataByOffset(PCIConfiguration, + HalSetBusDataByOffset(PCIConfiguration, IRQMap[i].SrcBusId, (IRQMap[i].SrcBusIrq >> 2) & 0x1f, &IRQMap[i].DstApicInt, 0x3c /*PCI_INTERRUPT_LINE*/, - 1)) - { - CHECKPOINT; - } + 1); + } } } diff --git a/reactos/lib/fslib/ext2lib/Mke2fs.c b/reactos/lib/fslib/ext2lib/Mke2fs.c index b7527913529..3038f8c002c 100644 --- a/reactos/lib/fslib/ext2lib/Mke2fs.c +++ b/reactos/lib/fslib/ext2lib/Mke2fs.c @@ -813,17 +813,14 @@ Ext2Format( EXT2_FILESYS FileSys; ULONG Percent; - CHECKPOINT; Callback(PROGRESS, 0, (PVOID)&Percent); - CHECKPOINT; RtlZeroMemory(&Ext2Sb, sizeof(EXT2_SUPER_BLOCK)); RtlZeroMemory(&FileSys, sizeof(EXT2_FILESYS)); FileSys.ext2_sb = &Ext2Sb; - CHECKPOINT; if (!NT_SUCCESS(Ext2OpenDevice(&FileSys, DriveRoot))) { @@ -831,7 +828,6 @@ Ext2Format( goto clean_up; } - CHECKPOINT; if (!NT_SUCCESS(Ext2GetMediaInfo(&FileSys))) { @@ -844,7 +840,6 @@ Ext2Format( Ext2Sb.s_blocks_count = FileSys.PartInfo.PartitionLength.QuadPart / EXT2_BLOCK_SIZE(&Ext2Sb); - CHECKPOINT; /* * Calculate number of inodes based on the inode ratio @@ -857,7 +852,6 @@ Ext2Format( */ Ext2Sb.s_r_blocks_count = (Ext2Sb.s_blocks_count * 5) / 100; - CHECKPOINT; Status = Ext2LockVolume(&FileSys); if (NT_SUCCESS(Status)) @@ -865,7 +859,6 @@ Ext2Format( bLocked = TRUE; } - CHECKPOINT; // Initialize if (!ext2_initialize_sb(&FileSys)) @@ -874,7 +867,6 @@ Ext2Format( goto clean_up; } - CHECKPOINT; zap_sector(&FileSys, 2, 6); @@ -999,13 +991,9 @@ clean_up: } } - CHECKPOINT; Ext2CloseDevice(&FileSys); - CHECKPOINT; - CHECKPOINT; Callback(DONE, 0, (PVOID)&bRet); - CHECKPOINT; return Status; } diff --git a/reactos/lib/rtl/dos8dot3.c b/reactos/lib/rtl/dos8dot3.c index 76307b1d762..a4999ff9d0d 100644 --- a/reactos/lib/rtl/dos8dot3.c +++ b/reactos/lib/rtl/dos8dot3.c @@ -162,7 +162,6 @@ RtlGenerate8dot3Name(IN PUNICODE_STRING Name, (Checksum == Context->Checksum) && (Context->LastIndexValue < 999)) { - CHECKPOINT; Context->LastIndexValue++; if (Context->CheckSumInserted == FALSE && Context->LastIndexValue > 9) @@ -174,7 +173,6 @@ RtlGenerate8dot3Name(IN PUNICODE_STRING Name, } else { - CHECKPOINT; Context->LastIndexValue = 1; Context->CheckSumInserted = FALSE; } diff --git a/reactos/ntoskrnl/ex/shutdown.c b/reactos/ntoskrnl/ex/shutdown.c index bb3a0e74fc8..79734055ccd 100644 --- a/reactos/ntoskrnl/ex/shutdown.c +++ b/reactos/ntoskrnl/ex/shutdown.c @@ -197,7 +197,7 @@ ShutdownThreadMain(PVOID Context) #endif /* CONFIG_SMP */ PopSetSystemPowerState(PowerSystemShutdown); - CHECKPOINT1; + DPRINT1("Shutting down\n"); KiHaltProcessorDpcRoutine(NULL, NULL, NULL, NULL); /* KiHaltProcessor does never return */ diff --git a/reactos/ntoskrnl/io/iomgr/bootlog.c b/reactos/ntoskrnl/io/iomgr/bootlog.c index d083bec2f00..485b8b280e7 100644 --- a/reactos/ntoskrnl/io/iomgr/bootlog.c +++ b/reactos/ntoskrnl/io/iomgr/bootlog.c @@ -337,7 +337,6 @@ IopSaveBootLogToFile(VOID) BufferSize); if (KeyInfo == NULL) { - CHECKPOINT1; ExReleaseResourceLite(&IopBootLogResource); return; } @@ -354,7 +353,6 @@ IopSaveBootLogToFile(VOID) &ObjectAttributes); if (!NT_SUCCESS(Status)) { - CHECKPOINT1; ExFreePool(KeyInfo); ExReleaseResourceLite(&IopBootLogResource); return; @@ -381,7 +379,6 @@ IopSaveBootLogToFile(VOID) if (!NT_SUCCESS(Status)) { - CHECKPOINT1; ZwClose(KeyHandle); ExFreePool(KeyInfo); ExReleaseResourceLite(&IopBootLogResource); @@ -391,7 +388,6 @@ IopSaveBootLogToFile(VOID) Status = IopWriteLogFile((PWSTR)&KeyInfo->Data); if (!NT_SUCCESS(Status)) { - CHECKPOINT1; ZwClose(KeyHandle); ExFreePool(KeyInfo); ExReleaseResourceLite(&IopBootLogResource); diff --git a/reactos/ntoskrnl/mm/balance.c b/reactos/ntoskrnl/mm/balance.c index 5c23dc588b0..b8ac23b45c0 100644 --- a/reactos/ntoskrnl/mm/balance.c +++ b/reactos/ntoskrnl/mm/balance.c @@ -316,7 +316,6 @@ MiBalancerThread(PVOID Unused) if (Status == STATUS_SUCCESS) { /* MiBalancerEvent */ - CHECKPOINT; while (MmStats.NrFreePages < MiMinimumAvailablePages + 5) { for (i = 0; i < MC_MAXIMUM; i++) @@ -333,7 +332,6 @@ MiBalancerThread(PVOID Unused) } } InterlockedExchange(&MiBalancerWork, 0); - CHECKPOINT; } else if (Status == STATUS_SUCCESS + 1) { @@ -387,7 +385,6 @@ MiInitBalancerThread(VOID) ; #endif - CHECKPOINT; KeInitializeEvent(&MiBalancerEvent, SynchronizationEvent, FALSE); KeInitializeTimerEx(&MiBalancerTimer, SynchronizationTimer); diff --git a/reactos/ntoskrnl/mm/marea.c b/reactos/ntoskrnl/mm/marea.c index 04e77c2f223..f779883e3ec 100644 --- a/reactos/ntoskrnl/mm/marea.c +++ b/reactos/ntoskrnl/mm/marea.c @@ -978,14 +978,12 @@ MmCreateMemoryArea(PMM_AVL_TABLE AddressSpace, if (!MmGetAddressSpaceOwner(AddressSpace) && *BaseAddress < MmSystemRangeStart) { - CHECKPOINT; return STATUS_ACCESS_VIOLATION; } if (MmGetAddressSpaceOwner(AddressSpace) && (ULONG_PTR)(*BaseAddress) + tmpLength > (ULONG_PTR)MmSystemRangeStart) { - CHECKPOINT; return STATUS_ACCESS_VIOLATION; } diff --git a/reactos/ntoskrnl/mm/section.c b/reactos/ntoskrnl/mm/section.c index 3e93f00bf4a..ad062e3bc14 100644 --- a/reactos/ntoskrnl/mm/section.c +++ b/reactos/ntoskrnl/mm/section.c @@ -2036,7 +2036,6 @@ MmProtectSectionView(PMM_AVL_TABLE AddressSpace, if ((MemoryArea->Flags & SEC_NO_CHANGE) && Region->Protect != Protect) { - CHECKPOINT1; return STATUS_INVALID_PAGE_PROTECTION; } @@ -3686,7 +3685,6 @@ NtMapViewOfSection(IN HANDLE SectionHandle, */ if (Protect & ~PAGE_FLAGS_VALID_FROM_USER_MODE) { - CHECKPOINT1; return STATUS_INVALID_PARAMETER_10; } @@ -3700,7 +3698,6 @@ NtMapViewOfSection(IN HANDLE SectionHandle, tmpProtect != PAGE_EXECUTE_READWRITE && tmpProtect != PAGE_EXECUTE_WRITECOPY) { - CHECKPOINT1; return STATUS_INVALID_PAGE_PROTECTION; } @@ -4508,7 +4505,6 @@ MmMapViewOfSection(IN PVOID SectionObject, Protect != PAGE_EXECUTE_READWRITE && Protect != PAGE_EXECUTE_WRITECOPY) { - CHECKPOINT1; return STATUS_INVALID_PAGE_PROTECTION; } @@ -4605,21 +4601,18 @@ MmMapViewOfSection(IN PVOID SectionObject, if ((Protect & (PAGE_READWRITE|PAGE_EXECUTE_READWRITE)) && !(Section->SectionPageProtection & (PAGE_READWRITE|PAGE_EXECUTE_READWRITE))) { - CHECKPOINT1; return STATUS_SECTION_PROTECTION; } /* check for read access */ if ((Protect & (PAGE_READONLY|PAGE_WRITECOPY|PAGE_EXECUTE_READ|PAGE_EXECUTE_WRITECOPY)) && !(Section->SectionPageProtection & (PAGE_READONLY|PAGE_READWRITE|PAGE_WRITECOPY|PAGE_EXECUTE_READ|PAGE_EXECUTE_READWRITE|PAGE_EXECUTE_WRITECOPY))) { - CHECKPOINT1; return STATUS_SECTION_PROTECTION; } /* check for execute access */ if ((Protect & (PAGE_EXECUTE|PAGE_EXECUTE_READ|PAGE_EXECUTE_READWRITE|PAGE_EXECUTE_WRITECOPY)) && !(Section->SectionPageProtection & (PAGE_EXECUTE|PAGE_EXECUTE_READ|PAGE_EXECUTE_READWRITE|PAGE_EXECUTE_WRITECOPY))) { - CHECKPOINT1; return STATUS_SECTION_PROTECTION; } @@ -4925,7 +4918,6 @@ MmCreateSection (OUT PVOID * Section, Protection != PAGE_EXECUTE_READWRITE && Protection != PAGE_EXECUTE_WRITECOPY) { - CHECKPOINT1; return STATUS_INVALID_PAGE_PROTECTION; } diff --git a/reactos/subsystems/win32/csrss/win32csr/conio.c b/reactos/subsystems/win32/csrss/win32csr/conio.c index 97abfc71d29..65c3ffd582c 100644 --- a/reactos/subsystems/win32/csrss/win32csr/conio.c +++ b/reactos/subsystems/win32/csrss/win32csr/conio.c @@ -574,7 +574,6 @@ CSR_API(CsrReadConsole) CurrentEntry = RemoveHeadList(&Console->InputEvents); if (IsListEmpty(&Console->InputEvents)) { - CHECKPOINT; ResetEvent(Console->ActiveEvent); } Input = CONTAINING_RECORD(CurrentEntry, ConsoleInput, ListEntry); diff --git a/reactos/subsystems/win32/csrss/win32csr/tuiconsole.c b/reactos/subsystems/win32/csrss/win32csr/tuiconsole.c index 972da8f223e..dd1a8bbd02f 100644 --- a/reactos/subsystems/win32/csrss/win32csr/tuiconsole.c +++ b/reactos/subsystems/win32/csrss/win32csr/tuiconsole.c @@ -23,10 +23,8 @@ TuiConsoleWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { if (msg == WM_ACTIVATE) { - CHECKPOINT1; if (LOWORD(wParam) != WA_INACTIVE) { - CHECKPOINT1; SetFocus(hWnd); ConioDrawConsole(ActiveConsole); } diff --git a/reactos/subsystems/win32/win32k/ntuser/focus.c b/reactos/subsystems/win32/win32k/ntuser/focus.c index 22dc53535d6..547dd2cca9f 100644 --- a/reactos/subsystems/win32/win32k/ntuser/focus.c +++ b/reactos/subsystems/win32/win32k/ntuser/focus.c @@ -136,7 +136,6 @@ co_IntSendActivateMessages(HWND hWndPrev, HWND hWnd, BOOL MouseActivate) /* FIXME: IntIsWindow */ - CHECKPOINT; co_IntPostOrSendMessage(hWnd, WM_NCACTIVATE, (WPARAM)(hWnd == UserGetForegroundWindow()), 0); /* FIXME: WA_CLICKACTIVE */ co_IntPostOrSendMessage(hWnd, WM_ACTIVATE, @@ -251,7 +250,6 @@ co_IntSetForegroundAndFocusWindow(PWINDOW_OBJECT Window, PWINDOW_OBJECT FocusWin /* FIXME: Send WM_ACTIVATEAPP to all thread windows. */ } - CHECKPOINT; co_IntSendSetFocusMessages(hWndFocusPrev, hWndFocus); co_IntSendActivateMessages(hWndPrev, hWnd, MouseActivate); From fac43bb581c1ae7cbfa6423dd9747a7ca7381880 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Mon, 25 Aug 2008 19:01:09 +0000 Subject: [PATCH 170/324] Merge merge 34713 from ros-amd64-bringup branch: fix NtCurrentTeb() svn path=/trunk/; revision=35639 --- reactos/include/psdk/winnt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/include/psdk/winnt.h b/reactos/include/psdk/winnt.h index 33ed3230971..34aa244b5ba 100644 --- a/reactos/include/psdk/winnt.h +++ b/reactos/include/psdk/winnt.h @@ -4145,7 +4145,7 @@ static __inline__ struct _TEB * NtCurrentTeb(void) #elif defined (_M_AMD64) FORCEINLINE struct _TEB * NtCurrentTeb(VOID) { - return __readgsqword(FIELD_OFFSET(NT_TIB, Self)); + return (struct _TEB *)__readgsqword(FIELD_OFFSET(NT_TIB, Self)); } #else static __inline__ struct _TEB * NtCurrentTeb(void) From d0e1f5701b38ffa87c193ded5df305a82b2b1c78 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Mon, 25 Aug 2008 20:16:42 +0000 Subject: [PATCH 171/324] - Fix multiple bugs in HCR_GetDefaultVerbW svn path=/trunk/; revision=35641 --- reactos/dll/win32/shell32/classes.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/reactos/dll/win32/shell32/classes.c b/reactos/dll/win32/shell32/classes.c index 20e17594f90..e311c38205b 100644 --- a/reactos/dll/win32/shell32/classes.c +++ b/reactos/dll/win32/shell32/classes.c @@ -133,7 +133,7 @@ BOOL HCR_GetDefaultVerbW( HKEY hkeyClass, LPCWSTR szVerb, LPWSTR szDest, DWORD l LONG size; HKEY hkey; - TRACE("%p %s %p\n", hkeyClass, debugstr_w(szVerb), szDest); + TRACE("%p %s %p\n", hkeyClass, debugstr_w(szVerb), szDest); if (szVerb) { @@ -143,13 +143,13 @@ BOOL HCR_GetDefaultVerbW( HKEY hkeyClass, LPCWSTR szVerb, LPWSTR szDest, DWORD l size=len; *szDest='\0'; - if (!RegQueryValueW(hkeyClass, swShell, szDest, &size) && *szDest) + if (!RegQueryValueW(hkeyClass, L"shell", szDest, &size) && *szDest) { /* The MSDN says to first try the default verb */ lstrcpyW(sTemp, swShell); lstrcatW(sTemp, szDest); lstrcatW(sTemp, swCommand); - if (!RegOpenKeyExW(hkeyClass, sTemp, 0, 0, &hkey)) + if (!RegOpenKeyExW(hkeyClass, sTemp, 0, KEY_READ, &hkey)) { RegCloseKey(hkey); TRACE("default verb=%s\n", debugstr_w(szDest)); @@ -161,7 +161,7 @@ BOOL HCR_GetDefaultVerbW( HKEY hkeyClass, LPCWSTR szVerb, LPWSTR szDest, DWORD l lstrcpyW(sTemp, swShell); lstrcatW(sTemp, swOpen); lstrcatW(sTemp, swCommand); - if (!RegOpenKeyExW(hkeyClass, sTemp, 0, 0, &hkey)) + if (!RegOpenKeyExW(hkeyClass, sTemp, 0, KEY_READ, &hkey)) { RegCloseKey(hkey); lstrcpynW(szDest, swOpen, len); @@ -170,14 +170,20 @@ BOOL HCR_GetDefaultVerbW( HKEY hkeyClass, LPCWSTR szVerb, LPWSTR szDest, DWORD l } /* and then just use the first verb on Windows >= 2000 */ - if (!RegEnumKeyW(hkeyClass, 0, szDest, len) && *szDest) + if (!RegOpenKeyExW(hkeyClass, L"shell", 0, KEY_READ, &hkey)) { - TRACE("default verb=first verb=%s\n", debugstr_w(szDest)); - return TRUE; + if (!RegEnumKeyW(hkey, 0, szDest, len) && *szDest) + { + TRACE("default verb=first verb=%s\n", debugstr_w(szDest)); + RegCloseKey(hkey); + return TRUE; + } + RegCloseKey(hkey); } + TRACE("no default verb!\n"); - return FALSE; + return FALSE; } BOOL HCR_GetExecuteCommandW( HKEY hkeyClass, LPCWSTR szClass, LPCWSTR szVerb, LPWSTR szDest, DWORD len ) From 909de8f972f27eebacd1b071ceb09bc7367282b9 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Mon, 25 Aug 2008 21:02:21 +0000 Subject: [PATCH 172/324] - Prevent a crash by checking the applet name if it is empty and does exist - %1 is used for file argument, where %2, %3, %n indicate the index of the passed param, %* is the rest of the command - Directly pass the full filename to ShellExecuteExW from the default context menu - Should fix executing cpl in default shellview svn path=/trunk/; revision=35643 --- reactos/dll/win32/shell32/control.c | 12 ++++++++++-- reactos/dll/win32/shell32/shlexec.c | 6 +++++- reactos/dll/win32/shell32/shv_def_cmenu.c | 17 ++++++++++++++--- 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/reactos/dll/win32/shell32/control.c b/reactos/dll/win32/shell32/control.c index 1494df9c49a..baa6d915525 100644 --- a/reactos/dll/win32/shell32/control.c +++ b/reactos/dll/win32/shell32/control.c @@ -427,12 +427,20 @@ static void Control_DoLaunch(CPanel* panel, HWND hWnd, LPCWSTR wszCmd) sp = 0; } - if ((extraPmts)&&(!spSet)) + if ((extraPmts) && extraPmts[0] &&(!spSet)) { while ((lstrcmpiW(extraPmts, applet->info[sp].szName)) && (sp < applet->count)) sp++; - } + if (sp >= applet->count) + { + ReleaseMutex(hMutex); + CloseHandle(hMutex); + Control_UnloadApplet(applet); + HeapFree(GetProcessHeap(), 0, buffer); + return; + } + } if (applet->info[sp].dwSize) { if (!applet->proc(applet->hWnd, CPL_STARTWPARMSA, sp, (LPARAM)extraPmts)) applet->proc(applet->hWnd, CPL_DBLCLK, sp, applet->info[sp].lData); diff --git a/reactos/dll/win32/shell32/shlexec.c b/reactos/dll/win32/shell32/shlexec.c index 72735d72d51..6af52b8cece 100644 --- a/reactos/dll/win32/shell32/shlexec.c +++ b/reactos/dll/win32/shell32/shlexec.c @@ -129,6 +129,7 @@ static BOOL SHELL_ArgifyW(WCHAR* out, int len, const WCHAR* fmt, const WCHAR* lp used++; if (used < len) *res++ = '"'; + break; } else { @@ -146,7 +147,10 @@ static BOOL SHELL_ArgifyW(WCHAR* out, int len, const WCHAR* fmt, const WCHAR* lp } break; } - /* else fall through */ + else + { + break; + } case '1': if (!done || (*fmt == '1')) { diff --git a/reactos/dll/win32/shell32/shv_def_cmenu.c b/reactos/dll/win32/shell32/shv_def_cmenu.c index 3e8c511f8bf..a75d65caa41 100644 --- a/reactos/dll/win32/shell32/shv_def_cmenu.c +++ b/reactos/dll/win32/shell32/shv_def_cmenu.c @@ -1508,6 +1508,8 @@ DoStaticShellExtensions( IDefaultContextMenuImpl *This, LPCMINVOKECOMMANDINFO lpcmi) { + STRRET strFile; + WCHAR szPath[MAX_PATH]; SHELLEXECUTEINFOW sei; PStaticShellEntry pCurrent = This->shead; int verb = LOWORD(lpcmi->lpVerb) - This->iIdSCMFirst; @@ -1520,16 +1522,25 @@ DoStaticShellExtensions( return E_FAIL; + if (IShellFolder2_GetDisplayNameOf(This->dcm.psf, This->dcm.apidl[0], SHGDN_FORPARSING, &strFile) != S_OK) + { + ERR("IShellFolder_GetDisplayNameOf failed for apidl\n"); + return E_FAIL; + } + + if (StrRetToBufW(&strFile, This->dcm.apidl[0], szPath, MAX_PATH) != S_OK) + return E_FAIL; + + ZeroMemory(&sei, sizeof(sei)); sei.cbSize = sizeof(sei); - sei.fMask = SEE_MASK_CLASSNAME | SEE_MASK_IDLIST; + sei.fMask = SEE_MASK_CLASSNAME; sei.lpClass = pCurrent->szClass; sei.hwnd = lpcmi->hwnd; sei.nShow = SW_SHOWNORMAL; sei.lpVerb = pCurrent->szVerb; - sei.lpIDList = ILCombine(This->dcm.pidlFolder, This->dcm.apidl[0]); + sei.lpFile = szPath; ShellExecuteExW(&sei); - SHFree(sei.lpIDList); return S_OK; } From c9b3cf161bf12b09c0d415e3ac125a240ccd9d2e Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Mon, 25 Aug 2008 21:57:13 +0000 Subject: [PATCH 173/324] Merge 34739 - 34769, 34796 - 34905, 34916 - 34967, 34970 - 35135, 35167, 35325, 35326, 35443 - 35506, 35510 - 35546, 35587, 35616, 35644 from ros-amd64-bringup branch: - Update AMD64 intrinsic Interlocked functions - Add _InterlockedExchange64 to intin_x86.h -Fix definitions of IsBadHugeReadPtr, IsBadHugeWritePtr, IsBadReadPtr, IsBadStringPtrA, IsBadStringPtrW, IsBadWritePtr and SetProcessWorkingSetSize - Define CONTEXT and XMM_SAVE_AREA32, taken from WINE - Include _M_AMD64 for defintitions in ioaccess.h - Add Interlocked intrinisc definitions for AMD64 platform - Add KI_USER_SHARED_DATA and KeGetCurrentIrql() prototype to winddh - Fix prototypes for KfAcquireSpinLock, KfReleaseSpinLock, KeAcquireInStackQueuedSpinLock and KeReleaseInStackQueuedSpinLock on amd64 - Fix rotl declaration, add mysteriously missing rotr. winnt.h: - Fix CONTEXT_AMD64 and friends, add various constants. - Define RUNTIME_FUNCTION, RtlCaptureContext, RtlRestoreContext, RtlAddFunctionTable, RtlInstallFunctionTableCallback, RtlDeleteFunctionTable. - Fix definitions for EXCEPTION_RECORD and friends to support amd64. - Define IMAGE_THUNK_DATA64 and related constants. - Define IMAGE_TLS_DIRECTORY64 and related constants. - Remove WINEisms - Remove multiple declarations and minor fixes. - Fix KESEG0_BASE for amd64 - Fix definition for NdisCopyLookaheadData on amd64 - Only add function prototypes if NO_INTERLOCKED_INTRINSICS is defined - Move the inlined InterlockedAnd/Or from rtl to winbase.h and rename it to InterlockedAnd/Or_Inline - Fix TreeView_EnsureVisible macro. - Add missing 64 bit intrinsic Interlocked functions - Fix _InterlockedDecrement64 - Fix InterlockedExchangeAddSizeT - Fix __writecrx instrinsics - Fix ExQueryPoolBlockSize prototype - Make KI_USER_SHARED_DATA and IMAGE_ORDINAL_FLAG64 a ULONGLONG - Fix definition if IMAGE_OPTIONAL_HEADER64 - Add KPCR structure - Add __readcrx intrinsics - Ad some definitions to winddk.h - Add a field for a DbgPrint function pointer to the ROS_LOADER_PARAMETER_BLOCK for early debug prints in ntoskrnl - Update KPCR and KIPCR - Add KeGetPcr() and update KeGetCurrentProcessorNumber - Fix SECURITY_DESCRIPTOR_RELATIVE and KDPC_DATA - Implement byteswap intrinsics - Add macro definitions for KeQuerySystemTime, KeQueryTickCount and KeQueryInterruptTime to ddk - Add NtCurrentTeb inline function - Update amd64 prototypes for KeGetCurrentIrql, KfRaiseIrql, KfLowerIrql, KeRaiseIrqlToDpcLevel, KeRaiseIrqlToSynchLevel, KeLowerIrql, KeRaiseIrql - Implement __readcr8, __writecr8, __lidt and __sidt intrinsics. - Implement KeGetCurrentIrql as intrinsic. - Make KeGetCurrentIrql, KeLowerIrql, KfRaiseIrql, KeRaiseIrql, KeRaiseIrqlToDpcLevel and KeRaiseIrqlToSynchLevel intrinsics as in the WDK 2008. - Fix _interlockedbittest intrinsics - Fix __readmsr and __writemsr on amd64 - Fix __readgsqword, it was using a long internally. Add volatile keyword to segment addressing intrinsics. Add "memory" to clobber list on all those that do write. - Merge __readcr and __writecr x86 / x64 definitions, because they are the same. Implement __readdr and __writedr for x64. - __readcr3() returns an unsigned __int64, fix x86 MmGetPageDirectory accordingly. svn path=/trunk/; revision=35646 --- reactos/include/ddk/ioaccess.h | 2 +- reactos/include/ddk/ndis.h | 2 +- reactos/include/ddk/ntifs.h | 2 +- reactos/include/ddk/winddk.h | 295 ++++++++++++++++--- reactos/include/ndk/psfuncs.h | 5 + reactos/include/psdk/commctrl.h | 2 +- reactos/include/psdk/intrin_x86.h | 286 +++++++++++++++---- reactos/include/psdk/winbase.h | 104 ++++++- reactos/include/psdk/windef.h | 25 +- reactos/include/psdk/winnt.h | 424 +++++++++++++++++++++++++--- reactos/include/reactos/rosldr.h | 1 + reactos/include/reactos/wine/port.h | 56 +--- reactos/lib/rtl/srw.c | 43 --- reactos/ntoskrnl/mm/i386/page.c | 2 +- 14 files changed, 998 insertions(+), 251 deletions(-) diff --git a/reactos/include/ddk/ioaccess.h b/reactos/include/ddk/ioaccess.h index 677b9f4086c..51537bea7be 100755 --- a/reactos/include/ddk/ioaccess.h +++ b/reactos/include/ddk/ioaccess.h @@ -31,7 +31,7 @@ extern "C" { #ifndef NO_PORT_MACROS -#if defined(_X86_) +#if defined(_X86_) || defined(_M_AMD64) #define READ_REGISTER_UCHAR(r) (*(volatile UCHAR *)(r)) #define READ_REGISTER_USHORT(r) (*(volatile USHORT *)(r)) #define READ_REGISTER_ULONG(r) (*(volatile ULONG *)(r)) diff --git a/reactos/include/ddk/ndis.h b/reactos/include/ddk/ndis.h index 6e140ad425c..41239f502f9 100644 --- a/reactos/include/ddk/ndis.h +++ b/reactos/include/ddk/ndis.h @@ -1589,7 +1589,7 @@ NdisCopyFromPacketToPacket( * IN ULONG ReceiveFlags); */ -#ifdef _M_IX86 +#if defined(_M_IX86) || defined(_M_AMD64) #define NdisCopyLookaheadData(Destination, Source, Length, MacOptions) \ RtlCopyMemory(Destination, Source, Length) #else diff --git a/reactos/include/ddk/ntifs.h b/reactos/include/ddk/ntifs.h index ef8b4e521f9..5fa32bbb1b0 100644 --- a/reactos/include/ddk/ntifs.h +++ b/reactos/include/ddk/ntifs.h @@ -2499,7 +2499,7 @@ ExDisableResourceBoostLite ( ); NTKERNELAPI -ULONG +SIZE_T NTAPI ExQueryPoolBlockSize ( IN PVOID PoolBlock, diff --git a/reactos/include/ddk/winddk.h b/reactos/include/ddk/winddk.h index 4d827e7e10c..d0ed4a6617e 100644 --- a/reactos/include/ddk/winddk.h +++ b/reactos/include/ddk/winddk.h @@ -770,27 +770,6 @@ typedef IO_ALLOCATION_ACTION IN PVOID Context); -typedef struct _EXCEPTION_RECORD32 -{ - NTSTATUS ExceptionCode; - ULONG ExceptionFlags; - ULONG ExceptionRecord; - ULONG ExceptionAddress; - ULONG NumberParameters; - ULONG ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]; -} EXCEPTION_RECORD32, *PEXCEPTION_RECORD32; - -typedef struct _EXCEPTION_RECORD64 -{ - NTSTATUS ExceptionCode; - ULONG ExceptionFlags; - ULONG64 ExceptionRecord; - ULONG64 ExceptionAddress; - ULONG NumberParameters; - ULONG __unusedAlignment; - ULONG64 ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]; -} EXCEPTION_RECORD64, *PEXCEPTION_RECORD64; - typedef EXCEPTION_DISPOSITION (DDKAPI *PEXCEPTION_ROUTINE)( IN struct _EXCEPTION_RECORD *ExceptionRecord, @@ -5510,10 +5489,117 @@ KeGetCurrentThread( #elif defined(__x86_64__) +#define PASSIVE_LEVEL 0 +#define LOW_LEVEL 0 +#define APC_LEVEL 1 +#define DISPATCH_LEVEL 2 +#define CLOCK_LEVEL 13 +#define IPI_LEVEL 14 +#define POWER_LEVEL 14 +#define PROFILE_LEVEL 15 +#define HIGH_LEVEL 15 + +#define PAGE_SIZE 0x1000 +#define PAGE_SHIFT 12L +#define PTI_SHIFT 12L +#define PDI_SHIFT 21L +#define PPI_SHIFT 30L +#define PXI_SHIFT 39L +#define PTE_PER_PAGE 512 +#define PDE_PER_PAGE 512 +#define PPE_PER_PAGE 512 +#define PXE_PER_PAGE 512 +#define PTI_MASK_AMD64 (PTE_PER_PAGE - 1) +#define PDI_MASK_AMD64 (PDE_PER_PAGE - 1) +#define PPI_MASK (PPE_PER_PAGE - 1) +#define PXI_MASK (PXE_PER_PAGE - 1) + +#define PXE_BASE 0xFFFFF6FB7DBED000ULL +#define PXE_SELFMAP 0xFFFFF6FB7DBEDF68ULL +#define PPE_BASE 0xFFFFF6FB7DA00000ULL +#define PDE_BASE 0xFFFFF6FB40000000ULL +#define PTE_BASE 0xFFFFF68000000000ULL +#define PXE_TOP 0xFFFFF6FB7DBEDFFFULL +#define PPE_TOP 0xFFFFF6FB7DBFFFFFULL +#define PDE_TOP 0xFFFFF6FB7FFFFFFFULL +#define PTE_TOP 0xFFFFF6FFFFFFFFFFULL + +#define MM_LOWEST_USER_ADDRESS (PVOID)0x10000 +#define MM_LOWEST_SYSTEM_ADDRESS (PVOID)0xFFFF080000000000ULL +#define KI_USER_SHARED_DATA 0xFFFFF78000000000ULL + +#define SharedUserData ((PKUSER_SHARED_DATA const)KI_USER_SHARED_DATA) +#define SharedInterruptTime (&SharedUserData->InterruptTime) +#define SharedSystemTime (&SharedUserData->SystemTime) +#define SharedTickCount (&SharedUserData->TickCount) + +#define KeQueryInterruptTime() \ + (*(volatile ULONG64*)SharedInterruptTime) +#define KeQuerySystemTime(CurrentCount) \ + *(ULONG64*)(CurrentCount) = *(volatile ULONG64*)SharedSystemTime +#define KeQueryTickCount(CurrentCount) \ + *(ULONG64*)(CurrentCount) = *(volatile ULONG64*)SharedTickCount + +typedef struct _KPCR +{ + union + { + NT_TIB NtTib; + struct + { + union _KGDTENTRY64 *GdtBase; + struct _KTSS64 *TssBase; + ULONG64 UserRsp; + struct _KPCR *Self; + struct _KPRCB *CurrentPrcb; + PKSPIN_LOCK_QUEUE LockArray; + PVOID Used_Self; + }; + }; + union _KIDTENTRY64 *IdtBase; + ULONG64 Unused[2]; + KIRQL Irql; + UCHAR SecondLevelCacheAssociativity; + UCHAR ObsoleteNumber; + UCHAR Fill0; + ULONG Unused0[3]; + USHORT MajorVersion; + USHORT MinorVersion; + ULONG StallScaleFactor; + PVOID Unused1[3]; + ULONG KernelReserved[15]; + ULONG SecondLevelCacheSize; + ULONG HalReserved[16]; + ULONG Unused2; + PVOID KdVersionBlock; + PVOID Unused3; + ULONG PcrAlign1[24]; +} KPCR, *PKPCR; + typedef struct _KFLOATING_SAVE { ULONG Dummy; } KFLOATING_SAVE, *PKFLOATING_SAVE; +NTKERNELAPI +PRKTHREAD +NTAPI +KeGetCurrentThread( + VOID); + +FORCEINLINE +PKPCR +KeGetPcr(VOID) +{ + return (PKPCR)__readgsqword(FIELD_OFFSET(KPCR, Self)); +} + +FORCEINLINE +ULONG +KeGetCurrentProcessorNumber(VOID) +{ + return (ULONG)__readgsword(0x184); +} + #elif defined(__PowerPC__) typedef ULONG PFN_NUMBER, *PPFN_NUMBER; @@ -5704,6 +5790,8 @@ typedef struct _PCIBUSDATA #if !defined(__INTERLOCKED_DECLARED) #define __INTERLOCKED_DECLARED +#if defined (_X86_) +#if defined(NO_INTERLOCKED_INTRINSICS) NTKERNELAPI LONG FASTCALL @@ -5738,18 +5826,30 @@ InterlockedExchangeAdd( IN OUT LONG volatile *Addend, IN LONG Value); +#else // !defined(NO_INTERLOCKED_INTRINSICS) + +#define InterlockedExchange _InterlockedExchange +#define InterlockedIncrement _InterlockedIncrement +#define InterlockedDecrement _InterlockedDecrement +#define InterlockedExchangeAdd _InterlockedExchangeAdd +#define InterlockedCompareExchange _InterlockedCompareExchange +#define InterlockedOr _InterlockedOr +#define InterlockedAnd _InterlockedAnd +#define InterlockedXor _InterlockedXor + +#endif // !defined(NO_INTERLOCKED_INTRINSICS) + +#endif // defined (_X86_) + +#if !defined (_WIN64) /* * PVOID * InterlockedExchangePointer( * IN OUT PVOID VOLATILE *Target, * IN PVOID Value) */ -#if defined (_M_AMD64) -#define InterlockedExchangePointer _InterlockedExchangePointer -#else #define InterlockedExchangePointer(Target, Value) \ ((PVOID) InterlockedExchange((PLONG) Target, (LONG) Value)) -#endif /* * PVOID @@ -5758,17 +5858,54 @@ InterlockedExchangeAdd( * IN PVOID Exchange, * IN PVOID Comparand) */ -#if defined (_M_AMD64) -#define InterlockedCompareExchangePointer _InterlockedCompareExchangePointer -#else #define InterlockedCompareExchangePointer(Destination, Exchange, Comparand) \ ((PVOID) InterlockedCompareExchange((PLONG) Destination, (LONG) Exchange, (LONG) Comparand)) -#endif #define InterlockedExchangeAddSizeT(a, b) InterlockedExchangeAdd((LONG *)a, b) #define InterlockedIncrementSizeT(a) InterlockedIncrement((LONG *)a) #define InterlockedDecrementSizeT(a) InterlockedDecrement((LONG *)a) +#endif // !defined (_WIN64) + +#if defined (_M_AMD64) + +#define InterlockedExchangeAddSizeT(a, b) InterlockedExchangeAdd64((LONGLONG *)a, (LONGLONG)b) +#define InterlockedIncrementSizeT(a) InterlockedIncrement64((LONGLONG *)a) +#define InterlockedDecrementSizeT(a) InterlockedDecrement64((LONGLONG *)a) +#define InterlockedAnd _InterlockedAnd +#define InterlockedOr _InterlockedOr +#define InterlockedXor _InterlockedXor +#define InterlockedIncrement _InterlockedIncrement +#define InterlockedDecrement _InterlockedDecrement +#define InterlockedAdd _InterlockedAdd +#define InterlockedExchange _InterlockedExchange +#define InterlockedExchangeAdd _InterlockedExchangeAdd +#define InterlockedCompareExchange _InterlockedCompareExchange +#define InterlockedAnd64 _InterlockedAnd64 +#define InterlockedOr64 _InterlockedOr64 +#define InterlockedXor64 _InterlockedXor64 +#define InterlockedIncrement64 _InterlockedIncrement64 +#define InterlockedDecrement64 _InterlockedDecrement64 +#define InterlockedAdd64 _InterlockedAdd64 +#define InterlockedExchange64 _InterlockedExchange64 +#define InterlockedExchangeAdd64 _InterlockedExchangeAdd64 +#define InterlockedCompareExchange64 _InterlockedCompareExchange64 +#define InterlockedCompareExchangePointer _InterlockedCompareExchangePointer +#define InterlockedExchangePointer _InterlockedExchangePointer + +#define ExInterlockedPopEntrySList(Head, Lock) ExpInterlockedPopEntrySList(Head) +#define ExInterlockedPushEntrySList(Head, Entry, Lock) ExpInterlockedPushEntrySList(Head, Entry) +#define ExInterlockedFlushSList(Head) ExpInterlockedFlushSList(Head) + +#if !defined(_WINBASE_) +#define InterlockedPopEntrySList(Head) ExpInterlockedPopEntrySList(Head) +#define InterlockedPushEntrySList(Head, Entry) ExpInterlockedPushEntrySList(Head, Entry) +#define InterlockedFlushSList(Head) ExpInterlockedFlushSList(Head) +#define QueryDepthSList(Head) ExQueryDepthSList(Head) +#endif // !defined(_WINBASE_ + +#endif // _M_AMD64 + #endif /* !__INTERLOCKED_DECLARED */ NTKERNELAPI @@ -5783,6 +5920,20 @@ FASTCALL KefReleaseSpinLockFromDpcLevel( IN PKSPIN_LOCK SpinLock); +#if defined(_M_AMD64) +NTKERNELAPI +KIRQL +FASTCALL +KfAcquireSpinLock( + IN PKSPIN_LOCK SpinLock); + +NTKERNELAPI +VOID +FASTCALL +KfReleaseSpinLock( + IN PKSPIN_LOCK SpinLock, + IN KIRQL NewIrql); +#else NTHALAPI KIRQL FASTCALL @@ -5795,6 +5946,7 @@ FASTCALL KfReleaseSpinLock( IN PKSPIN_LOCK SpinLock, IN KIRQL NewIrql); +#endif NTKERNELAPI BOOLEAN @@ -9288,6 +9440,20 @@ IoWritePartitionTableEx( /** Kernel routines **/ +#if defined (_M_AMD64) +NTKERNELAPI +VOID +FASTCALL +KeAcquireInStackQueuedSpinLock( + IN PKSPIN_LOCK SpinLock, + IN PKLOCK_QUEUE_HANDLE LockHandle); + +NTKERNELAPI +VOID +FASTCALL +KeReleaseInStackQueuedSpinLock( + IN PKLOCK_QUEUE_HANDLE LockHandle); +#else NTHALAPI VOID FASTCALL @@ -9295,6 +9461,13 @@ KeAcquireInStackQueuedSpinLock( IN PKSPIN_LOCK SpinLock, IN PKLOCK_QUEUE_HANDLE LockHandle); +NTHALAPI +VOID +FASTCALL +KeReleaseInStackQueuedSpinLock( + IN PKLOCK_QUEUE_HANDLE LockHandle); +#endif + NTKERNELAPI VOID FASTCALL @@ -9481,12 +9654,6 @@ KePulseEvent( IN KPRIORITY Increment, IN BOOLEAN Wait); -NTKERNELAPI -ULONGLONG -NTAPI -KeQueryInterruptTime( - VOID); - NTHALAPI LARGE_INTEGER NTAPI @@ -9499,6 +9666,13 @@ NTAPI KeQueryPriorityThread( IN PRKTHREAD Thread); +#if !defined(_M_AMD64) +NTKERNELAPI +ULONGLONG +NTAPI +KeQueryInterruptTime( + VOID); + NTKERNELAPI VOID NTAPI @@ -9510,6 +9684,7 @@ VOID NTAPI KeQueryTickCount( OUT PLARGE_INTEGER TickCount); +#endif NTKERNELAPI ULONG @@ -9552,12 +9727,6 @@ KeRegisterBugCheckCallback( IN ULONG Length, IN PUCHAR Component); -NTHALAPI -VOID -FASTCALL -KeReleaseInStackQueuedSpinLock( - IN PKLOCK_QUEUE_HANDLE LockHandle); - NTKERNELAPI VOID FASTCALL @@ -9791,6 +9960,50 @@ KeRaiseIrqlToSynchLevel( #define KeLowerIrql(a) KfLowerIrql(a) #define KeRaiseIrql(a,b) *(b) = KfRaiseIrql(a) +#elif defined(_M_AMD64) + +FORCEINLINE +KIRQL +KeGetCurrentIrql(VOID) +{ + return (KIRQL)__readcr8(); +} + +FORCEINLINE +VOID +KeLowerIrql(IN KIRQL NewIrql) +{ + ASSERT(KeGetCurrentIrql() >= NewIrql); + __writecr8(NewIrql); +} + +FORCEINLINE +KIRQL +KfRaiseIrql(IN KIRQL NewIrql) +{ + KIRQL OldIrql; + + OldIrql = __readcr8(); + ASSERT(OldIrql <= NewIrql); + __writecr8(NewIrql); + return OldIrql; +} +#define KeRaiseIrql(a,b) *(b) = KfRaiseIrql(a) + +FORCEINLINE +KIRQL +KeRaiseIrqlToDpcLevel(VOID) +{ + return KfRaiseIrql(DISPATCH_LEVEL); +} + +FORCEINLINE +KIRQL +KeRaiseIrqlToSynchLevel(VOID) +{ + return KfRaiseIrql(12); // SYNCH_LEVEL = IPI_LEVEL - 2 +} + #elif defined(__PowerPC__) NTHALAPI diff --git a/reactos/include/ndk/psfuncs.h b/reactos/include/ndk/psfuncs.h index fecdd6de8f6..67b48a1782b 100644 --- a/reactos/include/ndk/psfuncs.h +++ b/reactos/include/ndk/psfuncs.h @@ -315,6 +315,11 @@ NtCurrentTeb(VOID) return ret; #endif } +#elif defined (_M_AMD64) +FORCEINLINE struct _TEB * NtCurrentTeb(VOID) +{ + return (struct _TEB *)__readgsqword(FIELD_OFFSET(NT_TIB, Self)); +} #endif #else struct _TEB * NtCurrentTeb(void); diff --git a/reactos/include/psdk/commctrl.h b/reactos/include/psdk/commctrl.h index 32018f223db..10426fa791f 100644 --- a/reactos/include/psdk/commctrl.h +++ b/reactos/include/psdk/commctrl.h @@ -2812,7 +2812,7 @@ typedef struct tagTVKEYDOWN (LPARAM)(HTREEITEM)(hitem)) #define TreeView_EnsureVisible(hwnd, hitem) \ - (BOOL)SNDMSGA((hwnd), TVM_ENSUREVISIBLE, 0, (LPARAM)(UINT)(hitem)) + (BOOL)SNDMSGA((hwnd), TVM_ENSUREVISIBLE, 0, (LPARAM)(HTREEITEM)(hitem)) #define TreeView_SortChildrenCB(hwnd, psort, recurse) \ (BOOL)SNDMSGA((hwnd), TVM_SORTCHILDRENCB, (WPARAM)recurse, \ diff --git a/reactos/include/psdk/intrin_x86.h b/reactos/include/psdk/intrin_x86.h index e1d41c83fa6..b528735cb75 100644 --- a/reactos/include/psdk/intrin_x86.h +++ b/reactos/include/psdk/intrin_x86.h @@ -121,6 +121,15 @@ static __inline__ __attribute__((always_inline)) long _InterlockedExchange(volat return __sync_lock_test_and_set(Target, Value); } +#if defined(_M_AMD64) +static __inline__ __attribute__((always_inline)) long long _InterlockedExchange64(volatile long long * const Target, const long long Value) +{ + /* NOTE: __sync_lock_test_and_set would be an acquire barrier, so we force a full barrier */ + __sync_synchronize(); + return __sync_lock_test_and_set(Target, Value); +} +#endif + static __inline__ __attribute__((always_inline)) void * _InterlockedExchangePointer(void * volatile * const Target, void * const Value) { /* NOTE: ditto */ @@ -138,6 +147,13 @@ static __inline__ __attribute__((always_inline)) long _InterlockedExchangeAdd(vo return __sync_fetch_and_add(Addend, Value); } +#if defined(_M_AMD64) +static __inline__ __attribute__((always_inline)) long long _InterlockedExchangeAdd64(volatile long long * const Addend, const long long Value) +{ + return __sync_fetch_and_add(Addend, Value); +} +#endif + static __inline__ __attribute__((always_inline)) char _InterlockedAnd8(volatile char * const value, const char mask) { return __sync_fetch_and_and(value, mask); @@ -462,10 +478,22 @@ static __inline__ __attribute__((always_inline)) long _InterlockedIncrement16(vo return _InterlockedExchangeAdd16(lpAddend, 1) + 1; } +#if defined(_M_AMD64) +static __inline__ __attribute__((always_inline)) long long _InterlockedDecrement64(volatile long long * const lpAddend) +{ + return _InterlockedExchangeAdd64(lpAddend, -1) - 1; +} + +static __inline__ __attribute__((always_inline)) long long _InterlockedIncrement64(volatile long long * const lpAddend) +{ + return _InterlockedExchangeAdd64(lpAddend, 1) + 1; +} +#endif + static __inline__ __attribute__((always_inline)) unsigned char _interlockedbittestandreset(volatile long * a, const long b) { unsigned char retval; - __asm__("lock; btrl %[b], %[a]; setb %b[retval]" : [retval] "=r" (retval), [a] "=m" (a) : [b] "Ir" (b) : "memory"); + __asm__("lock; btrl %[b], %[a]; setb %b[retval]" : [retval] "=r" (retval), [a] "=m" (*a) : [b] "Ir" (b) : "memory"); return retval; } @@ -473,7 +501,7 @@ static __inline__ __attribute__((always_inline)) unsigned char _interlockedbitte static __inline__ __attribute__((always_inline)) unsigned char _interlockedbittestandreset64(volatile long long * a, const long long b) { unsigned char retval; - __asm__("lock; btrq %[b], %[a]; setb %b[retval]" : [retval] "=r" (retval), [a] "=m" (a) : [b] "Ir" (b) : "memory"); + __asm__("lock; btrq %[b], %[a]; setb %b[retval]" : [retval] "=r" (retval), [a] "=m" (*a) : [b] "Ir" (b) : "memory"); return retval; } #endif @@ -481,7 +509,7 @@ static __inline__ __attribute__((always_inline)) unsigned char _interlockedbitte static __inline__ __attribute__((always_inline)) unsigned char _interlockedbittestandset(volatile long * a, const long b) { unsigned char retval; - __asm__("lock; btsl %[b], %[a]; setc %b[retval]" : [retval] "=r" (retval), [a] "=m" (a) : [b] "Ir" (b) : "memory"); + __asm__("lock; btsl %[b], %[a]; setc %b[retval]" : [retval] "=r" (retval), [a] "=m" (*a) : [b] "Ir" (b) : "memory"); return retval; } @@ -489,7 +517,7 @@ static __inline__ __attribute__((always_inline)) unsigned char _interlockedbitte static __inline__ __attribute__((always_inline)) unsigned char _interlockedbittestandset64(volatile long long * a, const long long b) { unsigned char retval; - __asm__("lock; btsq %[b], %[a]; setc %b[retval]" : [retval] "=r" (retval), [a] "=m" (a) : [b] "Ir" (b) : "memory"); + __asm__("lock; btsq %[b], %[a]; setc %b[retval]" : [retval] "=r" (retval), [a] "=m" (*a) : [b] "Ir" (b) : "memory"); return retval; } #endif @@ -561,168 +589,168 @@ static __inline__ __attribute__((always_inline)) void __movsd(unsigned long * De static __inline__ __attribute__((always_inline)) void __writegsbyte(const unsigned long Offset, const unsigned char Data) { - __asm__("movb %b[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data)); + __asm__ __volatile__("movb %b[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data) : "memory"); } static __inline__ __attribute__((always_inline)) void __writegsword(const unsigned long Offset, const unsigned short Data) { - __asm__("movw %w[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data)); + __asm__ __volatile__("movw %w[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data) : "memory"); } static __inline__ __attribute__((always_inline)) void __writegsdword(const unsigned long Offset, const unsigned long Data) { - __asm__("movl %k[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data)); + __asm__ __volatile__("movl %k[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data) : "memory"); } static __inline__ __attribute__((always_inline)) void __writegsqword(const unsigned long Offset, const unsigned __int64 Data) { - __asm__("movq %q[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data)); + __asm__ __volatile__("movq %q[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data) : "memory"); } static __inline__ __attribute__((always_inline)) unsigned char __readgsbyte(const unsigned long Offset) { unsigned char value; - __asm__("movb %%gs:%a[Offset], %b[value]" : [value] "=q" (value) : [Offset] "irm" (Offset)); + __asm__ __volatile__("movb %%gs:%a[Offset], %b[value]" : [value] "=q" (value) : [Offset] "irm" (Offset)); return value; } static __inline__ __attribute__((always_inline)) unsigned short __readgsword(const unsigned long Offset) { unsigned short value; - __asm__("movw %%gs:%a[Offset], %w[value]" : [value] "=q" (value) : [Offset] "irm" (Offset)); + __asm__ __volatile__("movw %%gs:%a[Offset], %w[value]" : [value] "=q" (value) : [Offset] "irm" (Offset)); return value; } static __inline__ __attribute__((always_inline)) unsigned long __readgsdword(const unsigned long Offset) { unsigned long value; - __asm__("movl %%gs:%a[Offset], %k[value]" : [value] "=q" (value) : [Offset] "irm" (Offset)); + __asm__ __volatile__("movl %%gs:%a[Offset], %k[value]" : [value] "=q" (value) : [Offset] "irm" (Offset)); return value; } static __inline__ __attribute__((always_inline)) unsigned __int64 __readgsqword(const unsigned long Offset) { - unsigned long value; - __asm__("movq %%gs:%a[Offset], %q[value]" : [value] "=q" (value) : [Offset] "irm" (Offset)); + unsigned __int64 value; + __asm__ __volatile__("movq %%gs:%a[Offset], %q[value]" : [value] "=q" (value) : [Offset] "irm" (Offset)); return value; } static __inline__ __attribute__((always_inline)) void __incgsbyte(const unsigned long Offset) { - __asm__("incb %%gs:%a[Offset]" : : [Offset] "ir" (Offset)); + __asm__ __volatile__("incb %%gs:%a[Offset]" : : [Offset] "ir" (Offset) : "memory"); } static __inline__ __attribute__((always_inline)) void __incgsword(const unsigned long Offset) { - __asm__("incw %%gs:%a[Offset]" : : [Offset] "ir" (Offset)); + __asm__ __volatile__("incw %%gs:%a[Offset]" : : [Offset] "ir" (Offset) : "memory"); } static __inline__ __attribute__((always_inline)) void __incgsdword(const unsigned long Offset) { - __asm__("incl %%gs:%a[Offset]" : : [Offset] "ir" (Offset)); + __asm__ __volatile__("incl %%gs:%a[Offset]" : : [Offset] "ir" (Offset) : "memory"); } /* NOTE: the bizarre implementation of __addgsxxx mimics the broken Visual C++ behavior */ static __inline__ __attribute__((always_inline)) void __addgsbyte(const unsigned long Offset, const unsigned char Data) { if(!__builtin_constant_p(Offset)) - __asm__("addb %k[Offset], %%gs:%a[Offset]" : : [Offset] "r" (Offset)); + __asm__ __volatile__("addb %k[Offset], %%gs:%a[Offset]" : : [Offset] "r" (Offset) : "memory"); else - __asm__("addb %b[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data)); + __asm__ __volatile__("addb %b[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data) : "memory"); } static __inline__ __attribute__((always_inline)) void __addgsword(const unsigned long Offset, const unsigned short Data) { if(!__builtin_constant_p(Offset)) - __asm__("addw %k[Offset], %%gs:%a[Offset]" : : [Offset] "r" (Offset)); + __asm__ __volatile__("addw %k[Offset], %%gs:%a[Offset]" : : [Offset] "r" (Offset) : "memory"); else - __asm__("addw %w[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data)); + __asm__ __volatile__("addw %w[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data) : "memory"); } static __inline__ __attribute__((always_inline)) void __addgsdword(const unsigned long Offset, const unsigned int Data) { if(!__builtin_constant_p(Offset)) - __asm__("addl %k[Offset], %%gs:%a[Offset]" : : [Offset] "r" (Offset)); + __asm__ __volatile__("addl %k[Offset], %%gs:%a[Offset]" : : [Offset] "r" (Offset) : "memory"); else - __asm__("addl %k[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data)); + __asm__ __volatile__("addl %k[Data], %%gs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data) : "memory"); } #else /*** FS segment addressing ***/ static __inline__ __attribute__((always_inline)) void __writefsbyte(const unsigned long Offset, const unsigned char Data) { - __asm__("movb %b[Data], %%fs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data)); + __asm__ __volatile__("movb %b[Data], %%fs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data) : "memory"); } static __inline__ __attribute__((always_inline)) void __writefsword(const unsigned long Offset, const unsigned short Data) { - __asm__("movw %w[Data], %%fs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data)); + __asm__ __volatile__("movw %w[Data], %%fs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data) : "memory"); } static __inline__ __attribute__((always_inline)) void __writefsdword(const unsigned long Offset, const unsigned long Data) { - __asm__("movl %k[Data], %%fs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data)); + __asm__ __volatile__("movl %k[Data], %%fs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data) : "memory"); } static __inline__ __attribute__((always_inline)) unsigned char __readfsbyte(const unsigned long Offset) { unsigned char value; - __asm__("movb %%fs:%a[Offset], %b[value]" : [value] "=q" (value) : [Offset] "irm" (Offset)); + __asm__ __volatile__("movb %%fs:%a[Offset], %b[value]" : [value] "=q" (value) : [Offset] "irm" (Offset) : "memory"); return value; } static __inline__ __attribute__((always_inline)) unsigned short __readfsword(const unsigned long Offset) { unsigned short value; - __asm__("movw %%fs:%a[Offset], %w[value]" : [value] "=q" (value) : [Offset] "irm" (Offset)); + __asm__ __volatile__("movw %%fs:%a[Offset], %w[value]" : [value] "=q" (value) : [Offset] "irm" (Offset)); return value; } static __inline__ __attribute__((always_inline)) unsigned long __readfsdword(const unsigned long Offset) { unsigned long value; - __asm__("movl %%fs:%a[Offset], %k[value]" : [value] "=q" (value) : [Offset] "irm" (Offset)); + __asm__ __volatile__("movl %%fs:%a[Offset], %k[value]" : [value] "=q" (value) : [Offset] "irm" (Offset)); return value; } static __inline__ __attribute__((always_inline)) void __incfsbyte(const unsigned long Offset) { - __asm__("incb %%fs:%a[Offset]" : : [Offset] "ir" (Offset)); + __asm__ __volatile__("incb %%fs:%a[Offset]" : : [Offset] "ir" (Offset) : "memory"); } static __inline__ __attribute__((always_inline)) void __incfsword(const unsigned long Offset) { - __asm__("incw %%fs:%a[Offset]" : : [Offset] "ir" (Offset)); + __asm__ __volatile__("incw %%fs:%a[Offset]" : : [Offset] "ir" (Offset) : "memory"); } static __inline__ __attribute__((always_inline)) void __incfsdword(const unsigned long Offset) { - __asm__("incl %%fs:%a[Offset]" : : [Offset] "ir" (Offset)); + __asm__ __volatile__("incl %%fs:%a[Offset]" : : [Offset] "ir" (Offset) : "memory"); } /* NOTE: the bizarre implementation of __addfsxxx mimics the broken Visual C++ behavior */ static __inline__ __attribute__((always_inline)) void __addfsbyte(const unsigned long Offset, const unsigned char Data) { if(!__builtin_constant_p(Offset)) - __asm__("addb %k[Offset], %%fs:%a[Offset]" : : [Offset] "r" (Offset)); + __asm__ __volatile__("addb %k[Offset], %%fs:%a[Offset]" : : [Offset] "r" (Offset) : "memory"); else - __asm__("addb %b[Data], %%fs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data)); + __asm__ __volatile__("addb %b[Data], %%fs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data) : "memory"); } static __inline__ __attribute__((always_inline)) void __addfsword(const unsigned long Offset, const unsigned short Data) { if(!__builtin_constant_p(Offset)) - __asm__("addw %k[Offset], %%fs:%a[Offset]" : : [Offset] "r" (Offset)); + __asm__ __volatile__("addw %k[Offset], %%fs:%a[Offset]" : : [Offset] "r" (Offset) : "memory"); else - __asm__("addw %w[Data], %%fs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data)); + __asm__ __volatile__("addw %w[Data], %%fs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data) : "memory"); } static __inline__ __attribute__((always_inline)) void __addfsdword(const unsigned long Offset, const unsigned int Data) { if(!__builtin_constant_p(Offset)) - __asm__("addl %k[Offset], %%fs:%a[Offset]" : : [Offset] "r" (Offset)); + __asm__ __volatile__("addl %k[Offset], %%fs:%a[Offset]" : : [Offset] "r" (Offset) : "memory"); else - __asm__("addl %k[Data], %%fs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data)); + __asm__ __volatile__("addl %k[Data], %%fs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data) : "memory"); } #endif @@ -804,12 +832,19 @@ static __inline__ __attribute__((always_inline)) unsigned short _rotl16(const un } #ifndef __MSVCRT__ -static __inline__ __attribute__((always_inline)) unsigned long _rotl(const unsigned long value, const unsigned char shift) +static __inline__ __attribute__((always_inline)) unsigned int _rotl(const unsigned int value, const int shift) { unsigned long retval; __asm__("roll %b[shift], %k[retval]" : [retval] "=rm" (retval) : "[retval]" (value), [shift] "Nc" (shift)); return retval; } + +static __inline__ __attribute__((always_inline)) unsigned long _rotr(const unsigned int value, const unsigned char shift) +{ + unsigned long retval; + __asm__("rorl %b[shift], %k[retval]" : [retval] "=rm" (retval) : "[retval]" (value), [shift] "Nc" (shift)); + return retval; +} #endif static __inline__ __attribute__((always_inline)) unsigned char _rotr8(const unsigned char value, const unsigned char shift) @@ -875,6 +910,44 @@ static __inline__ __attribute__((always_inline)) unsigned long long __ull_rshift return retval; } +static __inline__ __attribute__((always_inline)) unsigned short _byteswap_ushort(unsigned short value) +{ + unsigned short retval; + __asm__("rorw $8, %w[retval]" : [retval] "=rm" (retval) : "[retval]" (value)); + return retval; +} + +static __inline__ __attribute__((always_inline)) unsigned long _byteswap_ulong(unsigned long value) +{ + unsigned long retval; + __asm__("bswapl %[retval]" : [retval] "=rm" (retval) : "[retval]" (value)); + return retval; +} + +#ifdef _M_AMD64 +static __inline__ __attribute__((always_inline)) unsigned __int64 _byteswap_uint64(unsigned __int64 value) +{ + unsigned __int64 retval; + __asm__("bswapq %[retval]" : [retval] "=rm" (retval) : "[retval]" (value)); + return retval; +} +#else +static __inline__ __attribute__((always_inline)) unsigned __int64 _byteswap_uint64(unsigned __int64 value) +{ + union { + __int64 int64part; + struct { + unsigned long lowpart; + unsigned long hipart; + }; + } retval; + retval.int64part = value; + __asm__("bswapl %[lowpart]\n" + "bswapl %[hipart]\n" + : [lowpart] "=rm" (retval.hipart), [hipart] "=rm" (retval.lowpart) : "[lowpart]" (retval.lowpart), "[hipart]" (retval.hipart) ); + return retval.int64part; +} +#endif /*** 64-bit math ***/ static __inline__ __attribute__((always_inline)) long long __emul(const int a, const int b) @@ -1015,48 +1088,131 @@ static __inline__ __attribute__((always_inline)) void _enable(void) /*** Protected memory management ***/ -static __inline__ __attribute__((always_inline)) unsigned long __readcr0(void) + +static __inline__ __attribute__((always_inline)) void __writecr0(const unsigned __int64 Data) { - unsigned long value; + __asm__("mov %[Data], %%cr0" : : [Data] "q" (Data) : "memory"); +} + +static __inline__ __attribute__((always_inline)) void __writecr3(const unsigned __int64 Data) +{ + __asm__("mov %[Data], %%cr3" : : [Data] "q" (Data) : "memory"); +} + +static __inline__ __attribute__((always_inline)) void __writecr4(const unsigned __int64 Data) +{ + __asm__("mov %[Data], %%cr4" : : [Data] "q" (Data) : "memory"); +} + +#ifdef _M_AMD64 +static __inline__ __attribute__((always_inline)) void __writecr8(const unsigned __int64 Data) +{ + __asm__("mov %[Data], %%cr8" : : [Data] "q" (Data) : "memory"); +} +#endif + +static __inline__ __attribute__((always_inline)) unsigned __int64 __readcr0(void) +{ + unsigned __int64 value; __asm__ __volatile__("mov %%cr0, %[value]" : [value] "=q" (value)); return value; } -static __inline__ __attribute__((always_inline)) unsigned long __readcr2(void) +static __inline__ __attribute__((always_inline)) unsigned __int64 __readcr2(void) { - unsigned long value; + unsigned __int64 value; __asm__ __volatile__("mov %%cr2, %[value]" : [value] "=q" (value)); return value; } -static __inline__ __attribute__((always_inline)) unsigned long __readcr3(void) +static __inline__ __attribute__((always_inline)) unsigned __int64 __readcr3(void) { - unsigned long value; + unsigned __int64 value; __asm__ __volatile__("mov %%cr3, %[value]" : [value] "=q" (value)); return value; } -static __inline__ __attribute__((always_inline)) unsigned long __readcr4(void) +static __inline__ __attribute__((always_inline)) unsigned __int64 __readcr4(void) { - unsigned long value; + unsigned __int64 value; __asm__ __volatile__("mov %%cr4, %[value]" : [value] "=q" (value)); return value; } -static __inline__ __attribute__((always_inline)) void __writecr0(const unsigned long long Data) +#ifdef _M_AMD64 +static __inline__ __attribute__((always_inline)) unsigned __int64 __readcr8(void) { - __asm__("mov %[Data], %%cr0" : : [Data] "q" ((const unsigned long)(Data & 0xFFFFFFFF)) : "memory"); + unsigned __int64 value; + __asm__ __volatile__("movq %%cr8, %q[value]" : [value] "=q" (value)); + return value; +} +#endif + +#ifdef _M_AMD64 +static __inline__ __attribute__((always_inline)) unsigned __int64 __readdr(unsigned int reg) +{ + unsigned __int64 value; + switch (reg) + { + case 0: + __asm__ __volatile__("movq %%dr0, %q[value]" : [value] "=q" (value)); + break; + case 1: + __asm__ __volatile__("movq %%dr1, %q[value]" : [value] "=q" (value)); + break; + case 2: + __asm__ __volatile__("movq %%dr2, %q[value]" : [value] "=q" (value)); + break; + case 3: + __asm__ __volatile__("movq %%dr3, %q[value]" : [value] "=q" (value)); + break; + case 4: + __asm__ __volatile__("movq %%dr4, %q[value]" : [value] "=q" (value)); + break; + case 5: + __asm__ __volatile__("movq %%dr5, %q[value]" : [value] "=q" (value)); + break; + case 6: + __asm__ __volatile__("movq %%dr6, %q[value]" : [value] "=q" (value)); + break; + case 7: + __asm__ __volatile__("movq %%dr7, %q[value]" : [value] "=q" (value)); + break; + } + return value; } -static __inline__ __attribute__((always_inline)) void __writecr3(const unsigned long long Data) +static __inline__ __attribute__((always_inline)) void __writedr(unsigned reg, unsigned __int64 value) { - __asm__("mov %[Data], %%cr3" : : [Data] "q" ((const unsigned long)(Data & 0xFFFFFFFF)) : "memory"); -} - -static __inline__ __attribute__((always_inline)) void __writecr4(const unsigned long long Data) -{ - __asm__("mov %[Data], %%cr4" : : [Data] "q" ((const unsigned long)(Data & 0xFFFFFFFF)) : "memory"); + switch (reg) + { + case 0: + __asm__("movq %q[value], %%dr0" : : [value] "q" (value) : "memory"); + break; + case 1: + __asm__("movq %q[value], %%dr1" : : [value] "q" (value) : "memory"); + break; + case 2: + __asm__("movq %q[value], %%dr2" : : [value] "q" (value) : "memory"); + break; + case 3: + __asm__("movq %q[value], %%dr3" : : [value] "q" (value) : "memory"); + break; + case 4: + __asm__("movq %q[value], %%dr4" : : [value] "q" (value) : "memory"); + break; + case 5: + __asm__("movq %q[value], %%dr5" : : [value] "q" (value) : "memory"); + break; + case 6: + __asm__("movq %q[value], %%dr6" : : [value] "q" (value) : "memory"); + break; + case 7: + __asm__("movq %q[value], %%dr7" : : [value] "q" (value) : "memory"); + break; + } } +#endif static __inline__ __attribute__((always_inline)) void __invlpg(void * const Address) { @@ -1067,14 +1223,24 @@ static __inline__ __attribute__((always_inline)) void __invlpg(void * const Addr /*** System operations ***/ static __inline__ __attribute__((always_inline)) unsigned long long __readmsr(const int reg) { +#ifdef _M_AMD64 + unsigned long low, high; + __asm__ __volatile__("rdmsr" : "=a" (low), "=d" (high) : "c" (reg)); + return (high << 32) | low; +#else unsigned long long retval; __asm__ __volatile__("rdmsr" : "=A" (retval) : "c" (reg)); return retval; +#endif } static __inline__ __attribute__((always_inline)) void __writemsr(const unsigned long Register, const unsigned long long Value) { +#ifdef _M_AMD64 + __asm__ __volatile__("wrmsr" : : "a" (Value), "d" (Value >> 32), "c" (Register)); +#else __asm__ __volatile__("wrmsr" : : "A" (Value), "c" (Register)); +#endif } static __inline__ __attribute__((always_inline)) unsigned long long __readpmc(const int counter) @@ -1097,6 +1263,16 @@ static __inline__ __attribute__((always_inline)) void __wbinvd(void) __asm__ __volatile__("wbinvd"); } +static __inline__ __attribute__((always_inline)) void __lidt(void *Source) +{ + __asm__ __volatile__("lidt %0" : : "m"(*(short*)Source)); +} + +static __inline__ __attribute__((always_inline)) void __sidt(void *Destination) +{ + __asm__ __volatile__("sidt %0" : : "m"(*(short*)Destination) : "memory"); +} + #endif /* KJK_INTRIN_X86_H_ */ /* EOF */ diff --git a/reactos/include/psdk/winbase.h b/reactos/include/psdk/winbase.h index fbcb7f37a7d..28ece8ba31d 100644 --- a/reactos/include/psdk/winbase.h +++ b/reactos/include/psdk/winbase.h @@ -1706,16 +1706,52 @@ VOID WINAPI InitializeSRWLock(PSRWLOCK); #endif #ifndef __INTERLOCKED_DECLARED #define __INTERLOCKED_DECLARED + +#if defined (_M_AMD64) || defined (_M_IA64) + +#define InterlockedAnd _InterlockedAnd +#define InterlockedOr _InterlockedOr +#define InterlockedXor _InterlockedXor +#define InterlockedIncrement _InterlockedIncrement +#define InterlockedIncrementAcquire InterlockedIncrement +#define InterlockedIncrementRelease InterlockedIncrement +#define InterlockedDecrement _InterlockedDecrement +#define InterlockedDecrementAcquire InterlockedDecrement +#define InterlockedDecrementRelease InterlockedDecrement +#define InterlockedExchange _InterlockedExchange +#define InterlockedExchangeAdd _InterlockedExchangeAdd +#define InterlockedCompareExchange _InterlockedCompareExchange +#define InterlockedCompareExchangeAcquire InterlockedCompareExchange +#define InterlockedCompareExchangeRelease InterlockedCompareExchange +#define InterlockedExchangePointer _InterlockedExchangePointer +#define InterlockedCompareExchangePointer _InterlockedCompareExchangePointer +#define InterlockedCompareExchangePointerAcquire _InterlockedCompareExchangePointer +#define InterlockedCompareExchangePointerRelease _InterlockedCompareExchangePointer +#define InterlockedAnd64 _InterlockedAnd64 +#define InterlockedOr64 _InterlockedOr64 +#define InterlockedXor64 _InterlockedXor64 +#define InterlockedIncrement64 _InterlockedIncrement64 +#define InterlockedDecrement64 _InterlockedDecrement64 +#define InterlockedExchange64 _InterlockedExchange64 +#define InterlockedExchangeAdd64 _InterlockedExchangeAdd64 +#define InterlockedCompareExchange64 _InterlockedCompareExchange64 +#define InterlockedCompareExchangeAcquire64 InterlockedCompareExchange64 +#define InterlockedCompareExchangeRelease64 InterlockedCompareExchange64 + +#else // !(defined (_M_AMD64) || defined (_M_IA64)) + +LONG WINAPI InterlockedOr(IN OUT LONG volatile *,LONG); +LONG WINAPI InterlockedAnd(IN OUT LONG volatile *,LONG); LONG WINAPI InterlockedCompareExchange(IN OUT LONG volatile *,LONG,LONG); LONG WINAPI InterlockedDecrement(IN OUT LONG volatile *); LONG WINAPI InterlockedExchange(IN OUT LONG volatile *,LONG); #if defined(_WIN64) /* PVOID WINAPI InterlockedExchangePointer(PVOID*,PVOID); */ #define InterlockedExchangePointer(t,v) \ - (PVOID)InterlockedExchange64((LONGLONG*)(t),(LONGLONG)(v)) + (PVOID)_InterlockedExchange64((LONGLONG*)(t),(LONGLONG)(v)) /* PVOID WINAPI InterlockedCompareExchangePointer(PVOID*,PVOID,PVOID); */ #define InterlockedCompareExchangePointer(d,e,c) \ - (PVOID)InterlockedCompareExchange64((LONGLONG*)(d),(LONGLONG)(e),(LONGLONG)(c)) + (PVOID)_InterlockedCompareExchange64((LONGLONG*)(d),(LONGLONG)(e),(LONGLONG)(c)) #else /* PVOID WINAPI InterlockedExchangePointer(PVOID*,PVOID); */ #define InterlockedExchangePointer(t,v) \ @@ -1733,14 +1769,64 @@ LONG WINAPI InterlockedIncrement(IN OUT LONG volatile *); PSLIST_ENTRY WINAPI InterlockedPopEntrySList(PSLIST_HEADER); PSLIST_ENTRY WINAPI InterlockedPushEntrySList(PSLIST_HEADER,PSLIST_ENTRY); #endif + +#endif // !(defined (_M_AMD64) || defined (_M_IA64)) + +#if !defined(InterlockedAnd) +#define InterlockedAnd InterlockedAnd_Inline +FORCEINLINE +LONG +InterlockedAnd_Inline(IN OUT volatile LONG *Target, + IN LONG Set) +{ + LONG i; + LONG j; + + j = *Target; + do { + i = j; + j = _InterlockedCompareExchange((PLONG)Target, + i & Set, + i); + + } while (i != j); + + return j; +} +#endif + +#if !defined(InterlockedOr) +#define InterlockedOr InterlockedOr_Inline +FORCEINLINE +LONG +InterlockedOr_Inline(IN OUT volatile LONG *Target, + IN LONG Set) +{ + LONG i; + LONG j; + + j = *Target; + do { + i = j; + j = _InterlockedCompareExchange((PLONG)Target, + i | Set, + i); + + } while (i != j); + + return j; +} +#endif + #endif /* __INTERLOCKED_DECLARED */ + BOOL WINAPI IsBadCodePtr(FARPROC); -BOOL WINAPI IsBadHugeReadPtr(PCVOID,UINT); -BOOL WINAPI IsBadHugeWritePtr(PVOID,UINT); -BOOL WINAPI IsBadReadPtr(PCVOID,UINT); -BOOL WINAPI IsBadStringPtrA(LPCSTR,UINT); -BOOL WINAPI IsBadStringPtrW(LPCWSTR,UINT); -BOOL WINAPI IsBadWritePtr(PVOID,UINT); +BOOL WINAPI IsBadHugeReadPtr(PCVOID,UINT_PTR); +BOOL WINAPI IsBadHugeWritePtr(PVOID,UINT_PTR); +BOOL WINAPI IsBadReadPtr(PCVOID,UINT_PTR); +BOOL WINAPI IsBadStringPtrA(LPCSTR,UINT_PTR); +BOOL WINAPI IsBadStringPtrW(LPCWSTR,UINT_PTR); +BOOL WINAPI IsBadWritePtr(PVOID,UINT_PTR); BOOL WINAPI IsDebuggerPresent(void); #if (_WIN32_WINNT >= 0x0501) BOOL WINAPI IsProcessInJob(HANDLE,HANDLE,PBOOL); @@ -1994,7 +2080,7 @@ BOOL WINAPI SetPrivateObjectSecurity(SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,P BOOL WINAPI SetProcessAffinityMask(HANDLE,DWORD); BOOL WINAPI SetProcessPriorityBoost(HANDLE,BOOL); BOOL WINAPI SetProcessShutdownParameters(DWORD,DWORD); -BOOL WINAPI SetProcessWorkingSetSize(HANDLE,DWORD,DWORD); +BOOL WINAPI SetProcessWorkingSetSize(HANDLE,SIZE_T,SIZE_T); #if (_WIN32_WINNT >= 0x0600) VOID WINAPI SetSecurityAccessMask(SECURITY_INFORMATION,LPDWORD); #endif diff --git a/reactos/include/psdk/windef.h b/reactos/include/psdk/windef.h index ca5f61a29ca..bd9fcaf69ce 100644 --- a/reactos/include/psdk/windef.h +++ b/reactos/include/psdk/windef.h @@ -123,14 +123,27 @@ extern "C" { #define pascal __stdcall #define _pascal __stdcall #define __pascal __stdcall -#define PASCAL _pascal + #define CDECL _cdecl +#define PASCAL _pascal + +#if !defined(__x86_64__) //defined(_STDCALL_SUPPORTED) #define STDCALL __stdcall -#define WINAPI __stdcall -#define WINAPIV __cdecl -#define APIENTRY __stdcall -#define CALLBACK __stdcall -#define APIPRIVATE __stdcall +#define CALLBACK __stdcall +#define WINAPI __stdcall +#define WINAPIV __cdecl +#define APIENTRY WINAPI +#define APIPRIVATE __stdcall +#define PASCAL __stdcall +#else +#define STDCALL +#define CALLBACK +#define WINAPI +#define WINAPIV +#define APIENTRY WINAPI +#define APIPRIVATE +#define PASCAL pascal +#endif #define DECLSPEC_IMPORT __declspec(dllimport) #define DECLSPEC_EXPORT __declspec(dllexport) diff --git a/reactos/include/psdk/winnt.h b/reactos/include/psdk/winnt.h index 34aa244b5ba..632d57efbc2 100644 --- a/reactos/include/psdk/winnt.h +++ b/reactos/include/psdk/winnt.h @@ -92,15 +92,6 @@ extern "C" { #endif #endif -/* i386 context definitions */ -#ifdef __i386__ - -#define EXCEPTION_READ_FAULT 0 -#define EXCEPTION_WRITE_FAULT 1 -#define EXCEPTION_EXECUTE_FAULT 8 - -#endif /* __i386__ */ - #ifndef VOID #define VOID void #endif @@ -511,8 +502,6 @@ typedef DWORD FLONG; #define THREAD_DIRECT_IMPERSONATION 0x200 #endif #define THREAD_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3FF) -#define EXCEPTION_NONCONTINUABLE 1 -#define EXCEPTION_MAXIMUM_PARAMETERS 15 /* FIXME: Oh how I wish, I wish the w32api DDK wouldn't include winnt.h... */ #ifndef __NTDDK_H #define MUTANT_QUERY_STATE 0x0001 @@ -1350,7 +1339,7 @@ typedef enum #define IMAGE_DLLCHARACTERISTICS_NO_BIND 0x0800 #define IMAGE_DLLCHARACTERISTICS_WDM_DRIVER 0x2000 #define IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE 0x8000 -#define IMAGE_FIRST_SECTION(h) ((PIMAGE_SECTION_HEADER) ((DWORD_PTR)h+FIELD_OFFSET(IMAGE_NT_HEADERS,OptionalHeader)+((PIMAGE_NT_HEADERS)(h))->FileHeader.SizeOfOptionalHeader)) +#define IMAGE_FIRST_SECTION(h) ((PIMAGE_SECTION_HEADER) ((ULONG_PTR)h+FIELD_OFFSET(IMAGE_NT_HEADERS,OptionalHeader)+((PIMAGE_NT_HEADERS)(h))->FileHeader.SizeOfOptionalHeader)) #define IMAGE_DIRECTORY_ENTRY_EXPORT 0 #define IMAGE_DIRECTORY_ENTRY_IMPORT 1 #define IMAGE_DIRECTORY_ENTRY_RESOURCE 2 @@ -2010,6 +1999,38 @@ typedef struct _ACL_SIZE_INFORMATION { DWORD AclBytesFree; } ACL_SIZE_INFORMATION; +#ifndef _LDT_ENTRY_DEFINED +#define _LDT_ENTRY_DEFINED +typedef struct _LDT_ENTRY +{ + USHORT LimitLow; + USHORT BaseLow; + union + { + struct + { + UCHAR BaseMid; + UCHAR Flags1; + UCHAR Flags2; + UCHAR BaseHi; + } Bytes; + struct + { + ULONG BaseMid:8; + ULONG Type:5; + ULONG Dpl:2; + ULONG Pres:1; + ULONG LimitHi:4; + ULONG Sys:1; + ULONG Reserved_0:1; + ULONG Default_Big:1; + ULONG Granularity:1; + ULONG BaseHi:8; + } Bits; + } HighWord; +} LDT_ENTRY, *PLDT_ENTRY, *LPLDT_ENTRY; +#endif + /* FIXME: add more machines */ #if defined(_X86_) && !defined(__PowerPC__) #define SIZE_OF_80387_REGISTERS 80 @@ -2023,6 +2044,11 @@ typedef struct _ACL_SIZE_INFORMATION { #define CONTEXT_EXTENDED_REGISTERS (CONTEXT_i386|0x00000020L) #define CONTEXT_FULL (CONTEXT_CONTROL|CONTEXT_INTEGER|CONTEXT_SEGMENTS) #define MAXIMUM_SUPPORTED_EXTENSION 512 + +#define EXCEPTION_READ_FAULT 0 +#define EXCEPTION_WRITE_FAULT 1 +#define EXCEPTION_EXECUTE_FAULT 8 + typedef struct _FLOATING_SAVE_AREA { DWORD ControlWord; DWORD StatusWord; @@ -2061,6 +2087,237 @@ typedef struct _CONTEXT { DWORD SegSs; BYTE ExtendedRegisters[MAXIMUM_SUPPORTED_EXTENSION]; } CONTEXT; +#elif defined(__x86_64__) + + +#define CONTEXT_AMD64 0x100000 + +#if !defined(RC_INVOKED) +#define CONTEXT_CONTROL (CONTEXT_AMD64 | 0x1L) +#define CONTEXT_INTEGER (CONTEXT_AMD64 | 0x2L) +#define CONTEXT_SEGMENTS (CONTEXT_AMD64 | 0x4L) +#define CONTEXT_FLOATING_POINT (CONTEXT_AMD64 | 0x8L) +#define CONTEXT_DEBUG_REGISTERS (CONTEXT_AMD64 | 0x10L) + +#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT) +#define CONTEXT_ALL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS | CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS) + +#define CONTEXT_EXCEPTION_ACTIVE 0x8000000 +#define CONTEXT_SERVICE_ACTIVE 0x10000000 +#define CONTEXT_EXCEPTION_REQUEST 0x40000000 +#define CONTEXT_EXCEPTION_REPORTING 0x80000000 +#endif + +#define INITIAL_MXCSR 0x1f80 +#define INITIAL_FPCSR 0x027f +#define EXCEPTION_READ_FAULT 0 +#define EXCEPTION_WRITE_FAULT 1 +#define EXCEPTION_EXECUTE_FAULT 8 + +typedef struct DECLSPEC_ALIGN(16) _M128A { + ULONGLONG Low; + LONGLONG High; +} M128A, *PM128A; + +typedef struct _XMM_SAVE_AREA32 { + WORD ControlWord; + WORD StatusWord; + BYTE TagWord; + BYTE Reserved1; + WORD ErrorOpcode; + DWORD ErrorOffset; + WORD ErrorSelector; + WORD Reserved2; + DWORD DataOffset; + WORD DataSelector; + WORD Reserved3; + DWORD MxCsr; + DWORD MxCsr_Mask; + M128A FloatRegisters[8]; + M128A XmmRegisters[16]; + BYTE Reserved4[96]; +} XMM_SAVE_AREA32, *PXMM_SAVE_AREA32; + +typedef struct DECLSPEC_ALIGN(16) _CONTEXT { + DWORD64 P1Home; + DWORD64 P2Home; + DWORD64 P3Home; + DWORD64 P4Home; + DWORD64 P5Home; + DWORD64 P6Home; + + /* Control flags */ + DWORD ContextFlags; + DWORD MxCsr; + + /* Segment */ + WORD SegCs; + WORD SegDs; + WORD SegEs; + WORD SegFs; + WORD SegGs; + WORD SegSs; + DWORD EFlags; + + /* Debug */ + DWORD64 Dr0; + DWORD64 Dr1; + DWORD64 Dr2; + DWORD64 Dr3; + DWORD64 Dr6; + DWORD64 Dr7; + + /* Integer */ + DWORD64 Rax; + DWORD64 Rcx; + DWORD64 Rdx; + DWORD64 Rbx; + DWORD64 Rsp; + DWORD64 Rbp; + DWORD64 Rsi; + DWORD64 Rdi; + DWORD64 R8; + DWORD64 R9; + DWORD64 R10; + DWORD64 R11; + DWORD64 R12; + DWORD64 R13; + DWORD64 R14; + DWORD64 R15; + + /* Counter */ + DWORD64 Rip; + + /* Floating point */ + union { + XMM_SAVE_AREA32 FltSave; + struct { + M128A Header[2]; + M128A Legacy[8]; + M128A Xmm0; + M128A Xmm1; + M128A Xmm2; + M128A Xmm3; + M128A Xmm4; + M128A Xmm5; + M128A Xmm6; + M128A Xmm7; + M128A Xmm8; + M128A Xmm9; + M128A Xmm10; + M128A Xmm11; + M128A Xmm12; + M128A Xmm13; + M128A Xmm14; + M128A Xmm15; + } DUMMYSTRUCTNAME; + } DUMMYUNIONNAME; + + /* Vector */ + M128A VectorRegister[26]; + DWORD64 VectorControl; + + /* Debug control */ + DWORD64 DebugControl; + DWORD64 LastBranchToRip; + DWORD64 LastBranchFromRip; + DWORD64 LastExceptionToRip; + DWORD64 LastExceptionFromRip; +} CONTEXT, *PCONTEXT; + + +typedef struct _KNONVOLATILE_CONTEXT_POINTERS { + union { + PM128A FloatingContext[16]; + struct { + PM128A Xmm0; + PM128A Xmm1; + PM128A Xmm2; + PM128A Xmm3; + PM128A Xmm4; + PM128A Xmm5; + PM128A Xmm6; + PM128A Xmm7; + PM128A Xmm8; + PM128A Xmm9; + PM128A Xmm10; + PM128A Xmm11; + PM128A Xmm12; + PM128A Xmm13; + PM128A Xmm14; + PM128A Xmm15; + }; + }; + + union { + PULONG64 IntegerContext[16]; + struct { + PULONG64 Rax; + PULONG64 Rcx; + PULONG64 Rdx; + PULONG64 Rbx; + PULONG64 Rsp; + PULONG64 Rbp; + PULONG64 Rsi; + PULONG64 Rdi; + PULONG64 R8; + PULONG64 R9; + PULONG64 R10; + PULONG64 R11; + PULONG64 R12; + PULONG64 R13; + PULONG64 R14; + PULONG64 R15; + }; + }; +} KNONVOLATILE_CONTEXT_POINTERS, *PKNONVOLATILE_CONTEXT_POINTERS; + +#define UNW_FLAG_NHANDLER 0x0 /* No handler. */ +#define UNW_FLAG_EHANDLER 0x1 /* Exception handler should be called */ +#define UNW_FLAG_UHANDLER 0x2 /* Termination handler that should be called when unwinding an exception */ +#define UNW_FLAG_CHAININFO 0x4 /* FunctionEntry member is the contents of a previous function table entry */ + +#define RUNTIME_FUNCTION_INDIRECT 0x1 + + typedef struct _RUNTIME_FUNCTION { + DWORD BeginAddress; + DWORD EndAddress; + DWORD UnwindData; + } RUNTIME_FUNCTION,*PRUNTIME_FUNCTION; + + typedef PRUNTIME_FUNCTION (*PGET_RUNTIME_FUNCTION_CALLBACK)(DWORD64 ControlPc,PVOID Context); + typedef DWORD (*POUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK)(HANDLE Process,PVOID TableAddress,PDWORD Entries,PRUNTIME_FUNCTION *Functions); + + #define OUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK_EXPORT_NAME "OutOfProcessFunctionTableCallback" + +NTSYSAPI +VOID +__cdecl +RtlRestoreContext(PCONTEXT ContextRecord, + struct _EXCEPTION_RECORD *ExceptionRecord); + +NTSYSAPI +BOOLEAN +__cdecl +RtlAddFunctionTable(PRUNTIME_FUNCTION FunctionTable, + DWORD EntryCount, + DWORD64 BaseAddress); + +NTSYSAPI +BOOLEAN +__cdecl +RtlInstallFunctionTableCallback(DWORD64 TableIdentifier, + DWORD64 BaseAddress, + DWORD Length, + PGET_RUNTIME_FUNCTION_CALLBACK Callback, + PVOID Context, + PCWSTR OutOfProcessCallbackDll); + +NTSYSAPI +BOOLEAN +__cdecl +RtlDeleteFunctionTable(PRUNTIME_FUNCTION FunctionTable); + #elif defined(_PPC_) #define CONTEXT_CONTROL 1L #define CONTEXT_FLOATING_POINT 2L @@ -2548,18 +2805,44 @@ typedef struct _CONTEXT { #error "undefined processor type" #endif typedef CONTEXT *PCONTEXT,*LPCONTEXT; -typedef struct _EXCEPTION_RECORD { - DWORD ExceptionCode; - DWORD ExceptionFlags; - struct _EXCEPTION_RECORD *ExceptionRecord; - PVOID ExceptionAddress; - DWORD NumberParameters; - ULONG_PTR ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]; -} EXCEPTION_RECORD,*PEXCEPTION_RECORD,*LPEXCEPTION_RECORD; -typedef struct _EXCEPTION_POINTERS { - PEXCEPTION_RECORD ExceptionRecord; - PCONTEXT ContextRecord; -} EXCEPTION_POINTERS,*PEXCEPTION_POINTERS,*LPEXCEPTION_POINTERS; + +#define EXCEPTION_NONCONTINUABLE 1 +#define EXCEPTION_MAXIMUM_PARAMETERS 15 + + typedef struct _EXCEPTION_RECORD { + DWORD ExceptionCode; + DWORD ExceptionFlags; + struct _EXCEPTION_RECORD *ExceptionRecord; + PVOID ExceptionAddress; + DWORD NumberParameters; + ULONG_PTR ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]; + } EXCEPTION_RECORD, *PEXCEPTION_RECORD, *LPEXCEPTION_RECORD; + + typedef EXCEPTION_RECORD *PEXCEPTION_RECORD; + + typedef struct _EXCEPTION_RECORD32 { + DWORD ExceptionCode; + DWORD ExceptionFlags; + DWORD ExceptionRecord; + DWORD ExceptionAddress; + DWORD NumberParameters; + DWORD ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]; + } EXCEPTION_RECORD32,*PEXCEPTION_RECORD32; + + typedef struct _EXCEPTION_RECORD64 { + DWORD ExceptionCode; + DWORD ExceptionFlags; + DWORD64 ExceptionRecord; + DWORD64 ExceptionAddress; + DWORD NumberParameters; + DWORD __unusedAlignment; + DWORD64 ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]; + } EXCEPTION_RECORD64,*PEXCEPTION_RECORD64; + + typedef struct _EXCEPTION_POINTERS { + PEXCEPTION_RECORD ExceptionRecord; + PCONTEXT ContextRecord; + } EXCEPTION_POINTERS,*PEXCEPTION_POINTERS, *LPEXCEPTION_POINTERS; #ifdef _M_PPC #define LARGE_INTEGER_ORDER(x) x HighPart; DWORD LowPart; @@ -2911,6 +3194,12 @@ RtlCaptureStackBackTrace( OUT PDWORD BackTraceHash OPTIONAL ); +NTSYSAPI +VOID +NTAPI +RtlCaptureContext( + PCONTEXT ContextRecord +); NTSYSAPI PVOID @@ -3128,7 +3417,7 @@ typedef struct _IMAGE_OPTIONAL_HEADER64 { WORD MinorImageVersion; WORD MajorSubsystemVersion; WORD MinorSubsystemVersion; - DWORD Reserved1; + DWORD Win32VersionValue; DWORD SizeOfImage; DWORD SizeOfHeaders; DWORD CheckSum; @@ -3365,14 +3654,75 @@ typedef struct _IMAGE_IMPORT_BY_NAME { WORD Hint; BYTE Name[1]; } IMAGE_IMPORT_BY_NAME,*PIMAGE_IMPORT_BY_NAME; -typedef struct _IMAGE_THUNK_DATA { - union { - ULONG ForwarderString; - ULONG Function; - DWORD Ordinal; - ULONG AddressOfData; - } u1; -} IMAGE_THUNK_DATA,*PIMAGE_THUNK_DATA; +#include "pshpack8.h" +typedef struct _IMAGE_THUNK_DATA64 { + union { + ULONGLONG ForwarderString; + ULONGLONG Function; + ULONGLONG Ordinal; + ULONGLONG AddressOfData; + } u1; +} IMAGE_THUNK_DATA64; +typedef IMAGE_THUNK_DATA64 *PIMAGE_THUNK_DATA64; +#include "poppack.h" + +typedef struct _IMAGE_THUNK_DATA32 { + union { + DWORD ForwarderString; + DWORD Function; + DWORD Ordinal; + DWORD AddressOfData; + } u1; +} IMAGE_THUNK_DATA32; +typedef IMAGE_THUNK_DATA32 *PIMAGE_THUNK_DATA32; + +#define IMAGE_ORDINAL_FLAG64 0x8000000000000000ULL +#define IMAGE_ORDINAL_FLAG32 0x80000000 +#define IMAGE_ORDINAL64(Ordinal) (Ordinal & 0xffff) +#define IMAGE_ORDINAL32(Ordinal) (Ordinal & 0xffff) +#define IMAGE_SNAP_BY_ORDINAL64(Ordinal) ((Ordinal & IMAGE_ORDINAL_FLAG64)!=0) +#define IMAGE_SNAP_BY_ORDINAL32(Ordinal) ((Ordinal & IMAGE_ORDINAL_FLAG32)!=0) + +typedef VOID +(NTAPI *PIMAGE_TLS_CALLBACK)(PVOID DllHandle,DWORD Reason,PVOID Reserved); + +typedef struct _IMAGE_TLS_DIRECTORY64 { + ULONGLONG StartAddressOfRawData; + ULONGLONG EndAddressOfRawData; + ULONGLONG AddressOfIndex; + ULONGLONG AddressOfCallBacks; + DWORD SizeOfZeroFill; + DWORD Characteristics; +} IMAGE_TLS_DIRECTORY64; +typedef IMAGE_TLS_DIRECTORY64 *PIMAGE_TLS_DIRECTORY64; + +typedef struct _IMAGE_TLS_DIRECTORY32 { + DWORD StartAddressOfRawData; + DWORD EndAddressOfRawData; + DWORD AddressOfIndex; + DWORD AddressOfCallBacks; + DWORD SizeOfZeroFill; + DWORD Characteristics; +} IMAGE_TLS_DIRECTORY32; +typedef IMAGE_TLS_DIRECTORY32 *PIMAGE_TLS_DIRECTORY32; +#ifdef _WIN64 +#define IMAGE_ORDINAL_FLAG IMAGE_ORDINAL_FLAG64 +#define IMAGE_ORDINAL(Ordinal) IMAGE_ORDINAL64(Ordinal) +typedef IMAGE_THUNK_DATA64 IMAGE_THUNK_DATA; +typedef PIMAGE_THUNK_DATA64 PIMAGE_THUNK_DATA; +#define IMAGE_SNAP_BY_ORDINAL(Ordinal) IMAGE_SNAP_BY_ORDINAL64(Ordinal) +typedef IMAGE_TLS_DIRECTORY64 IMAGE_TLS_DIRECTORY; +typedef PIMAGE_TLS_DIRECTORY64 PIMAGE_TLS_DIRECTORY; +#else +#define IMAGE_ORDINAL_FLAG IMAGE_ORDINAL_FLAG32 +#define IMAGE_ORDINAL(Ordinal) IMAGE_ORDINAL32(Ordinal) +typedef IMAGE_THUNK_DATA32 IMAGE_THUNK_DATA; +typedef PIMAGE_THUNK_DATA32 PIMAGE_THUNK_DATA; +#define IMAGE_SNAP_BY_ORDINAL(Ordinal) IMAGE_SNAP_BY_ORDINAL32(Ordinal) +typedef IMAGE_TLS_DIRECTORY32 IMAGE_TLS_DIRECTORY; +typedef PIMAGE_TLS_DIRECTORY32 PIMAGE_TLS_DIRECTORY; +#endif + typedef struct _IMAGE_IMPORT_DESCRIPTOR { _ANONYMOUS_UNION union { DWORD Characteristics; @@ -3394,14 +3744,6 @@ typedef struct _IMAGE_BOUND_FORWARDER_REF { WORD Reserved; } IMAGE_BOUND_FORWARDER_REF,*PIMAGE_BOUND_FORWARDER_REF; typedef void(NTAPI *PIMAGE_TLS_CALLBACK)(PVOID,DWORD,PVOID); -typedef struct _IMAGE_TLS_DIRECTORY { - DWORD StartAddressOfRawData; - DWORD EndAddressOfRawData; - PDWORD AddressOfIndex; - PIMAGE_TLS_CALLBACK *AddressOfCallBacks; - DWORD SizeOfZeroFill; - DWORD Characteristics; -} IMAGE_TLS_DIRECTORY,*PIMAGE_TLS_DIRECTORY; typedef struct _IMAGE_RESOURCE_DIRECTORY { DWORD Characteristics; DWORD TimeDateStamp; diff --git a/reactos/include/reactos/rosldr.h b/reactos/include/reactos/rosldr.h index 0663a26091f..7360c31bda1 100644 --- a/reactos/include/reactos/rosldr.h +++ b/reactos/include/reactos/rosldr.h @@ -45,6 +45,7 @@ typedef struct _ROS_LOADER_PARAMETER_BLOCK ULONG_PTR PageDirectoryEnd; ULONG_PTR KernelBase; ULONG_PTR ArchExtra; + ULONG (*FrLdrDbgPrint)(const char *Format, ...); } ROS_LOADER_PARAMETER_BLOCK, *PROS_LOADER_PARAMETER_BLOCK; extern BOOLEAN AcpiTableDetected; diff --git a/reactos/include/reactos/wine/port.h b/reactos/include/reactos/wine/port.h index d8a89fe2a02..56602d8ba49 100644 --- a/reactos/include/reactos/wine/port.h +++ b/reactos/include/reactos/wine/port.h @@ -328,53 +328,12 @@ extern int spawnvp(int mode, const char *cmdname, const char * const argv[]); #if defined(__i386__) && defined(__GNUC__) && !defined(WINE_PORT_NO_INTERLOCKED) -extern inline long interlocked_cmpxchg( long *dest, long xchg, long compare ) -{ - long ret; - __asm__ __volatile__( "lock; cmpxchgl %2,(%1)" - : "=a" (ret) : "r" (dest), "r" (xchg), "0" (compare) : "memory" ); - return ret; -} +#define interlocked_cmpxchg InterlockedCompareExchange +#define interlocked_cmpxchg_ptr InterlockedCompareExchangePtr +#define interlocked_xchg InterlockedExchange +#define interlocked_xchg_ptr InterlockedExchangePtr +#define interlocked_xchg_add InterlockedExchangeAdd -extern inline void *interlocked_cmpxchg_ptr( void **dest, void *xchg, void *compare ) -{ - void *ret; - __asm__ __volatile__( "lock; cmpxchgl %2,(%1)" - : "=a" (ret) : "r" (dest), "r" (xchg), "0" (compare) : "memory" ); - return ret; -} - -extern inline long interlocked_xchg( long *dest, long val ) -{ - long ret; - __asm__ __volatile__( "lock; xchgl %0,(%1)" - : "=r" (ret) : "r" (dest), "0" (val) : "memory" ); - return ret; -} - -extern inline void *interlocked_xchg_ptr( void **dest, void *val ) -{ - void *ret; - __asm__ __volatile__( "lock; xchgl %0,(%1)" - : "=r" (ret) : "r" (dest), "0" (val) : "memory" ); - return ret; -} - -extern inline long interlocked_xchg_add( long *dest, long incr ) -{ - long ret; - __asm__ __volatile__( "lock; xaddl %0,(%1)" - : "=r" (ret) : "r" (dest), "0" (incr) : "memory" ); - return ret; -} - -#else /* __i386___ && __GNUC__ */ - -extern long interlocked_cmpxchg( long *dest, long xchg, long compare ); -extern void *interlocked_cmpxchg_ptr( void **dest, void *xchg, void *compare ); -extern long interlocked_xchg( long *dest, long val ); -extern void *interlocked_xchg_ptr( void **dest, void *val ); -extern long interlocked_xchg_add( long *dest, long incr ); #endif /* __i386___ && __GNUC__ */ @@ -385,11 +344,6 @@ extern long interlocked_xchg_add( long *dest, long incr ); #define getopt_long __WINE_NOT_PORTABLE(getopt_long) #define getopt_long_only __WINE_NOT_PORTABLE(getopt_long_only) #define getpagesize __WINE_NOT_PORTABLE(getpagesize) -#define interlocked_cmpxchg __WINE_NOT_PORTABLE(interlocked_cmpxchg) -#define interlocked_cmpxchg_ptr __WINE_NOT_PORTABLE(interlocked_cmpxchg_ptr) -#define interlocked_xchg __WINE_NOT_PORTABLE(interlocked_xchg) -#define interlocked_xchg_ptr __WINE_NOT_PORTABLE(interlocked_xchg_ptr) -#define interlocked_xchg_add __WINE_NOT_PORTABLE(interlocked_xchg_add) #define lstat __WINE_NOT_PORTABLE(lstat) #define memcpy_unaligned __WINE_NOT_PORTABLE(memcpy_unaligned) #define memmove __WINE_NOT_PORTABLE(memmove) diff --git a/reactos/lib/rtl/srw.c b/reactos/lib/rtl/srw.c index b9283bd3307..d0d335b14f0 100644 --- a/reactos/lib/rtl/srw.c +++ b/reactos/lib/rtl/srw.c @@ -18,49 +18,6 @@ #define NDEBUG #include -/* FIXME *********************************************************************/ - -/* FIXME: Interlocked functions that need to be made into a public header */ -FORCEINLINE -LONG -InterlockedAnd(IN OUT volatile LONG *Target, - IN LONG Set) -{ - LONG i; - LONG j; - - j = *Target; - do { - i = j; - j = _InterlockedCompareExchange((PLONG)Target, - i & Set, - i); - - } while (i != j); - - return j; -} - -FORCEINLINE -LONG -InterlockedOr(IN OUT volatile LONG *Target, - IN LONG Set) -{ - LONG i; - LONG j; - - j = *Target; - do { - i = j; - j = _InterlockedCompareExchange((PLONG)Target, - i | Set, - i); - - } while (i != j); - - return j; -} - /* FUNCTIONS *****************************************************************/ #ifdef _WIN64 diff --git a/reactos/ntoskrnl/mm/i386/page.c b/reactos/ntoskrnl/mm/i386/page.c index 7adff6a6493..9d9c7af1aa3 100644 --- a/reactos/ntoskrnl/mm/i386/page.c +++ b/reactos/ntoskrnl/mm/i386/page.c @@ -74,7 +74,7 @@ MiFlushTlb(PULONG Pt, PVOID Address) PULONG MmGetPageDirectory(VOID) { - return (PULONG)__readcr3(); + return (PULONG)(ULONG_PTR)__readcr3(); } static ULONG From c49ed3a82c2e40cef0070622a0716dadd9ea5313 Mon Sep 17 00:00:00 2001 From: Jeffrey Morlan Date: Mon, 25 Aug 2008 23:22:03 +0000 Subject: [PATCH 174/324] Remove the "LPTSTR cmd" argument to internal commands; there's no need for a command to be told its own name. It was only used in two places: - a hack in cmd_mkdir that was already obsolete a decade ago - to distinguish "echo" from "echo.", but that is the wrong way to implement this anyway. There's nothing particularly special about the period, "echo" is just one of those commands that is lenient about where its parameters begin, and when it echos a line, the first character (usually a space, but in the case of "echo." a period) is skipped. svn path=/trunk/; revision=35647 --- reactos/base/shell/cmd/alias.c | 2 +- reactos/base/shell/cmd/attrib.c | 2 +- reactos/base/shell/cmd/beep.c | 2 +- reactos/base/shell/cmd/call.c | 6 +- reactos/base/shell/cmd/chcp.c | 2 +- reactos/base/shell/cmd/choice.c | 2 +- reactos/base/shell/cmd/cls.c | 2 +- reactos/base/shell/cmd/cmd.c | 11 ++- reactos/base/shell/cmd/cmd.h | 114 +++++++++++++++--------------- reactos/base/shell/cmd/cmdtable.c | 6 +- reactos/base/shell/cmd/color.c | 2 +- reactos/base/shell/cmd/copy.c | 2 +- reactos/base/shell/cmd/date.c | 2 +- reactos/base/shell/cmd/del.c | 2 +- reactos/base/shell/cmd/delay.c | 2 +- reactos/base/shell/cmd/dir.c | 2 +- reactos/base/shell/cmd/dirstack.c | 6 +- reactos/base/shell/cmd/echo.c | 45 +++--------- reactos/base/shell/cmd/for.c | 4 +- reactos/base/shell/cmd/free.c | 2 +- reactos/base/shell/cmd/goto.c | 4 +- reactos/base/shell/cmd/history.c | 2 +- reactos/base/shell/cmd/if.c | 4 +- reactos/base/shell/cmd/internal.c | 38 ++-------- reactos/base/shell/cmd/label.c | 2 +- reactos/base/shell/cmd/memory.c | 2 +- reactos/base/shell/cmd/move.c | 2 +- reactos/base/shell/cmd/msgbox.c | 2 +- reactos/base/shell/cmd/path.c | 2 +- reactos/base/shell/cmd/pause.c | 4 +- reactos/base/shell/cmd/prompt.c | 2 +- reactos/base/shell/cmd/ren.c | 2 +- reactos/base/shell/cmd/replace.c | 2 +- reactos/base/shell/cmd/screen.c | 2 +- reactos/base/shell/cmd/set.c | 2 +- reactos/base/shell/cmd/setlocal.c | 4 +- reactos/base/shell/cmd/shift.c | 4 +- reactos/base/shell/cmd/start.c | 2 +- reactos/base/shell/cmd/time.c | 2 +- reactos/base/shell/cmd/timer.c | 2 +- reactos/base/shell/cmd/title.c | 2 +- reactos/base/shell/cmd/type.c | 2 +- reactos/base/shell/cmd/ver.c | 2 +- reactos/base/shell/cmd/verify.c | 2 +- reactos/base/shell/cmd/vol.c | 2 +- reactos/base/shell/cmd/window.c | 4 +- 46 files changed, 133 insertions(+), 185 deletions(-) diff --git a/reactos/base/shell/cmd/alias.c b/reactos/base/shell/cmd/alias.c index 0c317f82d88..3a209843806 100644 --- a/reactos/base/shell/cmd/alias.c +++ b/reactos/base/shell/cmd/alias.c @@ -139,7 +139,7 @@ VOID ExpandAlias (LPTSTR cmd, INT maxlen) } -INT CommandAlias (LPTSTR cmd, LPTSTR param) +INT CommandAlias (LPTSTR param) { LPTSTR ptr; diff --git a/reactos/base/shell/cmd/attrib.c b/reactos/base/shell/cmd/attrib.c index c207657bb74..2778ba5cc0d 100644 --- a/reactos/base/shell/cmd/attrib.c +++ b/reactos/base/shell/cmd/attrib.c @@ -188,7 +188,7 @@ ChangeAttribute (LPTSTR pszPath, LPTSTR pszFile, DWORD dwMask, } -INT CommandAttrib (LPTSTR cmd, LPTSTR param) +INT CommandAttrib (LPTSTR param) { LPTSTR *arg; INT argc, i; diff --git a/reactos/base/shell/cmd/beep.c b/reactos/base/shell/cmd/beep.c index 75546f62083..efe0473624e 100644 --- a/reactos/base/shell/cmd/beep.c +++ b/reactos/base/shell/cmd/beep.c @@ -29,7 +29,7 @@ #ifdef INCLUDE_CMD_BEEP -INT cmd_beep (LPTSTR cmd, LPTSTR param) +INT cmd_beep (LPTSTR param) { if (_tcsncmp (param, _T("/?"), 2) == 0) { diff --git a/reactos/base/shell/cmd/call.c b/reactos/base/shell/cmd/call.c index 084bfda3ba3..3943c9c45be 100644 --- a/reactos/base/shell/cmd/call.c +++ b/reactos/base/shell/cmd/call.c @@ -40,11 +40,11 @@ * context block. */ -INT cmd_call (LPTSTR cmd, LPTSTR param) +INT cmd_call (LPTSTR param) { LPBATCH_CONTEXT n = NULL; - TRACE ("cmd_call: (\'%s\',\'%s\')\n", debugstr_aw(cmd), debugstr_aw(param)); + TRACE ("cmd_call: (\'%s\')\n", debugstr_aw(param)); if (!_tcsncmp (param, _T("/?"), 2)) { ConOutResPaging(TRUE,STRING_CALL_HELP); @@ -54,7 +54,7 @@ INT cmd_call (LPTSTR cmd, LPTSTR param) if (*param == _T(':') && (bc)) { bc->lCallPosition = SetFilePointer(bc->hBatchFile, 0, &bc->lCallPositionHigh, FILE_CURRENT); - cmd_goto(_T("goto"), param); + cmd_goto(param); return 0; } diff --git a/reactos/base/shell/cmd/chcp.c b/reactos/base/shell/cmd/chcp.c index 2133f9a9b9a..b834f231b41 100644 --- a/reactos/base/shell/cmd/chcp.c +++ b/reactos/base/shell/cmd/chcp.c @@ -17,7 +17,7 @@ #ifdef INCLUDE_CMD_CHCP -INT CommandChcp (LPTSTR cmd, LPTSTR param) +INT CommandChcp (LPTSTR param) { LPTSTR *arg; INT args; diff --git a/reactos/base/shell/cmd/choice.c b/reactos/base/shell/cmd/choice.c index bf43b8f8e46..6b2c490ea27 100644 --- a/reactos/base/shell/cmd/choice.c +++ b/reactos/base/shell/cmd/choice.c @@ -100,7 +100,7 @@ IsKeyInString (LPTSTR lpString, TCHAR cKey, BOOL bCaseSensitive) INT -CommandChoice (LPTSTR cmd, LPTSTR param) +CommandChoice (LPTSTR param) { LPTSTR lpOptions; TCHAR Options[6]; diff --git a/reactos/base/shell/cmd/cls.c b/reactos/base/shell/cmd/cls.c index cbd5418a209..b821ad2a845 100644 --- a/reactos/base/shell/cmd/cls.c +++ b/reactos/base/shell/cmd/cls.c @@ -30,7 +30,7 @@ #ifdef INCLUDE_CMD_CLS -INT cmd_cls (LPTSTR cmd, LPTSTR param) +INT cmd_cls (LPTSTR param) { CONSOLE_SCREEN_BUFFER_INFO csbi; COORD coPos; diff --git a/reactos/base/shell/cmd/cmd.c b/reactos/base/shell/cmd/cmd.c index d3e6d03d920..0b5da1f566d 100644 --- a/reactos/base/shell/cmd/cmd.c +++ b/reactos/base/shell/cmd/cmd.c @@ -648,7 +648,7 @@ DoCommand (LPTSTR line) if (!_tcscmp (com, cmdptr->name)) { - cmdptr->func (com, rest); + cmdptr->func (rest); break; } @@ -669,11 +669,8 @@ DoCommand (LPTSTR line) { /* OK its one of the specials...*/ - /* Terminate first word properly */ - com[cl] = _T('\0'); - /* Call with new rest */ - cmdptr->func (com, cstart + cl); + cmdptr->func (cstart + cl); break; } } @@ -1541,10 +1538,10 @@ Initialize (int argc, const TCHAR* argv[]) if (!IsExistingFile (_T("\\autoexec.bat"))) { #ifdef INCLUDE_CMD_DATE - cmd_date (_T(""), _T("")); + cmd_date (_T("")); #endif #ifdef INCLUDE_CMD_TIME - cmd_time (_T(""), _T("")); + cmd_time (_T("")); #endif } else diff --git a/reactos/base/shell/cmd/cmd.h b/reactos/base/shell/cmd/cmd.h index 9d709e6247a..e89c3aeb7a8 100644 --- a/reactos/base/shell/cmd/cmd.h +++ b/reactos/base/shell/cmd/cmd.h @@ -68,30 +68,30 @@ extern OSVERSIONINFO osvi; /* Prototypes for ALIAS.C */ VOID ExpandAlias (LPTSTR, INT); -INT CommandAlias (LPTSTR, LPTSTR); +INT CommandAlias (LPTSTR); /* Prototypes for ATTRIB.C */ -INT CommandAttrib (LPTSTR, LPTSTR); +INT CommandAttrib (LPTSTR); /* Prototypes for BEEP.C */ -INT cmd_beep (LPTSTR, LPTSTR); +INT cmd_beep (LPTSTR); /* Prototypes for CALL.C */ -INT cmd_call (LPTSTR, LPTSTR); +INT cmd_call (LPTSTR); /* Prototypes for CHCP.C */ -INT CommandChcp (LPTSTR, LPTSTR); +INT CommandChcp (LPTSTR); /* Prototypes for CHOICE.C */ -INT CommandChoice (LPTSTR, LPTSTR); +INT CommandChoice (LPTSTR); /* Prototypes for CLS.C */ -INT cmd_cls (LPTSTR, LPTSTR); +INT cmd_cls (LPTSTR); /* Prototypes for CMD.C */ @@ -122,7 +122,7 @@ typedef struct tagCOMMAND { LPTSTR name; INT flags; - INT (*func) (LPTSTR, LPTSTR); + INT (*func)(LPTSTR); } COMMAND, *LPCOMMAND; extern COMMAND cmds[]; /* The internal command table */ @@ -135,7 +135,7 @@ LPCTSTR GetParsedEnvVar ( LPCTSTR varName, UINT* varNameLen, BOOL ModeSetA ); /* Prototypes for COLOR.C */ VOID SetScreenColor(WORD wArgColor, BOOL bFill); -INT CommandColor (LPTSTR, LPTSTR); +INT CommandColor (LPTSTR); VOID ConInDummy (VOID); VOID ConInDisable (VOID); @@ -169,39 +169,39 @@ VOID ConErrResPrintf (UINT resID, ...); VOID ConOutResPaging(BOOL NewPage, UINT resID); /* Prototypes for COPY.C */ -INT cmd_copy (LPTSTR, LPTSTR); +INT cmd_copy (LPTSTR); /* Prototypes for DATE.C */ -INT cmd_date (LPTSTR, LPTSTR); +INT cmd_date (LPTSTR); /* Prototypes for DEL.C */ -INT CommandDelete (LPTSTR, LPTSTR); +INT CommandDelete (LPTSTR); /* Prototypes for DELAY.C */ -INT CommandDelay (LPTSTR, LPTSTR); +INT CommandDelay (LPTSTR); /* Prototypes for DIR.C */ -INT CommandDir (LPTSTR, LPTSTR); +INT CommandDir (LPTSTR); /* Prototypes for DIRSTACK.C */ VOID InitDirectoryStack (VOID); VOID DestroyDirectoryStack (VOID); INT GetDirectoryStackDepth (VOID); -INT CommandPushd (LPTSTR, LPTSTR); -INT CommandPopd (LPTSTR, LPTSTR); -INT CommandDirs (LPTSTR, LPTSTR); +INT CommandPushd (LPTSTR); +INT CommandPopd (LPTSTR); +INT CommandDirs (LPTSTR); /* Prototypes for ECHO.C */ -INT CommandEcho (LPTSTR, LPTSTR); -INT CommandEchos (LPTSTR, LPTSTR); -INT CommandEchoerr (LPTSTR, LPTSTR); -INT CommandEchoserr (LPTSTR, LPTSTR); +INT CommandEcho (LPTSTR); +INT CommandEchos (LPTSTR); +INT CommandEchoerr (LPTSTR); +INT CommandEchoserr (LPTSTR); /* Prototypes for ERROR.C */ @@ -235,15 +235,15 @@ VOID CompleteFilename (LPTSTR, BOOL, LPTSTR, UINT); /* Prototypes for FOR.C */ -INT cmd_for (LPTSTR, LPTSTR); +INT cmd_for (LPTSTR); /* Prototypes for FREE.C */ -INT CommandFree (LPTSTR, LPTSTR); +INT CommandFree (LPTSTR); /* Prototypes for GOTO.C */ -INT cmd_goto (LPTSTR, LPTSTR); +INT cmd_goto (LPTSTR); /* Prototypes for HISTORY.C */ @@ -254,23 +254,23 @@ VOID History_move_to_bottom(VOID);/*F3*/ VOID InitHistory(VOID); VOID CleanHistory(VOID); VOID History_del_current_entry(LPTSTR str);/*CTRL-D*/ -INT CommandHistory (LPTSTR cmd, LPTSTR param); +INT CommandHistory (LPTSTR param); #endif /* Prototypes for INTERNAL.C */ VOID InitLastPath (VOID); VOID FreeLastPath (VOID); -INT cmd_chdir (LPTSTR, LPTSTR); -INT cmd_mkdir (LPTSTR, LPTSTR); -INT cmd_rmdir (LPTSTR, LPTSTR); -INT CommandExit (LPTSTR, LPTSTR); -INT CommandRem (LPTSTR, LPTSTR); -INT CommandShowCommands (LPTSTR, LPTSTR); -INT CommandShowCommandsDetail (LPTSTR, LPTSTR); +INT cmd_chdir (LPTSTR); +INT cmd_mkdir (LPTSTR); +INT cmd_rmdir (LPTSTR); +INT CommandExit (LPTSTR); +INT CommandRem (LPTSTR); +INT CommandShowCommands (LPTSTR); +INT CommandShowCommandsDetail (LPTSTR); /* Prototypes for LABEL.C */ -INT cmd_label (LPTSTR, LPTSTR); +INT cmd_label (LPTSTR); /* Prototypes for LOCALE.C */ @@ -292,7 +292,7 @@ extern UINT InputCodePage; extern UINT OutputCodePage; /* Prototypes for MEMORY.C */ -INT CommandMemory (LPTSTR, LPTSTR); +INT CommandMemory (LPTSTR); /* Prototypes for MISC.C */ @@ -322,11 +322,11 @@ INT FilePromptYNA (UINT); /* Prototypes for MOVE.C */ -INT cmd_move (LPTSTR, LPTSTR); +INT cmd_move (LPTSTR); /* Prototypes for MSGBOX.C */ -INT CommandMsgbox (LPTSTR, LPTSTR); +INT CommandMsgbox (LPTSTR); /* Prototypes from PARSER.C */ @@ -346,12 +346,12 @@ VOID FreeCommand(PARSED_COMMAND *Cmd); /* Prototypes from PATH.C */ -INT cmd_path (LPTSTR, LPTSTR); +INT cmd_path (LPTSTR); /* Prototypes from PROMPT.C */ VOID PrintPrompt (VOID); -INT cmd_prompt (LPTSTR, LPTSTR); +INT cmd_prompt (LPTSTR); /* Prototypes for REDIR.C */ @@ -371,24 +371,24 @@ VOID FreeRedirection(REDIRECTION *); /* Prototypes for REN.C */ -INT cmd_rename (LPTSTR, LPTSTR); +INT cmd_rename (LPTSTR); /* Prototypes for REN.C */ -INT cmd_replace (LPTSTR, LPTSTR); +INT cmd_replace (LPTSTR); /* Prototypes for SCREEN.C */ -INT CommandScreen (LPTSTR, LPTSTR); +INT CommandScreen (LPTSTR); /* Prototypes for SET.C */ -INT cmd_set (LPTSTR, LPTSTR); +INT cmd_set (LPTSTR); /* Prototypes for SETLOCAL.C */ -INT cmd_setlocal (LPTSTR, LPTSTR); -INT cmd_endlocal (LPTSTR, LPTSTR); +INT cmd_setlocal (LPTSTR); +INT cmd_endlocal (LPTSTR); /* Prototypes for START.C */ -INT cmd_start (LPTSTR, LPTSTR); +INT cmd_start (LPTSTR); /* Prototypes for STRTOCLR.C */ @@ -396,45 +396,45 @@ BOOL StringToColor (LPWORD, LPTSTR *); /* Prototypes for TIME.C */ -INT cmd_time (LPTSTR, LPTSTR); +INT cmd_time (LPTSTR); /* Prototypes for TIMER.C */ -INT CommandTimer (LPTSTR cmd, LPTSTR param); +INT CommandTimer (LPTSTR param); /* Prototypes for TITLE.C */ -INT cmd_title (LPTSTR, LPTSTR); +INT cmd_title (LPTSTR); /* Prototypes for TYPE.C */ -INT cmd_type (LPTSTR, LPTSTR); +INT cmd_type (LPTSTR); /* Prototypes for VER.C */ VOID ShortVersion (VOID); -INT cmd_ver (LPTSTR, LPTSTR); +INT cmd_ver (LPTSTR); /* Prototypes for VERIFY.C */ -INT cmd_verify (LPTSTR, LPTSTR); +INT cmd_verify (LPTSTR); /* Prototypes for VOL.C */ -INT cmd_vol (LPTSTR, LPTSTR); +INT cmd_vol (LPTSTR); /* Prototypes for WHERE.C */ BOOL SearchForExecutable (LPCTSTR, LPTSTR); /* Prototypes for WINDOW.C */ -INT CommandActivate (LPTSTR, LPTSTR); -INT CommandWindow (LPTSTR, LPTSTR); +INT CommandActivate (LPTSTR); +INT CommandWindow (LPTSTR); /* The MSDOS Batch Commands [MS-DOS 5.0 User's Guide and Reference p359] */ -int cmd_if(TCHAR *, TCHAR *); -int cmd_pause(TCHAR *, TCHAR *); -int cmd_shift(TCHAR *, TCHAR *); +int cmd_if(TCHAR *); +int cmd_pause(TCHAR *); +int cmd_shift(TCHAR *); #endif /* _CMD_H_INCLUDED_ */ diff --git a/reactos/base/shell/cmd/cmdtable.c b/reactos/base/shell/cmd/cmdtable.c index 2143d95fa15..516844fa312 100644 --- a/reactos/base/shell/cmd/cmdtable.c +++ b/reactos/base/shell/cmd/cmdtable.c @@ -93,11 +93,9 @@ COMMAND cmds[] = {_T("dirs"), 0, CommandDirs}, #endif - {_T("echo"), 0, CommandEcho}, - {_T("echo."), CMD_HIDE, CommandEcho}, + {_T("echo"), CMD_SPECIAL, CommandEcho}, {_T("echos"), 0, CommandEchos}, - {_T("echoerr"), 0, CommandEchoerr}, - {_T("echoerr."), CMD_HIDE, CommandEchoerr}, + {_T("echoerr"), CMD_SPECIAL, CommandEchoerr}, {_T("echoserr"), 0, CommandEchoserr}, {_T("endlocal"), 0, cmd_endlocal}, diff --git a/reactos/base/shell/cmd/color.c b/reactos/base/shell/cmd/color.c index 2ee1f44249d..7b6cea9e250 100644 --- a/reactos/base/shell/cmd/color.c +++ b/reactos/base/shell/cmd/color.c @@ -63,7 +63,7 @@ VOID SetScreenColor (WORD wColor, BOOL bNoFill) * * internal dir command */ -INT CommandColor (LPTSTR first, LPTSTR rest) +INT CommandColor (LPTSTR rest) { if (_tcsncmp (rest, _T("/?"), 2) == 0) { diff --git a/reactos/base/shell/cmd/copy.c b/reactos/base/shell/cmd/copy.c index 8526b437179..e01b725d6c2 100644 --- a/reactos/base/shell/cmd/copy.c +++ b/reactos/base/shell/cmd/copy.c @@ -290,7 +290,7 @@ static INT CopyOverwrite (LPTSTR fn) } -INT cmd_copy (LPTSTR cmd, LPTSTR param) +INT cmd_copy (LPTSTR param) { LPTSTR *arg; INT argc, i, nFiles, nOverwrite = 0, nSrc = -1, nDes = -1; diff --git a/reactos/base/shell/cmd/date.c b/reactos/base/shell/cmd/date.c index 53a4b5ba9a3..ef089447b83 100644 --- a/reactos/base/shell/cmd/date.c +++ b/reactos/base/shell/cmd/date.c @@ -176,7 +176,7 @@ ParseDate (LPTSTR s) } -INT cmd_date (LPTSTR cmd, LPTSTR param) +INT cmd_date (LPTSTR param) { LPTSTR *arg; INT argc; diff --git a/reactos/base/shell/cmd/del.c b/reactos/base/shell/cmd/del.c index 3785fc0956e..45d880f9fe3 100644 --- a/reactos/base/shell/cmd/del.c +++ b/reactos/base/shell/cmd/del.c @@ -354,7 +354,7 @@ ProcessDirectory(LPTSTR FileName, DWORD* dwFlags, DWORD dwAttrFlags) -INT CommandDelete (LPTSTR cmd, LPTSTR param) +INT CommandDelete (LPTSTR param) { /*cmd is the command that was given, in this case it will always be "del" or "delete" param is whatever is given after the command*/ diff --git a/reactos/base/shell/cmd/delay.c b/reactos/base/shell/cmd/delay.c index eebbaf01cfb..2f80958a9c1 100644 --- a/reactos/base/shell/cmd/delay.c +++ b/reactos/base/shell/cmd/delay.c @@ -14,7 +14,7 @@ #ifdef INCLUDE_CMD_DELAY -INT CommandDelay (LPTSTR cmd, LPTSTR param) +INT CommandDelay (LPTSTR param) { DWORD val; DWORD mul=1000; diff --git a/reactos/base/shell/cmd/dir.c b/reactos/base/shell/cmd/dir.c index 5968fe4df7e..9c3314e2601 100644 --- a/reactos/base/shell/cmd/dir.c +++ b/reactos/base/shell/cmd/dir.c @@ -1789,7 +1789,7 @@ ULARGE_INTEGER u64Temp; /* A temporary counter */ * internal dir command */ INT -CommandDir(LPTSTR first, LPTSTR rest) +CommandDir(LPTSTR rest) { TCHAR dircmd[256]; /* A variable to store the DIRCMD enviroment variable */ TCHAR path[MAX_PATH]; diff --git a/reactos/base/shell/cmd/dirstack.c b/reactos/base/shell/cmd/dirstack.c index 8c1e0189b2c..2aff845cabc 100644 --- a/reactos/base/shell/cmd/dirstack.c +++ b/reactos/base/shell/cmd/dirstack.c @@ -140,7 +140,7 @@ INT GetDirectoryStackDepth (VOID) /* * pushd command */ -INT CommandPushd (LPTSTR first, LPTSTR rest) +INT CommandPushd (LPTSTR rest) { TCHAR curPath[MAX_PATH]; TCHAR newPath[MAX_PATH]; @@ -174,7 +174,7 @@ INT CommandPushd (LPTSTR first, LPTSTR rest) /* * popd command */ -INT CommandPopd (LPTSTR first, LPTSTR rest) +INT CommandPopd (LPTSTR rest) { TCHAR szPath[MAX_PATH]; @@ -201,7 +201,7 @@ INT CommandPopd (LPTSTR first, LPTSTR rest) /* * dirs command */ -INT CommandDirs (LPTSTR first, LPTSTR rest) +INT CommandDirs (LPTSTR rest) { LPDIRENTRY lpDir; diff --git a/reactos/base/shell/cmd/echo.c b/reactos/base/shell/cmd/echo.c index 0706be4d70d..e6ea2d11cfa 100644 --- a/reactos/base/shell/cmd/echo.c +++ b/reactos/base/shell/cmd/echo.c @@ -29,24 +29,11 @@ #include -INT CommandEcho (LPTSTR cmd, LPTSTR param) +INT CommandEcho (LPTSTR param) { LPTSTR p1, p2; - TRACE ("CommandEcho '%s' : '%s'\n", debugstr_aw(cmd), debugstr_aw(param)); - - if (_tcsicmp (cmd, _T("echo.")) == 0) - { - if (param[0] == 0) - ConOutChar (_T('\n')); - else - ConOutPuts (param); - } - else - { - /* skip the first delimiter */ - if (_istspace(*param)) - param++; + TRACE ("CommandEcho: '%s'\n", debugstr_aw(param)); /* skip all spaces for the check of '/?', 'ON' and 'OFF' */ p1 = param; @@ -83,22 +70,22 @@ INT CommandEcho (LPTSTR cmd, LPTSTR param) } if (*p1 != _T('\0')) { - ConOutPuts (param); + /* skip the first character */ + ConOutPuts(param + 1); } else { ConOutResPrintf(STRING_ECHO_HELP5, bEcho ? D_ON : D_OFF); } - } return 0; } -INT CommandEchos (LPTSTR cmd, LPTSTR param) +INT CommandEchos (LPTSTR param) { - TRACE ("CommandEchos '%s' : '%s'\n", debugstr_aw(cmd), debugstr_aw(param)); + TRACE ("CommandEchos: '%s'\n", debugstr_aw(param)); if (!_tcsncmp (param, _T("/?"), 2)) { @@ -113,10 +100,10 @@ INT CommandEchos (LPTSTR cmd, LPTSTR param) } -INT CommandEchoerr (LPTSTR cmd, LPTSTR param) +INT CommandEchoerr (LPTSTR param) { - TRACE ("CommandEchoerr '%s' : '%s'\n", debugstr_aw(cmd), debugstr_aw(param)); + TRACE ("CommandEchoerr: '%s'\n", debugstr_aw(param)); if (!_tcsncmp (param, _T("/?"), 2)) { @@ -124,26 +111,16 @@ INT CommandEchoerr (LPTSTR cmd, LPTSTR param) return 0; } - if (_tcsicmp (cmd, _T("echoerr.")) == 0) - { - if (param[0] == 0) - ConErrChar (_T('\n')); - else - ConErrPuts (param); - } - else if (*param) - { - ConErrPuts (param); - } + ConErrPuts (param); return 0; } -INT CommandEchoserr (LPTSTR cmd, LPTSTR param) +INT CommandEchoserr (LPTSTR param) { - TRACE ("CommandEchoserr '%s' : '%s'\n", debugstr_aw(cmd), debugstr_aw(param)); + TRACE ("CommandEchoserr: '%s'\n", debugstr_aw(param)); if (!_tcsncmp (param, _T("/?"), 2)) { diff --git a/reactos/base/shell/cmd/for.c b/reactos/base/shell/cmd/for.c index ff586c912dc..e60ec383157 100644 --- a/reactos/base/shell/cmd/for.c +++ b/reactos/base/shell/cmd/for.c @@ -47,14 +47,14 @@ * per list element. */ -INT cmd_for (LPTSTR cmd, LPTSTR param) +INT cmd_for (LPTSTR param) { LPBATCH_CONTEXT lpNew; LPTSTR pp; TCHAR var; TCHAR szMsg[RC_STRING_MAX_SIZE]; - TRACE ("cmd_for (\'%s\', \'%s\'\n", debugstr_aw(cmd), debugstr_aw(param)); + TRACE ("cmd_for (\'%s\')\n", debugstr_aw(param)); if (!_tcsncmp (param, _T("/?"), 2)) { diff --git a/reactos/base/shell/cmd/free.c b/reactos/base/shell/cmd/free.c index 14002e1444e..c669d8c7cc4 100644 --- a/reactos/base/shell/cmd/free.c +++ b/reactos/base/shell/cmd/free.c @@ -84,7 +84,7 @@ PrintDiskInfo (LPTSTR szDisk) } -INT CommandFree (LPTSTR cmd, LPTSTR param) +INT CommandFree (LPTSTR param) { LPTSTR szParam; TCHAR szDefPath[MAX_PATH]; diff --git a/reactos/base/shell/cmd/goto.c b/reactos/base/shell/cmd/goto.c index 216a9997ef7..b6a7bfc70bd 100644 --- a/reactos/base/shell/cmd/goto.c +++ b/reactos/base/shell/cmd/goto.c @@ -36,13 +36,13 @@ * */ -INT cmd_goto (LPTSTR cmd, LPTSTR param) +INT cmd_goto (LPTSTR param) { TCHAR szMsg[RC_STRING_MAX_SIZE]; LPTSTR tmp, tmp2; LONG lNewPosHigh = 0; - TRACE ("cmd_goto (\'%s\', \'%s\'\n", debugstr_aw(cmd), debugstr_aw(param)); + TRACE ("cmd_goto (\'%s\')\n", debugstr_aw(param)); if (!_tcsncmp (param, _T("/?"), 2)) { diff --git a/reactos/base/shell/cmd/history.c b/reactos/base/shell/cmd/history.c index 02f22169761..5a85527b225 100644 --- a/reactos/base/shell/cmd/history.c +++ b/reactos/base/shell/cmd/history.c @@ -74,7 +74,7 @@ VOID set_size(INT new_size); -INT CommandHistory (LPTSTR cmd, LPTSTR param) +INT CommandHistory (LPTSTR param) { LPTSTR tmp; INT tmp_int; diff --git a/reactos/base/shell/cmd/if.c b/reactos/base/shell/cmd/if.c index 153c7c7d127..061173bedd3 100644 --- a/reactos/base/shell/cmd/if.c +++ b/reactos/base/shell/cmd/if.c @@ -36,12 +36,12 @@ #define X_EXEC 1 #define X_EMPTY 0x80 -INT cmd_if (LPTSTR cmd, LPTSTR param) +INT cmd_if (LPTSTR param) { INT x_flag = 0; /* when set cause 'then' clause to be executed */ LPTSTR pp; - TRACE ("cmd_if: (\'%s\', \'%s\')\n", debugstr_aw(cmd), debugstr_aw(param)); + TRACE ("cmd_if: (\'%s\')\n", debugstr_aw(param)); if (!_tcsncmp (param, _T("/?"), 2)) { diff --git a/reactos/base/shell/cmd/internal.c b/reactos/base/shell/cmd/internal.c index b079e3e6502..afc553cb2a1 100644 --- a/reactos/base/shell/cmd/internal.c +++ b/reactos/base/shell/cmd/internal.c @@ -267,7 +267,7 @@ BOOL SetRootPath(TCHAR *InPath) * CD / CHDIR * */ -INT cmd_chdir (LPTSTR cmd, LPTSTR param) +INT cmd_chdir (LPTSTR param) { WIN32_FIND_DATA f; @@ -455,10 +455,9 @@ MakeFullPath(TCHAR * DirPath) * MD / MKDIR * */ -INT cmd_mkdir (LPTSTR cmd, LPTSTR param) +INT cmd_mkdir (LPTSTR param) { LPTSTR dir; /* pointer to the directory to change to */ - LPTSTR place; /* used to search for the \ when no space is used */ LPTSTR *p = NULL; INT argc; nErrorLevel = 0; @@ -469,28 +468,6 @@ INT cmd_mkdir (LPTSTR cmd, LPTSTR param) } - /* check if there is no space between the command and the path */ - if (param[0] == _T('\0')) - { - /* search for the \ or . so that both short & long names will work */ - for (place = cmd; *place; place++) - if (*place == _T('.') || *place == _T('\\')) - break; - - if (*place) - { - argc = 0; - if (add_entry(&argc, &p, place)) - dir = place; - else - dir = NULL; - } - else - /* signal that there are no parameters */ - dir = NULL; - } - else - { p = split (param, &argc, FALSE); if (argc > 1) { @@ -501,7 +478,6 @@ INT cmd_mkdir (LPTSTR cmd, LPTSTR param) } else dir = p[0]; - } if (!dir) { @@ -573,7 +549,7 @@ BOOL DeleteFolder(LPTSTR FileName) } return RemoveDirectory(FileName); } -INT cmd_rmdir (LPTSTR cmd, LPTSTR param) +INT cmd_rmdir (LPTSTR param) { TCHAR dir[MAX_PATH]; /* pointer to the directory to change to */ TCHAR ch; @@ -707,7 +683,7 @@ INT cmd_rmdir (LPTSTR cmd, LPTSTR param) * set the exitflag to true * */ -INT CommandExit (LPTSTR cmd, LPTSTR param) +INT CommandExit (LPTSTR param) { if (!_tcsncmp (param, _T("/?"), 2)) { @@ -741,7 +717,7 @@ INT CommandExit (LPTSTR cmd, LPTSTR param) * does nothing * */ -INT CommandRem (LPTSTR cmd, LPTSTR param) +INT CommandRem (LPTSTR param) { if (!_tcsncmp (param, _T("/?"), 2)) { @@ -753,13 +729,13 @@ INT CommandRem (LPTSTR cmd, LPTSTR param) #endif /* INCLUDE_CMD_REM */ -INT CommandShowCommands (LPTSTR cmd, LPTSTR param) +INT CommandShowCommands (LPTSTR param) { PrintCommandList (); return 0; } -INT CommandShowCommandsDetail (LPTSTR cmd, LPTSTR param) +INT CommandShowCommandsDetail (LPTSTR param) { /* If a param was send, display help of correspondent command */ if (_tcslen(param)) diff --git a/reactos/base/shell/cmd/label.c b/reactos/base/shell/cmd/label.c index 745ff900dcd..bd9eda38761 100644 --- a/reactos/base/shell/cmd/label.c +++ b/reactos/base/shell/cmd/label.c @@ -22,7 +22,7 @@ #ifdef INCLUDE_CMD_LABEL -INT cmd_label (LPTSTR cmd, LPTSTR param) +INT cmd_label (LPTSTR param) { TCHAR szRootPath[] = _T("A:\\"); TCHAR szLabel[80]; diff --git a/reactos/base/shell/cmd/memory.c b/reactos/base/shell/cmd/memory.c index e838f655b17..1a0a5664a2d 100644 --- a/reactos/base/shell/cmd/memory.c +++ b/reactos/base/shell/cmd/memory.c @@ -32,7 +32,7 @@ ConvertDWord (DWORD num, LPTSTR des, INT len, BOOL bSeparator) } -INT CommandMemory (LPTSTR cmd, LPTSTR param) +INT CommandMemory (LPTSTR param) { MEMORYSTATUS ms; TCHAR szMemoryLoad[20]; diff --git a/reactos/base/shell/cmd/move.c b/reactos/base/shell/cmd/move.c index dc4ec4fc684..015740514bc 100644 --- a/reactos/base/shell/cmd/move.c +++ b/reactos/base/shell/cmd/move.c @@ -83,7 +83,7 @@ void GetDirectory (LPTSTR wholepath, LPTSTR directory, BOOL CheckExisting) } -INT cmd_move (LPTSTR cmd, LPTSTR param) +INT cmd_move (LPTSTR param) { LPTSTR *arg; INT argc, i, nFiles; diff --git a/reactos/base/shell/cmd/msgbox.c b/reactos/base/shell/cmd/msgbox.c index 3e92f0ea2b5..31658e11683 100644 --- a/reactos/base/shell/cmd/msgbox.c +++ b/reactos/base/shell/cmd/msgbox.c @@ -22,7 +22,7 @@ #define _SYNTAX_CHECK -INT CommandMsgbox (LPTSTR cmd, LPTSTR param) +INT CommandMsgbox (LPTSTR param) { //used to parse command line diff --git a/reactos/base/shell/cmd/path.c b/reactos/base/shell/cmd/path.c index fc112d17b63..68a5c920351 100644 --- a/reactos/base/shell/cmd/path.c +++ b/reactos/base/shell/cmd/path.c @@ -33,7 +33,7 @@ #define ENV_BUFFER_SIZE 1024 -INT cmd_path (LPTSTR cmd, LPTSTR param) +INT cmd_path (LPTSTR param) { if (!_tcsncmp (param, _T("/?"), 2)) diff --git a/reactos/base/shell/cmd/pause.c b/reactos/base/shell/cmd/pause.c index 6c77b258a44..fc56c1399d8 100644 --- a/reactos/base/shell/cmd/pause.c +++ b/reactos/base/shell/cmd/pause.c @@ -34,10 +34,10 @@ * Remove all hardcode string to En.rc */ -INT cmd_pause (LPTSTR cmd, LPTSTR param) +INT cmd_pause (LPTSTR param) { - TRACE ("cmd_pause: \'%s\' : \'%s\')\n", debugstr_aw(cmd), debugstr_aw(param)); + TRACE ("cmd_pause: \'%s\')\n", debugstr_aw(param)); if (!_tcsncmp (param, _T("/?"), 2)) { diff --git a/reactos/base/shell/cmd/prompt.c b/reactos/base/shell/cmd/prompt.c index 399446c0c00..81e9d17764f 100644 --- a/reactos/base/shell/cmd/prompt.c +++ b/reactos/base/shell/cmd/prompt.c @@ -190,7 +190,7 @@ VOID PrintPrompt(VOID) #ifdef INCLUDE_CMD_PROMPT -INT cmd_prompt (LPTSTR cmd, LPTSTR param) +INT cmd_prompt (LPTSTR param) { if (!_tcsncmp (param, _T("/?"), 2)) { diff --git a/reactos/base/shell/cmd/ren.c b/reactos/base/shell/cmd/ren.c index fb1267c533e..ad1e1de7977 100644 --- a/reactos/base/shell/cmd/ren.c +++ b/reactos/base/shell/cmd/ren.c @@ -40,7 +40,7 @@ enum * file rename internal command. * */ -INT cmd_rename (LPTSTR cmd, LPTSTR param) +INT cmd_rename (LPTSTR param) { LPTSTR *arg = NULL; INT args = 0; diff --git a/reactos/base/shell/cmd/replace.c b/reactos/base/shell/cmd/replace.c index 3c8e6c2c72a..dd3c168ae0d 100644 --- a/reactos/base/shell/cmd/replace.c +++ b/reactos/base/shell/cmd/replace.c @@ -358,7 +358,7 @@ INT recFindSubDirs(DWORD dwFlags, return filesReplaced; } -INT cmd_replace (LPTSTR cmd, LPTSTR param) +INT cmd_replace (LPTSTR param) { LPTSTR *arg; INT argc, i,filesReplaced = 0, nFiles, srcIndex = -1, destIndex = -1; diff --git a/reactos/base/shell/cmd/screen.c b/reactos/base/shell/cmd/screen.c index d3c08990f04..26e66a19f54 100644 --- a/reactos/base/shell/cmd/screen.c +++ b/reactos/base/shell/cmd/screen.c @@ -16,7 +16,7 @@ #ifdef INCLUDE_CMD_SCREEN -INT CommandScreen (LPTSTR cmd, LPTSTR param) +INT CommandScreen (LPTSTR param) { SHORT x,y; BOOL bSkipText = FALSE; diff --git a/reactos/base/shell/cmd/set.c b/reactos/base/shell/cmd/set.c index dda4d945fe0..7c60fe17a3c 100644 --- a/reactos/base/shell/cmd/set.c +++ b/reactos/base/shell/cmd/set.c @@ -51,7 +51,7 @@ skip_ws ( LPCTSTR p ) return p + _tcsspn ( p, _T(" \t") ); } -INT cmd_set (LPTSTR cmd, LPTSTR param) +INT cmd_set (LPTSTR param) { LPTSTR p; diff --git a/reactos/base/shell/cmd/setlocal.c b/reactos/base/shell/cmd/setlocal.c index d939d0c53ed..4bf5022f47c 100644 --- a/reactos/base/shell/cmd/setlocal.c +++ b/reactos/base/shell/cmd/setlocal.c @@ -14,13 +14,13 @@ /* our current default is delayedexpansion */ -INT cmd_setlocal (LPTSTR cmd, LPTSTR param) +INT cmd_setlocal (LPTSTR param) { return 0; } /* endlocal doesn't take any params */ -INT cmd_endlocal (LPTSTR cmd, LPTSTR param) +INT cmd_endlocal (LPTSTR param) { return 0; } diff --git a/reactos/base/shell/cmd/shift.c b/reactos/base/shell/cmd/shift.c index 142a8fc53d3..8e97452546f 100644 --- a/reactos/base/shell/cmd/shift.c +++ b/reactos/base/shell/cmd/shift.c @@ -36,10 +36,10 @@ * */ -INT cmd_shift (LPTSTR cmd, LPTSTR param) +INT cmd_shift (LPTSTR param) { - TRACE ("cmd_shift: (\'%s\', \'%s\')\n", debugstr_aw(cmd), debugstr_aw(param)); + TRACE ("cmd_shift: (\'%s\')\n", debugstr_aw(param)); if (!_tcsncmp (param, _T("/?"), 2)) { diff --git a/reactos/base/shell/cmd/start.c b/reactos/base/shell/cmd/start.c index 1c9d5877e30..dc680352c7c 100644 --- a/reactos/base/shell/cmd/start.c +++ b/reactos/base/shell/cmd/start.c @@ -34,7 +34,7 @@ static TCHAR *GetParameter(TCHAR **pPointer) return start - 1; } -INT cmd_start (LPTSTR First, LPTSTR Rest) +INT cmd_start (LPTSTR Rest) { TCHAR szFullName[CMDLINE_LENGTH]; TCHAR rest[CMDLINE_LENGTH]; diff --git a/reactos/base/shell/cmd/time.c b/reactos/base/shell/cmd/time.c index b62f6417c97..00cbd7cf657 100644 --- a/reactos/base/shell/cmd/time.c +++ b/reactos/base/shell/cmd/time.c @@ -129,7 +129,7 @@ static BOOL ParseTime (LPTSTR s) } -INT cmd_time (LPTSTR cmd, LPTSTR param) +INT cmd_time (LPTSTR param) { LPTSTR *arg; INT argc; diff --git a/reactos/base/shell/cmd/timer.c b/reactos/base/shell/cmd/timer.c index db9c5096eaa..f189509d353 100644 --- a/reactos/base/shell/cmd/timer.c +++ b/reactos/base/shell/cmd/timer.c @@ -60,7 +60,7 @@ PrintElapsedTime (DWORD time,INT format) } -INT CommandTimer (LPTSTR cmd, LPTSTR param) +INT CommandTimer (LPTSTR param) { // all timers are kept static DWORD clksT[10]; diff --git a/reactos/base/shell/cmd/title.c b/reactos/base/shell/cmd/title.c index 7f56fd63485..5e1199fdeb0 100644 --- a/reactos/base/shell/cmd/title.c +++ b/reactos/base/shell/cmd/title.c @@ -14,7 +14,7 @@ #ifdef INCLUDE_CMD_TITLE -INT cmd_title (LPTSTR cmd, LPTSTR param) +INT cmd_title (LPTSTR param) { /* Do nothing if no args */ diff --git a/reactos/base/shell/cmd/type.c b/reactos/base/shell/cmd/type.c index 05ccc7b26f5..d94ca710b97 100644 --- a/reactos/base/shell/cmd/type.c +++ b/reactos/base/shell/cmd/type.c @@ -31,7 +31,7 @@ #ifdef INCLUDE_CMD_TYPE -INT cmd_type (LPTSTR cmd, LPTSTR param) +INT cmd_type (LPTSTR param) { TCHAR buff[256]; HANDLE hFile, hConsoleOut; diff --git a/reactos/base/shell/cmd/ver.c b/reactos/base/shell/cmd/ver.c index 74f3c63b280..55cbd25da8e 100644 --- a/reactos/base/shell/cmd/ver.c +++ b/reactos/base/shell/cmd/ver.c @@ -57,7 +57,7 @@ VOID ShortVersion (VOID) * * */ -INT cmd_ver (LPTSTR cmd, LPTSTR param) +INT cmd_ver (LPTSTR param) { INT i; diff --git a/reactos/base/shell/cmd/verify.c b/reactos/base/shell/cmd/verify.c index af965cbdeab..dba702ea6e1 100644 --- a/reactos/base/shell/cmd/verify.c +++ b/reactos/base/shell/cmd/verify.c @@ -27,7 +27,7 @@ static BOOL bVerify = FALSE; -INT cmd_verify (LPTSTR cmd, LPTSTR param) +INT cmd_verify (LPTSTR param) { if (!_tcsncmp (param, _T("/?"), 2)) { diff --git a/reactos/base/shell/cmd/vol.c b/reactos/base/shell/cmd/vol.c index 7c1b23731ea..0402df8a43a 100644 --- a/reactos/base/shell/cmd/vol.c +++ b/reactos/base/shell/cmd/vol.c @@ -61,7 +61,7 @@ PrintVolumeHeader (LPTSTR pszRootPath) } -INT cmd_vol (LPTSTR cmd, LPTSTR param) +INT cmd_vol (LPTSTR param) { TCHAR szRootPath[] = _T("A:\\"); TCHAR szPath[MAX_PATH]; diff --git a/reactos/base/shell/cmd/window.c b/reactos/base/shell/cmd/window.c index a507504de8c..1fa23da30bc 100644 --- a/reactos/base/shell/cmd/window.c +++ b/reactos/base/shell/cmd/window.c @@ -173,7 +173,7 @@ static INT ServiceActivate (LPTSTR param, HWND hWnd) -INT CommandWindow (LPTSTR cmd, LPTSTR param) +INT CommandWindow (LPTSTR param) { HWND hwnd; @@ -189,7 +189,7 @@ INT CommandWindow (LPTSTR cmd, LPTSTR param) } -INT CommandActivate (LPTSTR cmd, LPTSTR param) +INT CommandActivate (LPTSTR param) { HWND hwnd; LPTSTR *arg; From 2820db81b39e84a50cda1eed12a1d16f2c9f6db7 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Mon, 25 Aug 2008 23:45:27 +0000 Subject: [PATCH 175/324] =?UTF-8?q?Add=20Samuel=20Serapi=C3=B3n=20to=20cre?= =?UTF-8?q?dits=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit svn path=/trunk/; revision=35648 --- reactos/CREDITS | 1 + 1 file changed, 1 insertion(+) diff --git a/reactos/CREDITS b/reactos/CREDITS index f4096a4ca72..a6f22028cf1 100644 --- a/reactos/CREDITS +++ b/reactos/CREDITS @@ -61,6 +61,7 @@ Richard Campbell Robert Bergkvist Robert Dickenson Royce Mitchell III +Samuel Serapiуn Saveliy Tretiakov Stefan Ginsberg Steven Edwards From cbcbf539b8c6c214159557e4b34b70f307c82ded Mon Sep 17 00:00:00 2001 From: Jeffrey Morlan Date: Mon, 25 Aug 2008 23:48:18 +0000 Subject: [PATCH 176/324] cmd_set: - When given a name with no value, show all variables that start with that name. - Implement /P switch - Set nErrorLevel on failure - Make syntax more compatible with Windows (allow any control character to act as space; implement quoting) svn path=/trunk/; revision=35649 --- reactos/base/shell/cmd/set.c | 126 ++++++++++++++++++++++++----------- 1 file changed, 86 insertions(+), 40 deletions(-) diff --git a/reactos/base/shell/cmd/set.c b/reactos/base/shell/cmd/set.c index 7c60fe17a3c..e04211a27ba 100644 --- a/reactos/base/shell/cmd/set.c +++ b/reactos/base/shell/cmd/set.c @@ -48,12 +48,33 @@ seta_eval ( LPCTSTR expr ); static LPCTSTR skip_ws ( LPCTSTR p ) { - return p + _tcsspn ( p, _T(" \t") ); + while (*p && *p <= _T(' ')) + p++; + return p; +} + +/* Used to check for and handle: + * SET "var=value", SET /P "var=prompt", and SET /P var="prompt" */ +static LPTSTR +GetQuotedString(TCHAR *p) +{ + TCHAR *end; + if (*p == _T('"')) + { + p = (LPTSTR)skip_ws(p + 1); + /* If a matching quote is found, truncate the string */ + end = _tcsrchr(p, _T('"')); + if (end) + *end = _T('\0'); + } + return p; } INT cmd_set (LPTSTR param) { LPTSTR p; + LPTSTR lpEnv; + LPTSTR lpOutput; if ( !_tcsncmp (param, _T("/?"), 2) ) { @@ -61,26 +82,20 @@ INT cmd_set (LPTSTR param) return 0; } + param = (LPTSTR)skip_ws(param); + /* if no parameters, show the environment */ if (param[0] == _T('\0')) { - LPTSTR lpEnv; - LPTSTR lpOutput; - INT len; - lpEnv = (LPTSTR)GetEnvironmentStrings (); if (lpEnv) { lpOutput = lpEnv; while (*lpOutput) { - len = _tcslen(lpOutput); - if (len) - { - if (*lpOutput != _T('=')) - ConOutPuts (lpOutput); - lpOutput += (len + 1); - } + if (*lpOutput != _T('=')) + ConOutPuts(lpOutput); + lpOutput += _tcslen(lpOutput) + 1; } FreeEnvironmentStrings (lpEnv); } @@ -97,16 +112,35 @@ INT cmd_set (LPTSTR param) /*might seem random but this is what windows xp does */ nErrorLevel = 9165; } - /* TODO FIXME - what are we supposed to return? */ - return Success; + return !Success; } - if ( !_tcsnicmp (param, _T("/"), 1) ) + if (!_tcsnicmp(param, _T("/P"), 2)) { - ConErrResPrintf (STRING_SYNTAX_COMMAND_INCORRECT, param); + TCHAR value[1023]; + param = GetQuotedString((LPTSTR)skip_ws(param + 2)); + p = _tcschr(param, _T('=')); + if (!p) + { + ConErrResPuts(STRING_SYNTAX_COMMAND_INCORRECT); + nErrorLevel = 1; + return 1; + } + + *p++ = _T('\0'); + ConOutPrintf(_T("%s"), GetQuotedString(p)); + ConInString(value, 1023); + + if (!*value || !SetEnvironmentVariable(param, value)) + { + nErrorLevel = 1; + return 1; + } return 0; } + param = GetQuotedString(param); + p = _tcschr (param, _T('=')); if (p) { @@ -114,41 +148,53 @@ INT cmd_set (LPTSTR param) if (p == param) { /* handle set =val case */ - ConErrResPrintf (STRING_SYNTAX_COMMAND_INCORRECT, param); - return 0; + ConErrResPuts(STRING_SYNTAX_COMMAND_INCORRECT); + nErrorLevel = 1; + return 1; } - *p = _T('\0'); - p++; - if (*p == _T('\0')) + *p++ = _T('\0'); + if (!SetEnvironmentVariable(param, p)) { - p = NULL; + nErrorLevel = 1; + return 1; } - SetEnvironmentVariable (param, p); } else { - /* display environment variable */ - LPTSTR pszBuffer; - DWORD dwBuffer; + /* display all environment variable with the given prefix */ + BOOL bFound = FALSE; - pszBuffer = (LPTSTR)cmd_alloc (ENV_BUFFER_SIZE * sizeof(TCHAR)); - dwBuffer = GetEnvironmentVariable (param, pszBuffer, ENV_BUFFER_SIZE); - if (dwBuffer == 0) + while (_istspace(*param) || *param == _T(',') || *param == _T(';')) + param++; + + p = _tcsrchr(param, _T(' ')); + if (!p) + p = param + _tcslen(param); + *p = _T('\0'); + + lpEnv = GetEnvironmentStrings(); + if (lpEnv) + { + lpOutput = lpEnv; + while (*lpOutput) + { + if (!_tcsnicmp(lpOutput, param, p - param)) + { + ConOutPuts(lpOutput); + bFound = TRUE; + } + lpOutput += _tcslen(lpOutput) + 1; + } + FreeEnvironmentStrings(lpEnv); + } + + if (!bFound) { ConErrResPrintf (STRING_PATH_ERROR, param); - return 0; + nErrorLevel = 1; + return 1; } - else if (dwBuffer > ENV_BUFFER_SIZE) - { - pszBuffer = (LPTSTR)cmd_realloc (pszBuffer, dwBuffer * sizeof (TCHAR)); - GetEnvironmentVariable (param, pszBuffer, dwBuffer); - } - ConOutPrintf (_T("%s\n"), pszBuffer); - - cmd_free (pszBuffer); - - return 0; } return 0; From b47d70ccd3acf8bf313188647e77feab2d3cae98 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Tue, 26 Aug 2008 02:11:40 +0000 Subject: [PATCH 177/324] - Merge r35653 from aicom-network-fixes - Fixes a major leak when closing Firefox svn path=/trunk/; revision=35654 --- reactos/lib/drivers/ip/transport/tcp/tcp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/reactos/lib/drivers/ip/transport/tcp/tcp.c b/reactos/lib/drivers/ip/transport/tcp/tcp.c index 86dcb16727f..bae81cab3a6 100644 --- a/reactos/lib/drivers/ip/transport/tcp/tcp.c +++ b/reactos/lib/drivers/ip/transport/tcp/tcp.c @@ -836,6 +836,7 @@ VOID TCPRemoveIRP( PCONNECTION_ENDPOINT Endpoint, PIRP Irp ) { if( Bucket->Request.RequestContext == Irp ) { RemoveEntryList( &Bucket->Entry ); + PoolFreeBuffer( Bucket ); break; } } From 0c9b7b6aa018e3293bd7e6adc475390b57e633ae Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Tue, 26 Aug 2008 04:19:07 +0000 Subject: [PATCH 178/324] - Merge r35656 from aicom-network-fixes - Fixes more leaks during general network use svn path=/trunk/; revision=35658 --- reactos/lib/drivers/ip/transport/tcp/tcp.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/reactos/lib/drivers/ip/transport/tcp/tcp.c b/reactos/lib/drivers/ip/transport/tcp/tcp.c index bae81cab3a6..7468b456cd7 100644 --- a/reactos/lib/drivers/ip/transport/tcp/tcp.c +++ b/reactos/lib/drivers/ip/transport/tcp/tcp.c @@ -89,8 +89,10 @@ static VOID HandleSignalledConnection( PCONNECTION_ENDPOINT Connection, if( Status == STATUS_PENDING ) { InsertHeadList( &Connection->ListenRequest, &Bucket->Entry ); break; - } else + } else { Complete( Bucket->Request.RequestContext, Status, 0 ); + PoolFreeBuffer( Bucket ); + } } } @@ -141,6 +143,7 @@ static VOID HandleSignalledConnection( PCONNECTION_ENDPOINT Connection, Complete( Bucket->Request.RequestContext, STATUS_SUCCESS, Received ); + PoolFreeBuffer( Bucket ); } else if( Status == STATUS_PENDING ) { InsertHeadList ( &Connection->ReceiveRequest, &Bucket->Entry ); @@ -150,6 +153,7 @@ static VOID HandleSignalledConnection( PCONNECTION_ENDPOINT Connection, ("Completing Receive request: %x %x\n", Bucket->Request, Status)); Complete( Bucket->Request.RequestContext, Status, 0 ); + PoolFreeBuffer( Bucket ); } } } @@ -198,6 +202,7 @@ static VOID HandleSignalledConnection( PCONNECTION_ENDPOINT Connection, Complete( Bucket->Request.RequestContext, STATUS_SUCCESS, Sent ); + PoolFreeBuffer( Bucket ); } else if( Status == STATUS_PENDING ) { InsertHeadList ( &Connection->SendRequest, &Bucket->Entry ); @@ -207,6 +212,7 @@ static VOID HandleSignalledConnection( PCONNECTION_ENDPOINT Connection, ("Completing Send request: %x %x\n", Bucket->Request, Status)); Complete( Bucket->Request.RequestContext, Status, 0 ); + PoolFreeBuffer( Bucket ); } } } @@ -225,13 +231,15 @@ static VOID HandleSignalledConnection( PCONNECTION_ENDPOINT Connection, ListsToErase[2] = &Connection->ConnectRequest; IrpStatus [2] = STATUS_UNSUCCESSFUL; ListsToErase[3] = 0; + IrpStatus [3] = 0; for( i = 0; ListsToErase[i]; i++ ) { while( !IsListEmpty( ListsToErase[i] ) ) { Entry = RemoveHeadList( ListsToErase[i] ); Bucket = CONTAINING_RECORD( Entry, TDI_BUCKET, Entry ); Complete = Bucket->Request.RequestNotifyObject; - Complete( Bucket->Request.RequestContext, STATUS_SUCCESS, 0 ); + Complete( Bucket->Request.RequestContext, IrpStatus[i], 0 ); + PoolFreeBuffer( Bucket ); } } } From 4cd1c282bd13fd0d4137fa7cafe2a70487552bef Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Tue, 26 Aug 2008 06:24:33 +0000 Subject: [PATCH 179/324] - Add a small hack for executing shortcuts to cpl files - Remove unneeded CLSID_UnixFolder registration - Fix Bitbucket, Nethood shell folder registration attributes svn path=/trunk/; revision=35659 --- reactos/dll/win32/shell32/regsvr.c | 24 +++--------------------- reactos/dll/win32/shell32/shelllink.c | 22 ++++++++++++---------- 2 files changed, 15 insertions(+), 31 deletions(-) diff --git a/reactos/dll/win32/shell32/regsvr.c b/reactos/dll/win32/shell32/regsvr.c index c127059a5ec..cd2ca62f767 100644 --- a/reactos/dll/win32/shell32/regsvr.c +++ b/reactos/dll/win32/shell32/regsvr.c @@ -626,8 +626,8 @@ static struct regsvr_coclass const coclass_list[] = { NULL, "shell32.dll", "Apartment", - SHELLFOLDER_ATTRIBUTES, - SFGAO_FOLDER, + SHELLFOLDER_ATTRIBUTES|SHELLFOLDER_CALLFORATTRIBUTES, + SFGAO_FOLDER|SFGAO_HASPROPSHEET, 0, NULL, NULL, @@ -674,24 +674,6 @@ static struct regsvr_coclass const coclass_list[] = { "shell32.dll", "Apartment", }, - { &CLSID_UnixFolder, - "/", - 0, - NULL, - "shell32.dll", - "Apartment", - SHELLFOLDER_WANTSFORPARSING - }, - { &CLSID_UnixDosFolder, - "/", - 0, - NULL, - "shell32.dll", - "Apartment", - SHELLFOLDER_WANTSFORPARSING|SHELLFOLDER_ATTRIBUTES|SHELLFOLDER_CALLFORATTRIBUTES, - SFGAO_FILESYSANCESTOR|SFGAO_FOLDER|SFGAO_HASSUBFOLDER, - SFGAO_FILESYSTEM - }, { &CLSID_FolderShortcut, "Foldershortcut", 0, @@ -718,7 +700,7 @@ static struct regsvr_coclass const coclass_list[] = { NULL, "shell32.dll", "Apartment", - SHELLFOLDER_ATTRIBUTES, + SHELLFOLDER_ATTRIBUTES|SHELLFOLDER_CALLFORATTRIBUTES, SFGAO_FOLDER|SFGAO_DROPTARGET|SFGAO_HASPROPSHEET, 0, NULL, diff --git a/reactos/dll/win32/shell32/shelllink.c b/reactos/dll/win32/shell32/shelllink.c index 2e174836c75..7cf20e75d25 100644 --- a/reactos/dll/win32/shell32/shelllink.c +++ b/reactos/dll/win32/shell32/shelllink.c @@ -2512,7 +2512,7 @@ ShellLink_QueryContextMenu( IContextMenu* iface, HMENU hmenu, UINT indexMenu, mii.fType = MFT_STRING; if (!InsertMenuItemW( hmenu, indexMenu, TRUE, &mii )) return E_FAIL; - This->iIdOpen = 0; + This->iIdOpen = 1; return MAKE_HRESULT( SEVERITY_SUCCESS, 0, id ); } @@ -2788,7 +2788,8 @@ static HRESULT WINAPI ShellLink_InvokeCommand( IContextMenu* iface, LPCMINVOKECOMMANDINFO lpici ) { IShellLinkImpl *This = impl_from_IContextMenu(iface); - static const WCHAR szOpen[] = { 'O','p','e','n',0 }; + static const WCHAR szOpen[] = { 'o','p','e','n',0 }; + static const WCHAR szCplOpen[] = { 'c','p','l','o','p','e','n',0 }; SHELLEXECUTEINFOW sei; HWND hwnd = NULL; /* FIXME: get using interface set from IObjectWithSite */ LPWSTR args = NULL; @@ -2800,16 +2801,12 @@ ShellLink_InvokeCommand( IContextMenu* iface, LPCMINVOKECOMMANDINFO lpici ) if ( lpici->cbSize < sizeof (CMINVOKECOMMANDINFO) ) return E_INVALIDARG; - if ( lpici->lpVerb != MAKEINTRESOURCEA(This->iIdOpen) ) - { - ERR("Unknown id %d != %d\n", (INT)lpici->lpVerb, This->iIdOpen ); - return E_INVALIDARG; - } - r = IShellLinkW_Resolve( (IShellLinkW*)&(This->lpvtblw), hwnd, 0 ); if ( FAILED( r ) ) + { + TRACE("failed to resolve component with error 0x%08x", r); return r; - + } if ( This->sComponent ) { path = shelllink_get_msi_component_path( This->sComponent ); @@ -2847,11 +2844,16 @@ ShellLink_InvokeCommand( IContextMenu* iface, LPCMINVOKECOMMANDINFO lpici ) sei.fMask = SEE_MASK_UNICODE | (lpici->fMask & (SEE_MASK_NOASYNC|SEE_MASK_ASYNCOK|SEE_MASK_FLAG_NO_UI)); sei.lpFile = path; sei.nShow = This->iShowCmd; - sei.lpIDList = This->pPidl; sei.lpDirectory = This->sWorkDir; sei.lpParameters = args; sei.lpVerb = szOpen; + // HACK for ShellExecuteExW + if (!wcsstr(This->sPath, L".cpl")) + sei.lpVerb = szOpen; + else + sei.lpVerb = szCplOpen; + if( ShellExecuteExW( &sei ) ) r = S_OK; else From 8221cb697c2ff4a3aeec34b7b815f34d204ee8cf Mon Sep 17 00:00:00 2001 From: Andrew Munger Date: Tue, 26 Aug 2008 09:38:12 +0000 Subject: [PATCH 180/324] Allocate buffer from Non-paged pool, like most everything else in KDBG. svn path=/trunk/; revision=35660 --- reactos/ntoskrnl/kdbg/kdb_symbols.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/kdbg/kdb_symbols.c b/reactos/ntoskrnl/kdbg/kdb_symbols.c index 7d582651c99..bfb5e378b33 100644 --- a/reactos/ntoskrnl/kdbg/kdb_symbols.c +++ b/reactos/ntoskrnl/kdbg/kdb_symbols.c @@ -510,7 +510,7 @@ KdbSymLoadUserModuleSymbols(IN PLDR_DATA_TABLE_ENTRY LdrModule) KernelName.MaximumLength = sizeof(Prefix) + LdrModule->FullDllName.Length; KernelName.Length = KernelName.MaximumLength - sizeof(WCHAR); - KernelName.Buffer = ExAllocatePoolWithTag(PagedPool, KernelName.MaximumLength, TAG_KDBS); + KernelName.Buffer = ExAllocatePoolWithTag(NonPagedPool, KernelName.MaximumLength, TAG_KDBS); if (NULL == KernelName.Buffer) { return; From 6c68a50dd4c6a4638db8686aa9628e4f0f6710c3 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Tue, 26 Aug 2008 11:30:02 +0000 Subject: [PATCH 181/324] - Add an ability to have VMWare video driver installed without inserting CD. Just copy 4 files (vmx_fb.dll, vmx_mode.dll, vmx_svga.sys and vmx_svga.inf) from VMWare Tools CD to your reactos/modules/windows directory and build a bootcd. You'll just need to choose a resolution and a bit depth in 2nd stage setup. svn path=/trunk/; revision=35667 --- reactos/boot/bootdata/packages/reactos.dff | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/reactos/boot/bootdata/packages/reactos.dff b/reactos/boot/bootdata/packages/reactos.dff index 51b23c557db..43283178f06 100644 --- a/reactos/boot/bootdata/packages/reactos.dff +++ b/reactos/boot/bootdata/packages/reactos.dff @@ -677,3 +677,7 @@ modules\wallpaper\lake.bmp 4 o ; Native libraries modules\windows\mfc42.dll 1 optional +modules\windows\vmx_fb.dll 1 optional +modules\windows\vmx_mode.dll 1 optional +modules\windows\vmx_svga.sys 2 optional +modules\windows\vmx_svga.inf 6 optional From 7e88d259cb1776391b347fff946d8ed38caf87e8 Mon Sep 17 00:00:00 2001 From: Art Yerkes Date: Tue, 26 Aug 2008 13:28:44 +0000 Subject: [PATCH 182/324] Commit patches from bugboy, fixing bug 2392. svn path=/trunk/; revision=35669 --- reactos/dll/cpl/ncpa/tcpip_properties.c | 14 ++++++++++++-- reactos/dll/win32/iphlpapi/iphlpapi_main.c | 19 +++++++++++++++++-- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/reactos/dll/cpl/ncpa/tcpip_properties.c b/reactos/dll/cpl/ncpa/tcpip_properties.c index be5d92a553f..fd1eeb47121 100644 --- a/reactos/dll/cpl/ncpa/tcpip_properties.c +++ b/reactos/dll/cpl/ncpa/tcpip_properties.c @@ -238,6 +238,7 @@ InternTCPIPSettings(HWND Dlg, PTCPIP_PROPERTIES_DATA DlgData) { BOOL SetDnsByDhcp; TCHAR pszRegKey[MAX_PATH]; const char *AddressString; + char emptyString[]="\0"; DWORD Address = 0; LONG rc; HKEY hKey = NULL; @@ -282,7 +283,7 @@ InternTCPIPSettings(HWND Dlg, PTCPIP_PROPERTIES_DATA DlgData) { goto cleanup; if (DlgData->Dns1 == INADDR_NONE) { - rc = RegDeleteValue(hKey, _T("NameServer")); + rc = RegSetValueExA(hKey, "NameServer",0, REG_SZ, (const BYTE*)emptyString, strlen(emptyString) + 1); if (rc != ERROR_SUCCESS && rc != ERROR_FILE_NOT_FOUND) goto cleanup; } @@ -445,6 +446,7 @@ LoadDataFromInfo(PTCPIP_PROPERTIES_DATA DlgData, IP_ADAPTER_INFO *Info) char Dns[MAX_PATH]; DWORD Size; DWORD Type; + DWORD dwError; char *NextDnsServer; DlgData->AdapterName = Info->AdapterName; @@ -469,7 +471,15 @@ LoadDataFromInfo(PTCPIP_PROPERTIES_DATA DlgData, IP_ADAPTER_INFO *Info) swprintf(RegKey, L"SYSTEM\\CurrentControlSet\\Services\\TCPIP\\Parameters\\Interfaces\\%S", Info->AdapterName); - if (ERROR_SUCCESS == RegOpenKeyW(HKEY_LOCAL_MACHINE, RegKey, &hKey)) { + dwError = RegOpenKeyW(HKEY_LOCAL_MACHINE, RegKey, &hKey); + if (dwError != ERROR_SUCCESS) + { + /* Try and fall back on the NameServer in Parameters */ + swprintf(RegKey, + L"SYSTEM\\CurrentControlSet\\Services\\TCPIP\\Parameters\\"); + } + dwError = RegOpenKeyW(HKEY_LOCAL_MACHINE, RegKey, &hKey); + if (ERROR_SUCCESS == dwError) { Size = sizeof(Dns); RegQueryValueExA(hKey, "NameServer", NULL, &Type, (BYTE *)Dns, &Size); diff --git a/reactos/dll/win32/iphlpapi/iphlpapi_main.c b/reactos/dll/win32/iphlpapi/iphlpapi_main.c index 09555bc3bc0..f8dc48f7f74 100644 --- a/reactos/dll/win32/iphlpapi/iphlpapi_main.c +++ b/reactos/dll/win32/iphlpapi/iphlpapi_main.c @@ -88,6 +88,19 @@ DWORD WINAPI AddIPAddress(IPAddr Address, IPMask Netmask, DWORD IfIndex, PULONG return RtlNtStatusToDosError(addIPAddress(Address, Netmask, IfIndex, NteContext, NteInstance)); } +DWORD getInterfaceGatewayByIndex(DWORD index) +{ + DWORD ndx, retVal = 0, numRoutes = getNumRoutes(); + RouteTable *table = getRouteTable(); + + for (ndx = 0; ndx < numRoutes; ndx++) + { + if ((table->routes[ndx].ifIndex == (index - 1)) && (table->routes[ndx].dest == 0)) + retVal = table->routes[ndx].gateway; + } + HeapFree(GetProcessHeap(), 0, table); + return retVal; +} /****************************************************************** * AllocateAndGetIfTableFromStack (IPHLPAPI.@) @@ -640,6 +653,8 @@ DWORD WINAPI GetAdaptersInfo(PIP_ADAPTER_INFO pAdapterInfo, PULONG pOutBufLen) ptr->IpAddressList.IpAddress.String); toIPAddressString(getInterfaceMaskByIndex(table->indexes[ndx]), ptr->IpAddressList.IpMask.String); + toIPAddressString(getInterfaceGatewayByIndex(table->indexes[ndx]), + ptr->GatewayList.IpAddress.String); getDhcpInfoForAdapter(table->indexes[ndx], &dhcpEnabled, &dhcpServer, &ptr->LeaseObtained, &ptr->LeaseExpires); @@ -1160,7 +1175,7 @@ DWORD WINAPI GetIpForwardTable(PMIB_IPFORWARDTABLE pIpForwardTable, PULONG pdwSi pIpForwardTable->dwNumEntries = table->numRoutes; for (ndx = 0; ndx < numRoutes; ndx++) { pIpForwardTable->table[ndx].dwForwardIfIndex = - table->routes[ndx].ifIndex; + table->routes[ndx].ifIndex + 1; pIpForwardTable->table[ndx].dwForwardDest = table->routes[ndx].dest; pIpForwardTable->table[ndx].dwForwardMask = @@ -1190,7 +1205,7 @@ DWORD WINAPI GetIpForwardTable(PMIB_IPFORWARDTABLE pIpForwardTable, PULONG pdwSi sizeof(MIB_IPFORWARDROW), IpForwardTableSorter); ret = NO_ERROR; } - free(table); + HeapFree(GetProcessHeap(), 0, table); } else ret = ERROR_OUTOFMEMORY; From a9431cc5965065b44dc3b71d9a289dc2a2a06105 Mon Sep 17 00:00:00 2001 From: Jeffrey Morlan Date: Tue, 26 Aug 2008 14:45:37 +0000 Subject: [PATCH 183/324] Prohibit an empty name in RtlSetEnvironmentVariable svn path=/trunk/; revision=35671 --- reactos/lib/rtl/env.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/reactos/lib/rtl/env.c b/reactos/lib/rtl/env.c index cdce0379083..2e437f71116 100644 --- a/reactos/lib/rtl/env.c +++ b/reactos/lib/rtl/env.c @@ -282,6 +282,10 @@ RtlSetEnvironmentVariable(PWSTR *Environment, DPRINT("RtlSetEnvironmentVariable(Environment %p Name %wZ Value %wZ)\n", Environment, Name, Value); + /* Variable name must not be empty */ + if (Name->Length < sizeof(WCHAR)) + return STATUS_INVALID_PARAMETER; + /* Variable names can't contain a '=' except as a first character. */ for (wcs = Name->Buffer + 1; wcs < Name->Buffer + (Name->Length / sizeof(WCHAR)); From fc46305c63811938cacacbd97522c8fd5b933042 Mon Sep 17 00:00:00 2001 From: Jeffrey Morlan Date: Tue, 26 Aug 2008 15:28:29 +0000 Subject: [PATCH 184/324] - RtlSetEnvironmentVariable: To delete a variable, it is necessary to pass a NULL pointer as the value; passing an empty string should create an empty variable. Remove Value->Length > 0 check. - SetEnvironmentVariable(A|W): When given a NULL value, pass NULL to RtlSetEnvironmentVariable. - cmd_set: When given an empty value, pass NULL to SetEnvironmentVariable. svn path=/trunk/; revision=35672 --- reactos/base/shell/cmd/set.c | 2 +- reactos/dll/win32/kernel32/misc/env.c | 47 +++++++++++++++++++-------- reactos/lib/rtl/env.c | 2 +- 3 files changed, 35 insertions(+), 16 deletions(-) diff --git a/reactos/base/shell/cmd/set.c b/reactos/base/shell/cmd/set.c index e04211a27ba..115b837787e 100644 --- a/reactos/base/shell/cmd/set.c +++ b/reactos/base/shell/cmd/set.c @@ -154,7 +154,7 @@ INT cmd_set (LPTSTR param) } *p++ = _T('\0'); - if (!SetEnvironmentVariable(param, p)) + if (!SetEnvironmentVariable(param, *p ? p : NULL)) { nErrorLevel = 1; return 1; diff --git a/reactos/dll/win32/kernel32/misc/env.c b/reactos/dll/win32/kernel32/misc/env.c index b5aa8c5e6cb..c4f0ee25ae8 100644 --- a/reactos/dll/win32/kernel32/misc/env.c +++ b/reactos/dll/win32/kernel32/misc/env.c @@ -193,18 +193,27 @@ SetEnvironmentVariableA ( &VarName, TRUE); - RtlInitAnsiString (&VarValue, - (LPSTR)lpValue); - RtlAnsiStringToUnicodeString (&VarValueU, - &VarValue, - TRUE); + if (lpValue) + { + RtlInitAnsiString (&VarValue, + (LPSTR)lpValue); + RtlAnsiStringToUnicodeString (&VarValueU, + &VarValue, + TRUE); - Status = RtlSetEnvironmentVariable (NULL, - &VarNameU, - &VarValueU); + Status = RtlSetEnvironmentVariable (NULL, + &VarNameU, + &VarValueU); + RtlFreeUnicodeString (&VarValueU); + } + else + { + Status = RtlSetEnvironmentVariable (NULL, + &VarNameU, + NULL); + } RtlFreeUnicodeString (&VarNameU); - RtlFreeUnicodeString (&VarValueU); if (!NT_SUCCESS(Status)) { @@ -235,12 +244,22 @@ SetEnvironmentVariableW ( RtlInitUnicodeString (&VarName, lpName); - RtlInitUnicodeString (&VarValue, - lpValue); + if (lpValue) + { + RtlInitUnicodeString (&VarValue, + lpValue); + + Status = RtlSetEnvironmentVariable (NULL, + &VarName, + &VarValue); + } + else + { + Status = RtlSetEnvironmentVariable (NULL, + &VarName, + NULL); + } - Status = RtlSetEnvironmentVariable (NULL, - &VarName, - &VarValue); if (!NT_SUCCESS(Status)) { SetLastErrorByStatus (Status); diff --git a/reactos/lib/rtl/env.c b/reactos/lib/rtl/env.c index 2e437f71116..86a418ed6c7 100644 --- a/reactos/lib/rtl/env.c +++ b/reactos/lib/rtl/env.c @@ -355,7 +355,7 @@ RtlSetEnvironmentVariable(PWSTR *Environment, } found: - if (Value != NULL && Value->Length > 0) + if (Value != NULL) { hole_len = tail - hole; /* calculate new environment size */ From 050ca45f9033954ab355fb7af285c9cbff5cf7c7 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Tue, 26 Aug 2008 15:50:17 +0000 Subject: [PATCH 185/324] shell32 update (1/2) - The Fonts Shell Folder && Admin Shell Folder GUID is not documented in shlguid.h - Fix api declaration of SHCreateStdEnumFmtEtc, GetFileNameFromBrowse, SHCreateDirectory, SHCreateDirectoryExA, SHCreateDirectoryExW, Dad_AutoScroll, CDefFolderMenu_Create2, SHChangeNotifyRegister - Fix EXP_DARWIN_LINK && OPENASINFO structure - Remove CSIDL_FOLDER_MASK undocumented shellview ids svn path=/trunk/; revision=35673 --- reactos/include/psdk/shlguid.h | 2 - reactos/include/psdk/shlobj.h | 62 +++++++------------------- reactos/include/psdk/winuser.h | 7 +++ reactos/include/reactos/wine/winuser.h | 9 ++-- 4 files changed, 28 insertions(+), 52 deletions(-) diff --git a/reactos/include/psdk/shlguid.h b/reactos/include/psdk/shlguid.h index 49060f374dc..942421632fc 100644 --- a/reactos/include/psdk/shlguid.h +++ b/reactos/include/psdk/shlguid.h @@ -116,8 +116,6 @@ DEFINE_GUID(CLSID_ControlPanel, 0x21EC2020, 0x3AEA, 0x1069, 0xA2, 0xDD, 0x08, 0x DEFINE_GUID(CLSID_Printers, 0x2227A280, 0x3AEA, 0x1069, 0xA2, 0xDE, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D); DEFINE_GUID(CLSID_MyDocuments, 0x450d8fba, 0xad25, 0x11d0, 0x98, 0xa8, 0x08, 0x00, 0x36, 0x1b, 0x11, 0x03); DEFINE_GUID(CLSID_FolderShortcut, 0x0AFACED1, 0xE828, 0x11D1, 0x91, 0x87, 0xB5, 0x32, 0xF1, 0xE9, 0x57, 0x5D); -DEFINE_GUID(CLSID_FontsFolderShortcut, 0xD20EA4E1, 0x3957, 0x11D2, 0xA4, 0x0B, 0x0C, 0x50, 0x20, 0x52, 0x41,0x52); -DEFINE_GUID(CLSID_AdminFolderShortcut, 0xD20EA4E1, 0x3957, 0x11D2, 0xA4, 0x0B, 0x0C, 0x50, 0x20, 0x52, 0x41, 0x53); DEFINE_GUID(IID_IQueryAssociations, 0xc46ca590, 0x3c3f, 0x11d2, 0xbe, 0xe6, 0x00, 0x00, 0xf8, 0x05, 0xca, 0x57); DEFINE_GUID(CLSID_DragDropHelper, 0x4657278a, 0x411b, 0x11d2, 0x83, 0x9a, 0x00, 0xc0, 0x4f, 0xd9, 0x18, 0xd0); diff --git a/reactos/include/psdk/shlobj.h b/reactos/include/psdk/shlobj.h index f60920edb06..55f1c3c0756 100644 --- a/reactos/include/psdk/shlobj.h +++ b/reactos/include/psdk/shlobj.h @@ -46,12 +46,12 @@ HPSXA WINAPI SHCreatePropSheetExtArray(HKEY,LPCWSTR,UINT); DWORD WINAPI SHCLSIDFromStringA(LPCSTR,CLSID*); DWORD WINAPI SHCLSIDFromStringW(LPCWSTR,CLSID*); #define SHCLSIDFromString WINELIB_NAME_AW(SHCLSIDFromString) -HRESULT WINAPI SHCreateStdEnumFmtEtc(DWORD,const FORMATETC *,IEnumFORMATETC**); +HRESULT WINAPI SHCreateStdEnumFmtEtc(UINT,const FORMATETC *,IEnumFORMATETC**); void WINAPI SHDestroyPropSheetExtArray(HPSXA); BOOL WINAPI SHFindFiles(LPCITEMIDLIST,LPCITEMIDLIST); DWORD WINAPI SHFormatDrive(HWND,UINT,UINT,UINT); void WINAPI SHFree(LPVOID); -BOOL WINAPI GetFileNameFromBrowse(HWND,LPSTR,DWORD,LPCSTR,LPCSTR,LPCSTR,LPCSTR); +BOOL WINAPI GetFileNameFromBrowse(HWND,LPWSTR,UINT,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR); HRESULT WINAPI SHGetInstanceExplorer(IUnknown**); HRESULT WINAPI SHGetFolderPathAndSubDirA(HWND,int,HANDLE,DWORD,LPCSTR,LPSTR); HRESULT WINAPI SHGetFolderPathAndSubDirW(HWND,int,HANDLE,DWORD,LPCWSTR,LPWSTR); @@ -151,44 +151,9 @@ typedef struct #define SV_CLASS_NAME ("SHELLDLL_DefView") #define FCIDM_SHVIEWFIRST 0x0000 -/* undocumented */ -#define FCIDM_SHVIEW_ARRANGE 0x7001 -#define FCIDM_SHVIEW_DELETE 0x7011 -#define FCIDM_SHVIEW_PROPERTIES 0x7013 -#define FCIDM_SHVIEW_CUT 0x7018 -#define FCIDM_SHVIEW_COPY 0x7019 -#define FCIDM_SHVIEW_INSERT 0x701A -#define FCIDM_SHVIEW_UNDO 0x701B -#define FCIDM_SHVIEW_INSERTLINK 0x701C -#define FCIDM_SHVIEW_SELECTALL 0x7021 -#define FCIDM_SHVIEW_INVERTSELECTION 0x7022 - -#define FCIDM_SHVIEW_BIGICON 0x7029 -#define FCIDM_SHVIEW_SMALLICON 0x702A -#define FCIDM_SHVIEW_LISTVIEW 0x702B -#define FCIDM_SHVIEW_REPORTVIEW 0x702C -/* 0x7030-0x703f are used by the shellbrowser */ -#define FCIDM_SHVIEW_AUTOARRANGE 0x7031 -#define FCIDM_SHVIEW_SNAPTOGRID 0x7032 - -#define FCIDM_SHVIEW_HELP 0x7041 -#define FCIDM_SHVIEW_RENAME 0x7050 -#define FCIDM_SHVIEW_CREATELINK 0x7051 -#define FCIDM_SHVIEW_NEWLINK 0x7052 -#define FCIDM_SHVIEW_NEWFOLDER 0x7053 - -#define FCIDM_SHVIEW_REFRESH 0x7100 /* FIXME */ -#define FCIDM_SHVIEW_EXPLORE 0x7101 /* FIXME */ -#define FCIDM_SHVIEW_OPEN 0x7102 /* FIXME */ - #define FCIDM_SHVIEWLAST 0x7fff #define FCIDM_BROWSERFIRST 0xA000 /* undocumented toolbar items from stddlg's*/ -#define FCIDM_TB_UPFOLDER 0xA001 -#define FCIDM_TB_NEWFOLDER 0xA002 -#define FCIDM_TB_SMALLICON 0xA003 -#define FCIDM_TB_REPORTVIEW 0xA004 -#define FCIDM_TB_DESKTOP 0xA005 /* FIXME */ #define FCIDM_BROWSERLAST 0xbf00 #define FCIDM_GLOBALFIRST 0x8000 @@ -1147,7 +1112,13 @@ typedef struct { } NT_FE_CONSOLE_PROPS, *LPNT_FE_CONSOLE_PROPS; typedef struct { + +#ifdef __cplusplus DATABLOCK_HEADER dbh; +#else + DWORD cbSize; + DWORD dwSignature; +#endif CHAR szDarwinID[MAX_PATH]; WCHAR szwDarwinID[MAX_PATH]; } EXP_DARWIN_LINK, *LPEXP_DARWIN_LINK; @@ -1188,7 +1159,7 @@ typedef struct _SHChangeProductKeyAsIDList { } SHChangeProductKeyAsIDList, *LPSHChangeProductKeyAsIDList; ULONG WINAPI SHChangeNotifyRegister(HWND hwnd, int fSources, LONG fEvents, UINT wMsg, - int cEntries, SHChangeNotifyEntry *pshcne); + int cEntries, const SHChangeNotifyEntry *pshcne); BOOL WINAPI SHChangeNotifyDeregister(ULONG ulID); BOOL WINAPI SHChangeNotification_Unlock(HANDLE hLock); @@ -1197,9 +1168,9 @@ HRESULT WINAPI SHGetRealIDL(IShellFolder *psf, LPCITEMIDLIST pidlSimple, LPITEMI /**************************************************************************** * SHCreateDirectory API */ -DWORD WINAPI SHCreateDirectory(HWND, LPCVOID); -int WINAPI SHCreateDirectoryExA(HWND, LPCSTR, LPSECURITY_ATTRIBUTES); -int WINAPI SHCreateDirectoryExW(HWND, LPCWSTR, LPSECURITY_ATTRIBUTES); +DWORD WINAPI SHCreateDirectory(HWND, LPCWSTR); +int WINAPI SHCreateDirectoryExA(HWND, LPCSTR, const SECURITY_ATTRIBUTES*); +int WINAPI SHCreateDirectoryExW(HWND, LPCWSTR, const SECURITY_ATTRIBUTES*); /**************************************************************************** * SHGetSpecialFolderLocation API @@ -1277,7 +1248,6 @@ HRESULT WINAPI SHGetFolderPathW(HWND hwnd, int nFolder, HANDLE hToken, DWORD dwF #define CSIDL_CDBURN_AREA 0x003b #define CSIDL_COMPUTERSNEARME 0x003d #define CSIDL_PROFILES 0x003e -#define CSIDL_FOLDER_MASK 0x00ff #define CSIDL_FLAG_PER_USER_INIT 0x0800 #define CSIDL_FLAG_NO_ALIAS 0x1000 #define CSIDL_FLAG_DONT_VERIFY 0x4000 @@ -1417,7 +1387,7 @@ BOOL WINAPI DAD_DragEnterEx(HWND,POINT); BOOL WINAPI DAD_DragEnterEx2(HWND,POINT,IDataObject*); BOOL WINAPI DAD_DragMove(POINT); BOOL WINAPI DAD_DragLeave(void); -BOOL WINAPI DAD_AutoScroll(HWND,AUTO_SCROLL_DATA*,LPPOINT); +BOOL WINAPI DAD_AutoScroll(HWND,AUTO_SCROLL_DATA*,const POINT*); HRESULT WINAPI SHDoDragDrop(HWND,IDataObject*,IDropSource*,DWORD,LPDWORD); LPITEMIDLIST WINAPI ILAppendID(LPITEMIDLIST,LPCSHITEMID,BOOL); @@ -1470,7 +1440,7 @@ typedef struct HRESULT WINAPI SHCreateDefaultContextMenu(const DEFCONTEXTMENU *,REFIID,void **ppv); typedef HRESULT (CALLBACK * LPFNDFMCALLBACK)(IShellFolder*,HWND,IDataObject*,UINT,WPARAM,LPARAM); -INT WINAPI CDefFolderMenu_Create2(LPCITEMIDLIST,HWND,UINT,LPCITEMIDLIST*,IShellFolder*,LPFNDFMCALLBACK,UINT,HKEY *,IContextMenu **); +HRESULT WINAPI CDefFolderMenu_Create2(LPCITEMIDLIST,HWND,UINT,LPCITEMIDLIST*,IShellFolder*,LPFNDFMCALLBACK,UINT,const HKEY *,IContextMenu **); /**************************************************************************** * SHCreateDefaultContextMenu API @@ -1522,8 +1492,8 @@ typedef int OPEN_AS_INFO_FLAGS; typedef struct tagOPENASINFO { - LPCTSTR pcszFile; - LPCTSTR pcszClass; + LPCWSTR pcszFile; + LPCWSTR pcszClass; OPEN_AS_INFO_FLAGS oaifInFlags; } OPENASINFO; diff --git a/reactos/include/psdk/winuser.h b/reactos/include/psdk/winuser.h index 13f41756ad0..c2a04e7e4b2 100644 --- a/reactos/include/psdk/winuser.h +++ b/reactos/include/psdk/winuser.h @@ -8,6 +8,13 @@ extern "C" { #endif +#if !defined(_USER32_) +#define WINUSERAPI DECLSPEC_IMPORT +#else +#define WINUSERAPI +#endif + + #define WC_DIALOG MAKEINTATOM(0x8002) #define FALT 16 #define FCONTROL 8 diff --git a/reactos/include/reactos/wine/winuser.h b/reactos/include/reactos/wine/winuser.h index 49ac94f2023..be58b229247 100644 --- a/reactos/include/reactos/wine/winuser.h +++ b/reactos/include/reactos/wine/winuser.h @@ -8,7 +8,7 @@ #include #if !defined(_MSC_VER) -#include "../../psdk/winuser.h" +#include_next "winuser.h" #endif #define WS_EX_TRAYWINDOW 0x80000000L @@ -16,8 +16,8 @@ #define WS_EX_MANAGED 0x40000000L /* Window managed by the window system */ #define LB_CARETOFF 0x01a4 -UINT WINAPI PrivateExtractIconsA(LPCSTR,int,int,int,HICON*,UINT*,UINT,UINT); -UINT WINAPI PrivateExtractIconsW(LPCWSTR,int,int,int,HICON*,UINT*,UINT,UINT); +WINUSERAPI UINT WINAPI PrivateExtractIconsA(LPCSTR,int,int,int,HICON*,UINT*,UINT,UINT); +WINUSERAPI UINT WINAPI PrivateExtractIconsW(LPCWSTR,int,int,int,HICON*,UINT*,UINT,UINT); typedef struct tagCWPSTRUCT *LPCWPSTRUCT; @@ -31,12 +31,13 @@ typedef struct tagCWPSTRUCT *LPCWPSTRUCT; #endif /* MapVirtualKey translation types */ +#if 0 #define MAPVK_VK_TO_VSC 0 #define MAPVK_VSC_TO_VK 1 #define MAPVK_VK_TO_CHAR 2 #define MAPVK_VSC_TO_VK_EX 3 #define MAPVK_VK_TO_VSC_EX 4 - +#endif #define WM_SETVISIBLE 0x0009 #define MAKEINTATOMA(atom) ((LPCSTR)((ULONG_PTR)((WORD)(atom)))) From 07d2758056f24a179831e762b8e1ec4ab8298e7b Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Tue, 26 Aug 2008 15:50:23 +0000 Subject: [PATCH 186/324] shell32 update (1/2) - Use precompiled headers for shell32 - Use __inline for MSVC compability - Fix api definitions of SHCreateStdEnumFmtEtc, GetFileNameFromBrowse, SHCreateDirectory, SHCreateDirectoryExA, SHCreateDirectoryExW, Dad_AutoScroll, CDefFolderMenu_Create2, SHChangeNotifyRegister - msvc now compiles nearly all of shell32 (with WDK headers) svn path=/trunk/; revision=35674 --- reactos/dll/win32/shell32/autocomplete.c | 48 +- reactos/dll/win32/shell32/brsfolder.c | 19 +- reactos/dll/win32/shell32/changenotify.c | 15 +- reactos/dll/win32/shell32/classes.c | 46 +- reactos/dll/win32/shell32/clipboard.c | 27 +- reactos/dll/win32/shell32/control.c | 34 +- reactos/dll/win32/shell32/cpanelfolder.c | 55 +- reactos/dll/win32/shell32/dataobject.c | 13 +- reactos/dll/win32/shell32/dde.c | 21 +- reactos/dll/win32/shell32/debughlp.c | 16 +- reactos/dll/win32/shell32/desktop.c | 18 +- reactos/dll/win32/shell32/dialogs.c | 21 +- reactos/dll/win32/shell32/dragdrophelper.c | 22 +- reactos/dll/win32/shell32/drive.c | 23 +- reactos/dll/win32/shell32/enumidlist.c | 20 +- reactos/dll/win32/shell32/extracticon.c | 13 +- reactos/dll/win32/shell32/folder_options.c | 31 +- reactos/dll/win32/shell32/folders.c | 33 +- reactos/dll/win32/shell32/fprop.c | 53 +- reactos/dll/win32/shell32/iconcache.c | 48 +- reactos/dll/win32/shell32/pidl.c | 58 +- reactos/dll/win32/shell32/pidl.h | 9 +- reactos/dll/win32/shell32/precomp.h | 77 +++ reactos/dll/win32/shell32/regsvr.c | 45 +- reactos/dll/win32/shell32/ros-systray.c | 9 +- reactos/dll/win32/shell32/she_ocmenu.c | 102 +-- reactos/dll/win32/shell32/shell.c | 604 +----------------- reactos/dll/win32/shell32/shell32.rbuild | 3 +- reactos/dll/win32/shell32/shell32_main.c | 61 +- reactos/dll/win32/shell32/shell32_main.h | 27 +- reactos/dll/win32/shell32/shellfolder.h | 1 + reactos/dll/win32/shell32/shelllink.c | 168 +++-- reactos/dll/win32/shell32/shellole.c | 41 +- reactos/dll/win32/shell32/shellord.c | 59 +- reactos/dll/win32/shell32/shellpath.c | 112 ++-- reactos/dll/win32/shell32/shellreg.c | 19 +- reactos/dll/win32/shell32/shellstring.c | 32 +- reactos/dll/win32/shell32/shfldr.h | 9 +- reactos/dll/win32/shell32/shfldr_admintools.c | 42 +- reactos/dll/win32/shell32/shfldr_desktop.c | 59 +- reactos/dll/win32/shell32/shfldr_fonts.c | 57 +- reactos/dll/win32/shell32/shfldr_fs.c | 75 +-- reactos/dll/win32/shell32/shfldr_mycomp.c | 57 +- .../dll/win32/shell32/shfldr_mydocuments.c | 53 +- reactos/dll/win32/shell32/shfldr_netplaces.c | 27 +- reactos/dll/win32/shell32/shfldr_printers.c | 47 +- reactos/dll/win32/shell32/shfldr_recyclebin.c | 80 +-- reactos/dll/win32/shell32/shlexec.c | 225 +++---- reactos/dll/win32/shell32/shlfileop.c | 71 +- reactos/dll/win32/shell32/shlfolder.c | 31 +- reactos/dll/win32/shell32/shlfsbind.c | 14 +- reactos/dll/win32/shell32/shlmenu.c | 27 +- reactos/dll/win32/shell32/shlview.c | 55 +- reactos/dll/win32/shell32/shpolicy.c | 16 +- reactos/dll/win32/shell32/shresdef.h | 36 ++ reactos/dll/win32/shell32/shv_def_cmenu.c | 43 +- reactos/dll/win32/shell32/shv_item_new.c | 44 +- reactos/dll/win32/shell32/startmenu.c | 26 +- reactos/dll/win32/shell32/undocshell.h | 12 +- 59 files changed, 829 insertions(+), 2280 deletions(-) create mode 100644 reactos/dll/win32/shell32/precomp.h diff --git a/reactos/dll/win32/shell32/autocomplete.c b/reactos/dll/win32/shell32/autocomplete.c index b25d7449b28..a637988939f 100644 --- a/reactos/dll/win32/shell32/autocomplete.c +++ b/reactos/dll/win32/shell32/autocomplete.c @@ -33,29 +33,9 @@ - implement ACO_RTLREADING style */ -#include "config.h" -#include -#include -#include -#include -#define COBJMACROS +#include -#include "wine/debug.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "undocshell.h" -#include "shlwapi.h" -#include "winerror.h" -#include "objbase.h" - -#include "pidl.h" -#include "shlobj.h" -#include "shldisp.h" -#include "debughlp.h" - -#include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(shell); @@ -281,8 +261,8 @@ static HRESULT WINAPI IAutoComplete_fnInit( LONG len; /* pwszRegKeyPath contains the key as well as the value, so we split */ - key = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (lstrlenW(pwzsRegKeyPath)+1)*sizeof(WCHAR)); - strcpyW(key, pwzsRegKeyPath); + key = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (wcslen(pwzsRegKeyPath)+1)*sizeof(WCHAR)); + wcscpy(key, pwzsRegKeyPath); value = strrchrW(key, '\\'); *value = 0; value++; @@ -296,7 +276,7 @@ static HRESULT WINAPI IAutoComplete_fnInit( res = RegQueryValueW(hKey, value, result, &len); if (res == ERROR_SUCCESS) { This->quickComplete = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len*sizeof(WCHAR)); - strcpyW(This->quickComplete, result); + wcscpy(This->quickComplete, result); } RegCloseKey(hKey); } @@ -304,8 +284,8 @@ static HRESULT WINAPI IAutoComplete_fnInit( } if ((pwszQuickComplete) && (!This->quickComplete)) { - This->quickComplete = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (lstrlenW(pwszQuickComplete)+1)*sizeof(WCHAR)); - lstrcpyW(This->quickComplete, pwszQuickComplete); + This->quickComplete = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (wcslen(pwszQuickComplete)+1)*sizeof(WCHAR)); + wcscpy(This->quickComplete, pwszQuickComplete); } return S_OK; @@ -484,8 +464,8 @@ static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, control = GetKeyState(VK_CONTROL) & 0x8000; if (control && This->quickComplete) { hwndQCText = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, - (lstrlenW(This->quickComplete)+lstrlenW(hwndText))*sizeof(WCHAR)); - sel = sprintfW(hwndQCText, This->quickComplete, hwndText); + (wcslen(This->quickComplete)+wcslen(hwndText))*sizeof(WCHAR)); + sel = swprintf(hwndQCText, This->quickComplete, hwndText); SendMessageW(hwnd, WM_SETTEXT, 0, (LPARAM)hwndQCText); SendMessageW(hwnd, EM_SETSEL, 0, sel); HeapFree(GetProcessHeap(), 0, hwndQCText); @@ -529,11 +509,11 @@ static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, msg = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (len+1)*sizeof(WCHAR)); SendMessageW(This->hwndListBox, LB_GETTEXT, sel, (LPARAM)msg); SendMessageW(hwnd, WM_SETTEXT, 0, (LPARAM)msg); - SendMessageW(hwnd, EM_SETSEL, lstrlenW(msg), lstrlenW(msg)); + SendMessageW(hwnd, EM_SETSEL, wcslen(msg), wcslen(msg)); HeapFree(GetProcessHeap(), 0, msg); } else { SendMessageW(hwnd, WM_SETTEXT, 0, (LPARAM)This->txtbackup); - SendMessageW(hwnd, EM_SETSEL, lstrlenW(This->txtbackup), lstrlenW(This->txtbackup)); + SendMessageW(hwnd, EM_SETSEL, wcslen(This->txtbackup), wcslen(This->txtbackup)); } } return 0; @@ -564,8 +544,8 @@ static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, HeapFree(GetProcessHeap(), 0, This->txtbackup); This->txtbackup = HeapAlloc(GetProcessHeap(), - HEAP_ZERO_MEMORY, (lstrlenW(hwndText)+1)*sizeof(WCHAR)); - lstrcpyW(This->txtbackup, hwndText); + HEAP_ZERO_MEMORY, (wcslen(hwndText)+1)*sizeof(WCHAR)); + wcscpy(This->txtbackup, hwndText); /* Returns if there is no text to search and we doesn't want to display all the entries */ if ((!displayall) && (! *hwndText) ) @@ -582,7 +562,7 @@ static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, if (This->options & ACO_AUTOAPPEND) { SetWindowTextW(hwnd, strs); - SendMessageW(hwnd, EM_SETSEL, lstrlenW(hwndText), lstrlenW(strs)); + SendMessageW(hwnd, EM_SETSEL, wcslen(hwndText), wcslen(strs)); break; } @@ -638,7 +618,7 @@ static LRESULT APIENTRY ACLBoxSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, msg = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (len+1)*sizeof(WCHAR)); SendMessageW(hwnd, LB_GETTEXT, sel, (LPARAM)msg); SendMessageW(This->hwndEdit, WM_SETTEXT, 0, (LPARAM)msg); - SendMessageW(This->hwndEdit, EM_SETSEL, 0, lstrlenW(msg)); + SendMessageW(This->hwndEdit, EM_SETSEL, 0, wcslen(msg)); ShowWindow(hwnd, SW_HIDE); HeapFree(GetProcessHeap(), 0, msg); break; diff --git a/reactos/dll/win32/shell32/brsfolder.c b/reactos/dll/win32/shell32/brsfolder.c index 8d5ff4ecd4d..0179706b4ca 100644 --- a/reactos/dll/win32/shell32/brsfolder.c +++ b/reactos/dll/win32/shell32/brsfolder.c @@ -23,19 +23,8 @@ * - implement new dialog style resizing */ -#include -#include +#include -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT - -#include "wine/debug.h" -#include "undocshell.h" -#include "pidl.h" -#include "shell32_main.h" -#include "shellapi.h" -#include "shresdef.h" WINE_DEFAULT_DEBUG_CHANNEL(shell); @@ -74,7 +63,7 @@ static const WCHAR szBrowseFolderInfo[] = { 'I','N','F','O',0 }; -static inline DWORD BrowseFlagsToSHCONTF(UINT ulFlags) +static DWORD __inline BrowseFlagsToSHCONTF(UINT ulFlags) { return SHCONTF_FOLDERS | (ulFlags & BIF_BROWSEINCLUDEFILES ? SHCONTF_NONFOLDERS : 0); } @@ -290,7 +279,7 @@ static HTREEITEM InsertTreeViewItem( browse_info *info, IShellFolder * lpsf, tvins.hInsertAfter = NULL; tvins.hParent = hParent; - return (HTREEITEM)TreeView_InsertItemW( info->hwndTreeView, &tvins ); + return (HTREEITEM)SendMessageW(info->hwndTreeView, TVM_INSERTITEM, 0, (LPARAM)&tvins ); } /****************************************************************************** @@ -361,7 +350,7 @@ done: SHFree(pidlTemp); } -static inline BOOL PIDLIsType(LPCITEMIDLIST pidl, PIDLTYPE type) +static BOOL __inline PIDLIsType(LPCITEMIDLIST pidl, PIDLTYPE type) { LPPIDLDATA data = _ILGetDataPointer(pidl); if (!data) diff --git a/reactos/dll/win32/shell32/changenotify.c b/reactos/dll/win32/shell32/changenotify.c index 5784b8c5d3f..b465bdff436 100644 --- a/reactos/dll/win32/shell32/changenotify.c +++ b/reactos/dll/win32/shell32/changenotify.c @@ -18,15 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#include +#include -#define NONAMELESSUNION -#define NONAMELESSSTRUCT -#include "windef.h" -#include "winbase.h" -#include "wine/debug.h" -#include "shell32_main.h" WINE_DEFAULT_DEBUG_CHANNEL(shell); @@ -192,7 +185,7 @@ SHChangeNotifyRegister( LONG wEventMask, UINT uMsg, int cItems, - SHChangeNotifyEntry *lpItems) + const SHChangeNotifyEntry *lpItems) { LPNOTIFICATIONLIST item; int i; @@ -315,8 +308,8 @@ void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID switch (typeFlag) { case SHCNF_PATHA: - if (dwItem1) Pidls[0] = SHSimpleIDListFromPathA((LPCSTR)dwItem1); - if (dwItem2) Pidls[1] = SHSimpleIDListFromPathA((LPCSTR)dwItem2); + if (dwItem1) Pidls[0] = SHSimpleIDListFromPathA((LPCSTR)dwItem1); //FIXME + if (dwItem2) Pidls[1] = SHSimpleIDListFromPathA((LPCSTR)dwItem2); //FIXME break; case SHCNF_PATHW: if (dwItem1) Pidls[0] = SHSimpleIDListFromPathW((LPCWSTR)dwItem1); diff --git a/reactos/dll/win32/shell32/classes.c b/reactos/dll/win32/shell32/classes.c index e311c38205b..0b498aba86b 100644 --- a/reactos/dll/win32/shell32/classes.c +++ b/reactos/dll/win32/shell32/classes.c @@ -19,31 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include - -#define COBJMACROS - -#include "wine/debug.h" -#include "winerror.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wingdi.h" -#include "winuser.h" - -#include "shlobj.h" -#include "shell32_main.h" -#include "shlguid.h" -#include "shresdef.h" -#include "shlwapi.h" -#include "pidl.h" -#include "wine/unicode.h" +#include WINE_DEFAULT_DEBUG_CHANNEL(shell); @@ -146,9 +122,9 @@ BOOL HCR_GetDefaultVerbW( HKEY hkeyClass, LPCWSTR szVerb, LPWSTR szDest, DWORD l if (!RegQueryValueW(hkeyClass, L"shell", szDest, &size) && *szDest) { /* The MSDN says to first try the default verb */ - lstrcpyW(sTemp, swShell); - lstrcatW(sTemp, szDest); - lstrcatW(sTemp, swCommand); + wcscpy(sTemp, swShell); + wcscat(sTemp, szDest); + wcscat(sTemp, swCommand); if (!RegOpenKeyExW(hkeyClass, sTemp, 0, KEY_READ, &hkey)) { RegCloseKey(hkey); @@ -158,9 +134,9 @@ BOOL HCR_GetDefaultVerbW( HKEY hkeyClass, LPCWSTR szVerb, LPWSTR szDest, DWORD l } /* then fallback to 'open' */ - lstrcpyW(sTemp, swShell); - lstrcatW(sTemp, swOpen); - lstrcatW(sTemp, swCommand); + wcscpy(sTemp, swShell); + wcscat(sTemp, swOpen); + wcscat(sTemp, swCommand); if (!RegOpenKeyExW(hkeyClass, sTemp, 0, KEY_READ, &hkey)) { RegCloseKey(hkey); @@ -202,9 +178,9 @@ BOOL HCR_GetExecuteCommandW( HKEY hkeyClass, LPCWSTR szClass, LPCWSTR szVerb, LP if (HCR_GetDefaultVerbW(hkeyClass, szVerb, sTempVerb, sizeof(sTempVerb))) { WCHAR sTemp[MAX_PATH]; - lstrcpyW(sTemp, swShell); - lstrcatW(sTemp, sTempVerb); - lstrcatW(sTemp, swCommand); + wcscpy(sTemp, swShell); + wcscat(sTemp, sTempVerb); + wcscat(sTemp, swCommand); ret = (ERROR_SUCCESS == SHGetValueW(hkeyClass, sTemp, NULL, NULL, szDest, &len)); } if (szClass) @@ -290,7 +266,7 @@ BOOL HCR_GetDefaultIconW(LPCWSTR szClass, LPWSTR szDest, DWORD len, int* picon_i TRACE("%s\n",debugstr_w(szClass) ); lstrcpynW(sTemp, szClass, MAX_PATH); - lstrcatW(sTemp, swDefaultIcon); + wcscat(sTemp, swDefaultIcon); if (!RegOpenKeyExW(HKEY_CLASSES_ROOT, sTemp, 0, KEY_READ, &hkey)) { diff --git a/reactos/dll/win32/shell32/clipboard.c b/reactos/dll/win32/shell32/clipboard.c index 7e8c920b8fb..1bdae631878 100644 --- a/reactos/dll/win32/shell32/clipboard.c +++ b/reactos/dll/win32/shell32/clipboard.c @@ -35,20 +35,7 @@ * */ -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wingdi.h" -#include "pidl.h" -#include "undocshell.h" -#include "shell32_main.h" -#include "shlwapi.h" - -#include "wine/unicode.h" -#include "wine/debug.h" +#include WINE_DEFAULT_DEBUG_CHANNEL(shell); @@ -74,12 +61,12 @@ HGLOBAL RenderHDROP(LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl) SHGetPathFromIDListW(pidlRoot, wszRootPath); PathAddBackslashW(wszRootPath); - rootlen = strlenW(wszRootPath); + rootlen = wcslen(wszRootPath); for (i=0; ipFiles = offset * sizeof(WCHAR); pDropFiles->fWide = TRUE; - strcpyW(wszFileName, wszRootPath); + wcscpy(wszFileName, wszRootPath); for (i=0; i -#include -#include -#include -#include -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "wine/winbase16.h" -#include "wownt32.h" -#include "wine/debug.h" -#include "cpl.h" -#include "wine/unicode.h" - -#define NO_SHLWAPI_REG -#include "shlwapi.h" - -#include "cpanel.h" +#include WINE_DEFAULT_DEBUG_CHANNEL(shlctrl); @@ -319,13 +301,13 @@ static void Control_DoWindow(CPanel* panel, HWND hWnd, HINSTANCE hInst) WCHAR *p; GetSystemDirectoryW( buffer, MAX_PATH ); - p = buffer + strlenW(buffer); + p = buffer + wcslen(buffer); *p++ = '\\'; - lstrcpyW(p, wszAllCpl); + wcscpy(p, wszAllCpl); if ((h = FindFirstFileW(buffer, &fd)) != INVALID_HANDLE_VALUE) { do { - lstrcpyW(p, fd.cFileName); + wcscpy(p, fd.cFileName); Control_LoadApplet(hWnd, buffer, panel); } while (FindNextFileW(h, &fd)); FindClose(h); @@ -379,13 +361,13 @@ static void Control_DoLaunch(CPanel* panel, HWND hWnd, LPCWSTR wszCmd) if ((!hMutex) || (GetLastError() == ERROR_ALREADY_EXISTS)) return; - buffer = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(wszCmd) + 1) * sizeof(*wszCmd)); + buffer = HeapAlloc(GetProcessHeap(), 0, (wcslen(wszCmd) + 1) * sizeof(*wszCmd)); if (!buffer) { CloseHandle(hMutex); return; } - end = lstrcpyW(buffer, wszCmd); + end = wcscpy(buffer, wszCmd); for (;;) { ch = *end; if (ch == '"') quoted = !quoted; @@ -409,10 +391,10 @@ static void Control_DoLaunch(CPanel* panel, HWND hWnd, LPCWSTR wszCmd) end++; } while ((ptr = StrChrW(buffer, '"'))) - memmove((LPVOID)ptr, ptr+1, lstrlenW(ptr)*sizeof(WCHAR)); + memmove((LPVOID)ptr, ptr+1, wcslen(ptr)*sizeof(WCHAR)); while ((ptr = StrChrW(extraPmts, '"'))) - memmove((LPVOID)ptr, ptr+1, lstrlenW(ptr)*sizeof(WCHAR)); + memmove((LPVOID)ptr, ptr+1, wcslen(ptr)*sizeof(WCHAR)); TRACE("cmd %s, extra %s, sp %d\n", debugstr_w(buffer), debugstr_w(extraPmts), sp); diff --git a/reactos/dll/win32/shell32/cpanelfolder.c b/reactos/dll/win32/shell32/cpanelfolder.c index b00467838d2..d96ba91746b 100644 --- a/reactos/dll/win32/shell32/cpanelfolder.c +++ b/reactos/dll/win32/shell32/cpanelfolder.c @@ -18,38 +18,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "wine/config.h" -#include "wine/port.h" -#include -#include -#include -#include +#include -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT - -#include "winerror.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wingdi.h" -#include "winuser.h" - -#include "ole2.h" -#include "shlguid.h" - -#include "cpanel.h" -#include "enumidlist.h" -#include "pidl.h" -#include "undocshell.h" -#include "shell32_main.h" -#include "shresdef.h" -#include "shlwapi.h" -#include "wine/debug.h" -#include "debughlp.h" -#include "shfldr.h" WINE_DEFAULT_DEBUG_CHANNEL(shell); @@ -71,7 +42,7 @@ typedef struct { int dwAttributes; /* attributes returned by GetAttributesOf FIXME: use it */ LPCITEMIDLIST *apidl; UINT cidl; -} ICPanelImpl; +} ICPanelImpl, *LPICPanelImpl; static const IShellFolder2Vtbl vt_ShellFolder2; static const IPersistFolder2Vtbl vt_PersistFolder2; @@ -79,25 +50,25 @@ static const IShellExecuteHookWVtbl vt_ShellExecuteHookW; static const IShellExecuteHookAVtbl vt_ShellExecuteHookA; static const IContextMenu2Vtbl vt_ContextMenu; -static inline ICPanelImpl *impl_from_IPersistFolder2( IPersistFolder2 *iface ) +static LPICPanelImpl __inline impl_from_IPersistFolder2( IPersistFolder2 *iface ) { - return (ICPanelImpl *)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblPersistFolder2)); + return (LPICPanelImpl)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblPersistFolder2)); } -static inline ICPanelImpl *impl_from_IContextMenu( IContextMenu2 *iface ) +static LPICPanelImpl __inline impl_from_IContextMenu( IContextMenu2 *iface ) { - return (ICPanelImpl *)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblContextMenu)); + return (LPICPanelImpl)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblContextMenu)); } -static inline ICPanelImpl *impl_from_IShellExecuteHookW( IShellExecuteHookW *iface ) +static LPICPanelImpl __inline impl_from_IShellExecuteHookW( IShellExecuteHookW *iface ) { - return (ICPanelImpl *)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblShellExecuteHookW)); + return (LPICPanelImpl)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblShellExecuteHookW)); } -static inline ICPanelImpl *impl_from_IShellExecuteHookA( IShellExecuteHookA *iface ) +static LPICPanelImpl __inline impl_from_IShellExecuteHookA( IShellExecuteHookA *iface ) { - return (ICPanelImpl *)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblShellExecuteHookA)); + return (LPICPanelImpl)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblShellExecuteHookA)); } @@ -700,7 +671,7 @@ static HRESULT WINAPI ISF_ControlPanel_fnGetDisplayNameOf(IShellFolder2 * iface, int len = 0; PathAddBackslashW(wszPath); - len = lstrlenW(wszPath); + len = wcslen(wszPath); if (!SUCCEEDED (SHELL32_GetDisplayNameOfChild(iface, pidl, dwFlags, wszPath + len, MAX_PATH + 1 - len))) @@ -1275,7 +1246,7 @@ static HRESULT WINAPI ICPanel_IContextMenu2_InvokeCommand( TRACE("(%p)->(invcom=%p verb=%p wnd=%p)\n",This,lpcmi,lpcmi->lpVerb, lpcmi->hwnd); - if (lpcmi->lpVerb == MAKEINTRESOURCE(1)) + if (lpcmi->lpVerb == MAKEINTRESOURCEA(1)) { ZeroMemory(&sei, sizeof(sei)); sei.cbSize = sizeof(sei); @@ -1288,7 +1259,7 @@ static HRESULT WINAPI ICPanel_IContextMenu2_InvokeCommand( if (sei.hInstApp <= (HINSTANCE)32) return E_FAIL; } - else if (lpcmi->lpVerb == MAKEINTRESOURCE(2)) + else if (lpcmi->lpVerb == MAKEINTRESOURCEA(2)) { if (!SHGetSpecialFolderPathW(NULL, szPath, CSIDL_DESKTOPDIRECTORY, FALSE)) return E_FAIL; diff --git a/reactos/dll/win32/shell32/dataobject.c b/reactos/dll/win32/shell32/dataobject.c index 3192a3ee7cd..503ff4568d4 100644 --- a/reactos/dll/win32/shell32/dataobject.c +++ b/reactos/dll/win32/shell32/dataobject.c @@ -19,19 +19,8 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT - -#include "windef.h" -#include "wingdi.h" -#include "pidl.h" -#include "winerror.h" -#include "shell32_main.h" -#include "wine/debug.h" -#include "undocshell.h" +#include WINE_DEFAULT_DEBUG_CHANNEL(shell); diff --git a/reactos/dll/win32/shell32/dde.c b/reactos/dll/win32/shell32/dde.c index fe5a1f7d8ad..63f47877954 100644 --- a/reactos/dll/win32/shell32/dde.c +++ b/reactos/dll/win32/shell32/dde.c @@ -18,14 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include - -#include "windef.h" -#include "winbase.h" -#include "ddeml.h" -#include "shellapi.h" - -#include "wine/debug.h" +#include WINE_DEFAULT_DEBUG_CHANNEL(shell); @@ -40,7 +33,7 @@ static HSZ hszFolders; static DWORD dwDDEInst; -static inline BOOL Dde_OnConnect(HSZ hszTopic, HSZ hszService) +static BOOL __inline Dde_OnConnect(HSZ hszTopic, HSZ hszService) { if ((hszTopic == hszProgmanTopic) && (hszService == hszProgmanService)) return TRUE; @@ -53,25 +46,25 @@ static inline BOOL Dde_OnConnect(HSZ hszTopic, HSZ hszService) return FALSE; } -static inline void Dde_OnConnectConfirm(HCONV hconv, HSZ hszTopic, HSZ hszService) +static void __inline Dde_OnConnectConfirm(HCONV hconv, HSZ hszTopic, HSZ hszService) { FIXME("stub\n"); } -static inline BOOL Dde_OnWildConnect(HSZ hszTopic, HSZ hszService) +static BOOL __inline Dde_OnWildConnect(HSZ hszTopic, HSZ hszService) { FIXME("stub\n"); return FALSE; } -static inline HDDEDATA Dde_OnRequest(UINT uFmt, HCONV hconv, HSZ hszTopic, +static HDDEDATA __inline Dde_OnRequest(UINT uFmt, HCONV hconv, HSZ hszTopic, HSZ hszItem) { FIXME("stub\n"); return NULL; } -static inline DWORD Dde_OnExecute(HCONV hconv, HSZ hszTopic, HDDEDATA hdata) +static DWORD __inline Dde_OnExecute(HCONV hconv, HSZ hszTopic, HDDEDATA hdata) { BYTE * pszCommand; @@ -86,7 +79,7 @@ static inline DWORD Dde_OnExecute(HCONV hconv, HSZ hszTopic, HDDEDATA hdata) return DDE_FNOTPROCESSED; } -static inline void Dde_OnDisconnect(HCONV hconv) +static void __inline Dde_OnDisconnect(HCONV hconv) { FIXME("stub\n"); } diff --git a/reactos/dll/win32/shell32/debughlp.c b/reactos/dll/win32/shell32/debughlp.c index 50bf0dc48f2..8a2ad756f9c 100644 --- a/reactos/dll/win32/shell32/debughlp.c +++ b/reactos/dll/win32/shell32/debughlp.c @@ -18,19 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#include -#include -#include -#include "windef.h" -#include "wingdi.h" -#include "pidl.h" -#include "shldisp.h" -#include "wine/debug.h" -#include "debughlp.h" -#include "docobj.h" -#include "shell32_main.h" - +#include WINE_DEFAULT_DEBUG_CHANNEL(pidl); @@ -190,7 +178,7 @@ LPWSTR _dbg_ILGetSTextPointerW(LPCITEMIDLIST pidl) return NULL; case PT_VALUEW: - return (LPWSTR)(pdata->u.file.szNames + lstrlenW ((LPWSTR)pdata->u.file.szNames) + 1); + return (LPWSTR)(pdata->u.file.szNames + wcslen ((LPWSTR)pdata->u.file.szNames) + 1); } } return NULL; diff --git a/reactos/dll/win32/shell32/desktop.c b/reactos/dll/win32/shell32/desktop.c index 513327db164..703d05fb31d 100644 --- a/reactos/dll/win32/shell32/desktop.c +++ b/reactos/dll/win32/shell32/desktop.c @@ -18,23 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT - -#include - -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winnls.h" -#include "winuser.h" -#include "shellapi.h" -#include "shlobj.h" -#include "undocshell.h" -#include "shell32_main.h" - -#include "wine/debug.h" +#include WINE_DEFAULT_DEBUG_CHANNEL(desktop); diff --git a/reactos/dll/win32/shell32/dialogs.c b/reactos/dll/win32/shell32/dialogs.c index 528037b5be3..d2fcf062349 100644 --- a/reactos/dll/win32/shell32/dialogs.c +++ b/reactos/dll/win32/shell32/dialogs.c @@ -18,27 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" +#include -#include -#include -#include -#include "winerror.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wingdi.h" -#include "winuser.h" -#include "commdlg.h" -#include "wine/debug.h" - -#include "shellapi.h" -#include "shlobj.h" -#include "shell32_main.h" -#include "shresdef.h" -#include "undocshell.h" -#include "shlwapi.h" typedef struct { diff --git a/reactos/dll/win32/shell32/dragdrophelper.c b/reactos/dll/win32/shell32/dragdrophelper.c index 9c3f236f061..ebd39a3be37 100644 --- a/reactos/dll/win32/shell32/dragdrophelper.c +++ b/reactos/dll/win32/shell32/dragdrophelper.c @@ -19,27 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - -#include -#include - -#define COBJMACROS - -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wingdi.h" -#include "winuser.h" - -#include "objbase.h" -#include "ole2.h" -#include "shlguid.h" -#include "shlobj.h" - -#include "wine/debug.h" -#include "debughlp.h" +#include WINE_DEFAULT_DEBUG_CHANNEL (shell); diff --git a/reactos/dll/win32/shell32/drive.c b/reactos/dll/win32/shell32/drive.c index 32de6a50194..44135c97d32 100644 --- a/reactos/dll/win32/shell32/drive.c +++ b/reactos/dll/win32/shell32/drive.c @@ -18,8 +18,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "config.h" -#include "wine/port.h" #define LARGEINT_PROTOS #define LargeIntegerDivide RtlLargeIntegerDivide #define ExtendedIntegerMultiply RtlExtendedIntegerMultiply @@ -34,20 +32,10 @@ #define COBJMACROS #include #include - -#include -#include -#include -#include "wine/debug.h" -#include "shresdef.h" - -#include -#include -#include -#include -#include -#include #include +#include + +#include WINE_DEFAULT_DEBUG_CHANNEL(shell); @@ -133,7 +121,8 @@ HPROPSHEETPAGE SH_CreatePropertySheetPage(LPSTR resname, DLGPROC dlgproc, LPARAM #define DRIVE_PROPERTY_PAGES (3) -extern HINSTANCE shell32_hInstance; +static const GUID GUID_DEVCLASS_DISKDRIVE = {0x4d36e967L, 0xe325, 0x11ce, {0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18}}; + VOID GetDriveNameWithLetter(LPWSTR szText, UINT Length, WCHAR Drive) @@ -410,7 +399,7 @@ InitializeGeneralDriveDialog(HWND hwndDlg, WCHAR * szDrive) HANDLE hVolume; DWORD BytesReturned = 0; - sprintfW(szResult, L"\\\\.\\%c:", towupper(szDrive[0])); + swprintf(szResult, L"\\\\.\\%c:", towupper(szDrive[0])); hVolume = CreateFileW(szResult, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL); if (hVolume != INVALID_HANDLE_VALUE) { diff --git a/reactos/dll/win32/shell32/enumidlist.c b/reactos/dll/win32/shell32/enumidlist.c index adc2dde2352..9ae675e6f28 100644 --- a/reactos/dll/win32/shell32/enumidlist.c +++ b/reactos/dll/win32/shell32/enumidlist.c @@ -18,21 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#include -#include - -#define COBJMACROS - -#include "wine/debug.h" -#include "wine/unicode.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "shlwapi.h" - -#include "pidl.h" -#include "enumidlist.h" +#include WINE_DEFAULT_DEBUG_CHANNEL(shell); @@ -143,9 +129,9 @@ BOOL CreateFolderEnumList( if(!lpszPath || !lpszPath[0]) return FALSE; - strcpyW(szPath, lpszPath); + wcscpy(szPath, lpszPath); PathAddBackslashW(szPath); - strcatW(szPath,stars); + wcscat(szPath,stars); hFile = FindFirstFileW(szPath,&stffile); if ( hFile != INVALID_HANDLE_VALUE ) diff --git a/reactos/dll/win32/shell32/extracticon.c b/reactos/dll/win32/shell32/extracticon.c index 719cc5500cc..576d46195b2 100644 --- a/reactos/dll/win32/shell32/extracticon.c +++ b/reactos/dll/win32/shell32/extracticon.c @@ -7,10 +7,9 @@ * PROGRAMMERS: Hervй Poussineau (hpoussin@reactos.org) */ -#define COBJMACROS +#include + #define CONST_VTABLE -#include -#include WINE_DEFAULT_DEBUG_CHANNEL(shell); @@ -536,10 +535,10 @@ SHCreateDefaultExtractIcon( if (!s) return E_OUTOFMEMORY; memset(s, 0, sizeof(struct IconExtraction)); - s->defaultExtractIconInitImpl.lpVtbl = &IconExtractionDefaultExtractIconInitVtbl; - s->extractIconAImpl.lpVtbl = &IconExtractionExtractIconAVtbl; - s->extractIconWImpl.lpVtbl = &IconExtractionExtractIconWVtbl; - s->persistFileImpl.lpVtbl = &IconExtractionPersistFileVtbl; + s->defaultExtractIconInitImpl.lpVtbl = (IDefaultExtractIconInitVtbl*)&IconExtractionDefaultExtractIconInitVtbl; + s->extractIconAImpl.lpVtbl = (IExtractIconAVtbl*)&IconExtractionExtractIconAVtbl; + s->extractIconWImpl.lpVtbl = (IExtractIconWVtbl*)&IconExtractionExtractIconWVtbl; + s->persistFileImpl.lpVtbl = (IPersistFileVtbl*)&IconExtractionPersistFileVtbl; s->ref = 1; *ppv = &s->defaultExtractIconInitImpl; diff --git a/reactos/dll/win32/shell32/folder_options.c b/reactos/dll/win32/shell32/folder_options.c index 6b86636ed47..f41a02336ec 100644 --- a/reactos/dll/win32/shell32/folder_options.c +++ b/reactos/dll/win32/shell32/folder_options.c @@ -18,27 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include +#include -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT -#include "winerror.h" -#include "wine/debug.h" - -#include "windef.h" -#include "wingdi.h" -#include "pidl.h" -#include "undocshell.h" -#include "shlobj.h" -#include "objbase.h" -#include "commdlg.h" - -#include "shell32_main.h" -#include "shellfolder.h" -#include "shresdef.h" -#include "stdio.h" -#include "shlwapi.h" WINE_DEFAULT_DEBUG_CHANNEL (fprop); #define MAX_PROPERTY_SHEET_PAGE (32) @@ -140,7 +121,7 @@ InitializeFolderOptionsListCtrl(HWND hwndDlg) col.pszText = szName; col.fmt = LVCFMT_LEFT; col.cx = (clientRect.right - clientRect.left) - GetSystemMetrics(SM_CXVSCROLL); - (void)ListView_InsertColumnW(hDlgCtrl, 0, &col); + (void)SendMessageW(hDlgCtrl, LVM_INSERTCOLUMN, 0, (LPARAM)&col); @@ -185,7 +166,7 @@ InitializeFileTypesListCtrlColumns(HWND hDlgCtrl) col.pszText = szName; col.fmt = LVCFMT_LEFT; col.cx = (clientRect.right - clientRect.left) - GetSystemMetrics(SM_CXVSCROLL); - (void)ListView_InsertColumnW(hDlgCtrl, 0, &col); + (void)SendMessageW(hDlgCtrl, LVM_INSERTCOLUMNW, 0, (LPARAM)&col); } INT FindItem(HWND hDlgCtrl, WCHAR * ItemName) @@ -235,7 +216,7 @@ InsertFileType(HWND hDlgCtrl, WCHAR * szName, DWORD Size, INT iItem) if (RegOpenKeyExW(HKEY_CLASSES_ROOT, szPath, 0, KEY_READ, &hKey) == ERROR_SUCCESS) { lvItem.lParam = 0; - (void)ListView_InsertItemW(hDlgCtrl, &lvItem); + (void)SendMessageW(hDlgCtrl, LVM_INSERTITEMW, 0, (LPARAM)&lvItem); RegCloseKey(hKey); } } @@ -465,7 +446,7 @@ InitializeFolderGeneralDlg(PFOLDER_PROPERTIES_CONTEXT pContext) if (FileTimeToLocalFileTime(&FolderAttribute.ftCreationTime, &ft)) { FileTimeToSystemTime(&ft, &dt); - sprintfW (szBuffer, wFormat, dt.wDay, dt.wMonth, dt.wYear, dt.wHour, dt.wMinute); + swprintf (szBuffer, wFormat, dt.wDay, dt.wMonth, dt.wYear, dt.wHour, dt.wMinute); SendDlgItemMessageW(pContext->hwndDlg, 14015, WM_SETTEXT, 0, (LPARAM) szBuffer); } } @@ -476,7 +457,7 @@ InitializeFolderGeneralDlg(PFOLDER_PROPERTIES_CONTEXT pContext) /* set folder details */ LoadStringW(shell32_hInstance, IDS_FILE_FOLDER, szFormat, sizeof(szFormat)/sizeof(WCHAR)); szFormat[(sizeof(szFormat)/sizeof(WCHAR))-1] = L'\0'; - sprintfW(szBuffer, szFormat, pContext->cFiles, pContext->cFolder); + swprintf(szBuffer, szFormat, pContext->cFiles, pContext->cFolder); SendDlgItemMessageW(pContext->hwndDlg, 14011, WM_SETTEXT, 0, (LPARAM) szBuffer); if (StrFormatByteSizeW(pContext->bSize.QuadPart, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) diff --git a/reactos/dll/win32/shell32/folders.c b/reactos/dll/win32/shell32/folders.c index e0bf151f0dc..3c0532750a3 100644 --- a/reactos/dll/win32/shell32/folders.c +++ b/reactos/dll/win32/shell32/folders.c @@ -17,29 +17,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include - -#define COBJMACROS - -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "objbase.h" -#include "undocshell.h" -#include "shlguid.h" - -#include "wine/debug.h" - -#include "pidl.h" -#include "shell32_main.h" -#include "shfldr.h" -#include "shresdef.h" +#include WINE_DEFAULT_DEBUG_CHANNEL(shell); @@ -63,7 +41,7 @@ static HRESULT getIconLocationForFolder(LPCITEMIDLIST pidl, UINT uFlags, WCHAR wszIconIndex[10]; SHELL32_GetCustomFolderAttribute(pidl, shellClassInfo, iconIndex, wszIconIndex, 10); - *piIndex = atoiW(wszIconIndex); + *piIndex = _wtoi(wszIconIndex); } else if (SHELL32_GetCustomFolderAttribute(pidl, shellClassInfo, clsid, wszCLSIDValue, CHARS_IN_GUID) && @@ -133,7 +111,7 @@ IExtractIconW* IExtractIconW_Constructor(LPCITEMIDLIST pidl) '%','0','2','x','%','0','2','x','%','0','2','x','%','0','2','x','}',0 }; WCHAR xriid[50]; - sprintfW(xriid, fmt, + swprintf(xriid, fmt, riid->Data1, riid->Data2, riid->Data3, riid->Data4[0], riid->Data4[1], riid->Data4[2], riid->Data4[3], riid->Data4[4], riid->Data4[5], riid->Data4[6], riid->Data4[7]); @@ -291,8 +269,9 @@ IExtractIconA* IExtractIconA_Constructor(LPCITEMIDLIST pidl) extractIconW = IExtractIconW_Constructor(pidl); if (!extractIconW) return NULL; - hr = IExtractIconW_QueryInterface(extractIconW, &IID_IExtractIconA, (void **)&extractIconA); - IExtractIconW_Release(extractIconW); + + hr = extractIconW->lpVtbl->QueryInterface(extractIconW, &IID_IExtractIconA, (void **)&extractIconA); + extractIconW->lpVtbl->Release(extractIconW); if (!SUCCEEDED(hr)) return NULL; return extractIconA; diff --git a/reactos/dll/win32/shell32/fprop.c b/reactos/dll/win32/shell32/fprop.c index a037b8ff225..f5643ba5b9d 100644 --- a/reactos/dll/win32/shell32/fprop.c +++ b/reactos/dll/win32/shell32/fprop.c @@ -18,30 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#define COBJMACROS -#define NONAMELESSUNION - -#include "config.h" -#include "wine/port.h" -#include -#include -#include -#include "winerror.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wingdi.h" -#include "winuser.h" -#include "commdlg.h" -#include "wine/debug.h" - -#include "shellapi.h" -#include -#include "shlobj.h" -#include "shell32_main.h" -#include "shresdef.h" -#include "undocshell.h" -#include "prsht.h" +#include WINE_DEFAULT_DEBUG_CHANNEL(shell); @@ -138,7 +115,7 @@ SH_FileGeneralSetFileType(HWND hwndDlg, WCHAR * filext) { /* the fileextension is unknown, so default to string "FileExtension File" */ SendMessageW(hDlgCtrl, WM_GETTEXT, (WPARAM)MAX_PATH, (LPARAM)value); - sprintfW(name, value, &filext[1]); + swprintf(name, value, &filext[1]); SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)name); return TRUE; } @@ -230,7 +207,7 @@ SHFileGeneralGetFileTimeString(LPFILETIME lpFileTime, WCHAR * lpResult) wYear = dt.wYear; /* ddmmyy */ - sprintfW (lpResult, wFormat, dt.wDay, dt.wMonth, wYear, dt.wHour, dt.wMinute); + swprintf (lpResult, wFormat, dt.wDay, dt.wMonth, wYear, dt.wHour, dt.wMinute); TRACE("result %s\n",debugstr_w(lpResult)); return TRUE; @@ -256,15 +233,15 @@ SH_FileGeneralSetText(HWND hwndDlg, WCHAR * lpstr) if (lpstr == NULL) return FALSE; - lpdir = strrchrW(lpstr, '\\'); /* find the last occurence of '\\' */ + lpdir = wcschr(lpstr, '\\'); /* find the last occurence of '\\' */ - plength = strlenW(lpstr); - flength = strlenW(lpdir); + plength = wcslen(lpstr); + flength = wcslen(lpdir); if (lpdir) { /* location text field */ - strncpyW(buff, lpstr, plength - flength); + wcsncpy(buff, lpstr, plength - flength); buff[plength - flength] = UNICODE_NULL; hDlgCtrl = GetDlgItem(hwndDlg, 14009); SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)buff); @@ -273,7 +250,7 @@ SH_FileGeneralSetText(HWND hwndDlg, WCHAR * lpstr) if(flength > 1) { /* text filename field */ - strncpyW(buff, &lpdir[1], flength); + wcsncpy(buff, &lpdir[1], flength); hDlgCtrl = GetDlgItem(hwndDlg, 14001); SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)buff); } @@ -412,7 +389,7 @@ SH_FileVersionQuerySetListText(HWND hwndDlg, LPVOID pInfo, const WCHAR * text, W if(hwndDlg == NULL || resptr == NULL || text == NULL) return FALSE; - sprintfW(buff, wFormat, lang, code, text); + swprintf(buff, wFormat, lang, code, text); if(VerQueryValueW(pInfo, buff, (LPVOID *)resptr, &reslen)) { /* listbox name property */ @@ -483,7 +460,7 @@ SH_FileVersionInitialize(HWND hwndDlg, WCHAR * lpfilename) if(VerQueryValueW(pBuf, wSlash, &info, &infolen)) { VS_FIXEDFILEINFO * inf = (VS_FIXEDFILEINFO *)info; - sprintfW(buff, wVersionFormat, HIWORD(inf->dwFileVersionMS), + swprintf(buff, wVersionFormat, HIWORD(inf->dwFileVersionMS), LOWORD(inf->dwFileVersionMS), HIWORD(inf->dwFileVersionLS), LOWORD(inf->dwFileVersionLS)); @@ -502,10 +479,10 @@ SH_FileVersionInitialize(HWND hwndDlg, WCHAR * lpfilename) code = lplangcode->code; } - sprintfW(buff, wFileDescriptionFormat, lang, code); + swprintf(buff, wFileDescriptionFormat, lang, code); SH_FileVersionQuerySetText(hwndDlg, 14003, pBuf, buff, &str); - sprintfW(buff, wLegalCopyrightFormat, lang, code); + swprintf(buff, wLegalCopyrightFormat, lang, code); SH_FileVersionQuerySetText(hwndDlg, 14005, pBuf, buff, &str); /* listbox properties */ @@ -638,7 +615,7 @@ SH_FileGeneralDlgProc( /* set general text properties filename filelocation and icon */ SH_FileGeneralSetText(hwndDlg, lpstr); /* enumerate file extension from registry and application which opens it*/ - SH_FileGeneralSetFileType(hwndDlg, strrchrW(lpstr, '.')); + SH_FileGeneralSetFileType(hwndDlg, wcsrchr(lpstr, '.')); /* set file time create/modfied/accessed */ SH_FileGeneralSetFileSizeTime(hwndDlg, lpstr, NULL); return TRUE; @@ -747,7 +724,7 @@ SH_ShowPropertiesDialog(WCHAR * lpf, LPCITEMIDLIST pidlFolder, LPCITEMIDLIST * a if (lpf== NULL) return FALSE; - if ( !strlenW(lpf) ) + if ( !wcslen(lpf) ) return FALSE; memset(hppages, 0x0, sizeof(HPROPSHEETPAGE) * MAX_PROPERTY_SHEET_PAGE); @@ -764,7 +741,7 @@ SH_ShowPropertiesDialog(WCHAR * lpf, LPCITEMIDLIST pidlFolder, LPCITEMIDLIST * a } else { - strcpyW(wFileName, lpf); + wcscpy(wFileName, lpf); } if (PathIsDirectoryW(wFileName)) diff --git a/reactos/dll/win32/shell32/iconcache.c b/reactos/dll/win32/shell32/iconcache.c index e1509e4d5c6..5e03f9ab43d 100644 --- a/reactos/dll/win32/shell32/iconcache.c +++ b/reactos/dll/win32/shell32/iconcache.c @@ -18,31 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#ifdef HAVE_UNISTD_H -# include -#endif - -#define COBJMACROS - -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "winreg.h" -#include "wine/debug.h" - -#include "shellapi.h" -#include "objbase.h" -#include "pidl.h" -#include "shell32_main.h" -#include "undocshell.h" -#include "shresdef.h" +#include WINE_DEFAULT_DEBUG_CHANNEL(shell); @@ -89,7 +65,7 @@ static INT CALLBACK SIC_CompareEntries( LPVOID p1, LPVOID p2, LPARAM lparam) (e1->dwFlags & GIL_FORSHORTCUT) != (e2->dwFlags & GIL_FORSHORTCUT)) return 1; - if (strcmpiW(e1->sSourceFile,e2->sSourceFile)) + if (wcsicmp(e1->sSourceFile,e2->sSourceFile)) return 1; return 0; @@ -263,8 +239,8 @@ static INT SIC_IconAppend (LPCWSTR sSourceFile, INT dwSourceIndex, HICON hSmallI lpsice = (LPSIC_ENTRY) SHAlloc (sizeof (SIC_ENTRY)); GetFullPathNameW(sSourceFile, MAX_PATH, path, NULL); - lpsice->sSourceFile = HeapAlloc( GetProcessHeap(), 0, (strlenW(path)+1)*sizeof(WCHAR) ); - strcpyW( lpsice->sSourceFile, path ); + lpsice->sSourceFile = HeapAlloc( GetProcessHeap(), 0, (wcslen(path)+1)*sizeof(WCHAR) ); + wcscpy( lpsice->sSourceFile, path ); lpsice->dwSourceIndex = dwSourceIndex; lpsice->dwFlags = dwFlags; @@ -501,18 +477,18 @@ static int SIC_LoadOverlayIcon(int icon_idx) { DWORD count = sizeof(buffer); - sprintfW(wszIdx, wszNumFmt, icon_idx); + swprintf(wszIdx, wszNumFmt, icon_idx); /* read icon path and index */ if (RegQueryValueExW(hKeyShellIcons, wszIdx, NULL, NULL, (LPBYTE)buffer, &count) == ERROR_SUCCESS) { - LPWSTR p = strchrW(buffer, ','); + LPWSTR p = wcschr(buffer, ','); if (p) *p++ = 0; iconPath = buffer; - iconIdx = atoiW(p); + iconIdx = _wtoi(p); } RegCloseKey(hKeyShellIcons); @@ -568,12 +544,12 @@ BOOL PidlToSicIndex ( if (SUCCEEDED (IShellFolder_GetUIObjectOf(sh, 0, 1, &pidl, &IID_IExtractIconW, 0, (void **)&ei))) { - if (SUCCEEDED(IExtractIconW_GetIconLocation(ei, uFlags, szIconFile, MAX_PATH, &iSourceIndex, &dwFlags))) + if (SUCCEEDED(ei->lpVtbl->GetIconLocation(ei, uFlags, szIconFile, MAX_PATH, &iSourceIndex, &dwFlags))) { *pIndex = SIC_GetIconIndex(szIconFile, iSourceIndex, uFlags); ret = TRUE; } - IExtractIconW_Release(ei); + ei->lpVtbl->Release(ei); } if (INVALID_INDEX == *pIndex) /* default icon when failed */ @@ -646,7 +622,7 @@ HRESULT WINAPI SHMapIDListToImageListIndexAsync(IUnknown *pts, IShellFolder *psf * Shell_GetCachedImageIndex [SHELL32.72] * */ -INT WINAPI Shell_GetCachedImageIndexA(LPCSTR szPath, INT nIndex, BOOL bSimulateDoc) +INT WINAPI Shell_GetCachedImageIndexA(LPCSTR szPath, INT nIndex, UINT bSimulateDoc) { INT ret, len; LPWSTR szTemp; @@ -664,7 +640,7 @@ INT WINAPI Shell_GetCachedImageIndexA(LPCSTR szPath, INT nIndex, BOOL bSimulateD return ret; } -INT WINAPI Shell_GetCachedImageIndexW(LPCWSTR szPath, INT nIndex, BOOL bSimulateDoc) +INT WINAPI Shell_GetCachedImageIndexW(LPCWSTR szPath, INT nIndex, UINT bSimulateDoc) { WARN("(%s,%08x,%08x) semi-stub.\n",debugstr_w(szPath), nIndex, bSimulateDoc); @@ -777,7 +753,7 @@ HICON WINAPI ExtractAssociatedIconW(HINSTANCE hInst, LPWSTR lpIconPath, LPWORD l HINSTANCE uRet = FindExecutableW(lpIconPath,NULL,tempPath); if( uRet > (HINSTANCE)32 && tempPath[0] ) - { lstrcpyW(lpIconPath,tempPath); + { wcscpy(lpIconPath,tempPath); hIcon = ExtractIconW(hInst, lpIconPath, *lpiIcon); if( hIcon > (HICON)2 ) return hIcon; diff --git a/reactos/dll/win32/shell32/pidl.c b/reactos/dll/win32/shell32/pidl.c index fd009716d96..b146c928a72 100644 --- a/reactos/dll/win32/shell32/pidl.c +++ b/reactos/dll/win32/shell32/pidl.c @@ -22,32 +22,7 @@ * */ -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include - -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT - -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "objbase.h" -#include "shlguid.h" -#include "winerror.h" -#include "winnls.h" -#include "undocshell.h" -#include "shell32_main.h" -#include "shlwapi.h" -#include "shresdef.h" - -#include "pidl.h" -#include "wine/debug.h" +#include WINE_DEFAULT_DEBUG_CHANNEL(pidl); WINE_DECLARE_DEBUG_CHANNEL(shell); @@ -110,7 +85,7 @@ BOOL WINAPI ILGetDisplayNameExW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPWSTR pa return FALSE; } - if (type >= 0 && type <= 2) + if (type <= 2) { switch (type) { @@ -509,7 +484,7 @@ BOOL WINAPI ILIsEqual(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) _ILSimpleGetText(pidltemp1, szData1, MAX_PATH); _ILSimpleGetText(pidltemp2, szData2, MAX_PATH); - if (strcasecmp( szData1, szData2 )) + if (strcmp( szData1, szData2 )) return FALSE; pidltemp1 = ILGetNext(pidltemp1); @@ -559,7 +534,7 @@ BOOL WINAPI ILIsParent(LPCITEMIDLIST pidlParent, LPCITEMIDLIST pidlChild, BOOL b _ILSimpleGetText(pParent, szData1, MAX_PATH); _ILSimpleGetText(pChild, szData2, MAX_PATH); - if (strcasecmp( szData1, szData2 )) + if (strcmp( szData1, szData2 )) return FALSE; pParent = ILGetNext(pParent); @@ -626,7 +601,7 @@ LPITEMIDLIST WINAPI ILFindChild(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) _ILSimpleGetText(pidltemp1, szData1, MAX_PATH); _ILSimpleGetText(pidltemp2, szData2, MAX_PATH); - if (strcasecmp(szData1,szData2)) + if (strcmp(szData1,szData2)) break; pidltemp1 = ILGetNext(pidltemp1); @@ -1382,8 +1357,10 @@ LPITEMIDLIST _ILCreateIExplore(void) LPITEMIDLIST _ILCreateControlPanel(void) { + LPITEMIDLIST ret = NULL; + LPITEMIDLIST parent = _ILCreateGuid(PT_GUID, &CLSID_MyComputer); + TRACE("()\n"); - LPITEMIDLIST parent = _ILCreateGuid(PT_GUID, &CLSID_MyComputer), ret = NULL; if (parent) { @@ -1421,7 +1398,7 @@ LPITEMIDLIST _ILCreateBitBucket(void) LPITEMIDLIST _ILCreateAdminTools(void) { TRACE("()\n"); - return _ILCreateGuid(PT_GUID, &CLSID_AdminFolderShortcut); + return _ILCreateGuid(PT_GUID, &CLSID_AdminFolderShortcut); //FIXME } LPITEMIDLIST _ILCreateGuid(PIDLTYPE type, REFIID guid) @@ -1464,7 +1441,7 @@ LPITEMIDLIST _ILCreateGuidFromStrW(LPCWSTR szGUID) { IID iid; - if (!SUCCEEDED(SHCLSIDFromStringW(szGUID, &iid))) + if (FAILED(CLSIDFromString((LPOLESTR)szGUID, &iid))) { ERR("%s is not a GUID\n", debugstr_w(szGUID)); return NULL; @@ -1491,7 +1468,7 @@ LPITEMIDLIST _ILCreateFromFindDataW( const WIN32_FIND_DATAW *wfd ) type = (wfd->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? PT_FOLDER : PT_VALUE; - wlen = lstrlenW(wfd->cFileName) + 1; + wlen = wcslen(wfd->cFileName) + 1; pidl = _ILAlloc(type, FIELD_OFFSET(FileStruct, szNames[alen + (alen & 1)]) + FIELD_OFFSET(FileStructW, wszName[wlen]) + sizeof(WORD)); if (pidl) @@ -1554,7 +1531,7 @@ LPITEMIDLIST _ILCreateDrive(LPCWSTR lpszNew) if (pszDest) { strcpy(pszDest, "x:\\"); - pszDest[0]=toupperW(lpszNew[0]); + pszDest[0]=towupper(lpszNew[0]); TRACE("-- create Drive: %s\n", debugstr_a(pszDest)); } } @@ -1653,7 +1630,6 @@ LPITEMIDLIST _ILCreateNetHood(void) LPITEMIDLIST _ILCreateFont(void) { - return _ILCreateGuid(PT_GUID, &CLSID_FontsFolderShortcut); } @@ -1854,7 +1830,7 @@ DWORD _ILSimpleGetTextW (LPCITEMIDLIST pidl, LPWSTR szOut, UINT uOutSize) if (pFileStructW) { lstrcpynW(szOut, pFileStructW->wszName, uOutSize); - dwReturn = lstrlenW(pFileStructW->wszName); + dwReturn = wcslen(pFileStructW->wszName); } else { GUID const * riid; WCHAR szTemp[MAX_PATH]; @@ -1876,7 +1852,7 @@ DWORD _ILSimpleGetTextW (LPCITEMIDLIST pidl, LPWSTR szOut, UINT uOutSize) if (szOut) lstrcpynW(szOut, szTemp, uOutSize); - dwReturn = lstrlenW (szTemp); + dwReturn = wcslen (szTemp); } } else if (( szSrcW = _ILGetTextPointerW(pidl) )) @@ -1885,7 +1861,7 @@ DWORD _ILSimpleGetTextW (LPCITEMIDLIST pidl, LPWSTR szOut, UINT uOutSize) if (szOut) lstrcpynW(szOut, szSrcW, uOutSize); - dwReturn = lstrlenW(szSrcW); + dwReturn = wcslen(szSrcW); } else if (( szSrc = _ILGetTextPointer(pidl) )) { @@ -1895,7 +1871,7 @@ DWORD _ILSimpleGetTextW (LPCITEMIDLIST pidl, LPWSTR szOut, UINT uOutSize) if (szOut) lstrcpynW(szOut, szTemp, uOutSize); - dwReturn = lstrlenW (szTemp); + dwReturn = wcslen (szTemp); } else if (( riid = _ILGetGUIDPointer(pidl) )) { @@ -1905,7 +1881,7 @@ DWORD _ILSimpleGetTextW (LPCITEMIDLIST pidl, LPWSTR szOut, UINT uOutSize) if (szOut) lstrcpynW(szOut, szTemp, uOutSize); - dwReturn = lstrlenW (szTemp); + dwReturn = wcslen (szTemp); } } else diff --git a/reactos/dll/win32/shell32/pidl.h b/reactos/dll/win32/shell32/pidl.h index eee285e16a5..51b655bf0f8 100644 --- a/reactos/dll/win32/shell32/pidl.h +++ b/reactos/dll/win32/shell32/pidl.h @@ -35,12 +35,13 @@ #ifndef __WINE_PIDL_H #define __WINE_PIDL_H + #include -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "shlobj.h" +#include +#include +#include +#include /* * the pidl does cache fileattributes to speed up SHGetAttributes when diff --git a/reactos/dll/win32/shell32/precomp.h b/reactos/dll/win32/shell32/precomp.h new file mode 100644 index 00000000000..962eb34cead --- /dev/null +++ b/reactos/dll/win32/shell32/precomp.h @@ -0,0 +1,77 @@ +#ifndef _PRECOMP_H__ +#define _PRECOMP_H__ + +#include "config.h" + +#include +#include +#include +#include +#include +#include +#include + +#define COBJMACROS +#define NONAMELESSUNION +#define NONAMELESSSTRUCT +#define WIN32_NO_STATUS +#define NTOS_MODE_USER +#define UNICODE +#define _UNICODE + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//#include +//#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#include "base/shell/explorer-new/todo.h" +#include "dlgs.h" +#include "pidl.h" +#include "debughlp.h" +#include "undocshell.h" +#include "shell32_main.h" +#include "shresdef.h" +#include "cpanel.h" +#include "enumidlist.h" +#include "shfldr.h" +#include "version.h" +#include "shellfolder.h" +#include "xdg.h" + +#include "wine/debug.h" +#include "wine/unicode.h" + +extern const GUID CLSID_AdminFolderShortcut; +extern const GUID CLSID_FontsFolderShortcut; +extern const GUID CLSID_StartMenu; +extern const GUID CLSID_OpenWith; +extern const GUID CLSID_UnixFolder; +extern const GUID CLSID_UnixDosFolder; +extern const GUID SHELL32_AdvtShortcutProduct; +extern const GUID SHELL32_AdvtShortcutComponent; + + +#endif diff --git a/reactos/dll/win32/shell32/regsvr.c b/reactos/dll/win32/shell32/regsvr.c index cd2ca62f767..74e6e622e80 100644 --- a/reactos/dll/win32/shell32/regsvr.c +++ b/reactos/dll/win32/shell32/regsvr.c @@ -17,26 +17,17 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include -#include -#include -#include +const GUID CLSID_AdminFolderShortcut = {0xD20EA4E1, 0x3957, 0x11D2, {0xA4, 0x0B, 0x0C, 0x50, 0x20, 0x52, 0x41, 0x53} }; +const GUID CLSID_StartMenu = {0x4622AD11, 0xFF23, 0x11D0, {0x8D, 0x34, 0x00, 0xA0, 0xC9, 0x0F, 0x27, 0x19}}; +const GUID CLSID_OpenWith = {0x09799AFB, 0xAD67, 0x11d1, {0xAB, 0xCD, 0x00, 0xC0, 0x4F, 0xC3, 0x09, 0x36}}; +const GUID CLSID_UnixFolder = {0xcc702eb2, 0x7dc5, 0x11d9, {0xc6, 0x87, 0x00, 0x04, 0x23, 0x8a, 0x01, 0xcd}}; +const GUID CLSID_UnixDosFolder = {0x9d20aae8, 0x0625, 0x44b0, {0x9c, 0xa7, 0x71, 0x88, 0x9c, 0x22, 0x54, 0xd9}}; +const GUID CLSID_FontsFolderShortcut = {0xD20EA4E1, 0x3957, 0x11D2, {0xA4, 0x0B, 0x0C, 0x50, 0x20, 0x52, 0x41,0x52}}; +const GUID SHELL32_AdvtShortcutProduct = {0x9db1186f, 0x40df, 0x11d1, {0xaa, 0x8c, 0x00, 0xc0, 0x4f, 0xb6, 0x78, 0x63}}; +const GUID SHELL32_AdvtShortcutComponent = {0x9db1186e, 0x40df, 0x11d1, {0xaa, 0x8c, 0x00, 0xc0, 0x4f, 0xb6, 0x78, 0x63}}; -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "winreg.h" -#include "winerror.h" - -#include "ole2.h" -#include "shldisp.h" -#include "shlguid.h" -#include "shell32_main.h" -#include "shresdef.h" -#include "initguid.h" -#include "shfldr.h" - -#include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(ole); @@ -193,10 +184,10 @@ static HRESULT register_interfaces(struct regsvr_interface const *list) KEY_READ | KEY_WRITE, NULL, &key, NULL); if (res != ERROR_SUCCESS) goto error_close_iid_key; - wsprintfW(buf, fmt, list->num_methods); + swprintf(buf, fmt, list->num_methods); res = RegSetValueExW(key, NULL, 0, REG_SZ, (CONST BYTE*)buf, - (lstrlenW(buf) + 1) * sizeof(WCHAR)); + (wcslen(buf) + 1) * sizeof(WCHAR)); RegCloseKey(key); if (res != ERROR_SUCCESS) goto error_close_iid_key; @@ -464,18 +455,18 @@ static WCHAR *get_namespace_key(struct regsvr_namespace const *list) { WCHAR *pwszKey, *pwszCLSID; pwszKey = HeapAlloc(GetProcessHeap(), 0, sizeof(wszExplorerKey)+sizeof(wszNamespace)+ - sizeof(WCHAR)*(lstrlenW(list->parent)+CHARS_IN_GUID)); + sizeof(WCHAR)*(wcslen(list->parent)+CHARS_IN_GUID)); if (!pwszKey) return NULL; - lstrcpyW(pwszKey, wszExplorerKey); - lstrcatW(pwszKey, list->parent); - lstrcatW(pwszKey, wszNamespace); + wcscpy(pwszKey, wszExplorerKey); + wcscat(pwszKey, list->parent); + wcscat(pwszKey, wszNamespace); if (FAILED(StringFromCLSID(list->clsid, &pwszCLSID))) { HeapFree(GetProcessHeap(), 0, pwszKey); return NULL; } - lstrcatW(pwszKey, pwszCLSID); + wcscat(pwszKey, pwszCLSID); CoTaskMemFree(pwszCLSID); return pwszKey; @@ -492,7 +483,7 @@ static HRESULT register_namespace_extensions(struct regsvr_namespace const *list if (pwszKey && ERROR_SUCCESS == RegCreateKeyExW(HKEY_LOCAL_MACHINE, pwszKey, 0, NULL, 0, KEY_WRITE, NULL, &hKey, NULL)) { - RegSetValueExW(hKey, NULL, 0, REG_SZ, (const BYTE *)list->value, sizeof(WCHAR)*(lstrlenW(list->value)+1)); + RegSetValueExW(hKey, NULL, 0, REG_SZ, (const BYTE *)list->value, sizeof(WCHAR)*(wcslen(list->value)+1)); RegCloseKey(hKey); } @@ -538,7 +529,7 @@ static LONG register_key_defvalueW( KEY_READ | KEY_WRITE, NULL, &key, NULL); if (res != ERROR_SUCCESS) return res; res = RegSetValueExW(key, NULL, 0, REG_SZ, (CONST BYTE*)value, - (lstrlenW(value) + 1) * sizeof(WCHAR)); + (wcslen(value) + 1) * sizeof(WCHAR)); RegCloseKey(key); return res; } diff --git a/reactos/dll/win32/shell32/ros-systray.c b/reactos/dll/win32/shell32/ros-systray.c index 59a9c23762f..f1e9f819b21 100644 --- a/reactos/dll/win32/shell32/ros-systray.c +++ b/reactos/dll/win32/shell32/ros-systray.c @@ -19,14 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "shellapi.h" - +#include /* copy data structure for tray notifications */ typedef struct TrayNotifyCDS_Dummy { diff --git a/reactos/dll/win32/shell32/she_ocmenu.c b/reactos/dll/win32/shell32/she_ocmenu.c index 671d0afd031..7e53c7f38f8 100644 --- a/reactos/dll/win32/shell32/she_ocmenu.c +++ b/reactos/dll/win32/shell32/she_ocmenu.c @@ -18,31 +18,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include - -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT -#include "winerror.h" -#include "wine/debug.h" - -#include "windef.h" -#include "wingdi.h" -#include "pidl.h" -#include "undocshell.h" -#include "shlobj.h" -#include "objbase.h" -#include "commdlg.h" -#include "shlwapi.h" -#include "shell32_main.h" -#include "shellfolder.h" -#include "shresdef.h" -#include "stdio.h" +#include WINE_DEFAULT_DEBUG_CHANNEL (shell); -const GUID CLSID_OpenWith = { 0x09799AFB, 0xAD67, 0x11d1, {0xAB,0xCD,0x00,0xC0,0x4F,0xC3,0x09,0x36} }; - /// /// [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system] /// "NoInternetOpenWith"=dword:00000001 @@ -63,7 +42,7 @@ typedef struct UINT count; WCHAR szPath[MAX_PATH]; HMENU hSubMenu; -} SHEOWImpl; +} SHEOWImpl, *LPSHEOWImpl; typedef struct { @@ -160,12 +139,12 @@ HRESULT WINAPI SHEOW_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *ppv) return res; } -static inline SHEOWImpl *impl_from_IShellExtInit( IShellExtInit *iface ) +static LPSHEOWImpl __inline impl_from_IShellExtInit( IShellExtInit *iface ) { return (SHEOWImpl *)((char*)iface - FIELD_OFFSET(SHEOWImpl, lpvtblShellExtInit)); } -static inline SHEOWImpl *impl_from_IContextMenu( IContextMenu2 *iface ) +static LPSHEOWImpl __inline impl_from_IContextMenu( IContextMenu2 *iface ) { return (SHEOWImpl *)((char*)iface - FIELD_OFFSET(SHEOWImpl, lpVtblContextMenu)); } @@ -248,14 +227,14 @@ AddItem(HMENU hMenu, UINT idCmdFirst) mii.fState = MFS_ENABLED; mii.wID = idCmdFirst; mii.dwTypeData = (LPWSTR)szBuffer; - mii.cch = strlenW(szBuffer); + mii.cch = wcslen(szBuffer); InsertMenuItemW(hMenu, -1, TRUE, &mii); } static void -LoadOWItems(POPEN_WITH_CONTEXT pContext, WCHAR * szName) +LoadOWItems(POPEN_WITH_CONTEXT pContext, LPCWSTR szName) { WCHAR * szExt; WCHAR szPath[100]; @@ -434,12 +413,12 @@ WriteStaticShellExtensionKey(HKEY hRootKey, WCHAR * pVerb, WCHAR *pFullPath) wcscpy(szBuffer, pFullPath); wcscat(szBuffer, L" %1"); - result = RegSetValueExW(hShell, NULL, 0, REG_SZ, (const BYTE*)szBuffer, (strlenW(szBuffer)+1)* sizeof(WCHAR)); + result = RegSetValueExW(hShell, NULL, 0, REG_SZ, (const BYTE*)szBuffer, (wcslen(szBuffer)+1)* sizeof(WCHAR)); RegCloseKey(hShell); } VOID -StoreNewSettings(WCHAR * szFileName, WCHAR *szAppName) +StoreNewSettings(LPCWSTR szFileName, WCHAR *szAppName) { WCHAR szBuffer[100] = { L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\"}; WCHAR * pFileExt; @@ -478,7 +457,7 @@ StoreNewSettings(WCHAR * szFileName, WCHAR *szAppName) } VOID -SetProgrammAsDefaultHandler(WCHAR * szFileName, WCHAR * szAppName) +SetProgrammAsDefaultHandler(LPCWSTR szFileName, WCHAR * szAppName) { HKEY hKey; HKEY hAppKey; @@ -503,7 +482,7 @@ SetProgrammAsDefaultHandler(WCHAR * szFileName, WCHAR * szAppName) /* a new entry was created create the prog key id */ wcscpy(szBuffer, &pFileExt[1]); wcscat(szBuffer, L"_auto_file"); - if (RegSetValueExW(hKey, NULL, 0, REG_SZ, (const BYTE*)szBuffer, (strlenW(szBuffer)+1) * sizeof(WCHAR)) != ERROR_SUCCESS) + if (RegSetValueExW(hKey, NULL, 0, REG_SZ, (const BYTE*)szBuffer, (wcslen(szBuffer)+1) * sizeof(WCHAR)) != ERROR_SUCCESS) { RegCloseKey(hKey); return; @@ -570,7 +549,7 @@ BrowseForApplication(HWND hwndDlg) { szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; ofn.lpstrTitle = szBuffer; - ofn.nMaxFileTitle = strlenW(szBuffer); + ofn.nMaxFileTitle = wcslen(szBuffer); } ZeroMemory(&ofn, sizeof(OPENFILENAMEW)); @@ -655,6 +634,7 @@ static BOOL CALLBACK OpenWithProgrammDlg(HWND hwndDlg, UINT uMsg, WPARAM wParam, COLORREF preColor, preBkColor; POPEN_ITEM_CONTEXT pItemContext; LONG YOffset; + OPEN_WITH_CONTEXT Context; poainfo = (OPENASINFO*) GetWindowLong(hwndDlg, DWLP_USER); @@ -672,21 +652,16 @@ static BOOL CALLBACK OpenWithProgrammDlg(HWND hwndDlg, UINT uMsg, WPARAM wParam, if (poainfo->pcszFile) { szBuffer[0] = L'\0'; - SendDlgItemMessageA(hwndDlg, 14001, WM_GETTEXT, sizeof(szBuffer), (LPARAM)szBuffer); - index = strlen((char*)szBuffer); - if (index + strlen(poainfo->pcszFile) + 1 < sizeof(szBuffer)) - strcat((char*)szBuffer, poainfo->pcszFile); + SendDlgItemMessageW(hwndDlg, 14001, WM_GETTEXT, sizeof(szBuffer), (LPARAM)szBuffer); + index = wcslen(szBuffer); + if (index + wcslen(poainfo->pcszFile) + 1 < sizeof(szBuffer)/sizeof(szBuffer[0])) + wcscat(szBuffer, poainfo->pcszFile); szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; - SendDlgItemMessageA(hwndDlg, 14001, WM_SETTEXT, 0, (LPARAM)szBuffer); - } - if (MultiByteToWideChar(CP_ACP, 0,poainfo->pcszFile, -1, szBuffer, MAX_PATH)) - { - OPEN_WITH_CONTEXT Context; - szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; - ZeroMemory(&Context, sizeof(OPEN_WITH_CONTEXT)); - Context.hDlgCtrl = GetDlgItem(hwndDlg, 14002); - LoadOWItems(&Context, szBuffer); - SendMessage(Context.hDlgCtrl, LB_SETCURSEL, 0, 0); + SendDlgItemMessageW(hwndDlg, 14001, WM_SETTEXT, 0, (LPARAM)szBuffer); + ZeroMemory(&Context, sizeof(OPEN_WITH_CONTEXT)); + Context.hDlgCtrl = GetDlgItem(hwndDlg, 14002); + LoadOWItems(&Context, poainfo->pcszFile); + SendMessage(Context.hDlgCtrl, LB_SETCURSEL, 0, 0); } return TRUE; case WM_MEASUREITEM: @@ -708,16 +683,12 @@ static BOOL CALLBACK OpenWithProgrammDlg(HWND hwndDlg, UINT uMsg, WPARAM wParam, if (pItemContext) { /* store settings in HKCU path */ - if(MultiByteToWideChar(CP_ACP, 0, poainfo->pcszFile, -1, szBuffer, MAX_PATH + 30)) - { - szBuffer[MAX_PATH+29] = 0; - StoreNewSettings(szBuffer, pItemContext->szAppName); - } + StoreNewSettings(poainfo->pcszFile, pItemContext->szAppName); if (SendDlgItemMessage(hwndDlg, 14003, BM_GETCHECK, 0, 0) == BST_CHECKED) { /* set programm as default handler */ - SetProgrammAsDefaultHandler(szBuffer, pItemContext->szAppName); + SetProgrammAsDefaultHandler(poainfo->pcszFile, pItemContext->szAppName); } if (poainfo->oaifInFlags & OAIF_EXEC) @@ -834,13 +805,8 @@ SHEOWCm_fnInvokeCommand( IContextMenu2* iface, LPCMINVOKECOMMANDINFO lpici ) if (This->wId == LOWORD(lpici->lpVerb)) { OPENASINFO info; - char buffer[MAX_PATH] = {0}; - - if(WideCharToMultiByte(CP_ACP,0,This->szPath,-1,buffer,MAX_PATH,NULL,NULL)) - { - info.pcszFile = buffer; - } + info.pcszFile = This->szPath; info.oaifInFlags = OAIF_ALLOW_REGISTRATION | OAIF_REGISTER_EXT | OAIF_EXEC; info.pcszClass = NULL; FreeMenuItemContext(This->hSubMenu); @@ -953,7 +919,7 @@ GetManufacturer(WCHAR * szAppName, POPEN_ITEM_CONTEXT pContext) code = lplangcode->code; } /* set up format */ - sprintfW(szBuffer, wFormat, lang, code); + swprintf(szBuffer, wFormat, lang, code); /* query manufacturer */ pResult = NULL; bResult = VerQueryValueW(pBuf, szBuffer, (LPVOID *)&pResult, &VerSize); @@ -1001,7 +967,7 @@ InsertOpenWithItem(POPEN_WITH_CONTEXT pContext, WCHAR * szAppName) mii.fState = MFS_ENABLED; mii.wID = pContext->idCmdFirst; mii.dwTypeData = Buffer; - mii.cch = strlenW(Buffer); + mii.cch = wcslen(Buffer); mii.dwItemData = (ULONG_PTR)pItemContext; wcscpy(pItemContext->szManufacturer, Buffer); if (InsertMenuItemW(pContext->hMenu, -1, TRUE, &mii)) @@ -1042,10 +1008,10 @@ OpenMRUList(HKEY hKey) wcscat(szPath, L"comctl32.dll"); hModule = LoadLibraryExW(szPath, NULL, 0); } - CreateMRUListW = (CREATEMRULISTW)GetProcAddress(hModule, MAKEINTRESOURCE(400)); - EnumMRUListW = (ENUMMRULISTW)GetProcAddress(hModule, MAKEINTRESOURCE(403)); - FreeMRUList = (FREEMRULIST)GetProcAddress(hModule, MAKEINTRESOURCE(152)); - AddMRUStringW = (ADDMRUSTRINGW)GetProcAddress(hModule, MAKEINTRESOURCE(401)); + CreateMRUListW = (CREATEMRULISTW)GetProcAddress(hModule, MAKEINTRESOURCEA(400)); + EnumMRUListW = (ENUMMRULISTW)GetProcAddress(hModule, MAKEINTRESOURCEA(403)); + FreeMRUList = (FREEMRULIST)GetProcAddress(hModule, MAKEINTRESOURCEA(152)); + AddMRUStringW = (ADDMRUSTRINGW)GetProcAddress(hModule, MAKEINTRESOURCEA(401)); if (!CreateMRUListW || !EnumMRUListW || !FreeMRUList || !AddMRUStringW) return 0; @@ -1153,7 +1119,7 @@ LoadItemFromHKCR(POPEN_WITH_CONTEXT pContext, WCHAR * szExt) } /* load items from SystemFileAssociations\Ext key */ - sprintfW(szResult, szSysFileAssoc, szExt); + swprintf(szResult, szSysFileAssoc, szExt); if (RegOpenKeyExW(HKEY_CLASSES_ROOT, szResult, 0, KEY_READ | KEY_WRITE, &hSubKey) == ERROR_SUCCESS) { AddItemFromMRUList(pContext, hSubKey); @@ -1171,7 +1137,7 @@ LoadItemFromHKCR(POPEN_WITH_CONTEXT pContext, WCHAR * szExt) /* terminate it explictely */ szBuffer[29] = 0; - sprintfW(szResult, szSysFileAssoc, szBuffer); + swprintf(szResult, szSysFileAssoc, szBuffer); if (RegOpenKeyExW(HKEY_CLASSES_ROOT, szResult, 0, KEY_READ | KEY_WRITE, &hSubKey) == ERROR_SUCCESS) { AddItemFromMRUList(pContext, hSubKey); @@ -1189,7 +1155,7 @@ LoadItemFromHKCU(POPEN_WITH_CONTEXT pContext, WCHAR * szExt) static const WCHAR szOpenWithList[] = L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\%s"; /* handle first progid lists */ - sprintfW(szBuffer, szOpenWithProgIDs, szExt); + swprintf(szBuffer, szOpenWithProgIDs, szExt); if (RegOpenKeyExW(HKEY_CURRENT_USER, szBuffer, 0, KEY_READ | KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS) { AddItemFromProgIDList(pContext, hKey); @@ -1197,7 +1163,7 @@ LoadItemFromHKCU(POPEN_WITH_CONTEXT pContext, WCHAR * szExt) } /* now handle mru lists */ - sprintfW(szBuffer, szOpenWithList, szExt); + swprintf(szBuffer, szOpenWithList, szExt); if (RegOpenKeyExW(HKEY_CURRENT_USER, szBuffer, 0, KEY_READ | KEY_WRITE, &hKey) == ERROR_SUCCESS) { AddItemFromMRUList(pContext, hKey); diff --git a/reactos/dll/win32/shell32/shell.c b/reactos/dll/win32/shell32/shell.c index 26b614636c7..71761fc49ad 100644 --- a/reactos/dll/win32/shell32/shell.c +++ b/reactos/dll/win32/shell32/shell.c @@ -20,612 +20,14 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - #include #include #include -#ifdef HAVE_UNISTD_H -# include -#endif #include +#include +#include +#include -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wownt32.h" -#include "shellapi.h" -#include "winuser.h" -#include "wingdi.h" -#include "shlobj.h" -#include "shlwapi.h" -#include "wine/winbase16.h" -#include "shell32_main.h" -#include "wine/debug.h" -WINE_DEFAULT_DEBUG_CHANNEL(shell); - - -typedef struct { /* structure for dropped files */ - WORD wSize; - POINT16 ptMousePos; - BOOL16 fInNonClientArea; - /* memory block with filenames follows */ -} DROPFILESTRUCT16, *LPDROPFILESTRUCT16; - -static const char lpstrMsgWndCreated[] = "OTHERWINDOWCREATED"; -static const char lpstrMsgWndDestroyed[] = "OTHERWINDOWDESTROYED"; -static const char lpstrMsgShellActivate[] = "ACTIVATESHELLWINDOW"; - -static HWND SHELL_hWnd = 0; -static HHOOK SHELL_hHook = 0; -static UINT uMsgWndCreated = 0; -static UINT uMsgWndDestroyed = 0; -static UINT uMsgShellActivate = 0; - -/*********************************************************************** - * DllEntryPoint [SHELL.101] - * - * Initialization code for shell.dll. Automatically loads the - * 32-bit shell32.dll to allow thunking up to 32-bit code. - * - * RETURNS - * Success: TRUE. Initialization completed successfully. - * Failure: FALSE. - */ -BOOL WINAPI SHELL_DllEntryPoint(DWORD Reason, HINSTANCE16 hInst, - WORD ds, WORD HeapSize, DWORD res1, WORD res2) -{ - return TRUE; -} - -/************************************************************************* - * DragAcceptFiles [SHELL.9] - */ -void WINAPI DragAcceptFiles16(HWND16 hWnd, BOOL16 b) -{ - DragAcceptFiles(HWND_32(hWnd), b); -} - -/************************************************************************* - * DragQueryFile [SHELL.11] - */ -UINT16 WINAPI DragQueryFile16( - HDROP16 hDrop, - WORD wFile, - LPSTR lpszFile, - WORD wLength) -{ - LPSTR lpDrop; - UINT i = 0; - LPDROPFILESTRUCT16 lpDropFileStruct = (LPDROPFILESTRUCT16) GlobalLock16(hDrop); - - TRACE("(%04x, %x, %p, %u)\n", hDrop,wFile,lpszFile,wLength); - - if(!lpDropFileStruct) goto end; - - lpDrop = (LPSTR) lpDropFileStruct + lpDropFileStruct->wSize; - - while (i++ < wFile) - { - while (*lpDrop++); /* skip filename */ - if (!*lpDrop) - { - i = (wFile == 0xFFFF) ? i : 0; - goto end; - } - } - - i = strlen(lpDrop); - if (!lpszFile ) goto end; /* needed buffer size */ - lstrcpynA (lpszFile, lpDrop, wLength); -end: - GlobalUnlock16(hDrop); - return i; -} - -/************************************************************************* - * DragFinish [SHELL.12] - */ -void WINAPI DragFinish16(HDROP16 h) -{ - TRACE("\n"); - GlobalFree16((HGLOBAL16)h); -} - - -/************************************************************************* - * DragQueryPoint [SHELL.13] - */ -BOOL16 WINAPI DragQueryPoint16(HDROP16 hDrop, POINT16 *p) -{ - LPDROPFILESTRUCT16 lpDropFileStruct; - BOOL16 bRet; - TRACE("\n"); - lpDropFileStruct = (LPDROPFILESTRUCT16) GlobalLock16(hDrop); - - memcpy(p,&lpDropFileStruct->ptMousePos,sizeof(POINT16)); - bRet = lpDropFileStruct->fInNonClientArea; - - GlobalUnlock16(hDrop); - return bRet; -} - -/************************************************************************* - * FindExecutable (SHELL.21) - */ -HINSTANCE16 WINAPI FindExecutable16( LPCSTR lpFile, LPCSTR lpDirectory, - LPSTR lpResult ) -{ return HINSTANCE_16(FindExecutableA( lpFile, lpDirectory, lpResult )); -} - -/************************************************************************* - * AboutDlgProc (SHELL.33) - */ -BOOL16 WINAPI AboutDlgProc16( HWND16 hWnd, UINT16 msg, WPARAM16 wParam, - LPARAM lParam ) -{ return (BOOL16)AboutDlgProc( HWND_32(hWnd), msg, wParam, lParam ); -} - - -/************************************************************************* - * ShellAbout (SHELL.22) - */ -BOOL16 WINAPI ShellAbout16( HWND16 hWnd, LPCSTR szApp, LPCSTR szOtherStuff, - HICON16 hIcon ) -{ return ShellAboutA( HWND_32(hWnd), szApp, szOtherStuff, HICON_32(hIcon) ); -} - -/************************************************************************* - * InternalExtractIcon [SHELL.39] - * - * This abortion is called directly by Progman - */ -HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16 hInstance, - LPCSTR lpszExeFileName, UINT16 nIconIndex, WORD n ) -{ - HGLOBAL16 hRet = 0; - HICON16 *RetPtr = NULL; - OFSTRUCT ofs; - - TRACE("(%04x,file %s,start %d,extract %d\n", - hInstance, lpszExeFileName, nIconIndex, n); - - if (!n) - return 0; - - hRet = GlobalAlloc16(GMEM_FIXED | GMEM_ZEROINIT, sizeof(*RetPtr) * n); - RetPtr = (HICON16*)GlobalLock16(hRet); - - if (nIconIndex == (UINT16)-1) /* get number of icons */ - { - RetPtr[0] = PrivateExtractIconsA(ofs.szPathName, 0, 0, 0, NULL, NULL, 0, LR_DEFAULTCOLOR); - } - else - { - UINT ret; - HICON *icons; - - icons = HeapAlloc(GetProcessHeap(), 0, n * sizeof(*icons)); - ret = PrivateExtractIconsA(ofs.szPathName, nIconIndex, - GetSystemMetrics(SM_CXICON), - GetSystemMetrics(SM_CYICON), - icons, NULL, n, LR_DEFAULTCOLOR); - if ((ret != 0xffffffff) && ret) - { - int i; - for (i = 0; i < n; i++) RetPtr[i] = HICON_16(icons[i]); - } - else - { - GlobalFree16(hRet); - hRet = 0; - } - HeapFree(GetProcessHeap(), 0, icons); - } - return hRet; -} - -/************************************************************************* - * ExtractIcon (SHELL.34) - */ -HICON16 WINAPI ExtractIcon16( HINSTANCE16 hInstance, LPCSTR lpszExeFileName, - UINT16 nIconIndex ) -{ TRACE("\n"); - return HICON_16(ExtractIconA(HINSTANCE_32(hInstance), lpszExeFileName, nIconIndex)); -} - -/************************************************************************* - * ExtractIconEx (SHELL.40) - */ -HICON16 WINAPI ExtractIconEx16( - LPCSTR lpszFile, INT16 nIconIndex, HICON16 *phiconLarge, - HICON16 *phiconSmall, UINT16 nIcons -) { - HICON *ilarge,*ismall; - UINT16 ret; - int i; - - if (phiconLarge) - ilarge = HeapAlloc(GetProcessHeap(),0,nIcons*sizeof(HICON)); - else - ilarge = NULL; - if (phiconSmall) - ismall = HeapAlloc(GetProcessHeap(),0,nIcons*sizeof(HICON)); - else - ismall = NULL; - ret = HICON_16(ExtractIconExA(lpszFile,nIconIndex,ilarge,ismall,nIcons)); - if (ilarge) { - for (i=0;i length - 1 ) - goto err; - - memcpy(lpBuffer + bufCnt, lpKey, l); - bufCnt += l; - } else { /* Keyword not found; Leave the %KEYWORD% intact */ - if( bufCnt + envKeyLen + 2 > length - 1 ) - goto err; - - memcpy(lpBuffer + bufCnt, lpstr, envKeyLen + 2); - bufCnt += envKeyLen + 2; - } - - lpstr = lpend + 1; - } - - if (!*lpstr && bufCnt <= length - 1) { - memcpy(str,lpBuffer, bufCnt); - str[bufCnt] = '\0'; - retLength = bufCnt + 1; - retStatus = 1; - } - - err: - if (!retStatus) - WARN("-- Env subst aborted - string too short or invalid input\n"); - TRACE("-- return %s\n", str); - - OemToCharA(str,str); - HeapFree( GetProcessHeap(), 0, lpBuffer); - - return (DWORD)MAKELONG(retLength, retStatus); -} - -/************************************************************************* - * SHELL_HookProc - * - * 32-bit version of the system-wide WH_SHELL hook. - */ -static LRESULT WINAPI SHELL_HookProc(INT code, WPARAM wParam, LPARAM lParam) -{ - TRACE("%i, %lx, %08lx\n", code, wParam, lParam ); - - if (SHELL_hWnd) - { - switch( code ) - { - case HSHELL_WINDOWCREATED: - PostMessageA( SHELL_hWnd, uMsgWndCreated, wParam, 0 ); - break; - case HSHELL_WINDOWDESTROYED: - PostMessageA( SHELL_hWnd, uMsgWndDestroyed, wParam, 0 ); - break; - case HSHELL_ACTIVATESHELLWINDOW: - PostMessageA( SHELL_hWnd, uMsgShellActivate, wParam, 0 ); - break; - } - } - return CallNextHookEx( SHELL_hHook, code, wParam, lParam ); -} - -/************************************************************************* - * ShellHookProc [SHELL.103] - * System-wide WH_SHELL hook. - */ -LRESULT WINAPI ShellHookProc16(INT16 code, WPARAM16 wParam, LPARAM lParam) -{ - return SHELL_HookProc( code, wParam, lParam ); -} - -/************************************************************************* - * RegisterShellHook [SHELL.102] - */ -BOOL WINAPI RegisterShellHook16(HWND16 hWnd, UINT16 uAction) -{ - TRACE("%04x [%u]\n", hWnd, uAction ); - - switch( uAction ) - { - case 2: /* register hWnd as a shell window */ - if( !SHELL_hHook ) - { - SHELL_hHook = SetWindowsHookExA( WH_SHELL, SHELL_HookProc, - GetModuleHandleA("shell32.dll"), 0 ); - if ( SHELL_hHook ) - { - uMsgWndCreated = RegisterWindowMessageA( lpstrMsgWndCreated ); - uMsgWndDestroyed = RegisterWindowMessageA( lpstrMsgWndDestroyed ); - uMsgShellActivate = RegisterWindowMessageA( lpstrMsgShellActivate ); - } - else - WARN("-- unable to install ShellHookProc()!\n"); - } - - if ( SHELL_hHook ) - return ((SHELL_hWnd = HWND_32(hWnd)) != 0); - break; - - default: - WARN("-- unknown code %i\n", uAction ); - SHELL_hWnd = 0; /* just in case */ - } - return FALSE; -} - - -/*********************************************************************** - * DriveType (SHELL.262) - */ -UINT16 WINAPI DriveType16( UINT16 drive ) -{ - UINT ret; - char path[] = "A:\\"; - path[0] += drive; - ret = GetDriveTypeA(path); - switch(ret) /* some values are not supported in Win16 */ - { - case DRIVE_CDROM: - ret = DRIVE_REMOTE; - break; - case DRIVE_NO_ROOT_DIR: - ret = DRIVE_UNKNOWN; - break; - } - return ret; -} - - -/* 0 and 1 are valid rootkeys in win16 shell.dll and are used by - * some programs. Do not remove those cases. -MM - */ -static inline void fix_win16_hkey( HKEY *hkey ) -{ - if (*hkey == 0 || *hkey == (HKEY)1) *hkey = HKEY_CLASSES_ROOT; -} - -/****************************************************************************** - * RegOpenKey [SHELL.1] - */ -DWORD WINAPI RegOpenKey16( HKEY hkey, LPCSTR name, PHKEY retkey ) -{ - fix_win16_hkey( &hkey ); - return RegOpenKeyA( hkey, name, retkey ); -} - -/****************************************************************************** - * RegCreateKey [SHELL.2] - */ -DWORD WINAPI RegCreateKey16( HKEY hkey, LPCSTR name, PHKEY retkey ) -{ - fix_win16_hkey( &hkey ); - return RegCreateKeyA( hkey, name, retkey ); -} - -/****************************************************************************** - * RegCloseKey [SHELL.3] - */ -DWORD WINAPI RegCloseKey16( HKEY hkey ) -{ - fix_win16_hkey( &hkey ); - return RegCloseKey( hkey ); -} - -/****************************************************************************** - * RegDeleteKey [SHELL.4] - */ -DWORD WINAPI RegDeleteKey16( HKEY hkey, LPCSTR name ) -{ - fix_win16_hkey( &hkey ); - return RegDeleteKeyA( hkey, name ); -} - -/****************************************************************************** - * RegSetValue [SHELL.5] - */ -DWORD WINAPI RegSetValue16( HKEY hkey, LPCSTR name, DWORD type, LPCSTR data, DWORD count ) -{ - fix_win16_hkey( &hkey ); - return RegSetValueA( hkey, name, type, data, count ); -} - -/****************************************************************************** - * RegQueryValue [SHELL.6] - * - * NOTES - * Is this HACK still applicable? - * - * HACK - * The 16bit RegQueryValue doesn't handle selectorblocks anyway, so we just - * mask out the high 16 bit. This (not so much incidently) hopefully fixes - * Aldus FH4) - */ -DWORD WINAPI RegQueryValue16( HKEY hkey, LPCSTR name, LPSTR data, LPDWORD count -) -{ - fix_win16_hkey( &hkey ); - if (count) *count &= 0xffff; - return RegQueryValueA( hkey, name, data, (LONG*) count ); -} - -/****************************************************************************** - * RegEnumKey [SHELL.7] - */ -DWORD WINAPI RegEnumKey16( HKEY hkey, DWORD index, LPSTR name, DWORD name_len ) -{ - fix_win16_hkey( &hkey ); - return RegEnumKeyA( hkey, index, name, name_len ); -} - -/************************************************************************* - * SHELL_Execute16 [Internal] - */ -static UINT_PTR SHELL_Execute16(const WCHAR *lpCmd, WCHAR *env, BOOL shWait, - LPSHELLEXECUTEINFOW psei, LPSHELLEXECUTEINFOW psei_out) -{ - UINT ret; - char sCmd[MAX_PATH]; - WideCharToMultiByte(CP_ACP, 0, lpCmd, -1, sCmd, MAX_PATH, NULL, NULL); - ret = WinExec16(sCmd, (UINT16)psei->nShow); - psei_out->hInstApp = HINSTANCE_32(ret); - return ret; -} - -/************************************************************************* - * ShellExecute [SHELL.20] - */ -HINSTANCE16 WINAPI ShellExecute16( HWND16 hWnd, LPCSTR lpOperation, - LPCSTR lpFile, LPCSTR lpParameters, - LPCSTR lpDirectory, INT16 iShowCmd ) -{ - SHELLEXECUTEINFOW seiW; - WCHAR *wVerb = NULL, *wFile = NULL, *wParameters = NULL, *wDirectory = NULL; - HANDLE hProcess = 0; - - seiW.lpVerb = lpOperation ? __SHCloneStrAtoW(&wVerb, lpOperation) : NULL; - seiW.lpFile = lpFile ? __SHCloneStrAtoW(&wFile, lpFile) : NULL; - seiW.lpParameters = lpParameters ? __SHCloneStrAtoW(&wParameters, lpParameters) : NULL; - seiW.lpDirectory = lpDirectory ? __SHCloneStrAtoW(&wDirectory, lpDirectory) : NULL; - - seiW.cbSize = sizeof(seiW); - seiW.fMask = 0; - seiW.hwnd = HWND_32(hWnd); - seiW.nShow = iShowCmd; - seiW.lpIDList = 0; - seiW.lpClass = 0; - seiW.hkeyClass = 0; - seiW.dwHotKey = 0; - seiW.hProcess = hProcess; - - SHELL_execute( &seiW, SHELL_Execute16 ); - - SHFree(wVerb); - SHFree(wFile); - SHFree(wParameters); - SHFree(wDirectory); - - return HINSTANCE_16(seiW.hInstApp); -} diff --git a/reactos/dll/win32/shell32/shell32.rbuild b/reactos/dll/win32/shell32/shell32.rbuild index 630d995f15c..28f18f5a19d 100644 --- a/reactos/dll/win32/shell32/shell32.rbuild +++ b/reactos/dll/win32/shell32/shell32.rbuild @@ -25,6 +25,7 @@ devmgr winspool winmm + precomp.h authors.c autocomplete.c brsfolder.c @@ -68,7 +69,6 @@ shv_def_cmenu.c startmenu.c ros-systray.c - shell32.rc shell32.spec fprop.c drive.c @@ -78,4 +78,5 @@ folder_options.c shfldr_netplaces.c shfldr_fonts.c + shell32.rc diff --git a/reactos/dll/win32/shell32/shell32_main.c b/reactos/dll/win32/shell32/shell32_main.c index fa2f3a04bec..2887fa62f34 100644 --- a/reactos/dll/win32/shell32/shell32_main.c +++ b/reactos/dll/win32/shell32/shell32_main.c @@ -19,34 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - -#include -#include -#include -#include - -#define COBJMACROS - -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "winreg.h" -#include "dlgs.h" -#include "shellapi.h" -#include "winuser.h" -#include "wingdi.h" -#include "shlobj.h" -#include "shlwapi.h" - -#include "undocshell.h" -#include "pidl.h" -#include "shell32_main.h" -#include "version.h" -#include "shresdef.h" - -#include "wine/debug.h" -#include "wine/unicode.h" +#include WINE_DEFAULT_DEBUG_CHANNEL(shell); @@ -157,11 +130,11 @@ LPWSTR* WINAPI CommandLineToArgvW(LPCWSTR lpCmdline, int* numargs) /* Allocate in a single lump, the string array, and the strings that go with it. * This way the caller can make a single GlobalFree call to free both, as per MSDN. */ - argv=LocalAlloc(LMEM_FIXED, argc*sizeof(LPWSTR)+(strlenW(lpCmdline)+1)*sizeof(WCHAR)); + argv=LocalAlloc(LMEM_FIXED, argc*sizeof(LPWSTR)+(wcslen(lpCmdline)+1)*sizeof(WCHAR)); if (!argv) return NULL; cmdline=(LPWSTR)(argv+argc); - strcpyW(cmdline, lpCmdline); + wcscpy(cmdline, lpCmdline); argc=0; bcount=0; @@ -439,7 +412,7 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes, { if (flags & SHGFI_USEFILEATTRIBUTES) { - lstrcpyW (psfi->szDisplayName, PathFindFileNameW(szFullPath)); + wcscpy (psfi->szDisplayName, PathFindFileNameW(szFullPath)); } else { @@ -466,17 +439,17 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes, else { if (dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) - strcatW (psfi->szTypeName, szFile); + wcscat (psfi->szTypeName, szFile); else { WCHAR sTemp[64]; - lstrcpyW(sTemp,PathFindExtensionW(szFullPath)); + wcscpy(sTemp,PathFindExtensionW(szFullPath)); if (!( HCR_MapTypeToValueW(sTemp, sTemp, 64, TRUE) && HCR_MapTypeToValueW(sTemp, psfi->szTypeName, 80, FALSE ))) { lstrcpynW (psfi->szTypeName, sTemp, 64); - strcatW (psfi->szTypeName, szDashFile); + wcscat (psfi->szTypeName, szDashFile); } } } @@ -513,7 +486,7 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes, { if (dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { - lstrcpyW(psfi->szDisplayName, swShell32Name); + wcscpy(psfi->szDisplayName, swShell32Name); psfi->iIcon = -IDI_SHELL_FOLDER; } else @@ -529,11 +502,11 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes, HCR_GetDefaultIconW(sTemp, sTemp, MAX_PATH, &psfi->iIcon)) { if (lstrcmpW(p1W, sTemp)) - strcpyW(psfi->szDisplayName, sTemp); + wcscpy(psfi->szDisplayName, sTemp); else { /* the icon is in the file */ - strcpyW(psfi->szDisplayName, szFullPath); + wcscpy(psfi->szDisplayName, szFullPath); } } else @@ -547,17 +520,17 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes, &uDummy, (LPVOID*)&pei); if (SUCCEEDED(hr)) { - hr = IExtractIconW_GetIconLocation(pei, uGilFlags, + hr = pei->lpVtbl->GetIconLocation(pei, uGilFlags, szLocation, MAX_PATH, &iIndex, &uFlags); if (uFlags & GIL_NOTFILENAME) ret = FALSE; else { - lstrcpyW (psfi->szDisplayName, szLocation); + wcscpy (psfi->szDisplayName, szLocation); psfi->iIcon = iIndex; } - IExtractIconW_Release(pei); + pei->lpVtbl->Release(pei); } } } @@ -586,7 +559,7 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes, HCR_GetDefaultIconW(sTemp, sTemp, MAX_PATH, &icon_idx)) { if (!lstrcmpW(p1W,sTemp)) /* icon is in the file */ - strcpyW(sTemp, szFullPath); + wcscpy(sTemp, szFullPath); if (flags & SHGFI_SYSICONINDEX) { @@ -1043,7 +1016,7 @@ INT_PTR CALLBACK AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam SendDlgItemMessageW(hWnd, IDC_SHELL_ABOUT_ICON, STM_SETICON, (WPARAM)info->hIcon, 0); GetWindowTextW( hWnd, szAppTitleTemplate, sizeof(szAppTitleTemplate) / sizeof(WCHAR) ); - wsprintfW( szAppTitle, szAppTitleTemplate, info->szApp ); + swprintf( szAppTitle, szAppTitleTemplate, info->szApp ); SetWindowTextW( hWnd, szAppTitle ); SetDlgItemTextW( hWnd, IDC_SHELL_ABOUT_APPNAME, info->szApp ); @@ -1108,13 +1081,13 @@ INT_PTR CALLBACK AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam uDecimals = (UCHAR)((UINT)(dTotalPhys * 100) - uIntegral * 100); // Display the RAM size with 2 decimals - wsprintfW(szBuf, L"%u%s%02u %s", uIntegral, szDecimalSeparator, uDecimals, szUnits); + swprintf(szBuf, L"%u%s%02u %s", uIntegral, szDecimalSeparator, uDecimals, szUnits); } } else { // We're dealing with MBs, don't show any decimals - wsprintfW( szBuf, L"%u MB", (UINT)MemStat.ullTotalPhys / 1024 / 1024 ); + swprintf( szBuf, L"%u MB", (UINT)MemStat.ullTotalPhys / 1024 / 1024 ); } SetDlgItemTextW( hWnd, IDC_SHELL_ABOUT_PHYSMEM, szBuf); diff --git a/reactos/dll/win32/shell32/shell32_main.h b/reactos/dll/win32/shell32/shell32_main.h index 14b1915b3ef..a4b05a83162 100644 --- a/reactos/dll/win32/shell32/shell32_main.h +++ b/reactos/dll/win32/shell32/shell32_main.h @@ -23,7 +23,9 @@ #define __WINE_SHELL_MAIN_H #include +#include +/* #include "windef.h" #include "winbase.h" #include "wingdi.h" @@ -38,6 +40,7 @@ #include "wine/windef16.h" #include "wine/unicode.h" +*/ /******************************************* * global SHELL32.DLL variables */ @@ -162,24 +165,10 @@ void FreeChangeNotifications(void); BOOL SHELL_DeleteDirectoryW(HWND hwnd, LPCWSTR pwszDir, BOOL bShowUI); BOOL SHELL_ConfirmYesNoW(HWND hWnd, int nKindOfDialog, LPCWSTR szDir); -/* 16-bit functions */ -void WINAPI DragAcceptFiles16(HWND16 hWnd, BOOL16 b); -UINT16 WINAPI DragQueryFile16(HDROP16 hDrop, WORD wFile, LPSTR lpszFile, WORD wLength); -void WINAPI DragFinish16(HDROP16 h); -BOOL16 WINAPI DragQueryPoint16(HDROP16 hDrop, POINT16 *p); -HINSTANCE16 WINAPI ShellExecute16(HWND16,LPCSTR,LPCSTR,LPCSTR,LPCSTR,INT16); -HICON16 WINAPI ExtractIcon16(HINSTANCE16,LPCSTR,UINT16); -HICON16 WINAPI ExtractAssociatedIcon16(HINSTANCE16,LPSTR,LPWORD); -HICON16 WINAPI ExtractIconEx16 ( LPCSTR, INT16, HICON16 *, HICON16 *, UINT16 ); -HINSTANCE16 WINAPI FindExecutable16(LPCSTR,LPCSTR,LPSTR); -HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16,LPCSTR,UINT16,WORD); -BOOL16 WINAPI ShellAbout16(HWND16,LPCSTR,LPCSTR,HICON16); -BOOL16 WINAPI AboutDlgProc16(HWND16,UINT16,WPARAM16,LPARAM); - void WINAPI _InsertMenuItemW (HMENU hmenu, UINT indexMenu, BOOL fByPosition, UINT wID, UINT fType, LPCWSTR dwTypeData, UINT fState); -static inline BOOL SHELL_OsIsUnicode(void) +static BOOL __inline SHELL_OsIsUnicode(void) { /* if high-bit of version is 0, we are emulating NT */ return !(GetVersion() & 0x80000000); @@ -190,26 +179,26 @@ static inline BOOL SHELL_OsIsUnicode(void) SHFree(*ptr); \ *ptr = NULL; \ }; -static inline void __SHCloneStrA(char ** target,const char * source) +static void __inline __SHCloneStrA(char ** target,const char * source) { *target = SHAlloc(strlen(source)+1); strcpy(*target, source); } -static inline void __SHCloneStrWtoA(char ** target, const WCHAR * source) +static void __inline __SHCloneStrWtoA(char ** target, const WCHAR * source) { int len = WideCharToMultiByte(CP_ACP, 0, source, -1, NULL, 0, NULL, NULL); *target = SHAlloc(len); WideCharToMultiByte(CP_ACP, 0, source, -1, *target, len, NULL, NULL); } -static inline void __SHCloneStrW(WCHAR ** target, const WCHAR * source) +static void __inline __SHCloneStrW(WCHAR ** target, const WCHAR * source) { *target = SHAlloc( (lstrlenW(source)+1) * sizeof(WCHAR) ); lstrcpyW(*target, source); } -static inline WCHAR * __SHCloneStrAtoW(WCHAR ** target, const char * source) +static LPWSTR __inline __SHCloneStrAtoW(WCHAR ** target, const char * source) { int len = MultiByteToWideChar(CP_ACP, 0, source, -1, NULL, 0); *target = SHAlloc(len*sizeof(WCHAR)); diff --git a/reactos/dll/win32/shell32/shellfolder.h b/reactos/dll/win32/shell32/shellfolder.h index 942e0e7ea28..7b8bd898271 100644 --- a/reactos/dll/win32/shell32/shellfolder.h +++ b/reactos/dll/win32/shell32/shellfolder.h @@ -37,6 +37,7 @@ DEFINE_GUID(IID_ISFHelper, 0x1fe68efbL, 0x1874, 0x9812, 0x56, 0xdc, 0x00, 0x00, /***************************************************************************** * ISFHelper interface */ +#undef INTERFACE #define INTERFACE ISFHelper DECLARE_INTERFACE_(ISFHelper,IUnknown) diff --git a/reactos/dll/win32/shell32/shelllink.c b/reactos/dll/win32/shell32/shelllink.c index 7cf20e75d25..ce03347f077 100644 --- a/reactos/dll/win32/shell32/shelllink.c +++ b/reactos/dll/win32/shell32/shelllink.c @@ -32,38 +32,10 @@ * in that string is parsed an stored. */ -#define COBJMACROS -#define NONAMELESSUNION - -#include "wine/debug.h" -#include "winerror.h" -#include "windef.h" -#include "winbase.h" -#include "winnls.h" -#include "winreg.h" - -#include "winuser.h" -#include "wingdi.h" -#include "shlobj.h" -#include "undocshell.h" - -#include "pidl.h" -#include "shell32_main.h" -#include "shlguid.h" -#include "shlwapi.h" -#include "msi.h" -#include "appmgmt.h" -#include "prsht.h" -#include "initguid.h" -#include "shresdef.h" +#include WINE_DEFAULT_DEBUG_CHANNEL(shell); -DEFINE_GUID( SHELL32_AdvtShortcutProduct, - 0x9db1186f,0x40df,0x11d1,0xaa,0x8c,0x00,0xc0,0x4f,0xb6,0x78,0x63); -DEFINE_GUID( SHELL32_AdvtShortcutComponent, - 0x9db1186e,0x40df,0x11d1,0xaa,0x8c,0x00,0xc0,0x4f,0xb6,0x78,0x63); - /* link file formats */ #include "pshpack1.h" @@ -166,44 +138,44 @@ typedef struct BOOL bDirty; INT iIdOpen; /* id of the "Open" entry in the context menu */ IUnknown *site; -} IShellLinkImpl; +} IShellLinkImpl, *LPIShellLinkImpl; -static inline IShellLinkImpl *impl_from_IShellLinkW( IShellLinkW *iface ) +static LPIShellLinkImpl __inline impl_from_IShellLinkW( IShellLinkW *iface ) { return (IShellLinkImpl *)((char*)iface - FIELD_OFFSET(IShellLinkImpl, lpvtblw)); } -static inline IShellLinkImpl *impl_from_IPersistFile( IPersistFile *iface ) +static LPIShellLinkImpl __inline impl_from_IPersistFile( IPersistFile *iface ) { return (IShellLinkImpl *)((char*)iface - FIELD_OFFSET(IShellLinkImpl, lpvtblPersistFile)); } -static inline IShellLinkImpl *impl_from_IPersistStream( IPersistStream *iface ) +static LPIShellLinkImpl __inline impl_from_IPersistStream( IPersistStream *iface ) { return (IShellLinkImpl *)((char*)iface - FIELD_OFFSET(IShellLinkImpl, lpvtblPersistStream)); } -static inline IShellLinkImpl *impl_from_IShellLinkDataList( IShellLinkDataList *iface ) +static LPIShellLinkImpl __inline impl_from_IShellLinkDataList( IShellLinkDataList *iface ) { return (IShellLinkImpl *)((char*)iface - FIELD_OFFSET(IShellLinkImpl, lpvtblShellLinkDataList)); } -static inline IShellLinkImpl *impl_from_IShellExtInit( IShellExtInit *iface ) +static LPIShellLinkImpl __inline impl_from_IShellExtInit( IShellExtInit *iface ) { return (IShellLinkImpl *)((char*)iface - FIELD_OFFSET(IShellLinkImpl, lpvtblShellExtInit)); } -static inline IShellLinkImpl *impl_from_IContextMenu( IContextMenu *iface ) +static LPIShellLinkImpl __inline impl_from_IContextMenu( IContextMenu *iface ) { return (IShellLinkImpl *)((char*)iface - FIELD_OFFSET(IShellLinkImpl, lpvtblContextMenu)); } -static inline IShellLinkImpl *impl_from_IObjectWithSite( IObjectWithSite *iface ) +static LPIShellLinkImpl __inline impl_from_IObjectWithSite( IObjectWithSite *iface ) { return (IShellLinkImpl *)((char*)iface - FIELD_OFFSET(IShellLinkImpl, lpvtblObjectWithSite)); } -static inline IShellLinkImpl *impl_from_IShellPropSheetExt( IShellPropSheetExt *iface ) +static LPIShellLinkImpl __inline impl_from_IShellPropSheetExt( IShellPropSheetExt *iface ) { return (IShellLinkImpl *)((char*)iface - FIELD_OFFSET(IShellLinkImpl, lpvtblPropSheetExt)); } @@ -212,7 +184,7 @@ static inline IShellLinkImpl *impl_from_IShellPropSheetExt( IShellPropSheetExt * static HRESULT ShellLink_UpdatePath(LPCWSTR sPathRel, LPCWSTR path, LPCWSTR sWorkDir, LPWSTR* psPath); /* strdup on the process heap */ -static inline LPWSTR HEAP_strdupAtoW( HANDLE heap, DWORD flags, LPCSTR str) +static LPWSTR __inline HEAP_strdupAtoW( HANDLE heap, DWORD flags, LPCSTR str) { INT len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0 ); LPWSTR p = HeapAlloc( heap, flags, len*sizeof (WCHAR) ); @@ -222,13 +194,13 @@ static inline LPWSTR HEAP_strdupAtoW( HANDLE heap, DWORD flags, LPCSTR str) return p; } -static inline LPWSTR strdupW( LPCWSTR src ) +static LPWSTR __inline strdupW( LPCWSTR src ) { LPWSTR dest; if (!src) return NULL; - dest = HeapAlloc( GetProcessHeap(), 0, (lstrlenW(src)+1)*sizeof(WCHAR) ); + dest = HeapAlloc( GetProcessHeap(), 0, (wcslen(src)+1)*sizeof(WCHAR) ); if (dest) - lstrcpyW(dest, src); + wcscpy(dest, src); return dest; } @@ -424,12 +396,12 @@ static BOOL StartLinkProcessor( LPCOLESTR szLink ) PROCESS_INFORMATION pi; BOOL ret; - len = sizeof(szFormat) + lstrlenW( szLink ) * sizeof(WCHAR); + len = sizeof(szFormat) + wcslen( szLink ) * sizeof(WCHAR); buffer = HeapAlloc( GetProcessHeap(), 0, len ); if( !buffer ) return FALSE; - wsprintfW( buffer, szFormat, szLink ); + swprintf( buffer, szFormat, szLink ); TRACE("starting %s\n",debugstr_w(buffer)); @@ -762,36 +734,36 @@ static HRESULT Stream_LoadAdvertiseInfo( IStream* stm, LPWSTR *str ) TRACE("%p\n",stm); - r = IStream_Read( stm, &buffer.dbh.cbSize, sizeof (DWORD), &count ); + r = IStream_Read( stm, &buffer.cbSize, sizeof (DWORD), &count ); if( FAILED( r ) ) return r; /* make sure that we read the size of the structure even on error */ size = sizeof buffer - sizeof (DWORD); - if( buffer.dbh.cbSize != sizeof buffer ) + if( buffer.cbSize != sizeof buffer ) { ERR("Ooops. This structure is not as expected...\n"); return E_FAIL; } - r = IStream_Read( stm, &buffer.dbh.dwSignature, size, &count ); + r = IStream_Read( stm, &buffer.dwSignature, size, &count ); if( FAILED( r ) ) return r; if( count != size ) return E_FAIL; - TRACE("magic %08x string = %s\n", buffer.dbh.dwSignature, debugstr_w(buffer.szwDarwinID)); + TRACE("magic %08x string = %s\n", buffer.dwSignature, debugstr_w(buffer.szwDarwinID)); - if( (buffer.dbh.dwSignature&0xffff0000) != 0xa0000000 ) + if( (buffer.dwSignature&0xffff0000) != 0xa0000000 ) { - ERR("Unknown magic number %08x in advertised shortcut\n", buffer.dbh.dwSignature); + ERR("Unknown magic number %08x in advertised shortcut\n", buffer.dwSignature); return E_FAIL; } *str = HeapAlloc( GetProcessHeap(), 0, - (lstrlenW(buffer.szwDarwinID)+1) * sizeof(WCHAR) ); - lstrcpyW( *str, buffer.szwDarwinID ); + (wcslen(buffer.szwDarwinID)+1) * sizeof(WCHAR) ); + wcscpy( *str, buffer.szwDarwinID ); return S_OK; } @@ -924,6 +896,7 @@ static HRESULT WINAPI IPersistStream_fnLoad( if( FAILED( r ) ) goto end; +#if (NTDDI_VERSION < NTDDI_LONGHORN) if( hdr.dwFlags & SLDF_HAS_LOGO3ID ) { r = Stream_LoadAdvertiseInfo( stm, &This->sProduct ); @@ -931,6 +904,7 @@ static HRESULT WINAPI IPersistStream_fnLoad( } if( FAILED( r ) ) goto end; +#endif if( hdr.dwFlags & SLDF_HAS_DARWINID ) { @@ -970,7 +944,7 @@ end: */ static HRESULT Stream_WriteString( IStream* stm, LPCWSTR str ) { - USHORT len = lstrlenW( str ) + 1; + USHORT len = wcslen( str ) + 1; DWORD count; HRESULT r; @@ -1057,8 +1031,8 @@ static EXP_DARWIN_LINK* shelllink_build_darwinid( LPCWSTR string, DWORD magic ) EXP_DARWIN_LINK *buffer; buffer = LocalAlloc( LMEM_ZEROINIT, sizeof *buffer ); - buffer->dbh.cbSize = sizeof *buffer; - buffer->dbh.dwSignature = magic; + buffer->cbSize = sizeof *buffer; + buffer->dwSignature = magic; lstrcpynW( buffer->szwDarwinID, string, MAX_PATH ); WideCharToMultiByte(CP_ACP, 0, string, -1, buffer->szDarwinID, MAX_PATH, NULL, NULL ); @@ -1074,7 +1048,7 @@ static HRESULT Stream_WriteAdvertiseInfo( IStream* stm, LPCWSTR string, DWORD ma buffer = shelllink_build_darwinid( string, magic ); - return IStream_Write( stm, buffer, buffer->dbh.cbSize, &count ); + return IStream_Write( stm, buffer, buffer->cbSize, &count ); } /************************************************************************ @@ -1116,8 +1090,10 @@ static HRESULT WINAPI IPersistStream_fnSave( header.dwFlags |= SLDF_HAS_ARGS; if( This->sIcoPath ) header.dwFlags |= SLDF_HAS_ICONLOCATION; +#if (NTDDI_VERSION < NTDDI_LONGHORN) if( This->sProduct ) header.dwFlags |= SLDF_HAS_LOGO3ID; +#endif if( This->sComponent ) header.dwFlags |= SLDF_HAS_DARWINID; if( This->bRunAs ) @@ -1273,34 +1249,34 @@ static HRESULT ShellLink_UpdatePath(LPCWSTR sPathRel, LPCWSTR path, LPCWSTR sWor GetFullPathNameW( path, MAX_PATH*2, buffer, &final ); if( !final ) final = buffer; - lstrcpyW(final, sPathRel); + wcscpy(final, sPathRel); *abs_path = '\0'; if (SHELL_ExistsFileW(buffer)) { if (!GetFullPathNameW(buffer, MAX_PATH, abs_path, &final)) - lstrcpyW(abs_path, buffer); + wcscpy(abs_path, buffer); } else { /* try if [working directory] + [relative path] finds an existing file */ if (sWorkDir) { - lstrcpyW(buffer, sWorkDir); - lstrcpyW(PathAddBackslashW(buffer), sPathRel); + wcscpy(buffer, sWorkDir); + wcscpy(PathAddBackslashW(buffer), sPathRel); if (SHELL_ExistsFileW(buffer)) if (!GetFullPathNameW(buffer, MAX_PATH, abs_path, &final)) - lstrcpyW(abs_path, buffer); + wcscpy(abs_path, buffer); } } /* FIXME: This is even not enough - not all shell links can be resolved using this algorithm. */ if (!*abs_path) - lstrcpyW(abs_path, sPathRel); + wcscpy(abs_path, sPathRel); - *psPath = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(abs_path)+1)*sizeof(WCHAR)); + *psPath = HeapAlloc(GetProcessHeap(), 0, (wcslen(abs_path)+1)*sizeof(WCHAR)); if (!*psPath) return E_OUTOFMEMORY; - lstrcpyW(*psPath, abs_path); + wcscpy(*psPath, abs_path); } return S_OK; @@ -1566,9 +1542,9 @@ static HRESULT SHELL_PidlGeticonLocationA(IShellFolder* psf, LPCITEMIDLIST pidl, hr = IShellFolder_GetUIObjectOf(psf, 0, 1, (LPCITEMIDLIST*)&pidlLast, &IID_IExtractIconA, NULL, (LPVOID*)&pei); if (SUCCEEDED(hr)) { - hr = IExtractIconA_GetIconLocation(pei, 0, pszIconPath, MAX_PATH, piIcon, NULL); + hr = pei->lpVtbl->GetIconLocation(pei, 0, pszIconPath, MAX_PATH, piIcon, NULL); - IExtractIconA_Release(pei); + pei->lpVtbl->Release(pei); } IShellFolder_Release(psf); @@ -1816,11 +1792,11 @@ static HRESULT WINAPI IShellLinkW_fnSetDescription(IShellLinkW * iface, LPCWSTR HeapFree(GetProcessHeap(), 0, This->sDescription); This->sDescription = HeapAlloc( GetProcessHeap(), 0, - (lstrlenW( pszName )+1)*sizeof(WCHAR) ); + (wcslen( pszName )+1)*sizeof(WCHAR) ); if ( !This->sDescription ) return E_OUTOFMEMORY; - lstrcpyW( This->sDescription, pszName ); + wcscpy( This->sDescription, pszName ); This->bDirty = TRUE; return S_OK; @@ -1848,10 +1824,10 @@ static HRESULT WINAPI IShellLinkW_fnSetWorkingDirectory(IShellLinkW * iface, LPC HeapFree(GetProcessHeap(), 0, This->sWorkDir); This->sWorkDir = HeapAlloc( GetProcessHeap(), 0, - (lstrlenW( pszDir )+1)*sizeof (WCHAR) ); + (wcslen( pszDir )+1)*sizeof (WCHAR) ); if ( !This->sWorkDir ) return E_OUTOFMEMORY; - lstrcpyW( This->sWorkDir, pszDir ); + wcscpy( This->sWorkDir, pszDir ); This->bDirty = TRUE; return S_OK; @@ -1879,10 +1855,10 @@ static HRESULT WINAPI IShellLinkW_fnSetArguments(IShellLinkW * iface, LPCWSTR ps HeapFree(GetProcessHeap(), 0, This->sArgs); This->sArgs = HeapAlloc( GetProcessHeap(), 0, - (lstrlenW( pszArgs )+1)*sizeof (WCHAR) ); + (wcslen( pszArgs )+1)*sizeof (WCHAR) ); if ( !This->sArgs ) return E_OUTOFMEMORY; - lstrcpyW( This->sArgs, pszArgs ); + wcscpy( This->sArgs, pszArgs ); This->bDirty = TRUE; return S_OK; @@ -1946,9 +1922,9 @@ static HRESULT SHELL_PidlGeticonLocationW(IShellFolder* psf, LPCITEMIDLIST pidl, hr = IShellFolder_GetUIObjectOf(psf, 0, 1, (LPCITEMIDLIST*)&pidlLast, &IID_IExtractIconW, NULL, (LPVOID*)&pei); if (SUCCEEDED(hr)) { - hr = IExtractIconW_GetIconLocation(pei, 0, pszIconPath, MAX_PATH, piIcon, &wFlags); + hr = pei->lpVtbl->GetIconLocation(pei, 0, pszIconPath, MAX_PATH, piIcon, &wFlags); - IExtractIconW_Release(pei); + pei->lpVtbl->Release(pei); } IShellFolder_Release(psf); @@ -2016,10 +1992,10 @@ static HRESULT WINAPI IShellLinkW_fnSetIconLocation(IShellLinkW * iface, LPCWSTR HeapFree(GetProcessHeap(), 0, This->sIcoPath); This->sIcoPath = HeapAlloc( GetProcessHeap(), 0, - (lstrlenW( pszIconPath )+1)*sizeof (WCHAR) ); + (wcslen( pszIconPath )+1)*sizeof (WCHAR) ); if ( !This->sIcoPath ) return E_OUTOFMEMORY; - lstrcpyW( This->sIcoPath, pszIconPath ); + wcscpy( This->sIcoPath, pszIconPath ); This->iIcoNdx = iIcon; This->bDirty = TRUE; @@ -2035,10 +2011,10 @@ static HRESULT WINAPI IShellLinkW_fnSetRelativePath(IShellLinkW * iface, LPCWSTR HeapFree(GetProcessHeap(), 0, This->sPathRel); This->sPathRel = HeapAlloc( GetProcessHeap(), 0, - (lstrlenW( pszPathRel )+1) * sizeof (WCHAR) ); + (wcslen( pszPathRel )+1) * sizeof (WCHAR) ); if ( !This->sPathRel ) return E_OUTOFMEMORY; - lstrcpyW( This->sPathRel, pszPathRel ); + wcscpy( This->sPathRel, pszPathRel ); This->bDirty = TRUE; return ShellLink_UpdatePath(This->sPathRel, This->sPath, This->sWorkDir, &This->sPath); @@ -2061,11 +2037,11 @@ static HRESULT WINAPI IShellLinkW_fnResolve(IShellLinkW * iface, HWND hwnd, DWOR bSuccess = SHGetPathFromIDListW(This->pPidl, buffer); if (bSuccess && *buffer) { - This->sPath = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(buffer)+1)*sizeof(WCHAR)); + This->sPath = HeapAlloc(GetProcessHeap(), 0, (wcslen(buffer)+1)*sizeof(WCHAR)); if (!This->sPath) return E_OUTOFMEMORY; - lstrcpyW(This->sPath, buffer); + wcscpy(This->sPath, buffer); This->bDirty = TRUE; } else @@ -2073,11 +2049,11 @@ static HRESULT WINAPI IShellLinkW_fnResolve(IShellLinkW * iface, HWND hwnd, DWOR } if (!This->sIcoPath && This->sPath) { - This->sIcoPath = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(This->sPath)+1)*sizeof(WCHAR)); + This->sIcoPath = HeapAlloc(GetProcessHeap(), 0, (wcslen(This->sPath)+1)*sizeof(WCHAR)); if (!This->sIcoPath) return E_OUTOFMEMORY; - lstrcpyW(This->sIcoPath, This->sPath); + wcscpy(This->sIcoPath, This->sPath); This->iIcoNdx = 0; This->bDirty = TRUE; @@ -2095,7 +2071,7 @@ static LPWSTR ShellLink_GetAdvertisedArg(LPCWSTR str) if( !str ) return NULL; - p = strchrW( str, ':' ); + p = wcschr( str, ':' ); if( !p ) return NULL; len = p - str; @@ -2127,7 +2103,7 @@ static HRESULT ShellLink_SetAdvertiseInfo(IShellLinkImpl *This, LPCWSTR str) str += 2; /* there must be a colon straight after a guid */ - p = strchrW( str, ':' ); + p = wcschr( str, ':' ); if( !p ) return E_FAIL; len = p - str; @@ -2151,7 +2127,7 @@ static HRESULT ShellLink_SetAdvertiseInfo(IShellLinkImpl *This, LPCWSTR str) return E_FAIL; /* skip to the next field */ - str = strchrW( str, ':' ); + str = wcschr( str, ':' ); if( !str ) return E_FAIL; } @@ -2194,7 +2170,7 @@ static HRESULT WINAPI IShellLinkW_fnSetPath(IShellLinkW * iface, LPCWSTR pszFile TRACE("(%p)->(path=%s)\n",This, debugstr_w(pszFile)); /* quotes at the ends of the string are stripped */ - len = lstrlenW(pszFile); + len = wcslen(pszFile); if (pszFile[0] == '"' && pszFile[len-1] == '"') { unquoted = strdupW(pszFile); @@ -2203,7 +2179,7 @@ static HRESULT WINAPI IShellLinkW_fnSetPath(IShellLinkW * iface, LPCWSTR pszFile } /* any other quote marks are invalid */ - if (strchrW(pszFile, '"')) + if (wcschr(pszFile, '"')) return S_FALSE; HeapFree(GetProcessHeap(), 0, This->sPath); @@ -2230,11 +2206,11 @@ static HRESULT WINAPI IShellLinkW_fnSetPath(IShellLinkW * iface, LPCWSTR pszFile ShellLink_GetVolumeInfo(buffer, &This->volume); This->sPath = HeapAlloc( GetProcessHeap(), 0, - (lstrlenW( buffer )+1) * sizeof (WCHAR) ); + (wcslen( buffer )+1) * sizeof (WCHAR) ); if (!This->sPath) return E_OUTOFMEMORY; - lstrcpyW(This->sPath, buffer); + wcscpy(This->sPath, buffer); } This->bDirty = TRUE; HeapFree(GetProcessHeap(), 0, unquoted); @@ -2352,8 +2328,10 @@ ShellLink_GetFlags( IShellLinkDataList* iface, DWORD* pdwFlags ) flags |= SLDF_HAS_DARWINID; if (This->sIcoPath) flags |= SLDF_HAS_ICONLOCATION; +#if (NTDDI_VERSION < NTDDI_LONGHORN) if (This->sProduct) flags |= SLDF_HAS_LOGO3ID; +#endif if (This->pPidl) flags |= SLDF_HAS_ID_LIST; @@ -2506,7 +2484,7 @@ ShellLink_QueryContextMenu( IContextMenu* iface, HMENU hmenu, UINT indexMenu, mii.cbSize = sizeof (mii); mii.fMask = MIIM_TYPE | MIIM_ID | MIIM_STATE; mii.dwTypeData = (LPWSTR)szOpen; - mii.cch = strlenW( mii.dwTypeData ); + mii.cch = wcslen( mii.dwTypeData ); mii.wID = idCmdFirst + id++; mii.fState = MFS_DEFAULT | MFS_ENABLED; mii.fType = MFT_STRING; @@ -2823,19 +2801,19 @@ ShellLink_InvokeCommand( IContextMenu* iface, LPCMINVOKECOMMANDINFO lpici ) DWORD len = 2; if ( This->sArgs ) - len += lstrlenW( This->sArgs ); + len += wcslen( This->sArgs ); if ( iciex->lpParametersW ) - len += lstrlenW( iciex->lpParametersW ); + len += wcslen( iciex->lpParametersW ); args = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) ); args[0] = 0; if ( This->sArgs ) - lstrcatW( args, This->sArgs ); + wcscat( args, This->sArgs ); if ( iciex->lpParametersW ) { static const WCHAR space[] = { ' ', 0 }; - lstrcatW( args, space ); - lstrcatW( args, iciex->lpParametersW ); + wcscat( args, space ); + wcscat( args, iciex->lpParametersW ); } } diff --git a/reactos/dll/win32/shell32/shellole.c b/reactos/dll/win32/shell32/shellole.c index c4e7de7f977..13f7c30155f 100644 --- a/reactos/dll/win32/shell32/shellole.c +++ b/reactos/dll/win32/shell32/shellole.c @@ -19,31 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - -#include -#include -#include - -#define COBJMACROS - -#include "windef.h" -#include "winbase.h" -#include "shellapi.h" -#include "wingdi.h" -#include "winuser.h" -#include "shlobj.h" -#include "shlguid.h" -#include "winreg.h" -#include "winerror.h" - -#include "undocshell.h" -#include "wine/unicode.h" -#include "shell32_main.h" - -#include "wine/debug.h" -#include "shlwapi.h" -#include "debughlp.h" +#include WINE_DEFAULT_DEBUG_CHANNEL(shell); @@ -51,6 +27,7 @@ extern HRESULT WINAPI IFSFolder_Constructor(IUnknown * pUnkOuter, REFIID riid, L static const WCHAR sShell32[12] = {'S','H','E','L','L','3','2','.','D','L','L','\0'}; static const GUID dummy1 = {0xD969A300, 0xE7FF, 0x11d0, {0xA9, 0x3B, 0x00, 0xA0, 0xC9, 0x0F, 0x27, 0x19} }; + /************************************************************************** * Default ClassFactory types */ @@ -98,7 +75,7 @@ DWORD WINAPI __SHGUIDToStringW (REFGUID guid, LPWSTR str) '2','x','%','0','2','x','%','0','2','x', '}','\0'}; - return wsprintfW ( str, sFormat, + return swprintf ( str, sFormat, guid->Data1, guid->Data2, guid->Data3, guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3], guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7] ); @@ -129,7 +106,7 @@ HRESULT WINAPI SHCoCreateInstance( LPVOID *ppv) { DWORD hres; - IID iid; + CLSID iid; const CLSID * myclsid = clsid; WCHAR sKeyName[MAX_PATH]; const WCHAR sCLSID[7] = {'C','L','S','I','D','\\','\0'}; @@ -150,7 +127,7 @@ HRESULT WINAPI SHCoCreateInstance( if (!clsid) { if (!aclsid) return REGDB_E_CLASSNOTREG; - SHCLSIDFromStringW(aclsid, &iid); + CLSIDFromString((LPOLESTR)aclsid, &iid); myclsid = &iid; } @@ -159,9 +136,9 @@ HRESULT WINAPI SHCoCreateInstance( /* we look up the dll path in the registry */ __SHGUIDToStringW(myclsid, sClassID); - lstrcpyW(sKeyName, sCLSID); - lstrcatW(sKeyName, sClassID); - lstrcatW(sKeyName, sInProcServer32); + wcscpy(sKeyName, sCLSID); + wcscat(sKeyName, sClassID); + wcscat(sKeyName, sInProcServer32); if (ERROR_SUCCESS == RegOpenKeyExW(HKEY_CLASSES_ROOT, sKeyName, 0, KEY_READ, &hKey)) { dwSize = sizeof(sDllPath); @@ -685,7 +662,7 @@ UINT WINAPI DragQueryFileW( } } - i = strlenW(lpwDrop); + i = wcslen(lpwDrop); if ( !lpszwFile) goto end; /* needed buffer size */ lstrcpynW (lpszwFile, lpwDrop, lLength); end: diff --git a/reactos/dll/win32/shell32/shellord.c b/reactos/dll/win32/shell32/shellord.c index 98853c7cca2..458b8ff7c79 100644 --- a/reactos/dll/win32/shell32/shellord.c +++ b/reactos/dll/win32/shell32/shellord.c @@ -172,26 +172,26 @@ DWORD WINAPI ParseFieldAW(LPCVOID src, DWORD nField, LPVOID dst, DWORD len) */ BOOL WINAPI GetFileNameFromBrowse( HWND hwndOwner, - LPSTR lpstrFile, - DWORD nMaxFile, - LPCSTR lpstrInitialDir, - LPCSTR lpstrDefExt, - LPCSTR lpstrFilter, - LPCSTR lpstrTitle) + LPWSTR lpstrFile, + UINT nMaxFile, + LPCWSTR lpstrInitialDir, + LPCWSTR lpstrDefExt, + LPCWSTR lpstrFilter, + LPCWSTR lpstrTitle) { HMODULE hmodule; - FARPROC pGetOpenFileNameA; - OPENFILENAMEA ofn; + FARPROC pGetOpenFileNameW; + OPENFILENAMEW ofn; BOOL ret; TRACE("%p, %s, %d, %s, %s, %s, %s)\n", - hwndOwner, lpstrFile, nMaxFile, lpstrInitialDir, lpstrDefExt, + hwndOwner, debugstr_w(lpstrFile), nMaxFile, lpstrInitialDir, lpstrDefExt, lpstrFilter, lpstrTitle); - hmodule = LoadLibraryA("comdlg32.dll"); + hmodule = LoadLibraryW(L"comdlg32.dll"); if(!hmodule) return FALSE; - pGetOpenFileNameA = GetProcAddress(hmodule, "GetOpenFileNameA"); - if(!pGetOpenFileNameA) + pGetOpenFileNameW = GetProcAddress(hmodule, "GetOpenFileNameW"); + if(!pGetOpenFileNameW) { FreeLibrary(hmodule); return FALSE; @@ -208,7 +208,7 @@ BOOL WINAPI GetFileNameFromBrowse( ofn.lpstrTitle = lpstrTitle; ofn.lpstrDefExt = lpstrDefExt; ofn.Flags = OFN_EXPLORER | OFN_HIDEREADONLY | OFN_FILEMUSTEXIST; - ret = pGetOpenFileNameA(&ofn); + ret = pGetOpenFileNameW(&ofn); FreeLibrary(hmodule); return ret; @@ -532,9 +532,9 @@ WORD WINAPI ArrangeWindows( * exported by ordinal */ DWORD WINAPI -SignalFileOpen (DWORD dwParam1) +SignalFileOpen (LPCITEMIDLIST pidl) { - FIXME("(0x%08x):stub.\n", dwParam1); + FIXME("(0x%08x):stub.\n", pidl); return 0; } @@ -1048,8 +1048,9 @@ HRESULT WINAPI SHWinHelp (DWORD v, DWORD w, DWORD x, DWORD z) * SHRunControlPanel [SHELL32.161] * */ -HRESULT WINAPI SHRunControlPanel (DWORD x, DWORD z) -{ FIXME("0x%08x 0x%08x stub\n",x,z); +HRESULT WINAPI SHRunControlPanel (LPCWSTR lpcszCmdLine, HWND hwndMsgParent) +{ + FIXME("0x%08x 0x%08x stub\n",lpcszCmdLine,hwndMsgParent); return 0; } @@ -1103,7 +1104,7 @@ void WINAPI SHFreeUnusedLibraries (void) * DAD_AutoScroll [SHELL32.129] * */ -BOOL WINAPI DAD_AutoScroll(HWND hwnd, AUTO_SCROLL_DATA *samples, LPPOINT pt) +BOOL WINAPI DAD_AutoScroll(HWND hwnd, AUTO_SCROLL_DATA *samples, const POINT * pt) { FIXME("hwnd = %p %p %p\n",hwnd,samples,pt); return 0; @@ -1121,7 +1122,7 @@ BOOL WINAPI DAD_DragEnter(HWND hwnd) * DAD_DragEnterEx [SHELL32.131] * */ -BOOL WINAPI DAD_DragEnterEx(HWND hwnd, POINT p) +BOOL WINAPI DAD_DragEnterEx(HWND hwnd, const POINT p) { FIXME("hwnd = %p (%d,%d)\n",hwnd,p.x,p.y); return FALSE; @@ -1411,9 +1412,11 @@ HRESULT WINAPI SHLoadOLE(LPARAM lParam) * DriveType [SHELL32.64] * */ -HRESULT WINAPI DriveType(DWORD u) -{ FIXME("0x%04x stub\n",u); - return 0; +HRESULT WINAPI DriveType(int DriveType) +{ + WCHAR root[] = L"A:\\"; + root[0] = L'A' + DriveType; + return GetDriveTypeW(root); } /************************************************************************* * InvalidateDriveType [SHELL32.65] @@ -1494,9 +1497,9 @@ DWORD WINAPI RLBuildListOfPaths (void) * SHValidateUNC [SHELL32.173] * */ -HRESULT WINAPI SHValidateUNC (DWORD x, DWORD y, DWORD z) +HRESULT WINAPI SHValidateUNC (HWND hwndOwner, LPWSTR pszFile, UINT fConnect) { - FIXME("0x%08x 0x%08x 0x%08x stub\n",x,y,z); + FIXME("0x%08x 0x%08x 0x%08x stub\n",hwndOwner,pszFile,fConnect); return 0; } @@ -1701,14 +1704,14 @@ HPSXA WINAPI SHCreatePropSheetExtArrayEx(HKEY hKey, LPCWSTR pszSubKey, UINT max_ break; } szHandler[(sizeof(szHandler) / sizeof(szHandler[0])) - 1] = 0; - hr = SHCLSIDFromStringW(szHandler, &clsid); + hr = CLSIDFromString(szHandler, &clsid); if (FAILED(hr)) { dwClsidSize = sizeof(szClsidHandler); if (SHGetValueW(hkPropSheetHandlers, szHandler, NULL, NULL, szClsidHandler, &dwClsidSize) == ERROR_SUCCESS) { szClsidHandler[(sizeof(szClsidHandler) / sizeof(szClsidHandler[0])) - 1] = 0; - hr = SHCLSIDFromStringW(szClsidHandler, &clsid); + hr = CLSIDFromString(szClsidHandler, &clsid); } } if (SUCCEEDED(hr)) @@ -1846,7 +1849,7 @@ HRESULT WINAPI CIDLData_CreateFromIDArray( * */ HRESULT WINAPI SHCreateStdEnumFmtEtc( - DWORD cFormats, + UINT cFormats, const FORMATETC *lpFormats, LPENUMFORMATETC *ppenumFormatetc) { @@ -2103,7 +2106,7 @@ HRESULT WINAPI SHQueryRecycleBinW(LPCWSTR pszRootPath, LPSHQUERYRBINFO pSHQueryR /************************************************************************* * SHSetLocalizedName (SHELL32.@) */ -HRESULT WINAPI SHSetLocalizedName(LPWSTR pszPath, LPCWSTR pszResModule, int idsRes) +HRESULT WINAPI SHSetLocalizedName(LPCWSTR pszPath, LPCWSTR pszResModule, int idsRes) { FIXME("%p, %s, %d - stub\n", pszPath, debugstr_w(pszResModule), idsRes); diff --git a/reactos/dll/win32/shell32/shellpath.c b/reactos/dll/win32/shell32/shellpath.c index b804ca0c2e7..56ae632aebd 100644 --- a/reactos/dll/win32/shell32/shellpath.c +++ b/reactos/dll/win32/shell32/shellpath.c @@ -24,29 +24,7 @@ * */ -#define symlink(A, B) -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include -#include "wine/debug.h" -#include "windef.h" -#include "winbase.h" -#include "winnls.h" -#include "winreg.h" -#include "wingdi.h" -#include "winuser.h" - -#include "shlobj.h" -#include "shresdef.h" -#include "shell32_main.h" -#include "undocshell.h" -#include "pidl.h" -#include "wine/unicode.h" -#include "shlwapi.h" +#include WINE_DEFAULT_DEBUG_CHANNEL(shell); @@ -264,7 +242,7 @@ static void PathGetShortPathW(LPWSTR pszPath) if (GetShortPathNameW(pszPath, path, MAX_PATH)) { - lstrcpyW(pszPath, path); + wcscpy(pszPath, path); } } @@ -576,7 +554,7 @@ int WINAPI PathCleanupSpec( LPCWSTR lpszPathW, LPWSTR lpszFileW ) TRACE("Cleanup %s\n",debugstr_w(lpszFileW)); if (lpszPathW) - length = strlenW(lpszPathW); + length = wcslen(lpszPathW); while (*p) { @@ -727,8 +705,8 @@ LONG WINAPI PathProcessCommandW ( FIXME("(%s, %p, 0x%04x, 0x%04x) stub\n", debugstr_w(lpszPath), lpszBuff, dwBuffSize, dwFlags); if(!lpszPath) return -1; - if(lpszBuff) strcpyW(lpszBuff, lpszPath); - return strlenW(lpszPath); + if(lpszBuff) wcscpy(lpszBuff, lpszPath); + return wcslen(lpszPath); } /************************************************************************* @@ -1173,13 +1151,13 @@ static HRESULT _SHGetUserShellFolderPath(HKEY rootKey, LPCWSTR userPrefix, if (userPrefix) { - strcpyW(shellFolderPath, userPrefix); + wcscpy(shellFolderPath, userPrefix); PathAddBackslashW(shellFolderPath); - strcatW(shellFolderPath, szSHFolders); + wcscat(shellFolderPath, szSHFolders); pShellFolderPath = shellFolderPath; - strcpyW(userShellFolderPath, userPrefix); + wcscpy(userShellFolderPath, userPrefix); PathAddBackslashW(userShellFolderPath); - strcatW(userShellFolderPath, szSHUserFolders); + wcscat(userShellFolderPath, szSHUserFolders); pUserShellFolderPath = userShellFolderPath; } else @@ -1217,7 +1195,7 @@ static HRESULT _SHGetUserShellFolderPath(HKEY rootKey, LPCWSTR userPrefix, lstrcpynW(path, szTemp, MAX_PATH); } ret = RegSetValueExW(shellFolderKey, value, 0, REG_SZ, (LPBYTE)path, - (strlenW(path) + 1) * sizeof(WCHAR)); + (wcslen(path) + 1) * sizeof(WCHAR)); if (ret != ERROR_SUCCESS) hr = HRESULT_FROM_WIN32(ret); else @@ -1284,13 +1262,13 @@ static HRESULT _SHGetDefaultValue(BYTE folder, LPWSTR pszPath) switch (CSIDL_Data[folder].type) { case CSIDL_Type_User: - strcpyW(pszPath, UserProfileW); + wcscpy(pszPath, UserProfileW); break; case CSIDL_Type_AllUsers: - strcpyW(pszPath, AllUsersProfileW); + wcscpy(pszPath, AllUsersProfileW); break; case CSIDL_Type_CurrVer: - strcpyW(pszPath, SystemDriveW); + wcscpy(pszPath, SystemDriveW); break; default: ; /* no corresponding env. var, do nothing */ @@ -1298,7 +1276,7 @@ static HRESULT _SHGetDefaultValue(BYTE folder, LPWSTR pszPath) if (pDefaultPath) { PathAddBackslashW(pszPath); - strcatW(pszPath, pDefaultPath); + wcscat(pszPath, pDefaultPath); } } TRACE("returning 0x%08x\n", hr); @@ -1346,7 +1324,7 @@ static HRESULT _SHGetCurrentVersionPath(DWORD dwFlags, BYTE folder, hr = _SHGetDefaultValue(folder, pszPath); dwType = REG_EXPAND_SZ; RegSetValueExW(hKey, CSIDL_Data[folder].szValueName, 0, dwType, - (LPBYTE)pszPath, (strlenW(pszPath)+1)*sizeof(WCHAR)); + (LPBYTE)pszPath, (wcslen(pszPath)+1)*sizeof(WCHAR)); } else { @@ -1495,7 +1473,7 @@ static HRESULT _SHGetProfilesValue(HKEY profilesKey, LPCWSTR szValueName, debugstr_w(szValue)); lRet = RegSetValueExW(profilesKey, szValueName, 0, REG_EXPAND_SZ, (LPBYTE)szValue, - (strlenW(szValue) + 1) * sizeof(WCHAR)); + (wcslen(szValue) + 1) * sizeof(WCHAR)); if (lRet) hr = HRESULT_FROM_WIN32(lRet); else @@ -1530,7 +1508,7 @@ static HRESULT _SHExpandEnvironmentStrings(LPCWSTR szSrc, LPWSTR szDest) /* short-circuit if there's nothing to expand */ if (szSrc[0] != '%') { - strcpyW(szDest, szSrc); + wcscpy(szDest, szSrc); hr = S_OK; goto end; } @@ -1548,30 +1526,30 @@ static HRESULT _SHExpandEnvironmentStrings(LPCWSTR szSrc, LPWSTR szDest) } *szDest = 0; - strcpyW(szTemp, szSrc); + wcscpy(szTemp, szSrc); while (SUCCEEDED(hr) && szTemp[0] == '%') { - if (!strncmpiW(szTemp, AllUsersProfileW, strlenW(AllUsersProfileW))) + if (!strncmpiW(szTemp, AllUsersProfileW, wcslen(AllUsersProfileW))) { WCHAR szAllUsers[MAX_PATH]; - strcpyW(szDest, szProfilesPrefix); + wcscpy(szDest, szProfilesPrefix); hr = _SHGetProfilesValue(key, AllUsersProfileValueW, szAllUsers, AllUsersW); PathAppendW(szDest, szAllUsers); - PathAppendW(szDest, szTemp + strlenW(AllUsersProfileW)); + PathAppendW(szDest, szTemp + wcslen(AllUsersProfileW)); } - else if (!strncmpiW(szTemp, UserProfileW, strlenW(UserProfileW))) + else if (!strncmpiW(szTemp, UserProfileW, wcslen(UserProfileW))) { WCHAR userName[MAX_PATH]; DWORD userLen = MAX_PATH; - strcpyW(szDest, szProfilesPrefix); + wcscpy(szDest, szProfilesPrefix); GetUserNameW(userName, &userLen); PathAppendW(szDest, userName); - PathAppendW(szDest, szTemp + strlenW(UserProfileW)); + PathAppendW(szDest, szTemp + wcslen(UserProfileW)); } - else if (!strncmpiW(szTemp, SystemDriveW, strlenW(SystemDriveW))) + else if (!strncmpiW(szTemp, SystemDriveW, wcslen(SystemDriveW))) { GetSystemDirectoryW(szDest, MAX_PATH); if (szDest[1] != ':') @@ -1581,7 +1559,7 @@ static HRESULT _SHExpandEnvironmentStrings(LPCWSTR szSrc, LPWSTR szDest) } else { - strcpyW(szDest + 3, szTemp + strlenW(SystemDriveW) + 1); + wcscpy(szDest + 3, szTemp + wcslen(SystemDriveW) + 1); hr = S_OK; } } @@ -1597,7 +1575,7 @@ static HRESULT _SHExpandEnvironmentStrings(LPCWSTR szSrc, LPWSTR szDest) hr = S_OK; } if (SUCCEEDED(hr) && szDest[0] == '%') - strcpyW(szTemp, szDest); + wcscpy(szTemp, szDest); else { /* terminate loop */ @@ -1703,7 +1681,7 @@ HRESULT WINAPI SHGetFolderPathAndSubDirW( { HRESULT hr; WCHAR szBuildPath[MAX_PATH], szTemp[MAX_PATH]; - DWORD folder = nFolder & CSIDL_FOLDER_MASK; + DWORD folder = nFolder & CSIDL_FOLDER_MASK; //FIXME CSIDL_Type type; int ret; @@ -1736,7 +1714,7 @@ HRESULT WINAPI SHGetFolderPathAndSubDirW( *CSIDL_Data[folder].szDefaultPath) { PathAddBackslashW(szTemp); - strcatW(szTemp, CSIDL_Data[folder].szDefaultPath); + wcscat(szTemp, CSIDL_Data[folder].szDefaultPath); } hr = S_OK; break; @@ -1747,7 +1725,7 @@ HRESULT WINAPI SHGetFolderPathAndSubDirW( *CSIDL_Data[folder].szDefaultPath) { PathAddBackslashW(szTemp); - strcatW(szTemp, CSIDL_Data[folder].szDefaultPath); + wcscat(szTemp, CSIDL_Data[folder].szDefaultPath); } hr = S_OK; break; @@ -1770,14 +1748,14 @@ HRESULT WINAPI SHGetFolderPathAndSubDirW( if (*szTemp == '%') hr = _SHExpandEnvironmentStrings(szTemp, szBuildPath); else - strcpyW(szBuildPath, szTemp); + wcscpy(szBuildPath, szTemp); if (FAILED(hr)) goto end; if(pszSubPath) { /* make sure the new path does not exceed th bufferlength * rememebr to backslash and the termination */ - if(MAX_PATH < (lstrlenW(szBuildPath) + lstrlenW(pszSubPath) + 2)) { + if(MAX_PATH < (wcslen(szBuildPath) + wcslen(pszSubPath) + 2)) { hr = HRESULT_FROM_WIN32(ERROR_FILENAME_EXCED_RANGE); goto end; } @@ -1786,7 +1764,7 @@ HRESULT WINAPI SHGetFolderPathAndSubDirW( } /* Copy the path if it's available before we might return */ if (SUCCEEDED(hr) && pszPath) - strcpyW(pszPath, szBuildPath); + wcscpy(pszPath, szBuildPath); /* if we don't care about existing directories we are ready */ if(nFolder & CSIDL_FLAG_DONT_VERIFY) goto end; @@ -1898,7 +1876,7 @@ static HRESULT _SHRegisterFolders(HKEY hRootKey, HANDLE hToken, { ret = RegSetValueExW(hUserKey, CSIDL_Data[folders[i]].szValueName, 0, REG_EXPAND_SZ, - (LPBYTE)path, (strlenW(path) + 1) * sizeof(WCHAR)); + (LPBYTE)path, (wcslen(path) + 1) * sizeof(WCHAR)); if (ret) hr = HRESULT_FROM_WIN32(ret); else @@ -1907,7 +1885,7 @@ static HRESULT _SHRegisterFolders(HKEY hRootKey, HANDLE hToken, hToken, SHGFP_TYPE_DEFAULT, path); ret = RegSetValueExW(hKey, CSIDL_Data[folders[i]].szValueName, 0, REG_SZ, - (LPBYTE)path, (strlenW(path) + 1) * sizeof(WCHAR)); + (LPBYTE)path, (wcslen(path) + 1) * sizeof(WCHAR)); if (ret) hr = HRESULT_FROM_WIN32(ret); } @@ -1958,13 +1936,13 @@ static HRESULT _SHRegisterUserShellFolders(BOOL bDefault) { hToken = (HANDLE)-1; hRootKey = HKEY_USERS; - strcpyW(userShellFolderPath, DefaultW); + wcscpy(userShellFolderPath, DefaultW); PathAddBackslashW(userShellFolderPath); - strcatW(userShellFolderPath, szSHUserFolders); + wcscat(userShellFolderPath, szSHUserFolders); pUserShellFolderPath = userShellFolderPath; - strcpyW(shellFolderPath, DefaultW); + wcscpy(shellFolderPath, DefaultW); PathAddBackslashW(shellFolderPath); - strcatW(shellFolderPath, szSHFolders); + wcscat(shellFolderPath, szSHFolders); pShellFolderPath = shellFolderPath; } else @@ -2017,7 +1995,7 @@ static HRESULT _SHRegisterCommonShellFolders(void) * Success: TRUE, * Failure: FALSE */ -static inline BOOL _SHAppendToUnixPath(char *szBasePath, LPCWSTR pwszSubPath) { +static BOOL __inline _SHAppendToUnixPath(char *szBasePath, LPCWSTR pwszSubPath) { WCHAR wszSubPath[MAX_PATH]; int cLen = strlen(szBasePath); char *pBackslash; @@ -2027,16 +2005,16 @@ static inline BOOL _SHAppendToUnixPath(char *szBasePath, LPCWSTR pwszSubPath) { /* Fall back to hard coded defaults. */ switch (LOWORD(pwszSubPath)) { case IDS_PERSONAL: - lstrcpyW(wszSubPath, PersonalW); + wcscpy(wszSubPath, PersonalW); break; case IDS_MYMUSIC: - lstrcpyW(wszSubPath, My_MusicW); + wcscpy(wszSubPath, My_MusicW); break; case IDS_MYPICTURES: - lstrcpyW(wszSubPath, My_PicturesW); + wcscpy(wszSubPath, My_PicturesW); break; case IDS_MYVIDEO: - lstrcpyW(wszSubPath, My_VideoW); + wcscpy(wszSubPath, My_VideoW); break; default: ERR("LoadString(%d) failed!\n", LOWORD(pwszSubPath)); @@ -2044,7 +2022,7 @@ static inline BOOL _SHAppendToUnixPath(char *szBasePath, LPCWSTR pwszSubPath) { } } } else { - lstrcpyW(wszSubPath, pwszSubPath); + wcscpy(wszSubPath, pwszSubPath); } if (szBasePath[cLen-1] != '/') szBasePath[cLen++] = '/'; diff --git a/reactos/dll/win32/shell32/shellreg.c b/reactos/dll/win32/shell32/shellreg.c index 9ed8f9a6c07..812566cd7fd 100644 --- a/reactos/dll/win32/shell32/shellreg.c +++ b/reactos/dll/win32/shell32/shellreg.c @@ -18,24 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - -#include -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "shellapi.h" -#include "wingdi.h" -#include "winuser.h" -#include "shlobj.h" -#include "winreg.h" - -#include "undocshell.h" -#include "wine/winbase16.h" - -#include "wine/debug.h" +#include WINE_DEFAULT_DEBUG_CHANNEL(shell); diff --git a/reactos/dll/win32/shell32/shellstring.c b/reactos/dll/win32/shell32/shellstring.c index 5eba435fc78..153807ac250 100644 --- a/reactos/dll/win32/shell32/shellstring.c +++ b/reactos/dll/win32/shell32/shellstring.c @@ -16,27 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#include -#include -#include -#include - -#define NONAMELESSUNION -#define NONAMELESSSTRUCT -#include "windef.h" -#include "winbase.h" -#include "winnls.h" -#include "wingdi.h" -#include "winuser.h" -#include "winreg.h" - -#include "shlobj.h" -#include "shlwapi.h" -#include "shell32_main.h" -#include "undocshell.h" -#include "wine/unicode.h" -#include "wine/debug.h" +#include WINE_DEFAULT_DEBUG_CHANNEL(shell); @@ -153,8 +133,8 @@ int WINAPI StrToOleStrW (LPWSTR lpWideCharStr, LPCWSTR lpWString) TRACE("(%p, %p %s)\n", lpWideCharStr, lpWString, debugstr_w(lpWString)); - strcpyW (lpWideCharStr, lpWString ); - return strlenW(lpWideCharStr); + wcscpy (lpWideCharStr, lpWString ); + return wcslen(lpWideCharStr); } BOOL WINAPI StrToOleStrAW (LPWSTR lpWideCharStr, LPCVOID lpString) @@ -179,7 +159,7 @@ BOOL WINAPI StrToOleStrNW (LPWSTR lpWide, INT nWide, LPCWSTR lpStrW, INT nStr) TRACE("(%p, %x, %s, %x)\n", lpWide, nWide, debugstr_wn(lpStrW, nStr), nStr); if (lstrcpynW (lpWide, lpStrW, nWide)) - { return lstrlenW (lpWide); + { return wcslen (lpWide); } return 0; } @@ -205,7 +185,7 @@ BOOL WINAPI OleStrToStrNW (LPWSTR lpwStr, INT nwStr, LPCWSTR lpOle, INT nOle) TRACE("(%p, %x, %s, %x)\n", lpwStr, nwStr, debugstr_wn(lpOle,nOle), nOle); if (lstrcpynW ( lpwStr, lpOle, nwStr)) - { return lstrlenW (lpwStr); + { return wcslen (lpwStr); } return 0; } @@ -264,7 +244,7 @@ DWORD WINAPI CheckEscapesW( LPWSTR string, DWORD len) { - DWORD size = lstrlenW(string); + DWORD size = wcslen(string); LPWSTR s, d; TRACE("(%s %d) stub\n", debugstr_w(string), len); diff --git a/reactos/dll/win32/shell32/shfldr.h b/reactos/dll/win32/shell32/shfldr.h index 49502545ba6..04c02a78433 100644 --- a/reactos/dll/win32/shell32/shfldr.h +++ b/reactos/dll/win32/shell32/shfldr.h @@ -48,7 +48,7 @@ HRESULT SHELL32_BindToChild (LPCITEMIDLIST pidlRoot, HRESULT SHELL32_CompareIDs (IShellFolder * iface, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2); LPITEMIDLIST SHELL32_CreatePidlFromBindCtx(IBindCtx *pbc, LPCWSTR path); -static inline int SHELL32_GUIDToStringA (REFGUID guid, LPSTR str) +static int __inline SHELL32_GUIDToStringA (REFGUID guid, LPSTR str) { return sprintf(str, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", guid->Data1, guid->Data2, guid->Data3, @@ -56,14 +56,14 @@ static inline int SHELL32_GUIDToStringA (REFGUID guid, LPSTR str) guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7]); } -static inline int SHELL32_GUIDToStringW (REFGUID guid, LPWSTR str) +static int __inline SHELL32_GUIDToStringW (REFGUID guid, LPWSTR str) { static const WCHAR fmtW[] = { '{','%','0','8','l','x','-','%','0','4','x','-','%','0','4','x','-', '%','0','2','x','%','0','2','x','-', '%','0','2','x','%','0','2','x','%','0','2','x','%','0','2','x', '%','0','2','x','%','0','2','x','}',0 }; - return sprintfW(str, fmtW, + return swprintf(str, fmtW, guid->Data1, guid->Data2, guid->Data3, guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3], guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7]); @@ -71,6 +71,3 @@ static inline int SHELL32_GUIDToStringW (REFGUID guid, LPWSTR str) void SHELL_FS_ProcessDisplayFilename(LPWSTR szPath, DWORD dwFlags); BOOL SHELL_FS_HideExtension(LPWSTR pwszPath); - -DEFINE_GUID( CLSID_UnixFolder, 0xcc702eb2, 0x7dc5, 0x11d9, 0xc6, 0x87, 0x00, 0x04, 0x23, 0x8a, 0x01, 0xcd ); -DEFINE_GUID( CLSID_UnixDosFolder, 0x9d20aae8, 0x0625, 0x44b0, 0x9c, 0xa7, 0x71, 0x88, 0x9c, 0x22, 0x54, 0xd9 ); diff --git a/reactos/dll/win32/shell32/shfldr_admintools.c b/reactos/dll/win32/shell32/shfldr_admintools.c index 959c76a98ec..8ceb80b5cf1 100644 --- a/reactos/dll/win32/shell32/shfldr_admintools.c +++ b/reactos/dll/win32/shell32/shfldr_admintools.c @@ -18,43 +18,11 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include - -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT - -#include "winerror.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wingdi.h" -#include "winuser.h" -#include "winspool.h" - -#include "ole2.h" -#include "shlguid.h" - -#include "enumidlist.h" -#include "pidl.h" -#include "undocshell.h" -#include "shell32_main.h" -#include "shresdef.h" -#include "shlwapi.h" -#include "shellfolder.h" -#include "wine/debug.h" -#include "debughlp.h" -#include "shfldr.h" -#include "shresdef.h" +#include WINE_DEFAULT_DEBUG_CHANNEL (shell); + /* List shortcuts of * CSIDL_COMMON_ADMINTOOLS * Note: CSIDL_ADMINTOOLS is ignored, tested with Window XP SP3+ @@ -455,7 +423,7 @@ static HRESULT WINAPI ISF_AdminTools_fnGetDisplayNameOf (IShellFolder2 * iface, { if ((GET_SHGDN_RELATION (dwFlags) == SHGDN_NORMAL) && (GET_SHGDN_FOR (dwFlags) & SHGDN_FORPARSING)) - strcpyW(pszPath, This->szTarget); + wcscpy(pszPath, This->szTarget); else HCR_GetClassNameW(&CLSID_AdminFolderShortcut, pszPath, MAX_PATH); } @@ -488,9 +456,9 @@ static HRESULT WINAPI ISF_AdminTools_fnGetDisplayNameOf (IShellFolder2 * iface, { int len = 0; - strcpyW(pszPath, This->szTarget); + wcscpy(pszPath, This->szTarget); PathAddBackslashW(pszPath); - len = lstrlenW(pszPath); + len = wcslen(pszPath); if (!SUCCEEDED(SHELL32_GetDisplayNameOfChild(iface, pidl, dwFlags | SHGDN_INFOLDER, pszPath + len, MAX_PATH + 1 - len))) { diff --git a/reactos/dll/win32/shell32/shfldr_desktop.c b/reactos/dll/win32/shell32/shfldr_desktop.c index a14cb443f9f..a3197be3b2b 100644 --- a/reactos/dll/win32/shell32/shfldr_desktop.c +++ b/reactos/dll/win32/shell32/shfldr_desktop.c @@ -20,38 +20,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include - -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT - -#include "winerror.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wingdi.h" -#include "winuser.h" - -#include "ole2.h" -#include "shlguid.h" - -#include "enumidlist.h" -#include "pidl.h" -#include "undocshell.h" -#include "shell32_main.h" -#include "shresdef.h" -#include "shlwapi.h" -#include "shellfolder.h" -#include "wine/debug.h" -#include "debughlp.h" -#include "shfldr.h" +#include WINE_DEFAULT_DEBUG_CHANNEL (shell); @@ -71,7 +40,7 @@ typedef struct { UINT cfShellIDList; /* clipboardformat for IDropTarget */ BOOL fAcceptFmt; /* flag for pending Drop */ -} IGenericSFImpl; +} IGenericSFImpl, *LPIGenericSFImpl; WCHAR *build_paths_list(LPCWSTR wszBasePath, int cidl, LPCITEMIDLIST *pidls); int SHELL_ConfirmMsgBox(HWND hWnd, LPWSTR lpszText, LPWSTR lpszCaption, HICON hIcon, BOOL bYesToAll); @@ -128,7 +97,7 @@ static HRESULT WINAPI ISF_Desktop_fnQueryInterface( return E_NOINTERFACE; } -static inline IGenericSFImpl *impl_from_ISFHelper( ISFHelper *iface ) +static LPIGenericSFImpl __inline impl_from_ISFHelper( ISFHelper *iface ) { return (IGenericSFImpl *)((char*)iface - FIELD_OFFSET(IGenericSFImpl, lpvtblSFHelper)); } @@ -177,7 +146,7 @@ static HRESULT WINAPI ISF_Desktop_fnParseDisplayName (IShellFolder2 * iface, { szNext = GetNextElementW (lpszDisplayName, szElement, MAX_PATH); TRACE ("-- element: %s\n", debugstr_w (szElement)); - SHCLSIDFromStringW (szElement + 2, &clsid); + CLSIDFromString (szElement + 2, &clsid); pidlTemp = _ILCreateGuid (PT_GUID, &clsid); } else if (PathGetDriveNumberW (lpszDisplayName) >= 0) @@ -680,7 +649,7 @@ static HRESULT WINAPI ISF_Desktop_fnGetDisplayNameOf (IShellFolder2 * iface, { if ((GET_SHGDN_RELATION (dwFlags) == SHGDN_NORMAL) && (GET_SHGDN_FOR (dwFlags) & SHGDN_FORPARSING)) - strcpyW(pszPath, This->sPathTarget); + wcscpy(pszPath, This->sPathTarget); else HCR_GetClassNameW(&CLSID_ShellDesktop, pszPath, MAX_PATH); } @@ -718,9 +687,9 @@ static HRESULT WINAPI ISF_Desktop_fnGetDisplayNameOf (IShellFolder2 * iface, WCHAR szRegPath[100]; LONG r; - lstrcpyW (szRegPath, clsidW); + wcscpy (szRegPath, clsidW); SHELL32_GUIDToStringW (clsid, &szRegPath[6]); - lstrcatW (szRegPath, shellfolderW); + wcscat (szRegPath, shellfolderW); r = SHGetValueW(HKEY_CLASSES_ROOT, szRegPath, wantsForParsingW, NULL, NULL, NULL); if (r == ERROR_SUCCESS) @@ -764,7 +733,7 @@ static HRESULT WINAPI ISF_Desktop_fnGetDisplayNameOf (IShellFolder2 * iface, { lstrcpynW(pszPath, This->sPathTarget, MAX_PATH - 1); PathAddBackslashW(pszPath); - cLen = lstrlenW(pszPath); + cLen = wcslen(pszPath); } _ILSimpleGetTextW(pidl, pszPath + cLen, MAX_PATH - cLen); @@ -859,7 +828,7 @@ static HRESULT WINAPI ISF_Desktop_fnSetNameOf (IShellFolder2 * iface, if(!(dwFlags & SHGDN_FORPARSING) && SHELL_FS_HideExtension(szSrc)) { WCHAR *ext = PathFindExtensionW(szSrc); if(*ext != '\0') { - INT len = strlenW(szDest); + INT len = wcslen(szDest); lstrcpynW(szDest + len, ext, MAX_PATH - len); } } @@ -1024,7 +993,7 @@ static const IShellFolder2Vtbl vt_MCFldr_ShellFolder2 = ISF_Desktop_fnMapColumnToSCID }; -static inline IGenericSFImpl *impl_from_IPersistFolder2( IPersistFolder2 *iface ) +static LPIGenericSFImpl __inline impl_from_IPersistFolder2( IPersistFolder2 *iface ) { return (IGenericSFImpl *)((char*)iface - FIELD_OFFSET(IGenericSFImpl, lpPF2)); } @@ -1172,7 +1141,7 @@ next: dwFetched) { _ILSimpleGetTextW (pidl, wszText, MAX_PATH); if (0 == lstrcmpiW (wszText, pwszName)) { - snprintfW (pwszName, uLen, wszFormat, wszNewFolder, i++); + _snwprintf (pwszName, uLen, wszFormat, wszNewFolder, i++); if (i > 99) { hr = E_FAIL; break; @@ -1306,7 +1275,7 @@ ISF_Desktop_ISFHelper_fnDeleteItems (ISFHelper * iface, UINT cidl, LPCITEMIDLIST SHFree(pidl); } - wszCurrentPath += lstrlenW(wszCurrentPath)+1; + wszCurrentPath += wcslen(wszCurrentPath)+1; } HeapFree(GetProcessHeap(), 0, wszPathsList); return ret; @@ -1365,8 +1334,8 @@ HRESULT WINAPI ISF_Desktop_Constructor ( sf->lpPF2 = &vt_FSFldr_PersistFolder2; sf->lpvtblSFHelper = &vt_FSFldr_ISFHelper; sf->pidlRoot = _ILCreateDesktop(); /* my qualified pidl */ - sf->sPathTarget = SHAlloc( (lstrlenW(szMyPath) + 1)*sizeof(WCHAR) ); - lstrcpyW( sf->sPathTarget, szMyPath ); + sf->sPathTarget = SHAlloc( (wcslen(szMyPath) + 1)*sizeof(WCHAR) ); + wcscpy( sf->sPathTarget, szMyPath ); if (InterlockedCompareExchangePointer((void *)&cached_sf, sf, NULL) != NULL) { diff --git a/reactos/dll/win32/shell32/shfldr_fonts.c b/reactos/dll/win32/shell32/shfldr_fonts.c index 4ed7e7acc03..cd54d778feb 100644 --- a/reactos/dll/win32/shell32/shfldr_fonts.c +++ b/reactos/dll/win32/shell32/shfldr_fonts.c @@ -18,33 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include - -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT - -#include "winerror.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" - -#include "pidl.h" -#include "enumidlist.h" -#include "undocshell.h" -#include "shell32_main.h" -#include "shresdef.h" -#include "wine/debug.h" -#include "debughlp.h" -#include "shfldr.h" -#include "shlwapi.h" - +#include WINE_DEFAULT_DEBUG_CHANNEL (shell); @@ -61,7 +35,7 @@ typedef struct { /* both paths are parsible from the desktop */ LPITEMIDLIST pidlRoot; /* absolute pidl */ LPCITEMIDLIST apidl; /* currently focused font item */ -} IGenericSFImpl; +} IGenericSFImpl, *LPIGenericSFImpl; static const IShellFolder2Vtbl vt_ShellFolder2; static const IPersistFolder2Vtbl vt_NP_PersistFolder2; @@ -88,9 +62,19 @@ static shvheader FontsSFHeader[] = { #define COLUMN_SIZE 2 #define COLUMN_FILENAME 3 - #define FontsSHELLVIEWCOLUMNS (4) + +static LPIGenericSFImpl __inline impl_from_IPersistFolder2( IPersistFolder2 *iface ) +{ + return (LPIGenericSFImpl)((char*)iface - FIELD_OFFSET(IGenericSFImpl, lpVtblPersistFolder2)); +} + +static LPIGenericSFImpl __inline impl_from_IContextMenu2(IContextMenu2 *iface) +{ + return (LPIGenericSFImpl)((char *)iface - FIELD_OFFSET(IGenericSFImpl, lpVtblContextMenuFontItem)); +} + /************************************************************************** * ISF_Fonts_Constructor */ @@ -971,24 +955,25 @@ static HRESULT WINAPI ISF_Fonts_IContextMenu2_InvokeCommand( IContextMenu2 *iface, LPCMINVOKECOMMANDINFO lpcmi) { - _ICOM_THIS_From_IContextMenu2FontItem(IGenericSFImpl, iface); SHELLEXECUTEINFOW sei; PIDLFontStruct * pfont; SHFILEOPSTRUCTW op; + IGenericSFImpl * This = impl_from_IContextMenu2(iface); + TRACE("(%p)->(invcom=%p verb=%p wnd=%p)\n",This,lpcmi,lpcmi->lpVerb, lpcmi->hwnd); - if (lpcmi->lpVerb == MAKEINTRESOURCE(1) || lpcmi->lpVerb == MAKEINTRESOURCE(2) || lpcmi->lpVerb == MAKEINTRESOURCE(7)) + if (lpcmi->lpVerb == MAKEINTRESOURCEA(1) || lpcmi->lpVerb == MAKEINTRESOURCEA(2) || lpcmi->lpVerb == MAKEINTRESOURCEA(7)) { ZeroMemory(&sei, sizeof(sei)); sei.cbSize = sizeof(sei); sei.hwnd = lpcmi->hwnd; sei.nShow = SW_SHOWNORMAL; - if (lpcmi->lpVerb == MAKEINTRESOURCE(1)) + if (lpcmi->lpVerb == MAKEINTRESOURCEA(1)) sei.lpVerb = L"open"; - else if (lpcmi->lpVerb == MAKEINTRESOURCE(2)) + else if (lpcmi->lpVerb == MAKEINTRESOURCEA(2)) sei.lpVerb = L"print"; - else if (lpcmi->lpVerb == MAKEINTRESOURCE(7)) + else if (lpcmi->lpVerb == MAKEINTRESOURCEA(7)) sei.lpVerb = L"properties"; pfont = _ILGetFontStruct(This->apidl); @@ -998,12 +983,12 @@ static HRESULT WINAPI ISF_Fonts_IContextMenu2_InvokeCommand( if (sei.hInstApp <= (HINSTANCE)32) return E_FAIL; } - else if (lpcmi->lpVerb == MAKEINTRESOURCE(4)) + else if (lpcmi->lpVerb == MAKEINTRESOURCEA(4)) { FIXME("implement font copying\n"); return E_NOTIMPL; } - else if (lpcmi->lpVerb == MAKEINTRESOURCE(6)) + else if (lpcmi->lpVerb == MAKEINTRESOURCEA(6)) { ZeroMemory(&op, sizeof(op)); op.hwnd = lpcmi->hwnd; diff --git a/reactos/dll/win32/shell32/shfldr_fs.c b/reactos/dll/win32/shell32/shfldr_fs.c index a67907ed4e1..072e6748eec 100644 --- a/reactos/dll/win32/shell32/shfldr_fs.c +++ b/reactos/dll/win32/shell32/shfldr_fs.c @@ -20,38 +20,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include - -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT - -#include "winerror.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wingdi.h" -#include "winuser.h" - -#include "ole2.h" -#include "shlguid.h" - -#include "enumidlist.h" -#include "pidl.h" -#include "undocshell.h" -#include "shell32_main.h" -#include "shresdef.h" -#include "shlwapi.h" -#include "shellfolder.h" -#include "wine/debug.h" -#include "debughlp.h" -#include "shfldr.h" +#include WINE_DEFAULT_DEBUG_CHANNEL (shell); @@ -78,7 +47,7 @@ typedef struct { UINT cfShellIDList; /* clipboardformat for IDropTarget */ BOOL fAcceptFmt; /* flag for pending Drop */ -} IGenericSFImpl; +} IGenericSFImpl, *LPIGenericSFImpl; static const IUnknownVtbl unkvt; static const IShellFolder2Vtbl sfvt; @@ -86,24 +55,24 @@ static const IPersistFolder3Vtbl vt_FSFldr_PersistFolder3; /* IPersistFolder3 fo static const IDropTargetVtbl dtvt; static const ISFHelperVtbl shvt; -static inline IGenericSFImpl *impl_from_IShellFolder2( IShellFolder2 *iface ) +static LPIGenericSFImpl __inline impl_from_IShellFolder2( IShellFolder2 *iface ) { - return (IGenericSFImpl *)((char*)iface - FIELD_OFFSET(IGenericSFImpl, lpvtblShellFolder)); + return (LPIGenericSFImpl)((char*)iface - FIELD_OFFSET(IGenericSFImpl, lpvtblShellFolder)); } -static inline IGenericSFImpl *impl_from_IPersistFolder3( IPersistFolder3 *iface ) +static LPIGenericSFImpl __inline impl_from_IPersistFolder3( IPersistFolder3 *iface ) { - return (IGenericSFImpl *)((char*)iface - FIELD_OFFSET(IGenericSFImpl, lpvtblPersistFolder3)); + return (LPIGenericSFImpl)((char*)iface - FIELD_OFFSET(IGenericSFImpl, lpvtblPersistFolder3)); } -static inline IGenericSFImpl *impl_from_IDropTarget( IDropTarget *iface ) +static LPIGenericSFImpl __inline impl_from_IDropTarget( IDropTarget *iface ) { - return (IGenericSFImpl *)((char*)iface - FIELD_OFFSET(IGenericSFImpl, lpvtblDropTarget)); + return (LPIGenericSFImpl)((char*)iface - FIELD_OFFSET(IGenericSFImpl, lpvtblDropTarget)); } -static inline IGenericSFImpl *impl_from_ISFHelper( ISFHelper *iface ) +static LPIGenericSFImpl __inline impl_from_ISFHelper( ISFHelper *iface ) { - return (IGenericSFImpl *)((char*)iface - FIELD_OFFSET(IGenericSFImpl, lpvtblSFHelper)); + return (LPIGenericSFImpl)((char*)iface - FIELD_OFFSET(IGenericSFImpl, lpvtblSFHelper)); } @@ -405,7 +374,7 @@ IShellFolder_fnParseDisplayName (IShellFolder2 * iface, /* build the full pathname to the element */ lstrcpynW(szPath, This->sPathTarget, MAX_PATH - 1); PathAddBackslashW(szPath); - len = lstrlenW(szPath); + len = wcslen(szPath); lstrcpynW(szPath + len, szElement, MAX_PATH - len); /* get the pidl */ @@ -808,7 +777,7 @@ IShellFolder_fnGetDisplayNameOf (IShellFolder2 * iface, LPCITEMIDLIST pidl, { lstrcpynW(pszPath, This->sPathTarget, MAX_PATH); PathAddBackslashW(pszPath); - len = lstrlenW(pszPath); + len = wcslen(pszPath); } _ILSimpleGetTextW(pidl, pszPath + len, MAX_PATH + 1 - len); if (!_ILIsFolder(pidl)) SHELL_FS_ProcessDisplayFilename(pszPath, dwFlags); @@ -880,7 +849,7 @@ static HRESULT WINAPI IShellFolder_fnSetNameOf (IShellFolder2 * iface, if(!(dwFlags & SHGDN_FORPARSING) && SHELL_FS_HideExtension(szSrc)) { WCHAR *ext = PathFindExtensionW(szSrc); if(*ext != '\0') { - INT len = strlenW(szDest); + INT len = wcslen(szDest); lstrcpynW(szDest + len, ext, MAX_PATH - len); } } @@ -1120,7 +1089,7 @@ next: dwFetched) { _ILSimpleGetTextW (pidl, wszText, MAX_PATH); if (0 == lstrcmpiW (wszText, pwszName)) { - snprintfW (pwszName, uLen, wszFormat, wszNewFolder, i++); + _snwprintf (pwszName, uLen, wszFormat, wszNewFolder, i++); if (i > 99) { hr = E_FAIL; break; @@ -1174,7 +1143,7 @@ ISFHelper_fnAddFolder (ISFHelper * iface, HWND hwnd, LPCWSTR pwszName, sizeof (wszTempText)); LoadStringW (shell32_hInstance, IDS_CREATEFOLDER_CAPTION, wszCaption, sizeof (wszCaption)); - sprintfW (wszText, wszTempText, wszNewDir); + swprintf (wszText, wszTempText, wszNewDir); MessageBoxW (hwnd, wszText, wszCaption, MB_OK | MB_ICONEXCLAMATION); } @@ -1194,7 +1163,7 @@ WCHAR *build_paths_list(LPCWSTR wszBasePath, int cidl, LPCITEMIDLIST *pidls) int iPathLen; int i; - iPathLen = lstrlenW(wszBasePath); + iPathLen = wcslen(wszBasePath); wszPathsList = HeapAlloc(GetProcessHeap(), 0, MAX_PATH*sizeof(WCHAR)*cidl+1); wszListPos = wszPathsList; @@ -1205,7 +1174,7 @@ WCHAR *build_paths_list(LPCWSTR wszBasePath, int cidl, LPCITEMIDLIST *pidls) lstrcpynW(wszListPos, wszBasePath, MAX_PATH); /* FIXME: abort if path too long */ _ILSimpleGetTextW(pidls[i], wszListPos+iPathLen, MAX_PATH-iPathLen); - wszListPos += lstrlenW(wszListPos)+1; + wszListPos += wcslen(wszListPos)+1; } *wszListPos=0; return wszPathsList; @@ -1271,7 +1240,7 @@ ISFHelper_fnDeleteItems (ISFHelper * iface, UINT cidl, LPCITEMIDLIST * apidl) SHFree(pidl); } - wszCurrentPath += lstrlenW(wszCurrentPath)+1; + wszCurrentPath += wcslen(wszCurrentPath)+1; } HeapFree(GetProcessHeap(), 0, wszPathsList); return ret; @@ -1485,7 +1454,7 @@ IFSFldr_PersistFolder3_Initialize (IPersistFolder3 * iface, LPCITEMIDLIST pidl) /* set my path */ if (SHGetPathFromIDListW (pidl, wszTemp)) { - int len = strlenW(wszTemp); + int len = wcslen(wszTemp); This->sPathTarget = SHAlloc((len + 1) * sizeof(WCHAR)); if (!This->sPathTarget) return E_OUTOFMEMORY; @@ -1555,14 +1524,14 @@ IFSFldr_PersistFolder3_InitializeEx (IPersistFolder3 * iface, if (ppfti->csidl != -1) { if (SHGetSpecialFolderPathW (0, wszTemp, ppfti->csidl, ppfti->csidl & CSIDL_FLAG_CREATE)) { - int len = strlenW(wszTemp); + int len = wcslen(wszTemp); This->sPathTarget = SHAlloc((len + 1) * sizeof(WCHAR)); if (!This->sPathTarget) return E_OUTOFMEMORY; memcpy(This->sPathTarget, wszTemp, (len + 1) * sizeof(WCHAR)); } } else if (ppfti->szTargetParsingName[0]) { - int len = strlenW(ppfti->szTargetParsingName); + int len = wcslen(ppfti->szTargetParsingName); This->sPathTarget = SHAlloc((len + 1) * sizeof(WCHAR)); if (!This->sPathTarget) return E_OUTOFMEMORY; @@ -1570,7 +1539,7 @@ IFSFldr_PersistFolder3_InitializeEx (IPersistFolder3 * iface, (len + 1) * sizeof(WCHAR)); } else if (ppfti->pidlTargetFolder) { if (SHGetPathFromIDListW(ppfti->pidlTargetFolder, wszTemp)) { - int len = strlenW(wszTemp); + int len = wcslen(wszTemp); This->sPathTarget = SHAlloc((len + 1) * sizeof(WCHAR)); if (!This->sPathTarget) return E_OUTOFMEMORY; diff --git a/reactos/dll/win32/shell32/shfldr_mycomp.c b/reactos/dll/win32/shell32/shfldr_mycomp.c index 7c2bc90fb49..7bd7daa9214 100644 --- a/reactos/dll/win32/shell32/shfldr_mycomp.c +++ b/reactos/dll/win32/shell32/shfldr_mycomp.c @@ -19,34 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include - -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT - -#include "winerror.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" - -#include "wingdi.h" -#include "pidl.h" -#include "shlguid.h" -#include "enumidlist.h" -#include "undocshell.h" -#include "shell32_main.h" -#include "shresdef.h" -#include "shlwapi.h" -#include "wine/debug.h" -#include "debughlp.h" -#include "shfldr.h" +#include WINE_DEFAULT_DEBUG_CHANNEL (shell); @@ -62,14 +35,14 @@ typedef struct { /* both paths are parsible from the desktop */ LPITEMIDLIST pidlRoot; /* absolute pidl */ LPWSTR sName; -} IGenericSFImpl; +} IGenericSFImpl, *LPIGenericSFImpl; static const IShellFolder2Vtbl vt_ShellFolder2; static const IPersistFolder2Vtbl vt_PersistFolder2; -static inline IGenericSFImpl *impl_from_IPersistFolder2( IPersistFolder2 *iface ) +static LPIGenericSFImpl __inline impl_from_IPersistFolder2( IPersistFolder2 *iface ) { - return (IGenericSFImpl *)((char*)iface - FIELD_OFFSET(IGenericSFImpl, lpVtblPersistFolder2)); + return (LPIGenericSFImpl)((char*)iface - FIELD_OFFSET(IGenericSFImpl, lpVtblPersistFolder2)); } @@ -137,10 +110,10 @@ HRESULT WINAPI ISF_MyComputer_Constructor (IUnknown * pUnkOuter, REFIID riid, LP &dwSize) == ERROR_SUCCESS) { szName[MAX_PATH-1] = 0; - sf->sName = SHAlloc((strlenW(szName)+1) * sizeof(WCHAR)); + sf->sName = SHAlloc((wcslen(szName)+1) * sizeof(WCHAR)); if (sf->sName) { - lstrcpyW( sf->sName, szName ); + wcscpy( sf->sName, szName ); } TRACE("sName %s\n", debugstr_w(sf->sName)); } @@ -239,7 +212,7 @@ static HRESULT WINAPI ISF_MyComputer_fnParseDisplayName (IShellFolder2 *iface, { szNext = GetNextElementW (lpszDisplayName, szElement, MAX_PATH); TRACE ("-- element: %s\n", debugstr_w (szElement)); - SHCLSIDFromStringW (szElement + 2, &clsid); + CLSIDFromString (szElement + 2, &clsid); pidlTemp = _ILCreateGuid (PT_GUID, &clsid); } /* do we have an absolute path name ? */ @@ -624,9 +597,9 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDisplayNameOf (IShellFolder2 *iface, * Get the "WantsFORPARSING" flag from the registry */ - lstrcpyW (szRegPath, clsidW); + wcscpy (szRegPath, clsidW); SHELL32_GUIDToStringW (clsid, &szRegPath[6]); - lstrcatW (szRegPath, shellfolderW); + wcscat (szRegPath, shellfolderW); r = SHGetValueW (HKEY_CLASSES_ROOT, szRegPath, wantsForParsingW, NULL, NULL, NULL); if (r == ERROR_SUCCESS) @@ -665,7 +638,7 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDisplayNameOf (IShellFolder2 *iface, /* user friendly name */ if (_ILIsMyComputer(pidl) && This->sName) - strcpyW(pszPath, This->sName); + wcscpy(pszPath, This->sName); else HCR_GetClassNameW (clsid, pszPath, MAX_PATH); @@ -722,10 +695,10 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDisplayNameOf (IShellFolder2 *iface, pszPath[MAX_PATH-7] = L'\0'; } } - strcatW (pszPath, wszOpenBracket); + wcscat (pszPath, wszOpenBracket); wszDrive[2] = L'\0'; - strcatW (pszPath, wszDrive); - strcatW (pszPath, wszCloseBracket); + wcscat (pszPath, wszDrive); + wcscat (pszPath, wszCloseBracket); } } else @@ -796,7 +769,7 @@ static HRESULT WINAPI ISF_MyComputer_fnSetNameOf ( *pPidlOut = _ILCreateMyComputer(); } - length = (strlenW(lpName)+1) * sizeof(WCHAR); + length = (wcslen(lpName)+1) * sizeof(WCHAR); sName = SHAlloc(length); if (!sName) @@ -818,7 +791,7 @@ static HRESULT WINAPI ISF_MyComputer_fnSetNameOf ( RegCloseKey(hKey); } - lstrcpyW(sName, lpName); + wcscpy(sName, lpName); SHFree(This->sName); This->sName = sName; TRACE("result %s\n", debugstr_w(This->sName)); diff --git a/reactos/dll/win32/shell32/shfldr_mydocuments.c b/reactos/dll/win32/shell32/shfldr_mydocuments.c index 143c4b74e83..d45ba8dff0a 100644 --- a/reactos/dll/win32/shell32/shfldr_mydocuments.c +++ b/reactos/dll/win32/shell32/shfldr_mydocuments.c @@ -19,38 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include - -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT - -#include "winerror.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wingdi.h" -#include "winuser.h" - -#include "ole2.h" -#include "shlguid.h" - -#include "enumidlist.h" -#include "pidl.h" -#include "undocshell.h" -#include "shell32_main.h" -#include "shresdef.h" -#include "shlwapi.h" -#include "shellfolder.h" -#include "wine/debug.h" -#include "debughlp.h" -#include "shfldr.h" +#include WINE_DEFAULT_DEBUG_CHANNEL (mydocs); @@ -69,7 +38,7 @@ typedef struct { UINT cfShellIDList; /* clipboardformat for IDropTarget */ BOOL fAcceptFmt; /* flag for pending Drop */ -} IGenericSFImpl; +} IGenericSFImpl, *LPIGenericSFImpl; #define _IUnknown_(This) (IShellFolder*)&(This->lpVtbl) #define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl) @@ -175,7 +144,7 @@ WINAPI ISF_MyDocuments_fnParseDisplayName (IShellFolder2 * iface, { szNext = GetNextElementW (lpszDisplayName, szElement, MAX_PATH); TRACE ("-- element: %s\n", debugstr_w (szElement)); - SHCLSIDFromStringW (szElement + 2, &clsid); + CLSIDFromString (szElement + 2, &clsid); pidlTemp = _ILCreateGuid (PT_GUID, &clsid); } else if( (pidlTemp = SHELL32_CreatePidlFromBindCtx(pbc, lpszDisplayName)) ) @@ -506,7 +475,7 @@ WINAPI ISF_MyDocuments_fnGetDisplayNameOf (IShellFolder2 * iface, { if ((GET_SHGDN_RELATION (dwFlags) == SHGDN_NORMAL) && (GET_SHGDN_FOR (dwFlags) & SHGDN_FORPARSING)) - strcpyW(pszPath, This->sPathTarget); + wcscpy(pszPath, This->sPathTarget); else HCR_GetClassNameW(&CLSID_MyDocuments, pszPath, MAX_PATH); TRACE("CP\n"); @@ -545,9 +514,9 @@ WINAPI ISF_MyDocuments_fnGetDisplayNameOf (IShellFolder2 * iface, WCHAR szRegPath[100]; LONG r; - lstrcpyW (szRegPath, clsidW); + wcscpy (szRegPath, clsidW); SHELL32_GUIDToStringW (clsid, &szRegPath[6]); - lstrcatW (szRegPath, shellfolderW); + wcscat (szRegPath, shellfolderW); r = SHGetValueW(HKEY_CLASSES_ROOT, szRegPath, wantsForParsingW, NULL, NULL, NULL); if (r == ERROR_SUCCESS) @@ -599,7 +568,7 @@ WINAPI ISF_MyDocuments_fnGetDisplayNameOf (IShellFolder2 * iface, if (!_ILIsDesktop(pidl)) { PathAddBackslashW(pszPath); - cLen = lstrlenW(pszPath); + cLen = wcslen(pszPath); _ILSimpleGetTextW(pidl, pszPath + cLen, MAX_PATH - cLen); if (!_ILIsFolder(pidl)) { @@ -787,9 +756,9 @@ static const IShellFolder2Vtbl vt_MCFldr_ShellFolder2 = ISF_MyDocuments_fnMapColumnToSCID }; -static inline IGenericSFImpl *impl_from_IPersistFolder2( IPersistFolder2 *iface ) +static LPIGenericSFImpl __inline impl_from_IPersistFolder2( IPersistFolder2 *iface ) { - return (IGenericSFImpl *)((char*)iface - FIELD_OFFSET(IGenericSFImpl, lpPF2)); + return (LPIGenericSFImpl)((char*)iface - FIELD_OFFSET(IGenericSFImpl, lpPF2)); } static HRESULT WINAPI @@ -904,8 +873,8 @@ HRESULT WINAPI ISF_MyDocuments_Constructor ( sf->lpVtbl = &vt_MCFldr_ShellFolder2; sf->lpPF2 = &vt_FSFldr_PersistFolder2; sf->pidlRoot = _ILCreateMyDocuments(); /* my qualified pidl */ - sf->sPathTarget = SHAlloc( (lstrlenW(szMyPath) + 1)*sizeof(WCHAR) ); - lstrcpyW( sf->sPathTarget, szMyPath ); + sf->sPathTarget = SHAlloc( (wcslen(szMyPath) + 1)*sizeof(WCHAR) ); + wcscpy( sf->sPathTarget, szMyPath ); if (InterlockedCompareExchangePointer((void *)&cached_sf, sf, NULL) != NULL) { diff --git a/reactos/dll/win32/shell32/shfldr_netplaces.c b/reactos/dll/win32/shell32/shfldr_netplaces.c index 361496bebac..31722d2c7c5 100644 --- a/reactos/dll/win32/shell32/shfldr_netplaces.c +++ b/reactos/dll/win32/shell32/shfldr_netplaces.c @@ -20,32 +20,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include - -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT - -#include "winerror.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" - -#include "pidl.h" -#include "enumidlist.h" -#include "undocshell.h" -#include "shell32_main.h" -#include "shresdef.h" -#include "wine/debug.h" -#include "debughlp.h" -#include "shfldr.h" -#include "shlwapi.h" +#include WINE_DEFAULT_DEBUG_CHANNEL (shell); diff --git a/reactos/dll/win32/shell32/shfldr_printers.c b/reactos/dll/win32/shell32/shfldr_printers.c index c61d37241ff..e8596bbab23 100644 --- a/reactos/dll/win32/shell32/shfldr_printers.c +++ b/reactos/dll/win32/shell32/shfldr_printers.c @@ -20,40 +20,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include - -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT - -#include "winerror.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wingdi.h" -#include "winuser.h" -#include "winspool.h" - -#include "ole2.h" -#include "shlguid.h" - -#include "enumidlist.h" -#include "pidl.h" -#include "undocshell.h" -#include "shell32_main.h" -#include "shresdef.h" -#include "shlwapi.h" -#include "shellfolder.h" -#include "wine/debug.h" -#include "debughlp.h" -#include "shfldr.h" -#include "shresdef.h" +#include WINE_DEFAULT_DEBUG_CHANNEL (shell); @@ -117,7 +84,7 @@ static HRESULT WINAPI IEI_Printers_fnQueryInterface(IExtractIconW *iface, REFIID if(*ppvObj) { - IExtractIconW_AddRef((IExtractIconW*) *ppvObj); + ((IExtractIconW*)*ppvObj)->lpVtbl->AddRef(*ppvObj); TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); return S_OK; } @@ -225,7 +192,7 @@ static HRESULT WINAPI IEIA_Printers_fnQueryInterface(IExtractIconA * iface, REFI { _ICOM_THIS_From_IExtractIconA(IExtractIconW, iface); - return IExtractIconW_QueryInterface(This, riid, ppvObj); + return This->lpVtbl->QueryInterface(This, riid, ppvObj); } /************************************************************************** @@ -235,7 +202,7 @@ static ULONG WINAPI IEIA_Printers_fnAddRef(IExtractIconA * iface) { _ICOM_THIS_From_IExtractIconA(IExtractIconW, iface); - return IExtractIconW_AddRef(This); + return This->lpVtbl->AddRef(This); } /************************************************************************** * IExtractIconA_Release @@ -244,7 +211,7 @@ static ULONG WINAPI IEIA_Printers_fnRelease(IExtractIconA * iface) { _ICOM_THIS_From_IExtractIconA(IExtractIconW, iface); - return IExtractIconW_AddRef(This); + return This->lpVtbl->AddRef(This); } /************************************************************************** @@ -264,7 +231,7 @@ static HRESULT WINAPI IEIA_Printers_fnGetIconLocation( TRACE("(%p) (flags=%u %p %u %p %p)\n", This, uFlags, szIconFile, cchMax, piIndex, pwFlags); - ret = IExtractIconW_GetIconLocation(This, uFlags, lpwstrFile, cchMax, piIndex, pwFlags); + ret = This->lpVtbl->GetIconLocation(This, uFlags, lpwstrFile, cchMax, piIndex, pwFlags); WideCharToMultiByte(CP_ACP, 0, lpwstrFile, -1, szIconFile, cchMax, NULL, NULL); HeapFree(GetProcessHeap(), 0, lpwstrFile); @@ -286,7 +253,7 @@ static HRESULT WINAPI IEIA_Printers_fnExtract(IExtractIconA *iface, LPCSTR pszFi TRACE("(%p) (file=%p index=%u %p %p size=%u)\n", This, pszFile, nIconIndex, phiconLarge, phiconSmall, nIconSize); MultiByteToWideChar(CP_ACP, 0, pszFile, -1, lpwstrFile, len); - ret = IExtractIconW_Extract(This, lpwstrFile, nIconIndex, phiconLarge, phiconSmall, nIconSize); + ret = This->lpVtbl->Extract(This, lpwstrFile, nIconIndex, phiconLarge, phiconSmall, nIconSize); HeapFree(GetProcessHeap(), 0, lpwstrFile); return ret; } diff --git a/reactos/dll/win32/shell32/shfldr_recyclebin.c b/reactos/dll/win32/shell32/shfldr_recyclebin.c index f6996107ba6..8f713e07c4f 100644 --- a/reactos/dll/win32/shell32/shfldr_recyclebin.c +++ b/reactos/dll/win32/shell32/shfldr_recyclebin.c @@ -18,31 +18,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT #define MAX_PROPERTY_SHEET_PAGE 32 -#include - -#include "winerror.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "winuser.h" -#include "ntquery.h" -#include "shlwapi.h" -#include "shlobj.h" -#include "shresdef.h" -#include "pidl.h" -#include "wine/debug.h" - -#include "shell32_main.h" -#include "enumidlist.h" -#include "xdg.h" -#include "recyclebin.h" -#include +#include WINE_DEFAULT_DEBUG_CHANNEL(recyclebin); @@ -91,7 +69,7 @@ typedef struct tagRecycleBin INT iIdEmpty; LPITEMIDLIST pidl; LPCITEMIDLIST apidl; -} RecycleBin; +} RecycleBin, *LPRecycleBin; typedef struct { @@ -114,17 +92,17 @@ static const IShellFolder2Vtbl recycleBinVtbl; static const IPersistFolder2Vtbl recycleBinPersistVtbl; static const IShellExtInitVtbl eivt; -static RecycleBin *impl_from_IContextMenu2(IContextMenu2 *iface) +static LPRecycleBin __inline impl_from_IContextMenu2(IContextMenu2 *iface) { return (RecycleBin *)((char *)iface - FIELD_OFFSET(RecycleBin, lpContextMenu2)); } -static RecycleBin *impl_from_IPersistFolder(IPersistFolder2 *iface) +static LPRecycleBin __inline impl_from_IPersistFolder(IPersistFolder2 *iface) { return (RecycleBin *)((char *)iface - FIELD_OFFSET(RecycleBin, lpPersistFolderVtbl)); } -static inline RecycleBin *impl_from_IShellExtInit( IShellExtInit *iface ) +static LPRecycleBin __inline impl_from_IShellExtInit( IShellExtInit *iface ) { return (RecycleBin *)((char*)iface - FIELD_OFFSET(RecycleBin, lpSEI)); } @@ -670,12 +648,12 @@ static HRESULT WINAPI RecycleBin_GetDetailsOf(IShellFolder2 *iface, LPCITEMIDLIS break; case COLUMN_TYPE: szTypeName[0] = L'\0'; - lstrcpyW(buffer,PathFindExtensionW(pFileDetails->szName)); + wcscpy(buffer,PathFindExtensionW(pFileDetails->szName)); if (!( HCR_MapTypeToValueW(buffer, buffer, sizeof(buffer)/sizeof(WCHAR), TRUE) && HCR_MapTypeToValueW(buffer, szTypeName, sizeof(szTypeName)/sizeof(WCHAR), FALSE ))) { - lstrcpyW (szTypeName, PathFindExtensionW(pFileDetails->szName)); - strcatW(szTypeName, L"-"); + wcscpy (szTypeName, PathFindExtensionW(pFileDetails->szName)); + wcscat(szTypeName, L"-"); Length = wcslen(szTypeName); if (LoadStringW(shell32_hInstance, IDS_SHV_COLUMN1, &szTypeName[Length], (sizeof(szTypeName)/sizeof(WCHAR))- Length)) szTypeName[(sizeof(szTypeName)/sizeof(WCHAR))-1] = L'\0'; @@ -878,7 +856,7 @@ RecycleBin_IContextMenu2Folder_QueryContextMenu( IContextMenu2* iface, HMENU hme LoadStringW(shell32_hInstance, IDS_EMPTY_BITBUCKET, szBuffer, sizeof(szBuffer)/sizeof(WCHAR)); szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; mii.dwTypeData = szBuffer; - mii.cch = strlenW( mii.dwTypeData ); + mii.cch = wcslen( mii.dwTypeData ); mii.wID = idCmdFirst + id++; mii.fType = MFT_STRING; This->iIdEmpty = 1; @@ -1067,7 +1045,7 @@ static HRESULT WINAPI RecycleBin_IContextMenu2Item_InvokeCommand( TRACE("(%p)->(invcom=%p verb=%p wnd=%p)\n",This,lpcmi,lpcmi->lpVerb, lpcmi->hwnd); - if (lpcmi->lpVerb == MAKEINTRESOURCE(1) || lpcmi->lpVerb == MAKEINTRESOURCE(5)) + if (lpcmi->lpVerb == MAKEINTRESOURCEA(1) || lpcmi->lpVerb == MAKEINTRESOURCEA(5)) { Context.pFileDetails = _ILGetRecycleStruct(This->apidl); Context.bFound = FALSE; @@ -1076,7 +1054,7 @@ static HRESULT WINAPI RecycleBin_IContextMenu2Item_InvokeCommand( if (!Context.bFound) return E_FAIL; - if (lpcmi->lpVerb == MAKEINTRESOURCE(1)) + if (lpcmi->lpVerb == MAKEINTRESOURCEA(1)) { /* restore file */ if (RestoreFile(Context.hDeletedFile)) @@ -1090,12 +1068,12 @@ static HRESULT WINAPI RecycleBin_IContextMenu2Item_InvokeCommand( return E_NOTIMPL; } } - else if (lpcmi->lpVerb == MAKEINTRESOURCE(3)) + else if (lpcmi->lpVerb == MAKEINTRESOURCEA(3)) { FIXME("implement cut\n"); return E_NOTIMPL; } - else if (lpcmi->lpVerb == MAKEINTRESOURCE(7)) + else if (lpcmi->lpVerb == MAKEINTRESOURCEA(7)) { FIXME("implement properties\n"); return E_NOTIMPL; @@ -1206,18 +1184,18 @@ InitializeBitBucketDlg(HWND hwndDlg, WCHAR DefaultDrive) lc.iSubItem = 0; lc.fmt = LVCFMT_FIXED_WIDTH; lc.cx = columnSize; - lc.cchTextMax = lstrlenW(szVolume); + lc.cchTextMax = wcslen(szVolume); lc.pszText = szVolume; - (void)ListView_InsertColumnW(hDlgCtrl, 0, &lc); + (void)SendMessageW(hDlgCtrl, LVM_INSERTCOLUMNW, 0, (LPARAM)&lc); if (!LoadStringW(shell32_hInstance, IDS_RECYCLEBIN_DISKSPACE, szVolume, sizeof(szVolume) / sizeof(WCHAR))) szVolume[0] = 0; lc.iSubItem = 1; lc.cx = rect.right - rect.left - columnSize; - lc.cchTextMax = lstrlenW(szVolume); + lc.cchTextMax = wcslen(szVolume); lc.pszText = szVolume; - (void)ListView_InsertColumnW(hDlgCtrl, 1, &lc); + (void)SendMessageW(hDlgCtrl, LVM_INSERTCOLUMNW, 1, (LPARAM)&lc); dwDrives = GetLogicalDrives(); itemCount = 0; @@ -1234,13 +1212,13 @@ InitializeBitBucketDlg(HWND hwndDlg, WCHAR DefaultDrive) dwSerial = -1; } - sprintfW(szVolume, L"%s (%c)", szName, szDrive[0]); + swprintf(szVolume, L"%s (%c)", szName, szDrive[0]); memset(&li, 0x0, sizeof(LVITEMW)); li.mask = LVIF_TEXT | LVIF_PARAM; li.iSubItem = 0; li.pszText = szVolume; li.iItem = itemCount; - (void)ListView_InsertItemW(hDlgCtrl, &li); + (void)SendMessageW(hDlgCtrl, LVM_INSERTCOLUMN, 0, (LPARAM)&li); if (GetDiskFreeSpaceExW(szDrive, &FreeBytesAvailable , &TotalNumberOfBytes, &TotalNumberOfFreeBytes)) { if (StrFormatByteSizeW(TotalNumberOfFreeBytes.QuadPart, szVolume, sizeof(szVolume) / sizeof(WCHAR))) @@ -1249,7 +1227,7 @@ InitializeBitBucketDlg(HWND hwndDlg, WCHAR DefaultDrive) pItem = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DRIVE_ITEM_CONTEXT)); if (pItem) { - sprintfW(szName, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Bitbucket\\Volume\\%04X-%04X", LOWORD(dwSerial), HIWORD(dwSerial)); + swprintf(szName, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Bitbucket\\Volume\\%04X-%04X", LOWORD(dwSerial), HIWORD(dwSerial)); dwSize = sizeof(DWORD); RegGetValueW(HKEY_CURRENT_USER, szName, L"MaxCapacity", RRF_RT_DWORD, NULL, &pItem->dwMaxCapacity, &dwSize); dwSize = sizeof(DWORD); @@ -1257,7 +1235,7 @@ InitializeBitBucketDlg(HWND hwndDlg, WCHAR DefaultDrive) pItem->dwSerial = dwSerial; li.mask = LVIF_PARAM; li.lParam = (LPARAM)pItem; - (void)ListView_SetItemW(hDlgCtrl, &li); + (void)SendMessageW(hDlgCtrl, LVM_SETITEMW, 0, (LPARAM)&li); if (CurDrive == DefaultDrive) { defIndex = itemCount; @@ -1271,7 +1249,7 @@ InitializeBitBucketDlg(HWND hwndDlg, WCHAR DefaultDrive) li.iSubItem = 1; li.pszText = szVolume; li.iItem = itemCount; - (void)ListView_SetItemW(hDlgCtrl, &li); + (void)SendMessageW(hDlgCtrl, LVM_SETITEMW, 0, (LPARAM)&li); } } itemCount++; @@ -1294,7 +1272,7 @@ InitializeBitBucketDlg(HWND hwndDlg, WCHAR DefaultDrive) li.stateMask = (UINT)-1; li.state = LVIS_FOCUSED|LVIS_SELECTED; li.iItem = defIndex; - (void)ListView_SetItemW(hDlgCtrl, &li); + (void)SendMessageW(hDlgCtrl, LVM_SETITEMW, 0, (LPARAM)&li); } @@ -1320,10 +1298,10 @@ static BOOL StoreDriveSettings(HWND hwndDlg) for(iIndex = 0; iIndex < iCount; iIndex++) { li.iItem = iIndex; - if (ListView_GetItemW(hDlgCtrl, &li)) + if (SendMessageW(hDlgCtrl, LVM_GETITEMW, 0, (LPARAM)&li)) { pItem = (PDRIVE_ITEM_CONTEXT)li.lParam; - sprintfW(szSerial, L"%04X-%04X", LOWORD(pItem->dwSerial), HIWORD(pItem->dwSerial)); + swprintf(szSerial, L"%04X-%04X", LOWORD(pItem->dwSerial), HIWORD(pItem->dwSerial)); if (RegCreateKeyExW(hKey, szSerial, 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS) { dwSize = sizeof(DWORD); @@ -1353,7 +1331,7 @@ static VOID FreeDriveItemContext(HWND hwndDlg) for(iIndex = 0; iIndex < iCount; iIndex++) { li.iItem = iIndex; - if (ListView_GetItemW(hDlgCtrl, &li)) + if (SendMessageW(hDlgCtrl, LVM_GETITEMW, 0, (LPARAM)&li)) { HeapFree(GetProcessHeap(), 0, (LPVOID)li.lParam); } @@ -1380,7 +1358,7 @@ GetDefaultItem(HWND hwndDlg, LVITEMW * li) for (iIndex = 0; iIndex < iItemCount; iIndex++) { li->iItem = iIndex; - if (ListView_GetItemW(hDlgCtrl, li)) + if (SendMessageW(hDlgCtrl, LVM_GETITEMW, 0, (LPARAM)li)) { if (li->state & LVIS_SELECTED) return iIndex; @@ -1462,7 +1440,7 @@ BitBucketDlg( ZeroMemory(&li, sizeof(li)); li.mask = LVIF_PARAM; li.iItem = lppl->iItem; - if (!ListView_GetItemW(lppl->hdr.hwndFrom, &li)) + if (!SendMessageW(lppl->hdr.hwndFrom, LVM_GETITEMW, 0, (LPARAM)&li)) return TRUE; pItem = (PDRIVE_ITEM_CONTEXT)li.lParam; @@ -1559,7 +1537,7 @@ TRASH_CanTrashFile(LPCWSTR wszPath) return FALSE; } - sprintfW(szBuffer, L"%04X-%04X", LOWORD(VolSerialNumber), HIWORD(VolSerialNumber)); + swprintf(szBuffer, L"%04X-%04X", LOWORD(VolSerialNumber), HIWORD(VolSerialNumber)); wcscat(szKey, szBuffer); if (RegCreateKeyExW(HKEY_CURRENT_USER, szKey, 0, NULL, 0, KEY_WRITE, NULL, &hKey, &dwDisposition) != ERROR_SUCCESS) diff --git a/reactos/dll/win32/shell32/shlexec.c b/reactos/dll/win32/shell32/shlexec.c index 6af52b8cece..63044eb76a3 100644 --- a/reactos/dll/win32/shell32/shlexec.c +++ b/reactos/dll/win32/shell32/shlexec.c @@ -19,34 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include -#ifdef HAVE_UNISTD_H -# include -#endif -#include -#include - -#define COBJMACROS - -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "winreg.h" -#include "winuser.h" -#include "shlwapi.h" -#include "ddeml.h" - -#include "wine/winbase16.h" -#include "shell32_main.h" -#include "pidl.h" - -#include "wine/debug.h" +#include WINE_DEFAULT_DEBUG_CHANNEL(exec); @@ -160,11 +133,11 @@ static BOOL SHELL_ArgifyW(WCHAR* out, int len, const WCHAR* fmt, const WCHAR* lp else cmd = lpFile; - used += strlenW(cmd); + used += wcslen(cmd); if (used < len) { - strcpyW(res, cmd); - res += strlenW(cmd); + wcscpy(res, cmd); + res += wcslen(cmd); } } found_p1 = TRUE; @@ -178,11 +151,11 @@ static BOOL SHELL_ArgifyW(WCHAR* out, int len, const WCHAR* fmt, const WCHAR* lp case 'l': case 'L': if (lpFile) { - used += strlenW(lpFile); + used += wcslen(lpFile); if (used < len) { - strcpyW(res, lpFile); - res += strlenW(lpFile); + wcscpy(res, lpFile); + res += wcslen(lpFile); } } found_p1 = TRUE; @@ -198,13 +171,13 @@ static BOOL SHELL_ArgifyW(WCHAR* out, int len, const WCHAR* fmt, const WCHAR* lp LPVOID pv; HGLOBAL hmem = SHAllocShared(pidl, ILGetSize(pidl), 0); pv = SHLockShared(hmem, 0); - chars = sprintfW(buf, wszILPtr, pv); + chars = swprintf(buf, wszILPtr, pv); if (chars >= sizeof(buf)/sizeof(WCHAR)) ERR("pidl format buffer too small!\n"); used += chars; if (used < len) { - strcpyW(res,buf); + wcscpy(res,buf); res += chars; } SHUnlockShared(pv); @@ -218,7 +191,7 @@ static BOOL SHELL_ArgifyW(WCHAR* out, int len, const WCHAR* fmt, const WCHAR* lp */ /* Make sure that we have at least one more %.*/ - if (strchrW(fmt, '%')) + if (wcschr(fmt, '%')) { WCHAR tmpBuffer[1024]; PWSTR tmpB = tmpBuffer; @@ -234,20 +207,20 @@ static BOOL SHELL_ArgifyW(WCHAR* out, int len, const WCHAR* fmt, const WCHAR* lp envRet = GetEnvironmentVariableW(tmpBuffer, tmpEnvBuff, MAX_PATH); if (envRet == 0 || envRet > MAX_PATH) { - used += strlenW(tmpBuffer); + used += wcslen(tmpBuffer); if (used < len) { - strcpyW( res, tmpBuffer ); - res += strlenW(tmpBuffer); + wcscpy( res, tmpBuffer ); + res += wcslen(tmpBuffer); } } else { - used += strlenW(tmpEnvBuff); + used += wcslen(tmpEnvBuff); if (used < len) { - strcpyW( res, tmpEnvBuff ); - res += strlenW(tmpEnvBuff); + wcscpy( res, tmpEnvBuff ); + res += wcslen(tmpEnvBuff); } } } @@ -379,15 +352,15 @@ static void *SHELL_BuildEnvW( const WCHAR *path ) static const WCHAR wPath[] = {'P','A','T','H','=',0}; WCHAR *strings, *new_env; WCHAR *p, *p2; - int total = strlenW(path) + 1; + int total = wcslen(path) + 1; BOOL got_path = FALSE; if (!(strings = GetEnvironmentStringsW())) return NULL; p = strings; while (*p) { - int len = strlenW(p) + 1; - if (!strncmpiW( p, wPath, 5 )) got_path = TRUE; + int len = wcslen(p) + 1; + if (!wcsnicmp( p, wPath, 5 )) got_path = TRUE; total += len; p += len; } @@ -403,22 +376,22 @@ static void *SHELL_BuildEnvW( const WCHAR *path ) p2 = new_env; while (*p) { - int len = strlenW(p) + 1; + int len = wcslen(p) + 1; memcpy( p2, p, len * sizeof(WCHAR) ); - if (!strncmpiW( p, wPath, 5 )) + if (!wcsnicmp( p, wPath, 5 )) { p2[len - 1] = ';'; - strcpyW( p2 + len, path ); - p2 += strlenW(path) + 1; + wcscpy( p2 + len, path ); + p2 += wcslen(path) + 1; } p += len; p2 += len; } if (!got_path) { - strcpyW( p2, wPath ); - strcatW( p2, path ); - p2 += strlenW(p2) + 1; + wcscpy( p2, wPath ); + wcscat( p2, path ); + p2 += wcslen(p2) + 1; } *p2 = 0; FreeEnvironmentStringsW( strings ); @@ -446,8 +419,8 @@ static BOOL SHELL_TryAppPathW( LPCWSTR szName, LPWSTR lpResult, WCHAR **env) BOOL found = FALSE; if (env) *env = NULL; - strcpyW(buffer, wszKeyAppPaths); - strcatW(buffer, szName); + wcscpy(buffer, wszKeyAppPaths); + wcscat(buffer, szName); res = RegOpenKeyExW(HKEY_LOCAL_MACHINE, buffer, 0, KEY_READ, &hkApp); if (res) goto end; @@ -481,15 +454,15 @@ static UINT SHELL_FindExecutableByOperation(LPCWSTR lpOperation, LPWSTR key, LPW RegCloseKey(hkeyClass); /* Looking for ...buffer\shell\\command */ - strcatW(filetype, wszShell); - strcatW(filetype, verb); - strcatW(filetype, wCommand); + wcscat(filetype, wszShell); + wcscat(filetype, verb); + wcscat(filetype, wCommand); if (RegQueryValueW(HKEY_CLASSES_ROOT, filetype, command, &commandlen) == ERROR_SUCCESS) { commandlen /= sizeof(WCHAR); - if (key) strcpyW(key, filetype); + if (key) wcscpy(key, filetype); #if 0 LPWSTR tmp; WCHAR param[256]; @@ -505,13 +478,13 @@ static UINT SHELL_FindExecutableByOperation(LPCWSTR lpOperation, LPWSTR key, LPW from the associated ddeexec key */ tmp = strstrW(filetype, wCommand); tmp[0] = '\0'; - strcatW(filetype, wDdeexec); + wcscat(filetype, wDdeexec); if (RegQueryValueW(HKEY_CLASSES_ROOT, filetype, param, ¶mlen) == ERROR_SUCCESS) { paramlen /= sizeof(WCHAR); - strcatW(command, wSpace); - strcatW(command, param); + wcscat(command, wSpace); + wcscat(command, param); commandlen += paramlen; } #endif @@ -587,13 +560,13 @@ UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpOperation, attribs = GetFileAttributesW(lpFile); if (attribs!=INVALID_FILE_ATTRIBUTES && (attribs&FILE_ATTRIBUTE_DIRECTORY)) { - strcpyW(filetype, wszFolder); + wcscpy(filetype, wszFolder); filetypelen = 6; /* strlen("Folder") */ } else { /* First thing we need is the file's extension */ - extension = strrchrW(xlpFile, '.'); /* Assume last "." is the one; */ + extension = wcschr(xlpFile, '.'); /* Assume last "." is the one; */ /* File->Run in progman uses */ /* .\FILE.EXE :( */ TRACE("xlpFile=%s,extension=%s\n", debugstr_w(xlpFile), debugstr_w(extension)); @@ -629,9 +602,9 @@ UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpOperation, while (*p == ' ' || *p == '\t') p++; } - if (strcmpiW(tok, &extension[1]) == 0) /* have to skip the leading "." */ + if (wcsicmp(tok, &extension[1]) == 0) /* have to skip the leading "." */ { - strcpyW(lpResult, xlpFile); + wcscpy(lpResult, xlpFile); /* Need to perhaps check that the file has a path * attached */ TRACE("found %s\n", debugstr_w(lpResult)); @@ -703,18 +676,18 @@ UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpOperation, extension++; if (GetProfileStringW(wExtensions, extension, wszEmpty, command, sizeof(command)/sizeof(WCHAR)) > 0) { - if (strlenW(command) != 0) + if (wcslen(command) != 0) { - strcpyW(lpResult, command); - tok = strchrW(lpResult, '^'); /* should be ^.extension? */ + wcscpy(lpResult, command); + tok = wcschr(lpResult, '^'); /* should be ^.extension? */ if (tok != NULL) { tok[0] = '\0'; - strcatW(lpResult, xlpFile); /* what if no dir in xlpFile? */ - tok = strchrW(command, '^'); /* see above */ - if ((tok != NULL) && (strlenW(tok)>5)) + wcscat(lpResult, xlpFile); /* what if no dir in xlpFile? */ + tok = wcschr(command, '^'); /* see above */ + if ((tok != NULL) && (wcslen(tok)>5)) { - strcatW(lpResult, &tok[5]); + wcscat(lpResult, &tok[5]); } } retval = 33; /* FIXME - see above */ @@ -757,7 +730,7 @@ static unsigned dde_connect(WCHAR* key, const WCHAR* start, WCHAR* ddeexec, static const WCHAR wApplication[] = {'\\','a','p','p','l','i','c','a','t','i','o','n',0}; static const WCHAR wTopic[] = {'\\','t','o','p','i','c',0}; WCHAR regkey[256]; - WCHAR * endkey = regkey + strlenW(key); + WCHAR * endkey = regkey + wcslen(key); WCHAR app[256], topic[256], ifexec[256], res[256]; LONG applen, topiclen, ifexeclen; WCHAR * exec; @@ -770,8 +743,8 @@ static unsigned dde_connect(WCHAR* key, const WCHAR* start, WCHAR* ddeexec, unsigned ret = SE_ERR_NOASSOC; BOOL unicode = !(GetVersion() & 0x80000000); - strcpyW(regkey, key); - strcpyW(endkey, wApplication); + wcscpy(regkey, key); + wcscpy(endkey, wApplication); applen = sizeof(app); if (RegQueryValueW(HKEY_CLASSES_ROOT, regkey, app, &applen) != ERROR_SUCCESS) { @@ -784,15 +757,15 @@ static unsigned dde_connect(WCHAR* key, const WCHAR* start, WCHAR* ddeexec, /* Get application command from start string and find filename of application */ if (*start == '"') { - strcpyW(command, start+1); - if ((ptr = strchrW(command, '"'))) + wcscpy(command, start+1); + if ((ptr = wcschr(command, '"'))) *ptr = 0; ret = SearchPathW(NULL, command, wszExe, sizeof(fullpath)/sizeof(WCHAR), fullpath, &ptr); } else { LPWSTR p,space; - for (p=(LPWSTR)start; (space=strchrW(p, ' ')); p=space+1) + for (p=(LPWSTR)start; (space=wcschr(p, ' ')); p=space+1) { int idx = space-start; memcpy(command, start, idx*sizeof(WCHAR)); @@ -809,25 +782,25 @@ static unsigned dde_connect(WCHAR* key, const WCHAR* start, WCHAR* ddeexec, ERR("Unable to find application path for command %s\n", debugstr_w(start)); return ERROR_ACCESS_DENIED; } - strcpyW(app, ptr); + wcscpy(app, ptr); /* Remove extensions (including .so) */ - ptr = app + strlenW(app) - (sizeSo-1); - if (strlenW(app) >= sizeSo && - !strcmpW(ptr, wSo)) + ptr = app + wcslen(app) - (sizeSo-1); + if (wcslen(app) >= sizeSo && + !wcscmp(ptr, wSo)) *ptr = 0; - ptr = strrchrW(app, '.'); + ptr = wcschr(app, '.'); assert(ptr); *ptr = 0; } - strcpyW(endkey, wTopic); + wcscpy(endkey, wTopic); topiclen = sizeof(topic); if (RegQueryValueW(HKEY_CLASSES_ROOT, regkey, topic, &topiclen) != ERROR_SUCCESS) { static const WCHAR wSystem[] = {'S','y','s','t','e','m',0}; - strcpyW(topic, wSystem); + wcscpy(topic, wSystem); } if (unicode) @@ -864,7 +837,7 @@ static unsigned dde_connect(WCHAR* key, const WCHAR* start, WCHAR* ddeexec, SetLastError(ERROR_DDE_FAIL); return 30; /* whatever */ } - strcpyW(endkey, wIfexec); + wcscpy(endkey, wIfexec); ifexeclen = sizeof(ifexec); if (RegQueryValueW(HKEY_CLASSES_ROOT, regkey, ifexec, &ifexeclen) == ERROR_SUCCESS) { @@ -881,7 +854,7 @@ static unsigned dde_connect(WCHAR* key, const WCHAR* start, WCHAR* ddeexec, * error DMLERR_NOTPROCESSED on XTYP_EXECUTE request. */ if (unicode) - hDdeData = DdeClientTransaction((LPBYTE)res, (strlenW(res) + 1) * sizeof(WCHAR), hConv, 0L, 0, + hDdeData = DdeClientTransaction((LPBYTE)res, (wcslen(res) + 1) * sizeof(WCHAR), hConv, 0L, 0, XTYP_EXECUTE, 30000, &tid); else { @@ -943,14 +916,14 @@ static UINT_PTR execute_from_key(LPWSTR key, LPCWSTR lpFile, WCHAR *env, LPCWSTR /* Get the parameters needed by the application from the associated ddeexec key */ - tmp = strstrW(key, wCommand); + tmp = wcsstr(key, wCommand); assert(tmp); - strcpyW(tmp, wDdeexec); + wcscpy(tmp, wDdeexec); if (RegQueryValueW(HKEY_CLASSES_ROOT, key, ddeexec, &ddeexeclen) == ERROR_SUCCESS) { TRACE("Got ddeexec %s => %s\n", debugstr_w(key), debugstr_w(ddeexec)); - if (!param[0]) strcpyW(param, executable_name); + if (!param[0]) wcscpy(param, executable_name); retval = dde_connect(key, param, ddeexec, lpFile, env, szCommandline, psei->lpIDList, execfunc, psei, psei_out); } else if (param[0]) @@ -1304,7 +1277,7 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc ) static const WCHAR wExplorer[] = {'e','x','p','l','o','r','e','r','.','e','x','e',0}; //static const WCHAR wProperties[] = { 'p','r','o','p','e','r','t','i','e','s',0 }; static const DWORD unsupportedFlags = - SEE_MASK_INVOKEIDLIST | SEE_MASK_ICON | SEE_MASK_HOTKEY | + SEE_MASK_INVOKEIDLIST | SEE_MASK_HOTKEY | SEE_MASK_CONNECTNETDRV | SEE_MASK_FLAG_DDEWAIT | SEE_MASK_FLAG_NO_UI | SEE_MASK_UNICODE | SEE_MASK_ASYNCOK | SEE_MASK_HMONITOR; @@ -1342,7 +1315,7 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc ) } else if (*sei_tmp.lpFile == '\"') { - DWORD l = strlenW(sei_tmp.lpFile+1); + DWORD l = wcslen(sei_tmp.lpFile+1); if(l >= dwApplicationNameLen) dwApplicationNameLen = l+1; wszApplicationName = HeapAlloc(GetProcessHeap(), 0, dwApplicationNameLen*sizeof(WCHAR)); memcpy(wszApplicationName, sei_tmp.lpFile+1, (l+1)*sizeof(WCHAR)); @@ -1351,19 +1324,19 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc ) appKnownSingular = TRUE; TRACE("wszApplicationName=%s\n",debugstr_w(wszApplicationName)); } else { - DWORD l = strlenW(sei_tmp.lpFile)+1; + DWORD l = wcslen(sei_tmp.lpFile)+1; if(l > dwApplicationNameLen) dwApplicationNameLen = l+1; wszApplicationName = HeapAlloc(GetProcessHeap(), 0, dwApplicationNameLen*sizeof(WCHAR)); memcpy(wszApplicationName, sei_tmp.lpFile, l*sizeof(WCHAR)); } if (sei_tmp.lpParameters) - strcpyW(wszParameters, sei_tmp.lpParameters); + wcscpy(wszParameters, sei_tmp.lpParameters); else *wszParameters = '\0'; if (sei_tmp.lpDirectory) - strcpyW(wszDir, sei_tmp.lpDirectory); + wcscpy(wszDir, sei_tmp.lpDirectory); else *wszDir = '\0'; @@ -1386,9 +1359,9 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc ) if (SUCCEEDED(hr)) { - hr = IShellExecuteHookW_Execute(pSEH, &sei_tmp); + hr = pSEH->lpVtbl->Execute(pSEH, &sei_tmp); - IShellExecuteHookW_Release(pSEH); + pSEH->lpVtbl->Release(pSEH); if (hr == S_OK) { HeapFree(GetProcessHeap(), 0, wszApplicationName); @@ -1434,8 +1407,8 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc ) done = SHELL_ArgifyW(wcmd, sizeof(wcmd)/sizeof(WCHAR), wszParameters, wszApplicationName, sei_tmp.lpIDList, NULL, &resultLen); if (!done && wszApplicationName[0]) { - strcatW(wcmd, wSpace); - strcatW(wcmd, wszApplicationName); + wcscat(wcmd, wSpace); + wcscat(wcmd, wszApplicationName); } if (resultLen > sizeof(wcmd)/sizeof(WCHAR)) ERR("Argify buffer not large enough... truncating\n"); @@ -1452,8 +1425,8 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc ) if (SUCCEEDED(SHELL_GetPathFromIDListForExecuteW(sei_tmp.lpIDList, buffer, sizeof(buffer)))) { if (buffer[0]==':' && buffer[1]==':') { /* open shell folder for the specified class GUID */ - strcpyW(wszParameters, buffer); - strcpyW(wszApplicationName, wExplorer); + wcscpy(wszParameters, buffer); + wcscpy(wszApplicationName, wExplorer); appKnownSingular = TRUE; sei_tmp.fMask &= ~SEE_MASK_INVOKEIDLIST; @@ -1463,7 +1436,7 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc ) DWORD resultLen; /* Check if we're executing a directory and if so use the handler for the Folder class */ - strcpyW(target, buffer); + wcscpy(target, buffer); attribs = GetFileAttributesW(buffer); if (attribs != INVALID_FILE_ATTRIBUTES && (attribs & FILE_ATTRIBUTE_DIRECTORY) && @@ -1555,7 +1528,7 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc ) end = src; /* copy the parameter string to 'wszParameters' */ - strcpyW(wszParameters, src); + wcscpy(wszParameters, src); /* terminate previous command string after the quote character */ *end = '\0'; @@ -1568,7 +1541,7 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc ) LPWSTR space, s; LPWSTR beg = wszApplicationName/*sei_tmp.lpFile*/; - for(s=beg; (space=strchrW(s, ' ')); s=space+1) { + for(s=beg; (space=wcschr(s, ' ')); s=space+1) { int idx = space-sei_tmp.lpFile; memcpy(buffer, sei_tmp.lpFile, idx * sizeof(WCHAR)); buffer[idx] = '\0'; @@ -1579,27 +1552,27 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc ) /* separate out command from parameter string */ LPCWSTR p = space + 1; - while(isspaceW(*p)) + while(iswspace(*p)) ++p; - strcpyW(wszParameters, p); + wcscpy(wszParameters, p); *space = '\0'; break; } } - strcpyW(wfileName, sei_tmp.lpFile); + wcscpy(wfileName, sei_tmp.lpFile); } } else - strcpyW(wfileName, sei_tmp.lpFile); + wcscpy(wfileName, sei_tmp.lpFile); lpFile = wfileName; - strcpyW(wcmd, wszApplicationName); + wcscpy(wcmd, wszApplicationName); if (sei_tmp.lpParameters[0]) { - strcatW(wcmd, wSpace); - strcatW(wcmd, wszParameters); + wcscat(wcmd, wSpace); + wcscat(wcmd, wszParameters); } retval = execfunc(wcmd, NULL, FALSE, &sei_tmp, sei); @@ -1617,12 +1590,12 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc ) /* Must quote to handle case where cmd contains spaces, * else security hole if malicious user creates executable file "C:\\Program" */ - strcpyW(wszQuotedCmd, wQuote); - strcatW(wszQuotedCmd, wcmd); - strcatW(wszQuotedCmd, wQuote); + wcscpy(wszQuotedCmd, wQuote); + wcscat(wszQuotedCmd, wcmd); + wcscat(wszQuotedCmd, wQuote); if (wszParameters[0]) { - strcatW(wszQuotedCmd, wSpace); - strcatW(wszQuotedCmd, wszParameters); + wcscat(wszQuotedCmd, wSpace); + wcscat(wszQuotedCmd, wszParameters); } TRACE("%s/%s => %s/%s\n", debugstr_w(wszApplicationName), debugstr_w(sei_tmp.lpVerb), debugstr_w(wszQuotedCmd), debugstr_w(lpstrProtocol)); if (*lpstrProtocol) @@ -1638,23 +1611,23 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc ) LPWSTR lpstrRes; INT iSize; - lpstrRes = strchrW(lpFile, ':'); + lpstrRes = wcschr(lpFile, ':'); if (lpstrRes) iSize = lpstrRes - lpFile; else - iSize = strlenW(lpFile); + iSize = wcslen(lpFile); TRACE("Got URL: %s\n", debugstr_w(lpFile)); /* Looking for ...protocol\shell\lpOperation\command */ memcpy(lpstrProtocol, lpFile, iSize*sizeof(WCHAR)); lpstrProtocol[iSize] = '\0'; - strcatW(lpstrProtocol, wShell); - strcatW(lpstrProtocol, sei_tmp.lpVerb? sei_tmp.lpVerb: wszOpen); - strcatW(lpstrProtocol, wCommand); + wcscat(lpstrProtocol, wShell); + wcscat(lpstrProtocol, sei_tmp.lpVerb? sei_tmp.lpVerb: wszOpen); + wcscat(lpstrProtocol, wCommand); /* Remove File Protocol from lpFile */ /* In the case file://path/file */ - if (!strncmpiW(lpFile, wFile, iSize)) + if (!wcsnicmp(lpFile, wFile, iSize)) { lpFile += iSize; while (*lpFile == ':') lpFile++; @@ -1662,12 +1635,12 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc ) retval = execute_from_key(lpstrProtocol, lpFile, NULL, sei_tmp.lpParameters, wcmd, execfunc, &sei_tmp, sei); } /* Check if file specified is in the form www.??????.*** */ - else if (!strncmpiW(lpFile, wWww, 3)) + else if (!wcsnicmp(lpFile, wWww, 3)) { /* if so, append lpFile http:// and call ShellExecute */ WCHAR lpstrTmpFile[256]; - strcpyW(lpstrTmpFile, wHttp); - strcatW(lpstrTmpFile, lpFile); + wcscpy(lpstrTmpFile, wHttp); + wcscat(lpstrTmpFile, lpFile); retval = (UINT_PTR)ShellExecuteW(sei_tmp.hwnd, sei_tmp.lpVerb, lpstrTmpFile, NULL, NULL, 0); } diff --git a/reactos/dll/win32/shell32/shlfileop.c b/reactos/dll/win32/shell32/shlfileop.c index 6eccbb18f58..11741a81e4c 100644 --- a/reactos/dll/win32/shell32/shlfileop.c +++ b/reactos/dll/win32/shell32/shlfileop.c @@ -21,28 +21,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" +//#define NO_SHLWAPI_STREAM +#include -#include -#include -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "shellapi.h" -#include "wingdi.h" -#include "winuser.h" -#include "shlobj.h" -#include "shresdef.h" -#define NO_SHLWAPI_STREAM -#include "shlwapi.h" -#include "shell32_main.h" -#include "undocshell.h" -#include "wine/debug.h" -#include "xdg.h" WINE_DEFAULT_DEBUG_CHANNEL(shell); @@ -660,11 +641,9 @@ static DWORD SHNotifyCopyFileW(LPCWSTR src, LPCWSTR dest, BOOL bFailIfExists) * Win9x exports ANSI * WinNT/2000 exports Unicode */ -DWORD WINAPI SHCreateDirectory(HWND hWnd, LPCVOID path) +DWORD WINAPI SHCreateDirectory(HWND hWnd, LPCWSTR path) { - if (SHELL_OsIsUnicode()) - return SHCreateDirectoryExW(hWnd, path, NULL); - return SHCreateDirectoryExA(hWnd, path, NULL); + return SHCreateDirectoryExW(hWnd, path, NULL); } /************************************************************************* @@ -699,7 +678,7 @@ DWORD WINAPI SHCreateDirectory(HWND hWnd, LPCVOID path) * If hWnd is set to NULL, no user interface is displayed and the function * returns ERROR_CANCELLED. */ -int WINAPI SHCreateDirectoryExA(HWND hWnd, LPCSTR path, LPSECURITY_ATTRIBUTES sec) +int WINAPI SHCreateDirectoryExA(HWND hWnd, LPCSTR path, const SECURITY_ATTRIBUTES *sec) { LPWSTR wPath; DWORD retCode; @@ -720,7 +699,7 @@ int WINAPI SHCreateDirectoryExA(HWND hWnd, LPCSTR path, LPSECURITY_ATTRIBUTES se * * See SHCreateDirectoryExA. */ -int WINAPI SHCreateDirectoryExW(HWND hWnd, LPCWSTR path, LPSECURITY_ATTRIBUTES sec) +int WINAPI SHCreateDirectoryExW(HWND hWnd, LPCWSTR path, const SECURITY_ATTRIBUTES *sec) { int ret = ERROR_BAD_PATHNAME; TRACE("(%p, %s, %p)\n", hWnd, debugstr_w(path), sec); @@ -731,7 +710,7 @@ int WINAPI SHCreateDirectoryExW(HWND hWnd, LPCWSTR path, LPSECURITY_ATTRIBUTES s } else { - ret = SHNotifyCreateDirectoryW(path, sec); + ret = SHNotifyCreateDirectoryW(path, (LPSECURITY_ATTRIBUTES)sec); /* Refuse to work on certain error codes before trying to create directories recursively */ if (ret != ERROR_SUCCESS && ret != ERROR_FILE_EXISTS && @@ -751,7 +730,7 @@ int WINAPI SHCreateDirectoryExW(HWND hWnd, LPCWSTR path, LPSECURITY_ATTRIBUTES s { *pSlash = 0; /* terminate path at separator */ - ret = SHNotifyCreateDirectoryW(szTemp, pSlash + 1 == pEnd ? sec : NULL); + ret = SHNotifyCreateDirectoryW(szTemp, pSlash + 1 == pEnd ? (LPSECURITY_ATTRIBUTES)sec : NULL); } *pSlash++ = '\\'; /* put the separator back */ } @@ -919,7 +898,7 @@ typedef struct } FILE_LIST; -static inline void grow_list(FILE_LIST *list) +static void __inline grow_list(FILE_LIST *list) { FILE_ENTRY *new = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, list->feFiles, list->num_alloc * 2 * sizeof(*new) ); @@ -931,11 +910,11 @@ static inline void grow_list(FILE_LIST *list) */ static void add_file_to_entry(FILE_ENTRY *feFile, LPWSTR szFile) { - DWORD dwLen = lstrlenW(szFile) + 1; + DWORD dwLen = wcslen(szFile) + 1; LPWSTR ptr; feFile->szFullPath = HeapAlloc(GetProcessHeap(), 0, dwLen * sizeof(WCHAR)); - lstrcpyW(feFile->szFullPath, szFile); + wcscpy(feFile->szFullPath, szFile); ptr = StrRChrW(szFile, NULL, '\\'); if (ptr) @@ -944,9 +923,9 @@ static void add_file_to_entry(FILE_ENTRY *feFile, LPWSTR szFile) feFile->szDirectory = HeapAlloc(GetProcessHeap(), 0, dwLen * sizeof(WCHAR)); lstrcpynW(feFile->szDirectory, szFile, dwLen); - dwLen = lstrlenW(feFile->szFullPath) - dwLen + 1; + dwLen = wcslen(feFile->szFullPath) - dwLen + 1; feFile->szFilename = HeapAlloc(GetProcessHeap(), 0, dwLen * sizeof(WCHAR)); - lstrcpyW(feFile->szFilename, ptr + 1); /* skip over backslash */ + wcscpy(feFile->szFilename, ptr + 1); /* skip over backslash */ } feFile->bFromWildcard = FALSE; } @@ -959,11 +938,11 @@ static LPWSTR wildcard_to_file(LPWSTR szWildCard, LPWSTR szFileName) ptr = StrRChrW(szWildCard, NULL, '\\'); dwDirLen = ptr - szWildCard + 1; - dwFullLen = dwDirLen + lstrlenW(szFileName) + 1; + dwFullLen = dwDirLen + wcslen(szFileName) + 1; szFullPath = HeapAlloc(GetProcessHeap(), 0, dwFullLen * sizeof(WCHAR)); lstrcpynW(szFullPath, szWildCard, dwDirLen + 1); - lstrcatW(szFullPath, szFileName); + wcscat(szFullPath, szFileName); return szFullPath; } @@ -1030,7 +1009,7 @@ static HRESULT parse_file_list(FILE_LIST *flList, LPCWSTR szFiles) } else { - lstrcpyW(szCurFile, ptr); + wcscpy(szCurFile, ptr); flList->feFiles[i].bFromRelative = FALSE; } @@ -1052,7 +1031,7 @@ static HRESULT parse_file_list(FILE_LIST *flList, LPCWSTR szFiles) } /* advance to the next string */ - ptr += lstrlenW(ptr) + 1; + ptr += wcslen(ptr) + 1; i++; } flList->dwNumFiles = i; @@ -1091,7 +1070,7 @@ static void copy_dir_to_dir(FILE_OPERATION *op, const FILE_ENTRY *feFrom, LPWSTR if (PathFileExistsW(szDestPath)) PathCombineW(szTo, szDestPath, feFrom->szFilename); else - lstrcpyW(szTo, szDestPath); + wcscpy(szTo, szDestPath); if (!(op->req->fFlags & FOF_NOCONFIRMATION) && PathFileExistsW(szTo)) { if (!SHELL_ConfirmDialogW(op->req->hwnd, ASK_OVERWRITE_FOLDER, feFrom->szFilename, op)) @@ -1103,11 +1082,11 @@ static void copy_dir_to_dir(FILE_OPERATION *op, const FILE_ENTRY *feFrom, LPWSTR } } - szTo[lstrlenW(szTo) + 1] = '\0'; + szTo[wcslen(szTo) + 1] = '\0'; SHNotifyCreateDirectoryW(szTo, NULL); PathCombineW(szFrom, feFrom->szFullPath, wildCardFiles); - szFrom[lstrlenW(szFrom) + 1] = '\0'; + szFrom[wcslen(szFrom) + 1] = '\0'; memcpy(&fileOp, op->req, sizeof(fileOp)); fileOp.pFrom = szFrom; @@ -1274,7 +1253,7 @@ static BOOL confirm_delete_list(HWND hWnd, DWORD fFlags, BOOL fTrash, const FILE WCHAR tmp[8]; const WCHAR format[] = {'%','d',0}; - wnsprintfW(tmp, sizeof(tmp)/sizeof(tmp[0]), format, flFrom->dwNumFiles); + _snwprintf(tmp, sizeof(tmp)/sizeof(tmp[0]), format, flFrom->dwNumFiles); return SHELL_ConfirmDialogW(hWnd, (fTrash?ASK_TRASH_MULTIPLE_ITEM:ASK_DELETE_MULTIPLE_ITEM), tmp, NULL); } else @@ -1365,10 +1344,10 @@ static void move_dir_to_dir(LPSHFILEOPSTRUCTW lpFileOp, const FILE_ENTRY *feFrom SHNotifyCreateDirectoryW(szDestPath, NULL); PathCombineW(szFrom, feFrom->szFullPath, wildCardFiles); - szFrom[lstrlenW(szFrom) + 1] = '\0'; + szFrom[wcslen(szFrom) + 1] = '\0'; - lstrcpyW(szTo, szDestPath); - szTo[lstrlenW(szDestPath) + 1] = '\0'; + wcscpy(szTo, szDestPath); + szTo[wcslen(szDestPath) + 1] = '\0'; memcpy(&fileOp, lpFileOp, sizeof(fileOp)); fileOp.pFrom = szFrom; @@ -1674,7 +1653,7 @@ DWORD WINAPI SheChangeDirW(LPWSTR path) /************************************************************************* * IsNetDrive [SHELL32.66] */ -BOOL WINAPI IsNetDrive(DWORD drive) +INT WINAPI IsNetDrive(INT drive) { char root[4]; strcpy(root, "A:\\"); diff --git a/reactos/dll/win32/shell32/shlfolder.c b/reactos/dll/win32/shell32/shlfolder.c index 44d5150d38f..6653c34fe7f 100644 --- a/reactos/dll/win32/shell32/shlfolder.c +++ b/reactos/dll/win32/shell32/shlfolder.c @@ -21,32 +21,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include - -#define COBJMACROS - -#include "winerror.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wingdi.h" -#include "winuser.h" - -#include "ole2.h" -#include "shlguid.h" - -#include "pidl.h" -#include "undocshell.h" -#include "shell32_main.h" -#include "shlwapi.h" -#include "wine/debug.h" -#include "shfldr.h" +#include WINE_DEFAULT_DEBUG_CHANNEL (shell); @@ -70,7 +45,7 @@ static const WCHAR wszDotShellClassInfo[] = { * TRUE if returned non-NULL value. * FALSE otherwise. */ -static inline BOOL SHELL32_GetCustomFolderAttributeFromPath( +static BOOL __inline SHELL32_GetCustomFolderAttributeFromPath( LPWSTR pwszFolderPath, LPCWSTR pwszHeading, LPCWSTR pwszAttribute, LPWSTR pwszValue, DWORD cchValue) { @@ -224,7 +199,7 @@ static HRESULT SHELL32_CoCreateInitSF (LPCITEMIDLIST pidlRoot, LPCWSTR pathRoot, } if (pidlChild) { - int len = lstrlenW(ppfti.szTargetParsingName); + int len = wcslen(ppfti.szTargetParsingName); if (!_ILSimpleGetTextW(pidlChild, ppfti.szTargetParsingName + len, MAX_PATH - len)) hr = E_INVALIDARG; diff --git a/reactos/dll/win32/shell32/shlfsbind.c b/reactos/dll/win32/shell32/shlfsbind.c index 50f5c92eda2..a9bf8f0af6c 100644 --- a/reactos/dll/win32/shell32/shlfsbind.c +++ b/reactos/dll/win32/shell32/shlfsbind.c @@ -19,20 +19,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * */ -#include "config.h" -#include "wine/port.h" -#include - -#define COBJMACROS - -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "shlobj.h" -#include "shell32_main.h" - -#include "wine/debug.h" +#include WINE_DEFAULT_DEBUG_CHANNEL(pidl); diff --git a/reactos/dll/win32/shell32/shlmenu.c b/reactos/dll/win32/shell32/shlmenu.c index 87b2ac7ea12..868085b5ea3 100644 --- a/reactos/dll/win32/shell32/shlmenu.c +++ b/reactos/dll/win32/shell32/shlmenu.c @@ -18,23 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#include - -#define COBJMACROS - -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wingdi.h" -#include "winuser.h" -#include "shlobj.h" -#include "undocshell.h" -#include "shlwapi.h" -#include "shell32_main.h" - -#include "pidl.h" -#include "wine/debug.h" +#include #ifdef FM_SEPARATOR #undef FM_SEPARATOR @@ -330,9 +314,9 @@ static BOOL FileMenu_AppendItemW( if (lpText != FM_SEPARATOR) { - int len = strlenW (lpText); + int len = wcslen (lpText); myItem = (LPFMITEM) SHAlloc( sizeof(FMITEM) + len*sizeof(WCHAR)); - strcpyW (myItem->szItemText, lpText); + wcscpy (myItem->szItemText, lpText); myItem->cchItemText = len; myItem->iIconIndex = icon; myItem->hMenu = hMenu; @@ -825,7 +809,7 @@ void WINAPI FileMenu_AbortInitMenu (void) * LPXXXXX pointer to struct containing a func addr at offset 8 * or NULL at failure. */ -LPVOID WINAPI SHFind_InitMenuPopup (HMENU hMenu, HWND hWndParent, DWORD w, DWORD x) +IContextMenu * WINAPI SHFind_InitMenuPopup (HMENU hMenu, HWND hWndParent, UINT w, UINT x) { FIXME("hmenu=%p hwnd=%p 0x%08x 0x%08x stub\n", hMenu,hWndParent,w,x); @@ -859,7 +843,8 @@ static BOOL _SHIsMenuSeparator(HMENU hm, int i) * Shell_MergeMenus [SHELL32.67] */ HRESULT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags) -{ int nItem; +{ + INT nItem; HMENU hmSubMenu; BOOL bAlreadySeparated; MENUITEMINFOW miiSrc; diff --git a/reactos/dll/win32/shell32/shlview.c b/reactos/dll/win32/shell32/shlview.c index 1a2b6d7fa53..4a69665b178 100644 --- a/reactos/dll/win32/shell32/shlview.c +++ b/reactos/dll/win32/shell32/shlview.c @@ -36,35 +36,7 @@ * Release() ??? */ -#include "config.h" -#include "wine/port.h" - -#include -#include -#include - -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT - -#include "windef.h" -#include "winerror.h" -#include "winbase.h" -#include "winnls.h" -#include "objbase.h" -#include "servprov.h" -#include "shlguid.h" -#include "wingdi.h" -#include "winuser.h" -#include "shlobj.h" -#include "undocshell.h" -#include "shresdef.h" -#include "wine/debug.h" - -#include "docobj.h" -#include "pidl.h" -#include "shell32_main.h" -#include "shellfolder.h" +#include WINE_DEFAULT_DEBUG_CHANNEL(shell); @@ -110,7 +82,7 @@ typedef struct UINT cScrollDelay; /* Send a WM_*SCROLL msg every 250 ms during drag-scroll */ POINT ptLastMousePos; /* Mouse position at last DragOver call */ IContextMenu2 *pCM; -} IShellViewImpl; +} IShellViewImpl, *LPIShellViewImpl; static const IShellViewVtbl svvt; static const IOleCommandTargetVtbl ctvt; @@ -119,24 +91,24 @@ static const IDropSourceVtbl dsvt; static const IViewObjectVtbl vovt; -static inline IShellViewImpl *impl_from_IOleCommandTarget( IOleCommandTarget *iface ) +static LPIShellViewImpl __inline impl_from_IOleCommandTarget( IOleCommandTarget *iface ) { - return (IShellViewImpl *)((char*)iface - FIELD_OFFSET(IShellViewImpl, lpvtblOleCommandTarget)); + return (LPIShellViewImpl)((char*)iface - FIELD_OFFSET(IShellViewImpl, lpvtblOleCommandTarget)); } -static inline IShellViewImpl *impl_from_IDropTarget( IDropTarget *iface ) +static LPIShellViewImpl __inline impl_from_IDropTarget( IDropTarget *iface ) { - return (IShellViewImpl *)((char*)iface - FIELD_OFFSET(IShellViewImpl, lpvtblDropTarget)); + return (LPIShellViewImpl)((char*)iface - FIELD_OFFSET(IShellViewImpl, lpvtblDropTarget)); } -static inline IShellViewImpl *impl_from_IDropSource( IDropSource *iface ) +static LPIShellViewImpl __inline impl_from_IDropSource( IDropSource *iface ) { - return (IShellViewImpl *)((char*)iface - FIELD_OFFSET(IShellViewImpl, lpvtblDropSource)); + return (LPIShellViewImpl)((char*)iface - FIELD_OFFSET(IShellViewImpl, lpvtblDropSource)); } -static inline IShellViewImpl *impl_from_IViewObject( IViewObject *iface ) +static LPIShellViewImpl __inline impl_from_IViewObject( IViewObject *iface ) { - return (IShellViewImpl *)((char*)iface - FIELD_OFFSET(IShellViewImpl, lpvtblViewObject)); + return (LPIShellViewImpl)((char*)iface - FIELD_OFFSET(IShellViewImpl, lpvtblViewObject)); } /* ListView Header ID's */ @@ -566,7 +538,10 @@ static BOOLEAN LV_AddItem(IShellViewImpl * This, LPCITEMIDLIST pidl) lvItem.lParam = (LPARAM) ILClone(ILFindLastID(pidl)); /*set the item's data*/ lvItem.pszText = LPSTR_TEXTCALLBACKW; /*get text on a callback basis*/ lvItem.iImage = I_IMAGECALLBACK; /*get the image on a callback basis*/ - return (-1==ListView_InsertItemW(This->hWndList, &lvItem))? FALSE: TRUE; + if (SendMessageW(This->hWndList, LVM_INSERTITEMW, 0, (LPARAM)&lvItem) == -1) + return FALSE; + else + return TRUE; } /********************************************************** @@ -835,7 +810,7 @@ static UINT ShellView_GetSelections(IShellViewImpl * This) lvItem.iItem = 0; lvItem.iSubItem = 0; - while(ListView_GetItemW(This->hWndList, &lvItem) && (i < This->cidl)) + while(SendMessageW(This->hWndList, LVM_GETITEMW, 0, (LPARAM)&lvItem) && (i < This->cidl)) { if(lvItem.state & LVIS_SELECTED) { diff --git a/reactos/dll/win32/shell32/shpolicy.c b/reactos/dll/win32/shell32/shpolicy.c index 8441a7492a2..9678fb39cee 100644 --- a/reactos/dll/win32/shell32/shpolicy.c +++ b/reactos/dll/win32/shell32/shpolicy.c @@ -29,19 +29,7 @@ * Up to date as of SHELL32 v5.00 (W2K) */ -#include -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "winreg.h" - -#include "shell32_main.h" -#include "shlobj.h" - -#include "wine/debug.h" +#include WINE_DEFAULT_DEBUG_CHANNEL(shell); @@ -441,12 +429,14 @@ static POLICYDATA sh32_policy_table[] = strForceCopyACLW, SHELL_NO_POLICY }, +#if (NTDDI_VERSION < NTDDI_LONGHORN) { REST_NOLOGO3CHANNELNOTIFY, strExplorer, strNoMSAppLogo, SHELL_NO_POLICY }, +#endif { REST_NOFORGETSOFTWAREUPDATE, strExplorer, diff --git a/reactos/dll/win32/shell32/shresdef.h b/reactos/dll/win32/shell32/shresdef.h index b6215514009..66ae980124b 100644 --- a/reactos/dll/win32/shell32/shresdef.h +++ b/reactos/dll/win32/shell32/shresdef.h @@ -263,4 +263,40 @@ FIXME: Need to add them, but for now just let them use the same: searching.avi #define IDR_AVI_FILENUKE 163 #define IDR_AVI_FILEDELETE 164 +#define FCIDM_SHVIEW_ARRANGE 0x7001 +#define FCIDM_SHVIEW_DELETE 0x7011 +#define FCIDM_SHVIEW_PROPERTIES 0x7013 +#define FCIDM_SHVIEW_CUT 0x7018 +#define FCIDM_SHVIEW_COPY 0x7019 +#define FCIDM_SHVIEW_INSERT 0x701A +#define FCIDM_SHVIEW_UNDO 0x701B +#define FCIDM_SHVIEW_INSERTLINK 0x701C +#define FCIDM_SHVIEW_SELECTALL 0x7021 +#define FCIDM_SHVIEW_INVERTSELECTION 0x7022 + +#define FCIDM_SHVIEW_BIGICON 0x7029 //FIXME +#define FCIDM_SHVIEW_SMALLICON 0x702A //FIXME +#define FCIDM_SHVIEW_LISTVIEW 0x702B //FIXME +#define FCIDM_SHVIEW_REPORTVIEW 0x702C //FIXME +/* 0x7030-0x703f are used by the shellbrowser */ +#define FCIDM_SHVIEW_AUTOARRANGE 0x7031 +#define FCIDM_SHVIEW_SNAPTOGRID 0x7032 + +#define FCIDM_SHVIEW_HELP 0x7041 +#define FCIDM_SHVIEW_RENAME 0x7050 +#define FCIDM_SHVIEW_CREATELINK 0x7051 +#define FCIDM_SHVIEW_NEWLINK 0x7052 +#define FCIDM_SHVIEW_NEWFOLDER 0x7053 + +#define FCIDM_SHVIEW_REFRESH 0x7100 /* FIXME */ +#define FCIDM_SHVIEW_EXPLORE 0x7101 /* FIXME */ +#define FCIDM_SHVIEW_OPEN 0x7102 /* FIXME */ + + +#define FCIDM_TB_UPFOLDER 0xA001 +#define FCIDM_TB_NEWFOLDER 0xA002 +#define FCIDM_TB_SMALLICON 0xA003 +#define FCIDM_TB_REPORTVIEW 0xA004 +#define FCIDM_TB_DESKTOP 0xA005 /* FIXME */ + #endif diff --git a/reactos/dll/win32/shell32/shv_def_cmenu.c b/reactos/dll/win32/shell32/shv_def_cmenu.c index a75d65caa41..1acd018b71f 100644 --- a/reactos/dll/win32/shell32/shv_def_cmenu.c +++ b/reactos/dll/win32/shell32/shv_def_cmenu.c @@ -6,28 +6,7 @@ * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) */ -#include - -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT -#define YDEBUG -#include "winerror.h" -#include "wine/debug.h" - -#include "windef.h" -#include "wingdi.h" -#include "pidl.h" -#include "undocshell.h" -#include "shlobj.h" -#include "objbase.h" - -#include "shlwapi.h" -#include "shell32_main.h" -#include "shellfolder.h" -#include "debughlp.h" -#include "shresdef.h" -#include "shlguid.h" +#include WINE_DEFAULT_DEBUG_CHANNEL(dmenu); @@ -61,11 +40,11 @@ typedef struct PStaticShellEntry shead; /* first static shell extension entry */ UINT iIdSCMFirst; /* first static used id */ UINT iIdSCMLast; /* last static used id */ -}IDefaultContextMenuImpl; +}IDefaultContextMenuImpl, *LPIDefaultContextMenuImpl; -static inline IDefaultContextMenuImpl *impl_from_IContextMenu( IContextMenu2 *iface ) +static LPIDefaultContextMenuImpl __inline impl_from_IContextMenu( IContextMenu2 *iface ) { - return (IDefaultContextMenuImpl *)((char*)iface - FIELD_OFFSET(IDefaultContextMenuImpl, lpVtbl)); + return (LPIDefaultContextMenuImpl)((char*)iface - FIELD_OFFSET(IDefaultContextMenuImpl, lpVtbl)); } VOID INewItem_SetCurrentShellFolder(IShellFolder * psfParent); // HACK @@ -255,7 +234,7 @@ SH_AddStaticEntryForFileClass(IDefaultContextMenuImpl * This, WCHAR * szExt) result = RegGetValueW(HKEY_CLASSES_ROOT, szExt, NULL, RRF_RT_REG_SZ, NULL, (LPBYTE)szBuffer, &dwBuffer); if (result == ERROR_SUCCESS) { - Length = strlenW(szBuffer); + Length = wcslen(szBuffer); if (Length + (sizeof(szShell)/sizeof(WCHAR)) + 1 < sizeof(szBuffer)/sizeof(WCHAR)) { wcscpy(&szBuffer[Length], szShell); @@ -276,7 +255,7 @@ SH_AddStaticEntryForFileClass(IDefaultContextMenuImpl * This, WCHAR * szExt) result = RegGetValueW(HKEY_CLASSES_ROOT, szExt, L"PerceivedType", RRF_RT_REG_SZ, NULL, (LPBYTE)&szBuffer[(sizeof(szShellAssoc)/sizeof(WCHAR))], &dwBuffer); if (result == ERROR_SUCCESS) { - Length = strlenW(&szBuffer[(sizeof(szShellAssoc)/sizeof(WCHAR))]) + (sizeof(szShellAssoc)/sizeof(WCHAR)); + Length = wcslen(&szBuffer[(sizeof(szShellAssoc)/sizeof(WCHAR))]) + (sizeof(szShellAssoc)/sizeof(WCHAR)); wcscat(&szBuffer[(sizeof(szShellAssoc)/sizeof(WCHAR))], szShell); TRACE("szBuffer %s\n", debugstr_w(szBuffer)); @@ -572,7 +551,7 @@ BuildBackgroundContextMenu( mii.fType = MFT_STRING; mii.wID = iIdCmdFirst++; mii.dwTypeData = szBuffer; - mii.cch = strlenW( mii.dwTypeData ); + mii.cch = wcslen( mii.dwTypeData ); mii.fState = MFS_ENABLED; mii.hSubMenu = hSubMenu; InsertMenuItemW(hMenu, indexMenu++, TRUE, &mii); @@ -704,7 +683,7 @@ AddStaticContextMenusToMenu( } - mii.cch = strlenW(mii.dwTypeData); + mii.cch = wcslen(mii.dwTypeData); InsertMenuItemW(hMenu, indexMenu++, TRUE, &mii); mii.fState = fState; mii.wID++; @@ -1494,7 +1473,7 @@ DoDynamicShellExtensions( if (verb >= pCurrent->iIdCmdFirst && verb <= pCurrent->iIdCmdFirst + pCurrent->NumIds) { /* invoke the dynamic context menu */ - lpcmi->lpVerb = MAKEINTRESOURCE(verb - pCurrent->iIdCmdFirst); + lpcmi->lpVerb = MAKEINTRESOURCEA(verb - pCurrent->iIdCmdFirst); return IContextMenu_InvokeCommand(pCurrent->CMenu, lpcmi); } @@ -1704,7 +1683,7 @@ SHCreateDefaultContextMenu( * */ -INT +HRESULT WINAPI CDefFolderMenu_Create2( LPCITEMIDLIST pidlFolder, @@ -1714,7 +1693,7 @@ CDefFolderMenu_Create2( IShellFolder *psf, LPFNDFMCALLBACK lpfn, UINT nKeys, - HKEY *ahkeyClsKeys, + const HKEY *ahkeyClsKeys, IContextMenu **ppcm) { DEFCONTEXTMENU pdcm; diff --git a/reactos/dll/win32/shell32/shv_item_new.c b/reactos/dll/win32/shell32/shv_item_new.c index 24454c9fac7..ed82b0ab9fa 100644 --- a/reactos/dll/win32/shell32/shv_item_new.c +++ b/reactos/dll/win32/shell32/shv_item_new.c @@ -6,25 +6,7 @@ * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) */ -#include - -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT -#include "wine/debug.h" - -#include "windef.h" -#include "wingdi.h" -#include "pidl.h" -#include "shlobj.h" -#include "shtypes.h" -#include "shell32_main.h" -#include "shellfolder.h" -#include "undocshell.h" -#include "shlwapi.h" -#include "stdio.h" -#include "winuser.h" -#include "shresdef.h" +#include WINE_DEFAULT_DEBUG_CHANNEL(shell); @@ -54,10 +36,10 @@ typedef struct LPWSTR szPath; IShellFolder *pSFParent; PSHELLNEW_ITEM s_SnHead; -}INewMenuImpl; +}INewMenuImpl, *LPINewMenuImpl; -static const IContextMenu2Vtbl cmvt; -static const IShellExtInitVtbl sei; +//static const IContextMenu2Vtbl cmvt; +//static const IShellExtInitVtbl sei; static WCHAR szNew[MAX_PATH]; @@ -280,7 +262,7 @@ InsertShellNewItems(HMENU hMenu, UINT idFirst, UINT idMenu, INewMenuImpl * This) mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE | MIIM_DATA; mii.fType = MFT_STRING; mii.dwTypeData = szBuffer; - mii.cch = strlenW(mii.dwTypeData); + mii.cch = wcslen(mii.dwTypeData); mii.wID = idFirst++; InsertMenuItemW(hMenu, idMenu++, TRUE, &mii); @@ -289,7 +271,7 @@ InsertShellNewItems(HMENU hMenu, UINT idFirst, UINT idMenu, INewMenuImpl * This) szBuffer[0] = 0; szBuffer[MAX_PATH-1] = 0; mii.dwTypeData = szBuffer; - mii.cch = strlenW(mii.dwTypeData); + mii.cch = wcslen(mii.dwTypeData); mii.wID = idFirst++; InsertMenuItemW(hMenu, idMenu++, TRUE, &mii); @@ -317,7 +299,7 @@ InsertShellNewItems(HMENU hMenu, UINT idFirst, UINT idMenu, INewMenuImpl * This) { TRACE("szDesc %s\n", debugstr_w(pCurItem->szDesc)); mii.dwTypeData = pCurItem->szDesc; - mii.cch = strlenW(mii.dwTypeData); + mii.cch = wcslen(mii.dwTypeData); mii.wID = idFirst++; InsertMenuItemW(hMenu, idMenu++, TRUE, &mii); } @@ -396,7 +378,7 @@ DoShellNewCmd(INewMenuImpl * This, LPCMINVOKECOMMANDINFO lpcmi) if (ptr) { ptr[1] = 's'; - sprintfW(szTemp, szBuffer, szPath); + swprintf(szTemp, szBuffer, szPath); ptr = szTemp; } else @@ -437,7 +419,7 @@ DoShellNewCmd(INewMenuImpl * This, LPCMINVOKECOMMANDINFO lpcmi) dwError = GetLastError(); TRACE("FileName %s szBuffer %s i %u error %x\n", debugstr_w(szBuffer), debugstr_w(szPath), i, dwError); - sprintfW(szBuffer, szFormat, szPath, i, pCurItem->szExt); + swprintf(szBuffer, szFormat, szPath, i, pCurItem->szExt); i++; }while(hFile == INVALID_HANDLE_VALUE && dwError == ERROR_FILE_EXISTS); @@ -500,7 +482,7 @@ DoMeasureItem(INewMenuImpl *This, HWND hWnd, MEASUREITEMSTRUCT * lpmis) return E_FAIL; } hDC = GetDC(hWnd); - GetTextExtentPoint32W(hDC, pCurItem->szDesc, strlenW(pCurItem->szDesc), &size); + GetTextExtentPoint32W(hDC, pCurItem->szDesc, wcslen(pCurItem->szDesc), &size); lpmis->itemWidth = size.cx + 32; lpmis->itemHeight = max(size.cy, 20); ReleaseDC (hWnd, hDC); @@ -577,12 +559,12 @@ static void DoNewFolder( } -static inline INewMenuImpl *impl_from_IShellExtInit( IShellExtInit *iface ) +static LPINewMenuImpl __inline impl_from_IShellExtInit( IShellExtInit *iface ) { return (INewMenuImpl *)((char*)iface - FIELD_OFFSET(INewMenuImpl, lpvtblShellExtInit)); } -static __inline INewMenuImpl * impl_from_IContextMenu( IContextMenu2 *iface ) +static LPINewMenuImpl __inline impl_from_IContextMenu( IContextMenu2 *iface ) { return (INewMenuImpl *)((char*)iface - FIELD_OFFSET(INewMenuImpl, lpVtblContextMenu)); } @@ -686,7 +668,7 @@ INewItem_IContextMenu_fnQueryContextMenu(IContextMenu2 *iface, mii.fType = MFT_STRING; mii.wID = idCmdFirst + id++; mii.dwTypeData = szBuffer; - mii.cch = strlenW( mii.dwTypeData ); + mii.cch = wcslen( mii.dwTypeData ); mii.fState = MFS_ENABLED; if (hSubMenu) diff --git a/reactos/dll/win32/shell32/startmenu.c b/reactos/dll/win32/shell32/startmenu.c index ce56362243b..84890f08f2c 100644 --- a/reactos/dll/win32/shell32/startmenu.c +++ b/reactos/dll/win32/shell32/startmenu.c @@ -18,45 +18,35 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define COBJMACROS - -#include "wine/debug.h" - -#include "windef.h" -#include "shlobj.h" -#include "base/shell/explorer-new/todo.h" - -#include "shell32_main.h" +#include WINE_DEFAULT_DEBUG_CHANNEL(shell); -const GUID CLSID_StartMenu = { 0x4622AD11, 0xFF23, 0x11D0, {0x8D,0x34,0x00,0xA0,0xC9,0x0F,0x27,0x19} }; - typedef struct _tagStartMenu { const IMenuPopupVtbl *vtbl; const IObjectWithSiteVtbl *objectSiteVtbl; const IInitializeObjectVtbl *initObjectVtbl; IUnknown *pUnkSite; LONG refCount; -} StartMenu; +} StartMenu, *LPStartMenu; static const IMenuPopupVtbl StartMenuVtbl; static const IObjectWithSiteVtbl StartMenu_ObjectWithSiteVtbl; static const IInitializeObjectVtbl StartMenu_InitializeObjectVtbl; -static inline StartMenu *impl_from_IMenuPopup(IMenuPopup *iface) +static LPStartMenu __inline impl_from_IMenuPopup(IMenuPopup *iface) { - return (StartMenu *)((char *)iface - FIELD_OFFSET(StartMenu, vtbl)); + return (LPStartMenu)((char *)iface - FIELD_OFFSET(StartMenu, vtbl)); } -static inline StartMenu *impl_from_IObjectWithSite(IObjectWithSite *iface) +static LPStartMenu __inline impl_from_IObjectWithSite(IObjectWithSite *iface) { - return (StartMenu *)((char *)iface - FIELD_OFFSET(StartMenu, objectSiteVtbl)); + return (LPStartMenu)((char *)iface - FIELD_OFFSET(StartMenu, objectSiteVtbl)); } -static inline StartMenu *impl_from_IInitializeObject(IInitializeObject *iface) +static LPStartMenu __inline impl_from_IInitializeObject(IInitializeObject *iface) { - return (StartMenu *)((char *)iface - FIELD_OFFSET(StartMenu, initObjectVtbl)); + return (LPStartMenu)((char *)iface - FIELD_OFFSET(StartMenu, initObjectVtbl)); } HRESULT WINAPI StartMenu_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv) diff --git a/reactos/dll/win32/shell32/undocshell.h b/reactos/dll/win32/shell32/undocshell.h index 2d2600f98a8..68d9bbe1dab 100644 --- a/reactos/dll/win32/shell32/undocshell.h +++ b/reactos/dll/win32/shell32/undocshell.h @@ -51,8 +51,7 @@ BOOL WINAPI ILGetDisplayNameEx( LPITEMIDLIST WINAPI ILGlobalClone(LPCITEMIDLIST pidl); void WINAPI ILGlobalFree(LPITEMIDLIST pidl); - -LPITEMIDLIST WINAPI SHSimpleIDListFromPathA (LPCSTR lpszPath); +LPITEMIDLIST WINAPI SHSimpleIDListFromPathA (LPCSTR lpszPath); //FIXME LPITEMIDLIST WINAPI SHSimpleIDListFromPathW (LPCWSTR lpszPath); HRESULT WINAPI SHILCreateFromPathA ( @@ -176,7 +175,7 @@ typedef struct * System Imagelist Routines */ -int WINAPI Shell_GetCachedImageIndex( +int WINAPI Shell_GetCachedImageIndexA( LPCSTR lpszFileName, int nIconIndex, UINT bSimulateDoc); @@ -415,7 +414,7 @@ VOID WINAPI PathSetDlgItemPathAW(HWND hDlg, int nIDDlgItem, LPCVOID lpszPath); /* PathProcessCommand flags */ #define PPCF_QUOTEPATH 0x01 /* implies PPCF_INCLUDEARGS */ #define PPCF_INCLUDEARGS 0x02 -#define PPCF_NODIRECTORIES 0x10 +//#define PPCF_NODIRECTORIES 0x10 move to shlobj #define PPCF_DONTRESOLVE 0x20 #define PPCF_PATHISRELATIVE 0x40 @@ -545,9 +544,6 @@ DWORD WINAPI CheckEscapesW(LPWSTR string, DWORD len); /* policy functions */ BOOL WINAPI SHInitRestricted(LPCVOID unused, LPCVOID inpRegKey); -DEFINE_GUID(CLSID_OpenWith, 0x09799AFB, 0xAD67, 0x11d1, 0xAB,0xCD,0x00,0xC0,0x4F,0xC3,0x09,0x36); -DEFINE_GUID(CLSID_StartMenu, 0x4622AD11, 0xFF23, 0x11D0, 0x8D,0x34,0x00,0xA0,0xC9,0x0F,0x27,0x19); - /* Shell Desktop functions */ #undef INTERFACE @@ -579,6 +575,8 @@ DECLARE_INTERFACE_(IShellDesktop,IUnknown) HANDLE WINAPI SHCreateDesktop(IShellDesktop*); BOOL WINAPI SHDesktopMessageLoop(HANDLE); +#define CSIDL_FOLDER_MASK 0x00ff + #ifdef __cplusplus } /* extern "C" */ #endif /* defined(__cplusplus) */ From 33a2cd56f641c567515351726b5cab764094a6a8 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Tue, 26 Aug 2008 16:01:13 +0000 Subject: [PATCH 187/324] - Readd undocumented constants as commdlg needs them svn path=/trunk/; revision=35675 --- reactos/include/psdk/shlobj.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/reactos/include/psdk/shlobj.h b/reactos/include/psdk/shlobj.h index 55f1c3c0756..003f7f5e7b9 100644 --- a/reactos/include/psdk/shlobj.h +++ b/reactos/include/psdk/shlobj.h @@ -151,9 +151,44 @@ typedef struct #define SV_CLASS_NAME ("SHELLDLL_DefView") #define FCIDM_SHVIEWFIRST 0x0000 +/* undocumented */ +#define FCIDM_SHVIEW_ARRANGE 0x7001 +#define FCIDM_SHVIEW_DELETE 0x7011 +#define FCIDM_SHVIEW_PROPERTIES 0x7013 +#define FCIDM_SHVIEW_CUT 0x7018 +#define FCIDM_SHVIEW_COPY 0x7019 +#define FCIDM_SHVIEW_INSERT 0x701A +#define FCIDM_SHVIEW_UNDO 0x701B +#define FCIDM_SHVIEW_INSERTLINK 0x701C +#define FCIDM_SHVIEW_SELECTALL 0x7021 +#define FCIDM_SHVIEW_INVERTSELECTION 0x7022 + +#define FCIDM_SHVIEW_BIGICON 0x7029 +#define FCIDM_SHVIEW_SMALLICON 0x702A +#define FCIDM_SHVIEW_LISTVIEW 0x702B +#define FCIDM_SHVIEW_REPORTVIEW 0x702C +/* 0x7030-0x703f are used by the shellbrowser */ +#define FCIDM_SHVIEW_AUTOARRANGE 0x7031 +#define FCIDM_SHVIEW_SNAPTOGRID 0x7032 + +#define FCIDM_SHVIEW_HELP 0x7041 +#define FCIDM_SHVIEW_RENAME 0x7050 +#define FCIDM_SHVIEW_CREATELINK 0x7051 +#define FCIDM_SHVIEW_NEWLINK 0x7052 +#define FCIDM_SHVIEW_NEWFOLDER 0x7053 + +#define FCIDM_SHVIEW_REFRESH 0x7100 /* FIXME */ +#define FCIDM_SHVIEW_EXPLORE 0x7101 /* FIXME */ +#define FCIDM_SHVIEW_OPEN 0x7102 /* FIXME */ + #define FCIDM_SHVIEWLAST 0x7fff #define FCIDM_BROWSERFIRST 0xA000 /* undocumented toolbar items from stddlg's*/ +#define FCIDM_TB_UPFOLDER 0xA001 +#define FCIDM_TB_NEWFOLDER 0xA002 +#define FCIDM_TB_SMALLICON 0xA003 +#define FCIDM_TB_REPORTVIEW 0xA004 +#define FCIDM_TB_DESKTOP 0xA005 /* FIXME */ #define FCIDM_BROWSERLAST 0xbf00 #define FCIDM_GLOBALFIRST 0x8000 From e42ce04145997023cde0a7e0fe3833accc7dd9c0 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Tue, 26 Aug 2008 16:27:40 +0000 Subject: [PATCH 188/324] - Fix executing item which was broken in last revision svn path=/trunk/; revision=35676 --- reactos/dll/win32/shell32/she_ocmenu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/dll/win32/shell32/she_ocmenu.c b/reactos/dll/win32/shell32/she_ocmenu.c index 7e53c7f38f8..972a85597db 100644 --- a/reactos/dll/win32/shell32/she_ocmenu.c +++ b/reactos/dll/win32/shell32/she_ocmenu.c @@ -692,7 +692,7 @@ static BOOL CALLBACK OpenWithProgrammDlg(HWND hwndDlg, UINT uMsg, WPARAM wParam, } if (poainfo->oaifInFlags & OAIF_EXEC) - ExecuteOpenItem(pItemContext, szBuffer); + ExecuteOpenItem(pItemContext, poainfo->pcszFile); } FreeListItems(hwndDlg); EndDialog(hwndDlg, 1); From eae188745b05192276ce9ce8cb5234eb26b75f2e Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Tue, 26 Aug 2008 17:21:02 +0000 Subject: [PATCH 189/324] - Move fdiv pentium bug function stubs to another file. - Exclude platform-independent CI math function stubs when compiling x86 target. Should finally fix bug 1255. See issue #1255 for more details. svn path=/trunk/; revision=35677 --- reactos/lib/sdk/crt/crt.rbuild | 3 +- reactos/lib/sdk/crt/math/fdivbug.c | 89 ++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 reactos/lib/sdk/crt/math/fdivbug.c diff --git a/reactos/lib/sdk/crt/crt.rbuild b/reactos/lib/sdk/crt/crt.rbuild index 56c2e9491ef..771ca4b4d0c 100644 --- a/reactos/lib/sdk/crt/crt.rbuild +++ b/reactos/lib/sdk/crt/crt.rbuild @@ -86,6 +86,7 @@ cabs.c cosh.c div.c + fdivbug.c frexp.c huge_val.c hypot.c @@ -97,7 +98,6 @@ rand.c s_modf.c sinh.c - stubs.c tanh.c pow_asm.c @@ -114,6 +114,7 @@ + stubs.c diff --git a/reactos/lib/sdk/crt/math/fdivbug.c b/reactos/lib/sdk/crt/math/fdivbug.c new file mode 100644 index 00000000000..d790eefc9a4 --- /dev/null +++ b/reactos/lib/sdk/crt/math/fdivbug.c @@ -0,0 +1,89 @@ +#include +#include + +/* The following functions are likely workarounds for the pentium fdiv bug */ +void __stdcall _adj_fdiv_m32( unsigned int arg ) +{ + FIXME("_adj_fdiv_m32 stub\n"); +} +void __stdcall _adj_fdiv_m32i( int arg ) +{ + FIXME("_adj_fdiv_m32i stub\n"); +} + +void __stdcall _adj_fdiv_m64( unsigned __int64 arg ) +{ + FIXME("_adj_fdiv_m64 stub\n"); +} + +void _adj_fdiv_r(void) +{ + FIXME("_adj_fdiv_r stub\n"); +} + +void __stdcall _adj_fdivr_m32( unsigned int arg ) +{ + FIXME("_adj_fdivr_m32i stub\n"); +} + +void __stdcall _adj_fdivr_m32i( int arg ) +{ + FIXME("_adj_fdivr_m32i stub\n"); +} + +void __stdcall _adj_fdivr_m64( unsigned __int64 arg ) +{ + FIXME("_adj_fdivr_m64 stub\n"); +} + +void _adj_fpatan(void) +{ + FIXME("_adj_fpatan stub\n"); +} + +void __stdcall _adj_fdiv_m16i( short arg ) +{ + FIXME("_adj_fdiv_m16i stub\n"); +} + +void __stdcall _adj_fdivr_m16i( short arg ) +{ + FIXME("_adj_fdivr_m16i stub\n"); +} + +void _adj_fprem(void) +{ + FIXME("_adj_fprem stub\n"); +} + +void _adj_fprem1(void) +{ + FIXME("_adj_fprem1 stub\n"); +} + +void _adj_fptan(void) +{ + FIXME("_adj_fptan stub\n"); +} + +void _safe_fdiv(void) +{ + FIXME("_safe_fdiv stub\n"); +} + +void _safe_fdivr(void) +{ + FIXME("_safe_fdivr stub\n"); +} + +void _safe_fprem(void) +{ + FIXME("_safe_fprem stub\n"); +} + +void _safe_fprem1(void) +{ + FIXME("_safe_fprem1 stub\n"); +} + + From 75122e22281d4d455ca4ad2c84e8b8364c4cd304 Mon Sep 17 00:00:00 2001 From: Jeffrey Morlan Date: Tue, 26 Aug 2008 19:07:23 +0000 Subject: [PATCH 190/324] cmd_type: Fix misuse of ConOutPrintf which caused problems when the file had any '%' characters in it. svn path=/trunk/; revision=35679 --- reactos/base/shell/cmd/type.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/base/shell/cmd/type.c b/reactos/base/shell/cmd/type.c index d94ca710b97..dd38a044206 100644 --- a/reactos/base/shell/cmd/type.c +++ b/reactos/base/shell/cmd/type.c @@ -106,7 +106,7 @@ INT cmd_type (LPTSTR param) { if(bRet) { - if (ConOutPrintfPaging(bFirstTime, buff) == 1) + if (ConOutPrintfPaging(bFirstTime, _T("%s"), buff) == 1) { bCtrlBreak = FALSE; return 0; @@ -116,7 +116,7 @@ INT cmd_type (LPTSTR param) else { if(bRet) - ConOutPrintf(buff); + ConOutPrintf(_T("%s"), buff); } bFirstTime = FALSE; From 317fe611cbd8675a167168b40e4a255a5f98a970 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Tue, 26 Aug 2008 19:48:08 +0000 Subject: [PATCH 191/324] Copied remotely svn path=/trunk/; revision=35680 --- reactos/dll/win32/shell32/shfldr_cpanel.c | 1373 +++++++++++++++++++++ 1 file changed, 1373 insertions(+) create mode 100644 reactos/dll/win32/shell32/shfldr_cpanel.c diff --git a/reactos/dll/win32/shell32/shfldr_cpanel.c b/reactos/dll/win32/shell32/shfldr_cpanel.c new file mode 100644 index 00000000000..d96ba91746b --- /dev/null +++ b/reactos/dll/win32/shell32/shfldr_cpanel.c @@ -0,0 +1,1373 @@ +/* + * Control panel folder + * + * Copyright 2003 Martin Fuchs + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + + +#include + + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +/*********************************************************************** +* control panel implementation in shell namespace +*/ + +typedef struct { + const IShellFolder2Vtbl *lpVtbl; + LONG ref; + const IPersistFolder2Vtbl *lpVtblPersistFolder2; + const IShellExecuteHookWVtbl *lpVtblShellExecuteHookW; + const IShellExecuteHookAVtbl *lpVtblShellExecuteHookA; + const IContextMenu2Vtbl *lpVtblContextMenu; + IUnknown *pUnkOuter; /* used for aggregation */ + + /* both paths are parsible from the desktop */ + LPITEMIDLIST pidlRoot; /* absolute pidl */ + int dwAttributes; /* attributes returned by GetAttributesOf FIXME: use it */ + LPCITEMIDLIST *apidl; + UINT cidl; +} ICPanelImpl, *LPICPanelImpl; + +static const IShellFolder2Vtbl vt_ShellFolder2; +static const IPersistFolder2Vtbl vt_PersistFolder2; +static const IShellExecuteHookWVtbl vt_ShellExecuteHookW; +static const IShellExecuteHookAVtbl vt_ShellExecuteHookA; +static const IContextMenu2Vtbl vt_ContextMenu; + +static LPICPanelImpl __inline impl_from_IPersistFolder2( IPersistFolder2 *iface ) +{ + return (LPICPanelImpl)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblPersistFolder2)); +} + +static LPICPanelImpl __inline impl_from_IContextMenu( IContextMenu2 *iface ) +{ + return (LPICPanelImpl)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblContextMenu)); +} + + +static LPICPanelImpl __inline impl_from_IShellExecuteHookW( IShellExecuteHookW *iface ) +{ + return (LPICPanelImpl)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblShellExecuteHookW)); +} + +static LPICPanelImpl __inline impl_from_IShellExecuteHookA( IShellExecuteHookA *iface ) +{ + return (LPICPanelImpl)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblShellExecuteHookA)); +} + + +/* + converts This to an interface pointer +*/ +#define _IUnknown_(This) (IUnknown*)&(This->lpVtbl) +#define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl) +#define _IShellFolder2_(This) (IShellFolder2*)&(This->lpVtbl) + +#define _IPersist_(This) (IPersist*)&(This->lpVtblPersistFolder2) +#define _IPersistFolder_(This) (IPersistFolder*)&(This->lpVtblPersistFolder2) +#define _IPersistFolder2_(This) (IPersistFolder2*)&(This->lpVtblPersistFolder2) +#define _IShellExecuteHookW_(This) (IShellExecuteHookW*)&(This->lpVtblShellExecuteHookW) +#define _IShellExecuteHookA_(This) (IShellExecuteHookA*)&(This->lpVtblShellExecuteHookA) + + +/*********************************************************************** +* IShellFolder [ControlPanel] implementation +*/ + +static const shvheader ControlPanelSFHeader[] = { + {IDS_SHV_COLUMN8, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15},/*FIXME*/ + {IDS_SHV_COLUMN9, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 200},/*FIXME*/ +}; + +#define CONROLPANELSHELLVIEWCOLUMNS 2 + +/************************************************************************** +* IControlPanel_Constructor +*/ +HRESULT WINAPI IControlPanel_Constructor(IUnknown* pUnkOuter, REFIID riid, LPVOID * ppv) +{ + ICPanelImpl *sf; + + TRACE("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid(riid)); + + if (!ppv) + return E_POINTER; + if (pUnkOuter && !IsEqualIID (riid, &IID_IUnknown)) + return CLASS_E_NOAGGREGATION; + + sf = (ICPanelImpl *) LocalAlloc(LMEM_ZEROINIT, sizeof(ICPanelImpl)); + if (!sf) + return E_OUTOFMEMORY; + + sf->ref = 0; + sf->apidl = NULL; + sf->cidl = 0; + sf->lpVtbl = &vt_ShellFolder2; + sf->lpVtblPersistFolder2 = &vt_PersistFolder2; + sf->lpVtblShellExecuteHookW = &vt_ShellExecuteHookW; + sf->lpVtblShellExecuteHookA = &vt_ShellExecuteHookA; + sf->lpVtblContextMenu = &vt_ContextMenu; + sf->pidlRoot = _ILCreateControlPanel(); /* my qualified pidl */ + sf->pUnkOuter = pUnkOuter ? pUnkOuter : _IUnknown_ (sf); + + if (!SUCCEEDED(IUnknown_QueryInterface(_IUnknown_(sf), riid, ppv))) { + IUnknown_Release(_IUnknown_(sf)); + return E_NOINTERFACE; + } + + TRACE("--(%p)\n", sf); + return S_OK; +} + +/************************************************************************** + * ISF_ControlPanel_fnQueryInterface + * + * NOTES supports not IPersist/IPersistFolder + */ +static HRESULT WINAPI ISF_ControlPanel_fnQueryInterface(IShellFolder2 * iface, REFIID riid, LPVOID * ppvObject) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + TRACE("(%p)->(%s,%p)\n", This, shdebugstr_guid(riid), ppvObject); + + *ppvObject = NULL; + + if (IsEqualIID(riid, &IID_IUnknown) || + IsEqualIID(riid, &IID_IShellFolder) || IsEqualIID(riid, &IID_IShellFolder2)) + *ppvObject = This; + else if (IsEqualIID(riid, &IID_IPersist) || + IsEqualIID(riid, &IID_IPersistFolder) || IsEqualIID(riid, &IID_IPersistFolder2)) + *ppvObject = _IPersistFolder2_(This); + else if (IsEqualIID(riid, &IID_IShellExecuteHookW)) + *ppvObject = _IShellExecuteHookW_(This); + else if (IsEqualIID(riid, &IID_IShellExecuteHookA)) + *ppvObject = _IShellExecuteHookA_(This); + + if (*ppvObject) { + IUnknown_AddRef((IUnknown *)(*ppvObject)); + TRACE("-- Interface:(%p)->(%p)\n", ppvObject, *ppvObject); + return S_OK; + } + TRACE("-- Interface: E_NOINTERFACE\n"); + return E_NOINTERFACE; +} + +static ULONG WINAPI ISF_ControlPanel_fnAddRef(IShellFolder2 * iface) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + ULONG refCount = InterlockedIncrement(&This->ref); + + TRACE("(%p)->(count=%u)\n", This, refCount - 1); + + return refCount; +} + +static ULONG WINAPI ISF_ControlPanel_fnRelease(IShellFolder2 * iface) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + ULONG refCount = InterlockedDecrement(&This->ref); + + TRACE("(%p)->(count=%u)\n", This, refCount + 1); + + if (!refCount) { + TRACE("-- destroying IShellFolder(%p)\n", This); + SHFree(This->pidlRoot); + LocalFree((HLOCAL) This); + } + return refCount; +} + +/************************************************************************** +* ISF_ControlPanel_fnParseDisplayName +*/ +static HRESULT WINAPI +ISF_ControlPanel_fnParseDisplayName(IShellFolder2 * iface, + HWND hwndOwner, + LPBC pbc, + LPOLESTR lpszDisplayName, + DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + HRESULT hr = E_INVALIDARG; + + FIXME("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n", + This, hwndOwner, pbc, lpszDisplayName, debugstr_w(lpszDisplayName), pchEaten, ppidl, pdwAttributes); + + *ppidl = 0; + if (pchEaten) + *pchEaten = 0; + + TRACE("(%p)->(-- ret=0x%08x)\n", This, hr); + + return hr; +} + +static LPITEMIDLIST _ILCreateCPanelApplet(LPCSTR name, LPCSTR displayName, + LPCSTR comment, int iconIdx) +{ + PIDLCPanelStruct *p; + LPITEMIDLIST pidl; + PIDLDATA tmp; + int size0 = (char*)&tmp.u.cpanel.szName-(char*)&tmp.u.cpanel; + int size = size0; + int l; + + tmp.type = PT_CPLAPPLET; + tmp.u.cpanel.dummy = 0; + tmp.u.cpanel.iconIdx = iconIdx; + + l = strlen(name); + size += l+1; + + tmp.u.cpanel.offsDispName = l+1; + l = strlen(displayName); + size += l+1; + + tmp.u.cpanel.offsComment = tmp.u.cpanel.offsDispName+1+l; + l = strlen(comment); + size += l+1; + + pidl = SHAlloc(size+4); + if (!pidl) + return NULL; + + pidl->mkid.cb = size+2; + memcpy(pidl->mkid.abID, &tmp, 2+size0); + + p = &((PIDLDATA*)pidl->mkid.abID)->u.cpanel; + strcpy(p->szName, name); + strcpy(p->szName+tmp.u.cpanel.offsDispName, displayName); + strcpy(p->szName+tmp.u.cpanel.offsComment, comment); + + *(WORD*)((char*)pidl+(size+2)) = 0; + + pcheck(pidl); + + return pidl; +} + +/************************************************************************** + * _ILGetCPanelPointer() + * gets a pointer to the control panel struct stored in the pidl + */ +static PIDLCPanelStruct* _ILGetCPanelPointer(LPCITEMIDLIST pidl) +{ + LPPIDLDATA pdata = _ILGetDataPointer(pidl); + + if (pdata && pdata->type==PT_CPLAPPLET) + return (PIDLCPanelStruct*)&(pdata->u.cpanel); + + return NULL; +} + + /************************************************************************** + * ISF_ControlPanel_fnEnumObjects + */ +static BOOL SHELL_RegisterCPanelApp(IEnumIDList* list, LPCSTR path) +{ + LPITEMIDLIST pidl; + CPlApplet* applet; + CPanel panel; + CPLINFO info; + unsigned i; + int iconIdx; + + char displayName[MAX_PATH]; + char comment[MAX_PATH]; + + WCHAR wpath[MAX_PATH]; + + MultiByteToWideChar(CP_ACP, 0, path, -1, wpath, MAX_PATH); + + panel.first = NULL; + applet = Control_LoadApplet(0, wpath, &panel); + + if (applet) + { + for(i=0; icount; ++i) + { + WideCharToMultiByte(CP_ACP, 0, applet->info[i].szName, -1, displayName, MAX_PATH, 0, 0); + WideCharToMultiByte(CP_ACP, 0, applet->info[i].szInfo, -1, comment, MAX_PATH, 0, 0); + + applet->proc(0, CPL_INQUIRE, i, (LPARAM)&info); + + if (info.idIcon > 0) + iconIdx = -info.idIcon; /* negative icon index instead of icon number */ + else + iconIdx = 0; + + pidl = _ILCreateCPanelApplet(path, displayName, comment, iconIdx); + + if (pidl) + AddToEnumList(list, pidl); + } + Control_UnloadApplet(applet); + } + return TRUE; +} + +static int SHELL_RegisterRegistryCPanelApps(IEnumIDList* list, HKEY hkey_root, LPCSTR szRepPath) +{ + char name[MAX_PATH]; + char value[MAX_PATH]; + HKEY hkey; + + int cnt = 0; + + if (RegOpenKeyA(hkey_root, szRepPath, &hkey) == ERROR_SUCCESS) + { + int idx = 0; + + for(;; ++idx) + { + DWORD nameLen = MAX_PATH; + DWORD valueLen = MAX_PATH; + + if (RegEnumValueA(hkey, idx, name, &nameLen, NULL, NULL, (LPBYTE)&value, &valueLen) != ERROR_SUCCESS) + break; + + if (SHELL_RegisterCPanelApp(list, value)) + ++cnt; + } + RegCloseKey(hkey); + } + + return cnt; +} + +static int SHELL_RegisterCPanelFolders(IEnumIDList* list, HKEY hkey_root, LPCSTR szRepPath) +{ + char name[MAX_PATH]; + HKEY hkey; + + int cnt = 0; + + if (RegOpenKeyA(hkey_root, szRepPath, &hkey) == ERROR_SUCCESS) + { + int idx = 0; + for(;; ++idx) + { + if (RegEnumKeyA(hkey, idx, name, MAX_PATH) != ERROR_SUCCESS) + break; + + if (*name == '{') + { + LPITEMIDLIST pidl = _ILCreateGuidFromStrA(name); + + if (pidl && AddToEnumList(list, pidl)) + ++cnt; + } + } + + RegCloseKey(hkey); + } + + return cnt; +} + +/************************************************************************** + * CreateCPanelEnumList() + */ +static BOOL CreateCPanelEnumList( + IEnumIDList * iface, + DWORD dwFlags) +{ + CHAR szPath[MAX_PATH]; + WIN32_FIND_DATAA wfd; + HANDLE hFile; + + TRACE("(%p)->(flags=0x%08x)\n", iface, dwFlags); + + /* enumerate control panel folders */ + if (dwFlags & SHCONTF_FOLDERS) + SHELL_RegisterCPanelFolders(iface, HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ControlPanel\\NameSpace"); + + /* enumerate the control panel applets */ + if (dwFlags & SHCONTF_NONFOLDERS) + { + LPSTR p; + + GetSystemDirectoryA(szPath, MAX_PATH); + p = PathAddBackslashA(szPath); + strcpy(p, "*.cpl"); + + TRACE("-- (%p)-> enumerate SHCONTF_NONFOLDERS of %s\n",iface,debugstr_a(szPath)); + hFile = FindFirstFileA(szPath, &wfd); + + if (hFile != INVALID_HANDLE_VALUE) + { + do + { + if (!(dwFlags & SHCONTF_INCLUDEHIDDEN) && (wfd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN)) + continue; + + if (!(wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { + strcpy(p, wfd.cFileName); + SHELL_RegisterCPanelApp((IEnumIDList*)iface, szPath); + } + } while(FindNextFileA(hFile, &wfd)); + FindClose(hFile); + } + + SHELL_RegisterRegistryCPanelApps((IEnumIDList*)iface, HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\Cpls"); + SHELL_RegisterRegistryCPanelApps((IEnumIDList*)iface, HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\Cpls"); + } + return TRUE; +} + +/************************************************************************** +* ISF_ControlPanel_fnEnumObjects +*/ +static HRESULT WINAPI +ISF_ControlPanel_fnEnumObjects(IShellFolder2 * iface, HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST * ppEnumIDList) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + TRACE("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", This, hwndOwner, dwFlags, ppEnumIDList); + + *ppEnumIDList = IEnumIDList_Constructor(); + if (*ppEnumIDList) + CreateCPanelEnumList(*ppEnumIDList, dwFlags); + + TRACE("--(%p)->(new ID List: %p)\n", This, *ppEnumIDList); + + return(*ppEnumIDList) ? S_OK : E_OUTOFMEMORY; +} + +/************************************************************************** +* ISF_ControlPanel_fnBindToObject +*/ +static HRESULT WINAPI +ISF_ControlPanel_fnBindToObject(IShellFolder2 * iface, LPCITEMIDLIST pidl, + LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + TRACE("(%p)->(pidl=%p,%p,%s,%p)\n", This, pidl, pbcReserved, shdebugstr_guid(riid), ppvOut); + + return SHELL32_BindToChild(This->pidlRoot, NULL, pidl, riid, ppvOut); +} + +/************************************************************************** +* ISF_ControlPanel_fnBindToStorage +*/ +static HRESULT WINAPI +ISF_ControlPanel_fnBindToStorage(IShellFolder2 * iface, + LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + FIXME("(%p)->(pidl=%p,%p,%s,%p) stub\n", This, pidl, pbcReserved, shdebugstr_guid(riid), ppvOut); + + *ppvOut = NULL; + return E_NOTIMPL; +} + +/************************************************************************** +* ISF_ControlPanel_fnCompareIDs +*/ + +static HRESULT WINAPI +ISF_ControlPanel_fnCompareIDs(IShellFolder2 * iface, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + int nReturn; + + TRACE("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", This, lParam, pidl1, pidl2); + nReturn = SHELL32_CompareIDs(_IShellFolder_(This), lParam, pidl1, pidl2); + TRACE("-- %i\n", nReturn); + return nReturn; +} + +/************************************************************************** +* ISF_ControlPanel_fnCreateViewObject +*/ +static HRESULT WINAPI +ISF_ControlPanel_fnCreateViewObject(IShellFolder2 * iface, HWND hwndOwner, REFIID riid, LPVOID * ppvOut) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + LPSHELLVIEW pShellView; + HRESULT hr = E_INVALIDARG; + + TRACE("(%p)->(hwnd=%p,%s,%p)\n", This, hwndOwner, shdebugstr_guid(riid), ppvOut); + + if (ppvOut) { + *ppvOut = NULL; + + if (IsEqualIID(riid, &IID_IDropTarget)) { + WARN("IDropTarget not implemented\n"); + hr = E_NOTIMPL; + } else if (IsEqualIID(riid, &IID_IContextMenu)) { + WARN("IContextMenu not implemented\n"); + hr = E_NOTIMPL; + } else if (IsEqualIID(riid, &IID_IShellView)) { + pShellView = IShellView_Constructor((IShellFolder *) iface); + if (pShellView) { + hr = IShellView_QueryInterface(pShellView, riid, ppvOut); + IShellView_Release(pShellView); + } + } + } + TRACE("--(%p)->(interface=%p)\n", This, ppvOut); + return hr; +} + +/************************************************************************** +* ISF_ControlPanel_fnGetAttributesOf +*/ +static HRESULT WINAPI +ISF_ControlPanel_fnGetAttributesOf(IShellFolder2 * iface, UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + HRESULT hr = S_OK; + + TRACE("(%p)->(cidl=%d apidl=%p mask=%p (0x%08x))\n", + This, cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0); + + if (!rgfInOut) + return E_INVALIDARG; + if (cidl && !apidl) + return E_INVALIDARG; + + if (*rgfInOut == 0) + *rgfInOut = ~0; + + while(cidl > 0 && *apidl) { + pdump(*apidl); + SHELL32_GetItemAttributes(_IShellFolder_(This), *apidl, rgfInOut); + apidl++; + cidl--; + } + /* make sure SFGAO_VALIDATE is cleared, some apps depend on that */ + *rgfInOut &= ~SFGAO_VALIDATE; + + TRACE("-- result=0x%08x\n", *rgfInOut); + return hr; +} + +/************************************************************************** +* ISF_ControlPanel_fnGetUIObjectOf +* +* PARAMETERS +* HWND hwndOwner, //[in ] Parent window for any output +* UINT cidl, //[in ] array size +* LPCITEMIDLIST* apidl, //[in ] simple pidl array +* REFIID riid, //[in ] Requested Interface +* UINT* prgfInOut, //[ ] reserved +* LPVOID* ppvObject) //[out] Resulting Interface +* +*/ +static HRESULT WINAPI +ISF_ControlPanel_fnGetUIObjectOf(IShellFolder2 * iface, + HWND hwndOwner, + UINT cidl, LPCITEMIDLIST * apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + LPITEMIDLIST pidl; + IUnknown *pObj = NULL; + HRESULT hr = E_INVALIDARG; + + TRACE("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n", + This, hwndOwner, cidl, apidl, shdebugstr_guid(riid), prgfInOut, ppvOut); + + if (ppvOut) { + *ppvOut = NULL; + + if (IsEqualIID(riid, &IID_IContextMenu) &&(cidl >= 1)) { + pObj = (IUnknown*)(&This->lpVtblContextMenu); + This->apidl = apidl; + This->cidl = cidl; + IUnknown_AddRef(pObj); + } else if (IsEqualIID(riid, &IID_IDataObject) &&(cidl >= 1)) { + pObj = (LPUNKNOWN) IDataObject_Constructor(hwndOwner, This->pidlRoot, apidl, cidl); + hr = S_OK; + } else if (IsEqualIID(riid, &IID_IExtractIconA) &&(cidl == 1)) { + pidl = ILCombine(This->pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconA_Constructor(pidl); + SHFree(pidl); + hr = S_OK; + } else if (IsEqualIID(riid, &IID_IExtractIconW) &&(cidl == 1)) { + pidl = ILCombine(This->pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconW_Constructor(pidl); + SHFree(pidl); + hr = S_OK; + } else if ((IsEqualIID(riid,&IID_IShellLinkW) || IsEqualIID(riid,&IID_IShellLinkA)) + && (cidl == 1)) { + pidl = ILCombine(This->pidlRoot, apidl[0]); + hr = IShellLink_ConstructFromFile(NULL, riid, pidl,(LPVOID*)&pObj); + SHFree(pidl); + } else { + hr = E_NOINTERFACE; + } + + if (SUCCEEDED(hr) && !pObj) + hr = E_OUTOFMEMORY; + + *ppvOut = pObj; + } + TRACE("(%p)->hr=0x%08x\n", This, hr); + return hr; +} + +/************************************************************************** +* ISF_ControlPanel_fnGetDisplayNameOf +*/ +static HRESULT WINAPI ISF_ControlPanel_fnGetDisplayNameOf(IShellFolder2 * iface, LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + CHAR szPath[MAX_PATH]; + WCHAR wszPath[MAX_PATH+1]; /* +1 for potential backslash */ + PIDLCPanelStruct* pcpanel; + + *szPath = '\0'; + + TRACE("(%p)->(pidl=%p,0x%08x,%p)\n", This, pidl, dwFlags, strRet); + pdump(pidl); + + if (!pidl || !strRet) + return E_INVALIDARG; + + pcpanel = _ILGetCPanelPointer(pidl); + + if (pcpanel) { + lstrcpyA(szPath, pcpanel->szName+pcpanel->offsDispName); + + if (!(dwFlags & SHGDN_FORPARSING)) + FIXME("retrieve display name from control panel app\n"); + } + /* take names of special folders only if it's only this folder */ + else if (_ILIsSpecialFolder(pidl)) { + BOOL bSimplePidl = _ILIsPidlSimple(pidl); + + if (bSimplePidl) { + _ILSimpleGetTextW(pidl, wszPath, MAX_PATH); /* append my own path */ + } else { + FIXME("special pidl\n"); + } + + if ((dwFlags & SHGDN_FORPARSING) && !bSimplePidl) { /* go deeper if needed */ + int len = 0; + + PathAddBackslashW(wszPath); + len = wcslen(wszPath); + + if (!SUCCEEDED + (SHELL32_GetDisplayNameOfChild(iface, pidl, dwFlags, wszPath + len, MAX_PATH + 1 - len))) + return E_OUTOFMEMORY; + if (!WideCharToMultiByte(CP_ACP, 0, wszPath, -1, szPath, MAX_PATH, NULL, NULL)) + wszPath[0] = '\0'; + } else { + if (bSimplePidl) { + if (!WideCharToMultiByte(CP_ACP, 0, wszPath, -1, szPath, MAX_PATH, NULL, NULL)) + wszPath[0] = '\0'; + } + } + } + + strRet->uType = STRRET_CSTR; + lstrcpynA(strRet->u.cStr, szPath, MAX_PATH); + + TRACE("--(%p)->(%s)\n", This, szPath); + return S_OK; +} + +/************************************************************************** +* ISF_ControlPanel_fnSetNameOf +* Changes the name of a file object or subfolder, possibly changing its item +* identifier in the process. +* +* PARAMETERS +* HWND hwndOwner, //[in ] Owner window for output +* LPCITEMIDLIST pidl, //[in ] simple pidl of item to change +* LPCOLESTR lpszName, //[in ] the items new display name +* DWORD dwFlags, //[in ] SHGNO formatting flags +* LPITEMIDLIST* ppidlOut) //[out] simple pidl returned +*/ +static HRESULT WINAPI ISF_ControlPanel_fnSetNameOf(IShellFolder2 * iface, HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */ + LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + FIXME("(%p)->(%p,pidl=%p,%s,%u,%p)\n", This, hwndOwner, pidl, debugstr_w(lpName), dwFlags, pPidlOut); + return E_FAIL; +} + +static HRESULT WINAPI ISF_ControlPanel_fnGetDefaultSearchGUID(IShellFolder2 * iface, GUID * pguid) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + FIXME("(%p)\n", This); + return E_NOTIMPL; +} +static HRESULT WINAPI ISF_ControlPanel_fnEnumSearches(IShellFolder2 * iface, IEnumExtraSearch ** ppenum) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + FIXME("(%p)\n", This); + return E_NOTIMPL; +} +static HRESULT WINAPI ISF_ControlPanel_fnGetDefaultColumn(IShellFolder2 * iface, DWORD dwRes, ULONG * pSort, ULONG * pDisplay) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + TRACE("(%p)\n", This); + + if (pSort) *pSort = 0; + if (pDisplay) *pDisplay = 0; + return S_OK; +} +static HRESULT WINAPI ISF_ControlPanel_fnGetDefaultColumnState(IShellFolder2 * iface, UINT iColumn, DWORD * pcsFlags) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + TRACE("(%p)\n", This); + + if (!pcsFlags || iColumn >= CONROLPANELSHELLVIEWCOLUMNS) return E_INVALIDARG; + *pcsFlags = ControlPanelSFHeader[iColumn].pcsFlags; + return S_OK; +} +static HRESULT WINAPI ISF_ControlPanel_fnGetDetailsEx(IShellFolder2 * iface, LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + FIXME("(%p)\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI ISF_ControlPanel_fnGetDetailsOf(IShellFolder2 * iface, LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS * psd) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + HRESULT hr; + + TRACE("(%p)->(%p %i %p)\n", This, pidl, iColumn, psd); + + if (!psd || iColumn >= CONROLPANELSHELLVIEWCOLUMNS) + return E_INVALIDARG; + + if (!pidl) { + psd->fmt = ControlPanelSFHeader[iColumn].fmt; + psd->cxChar = ControlPanelSFHeader[iColumn].cxChar; + psd->str.uType = STRRET_CSTR; + LoadStringA(shell32_hInstance, ControlPanelSFHeader[iColumn].colnameid, psd->str.u.cStr, MAX_PATH); + return S_OK; + } else { + psd->str.u.cStr[0] = 0x00; + psd->str.uType = STRRET_CSTR; + switch(iColumn) { + case 0: /* name */ + hr = IShellFolder_GetDisplayNameOf(iface, pidl, SHGDN_NORMAL | SHGDN_INFOLDER, &psd->str); + break; + case 1: /* comment */ + _ILGetFileType(pidl, psd->str.u.cStr, MAX_PATH); + break; + } + hr = S_OK; + } + + return hr; +} +static HRESULT WINAPI ISF_ControlPanel_fnMapColumnToSCID(IShellFolder2 * iface, UINT column, SHCOLUMNID * pscid) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + FIXME("(%p)\n", This); + return E_NOTIMPL; +} + +static const IShellFolder2Vtbl vt_ShellFolder2 = +{ + + ISF_ControlPanel_fnQueryInterface, + ISF_ControlPanel_fnAddRef, + ISF_ControlPanel_fnRelease, + ISF_ControlPanel_fnParseDisplayName, + ISF_ControlPanel_fnEnumObjects, + ISF_ControlPanel_fnBindToObject, + ISF_ControlPanel_fnBindToStorage, + ISF_ControlPanel_fnCompareIDs, + ISF_ControlPanel_fnCreateViewObject, + ISF_ControlPanel_fnGetAttributesOf, + ISF_ControlPanel_fnGetUIObjectOf, + ISF_ControlPanel_fnGetDisplayNameOf, + ISF_ControlPanel_fnSetNameOf, + + /* ShellFolder2 */ + ISF_ControlPanel_fnGetDefaultSearchGUID, + ISF_ControlPanel_fnEnumSearches, + ISF_ControlPanel_fnGetDefaultColumn, + ISF_ControlPanel_fnGetDefaultColumnState, + ISF_ControlPanel_fnGetDetailsEx, + ISF_ControlPanel_fnGetDetailsOf, + ISF_ControlPanel_fnMapColumnToSCID +}; + +/************************************************************************ + * ICPanel_PersistFolder2_QueryInterface + */ +static HRESULT WINAPI ICPanel_PersistFolder2_QueryInterface(IPersistFolder2 * iface, REFIID iid, LPVOID * ppvObject) +{ + ICPanelImpl *This = impl_from_IPersistFolder2(iface); + + TRACE("(%p)\n", This); + + return IUnknown_QueryInterface(_IUnknown_(This), iid, ppvObject); +} + +/************************************************************************ + * ICPanel_PersistFolder2_AddRef + */ +static ULONG WINAPI ICPanel_PersistFolder2_AddRef(IPersistFolder2 * iface) +{ + ICPanelImpl *This = impl_from_IPersistFolder2(iface); + + TRACE("(%p)->(count=%u)\n", This, This->ref); + + return IUnknown_AddRef(_IUnknown_(This)); +} + +/************************************************************************ + * ISFPersistFolder_Release + */ +static ULONG WINAPI ICPanel_PersistFolder2_Release(IPersistFolder2 * iface) +{ + ICPanelImpl *This = impl_from_IPersistFolder2(iface); + + TRACE("(%p)->(count=%u)\n", This, This->ref); + + return IUnknown_Release(_IUnknown_(This)); +} + +/************************************************************************ + * ICPanel_PersistFolder2_GetClassID + */ +static HRESULT WINAPI ICPanel_PersistFolder2_GetClassID(IPersistFolder2 * iface, CLSID * lpClassId) +{ + ICPanelImpl *This = impl_from_IPersistFolder2(iface); + + TRACE("(%p)\n", This); + + if (!lpClassId) + return E_POINTER; + *lpClassId = CLSID_ControlPanel; + + return S_OK; +} + +/************************************************************************ + * ICPanel_PersistFolder2_Initialize + * + * NOTES: it makes no sense to change the pidl + */ +static HRESULT WINAPI ICPanel_PersistFolder2_Initialize(IPersistFolder2 * iface, LPCITEMIDLIST pidl) +{ + ICPanelImpl *This = impl_from_IPersistFolder2(iface); + if (This->pidlRoot) + SHFree((LPVOID)This->pidlRoot); + + This->pidlRoot = ILClone(pidl); + return S_OK; +} + +/************************************************************************** + * IPersistFolder2_fnGetCurFolder + */ +static HRESULT WINAPI ICPanel_PersistFolder2_GetCurFolder(IPersistFolder2 * iface, LPITEMIDLIST * pidl) +{ + ICPanelImpl *This = impl_from_IPersistFolder2(iface); + + TRACE("(%p)->(%p)\n", This, pidl); + + if (!pidl) + return E_POINTER; + *pidl = ILClone(This->pidlRoot); + return S_OK; +} + +static const IPersistFolder2Vtbl vt_PersistFolder2 = +{ + + ICPanel_PersistFolder2_QueryInterface, + ICPanel_PersistFolder2_AddRef, + ICPanel_PersistFolder2_Release, + ICPanel_PersistFolder2_GetClassID, + ICPanel_PersistFolder2_Initialize, + ICPanel_PersistFolder2_GetCurFolder +}; + +HRESULT CPanel_GetIconLocationW(LPCITEMIDLIST pidl, + LPWSTR szIconFile, UINT cchMax, int* piIndex) +{ + PIDLCPanelStruct* pcpanel = _ILGetCPanelPointer(pidl); + + if (!pcpanel) + return E_INVALIDARG; + + MultiByteToWideChar(CP_ACP, 0, pcpanel->szName, -1, szIconFile, cchMax); + *piIndex = pcpanel->iconIdx!=-1? pcpanel->iconIdx: 0; + + return S_OK; +} + + +/************************************************************************** +* IShellExecuteHookW Implementation +*/ + +static HRESULT WINAPI IShellExecuteHookW_fnQueryInterface( + IShellExecuteHookW* iface, REFIID riid, void** ppvObject) +{ + ICPanelImpl *This = impl_from_IShellExecuteHookW(iface); + + TRACE("(%p)->(count=%u)\n", This, This->ref); + + return IUnknown_QueryInterface(This->pUnkOuter, riid, ppvObject); +} + +static ULONG STDMETHODCALLTYPE IShellExecuteHookW_fnAddRef(IShellExecuteHookW* iface) +{ + ICPanelImpl *This = impl_from_IShellExecuteHookW(iface); + + TRACE("(%p)->(count=%u)\n", This, This->ref); + + return IUnknown_AddRef(This->pUnkOuter); +} + +static ULONG STDMETHODCALLTYPE IShellExecuteHookW_fnRelease(IShellExecuteHookW* iface) +{ + ICPanelImpl *This = impl_from_IShellExecuteHookW(iface); + + TRACE("(%p)\n", This); + + return IUnknown_Release(This->pUnkOuter); +} + +HRESULT +ExecuteAppletFromCLSID(LPOLESTR pOleStr) +{ + WCHAR szCmd[MAX_PATH]; + WCHAR szExpCmd[MAX_PATH]; + PROCESS_INFORMATION pi; + STARTUPINFOW si; + WCHAR szBuffer[90] = { 'C', 'L', 'S', 'I', 'D', '\\', 0 }; + DWORD dwType, dwSize; + + wcscpy(&szBuffer[6], pOleStr); + wcscat(szBuffer, L"\\shell\\open\\command"); + + dwSize = sizeof(szCmd); + if (RegGetValueW(HKEY_CLASSES_ROOT, szBuffer, NULL, RRF_RT_REG_SZ, &dwType, (PVOID)szCmd, &dwSize) != ERROR_SUCCESS) + { + ERR("RegGetValueW failed with %u\n", GetLastError()); + return E_FAIL; + } + +#if 0 + if (dwType != RRF_RT_REG_SZ && dwType != RRF_RT_REG_EXPAND_SZ) + return E_FAIL; +#endif + + if (!ExpandEnvironmentStringsW(szCmd, szExpCmd, sizeof(szExpCmd)/sizeof(WCHAR))) + return E_FAIL; + + ZeroMemory(&si, sizeof(si)); + si.cb = sizeof(si); + if (!CreateProcessW(NULL, szExpCmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) + return E_FAIL; + + CloseHandle(pi.hProcess); + CloseHandle(pi.hThread); + return S_OK; +} + + +static HRESULT WINAPI IShellExecuteHookW_fnExecute(IShellExecuteHookW* iface, LPSHELLEXECUTEINFOW psei) +{ + static const WCHAR wCplopen[] = {'c','p','l','o','p','e','n','\0'}; + ICPanelImpl *This = (ICPanelImpl *)iface; + + SHELLEXECUTEINFOW sei_tmp; + PIDLCPanelStruct* pcpanel; + WCHAR path[MAX_PATH]; + WCHAR params[MAX_PATH]; + BOOL ret; + HRESULT hr; + int l; + + TRACE("(%p)->execute(%p)\n", This, psei); + + if (!psei) + return E_INVALIDARG; + + pcpanel = _ILGetCPanelPointer(ILFindLastID(psei->lpIDList)); + + if (!pcpanel) + { + LPOLESTR pOleStr; + + IID * iid = _ILGetGUIDPointer(ILFindLastID(psei->lpIDList)); + if (!iid) + return E_INVALIDARG; + if (StringFromCLSID(iid, &pOleStr) == S_OK) + { + + hr = ExecuteAppletFromCLSID(pOleStr); + CoTaskMemFree(pOleStr); + return hr; + } + + return E_INVALIDARG; + } + path[0] = '\"'; + /* Return value from MultiByteToWideChar includes terminating NUL, which + * compensates for the starting double quote we just put in */ + l = MultiByteToWideChar(CP_ACP, 0, pcpanel->szName, -1, path+1, MAX_PATH); + + /* pass applet name to Control_RunDLL to distinguish between applets in one .cpl file */ + path[l++] = '"'; + path[l] = '\0'; + + MultiByteToWideChar(CP_ACP, 0, pcpanel->szName+pcpanel->offsDispName, -1, params, MAX_PATH); + + memcpy(&sei_tmp, psei, sizeof(sei_tmp)); + sei_tmp.lpFile = path; + sei_tmp.lpParameters = params; + sei_tmp.fMask &= ~SEE_MASK_INVOKEIDLIST; + sei_tmp.lpVerb = wCplopen; + + ret = ShellExecuteExW(&sei_tmp); + if (ret) + return S_OK; + else + return S_FALSE; +} + +static const IShellExecuteHookWVtbl vt_ShellExecuteHookW = +{ + + IShellExecuteHookW_fnQueryInterface, + IShellExecuteHookW_fnAddRef, + IShellExecuteHookW_fnRelease, + + IShellExecuteHookW_fnExecute +}; + + +/************************************************************************** +* IShellExecuteHookA Implementation +*/ + +static HRESULT WINAPI IShellExecuteHookA_fnQueryInterface(IShellExecuteHookA* iface, REFIID riid, void** ppvObject) +{ + ICPanelImpl *This = impl_from_IShellExecuteHookA(iface); + + TRACE("(%p)->(count=%u)\n", This, This->ref); + + return IUnknown_QueryInterface(This->pUnkOuter, riid, ppvObject); +} + +static ULONG STDMETHODCALLTYPE IShellExecuteHookA_fnAddRef(IShellExecuteHookA* iface) +{ + ICPanelImpl *This = impl_from_IShellExecuteHookA(iface); + + TRACE("(%p)->(count=%u)\n", This, This->ref); + + return IUnknown_AddRef(This->pUnkOuter); +} + +static ULONG STDMETHODCALLTYPE IShellExecuteHookA_fnRelease(IShellExecuteHookA* iface) +{ + ICPanelImpl *This = impl_from_IShellExecuteHookA(iface); + + TRACE("(%p)\n", This); + + return IUnknown_Release(This->pUnkOuter); +} + +static HRESULT WINAPI IShellExecuteHookA_fnExecute(IShellExecuteHookA* iface, LPSHELLEXECUTEINFOA psei) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + SHELLEXECUTEINFOA sei_tmp; + PIDLCPanelStruct* pcpanel; + char path[MAX_PATH]; + BOOL ret; + + TRACE("(%p)->execute(%p)\n", This, psei); + + if (!psei) + return E_INVALIDARG; + + pcpanel = _ILGetCPanelPointer(ILFindLastID(psei->lpIDList)); + + if (!pcpanel) + return E_INVALIDARG; + + path[0] = '\"'; + lstrcpyA(path+1, pcpanel->szName); + + /* pass applet name to Control_RunDLL to distinguish between applets in one .cpl file */ + lstrcatA(path, "\" "); + lstrcatA(path, pcpanel->szName+pcpanel->offsDispName); + + memcpy(&sei_tmp, psei, sizeof(sei_tmp)); + sei_tmp.lpFile = path; + sei_tmp.fMask &= ~SEE_MASK_INVOKEIDLIST; + + ret = ShellExecuteExA(&sei_tmp); + if (ret) + return S_OK; + else + return S_FALSE; +} + +static const IShellExecuteHookAVtbl vt_ShellExecuteHookA = +{ + IShellExecuteHookA_fnQueryInterface, + IShellExecuteHookA_fnAddRef, + IShellExecuteHookA_fnRelease, + IShellExecuteHookA_fnExecute +}; + +/************************************************************************** +* IContextMenu2 Implementation +*/ + +/************************************************************************ + * ICPanel_IContextMenu_QueryInterface + */ +static HRESULT WINAPI ICPanel_IContextMenu2_QueryInterface(IContextMenu2 * iface, REFIID iid, LPVOID * ppvObject) +{ + ICPanelImpl *This = impl_from_IContextMenu(iface); + + TRACE("(%p)\n", This); + + return IUnknown_QueryInterface(_IUnknown_(This), iid, ppvObject); +} + +/************************************************************************ + * ICPanel_IContextMenu_AddRef + */ +static ULONG WINAPI ICPanel_IContextMenu2_AddRef(IContextMenu2 * iface) +{ + ICPanelImpl *This = impl_from_IContextMenu(iface); + + TRACE("(%p)->(count=%u)\n", This, This->ref); + + return IUnknown_AddRef(_IUnknown_(This)); +} + +/************************************************************************ + * ICPanel_IContextMenu_Release + */ +static ULONG WINAPI ICPanel_IContextMenu2_Release(IContextMenu2 * iface) +{ + ICPanelImpl *This = impl_from_IContextMenu(iface); + + TRACE("(%p)->(count=%u)\n", This, This->ref); + + return IUnknown_Release(_IUnknown_(This)); +} + +/************************************************************************** +* ICPanel_IContextMenu_QueryContextMenu() +*/ +static HRESULT WINAPI ICPanel_IContextMenu2_QueryContextMenu( + IContextMenu2 *iface, + HMENU hMenu, + UINT indexMenu, + UINT idCmdFirst, + UINT idCmdLast, + UINT uFlags) +{ + WCHAR szBuffer[30] = {0}; + ULONG Count = 1; + + ICPanelImpl *This = impl_from_IContextMenu(iface); + + TRACE("(%p)->(hmenu=%p indexmenu=%x cmdfirst=%x cmdlast=%x flags=%x )\n", + This, hMenu, indexMenu, idCmdFirst, idCmdLast, uFlags); + + if (LoadStringW(shell32_hInstance, IDS_OPEN, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) + { + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_DEFAULT); + Count++; + } + + if (LoadStringW(shell32_hInstance, IDS_CREATELINK, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) + { + if (Count) + { + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_SEPARATOR, NULL, MFS_ENABLED); + } + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_ENABLED); + Count++; + } + return MAKE_HRESULT(SEVERITY_SUCCESS, 0, Count); +} + + +/************************************************************************** +* ICPanel_IContextMenu_InvokeCommand() +*/ +static HRESULT WINAPI ICPanel_IContextMenu2_InvokeCommand( + IContextMenu2 *iface, + LPCMINVOKECOMMANDINFO lpcmi) +{ + SHELLEXECUTEINFOW sei; + WCHAR szPath[MAX_PATH]; + char szTarget[MAX_PATH]; + STRRET strret; + WCHAR* pszPath; + INT Length, cLength; + PIDLCPanelStruct *pcpanel; + IPersistFile * ppf; + IShellLinkA * isl; + ICPanelImpl *This = impl_from_IContextMenu(iface); + + TRACE("(%p)->(invcom=%p verb=%p wnd=%p)\n",This,lpcmi,lpcmi->lpVerb, lpcmi->hwnd); + + if (lpcmi->lpVerb == MAKEINTRESOURCEA(1)) + { + ZeroMemory(&sei, sizeof(sei)); + sei.cbSize = sizeof(sei); + sei.fMask = SEE_MASK_INVOKEIDLIST; + sei.lpIDList = ILCombine(This->pidlRoot, This->apidl[0]); + sei.hwnd = lpcmi->hwnd; + sei.nShow = SW_SHOWNORMAL; + sei.lpVerb = L"open"; + ShellExecuteExW(&sei); + if (sei.hInstApp <= (HINSTANCE)32) + return E_FAIL; + } + else if (lpcmi->lpVerb == MAKEINTRESOURCEA(2)) + { + if (!SHGetSpecialFolderPathW(NULL, szPath, CSIDL_DESKTOPDIRECTORY, FALSE)) + return E_FAIL; + + pszPath = PathAddBackslashW(szPath); + if (!pszPath) + return E_FAIL; + + if (IShellFolder_GetDisplayNameOf((IShellFolder*)This, This->apidl[0], SHGDN_FORPARSING, &strret) != S_OK) + return E_FAIL; + + Length = MAX_PATH - (pszPath - szPath); + cLength = strlen(strret.u.cStr); + if (Length < cLength + 5) + { + FIXME("\n"); + return E_FAIL; + } + + if (MultiByteToWideChar(CP_ACP, 0, strret.u.cStr, cLength +1, pszPath, Length)) + { + pszPath += cLength; + Length -= cLength; + } + + if (Length > 10) + { + wcscpy(pszPath, L" - "); + cLength = LoadStringW(shell32_hInstance, IDS_LNK_FILE, &pszPath[3], Length -4) + 3; + if (cLength + 5 > Length) + cLength = Length - 5; + Length -= cLength; + pszPath += cLength; + } + wcscpy(pszPath, L".lnk"); + + pcpanel = _ILGetCPanelPointer(ILFindLastID(This->apidl[0])); + if (pcpanel) + { + strncpy(szTarget, pcpanel->szName, MAX_PATH); + } + else + { + FIXME("\n"); + return E_FAIL; + } + if (SUCCEEDED(IShellLink_Constructor(NULL, &IID_IShellLinkA, (LPVOID*)&isl))) + { + IShellLinkA_SetPath(isl, szTarget); + if (SUCCEEDED(IShellLinkA_QueryInterface(isl, &IID_IPersistFile, (LPVOID*)&ppf))) + { + IPersistFile_Save(ppf, szPath, TRUE); + IPersistFile_Release(ppf); + } + IShellLinkA_Release(isl); + } + return NOERROR; + } + return S_OK; +} + +/************************************************************************** + * ICPanel_IContextMenu_GetCommandString() + * + */ +static HRESULT WINAPI ICPanel_IContextMenu2_GetCommandString( + IContextMenu2 *iface, + UINT_PTR idCommand, + UINT uFlags, + UINT* lpReserved, + LPSTR lpszName, + UINT uMaxNameLen) +{ + ICPanelImpl *This = impl_from_IContextMenu(iface); + + TRACE("(%p)->(idcom=%lx flags=%x %p name=%p len=%x)\n",This, idCommand, uFlags, lpReserved, lpszName, uMaxNameLen); + + + FIXME("unknown command string\n"); + return E_FAIL; +} + + + +/************************************************************************** +* ICPanel_IContextMenu_HandleMenuMsg() +*/ +static HRESULT WINAPI ICPanel_IContextMenu2_HandleMenuMsg( + IContextMenu2 *iface, + UINT uMsg, + WPARAM wParam, + LPARAM lParam) +{ + ICPanelImpl *This = impl_from_IContextMenu(iface); + + TRACE("ICPanel_IContextMenu_HandleMenuMsg (%p)->(msg=%x wp=%lx lp=%lx)\n",This, uMsg, wParam, lParam); + + return E_NOTIMPL; +} + +static const IContextMenu2Vtbl vt_ContextMenu = +{ + ICPanel_IContextMenu2_QueryInterface, + ICPanel_IContextMenu2_AddRef, + ICPanel_IContextMenu2_Release, + ICPanel_IContextMenu2_QueryContextMenu, + ICPanel_IContextMenu2_InvokeCommand, + ICPanel_IContextMenu2_GetCommandString, + ICPanel_IContextMenu2_HandleMenuMsg +}; + From 6c2116d0cf78d3ab46b75ddf117411107c449d55 Mon Sep 17 00:00:00 2001 From: Jeffrey Morlan Date: Tue, 26 Aug 2008 20:36:38 +0000 Subject: [PATCH 192/324] - Implement call :label by creating a new batch context; this way calls can be nested and have their own %0-%9 parameters. - GetBatchVar: Implement %~n. Remove %? (an old FreeDOS-ism; the Windows equivalent is %ERRORLEVEL%) svn path=/trunk/; revision=35681 --- reactos/base/shell/cmd/batch.c | 10 +++---- reactos/base/shell/cmd/batch.h | 4 +-- reactos/base/shell/cmd/call.c | 15 ++++++++--- reactos/base/shell/cmd/cmd.c | 49 +++++++++++++++++++++++----------- reactos/base/shell/cmd/goto.c | 10 +------ 5 files changed, 50 insertions(+), 38 deletions(-) diff --git a/reactos/base/shell/cmd/batch.c b/reactos/base/shell/cmd/batch.c index aae78e7f2e5..2f0c613549c 100644 --- a/reactos/base/shell/cmd/batch.c +++ b/reactos/base/shell/cmd/batch.c @@ -216,10 +216,9 @@ VOID ExitBatch (LPTSTR msg) * */ -BOOL Batch (LPTSTR fullname, LPTSTR firstword, LPTSTR param) +BOOL Batch (LPTSTR fullname, LPTSTR firstword, LPTSTR param, BOOL forcenew) { HANDLE hFile; - LPTSTR tmp; SetLastError(0); hFile = CreateFile (fullname, GENERIC_READ, FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | @@ -238,7 +237,7 @@ BOOL Batch (LPTSTR fullname, LPTSTR firstword, LPTSTR param) while (bc && bc->forvar) ExitBatch (NULL); - if (bc == NULL) + if (bc == NULL || forcenew) { /* No curent batch file, create a new context */ LPBATCH_CONTEXT n = (LPBATCH_CONTEXT)cmd_alloc (sizeof(BATCH_CONTEXT)); @@ -264,16 +263,13 @@ BOOL Batch (LPTSTR fullname, LPTSTR firstword, LPTSTR param) cmd_free (bc->raw_params); } - GetFullPathName(fullname, sizeof(bc->BatchFilePath) / sizeof(TCHAR), bc->BatchFilePath, &tmp); - *tmp = '\0'; + GetFullPathName(fullname, sizeof(bc->BatchFilePath) / sizeof(TCHAR), bc->BatchFilePath, NULL); bc->hBatchFile = hFile; SetFilePointer (bc->hBatchFile, 0, NULL, FILE_BEGIN); bc->bEcho = bEcho; /* Preserve echo across batch calls */ bc->shiftlevel = 0; bc->bCmdBlock = -1; - bc->lCallPosition = 0; - bc->lCallPositionHigh = 0; bc->ffind = NULL; bc->forvar = _T('\0'); diff --git a/reactos/base/shell/cmd/batch.h b/reactos/base/shell/cmd/batch.h index e93e3254cee..998f85cb026 100644 --- a/reactos/base/shell/cmd/batch.h +++ b/reactos/base/shell/cmd/batch.h @@ -23,8 +23,6 @@ typedef struct tagBATCHCONTEXT TCHAR forvar; INT bCmdBlock; BOOL bExecuteBlock[MAX_PATH]; - LONG lCallPosition; /* store position where to return to after Call :Label */ - LONG lCallPositionHigh; } BATCH_CONTEXT, *LPBATCH_CONTEXT; @@ -43,7 +41,7 @@ extern TCHAR textline[BATCH_BUFFSIZE]; /* Buffer for reading Batch file lines */ LPTSTR FindArg (INT); LPTSTR BatchParams (LPTSTR, LPTSTR); VOID ExitBatch (LPTSTR); -BOOL Batch (LPTSTR, LPTSTR, LPTSTR); +BOOL Batch (LPTSTR, LPTSTR, LPTSTR, BOOL); LPTSTR ReadBatchLine(); VOID AddBatchRedirection(REDIRECTION **); diff --git a/reactos/base/shell/cmd/call.c b/reactos/base/shell/cmd/call.c index 3943c9c45be..8b39e13f5b9 100644 --- a/reactos/base/shell/cmd/call.c +++ b/reactos/base/shell/cmd/call.c @@ -53,9 +53,18 @@ INT cmd_call (LPTSTR param) if (*param == _T(':') && (bc)) { - bc->lCallPosition = SetFilePointer(bc->hBatchFile, 0, &bc->lCallPositionHigh, FILE_CURRENT); - cmd_goto(param); - return 0; + TCHAR *first = param; + while (*param && !_istspace(*param)) + param++; + if (*param) + { + *param++ = _T('\0'); + while (_istspace(*param)) + param++; + } + if (!Batch(bc->BatchFilePath, first, param, TRUE)) + return 1; + return cmd_goto(first); } nErrorLevel = 0; diff --git a/reactos/base/shell/cmd/cmd.c b/reactos/base/shell/cmd/cmd.c index 0b5da1f566d..1dbd4c996ef 100644 --- a/reactos/base/shell/cmd/cmd.c +++ b/reactos/base/shell/cmd/cmd.c @@ -470,7 +470,7 @@ Execute (LPTSTR Full, LPTSTR First, LPTSTR Rest) if (dot && (!_tcsicmp (dot, _T(".bat")) || !_tcsicmp (dot, _T(".cmd")))) { TRACE ("[BATCH: %s %s]\n", debugstr_aw(szFullName), debugstr_aw(rest)); - Batch (szFullName, first, rest); + Batch (szFullName, first, rest, FALSE); } else { @@ -1024,14 +1024,16 @@ GetEnvVarOrSpecial ( LPCTSTR varName ) return NULL; } + + LPCTSTR GetBatchVar ( LPCTSTR varName, UINT* varNameLen ) { static LPTSTR ret = NULL; static UINT retlen = 0; + DWORD len; - if ( varNameLen ) - *varNameLen = 1; + *varNameLen = 1; switch ( *varName ) { @@ -1039,10 +1041,35 @@ GetBatchVar ( LPCTSTR varName, UINT* varNameLen ) varName++; if (_tcsncicmp(varName, _T("dp0"), 3) == 0) { - if ( varNameLen ) - *varNameLen = 4; - return bc->BatchFilePath; + *varNameLen = 4; + len = _tcsrchr(bc->BatchFilePath, _T('\\')) + 1 - bc->BatchFilePath; + if (!GrowIfNecessary(len + 1, &ret, &retlen)) + return NULL; + memcpy(ret, bc->BatchFilePath, len * sizeof(TCHAR)); + ret[len] = _T('\0'); + return ret; } + + *varNameLen = 2; + if (*varName >= _T('0') && *varName <= _T('9')) { + LPTSTR arg = FindArg(*varName - _T('0')); + + if (*arg != _T('"')) + return arg; + + /* Exclude the leading and trailing quotes */ + arg++; + len = _tcslen(arg); + if (arg[len - 1] == _T('"')) + len--; + + if (!GrowIfNecessary(len + 1, &ret, &retlen)) + return NULL; + memcpy(ret, arg, len * sizeof(TCHAR)); + ret[len] = _T('\0'); + return ret; + } + break; case _T('0'): case _T('1'): case _T('2'): @@ -1063,16 +1090,6 @@ GetBatchVar ( LPCTSTR varName, UINT* varNameLen ) case _T('%'): return _T("%"); - - case _T('?'): - /* TODO FIXME 10 is only max size for 32-bit */ - if ( !GrowIfNecessary ( 11, &ret, &retlen ) ) - return NULL; - _sntprintf ( ret, retlen, _T("%u"), nErrorLevel); - ret[retlen-1] = 0; - if ( varNameLen ) - *varNameLen = 1; - return ret; } return NULL; } diff --git a/reactos/base/shell/cmd/goto.c b/reactos/base/shell/cmd/goto.c index b6a7bfc70bd..21217103f1b 100644 --- a/reactos/base/shell/cmd/goto.c +++ b/reactos/base/shell/cmd/goto.c @@ -75,15 +75,7 @@ INT cmd_goto (LPTSTR param) /* jump to end of the file */ if ( _tcsicmp( param, _T(":eof"))==0) { - /* when lCallPosition != 0 we have to return to the caller */ - if (bc->lCallPosition == 0) - SetFilePointer (bc->hBatchFile, 0, &lNewPosHigh, FILE_END); - else - { - SetFilePointer (bc->hBatchFile, (LONG)bc->lCallPosition, &bc->lCallPositionHigh, FILE_BEGIN); - bc->lCallPosition = 0; - bc->lCallPositionHigh = 0; - } + SetFilePointer (bc->hBatchFile, 0, &lNewPosHigh, FILE_END); return 0; } From d7a196cf9573ea50841e8db6b6598ad65bae3386 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Tue, 26 Aug 2008 21:29:55 +0000 Subject: [PATCH 193/324] - Start implementing Network Connections Shell Folder - Rename cpanelfolder to shfldr_cpanel - Implement _ILIsNetConnect, ILCreateNetConnect svn path=/trunk/; revision=35686 --- reactos/dll/win32/shell32/classes.c | 6 +- reactos/dll/win32/shell32/cpanelfolder.c | 1373 ----------------- reactos/dll/win32/shell32/lang/bg-BG.rc | 4 + reactos/dll/win32/shell32/lang/ca-ES.rc | 4 + reactos/dll/win32/shell32/lang/cs-CZ.rc | 4 + reactos/dll/win32/shell32/lang/da-DK.rc | 4 + reactos/dll/win32/shell32/lang/de-DE.rc | 5 +- reactos/dll/win32/shell32/lang/el-GR.rc | 4 + reactos/dll/win32/shell32/lang/en-GB.rc | 4 + reactos/dll/win32/shell32/lang/en-US.rc | 4 + reactos/dll/win32/shell32/lang/es-ES.rc | 4 + reactos/dll/win32/shell32/lang/fi-FI.rc | 4 + reactos/dll/win32/shell32/lang/fr-FR.rc | 4 + reactos/dll/win32/shell32/lang/hu-HU.rc | 4 + reactos/dll/win32/shell32/lang/it-IT.rc | 4 + reactos/dll/win32/shell32/lang/ja-JP.rc | 4 + reactos/dll/win32/shell32/lang/ko-KR.rc | 4 + reactos/dll/win32/shell32/lang/nl-NL.rc | 4 + reactos/dll/win32/shell32/lang/no-NO.rc | 4 + reactos/dll/win32/shell32/lang/pl-PL.rc | 4 + reactos/dll/win32/shell32/lang/pt-BR.rc | 4 + reactos/dll/win32/shell32/lang/pt-PT.rc | 4 + reactos/dll/win32/shell32/lang/ru-RU.rc | 4 + reactos/dll/win32/shell32/lang/sk-SK.rc | 4 + reactos/dll/win32/shell32/lang/sl-SI.rc | 4 + reactos/dll/win32/shell32/lang/sv-SE.rc | 4 + reactos/dll/win32/shell32/lang/tr-TR.rc | 4 + reactos/dll/win32/shell32/lang/uk-UA.rc | 4 + reactos/dll/win32/shell32/lang/zh-CN.rc | 4 + reactos/dll/win32/shell32/lang/zh-TW.rc | 4 + reactos/dll/win32/shell32/pidl.c | 16 + reactos/dll/win32/shell32/pidl.h | 3 + reactos/dll/win32/shell32/precomp.h | 3 +- reactos/dll/win32/shell32/regsvr.c | 20 + reactos/dll/win32/shell32/shell32.rbuild | 9 +- reactos/dll/win32/shell32/shell32_main.h | 1 + reactos/dll/win32/shell32/shellole.c | 1 + reactos/dll/win32/shell32/shfldr_netconnect.c | 781 ++++++++++ reactos/dll/win32/shell32/shresdef.h | 6 + 39 files changed, 952 insertions(+), 1380 deletions(-) delete mode 100644 reactos/dll/win32/shell32/cpanelfolder.c create mode 100644 reactos/dll/win32/shell32/shfldr_netconnect.c diff --git a/reactos/dll/win32/shell32/classes.c b/reactos/dll/win32/shell32/classes.c index 0b498aba86b..ee5209f13b1 100644 --- a/reactos/dll/win32/shell32/classes.c +++ b/reactos/dll/win32/shell32/classes.c @@ -386,7 +386,11 @@ BOOL HCR_GetClassNameW(REFIID riid, LPWSTR szDest, DWORD len) if(LoadStringW(shell32_hInstance, IDS_ADMINISTRATIVETOOLS, szDest, buflen)) ret = TRUE; } - + else if (IsEqualIID(riid, &CLSID_NetworkConnections)) + { + if(LoadStringW(shell32_hInstance, IDS_NETWORKCONNECTION, szDest, buflen)) + ret = TRUE; + } } TRACE("-- %s\n", debugstr_w(szDest)); return ret; diff --git a/reactos/dll/win32/shell32/cpanelfolder.c b/reactos/dll/win32/shell32/cpanelfolder.c deleted file mode 100644 index d96ba91746b..00000000000 --- a/reactos/dll/win32/shell32/cpanelfolder.c +++ /dev/null @@ -1,1373 +0,0 @@ -/* - * Control panel folder - * - * Copyright 2003 Martin Fuchs - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - - -#include - - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -/*********************************************************************** -* control panel implementation in shell namespace -*/ - -typedef struct { - const IShellFolder2Vtbl *lpVtbl; - LONG ref; - const IPersistFolder2Vtbl *lpVtblPersistFolder2; - const IShellExecuteHookWVtbl *lpVtblShellExecuteHookW; - const IShellExecuteHookAVtbl *lpVtblShellExecuteHookA; - const IContextMenu2Vtbl *lpVtblContextMenu; - IUnknown *pUnkOuter; /* used for aggregation */ - - /* both paths are parsible from the desktop */ - LPITEMIDLIST pidlRoot; /* absolute pidl */ - int dwAttributes; /* attributes returned by GetAttributesOf FIXME: use it */ - LPCITEMIDLIST *apidl; - UINT cidl; -} ICPanelImpl, *LPICPanelImpl; - -static const IShellFolder2Vtbl vt_ShellFolder2; -static const IPersistFolder2Vtbl vt_PersistFolder2; -static const IShellExecuteHookWVtbl vt_ShellExecuteHookW; -static const IShellExecuteHookAVtbl vt_ShellExecuteHookA; -static const IContextMenu2Vtbl vt_ContextMenu; - -static LPICPanelImpl __inline impl_from_IPersistFolder2( IPersistFolder2 *iface ) -{ - return (LPICPanelImpl)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblPersistFolder2)); -} - -static LPICPanelImpl __inline impl_from_IContextMenu( IContextMenu2 *iface ) -{ - return (LPICPanelImpl)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblContextMenu)); -} - - -static LPICPanelImpl __inline impl_from_IShellExecuteHookW( IShellExecuteHookW *iface ) -{ - return (LPICPanelImpl)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblShellExecuteHookW)); -} - -static LPICPanelImpl __inline impl_from_IShellExecuteHookA( IShellExecuteHookA *iface ) -{ - return (LPICPanelImpl)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblShellExecuteHookA)); -} - - -/* - converts This to an interface pointer -*/ -#define _IUnknown_(This) (IUnknown*)&(This->lpVtbl) -#define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl) -#define _IShellFolder2_(This) (IShellFolder2*)&(This->lpVtbl) - -#define _IPersist_(This) (IPersist*)&(This->lpVtblPersistFolder2) -#define _IPersistFolder_(This) (IPersistFolder*)&(This->lpVtblPersistFolder2) -#define _IPersistFolder2_(This) (IPersistFolder2*)&(This->lpVtblPersistFolder2) -#define _IShellExecuteHookW_(This) (IShellExecuteHookW*)&(This->lpVtblShellExecuteHookW) -#define _IShellExecuteHookA_(This) (IShellExecuteHookA*)&(This->lpVtblShellExecuteHookA) - - -/*********************************************************************** -* IShellFolder [ControlPanel] implementation -*/ - -static const shvheader ControlPanelSFHeader[] = { - {IDS_SHV_COLUMN8, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15},/*FIXME*/ - {IDS_SHV_COLUMN9, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 200},/*FIXME*/ -}; - -#define CONROLPANELSHELLVIEWCOLUMNS 2 - -/************************************************************************** -* IControlPanel_Constructor -*/ -HRESULT WINAPI IControlPanel_Constructor(IUnknown* pUnkOuter, REFIID riid, LPVOID * ppv) -{ - ICPanelImpl *sf; - - TRACE("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid(riid)); - - if (!ppv) - return E_POINTER; - if (pUnkOuter && !IsEqualIID (riid, &IID_IUnknown)) - return CLASS_E_NOAGGREGATION; - - sf = (ICPanelImpl *) LocalAlloc(LMEM_ZEROINIT, sizeof(ICPanelImpl)); - if (!sf) - return E_OUTOFMEMORY; - - sf->ref = 0; - sf->apidl = NULL; - sf->cidl = 0; - sf->lpVtbl = &vt_ShellFolder2; - sf->lpVtblPersistFolder2 = &vt_PersistFolder2; - sf->lpVtblShellExecuteHookW = &vt_ShellExecuteHookW; - sf->lpVtblShellExecuteHookA = &vt_ShellExecuteHookA; - sf->lpVtblContextMenu = &vt_ContextMenu; - sf->pidlRoot = _ILCreateControlPanel(); /* my qualified pidl */ - sf->pUnkOuter = pUnkOuter ? pUnkOuter : _IUnknown_ (sf); - - if (!SUCCEEDED(IUnknown_QueryInterface(_IUnknown_(sf), riid, ppv))) { - IUnknown_Release(_IUnknown_(sf)); - return E_NOINTERFACE; - } - - TRACE("--(%p)\n", sf); - return S_OK; -} - -/************************************************************************** - * ISF_ControlPanel_fnQueryInterface - * - * NOTES supports not IPersist/IPersistFolder - */ -static HRESULT WINAPI ISF_ControlPanel_fnQueryInterface(IShellFolder2 * iface, REFIID riid, LPVOID * ppvObject) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - TRACE("(%p)->(%s,%p)\n", This, shdebugstr_guid(riid), ppvObject); - - *ppvObject = NULL; - - if (IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IShellFolder) || IsEqualIID(riid, &IID_IShellFolder2)) - *ppvObject = This; - else if (IsEqualIID(riid, &IID_IPersist) || - IsEqualIID(riid, &IID_IPersistFolder) || IsEqualIID(riid, &IID_IPersistFolder2)) - *ppvObject = _IPersistFolder2_(This); - else if (IsEqualIID(riid, &IID_IShellExecuteHookW)) - *ppvObject = _IShellExecuteHookW_(This); - else if (IsEqualIID(riid, &IID_IShellExecuteHookA)) - *ppvObject = _IShellExecuteHookA_(This); - - if (*ppvObject) { - IUnknown_AddRef((IUnknown *)(*ppvObject)); - TRACE("-- Interface:(%p)->(%p)\n", ppvObject, *ppvObject); - return S_OK; - } - TRACE("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI ISF_ControlPanel_fnAddRef(IShellFolder2 * iface) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE("(%p)->(count=%u)\n", This, refCount - 1); - - return refCount; -} - -static ULONG WINAPI ISF_ControlPanel_fnRelease(IShellFolder2 * iface) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->ref); - - TRACE("(%p)->(count=%u)\n", This, refCount + 1); - - if (!refCount) { - TRACE("-- destroying IShellFolder(%p)\n", This); - SHFree(This->pidlRoot); - LocalFree((HLOCAL) This); - } - return refCount; -} - -/************************************************************************** -* ISF_ControlPanel_fnParseDisplayName -*/ -static HRESULT WINAPI -ISF_ControlPanel_fnParseDisplayName(IShellFolder2 * iface, - HWND hwndOwner, - LPBC pbc, - LPOLESTR lpszDisplayName, - DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - HRESULT hr = E_INVALIDARG; - - FIXME("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n", - This, hwndOwner, pbc, lpszDisplayName, debugstr_w(lpszDisplayName), pchEaten, ppidl, pdwAttributes); - - *ppidl = 0; - if (pchEaten) - *pchEaten = 0; - - TRACE("(%p)->(-- ret=0x%08x)\n", This, hr); - - return hr; -} - -static LPITEMIDLIST _ILCreateCPanelApplet(LPCSTR name, LPCSTR displayName, - LPCSTR comment, int iconIdx) -{ - PIDLCPanelStruct *p; - LPITEMIDLIST pidl; - PIDLDATA tmp; - int size0 = (char*)&tmp.u.cpanel.szName-(char*)&tmp.u.cpanel; - int size = size0; - int l; - - tmp.type = PT_CPLAPPLET; - tmp.u.cpanel.dummy = 0; - tmp.u.cpanel.iconIdx = iconIdx; - - l = strlen(name); - size += l+1; - - tmp.u.cpanel.offsDispName = l+1; - l = strlen(displayName); - size += l+1; - - tmp.u.cpanel.offsComment = tmp.u.cpanel.offsDispName+1+l; - l = strlen(comment); - size += l+1; - - pidl = SHAlloc(size+4); - if (!pidl) - return NULL; - - pidl->mkid.cb = size+2; - memcpy(pidl->mkid.abID, &tmp, 2+size0); - - p = &((PIDLDATA*)pidl->mkid.abID)->u.cpanel; - strcpy(p->szName, name); - strcpy(p->szName+tmp.u.cpanel.offsDispName, displayName); - strcpy(p->szName+tmp.u.cpanel.offsComment, comment); - - *(WORD*)((char*)pidl+(size+2)) = 0; - - pcheck(pidl); - - return pidl; -} - -/************************************************************************** - * _ILGetCPanelPointer() - * gets a pointer to the control panel struct stored in the pidl - */ -static PIDLCPanelStruct* _ILGetCPanelPointer(LPCITEMIDLIST pidl) -{ - LPPIDLDATA pdata = _ILGetDataPointer(pidl); - - if (pdata && pdata->type==PT_CPLAPPLET) - return (PIDLCPanelStruct*)&(pdata->u.cpanel); - - return NULL; -} - - /************************************************************************** - * ISF_ControlPanel_fnEnumObjects - */ -static BOOL SHELL_RegisterCPanelApp(IEnumIDList* list, LPCSTR path) -{ - LPITEMIDLIST pidl; - CPlApplet* applet; - CPanel panel; - CPLINFO info; - unsigned i; - int iconIdx; - - char displayName[MAX_PATH]; - char comment[MAX_PATH]; - - WCHAR wpath[MAX_PATH]; - - MultiByteToWideChar(CP_ACP, 0, path, -1, wpath, MAX_PATH); - - panel.first = NULL; - applet = Control_LoadApplet(0, wpath, &panel); - - if (applet) - { - for(i=0; icount; ++i) - { - WideCharToMultiByte(CP_ACP, 0, applet->info[i].szName, -1, displayName, MAX_PATH, 0, 0); - WideCharToMultiByte(CP_ACP, 0, applet->info[i].szInfo, -1, comment, MAX_PATH, 0, 0); - - applet->proc(0, CPL_INQUIRE, i, (LPARAM)&info); - - if (info.idIcon > 0) - iconIdx = -info.idIcon; /* negative icon index instead of icon number */ - else - iconIdx = 0; - - pidl = _ILCreateCPanelApplet(path, displayName, comment, iconIdx); - - if (pidl) - AddToEnumList(list, pidl); - } - Control_UnloadApplet(applet); - } - return TRUE; -} - -static int SHELL_RegisterRegistryCPanelApps(IEnumIDList* list, HKEY hkey_root, LPCSTR szRepPath) -{ - char name[MAX_PATH]; - char value[MAX_PATH]; - HKEY hkey; - - int cnt = 0; - - if (RegOpenKeyA(hkey_root, szRepPath, &hkey) == ERROR_SUCCESS) - { - int idx = 0; - - for(;; ++idx) - { - DWORD nameLen = MAX_PATH; - DWORD valueLen = MAX_PATH; - - if (RegEnumValueA(hkey, idx, name, &nameLen, NULL, NULL, (LPBYTE)&value, &valueLen) != ERROR_SUCCESS) - break; - - if (SHELL_RegisterCPanelApp(list, value)) - ++cnt; - } - RegCloseKey(hkey); - } - - return cnt; -} - -static int SHELL_RegisterCPanelFolders(IEnumIDList* list, HKEY hkey_root, LPCSTR szRepPath) -{ - char name[MAX_PATH]; - HKEY hkey; - - int cnt = 0; - - if (RegOpenKeyA(hkey_root, szRepPath, &hkey) == ERROR_SUCCESS) - { - int idx = 0; - for(;; ++idx) - { - if (RegEnumKeyA(hkey, idx, name, MAX_PATH) != ERROR_SUCCESS) - break; - - if (*name == '{') - { - LPITEMIDLIST pidl = _ILCreateGuidFromStrA(name); - - if (pidl && AddToEnumList(list, pidl)) - ++cnt; - } - } - - RegCloseKey(hkey); - } - - return cnt; -} - -/************************************************************************** - * CreateCPanelEnumList() - */ -static BOOL CreateCPanelEnumList( - IEnumIDList * iface, - DWORD dwFlags) -{ - CHAR szPath[MAX_PATH]; - WIN32_FIND_DATAA wfd; - HANDLE hFile; - - TRACE("(%p)->(flags=0x%08x)\n", iface, dwFlags); - - /* enumerate control panel folders */ - if (dwFlags & SHCONTF_FOLDERS) - SHELL_RegisterCPanelFolders(iface, HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ControlPanel\\NameSpace"); - - /* enumerate the control panel applets */ - if (dwFlags & SHCONTF_NONFOLDERS) - { - LPSTR p; - - GetSystemDirectoryA(szPath, MAX_PATH); - p = PathAddBackslashA(szPath); - strcpy(p, "*.cpl"); - - TRACE("-- (%p)-> enumerate SHCONTF_NONFOLDERS of %s\n",iface,debugstr_a(szPath)); - hFile = FindFirstFileA(szPath, &wfd); - - if (hFile != INVALID_HANDLE_VALUE) - { - do - { - if (!(dwFlags & SHCONTF_INCLUDEHIDDEN) && (wfd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN)) - continue; - - if (!(wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { - strcpy(p, wfd.cFileName); - SHELL_RegisterCPanelApp((IEnumIDList*)iface, szPath); - } - } while(FindNextFileA(hFile, &wfd)); - FindClose(hFile); - } - - SHELL_RegisterRegistryCPanelApps((IEnumIDList*)iface, HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\Cpls"); - SHELL_RegisterRegistryCPanelApps((IEnumIDList*)iface, HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\Cpls"); - } - return TRUE; -} - -/************************************************************************** -* ISF_ControlPanel_fnEnumObjects -*/ -static HRESULT WINAPI -ISF_ControlPanel_fnEnumObjects(IShellFolder2 * iface, HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST * ppEnumIDList) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - TRACE("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", This, hwndOwner, dwFlags, ppEnumIDList); - - *ppEnumIDList = IEnumIDList_Constructor(); - if (*ppEnumIDList) - CreateCPanelEnumList(*ppEnumIDList, dwFlags); - - TRACE("--(%p)->(new ID List: %p)\n", This, *ppEnumIDList); - - return(*ppEnumIDList) ? S_OK : E_OUTOFMEMORY; -} - -/************************************************************************** -* ISF_ControlPanel_fnBindToObject -*/ -static HRESULT WINAPI -ISF_ControlPanel_fnBindToObject(IShellFolder2 * iface, LPCITEMIDLIST pidl, - LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - TRACE("(%p)->(pidl=%p,%p,%s,%p)\n", This, pidl, pbcReserved, shdebugstr_guid(riid), ppvOut); - - return SHELL32_BindToChild(This->pidlRoot, NULL, pidl, riid, ppvOut); -} - -/************************************************************************** -* ISF_ControlPanel_fnBindToStorage -*/ -static HRESULT WINAPI -ISF_ControlPanel_fnBindToStorage(IShellFolder2 * iface, - LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - FIXME("(%p)->(pidl=%p,%p,%s,%p) stub\n", This, pidl, pbcReserved, shdebugstr_guid(riid), ppvOut); - - *ppvOut = NULL; - return E_NOTIMPL; -} - -/************************************************************************** -* ISF_ControlPanel_fnCompareIDs -*/ - -static HRESULT WINAPI -ISF_ControlPanel_fnCompareIDs(IShellFolder2 * iface, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - int nReturn; - - TRACE("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", This, lParam, pidl1, pidl2); - nReturn = SHELL32_CompareIDs(_IShellFolder_(This), lParam, pidl1, pidl2); - TRACE("-- %i\n", nReturn); - return nReturn; -} - -/************************************************************************** -* ISF_ControlPanel_fnCreateViewObject -*/ -static HRESULT WINAPI -ISF_ControlPanel_fnCreateViewObject(IShellFolder2 * iface, HWND hwndOwner, REFIID riid, LPVOID * ppvOut) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - LPSHELLVIEW pShellView; - HRESULT hr = E_INVALIDARG; - - TRACE("(%p)->(hwnd=%p,%s,%p)\n", This, hwndOwner, shdebugstr_guid(riid), ppvOut); - - if (ppvOut) { - *ppvOut = NULL; - - if (IsEqualIID(riid, &IID_IDropTarget)) { - WARN("IDropTarget not implemented\n"); - hr = E_NOTIMPL; - } else if (IsEqualIID(riid, &IID_IContextMenu)) { - WARN("IContextMenu not implemented\n"); - hr = E_NOTIMPL; - } else if (IsEqualIID(riid, &IID_IShellView)) { - pShellView = IShellView_Constructor((IShellFolder *) iface); - if (pShellView) { - hr = IShellView_QueryInterface(pShellView, riid, ppvOut); - IShellView_Release(pShellView); - } - } - } - TRACE("--(%p)->(interface=%p)\n", This, ppvOut); - return hr; -} - -/************************************************************************** -* ISF_ControlPanel_fnGetAttributesOf -*/ -static HRESULT WINAPI -ISF_ControlPanel_fnGetAttributesOf(IShellFolder2 * iface, UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - HRESULT hr = S_OK; - - TRACE("(%p)->(cidl=%d apidl=%p mask=%p (0x%08x))\n", - This, cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0); - - if (!rgfInOut) - return E_INVALIDARG; - if (cidl && !apidl) - return E_INVALIDARG; - - if (*rgfInOut == 0) - *rgfInOut = ~0; - - while(cidl > 0 && *apidl) { - pdump(*apidl); - SHELL32_GetItemAttributes(_IShellFolder_(This), *apidl, rgfInOut); - apidl++; - cidl--; - } - /* make sure SFGAO_VALIDATE is cleared, some apps depend on that */ - *rgfInOut &= ~SFGAO_VALIDATE; - - TRACE("-- result=0x%08x\n", *rgfInOut); - return hr; -} - -/************************************************************************** -* ISF_ControlPanel_fnGetUIObjectOf -* -* PARAMETERS -* HWND hwndOwner, //[in ] Parent window for any output -* UINT cidl, //[in ] array size -* LPCITEMIDLIST* apidl, //[in ] simple pidl array -* REFIID riid, //[in ] Requested Interface -* UINT* prgfInOut, //[ ] reserved -* LPVOID* ppvObject) //[out] Resulting Interface -* -*/ -static HRESULT WINAPI -ISF_ControlPanel_fnGetUIObjectOf(IShellFolder2 * iface, - HWND hwndOwner, - UINT cidl, LPCITEMIDLIST * apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - LPITEMIDLIST pidl; - IUnknown *pObj = NULL; - HRESULT hr = E_INVALIDARG; - - TRACE("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n", - This, hwndOwner, cidl, apidl, shdebugstr_guid(riid), prgfInOut, ppvOut); - - if (ppvOut) { - *ppvOut = NULL; - - if (IsEqualIID(riid, &IID_IContextMenu) &&(cidl >= 1)) { - pObj = (IUnknown*)(&This->lpVtblContextMenu); - This->apidl = apidl; - This->cidl = cidl; - IUnknown_AddRef(pObj); - } else if (IsEqualIID(riid, &IID_IDataObject) &&(cidl >= 1)) { - pObj = (LPUNKNOWN) IDataObject_Constructor(hwndOwner, This->pidlRoot, apidl, cidl); - hr = S_OK; - } else if (IsEqualIID(riid, &IID_IExtractIconA) &&(cidl == 1)) { - pidl = ILCombine(This->pidlRoot, apidl[0]); - pObj = (LPUNKNOWN) IExtractIconA_Constructor(pidl); - SHFree(pidl); - hr = S_OK; - } else if (IsEqualIID(riid, &IID_IExtractIconW) &&(cidl == 1)) { - pidl = ILCombine(This->pidlRoot, apidl[0]); - pObj = (LPUNKNOWN) IExtractIconW_Constructor(pidl); - SHFree(pidl); - hr = S_OK; - } else if ((IsEqualIID(riid,&IID_IShellLinkW) || IsEqualIID(riid,&IID_IShellLinkA)) - && (cidl == 1)) { - pidl = ILCombine(This->pidlRoot, apidl[0]); - hr = IShellLink_ConstructFromFile(NULL, riid, pidl,(LPVOID*)&pObj); - SHFree(pidl); - } else { - hr = E_NOINTERFACE; - } - - if (SUCCEEDED(hr) && !pObj) - hr = E_OUTOFMEMORY; - - *ppvOut = pObj; - } - TRACE("(%p)->hr=0x%08x\n", This, hr); - return hr; -} - -/************************************************************************** -* ISF_ControlPanel_fnGetDisplayNameOf -*/ -static HRESULT WINAPI ISF_ControlPanel_fnGetDisplayNameOf(IShellFolder2 * iface, LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - CHAR szPath[MAX_PATH]; - WCHAR wszPath[MAX_PATH+1]; /* +1 for potential backslash */ - PIDLCPanelStruct* pcpanel; - - *szPath = '\0'; - - TRACE("(%p)->(pidl=%p,0x%08x,%p)\n", This, pidl, dwFlags, strRet); - pdump(pidl); - - if (!pidl || !strRet) - return E_INVALIDARG; - - pcpanel = _ILGetCPanelPointer(pidl); - - if (pcpanel) { - lstrcpyA(szPath, pcpanel->szName+pcpanel->offsDispName); - - if (!(dwFlags & SHGDN_FORPARSING)) - FIXME("retrieve display name from control panel app\n"); - } - /* take names of special folders only if it's only this folder */ - else if (_ILIsSpecialFolder(pidl)) { - BOOL bSimplePidl = _ILIsPidlSimple(pidl); - - if (bSimplePidl) { - _ILSimpleGetTextW(pidl, wszPath, MAX_PATH); /* append my own path */ - } else { - FIXME("special pidl\n"); - } - - if ((dwFlags & SHGDN_FORPARSING) && !bSimplePidl) { /* go deeper if needed */ - int len = 0; - - PathAddBackslashW(wszPath); - len = wcslen(wszPath); - - if (!SUCCEEDED - (SHELL32_GetDisplayNameOfChild(iface, pidl, dwFlags, wszPath + len, MAX_PATH + 1 - len))) - return E_OUTOFMEMORY; - if (!WideCharToMultiByte(CP_ACP, 0, wszPath, -1, szPath, MAX_PATH, NULL, NULL)) - wszPath[0] = '\0'; - } else { - if (bSimplePidl) { - if (!WideCharToMultiByte(CP_ACP, 0, wszPath, -1, szPath, MAX_PATH, NULL, NULL)) - wszPath[0] = '\0'; - } - } - } - - strRet->uType = STRRET_CSTR; - lstrcpynA(strRet->u.cStr, szPath, MAX_PATH); - - TRACE("--(%p)->(%s)\n", This, szPath); - return S_OK; -} - -/************************************************************************** -* ISF_ControlPanel_fnSetNameOf -* Changes the name of a file object or subfolder, possibly changing its item -* identifier in the process. -* -* PARAMETERS -* HWND hwndOwner, //[in ] Owner window for output -* LPCITEMIDLIST pidl, //[in ] simple pidl of item to change -* LPCOLESTR lpszName, //[in ] the items new display name -* DWORD dwFlags, //[in ] SHGNO formatting flags -* LPITEMIDLIST* ppidlOut) //[out] simple pidl returned -*/ -static HRESULT WINAPI ISF_ControlPanel_fnSetNameOf(IShellFolder2 * iface, HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */ - LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - FIXME("(%p)->(%p,pidl=%p,%s,%u,%p)\n", This, hwndOwner, pidl, debugstr_w(lpName), dwFlags, pPidlOut); - return E_FAIL; -} - -static HRESULT WINAPI ISF_ControlPanel_fnGetDefaultSearchGUID(IShellFolder2 * iface, GUID * pguid) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - FIXME("(%p)\n", This); - return E_NOTIMPL; -} -static HRESULT WINAPI ISF_ControlPanel_fnEnumSearches(IShellFolder2 * iface, IEnumExtraSearch ** ppenum) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - FIXME("(%p)\n", This); - return E_NOTIMPL; -} -static HRESULT WINAPI ISF_ControlPanel_fnGetDefaultColumn(IShellFolder2 * iface, DWORD dwRes, ULONG * pSort, ULONG * pDisplay) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - TRACE("(%p)\n", This); - - if (pSort) *pSort = 0; - if (pDisplay) *pDisplay = 0; - return S_OK; -} -static HRESULT WINAPI ISF_ControlPanel_fnGetDefaultColumnState(IShellFolder2 * iface, UINT iColumn, DWORD * pcsFlags) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - TRACE("(%p)\n", This); - - if (!pcsFlags || iColumn >= CONROLPANELSHELLVIEWCOLUMNS) return E_INVALIDARG; - *pcsFlags = ControlPanelSFHeader[iColumn].pcsFlags; - return S_OK; -} -static HRESULT WINAPI ISF_ControlPanel_fnGetDetailsEx(IShellFolder2 * iface, LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - FIXME("(%p)\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI ISF_ControlPanel_fnGetDetailsOf(IShellFolder2 * iface, LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS * psd) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - HRESULT hr; - - TRACE("(%p)->(%p %i %p)\n", This, pidl, iColumn, psd); - - if (!psd || iColumn >= CONROLPANELSHELLVIEWCOLUMNS) - return E_INVALIDARG; - - if (!pidl) { - psd->fmt = ControlPanelSFHeader[iColumn].fmt; - psd->cxChar = ControlPanelSFHeader[iColumn].cxChar; - psd->str.uType = STRRET_CSTR; - LoadStringA(shell32_hInstance, ControlPanelSFHeader[iColumn].colnameid, psd->str.u.cStr, MAX_PATH); - return S_OK; - } else { - psd->str.u.cStr[0] = 0x00; - psd->str.uType = STRRET_CSTR; - switch(iColumn) { - case 0: /* name */ - hr = IShellFolder_GetDisplayNameOf(iface, pidl, SHGDN_NORMAL | SHGDN_INFOLDER, &psd->str); - break; - case 1: /* comment */ - _ILGetFileType(pidl, psd->str.u.cStr, MAX_PATH); - break; - } - hr = S_OK; - } - - return hr; -} -static HRESULT WINAPI ISF_ControlPanel_fnMapColumnToSCID(IShellFolder2 * iface, UINT column, SHCOLUMNID * pscid) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - FIXME("(%p)\n", This); - return E_NOTIMPL; -} - -static const IShellFolder2Vtbl vt_ShellFolder2 = -{ - - ISF_ControlPanel_fnQueryInterface, - ISF_ControlPanel_fnAddRef, - ISF_ControlPanel_fnRelease, - ISF_ControlPanel_fnParseDisplayName, - ISF_ControlPanel_fnEnumObjects, - ISF_ControlPanel_fnBindToObject, - ISF_ControlPanel_fnBindToStorage, - ISF_ControlPanel_fnCompareIDs, - ISF_ControlPanel_fnCreateViewObject, - ISF_ControlPanel_fnGetAttributesOf, - ISF_ControlPanel_fnGetUIObjectOf, - ISF_ControlPanel_fnGetDisplayNameOf, - ISF_ControlPanel_fnSetNameOf, - - /* ShellFolder2 */ - ISF_ControlPanel_fnGetDefaultSearchGUID, - ISF_ControlPanel_fnEnumSearches, - ISF_ControlPanel_fnGetDefaultColumn, - ISF_ControlPanel_fnGetDefaultColumnState, - ISF_ControlPanel_fnGetDetailsEx, - ISF_ControlPanel_fnGetDetailsOf, - ISF_ControlPanel_fnMapColumnToSCID -}; - -/************************************************************************ - * ICPanel_PersistFolder2_QueryInterface - */ -static HRESULT WINAPI ICPanel_PersistFolder2_QueryInterface(IPersistFolder2 * iface, REFIID iid, LPVOID * ppvObject) -{ - ICPanelImpl *This = impl_from_IPersistFolder2(iface); - - TRACE("(%p)\n", This); - - return IUnknown_QueryInterface(_IUnknown_(This), iid, ppvObject); -} - -/************************************************************************ - * ICPanel_PersistFolder2_AddRef - */ -static ULONG WINAPI ICPanel_PersistFolder2_AddRef(IPersistFolder2 * iface) -{ - ICPanelImpl *This = impl_from_IPersistFolder2(iface); - - TRACE("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_AddRef(_IUnknown_(This)); -} - -/************************************************************************ - * ISFPersistFolder_Release - */ -static ULONG WINAPI ICPanel_PersistFolder2_Release(IPersistFolder2 * iface) -{ - ICPanelImpl *This = impl_from_IPersistFolder2(iface); - - TRACE("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_Release(_IUnknown_(This)); -} - -/************************************************************************ - * ICPanel_PersistFolder2_GetClassID - */ -static HRESULT WINAPI ICPanel_PersistFolder2_GetClassID(IPersistFolder2 * iface, CLSID * lpClassId) -{ - ICPanelImpl *This = impl_from_IPersistFolder2(iface); - - TRACE("(%p)\n", This); - - if (!lpClassId) - return E_POINTER; - *lpClassId = CLSID_ControlPanel; - - return S_OK; -} - -/************************************************************************ - * ICPanel_PersistFolder2_Initialize - * - * NOTES: it makes no sense to change the pidl - */ -static HRESULT WINAPI ICPanel_PersistFolder2_Initialize(IPersistFolder2 * iface, LPCITEMIDLIST pidl) -{ - ICPanelImpl *This = impl_from_IPersistFolder2(iface); - if (This->pidlRoot) - SHFree((LPVOID)This->pidlRoot); - - This->pidlRoot = ILClone(pidl); - return S_OK; -} - -/************************************************************************** - * IPersistFolder2_fnGetCurFolder - */ -static HRESULT WINAPI ICPanel_PersistFolder2_GetCurFolder(IPersistFolder2 * iface, LPITEMIDLIST * pidl) -{ - ICPanelImpl *This = impl_from_IPersistFolder2(iface); - - TRACE("(%p)->(%p)\n", This, pidl); - - if (!pidl) - return E_POINTER; - *pidl = ILClone(This->pidlRoot); - return S_OK; -} - -static const IPersistFolder2Vtbl vt_PersistFolder2 = -{ - - ICPanel_PersistFolder2_QueryInterface, - ICPanel_PersistFolder2_AddRef, - ICPanel_PersistFolder2_Release, - ICPanel_PersistFolder2_GetClassID, - ICPanel_PersistFolder2_Initialize, - ICPanel_PersistFolder2_GetCurFolder -}; - -HRESULT CPanel_GetIconLocationW(LPCITEMIDLIST pidl, - LPWSTR szIconFile, UINT cchMax, int* piIndex) -{ - PIDLCPanelStruct* pcpanel = _ILGetCPanelPointer(pidl); - - if (!pcpanel) - return E_INVALIDARG; - - MultiByteToWideChar(CP_ACP, 0, pcpanel->szName, -1, szIconFile, cchMax); - *piIndex = pcpanel->iconIdx!=-1? pcpanel->iconIdx: 0; - - return S_OK; -} - - -/************************************************************************** -* IShellExecuteHookW Implementation -*/ - -static HRESULT WINAPI IShellExecuteHookW_fnQueryInterface( - IShellExecuteHookW* iface, REFIID riid, void** ppvObject) -{ - ICPanelImpl *This = impl_from_IShellExecuteHookW(iface); - - TRACE("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_QueryInterface(This->pUnkOuter, riid, ppvObject); -} - -static ULONG STDMETHODCALLTYPE IShellExecuteHookW_fnAddRef(IShellExecuteHookW* iface) -{ - ICPanelImpl *This = impl_from_IShellExecuteHookW(iface); - - TRACE("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_AddRef(This->pUnkOuter); -} - -static ULONG STDMETHODCALLTYPE IShellExecuteHookW_fnRelease(IShellExecuteHookW* iface) -{ - ICPanelImpl *This = impl_from_IShellExecuteHookW(iface); - - TRACE("(%p)\n", This); - - return IUnknown_Release(This->pUnkOuter); -} - -HRESULT -ExecuteAppletFromCLSID(LPOLESTR pOleStr) -{ - WCHAR szCmd[MAX_PATH]; - WCHAR szExpCmd[MAX_PATH]; - PROCESS_INFORMATION pi; - STARTUPINFOW si; - WCHAR szBuffer[90] = { 'C', 'L', 'S', 'I', 'D', '\\', 0 }; - DWORD dwType, dwSize; - - wcscpy(&szBuffer[6], pOleStr); - wcscat(szBuffer, L"\\shell\\open\\command"); - - dwSize = sizeof(szCmd); - if (RegGetValueW(HKEY_CLASSES_ROOT, szBuffer, NULL, RRF_RT_REG_SZ, &dwType, (PVOID)szCmd, &dwSize) != ERROR_SUCCESS) - { - ERR("RegGetValueW failed with %u\n", GetLastError()); - return E_FAIL; - } - -#if 0 - if (dwType != RRF_RT_REG_SZ && dwType != RRF_RT_REG_EXPAND_SZ) - return E_FAIL; -#endif - - if (!ExpandEnvironmentStringsW(szCmd, szExpCmd, sizeof(szExpCmd)/sizeof(WCHAR))) - return E_FAIL; - - ZeroMemory(&si, sizeof(si)); - si.cb = sizeof(si); - if (!CreateProcessW(NULL, szExpCmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) - return E_FAIL; - - CloseHandle(pi.hProcess); - CloseHandle(pi.hThread); - return S_OK; -} - - -static HRESULT WINAPI IShellExecuteHookW_fnExecute(IShellExecuteHookW* iface, LPSHELLEXECUTEINFOW psei) -{ - static const WCHAR wCplopen[] = {'c','p','l','o','p','e','n','\0'}; - ICPanelImpl *This = (ICPanelImpl *)iface; - - SHELLEXECUTEINFOW sei_tmp; - PIDLCPanelStruct* pcpanel; - WCHAR path[MAX_PATH]; - WCHAR params[MAX_PATH]; - BOOL ret; - HRESULT hr; - int l; - - TRACE("(%p)->execute(%p)\n", This, psei); - - if (!psei) - return E_INVALIDARG; - - pcpanel = _ILGetCPanelPointer(ILFindLastID(psei->lpIDList)); - - if (!pcpanel) - { - LPOLESTR pOleStr; - - IID * iid = _ILGetGUIDPointer(ILFindLastID(psei->lpIDList)); - if (!iid) - return E_INVALIDARG; - if (StringFromCLSID(iid, &pOleStr) == S_OK) - { - - hr = ExecuteAppletFromCLSID(pOleStr); - CoTaskMemFree(pOleStr); - return hr; - } - - return E_INVALIDARG; - } - path[0] = '\"'; - /* Return value from MultiByteToWideChar includes terminating NUL, which - * compensates for the starting double quote we just put in */ - l = MultiByteToWideChar(CP_ACP, 0, pcpanel->szName, -1, path+1, MAX_PATH); - - /* pass applet name to Control_RunDLL to distinguish between applets in one .cpl file */ - path[l++] = '"'; - path[l] = '\0'; - - MultiByteToWideChar(CP_ACP, 0, pcpanel->szName+pcpanel->offsDispName, -1, params, MAX_PATH); - - memcpy(&sei_tmp, psei, sizeof(sei_tmp)); - sei_tmp.lpFile = path; - sei_tmp.lpParameters = params; - sei_tmp.fMask &= ~SEE_MASK_INVOKEIDLIST; - sei_tmp.lpVerb = wCplopen; - - ret = ShellExecuteExW(&sei_tmp); - if (ret) - return S_OK; - else - return S_FALSE; -} - -static const IShellExecuteHookWVtbl vt_ShellExecuteHookW = -{ - - IShellExecuteHookW_fnQueryInterface, - IShellExecuteHookW_fnAddRef, - IShellExecuteHookW_fnRelease, - - IShellExecuteHookW_fnExecute -}; - - -/************************************************************************** -* IShellExecuteHookA Implementation -*/ - -static HRESULT WINAPI IShellExecuteHookA_fnQueryInterface(IShellExecuteHookA* iface, REFIID riid, void** ppvObject) -{ - ICPanelImpl *This = impl_from_IShellExecuteHookA(iface); - - TRACE("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_QueryInterface(This->pUnkOuter, riid, ppvObject); -} - -static ULONG STDMETHODCALLTYPE IShellExecuteHookA_fnAddRef(IShellExecuteHookA* iface) -{ - ICPanelImpl *This = impl_from_IShellExecuteHookA(iface); - - TRACE("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_AddRef(This->pUnkOuter); -} - -static ULONG STDMETHODCALLTYPE IShellExecuteHookA_fnRelease(IShellExecuteHookA* iface) -{ - ICPanelImpl *This = impl_from_IShellExecuteHookA(iface); - - TRACE("(%p)\n", This); - - return IUnknown_Release(This->pUnkOuter); -} - -static HRESULT WINAPI IShellExecuteHookA_fnExecute(IShellExecuteHookA* iface, LPSHELLEXECUTEINFOA psei) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - SHELLEXECUTEINFOA sei_tmp; - PIDLCPanelStruct* pcpanel; - char path[MAX_PATH]; - BOOL ret; - - TRACE("(%p)->execute(%p)\n", This, psei); - - if (!psei) - return E_INVALIDARG; - - pcpanel = _ILGetCPanelPointer(ILFindLastID(psei->lpIDList)); - - if (!pcpanel) - return E_INVALIDARG; - - path[0] = '\"'; - lstrcpyA(path+1, pcpanel->szName); - - /* pass applet name to Control_RunDLL to distinguish between applets in one .cpl file */ - lstrcatA(path, "\" "); - lstrcatA(path, pcpanel->szName+pcpanel->offsDispName); - - memcpy(&sei_tmp, psei, sizeof(sei_tmp)); - sei_tmp.lpFile = path; - sei_tmp.fMask &= ~SEE_MASK_INVOKEIDLIST; - - ret = ShellExecuteExA(&sei_tmp); - if (ret) - return S_OK; - else - return S_FALSE; -} - -static const IShellExecuteHookAVtbl vt_ShellExecuteHookA = -{ - IShellExecuteHookA_fnQueryInterface, - IShellExecuteHookA_fnAddRef, - IShellExecuteHookA_fnRelease, - IShellExecuteHookA_fnExecute -}; - -/************************************************************************** -* IContextMenu2 Implementation -*/ - -/************************************************************************ - * ICPanel_IContextMenu_QueryInterface - */ -static HRESULT WINAPI ICPanel_IContextMenu2_QueryInterface(IContextMenu2 * iface, REFIID iid, LPVOID * ppvObject) -{ - ICPanelImpl *This = impl_from_IContextMenu(iface); - - TRACE("(%p)\n", This); - - return IUnknown_QueryInterface(_IUnknown_(This), iid, ppvObject); -} - -/************************************************************************ - * ICPanel_IContextMenu_AddRef - */ -static ULONG WINAPI ICPanel_IContextMenu2_AddRef(IContextMenu2 * iface) -{ - ICPanelImpl *This = impl_from_IContextMenu(iface); - - TRACE("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_AddRef(_IUnknown_(This)); -} - -/************************************************************************ - * ICPanel_IContextMenu_Release - */ -static ULONG WINAPI ICPanel_IContextMenu2_Release(IContextMenu2 * iface) -{ - ICPanelImpl *This = impl_from_IContextMenu(iface); - - TRACE("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_Release(_IUnknown_(This)); -} - -/************************************************************************** -* ICPanel_IContextMenu_QueryContextMenu() -*/ -static HRESULT WINAPI ICPanel_IContextMenu2_QueryContextMenu( - IContextMenu2 *iface, - HMENU hMenu, - UINT indexMenu, - UINT idCmdFirst, - UINT idCmdLast, - UINT uFlags) -{ - WCHAR szBuffer[30] = {0}; - ULONG Count = 1; - - ICPanelImpl *This = impl_from_IContextMenu(iface); - - TRACE("(%p)->(hmenu=%p indexmenu=%x cmdfirst=%x cmdlast=%x flags=%x )\n", - This, hMenu, indexMenu, idCmdFirst, idCmdLast, uFlags); - - if (LoadStringW(shell32_hInstance, IDS_OPEN, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) - { - szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; - _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_DEFAULT); - Count++; - } - - if (LoadStringW(shell32_hInstance, IDS_CREATELINK, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) - { - if (Count) - { - _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_SEPARATOR, NULL, MFS_ENABLED); - } - szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; - - _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_ENABLED); - Count++; - } - return MAKE_HRESULT(SEVERITY_SUCCESS, 0, Count); -} - - -/************************************************************************** -* ICPanel_IContextMenu_InvokeCommand() -*/ -static HRESULT WINAPI ICPanel_IContextMenu2_InvokeCommand( - IContextMenu2 *iface, - LPCMINVOKECOMMANDINFO lpcmi) -{ - SHELLEXECUTEINFOW sei; - WCHAR szPath[MAX_PATH]; - char szTarget[MAX_PATH]; - STRRET strret; - WCHAR* pszPath; - INT Length, cLength; - PIDLCPanelStruct *pcpanel; - IPersistFile * ppf; - IShellLinkA * isl; - ICPanelImpl *This = impl_from_IContextMenu(iface); - - TRACE("(%p)->(invcom=%p verb=%p wnd=%p)\n",This,lpcmi,lpcmi->lpVerb, lpcmi->hwnd); - - if (lpcmi->lpVerb == MAKEINTRESOURCEA(1)) - { - ZeroMemory(&sei, sizeof(sei)); - sei.cbSize = sizeof(sei); - sei.fMask = SEE_MASK_INVOKEIDLIST; - sei.lpIDList = ILCombine(This->pidlRoot, This->apidl[0]); - sei.hwnd = lpcmi->hwnd; - sei.nShow = SW_SHOWNORMAL; - sei.lpVerb = L"open"; - ShellExecuteExW(&sei); - if (sei.hInstApp <= (HINSTANCE)32) - return E_FAIL; - } - else if (lpcmi->lpVerb == MAKEINTRESOURCEA(2)) - { - if (!SHGetSpecialFolderPathW(NULL, szPath, CSIDL_DESKTOPDIRECTORY, FALSE)) - return E_FAIL; - - pszPath = PathAddBackslashW(szPath); - if (!pszPath) - return E_FAIL; - - if (IShellFolder_GetDisplayNameOf((IShellFolder*)This, This->apidl[0], SHGDN_FORPARSING, &strret) != S_OK) - return E_FAIL; - - Length = MAX_PATH - (pszPath - szPath); - cLength = strlen(strret.u.cStr); - if (Length < cLength + 5) - { - FIXME("\n"); - return E_FAIL; - } - - if (MultiByteToWideChar(CP_ACP, 0, strret.u.cStr, cLength +1, pszPath, Length)) - { - pszPath += cLength; - Length -= cLength; - } - - if (Length > 10) - { - wcscpy(pszPath, L" - "); - cLength = LoadStringW(shell32_hInstance, IDS_LNK_FILE, &pszPath[3], Length -4) + 3; - if (cLength + 5 > Length) - cLength = Length - 5; - Length -= cLength; - pszPath += cLength; - } - wcscpy(pszPath, L".lnk"); - - pcpanel = _ILGetCPanelPointer(ILFindLastID(This->apidl[0])); - if (pcpanel) - { - strncpy(szTarget, pcpanel->szName, MAX_PATH); - } - else - { - FIXME("\n"); - return E_FAIL; - } - if (SUCCEEDED(IShellLink_Constructor(NULL, &IID_IShellLinkA, (LPVOID*)&isl))) - { - IShellLinkA_SetPath(isl, szTarget); - if (SUCCEEDED(IShellLinkA_QueryInterface(isl, &IID_IPersistFile, (LPVOID*)&ppf))) - { - IPersistFile_Save(ppf, szPath, TRUE); - IPersistFile_Release(ppf); - } - IShellLinkA_Release(isl); - } - return NOERROR; - } - return S_OK; -} - -/************************************************************************** - * ICPanel_IContextMenu_GetCommandString() - * - */ -static HRESULT WINAPI ICPanel_IContextMenu2_GetCommandString( - IContextMenu2 *iface, - UINT_PTR idCommand, - UINT uFlags, - UINT* lpReserved, - LPSTR lpszName, - UINT uMaxNameLen) -{ - ICPanelImpl *This = impl_from_IContextMenu(iface); - - TRACE("(%p)->(idcom=%lx flags=%x %p name=%p len=%x)\n",This, idCommand, uFlags, lpReserved, lpszName, uMaxNameLen); - - - FIXME("unknown command string\n"); - return E_FAIL; -} - - - -/************************************************************************** -* ICPanel_IContextMenu_HandleMenuMsg() -*/ -static HRESULT WINAPI ICPanel_IContextMenu2_HandleMenuMsg( - IContextMenu2 *iface, - UINT uMsg, - WPARAM wParam, - LPARAM lParam) -{ - ICPanelImpl *This = impl_from_IContextMenu(iface); - - TRACE("ICPanel_IContextMenu_HandleMenuMsg (%p)->(msg=%x wp=%lx lp=%lx)\n",This, uMsg, wParam, lParam); - - return E_NOTIMPL; -} - -static const IContextMenu2Vtbl vt_ContextMenu = -{ - ICPanel_IContextMenu2_QueryInterface, - ICPanel_IContextMenu2_AddRef, - ICPanel_IContextMenu2_Release, - ICPanel_IContextMenu2_QueryContextMenu, - ICPanel_IContextMenu2_InvokeCommand, - ICPanel_IContextMenu2_GetCommandString, - ICPanel_IContextMenu2_HandleMenuMsg -}; - diff --git a/reactos/dll/win32/shell32/lang/bg-BG.rc b/reactos/dll/win32/shell32/lang/bg-BG.rc index c6942c72caf..a1f810eabec 100644 --- a/reactos/dll/win32/shell32/lang/bg-BG.rc +++ b/reactos/dll/win32/shell32/lang/bg-BG.rc @@ -620,6 +620,9 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" + IDS_SHV_COLUMN_DEVNAME "Device Name" + IDS_SHV_COLUMN_PHONE "Phone # or Host Address" + IDS_SHV_COLUMN_OWNER "Owner" // special folders IDS_DESKTOP "Работна площ" @@ -627,6 +630,7 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Кошче" IDS_CONTROLPANEL "Крило за управление" IDS_ADMINISTRATIVETOOLS "Administrative Tools" + IDS_NETWORKCONNECTION "Network Connections" // context menus IDS_VIEW_LARGE "&Големи значета" diff --git a/reactos/dll/win32/shell32/lang/ca-ES.rc b/reactos/dll/win32/shell32/lang/ca-ES.rc index 6626a801e8e..6501f4dea8d 100644 --- a/reactos/dll/win32/shell32/lang/ca-ES.rc +++ b/reactos/dll/win32/shell32/lang/ca-ES.rc @@ -617,6 +617,9 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" + IDS_SHV_COLUMN_DEVNAME "Device Name" + IDS_SHV_COLUMN_PHONE "Phone # or Host Address" + IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Desktop" @@ -624,6 +627,7 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Trash" IDS_CONTROLPANEL "Control Panel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" + IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "Lar&ge Icons" diff --git a/reactos/dll/win32/shell32/lang/cs-CZ.rc b/reactos/dll/win32/shell32/lang/cs-CZ.rc index c70abea1d04..83ce1931ca0 100644 --- a/reactos/dll/win32/shell32/lang/cs-CZ.rc +++ b/reactos/dll/win32/shell32/lang/cs-CZ.rc @@ -619,6 +619,9 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" + IDS_SHV_COLUMN_DEVNAME "Device Name" + IDS_SHV_COLUMN_PHONE "Phone # or Host Address" + IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Plocha" @@ -626,6 +629,7 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Koљ" IDS_CONTROLPANEL "Ovlбdacн panely" IDS_ADMINISTRATIVETOOLS "Administrative Tools" + IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "&Vedle sebe" diff --git a/reactos/dll/win32/shell32/lang/da-DK.rc b/reactos/dll/win32/shell32/lang/da-DK.rc index f67714caa08..bba24ec9cfd 100644 --- a/reactos/dll/win32/shell32/lang/da-DK.rc +++ b/reactos/dll/win32/shell32/lang/da-DK.rc @@ -617,6 +617,9 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" + IDS_SHV_COLUMN_DEVNAME "Device Name" + IDS_SHV_COLUMN_PHONE "Phone # or Host Address" + IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Desktop" @@ -624,6 +627,7 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Trash" IDS_CONTROLPANEL "Control Panel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" + IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "Lar&ge Icons" diff --git a/reactos/dll/win32/shell32/lang/de-DE.rc b/reactos/dll/win32/shell32/lang/de-DE.rc index ff1e520637b..136adeb0a57 100644 --- a/reactos/dll/win32/shell32/lang/de-DE.rc +++ b/reactos/dll/win32/shell32/lang/de-DE.rc @@ -621,7 +621,9 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Kommentare" IDS_SHV_COLUMN_LOCATION "Ort" IDS_SHV_COLUMN_MODEL "Model" - + IDS_SHV_COLUMN_DEVNAME "Gerдtename" + IDS_SHV_COLUMN_PHONE "Rufnummer oder Hostaddresse" + IDS_SHV_COLUMN_OWNER "Besitzer" /* special folders */ IDS_DESKTOP "Desktop" @@ -629,6 +631,7 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Papierkorb" IDS_CONTROLPANEL "Systemsteuerung" IDS_ADMINISTRATIVETOOLS "Verwaltung" + IDS_NETWORKCONNECTION "Netzwerkverbindungen" /* context menus */ IDS_VIEW_LARGE "&GroЯe Symbole" diff --git a/reactos/dll/win32/shell32/lang/el-GR.rc b/reactos/dll/win32/shell32/lang/el-GR.rc index f1c6212ccc1..4451a8b384e 100644 --- a/reactos/dll/win32/shell32/lang/el-GR.rc +++ b/reactos/dll/win32/shell32/lang/el-GR.rc @@ -618,6 +618,9 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" + IDS_SHV_COLUMN_DEVNAME "Device Name" + IDS_SHV_COLUMN_PHONE "Phone # or Host Address" + IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "ЕрйцЬнейб есгбуЯбт" @@ -625,6 +628,7 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "КЬдпт бнбкэклщузт" IDS_CONTROLPANEL "РЯнбкбт елЭгчпх" IDS_ADMINISTRATIVETOOLS "Administrative Tools" + IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "&МегЬлб ейкпнЯдйб" diff --git a/reactos/dll/win32/shell32/lang/en-GB.rc b/reactos/dll/win32/shell32/lang/en-GB.rc index e1ef5e6f918..a2204825681 100644 --- a/reactos/dll/win32/shell32/lang/en-GB.rc +++ b/reactos/dll/win32/shell32/lang/en-GB.rc @@ -617,6 +617,9 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" + IDS_SHV_COLUMN_DEVNAME "Device Name" + IDS_SHV_COLUMN_PHONE "Phone # or Host Address" + IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Desktop" @@ -624,6 +627,7 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Recycle Bin" IDS_CONTROLPANEL "Control Panel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" + IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "Lar&ge Icons" diff --git a/reactos/dll/win32/shell32/lang/en-US.rc b/reactos/dll/win32/shell32/lang/en-US.rc index 4e9047fc2df..9b77037afa1 100644 --- a/reactos/dll/win32/shell32/lang/en-US.rc +++ b/reactos/dll/win32/shell32/lang/en-US.rc @@ -618,6 +618,9 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" + IDS_SHV_COLUMN_DEVNAME "Device Name" + IDS_SHV_COLUMN_PHONE "Phone # or Host Address" + IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Desktop" @@ -625,6 +628,7 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Trash" IDS_CONTROLPANEL "Control Panel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" + IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "Lar&ge Icons" diff --git a/reactos/dll/win32/shell32/lang/es-ES.rc b/reactos/dll/win32/shell32/lang/es-ES.rc index 7e335a62e07..8cc979f6dae 100644 --- a/reactos/dll/win32/shell32/lang/es-ES.rc +++ b/reactos/dll/win32/shell32/lang/es-ES.rc @@ -620,6 +620,9 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comentarios" IDS_SHV_COLUMN_LOCATION "Ubicaciуn" IDS_SHV_COLUMN_MODEL "Modelo" + IDS_SHV_COLUMN_DEVNAME "Device Name" + IDS_SHV_COLUMN_PHONE "Phone # or Host Address" + IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Escritorio" @@ -627,6 +630,7 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Papelera de reciclaje" IDS_CONTROLPANEL "Panel de control" IDS_ADMINISTRATIVETOOLS "Herramientas Administrativas" + IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "Iconos &grandes" diff --git a/reactos/dll/win32/shell32/lang/fi-FI.rc b/reactos/dll/win32/shell32/lang/fi-FI.rc index 66ddaa22b47..69b40b0bbec 100644 --- a/reactos/dll/win32/shell32/lang/fi-FI.rc +++ b/reactos/dll/win32/shell32/lang/fi-FI.rc @@ -617,6 +617,9 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" + IDS_SHV_COLUMN_DEVNAME "Device Name" + IDS_SHV_COLUMN_PHONE "Phone # or Host Address" + IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Tyцpцytд" @@ -624,6 +627,7 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Trash" IDS_CONTROLPANEL "Control Panel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" + IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "&Suuret Kuvakkeet" diff --git a/reactos/dll/win32/shell32/lang/fr-FR.rc b/reactos/dll/win32/shell32/lang/fr-FR.rc index 8e3342d6549..a2d3667bb96 100644 --- a/reactos/dll/win32/shell32/lang/fr-FR.rc +++ b/reactos/dll/win32/shell32/lang/fr-FR.rc @@ -621,6 +621,9 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Commentaires" IDS_SHV_COLUMN_LOCATION "Emplacement" IDS_SHV_COLUMN_MODEL "Modиle" + IDS_SHV_COLUMN_DEVNAME "Device Name" + IDS_SHV_COLUMN_PHONE "Phone # or Host Address" + IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Bureau" @@ -628,6 +631,7 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Corbeille" IDS_CONTROLPANEL "Panneau de configuration" IDS_ADMINISTRATIVETOOLS "Administrative Tools" + IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "&Grandes icфnes" diff --git a/reactos/dll/win32/shell32/lang/hu-HU.rc b/reactos/dll/win32/shell32/lang/hu-HU.rc index a56e952742c..8d61277750f 100644 --- a/reactos/dll/win32/shell32/lang/hu-HU.rc +++ b/reactos/dll/win32/shell32/lang/hu-HU.rc @@ -620,6 +620,9 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" + IDS_SHV_COLUMN_DEVNAME "Device Name" + IDS_SHV_COLUMN_PHONE "Phone # or Host Address" + IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Asztal" @@ -627,6 +630,7 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Trash" IDS_CONTROLPANEL "Control Panel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" + IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "Nagy kйpek" diff --git a/reactos/dll/win32/shell32/lang/it-IT.rc b/reactos/dll/win32/shell32/lang/it-IT.rc index 6cdbdabb22f..4fcabdd918a 100644 --- a/reactos/dll/win32/shell32/lang/it-IT.rc +++ b/reactos/dll/win32/shell32/lang/it-IT.rc @@ -618,6 +618,9 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Commenti" IDS_SHV_COLUMN_LOCATION "Posizione" IDS_SHV_COLUMN_MODEL "Modello" + IDS_SHV_COLUMN_DEVNAME "Device Name" + IDS_SHV_COLUMN_PHONE "Phone # or Host Address" + IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Desktop" @@ -625,6 +628,7 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Cestino" IDS_CONTROLPANEL "Pannello di controllo" IDS_ADMINISTRATIVETOOLS "Strumenti di amministrazione" + IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "&Icone Grandi" diff --git a/reactos/dll/win32/shell32/lang/ja-JP.rc b/reactos/dll/win32/shell32/lang/ja-JP.rc index db24d649ddf..9639484ab51 100644 --- a/reactos/dll/win32/shell32/lang/ja-JP.rc +++ b/reactos/dll/win32/shell32/lang/ja-JP.rc @@ -617,6 +617,9 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" + IDS_SHV_COLUMN_DEVNAME "Device Name" + IDS_SHV_COLUMN_PHONE "Phone # or Host Address" + IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "ѓfѓXѓNѓgѓbѓv" @@ -624,6 +627,7 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Trash" IDS_CONTROLPANEL "Control Panel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" + IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "‘е‚«‚ўѓAѓCѓRѓ“(&G)" diff --git a/reactos/dll/win32/shell32/lang/ko-KR.rc b/reactos/dll/win32/shell32/lang/ko-KR.rc index 4244428718b..17a2a2e3401 100644 --- a/reactos/dll/win32/shell32/lang/ko-KR.rc +++ b/reactos/dll/win32/shell32/lang/ko-KR.rc @@ -617,6 +617,9 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" + IDS_SHV_COLUMN_DEVNAME "Device Name" + IDS_SHV_COLUMN_PHONE "Phone # or Host Address" + IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Desktop" @@ -624,6 +627,7 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Trash" IDS_CONTROLPANEL "Control Panel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" + IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "Lar&ge Icons" diff --git a/reactos/dll/win32/shell32/lang/nl-NL.rc b/reactos/dll/win32/shell32/lang/nl-NL.rc index 8f63cb2c2aa..47a4181799c 100644 --- a/reactos/dll/win32/shell32/lang/nl-NL.rc +++ b/reactos/dll/win32/shell32/lang/nl-NL.rc @@ -617,6 +617,9 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" + IDS_SHV_COLUMN_DEVNAME "Device Name" + IDS_SHV_COLUMN_PHONE "Phone # or Host Address" + IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Desktop" @@ -624,6 +627,7 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Trash" IDS_CONTROLPANEL "Control Panel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" + IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "Lar&ge Icons" diff --git a/reactos/dll/win32/shell32/lang/no-NO.rc b/reactos/dll/win32/shell32/lang/no-NO.rc index c3b13ef4d5a..403414393f2 100644 --- a/reactos/dll/win32/shell32/lang/no-NO.rc +++ b/reactos/dll/win32/shell32/lang/no-NO.rc @@ -596,6 +596,9 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" + IDS_SHV_COLUMN_DEVNAME "Device Name" + IDS_SHV_COLUMN_PHONE "Phone # or Host Address" + IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Skrivebord" @@ -603,6 +606,7 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Papirkurv" IDS_CONTROLPANEL "Kontrollpanel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" + IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "&Store ikoner" diff --git a/reactos/dll/win32/shell32/lang/pl-PL.rc b/reactos/dll/win32/shell32/lang/pl-PL.rc index 10cd2d418ee..162f5b939f8 100644 --- a/reactos/dll/win32/shell32/lang/pl-PL.rc +++ b/reactos/dll/win32/shell32/lang/pl-PL.rc @@ -624,6 +624,9 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Komentarze" IDS_SHV_COLUMN_LOCATION "Lokalizacja" IDS_SHV_COLUMN_MODEL "Model" + IDS_SHV_COLUMN_DEVNAME "Device Name" + IDS_SHV_COLUMN_PHONE "Phone # or Host Address" + IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Pulpit" @@ -631,6 +634,7 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Kosz" IDS_CONTROLPANEL "Panel Sterowania" IDS_ADMINISTRATIVETOOLS "Narzкdzia Administracyjne" + IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "&Duїe Ikony" diff --git a/reactos/dll/win32/shell32/lang/pt-BR.rc b/reactos/dll/win32/shell32/lang/pt-BR.rc index 3f66ce4e004..895bfa97536 100644 --- a/reactos/dll/win32/shell32/lang/pt-BR.rc +++ b/reactos/dll/win32/shell32/lang/pt-BR.rc @@ -619,6 +619,9 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" + IDS_SHV_COLUMN_DEVNAME "Device Name" + IDS_SHV_COLUMN_PHONE "Phone # or Host Address" + IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Бrea de trabalho" @@ -626,6 +629,7 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Trash" IDS_CONTROLPANEL "Control Panel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" + IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "Нcones &grandes" diff --git a/reactos/dll/win32/shell32/lang/pt-PT.rc b/reactos/dll/win32/shell32/lang/pt-PT.rc index 5ca01e8f812..048d8a95210 100644 --- a/reactos/dll/win32/shell32/lang/pt-PT.rc +++ b/reactos/dll/win32/shell32/lang/pt-PT.rc @@ -619,6 +619,9 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" + IDS_SHV_COLUMN_DEVNAME "Device Name" + IDS_SHV_COLUMN_PHONE "Phone # or Host Address" + IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Ambiente de trabalho" @@ -626,6 +629,7 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Trash" IDS_CONTROLPANEL "Control Panel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" + IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "Нcones &grandes" diff --git a/reactos/dll/win32/shell32/lang/ru-RU.rc b/reactos/dll/win32/shell32/lang/ru-RU.rc index 0ed228f1c13..74d6a260264 100644 --- a/reactos/dll/win32/shell32/lang/ru-RU.rc +++ b/reactos/dll/win32/shell32/lang/ru-RU.rc @@ -617,6 +617,9 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Коментарии" IDS_SHV_COLUMN_LOCATION "Расположение" IDS_SHV_COLUMN_MODEL "Модель" + IDS_SHV_COLUMN_DEVNAME "Device Name" + IDS_SHV_COLUMN_PHONE "Phone # or Host Address" + IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Рабочий стол" @@ -624,6 +627,7 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Корзина" IDS_CONTROLPANEL "Панель управления" IDS_ADMINISTRATIVETOOLS "Администрирование" + IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "&Большие значки" diff --git a/reactos/dll/win32/shell32/lang/sk-SK.rc b/reactos/dll/win32/shell32/lang/sk-SK.rc index 8b660b39d26..7937c604ab0 100644 --- a/reactos/dll/win32/shell32/lang/sk-SK.rc +++ b/reactos/dll/win32/shell32/lang/sk-SK.rc @@ -623,6 +623,9 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" + IDS_SHV_COLUMN_DEVNAME "Device Name" + IDS_SHV_COLUMN_PHONE "Phone # or Host Address" + IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Pracovnб plocha" @@ -630,6 +633,7 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Kфљ" IDS_CONTROLPANEL "Ovlбdacн panel" IDS_ADMINISTRATIVETOOLS "Nбstroje na sprбvu" + IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "&Veѕkй ikony" diff --git a/reactos/dll/win32/shell32/lang/sl-SI.rc b/reactos/dll/win32/shell32/lang/sl-SI.rc index 1b3b79358c8..e2a9a882ef2 100644 --- a/reactos/dll/win32/shell32/lang/sl-SI.rc +++ b/reactos/dll/win32/shell32/lang/sl-SI.rc @@ -617,6 +617,9 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" + IDS_SHV_COLUMN_DEVNAME "Device Name" + IDS_SHV_COLUMN_PHONE "Phone # or Host Address" + IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Desktop" @@ -624,6 +627,7 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Trash" IDS_CONTROLPANEL "Control Panel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" + IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "Lar&ge Icons" diff --git a/reactos/dll/win32/shell32/lang/sv-SE.rc b/reactos/dll/win32/shell32/lang/sv-SE.rc index 9b8e0e2d4b7..76129e06491 100644 --- a/reactos/dll/win32/shell32/lang/sv-SE.rc +++ b/reactos/dll/win32/shell32/lang/sv-SE.rc @@ -617,6 +617,9 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" + IDS_SHV_COLUMN_DEVNAME "Device Name" + IDS_SHV_COLUMN_PHONE "Phone # or Host Address" + IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Desktop" @@ -624,6 +627,7 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Trash" IDS_CONTROLPANEL "Control Panel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" + IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "Lar&ge Icons" diff --git a/reactos/dll/win32/shell32/lang/tr-TR.rc b/reactos/dll/win32/shell32/lang/tr-TR.rc index dd50639a734..deb6db61732 100644 --- a/reactos/dll/win32/shell32/lang/tr-TR.rc +++ b/reactos/dll/win32/shell32/lang/tr-TR.rc @@ -617,6 +617,9 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" + IDS_SHV_COLUMN_DEVNAME "Device Name" + IDS_SHV_COLUMN_PHONE "Phone # or Host Address" + IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Masaьstь" @@ -624,6 +627,7 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Зцp" IDS_CONTROLPANEL "Control Panel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" + IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "Bь&yьk Simgeler" diff --git a/reactos/dll/win32/shell32/lang/uk-UA.rc b/reactos/dll/win32/shell32/lang/uk-UA.rc index d01b29db63d..3d6f18cc690 100644 --- a/reactos/dll/win32/shell32/lang/uk-UA.rc +++ b/reactos/dll/win32/shell32/lang/uk-UA.rc @@ -618,6 +618,9 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" + IDS_SHV_COLUMN_DEVNAME "Device Name" + IDS_SHV_COLUMN_PHONE "Phone # or Host Address" + IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Робочий стіл" @@ -625,6 +628,7 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Кошик" IDS_CONTROLPANEL "Панель керування" IDS_ADMINISTRATIVETOOLS "Administrative Tools" + IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "&Великі значки" diff --git a/reactos/dll/win32/shell32/lang/zh-CN.rc b/reactos/dll/win32/shell32/lang/zh-CN.rc index 9c221ea72d4..0cc5e85382e 100644 --- a/reactos/dll/win32/shell32/lang/zh-CN.rc +++ b/reactos/dll/win32/shell32/lang/zh-CN.rc @@ -606,6 +606,9 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" + IDS_SHV_COLUMN_DEVNAME "Device Name" + IDS_SHV_COLUMN_PHONE "Phone # or Host Address" + IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "ЧАГж" @@ -613,6 +616,7 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "»ШКХХѕ" IDS_CONTROLPANEL "їШЦЖГж°е" IDS_ADMINISTRATIVETOOLS "Administrative Tools" + IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "ґуНј±к(&G)" diff --git a/reactos/dll/win32/shell32/lang/zh-TW.rc b/reactos/dll/win32/shell32/lang/zh-TW.rc index 24561281463..e168059c540 100644 --- a/reactos/dll/win32/shell32/lang/zh-TW.rc +++ b/reactos/dll/win32/shell32/lang/zh-TW.rc @@ -618,6 +618,9 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" + IDS_SHV_COLUMN_DEVNAME "Device Name" + IDS_SHV_COLUMN_PHONE "Phone # or Host Address" + IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Desktop" @@ -625,6 +628,7 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Trash" IDS_CONTROLPANEL "Control Panel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" + IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "Lar&ge Icons" diff --git a/reactos/dll/win32/shell32/pidl.c b/reactos/dll/win32/shell32/pidl.c index b146c928a72..81a26a59575 100644 --- a/reactos/dll/win32/shell32/pidl.c +++ b/reactos/dll/win32/shell32/pidl.c @@ -1622,6 +1622,16 @@ BOOL _ILIsNetHood(LPCITEMIDLIST pidl) return FALSE; } +BOOL _ILIsNetConnect(LPCITEMIDLIST pidl) +{ + REFIID iid = _ILGetGUIDPointer(pidl); + + TRACE("(%p)\n",pidl); + + if (iid) + return IsEqualIID(iid, &CLSID_NetworkConnections); + return FALSE; +} LPITEMIDLIST _ILCreateNetHood(void) { @@ -1633,6 +1643,12 @@ LPITEMIDLIST _ILCreateFont(void) return _ILCreateGuid(PT_GUID, &CLSID_FontsFolderShortcut); } +LPITEMIDLIST _ILCreateNetConnect(void) +{ + return _ILCreateGuid(PT_GUID, &CLSID_NetworkConnections); +} + + BOOL _ILIsMyComputer(LPCITEMIDLIST pidl) { REFIID iid = _ILGetGUIDPointer(pidl); diff --git a/reactos/dll/win32/shell32/pidl.h b/reactos/dll/win32/shell32/pidl.h index 51b655bf0f8..7305a518e82 100644 --- a/reactos/dll/win32/shell32/pidl.h +++ b/reactos/dll/win32/shell32/pidl.h @@ -239,6 +239,7 @@ BOOL _ILIsControlPanel (LPCITEMIDLIST pidl); BOOL _ILIsBitBucket (LPCITEMIDLIST pidl); BOOL _ILIsAdminTools (LPCITEMIDLIST pidl); BOOL _ILIsNetHood (LPCITEMIDLIST pidl); +BOOL _ILIsNetConnect (LPCITEMIDLIST pidl); BOOL _ILIsDrive (LPCITEMIDLIST pidl); BOOL _ILIsFolder (LPCITEMIDLIST pidl); BOOL _ILIsValue (LPCITEMIDLIST pidl); @@ -287,8 +288,10 @@ LPITEMIDLIST _ILCreateControlPanel (void); LPITEMIDLIST _ILCreatePrinters (void); LPITEMIDLIST _ILCreateNetwork (void); LPITEMIDLIST _ILCreateNetHood (void); +LPITEMIDLIST _ILCreateNetConnect (void); LPITEMIDLIST _ILCreateAdminTools (void); LPITEMIDLIST _ILCreateFont (void); +LPITEMIDLIST _ILCreateNetConnect (void); LPITEMIDLIST _ILCreateBitBucket (void); LPITEMIDLIST _ILCreateDrive (LPCWSTR); diff --git a/reactos/dll/win32/shell32/precomp.h b/reactos/dll/win32/shell32/precomp.h index 962eb34cead..ef64d32b5aa 100644 --- a/reactos/dll/win32/shell32/precomp.h +++ b/reactos/dll/win32/shell32/precomp.h @@ -44,7 +44,7 @@ #include #include #include -#include +//#include #include "base/shell/explorer-new/todo.h" @@ -72,6 +72,7 @@ extern const GUID CLSID_UnixFolder; extern const GUID CLSID_UnixDosFolder; extern const GUID SHELL32_AdvtShortcutProduct; extern const GUID SHELL32_AdvtShortcutComponent; +extern const GUID CLSID_NetworkConnections; #endif diff --git a/reactos/dll/win32/shell32/regsvr.c b/reactos/dll/win32/shell32/regsvr.c index 74e6e622e80..9e98689c69b 100644 --- a/reactos/dll/win32/shell32/regsvr.c +++ b/reactos/dll/win32/shell32/regsvr.c @@ -25,6 +25,7 @@ const GUID CLSID_OpenWith = {0x09799AFB, 0xAD67, 0x11d1, {0xAB, 0 const GUID CLSID_UnixFolder = {0xcc702eb2, 0x7dc5, 0x11d9, {0xc6, 0x87, 0x00, 0x04, 0x23, 0x8a, 0x01, 0xcd}}; const GUID CLSID_UnixDosFolder = {0x9d20aae8, 0x0625, 0x44b0, {0x9c, 0xa7, 0x71, 0x88, 0x9c, 0x22, 0x54, 0xd9}}; const GUID CLSID_FontsFolderShortcut = {0xD20EA4E1, 0x3957, 0x11D2, {0xA4, 0x0B, 0x0C, 0x50, 0x20, 0x52, 0x41,0x52}}; +const GUID CLSID_NetworkConnections = {0x7007ACC7, 0x3202, 0x11D1, {0xAA, 0xD2, 0x00, 0x80, 0x5F, 0xC1, 0x27, 0x0E}}; const GUID SHELL32_AdvtShortcutProduct = {0x9db1186f, 0x40df, 0x11d1, {0xaa, 0x8c, 0x00, 0xc0, 0x4f, 0xb6, 0x78, 0x63}}; const GUID SHELL32_AdvtShortcutComponent = {0x9db1186e, 0x40df, 0x11d1, {0xaa, 0x8c, 0x00, 0xc0, 0x4f, 0xb6, 0x78, 0x63}}; @@ -622,6 +623,19 @@ static struct regsvr_coclass const coclass_list[] = { 0, NULL, NULL, + IDI_SHELL_NETWORK_FOLDER + }, + { &CLSID_NetworkConnections, + "Network Connections", + IDS_NETWORKCONNECTION, + NULL, + "shell32.dll", + "Apartment", + SHELLFOLDER_ATTRIBUTES|SHELLFOLDER_CALLFORATTRIBUTES, + SFGAO_FOLDER, + 0, + NULL, + NULL, IDI_SHELL_MY_NETWORK_PLACES }, { &CLSID_FontsFolderShortcut, @@ -745,6 +759,7 @@ static const WCHAR wszNethoodFolder[] = { 'N','e','t','h','o','o','d',' ','f','o static const WCHAR wszPrinters[] = { 'P','r','i','n','t','e','r','s',0 }; static const WCHAR wszFonts[] = { 'F','o','n','t','s',0 }; static const WCHAR wszAdminTools[] = { 'A','d','m','i','n','T','o','o','l','s',0 }; +static const WCHAR wszNetConnect[] = { 'N','e','t','w','o','r','k',' ','C','o','n','n','e','c','t','i','o','n','s',0 }; const GUID CLSID_FolderOptions = { 0x6DFD7C5C, 0x2451, 0x11d3, {0xa2,0x99,0x00,0xC0,0x4F,0x8e,0xf6,0xaf} }; static struct regsvr_namespace const namespace_extensions_list[] = { @@ -795,6 +810,11 @@ static struct regsvr_namespace const namespace_extensions_list[] = { wszControlPanel, wszAdminTools }, + { + &CLSID_NetworkConnections, + wszControlPanel, + wszNetConnect + }, { NULL } }; diff --git a/reactos/dll/win32/shell32/shell32.rbuild b/reactos/dll/win32/shell32/shell32.rbuild index 28f18f5a19d..674f56e6c1a 100644 --- a/reactos/dll/win32/shell32/shell32.rbuild +++ b/reactos/dll/win32/shell32/shell32.rbuild @@ -33,7 +33,6 @@ classes.c clipboard.c control.c - cpanelfolder.c dataobject.c dde.c debughlp.c @@ -59,6 +58,11 @@ shfldr_mydocuments.c shfldr_printers.c shfldr_admintools.c + shfldr_netplaces.c + shfldr_fonts.c + shfldr_netconnect.c + shfldr_cpanel.c + shfldr_recyclebin.c shlexec.c shlfileop.c shlfolder.c @@ -72,11 +76,8 @@ shell32.spec fprop.c drive.c - shfldr_recyclebin.c she_ocmenu.c shv_item_new.c folder_options.c - shfldr_netplaces.c - shfldr_fonts.c shell32.rc diff --git a/reactos/dll/win32/shell32/shell32_main.h b/reactos/dll/win32/shell32/shell32_main.h index a4b05a83162..2210d9664a0 100644 --- a/reactos/dll/win32/shell32/shell32_main.h +++ b/reactos/dll/win32/shell32/shell32_main.h @@ -99,6 +99,7 @@ HRESULT WINAPI ISF_Printers_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOI HRESULT WINAPI ISF_MyDocuments_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); HRESULT WINAPI ISF_NetworkPlaces_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); HRESULT WINAPI ISF_Fonts_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); +HRESULT WINAPI ISF_NetConnect_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); HRESULT WINAPI ISF_AdminTools_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); HRESULT WINAPI IDropTargetHelper_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); HRESULT WINAPI IFileSystemBindData_Constructor(const WIN32_FIND_DATAW *pfd, LPBC *ppV); diff --git a/reactos/dll/win32/shell32/shellole.c b/reactos/dll/win32/shell32/shellole.c index 13f7c30155f..48fc22a574f 100644 --- a/reactos/dll/win32/shell32/shellole.c +++ b/reactos/dll/win32/shell32/shellole.c @@ -54,6 +54,7 @@ static const struct { {&CLSID_MyDocuments, &ISF_MyDocuments_Constructor}, {&CLSID_NetworkPlaces, &ISF_NetworkPlaces_Constructor}, {&CLSID_FontsFolderShortcut, &ISF_Fonts_Constructor}, + {&CLSID_NetworkConnections, &ISF_NetConnect_Constructor}, {&CLSID_Printers, &ISF_Printers_Constructor}, {&CLSID_AdminFolderShortcut, &ISF_AdminTools_Constructor}, {&CLSID_RecycleBin, &RecycleBin_Constructor}, diff --git a/reactos/dll/win32/shell32/shfldr_netconnect.c b/reactos/dll/win32/shell32/shfldr_netconnect.c new file mode 100644 index 00000000000..3b7f414bc9b --- /dev/null +++ b/reactos/dll/win32/shell32/shfldr_netconnect.c @@ -0,0 +1,781 @@ +/* + * Network Connections Shell Folder + * + * Copyright 2008 Johannes Anderwald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +WINE_DEFAULT_DEBUG_CHANNEL (shell); + +/*********************************************************************** +* IShellFolder implementation +*/ + +typedef struct { + const IShellFolder2Vtbl *lpVtbl; + LONG ref; + const IContextMenu2Vtbl *lpVtblContextMenu; + const IPersistFolder2Vtbl *lpVtblPersistFolder2; + + /* both paths are parsible from the desktop */ + LPITEMIDLIST pidlRoot; /* absolute pidl */ + LPCITEMIDLIST apidl; /* currently focused font item */ +} IGenericSFImpl, *LPIGenericSFImpl; + + +static const shvheader NetConnectSFHeader[] = { + {IDS_SHV_COLUMN8, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, + {IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, + {IDS_SHV_COLUMN_STATUS, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, + {IDS_SHV_COLUMN_DEVNAME, SHCOLSTATE_TYPE_DATE | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 12}, + {IDS_SHV_COLUMN_PHONE, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, + {IDS_SHV_COLUMN_OWNER, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 5} +}; + +#define NETCONNECTSHELLVIEWCOLUMNS 6 + +#define COLUMN_NAME 0 +#define COLUMN_TYPE 1 +#define COLUMN_STATUS 2 +#define COLUMN_DEVNAME 3 +#define COLUMN_PHONE 4 +#define COLUMN_OWNER 5 + +static LPIGenericSFImpl __inline impl_from_IContextMenu2(IContextMenu2 *iface) +{ + return (LPIGenericSFImpl)((char *)iface - FIELD_OFFSET(IGenericSFImpl, lpVtblContextMenu)); +} + +static LPIGenericSFImpl __inline impl_from_IPersistFolder2(IPersistFolder2 *iface) +{ + return (LPIGenericSFImpl)((char *)iface - FIELD_OFFSET(IGenericSFImpl, lpVtblPersistFolder2)); +} + +/************************************************************************** + * ISF_NetConnect_fnQueryInterface + * + * NOTE + * supports not IPersist/IPersistFolder + */ +static HRESULT WINAPI ISF_NetConnect_fnQueryInterface (IShellFolder2 *iface, REFIID riid, LPVOID *ppvObj) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj); + + *ppvObj = NULL; + + if (IsEqualIID (riid, &IID_IUnknown) || + IsEqualIID (riid, &IID_IShellFolder) || + IsEqualIID (riid, &IID_IShellFolder2)) + { + *ppvObj = This; + } + else if (IsEqualIID (riid, &IID_IPersistFolder) || + IsEqualIID (riid, &IID_IPersistFolder2)) + { + *ppvObj = (LPVOID *)&This->lpVtblPersistFolder2; + } + if (*ppvObj) + { + IUnknown_AddRef ((IUnknown *) (*ppvObj)); + TRACE ("-- Interface: (%p)->(%p)\n", ppvObj, *ppvObj); + return S_OK; + } + + TRACE ("-- Interface: E_NOINTERFACE\n"); + return E_NOINTERFACE; +} + +static ULONG WINAPI ISF_NetConnect_fnAddRef (IShellFolder2 * iface) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + ULONG refCount = InterlockedIncrement(&This->ref); + + TRACE ("(%p)->(count=%u)\n", This, refCount - 1); + + return refCount; +} + +static ULONG WINAPI ISF_NetConnect_fnRelease (IShellFolder2 * iface) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + ULONG refCount = InterlockedDecrement(&This->ref); + + TRACE ("(%p)->(count=%u)\n", This, refCount + 1); + + if (!refCount) { + TRACE ("-- destroying IShellFolder(%p)\n", This); + SHFree (This->pidlRoot); + HeapFree (GetProcessHeap(), 0, This); + } + return refCount; +} + +/************************************************************************** +* ISF_NetConnect_fnParseDisplayName +*/ +static HRESULT WINAPI ISF_NetConnect_fnParseDisplayName (IShellFolder2 * iface, + HWND hwndOwner, LPBC pbcReserved, LPOLESTR lpszDisplayName, + DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + HRESULT hr = E_UNEXPECTED; + + TRACE ("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n", This, + hwndOwner, pbcReserved, lpszDisplayName, debugstr_w (lpszDisplayName), + pchEaten, ppidl, pdwAttributes); + + *ppidl = 0; + if (pchEaten) + *pchEaten = 0; /* strange but like the original */ + + TRACE ("(%p)->(-- ret=0x%08x)\n", This, hr); + + return hr; +} + +/************************************************************************** + * CreateNetConnectEnumListss() + */ +static BOOL CreateNetConnectEnumList(IEnumIDList *list, DWORD dwFlags) +{ + + return FALSE; +} + +/************************************************************************** +* ISF_NetConnect_fnEnumObjects +*/ +static HRESULT WINAPI ISF_NetConnect_fnEnumObjects (IShellFolder2 * iface, + HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST * ppEnumIDList) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + TRACE ("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", This, + hwndOwner, dwFlags, ppEnumIDList); + + *ppEnumIDList = IEnumIDList_Constructor(); + if(*ppEnumIDList) + CreateNetConnectEnumList(*ppEnumIDList, dwFlags); + + TRACE ("-- (%p)->(new ID List: %p)\n", This, *ppEnumIDList); + + return (*ppEnumIDList) ? S_OK : E_OUTOFMEMORY; +} + +/************************************************************************** +* ISF_NetConnect_fnBindToObject +*/ +static HRESULT WINAPI ISF_NetConnect_fnBindToObject (IShellFolder2 * iface, + LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", This, + pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); + + return SHELL32_BindToChild (This->pidlRoot, NULL, pidl, riid, ppvOut); +} + +/************************************************************************** +* ISF_NetConnect_fnBindToStorage +*/ +static HRESULT WINAPI ISF_NetConnect_fnBindToStorage (IShellFolder2 * iface, + LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n", This, + pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); + + *ppvOut = NULL; + return E_NOTIMPL; +} + +/************************************************************************** +* ISF_NetConnect_fnCompareIDs +*/ + +static HRESULT WINAPI ISF_NetConnect_fnCompareIDs (IShellFolder2 * iface, + LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + int nReturn; + + TRACE ("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", This, lParam, pidl1, pidl2); + nReturn = SHELL32_CompareIDs ((IShellFolder*)This, lParam, pidl1, pidl2); + TRACE ("-- %i\n", nReturn); + return nReturn; +} + +/************************************************************************** +* ISF_NetConnect_fnCreateViewObject +*/ +static HRESULT WINAPI ISF_NetConnect_fnCreateViewObject (IShellFolder2 * iface, + HWND hwndOwner, REFIID riid, LPVOID * ppvOut) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + LPSHELLVIEW pShellView; + HRESULT hr = E_INVALIDARG; + + TRACE ("(%p)->(hwnd=%p,%s,%p)\n", This, + hwndOwner, shdebugstr_guid (riid), ppvOut); + + if (!ppvOut) + return hr; + + *ppvOut = NULL; + + if (IsEqualIID (riid, &IID_IShellView)) + { + pShellView = IShellView_Constructor ((IShellFolder *) iface); + if (pShellView) + { + hr = IShellView_QueryInterface (pShellView, riid, ppvOut); + IShellView_Release (pShellView); + } + } + TRACE ("-- (%p)->(interface=%p)\n", This, ppvOut); + return hr; +} + +/************************************************************************** +* ISF_NetConnect_fnGetAttributesOf +*/ +static HRESULT WINAPI ISF_NetConnect_fnGetAttributesOf (IShellFolder2 * iface, + UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + HRESULT hr = S_OK; + + TRACE ("(%p)->(cidl=%d apidl=%p mask=%p (0x%08x))\n", This, + cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0); + + if (!rgfInOut) + return E_INVALIDARG; + if (cidl && !apidl) + return E_INVALIDARG; + + if (*rgfInOut == 0) + *rgfInOut = ~0; + + /* make sure SFGAO_VALIDATE is cleared, some apps depend on that */ + *rgfInOut &= ~SFGAO_VALIDATE; + + TRACE ("-- result=0x%08x\n", *rgfInOut); + return hr; +} + +/************************************************************************** +* ISF_NetConnect_fnGetUIObjectOf +* +* PARAMETERS +* hwndOwner [in] Parent window for any output +* cidl [in] array size +* apidl [in] simple pidl array +* riid [in] Requested Interface +* prgfInOut [ ] reserved +* ppvObject [out] Resulting Interface +* +*/ +static HRESULT WINAPI ISF_NetConnect_fnGetUIObjectOf (IShellFolder2 * iface, + HWND hwndOwner, UINT cidl, LPCITEMIDLIST * apidl, REFIID riid, + UINT * prgfInOut, LPVOID * ppvOut) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + IUnknown *pObj = NULL; + HRESULT hr = E_INVALIDARG; + + TRACE ("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n", This, + hwndOwner, cidl, apidl, shdebugstr_guid (riid), prgfInOut, ppvOut); + + if (!ppvOut) + return hr; + + *ppvOut = NULL; + + if (IsEqualIID (riid, &IID_IContextMenu) && (cidl >= 1)) + { + pObj = (IUnknown*)(&This->lpVtblContextMenu); + This->apidl = apidl[0]; + IUnknown_AddRef(pObj); + hr = S_OK; + } + else + hr = E_NOINTERFACE; + + if (SUCCEEDED(hr) && !pObj) + hr = E_OUTOFMEMORY; + + *ppvOut = pObj; + TRACE ("(%p)->hr=0x%08x\n", This, hr); + return hr; +} + +/************************************************************************** +* ISF_NetConnect_fnGetDisplayNameOf +* +*/ +static HRESULT WINAPI ISF_NetConnect_fnGetDisplayNameOf (IShellFolder2 * iface, + LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) +{ + LPWSTR pszName; + HRESULT hr = E_FAIL; + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + TRACE("ISF_NetConnect_fnGetDisplayNameOf (%p)->(pidl=%p,0x%08x,%p)\n", This, pidl, dwFlags, strRet); + + if (!strRet) + return E_INVALIDARG; + + pszName = CoTaskMemAlloc(MAX_PATH * sizeof(WCHAR)); + if (!pszName) + return E_OUTOFMEMORY; + + if (_ILIsNetConnect (pidl)) + { + if (HCR_GetClassNameW(&CLSID_NetworkConnections, pszName, MAX_PATH)) + hr = S_OK; + } + + if (SUCCEEDED(hr)) + { + strRet->uType = STRRET_WSTR; + strRet->u.pOleStr = pszName; + } + else + CoTaskMemFree(pszName); + + return hr; +} + +/************************************************************************** +* ISF_NetConnect_fnSetNameOf +* Changes the name of a file object or subfolder, possibly changing its item +* identifier in the process. +* +* PARAMETERS +* hwndOwner [in] Owner window for output +* pidl [in] simple pidl of item to change +* lpszName [in] the items new display name +* dwFlags [in] SHGNO formatting flags +* ppidlOut [out] simple pidl returned +*/ +static HRESULT WINAPI ISF_NetConnect_fnSetNameOf (IShellFolder2 * iface, + HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */ + LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + FIXME ("(%p)->(%p,pidl=%p,%s,%u,%p)\n", This, + hwndOwner, pidl, debugstr_w (lpName), dwFlags, pPidlOut); + return E_NOTIMPL; +} + +static HRESULT WINAPI ISF_NetConnect_fnGetDefaultSearchGUID ( + IShellFolder2 * iface, GUID * pguid) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + FIXME ("(%p)\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI ISF_NetConnect_fnEnumSearches (IShellFolder2 * iface, + IEnumExtraSearch ** ppenum) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + FIXME ("(%p)\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI ISF_NetConnect_fnGetDefaultColumn (IShellFolder2 * iface, + DWORD dwRes, ULONG * pSort, ULONG * pDisplay) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + TRACE ("(%p)\n", This); + + if (pSort) + *pSort = 0; + if (pDisplay) + *pDisplay = 0; + + return S_OK; +} + +static HRESULT WINAPI ISF_NetConnect_fnGetDefaultColumnState ( + IShellFolder2 * iface, UINT iColumn, DWORD * pcsFlags) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + TRACE ("(%p)\n", This); + + if (!pcsFlags || iColumn >= NETCONNECTSHELLVIEWCOLUMNS) + return E_INVALIDARG; + *pcsFlags = NetConnectSFHeader[iColumn].pcsFlags; + return S_OK; +} + +static HRESULT WINAPI ISF_NetConnect_fnGetDetailsEx (IShellFolder2 * iface, + LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + FIXME ("(%p)\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI ISF_NetConnect_fnGetDetailsOf (IShellFolder2 * iface, + LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS * psd) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + WCHAR buffer[MAX_PATH] = {0}; + HRESULT hr = E_FAIL; + + TRACE("(%p, %p, %d, %p)\n", This, pidl, iColumn, psd); + + if (iColumn >= NETCONNECTSHELLVIEWCOLUMNS) + return E_FAIL; + + psd->fmt = NetConnectSFHeader[iColumn].fmt; + psd->cxChar = NetConnectSFHeader[iColumn].cxChar; + if (pidl == NULL) + { + psd->str.uType = STRRET_WSTR; + if (LoadStringW(shell32_hInstance, NetConnectSFHeader[iColumn].colnameid, buffer, MAX_PATH)) + hr = SHStrDupW(buffer, &psd->str.u.pOleStr); + + return hr; + } + + if (iColumn == COLUMN_NAME) + { + psd->str.uType = STRRET_WSTR; + return IShellFolder2_GetDisplayNameOf(iface, pidl, SHGDN_NORMAL, &psd->str); + } + + psd->str.uType = STRRET_CSTR; + psd->str.u.cStr[0] = '\0'; + + switch(iColumn) + { + case COLUMN_NAME: + case COLUMN_TYPE: + case COLUMN_STATUS: + case COLUMN_DEVNAME: + case COLUMN_PHONE: + case COLUMN_OWNER: + break; + } + + return E_FAIL; +} + +static HRESULT WINAPI ISF_NetConnect_fnMapColumnToSCID (IShellFolder2 * iface, + UINT column, SHCOLUMNID * pscid) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + FIXME ("(%p)\n", This); + + return E_NOTIMPL; +} + +static const IShellFolder2Vtbl vt_ShellFolder2 = { + ISF_NetConnect_fnQueryInterface, + ISF_NetConnect_fnAddRef, + ISF_NetConnect_fnRelease, + ISF_NetConnect_fnParseDisplayName, + ISF_NetConnect_fnEnumObjects, + ISF_NetConnect_fnBindToObject, + ISF_NetConnect_fnBindToStorage, + ISF_NetConnect_fnCompareIDs, + ISF_NetConnect_fnCreateViewObject, + ISF_NetConnect_fnGetAttributesOf, + ISF_NetConnect_fnGetUIObjectOf, + ISF_NetConnect_fnGetDisplayNameOf, + ISF_NetConnect_fnSetNameOf, + /* ShellFolder2 */ + ISF_NetConnect_fnGetDefaultSearchGUID, + ISF_NetConnect_fnEnumSearches, + ISF_NetConnect_fnGetDefaultColumn, + ISF_NetConnect_fnGetDefaultColumnState, + ISF_NetConnect_fnGetDetailsEx, + ISF_NetConnect_fnGetDetailsOf, + ISF_NetConnect_fnMapColumnToSCID +}; + +/************************************************************************** +* IContextMenu2 Implementation +*/ + +/************************************************************************ + * ISF_NetConnect_IContextMenu_QueryInterface + */ +static HRESULT WINAPI ISF_NetConnect_IContextMenu2_QueryInterface(IContextMenu2 * iface, REFIID iid, LPVOID * ppvObject) +{ + IGenericSFImpl * This = impl_from_IContextMenu2(iface); + + TRACE("(%p)\n", This); + + return IShellFolder2_QueryInterface((IShellFolder2*)This, iid, ppvObject); +} + +/************************************************************************ + * ISF_NetConnect_IContextMenu_AddRef + */ +static ULONG WINAPI ISF_NetConnect_IContextMenu2_AddRef(IContextMenu2 * iface) +{ + IGenericSFImpl * This = impl_from_IContextMenu2(iface); + + TRACE("(%p)->(count=%u)\n", This, This->ref); + + return IShellFolder2_AddRef((IShellFolder2*)This); +} + +/************************************************************************ + * ISF_NetConnect_IContextMenu_Release + */ +static ULONG WINAPI ISF_NetConnect_IContextMenu2_Release(IContextMenu2 * iface) +{ + IGenericSFImpl * This = impl_from_IContextMenu2(iface); + + TRACE("(%p)->(count=%u)\n", This, This->ref); + + return IShellFolder2_Release((IShellFolder2*)This); +} + +/************************************************************************** +* ISF_NetConnect_IContextMenu_QueryContextMenu() +*/ +static HRESULT WINAPI ISF_NetConnect_IContextMenu2_QueryContextMenu( + IContextMenu2 *iface, + HMENU hMenu, + UINT indexMenu, + UINT idCmdFirst, + UINT idCmdLast, + UINT uFlags) +{ + int Count = 1; + IGenericSFImpl * This = impl_from_IContextMenu2(iface); + + TRACE("(%p)->(hmenu=%p indexmenu=%x cmdfirst=%x cmdlast=%x flags=%x )\n", + This, hMenu, indexMenu, idCmdFirst, idCmdLast, uFlags); + + return MAKE_HRESULT(SEVERITY_SUCCESS, 0, Count); +} + + +/************************************************************************** +* ISF_NetConnect_IContextMenu_InvokeCommand() +*/ +static HRESULT WINAPI ISF_NetConnect_IContextMenu2_InvokeCommand( + IContextMenu2 *iface, + LPCMINVOKECOMMANDINFO lpcmi) +{ + IGenericSFImpl * This = impl_from_IContextMenu2(iface); + + + TRACE("(%p)->(invcom=%p verb=%p wnd=%p)\n",This,lpcmi,lpcmi->lpVerb, lpcmi->hwnd); + + return S_OK; +} + +/************************************************************************** + * ISF_NetConnect_IContextMenu_GetCommandString() + * + */ +static HRESULT WINAPI ISF_NetConnect_IContextMenu2_GetCommandString( + IContextMenu2 *iface, + UINT_PTR idCommand, + UINT uFlags, + UINT* lpReserved, + LPSTR lpszName, + UINT uMaxNameLen) +{ + IGenericSFImpl * This = impl_from_IContextMenu2(iface); + + TRACE("(%p)->(idcom=%lx flags=%x %p name=%p len=%x)\n",This, idCommand, uFlags, lpReserved, lpszName, uMaxNameLen); + + + return E_FAIL; +} + + + +/************************************************************************** +* ISF_NetConnect_IContextMenu_HandleMenuMsg() +*/ +static HRESULT WINAPI ISF_NetConnect_IContextMenu2_HandleMenuMsg( + IContextMenu2 *iface, + UINT uMsg, + WPARAM wParam, + LPARAM lParam) +{ + IGenericSFImpl * This = impl_from_IContextMenu2(iface); + + + TRACE("ISF_NetConnect_IContextMenu_HandleMenuMsg (%p)->(msg=%x wp=%lx lp=%lx)\n",This, uMsg, wParam, lParam); + + return E_NOTIMPL; +} + +static const IContextMenu2Vtbl vt_ContextMenu2 = +{ + ISF_NetConnect_IContextMenu2_QueryInterface, + ISF_NetConnect_IContextMenu2_AddRef, + ISF_NetConnect_IContextMenu2_Release, + ISF_NetConnect_IContextMenu2_QueryContextMenu, + ISF_NetConnect_IContextMenu2_InvokeCommand, + ISF_NetConnect_IContextMenu2_GetCommandString, + ISF_NetConnect_IContextMenu2_HandleMenuMsg +}; + +/************************************************************************ + * ISF_NetConnect_PersistFolder2_QueryInterface + */ +static HRESULT WINAPI ISF_NetConnect_PersistFolder2_QueryInterface (IPersistFolder2 * iface, + REFIID iid, LPVOID * ppvObj) +{ + IGenericSFImpl * This = impl_from_IPersistFolder2(iface); + + TRACE ("(%p)\n", This); + + return IShellFolder2_QueryInterface ((IShellFolder2*)This, iid, ppvObj); +} + +/************************************************************************ + * ISF_NetConnect_PersistFolder2_AddRef + */ +static ULONG WINAPI ISF_NetConnect_PersistFolder2_AddRef (IPersistFolder2 * iface) +{ + IGenericSFImpl * This = impl_from_IPersistFolder2(iface); + + TRACE ("(%p)->(count=%u)\n", This, This->ref); + + return IShellFolder2_AddRef((IShellFolder2*)This); +} + +/************************************************************************ + * ISF_NetConnect_PersistFolder2_Release + */ +static ULONG WINAPI ISF_NetConnect_PersistFolder2_Release (IPersistFolder2 * iface) +{ + IGenericSFImpl * This = impl_from_IPersistFolder2(iface); + + TRACE ("(%p)->(count=%u)\n", This, This->ref); + + return IShellFolder2_Release((IShellFolder2*)This); +} + +/************************************************************************ + * ISF_NetConnect_PersistFolder2_GetClassID + */ +static HRESULT WINAPI ISF_NetConnect_PersistFolder2_GetClassID ( + IPersistFolder2 * iface, CLSID * lpClassId) +{ + IGenericSFImpl * This = impl_from_IPersistFolder2(iface); + + TRACE ("(%p)\n", This); + + if (!lpClassId) + return E_POINTER; + + *lpClassId = CLSID_NetworkConnections; + + return S_OK; +} + +/************************************************************************ + * ISF_NetConnect_PersistFolder2_Initialize + * + * NOTES: it makes no sense to change the pidl + */ +static HRESULT WINAPI ISF_NetConnect_PersistFolder2_Initialize ( + IPersistFolder2 * iface, LPCITEMIDLIST pidl) +{ + IGenericSFImpl * This = impl_from_IPersistFolder2(iface); + + TRACE ("(%p)->(%p)\n", This, pidl); + + + return E_NOTIMPL; +} + +/************************************************************************** + * ISF_NetConnect_PersistFolder2_GetCurFolder + */ +static HRESULT WINAPI ISF_NetConnect_PersistFolder2_GetCurFolder ( + IPersistFolder2 * iface, LPITEMIDLIST * pidl) +{ + IGenericSFImpl * This = impl_from_IPersistFolder2(iface); + + TRACE ("(%p)->(%p)\n", This, pidl); + + if (!pidl) + return E_POINTER; + + *pidl = ILClone (This->pidlRoot); + + return S_OK; +} + +static const IPersistFolder2Vtbl vt_PersistFolder2 = +{ + ISF_NetConnect_PersistFolder2_QueryInterface, + ISF_NetConnect_PersistFolder2_AddRef, + ISF_NetConnect_PersistFolder2_Release, + ISF_NetConnect_PersistFolder2_GetClassID, + ISF_NetConnect_PersistFolder2_Initialize, + ISF_NetConnect_PersistFolder2_GetCurFolder +}; + +/************************************************************************** +* ISF_NetConnect_Constructor +*/ +HRESULT WINAPI ISF_NetConnect_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) +{ + IGenericSFImpl *sf; + + TRACE ("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid (riid)); + + if (!ppv) + return E_POINTER; + if (pUnkOuter) + return CLASS_E_NOAGGREGATION; + + sf = (IGenericSFImpl *) HeapAlloc ( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof (IGenericSFImpl)); + if (!sf) + return E_OUTOFMEMORY; + + sf->ref = 1; + sf->lpVtbl = &vt_ShellFolder2; + sf->lpVtblPersistFolder2 = &vt_PersistFolder2; + sf->lpVtblContextMenu = &vt_ContextMenu2; + sf->pidlRoot = _ILCreateNetConnect(); /* my qualified pidl */ + + if (!SUCCEEDED (IShellFolder2_QueryInterface ((IShellFolder2*)sf, riid, ppv))) + { + IShellFolder2_Release((IShellFolder2*)sf); + return E_NOINTERFACE; + } + + TRACE ("--(%p)\n", sf); + return S_OK; +} diff --git a/reactos/dll/win32/shell32/shresdef.h b/reactos/dll/win32/shell32/shresdef.h index 66ae980124b..39202a6d4a9 100644 --- a/reactos/dll/win32/shell32/shresdef.h +++ b/reactos/dll/win32/shell32/shresdef.h @@ -89,6 +89,7 @@ #define IDS_NETWORKPLACE 75 #define IDS_FONTS 76 #define IDS_PRINTERS 77 +#define IDS_NETWORKCONNECTION 78 #define IDS_CREATEFOLDER_DENIED 128 #define IDS_CREATEFOLDER_CAPTION 129 @@ -165,6 +166,10 @@ #define IDS_FORMATDRIVE 327 #define IDS_RENAME 328 #define IDS_INSERT 329 +#define IDS_SHV_COLUMN_DEVNAME 330 +#define IDS_SHV_COLUMN_PHONE 331 +#define IDS_SHV_COLUMN_OWNER 332 + /* Note: this string is referenced from the registry */ #define IDS_RECYCLEBIN_FOLDER_NAME 8964 @@ -241,6 +246,7 @@ #define IDI_SHELL_MY_DOCUMENTS 235 #define IDI_SHELL_CONTROL_PANEL1 330 #define IDI_SHELL_ADMINTOOLS 328 +#define IDI_SHELL_NETWORK_FOLDER 172 // Icons for Folder Options (ID's identical to Windows XP SP3) #define IDI_SHELL_SHOW_COMMON_TASKS 182 From 9a1009363bd1fba9603cf5258181d5e6f3f1836d Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Tue, 26 Aug 2008 22:35:44 +0000 Subject: [PATCH 194/324] - Revert 35686 - NetworkConnections is implemented in netshell.dll svn path=/trunk/; revision=35688 --- reactos/dll/win32/shell32/classes.c | 6 +- reactos/dll/win32/shell32/cpanelfolder.c | 1373 +++++++++++++++++ reactos/dll/win32/shell32/lang/bg-BG.rc | 4 - reactos/dll/win32/shell32/lang/ca-ES.rc | 4 - reactos/dll/win32/shell32/lang/cs-CZ.rc | 4 - reactos/dll/win32/shell32/lang/da-DK.rc | 4 - reactos/dll/win32/shell32/lang/de-DE.rc | 5 +- reactos/dll/win32/shell32/lang/el-GR.rc | 4 - reactos/dll/win32/shell32/lang/en-GB.rc | 4 - reactos/dll/win32/shell32/lang/en-US.rc | 4 - reactos/dll/win32/shell32/lang/es-ES.rc | 4 - reactos/dll/win32/shell32/lang/fi-FI.rc | 4 - reactos/dll/win32/shell32/lang/fr-FR.rc | 4 - reactos/dll/win32/shell32/lang/hu-HU.rc | 4 - reactos/dll/win32/shell32/lang/it-IT.rc | 4 - reactos/dll/win32/shell32/lang/ja-JP.rc | 4 - reactos/dll/win32/shell32/lang/ko-KR.rc | 4 - reactos/dll/win32/shell32/lang/nl-NL.rc | 4 - reactos/dll/win32/shell32/lang/no-NO.rc | 4 - reactos/dll/win32/shell32/lang/pl-PL.rc | 4 - reactos/dll/win32/shell32/lang/pt-BR.rc | 4 - reactos/dll/win32/shell32/lang/pt-PT.rc | 4 - reactos/dll/win32/shell32/lang/ru-RU.rc | 4 - reactos/dll/win32/shell32/lang/sk-SK.rc | 4 - reactos/dll/win32/shell32/lang/sl-SI.rc | 4 - reactos/dll/win32/shell32/lang/sv-SE.rc | 4 - reactos/dll/win32/shell32/lang/tr-TR.rc | 4 - reactos/dll/win32/shell32/lang/uk-UA.rc | 4 - reactos/dll/win32/shell32/lang/zh-CN.rc | 4 - reactos/dll/win32/shell32/lang/zh-TW.rc | 4 - reactos/dll/win32/shell32/pidl.c | 16 - reactos/dll/win32/shell32/pidl.h | 3 - reactos/dll/win32/shell32/precomp.h | 3 +- reactos/dll/win32/shell32/regsvr.c | 20 - reactos/dll/win32/shell32/shell32.rbuild | 1 - reactos/dll/win32/shell32/shell32_main.h | 1 - reactos/dll/win32/shell32/shellole.c | 1 - reactos/dll/win32/shell32/shfldr_netconnect.c | 781 ---------- reactos/dll/win32/shell32/shresdef.h | 6 - 39 files changed, 1376 insertions(+), 948 deletions(-) create mode 100644 reactos/dll/win32/shell32/cpanelfolder.c delete mode 100644 reactos/dll/win32/shell32/shfldr_netconnect.c diff --git a/reactos/dll/win32/shell32/classes.c b/reactos/dll/win32/shell32/classes.c index ee5209f13b1..0b498aba86b 100644 --- a/reactos/dll/win32/shell32/classes.c +++ b/reactos/dll/win32/shell32/classes.c @@ -386,11 +386,7 @@ BOOL HCR_GetClassNameW(REFIID riid, LPWSTR szDest, DWORD len) if(LoadStringW(shell32_hInstance, IDS_ADMINISTRATIVETOOLS, szDest, buflen)) ret = TRUE; } - else if (IsEqualIID(riid, &CLSID_NetworkConnections)) - { - if(LoadStringW(shell32_hInstance, IDS_NETWORKCONNECTION, szDest, buflen)) - ret = TRUE; - } + } TRACE("-- %s\n", debugstr_w(szDest)); return ret; diff --git a/reactos/dll/win32/shell32/cpanelfolder.c b/reactos/dll/win32/shell32/cpanelfolder.c new file mode 100644 index 00000000000..d96ba91746b --- /dev/null +++ b/reactos/dll/win32/shell32/cpanelfolder.c @@ -0,0 +1,1373 @@ +/* + * Control panel folder + * + * Copyright 2003 Martin Fuchs + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + + +#include + + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +/*********************************************************************** +* control panel implementation in shell namespace +*/ + +typedef struct { + const IShellFolder2Vtbl *lpVtbl; + LONG ref; + const IPersistFolder2Vtbl *lpVtblPersistFolder2; + const IShellExecuteHookWVtbl *lpVtblShellExecuteHookW; + const IShellExecuteHookAVtbl *lpVtblShellExecuteHookA; + const IContextMenu2Vtbl *lpVtblContextMenu; + IUnknown *pUnkOuter; /* used for aggregation */ + + /* both paths are parsible from the desktop */ + LPITEMIDLIST pidlRoot; /* absolute pidl */ + int dwAttributes; /* attributes returned by GetAttributesOf FIXME: use it */ + LPCITEMIDLIST *apidl; + UINT cidl; +} ICPanelImpl, *LPICPanelImpl; + +static const IShellFolder2Vtbl vt_ShellFolder2; +static const IPersistFolder2Vtbl vt_PersistFolder2; +static const IShellExecuteHookWVtbl vt_ShellExecuteHookW; +static const IShellExecuteHookAVtbl vt_ShellExecuteHookA; +static const IContextMenu2Vtbl vt_ContextMenu; + +static LPICPanelImpl __inline impl_from_IPersistFolder2( IPersistFolder2 *iface ) +{ + return (LPICPanelImpl)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblPersistFolder2)); +} + +static LPICPanelImpl __inline impl_from_IContextMenu( IContextMenu2 *iface ) +{ + return (LPICPanelImpl)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblContextMenu)); +} + + +static LPICPanelImpl __inline impl_from_IShellExecuteHookW( IShellExecuteHookW *iface ) +{ + return (LPICPanelImpl)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblShellExecuteHookW)); +} + +static LPICPanelImpl __inline impl_from_IShellExecuteHookA( IShellExecuteHookA *iface ) +{ + return (LPICPanelImpl)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblShellExecuteHookA)); +} + + +/* + converts This to an interface pointer +*/ +#define _IUnknown_(This) (IUnknown*)&(This->lpVtbl) +#define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl) +#define _IShellFolder2_(This) (IShellFolder2*)&(This->lpVtbl) + +#define _IPersist_(This) (IPersist*)&(This->lpVtblPersistFolder2) +#define _IPersistFolder_(This) (IPersistFolder*)&(This->lpVtblPersistFolder2) +#define _IPersistFolder2_(This) (IPersistFolder2*)&(This->lpVtblPersistFolder2) +#define _IShellExecuteHookW_(This) (IShellExecuteHookW*)&(This->lpVtblShellExecuteHookW) +#define _IShellExecuteHookA_(This) (IShellExecuteHookA*)&(This->lpVtblShellExecuteHookA) + + +/*********************************************************************** +* IShellFolder [ControlPanel] implementation +*/ + +static const shvheader ControlPanelSFHeader[] = { + {IDS_SHV_COLUMN8, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15},/*FIXME*/ + {IDS_SHV_COLUMN9, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 200},/*FIXME*/ +}; + +#define CONROLPANELSHELLVIEWCOLUMNS 2 + +/************************************************************************** +* IControlPanel_Constructor +*/ +HRESULT WINAPI IControlPanel_Constructor(IUnknown* pUnkOuter, REFIID riid, LPVOID * ppv) +{ + ICPanelImpl *sf; + + TRACE("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid(riid)); + + if (!ppv) + return E_POINTER; + if (pUnkOuter && !IsEqualIID (riid, &IID_IUnknown)) + return CLASS_E_NOAGGREGATION; + + sf = (ICPanelImpl *) LocalAlloc(LMEM_ZEROINIT, sizeof(ICPanelImpl)); + if (!sf) + return E_OUTOFMEMORY; + + sf->ref = 0; + sf->apidl = NULL; + sf->cidl = 0; + sf->lpVtbl = &vt_ShellFolder2; + sf->lpVtblPersistFolder2 = &vt_PersistFolder2; + sf->lpVtblShellExecuteHookW = &vt_ShellExecuteHookW; + sf->lpVtblShellExecuteHookA = &vt_ShellExecuteHookA; + sf->lpVtblContextMenu = &vt_ContextMenu; + sf->pidlRoot = _ILCreateControlPanel(); /* my qualified pidl */ + sf->pUnkOuter = pUnkOuter ? pUnkOuter : _IUnknown_ (sf); + + if (!SUCCEEDED(IUnknown_QueryInterface(_IUnknown_(sf), riid, ppv))) { + IUnknown_Release(_IUnknown_(sf)); + return E_NOINTERFACE; + } + + TRACE("--(%p)\n", sf); + return S_OK; +} + +/************************************************************************** + * ISF_ControlPanel_fnQueryInterface + * + * NOTES supports not IPersist/IPersistFolder + */ +static HRESULT WINAPI ISF_ControlPanel_fnQueryInterface(IShellFolder2 * iface, REFIID riid, LPVOID * ppvObject) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + TRACE("(%p)->(%s,%p)\n", This, shdebugstr_guid(riid), ppvObject); + + *ppvObject = NULL; + + if (IsEqualIID(riid, &IID_IUnknown) || + IsEqualIID(riid, &IID_IShellFolder) || IsEqualIID(riid, &IID_IShellFolder2)) + *ppvObject = This; + else if (IsEqualIID(riid, &IID_IPersist) || + IsEqualIID(riid, &IID_IPersistFolder) || IsEqualIID(riid, &IID_IPersistFolder2)) + *ppvObject = _IPersistFolder2_(This); + else if (IsEqualIID(riid, &IID_IShellExecuteHookW)) + *ppvObject = _IShellExecuteHookW_(This); + else if (IsEqualIID(riid, &IID_IShellExecuteHookA)) + *ppvObject = _IShellExecuteHookA_(This); + + if (*ppvObject) { + IUnknown_AddRef((IUnknown *)(*ppvObject)); + TRACE("-- Interface:(%p)->(%p)\n", ppvObject, *ppvObject); + return S_OK; + } + TRACE("-- Interface: E_NOINTERFACE\n"); + return E_NOINTERFACE; +} + +static ULONG WINAPI ISF_ControlPanel_fnAddRef(IShellFolder2 * iface) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + ULONG refCount = InterlockedIncrement(&This->ref); + + TRACE("(%p)->(count=%u)\n", This, refCount - 1); + + return refCount; +} + +static ULONG WINAPI ISF_ControlPanel_fnRelease(IShellFolder2 * iface) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + ULONG refCount = InterlockedDecrement(&This->ref); + + TRACE("(%p)->(count=%u)\n", This, refCount + 1); + + if (!refCount) { + TRACE("-- destroying IShellFolder(%p)\n", This); + SHFree(This->pidlRoot); + LocalFree((HLOCAL) This); + } + return refCount; +} + +/************************************************************************** +* ISF_ControlPanel_fnParseDisplayName +*/ +static HRESULT WINAPI +ISF_ControlPanel_fnParseDisplayName(IShellFolder2 * iface, + HWND hwndOwner, + LPBC pbc, + LPOLESTR lpszDisplayName, + DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + HRESULT hr = E_INVALIDARG; + + FIXME("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n", + This, hwndOwner, pbc, lpszDisplayName, debugstr_w(lpszDisplayName), pchEaten, ppidl, pdwAttributes); + + *ppidl = 0; + if (pchEaten) + *pchEaten = 0; + + TRACE("(%p)->(-- ret=0x%08x)\n", This, hr); + + return hr; +} + +static LPITEMIDLIST _ILCreateCPanelApplet(LPCSTR name, LPCSTR displayName, + LPCSTR comment, int iconIdx) +{ + PIDLCPanelStruct *p; + LPITEMIDLIST pidl; + PIDLDATA tmp; + int size0 = (char*)&tmp.u.cpanel.szName-(char*)&tmp.u.cpanel; + int size = size0; + int l; + + tmp.type = PT_CPLAPPLET; + tmp.u.cpanel.dummy = 0; + tmp.u.cpanel.iconIdx = iconIdx; + + l = strlen(name); + size += l+1; + + tmp.u.cpanel.offsDispName = l+1; + l = strlen(displayName); + size += l+1; + + tmp.u.cpanel.offsComment = tmp.u.cpanel.offsDispName+1+l; + l = strlen(comment); + size += l+1; + + pidl = SHAlloc(size+4); + if (!pidl) + return NULL; + + pidl->mkid.cb = size+2; + memcpy(pidl->mkid.abID, &tmp, 2+size0); + + p = &((PIDLDATA*)pidl->mkid.abID)->u.cpanel; + strcpy(p->szName, name); + strcpy(p->szName+tmp.u.cpanel.offsDispName, displayName); + strcpy(p->szName+tmp.u.cpanel.offsComment, comment); + + *(WORD*)((char*)pidl+(size+2)) = 0; + + pcheck(pidl); + + return pidl; +} + +/************************************************************************** + * _ILGetCPanelPointer() + * gets a pointer to the control panel struct stored in the pidl + */ +static PIDLCPanelStruct* _ILGetCPanelPointer(LPCITEMIDLIST pidl) +{ + LPPIDLDATA pdata = _ILGetDataPointer(pidl); + + if (pdata && pdata->type==PT_CPLAPPLET) + return (PIDLCPanelStruct*)&(pdata->u.cpanel); + + return NULL; +} + + /************************************************************************** + * ISF_ControlPanel_fnEnumObjects + */ +static BOOL SHELL_RegisterCPanelApp(IEnumIDList* list, LPCSTR path) +{ + LPITEMIDLIST pidl; + CPlApplet* applet; + CPanel panel; + CPLINFO info; + unsigned i; + int iconIdx; + + char displayName[MAX_PATH]; + char comment[MAX_PATH]; + + WCHAR wpath[MAX_PATH]; + + MultiByteToWideChar(CP_ACP, 0, path, -1, wpath, MAX_PATH); + + panel.first = NULL; + applet = Control_LoadApplet(0, wpath, &panel); + + if (applet) + { + for(i=0; icount; ++i) + { + WideCharToMultiByte(CP_ACP, 0, applet->info[i].szName, -1, displayName, MAX_PATH, 0, 0); + WideCharToMultiByte(CP_ACP, 0, applet->info[i].szInfo, -1, comment, MAX_PATH, 0, 0); + + applet->proc(0, CPL_INQUIRE, i, (LPARAM)&info); + + if (info.idIcon > 0) + iconIdx = -info.idIcon; /* negative icon index instead of icon number */ + else + iconIdx = 0; + + pidl = _ILCreateCPanelApplet(path, displayName, comment, iconIdx); + + if (pidl) + AddToEnumList(list, pidl); + } + Control_UnloadApplet(applet); + } + return TRUE; +} + +static int SHELL_RegisterRegistryCPanelApps(IEnumIDList* list, HKEY hkey_root, LPCSTR szRepPath) +{ + char name[MAX_PATH]; + char value[MAX_PATH]; + HKEY hkey; + + int cnt = 0; + + if (RegOpenKeyA(hkey_root, szRepPath, &hkey) == ERROR_SUCCESS) + { + int idx = 0; + + for(;; ++idx) + { + DWORD nameLen = MAX_PATH; + DWORD valueLen = MAX_PATH; + + if (RegEnumValueA(hkey, idx, name, &nameLen, NULL, NULL, (LPBYTE)&value, &valueLen) != ERROR_SUCCESS) + break; + + if (SHELL_RegisterCPanelApp(list, value)) + ++cnt; + } + RegCloseKey(hkey); + } + + return cnt; +} + +static int SHELL_RegisterCPanelFolders(IEnumIDList* list, HKEY hkey_root, LPCSTR szRepPath) +{ + char name[MAX_PATH]; + HKEY hkey; + + int cnt = 0; + + if (RegOpenKeyA(hkey_root, szRepPath, &hkey) == ERROR_SUCCESS) + { + int idx = 0; + for(;; ++idx) + { + if (RegEnumKeyA(hkey, idx, name, MAX_PATH) != ERROR_SUCCESS) + break; + + if (*name == '{') + { + LPITEMIDLIST pidl = _ILCreateGuidFromStrA(name); + + if (pidl && AddToEnumList(list, pidl)) + ++cnt; + } + } + + RegCloseKey(hkey); + } + + return cnt; +} + +/************************************************************************** + * CreateCPanelEnumList() + */ +static BOOL CreateCPanelEnumList( + IEnumIDList * iface, + DWORD dwFlags) +{ + CHAR szPath[MAX_PATH]; + WIN32_FIND_DATAA wfd; + HANDLE hFile; + + TRACE("(%p)->(flags=0x%08x)\n", iface, dwFlags); + + /* enumerate control panel folders */ + if (dwFlags & SHCONTF_FOLDERS) + SHELL_RegisterCPanelFolders(iface, HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ControlPanel\\NameSpace"); + + /* enumerate the control panel applets */ + if (dwFlags & SHCONTF_NONFOLDERS) + { + LPSTR p; + + GetSystemDirectoryA(szPath, MAX_PATH); + p = PathAddBackslashA(szPath); + strcpy(p, "*.cpl"); + + TRACE("-- (%p)-> enumerate SHCONTF_NONFOLDERS of %s\n",iface,debugstr_a(szPath)); + hFile = FindFirstFileA(szPath, &wfd); + + if (hFile != INVALID_HANDLE_VALUE) + { + do + { + if (!(dwFlags & SHCONTF_INCLUDEHIDDEN) && (wfd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN)) + continue; + + if (!(wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { + strcpy(p, wfd.cFileName); + SHELL_RegisterCPanelApp((IEnumIDList*)iface, szPath); + } + } while(FindNextFileA(hFile, &wfd)); + FindClose(hFile); + } + + SHELL_RegisterRegistryCPanelApps((IEnumIDList*)iface, HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\Cpls"); + SHELL_RegisterRegistryCPanelApps((IEnumIDList*)iface, HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\Cpls"); + } + return TRUE; +} + +/************************************************************************** +* ISF_ControlPanel_fnEnumObjects +*/ +static HRESULT WINAPI +ISF_ControlPanel_fnEnumObjects(IShellFolder2 * iface, HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST * ppEnumIDList) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + TRACE("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", This, hwndOwner, dwFlags, ppEnumIDList); + + *ppEnumIDList = IEnumIDList_Constructor(); + if (*ppEnumIDList) + CreateCPanelEnumList(*ppEnumIDList, dwFlags); + + TRACE("--(%p)->(new ID List: %p)\n", This, *ppEnumIDList); + + return(*ppEnumIDList) ? S_OK : E_OUTOFMEMORY; +} + +/************************************************************************** +* ISF_ControlPanel_fnBindToObject +*/ +static HRESULT WINAPI +ISF_ControlPanel_fnBindToObject(IShellFolder2 * iface, LPCITEMIDLIST pidl, + LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + TRACE("(%p)->(pidl=%p,%p,%s,%p)\n", This, pidl, pbcReserved, shdebugstr_guid(riid), ppvOut); + + return SHELL32_BindToChild(This->pidlRoot, NULL, pidl, riid, ppvOut); +} + +/************************************************************************** +* ISF_ControlPanel_fnBindToStorage +*/ +static HRESULT WINAPI +ISF_ControlPanel_fnBindToStorage(IShellFolder2 * iface, + LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + FIXME("(%p)->(pidl=%p,%p,%s,%p) stub\n", This, pidl, pbcReserved, shdebugstr_guid(riid), ppvOut); + + *ppvOut = NULL; + return E_NOTIMPL; +} + +/************************************************************************** +* ISF_ControlPanel_fnCompareIDs +*/ + +static HRESULT WINAPI +ISF_ControlPanel_fnCompareIDs(IShellFolder2 * iface, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + int nReturn; + + TRACE("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", This, lParam, pidl1, pidl2); + nReturn = SHELL32_CompareIDs(_IShellFolder_(This), lParam, pidl1, pidl2); + TRACE("-- %i\n", nReturn); + return nReturn; +} + +/************************************************************************** +* ISF_ControlPanel_fnCreateViewObject +*/ +static HRESULT WINAPI +ISF_ControlPanel_fnCreateViewObject(IShellFolder2 * iface, HWND hwndOwner, REFIID riid, LPVOID * ppvOut) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + LPSHELLVIEW pShellView; + HRESULT hr = E_INVALIDARG; + + TRACE("(%p)->(hwnd=%p,%s,%p)\n", This, hwndOwner, shdebugstr_guid(riid), ppvOut); + + if (ppvOut) { + *ppvOut = NULL; + + if (IsEqualIID(riid, &IID_IDropTarget)) { + WARN("IDropTarget not implemented\n"); + hr = E_NOTIMPL; + } else if (IsEqualIID(riid, &IID_IContextMenu)) { + WARN("IContextMenu not implemented\n"); + hr = E_NOTIMPL; + } else if (IsEqualIID(riid, &IID_IShellView)) { + pShellView = IShellView_Constructor((IShellFolder *) iface); + if (pShellView) { + hr = IShellView_QueryInterface(pShellView, riid, ppvOut); + IShellView_Release(pShellView); + } + } + } + TRACE("--(%p)->(interface=%p)\n", This, ppvOut); + return hr; +} + +/************************************************************************** +* ISF_ControlPanel_fnGetAttributesOf +*/ +static HRESULT WINAPI +ISF_ControlPanel_fnGetAttributesOf(IShellFolder2 * iface, UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + HRESULT hr = S_OK; + + TRACE("(%p)->(cidl=%d apidl=%p mask=%p (0x%08x))\n", + This, cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0); + + if (!rgfInOut) + return E_INVALIDARG; + if (cidl && !apidl) + return E_INVALIDARG; + + if (*rgfInOut == 0) + *rgfInOut = ~0; + + while(cidl > 0 && *apidl) { + pdump(*apidl); + SHELL32_GetItemAttributes(_IShellFolder_(This), *apidl, rgfInOut); + apidl++; + cidl--; + } + /* make sure SFGAO_VALIDATE is cleared, some apps depend on that */ + *rgfInOut &= ~SFGAO_VALIDATE; + + TRACE("-- result=0x%08x\n", *rgfInOut); + return hr; +} + +/************************************************************************** +* ISF_ControlPanel_fnGetUIObjectOf +* +* PARAMETERS +* HWND hwndOwner, //[in ] Parent window for any output +* UINT cidl, //[in ] array size +* LPCITEMIDLIST* apidl, //[in ] simple pidl array +* REFIID riid, //[in ] Requested Interface +* UINT* prgfInOut, //[ ] reserved +* LPVOID* ppvObject) //[out] Resulting Interface +* +*/ +static HRESULT WINAPI +ISF_ControlPanel_fnGetUIObjectOf(IShellFolder2 * iface, + HWND hwndOwner, + UINT cidl, LPCITEMIDLIST * apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + LPITEMIDLIST pidl; + IUnknown *pObj = NULL; + HRESULT hr = E_INVALIDARG; + + TRACE("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n", + This, hwndOwner, cidl, apidl, shdebugstr_guid(riid), prgfInOut, ppvOut); + + if (ppvOut) { + *ppvOut = NULL; + + if (IsEqualIID(riid, &IID_IContextMenu) &&(cidl >= 1)) { + pObj = (IUnknown*)(&This->lpVtblContextMenu); + This->apidl = apidl; + This->cidl = cidl; + IUnknown_AddRef(pObj); + } else if (IsEqualIID(riid, &IID_IDataObject) &&(cidl >= 1)) { + pObj = (LPUNKNOWN) IDataObject_Constructor(hwndOwner, This->pidlRoot, apidl, cidl); + hr = S_OK; + } else if (IsEqualIID(riid, &IID_IExtractIconA) &&(cidl == 1)) { + pidl = ILCombine(This->pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconA_Constructor(pidl); + SHFree(pidl); + hr = S_OK; + } else if (IsEqualIID(riid, &IID_IExtractIconW) &&(cidl == 1)) { + pidl = ILCombine(This->pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconW_Constructor(pidl); + SHFree(pidl); + hr = S_OK; + } else if ((IsEqualIID(riid,&IID_IShellLinkW) || IsEqualIID(riid,&IID_IShellLinkA)) + && (cidl == 1)) { + pidl = ILCombine(This->pidlRoot, apidl[0]); + hr = IShellLink_ConstructFromFile(NULL, riid, pidl,(LPVOID*)&pObj); + SHFree(pidl); + } else { + hr = E_NOINTERFACE; + } + + if (SUCCEEDED(hr) && !pObj) + hr = E_OUTOFMEMORY; + + *ppvOut = pObj; + } + TRACE("(%p)->hr=0x%08x\n", This, hr); + return hr; +} + +/************************************************************************** +* ISF_ControlPanel_fnGetDisplayNameOf +*/ +static HRESULT WINAPI ISF_ControlPanel_fnGetDisplayNameOf(IShellFolder2 * iface, LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + CHAR szPath[MAX_PATH]; + WCHAR wszPath[MAX_PATH+1]; /* +1 for potential backslash */ + PIDLCPanelStruct* pcpanel; + + *szPath = '\0'; + + TRACE("(%p)->(pidl=%p,0x%08x,%p)\n", This, pidl, dwFlags, strRet); + pdump(pidl); + + if (!pidl || !strRet) + return E_INVALIDARG; + + pcpanel = _ILGetCPanelPointer(pidl); + + if (pcpanel) { + lstrcpyA(szPath, pcpanel->szName+pcpanel->offsDispName); + + if (!(dwFlags & SHGDN_FORPARSING)) + FIXME("retrieve display name from control panel app\n"); + } + /* take names of special folders only if it's only this folder */ + else if (_ILIsSpecialFolder(pidl)) { + BOOL bSimplePidl = _ILIsPidlSimple(pidl); + + if (bSimplePidl) { + _ILSimpleGetTextW(pidl, wszPath, MAX_PATH); /* append my own path */ + } else { + FIXME("special pidl\n"); + } + + if ((dwFlags & SHGDN_FORPARSING) && !bSimplePidl) { /* go deeper if needed */ + int len = 0; + + PathAddBackslashW(wszPath); + len = wcslen(wszPath); + + if (!SUCCEEDED + (SHELL32_GetDisplayNameOfChild(iface, pidl, dwFlags, wszPath + len, MAX_PATH + 1 - len))) + return E_OUTOFMEMORY; + if (!WideCharToMultiByte(CP_ACP, 0, wszPath, -1, szPath, MAX_PATH, NULL, NULL)) + wszPath[0] = '\0'; + } else { + if (bSimplePidl) { + if (!WideCharToMultiByte(CP_ACP, 0, wszPath, -1, szPath, MAX_PATH, NULL, NULL)) + wszPath[0] = '\0'; + } + } + } + + strRet->uType = STRRET_CSTR; + lstrcpynA(strRet->u.cStr, szPath, MAX_PATH); + + TRACE("--(%p)->(%s)\n", This, szPath); + return S_OK; +} + +/************************************************************************** +* ISF_ControlPanel_fnSetNameOf +* Changes the name of a file object or subfolder, possibly changing its item +* identifier in the process. +* +* PARAMETERS +* HWND hwndOwner, //[in ] Owner window for output +* LPCITEMIDLIST pidl, //[in ] simple pidl of item to change +* LPCOLESTR lpszName, //[in ] the items new display name +* DWORD dwFlags, //[in ] SHGNO formatting flags +* LPITEMIDLIST* ppidlOut) //[out] simple pidl returned +*/ +static HRESULT WINAPI ISF_ControlPanel_fnSetNameOf(IShellFolder2 * iface, HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */ + LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + FIXME("(%p)->(%p,pidl=%p,%s,%u,%p)\n", This, hwndOwner, pidl, debugstr_w(lpName), dwFlags, pPidlOut); + return E_FAIL; +} + +static HRESULT WINAPI ISF_ControlPanel_fnGetDefaultSearchGUID(IShellFolder2 * iface, GUID * pguid) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + FIXME("(%p)\n", This); + return E_NOTIMPL; +} +static HRESULT WINAPI ISF_ControlPanel_fnEnumSearches(IShellFolder2 * iface, IEnumExtraSearch ** ppenum) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + FIXME("(%p)\n", This); + return E_NOTIMPL; +} +static HRESULT WINAPI ISF_ControlPanel_fnGetDefaultColumn(IShellFolder2 * iface, DWORD dwRes, ULONG * pSort, ULONG * pDisplay) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + TRACE("(%p)\n", This); + + if (pSort) *pSort = 0; + if (pDisplay) *pDisplay = 0; + return S_OK; +} +static HRESULT WINAPI ISF_ControlPanel_fnGetDefaultColumnState(IShellFolder2 * iface, UINT iColumn, DWORD * pcsFlags) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + TRACE("(%p)\n", This); + + if (!pcsFlags || iColumn >= CONROLPANELSHELLVIEWCOLUMNS) return E_INVALIDARG; + *pcsFlags = ControlPanelSFHeader[iColumn].pcsFlags; + return S_OK; +} +static HRESULT WINAPI ISF_ControlPanel_fnGetDetailsEx(IShellFolder2 * iface, LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + FIXME("(%p)\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI ISF_ControlPanel_fnGetDetailsOf(IShellFolder2 * iface, LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS * psd) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + HRESULT hr; + + TRACE("(%p)->(%p %i %p)\n", This, pidl, iColumn, psd); + + if (!psd || iColumn >= CONROLPANELSHELLVIEWCOLUMNS) + return E_INVALIDARG; + + if (!pidl) { + psd->fmt = ControlPanelSFHeader[iColumn].fmt; + psd->cxChar = ControlPanelSFHeader[iColumn].cxChar; + psd->str.uType = STRRET_CSTR; + LoadStringA(shell32_hInstance, ControlPanelSFHeader[iColumn].colnameid, psd->str.u.cStr, MAX_PATH); + return S_OK; + } else { + psd->str.u.cStr[0] = 0x00; + psd->str.uType = STRRET_CSTR; + switch(iColumn) { + case 0: /* name */ + hr = IShellFolder_GetDisplayNameOf(iface, pidl, SHGDN_NORMAL | SHGDN_INFOLDER, &psd->str); + break; + case 1: /* comment */ + _ILGetFileType(pidl, psd->str.u.cStr, MAX_PATH); + break; + } + hr = S_OK; + } + + return hr; +} +static HRESULT WINAPI ISF_ControlPanel_fnMapColumnToSCID(IShellFolder2 * iface, UINT column, SHCOLUMNID * pscid) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + FIXME("(%p)\n", This); + return E_NOTIMPL; +} + +static const IShellFolder2Vtbl vt_ShellFolder2 = +{ + + ISF_ControlPanel_fnQueryInterface, + ISF_ControlPanel_fnAddRef, + ISF_ControlPanel_fnRelease, + ISF_ControlPanel_fnParseDisplayName, + ISF_ControlPanel_fnEnumObjects, + ISF_ControlPanel_fnBindToObject, + ISF_ControlPanel_fnBindToStorage, + ISF_ControlPanel_fnCompareIDs, + ISF_ControlPanel_fnCreateViewObject, + ISF_ControlPanel_fnGetAttributesOf, + ISF_ControlPanel_fnGetUIObjectOf, + ISF_ControlPanel_fnGetDisplayNameOf, + ISF_ControlPanel_fnSetNameOf, + + /* ShellFolder2 */ + ISF_ControlPanel_fnGetDefaultSearchGUID, + ISF_ControlPanel_fnEnumSearches, + ISF_ControlPanel_fnGetDefaultColumn, + ISF_ControlPanel_fnGetDefaultColumnState, + ISF_ControlPanel_fnGetDetailsEx, + ISF_ControlPanel_fnGetDetailsOf, + ISF_ControlPanel_fnMapColumnToSCID +}; + +/************************************************************************ + * ICPanel_PersistFolder2_QueryInterface + */ +static HRESULT WINAPI ICPanel_PersistFolder2_QueryInterface(IPersistFolder2 * iface, REFIID iid, LPVOID * ppvObject) +{ + ICPanelImpl *This = impl_from_IPersistFolder2(iface); + + TRACE("(%p)\n", This); + + return IUnknown_QueryInterface(_IUnknown_(This), iid, ppvObject); +} + +/************************************************************************ + * ICPanel_PersistFolder2_AddRef + */ +static ULONG WINAPI ICPanel_PersistFolder2_AddRef(IPersistFolder2 * iface) +{ + ICPanelImpl *This = impl_from_IPersistFolder2(iface); + + TRACE("(%p)->(count=%u)\n", This, This->ref); + + return IUnknown_AddRef(_IUnknown_(This)); +} + +/************************************************************************ + * ISFPersistFolder_Release + */ +static ULONG WINAPI ICPanel_PersistFolder2_Release(IPersistFolder2 * iface) +{ + ICPanelImpl *This = impl_from_IPersistFolder2(iface); + + TRACE("(%p)->(count=%u)\n", This, This->ref); + + return IUnknown_Release(_IUnknown_(This)); +} + +/************************************************************************ + * ICPanel_PersistFolder2_GetClassID + */ +static HRESULT WINAPI ICPanel_PersistFolder2_GetClassID(IPersistFolder2 * iface, CLSID * lpClassId) +{ + ICPanelImpl *This = impl_from_IPersistFolder2(iface); + + TRACE("(%p)\n", This); + + if (!lpClassId) + return E_POINTER; + *lpClassId = CLSID_ControlPanel; + + return S_OK; +} + +/************************************************************************ + * ICPanel_PersistFolder2_Initialize + * + * NOTES: it makes no sense to change the pidl + */ +static HRESULT WINAPI ICPanel_PersistFolder2_Initialize(IPersistFolder2 * iface, LPCITEMIDLIST pidl) +{ + ICPanelImpl *This = impl_from_IPersistFolder2(iface); + if (This->pidlRoot) + SHFree((LPVOID)This->pidlRoot); + + This->pidlRoot = ILClone(pidl); + return S_OK; +} + +/************************************************************************** + * IPersistFolder2_fnGetCurFolder + */ +static HRESULT WINAPI ICPanel_PersistFolder2_GetCurFolder(IPersistFolder2 * iface, LPITEMIDLIST * pidl) +{ + ICPanelImpl *This = impl_from_IPersistFolder2(iface); + + TRACE("(%p)->(%p)\n", This, pidl); + + if (!pidl) + return E_POINTER; + *pidl = ILClone(This->pidlRoot); + return S_OK; +} + +static const IPersistFolder2Vtbl vt_PersistFolder2 = +{ + + ICPanel_PersistFolder2_QueryInterface, + ICPanel_PersistFolder2_AddRef, + ICPanel_PersistFolder2_Release, + ICPanel_PersistFolder2_GetClassID, + ICPanel_PersistFolder2_Initialize, + ICPanel_PersistFolder2_GetCurFolder +}; + +HRESULT CPanel_GetIconLocationW(LPCITEMIDLIST pidl, + LPWSTR szIconFile, UINT cchMax, int* piIndex) +{ + PIDLCPanelStruct* pcpanel = _ILGetCPanelPointer(pidl); + + if (!pcpanel) + return E_INVALIDARG; + + MultiByteToWideChar(CP_ACP, 0, pcpanel->szName, -1, szIconFile, cchMax); + *piIndex = pcpanel->iconIdx!=-1? pcpanel->iconIdx: 0; + + return S_OK; +} + + +/************************************************************************** +* IShellExecuteHookW Implementation +*/ + +static HRESULT WINAPI IShellExecuteHookW_fnQueryInterface( + IShellExecuteHookW* iface, REFIID riid, void** ppvObject) +{ + ICPanelImpl *This = impl_from_IShellExecuteHookW(iface); + + TRACE("(%p)->(count=%u)\n", This, This->ref); + + return IUnknown_QueryInterface(This->pUnkOuter, riid, ppvObject); +} + +static ULONG STDMETHODCALLTYPE IShellExecuteHookW_fnAddRef(IShellExecuteHookW* iface) +{ + ICPanelImpl *This = impl_from_IShellExecuteHookW(iface); + + TRACE("(%p)->(count=%u)\n", This, This->ref); + + return IUnknown_AddRef(This->pUnkOuter); +} + +static ULONG STDMETHODCALLTYPE IShellExecuteHookW_fnRelease(IShellExecuteHookW* iface) +{ + ICPanelImpl *This = impl_from_IShellExecuteHookW(iface); + + TRACE("(%p)\n", This); + + return IUnknown_Release(This->pUnkOuter); +} + +HRESULT +ExecuteAppletFromCLSID(LPOLESTR pOleStr) +{ + WCHAR szCmd[MAX_PATH]; + WCHAR szExpCmd[MAX_PATH]; + PROCESS_INFORMATION pi; + STARTUPINFOW si; + WCHAR szBuffer[90] = { 'C', 'L', 'S', 'I', 'D', '\\', 0 }; + DWORD dwType, dwSize; + + wcscpy(&szBuffer[6], pOleStr); + wcscat(szBuffer, L"\\shell\\open\\command"); + + dwSize = sizeof(szCmd); + if (RegGetValueW(HKEY_CLASSES_ROOT, szBuffer, NULL, RRF_RT_REG_SZ, &dwType, (PVOID)szCmd, &dwSize) != ERROR_SUCCESS) + { + ERR("RegGetValueW failed with %u\n", GetLastError()); + return E_FAIL; + } + +#if 0 + if (dwType != RRF_RT_REG_SZ && dwType != RRF_RT_REG_EXPAND_SZ) + return E_FAIL; +#endif + + if (!ExpandEnvironmentStringsW(szCmd, szExpCmd, sizeof(szExpCmd)/sizeof(WCHAR))) + return E_FAIL; + + ZeroMemory(&si, sizeof(si)); + si.cb = sizeof(si); + if (!CreateProcessW(NULL, szExpCmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) + return E_FAIL; + + CloseHandle(pi.hProcess); + CloseHandle(pi.hThread); + return S_OK; +} + + +static HRESULT WINAPI IShellExecuteHookW_fnExecute(IShellExecuteHookW* iface, LPSHELLEXECUTEINFOW psei) +{ + static const WCHAR wCplopen[] = {'c','p','l','o','p','e','n','\0'}; + ICPanelImpl *This = (ICPanelImpl *)iface; + + SHELLEXECUTEINFOW sei_tmp; + PIDLCPanelStruct* pcpanel; + WCHAR path[MAX_PATH]; + WCHAR params[MAX_PATH]; + BOOL ret; + HRESULT hr; + int l; + + TRACE("(%p)->execute(%p)\n", This, psei); + + if (!psei) + return E_INVALIDARG; + + pcpanel = _ILGetCPanelPointer(ILFindLastID(psei->lpIDList)); + + if (!pcpanel) + { + LPOLESTR pOleStr; + + IID * iid = _ILGetGUIDPointer(ILFindLastID(psei->lpIDList)); + if (!iid) + return E_INVALIDARG; + if (StringFromCLSID(iid, &pOleStr) == S_OK) + { + + hr = ExecuteAppletFromCLSID(pOleStr); + CoTaskMemFree(pOleStr); + return hr; + } + + return E_INVALIDARG; + } + path[0] = '\"'; + /* Return value from MultiByteToWideChar includes terminating NUL, which + * compensates for the starting double quote we just put in */ + l = MultiByteToWideChar(CP_ACP, 0, pcpanel->szName, -1, path+1, MAX_PATH); + + /* pass applet name to Control_RunDLL to distinguish between applets in one .cpl file */ + path[l++] = '"'; + path[l] = '\0'; + + MultiByteToWideChar(CP_ACP, 0, pcpanel->szName+pcpanel->offsDispName, -1, params, MAX_PATH); + + memcpy(&sei_tmp, psei, sizeof(sei_tmp)); + sei_tmp.lpFile = path; + sei_tmp.lpParameters = params; + sei_tmp.fMask &= ~SEE_MASK_INVOKEIDLIST; + sei_tmp.lpVerb = wCplopen; + + ret = ShellExecuteExW(&sei_tmp); + if (ret) + return S_OK; + else + return S_FALSE; +} + +static const IShellExecuteHookWVtbl vt_ShellExecuteHookW = +{ + + IShellExecuteHookW_fnQueryInterface, + IShellExecuteHookW_fnAddRef, + IShellExecuteHookW_fnRelease, + + IShellExecuteHookW_fnExecute +}; + + +/************************************************************************** +* IShellExecuteHookA Implementation +*/ + +static HRESULT WINAPI IShellExecuteHookA_fnQueryInterface(IShellExecuteHookA* iface, REFIID riid, void** ppvObject) +{ + ICPanelImpl *This = impl_from_IShellExecuteHookA(iface); + + TRACE("(%p)->(count=%u)\n", This, This->ref); + + return IUnknown_QueryInterface(This->pUnkOuter, riid, ppvObject); +} + +static ULONG STDMETHODCALLTYPE IShellExecuteHookA_fnAddRef(IShellExecuteHookA* iface) +{ + ICPanelImpl *This = impl_from_IShellExecuteHookA(iface); + + TRACE("(%p)->(count=%u)\n", This, This->ref); + + return IUnknown_AddRef(This->pUnkOuter); +} + +static ULONG STDMETHODCALLTYPE IShellExecuteHookA_fnRelease(IShellExecuteHookA* iface) +{ + ICPanelImpl *This = impl_from_IShellExecuteHookA(iface); + + TRACE("(%p)\n", This); + + return IUnknown_Release(This->pUnkOuter); +} + +static HRESULT WINAPI IShellExecuteHookA_fnExecute(IShellExecuteHookA* iface, LPSHELLEXECUTEINFOA psei) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + SHELLEXECUTEINFOA sei_tmp; + PIDLCPanelStruct* pcpanel; + char path[MAX_PATH]; + BOOL ret; + + TRACE("(%p)->execute(%p)\n", This, psei); + + if (!psei) + return E_INVALIDARG; + + pcpanel = _ILGetCPanelPointer(ILFindLastID(psei->lpIDList)); + + if (!pcpanel) + return E_INVALIDARG; + + path[0] = '\"'; + lstrcpyA(path+1, pcpanel->szName); + + /* pass applet name to Control_RunDLL to distinguish between applets in one .cpl file */ + lstrcatA(path, "\" "); + lstrcatA(path, pcpanel->szName+pcpanel->offsDispName); + + memcpy(&sei_tmp, psei, sizeof(sei_tmp)); + sei_tmp.lpFile = path; + sei_tmp.fMask &= ~SEE_MASK_INVOKEIDLIST; + + ret = ShellExecuteExA(&sei_tmp); + if (ret) + return S_OK; + else + return S_FALSE; +} + +static const IShellExecuteHookAVtbl vt_ShellExecuteHookA = +{ + IShellExecuteHookA_fnQueryInterface, + IShellExecuteHookA_fnAddRef, + IShellExecuteHookA_fnRelease, + IShellExecuteHookA_fnExecute +}; + +/************************************************************************** +* IContextMenu2 Implementation +*/ + +/************************************************************************ + * ICPanel_IContextMenu_QueryInterface + */ +static HRESULT WINAPI ICPanel_IContextMenu2_QueryInterface(IContextMenu2 * iface, REFIID iid, LPVOID * ppvObject) +{ + ICPanelImpl *This = impl_from_IContextMenu(iface); + + TRACE("(%p)\n", This); + + return IUnknown_QueryInterface(_IUnknown_(This), iid, ppvObject); +} + +/************************************************************************ + * ICPanel_IContextMenu_AddRef + */ +static ULONG WINAPI ICPanel_IContextMenu2_AddRef(IContextMenu2 * iface) +{ + ICPanelImpl *This = impl_from_IContextMenu(iface); + + TRACE("(%p)->(count=%u)\n", This, This->ref); + + return IUnknown_AddRef(_IUnknown_(This)); +} + +/************************************************************************ + * ICPanel_IContextMenu_Release + */ +static ULONG WINAPI ICPanel_IContextMenu2_Release(IContextMenu2 * iface) +{ + ICPanelImpl *This = impl_from_IContextMenu(iface); + + TRACE("(%p)->(count=%u)\n", This, This->ref); + + return IUnknown_Release(_IUnknown_(This)); +} + +/************************************************************************** +* ICPanel_IContextMenu_QueryContextMenu() +*/ +static HRESULT WINAPI ICPanel_IContextMenu2_QueryContextMenu( + IContextMenu2 *iface, + HMENU hMenu, + UINT indexMenu, + UINT idCmdFirst, + UINT idCmdLast, + UINT uFlags) +{ + WCHAR szBuffer[30] = {0}; + ULONG Count = 1; + + ICPanelImpl *This = impl_from_IContextMenu(iface); + + TRACE("(%p)->(hmenu=%p indexmenu=%x cmdfirst=%x cmdlast=%x flags=%x )\n", + This, hMenu, indexMenu, idCmdFirst, idCmdLast, uFlags); + + if (LoadStringW(shell32_hInstance, IDS_OPEN, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) + { + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_DEFAULT); + Count++; + } + + if (LoadStringW(shell32_hInstance, IDS_CREATELINK, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) + { + if (Count) + { + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_SEPARATOR, NULL, MFS_ENABLED); + } + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_ENABLED); + Count++; + } + return MAKE_HRESULT(SEVERITY_SUCCESS, 0, Count); +} + + +/************************************************************************** +* ICPanel_IContextMenu_InvokeCommand() +*/ +static HRESULT WINAPI ICPanel_IContextMenu2_InvokeCommand( + IContextMenu2 *iface, + LPCMINVOKECOMMANDINFO lpcmi) +{ + SHELLEXECUTEINFOW sei; + WCHAR szPath[MAX_PATH]; + char szTarget[MAX_PATH]; + STRRET strret; + WCHAR* pszPath; + INT Length, cLength; + PIDLCPanelStruct *pcpanel; + IPersistFile * ppf; + IShellLinkA * isl; + ICPanelImpl *This = impl_from_IContextMenu(iface); + + TRACE("(%p)->(invcom=%p verb=%p wnd=%p)\n",This,lpcmi,lpcmi->lpVerb, lpcmi->hwnd); + + if (lpcmi->lpVerb == MAKEINTRESOURCEA(1)) + { + ZeroMemory(&sei, sizeof(sei)); + sei.cbSize = sizeof(sei); + sei.fMask = SEE_MASK_INVOKEIDLIST; + sei.lpIDList = ILCombine(This->pidlRoot, This->apidl[0]); + sei.hwnd = lpcmi->hwnd; + sei.nShow = SW_SHOWNORMAL; + sei.lpVerb = L"open"; + ShellExecuteExW(&sei); + if (sei.hInstApp <= (HINSTANCE)32) + return E_FAIL; + } + else if (lpcmi->lpVerb == MAKEINTRESOURCEA(2)) + { + if (!SHGetSpecialFolderPathW(NULL, szPath, CSIDL_DESKTOPDIRECTORY, FALSE)) + return E_FAIL; + + pszPath = PathAddBackslashW(szPath); + if (!pszPath) + return E_FAIL; + + if (IShellFolder_GetDisplayNameOf((IShellFolder*)This, This->apidl[0], SHGDN_FORPARSING, &strret) != S_OK) + return E_FAIL; + + Length = MAX_PATH - (pszPath - szPath); + cLength = strlen(strret.u.cStr); + if (Length < cLength + 5) + { + FIXME("\n"); + return E_FAIL; + } + + if (MultiByteToWideChar(CP_ACP, 0, strret.u.cStr, cLength +1, pszPath, Length)) + { + pszPath += cLength; + Length -= cLength; + } + + if (Length > 10) + { + wcscpy(pszPath, L" - "); + cLength = LoadStringW(shell32_hInstance, IDS_LNK_FILE, &pszPath[3], Length -4) + 3; + if (cLength + 5 > Length) + cLength = Length - 5; + Length -= cLength; + pszPath += cLength; + } + wcscpy(pszPath, L".lnk"); + + pcpanel = _ILGetCPanelPointer(ILFindLastID(This->apidl[0])); + if (pcpanel) + { + strncpy(szTarget, pcpanel->szName, MAX_PATH); + } + else + { + FIXME("\n"); + return E_FAIL; + } + if (SUCCEEDED(IShellLink_Constructor(NULL, &IID_IShellLinkA, (LPVOID*)&isl))) + { + IShellLinkA_SetPath(isl, szTarget); + if (SUCCEEDED(IShellLinkA_QueryInterface(isl, &IID_IPersistFile, (LPVOID*)&ppf))) + { + IPersistFile_Save(ppf, szPath, TRUE); + IPersistFile_Release(ppf); + } + IShellLinkA_Release(isl); + } + return NOERROR; + } + return S_OK; +} + +/************************************************************************** + * ICPanel_IContextMenu_GetCommandString() + * + */ +static HRESULT WINAPI ICPanel_IContextMenu2_GetCommandString( + IContextMenu2 *iface, + UINT_PTR idCommand, + UINT uFlags, + UINT* lpReserved, + LPSTR lpszName, + UINT uMaxNameLen) +{ + ICPanelImpl *This = impl_from_IContextMenu(iface); + + TRACE("(%p)->(idcom=%lx flags=%x %p name=%p len=%x)\n",This, idCommand, uFlags, lpReserved, lpszName, uMaxNameLen); + + + FIXME("unknown command string\n"); + return E_FAIL; +} + + + +/************************************************************************** +* ICPanel_IContextMenu_HandleMenuMsg() +*/ +static HRESULT WINAPI ICPanel_IContextMenu2_HandleMenuMsg( + IContextMenu2 *iface, + UINT uMsg, + WPARAM wParam, + LPARAM lParam) +{ + ICPanelImpl *This = impl_from_IContextMenu(iface); + + TRACE("ICPanel_IContextMenu_HandleMenuMsg (%p)->(msg=%x wp=%lx lp=%lx)\n",This, uMsg, wParam, lParam); + + return E_NOTIMPL; +} + +static const IContextMenu2Vtbl vt_ContextMenu = +{ + ICPanel_IContextMenu2_QueryInterface, + ICPanel_IContextMenu2_AddRef, + ICPanel_IContextMenu2_Release, + ICPanel_IContextMenu2_QueryContextMenu, + ICPanel_IContextMenu2_InvokeCommand, + ICPanel_IContextMenu2_GetCommandString, + ICPanel_IContextMenu2_HandleMenuMsg +}; + diff --git a/reactos/dll/win32/shell32/lang/bg-BG.rc b/reactos/dll/win32/shell32/lang/bg-BG.rc index a1f810eabec..c6942c72caf 100644 --- a/reactos/dll/win32/shell32/lang/bg-BG.rc +++ b/reactos/dll/win32/shell32/lang/bg-BG.rc @@ -620,9 +620,6 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" - IDS_SHV_COLUMN_DEVNAME "Device Name" - IDS_SHV_COLUMN_PHONE "Phone # or Host Address" - IDS_SHV_COLUMN_OWNER "Owner" // special folders IDS_DESKTOP "Работна площ" @@ -630,7 +627,6 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Кошче" IDS_CONTROLPANEL "Крило за управление" IDS_ADMINISTRATIVETOOLS "Administrative Tools" - IDS_NETWORKCONNECTION "Network Connections" // context menus IDS_VIEW_LARGE "&Големи значета" diff --git a/reactos/dll/win32/shell32/lang/ca-ES.rc b/reactos/dll/win32/shell32/lang/ca-ES.rc index 6501f4dea8d..6626a801e8e 100644 --- a/reactos/dll/win32/shell32/lang/ca-ES.rc +++ b/reactos/dll/win32/shell32/lang/ca-ES.rc @@ -617,9 +617,6 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" - IDS_SHV_COLUMN_DEVNAME "Device Name" - IDS_SHV_COLUMN_PHONE "Phone # or Host Address" - IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Desktop" @@ -627,7 +624,6 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Trash" IDS_CONTROLPANEL "Control Panel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" - IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "Lar&ge Icons" diff --git a/reactos/dll/win32/shell32/lang/cs-CZ.rc b/reactos/dll/win32/shell32/lang/cs-CZ.rc index 83ce1931ca0..c70abea1d04 100644 --- a/reactos/dll/win32/shell32/lang/cs-CZ.rc +++ b/reactos/dll/win32/shell32/lang/cs-CZ.rc @@ -619,9 +619,6 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" - IDS_SHV_COLUMN_DEVNAME "Device Name" - IDS_SHV_COLUMN_PHONE "Phone # or Host Address" - IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Plocha" @@ -629,7 +626,6 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Koљ" IDS_CONTROLPANEL "Ovlбdacн panely" IDS_ADMINISTRATIVETOOLS "Administrative Tools" - IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "&Vedle sebe" diff --git a/reactos/dll/win32/shell32/lang/da-DK.rc b/reactos/dll/win32/shell32/lang/da-DK.rc index bba24ec9cfd..f67714caa08 100644 --- a/reactos/dll/win32/shell32/lang/da-DK.rc +++ b/reactos/dll/win32/shell32/lang/da-DK.rc @@ -617,9 +617,6 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" - IDS_SHV_COLUMN_DEVNAME "Device Name" - IDS_SHV_COLUMN_PHONE "Phone # or Host Address" - IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Desktop" @@ -627,7 +624,6 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Trash" IDS_CONTROLPANEL "Control Panel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" - IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "Lar&ge Icons" diff --git a/reactos/dll/win32/shell32/lang/de-DE.rc b/reactos/dll/win32/shell32/lang/de-DE.rc index 136adeb0a57..ff1e520637b 100644 --- a/reactos/dll/win32/shell32/lang/de-DE.rc +++ b/reactos/dll/win32/shell32/lang/de-DE.rc @@ -621,9 +621,7 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Kommentare" IDS_SHV_COLUMN_LOCATION "Ort" IDS_SHV_COLUMN_MODEL "Model" - IDS_SHV_COLUMN_DEVNAME "Gerдtename" - IDS_SHV_COLUMN_PHONE "Rufnummer oder Hostaddresse" - IDS_SHV_COLUMN_OWNER "Besitzer" + /* special folders */ IDS_DESKTOP "Desktop" @@ -631,7 +629,6 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Papierkorb" IDS_CONTROLPANEL "Systemsteuerung" IDS_ADMINISTRATIVETOOLS "Verwaltung" - IDS_NETWORKCONNECTION "Netzwerkverbindungen" /* context menus */ IDS_VIEW_LARGE "&GroЯe Symbole" diff --git a/reactos/dll/win32/shell32/lang/el-GR.rc b/reactos/dll/win32/shell32/lang/el-GR.rc index 4451a8b384e..f1c6212ccc1 100644 --- a/reactos/dll/win32/shell32/lang/el-GR.rc +++ b/reactos/dll/win32/shell32/lang/el-GR.rc @@ -618,9 +618,6 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" - IDS_SHV_COLUMN_DEVNAME "Device Name" - IDS_SHV_COLUMN_PHONE "Phone # or Host Address" - IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "ЕрйцЬнейб есгбуЯбт" @@ -628,7 +625,6 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "КЬдпт бнбкэклщузт" IDS_CONTROLPANEL "РЯнбкбт елЭгчпх" IDS_ADMINISTRATIVETOOLS "Administrative Tools" - IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "&МегЬлб ейкпнЯдйб" diff --git a/reactos/dll/win32/shell32/lang/en-GB.rc b/reactos/dll/win32/shell32/lang/en-GB.rc index a2204825681..e1ef5e6f918 100644 --- a/reactos/dll/win32/shell32/lang/en-GB.rc +++ b/reactos/dll/win32/shell32/lang/en-GB.rc @@ -617,9 +617,6 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" - IDS_SHV_COLUMN_DEVNAME "Device Name" - IDS_SHV_COLUMN_PHONE "Phone # or Host Address" - IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Desktop" @@ -627,7 +624,6 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Recycle Bin" IDS_CONTROLPANEL "Control Panel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" - IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "Lar&ge Icons" diff --git a/reactos/dll/win32/shell32/lang/en-US.rc b/reactos/dll/win32/shell32/lang/en-US.rc index 9b77037afa1..4e9047fc2df 100644 --- a/reactos/dll/win32/shell32/lang/en-US.rc +++ b/reactos/dll/win32/shell32/lang/en-US.rc @@ -618,9 +618,6 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" - IDS_SHV_COLUMN_DEVNAME "Device Name" - IDS_SHV_COLUMN_PHONE "Phone # or Host Address" - IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Desktop" @@ -628,7 +625,6 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Trash" IDS_CONTROLPANEL "Control Panel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" - IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "Lar&ge Icons" diff --git a/reactos/dll/win32/shell32/lang/es-ES.rc b/reactos/dll/win32/shell32/lang/es-ES.rc index 8cc979f6dae..7e335a62e07 100644 --- a/reactos/dll/win32/shell32/lang/es-ES.rc +++ b/reactos/dll/win32/shell32/lang/es-ES.rc @@ -620,9 +620,6 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comentarios" IDS_SHV_COLUMN_LOCATION "Ubicaciуn" IDS_SHV_COLUMN_MODEL "Modelo" - IDS_SHV_COLUMN_DEVNAME "Device Name" - IDS_SHV_COLUMN_PHONE "Phone # or Host Address" - IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Escritorio" @@ -630,7 +627,6 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Papelera de reciclaje" IDS_CONTROLPANEL "Panel de control" IDS_ADMINISTRATIVETOOLS "Herramientas Administrativas" - IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "Iconos &grandes" diff --git a/reactos/dll/win32/shell32/lang/fi-FI.rc b/reactos/dll/win32/shell32/lang/fi-FI.rc index 69b40b0bbec..66ddaa22b47 100644 --- a/reactos/dll/win32/shell32/lang/fi-FI.rc +++ b/reactos/dll/win32/shell32/lang/fi-FI.rc @@ -617,9 +617,6 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" - IDS_SHV_COLUMN_DEVNAME "Device Name" - IDS_SHV_COLUMN_PHONE "Phone # or Host Address" - IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Tyцpцytд" @@ -627,7 +624,6 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Trash" IDS_CONTROLPANEL "Control Panel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" - IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "&Suuret Kuvakkeet" diff --git a/reactos/dll/win32/shell32/lang/fr-FR.rc b/reactos/dll/win32/shell32/lang/fr-FR.rc index a2d3667bb96..8e3342d6549 100644 --- a/reactos/dll/win32/shell32/lang/fr-FR.rc +++ b/reactos/dll/win32/shell32/lang/fr-FR.rc @@ -621,9 +621,6 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Commentaires" IDS_SHV_COLUMN_LOCATION "Emplacement" IDS_SHV_COLUMN_MODEL "Modиle" - IDS_SHV_COLUMN_DEVNAME "Device Name" - IDS_SHV_COLUMN_PHONE "Phone # or Host Address" - IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Bureau" @@ -631,7 +628,6 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Corbeille" IDS_CONTROLPANEL "Panneau de configuration" IDS_ADMINISTRATIVETOOLS "Administrative Tools" - IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "&Grandes icфnes" diff --git a/reactos/dll/win32/shell32/lang/hu-HU.rc b/reactos/dll/win32/shell32/lang/hu-HU.rc index 8d61277750f..a56e952742c 100644 --- a/reactos/dll/win32/shell32/lang/hu-HU.rc +++ b/reactos/dll/win32/shell32/lang/hu-HU.rc @@ -620,9 +620,6 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" - IDS_SHV_COLUMN_DEVNAME "Device Name" - IDS_SHV_COLUMN_PHONE "Phone # or Host Address" - IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Asztal" @@ -630,7 +627,6 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Trash" IDS_CONTROLPANEL "Control Panel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" - IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "Nagy kйpek" diff --git a/reactos/dll/win32/shell32/lang/it-IT.rc b/reactos/dll/win32/shell32/lang/it-IT.rc index 4fcabdd918a..6cdbdabb22f 100644 --- a/reactos/dll/win32/shell32/lang/it-IT.rc +++ b/reactos/dll/win32/shell32/lang/it-IT.rc @@ -618,9 +618,6 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Commenti" IDS_SHV_COLUMN_LOCATION "Posizione" IDS_SHV_COLUMN_MODEL "Modello" - IDS_SHV_COLUMN_DEVNAME "Device Name" - IDS_SHV_COLUMN_PHONE "Phone # or Host Address" - IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Desktop" @@ -628,7 +625,6 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Cestino" IDS_CONTROLPANEL "Pannello di controllo" IDS_ADMINISTRATIVETOOLS "Strumenti di amministrazione" - IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "&Icone Grandi" diff --git a/reactos/dll/win32/shell32/lang/ja-JP.rc b/reactos/dll/win32/shell32/lang/ja-JP.rc index 9639484ab51..db24d649ddf 100644 --- a/reactos/dll/win32/shell32/lang/ja-JP.rc +++ b/reactos/dll/win32/shell32/lang/ja-JP.rc @@ -617,9 +617,6 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" - IDS_SHV_COLUMN_DEVNAME "Device Name" - IDS_SHV_COLUMN_PHONE "Phone # or Host Address" - IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "ѓfѓXѓNѓgѓbѓv" @@ -627,7 +624,6 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Trash" IDS_CONTROLPANEL "Control Panel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" - IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "‘е‚«‚ўѓAѓCѓRѓ“(&G)" diff --git a/reactos/dll/win32/shell32/lang/ko-KR.rc b/reactos/dll/win32/shell32/lang/ko-KR.rc index 17a2a2e3401..4244428718b 100644 --- a/reactos/dll/win32/shell32/lang/ko-KR.rc +++ b/reactos/dll/win32/shell32/lang/ko-KR.rc @@ -617,9 +617,6 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" - IDS_SHV_COLUMN_DEVNAME "Device Name" - IDS_SHV_COLUMN_PHONE "Phone # or Host Address" - IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Desktop" @@ -627,7 +624,6 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Trash" IDS_CONTROLPANEL "Control Panel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" - IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "Lar&ge Icons" diff --git a/reactos/dll/win32/shell32/lang/nl-NL.rc b/reactos/dll/win32/shell32/lang/nl-NL.rc index 47a4181799c..8f63cb2c2aa 100644 --- a/reactos/dll/win32/shell32/lang/nl-NL.rc +++ b/reactos/dll/win32/shell32/lang/nl-NL.rc @@ -617,9 +617,6 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" - IDS_SHV_COLUMN_DEVNAME "Device Name" - IDS_SHV_COLUMN_PHONE "Phone # or Host Address" - IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Desktop" @@ -627,7 +624,6 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Trash" IDS_CONTROLPANEL "Control Panel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" - IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "Lar&ge Icons" diff --git a/reactos/dll/win32/shell32/lang/no-NO.rc b/reactos/dll/win32/shell32/lang/no-NO.rc index 403414393f2..c3b13ef4d5a 100644 --- a/reactos/dll/win32/shell32/lang/no-NO.rc +++ b/reactos/dll/win32/shell32/lang/no-NO.rc @@ -596,9 +596,6 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" - IDS_SHV_COLUMN_DEVNAME "Device Name" - IDS_SHV_COLUMN_PHONE "Phone # or Host Address" - IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Skrivebord" @@ -606,7 +603,6 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Papirkurv" IDS_CONTROLPANEL "Kontrollpanel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" - IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "&Store ikoner" diff --git a/reactos/dll/win32/shell32/lang/pl-PL.rc b/reactos/dll/win32/shell32/lang/pl-PL.rc index 162f5b939f8..10cd2d418ee 100644 --- a/reactos/dll/win32/shell32/lang/pl-PL.rc +++ b/reactos/dll/win32/shell32/lang/pl-PL.rc @@ -624,9 +624,6 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Komentarze" IDS_SHV_COLUMN_LOCATION "Lokalizacja" IDS_SHV_COLUMN_MODEL "Model" - IDS_SHV_COLUMN_DEVNAME "Device Name" - IDS_SHV_COLUMN_PHONE "Phone # or Host Address" - IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Pulpit" @@ -634,7 +631,6 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Kosz" IDS_CONTROLPANEL "Panel Sterowania" IDS_ADMINISTRATIVETOOLS "Narzкdzia Administracyjne" - IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "&Duїe Ikony" diff --git a/reactos/dll/win32/shell32/lang/pt-BR.rc b/reactos/dll/win32/shell32/lang/pt-BR.rc index 895bfa97536..3f66ce4e004 100644 --- a/reactos/dll/win32/shell32/lang/pt-BR.rc +++ b/reactos/dll/win32/shell32/lang/pt-BR.rc @@ -619,9 +619,6 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" - IDS_SHV_COLUMN_DEVNAME "Device Name" - IDS_SHV_COLUMN_PHONE "Phone # or Host Address" - IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Бrea de trabalho" @@ -629,7 +626,6 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Trash" IDS_CONTROLPANEL "Control Panel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" - IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "Нcones &grandes" diff --git a/reactos/dll/win32/shell32/lang/pt-PT.rc b/reactos/dll/win32/shell32/lang/pt-PT.rc index 048d8a95210..5ca01e8f812 100644 --- a/reactos/dll/win32/shell32/lang/pt-PT.rc +++ b/reactos/dll/win32/shell32/lang/pt-PT.rc @@ -619,9 +619,6 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" - IDS_SHV_COLUMN_DEVNAME "Device Name" - IDS_SHV_COLUMN_PHONE "Phone # or Host Address" - IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Ambiente de trabalho" @@ -629,7 +626,6 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Trash" IDS_CONTROLPANEL "Control Panel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" - IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "Нcones &grandes" diff --git a/reactos/dll/win32/shell32/lang/ru-RU.rc b/reactos/dll/win32/shell32/lang/ru-RU.rc index 74d6a260264..0ed228f1c13 100644 --- a/reactos/dll/win32/shell32/lang/ru-RU.rc +++ b/reactos/dll/win32/shell32/lang/ru-RU.rc @@ -617,9 +617,6 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Коментарии" IDS_SHV_COLUMN_LOCATION "Расположение" IDS_SHV_COLUMN_MODEL "Модель" - IDS_SHV_COLUMN_DEVNAME "Device Name" - IDS_SHV_COLUMN_PHONE "Phone # or Host Address" - IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Рабочий стол" @@ -627,7 +624,6 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Корзина" IDS_CONTROLPANEL "Панель управления" IDS_ADMINISTRATIVETOOLS "Администрирование" - IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "&Большие значки" diff --git a/reactos/dll/win32/shell32/lang/sk-SK.rc b/reactos/dll/win32/shell32/lang/sk-SK.rc index 7937c604ab0..8b660b39d26 100644 --- a/reactos/dll/win32/shell32/lang/sk-SK.rc +++ b/reactos/dll/win32/shell32/lang/sk-SK.rc @@ -623,9 +623,6 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" - IDS_SHV_COLUMN_DEVNAME "Device Name" - IDS_SHV_COLUMN_PHONE "Phone # or Host Address" - IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Pracovnб plocha" @@ -633,7 +630,6 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Kфљ" IDS_CONTROLPANEL "Ovlбdacн panel" IDS_ADMINISTRATIVETOOLS "Nбstroje na sprбvu" - IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "&Veѕkй ikony" diff --git a/reactos/dll/win32/shell32/lang/sl-SI.rc b/reactos/dll/win32/shell32/lang/sl-SI.rc index e2a9a882ef2..1b3b79358c8 100644 --- a/reactos/dll/win32/shell32/lang/sl-SI.rc +++ b/reactos/dll/win32/shell32/lang/sl-SI.rc @@ -617,9 +617,6 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" - IDS_SHV_COLUMN_DEVNAME "Device Name" - IDS_SHV_COLUMN_PHONE "Phone # or Host Address" - IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Desktop" @@ -627,7 +624,6 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Trash" IDS_CONTROLPANEL "Control Panel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" - IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "Lar&ge Icons" diff --git a/reactos/dll/win32/shell32/lang/sv-SE.rc b/reactos/dll/win32/shell32/lang/sv-SE.rc index 76129e06491..9b8e0e2d4b7 100644 --- a/reactos/dll/win32/shell32/lang/sv-SE.rc +++ b/reactos/dll/win32/shell32/lang/sv-SE.rc @@ -617,9 +617,6 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" - IDS_SHV_COLUMN_DEVNAME "Device Name" - IDS_SHV_COLUMN_PHONE "Phone # or Host Address" - IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Desktop" @@ -627,7 +624,6 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Trash" IDS_CONTROLPANEL "Control Panel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" - IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "Lar&ge Icons" diff --git a/reactos/dll/win32/shell32/lang/tr-TR.rc b/reactos/dll/win32/shell32/lang/tr-TR.rc index deb6db61732..dd50639a734 100644 --- a/reactos/dll/win32/shell32/lang/tr-TR.rc +++ b/reactos/dll/win32/shell32/lang/tr-TR.rc @@ -617,9 +617,6 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" - IDS_SHV_COLUMN_DEVNAME "Device Name" - IDS_SHV_COLUMN_PHONE "Phone # or Host Address" - IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Masaьstь" @@ -627,7 +624,6 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Зцp" IDS_CONTROLPANEL "Control Panel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" - IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "Bь&yьk Simgeler" diff --git a/reactos/dll/win32/shell32/lang/uk-UA.rc b/reactos/dll/win32/shell32/lang/uk-UA.rc index 3d6f18cc690..d01b29db63d 100644 --- a/reactos/dll/win32/shell32/lang/uk-UA.rc +++ b/reactos/dll/win32/shell32/lang/uk-UA.rc @@ -618,9 +618,6 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" - IDS_SHV_COLUMN_DEVNAME "Device Name" - IDS_SHV_COLUMN_PHONE "Phone # or Host Address" - IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Робочий стіл" @@ -628,7 +625,6 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Кошик" IDS_CONTROLPANEL "Панель керування" IDS_ADMINISTRATIVETOOLS "Administrative Tools" - IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "&Великі значки" diff --git a/reactos/dll/win32/shell32/lang/zh-CN.rc b/reactos/dll/win32/shell32/lang/zh-CN.rc index 0cc5e85382e..9c221ea72d4 100644 --- a/reactos/dll/win32/shell32/lang/zh-CN.rc +++ b/reactos/dll/win32/shell32/lang/zh-CN.rc @@ -606,9 +606,6 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" - IDS_SHV_COLUMN_DEVNAME "Device Name" - IDS_SHV_COLUMN_PHONE "Phone # or Host Address" - IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "ЧАГж" @@ -616,7 +613,6 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "»ШКХХѕ" IDS_CONTROLPANEL "їШЦЖГж°е" IDS_ADMINISTRATIVETOOLS "Administrative Tools" - IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "ґуНј±к(&G)" diff --git a/reactos/dll/win32/shell32/lang/zh-TW.rc b/reactos/dll/win32/shell32/lang/zh-TW.rc index e168059c540..24561281463 100644 --- a/reactos/dll/win32/shell32/lang/zh-TW.rc +++ b/reactos/dll/win32/shell32/lang/zh-TW.rc @@ -618,9 +618,6 @@ BEGIN IDS_SHV_COLUMN_COMMENTS "Comments" IDS_SHV_COLUMN_LOCATION "Location" IDS_SHV_COLUMN_MODEL "Model" - IDS_SHV_COLUMN_DEVNAME "Device Name" - IDS_SHV_COLUMN_PHONE "Phone # or Host Address" - IDS_SHV_COLUMN_OWNER "Owner" /* special folders */ IDS_DESKTOP "Desktop" @@ -628,7 +625,6 @@ BEGIN IDS_RECYCLEBIN_FOLDER_NAME "Trash" IDS_CONTROLPANEL "Control Panel" IDS_ADMINISTRATIVETOOLS "Administrative Tools" - IDS_NETWORKCONNECTION "Network Connections" /* context menus */ IDS_VIEW_LARGE "Lar&ge Icons" diff --git a/reactos/dll/win32/shell32/pidl.c b/reactos/dll/win32/shell32/pidl.c index 81a26a59575..b146c928a72 100644 --- a/reactos/dll/win32/shell32/pidl.c +++ b/reactos/dll/win32/shell32/pidl.c @@ -1622,16 +1622,6 @@ BOOL _ILIsNetHood(LPCITEMIDLIST pidl) return FALSE; } -BOOL _ILIsNetConnect(LPCITEMIDLIST pidl) -{ - REFIID iid = _ILGetGUIDPointer(pidl); - - TRACE("(%p)\n",pidl); - - if (iid) - return IsEqualIID(iid, &CLSID_NetworkConnections); - return FALSE; -} LPITEMIDLIST _ILCreateNetHood(void) { @@ -1643,12 +1633,6 @@ LPITEMIDLIST _ILCreateFont(void) return _ILCreateGuid(PT_GUID, &CLSID_FontsFolderShortcut); } -LPITEMIDLIST _ILCreateNetConnect(void) -{ - return _ILCreateGuid(PT_GUID, &CLSID_NetworkConnections); -} - - BOOL _ILIsMyComputer(LPCITEMIDLIST pidl) { REFIID iid = _ILGetGUIDPointer(pidl); diff --git a/reactos/dll/win32/shell32/pidl.h b/reactos/dll/win32/shell32/pidl.h index 7305a518e82..51b655bf0f8 100644 --- a/reactos/dll/win32/shell32/pidl.h +++ b/reactos/dll/win32/shell32/pidl.h @@ -239,7 +239,6 @@ BOOL _ILIsControlPanel (LPCITEMIDLIST pidl); BOOL _ILIsBitBucket (LPCITEMIDLIST pidl); BOOL _ILIsAdminTools (LPCITEMIDLIST pidl); BOOL _ILIsNetHood (LPCITEMIDLIST pidl); -BOOL _ILIsNetConnect (LPCITEMIDLIST pidl); BOOL _ILIsDrive (LPCITEMIDLIST pidl); BOOL _ILIsFolder (LPCITEMIDLIST pidl); BOOL _ILIsValue (LPCITEMIDLIST pidl); @@ -288,10 +287,8 @@ LPITEMIDLIST _ILCreateControlPanel (void); LPITEMIDLIST _ILCreatePrinters (void); LPITEMIDLIST _ILCreateNetwork (void); LPITEMIDLIST _ILCreateNetHood (void); -LPITEMIDLIST _ILCreateNetConnect (void); LPITEMIDLIST _ILCreateAdminTools (void); LPITEMIDLIST _ILCreateFont (void); -LPITEMIDLIST _ILCreateNetConnect (void); LPITEMIDLIST _ILCreateBitBucket (void); LPITEMIDLIST _ILCreateDrive (LPCWSTR); diff --git a/reactos/dll/win32/shell32/precomp.h b/reactos/dll/win32/shell32/precomp.h index ef64d32b5aa..962eb34cead 100644 --- a/reactos/dll/win32/shell32/precomp.h +++ b/reactos/dll/win32/shell32/precomp.h @@ -44,7 +44,7 @@ #include #include #include -//#include +#include #include "base/shell/explorer-new/todo.h" @@ -72,7 +72,6 @@ extern const GUID CLSID_UnixFolder; extern const GUID CLSID_UnixDosFolder; extern const GUID SHELL32_AdvtShortcutProduct; extern const GUID SHELL32_AdvtShortcutComponent; -extern const GUID CLSID_NetworkConnections; #endif diff --git a/reactos/dll/win32/shell32/regsvr.c b/reactos/dll/win32/shell32/regsvr.c index 9e98689c69b..74e6e622e80 100644 --- a/reactos/dll/win32/shell32/regsvr.c +++ b/reactos/dll/win32/shell32/regsvr.c @@ -25,7 +25,6 @@ const GUID CLSID_OpenWith = {0x09799AFB, 0xAD67, 0x11d1, {0xAB, 0 const GUID CLSID_UnixFolder = {0xcc702eb2, 0x7dc5, 0x11d9, {0xc6, 0x87, 0x00, 0x04, 0x23, 0x8a, 0x01, 0xcd}}; const GUID CLSID_UnixDosFolder = {0x9d20aae8, 0x0625, 0x44b0, {0x9c, 0xa7, 0x71, 0x88, 0x9c, 0x22, 0x54, 0xd9}}; const GUID CLSID_FontsFolderShortcut = {0xD20EA4E1, 0x3957, 0x11D2, {0xA4, 0x0B, 0x0C, 0x50, 0x20, 0x52, 0x41,0x52}}; -const GUID CLSID_NetworkConnections = {0x7007ACC7, 0x3202, 0x11D1, {0xAA, 0xD2, 0x00, 0x80, 0x5F, 0xC1, 0x27, 0x0E}}; const GUID SHELL32_AdvtShortcutProduct = {0x9db1186f, 0x40df, 0x11d1, {0xaa, 0x8c, 0x00, 0xc0, 0x4f, 0xb6, 0x78, 0x63}}; const GUID SHELL32_AdvtShortcutComponent = {0x9db1186e, 0x40df, 0x11d1, {0xaa, 0x8c, 0x00, 0xc0, 0x4f, 0xb6, 0x78, 0x63}}; @@ -623,19 +622,6 @@ static struct regsvr_coclass const coclass_list[] = { 0, NULL, NULL, - IDI_SHELL_NETWORK_FOLDER - }, - { &CLSID_NetworkConnections, - "Network Connections", - IDS_NETWORKCONNECTION, - NULL, - "shell32.dll", - "Apartment", - SHELLFOLDER_ATTRIBUTES|SHELLFOLDER_CALLFORATTRIBUTES, - SFGAO_FOLDER, - 0, - NULL, - NULL, IDI_SHELL_MY_NETWORK_PLACES }, { &CLSID_FontsFolderShortcut, @@ -759,7 +745,6 @@ static const WCHAR wszNethoodFolder[] = { 'N','e','t','h','o','o','d',' ','f','o static const WCHAR wszPrinters[] = { 'P','r','i','n','t','e','r','s',0 }; static const WCHAR wszFonts[] = { 'F','o','n','t','s',0 }; static const WCHAR wszAdminTools[] = { 'A','d','m','i','n','T','o','o','l','s',0 }; -static const WCHAR wszNetConnect[] = { 'N','e','t','w','o','r','k',' ','C','o','n','n','e','c','t','i','o','n','s',0 }; const GUID CLSID_FolderOptions = { 0x6DFD7C5C, 0x2451, 0x11d3, {0xa2,0x99,0x00,0xC0,0x4F,0x8e,0xf6,0xaf} }; static struct regsvr_namespace const namespace_extensions_list[] = { @@ -810,11 +795,6 @@ static struct regsvr_namespace const namespace_extensions_list[] = { wszControlPanel, wszAdminTools }, - { - &CLSID_NetworkConnections, - wszControlPanel, - wszNetConnect - }, { NULL } }; diff --git a/reactos/dll/win32/shell32/shell32.rbuild b/reactos/dll/win32/shell32/shell32.rbuild index 674f56e6c1a..d3eeeef2782 100644 --- a/reactos/dll/win32/shell32/shell32.rbuild +++ b/reactos/dll/win32/shell32/shell32.rbuild @@ -60,7 +60,6 @@ shfldr_admintools.c shfldr_netplaces.c shfldr_fonts.c - shfldr_netconnect.c shfldr_cpanel.c shfldr_recyclebin.c shlexec.c diff --git a/reactos/dll/win32/shell32/shell32_main.h b/reactos/dll/win32/shell32/shell32_main.h index 2210d9664a0..a4b05a83162 100644 --- a/reactos/dll/win32/shell32/shell32_main.h +++ b/reactos/dll/win32/shell32/shell32_main.h @@ -99,7 +99,6 @@ HRESULT WINAPI ISF_Printers_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOI HRESULT WINAPI ISF_MyDocuments_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); HRESULT WINAPI ISF_NetworkPlaces_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); HRESULT WINAPI ISF_Fonts_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); -HRESULT WINAPI ISF_NetConnect_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); HRESULT WINAPI ISF_AdminTools_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); HRESULT WINAPI IDropTargetHelper_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); HRESULT WINAPI IFileSystemBindData_Constructor(const WIN32_FIND_DATAW *pfd, LPBC *ppV); diff --git a/reactos/dll/win32/shell32/shellole.c b/reactos/dll/win32/shell32/shellole.c index 48fc22a574f..13f7c30155f 100644 --- a/reactos/dll/win32/shell32/shellole.c +++ b/reactos/dll/win32/shell32/shellole.c @@ -54,7 +54,6 @@ static const struct { {&CLSID_MyDocuments, &ISF_MyDocuments_Constructor}, {&CLSID_NetworkPlaces, &ISF_NetworkPlaces_Constructor}, {&CLSID_FontsFolderShortcut, &ISF_Fonts_Constructor}, - {&CLSID_NetworkConnections, &ISF_NetConnect_Constructor}, {&CLSID_Printers, &ISF_Printers_Constructor}, {&CLSID_AdminFolderShortcut, &ISF_AdminTools_Constructor}, {&CLSID_RecycleBin, &RecycleBin_Constructor}, diff --git a/reactos/dll/win32/shell32/shfldr_netconnect.c b/reactos/dll/win32/shell32/shfldr_netconnect.c deleted file mode 100644 index 3b7f414bc9b..00000000000 --- a/reactos/dll/win32/shell32/shfldr_netconnect.c +++ /dev/null @@ -1,781 +0,0 @@ -/* - * Network Connections Shell Folder - * - * Copyright 2008 Johannes Anderwald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include - -WINE_DEFAULT_DEBUG_CHANNEL (shell); - -/*********************************************************************** -* IShellFolder implementation -*/ - -typedef struct { - const IShellFolder2Vtbl *lpVtbl; - LONG ref; - const IContextMenu2Vtbl *lpVtblContextMenu; - const IPersistFolder2Vtbl *lpVtblPersistFolder2; - - /* both paths are parsible from the desktop */ - LPITEMIDLIST pidlRoot; /* absolute pidl */ - LPCITEMIDLIST apidl; /* currently focused font item */ -} IGenericSFImpl, *LPIGenericSFImpl; - - -static const shvheader NetConnectSFHeader[] = { - {IDS_SHV_COLUMN8, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, - {IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, - {IDS_SHV_COLUMN_STATUS, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, - {IDS_SHV_COLUMN_DEVNAME, SHCOLSTATE_TYPE_DATE | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 12}, - {IDS_SHV_COLUMN_PHONE, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, - {IDS_SHV_COLUMN_OWNER, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 5} -}; - -#define NETCONNECTSHELLVIEWCOLUMNS 6 - -#define COLUMN_NAME 0 -#define COLUMN_TYPE 1 -#define COLUMN_STATUS 2 -#define COLUMN_DEVNAME 3 -#define COLUMN_PHONE 4 -#define COLUMN_OWNER 5 - -static LPIGenericSFImpl __inline impl_from_IContextMenu2(IContextMenu2 *iface) -{ - return (LPIGenericSFImpl)((char *)iface - FIELD_OFFSET(IGenericSFImpl, lpVtblContextMenu)); -} - -static LPIGenericSFImpl __inline impl_from_IPersistFolder2(IPersistFolder2 *iface) -{ - return (LPIGenericSFImpl)((char *)iface - FIELD_OFFSET(IGenericSFImpl, lpVtblPersistFolder2)); -} - -/************************************************************************** - * ISF_NetConnect_fnQueryInterface - * - * NOTE - * supports not IPersist/IPersistFolder - */ -static HRESULT WINAPI ISF_NetConnect_fnQueryInterface (IShellFolder2 *iface, REFIID riid, LPVOID *ppvObj) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj); - - *ppvObj = NULL; - - if (IsEqualIID (riid, &IID_IUnknown) || - IsEqualIID (riid, &IID_IShellFolder) || - IsEqualIID (riid, &IID_IShellFolder2)) - { - *ppvObj = This; - } - else if (IsEqualIID (riid, &IID_IPersistFolder) || - IsEqualIID (riid, &IID_IPersistFolder2)) - { - *ppvObj = (LPVOID *)&This->lpVtblPersistFolder2; - } - if (*ppvObj) - { - IUnknown_AddRef ((IUnknown *) (*ppvObj)); - TRACE ("-- Interface: (%p)->(%p)\n", ppvObj, *ppvObj); - return S_OK; - } - - TRACE ("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI ISF_NetConnect_fnAddRef (IShellFolder2 * iface) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE ("(%p)->(count=%u)\n", This, refCount - 1); - - return refCount; -} - -static ULONG WINAPI ISF_NetConnect_fnRelease (IShellFolder2 * iface) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->ref); - - TRACE ("(%p)->(count=%u)\n", This, refCount + 1); - - if (!refCount) { - TRACE ("-- destroying IShellFolder(%p)\n", This); - SHFree (This->pidlRoot); - HeapFree (GetProcessHeap(), 0, This); - } - return refCount; -} - -/************************************************************************** -* ISF_NetConnect_fnParseDisplayName -*/ -static HRESULT WINAPI ISF_NetConnect_fnParseDisplayName (IShellFolder2 * iface, - HWND hwndOwner, LPBC pbcReserved, LPOLESTR lpszDisplayName, - DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - HRESULT hr = E_UNEXPECTED; - - TRACE ("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n", This, - hwndOwner, pbcReserved, lpszDisplayName, debugstr_w (lpszDisplayName), - pchEaten, ppidl, pdwAttributes); - - *ppidl = 0; - if (pchEaten) - *pchEaten = 0; /* strange but like the original */ - - TRACE ("(%p)->(-- ret=0x%08x)\n", This, hr); - - return hr; -} - -/************************************************************************** - * CreateNetConnectEnumListss() - */ -static BOOL CreateNetConnectEnumList(IEnumIDList *list, DWORD dwFlags) -{ - - return FALSE; -} - -/************************************************************************** -* ISF_NetConnect_fnEnumObjects -*/ -static HRESULT WINAPI ISF_NetConnect_fnEnumObjects (IShellFolder2 * iface, - HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST * ppEnumIDList) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", This, - hwndOwner, dwFlags, ppEnumIDList); - - *ppEnumIDList = IEnumIDList_Constructor(); - if(*ppEnumIDList) - CreateNetConnectEnumList(*ppEnumIDList, dwFlags); - - TRACE ("-- (%p)->(new ID List: %p)\n", This, *ppEnumIDList); - - return (*ppEnumIDList) ? S_OK : E_OUTOFMEMORY; -} - -/************************************************************************** -* ISF_NetConnect_fnBindToObject -*/ -static HRESULT WINAPI ISF_NetConnect_fnBindToObject (IShellFolder2 * iface, - LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", This, - pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); - - return SHELL32_BindToChild (This->pidlRoot, NULL, pidl, riid, ppvOut); -} - -/************************************************************************** -* ISF_NetConnect_fnBindToStorage -*/ -static HRESULT WINAPI ISF_NetConnect_fnBindToStorage (IShellFolder2 * iface, - LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n", This, - pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); - - *ppvOut = NULL; - return E_NOTIMPL; -} - -/************************************************************************** -* ISF_NetConnect_fnCompareIDs -*/ - -static HRESULT WINAPI ISF_NetConnect_fnCompareIDs (IShellFolder2 * iface, - LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - int nReturn; - - TRACE ("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", This, lParam, pidl1, pidl2); - nReturn = SHELL32_CompareIDs ((IShellFolder*)This, lParam, pidl1, pidl2); - TRACE ("-- %i\n", nReturn); - return nReturn; -} - -/************************************************************************** -* ISF_NetConnect_fnCreateViewObject -*/ -static HRESULT WINAPI ISF_NetConnect_fnCreateViewObject (IShellFolder2 * iface, - HWND hwndOwner, REFIID riid, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - LPSHELLVIEW pShellView; - HRESULT hr = E_INVALIDARG; - - TRACE ("(%p)->(hwnd=%p,%s,%p)\n", This, - hwndOwner, shdebugstr_guid (riid), ppvOut); - - if (!ppvOut) - return hr; - - *ppvOut = NULL; - - if (IsEqualIID (riid, &IID_IShellView)) - { - pShellView = IShellView_Constructor ((IShellFolder *) iface); - if (pShellView) - { - hr = IShellView_QueryInterface (pShellView, riid, ppvOut); - IShellView_Release (pShellView); - } - } - TRACE ("-- (%p)->(interface=%p)\n", This, ppvOut); - return hr; -} - -/************************************************************************** -* ISF_NetConnect_fnGetAttributesOf -*/ -static HRESULT WINAPI ISF_NetConnect_fnGetAttributesOf (IShellFolder2 * iface, - UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - HRESULT hr = S_OK; - - TRACE ("(%p)->(cidl=%d apidl=%p mask=%p (0x%08x))\n", This, - cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0); - - if (!rgfInOut) - return E_INVALIDARG; - if (cidl && !apidl) - return E_INVALIDARG; - - if (*rgfInOut == 0) - *rgfInOut = ~0; - - /* make sure SFGAO_VALIDATE is cleared, some apps depend on that */ - *rgfInOut &= ~SFGAO_VALIDATE; - - TRACE ("-- result=0x%08x\n", *rgfInOut); - return hr; -} - -/************************************************************************** -* ISF_NetConnect_fnGetUIObjectOf -* -* PARAMETERS -* hwndOwner [in] Parent window for any output -* cidl [in] array size -* apidl [in] simple pidl array -* riid [in] Requested Interface -* prgfInOut [ ] reserved -* ppvObject [out] Resulting Interface -* -*/ -static HRESULT WINAPI ISF_NetConnect_fnGetUIObjectOf (IShellFolder2 * iface, - HWND hwndOwner, UINT cidl, LPCITEMIDLIST * apidl, REFIID riid, - UINT * prgfInOut, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - IUnknown *pObj = NULL; - HRESULT hr = E_INVALIDARG; - - TRACE ("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n", This, - hwndOwner, cidl, apidl, shdebugstr_guid (riid), prgfInOut, ppvOut); - - if (!ppvOut) - return hr; - - *ppvOut = NULL; - - if (IsEqualIID (riid, &IID_IContextMenu) && (cidl >= 1)) - { - pObj = (IUnknown*)(&This->lpVtblContextMenu); - This->apidl = apidl[0]; - IUnknown_AddRef(pObj); - hr = S_OK; - } - else - hr = E_NOINTERFACE; - - if (SUCCEEDED(hr) && !pObj) - hr = E_OUTOFMEMORY; - - *ppvOut = pObj; - TRACE ("(%p)->hr=0x%08x\n", This, hr); - return hr; -} - -/************************************************************************** -* ISF_NetConnect_fnGetDisplayNameOf -* -*/ -static HRESULT WINAPI ISF_NetConnect_fnGetDisplayNameOf (IShellFolder2 * iface, - LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) -{ - LPWSTR pszName; - HRESULT hr = E_FAIL; - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE("ISF_NetConnect_fnGetDisplayNameOf (%p)->(pidl=%p,0x%08x,%p)\n", This, pidl, dwFlags, strRet); - - if (!strRet) - return E_INVALIDARG; - - pszName = CoTaskMemAlloc(MAX_PATH * sizeof(WCHAR)); - if (!pszName) - return E_OUTOFMEMORY; - - if (_ILIsNetConnect (pidl)) - { - if (HCR_GetClassNameW(&CLSID_NetworkConnections, pszName, MAX_PATH)) - hr = S_OK; - } - - if (SUCCEEDED(hr)) - { - strRet->uType = STRRET_WSTR; - strRet->u.pOleStr = pszName; - } - else - CoTaskMemFree(pszName); - - return hr; -} - -/************************************************************************** -* ISF_NetConnect_fnSetNameOf -* Changes the name of a file object or subfolder, possibly changing its item -* identifier in the process. -* -* PARAMETERS -* hwndOwner [in] Owner window for output -* pidl [in] simple pidl of item to change -* lpszName [in] the items new display name -* dwFlags [in] SHGNO formatting flags -* ppidlOut [out] simple pidl returned -*/ -static HRESULT WINAPI ISF_NetConnect_fnSetNameOf (IShellFolder2 * iface, - HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */ - LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)->(%p,pidl=%p,%s,%u,%p)\n", This, - hwndOwner, pidl, debugstr_w (lpName), dwFlags, pPidlOut); - return E_NOTIMPL; -} - -static HRESULT WINAPI ISF_NetConnect_fnGetDefaultSearchGUID ( - IShellFolder2 * iface, GUID * pguid) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI ISF_NetConnect_fnEnumSearches (IShellFolder2 * iface, - IEnumExtraSearch ** ppenum) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI ISF_NetConnect_fnGetDefaultColumn (IShellFolder2 * iface, - DWORD dwRes, ULONG * pSort, ULONG * pDisplay) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)\n", This); - - if (pSort) - *pSort = 0; - if (pDisplay) - *pDisplay = 0; - - return S_OK; -} - -static HRESULT WINAPI ISF_NetConnect_fnGetDefaultColumnState ( - IShellFolder2 * iface, UINT iColumn, DWORD * pcsFlags) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)\n", This); - - if (!pcsFlags || iColumn >= NETCONNECTSHELLVIEWCOLUMNS) - return E_INVALIDARG; - *pcsFlags = NetConnectSFHeader[iColumn].pcsFlags; - return S_OK; -} - -static HRESULT WINAPI ISF_NetConnect_fnGetDetailsEx (IShellFolder2 * iface, - LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI ISF_NetConnect_fnGetDetailsOf (IShellFolder2 * iface, - LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS * psd) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - WCHAR buffer[MAX_PATH] = {0}; - HRESULT hr = E_FAIL; - - TRACE("(%p, %p, %d, %p)\n", This, pidl, iColumn, psd); - - if (iColumn >= NETCONNECTSHELLVIEWCOLUMNS) - return E_FAIL; - - psd->fmt = NetConnectSFHeader[iColumn].fmt; - psd->cxChar = NetConnectSFHeader[iColumn].cxChar; - if (pidl == NULL) - { - psd->str.uType = STRRET_WSTR; - if (LoadStringW(shell32_hInstance, NetConnectSFHeader[iColumn].colnameid, buffer, MAX_PATH)) - hr = SHStrDupW(buffer, &psd->str.u.pOleStr); - - return hr; - } - - if (iColumn == COLUMN_NAME) - { - psd->str.uType = STRRET_WSTR; - return IShellFolder2_GetDisplayNameOf(iface, pidl, SHGDN_NORMAL, &psd->str); - } - - psd->str.uType = STRRET_CSTR; - psd->str.u.cStr[0] = '\0'; - - switch(iColumn) - { - case COLUMN_NAME: - case COLUMN_TYPE: - case COLUMN_STATUS: - case COLUMN_DEVNAME: - case COLUMN_PHONE: - case COLUMN_OWNER: - break; - } - - return E_FAIL; -} - -static HRESULT WINAPI ISF_NetConnect_fnMapColumnToSCID (IShellFolder2 * iface, - UINT column, SHCOLUMNID * pscid) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - FIXME ("(%p)\n", This); - - return E_NOTIMPL; -} - -static const IShellFolder2Vtbl vt_ShellFolder2 = { - ISF_NetConnect_fnQueryInterface, - ISF_NetConnect_fnAddRef, - ISF_NetConnect_fnRelease, - ISF_NetConnect_fnParseDisplayName, - ISF_NetConnect_fnEnumObjects, - ISF_NetConnect_fnBindToObject, - ISF_NetConnect_fnBindToStorage, - ISF_NetConnect_fnCompareIDs, - ISF_NetConnect_fnCreateViewObject, - ISF_NetConnect_fnGetAttributesOf, - ISF_NetConnect_fnGetUIObjectOf, - ISF_NetConnect_fnGetDisplayNameOf, - ISF_NetConnect_fnSetNameOf, - /* ShellFolder2 */ - ISF_NetConnect_fnGetDefaultSearchGUID, - ISF_NetConnect_fnEnumSearches, - ISF_NetConnect_fnGetDefaultColumn, - ISF_NetConnect_fnGetDefaultColumnState, - ISF_NetConnect_fnGetDetailsEx, - ISF_NetConnect_fnGetDetailsOf, - ISF_NetConnect_fnMapColumnToSCID -}; - -/************************************************************************** -* IContextMenu2 Implementation -*/ - -/************************************************************************ - * ISF_NetConnect_IContextMenu_QueryInterface - */ -static HRESULT WINAPI ISF_NetConnect_IContextMenu2_QueryInterface(IContextMenu2 * iface, REFIID iid, LPVOID * ppvObject) -{ - IGenericSFImpl * This = impl_from_IContextMenu2(iface); - - TRACE("(%p)\n", This); - - return IShellFolder2_QueryInterface((IShellFolder2*)This, iid, ppvObject); -} - -/************************************************************************ - * ISF_NetConnect_IContextMenu_AddRef - */ -static ULONG WINAPI ISF_NetConnect_IContextMenu2_AddRef(IContextMenu2 * iface) -{ - IGenericSFImpl * This = impl_from_IContextMenu2(iface); - - TRACE("(%p)->(count=%u)\n", This, This->ref); - - return IShellFolder2_AddRef((IShellFolder2*)This); -} - -/************************************************************************ - * ISF_NetConnect_IContextMenu_Release - */ -static ULONG WINAPI ISF_NetConnect_IContextMenu2_Release(IContextMenu2 * iface) -{ - IGenericSFImpl * This = impl_from_IContextMenu2(iface); - - TRACE("(%p)->(count=%u)\n", This, This->ref); - - return IShellFolder2_Release((IShellFolder2*)This); -} - -/************************************************************************** -* ISF_NetConnect_IContextMenu_QueryContextMenu() -*/ -static HRESULT WINAPI ISF_NetConnect_IContextMenu2_QueryContextMenu( - IContextMenu2 *iface, - HMENU hMenu, - UINT indexMenu, - UINT idCmdFirst, - UINT idCmdLast, - UINT uFlags) -{ - int Count = 1; - IGenericSFImpl * This = impl_from_IContextMenu2(iface); - - TRACE("(%p)->(hmenu=%p indexmenu=%x cmdfirst=%x cmdlast=%x flags=%x )\n", - This, hMenu, indexMenu, idCmdFirst, idCmdLast, uFlags); - - return MAKE_HRESULT(SEVERITY_SUCCESS, 0, Count); -} - - -/************************************************************************** -* ISF_NetConnect_IContextMenu_InvokeCommand() -*/ -static HRESULT WINAPI ISF_NetConnect_IContextMenu2_InvokeCommand( - IContextMenu2 *iface, - LPCMINVOKECOMMANDINFO lpcmi) -{ - IGenericSFImpl * This = impl_from_IContextMenu2(iface); - - - TRACE("(%p)->(invcom=%p verb=%p wnd=%p)\n",This,lpcmi,lpcmi->lpVerb, lpcmi->hwnd); - - return S_OK; -} - -/************************************************************************** - * ISF_NetConnect_IContextMenu_GetCommandString() - * - */ -static HRESULT WINAPI ISF_NetConnect_IContextMenu2_GetCommandString( - IContextMenu2 *iface, - UINT_PTR idCommand, - UINT uFlags, - UINT* lpReserved, - LPSTR lpszName, - UINT uMaxNameLen) -{ - IGenericSFImpl * This = impl_from_IContextMenu2(iface); - - TRACE("(%p)->(idcom=%lx flags=%x %p name=%p len=%x)\n",This, idCommand, uFlags, lpReserved, lpszName, uMaxNameLen); - - - return E_FAIL; -} - - - -/************************************************************************** -* ISF_NetConnect_IContextMenu_HandleMenuMsg() -*/ -static HRESULT WINAPI ISF_NetConnect_IContextMenu2_HandleMenuMsg( - IContextMenu2 *iface, - UINT uMsg, - WPARAM wParam, - LPARAM lParam) -{ - IGenericSFImpl * This = impl_from_IContextMenu2(iface); - - - TRACE("ISF_NetConnect_IContextMenu_HandleMenuMsg (%p)->(msg=%x wp=%lx lp=%lx)\n",This, uMsg, wParam, lParam); - - return E_NOTIMPL; -} - -static const IContextMenu2Vtbl vt_ContextMenu2 = -{ - ISF_NetConnect_IContextMenu2_QueryInterface, - ISF_NetConnect_IContextMenu2_AddRef, - ISF_NetConnect_IContextMenu2_Release, - ISF_NetConnect_IContextMenu2_QueryContextMenu, - ISF_NetConnect_IContextMenu2_InvokeCommand, - ISF_NetConnect_IContextMenu2_GetCommandString, - ISF_NetConnect_IContextMenu2_HandleMenuMsg -}; - -/************************************************************************ - * ISF_NetConnect_PersistFolder2_QueryInterface - */ -static HRESULT WINAPI ISF_NetConnect_PersistFolder2_QueryInterface (IPersistFolder2 * iface, - REFIID iid, LPVOID * ppvObj) -{ - IGenericSFImpl * This = impl_from_IPersistFolder2(iface); - - TRACE ("(%p)\n", This); - - return IShellFolder2_QueryInterface ((IShellFolder2*)This, iid, ppvObj); -} - -/************************************************************************ - * ISF_NetConnect_PersistFolder2_AddRef - */ -static ULONG WINAPI ISF_NetConnect_PersistFolder2_AddRef (IPersistFolder2 * iface) -{ - IGenericSFImpl * This = impl_from_IPersistFolder2(iface); - - TRACE ("(%p)->(count=%u)\n", This, This->ref); - - return IShellFolder2_AddRef((IShellFolder2*)This); -} - -/************************************************************************ - * ISF_NetConnect_PersistFolder2_Release - */ -static ULONG WINAPI ISF_NetConnect_PersistFolder2_Release (IPersistFolder2 * iface) -{ - IGenericSFImpl * This = impl_from_IPersistFolder2(iface); - - TRACE ("(%p)->(count=%u)\n", This, This->ref); - - return IShellFolder2_Release((IShellFolder2*)This); -} - -/************************************************************************ - * ISF_NetConnect_PersistFolder2_GetClassID - */ -static HRESULT WINAPI ISF_NetConnect_PersistFolder2_GetClassID ( - IPersistFolder2 * iface, CLSID * lpClassId) -{ - IGenericSFImpl * This = impl_from_IPersistFolder2(iface); - - TRACE ("(%p)\n", This); - - if (!lpClassId) - return E_POINTER; - - *lpClassId = CLSID_NetworkConnections; - - return S_OK; -} - -/************************************************************************ - * ISF_NetConnect_PersistFolder2_Initialize - * - * NOTES: it makes no sense to change the pidl - */ -static HRESULT WINAPI ISF_NetConnect_PersistFolder2_Initialize ( - IPersistFolder2 * iface, LPCITEMIDLIST pidl) -{ - IGenericSFImpl * This = impl_from_IPersistFolder2(iface); - - TRACE ("(%p)->(%p)\n", This, pidl); - - - return E_NOTIMPL; -} - -/************************************************************************** - * ISF_NetConnect_PersistFolder2_GetCurFolder - */ -static HRESULT WINAPI ISF_NetConnect_PersistFolder2_GetCurFolder ( - IPersistFolder2 * iface, LPITEMIDLIST * pidl) -{ - IGenericSFImpl * This = impl_from_IPersistFolder2(iface); - - TRACE ("(%p)->(%p)\n", This, pidl); - - if (!pidl) - return E_POINTER; - - *pidl = ILClone (This->pidlRoot); - - return S_OK; -} - -static const IPersistFolder2Vtbl vt_PersistFolder2 = -{ - ISF_NetConnect_PersistFolder2_QueryInterface, - ISF_NetConnect_PersistFolder2_AddRef, - ISF_NetConnect_PersistFolder2_Release, - ISF_NetConnect_PersistFolder2_GetClassID, - ISF_NetConnect_PersistFolder2_Initialize, - ISF_NetConnect_PersistFolder2_GetCurFolder -}; - -/************************************************************************** -* ISF_NetConnect_Constructor -*/ -HRESULT WINAPI ISF_NetConnect_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) -{ - IGenericSFImpl *sf; - - TRACE ("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid (riid)); - - if (!ppv) - return E_POINTER; - if (pUnkOuter) - return CLASS_E_NOAGGREGATION; - - sf = (IGenericSFImpl *) HeapAlloc ( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof (IGenericSFImpl)); - if (!sf) - return E_OUTOFMEMORY; - - sf->ref = 1; - sf->lpVtbl = &vt_ShellFolder2; - sf->lpVtblPersistFolder2 = &vt_PersistFolder2; - sf->lpVtblContextMenu = &vt_ContextMenu2; - sf->pidlRoot = _ILCreateNetConnect(); /* my qualified pidl */ - - if (!SUCCEEDED (IShellFolder2_QueryInterface ((IShellFolder2*)sf, riid, ppv))) - { - IShellFolder2_Release((IShellFolder2*)sf); - return E_NOINTERFACE; - } - - TRACE ("--(%p)\n", sf); - return S_OK; -} diff --git a/reactos/dll/win32/shell32/shresdef.h b/reactos/dll/win32/shell32/shresdef.h index 39202a6d4a9..66ae980124b 100644 --- a/reactos/dll/win32/shell32/shresdef.h +++ b/reactos/dll/win32/shell32/shresdef.h @@ -89,7 +89,6 @@ #define IDS_NETWORKPLACE 75 #define IDS_FONTS 76 #define IDS_PRINTERS 77 -#define IDS_NETWORKCONNECTION 78 #define IDS_CREATEFOLDER_DENIED 128 #define IDS_CREATEFOLDER_CAPTION 129 @@ -166,10 +165,6 @@ #define IDS_FORMATDRIVE 327 #define IDS_RENAME 328 #define IDS_INSERT 329 -#define IDS_SHV_COLUMN_DEVNAME 330 -#define IDS_SHV_COLUMN_PHONE 331 -#define IDS_SHV_COLUMN_OWNER 332 - /* Note: this string is referenced from the registry */ #define IDS_RECYCLEBIN_FOLDER_NAME 8964 @@ -246,7 +241,6 @@ #define IDI_SHELL_MY_DOCUMENTS 235 #define IDI_SHELL_CONTROL_PANEL1 330 #define IDI_SHELL_ADMINTOOLS 328 -#define IDI_SHELL_NETWORK_FOLDER 172 // Icons for Folder Options (ID's identical to Windows XP SP3) #define IDI_SHELL_SHOW_COMMON_TASKS 182 From 57164f685443a6b6920b35787534a3ad2454445f Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Wed, 27 Aug 2008 03:59:24 +0000 Subject: [PATCH 195/324] Merge 34717 from ros-amd64-bringup branch: - Fix prototypes of _findfirst, _findnext, _findclose, _findfirsti64, _findnexti64 _wfindfirst, _wfindnext, _wfindfirst64, _wfindnext64, strndup, - Fix a number of pointer to int casts svn path=/trunk/; revision=35695 --- reactos/include/crt/io.h | 20 ++++++------- reactos/include/reactos/wine/library.h | 11 +++---- reactos/lib/3rdparty/mingw/gccmain.c | 9 +++--- reactos/lib/3rdparty/mingw/pseudo-reloc.c | 6 ++-- reactos/lib/sdk/crt/misc/getargs.c | 5 ++-- reactos/lib/sdk/crt/search/lfind.c | 8 ++--- reactos/lib/sdk/crt/search/lsearch.c | 5 ++-- reactos/lib/sdk/crt/stdio/find.c | 36 +++++------------------ 8 files changed, 42 insertions(+), 58 deletions(-) diff --git a/reactos/include/crt/io.h b/reactos/include/crt/io.h index e49a6b7e4e8..0d4a68844ca 100644 --- a/reactos/include/crt/io.h +++ b/reactos/include/crt/io.h @@ -129,10 +129,10 @@ extern "C" { * _findclose calls. _findnext also returns -1 if no match could be found, * and 0 if a match was found. Call _findclose when you are finished. */ -/* FIXME: Should these all use intptr_t, as per recent MSDN docs? */ -_CRTIMP long __cdecl __MINGW_NOTHROW _findfirst (const char*, struct _finddata_t*); -_CRTIMP int __cdecl __MINGW_NOTHROW _findnext (long, struct _finddata_t*); -_CRTIMP int __cdecl __MINGW_NOTHROW _findclose (long); + +_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _findfirst (const char*, struct _finddata_t*); +_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _findnext (intptr_t, struct _finddata_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _findclose (intptr_t); _CRTIMP int __cdecl __MINGW_NOTHROW _chdir (const char*); _CRTIMP char* __cdecl __MINGW_NOTHROW _getcwd (char*, int); @@ -143,8 +143,8 @@ _CRTIMP int __cdecl __MINGW_NOTHROW _chmod (const char*, int); #ifdef __MSVCRT__ _CRTIMP __int64 __cdecl __MINGW_NOTHROW _filelengthi64(int); -_CRTIMP long __cdecl __MINGW_NOTHROW _findfirsti64(const char*, struct _finddatai64_t*); -_CRTIMP int __cdecl __MINGW_NOTHROW _findnexti64(long, struct _finddatai64_t*); +_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _findfirsti64(const char*, struct _finddatai64_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _findnexti64(intptr_t, struct _finddatai64_t*); _CRTIMP __int64 __cdecl __MINGW_NOTHROW _lseeki64(int, __int64, int); _CRTIMP __int64 __cdecl __MINGW_NOTHROW _telli64(int); /* These require newer versions of msvcrt.dll (6.1 or higher). */ @@ -259,14 +259,14 @@ _CRTIMP int __cdecl __MINGW_NOTHROW _write (int, const void*, unsigned int); _CRTIMP int __cdecl __MINGW_NOTHROW _waccess(const wchar_t*, int); _CRTIMP int __cdecl __MINGW_NOTHROW _wchmod(const wchar_t*, int); _CRTIMP int __cdecl __MINGW_NOTHROW _wcreat(const wchar_t*, int); -_CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirst(const wchar_t*, struct _wfinddata_t*); -_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext(long, struct _wfinddata_t *); +_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst(const wchar_t*, struct _wfinddata_t*); +_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindnext(intptr_t, struct _wfinddata_t *); _CRTIMP int __cdecl __MINGW_NOTHROW _wunlink(const wchar_t*); _CRTIMP int __cdecl __MINGW_NOTHROW _wopen(const wchar_t*, int, ...); _CRTIMP int __cdecl __MINGW_NOTHROW _wsopen(const wchar_t*, int, int, ...); _CRTIMP wchar_t * __cdecl __MINGW_NOTHROW _wmktemp(wchar_t*); -_CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*); -_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnexti64(long, struct _wfinddatai64_t*); +_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnexti64(intptr_t, struct _wfinddatai64_t*); #if __MSVCRT_VERSION__ >= 0x0601 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst64(const wchar_t*, struct __wfinddata64_t*); _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindnext64(intptr_t, struct __wfinddata64_t*); diff --git a/reactos/include/reactos/wine/library.h b/reactos/include/reactos/wine/library.h index 203a810a667..f0fe42f856a 100644 --- a/reactos/include/reactos/wine/library.h +++ b/reactos/include/reactos/wine/library.h @@ -23,6 +23,7 @@ #include #include +#include #include #include @@ -131,9 +132,9 @@ WINE_LDT_EXTERN struct __wine_ldt_copy /* helper functions to manipulate the LDT_ENTRY structure */ inline static void wine_ldt_set_base( LDT_ENTRY *ent, const void *base ) { - ent->BaseLow = (WORD)(unsigned long)base; - ent->HighWord.Bits.BaseMid = (BYTE)((unsigned long)base >> 16); - ent->HighWord.Bits.BaseHi = (BYTE)((unsigned long)base >> 24); + ent->BaseLow = (WORD)(intptr_t)base; + ent->HighWord.Bits.BaseMid = (BYTE)((intptr_t)base >> 16); + ent->HighWord.Bits.BaseHi = (BYTE)((intptr_t)base >> 24); } inline static void wine_ldt_set_limit( LDT_ENTRY *ent, unsigned int limit ) { @@ -144,8 +145,8 @@ inline static void wine_ldt_set_limit( LDT_ENTRY *ent, unsigned int limit ) inline static void *wine_ldt_get_base( const LDT_ENTRY *ent ) { return (void *)(ent->BaseLow | - (unsigned long)ent->HighWord.Bits.BaseMid << 16 | - (unsigned long)ent->HighWord.Bits.BaseHi << 24); + (intptr_t)ent->HighWord.Bits.BaseMid << 16 | + (intptr_t)ent->HighWord.Bits.BaseHi << 24); } inline static unsigned int wine_ldt_get_limit( const LDT_ENTRY *ent ) { diff --git a/reactos/lib/3rdparty/mingw/gccmain.c b/reactos/lib/3rdparty/mingw/gccmain.c index 81c5fdd0891..0888741ff09 100644 --- a/reactos/lib/3rdparty/mingw/gccmain.c +++ b/reactos/lib/3rdparty/mingw/gccmain.c @@ -13,6 +13,7 @@ /* Needed for the atexit prototype. */ #include +#include typedef void (*func_ptr) (void); extern func_ptr __CTOR_LIST__[]; @@ -37,8 +38,8 @@ __do_global_dtors (void) void __do_global_ctors (void) { - unsigned long nptrs = (unsigned long) __CTOR_LIST__[0]; - unsigned i; + unsigned long nptrs = (unsigned long) (ptrdiff_t) __CTOR_LIST__[0]; + unsigned long i; /* * If the first entry in the constructor list is -1 then the list @@ -47,8 +48,7 @@ __do_global_ctors (void) */ if (nptrs == -1) { - for (nptrs = 0; __CTOR_LIST__[nptrs + 1] != 0; nptrs++) - ; + for (nptrs = 0; __CTOR_LIST__[nptrs + 1] != 0; nptrs++); } /* @@ -77,3 +77,4 @@ __main (void) } } + diff --git a/reactos/lib/3rdparty/mingw/pseudo-reloc.c b/reactos/lib/3rdparty/mingw/pseudo-reloc.c index 9fe607d2cb8..66425e34ea2 100644 --- a/reactos/lib/3rdparty/mingw/pseudo-reloc.c +++ b/reactos/lib/3rdparty/mingw/pseudo-reloc.c @@ -28,12 +28,12 @@ runtime_pseudo_reloc; static void do_pseudo_reloc (void* start, void* end, void* base) { - DWORD reloc_target; + ptrdiff_t reloc_target; runtime_pseudo_reloc* r; for (r = (runtime_pseudo_reloc*) start; r < (runtime_pseudo_reloc*) end; r++) { - reloc_target = (DWORD) base + r->target; - *((DWORD*) reloc_target) += r->addend; + reloc_target = (ptrdiff_t) base + r->target; + *((ptrdiff_t*) reloc_target) += r->addend; } } diff --git a/reactos/lib/sdk/crt/misc/getargs.c b/reactos/lib/sdk/crt/misc/getargs.c index 98647620366..68f06498517 100644 --- a/reactos/lib/sdk/crt/misc/getargs.c +++ b/reactos/lib/sdk/crt/misc/getargs.c @@ -24,7 +24,7 @@ extern wchar_t **__winitenv; extern HANDLE hHeap; -char* strndup(char* name, int len) +char* strndup(char* name, size_t len) { char *s = malloc(len + 1); if (s != NULL) @@ -35,7 +35,7 @@ char* strndup(char* name, int len) return s; } -wchar_t* wcsndup(wchar_t* name, int len) +wchar_t* wcsndup(wchar_t* name, size_t len) { wchar_t *s = malloc((len + 1) * sizeof(wchar_t)); if (s != NULL) @@ -362,3 +362,4 @@ wchar_t*** __p___wargv(void) return &__wargv; } + diff --git a/reactos/lib/sdk/crt/search/lfind.c b/reactos/lib/sdk/crt/search/lfind.c index 1a034769a5d..7894fd1cf77 100644 --- a/reactos/lib/sdk/crt/search/lfind.c +++ b/reactos/lib/sdk/crt/search/lfind.c @@ -1,12 +1,11 @@ -#include #include - +#include /* * @implemented */ -void *_lfind(const void *key, const void *base, size_t *nelp, - size_t width, int (*compar)(const void *, const void *)) +void *_lfind(const void *key, const void *base, unsigned int *nelp, + unsigned int width, int (*compar)(const void *, const void *)) { char* char_base = (char*)base; unsigned int i; @@ -19,3 +18,4 @@ void *_lfind(const void *key, const void *base, size_t *nelp, return NULL; } + diff --git a/reactos/lib/sdk/crt/search/lsearch.c b/reactos/lib/sdk/crt/search/lsearch.c index 07ca9b80740..053f9a3d879 100644 --- a/reactos/lib/sdk/crt/search/lsearch.c +++ b/reactos/lib/sdk/crt/search/lsearch.c @@ -1,11 +1,11 @@ -#include #include #include +#include /* * @implemented */ -void *_lsearch(const void *key, void *base, size_t *nelp, size_t width, +void *_lsearch(const void *key, void *base, unsigned int *nelp, unsigned int width, int (*compar)(const void *, const void *)) { void *ret_find = _lfind(key,base,nelp,width,compar); @@ -19,3 +19,4 @@ void *_lsearch(const void *key, void *base, size_t *nelp, size_t width, return base; } + diff --git a/reactos/lib/sdk/crt/stdio/find.c b/reactos/lib/sdk/crt/stdio/find.c index 8ef2f905777..590ddc3f3a5 100644 --- a/reactos/lib/sdk/crt/stdio/find.c +++ b/reactos/lib/sdk/crt/stdio/find.c @@ -4,17 +4,13 @@ /* * @implemented */ -#if defined(_UNICODE) || !(__MINGW32_MAJOR_VERSION < 3 || __MINGW32_MINOR_VERSION < 3) -long -#else -int -#endif +intptr_t _tfindfirst(const _TCHAR* _name, struct _tfinddata_t* result) { WIN32_FIND_DATA FindFileData; long hFindFile; - hFindFile = (long)FindFirstFile(_name, &FindFileData); + hFindFile = (intptr_t)FindFirstFile(_name, &FindFileData); if (hFindFile == -1) { _dosmaperr(GetLastError()); return -1; @@ -33,13 +29,7 @@ _tfindfirst(const _TCHAR* _name, struct _tfinddata_t* result) /* * @implemented */ -int _tfindnext( -#if defined(_UNICODE) || !(__MINGW32_MAJOR_VERSION < 3 || __MINGW32_MINOR_VERSION < 3) - long handle, -#else - int handle, -#endif - struct _tfinddata_t* result) +intptr_t _tfindnext(intptr_t handle, struct _tfinddata_t* result) { WIN32_FIND_DATA FindFileData; @@ -62,12 +52,12 @@ int _tfindnext( /* * @implemented */ -long _tfindfirsti64(const _TCHAR *_name, struct _tfinddatai64_t *result) +intptr_t _tfindfirsti64(const _TCHAR *_name, struct _tfinddatai64_t *result) { WIN32_FIND_DATA FindFileData; long hFindFile; - hFindFile = (long)FindFirstFile(_name, &FindFileData); + hFindFile = (intptr_t)FindFirstFile(_name, &FindFileData); if (hFindFile == -1) { _dosmaperr(GetLastError()); @@ -85,14 +75,10 @@ long _tfindfirsti64(const _TCHAR *_name, struct _tfinddatai64_t *result) return hFindFile; } -//_CRTIMP long __cdecl _findfirsti64(const char*, struct _finddatai64_t*); -//_CRTIMP int __cdecl _findnexti64(long, struct _finddatai64_t*); - - /* * @implemented */ -int _tfindnexti64(long handle, struct _tfinddatai64_t *result) +int _tfindnexti64(intptr_t handle, struct _tfinddatai64_t *result) { WIN32_FIND_DATA FindFileData; @@ -119,15 +105,9 @@ int _tfindnexti64(long handle, struct _tfinddatai64_t *result) /* * @implemented */ -int _findclose( -#if __MINGW32_MAJOR_VERSION < 3 || __MINGW32_MINOR_VERSION < 3 - int handle -#else - long handle -#endif - ) +int _findclose(intptr_t handle) { - if (!FindClose((void*)handle)) { + if (!FindClose((HANDLE)handle)) { _dosmaperr(GetLastError()); return -1; } From 0346f58af501eb4e8e4b3e70479a03bd1c337e8b Mon Sep 17 00:00:00 2001 From: Jeffrey Morlan Date: Wed, 27 Aug 2008 14:47:49 +0000 Subject: [PATCH 196/324] Fix StretchBlt ugliness in qemu. Patch by grschneider. svn path=/trunk/; revision=35699 --- .../subsystems/win32/win32k/dib/dib16bpp.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/reactos/subsystems/win32/win32k/dib/dib16bpp.c b/reactos/subsystems/win32/win32k/dib/dib16bpp.c index 7d4417cd0d1..d3a5f27a67d 100644 --- a/reactos/subsystems/win32/win32k/dib/dib16bpp.c +++ b/reactos/subsystems/win32/win32k/dib/dib16bpp.c @@ -466,18 +466,6 @@ typedef unsigned short PIXEL; /* 16-bit HiColor (565 format) */ __inline PIXEL average16(PIXEL a, PIXEL b) { -// This one doesn't work -/* - if (a == b) - { - return a; - } - else - { - unsigned short mask = ~ (((a | b) & 0x0410) << 1); - return ((a & mask) + (b & mask)) >> 1; - }*/ /* if */ - // This one should be correct, but it's too long /* unsigned char r1, g1, b1, r2, g2, b2, rr, gr, br; @@ -499,8 +487,11 @@ __inline PIXEL average16(PIXEL a, PIXEL b) return res; */ - // This one is the short form of the correct one ;-) - return (((a ^ b) & 0xf7deU) >> 1) + (a & b); + // This one is the short form of the correct one, but does not work for QEMU (expects 555 format) + //return (((a ^ b) & 0xf7deU) >> 1) + (a & b); + + //hack until short version works properly + return a; } //NOTE: If you change something here, please do the same in other dibXXbpp.c files! From 0a12af7eab9570d5084e6d63f0688c6276c0cb4a Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Wed, 27 Aug 2008 15:19:40 +0000 Subject: [PATCH 197/324] - Add constants svn path=/trunk/; revision=35700 --- reactos/include/psdk/ipifcons.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/reactos/include/psdk/ipifcons.h b/reactos/include/psdk/ipifcons.h index 0a9e0e0d6e1..4dc256bedc0 100644 --- a/reactos/include/psdk/ipifcons.h +++ b/reactos/include/psdk/ipifcons.h @@ -30,4 +30,9 @@ #define MIB_IF_TYPE_PPP 23 #define MIB_IF_TYPE_LOOPBACK 24 #define MIB_IF_TYPE_SLIP 28 + +#define IF_TYPE_OTHER 1 +#define IF_TYPE_ETHERNET_CSMACD 6 +#define IF_TYPE_IEEE80211 71 + #endif /* _IPIFCONS_H */ From ac962ebea4e84828be941985c7c348765d0c3a49 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Wed, 27 Aug 2008 15:55:32 +0000 Subject: [PATCH 198/324] - Implement CmpQueryKeyName as a wrapper around CmpConstructName helper function (which is stubbed now). svn path=/trunk/; revision=35705 --- reactos/ntoskrnl/config/cmkcbncb.c | 8 +++ reactos/ntoskrnl/config/cmsysini.c | 71 ++++++++++++++++++++++++-- reactos/ntoskrnl/include/internal/cm.h | 6 +++ 3 files changed, 82 insertions(+), 3 deletions(-) diff --git a/reactos/ntoskrnl/config/cmkcbncb.c b/reactos/ntoskrnl/config/cmkcbncb.c index c7c85d0e827..bc24904bdfa 100644 --- a/reactos/ntoskrnl/config/cmkcbncb.c +++ b/reactos/ntoskrnl/config/cmkcbncb.c @@ -886,6 +886,14 @@ CmpCreateKeyControlBlock(IN PHHIVE Hive, return Kcb; } +PUNICODE_STRING +NTAPI +CmpConstructName(IN PCM_KEY_CONTROL_BLOCK Kcb) +{ + UNIMPLEMENTED; + return NULL; +} + VOID NTAPI EnlistKeyBodyWithKCB(IN PCM_KEY_BODY KeyBody, diff --git a/reactos/ntoskrnl/config/cmsysini.c b/reactos/ntoskrnl/config/cmsysini.c index 50c40eb5460..76e34da203a 100644 --- a/reactos/ntoskrnl/config/cmsysini.c +++ b/reactos/ntoskrnl/config/cmsysini.c @@ -119,9 +119,74 @@ CmpQueryKeyName(IN PVOID ObjectBody, OUT PULONG ReturnLength, IN KPROCESSOR_MODE PreviousMode) { - DPRINT1("CmpQueryKeyName() called\n"); - ASSERT(FALSE); - return STATUS_SUCCESS; + PUNICODE_STRING KeyName; + NTSTATUS Status = STATUS_SUCCESS; + PCM_KEY_BODY KeyBody = (PCM_KEY_BODY)ObjectBody; + PCM_KEY_CONTROL_BLOCK Kcb = KeyBody->KeyControlBlock; + + /* Acquire hive lock */ + CmpLockRegistry(); + + /* Lock KCB shared */ + CmpAcquireKcbLockShared(Kcb); + + /* Check if it's a deleted block */ + if (Kcb->Delete) + { + /* Release the locks */ + CmpReleaseKcbLock(Kcb); + CmpUnlockRegistry(); + + /* Let the caller know it's deleted */ + return STATUS_KEY_DELETED; + } + + /* Get the name */ + KeyName = CmpConstructName(Kcb); + + /* Release the locks */ + CmpReleaseKcbLock(Kcb); + CmpUnlockRegistry(); + + /* Check if we got the name */ + if (!KeyName) return STATUS_INSUFFICIENT_RESOURCES; + + /* Set the returned length */ + *ReturnLength = KeyName->Length + sizeof(OBJECT_NAME_INFORMATION) + sizeof(WCHAR); + + /* Check if it fits into the provided buffer */ + if ((Length < sizeof(OBJECT_NAME_INFORMATION)) || + (Length < (*ReturnLength - sizeof(OBJECT_NAME_INFORMATION)))) + { + /* Free the buffer allocated by CmpConstructName */ + ExFreePool(KeyName->Buffer); + + /* Return buffer length failure */ + return STATUS_INFO_LENGTH_MISMATCH; + } + + /* Fill in the result */ + _SEH_TRY + { + /* Return data to user */ + ObjectNameInfo->Name.Buffer = (PWCHAR)(ObjectNameInfo + 1); + ObjectNameInfo->Name.MaximumLength = KeyName->Length; + ObjectNameInfo->Name.Length = KeyName->Length; + + /* Copy string content*/ + RtlCopyMemory(ObjectNameInfo->Name.Buffer, KeyName->Buffer, *ReturnLength); + } + _SEH_HANDLE + { + /* Get the status */ + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + + /* Free the buffer allocated by CmpConstructName */ + ExFreePool(KeyName->Buffer); + + return Status; } NTSTATUS diff --git a/reactos/ntoskrnl/include/internal/cm.h b/reactos/ntoskrnl/include/internal/cm.h index 0c3768eb656..a930f05e9cb 100644 --- a/reactos/ntoskrnl/include/internal/cm.h +++ b/reactos/ntoskrnl/include/internal/cm.h @@ -899,6 +899,12 @@ CmpCleanUpSubKeyInfo( IN PCM_KEY_CONTROL_BLOCK Kcb ); +PUNICODE_STRING +NTAPI +CmpConstructName( + IN PCM_KEY_CONTROL_BLOCK Kcb +); + VOID NTAPI CmpDereferenceKeyControlBlockWithLock( From f971e1392e47ef535aa9e7b80b4971fe6c2fecb9 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Wed, 27 Aug 2008 17:18:25 +0000 Subject: [PATCH 199/324] - Start Implementing Network Connections ShellFolder svn path=/trunk/; revision=35707 --- reactos/dll/win32/netshell/classfactory.c | 125 +++ reactos/dll/win32/netshell/enumlist.c | 364 +++++++ reactos/dll/win32/netshell/lang/.gitignore | 0 reactos/dll/win32/netshell/netshell.c | 144 +++ reactos/dll/win32/netshell/netshell.rbuild | 27 + reactos/dll/win32/netshell/netshell.rc | 10 + reactos/dll/win32/netshell/netshell.spec | 34 + reactos/dll/win32/netshell/precomp.h | 82 ++ reactos/dll/win32/netshell/res/netshell.ico | Bin 0 -> 40070 bytes reactos/dll/win32/netshell/resource.h | 31 + .../dll/win32/netshell/shfldr_netconnect.c | 905 ++++++++++++++++++ reactos/dll/win32/win32.rbuild | 3 + 12 files changed, 1725 insertions(+) create mode 100644 reactos/dll/win32/netshell/classfactory.c create mode 100644 reactos/dll/win32/netshell/enumlist.c create mode 100644 reactos/dll/win32/netshell/lang/.gitignore create mode 100644 reactos/dll/win32/netshell/netshell.c create mode 100644 reactos/dll/win32/netshell/netshell.rbuild create mode 100644 reactos/dll/win32/netshell/netshell.rc create mode 100644 reactos/dll/win32/netshell/netshell.spec create mode 100644 reactos/dll/win32/netshell/precomp.h create mode 100644 reactos/dll/win32/netshell/res/netshell.ico create mode 100644 reactos/dll/win32/netshell/resource.h create mode 100644 reactos/dll/win32/netshell/shfldr_netconnect.c diff --git a/reactos/dll/win32/netshell/classfactory.c b/reactos/dll/win32/netshell/classfactory.c new file mode 100644 index 00000000000..7cd61c62586 --- /dev/null +++ b/reactos/dll/win32/netshell/classfactory.c @@ -0,0 +1,125 @@ +#include + +typedef struct +{ + const IClassFactoryVtbl *lpVtbl; + LONG ref; + CLSID *rclsid; + LPFNCREATEINSTANCE lpfnCI; + const IID * riidInst; +} IClassFactoryImpl; + + +static +HRESULT +WINAPI +IClassFactory_fnQueryInterface( + LPCLASSFACTORY iface, + REFIID riid, + LPVOID *ppvObj) +{ + IClassFactoryImpl *This = (IClassFactoryImpl *)iface; + + *ppvObj = NULL; + + if(IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IClassFactory)) + { + *ppvObj = This; + InterlockedIncrement(&This->ref); + return S_OK; + } + return E_NOINTERFACE; +} + +static +ULONG +WINAPI +IClassFactory_fnAddRef( + LPCLASSFACTORY iface) +{ + IClassFactoryImpl *This = (IClassFactoryImpl *)iface; + ULONG refCount = InterlockedIncrement(&This->ref); + + return refCount; +} + +static +ULONG +WINAPI +IClassFactory_fnRelease( + LPCLASSFACTORY iface) +{ + IClassFactoryImpl *This = (IClassFactoryImpl *)iface; + ULONG refCount = InterlockedDecrement(&This->ref); + + if (!refCount) + { + HeapFree(GetProcessHeap(),0,This); + return 0; + } + return refCount; +} + +static +HRESULT +WINAPI +IClassFactory_fnCreateInstance( + LPCLASSFACTORY iface, + LPUNKNOWN pUnkOuter, + REFIID riid, + LPVOID *ppvObject) +{ + IClassFactoryImpl *This = (IClassFactoryImpl *)iface; + + *ppvObject = NULL; + + if ( This->riidInst==NULL || IsEqualCLSID(riid, This->riidInst) || IsEqualCLSID(riid, &IID_IUnknown) ) + { + return This->lpfnCI(pUnkOuter, riid, ppvObject); + } + + return E_NOINTERFACE; +} + +static +HRESULT +WINAPI IClassFactory_fnLockServer( + LPCLASSFACTORY iface, + BOOL fLock) +{ + //IClassFactoryImpl *This = (IClassFactoryImpl *)iface; + return E_NOTIMPL; +} + + +static const IClassFactoryVtbl dclfvt = +{ + IClassFactory_fnQueryInterface, + IClassFactory_fnAddRef, + IClassFactory_fnRelease, + IClassFactory_fnCreateInstance, + IClassFactory_fnLockServer +}; + + +IClassFactory * +IClassFactory_fnConstructor( + LPFNCREATEINSTANCE lpfnCI, + PLONG pcRefDll, + REFIID riidInst) +{ + IClassFactoryImpl* lpclf; + + lpclf = HeapAlloc(GetProcessHeap(),0,sizeof(IClassFactoryImpl)); + lpclf->ref = 1; + lpclf->lpVtbl = &dclfvt; + lpclf->lpfnCI = lpfnCI; + + if (pcRefDll) + InterlockedIncrement(pcRefDll); + lpclf->riidInst = riidInst; + + return (LPCLASSFACTORY)lpclf; +} + + diff --git a/reactos/dll/win32/netshell/enumlist.c b/reactos/dll/win32/netshell/enumlist.c new file mode 100644 index 00000000000..814ea42e662 --- /dev/null +++ b/reactos/dll/win32/netshell/enumlist.c @@ -0,0 +1,364 @@ +#include + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +typedef struct tagGUIDStruct +{ + BYTE dummy; /* offset 01 is unknown */ + GUID guid; /* offset 02 */ +} GUIDStruct; + +#define PT_GUID 0x1F + +typedef struct tagPIDLDATA +{ + BYTE type; /*00*/ + union + { + struct tagGUIDStruct guid; + struct tagVALUEStruct value; + }u; +} PIDLDATA, *LPPIDLDATA; + +typedef struct tagENUMLIST +{ + struct tagENUMLIST *pNext; + LPITEMIDLIST pidl; + +}ENUMLIST, *LPENUMLIST; + +typedef struct +{ + const IEnumIDListVtbl *lpVtbl; + LONG ref; + LPENUMLIST mpFirst; + LPENUMLIST mpLast; + LPENUMLIST mpCurrent; + +} IEnumIDListImpl; + +/************************************************************************** + * AddToEnumList() + */ +BOOL +AddToEnumList( + IEnumIDList * iface, + LPITEMIDLIST pidl) +{ + LPENUMLIST pNew; + IEnumIDListImpl *This = (IEnumIDListImpl *)iface; + + + if (!iface || !pidl) + return FALSE; + + pNew = (LPENUMLIST)SHAlloc(sizeof(ENUMLIST)); + if(pNew) + { + pNew->pNext = NULL; + pNew->pidl = pidl; + + if(!This->mpFirst) + { + This->mpFirst = pNew; + This->mpCurrent = pNew; + } + + if(This->mpLast) + { + /*add the new item to the end of the list */ + This->mpLast->pNext = pNew; + } + + /*update the last item pointer */ + This->mpLast = pNew; + return TRUE; + } + return FALSE; +} + +static +HRESULT +WINAPI +IEnumIDList_fnQueryInterface( + IEnumIDList * iface, + REFIID riid, + LPVOID *ppvObj) +{ + IEnumIDListImpl *This = (IEnumIDListImpl *)iface; + + *ppvObj = NULL; + + if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IEnumIDList)) + { + *ppvObj = This; + IEnumIDList_AddRef((IEnumIDList*)*ppvObj); + return S_OK; + } + + return E_NOINTERFACE; +} + +static +ULONG +WINAPI +IEnumIDList_fnAddRef( + IEnumIDList * iface) +{ + IEnumIDListImpl *This = (IEnumIDListImpl *)iface; + ULONG refCount = InterlockedIncrement(&This->ref); + + return refCount; +} + +static +ULONG +WINAPI IEnumIDList_fnRelease( + IEnumIDList * iface) +{ + LPENUMLIST pDelete; + IEnumIDListImpl *This = (IEnumIDListImpl *)iface; + ULONG refCount = InterlockedDecrement(&This->ref); + + if (!refCount) + { + while(This->mpFirst) + { + pDelete = This->mpFirst; + This->mpFirst = pDelete->pNext; + SHFree(pDelete->pidl); + SHFree(pDelete); + } + HeapFree(GetProcessHeap(),0,This); + } + return refCount; +} + +static +HRESULT +WINAPI +IEnumIDList_fnNext( + IEnumIDList * iface, + ULONG celt, + LPITEMIDLIST * rgelt, + ULONG *pceltFetched) +{ + IEnumIDListImpl *This = (IEnumIDListImpl *)iface; + + ULONG i; + HRESULT hr = S_OK; + LPITEMIDLIST temp; + + if(pceltFetched) + *pceltFetched = 0; + + *rgelt=0; + + if(celt > 1 && !pceltFetched) + { + return E_INVALIDARG; + } + + if(celt > 0 && !This->mpCurrent) + { + return S_FALSE; + } + + for(i = 0; i < celt; i++) + { + if(!(This->mpCurrent)) + break; + + temp = ILClone(This->mpCurrent->pidl); + rgelt[i] = temp; + This->mpCurrent = This->mpCurrent->pNext; + } + + if(pceltFetched) + { + *pceltFetched = i; + } + + return hr; +} + +static +HRESULT +WINAPI +IEnumIDList_fnSkip( + IEnumIDList * iface,ULONG celt) +{ + IEnumIDListImpl *This = (IEnumIDListImpl *)iface; + + DWORD dwIndex; + HRESULT hr = S_OK; + + for(dwIndex = 0; dwIndex < celt; dwIndex++) + { + if(!This->mpCurrent) + { + hr = S_FALSE; + break; + } + This->mpCurrent = This->mpCurrent->pNext; + } + return hr; +} + +static +HRESULT +WINAPI +IEnumIDList_fnReset( + IEnumIDList * iface) +{ + IEnumIDListImpl *This = (IEnumIDListImpl *)iface; + + This->mpCurrent = This->mpFirst; + return S_OK; +} + +static +HRESULT +WINAPI +IEnumIDList_fnClone( + IEnumIDList * iface, + LPENUMIDLIST * ppenum) +{ + //IEnumIDListImpl *This = (IEnumIDListImpl *)iface; + + return E_NOTIMPL; +} + +static const IEnumIDListVtbl eidlvt = +{ + IEnumIDList_fnQueryInterface, + IEnumIDList_fnAddRef, + IEnumIDList_fnRelease, + IEnumIDList_fnNext, + IEnumIDList_fnSkip, + IEnumIDList_fnReset, + IEnumIDList_fnClone, +}; + +IEnumIDList * IEnumIDList_Constructor(void) +{ + IEnumIDListImpl *lpeidl = HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, sizeof(IEnumIDListImpl)); + + if (lpeidl) + { + lpeidl->ref = 1; + lpeidl->lpVtbl = &eidlvt; + } + + return (IEnumIDList*)lpeidl; +} + +LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl) +{ + if(pidl && pidl->mkid.cb != 0x00) + return (LPPIDLDATA) &(pidl->mkid.abID); + return NULL; +} + +LPITEMIDLIST _ILAlloc(BYTE type, unsigned int size) +{ + LPITEMIDLIST pidlOut = NULL; + + pidlOut = SHAlloc(size + 5); + if(pidlOut) + { + LPPIDLDATA pData; + + ZeroMemory(pidlOut, size + 5); + pidlOut->mkid.cb = size + 3; + pData = _ILGetDataPointer(pidlOut); + if (pData) + pData->type = type; + + } + + return pidlOut; +} + +LPITEMIDLIST _ILCreateNetConnect() +{ + LPITEMIDLIST pidlOut; + + pidlOut = _ILAlloc(PT_GUID, sizeof(GUIDStruct)); + if (pidlOut) + { + LPPIDLDATA pData = _ILGetDataPointer(pidlOut); + + memcpy(&(pData->u.guid.guid), &CLSID_NetworkConnections, sizeof(GUID)); + } + else + { + pidlOut = NULL; + } + return pidlOut; +} + +IID* _ILGetGUIDPointer(LPCITEMIDLIST pidl) +{ + LPPIDLDATA pdata =_ILGetDataPointer(pidl); + + if (!pdata) + return NULL; + + if (pdata->type != PT_GUID) + return NULL; + else + return &(pdata->u.guid.guid); + +} + +BOOL _ILIsNetConnect(LPCITEMIDLIST pidl) +{ + REFIID iid = _ILGetGUIDPointer(pidl); + + if (iid) + return IsEqualIID(iid, &CLSID_NetworkConnections); + return FALSE; +} + +LPITEMIDLIST ILCreateNetConnectItem(MIB_IFROW * pRow, LPWSTR szName, LPWSTR szAdapterName) +{ + PIDLDATA tmp; + LPITEMIDLIST pidl; + VALUEStruct * p; + int size = sizeof(struct tagVALUEStruct); + + tmp.type = 0x00; + tmp.u.value.dummy = 0xFF; + + tmp.u.value.dwOperStatus = pRow->dwOperStatus; + tmp.u.value.dwType = pRow->dwType; + tmp.u.value.dwNameLength = wcslen(szName) + 1; + + size += (tmp.u.value.dwNameLength + wcslen(szAdapterName)) * sizeof(WCHAR); + + pidl = (LPITEMIDLIST)SHAlloc(size + 4); + if (!pidl) + return pidl; + + pidl->mkid.cb = size+2; + memcpy(pidl->mkid.abID, &tmp, 2+sizeof(struct tagVALUEStruct)); + + p = &((PIDLDATA*)pidl->mkid.abID)->u.value; + wcscpy(&p->szName[0], szName); + wcscpy(p->szName + tmp.u.value.dwNameLength, szAdapterName); + + *(WORD*)((char*)pidl+(size+2)) = 0; + return pidl; +} + +VALUEStruct * _ILGetValueStruct(LPCITEMIDLIST pidl) +{ + LPPIDLDATA pdata = _ILGetDataPointer(pidl); + + if (pdata && pdata->type==0x00) + return (VALUEStruct*)&(pdata->u.value); + + return NULL; +} diff --git a/reactos/dll/win32/netshell/lang/.gitignore b/reactos/dll/win32/netshell/lang/.gitignore new file mode 100644 index 00000000000..e69de29bb2d diff --git a/reactos/dll/win32/netshell/netshell.c b/reactos/dll/win32/netshell/netshell.c new file mode 100644 index 00000000000..783f6d90c95 --- /dev/null +++ b/reactos/dll/win32/netshell/netshell.c @@ -0,0 +1,144 @@ +#include "precomp.h" + +HINSTANCE netshell_hInstance; +const GUID CLSID_NetworkConnections = {0x7007ACC7, 0x3202, 0x11D1, {0xAA, 0xD2, 0x00, 0x80, 0x5F, 0xC1, 0x27, 0x0E}}; +const GUID GUID_DEVCLASS_NET = {0x4d36e972, 0xe325, 0x11ce, {0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18}}; +static const WCHAR szNetConnectClass[] = L"CLSID\\{7007ACC7-3202-11D1-AAD2-00805FC1270E}"; +static const WCHAR szNamespaceKey[] = L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ControlPanel\\NameSpace\\{7007ACC7-3202-11D1-AAD2-00805FC1270E}"; + +static INTERFACE_TABLE InterfaceTable[] = +{ + { + &CLSID_NetworkConnections, + ISF_NetConnect_Constructor + }, + { + NULL, + NULL + } +}; + + +BOOL +WINAPI +DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) +{ + switch (fdwReason) + { + case DLL_PROCESS_ATTACH: + netshell_hInstance = hinstDLL; + DisableThreadLibraryCalls(netshell_hInstance); + break; + default: + break; + } + + return TRUE; +} + +HRESULT +WINAPI +DllCanUnloadNow(void) +{ + return S_FALSE; +} + +STDAPI +DllRegisterServer(void) +{ + HKEY hKey, hSubKey; + WCHAR szName[MAX_PATH] = {0}; + WCHAR szNet[20]; + UINT Length, Offset; + + if (RegCreateKeyExW(HKEY_CLASSES_ROOT, szNetConnectClass, 0, NULL, 0, KEY_WRITE, NULL, &hKey, NULL) != ERROR_SUCCESS) + return SELFREG_E_CLASS; + + if (LoadStringW(netshell_hInstance, IDS_NETWORKCONNECTION, szName, MAX_PATH)) + { + szName[MAX_PATH-1] = L'\0'; + RegSetValueW(hKey, NULL, REG_SZ, szName, (wcslen(szName)+1) * sizeof(WCHAR)); + } + + if (RegCreateKeyExW(HKEY_LOCAL_MACHINE, szNamespaceKey, 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS) + { + RegSetValueW(hSubKey, NULL, REG_SZ, szName, (wcslen(szName)+1) * sizeof(WCHAR)); + RegCloseKey(hSubKey); + } + + Length = swprintf(szNet, L",-%u", IDS_NETWORKCONNECTION); + Offset = GetModuleFileNameW(netshell_hInstance, &szName[1], MAX_PATH); + if (Offset + Length + 2 < MAX_PATH) + { + /* set localized name */ + szName[0] = L'@'; + wcscpy(&szName[Offset+1], szNet); + RegSetValueExW(hKey, L"LocalizedString", 0, REG_SZ, (const LPBYTE)szName, (wcslen(szName)+1) * sizeof(WCHAR)); + } + + szName[Offset+1] = L'\0'; + + /* store default icon */ + if (RegCreateKeyExW(hKey, L"DefaultIcon", 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS) + { + RegSetValueW(hSubKey, NULL, REG_SZ, &szName[1], (Offset+1) * sizeof(WCHAR)); + RegCloseKey(hSubKey); + } + if (RegCreateKeyExW(hKey, L"InProcServer32", 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS) + { + RegSetValueW(hSubKey, NULL, REG_SZ, &szName[1], (Offset+1) * sizeof(WCHAR)); + RegCloseKey(hSubKey); + } + + if (RegCreateKeyExW(hKey, L"ShellFolder", 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS) + { + DWORD dwAttributes = SFGAO_FOLDER; + RegSetValueExW(hSubKey, L"Attributes",0, REG_BINARY, (const LPBYTE)&dwAttributes, sizeof(DWORD)); + } + + return S_OK; +} + +STDAPI +DllUnregisterServer(void) +{ + SHDeleteKeyW(HKEY_CLASSES_ROOT, szNetConnectClass); + SHDeleteKeyW(HKEY_LOCAL_MACHINE, szNamespaceKey); + return S_OK; +} + +STDAPI +DllGetClassObject( + REFCLSID rclsid, + REFIID riid, + LPVOID* ppv +) +{ + UINT i; + HRESULT hres = E_OUTOFMEMORY; + IClassFactory * pcf = NULL; + + if (!ppv) + return E_INVALIDARG; + + *ppv = NULL; + + for (i = 0; InterfaceTable[i].riid; i++) + { + if (IsEqualIID(InterfaceTable[i].riid, rclsid)) + { + pcf = IClassFactory_fnConstructor(InterfaceTable[i].lpfnCI, NULL, NULL); + break; + } + } + + if (!pcf) + { + return CLASS_E_CLASSNOTAVAILABLE; + } + + hres = IClassFactory_QueryInterface(pcf, riid, ppv); + IClassFactory_Release(pcf); + + return hres; +} diff --git a/reactos/dll/win32/netshell/netshell.rbuild b/reactos/dll/win32/netshell/netshell.rbuild new file mode 100644 index 00000000000..eaa97952d6f --- /dev/null +++ b/reactos/dll/win32/netshell/netshell.rbuild @@ -0,0 +1,27 @@ + + + + . + 0x600 + 0x600 + 0x600 + + shlwapi + shell32 + version + iphlpapi + kernel32 + wine + ole32 + user32 + uuid + advapi32 + setupapi + precomp.h + netshell.c + shfldr_netconnect.c + enumlist.c + netshell.rc + classfactory.c + netshell.spec + diff --git a/reactos/dll/win32/netshell/netshell.rc b/reactos/dll/win32/netshell/netshell.rc new file mode 100644 index 00000000000..aa99634b923 --- /dev/null +++ b/reactos/dll/win32/netshell/netshell.rc @@ -0,0 +1,10 @@ +#include +#include "shlobj.h" +#include "resource.h" + +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL + +IDI_SHELL_NETWORK_FOLDER ICON "res/netshell.ico" + +#include "lang/de-DE.rc" +#include "lang/en-US.rc" diff --git a/reactos/dll/win32/netshell/netshell.spec b/reactos/dll/win32/netshell/netshell.spec new file mode 100644 index 00000000000..e0ebfe62459 --- /dev/null +++ b/reactos/dll/win32/netshell/netshell.spec @@ -0,0 +1,34 @@ + +1 stub DoInitialCleanup +2 stdcall DllCanUnloadNow() +3 stdcall DllGetClassObject(ptr ptr ptr) +4 stdcall DllRegisterServer() +5 stdcall DllUnregisterServer() +6 stub HrCreateDesktopIcon +7 stub HrGetAnswerFileParametersForNetCard +8 stub HrGetExtendedStatusFromNCS +9 stub HrGetIconFromMediaType +10 stub HrGetInstanceGuidOfPreNT5NetCardInstance +11 stub HrGetNetConExtendedStatusFromGuid +12 stub HrGetNetConExtendedStatusFromINetConnection +13 stub HrGetStatusStringFromNetConExtendedStatus +14 stub HrIsIpStateCheckingEnabled +15 stub HrLaunchConnection +16 stub HrLaunchConnectionEx +17 stub HrLaunchNetworkOptionalComponents +18 stub HrOemUpgrade +19 stub HrRenameConnection +20 stub HrRunWizard +21 stub InvokeDunFile +22 stub NcFreeNetconProperties +23 stub NcIsValidConnectionName +24 stub NetSetupAddRasConnection +25 stub NetSetupFinishInstall +26 stub NetSetupInstallSoftware +27 stub NetSetupPrepareSysPrep +28 stub NetSetupRequestWizardPages +29 stub NetSetupSetProgressCallback +30 stub NormalizeExtendedStatus +31 stub RaiseSupportDialog +32 stub RepairConnection +33 stub StartNCW diff --git a/reactos/dll/win32/netshell/precomp.h b/reactos/dll/win32/netshell/precomp.h new file mode 100644 index 00000000000..07870a6c112 --- /dev/null +++ b/reactos/dll/win32/netshell/precomp.h @@ -0,0 +1,82 @@ +#ifndef _PRECOMP_H__ +#define _PRECOMP_H__ + +#include "config.h" + +#include +#include +#include +#include +#include +#include +#include + +#define COBJMACROS +#define NONAMELESSUNION +#define NONAMELESSSTRUCT + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "wine/debug.h" +#include "wine/unicode.h" +#include "resource.h" + +typedef struct { + int colnameid; + int pcsFlags; + int fmt; + int cxChar; +} shvheader; + +typedef HRESULT (CALLBACK *LPFNCREATEINSTANCE)(IUnknown* pUnkOuter, REFIID riid, LPVOID* ppvObject); +typedef struct { + REFIID riid; + LPFNCREATEINSTANCE lpfnCI; +} INTERFACE_TABLE; + +typedef struct tagVALUEStruct +{ + BYTE dummy; + DWORD dwType; + DWORD dwOperStatus; + DWORD dwNameLength; + WCHAR szName[1]; +}VALUEStruct; + +/* globals */ +extern HINSTANCE netshell_hInstance; +extern const GUID CLSID_NetworkConnections; +extern const GUID GUID_DEVCLASS_NET; + + +/* shfldr_netconnect.c */ +HRESULT WINAPI ISF_NetConnect_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); + +/* enumlist.c */ +IEnumIDList * IEnumIDList_Constructor(void); +LPITEMIDLIST _ILCreateNetConnect(); +LPITEMIDLIST ILCreateNetConnectItem(MIB_IFROW * pRow, LPWSTR szName, LPWSTR szAdapterName); +BOOL _ILIsNetConnect (LPCITEMIDLIST pidl); +BOOL AddToEnumList(IEnumIDList * iface, LPITEMIDLIST pidl); +VALUEStruct * _ILGetValueStruct(LPCITEMIDLIST pidl); + +/* classfactory.c */ +IClassFactory * IClassFactory_fnConstructor(LPFNCREATEINSTANCE lpfnCI, PLONG pcRefDll, REFIID riidInst); + +#endif diff --git a/reactos/dll/win32/netshell/res/netshell.ico b/reactos/dll/win32/netshell/res/netshell.ico new file mode 100644 index 0000000000000000000000000000000000000000..cf3a1413d1ddd11e6b9b276c9861c0b3479d8e3e GIT binary patch literal 40070 zcmeI52Ygjkw*MC-7y%Jf5U?Z>QLv2#5J5(Y3?epEngyhUBoG3jD$;^VQ9wbe6hlb? z1RF(B6htX1O$0$7GGM`Z@|upS{;47ZtBcgB>2X}&$-O>VmS4p6-Q4ThC!fELaj#F7 z$(6bON%#6>NskvvoF~!{ow)_+3F&=k%C2Hp&QFEH?a`x0%i@&A(xOERS-W|8in zRt;z&Sy@@K_Obh=e*OBgaN$C^|Ni@B|Ni}Qbmv+*ym6t-nw%|DhxL?MS+~mmwNqus zycD_h)?4MBcixdz!&pyGk*T8x$mGeBW$}PkvUmApXf$PWl`LPrT+-9i<>=9)a`c_$ zGJX1VnfFjPS)A2g-dUI>uV#0YdD&UAc;0l`yEv;*+26N*FM;1npiD}@7*i&4N+P6Y zT+tNa+L|@vYT6W+P$UJ8aw_D)s!2&KNl9^4i=;R`rl&&KYt=ffR;^m`@$qpLiljIW z#dGGg(`psDf&&~P#o3d(M~Y9>UFA+bje6aa9Oe0qOH52unKmU>iKxGOZCp}9f}?X1 zTQzA7qNnpUB~;Lx)~)EwfwPsXCaHe39I>U!mCrw)rxuaFW?aRXlABx2x)ti5QoFcx zam9*(3*fI%u{d_ld-xMd#$OltXGKX)=0)X4VRue>^r>6noT&2c1s?ti3Fp+lsF+mA z!(R{il}f;0x562<&#P4Fl4zHBmmPKy+ALibct_1Uj8a|FRXp0 z!|(iZl}(;2z5FV_2!HU}LJccjRQSBA)U6SLUo~_}p;9Fee}x*S`peghoO1K>C)R6l z>ghop!Z-9bDxK?a7x(Nxc-y58g*s_NEM&bn&6wiNNy3&ci0?}fnVoP2!E0zKhQ>4 ziP{Efa@v`Y)+?!&SH6n0^?zZ*7shY(cjVjO5Qd_+D`D~zqw^=&meeD@UUB@+ZMna- z7z0I16^e8L*zt^AqFoouIr>1h8&tR!(QeVtdhs~6b?xrA3>o_$TY6S(ysf=NR$@8pLz@v{o zD$hRqtSnftKo&1vEK8Owk(`_ydHCUnW!}7bvTofvS+Qb;yzs&cGG)pXnKf&cY}v9! zHf-1+lO|1)#~*)O)~{c0$DjH6`I4KPE6bKGlaV7w%EXBiWx|9BGJgDcNl8hO*Is)~ z3JMBj(V|6m{5yaCd|A12r9AiCbFzB%YI*6Um*la>9+Ra@m&)9^b7l7I*)nI&9C_xM zXQX%U-jbc2Et@xQmb}b1vSP%ovSRqHvRrA{EmB~qgA@$yAd53v%klx&OK#uBGJN=O zdHLm+W%70*<@x8I=XiVhaQQg-Aa|s^pEpr5Gc#r8^l7qk zcnA3~e~j$O86vw1o{)b1`pKf%PsvN;I?J)Q3*^Isv5cdK$<9St(z9nzdGe8wvW~I+ zpEoU$y-S93e6YN~Y`h)gPaT~luTSkOhhLq`bz|hc1zGaWyb;p1Ygd`}P`bQ5tG|4* zW;%Hdm3QZ7$(FfU(z$bInLVbzY@0h!4!$@=_T`V3eR-qggQX*6EBtRvOO-qBxWkU~ zXAbR#%%Sqps)@2?Myk9qsfXNj(@pZ^lTXULp`AH5ME0+IMBaR&hpZjdNfu_^CVQ3) zlh-D6lc%0~N|p@0UEZ75U-mpZ7|N2}O5E4(MT2DB$eX2IyLR%(Bag_^%(k+7K?XEH zc3H}hUGtUt%jzMmrES}`k~^@C?3|YdrOM8^N_}PL9HkU_Zr~rKU{D)*e^zg(m)v;c zjk2ImQ(4--g)HfJy)0HrZ!S5Onn_Mtb9olZN!9IUoNpm3Gq0EDGF!;1tm~y=!-mqV zSu<(cw5i;1!wo{4U~M7STyu?Fef8BcV#EmP(xr=BdF7STzI}Un@WBUV$dDm2bm&kS zHf)&OeDlq+XU`tlwQHAr{`u$f#TQ@5!Gj0ofd?LtjT<*w+f80xp1kfe=+b2hk9FY?zPRMuPeJ9`kU?i7s zbo1fO^6h*12)+U84vmHuK(9d`L*HU!GTgI4uHhXq+zT1kgg+7fhRPpn+J{Ws8t!NS1#DO0CC$>%kF`V11!_34>`6gdCTBac2t^+=+koH%jPq{)-1 zO-b(gYU8?P^S*^8_x#9*M~%)L*f-Mo!9#`)8-C-B9W&c@y|V~U;QI8We*H7}1~ql; zF(5OuZ9rDwe6LG;_epV1yT2XVYHoavn(mFe@BZ%Y8F$^IYljXGIOp$f(5Z75_jqvK zv1^BJ&iPyG-*)>Q!Q;V=j(6VWoNrh4ruH`k4;OCS+`&2Ds&(Zye&=s&>zr?XeR7LG zQZIxj=lm6axai8OuD+&GqsC3H)zqYMqej`e178D4HA+ssNC?9OHM!i z^h+*nc-aNX4KBC$u0Lm-U$tuD*|jSrBqhgRP%E)!)p{4!KkXvy(}8s6S=xiFS?lbx zYoA`{j5F%iJ?EUd=bT%3{`BfK+;oO}jdxwSirWJ{wVL<1yB++lf&+W^Oblz=U)Y>r zz7t7;sw@2{($a9u98EAsMG~O6lcbhh?-1RWqe|LcA!$FQ4s;dd_EQ$S0}zgJFqmMM zL4&g-V^F5_?UyEfQu_)ujpWham_{3S-viyH%e~#C^F3XqQ@1X1ch}C6)-T=mNwj~V zeT&@e6x$z|(X*MYS3lqWf*jpaAfIl0Rz7k0BEHvO4BuahI2mf5y-|B6Rs|BCUle|a{eE^k z$PJAe%H3T$3-zMhdFP$B{kr?^yQNd7PPX6j*=L{0_U+qc$BrGg&z72+YWr>K^Uyw_ zwvf7%w!PFgU)x=6r`>jwTGY0k+IQ9dq}zs;Tl;wp?QIL%+jbv|bf&${q`jR$d%KAC zb{*~QF525mX>VK7-gX)-(hvTz@Xv&QCH(8*-va+`_&N$RJH=S($^<24|(|wsSnaAMGHVnVAFm&B*AF8_k=DdC1nd%9YeuHEjr_ul*NqgCwD{Q(9A=boh}s=-y+tLb&knqS|XHtLTpTeWW8rcK~@!dVS3x%9HjulU2|+B{v|sFBNmR_(fV6O)oJ zsCVIo_3L8+3-Z_Tnq2DE4f6XQKPTa=kmGf%p6Ar^KOP^(U)%D>*E;L$5F@g4JmJjH z60**PxKpYZrW$7io3yxuQ=LS6cUrY-_=lYoM>knhyn7(9u4o+|@$r>Hj{EOw+hN`^ za#RxN6(_Kc6O(OZGuxZlE*Z6iA4=kSNM&m~Rs%|g+;*&$r|k-D$Fyy7+p!0F_mbVa zcgxmo+oV_DKC)@^W|=*Aj=cNsyP{)h9V@F}cmBh@Y}>Ukvz?qcv`zl9?@jr9`}1<> zrKz^v()R1A`wZYCFjr)!EknyPipx|5`swIx!|4IB1~s@6%oG zzo(0>>yI5fCfm`!Th}gfU)N4@Uza;&<(!GKVaYVv^isZT-Sj%=x7xNMJ3CvnZP0c> z+l0l`)!W|LBAZ@YUoP!~j;ms6Bg%E06;cuY-cFQHJF%N~pNu|utM&pY2~0BTgMT%)FA z(&o2z9nO39Yt<}zp8c~!&c}PN=X`wC8lGzV%o_2P3r8o6QqG90>ROjitEP^NxXO;{ zy^0-$unK&eiAuhUd0*@vvU={ z@Y6T?@WT%e9Xdo%+u_59wV94BVW{Q#I&TgSoo#-dL>6SUYSk)!@moYnm<{k^!0cY9 z>!3_FG%l|!5-&M}4y@9=u8c@8_@)n!?`Q2xB^8oGBR$r3HJwsDGruHRxyce(4YaiQ(TQ2 zHM;)#>sz;OjR%B-F`f#mY+wn$L98Jf?LV6l#gyRdu@MaNOXPpUT`kvr#F3fR&Tsth0C12 zIKn(j3O=zImOeY@^w~K(u)IIJPsmcNK12)SfGx;qzGG$|ta%LPe3p6XyF!<=UGviL z{uLd1sN@N%uK+)=r zB@3%@vHIY&!f2bD)o#b!jD2|{PeP^QZv-zq`sDR(;#&nd-#bwVxFd50-}27W=?7Lm zf>9mY1}^tfl~OS(5dlza`4BllAjFbkcWj%Lfd`&og1}NR27~_Ir6VxAl$CCH6RbY| zEw58PME(Onn4i^=umZdoh58gKHkN1t3JsrvmfK0FcVOkC#p;8XVCvMV^B=nJt?8+U zUYg>gPf)So2G0}?^F~pC=&7paj>HpUpK`Rqbo9whjaEK5VyS{=WOdmxv;UzrPsOB9 zP_gh0ROKlz8Rq+lKUy_`^2zP%-=xxwq&>ybhnINnsMO8VQ$Jb%^vUYuYKT_hpDLcK z_nv(?l0I~s(TC_9+KXw!`@BA-_u&n5%Ss=WQ!qBE)ph9d!bM z=8exHga(UcS?XiUimxE}>^@pO@xxV*=cPCG)rTH9`Vis7_dad(z_pLud-Sc`GS>%z zL6!Ee9Di`_?1KK+`Raqe4Sk4i!m+k+YWA8(yB~X}pgi=kDvh9&_`W`Qb$&rV|MDT$ z27RzvPn$Mv#v>zEkM8u@_EqJikMl0^dt`HNewzRLLwprA4`W*b$`;Ri`nlmZ69HCU z`snLTg+B_XGJQYa=hdxSH_8WZw8nu&mfw?C18y&NY#~cWm{%$V34WPNN@M-^O3=TKCo7*UEJ{zUNhq6ZA{C z@UR2C{r20aL@o4-jlv@7)2ml6G~s=wNhM~JvLfDyCrFGWH6-s8aYnTMB>J>`gCyR6 z`b*x#5$6;<4zm-PgapdGPoF-1CEgNa=yahB3>m~Bwk0-8l)3wQ*6Ir|^OzW3&vZ&E%4%LY@htWcHW;(|Rv6D+9U1|>$~vGR@)LX62Y<{V1K zh^fu_*h5Mt(k^c-FFB=JvTS1J#^{F)cH6dX!J>%1K~2uvTcTGYW?hsKD-$1}Ckm4(!Hv#iB&>Nz2gSK)XLwOPVxW8E(j83@z zyk?l6fB=C2@-r4^fd~pNAcJ&S>rIRX&{=qPAvDa8hOC13fBWPmw= zasuSU2pou1xaBLB?7&Bb%g4*eFbRki2&+Q#u3G&@VU)z41qv({;qZXX3YYIxRzST# zdJ(wiKm0BjtHyu0o(xJE27~GZ)Cr~&NGFI+7BHO!!#aTIEV6LKo>iXV$`9NV zw5PL#%Lhh3MsRoGJY}TN0-m#MCU{qSRyt|sS+IE%>+a2)!(~~vz*qU1meP2=?5Yt zN(#H;H*vrY&wexbD`%XN%=qX(Ced#CCMpv?I=%wmv%a^7QNx?~c&U^KROcYum>}6@ z!^;yc2Ot#wAreR^95cb(kwe1B6+FUO5^P*T3K!*j1i%$KDC{bR1WJpVuoO#(Y|sh- z#lVRH6SHv)8Q{chM^t|a$N(xv1cv=3vLvv8sSBxxkpo~2yc%#d&}xJo*kuT4HNa|t zNQE5jXM$A=_BMUxV15EO2W(E=!}x{+9^#RJ=4ik81vQ7O_=9B+>atW9UpW|?Q4;tb zokqZWVE2ITf!qVQ#|F?neC+`DXs`8GJ78md<)9C8@cMwlu*+m%gP;Zh4T2d2GH92H z2Uf96a28)Vjy{}n?wo=?eND9{e-i;`26&NZYR3NATP=TMK z>i21ra&mxAfu5peqQL>01u_d@Rxk^|StQ_D!6U%5KxqNe;ynOv1`3Rj3WoGRz(9Zj z00aL8{A*HbJHTH~v>?bYUUB$=rGYR5V8$>N=o!C&%)podF{8SqE+&$Qm^jd74nOkQ z0H_9Yq=m{3^B)>!lp%7@>P4?qumUX%p})Ntg3>|?vw z1>hgw67uQyM@r7Fq0k!el)C{ilPFsXn(-HF%Vjb$@CaT z`Qy-6(0@Z;qxT6V)f>}(i3wlt&w8yZN7n(le_^fp9Ou|(@}Gps%6Gz$DED3wuW%A0 znHIS6@8SC4(9>+cfH(bp=r52_QXSwc73sCEoWS}k^4Y=m3i5h_?F_bWMSe*!8}S5E zv;_7v7^u+#;vU}A$OuqEAJc?>1$5~jL*@FVjKCA!P`N6K|65$ zY#{7nK2G^QQOeryR6H`;qWeg6&p&eH$a}~-095KIa!=5F|C4($N~#0WMHTu_tjT`|*wGSB8HgHr0bb(76vQUBHYGa&y5Ay!K%)9s{r0@JU z?Ej7R-=Y7jr24BaM6uX4wkuN{(Y-YovaJ5DoWT0;DxbXmNAqKQ2QI@I7_>@*{H%n` z)6uUsa*~jj>?Pbd^?+B^=iB~)hz^5e&hSkdVnPfiT%*Ulgm2THQywJ-{{N5bpQ8@C zkhfdaK?9ZR2V~V|t+O$xRmeM|0lO!abV3J}TMN?XsQFz6F(HXu z2Ps^-Eu;X=I{;W&ovFVJb+9E|G6v+A(R1*0gl>V_LE2l;5thnQnc71*A37VV3Tc_0 zOge>&Rd+3$B&Y$T&QuNfRJ~P)+ac|R-4CSz2eW$eObjqF15V5U6f?YUM$ah^)C1}Q z-2vSM>3wKfsO*MNGNjK~r<&06D^cQ|Uqv6&{FVr$+5V+{8ebmEjqptwP-h0%nE`iZ zK%M>S1Tt*{(6m=#)gM#50j9d(275%0pMOVh6P51tO(6#6IA?w!C#Z-`?s1Y#I~b_SSTDQFH%eq*~GT6_}>OrkP1dFQe zU&Q2=Khfa^r-%W^X8`gUkbGr)4<#!LZ1v`)2ixuC8}1oVc~0=|x1i5-6fdD6-qV2l zGXVb#$UlQg-e7hz1Q3+bbBO&OaL1c958wI`<*)5`#DxB>=r{ivFR;OrYQPB^fP#il z5`%A{kP61|Ot_b&BMf%5a=#zE8)m~}-O#^rc0}blq59L``ZF;w23Vm1S7?YNF(3;I zb@$$fZtHW&A8nrv?ic6zl<_@*L^2y6?|!T}{WXe?vCCl$s0QeR0f%S+A{vm0k@XL~ zA9vrque?$AS?Rl{r0+5=r@(s{+p|;s-=5j;3$Th$MJs>C4m|-K90sIev<;Y%)x`i@ zG$0pCuD^R9(bjs8`W`MB7WEwj*=T?^{uL}?PBi@)YxM*;a2T_tA7Fw%gGEO-5F{lN3^tKU?AppynH z)yvV!pE1(_#;}KVOir+i0Y_w?(}2y~6-|FU{n>oC$B3aa#3dMTng*bz0jc?m z>+jqH?F;=Dt$%=W8nB#9Fd8`#H=Iqs`55j618&TK>ofp64am-4MSpEu^n1`X&`$&Q z^F(CrMd#R`NxlE2+VhCzGT=ZBKu|*{+pnX)eh;>-A7yYq>v-y$X!?U0%^^>IUF68L4nnHqqm2Bhh)SN?%I2`H-8 zpWjE*pICnl82pAfJws5S;aONa3dmFgF7;O>psQAwX!;XA`wI5e?*XT z$6X%fcdymHmdexiQlB?4N5glR>{rhDsf}v-9e0mmtKOt_KlXon4{8es%wqHy;h#ZU zx!S-90x??8YF`PQi_tbu?cz#WcX`P@u50C0((6=)erE)j25s>4Uw(?DzpH1YHGQ{D zAVv-FORJBolRk^k=b_(+J`?x3xX(t*kucLDq{m!RJ}qbWT79-UUeZ1nVYG&K;3py& zN`<1r=X3<$ku86MT#c9XopPUt-lIMfeb?OQqThm~IwdP!~U zA@l>F|Hm;u9ws7s>pMTUFZYfgS`e)@E$2H&b4^dQ3HqK97>v4X*({=R- zYdod)JZmlw!yAX@d`nkHc{+YKGU=KW`49W>732aPo-j^O_Z{;vXbob?fo z9b~5EkDa?ZaT`r}#y!;Ls>F6Lj(w@|T%^A)72e)@jeC7y zt?>XQNgDN74LS$92)On#Vmc0hqxCotWX0D}Jn#QP_}-cYljK!O`3u;4)g5&kofaOXUH%CDp{ z_SSHqQ3dE^UH(n{yJLzM0XoN(7szD;2A(en@34~zJ3-DBvcWfl6|z|I@~uWPPf{I8U8~*3)TYmXtBRr(`13>l$l)V9FfAaaO9+ZXayVCE9|A+gb zU;fx=j;fsn5WWG0Z-C*KP5!P9yt82Q4gcTwm|yVeSH=5DUPYFN$p>t_{%zsqKwf01VRr7;yatc)tPVZwbu5VKM;2Q~=?m#{+zppX>B`CI;u32LXTma zv-#^gsO0LQwq4hjr}d-CRlBI>p|)P-bM3uqV^W*1en)D*)Uw33ws+zVT}%-Pbif!>`Ccs&CZQ1)1M!yn8e|lzWam zHD)p1y|ygYe0TqcISRt=-z^7st>sET;j6O9(_G;7BcTq|A@r8fx zz4lkwE|api_8I0s!0u4pLrK_Q#!*Qm9mRSQLUHVulv;9)Lzpe>|DRR!1xW`db)c)D z3O2l&|1DLSo!@TKc=A;q(*2kc{j2Iw1L#g@1hf!(7dip`2pJ`1^fmN@zPCEQVIBmFY0-Vf80j&#e}?Cu&>?6E z)DyY}I?ug1Vn8lpqJ;L)P_}17>xt<)L~O<1(L;ShR$rB`q`o%y80(+m`!{r)Yu-S{ zqfkdk$I5QfF}IFW^_92)(lNA-f3Jp=Ps@5VlP}nBP}l71OpWTcck}oB@8(6wEMi-6_19;taUB4g12ow% zA%tN@2-cGrTTL>|2oa!(td%ANiT^8Y_`lN2J-XXXul`K#;F0g<6We-g?nJ}?x8Ch1 zU&~+hKN2ijaF`s=&lr@zW~^=EPl z`wl5@X(*C>`~GLA*!-2Jw8SJ9kA{{%0C4M@(>`OYqeT^2ljRC?8oxIl#}4)|0m;E^Z)R57y`x0FdIkkdd*+Id1lZc z{(Wk(q-_|pa|Ex~{7Z7Z=An7%HSYbF_Ij<~PbPo;#!7nsUj6lYH-BdEFih|f6DhCW zvztFNe%O6I7ArCR$04mZG=CkB7e}sLK+D{%F!Xx8f2IS8NXj2VL3^oQ50>1Qm?p$9 nPl#T7kDFiUnsehq>ptDra#3R5khIWiPHJC!^hzzEaU%a8q|LF0 literal 0 HcmV?d00001 diff --git a/reactos/dll/win32/netshell/resource.h b/reactos/dll/win32/netshell/resource.h new file mode 100644 index 00000000000..79181a9a88e --- /dev/null +++ b/reactos/dll/win32/netshell/resource.h @@ -0,0 +1,31 @@ + +/* icons */ + +#define IDI_SHELL_NETWORK_FOLDER 100 + + +/* dialogs */ + + + + + +/* dialog controls */ + + +/* resource constants */ + +#define IDS_NETWORKCONNECTION 10000 +#define IDS_SHV_COLUMN_NAME 10001 +#define IDS_SHV_COLUMN_TYPE 10002 +#define IDS_SHV_COLUMN_STATE 10003 +#define IDS_SHV_COLUMN_DEVNAME 10004 +#define IDS_SHV_COLUMN_PHONE 10005 +#define IDS_SHV_COLUMN_OWNER 10006 +#define IDS_TYPE_ETHERNET 10007 +#define IDS_STATUS_NON_OPERATIONAL 10008 +#define IDS_STATUS_UNREACHABLE 10009 +#define IDS_STATUS_DISCONNECTED 10010 +#define IDS_STATUS_CONNECTING 10011 +#define IDS_STATUS_CONNECTED 10012 +#define IDS_STATUS_OPERATIONAL 10013 diff --git a/reactos/dll/win32/netshell/shfldr_netconnect.c b/reactos/dll/win32/netshell/shfldr_netconnect.c new file mode 100644 index 00000000000..6b9e8a1fb0d --- /dev/null +++ b/reactos/dll/win32/netshell/shfldr_netconnect.c @@ -0,0 +1,905 @@ +/* + * Network Connections Shell Folder + * + * Copyright 2008 Johannes Anderwald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +WINE_DEFAULT_DEBUG_CHANNEL (shell); + +/*********************************************************************** +* IShellFolder implementation +*/ + +typedef struct { + const IShellFolder2Vtbl *lpVtbl; + LONG ref; + const IContextMenu2Vtbl *lpVtblContextMenu; + const IPersistFolder2Vtbl *lpVtblPersistFolder2; + + /* both paths are parsible from the desktop */ + LPITEMIDLIST pidlRoot; /* absolute pidl */ + LPCITEMIDLIST apidl; /* currently focused font item */ +} IGenericSFImpl, *LPIGenericSFImpl; + + +static const shvheader NetConnectSFHeader[] = { + {IDS_SHV_COLUMN_NAME, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 20}, + {IDS_SHV_COLUMN_TYPE, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 8}, + {IDS_SHV_COLUMN_STATE, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, + {IDS_SHV_COLUMN_DEVNAME, SHCOLSTATE_TYPE_DATE | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 12}, + {IDS_SHV_COLUMN_PHONE, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, + {IDS_SHV_COLUMN_OWNER, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 5} +}; + +#define NETCONNECTSHELLVIEWCOLUMNS 6 + +#define COLUMN_NAME 0 +#define COLUMN_TYPE 1 +#define COLUMN_STATUS 2 +#define COLUMN_DEVNAME 3 +#define COLUMN_PHONE 4 +#define COLUMN_OWNER 5 + +static LPIGenericSFImpl __inline impl_from_IContextMenu2(IContextMenu2 *iface) +{ + return (LPIGenericSFImpl)((char *)iface - FIELD_OFFSET(IGenericSFImpl, lpVtblContextMenu)); +} + +static LPIGenericSFImpl __inline impl_from_IPersistFolder2(IPersistFolder2 *iface) +{ + return (LPIGenericSFImpl)((char *)iface - FIELD_OFFSET(IGenericSFImpl, lpVtblPersistFolder2)); +} + + + +/************************************************************************** + * ISF_NetConnect_fnQueryInterface + * + * NOTE + * supports not IPersist/IPersistFolder + */ +static HRESULT WINAPI ISF_NetConnect_fnQueryInterface (IShellFolder2 *iface, REFIID riid, LPVOID *ppvObj) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + *ppvObj = NULL; + + if (IsEqualIID (riid, &IID_IUnknown) || + IsEqualIID (riid, &IID_IShellFolder) || + IsEqualIID (riid, &IID_IShellFolder2)) + { + *ppvObj = This; + } + else if (IsEqualIID (riid, &IID_IPersistFolder) || + IsEqualIID (riid, &IID_IPersistFolder2)) + { + *ppvObj = (LPVOID *)&This->lpVtblPersistFolder2; + } + if (*ppvObj) + { + IUnknown_AddRef ((IUnknown *) (*ppvObj)); + return S_OK; + } + + return E_NOINTERFACE; +} + +static ULONG WINAPI ISF_NetConnect_fnAddRef (IShellFolder2 * iface) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + ULONG refCount = InterlockedIncrement(&This->ref); + + return refCount; +} + +static ULONG WINAPI ISF_NetConnect_fnRelease (IShellFolder2 * iface) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + ULONG refCount = InterlockedDecrement(&This->ref); + + + if (!refCount) + { + SHFree (This->pidlRoot); + HeapFree (GetProcessHeap(), 0, This); + } + return refCount; +} + +/************************************************************************** +* ISF_NetConnect_fnParseDisplayName +*/ +static HRESULT WINAPI ISF_NetConnect_fnParseDisplayName (IShellFolder2 * iface, + HWND hwndOwner, LPBC pbcReserved, LPOLESTR lpszDisplayName, + DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) +{ + //IGenericSFImpl *This = (IGenericSFImpl *)iface; + + HRESULT hr = E_UNEXPECTED; + + *ppidl = 0; + if (pchEaten) + *pchEaten = 0; /* strange but like the original */ + + return hr; +} + +/************************************************************************** + * CreateNetConnectEnumListss() + */ +static BOOL CreateNetConnectEnumList(IEnumIDList *list, DWORD dwFlags) +{ + DWORD dwSize, dwResult, dwIndex; + MIB_IFTABLE *pIfTable; + MIB_IFROW IfEntry; + IP_ADAPTER_INFO * pAdapterInfo, *pCurrentAdapter; + HDEVINFO hInfo; + SP_DEVINFO_DATA DevInfo; + HKEY hSubKey; + WCHAR szNetCfg[50]; + WCHAR szAdapterNetCfg[50]; + LPITEMIDLIST pidl; + WCHAR szDetail[200] = L"SYSTEM\\CurrentControlSet\\Control\\Class\\"; + WCHAR szName[130] = L"SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}\\"; + + /* get the IfTable */ + dwSize = 0; + if (GetIfTable(NULL, &dwSize, TRUE) != ERROR_INSUFFICIENT_BUFFER) + return FALSE; + + pIfTable = (PMIB_IFTABLE)HeapAlloc(GetProcessHeap(), 0, dwSize); + if (!pIfTable) + return FALSE; + + dwResult = GetIfTable(pIfTable, &dwSize, TRUE); + if (dwResult != NO_ERROR) + { + HeapFree(GetProcessHeap(), 0, pIfTable); + return FALSE; + } + + dwSize = 0; + dwResult = GetAdaptersInfo(NULL, &dwSize); + if (dwResult!= ERROR_BUFFER_OVERFLOW) + { + HeapFree(GetProcessHeap(), 0, pIfTable); + return FALSE; + } + + pAdapterInfo = (PIP_ADAPTER_INFO)HeapAlloc(GetProcessHeap(), 0, dwSize); + if (!pAdapterInfo) + { + HeapFree(GetProcessHeap(), 0, pIfTable); + return FALSE; + } + + if (GetAdaptersInfo(pAdapterInfo, &dwSize) != NO_ERROR) + { + HeapFree(GetProcessHeap(), 0, pIfTable); + HeapFree(GetProcessHeap(), 0, pAdapterInfo); + return FALSE; + } + + + hInfo = SetupDiGetClassDevs(&GUID_DEVCLASS_NET, NULL, NULL, DIGCF_PRESENT ); + if (!hInfo) + { + HeapFree(GetProcessHeap(), 0, pIfTable); + HeapFree(GetProcessHeap(), 0, pAdapterInfo); + return FALSE; + } + + dwIndex = 0; + do + { + ZeroMemory(&DevInfo, sizeof(SP_DEVINFO_DATA)); + DevInfo.cbSize = sizeof(DevInfo); + if (SetupDiEnumDeviceInfo(hInfo, dwIndex++, &DevInfo)) + { + if (SetupDiGetDeviceRegistryPropertyW(hInfo, &DevInfo, SPDRP_DRIVER, NULL, (LPBYTE)&szDetail[39], sizeof(szDetail)/sizeof(WCHAR) - 40, &dwSize)) + { + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szDetail, 0, KEY_READ, &hSubKey) == ERROR_SUCCESS) + { + dwSize = sizeof(szNetCfg); + dwResult = RegQueryValueExW(hSubKey, L"NetCfgInstanceId", NULL, NULL, (LPBYTE)szNetCfg, &dwSize); + if (dwResult == ERROR_SUCCESS) + { + pCurrentAdapter = pAdapterInfo; + while(pCurrentAdapter) + { + szAdapterNetCfg[0] = L'\0'; + if (MultiByteToWideChar(CP_ACP, 0, pCurrentAdapter->AdapterName, -1, szAdapterNetCfg, sizeof(szAdapterNetCfg)/sizeof(szAdapterNetCfg[0]))) + { + szAdapterNetCfg[(sizeof(szAdapterNetCfg)/sizeof(WCHAR))-1] = L'\0'; + } + if (!wcsicmp(szAdapterNetCfg, szNetCfg)) + { + ZeroMemory(&IfEntry, sizeof(IfEntry)); + IfEntry.dwIndex = pCurrentAdapter->Index; + dwResult = GetIfEntry(&IfEntry); + if (dwResult == NO_ERROR) + { + if (IfEntry.dwType == IF_TYPE_ETHERNET_CSMACD || IfEntry.dwType == IF_TYPE_IEEE80211) + { + wcscpy(&szName[80], szNetCfg); + wcscpy(&szName[118], L"\\Connection"); + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szName, 0, KEY_READ, &hSubKey) == ERROR_SUCCESS) + { + dwSize = sizeof(szAdapterNetCfg); + if (RegQueryValueExW(hSubKey, L"Name", NULL, NULL, (LPBYTE)szAdapterNetCfg, &dwSize) != ERROR_SUCCESS) + { + if (!SetupDiGetDeviceRegistryPropertyW(hInfo, &DevInfo, SPDRP_FRIENDLYNAME, NULL, (PBYTE)szAdapterNetCfg, sizeof(szAdapterNetCfg)/sizeof(WCHAR), &dwSize)) + { + szDetail[0] = 0; + } + } + RegCloseKey(hSubKey); + } + szNetCfg[0] = 0; + SetupDiGetDeviceRegistryPropertyW(hInfo, &DevInfo, SPDRP_DEVICEDESC, NULL, (PBYTE)szNetCfg, sizeof(szNetCfg)/sizeof(WCHAR), &dwSize); + pidl = ILCreateNetConnectItem(&IfEntry, szAdapterNetCfg, szNetCfg); + if (pidl) + { + AddToEnumList(list, pidl); + } + } + } + break; + } + pCurrentAdapter = pCurrentAdapter->Next; + } + } + } + } + }else if (GetLastError() == ERROR_NO_MORE_ITEMS) + { + break; + } + }while(TRUE); + + HeapFree(GetProcessHeap(), 0, pAdapterInfo); + HeapFree(GetProcessHeap(), 0, pIfTable); + SetupDiDestroyDeviceInfoList(hInfo); + + return FALSE; + +} + +/************************************************************************** +* ISF_NetConnect_fnEnumObjects +*/ +static HRESULT WINAPI ISF_NetConnect_fnEnumObjects (IShellFolder2 * iface, + HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST * ppEnumIDList) +{ + //IGenericSFImpl *This = (IGenericSFImpl *)iface; + + *ppEnumIDList = IEnumIDList_Constructor(); + if(*ppEnumIDList) + CreateNetConnectEnumList(*ppEnumIDList, dwFlags); + + + return (*ppEnumIDList) ? S_OK : E_OUTOFMEMORY; +} + +/************************************************************************** +* ISF_NetConnect_fnBindToObject +*/ +static HRESULT WINAPI ISF_NetConnect_fnBindToObject (IShellFolder2 * iface, + LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) +{ + //IGenericSFImpl *This = (IGenericSFImpl *)iface; + + return E_NOTIMPL; +} + +/************************************************************************** +* ISF_NetConnect_fnBindToStorage +*/ +static HRESULT WINAPI ISF_NetConnect_fnBindToStorage (IShellFolder2 * iface, + LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) +{ + //IGenericSFImpl *This = (IGenericSFImpl *)iface; + + + *ppvOut = NULL; + return E_NOTIMPL; +} + +/************************************************************************** +* ISF_NetConnect_fnCompareIDs +*/ + +static HRESULT WINAPI ISF_NetConnect_fnCompareIDs (IShellFolder2 * iface, + LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) +{ + //IGenericSFImpl *This = (IGenericSFImpl *)iface; + + + + return E_NOTIMPL; +} + +/************************************************************************** +* ISF_NetConnect_fnCreateViewObject +*/ +static HRESULT WINAPI ISF_NetConnect_fnCreateViewObject (IShellFolder2 * iface, + HWND hwndOwner, REFIID riid, LPVOID * ppvOut) +{ + //IGenericSFImpl *This = (IGenericSFImpl *)iface; + IShellView* pShellView; + CSFV cvf; + HRESULT hr = E_NOINTERFACE; + + if (!ppvOut) + return hr; + + *ppvOut = NULL; + + if (IsEqualIID (riid, &IID_IShellView)) + { + ZeroMemory(&cvf, sizeof(cvf)); + cvf.cbSize = sizeof(cvf); + cvf.pshf = (IShellFolder*)iface; + + hr = SHCreateShellFolderViewEx(&cvf, &pShellView); + if (SUCCEEDED(hr)) + { + hr = IShellView_QueryInterface (pShellView, riid, ppvOut); + IShellView_Release (pShellView); + } + } + + return hr; +} + +/************************************************************************** +* ISF_NetConnect_fnGetAttributesOf +*/ +static HRESULT WINAPI ISF_NetConnect_fnGetAttributesOf (IShellFolder2 * iface, + UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut) +{ + //IGenericSFImpl *This = (IGenericSFImpl *)iface; + HRESULT hr = S_OK; + static const DWORD dwNetConnectAttributes = SFGAO_STORAGE | SFGAO_HASPROPSHEET | SFGAO_STORAGEANCESTOR | + SFGAO_FILESYSANCESTOR | SFGAO_FOLDER | SFGAO_FILESYSTEM | SFGAO_HASSUBFOLDER | SFGAO_CANRENAME | SFGAO_CANDELETE; + + + if (!rgfInOut) + return E_INVALIDARG; + + if (cidl && !apidl) + return E_INVALIDARG; + + if (*rgfInOut == 0) + *rgfInOut = ~0; + + if(cidl == 0) + *rgfInOut = dwNetConnectAttributes; + + /* make sure SFGAO_VALIDATE is cleared, some apps depend on that */ + *rgfInOut &= ~SFGAO_VALIDATE; + + return hr; +} + +/************************************************************************** +* ISF_NetConnect_fnGetUIObjectOf +* +* PARAMETERS +* hwndOwner [in] Parent window for any output +* cidl [in] array size +* apidl [in] simple pidl array +* riid [in] Requested Interface +* prgfInOut [ ] reserved +* ppvObject [out] Resulting Interface +* +*/ +static HRESULT WINAPI ISF_NetConnect_fnGetUIObjectOf (IShellFolder2 * iface, + HWND hwndOwner, UINT cidl, LPCITEMIDLIST * apidl, REFIID riid, + UINT * prgfInOut, LPVOID * ppvOut) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + IUnknown *pObj = NULL; + HRESULT hr = E_INVALIDARG; + + if (!ppvOut) + return hr; + + *ppvOut = NULL; + + if (IsEqualIID (riid, &IID_IContextMenu) && (cidl >= 1)) + { + pObj = (IUnknown*)(&This->lpVtblContextMenu); + This->apidl = apidl[0]; + IUnknown_AddRef(pObj); + hr = S_OK; + } + else + hr = E_NOINTERFACE; + + if (SUCCEEDED(hr) && !pObj) + hr = E_OUTOFMEMORY; + + *ppvOut = pObj; + return hr; +} + +/************************************************************************** +* ISF_NetConnect_fnGetDisplayNameOf +* +*/ +static HRESULT WINAPI ISF_NetConnect_fnGetDisplayNameOf (IShellFolder2 * iface, + LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) +{ + LPWSTR pszName; + HRESULT hr = E_FAIL; + //IGenericSFImpl *This = (IGenericSFImpl *)iface; + + if (!strRet) + return E_INVALIDARG; + + pszName = CoTaskMemAlloc(MAX_PATH * sizeof(WCHAR)); + if (!pszName) + return E_OUTOFMEMORY; + + if (_ILIsNetConnect (pidl)) + { + if (LoadStringW(netshell_hInstance, IDS_NETWORKCONNECTION, pszName, MAX_PATH)) + { + pszName[MAX_PATH-1] = L'\0'; + hr = S_OK; + } + } + else + { + VALUEStruct * val = _ILGetValueStruct(pidl); + if (val) + { + wcscpy(pszName, val->szName); + hr = S_OK; + } + + } + + if (SUCCEEDED(hr)) + { + strRet->uType = STRRET_WSTR; + strRet->u.pOleStr = pszName; + } + else + { + CoTaskMemFree(pszName); + } + + return hr; +} + +/************************************************************************** +* ISF_NetConnect_fnSetNameOf +* Changes the name of a file object or subfolder, possibly changing its item +* identifier in the process. +* +* PARAMETERS +* hwndOwner [in] Owner window for output +* pidl [in] simple pidl of item to change +* lpszName [in] the items new display name +* dwFlags [in] SHGNO formatting flags +* ppidlOut [out] simple pidl returned +*/ +static HRESULT WINAPI ISF_NetConnect_fnSetNameOf (IShellFolder2 * iface, + HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */ + LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) +{ + //IGenericSFImpl *This = (IGenericSFImpl *)iface; + + return E_NOTIMPL; +} + +static HRESULT WINAPI ISF_NetConnect_fnGetDefaultSearchGUID ( + IShellFolder2 * iface, GUID * pguid) +{ + //IGenericSFImpl *This = (IGenericSFImpl *)iface; + + return E_NOTIMPL; +} + +static HRESULT WINAPI ISF_NetConnect_fnEnumSearches (IShellFolder2 * iface, + IEnumExtraSearch ** ppenum) +{ + //IGenericSFImpl *This = (IGenericSFImpl *)iface; + + return E_NOTIMPL; +} + +static HRESULT WINAPI ISF_NetConnect_fnGetDefaultColumn (IShellFolder2 * iface, + DWORD dwRes, ULONG * pSort, ULONG * pDisplay) +{ + //IGenericSFImpl *This = (IGenericSFImpl *)iface; + + if (pSort) + *pSort = 0; + if (pDisplay) + *pDisplay = 0; + + return S_OK; +} + +static HRESULT WINAPI ISF_NetConnect_fnGetDefaultColumnState ( + IShellFolder2 * iface, UINT iColumn, DWORD * pcsFlags) +{ + //IGenericSFImpl *This = (IGenericSFImpl *)iface; + + if (!pcsFlags || iColumn >= NETCONNECTSHELLVIEWCOLUMNS) + return E_INVALIDARG; + *pcsFlags = NetConnectSFHeader[iColumn].pcsFlags; + return S_OK; +} + +static HRESULT WINAPI ISF_NetConnect_fnGetDetailsEx (IShellFolder2 * iface, + LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv) +{ + //IGenericSFImpl *This = (IGenericSFImpl *)iface; + + return E_NOTIMPL; +} + +static HRESULT WINAPI ISF_NetConnect_fnGetDetailsOf (IShellFolder2 * iface, + LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS * psd) +{ + //IGenericSFImpl *This = (IGenericSFImpl *)iface; + WCHAR buffer[MAX_PATH] = {0}; + HRESULT hr = E_FAIL; + VALUEStruct * val; + + if (iColumn >= NETCONNECTSHELLVIEWCOLUMNS) + return E_FAIL; + + psd->fmt = NetConnectSFHeader[iColumn].fmt; + psd->cxChar = NetConnectSFHeader[iColumn].cxChar; + if (pidl == NULL) + { + psd->str.uType = STRRET_WSTR; + if (LoadStringW(netshell_hInstance, NetConnectSFHeader[iColumn].colnameid, buffer, MAX_PATH)) + hr = SHStrDupW(buffer, &psd->str.u.pOleStr); + + return hr; + } + + if (iColumn == COLUMN_NAME) + { + psd->str.uType = STRRET_WSTR; + return IShellFolder2_GetDisplayNameOf(iface, pidl, SHGDN_NORMAL, &psd->str); + } + + val = _ILGetValueStruct(pidl); + if (!val) + return E_FAIL; + + switch(iColumn) + { + case COLUMN_TYPE: + if (val->dwType == IF_TYPE_ETHERNET_CSMACD || val->dwType == IF_TYPE_IEEE80211) + { + if (LoadStringW(netshell_hInstance, IDS_TYPE_ETHERNET, buffer, MAX_PATH)) + { + psd->str.uType = STRRET_WSTR; + hr = SHStrDupW(buffer, &psd->str.u.pOleStr); + } + } + break; + case COLUMN_STATUS: + buffer[0] = L'\0'; + if (val->dwOperStatus == MIB_IF_OPER_STATUS_NON_OPERATIONAL) + LoadStringW(netshell_hInstance, IDS_STATUS_NON_OPERATIONAL, buffer, MAX_PATH); + else if (val->dwOperStatus == MIB_IF_OPER_STATUS_UNREACHABLE) + LoadStringW(netshell_hInstance, IDS_STATUS_UNREACHABLE, buffer, MAX_PATH); + else if (val->dwOperStatus == MIB_IF_OPER_STATUS_DISCONNECTED) + LoadStringW(netshell_hInstance, IDS_STATUS_DISCONNECTED, buffer, MAX_PATH); + else if (val->dwOperStatus == MIB_IF_OPER_STATUS_CONNECTING) + LoadStringW(netshell_hInstance, IDS_STATUS_CONNECTING, buffer, MAX_PATH); + else if (val->dwOperStatus == MIB_IF_OPER_STATUS_CONNECTED) + LoadStringW(netshell_hInstance, IDS_STATUS_CONNECTED, buffer, MAX_PATH); + else if (val->dwOperStatus == MIB_IF_OPER_STATUS_OPERATIONAL) + LoadStringW(netshell_hInstance, IDS_STATUS_OPERATIONAL, buffer, MAX_PATH); + + if (buffer[0]) + { + buffer[MAX_PATH-1] = L'\0'; + psd->str.uType = STRRET_WSTR; + hr = SHStrDupW(buffer, &psd->str.u.pOleStr); + } + break; + case COLUMN_DEVNAME: + wcscpy(buffer, val->szName + val->dwNameLength); + buffer[MAX_PATH-1] = L'\0'; + psd->str.uType = STRRET_WSTR; + hr = SHStrDupW(buffer, &psd->str.u.pOleStr); + break; + case COLUMN_PHONE: + case COLUMN_OWNER: + psd->str.u.cStr[0] = '\0'; + psd->str.uType = STRRET_CSTR; + break; + } + + return hr; +} + +static HRESULT WINAPI ISF_NetConnect_fnMapColumnToSCID (IShellFolder2 * iface, + UINT column, SHCOLUMNID * pscid) +{ + //IGenericSFImpl *This = (IGenericSFImpl *)iface; + + return E_NOTIMPL; +} + +static const IShellFolder2Vtbl vt_ShellFolder2 = { + ISF_NetConnect_fnQueryInterface, + ISF_NetConnect_fnAddRef, + ISF_NetConnect_fnRelease, + ISF_NetConnect_fnParseDisplayName, + ISF_NetConnect_fnEnumObjects, + ISF_NetConnect_fnBindToObject, + ISF_NetConnect_fnBindToStorage, + ISF_NetConnect_fnCompareIDs, + ISF_NetConnect_fnCreateViewObject, + ISF_NetConnect_fnGetAttributesOf, + ISF_NetConnect_fnGetUIObjectOf, + ISF_NetConnect_fnGetDisplayNameOf, + ISF_NetConnect_fnSetNameOf, + /* ShellFolder2 */ + ISF_NetConnect_fnGetDefaultSearchGUID, + ISF_NetConnect_fnEnumSearches, + ISF_NetConnect_fnGetDefaultColumn, + ISF_NetConnect_fnGetDefaultColumnState, + ISF_NetConnect_fnGetDetailsEx, + ISF_NetConnect_fnGetDetailsOf, + ISF_NetConnect_fnMapColumnToSCID +}; + +/************************************************************************** +* IContextMenu2 Implementation +*/ + +/************************************************************************ + * ISF_NetConnect_IContextMenu_QueryInterface + */ +static HRESULT WINAPI ISF_NetConnect_IContextMenu2_QueryInterface(IContextMenu2 * iface, REFIID iid, LPVOID * ppvObject) +{ + IGenericSFImpl * This = impl_from_IContextMenu2(iface); + + return IShellFolder2_QueryInterface((IShellFolder2*)This, iid, ppvObject); +} + +/************************************************************************ + * ISF_NetConnect_IContextMenu_AddRef + */ +static ULONG WINAPI ISF_NetConnect_IContextMenu2_AddRef(IContextMenu2 * iface) +{ + IGenericSFImpl * This = impl_from_IContextMenu2(iface); + + return IShellFolder2_AddRef((IShellFolder2*)This); +} + +/************************************************************************ + * ISF_NetConnect_IContextMenu_Release + */ +static ULONG WINAPI ISF_NetConnect_IContextMenu2_Release(IContextMenu2 * iface) +{ + IGenericSFImpl * This = impl_from_IContextMenu2(iface); + + return IShellFolder2_Release((IShellFolder2*)This); +} + +/************************************************************************** +* ISF_NetConnect_IContextMenu_QueryContextMenu() +*/ +static HRESULT WINAPI ISF_NetConnect_IContextMenu2_QueryContextMenu( + IContextMenu2 *iface, + HMENU hMenu, + UINT indexMenu, + UINT idCmdFirst, + UINT idCmdLast, + UINT uFlags) +{ + int Count = 1; + //IGenericSFImpl * This = impl_from_IContextMenu2(iface); + + return MAKE_HRESULT(SEVERITY_SUCCESS, 0, Count); +} + + +/************************************************************************** +* ISF_NetConnect_IContextMenu_InvokeCommand() +*/ +static HRESULT WINAPI ISF_NetConnect_IContextMenu2_InvokeCommand( + IContextMenu2 *iface, + LPCMINVOKECOMMANDINFO lpcmi) +{ + //IGenericSFImpl * This = impl_from_IContextMenu2(iface); + + return S_OK; +} + +/************************************************************************** + * ISF_NetConnect_IContextMenu_GetCommandString() + * + */ +static HRESULT WINAPI ISF_NetConnect_IContextMenu2_GetCommandString( + IContextMenu2 *iface, + UINT_PTR idCommand, + UINT uFlags, + UINT* lpReserved, + LPSTR lpszName, + UINT uMaxNameLen) +{ + //IGenericSFImpl * This = impl_from_IContextMenu2(iface); + + return E_FAIL; +} + + + +/************************************************************************** +* ISF_NetConnect_IContextMenu_HandleMenuMsg() +*/ +static HRESULT WINAPI ISF_NetConnect_IContextMenu2_HandleMenuMsg( + IContextMenu2 *iface, + UINT uMsg, + WPARAM wParam, + LPARAM lParam) +{ + //IGenericSFImpl * This = impl_from_IContextMenu2(iface); + + + return E_NOTIMPL; +} + +static const IContextMenu2Vtbl vt_ContextMenu2 = +{ + ISF_NetConnect_IContextMenu2_QueryInterface, + ISF_NetConnect_IContextMenu2_AddRef, + ISF_NetConnect_IContextMenu2_Release, + ISF_NetConnect_IContextMenu2_QueryContextMenu, + ISF_NetConnect_IContextMenu2_InvokeCommand, + ISF_NetConnect_IContextMenu2_GetCommandString, + ISF_NetConnect_IContextMenu2_HandleMenuMsg +}; + +/************************************************************************ + * ISF_NetConnect_PersistFolder2_QueryInterface + */ +static HRESULT WINAPI ISF_NetConnect_PersistFolder2_QueryInterface (IPersistFolder2 * iface, + REFIID iid, LPVOID * ppvObj) +{ + IGenericSFImpl * This = impl_from_IPersistFolder2(iface); + + return IShellFolder2_QueryInterface ((IShellFolder2*)This, iid, ppvObj); +} + +/************************************************************************ + * ISF_NetConnect_PersistFolder2_AddRef + */ +static ULONG WINAPI ISF_NetConnect_PersistFolder2_AddRef (IPersistFolder2 * iface) +{ + IGenericSFImpl * This = impl_from_IPersistFolder2(iface); + + return IShellFolder2_AddRef((IShellFolder2*)This); +} + +/************************************************************************ + * ISF_NetConnect_PersistFolder2_Release + */ +static ULONG WINAPI ISF_NetConnect_PersistFolder2_Release (IPersistFolder2 * iface) +{ + IGenericSFImpl * This = impl_from_IPersistFolder2(iface); + + return IShellFolder2_Release((IShellFolder2*)This); +} + +/************************************************************************ + * ISF_NetConnect_PersistFolder2_GetClassID + */ +static HRESULT WINAPI ISF_NetConnect_PersistFolder2_GetClassID ( + IPersistFolder2 * iface, CLSID * lpClassId) +{ + //IGenericSFImpl * This = impl_from_IPersistFolder2(iface); + + if (!lpClassId) + return E_POINTER; + + *lpClassId = CLSID_NetworkConnections; + + return S_OK; +} + +/************************************************************************ + * ISF_NetConnect_PersistFolder2_Initialize + * + * NOTES: it makes no sense to change the pidl + */ +static HRESULT WINAPI ISF_NetConnect_PersistFolder2_Initialize ( + IPersistFolder2 * iface, LPCITEMIDLIST pidl) +{ + IGenericSFImpl * This = impl_from_IPersistFolder2(iface); + + SHFree(This->pidlRoot); + This->pidlRoot = ILClone(pidl); + + return S_OK; +} + +/************************************************************************** + * ISF_NetConnect_PersistFolder2_GetCurFolder + */ +static HRESULT WINAPI ISF_NetConnect_PersistFolder2_GetCurFolder ( + IPersistFolder2 * iface, LPITEMIDLIST * pidl) +{ + IGenericSFImpl * This = impl_from_IPersistFolder2(iface); + + + if (!pidl) + return E_POINTER; + + *pidl = ILClone (This->pidlRoot); + + return S_OK; +} + +static const IPersistFolder2Vtbl vt_PersistFolder2 = +{ + ISF_NetConnect_PersistFolder2_QueryInterface, + ISF_NetConnect_PersistFolder2_AddRef, + ISF_NetConnect_PersistFolder2_Release, + ISF_NetConnect_PersistFolder2_GetClassID, + ISF_NetConnect_PersistFolder2_Initialize, + ISF_NetConnect_PersistFolder2_GetCurFolder +}; + +/************************************************************************** +* ISF_NetConnect_Constructor +*/ +HRESULT WINAPI ISF_NetConnect_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) +{ + IGenericSFImpl *sf; + + if (!ppv) + return E_POINTER; + if (pUnkOuter) + return CLASS_E_NOAGGREGATION; + + sf = (IGenericSFImpl *) HeapAlloc ( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof (IGenericSFImpl)); + if (!sf) + return E_OUTOFMEMORY; + + sf->ref = 1; + sf->lpVtbl = &vt_ShellFolder2; + sf->lpVtblPersistFolder2 = &vt_PersistFolder2; + sf->lpVtblContextMenu = &vt_ContextMenu2; + sf->pidlRoot = _ILCreateNetConnect(); /* my qualified pidl */ + + if (!SUCCEEDED (IShellFolder2_QueryInterface ((IShellFolder2*)sf, riid, ppv))) + { + IShellFolder2_Release((IShellFolder2*)sf); + return E_NOINTERFACE; + } + + return S_OK; +} diff --git a/reactos/dll/win32/win32.rbuild b/reactos/dll/win32/win32.rbuild index 27242319771..5be582cddd6 100644 --- a/reactos/dll/win32/win32.rbuild +++ b/reactos/dll/win32/win32.rbuild @@ -196,6 +196,9 @@ + + + From 9e68eda05b9611f0d26840b36f7a3db295ee3daf Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Wed, 27 Aug 2008 17:27:25 +0000 Subject: [PATCH 200/324] - Fix build svn path=/trunk/; revision=35708 --- reactos/dll/win32/netshell/lang/de-DE.rc | 21 +++++++++++++++++++++ reactos/dll/win32/netshell/lang/en-US.rc | 20 ++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 reactos/dll/win32/netshell/lang/de-DE.rc create mode 100644 reactos/dll/win32/netshell/lang/en-US.rc diff --git a/reactos/dll/win32/netshell/lang/de-DE.rc b/reactos/dll/win32/netshell/lang/de-DE.rc new file mode 100644 index 00000000000..d3273c9c3c9 --- /dev/null +++ b/reactos/dll/win32/netshell/lang/de-DE.rc @@ -0,0 +1,21 @@ +LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL + + +STRINGTABLE DISCARDABLE +BEGIN + IDS_NETWORKCONNECTION "Netzwerkverbindungen" + IDS_SHV_COLUMN_NAME "Name" + IDS_SHV_COLUMN_TYPE "Typ" + IDS_SHV_COLUMN_STATE "Status" + IDS_SHV_COLUMN_DEVNAME "Gerдtename" + IDS_SHV_COLUMN_PHONE "Rufnummer oder Hostaddresse" + IDS_SHV_COLUMN_OWNER "Besitzer" + IDS_TYPE_ETHERNET "LAN oder Hochgeschwindigkeitsinternet" + IDS_STATUS_NON_OPERATIONAL "Deaktiviert" + IDS_STATUS_UNREACHABLE "Nicht verbunden" + IDS_STATUS_DISCONNECTED "Netzwerkkabel wurde entfernt" + IDS_STATUS_CONNECTING "Netzwerkaddresse beziehen" + IDS_STATUS_CONNECTED "Verbindung hergestellt" + IDS_STATUS_OPERATIONAL "Verbindung hergestellt" + +END diff --git a/reactos/dll/win32/netshell/lang/en-US.rc b/reactos/dll/win32/netshell/lang/en-US.rc new file mode 100644 index 00000000000..61743df8f99 --- /dev/null +++ b/reactos/dll/win32/netshell/lang/en-US.rc @@ -0,0 +1,20 @@ +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +STRINGTABLE DISCARDABLE +BEGIN + IDS_NETWORKCONNECTION "Network Connection" + IDS_SHV_COLUMN_NAME "Name" + IDS_SHV_COLUMN_TYPE "Type" + IDS_SHV_COLUMN_STATE "Status" + IDS_SHV_COLUMN_DEVNAME "Device Name" + IDS_SHV_COLUMN_PHONE "Phone # or Host Address" + IDS_SHV_COLUMN_OWNER "Owner" + IDS_TYPE_ETHERNET "LAN or High-Speed Internet" + IDS_STATUS_NON_OPERATIONAL "Disabled" + IDS_STATUS_UNREACHABLE "Not Connected" + IDS_STATUS_DISCONNECTED "Network cable unplugged" + IDS_STATUS_CONNECTING "Acquiring network address" + IDS_STATUS_CONNECTED "Connected" + IDS_STATUS_OPERATIONAL "Connected" +END + From 9112574303877158e91fcde09bdae11ecc877b6b Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Wed, 27 Aug 2008 17:54:27 +0000 Subject: [PATCH 201/324] - Make cmlibhost compile warning free - Slight reordering of cmlib.h (by Colin Finck) svn path=/trunk/; revision=35709 --- reactos/lib/cmlib/cminit.c | 4 +- reactos/lib/cmlib/cmlib.h | 129 ++++++++++++++++----------------- reactos/lib/cmlib/cmlib.rbuild | 2 +- 3 files changed, 68 insertions(+), 67 deletions(-) diff --git a/reactos/lib/cmlib/cminit.c b/reactos/lib/cmlib/cminit.c index 7c3f7ddf838..80f2893cf4f 100644 --- a/reactos/lib/cmlib/cminit.c +++ b/reactos/lib/cmlib/cminit.c @@ -6,6 +6,8 @@ */ #include "cmlib.h" +#define NDEBUG +#include ULONG CmlibTraceLevel = 0; @@ -95,7 +97,7 @@ CmpPrepareIndexOfKeys( } else { - DbgPrint("IndexCell->Signature %x\n", IndexCell->Signature); + DPRINT1("IndexCell->Signature %x\n", IndexCell->Signature); ASSERT(FALSE); } } diff --git a/reactos/lib/cmlib/cmlib.h b/reactos/lib/cmlib/cmlib.h index 66a5ffa44c6..ff780d166b1 100644 --- a/reactos/lib/cmlib/cmlib.h +++ b/reactos/lib/cmlib/cmlib.h @@ -8,6 +8,11 @@ #ifndef CMLIB_H #define CMLIB_H +// +// Debug support switch +// +#define _CMLIB_DEBUG_ 1 + #ifdef CMLIB_HOST #include #include @@ -23,82 +28,76 @@ #define STATUS_NOT_REGISTRY_FILE ((NTSTATUS)0xC000015C) #define STATUS_REGISTRY_RECOVERED ((NTSTATUS)0x40000009) + #define REG_OPTION_VOLATILE 1 + #define OBJ_CASE_INSENSITIVE 0x00000040L + #define USHORT_MAX USHRT_MAX + + VOID NTAPI + KeQuerySystemTime( + OUT PLARGE_INTEGER CurrentTime); + + VOID NTAPI + RtlInitializeBitMap( + IN PRTL_BITMAP BitMapHeader, + IN PULONG BitMapBuffer, + IN ULONG SizeOfBitMap); + + ULONG NTAPI + RtlFindSetBits( + IN PRTL_BITMAP BitMapHeader, + IN ULONG NumberToFind, + IN ULONG HintIndex); + + VOID NTAPI + RtlSetBits( + IN PRTL_BITMAP BitMapHeader, + IN ULONG StartingIndex, + IN ULONG NumberToSet); + + VOID NTAPI + RtlClearAllBits( + IN PRTL_BITMAP BitMapHeader); + + #define RtlCheckBit(BMH,BP) (((((PLONG)(BMH)->Buffer)[(BP) / 32]) >> ((BP) % 32)) & 0x1) + + #define PKTHREAD PVOID + #define PKGUARDED_MUTEX PVOID + #define PERESOURCE PVOID + #define PFILE_OBJECT PVOID + #define PKEVENT PVOID + #define PWORK_QUEUE_ITEM PVOID + #define EX_PUSH_LOCK PULONG_PTR + /* For */ #define USE_HOST_WCSFUNCS + + #define CMLTRACE(x, ...) +#else + // + // Debug/Tracing support + // + #if _CMLIB_DEBUG_ + #ifdef NEW_DEBUG_SYSTEM_IMPLEMENTED // enable when Debug Filters are implemented + #define CMLTRACE DbgPrintEx + #else + #define CMLTRACE(x, ...) \ + if (x & CmlibTraceLevel) DbgPrint(__VA_ARGS__) + #endif + #else + #define CMLTRACE(x, ...) DPRINT(__VA_ARGS__) + #endif + + + #include #endif #include -// -// Debug support switch -// -#define _CMLIB_DEBUG_ 1 - // // These define the Debug Masks Supported // #define CMLIB_HCELL_DEBUG 0x01 -// -// Debug/Tracing support -// -#if _CMLIB_DEBUG_ -#ifdef NEW_DEBUG_SYSTEM_IMPLEMENTED // enable when Debug Filters are implemented -#define CMLTRACE DbgPrintEx -#else -#define CMLTRACE(x, ...) \ - if (x & CmlibTraceLevel) DbgPrint(__VA_ARGS__) -#endif -#else -#define CMLTRACE(x, ...) DPRINT(__VA_ARGS__) -#endif - -#ifndef _TYPEDEFS_HOST_H - #include - -#else - #define REG_OPTION_VOLATILE 1 - #define OBJ_CASE_INSENSITIVE 0x00000040L - #define USHORT_MAX USHRT_MAX - -VOID NTAPI -KeQuerySystemTime( - OUT PLARGE_INTEGER CurrentTime); - -VOID NTAPI -RtlInitializeBitMap( - IN PRTL_BITMAP BitMapHeader, - IN PULONG BitMapBuffer, - IN ULONG SizeOfBitMap); - -ULONG NTAPI -RtlFindSetBits( - IN PRTL_BITMAP BitMapHeader, - IN ULONG NumberToFind, - IN ULONG HintIndex); - -VOID NTAPI -RtlSetBits( - IN PRTL_BITMAP BitMapHeader, - IN ULONG StartingIndex, - IN ULONG NumberToSet); - -VOID NTAPI -RtlClearAllBits( - IN PRTL_BITMAP BitMapHeader); - -#define RtlCheckBit(BMH,BP) (((((PLONG)(BMH)->Buffer)[(BP) / 32]) >> ((BP) % 32)) & 0x1) - -#define PKTHREAD PVOID -#define PKGUARDED_MUTEX PVOID -#define PERESOURCE PVOID -#define PFILE_OBJECT PVOID -#define PKEVENT PVOID -#define PWORK_QUEUE_ITEM PVOID -#define EX_PUSH_LOCK PULONG_PTR - -#endif - #ifndef ROUND_UP #define ROUND_UP(a,b) ((((a)+(b)-1)/(b))*(b)) #define ROUND_DOWN(a,b) (((a)/(b))*(b)) diff --git a/reactos/lib/cmlib/cmlib.rbuild b/reactos/lib/cmlib/cmlib.rbuild index ea4f4d1adcb..61392ce730c 100644 --- a/reactos/lib/cmlib/cmlib.rbuild +++ b/reactos/lib/cmlib/cmlib.rbuild @@ -14,7 +14,7 @@ hivesum.c hivewrt.c - + . include/reactos include From 55c1fbf585e4731dd2c28553b5d77c3526a27412 Mon Sep 17 00:00:00 2001 From: Colin Finck Date: Wed, 27 Aug 2008 20:10:45 +0000 Subject: [PATCH 202/324] Add the "wine" include directory for the user32 Wine test and remove ROS-specific additions to some files. Fixes the user32_winetest and thus rostests build under Unix. svn path=/trunk/; revision=35711 --- rostests/winetests/user32/input.c | 2 +- rostests/winetests/user32/msg.c | 1 - rostests/winetests/user32/user32.rbuild | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rostests/winetests/user32/input.c b/rostests/winetests/user32/input.c index 07df61f9eab..0876709f77a 100755 --- a/rostests/winetests/user32/input.c +++ b/rostests/winetests/user32/input.c @@ -49,7 +49,7 @@ #include "windef.h" #include "winbase.h" -#include "wine/winuser.h" +#include "winuser.h" #include "wine/test.h" diff --git a/rostests/winetests/user32/msg.c b/rostests/winetests/user32/msg.c index 1b110311c0f..5c66f0c5a07 100755 --- a/rostests/winetests/user32/msg.c +++ b/rostests/winetests/user32/msg.c @@ -27,7 +27,6 @@ #include "windef.h" #include "winbase.h" #include "wingdi.h" -#include "wine/winuser.h" #include "winuser.h" #include "winnls.h" diff --git a/rostests/winetests/user32/user32.rbuild b/rostests/winetests/user32/user32.rbuild index 6d07e360485..797f9b6c27a 100644 --- a/rostests/winetests/user32/user32.rbuild +++ b/rostests/winetests/user32/user32.rbuild @@ -3,6 +3,7 @@ . + include/reactos/wine 0x0600 0x609 From 89d2d4d5bc210be0cdb027bda5afd3a9c1b0f449 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Wed, 27 Aug 2008 20:27:32 +0000 Subject: [PATCH 203/324] Merge 34714, 34716, 34718, 34720 from ros-amd64-bringup branch: recyclebin: DWORD -> SIZE_T and SIZE_T -> DWORD rtl: - cast AtomName to ULONG_PTR instead of ULONG - RtlQueryProcessdebugInformation(): cast teb->ClientId.UniqueProcess to ULONG_PTR for assignment to Pid. - vs(w)nprintf: cast argument to ULONG_PTR instead of unsigned long for a %p crt: - int -> intptr_t - unsigned long -> uintptr_t - #undef _MINGW_IMPORT in ctype.c, to avoid warnings scrnsafe: rename _toul to _toulptr and make it return an ULONG_PTR svn path=/trunk/; revision=35712 --- reactos/lib/recyclebin/recyclebin_v5.c | 4 ++-- reactos/lib/recyclebin/recyclebin_v5_enumerator.c | 4 ++-- reactos/lib/rtl/atom.c | 4 ++-- reactos/lib/rtl/dbgbuffer.c | 4 ++-- reactos/lib/rtl/sprintf.c | 2 +- reactos/lib/rtl/srw.c | 2 +- reactos/lib/rtl/swprintf.c | 2 +- reactos/lib/sdk/crt/process/_system.c | 2 +- reactos/lib/sdk/crt/process/process.c | 6 +++--- reactos/lib/sdk/crt/string/ctype.c | 2 ++ reactos/lib/sdk/scrnsave/scrnsave.c | 8 ++++---- 11 files changed, 21 insertions(+), 19 deletions(-) diff --git a/reactos/lib/recyclebin/recyclebin_v5.c b/reactos/lib/recyclebin/recyclebin_v5.c index 1cacc925adb..3090055cdbe 100644 --- a/reactos/lib/recyclebin/recyclebin_v5.c +++ b/reactos/lib/recyclebin/recyclebin_v5.c @@ -564,7 +564,7 @@ RecycleBin5_Create( LPWSTR FileName; /* Pointer into BufferName buffer */ LPCSTR DesktopIniContents = "[.ShellClassInfo]\r\nCLSID={645FF040-5081-101B-9F08-00AA002F954E}\r\n"; INFO2_HEADER Info2Contents[] = { { 5, 0, 0, 0x320, 0 } }; - SIZE_T BytesToWrite, BytesWritten, Needed; + DWORD BytesToWrite, BytesWritten, Needed; HANDLE hFile = INVALID_HANDLE_VALUE; HRESULT hr; @@ -676,7 +676,7 @@ HRESULT RecycleBin5_Constructor(IN LPCWSTR VolumePath, OUT IUnknown **ppUnknown) HANDLE tokenHandle = INVALID_HANDLE_VALUE; PTOKEN_USER TokenUserInfo = NULL; LPWSTR StringSid = NULL, p; - SIZE_T Needed, DirectoryLength; + DWORD Needed, DirectoryLength; INT len; HRESULT hr; diff --git a/reactos/lib/recyclebin/recyclebin_v5_enumerator.c b/reactos/lib/recyclebin/recyclebin_v5_enumerator.c index 07130621e79..37413f352a8 100644 --- a/reactos/lib/recyclebin/recyclebin_v5_enumerator.c +++ b/reactos/lib/recyclebin/recyclebin_v5_enumerator.c @@ -191,9 +191,9 @@ RecycleBin5File_RecycleBinFile_GetAttributes( static HRESULT STDMETHODCALLTYPE RecycleBin5File_RecycleBinFile_GetFileName( IN IRecycleBinFile *This, - IN DWORD BufferSize, + IN SIZE_T BufferSize, IN OUT LPWSTR Buffer, - OUT DWORD *RequiredSize) + OUT SIZE_T *RequiredSize) { struct RecycleBin5File *s = CONTAINING_RECORD(This, struct RecycleBin5File, recycleBinFileImpl); DWORD dwRequired; diff --git a/reactos/lib/rtl/atom.c b/reactos/lib/rtl/atom.c index 74e7879185d..dde6658346f 100644 --- a/reactos/lib/rtl/atom.c +++ b/reactos/lib/rtl/atom.c @@ -90,9 +90,9 @@ RtlpCheckIntegerAtom(PWSTR AtomName, DPRINT("RtlpCheckIntegerAtom(AtomName '%S' AtomValue %p)\n", AtomName, AtomValue); - if (!((ULONG)AtomName & 0xFFFF0000)) + if (!((ULONG_PTR)AtomName & 0xFFFF0000)) { - LoValue = (USHORT)((ULONG)AtomName & 0xFFFF); + LoValue = (USHORT)((ULONG_PTR)AtomName & 0xFFFF); if (LoValue == 0) LoValue = 0xC000; diff --git a/reactos/lib/rtl/dbgbuffer.c b/reactos/lib/rtl/dbgbuffer.c index 323940956c3..92e6fe504c4 100644 --- a/reactos/lib/rtl/dbgbuffer.c +++ b/reactos/lib/rtl/dbgbuffer.c @@ -234,7 +234,7 @@ RtlQueryProcessDebugInformation(IN ULONG ProcessId, IN OUT PRTL_DEBUG_INFORMATION Buf) { NTSTATUS Status = STATUS_SUCCESS; - ULONG Pid = (ULONG) NtCurrentTeb()->ClientId.UniqueProcess; + ULONG Pid = (ULONG_PTR) NtCurrentTeb()->ClientId.UniqueProcess; Buf->Flags = DebugInfoMask; Buf->OffsetFree = sizeof(RTL_DEBUG_INFORMATION); @@ -319,7 +319,7 @@ else Buf->TargetProcessHandle = NtCurrentProcess(); ClientId.UniqueThread = 0; - ClientId.UniqueProcess = (HANDLE)ProcessId; + ClientId.UniqueProcess = (HANDLE)(ULONG_PTR)ProcessId; InitializeObjectAttributes(&ObjectAttributes, NULL, 0, diff --git a/reactos/lib/rtl/sprintf.c b/reactos/lib/rtl/sprintf.c index a00ff412cf0..c213adaeb2f 100644 --- a/reactos/lib/rtl/sprintf.c +++ b/reactos/lib/rtl/sprintf.c @@ -577,7 +577,7 @@ int __cdecl _vsnprintf(char *buf, size_t cnt, const char *fmt, va_list args) flags |= ZEROPAD; } str = number(str, end, - (unsigned long) va_arg(args, void *), 16, + (ULONG_PTR) va_arg(args, void *), 16, field_width, precision, flags); continue; diff --git a/reactos/lib/rtl/srw.c b/reactos/lib/rtl/srw.c index d0d335b14f0..4fe2e57b529 100644 --- a/reactos/lib/rtl/srw.c +++ b/reactos/lib/rtl/srw.c @@ -44,7 +44,7 @@ RTL_SRWLOCK_SHARED | RTL_SRWLOCK_CONTENTION_LOCK) #define RTL_SRWLOCK_BITS 4 -#if defined(__GNUC__) +#if defined(__GNUC__) && !defined(_M_AMD64) /* This macro will cause the code to assert if compiled with a buggy version of GCC that doesn't align the wait blocks properly on the stack! */ #define ASSERT_SRW_WAITBLOCK(ptr) \ diff --git a/reactos/lib/rtl/swprintf.c b/reactos/lib/rtl/swprintf.c index f4851e05b4d..c4b7fa95b71 100644 --- a/reactos/lib/rtl/swprintf.c +++ b/reactos/lib/rtl/swprintf.c @@ -575,7 +575,7 @@ int __cdecl _vsnwprintf(wchar_t *buf, size_t cnt, const wchar_t *fmt, va_list ar flags |= ZEROPAD; } str = number(str, end, - (unsigned long) va_arg(args, void *), 16, + (ULONG_PTR) va_arg(args, void *), 16, field_width, precision, flags); continue; diff --git a/reactos/lib/sdk/crt/process/_system.c b/reactos/lib/sdk/crt/process/_system.c index 94bbe7fcda4..f6173db03c6 100644 --- a/reactos/lib/sdk/crt/process/_system.c +++ b/reactos/lib/sdk/crt/process/_system.c @@ -108,7 +108,7 @@ int system(const char *command) CloseHandle(ProcessInformation.hThread); // system should wait untill the calling process is finished - _cwait(&nStatus,(int)ProcessInformation.hProcess,0); + _cwait(&nStatus,(intptr_t)ProcessInformation.hProcess,0); CloseHandle(ProcessInformation.hProcess); return nStatus; diff --git a/reactos/lib/sdk/crt/process/process.c b/reactos/lib/sdk/crt/process/process.c index 24b97408fdc..99b3208ea87 100644 --- a/reactos/lib/sdk/crt/process/process.c +++ b/reactos/lib/sdk/crt/process/process.c @@ -182,7 +182,7 @@ valisttosT(const _TCHAR* arg0, va_list alist, _TCHAR delim) return str; } -static int +static intptr_t do_spawnT(int mode, const _TCHAR* cmdname, const _TCHAR* args, const _TCHAR* envp) { STARTUPINFO StartupInfo = {0}; @@ -304,7 +304,7 @@ do_spawnT(int mode, const _TCHAR* cmdname, const _TCHAR* args, const _TCHAR* env { case _P_NOWAIT: case _P_NOWAITO: - return((int)ProcessInformation.hProcess); + return((intptr_t)ProcessInformation.hProcess); case _P_OVERLAY: CloseHandle(ProcessInformation.hProcess); _exit(0); @@ -317,7 +317,7 @@ do_spawnT(int mode, const _TCHAR* cmdname, const _TCHAR* args, const _TCHAR* env CloseHandle(ProcessInformation.hProcess); return( 0); } - return( (int)ProcessInformation.hProcess); + return( (intptr_t)ProcessInformation.hProcess); } /* diff --git a/reactos/lib/sdk/crt/string/ctype.c b/reactos/lib/sdk/crt/string/ctype.c index 9a74204d75e..46870724404 100644 --- a/reactos/lib/sdk/crt/string/ctype.c +++ b/reactos/lib/sdk/crt/string/ctype.c @@ -1,4 +1,6 @@ #include +#undef __MINGW_IMPORT +#define __MINGW_IMPORT #include #undef _pctype diff --git a/reactos/lib/sdk/scrnsave/scrnsave.c b/reactos/lib/sdk/scrnsave/scrnsave.c index 72b8d3d483a..8438587e3a9 100644 --- a/reactos/lib/sdk/scrnsave/scrnsave.c +++ b/reactos/lib/sdk/scrnsave/scrnsave.c @@ -36,10 +36,10 @@ static int ISSPACE(TCHAR c) #define ISNUM(c) ((c) >= '0' && c <= '9') -static unsigned long _toul(const TCHAR *s) +static ULONG_PTR _toulptr(const TCHAR *s) { - unsigned long res; - unsigned long n; + ULONG_PTR res; + ULONG_PTR n; const TCHAR *p; for (p = s; *p; p++) @@ -223,7 +223,7 @@ int APIENTRY _tWinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPTSTR CmdLine, int fChildPreview = TRUE; while (ISSPACE(*++p)); - hParent = (HWND) _toul(p); + hParent = (HWND) _toulptr(p); if (hParent && IsWindow(hParent)) return LaunchScreenSaver(hParent); From 50eb47c31e6f3142262fcc87098fae9f15c6c179 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Wed, 27 Aug 2008 20:56:16 +0000 Subject: [PATCH 204/324] MMerge 34827 from ros-amd64-bringup branch: - fix parameter types of NtAllocateVirtualMemory and NtFreeVirtualMemory svn path=/trunk/; revision=35713 --- reactos/ntoskrnl/mm/anonmem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/mm/anonmem.c b/reactos/ntoskrnl/mm/anonmem.c index 2bd93fc658d..656526364d2 100644 --- a/reactos/ntoskrnl/mm/anonmem.c +++ b/reactos/ntoskrnl/mm/anonmem.c @@ -523,7 +523,7 @@ NTSTATUS STDCALL NtAllocateVirtualMemory(IN HANDLE ProcessHandle, IN OUT PVOID* UBaseAddress, IN ULONG ZeroBits, - IN OUT PULONG URegionSize, + IN OUT PSIZE_T URegionSize, IN ULONG AllocationType, IN ULONG Protect) /* @@ -900,7 +900,7 @@ MmFreeVirtualMemory(PEPROCESS Process, NTSTATUS STDCALL NtFreeVirtualMemory(IN HANDLE ProcessHandle, IN PVOID* PBaseAddress, - IN PULONG PRegionSize, + IN PSIZE_T PRegionSize, IN ULONG FreeType) /* * FUNCTION: Frees a range of virtual memory From 7191a6d896730ffb883882a5e67a89b86f56f4ee Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Wed, 27 Aug 2008 22:40:17 +0000 Subject: [PATCH 205/324] Merge MMerge 34969 from ros-amd64-bringup branch: - Fix parameter types of NtQuery/SetSystemInformation, ExInitialize(N)PagedLookasideList, KeBugCheckWithTf, IoGetstackLimits - Use ALIGN_UP_POINTER for a pointer - Fix pointer to ULONG cast svn path=/trunk/; revision=35715 --- reactos/include/ndk/exfuncs.h | 6 +++--- reactos/ntoskrnl/ex/lookas.c | 4 ++-- reactos/ntoskrnl/include/internal/ke.h | 8 ++++---- reactos/ntoskrnl/io/iomgr/error.c | 4 ++-- reactos/ntoskrnl/io/iomgr/util.c | 4 ++-- reactos/ntoskrnl/ps/thread.c | 5 ++++- 6 files changed, 17 insertions(+), 14 deletions(-) diff --git a/reactos/include/ndk/exfuncs.h b/reactos/include/ndk/exfuncs.h index b3ca9a4b487..b4f54fb8a3b 100644 --- a/reactos/include/ndk/exfuncs.h +++ b/reactos/include/ndk/exfuncs.h @@ -390,8 +390,8 @@ NTAPI NtQuerySystemInformation( IN SYSTEM_INFORMATION_CLASS SystemInformationClass, OUT PVOID SystemInformation, - IN SIZE_T Length, - OUT PSIZE_T ResultLength + IN ULONG Length, + OUT PULONG ResultLength ); NTSYSCALLAPI @@ -539,7 +539,7 @@ NTAPI NtSetSystemInformation( IN SYSTEM_INFORMATION_CLASS SystemInformationClass, IN PVOID SystemInformation, - IN SIZE_T SystemInformationLength + IN ULONG SystemInformationLength ); NTSYSCALLAPI diff --git a/reactos/ntoskrnl/ex/lookas.c b/reactos/ntoskrnl/ex/lookas.c index b733840ddae..f32e249d68e 100644 --- a/reactos/ntoskrnl/ex/lookas.c +++ b/reactos/ntoskrnl/ex/lookas.c @@ -222,7 +222,7 @@ ExInitializeNPagedLookasideList(IN PNPAGED_LOOKASIDE_LIST Lookaside, IN PALLOCATE_FUNCTION Allocate OPTIONAL, IN PFREE_FUNCTION Free OPTIONAL, IN ULONG Flags, - IN ULONG Size, + IN SIZE_T Size, IN ULONG Tag, IN USHORT Depth) { @@ -274,7 +274,7 @@ ExInitializePagedLookasideList(IN PPAGED_LOOKASIDE_LIST Lookaside, IN PALLOCATE_FUNCTION Allocate OPTIONAL, IN PFREE_FUNCTION Free OPTIONAL, IN ULONG Flags, - IN ULONG Size, + IN SIZE_T Size, IN ULONG Tag, IN USHORT Depth) { diff --git a/reactos/ntoskrnl/include/internal/ke.h b/reactos/ntoskrnl/include/internal/ke.h index 4dfb18a0e62..c3f288035dc 100644 --- a/reactos/ntoskrnl/include/internal/ke.h +++ b/reactos/ntoskrnl/include/internal/ke.h @@ -742,10 +742,10 @@ VOID NTAPI KeBugCheckWithTf( ULONG BugCheckCode, - ULONG BugCheckParameter1, - ULONG BugCheckParameter2, - ULONG BugCheckParameter3, - ULONG BugCheckParameter4, + ULONG_PTR BugCheckParameter1, + ULONG_PTR BugCheckParameter2, + ULONG_PTR BugCheckParameter3, + ULONG_PTR BugCheckParameter4, PKTRAP_FRAME Tf ); diff --git a/reactos/ntoskrnl/io/iomgr/error.c b/reactos/ntoskrnl/io/iomgr/error.c index 69c9ccae087..3d2065f4450 100644 --- a/reactos/ntoskrnl/io/iomgr/error.c +++ b/reactos/ntoskrnl/io/iomgr/error.c @@ -214,10 +214,10 @@ IopLogWorker(IN PVOID Parameter) } /* Align the buffer */ - StringBuffer = (PVOID)ALIGN_UP(StringBuffer, WCHAR); + StringBuffer = ALIGN_UP_POINTER(StringBuffer, WCHAR); /* Set the offset for the driver's name to the current buffer */ - ErrorMessage->DriverNameOffset = (ULONG)(StringBuffer - + ErrorMessage->DriverNameOffset = (ULONG_PTR)(StringBuffer - (ULONG_PTR)ErrorMessage); /* Check how much space we have left for the device string */ diff --git a/reactos/ntoskrnl/io/iomgr/util.c b/reactos/ntoskrnl/io/iomgr/util.c index 02e971241ce..7b9b18b4698 100644 --- a/reactos/ntoskrnl/io/iomgr/util.c +++ b/reactos/ntoskrnl/io/iomgr/util.c @@ -48,8 +48,8 @@ IoGetInitialStack(VOID) */ VOID NTAPI -IoGetStackLimits(OUT PULONG LowLimit, - OUT PULONG HighLimit) +IoGetStackLimits(OUT PULONG_PTR LowLimit, + OUT PULONG_PTR HighLimit) { PKPRCB Prcb = KeGetCurrentPrcb(); ULONG_PTR DpcStack = (ULONG_PTR)(Prcb->DpcStack); diff --git a/reactos/ntoskrnl/ps/thread.c b/reactos/ntoskrnl/ps/thread.c index 8d648090d8f..6de4bfc6490 100644 --- a/reactos/ntoskrnl/ps/thread.c +++ b/reactos/ntoskrnl/ps/thread.c @@ -104,7 +104,7 @@ PspUserThreadStartup(IN PKSTART_ROUTINE StartRoutine, Prcb = KeGetCurrentPrcb(); NewCookie = Prcb->MmPageFaultCount ^ Prcb->InterruptTime ^ SystemTime.u.LowPart ^ SystemTime.u.HighPart ^ - (ULONG)&SystemTime; + (ULONG_PTR)&SystemTime; /* Set the new cookie*/ InterlockedCompareExchange((LONG*)&SharedUserData->Cookie, @@ -333,6 +333,9 @@ PspCreateThread(OUT PHANDLE ThreadHandle, #elif defined(_M_ARM) Thread->StartAddress = (PVOID)ThreadContext->Pc; Thread->Win32StartAddress = (PVOID)ThreadContext->R0; +#elif defined(_M_AMD64) + Thread->StartAddress = (PVOID)ThreadContext->Rip; + Thread->Win32StartAddress = (PVOID)ThreadContext->Rax; #else #error Unknown architecture #endif From 4a322aacc75abee0401f2358b80a0980d52cafe6 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Thu, 28 Aug 2008 00:03:28 +0000 Subject: [PATCH 206/324] - Add IIDs and CLSID for netshell svn path=/trunk/; revision=35716 --- reactos/lib/sdk/uuid/uuid.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/reactos/lib/sdk/uuid/uuid.c b/reactos/lib/sdk/uuid/uuid.c index 72e07ceca59..00007ba59ee 100644 --- a/reactos/lib/sdk/uuid/uuid.c +++ b/reactos/lib/sdk/uuid/uuid.c @@ -95,6 +95,9 @@ DEFINE_GUID(IID_ISFHelper, 0x1fe68efb,0x1874,0x9812,0x56,0xdc,0x0 DEFINE_GUID(IID_IDPLobbySP, 0x5a4e5a20,0x2ced,0x11d0,0xa8,0x89,0x00,0xa0,0xc9,0x05,0x43,0x3c); DEFINE_GUID(IID_IProxyManager, 0x00000008,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); DEFINE_GUID(IID_IBindStatusCallbackHolder,0x79eac9cc,0xbaf9,0x11ce,0x8c,0x82,0x00,0xaa,0x00,0x4b,0xa9,0x0b); +DEFINE_GUID(IID_IEnumNetConnection, 0xC08956A0,0x1CD3,0x11D1,0xB1,0xC5,0x00,0x80,0x5F,0xC1,0x27,0x0E); +DEFINE_GUID(IID_INetConnection, 0xC08956A1,0x1CD3,0x11D1,0xB1,0xC5,0x00,0x80,0x5F,0xC1,0x27,0x0E); +DEFINE_GUID(IID_INetConnectionManager, 0xC08956A2,0x1CD3,0x11D1,0xB1,0xC5,0x00,0x80,0x5F,0xC1,0x27,0x0E); DEFINE_GUID(FMTID_SummaryInformation,0xF29F85E0,0x4FF9,0x1068,0xAB,0x91,0x08,0x00,0x2B,0x27,0xB3,0xD9); DEFINE_GUID(FMTID_DocSummaryInformation,0xD5CDD502,0x2E9C,0x101B,0x93,0x97,0x08,0x00,0x2B,0x2C,0xF9,0xAE); @@ -123,3 +126,4 @@ DEFINE_GUID(CLSID_StdEvent, 0x0000032b,0x0000,0x0000,0xc0,0x00,0x0 DEFINE_GUID(CLSID_ManualResetEvent, 0x0000032c,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); DEFINE_GUID(CLSID_SynchronizeContainer, 0x0000032d,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); DEFINE_GUID(CLSID_InProcFreeMarshaler, 0x0000033a,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); +DEFINE_GUID(CLSID_ConnectionManager, 0xBA126AD1,0x2166, 0x11D1,0xB1,0xD0,0x0,0x80,0x5F,0xC1,0x27,0x0E); From f346cab83f2ff5646139f32eff2f888aed7192b4 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Thu, 28 Aug 2008 00:07:30 +0000 Subject: [PATCH 207/324] - Add netcon header svn path=/trunk/; revision=35717 --- reactos/include/psdk/netcon.h | 171 ++++++++++++++++++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 reactos/include/psdk/netcon.h diff --git a/reactos/include/psdk/netcon.h b/reactos/include/psdk/netcon.h new file mode 100644 index 00000000000..fd535b14363 --- /dev/null +++ b/reactos/include/psdk/netcon.h @@ -0,0 +1,171 @@ +#ifndef __NETCON_H__ +#define __NETCON_H__ + +typedef enum +{ + NCME_DEFAULT = 0 +}NETCONMGR_ENUM_FLAGS; + +typedef enum +{ + NCCF_NONE = 0, + NCCF_ALL_USERS = 0x1, + NCCF_ALLOW_DUPLICATION = 0x2, + NCCF_ALLOW_REMOVAL = 0x4, + NCCF_ALLOW_RENAME = 0x8, + NCCF_SHOW_ICON = 0x10, + NCCF_INCOMING_ONLY = 0x20, + NCCF_OUTGOING_ONLY = 0x40, + NCCF_BRANDED = 0x80, + NCCF_SHARED = 0x100, + NCCF_BRIDGED = 0x200, + NCCF_FIREWALLED = 0x400, + NCCF_DEFAULT = 0x800, + NCCF_HOMENET_CAPABLE = 0x1000, + NCCF_SHARED_PRIVATE = 0x2000, + NCCF_QUARANTINED = 0x4000, + NCCF_RESERVED = 0x8000, + NCCF_BLUETOOTH_MASK = 0xf0000, + NCCF_LAN_MASK = 0xf00000 +}NETCON_CHARACTERISTIC_FLAGS; + + +typedef enum +{ + NCS_DISCONNECTED = 0, + NCS_CONNECTING = NCS_DISCONNECTED + 1, + NCS_CONNECTED = NCS_CONNECTING + 1, + NCS_DISCONNECTING = NCS_CONNECTED + 1, + NCS_HARDWARE_NOT_PRESENT = NCS_DISCONNECTING + 1, + NCS_HARDWARE_DISABLED = NCS_HARDWARE_NOT_PRESENT + 1, + NCS_HARDWARE_MALFUNCTION = NCS_HARDWARE_DISABLED + 1, + NCS_MEDIA_DISCONNECTED = NCS_HARDWARE_MALFUNCTION + 1, + NCS_AUTHENTICATING = NCS_MEDIA_DISCONNECTED + 1, + NCS_AUTHENTICATION_SUCCEEDED= NCS_AUTHENTICATING + 1, + NCS_AUTHENTICATION_FAILED = NCS_AUTHENTICATION_SUCCEEDED + 1, + NCS_INVALID_ADDRESS = NCS_AUTHENTICATION_FAILED + 1, + NCS_CREDENTIALS_REQUIRED = NCS_INVALID_ADDRESS + 1 +}NETCON_STATUS; + +typedef enum +{ + NCT_DIRECT_CONNECT = 0, + NCT_INBOUND = NCT_DIRECT_CONNECT + 1, + NCT_INTERNET = NCT_INBOUND + 1, + NCT_LAN = NCT_INTERNET + 1, + NCT_PHONE = NCT_LAN + 1, + NCT_TUNNEL = NCT_PHONE + 1, + NCT_BRIDGE = NCT_TUNNEL + 1 +}NETCON_TYPE; + + +typedef enum +{ + NCM_NONE = 0, + NCM_DIRECT = NCM_NONE + 1, + NCM_ISDN = NCM_DIRECT + 1, + NCM_LAN = NCM_ISDN + 1, + NCM_PHONE = NCM_LAN + 1, + NCM_TUNNEL = NCM_PHONE + 1, + NCM_PPPOE = NCM_TUNNEL + 1, + NCM_BRIDGE = NCM_PPPOE + 1, + NCM_SHAREDACCESSHOST_LAN = NCM_BRIDGE + 1, + NCM_SHAREDACCESSHOST_RAS = NCM_SHAREDACCESSHOST_LAN + 1 +}NETCON_MEDIATYPE; + + +typedef struct tagNETCON_PROPERTIES +{ + GUID guidId; + LPWSTR pszwName; + LPWSTR pszwDeviceName; + NETCON_STATUS Status; + NETCON_MEDIATYPE MediaType; + DWORD dwCharacter; + CLSID clsidThisObject; + CLSID clsidUiObject; +}NETCON_PROPERTIES; + + +#undef INTERFACE +#define INTERFACE INetConnection +DECLARE_INTERFACE_(INetConnection, IUnknown) +{ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void **ppv) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + STDMETHOD_(HRESULT,Connect) (THIS) PURE; + STDMETHOD_(HRESULT,Disconnect) (THIS) PURE; + STDMETHOD_(HRESULT,Delete) (THIS) PURE; + STDMETHOD_(HRESULT,Duplicate)(THIS_ LPCWSTR pszwDuplicateName, INetConnection **ppCon) PURE; + STDMETHOD_(HRESULT,GetProperties) (THIS_ NETCON_PROPERTIES **ppProps) PURE; + STDMETHOD_(HRESULT,GetUiObjectClassId) (THIS_ CLSID *pclsid) PURE; + STDMETHOD_(HRESULT,Rename) (THIS_ LPCWSTR pszwNewName) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define INetConnection_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define INetConnection_AddRef(p) (p)->lpVtbl->AddRef(p) +#define INetConnection_Release(p) (p)->lpVtbl->Release(p) +#define INetConnection_Connect(p) (p)->lpVtbl->Connect(p) +#define INetConnection_Disconnect(p) (p)->lpVtbl->Disconnect(p) +#define INetConnection_Delete(p) (p)->lpVtbl->Delete(p) +#define INetConnection_Duplicate(p,a,b) (p)->lpVtbl->Duplicate(p,a,b) +#define INetConnection_GetProperties(p,a) (p)->lpVtbl->GetProperties(p,a) +#define INetConnection_GetUiObjectClassId(p,a) (p)->lpVtbl->GetUiObjectClassId(p,a) +#define INetConnection_Rename(p,a) (p)->lpVtbl->Rename(p,a) +#endif + +EXTERN_C const IID IID_INetConnection; + + +#undef INTERFACE +#define INTERFACE IEnumNetConnection +DECLARE_INTERFACE_(IEnumNetConnection, IUnknown) +{ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + STDMETHOD(Next)(THIS_ ULONG celt, INetConnection **rgelt, ULONG *pceltFetched) PURE; + STDMETHOD(Skip) (THIS_ ULONG celt) PURE; + STDMETHOD(Reset) (THIS) PURE; + STDMETHOD(Clone) (THIS_ IEnumNetConnection **ppenum) PURE; +}; +#undef INTERFACE + +EXTERN_C const IID IID_IEnumNetConnection; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IEnumNetConnection_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IEnumNetConnection_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IEnumNetConnection_Release(p) (p)->lpVtbl->Release(p) +#define IEnumNetConnection_Next(p,a,b,c) (p)->lpVtbl->Next(p,a,b,c) +#define IEnumNetConnection_Skip(p,a) (p)->lpVtbl->Skip(p,a) +#define IEnumNetConnection_Reset(p) (p)->lpVtbl->Reset(p) +#define IEnumNetConnection_Clone(p,a) (p)->lpVtbl->Clone(p,a) +#endif + +#undef INTERFACE +#define INTERFACE INetConnectionManager +DECLARE_INTERFACE_(INetConnectionManager, IUnknown) +{ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void **ppv) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + STDMETHOD_(HRESULT,EnumConnections) (THIS_ NETCONMGR_ENUM_FLAGS Flags, IEnumNetConnection **ppEnum) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define INetConnectionManager_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define INetConnectionManager_AddRef(p) (p)->lpVtbl->AddRef(p) +#define INetConnectionManager_Release(p) (p)->lpVtbl->Release(p) +#define INetConnectionManager_EnumConnections(p,a,b) (p)->lpVtbl->EnumConnections(p,a,b) +#endif + +EXTERN_C const CLSID CLSID_ConnectionManager; +EXTERN_C const IID IID_INetConnectionManager; + +#endif From 5ea699faebc1ccdda3c71fc4de36dec2223fdecb Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Thu, 28 Aug 2008 02:57:10 +0000 Subject: [PATCH 208/324] - Use CoTaskMemAlloc / CoTaskMemFree for memory de-allocation - Implement INetConnectionManager, IEnumNetConnection, INetConnection interface for CLSID_ConnectionManager - Refactor Network Connections Shell Folder enumeration code to use the now available COM functionality svn path=/trunk/; revision=35718 --- reactos/dll/win32/netshell/classfactory.c | 4 +- reactos/dll/win32/netshell/connectmanager.c | 693 ++++++++++++++++++ reactos/dll/win32/netshell/enumlist.c | 40 +- reactos/dll/win32/netshell/netshell.c | 4 + reactos/dll/win32/netshell/netshell.rbuild | 1 + reactos/dll/win32/netshell/precomp.h | 11 +- .../dll/win32/netshell/shfldr_netconnect.c | 180 ++--- 7 files changed, 772 insertions(+), 161 deletions(-) create mode 100644 reactos/dll/win32/netshell/connectmanager.c diff --git a/reactos/dll/win32/netshell/classfactory.c b/reactos/dll/win32/netshell/classfactory.c index 7cd61c62586..6da3a6c1c67 100644 --- a/reactos/dll/win32/netshell/classfactory.c +++ b/reactos/dll/win32/netshell/classfactory.c @@ -54,7 +54,7 @@ IClassFactory_fnRelease( if (!refCount) { - HeapFree(GetProcessHeap(),0,This); + CoTaskMemFree(This); return 0; } return refCount; @@ -110,7 +110,7 @@ IClassFactory_fnConstructor( { IClassFactoryImpl* lpclf; - lpclf = HeapAlloc(GetProcessHeap(),0,sizeof(IClassFactoryImpl)); + lpclf = CoTaskMemAlloc(sizeof(IClassFactoryImpl)); lpclf->ref = 1; lpclf->lpVtbl = &dclfvt; lpclf->lpfnCI = lpfnCI; diff --git a/reactos/dll/win32/netshell/connectmanager.c b/reactos/dll/win32/netshell/connectmanager.c new file mode 100644 index 00000000000..41aecc5c46b --- /dev/null +++ b/reactos/dll/win32/netshell/connectmanager.c @@ -0,0 +1,693 @@ +#include + +typedef struct tagINetConnectionItem +{ + struct tagINetConnectionItem * Next; + NETCON_PROPERTIES Props; +}INetConnectionItem, *PINetConnectionItem; + +typedef struct +{ + const INetConnectionManagerVtbl * lpVtbl; + const IEnumNetConnectionVtbl * lpVtblNetConnection; + LONG ref; + PINetConnectionItem pHead; + PINetConnectionItem pCurrent; + +} INetConnectionManagerImpl, *LPINetConnectionManagerImpl; + +typedef struct +{ + const INetConnectionVtbl * lpVtbl; + LONG ref; + NETCON_PROPERTIES Props; +} INetConnectionImpl, *LPINetConnectionImpl; + + +static LPINetConnectionManagerImpl __inline impl_from_EnumNetConnection(IEnumNetConnection *iface) +{ + return (LPINetConnectionManagerImpl)((char *)iface - FIELD_OFFSET(INetConnectionManagerImpl, lpVtblNetConnection)); +} + + +static +HRESULT +WINAPI +INetConnectionManager_fnQueryInterface( + INetConnectionManager * iface, + REFIID iid, + LPVOID * ppvObj) +{ + INetConnectionManagerImpl * This = (INetConnectionManagerImpl*)iface; + *ppvObj = NULL; + + if (IsEqualIID (iid, &IID_IUnknown) || + IsEqualIID (iid, &IID_INetConnectionManager)) + { + *ppvObj = This; + INetConnectionManager_AddRef(iface); + return S_OK; + } + + return E_NOINTERFACE; +} + +static +ULONG +WINAPI +INetConnectionManager_fnAddRef( + INetConnectionManager * iface) +{ + INetConnectionManagerImpl * This = (INetConnectionManagerImpl*)iface; + ULONG refCount = InterlockedIncrement(&This->ref); + + return refCount; +} + +static +ULONG +WINAPI +INetConnectionManager_fnRelease( + INetConnectionManager * iface) +{ + INetConnectionManagerImpl * This = (INetConnectionManagerImpl*)iface; + ULONG refCount = InterlockedDecrement(&This->ref); + + if (!refCount) + { + CoTaskMemFree (This); + } + return refCount; +} + +static +HRESULT +WINAPI +INetConnectionManager_fnEnumConnections( + INetConnectionManager * iface, + NETCONMGR_ENUM_FLAGS Flags, + IEnumNetConnection **ppEnum) +{ + INetConnectionManagerImpl * This = (INetConnectionManagerImpl*)iface; + + if (!ppEnum) + return E_POINTER; + + if (Flags != NCME_DEFAULT) + return E_FAIL; + + *ppEnum = (IEnumNetConnection *)&This->lpVtblNetConnection; + INetConnectionManager_AddRef(iface); + return S_OK; +} + +static const INetConnectionManagerVtbl vt_NetConnectionManager = +{ + INetConnectionManager_fnQueryInterface, + INetConnectionManager_fnAddRef, + INetConnectionManager_fnRelease, + INetConnectionManager_fnEnumConnections, +}; + +/*************************************************************** + * INetConnection Interface + */ + +static +HRESULT +WINAPI +INetConnection_fnQueryInterface( + INetConnection * iface, + REFIID iid, + LPVOID * ppvObj) +{ + INetConnectionImpl * This = (INetConnectionImpl*)iface; + *ppvObj = NULL; + + if (IsEqualIID (iid, &IID_IUnknown) || + IsEqualIID (iid, &IID_INetConnection)) + { + *ppvObj = This; + INetConnection_AddRef(iface); + return S_OK; + } + + return E_NOINTERFACE; +} + +static +ULONG +WINAPI +INetConnection_fnAddRef( + INetConnection * iface) +{ + INetConnectionImpl * This = (INetConnectionImpl*)iface; + ULONG refCount = InterlockedIncrement(&This->ref); + + return refCount; +} + +static +ULONG +WINAPI +INetConnection_fnRelease( + INetConnection * iface) +{ + INetConnectionImpl * This = (INetConnectionImpl*)iface; + ULONG refCount = InterlockedDecrement(&This->ref); + + if (!refCount) + { + CoTaskMemFree(This->Props.pszwName); + CoTaskMemFree(This->Props.pszwDeviceName); + CoTaskMemFree(This); + } + return refCount; +} + +static +HRESULT +WINAPI +INetConnection_fnConnect( + INetConnection * iface) +{ + return E_NOTIMPL; +} + +static +HRESULT +WINAPI +INetConnection_fnDisconnect( + INetConnection * iface) +{ + return E_NOTIMPL; +} + + +static +HRESULT +WINAPI +INetConnection_fnDelete( + INetConnection * iface) +{ + return E_NOTIMPL; +} + +static +HRESULT +WINAPI +INetConnection_fnDuplicate( + INetConnection * iface, + LPCWSTR pszwDuplicateName, + INetConnection **ppCon) +{ + return E_NOTIMPL; +} + +static +HRESULT +WINAPI +INetConnection_fnGetProperties( + INetConnection * iface, + NETCON_PROPERTIES **ppProps) +{ +#if 0 + NETCON_PROPERTIES * pProperties; +#endif + INetConnectionImpl * This = (INetConnectionImpl*)iface; + + if (!ppProps) + return E_POINTER; + +#if 1 + *ppProps = &This->Props; +#else + pProperties = CoTaskMemAlloc(sizeof(NETCON_PROPERTIES)); + if (!pProperties) + return E_OUTOFMEMORY; + + CopyMemory(pProperties, &This->Props, sizeof(NETCON_PROPERTIES)); + if (This->Props.pszwName) + { + pProperties->pszwName = CoTaskMemAlloc((wcslen(This->Props.pszwName)+1)*sizeof(WCHAR)); + if (pProperties->pszwName) + wcscpy(pProperties->pszwName, This->Props.pszwName); + } + if (This->Props.pszwDeviceName) + { + pProperties->pszwDeviceName = CoTaskMemAlloc((wcslen(This->Props.pszwDeviceName)+1)*sizeof(WCHAR)); + if (pProperties->pszwDeviceName) + wcscpy(pProperties->pszwDeviceName, This->Props.pszwDeviceName); + } + + *ppProps = pProperties; +#endif + return NOERROR; +} + +static +HRESULT +WINAPI +INetConnection_fnGetUiObjectClassId( + INetConnection * iface, + CLSID *pclsid) +{ + return E_NOTIMPL; +} + +static +HRESULT +WINAPI +INetConnection_fnRename( + INetConnection * iface, + LPCWSTR pszwDuplicateName) +{ + return E_NOTIMPL; +} + + +static const INetConnectionVtbl vt_NetConnection = +{ + INetConnection_fnQueryInterface, + INetConnection_fnAddRef, + INetConnection_fnRelease, + INetConnection_fnConnect, + INetConnection_fnDisconnect, + INetConnection_fnDelete, + INetConnection_fnDuplicate, + INetConnection_fnGetProperties, + INetConnection_fnGetUiObjectClassId, + INetConnection_fnRename +}; + +HRESULT WINAPI IConnection_Constructor (INetConnection **ppv, PINetConnectionItem pItem) +{ + INetConnectionImpl *This; + + if (!ppv) + return E_POINTER; + + This = (INetConnectionImpl *) CoTaskMemAlloc(sizeof (INetConnectionImpl)); + if (!This) + return E_OUTOFMEMORY; + + This->ref = 1; + This->lpVtbl = &vt_NetConnection; + + CopyMemory(&This->Props, &pItem->Props, sizeof(NETCON_PROPERTIES)); + + This->Props.pszwName = CoTaskMemAlloc((wcslen(pItem->Props.pszwName)+1)*sizeof(WCHAR)); + if (This->Props.pszwName) + wcscpy(This->Props.pszwName, pItem->Props.pszwName); + + This->Props.pszwDeviceName = CoTaskMemAlloc((wcslen(pItem->Props.pszwDeviceName)+1)*sizeof(WCHAR)); + if (This->Props.pszwDeviceName) + wcscpy(This->Props.pszwDeviceName, pItem->Props.pszwDeviceName); + + *ppv = (INetConnection *)This; + + + return S_OK; +} + + +/*************************************************************** + * IEnumNetConnection Interface + */ + +static +HRESULT +WINAPI +IEnumNetConnection_fnQueryInterface( + IEnumNetConnection * iface, + REFIID iid, + LPVOID * ppvObj) +{ + INetConnectionManagerImpl * This = impl_from_EnumNetConnection(iface); + *ppvObj = NULL; + + if (IsEqualIID (iid, &IID_IUnknown) || + IsEqualIID (iid, &IID_INetConnectionManager)) + { + *ppvObj = This; + INetConnectionManager_AddRef(iface); + return S_OK; + } + + return E_NOINTERFACE; +} + +static +ULONG +WINAPI +IEnumNetConnection_fnAddRef( + IEnumNetConnection * iface) +{ + INetConnectionManagerImpl * This = impl_from_EnumNetConnection(iface); + ULONG refCount = InterlockedIncrement(&This->ref); + + return refCount; +} + +static +ULONG +WINAPI +IEnumNetConnection_fnRelease( + IEnumNetConnection * iface) +{ + INetConnectionManagerImpl * This = impl_from_EnumNetConnection(iface); + ULONG refCount = InterlockedDecrement(&This->ref); + + if (!refCount) + { + CoTaskMemFree (This); + } + return refCount; +} + +static +HRESULT +WINAPI +IEnumNetConnection_fnNext( + IEnumNetConnection * iface, + ULONG celt, + INetConnection **rgelt, + ULONG *pceltFetched) +{ + INetConnectionManagerImpl * This = impl_from_EnumNetConnection(iface); + HRESULT hr; + + if (!pceltFetched || !rgelt) + return E_POINTER; + + if (celt != 1) + return E_FAIL; + + if (!This->pCurrent) + return S_FALSE; + + hr = IConnection_Constructor(rgelt, This->pCurrent); + This->pCurrent = This->pCurrent->Next; + + return hr; +} + +static +HRESULT +WINAPI +IEnumNetConnection_fnSkip( + IEnumNetConnection * iface, + ULONG celt) +{ + INetConnectionManagerImpl * This = impl_from_EnumNetConnection(iface); + + while(This->pCurrent && celt-- > 0) + This->pCurrent = This->pCurrent->Next; + + if (celt) + return S_FALSE; + else + return NOERROR; + +} + +static +HRESULT +WINAPI +IEnumNetConnection_fnReset( + IEnumNetConnection * iface) +{ + INetConnectionManagerImpl * This = impl_from_EnumNetConnection(iface); + + This->pCurrent = This->pHead; + return NOERROR; +} + +static +HRESULT +WINAPI +IEnumNetConnection_fnClone( + IEnumNetConnection * iface, + IEnumNetConnection **ppenum) +{ + return E_NOTIMPL; +} + +static const IEnumNetConnectionVtbl vt_EnumNetConnection = +{ + IEnumNetConnection_fnQueryInterface, + IEnumNetConnection_fnAddRef, + IEnumNetConnection_fnRelease, + IEnumNetConnection_fnNext, + IEnumNetConnection_fnSkip, + IEnumNetConnection_fnReset, + IEnumNetConnection_fnClone +}; + +static +BOOL +GetAdapterIndexFromNetCfgInstanceId(PIP_ADAPTER_INFO pAdapterInfo, LPWSTR szNetCfg, PDWORD pIndex) +{ + WCHAR szBuffer[50]; + IP_ADAPTER_INFO * pCurrentAdapter; + + pCurrentAdapter = pAdapterInfo; + while(pCurrentAdapter) + { + szBuffer[0] = L'\0'; + if (MultiByteToWideChar(CP_ACP, 0, pCurrentAdapter->AdapterName, -1, szBuffer, sizeof(szBuffer)/sizeof(szBuffer[0]))) + { + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + } + if (!wcsicmp(szBuffer, szNetCfg)) + { + *pIndex = pCurrentAdapter->Index; + return TRUE; + } + pCurrentAdapter = pCurrentAdapter->Next; + } + return FALSE; +} + + +static +BOOL +EnumerateINetConnections(INetConnectionManagerImpl *This) +{ + DWORD dwSize, dwResult, dwIndex, dwAdapterIndex, dwShowIcon; + MIB_IFTABLE *pIfTable; + MIB_IFROW IfEntry; + IP_ADAPTER_INFO * pAdapterInfo; + HDEVINFO hInfo; + SP_DEVINFO_DATA DevInfo; + HKEY hSubKey; + WCHAR szNetCfg[50]; + WCHAR szAdapterNetCfg[50]; + WCHAR szDetail[200] = L"SYSTEM\\CurrentControlSet\\Control\\Class\\"; + WCHAR szName[130] = L"SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}\\"; + PINetConnectionItem pNew; + PINetConnectionItem pCurrent = NULL; + + /* get the IfTable */ + dwSize = 0; + if (GetIfTable(NULL, &dwSize, TRUE) != ERROR_INSUFFICIENT_BUFFER) + return FALSE; + + pIfTable = (PMIB_IFTABLE)CoTaskMemAlloc(dwSize); + if (!pIfTable) + return FALSE; + + dwResult = GetIfTable(pIfTable, &dwSize, TRUE); + if (dwResult != NO_ERROR) + { + CoTaskMemFree(pIfTable); + return FALSE; + } + + dwSize = 0; + dwResult = GetAdaptersInfo(NULL, &dwSize); + if (dwResult!= ERROR_BUFFER_OVERFLOW) + { + CoTaskMemFree(pIfTable); + return FALSE; + } + + pAdapterInfo = (PIP_ADAPTER_INFO)CoTaskMemAlloc(dwSize); + if (!pAdapterInfo) + { + CoTaskMemFree(pIfTable); + return FALSE; + } + + if (GetAdaptersInfo(pAdapterInfo, &dwSize) != NO_ERROR) + { + CoTaskMemFree(pIfTable); + CoTaskMemFree(pAdapterInfo); + return FALSE; + } + + + hInfo = SetupDiGetClassDevs(&GUID_DEVCLASS_NET, NULL, NULL, DIGCF_PRESENT ); + if (!hInfo) + { + CoTaskMemFree(pIfTable); + CoTaskMemFree(pAdapterInfo); + return FALSE; + } + + dwIndex = 0; + do + { + ZeroMemory(&DevInfo, sizeof(SP_DEVINFO_DATA)); + DevInfo.cbSize = sizeof(DevInfo); + + /* get device info */ + if (!SetupDiEnumDeviceInfo(hInfo, dwIndex++, &DevInfo)) + break; + + /* get device software registry path */ + if (!SetupDiGetDeviceRegistryPropertyW(hInfo, &DevInfo, SPDRP_DRIVER, NULL, (LPBYTE)&szDetail[39], sizeof(szDetail)/sizeof(WCHAR) - 40, &dwSize)) + break; + + /* open device registry key */ + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szDetail, 0, KEY_READ, &hSubKey) != ERROR_SUCCESS) + break; + + /* query NetCfgInstanceId for current device */ + dwSize = sizeof(szNetCfg); + if (RegQueryValueExW(hSubKey, L"NetCfgInstanceId", NULL, NULL, (LPBYTE)szNetCfg, &dwSize) != ERROR_SUCCESS) + { + RegCloseKey(hSubKey); + break; + } + RegCloseKey(hSubKey); + /* get the current adapter index from NetCfgInstanceId */ + if (!GetAdapterIndexFromNetCfgInstanceId(pAdapterInfo, szNetCfg, &dwAdapterIndex)) + break; + + /* get detailed adapter info */ + ZeroMemory(&IfEntry, sizeof(IfEntry)); + IfEntry.dwIndex = dwAdapterIndex; + if(GetIfEntry(&IfEntry) != NO_ERROR) + break; + + /* allocate new INetConnectionItem */ + pNew = CoTaskMemAlloc(sizeof(INetConnectionItem)); + if (!pNew) + break; + + ZeroMemory(pNew, sizeof(INetConnectionItem)); + + /* store NetCfgInstanceId */ + CLSIDFromString(szNetCfg, &pNew->Props.guidId); + switch(IfEntry.dwOperStatus) + { + case MIB_IF_OPER_STATUS_NON_OPERATIONAL: + pNew->Props.Status = NCS_HARDWARE_DISABLED; + break; + case MIB_IF_OPER_STATUS_UNREACHABLE: + pNew->Props.Status = NCS_DISCONNECTED; + break; + case MIB_IF_OPER_STATUS_DISCONNECTED: + pNew->Props.Status = NCS_MEDIA_DISCONNECTED; + break; + case MIB_IF_OPER_STATUS_CONNECTING: + pNew->Props.Status = NCS_CONNECTING; + break; + case MIB_IF_OPER_STATUS_CONNECTED: + pNew->Props.Status = NCS_CONNECTED; + break; + case MIB_IF_OPER_STATUS_OPERATIONAL: + pNew->Props.Status = NCS_CONNECTED; + break; + default: + break; + } + + switch(IfEntry.dwType) + { + case IF_TYPE_ETHERNET_CSMACD: + pNew->Props.MediaType = NCM_LAN; + break; + case IF_TYPE_IEEE80211: + pNew->Props.MediaType = NCM_SHAREDACCESSHOST_RAS; + break; + default: + break; + } + /* open network connections details */ + wcscpy(&szName[80], szNetCfg); + wcscpy(&szName[118], L"\\Connection"); + + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szName, 0, KEY_READ, &hSubKey) == ERROR_SUCCESS) + { + /* retrieve name of connection */ + dwSize = sizeof(szAdapterNetCfg); + if (RegQueryValueExW(hSubKey, L"Name", NULL, NULL, (LPBYTE)szAdapterNetCfg, &dwSize) == ERROR_SUCCESS) + { + pNew->Props.pszwName = CoTaskMemAlloc((wcslen(szAdapterNetCfg)+1) * sizeof(WCHAR)); + if (pNew->Props.pszwName) + wcscpy(pNew->Props.pszwName, szAdapterNetCfg); + } + dwSize = sizeof(dwShowIcon); + if (RegQueryValueExW(hSubKey, L"ShowIcon", NULL, NULL, (LPBYTE)&dwShowIcon, &dwSize) == ERROR_SUCCESS) + { + if (dwShowIcon) + pNew->Props.dwCharacter |= NCCF_SHOW_ICON; + } + RegCloseKey(hSubKey); + } + if (SetupDiGetDeviceRegistryPropertyW(hInfo, &DevInfo, SPDRP_DEVICEDESC, NULL, (PBYTE)szNetCfg, sizeof(szNetCfg)/sizeof(WCHAR), &dwSize)) + { + szNetCfg[(sizeof(szNetCfg)/sizeof(WCHAR))-1] = L'\0'; + pNew->Props.pszwDeviceName = CoTaskMemAlloc((wcslen(szNetCfg)+1) * sizeof(WCHAR)); + if (pNew->Props.pszwDeviceName) + wcscpy(pNew->Props.pszwDeviceName, szNetCfg); + } + + if (pCurrent) + pCurrent->Next = pNew; + else + This->pHead = pNew; + + pCurrent = pNew; + }while(TRUE); + + CoTaskMemFree(pIfTable); + CoTaskMemFree(pAdapterInfo); + SetupDiDestroyDeviceInfoList(hInfo); + + This->pCurrent = This->pHead; + return TRUE; +} + +HRESULT WINAPI INetConnectionManager_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) +{ + INetConnectionManagerImpl *sf; + + if (!ppv) + return E_POINTER; + if (pUnkOuter) + return CLASS_E_NOAGGREGATION; + + sf = (INetConnectionManagerImpl *) CoTaskMemAlloc(sizeof (INetConnectionManagerImpl)); + if (!sf) + return E_OUTOFMEMORY; + + sf->ref = 1; + sf->lpVtbl = &vt_NetConnectionManager; + sf->lpVtblNetConnection = &vt_EnumNetConnection; + + + if (!SUCCEEDED (INetConnectionManager_QueryInterface ((INetConnectionManager*)sf, riid, ppv))) + { + INetConnectionManager_Release((INetConnectionManager*)sf); + return E_NOINTERFACE; + } + + INetConnectionManager_Release((INetConnectionManager*)sf); + EnumerateINetConnections(sf); + return S_OK; +} + + diff --git a/reactos/dll/win32/netshell/enumlist.c b/reactos/dll/win32/netshell/enumlist.c index 814ea42e662..aacc4a87fdf 100644 --- a/reactos/dll/win32/netshell/enumlist.c +++ b/reactos/dll/win32/netshell/enumlist.c @@ -129,7 +129,7 @@ WINAPI IEnumIDList_fnRelease( SHFree(pDelete->pidl); SHFree(pDelete); } - HeapFree(GetProcessHeap(),0,This); + CoTaskMemFree(This); } return refCount; } @@ -242,13 +242,15 @@ static const IEnumIDListVtbl eidlvt = IEnumIDList * IEnumIDList_Constructor(void) { - IEnumIDListImpl *lpeidl = HeapAlloc(GetProcessHeap(), - HEAP_ZERO_MEMORY, sizeof(IEnumIDListImpl)); + IEnumIDListImpl *lpeidl = CoTaskMemAlloc(sizeof(IEnumIDListImpl)); if (lpeidl) { lpeidl->ref = 1; lpeidl->lpVtbl = &eidlvt; + lpeidl->mpCurrent = NULL; + lpeidl->mpLast = NULL; + lpeidl->mpFirst = NULL; } return (IEnumIDList*)lpeidl; @@ -322,34 +324,24 @@ BOOL _ILIsNetConnect(LPCITEMIDLIST pidl) return FALSE; } -LPITEMIDLIST ILCreateNetConnectItem(MIB_IFROW * pRow, LPWSTR szName, LPWSTR szAdapterName) +LPITEMIDLIST ILCreateNetConnectItem(INetConnection * pItem) { - PIDLDATA tmp; LPITEMIDLIST pidl; - VALUEStruct * p; - int size = sizeof(struct tagVALUEStruct); + LPPIDLDATA pdata; + int size = sizeof(PIDLDATA); - tmp.type = 0x00; - tmp.u.value.dummy = 0xFF; - - tmp.u.value.dwOperStatus = pRow->dwOperStatus; - tmp.u.value.dwType = pRow->dwType; - tmp.u.value.dwNameLength = wcslen(szName) + 1; - - size += (tmp.u.value.dwNameLength + wcslen(szAdapterName)) * sizeof(WCHAR); - - pidl = (LPITEMIDLIST)SHAlloc(size + 4); + pidl = (LPITEMIDLIST)SHAlloc(size + 2 * sizeof(SHITEMID)); if (!pidl) return pidl; + ZeroMemory(pidl, size + 2 * sizeof(SHITEMID)); - pidl->mkid.cb = size+2; - memcpy(pidl->mkid.abID, &tmp, 2+sizeof(struct tagVALUEStruct)); + pidl->mkid.cb = size + sizeof(SHITEMID); - p = &((PIDLDATA*)pidl->mkid.abID)->u.value; - wcscpy(&p->szName[0], szName); - wcscpy(p->szName + tmp.u.value.dwNameLength, szAdapterName); + pdata = _ILGetDataPointer(pidl); + pdata->type = 0x99; + pdata->u.value.dummy = 0xFF; + pdata->u.value.pItem = (PVOID)pItem; - *(WORD*)((char*)pidl+(size+2)) = 0; return pidl; } @@ -357,7 +349,7 @@ VALUEStruct * _ILGetValueStruct(LPCITEMIDLIST pidl) { LPPIDLDATA pdata = _ILGetDataPointer(pidl); - if (pdata && pdata->type==0x00) + if (pdata && pdata->type==0x99) return (VALUEStruct*)&(pdata->u.value); return NULL; diff --git a/reactos/dll/win32/netshell/netshell.c b/reactos/dll/win32/netshell/netshell.c index 783f6d90c95..0bf1a6e455a 100644 --- a/reactos/dll/win32/netshell/netshell.c +++ b/reactos/dll/win32/netshell/netshell.c @@ -12,6 +12,10 @@ static INTERFACE_TABLE InterfaceTable[] = &CLSID_NetworkConnections, ISF_NetConnect_Constructor }, + { + &CLSID_ConnectionManager, + INetConnectionManager_Constructor + }, { NULL, NULL diff --git a/reactos/dll/win32/netshell/netshell.rbuild b/reactos/dll/win32/netshell/netshell.rbuild index eaa97952d6f..1c1cd4de95e 100644 --- a/reactos/dll/win32/netshell/netshell.rbuild +++ b/reactos/dll/win32/netshell/netshell.rbuild @@ -23,5 +23,6 @@ enumlist.c netshell.rc classfactory.c + connectmanager.c netshell.spec diff --git a/reactos/dll/win32/netshell/precomp.h b/reactos/dll/win32/netshell/precomp.h index 07870a6c112..2d0a14355b3 100644 --- a/reactos/dll/win32/netshell/precomp.h +++ b/reactos/dll/win32/netshell/precomp.h @@ -32,6 +32,7 @@ #include #include #include +#include #include "wine/debug.h" #include "wine/unicode.h" @@ -53,10 +54,7 @@ typedef struct { typedef struct tagVALUEStruct { BYTE dummy; - DWORD dwType; - DWORD dwOperStatus; - DWORD dwNameLength; - WCHAR szName[1]; + INetConnection * pItem; }VALUEStruct; /* globals */ @@ -71,7 +69,7 @@ HRESULT WINAPI ISF_NetConnect_Constructor (IUnknown * pUnkOuter, REFIID riid, LP /* enumlist.c */ IEnumIDList * IEnumIDList_Constructor(void); LPITEMIDLIST _ILCreateNetConnect(); -LPITEMIDLIST ILCreateNetConnectItem(MIB_IFROW * pRow, LPWSTR szName, LPWSTR szAdapterName); +LPITEMIDLIST ILCreateNetConnectItem(INetConnection * pItem); BOOL _ILIsNetConnect (LPCITEMIDLIST pidl); BOOL AddToEnumList(IEnumIDList * iface, LPITEMIDLIST pidl); VALUEStruct * _ILGetValueStruct(LPCITEMIDLIST pidl); @@ -79,4 +77,7 @@ VALUEStruct * _ILGetValueStruct(LPCITEMIDLIST pidl); /* classfactory.c */ IClassFactory * IClassFactory_fnConstructor(LPFNCREATEINSTANCE lpfnCI, PLONG pcRefDll, REFIID riidInst); +/* connectmanager.c */ +HRESULT WINAPI INetConnectionManager_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); + #endif diff --git a/reactos/dll/win32/netshell/shfldr_netconnect.c b/reactos/dll/win32/netshell/shfldr_netconnect.c index 6b9e8a1fb0d..36a43ae60c9 100644 --- a/reactos/dll/win32/netshell/shfldr_netconnect.c +++ b/reactos/dll/win32/netshell/shfldr_netconnect.c @@ -117,7 +117,7 @@ static ULONG WINAPI ISF_NetConnect_fnRelease (IShellFolder2 * iface) if (!refCount) { SHFree (This->pidlRoot); - HeapFree (GetProcessHeap(), 0, This); + CoTaskMemFree(This); } return refCount; } @@ -145,140 +145,46 @@ static HRESULT WINAPI ISF_NetConnect_fnParseDisplayName (IShellFolder2 * iface, */ static BOOL CreateNetConnectEnumList(IEnumIDList *list, DWORD dwFlags) { - DWORD dwSize, dwResult, dwIndex; - MIB_IFTABLE *pIfTable; - MIB_IFROW IfEntry; - IP_ADAPTER_INFO * pAdapterInfo, *pCurrentAdapter; - HDEVINFO hInfo; - SP_DEVINFO_DATA DevInfo; - HKEY hSubKey; - WCHAR szNetCfg[50]; - WCHAR szAdapterNetCfg[50]; + HRESULT hr; + INetConnectionManager * INetConMan; + IEnumNetConnection * IEnumCon; + INetConnection * INetCon; + ULONG Count; LPITEMIDLIST pidl; - WCHAR szDetail[200] = L"SYSTEM\\CurrentControlSet\\Control\\Class\\"; - WCHAR szName[130] = L"SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}\\"; - /* get the IfTable */ - dwSize = 0; - if (GetIfTable(NULL, &dwSize, TRUE) != ERROR_INSUFFICIENT_BUFFER) + /* get an instance to of IConnectionManager */ + hr = INetConnectionManager_Constructor(NULL, &IID_INetConnectionManager, (LPVOID*)&INetConMan); + if (FAILED(hr)) return FALSE; - pIfTable = (PMIB_IFTABLE)HeapAlloc(GetProcessHeap(), 0, dwSize); - if (!pIfTable) - return FALSE; - - dwResult = GetIfTable(pIfTable, &dwSize, TRUE); - if (dwResult != NO_ERROR) + hr = INetConnectionManager_EnumConnections(INetConMan, NCME_DEFAULT, &IEnumCon); + if (FAILED(hr)) { - HeapFree(GetProcessHeap(), 0, pIfTable); + INetConnectionManager_Release(INetConMan); return FALSE; } - dwSize = 0; - dwResult = GetAdaptersInfo(NULL, &dwSize); - if (dwResult!= ERROR_BUFFER_OVERFLOW) - { - HeapFree(GetProcessHeap(), 0, pIfTable); - return FALSE; - } - - pAdapterInfo = (PIP_ADAPTER_INFO)HeapAlloc(GetProcessHeap(), 0, dwSize); - if (!pAdapterInfo) - { - HeapFree(GetProcessHeap(), 0, pIfTable); - return FALSE; - } - - if (GetAdaptersInfo(pAdapterInfo, &dwSize) != NO_ERROR) - { - HeapFree(GetProcessHeap(), 0, pIfTable); - HeapFree(GetProcessHeap(), 0, pAdapterInfo); - return FALSE; - } - - - hInfo = SetupDiGetClassDevs(&GUID_DEVCLASS_NET, NULL, NULL, DIGCF_PRESENT ); - if (!hInfo) - { - HeapFree(GetProcessHeap(), 0, pIfTable); - HeapFree(GetProcessHeap(), 0, pAdapterInfo); - return FALSE; - } - - dwIndex = 0; do { - ZeroMemory(&DevInfo, sizeof(SP_DEVINFO_DATA)); - DevInfo.cbSize = sizeof(DevInfo); - if (SetupDiEnumDeviceInfo(hInfo, dwIndex++, &DevInfo)) + hr = IEnumNetConnection_Next(IEnumCon, 1, &INetCon, &Count); + if (hr == S_OK) { - if (SetupDiGetDeviceRegistryPropertyW(hInfo, &DevInfo, SPDRP_DRIVER, NULL, (LPBYTE)&szDetail[39], sizeof(szDetail)/sizeof(WCHAR) - 40, &dwSize)) + pidl = ILCreateNetConnectItem(INetCon); + if (pidl) { - if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szDetail, 0, KEY_READ, &hSubKey) == ERROR_SUCCESS) - { - dwSize = sizeof(szNetCfg); - dwResult = RegQueryValueExW(hSubKey, L"NetCfgInstanceId", NULL, NULL, (LPBYTE)szNetCfg, &dwSize); - if (dwResult == ERROR_SUCCESS) - { - pCurrentAdapter = pAdapterInfo; - while(pCurrentAdapter) - { - szAdapterNetCfg[0] = L'\0'; - if (MultiByteToWideChar(CP_ACP, 0, pCurrentAdapter->AdapterName, -1, szAdapterNetCfg, sizeof(szAdapterNetCfg)/sizeof(szAdapterNetCfg[0]))) - { - szAdapterNetCfg[(sizeof(szAdapterNetCfg)/sizeof(WCHAR))-1] = L'\0'; - } - if (!wcsicmp(szAdapterNetCfg, szNetCfg)) - { - ZeroMemory(&IfEntry, sizeof(IfEntry)); - IfEntry.dwIndex = pCurrentAdapter->Index; - dwResult = GetIfEntry(&IfEntry); - if (dwResult == NO_ERROR) - { - if (IfEntry.dwType == IF_TYPE_ETHERNET_CSMACD || IfEntry.dwType == IF_TYPE_IEEE80211) - { - wcscpy(&szName[80], szNetCfg); - wcscpy(&szName[118], L"\\Connection"); - if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szName, 0, KEY_READ, &hSubKey) == ERROR_SUCCESS) - { - dwSize = sizeof(szAdapterNetCfg); - if (RegQueryValueExW(hSubKey, L"Name", NULL, NULL, (LPBYTE)szAdapterNetCfg, &dwSize) != ERROR_SUCCESS) - { - if (!SetupDiGetDeviceRegistryPropertyW(hInfo, &DevInfo, SPDRP_FRIENDLYNAME, NULL, (PBYTE)szAdapterNetCfg, sizeof(szAdapterNetCfg)/sizeof(WCHAR), &dwSize)) - { - szDetail[0] = 0; - } - } - RegCloseKey(hSubKey); - } - szNetCfg[0] = 0; - SetupDiGetDeviceRegistryPropertyW(hInfo, &DevInfo, SPDRP_DEVICEDESC, NULL, (PBYTE)szNetCfg, sizeof(szNetCfg)/sizeof(WCHAR), &dwSize); - pidl = ILCreateNetConnectItem(&IfEntry, szAdapterNetCfg, szNetCfg); - if (pidl) - { - AddToEnumList(list, pidl); - } - } - } - break; - } - pCurrentAdapter = pCurrentAdapter->Next; - } - } - } + AddToEnumList(list, pidl); } - }else if (GetLastError() == ERROR_NO_MORE_ITEMS) + } + else { break; } }while(TRUE); - HeapFree(GetProcessHeap(), 0, pAdapterInfo); - HeapFree(GetProcessHeap(), 0, pIfTable); - SetupDiDestroyDeviceInfoList(hInfo); - - return FALSE; + IEnumNetConnection_Release(IEnumCon); + INetConnectionManager_Release(INetConMan); + return TRUE; } /************************************************************************** @@ -450,6 +356,8 @@ static HRESULT WINAPI ISF_NetConnect_fnGetDisplayNameOf (IShellFolder2 * iface, { LPWSTR pszName; HRESULT hr = E_FAIL; + NETCON_PROPERTIES * pProperties; + VALUEStruct * val; //IGenericSFImpl *This = (IGenericSFImpl *)iface; if (!strRet) @@ -469,11 +377,18 @@ static HRESULT WINAPI ISF_NetConnect_fnGetDisplayNameOf (IShellFolder2 * iface, } else { - VALUEStruct * val = _ILGetValueStruct(pidl); + val = _ILGetValueStruct(pidl); if (val) { - wcscpy(pszName, val->szName); - hr = S_OK; + if (INetConnection_GetProperties((INetConnection*)val->pItem, &pProperties) == NOERROR) + { + if (pProperties->pszwName) + { + wcscpy(pszName, pProperties->pszwName); + hr = S_OK; + } + //NcFreeNetconProperties(pProperties); + } } } @@ -567,6 +482,7 @@ static HRESULT WINAPI ISF_NetConnect_fnGetDetailsOf (IShellFolder2 * iface, WCHAR buffer[MAX_PATH] = {0}; HRESULT hr = E_FAIL; VALUEStruct * val; + NETCON_PROPERTIES * pProperties; if (iColumn >= NETCONNECTSHELLVIEWCOLUMNS) return E_FAIL; @@ -592,10 +508,14 @@ static HRESULT WINAPI ISF_NetConnect_fnGetDetailsOf (IShellFolder2 * iface, if (!val) return E_FAIL; + if (INetConnection_GetProperties((INetConnection*)val->pItem, &pProperties) != NOERROR) + return E_FAIL; + + switch(iColumn) { case COLUMN_TYPE: - if (val->dwType == IF_TYPE_ETHERNET_CSMACD || val->dwType == IF_TYPE_IEEE80211) + if (pProperties->MediaType == NCM_LAN || pProperties->MediaType == NCM_SHAREDACCESSHOST_RAS) { if (LoadStringW(netshell_hInstance, IDS_TYPE_ETHERNET, buffer, MAX_PATH)) { @@ -606,18 +526,16 @@ static HRESULT WINAPI ISF_NetConnect_fnGetDetailsOf (IShellFolder2 * iface, break; case COLUMN_STATUS: buffer[0] = L'\0'; - if (val->dwOperStatus == MIB_IF_OPER_STATUS_NON_OPERATIONAL) + if (pProperties->Status == NCS_HARDWARE_DISABLED) LoadStringW(netshell_hInstance, IDS_STATUS_NON_OPERATIONAL, buffer, MAX_PATH); - else if (val->dwOperStatus == MIB_IF_OPER_STATUS_UNREACHABLE) + else if (pProperties->Status == NCS_DISCONNECTED) LoadStringW(netshell_hInstance, IDS_STATUS_UNREACHABLE, buffer, MAX_PATH); - else if (val->dwOperStatus == MIB_IF_OPER_STATUS_DISCONNECTED) + else if (pProperties->Status == NCS_MEDIA_DISCONNECTED) LoadStringW(netshell_hInstance, IDS_STATUS_DISCONNECTED, buffer, MAX_PATH); - else if (val->dwOperStatus == MIB_IF_OPER_STATUS_CONNECTING) + else if (pProperties->Status == NCS_CONNECTING) LoadStringW(netshell_hInstance, IDS_STATUS_CONNECTING, buffer, MAX_PATH); - else if (val->dwOperStatus == MIB_IF_OPER_STATUS_CONNECTED) + else if (pProperties->Status == NCS_CONNECTED) LoadStringW(netshell_hInstance, IDS_STATUS_CONNECTED, buffer, MAX_PATH); - else if (val->dwOperStatus == MIB_IF_OPER_STATUS_OPERATIONAL) - LoadStringW(netshell_hInstance, IDS_STATUS_OPERATIONAL, buffer, MAX_PATH); if (buffer[0]) { @@ -627,7 +545,7 @@ static HRESULT WINAPI ISF_NetConnect_fnGetDetailsOf (IShellFolder2 * iface, } break; case COLUMN_DEVNAME: - wcscpy(buffer, val->szName + val->dwNameLength); + wcscpy(buffer, pProperties->pszwDeviceName); buffer[MAX_PATH-1] = L'\0'; psd->str.uType = STRRET_WSTR; hr = SHStrDupW(buffer, &psd->str.u.pOleStr); @@ -638,7 +556,9 @@ static HRESULT WINAPI ISF_NetConnect_fnGetDetailsOf (IShellFolder2 * iface, psd->str.uType = STRRET_CSTR; break; } - +#if 0 + NcFreeNetconProperties(pProperties); +#endif return hr; } @@ -885,7 +805,7 @@ HRESULT WINAPI ISF_NetConnect_Constructor (IUnknown * pUnkOuter, REFIID riid, LP if (pUnkOuter) return CLASS_E_NOAGGREGATION; - sf = (IGenericSFImpl *) HeapAlloc ( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof (IGenericSFImpl)); + sf = (IGenericSFImpl *) CoTaskMemAlloc(sizeof (IGenericSFImpl)); if (!sf) return E_OUTOFMEMORY; From f5852bccf9fc3c9475c07117d7fc07eeec1148fd Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Thu, 28 Aug 2008 03:52:51 +0000 Subject: [PATCH 209/324] - Add Items to Connection ShellFolder Item Context Menu - Are not yet handled svn path=/trunk/; revision=35719 --- reactos/dll/win32/netshell/lang/de-DE.rc | 8 ++ reactos/dll/win32/netshell/lang/en-US.rc | 8 ++ reactos/dll/win32/netshell/resource.h | 9 ++ .../dll/win32/netshell/shfldr_netconnect.c | 95 ++++++++++++++++++- 4 files changed, 116 insertions(+), 4 deletions(-) diff --git a/reactos/dll/win32/netshell/lang/de-DE.rc b/reactos/dll/win32/netshell/lang/de-DE.rc index d3273c9c3c9..4900a1add15 100644 --- a/reactos/dll/win32/netshell/lang/de-DE.rc +++ b/reactos/dll/win32/netshell/lang/de-DE.rc @@ -18,4 +18,12 @@ BEGIN IDS_STATUS_CONNECTED "Verbindung hergestellt" IDS_STATUS_OPERATIONAL "Verbindung hergestellt" + IDS_NET_ACTIVATE "Aktivieren" + IDS_NET_DEACTIVATE "Deaktivieren" + IDS_NET_STATUS "Status" + IDS_NET_REPAIR "Reparieren" + IDS_NET_CREATELINK "Verknьpfung erstellen" + IDS_NET_DELETE "Lцschen" + IDS_NET_RENAME "Umbenennen" + IDS_NET_PROPERTIES "Eigenschaften" END diff --git a/reactos/dll/win32/netshell/lang/en-US.rc b/reactos/dll/win32/netshell/lang/en-US.rc index 61743df8f99..89a2256e3dd 100644 --- a/reactos/dll/win32/netshell/lang/en-US.rc +++ b/reactos/dll/win32/netshell/lang/en-US.rc @@ -16,5 +16,13 @@ BEGIN IDS_STATUS_CONNECTING "Acquiring network address" IDS_STATUS_CONNECTED "Connected" IDS_STATUS_OPERATIONAL "Connected" + + IDS_NET_ACTIVATE "Enable" + IDS_NET_DEACTIVATE "Disable" + IDS_NET_STATUS "Status" + IDS_NET_REPAIR "Repair" + IDS_NET_CREATELINK "Create Shortcut" + IDS_NET_DELETE "Delete" + IDS_NET_PROPERTIES "Properties" END diff --git a/reactos/dll/win32/netshell/resource.h b/reactos/dll/win32/netshell/resource.h index 79181a9a88e..9c11a18000e 100644 --- a/reactos/dll/win32/netshell/resource.h +++ b/reactos/dll/win32/netshell/resource.h @@ -29,3 +29,12 @@ #define IDS_STATUS_CONNECTING 10011 #define IDS_STATUS_CONNECTED 10012 #define IDS_STATUS_OPERATIONAL 10013 + +#define IDS_NET_ACTIVATE 10100 +#define IDS_NET_DEACTIVATE 10101 +#define IDS_NET_STATUS 10102 +#define IDS_NET_REPAIR 10103 +#define IDS_NET_CREATELINK 10104 +#define IDS_NET_DELETE 10105 +#define IDS_NET_RENAME 10106 +#define IDS_NET_PROPERTIES 10107 diff --git a/reactos/dll/win32/netshell/shfldr_netconnect.c b/reactos/dll/win32/netshell/shfldr_netconnect.c index 36a43ae60c9..7d1e334f9d6 100644 --- a/reactos/dll/win32/netshell/shfldr_netconnect.c +++ b/reactos/dll/win32/netshell/shfldr_netconnect.c @@ -380,7 +380,7 @@ static HRESULT WINAPI ISF_NetConnect_fnGetDisplayNameOf (IShellFolder2 * iface, val = _ILGetValueStruct(pidl); if (val) { - if (INetConnection_GetProperties((INetConnection*)val->pItem, &pProperties) == NOERROR) + if (INetConnection_GetProperties(val->pItem, &pProperties) == NOERROR) { if (pProperties->pszwName) { @@ -628,6 +628,51 @@ static ULONG WINAPI ISF_NetConnect_IContextMenu2_Release(IContextMenu2 * iface) return IShellFolder2_Release((IShellFolder2*)This); } +void WINAPI _InsertMenuItemW ( + HMENU hmenu, + UINT indexMenu, + BOOL fByPosition, + UINT wID, + UINT fType, + LPCWSTR dwTypeData, + UINT fState) +{ + MENUITEMINFOW mii; + WCHAR szText[100]; + + ZeroMemory(&mii, sizeof(mii)); + mii.cbSize = sizeof(mii); + if (fType == MFT_SEPARATOR) + { + mii.fMask = MIIM_ID | MIIM_TYPE; + } + else if (fType == MFT_STRING) + { + mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE; + if ((ULONG_PTR)HIWORD((ULONG_PTR)dwTypeData) == 0) + { + if (LoadStringW(netshell_hInstance, LOWORD((ULONG_PTR)dwTypeData), szText, sizeof(szText)/sizeof(WCHAR))) + { + szText[(sizeof(szText)/sizeof(WCHAR))-1] = 0; + mii.dwTypeData = szText; + } + else + { + return; + } + } + else + { + mii.dwTypeData = (LPWSTR) dwTypeData; + } + mii.fState = fState; + } + + mii.wID = wID; + mii.fType = fType; + InsertMenuItemW( hmenu, indexMenu, fByPosition, &mii); +} + /************************************************************************** * ISF_NetConnect_IContextMenu_QueryContextMenu() */ @@ -639,10 +684,52 @@ static HRESULT WINAPI ISF_NetConnect_IContextMenu2_QueryContextMenu( UINT idCmdLast, UINT uFlags) { - int Count = 1; - //IGenericSFImpl * This = impl_from_IContextMenu2(iface); + IGenericSFImpl * This = impl_from_IContextMenu2(iface); + VALUEStruct * val; + NETCON_PROPERTIES * pProperties; - return MAKE_HRESULT(SEVERITY_SUCCESS, 0, Count); + val = _ILGetValueStruct(This->apidl); + if (!val) + return E_FAIL; + + if (INetConnection_GetProperties((INetConnection*)val->pItem, &pProperties) != NOERROR) + return E_FAIL; + + if (pProperties->Status == NCS_HARDWARE_DISABLED) + _InsertMenuItemW(hMenu, indexMenu++, TRUE, IDS_NET_ACTIVATE, MFT_STRING, MAKEINTRESOURCEW(IDS_NET_ACTIVATE), MFS_DEFAULT); + else + _InsertMenuItemW(hMenu, indexMenu++, TRUE, IDS_NET_DEACTIVATE, MFT_STRING, MAKEINTRESOURCEW(IDS_NET_DEACTIVATE), MFS_ENABLED); + + if (pProperties->Status == NCS_HARDWARE_DISABLED || pProperties->Status == NCS_MEDIA_DISCONNECTED || pProperties->Status == NCS_DISCONNECTED) + _InsertMenuItemW(hMenu, indexMenu++, TRUE, IDS_NET_STATUS, MFT_STRING, MAKEINTRESOURCEW(IDS_NET_STATUS), MFS_GRAYED); + else if (pProperties->Status == NCS_CONNECTED) + _InsertMenuItemW(hMenu, indexMenu++, TRUE, IDS_NET_STATUS, MFT_STRING, MAKEINTRESOURCEW(IDS_NET_STATUS), MFS_DEFAULT); + else + _InsertMenuItemW(hMenu, indexMenu++, TRUE, IDS_NET_STATUS, MFT_STRING, MAKEINTRESOURCEW(IDS_NET_STATUS), MFS_ENABLED); + + if (pProperties->Status == NCS_HARDWARE_DISABLED || pProperties->Status == NCS_MEDIA_DISCONNECTED) + _InsertMenuItemW(hMenu, indexMenu++, TRUE, IDS_NET_REPAIR, MFT_STRING, MAKEINTRESOURCEW(IDS_NET_REPAIR), MFS_GRAYED); + else + _InsertMenuItemW(hMenu, indexMenu++, TRUE, IDS_NET_REPAIR, MFT_STRING, MAKEINTRESOURCEW(IDS_NET_REPAIR), MFS_ENABLED); + + _InsertMenuItemW(hMenu, indexMenu++, TRUE, -1, MFT_SEPARATOR, NULL, MFS_ENABLED); + _InsertMenuItemW(hMenu, indexMenu++, TRUE, IDS_NET_CREATELINK, MFT_STRING, MAKEINTRESOURCEW(IDS_NET_CREATELINK), MFS_ENABLED); + + if (pProperties->dwCharacter & NCCF_ALLOW_REMOVAL) + _InsertMenuItemW(hMenu, indexMenu++, TRUE, IDS_NET_DELETE, MFT_STRING, MAKEINTRESOURCEW(IDS_NET_DELETE), MFS_ENABLED); + else + _InsertMenuItemW(hMenu, indexMenu++, TRUE, IDS_NET_DELETE, MFT_STRING, MAKEINTRESOURCEW(IDS_NET_DELETE), MFS_GRAYED); + + if (pProperties->dwCharacter & NCCF_ALLOW_RENAME) + _InsertMenuItemW(hMenu, indexMenu++, TRUE, IDS_NET_RENAME, MFT_STRING, MAKEINTRESOURCEW(IDS_NET_RENAME), MFS_ENABLED); + else + _InsertMenuItemW(hMenu, indexMenu++, TRUE, IDS_NET_RENAME, MFT_STRING, MAKEINTRESOURCEW(IDS_NET_RENAME), MFS_GRAYED); + + _InsertMenuItemW(hMenu, indexMenu++, TRUE, -1, MFT_SEPARATOR, NULL, MFS_ENABLED); + _InsertMenuItemW(hMenu, indexMenu++, TRUE, IDS_NET_PROPERTIES, MFT_STRING, MAKEINTRESOURCEW(IDS_NET_PROPERTIES), MFS_ENABLED); + + + return MAKE_HRESULT(SEVERITY_SUCCESS, 0, 9); } From 65fd9f9e941864ae2a3b2c50aae168ef3fbbf35d Mon Sep 17 00:00:00 2001 From: Dmitry Chapyshev Date: Thu, 28 Aug 2008 05:32:31 +0000 Subject: [PATCH 210/324] - Add Russian translation svn path=/trunk/; revision=35721 --- reactos/dll/win32/netshell/lang/ru-RU.rc | 28 ++++++++++++++++++++++++ reactos/dll/win32/netshell/netshell.rc | 1 + 2 files changed, 29 insertions(+) create mode 100644 reactos/dll/win32/netshell/lang/ru-RU.rc diff --git a/reactos/dll/win32/netshell/lang/ru-RU.rc b/reactos/dll/win32/netshell/lang/ru-RU.rc new file mode 100644 index 00000000000..510bccccfa4 --- /dev/null +++ b/reactos/dll/win32/netshell/lang/ru-RU.rc @@ -0,0 +1,28 @@ +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT + +STRINGTABLE DISCARDABLE +BEGIN + IDS_NETWORKCONNECTION "Сетевые подключения" + IDS_SHV_COLUMN_NAME "Имя" + IDS_SHV_COLUMN_TYPE "Тип" + IDS_SHV_COLUMN_STATE "Состояние" + IDS_SHV_COLUMN_DEVNAME "Имя устройства" + IDS_SHV_COLUMN_PHONE "Номер телефона или адрес узла" + IDS_SHV_COLUMN_OWNER "Владелец" + IDS_TYPE_ETHERNET "ЛВС или высокоскоростной Интернет" + IDS_STATUS_NON_OPERATIONAL "Отключено" + IDS_STATUS_UNREACHABLE "Отключено" + IDS_STATUS_DISCONNECTED "Сетевой кабель не подключен" + IDS_STATUS_CONNECTING "Получение сетевого адреса" + IDS_STATUS_CONNECTED "Подключено" + IDS_STATUS_OPERATIONAL "Подключено" + + IDS_NET_ACTIVATE "Включить" + IDS_NET_DEACTIVATE "Отключить" + IDS_NET_STATUS "Состояние" + IDS_NET_REPAIR "Исправить" + IDS_NET_CREATELINK "Создать ярлык" + IDS_NET_DELETE "Удалить" + IDS_NET_PROPERTIES "Свойства" +END + diff --git a/reactos/dll/win32/netshell/netshell.rc b/reactos/dll/win32/netshell/netshell.rc index aa99634b923..78822aec2de 100644 --- a/reactos/dll/win32/netshell/netshell.rc +++ b/reactos/dll/win32/netshell/netshell.rc @@ -8,3 +8,4 @@ IDI_SHELL_NETWORK_FOLDER ICON "res/netshell.ico" #include "lang/de-DE.rc" #include "lang/en-US.rc" +#include "lang/ru-RU.rc" From a66715b03664ab2292077f285128df78f0ff78bb Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Thu, 28 Aug 2008 09:12:09 +0000 Subject: [PATCH 211/324] - Put netshell.dll on the bootcd. svn path=/trunk/; revision=35725 --- reactos/boot/bootdata/packages/reactos.dff | 1 + 1 file changed, 1 insertion(+) diff --git a/reactos/boot/bootdata/packages/reactos.dff b/reactos/boot/bootdata/packages/reactos.dff index 43283178f06..b6a9cb01bf8 100644 --- a/reactos/boot/bootdata/packages/reactos.dff +++ b/reactos/boot/bootdata/packages/reactos.dff @@ -287,6 +287,7 @@ dll\win32\nddeapi\nddeapi.dll 1 dll\win32\netapi32\netapi32.dll 1 dll\win32\netcfgx\netcfgx.dll 1 dll\win32\netid\netid.dll 1 +dll\win32\netshell\netshell.dll 1 dll\win32\newdev\newdev.dll 1 dll\win32\ntdsapi\ntdsapi.dll 1 dll\win32\ntmarta\ntmarta.dll 1 From dea8ec122912497c9566680cfdf894e6e1b65861 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Thu, 28 Aug 2008 10:16:48 +0000 Subject: [PATCH 212/324] - Implement CmpConstructName (builds a full name of the given key). - Fix freeing of the buffer returned by CmpConstructName in CmpQueryKeyName routine. - Fixes bug 3616 and related query-routines. See issue #3616 for more details. svn path=/trunk/; revision=35727 --- reactos/ntoskrnl/config/cmkcbncb.c | 133 ++++++++++++++++++++++++++++- reactos/ntoskrnl/config/cmsysini.c | 2 +- 2 files changed, 132 insertions(+), 3 deletions(-) diff --git a/reactos/ntoskrnl/config/cmkcbncb.c b/reactos/ntoskrnl/config/cmkcbncb.c index bc24904bdfa..b104fa298f5 100644 --- a/reactos/ntoskrnl/config/cmkcbncb.c +++ b/reactos/ntoskrnl/config/cmkcbncb.c @@ -890,8 +890,137 @@ PUNICODE_STRING NTAPI CmpConstructName(IN PCM_KEY_CONTROL_BLOCK Kcb) { - UNIMPLEMENTED; - return NULL; + PUNICODE_STRING KeyName; + ULONG NameLength, i; + PCM_KEY_CONTROL_BLOCK MyKcb; + PCM_KEY_NODE KeyNode; + BOOLEAN DeletedKey = FALSE; + PWCHAR TargetBuffer, CurrentNameW; + PUCHAR CurrentName; + + /* Calculate how much size our key name is going to occupy */ + NameLength = 0; + MyKcb = Kcb; + + while (MyKcb) + { + /* Add length of the name */ + if (!MyKcb->NameBlock->Compressed) + NameLength += MyKcb->NameBlock->NameLength; + else + NameLength += MyKcb->NameBlock->NameLength * sizeof(WCHAR); + + /* Sum up the separator also */ + NameLength += sizeof(WCHAR); + + /* Go to the parent KCB */ + MyKcb = MyKcb->ParentKcb; + } + + /* Allocate the unicode string now */ + KeyName = ExAllocatePoolWithTag(PagedPool, NameLength + sizeof(UNICODE_STRING), TAG_CM); + + if (!KeyName) return NULL; + + KeyName->Buffer = (PWSTR)(KeyName + 1); + KeyName->Length = NameLength; + KeyName->MaximumLength = NameLength; + + /* Loop the keys again, now adding names */ + NameLength = 0; + MyKcb = Kcb; + + while (MyKcb) + { + /* Sanity checks for deleted keys */ + if ((!MyKcb->KeyCell && !MyKcb->Delete) || + !MyKcb->KeyHive || + MyKcb->ExtFlags & CM_KCB_KEY_NON_EXIST) + { + /* Failure */ + ExFreePool(KeyName); + return NULL; + } + + /* Try to get the name from the keynode, + if the key is not deleted */ + if (!DeletedKey && !MyKcb->Delete) + { + KeyNode = HvGetCell(MyKcb->KeyHive, MyKcb->KeyCell); + + if (!KeyNode) + { + /* Failure */ + ExFreePool(KeyName); + return NULL; + } + } + else + { + /* The key was deleted */ + KeyNode = NULL; + DeletedKey = TRUE; + } + + /* Get the pointer to the beginning of the current key name */ + NameLength += (MyKcb->NameBlock->NameLength + 1) * sizeof(WCHAR); + TargetBuffer = &KeyName->Buffer[(KeyName->Length - NameLength) / sizeof(WCHAR)]; + + /* Add a separator */ + TargetBuffer[0] = OBJ_NAME_PATH_SEPARATOR; + + /* Add the name, but remember to go from the end to the beginning */ + if (!MyKcb->NameBlock->Compressed) + { + /* Get the pointer to the name (from the keynode, if possible) */ + if ((MyKcb->Flags & (KEY_HIVE_ENTRY | KEY_HIVE_EXIT)) || + !KeyNode) + { + CurrentNameW = MyKcb->NameBlock->Name; + } + else + { + CurrentNameW = KeyNode->Name; + } + + /* Copy the name */ + for (i=0; i < MyKcb->NameBlock->NameLength; i++) + { + TargetBuffer[i+1] = *CurrentNameW; + CurrentNameW++; + } + } + else + { + /* Get the pointer to the name (from the keynode, if possible) */ + if ((MyKcb->Flags & (KEY_HIVE_ENTRY | KEY_HIVE_EXIT)) || + !KeyNode) + { + CurrentName = (PUCHAR)MyKcb->NameBlock->Name; + } + else + { + CurrentName = (PUCHAR)KeyNode->Name; + } + + /* Copy the name */ + for (i=0; i < MyKcb->NameBlock->NameLength; i++) + { + TargetBuffer[i+1] = (WCHAR)*CurrentName; + CurrentName++; + } + } + + /* Release the cell, if needed */ + if (KeyNode) HvReleaseCell(MyKcb->KeyHive, MyKcb->KeyCell); + + /* Go to the parent KCB */ + MyKcb = MyKcb->ParentKcb; + } + + /* Return resulting buffer (both UNICODE_STRING and + its buffer following it) */ + return KeyName; } VOID diff --git a/reactos/ntoskrnl/config/cmsysini.c b/reactos/ntoskrnl/config/cmsysini.c index 76e34da203a..06d9dba71d4 100644 --- a/reactos/ntoskrnl/config/cmsysini.c +++ b/reactos/ntoskrnl/config/cmsysini.c @@ -184,7 +184,7 @@ CmpQueryKeyName(IN PVOID ObjectBody, _SEH_END; /* Free the buffer allocated by CmpConstructName */ - ExFreePool(KeyName->Buffer); + ExFreePool(KeyName); return Status; } From f381a715d2f0b91949e9d0f23761eccf6aa4aeae Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Thu, 28 Aug 2008 10:43:26 +0000 Subject: [PATCH 213/324] Synced riched20 with Wine HEAD svn path=/trunk/; revision=35728 --- reactos/dll/win32/riched20/caret.c | 536 ++++++++++---- reactos/dll/win32/riched20/editor.c | 818 ++++++++++++++++++--- reactos/dll/win32/riched20/editor.h | 35 +- reactos/dll/win32/riched20/editstr.h | 95 ++- reactos/dll/win32/riched20/list.c | 38 +- reactos/dll/win32/riched20/paint.c | 627 +++++++++++++--- reactos/dll/win32/riched20/para.c | 190 +++-- reactos/dll/win32/riched20/reader.c | 19 +- reactos/dll/win32/riched20/riched20.rbuild | 1 + reactos/dll/win32/riched20/rtf.h | 84 ++- reactos/dll/win32/riched20/run.c | 36 +- reactos/dll/win32/riched20/style.c | 5 +- reactos/dll/win32/riched20/table.c | 618 ++++++++++++++++ reactos/dll/win32/riched20/undo.c | 48 +- reactos/dll/win32/riched20/wrap.c | 284 +++++-- reactos/dll/win32/riched20/writer.c | 200 +++-- reactos/include/reactos/wine/winuser.h | 2 + 17 files changed, 3050 insertions(+), 586 deletions(-) create mode 100644 reactos/dll/win32/riched20/table.c diff --git a/reactos/dll/win32/riched20/caret.c b/reactos/dll/win32/riched20/caret.c index c23d92c01c0..376318e7309 100644 --- a/reactos/dll/win32/riched20/caret.c +++ b/reactos/dll/win32/riched20/caret.c @@ -215,7 +215,7 @@ ME_GetCursorCoordinates(ME_TextEditor *editor, ME_Cursor *pCursor, *height = pSizeRun->member.run.nAscent + pSizeRun->member.run.nDescent; *x = run->member.run.pt.x + sz.cx; - *y = para->member.para.nYPos + row->member.row.nBaseline + run->member.run.pt.y - pSizeRun->member.run.nAscent - ME_GetYScrollPos(editor); + *y = para->member.para.pt.y + row->member.row.nBaseline + run->member.run.pt.y - pSizeRun->member.run.nAscent - ME_GetYScrollPos(editor); ME_DestroyContext(&c, editor->hWnd); return; } @@ -234,7 +234,7 @@ ME_MoveCaret(ME_TextEditor *editor) if (ME_WrapMarkedParagraphs(editor)) ME_UpdateScrollBar(editor); ME_GetCursorCoordinates(editor, &editor->pCursors[0], &x, &y, &height); - if(editor->bHaveFocus) + if(editor->bHaveFocus && !ME_IsSelection(editor)) { RECT rect; @@ -249,38 +249,96 @@ ME_MoveCaret(ME_TextEditor *editor) void ME_ShowCaret(ME_TextEditor *ed) { ME_MoveCaret(ed); - if(ed->bHaveFocus) + if(ed->bHaveFocus && !ME_IsSelection(ed)) ShowCaret(ed->hWnd); } void ME_HideCaret(ME_TextEditor *ed) { - if(ed->bHaveFocus) + if(!ed->bHaveFocus || ME_IsSelection(ed)) { HideCaret(ed->hWnd); DestroyCaret(); } } -void ME_InternalDeleteText(ME_TextEditor *editor, int nOfs, - int nChars) +BOOL ME_InternalDeleteText(ME_TextEditor *editor, int nOfs, int nChars, + BOOL bForce) { ME_Cursor c; int shift = 0; - + int totalChars = nChars; + ME_DisplayItem *start_para; + + { + /* Prevent deletion past last end of paragraph run. */ + ME_DisplayItem *pTextEnd = editor->pBuffer->pLast; + int nMaxChars = pTextEnd->member.para.prev_para->member.para.nCharOfs; + nMaxChars += ME_FindItemBack(pTextEnd, diRun)->member.run.nCharOfs; + nMaxChars -= nOfs; + nChars = min(nChars, nMaxChars); + } + + ME_CursorFromCharOfs(editor, nOfs, &c); + start_para = ME_GetParagraph(c.pRun); + + if (!bForce) + { + ME_ProtectPartialTableDeletion(editor, nOfs, &nChars); + if (nChars == 0) + return FALSE; + } + while(nChars > 0) { ME_Run *run; - ME_CursorFromCharOfs(editor, nOfs, &c); + ME_CursorFromCharOfs(editor, nOfs+nChars, &c); + if (!c.nOffset && + nOfs+nChars == (c.pRun->member.run.nCharOfs + + ME_GetParagraph(c.pRun)->member.para.nCharOfs)) + { + /* We aren't deleting anything in this run, so we will go back to the + * last run we are deleting text in. */ + c.pRun = ME_FindItemBack(c.pRun, diRun); + if (c.pRun->member.run.nFlags & MERF_ENDPARA) + c.nOffset = c.pRun->member.run.nCR + c.pRun->member.run.nLF; + else + c.nOffset = c.pRun->member.run.strText->nLen; + } run = &c.pRun->member.run; if (run->nFlags & MERF_ENDPARA) { int eollen = run->nCR + run->nLF; + BOOL keepFirstParaFormat; if (!ME_FindItemFwd(c.pRun, diParagraph)) { - return; + return TRUE; } - ME_JoinParagraphs(editor, ME_GetParagraph(c.pRun)); + keepFirstParaFormat = (totalChars == nChars && nChars <= eollen && + run->nCharOfs); + if (!editor->bEmulateVersion10) /* v4.1 */ + { + ME_DisplayItem *next_para = ME_FindItemFwd(c.pRun, diParagraphOrEnd); + ME_DisplayItem *this_para = next_para->member.para.prev_para; + + /* The end of paragraph before a table row is only deleted if there + * is nothing else on the line before it. */ + if (this_para == start_para && + next_para->member.para.nFlags & MEPF_ROWSTART) + { + /* If the paragraph will be empty, then it should be deleted, however + * it still might have text right now which would inherit the + * MEPF_STARTROW property if we joined it right now. + * Instead we will delete it after the preceding text is deleted. */ + if (nOfs > this_para->member.para.nCharOfs) { + /* Skip this end of line. */ + nChars -= (eollen < nChars) ? eollen : nChars; + continue; + } + keepFirstParaFormat = TRUE; + } + } + ME_JoinParagraphs(editor, ME_GetParagraph(c.pRun), keepFirstParaFormat); /* ME_SkipAndPropagateCharOffset(p->pRun, shift); */ ME_CheckCharOffsets(editor); nChars -= (eollen < nChars) ? eollen : nChars; @@ -289,22 +347,21 @@ void ME_InternalDeleteText(ME_TextEditor *editor, int nOfs, else { ME_Cursor cursor; - int nIntendedChars = nChars; - int nCharsToDelete = nChars; + int nCharsToDelete = min(nChars, c.nOffset); int i; - int loc = c.nOffset; - + + c.nOffset -= nCharsToDelete; + ME_FindItemBack(c.pRun, diParagraph)->member.para.nFlags |= MEPF_REWRAP; - + cursor = c; - ME_StrRelPos(run->strText, loc, &nChars); /* nChars is the number of characters that should be deleted from the - FOLLOWING runs (these AFTER cursor.pRun) + PRECEDING runs (these BEFORE cursor.pRun) nCharsToDelete is a number of chars to delete from THIS run */ - nCharsToDelete -= nChars; + nChars -= nCharsToDelete; shift -= nCharsToDelete; - TRACE("Deleting %d (intended %d-remaning %d) chars at %d in '%s' (%d)\n", - nCharsToDelete, nIntendedChars, nChars, c.nOffset, + TRACE("Deleting %d (remaning %d) chars at %d in '%s' (%d)\n", + nCharsToDelete, nChars, c.nOffset, debugstr_w(run->strText->szData), run->strText->nLen); if (!c.nOffset && ME_StrVLen(run->strText) == nCharsToDelete) @@ -314,7 +371,7 @@ void ME_InternalDeleteText(ME_TextEditor *editor, int nOfs, to the current (deleted) run */ ME_UndoItem *pUndo = ME_AddUndoItem(editor, diUndoInsertRun, c.pRun); if (pUndo) - pUndo->di.member.run.nCharOfs = nOfs; + pUndo->di.member.run.nCharOfs = nOfs+nChars; } else { @@ -322,7 +379,7 @@ void ME_InternalDeleteText(ME_TextEditor *editor, int nOfs, ME_UndoItem *pUndo = ME_AddUndoItem(editor, diUndoInsertRun, c.pRun); if (pUndo) { ME_DestroyString(pUndo->di.member.run.strText); - pUndo->di.member.run.nCharOfs = nOfs; + pUndo->di.member.run.nCharOfs = nOfs+nChars; pUndo->di.member.run.strText = ME_MakeStringN(run->strText->szData+c.nOffset, nCharsToDelete); } } @@ -373,15 +430,16 @@ void ME_InternalDeleteText(ME_TextEditor *editor, int nOfs, continue; } } + return TRUE; } -void ME_DeleteTextAtCursor(ME_TextEditor *editor, int nCursor, - int nChars) +BOOL ME_DeleteTextAtCursor(ME_TextEditor *editor, int nCursor, int nChars) { assert(nCursor>=0 && nCursornCursors); /* text operations set modified state */ editor->nModifyStep = 1; - ME_InternalDeleteText(editor, ME_GetCursorOfs(editor, nCursor), nChars); + return ME_InternalDeleteText(editor, ME_GetCursorOfs(editor, nCursor), nChars, + FALSE); } static ME_DisplayItem * @@ -432,31 +490,6 @@ void ME_InsertEndRowFromCursor(ME_TextEditor *editor, int nCursor) ME_SendSelChange(editor); } -void -ME_InsertTableCellFromCursor(ME_TextEditor *editor, int nCursor) -{ - WCHAR tab = '\t'; - ME_DisplayItem *p, *run; - ME_Style *pStyle = ME_GetInsertStyle(editor, nCursor); - - p = ME_InternalInsertTextFromCursor(editor, nCursor, &tab, 1, pStyle, - MERF_CELL); - run = p; - while ((run = ME_FindItemBack(run, diRunOrParagraph))->type == diRun) - { - if (run->member.run.nFlags & MERF_CELL) - { - assert(run->member.run.pCell->next); - p->member.run.pCell = run->member.run.pCell->next; - return; - } - } - assert(run->type == diParagraph); - assert(run->member.para.bTable); - assert(run->member.para.pCells); - p->member.run.pCell = run->member.para.pCells; -} - void ME_InsertTextFromCursor(ME_TextEditor *editor, int nCursor, const WCHAR *str, int len, ME_Style *style) @@ -572,7 +605,7 @@ void ME_InsertTextFromCursor(ME_TextEditor *editor, int nCursor, pos++; numCR = 1; numLF = 0; } - tp = ME_SplitParagraph(editor, p->pRun, p->pRun->member.run.style, numCR, numLF); + tp = ME_SplitParagraph(editor, p->pRun, p->pRun->member.run.style, numCR, numLF, 0); p->pRun = ME_FindItemFwd(tp, diRun); end_run = ME_FindItemBack(tp, diRun); ME_ReleaseStyle(end_run->member.run.style); @@ -619,7 +652,8 @@ ME_MoveCursorChars(ME_TextEditor *editor, ME_Cursor *pCursor, int nRelOfs) assert(pRun->type != diRun && pRun->type != diParagraph); return FALSE; } - } while (RUN_IS_HIDDEN(&pRun->member.run)); + } while (RUN_IS_HIDDEN(&pRun->member.run) || + pRun->member.run.nFlags & MERF_HIDDEN); pCursor->pRun = pRun; if (pRun->member.run.nFlags & MERF_ENDPARA) pCursor->nOffset = 0; @@ -645,7 +679,8 @@ ME_MoveCursorChars(ME_TextEditor *editor, ME_Cursor *pCursor, int nRelOfs) } do { pRun = ME_FindItemFwd(pRun, diRun); - } while (pRun && RUN_IS_HIDDEN(&pRun->member.run)); + } while (pRun && (RUN_IS_HIDDEN(&pRun->member.run) || + pRun->member.run.nFlags & MERF_HIDDEN)); if (pRun) { pCursor->pRun = pRun; @@ -690,9 +725,13 @@ ME_MoveCursorWords(ME_TextEditor *editor, ME_Cursor *cursor, int nRelOfs) { if (cursor->pRun == pRun && cursor->nOffset == 0) { + /* Skip empty start of table row paragraph */ + if (pOtherRun->member.para.prev_para->member.para.nFlags & MEPF_ROWSTART) + pOtherRun = pOtherRun->member.para.prev_para; /* Paragraph breaks are treated as separate words */ if (pOtherRun->member.para.prev_para->type == diTextStart) return FALSE; + pRun = ME_FindItemBack(pOtherRun, diRunOrParagraph); } break; @@ -723,6 +762,8 @@ ME_MoveCursorWords(ME_TextEditor *editor, ME_Cursor *cursor, int nRelOfs) } else if (pOtherRun->type == diParagraph) { + if (pOtherRun->member.para.nFlags & MEPF_ROWSTART) + pOtherRun = pOtherRun->member.para.next_para; if (cursor->pRun == pRun) pRun = ME_FindItemFwd(pOtherRun, diRun); nOffset = 0; @@ -744,13 +785,63 @@ ME_MoveCursorWords(ME_TextEditor *editor, ME_Cursor *cursor, int nRelOfs) void -ME_SelectWord(ME_TextEditor *editor) +ME_SelectByType(ME_TextEditor *editor, ME_SelectionType selectionType) { - ME_MoveCursorWords(editor, &editor->pCursors[1], +1); - editor->pCursors[0] = editor->pCursors[1]; - ME_MoveCursorWords(editor, &editor->pCursors[0], -1); -} + /* pCursor[0] is the end of the selection + * pCursor[1] is the start of the selection (or the position selection anchor) + * pCursor[2] and [3] are the selection anchors that are backed up + * so they are kept when the selection changes for drag selection. + */ + editor->nSelectionType = selectionType; + switch(selectionType) + { + case stPosition: + break; + case stWord: + ME_MoveCursorWords(editor, &editor->pCursors[0], +1); + editor->pCursors[1] = editor->pCursors[0]; + ME_MoveCursorWords(editor, &editor->pCursors[1], -1); + break; + case stLine: + case stParagraph: + { + ME_DisplayItem *pItem; + ME_DIType fwdSearchType, backSearchType; + if (selectionType == stParagraph) { + backSearchType = diParagraph; + fwdSearchType = diParagraphOrEnd; + } else { + backSearchType = diStartRow; + fwdSearchType = diStartRowOrParagraphOrEnd; + } + pItem = ME_FindItemFwd(editor->pCursors[0].pRun, fwdSearchType); + assert(pItem); + if (pItem->type == diTextEnd) + editor->pCursors[0].pRun = ME_FindItemBack(pItem, diRun); + else + editor->pCursors[0].pRun = ME_FindItemFwd(pItem, diRun); + editor->pCursors[0].nOffset = 0; + + pItem = ME_FindItemBack(pItem, backSearchType); + editor->pCursors[1].pRun = ME_FindItemFwd(pItem, diRun); + editor->pCursors[1].nOffset = 0; + break; + } + case stDocument: + /* Select everything with cursor anchored from the start of the text */ + editor->nSelectionType = stDocument; + editor->pCursors[1].pRun = ME_FindItemFwd(editor->pBuffer->pFirst, diRun); + editor->pCursors[1].nOffset = 0; + editor->pCursors[0].pRun = ME_FindItemBack(editor->pBuffer->pLast, diRun); + editor->pCursors[0].nOffset = 0; + break; + default: assert(0); + } + /* Store the anchor positions for extending the selection. */ + editor->pCursors[2] = editor->pCursors[0]; + editor->pCursors[3] = editor->pCursors[1]; +} int ME_GetCursorOfs(ME_TextEditor *editor, int nCursor) { @@ -759,11 +850,60 @@ int ME_GetCursorOfs(ME_TextEditor *editor, int nCursor) + pCursor->pRun->member.run.nCharOfs + pCursor->nOffset; } -static void ME_FindPixelPos(ME_TextEditor *editor, int x, int y, ME_Cursor *result, BOOL *is_eol) +/* Helper function for ME_FindPixelPos to find paragraph within tables */ +static ME_DisplayItem* ME_FindPixelPosInTableRow(int x, int y, + ME_DisplayItem *para) +{ + ME_DisplayItem *cell, *next_cell; + assert(para->member.para.nFlags & MEPF_ROWSTART); + cell = para->member.para.next_para->member.para.pCell; + assert(cell); + + /* find the cell we are in */ + while ((next_cell = cell->member.cell.next_cell) != NULL) { + if (x < next_cell->member.cell.pt.x) + { + para = ME_FindItemFwd(cell, diParagraph); + /* Found the cell, but there might be multiple paragraphs in + * the cell, so need to search down the cell for the paragraph. */ + while (cell == para->member.para.pCell) { + if (y < para->member.para.pt.y + para->member.para.nHeight) + { + if (para->member.para.nFlags & MEPF_ROWSTART) + return ME_FindPixelPosInTableRow(x, y, para); + else + return para; + } + para = para->member.para.next_para; + } + /* Past the end of the cell, so go back to the last cell paragraph */ + return para->member.para.prev_para; + } + cell = next_cell; + } + /* Return table row delimiter */ + para = ME_FindItemFwd(cell, diParagraph); + assert(para->member.para.nFlags & MEPF_ROWEND); + assert(para->member.para.pFmt->dwMask & PFM_TABLEROWDELIMITER); + assert(para->member.para.pFmt->wEffects & PFE_TABLEROWDELIMITER); + return para; +} + +/* Finds the run and offset from the pixel position. + * + * x & y are pixel positions in virtual coordinates into the rich edit control, + * so client coordinates must first be adjusted by the scroll position. + * + * returns TRUE if the result was exactly under the cursor, otherwise returns + * FALSE, and result is set to the closest position to the coordinates. + */ +static BOOL ME_FindPixelPos(ME_TextEditor *editor, int x, int y, + ME_Cursor *result, BOOL *is_eol) { ME_DisplayItem *p = editor->pBuffer->pFirst->member.para.next_para; ME_DisplayItem *last = NULL; int rx = 0; + BOOL isExact = TRUE; if (is_eol) *is_eol = 0; @@ -772,11 +912,15 @@ static void ME_FindPixelPos(ME_TextEditor *editor, int x, int y, ME_Cursor *resu for (; p != editor->pBuffer->pLast; p = p->member.para.next_para) { assert(p->type == diParagraph); - if (y < p->member.para.nYPos + p->member.para.nHeight) + if (y < p->member.para.pt.y + p->member.para.nHeight) { - y -= p->member.para.nYPos; + if (p->member.para.nFlags & MEPF_ROWSTART) + p = ME_FindPixelPosInTableRow(x, y, p); + y -= p->member.para.pt.y; p = ME_FindItemFwd(p, diStartRow); break; + } else if (p->member.para.nFlags & MEPF_ROWSTART) { + p = ME_GetTableRowEnd(p); } } /* find row */ @@ -784,7 +928,7 @@ static void ME_FindPixelPos(ME_TextEditor *editor, int x, int y, ME_Cursor *resu { ME_DisplayItem *pp; assert(p->type == diStartRow); - if (y < p->member.row.nYPos + p->member.row.nHeight) + if (y < p->member.row.pt.y + p->member.row.nHeight) { p = ME_FindItemFwd(p, diRun); break; @@ -802,6 +946,7 @@ static void ME_FindPixelPos(ME_TextEditor *editor, int x, int y, ME_Cursor *resu /* The position is below the last paragraph, so the last row will be used * rather than the end of the text, so the x position will be used to * determine the offset closest to the pixel position. */ + isExact = FALSE; p = ME_FindItemBack(p, diStartRow); if (p != NULL){ p = ME_FindItemFwd(p, diRun); @@ -830,16 +975,19 @@ static void ME_FindPixelPos(ME_TextEditor *editor, int x, int y, ME_Cursor *resu result->pRun = ME_FindItemFwd(editor->pCursors[0].pRun, diRun); result->nOffset = 0; } - return; + return isExact; } break; case diStartRow: + isExact = FALSE; p = ME_FindItemFwd(p, diRun); if (is_eol) *is_eol = 1; rx = 0; /* FIXME not sure */ goto found_here; + case diCell: case diParagraph: case diTextEnd: + isExact = FALSE; rx = 0; /* FIXME not sure */ p = last; goto found_here; @@ -850,29 +998,102 @@ static void ME_FindPixelPos(ME_TextEditor *editor, int x, int y, ME_Cursor *resu result->pRun = ME_FindItemBack(p, diRun); result->nOffset = 0; assert(result->pRun->member.run.nFlags & MERF_ENDPARA); + return FALSE; } -int -ME_CharFromPos(ME_TextEditor *editor, int x, int y) +/* Returns the character offset closest to the pixel position + * + * x & y are pixel positions in client coordinates. + * + * isExact will be set to TRUE if the run is directly under the pixel + * position, FALSE if it not, unless isExact is set to NULL. + */ +int ME_CharFromPos(ME_TextEditor *editor, int x, int y, BOOL *isExact) { ME_Cursor cursor; RECT rc; + BOOL bResult; GetClientRect(editor->hWnd, &rc); - if (x < 0 || y < 0 || x >= rc.right || y >= rc.bottom) + if (x < 0 || y < 0 || x >= rc.right || y >= rc.bottom) { + if (isExact) *isExact = FALSE; return -1; + } y += ME_GetYScrollPos(editor); - ME_FindPixelPos(editor, x, y, &cursor, NULL); + bResult = ME_FindPixelPos(editor, x, y, &cursor, NULL); + if (isExact) *isExact = bResult; return (ME_GetParagraph(cursor.pRun)->member.para.nCharOfs + cursor.pRun->member.run.nCharOfs + cursor.nOffset); } + +/* Extends the selection with a word, line, or paragraph selection type. + * + * The selection is anchored by editor->pCursors[2-3] such that the text + * between the anchors will remain selected, and one end will be extended. + * + * editor->pCursors[0] should have the position to extend the selection to + * before this function is called. + * + * Nothing will be done if editor->nSelectionType equals stPosition. + */ +static void ME_ExtendAnchorSelection(ME_TextEditor *editor) +{ + ME_Cursor tmp_cursor; + int curOfs, anchorStartOfs, anchorEndOfs; + if (editor->nSelectionType == stPosition || editor->nSelectionType == stDocument) + return; + curOfs = ME_GetCursorOfs(editor, 0); + anchorStartOfs = ME_GetCursorOfs(editor, 3); + anchorEndOfs = ME_GetCursorOfs(editor, 2); + + tmp_cursor = editor->pCursors[0]; + editor->pCursors[0] = editor->pCursors[2]; + editor->pCursors[1] = editor->pCursors[3]; + if (curOfs < anchorStartOfs) + { + /* Extend the left side of selection */ + editor->pCursors[1] = tmp_cursor; + if (editor->nSelectionType == stWord) + ME_MoveCursorWords(editor, &editor->pCursors[1], -1); + else + { + ME_DisplayItem *pItem; + ME_DIType searchType = ((editor->nSelectionType == stLine) ? + diStartRowOrParagraph:diParagraph); + pItem = ME_FindItemBack(editor->pCursors[1].pRun, searchType); + editor->pCursors[1].pRun = ME_FindItemFwd(pItem, diRun); + editor->pCursors[1].nOffset = 0; + } + } + else if (curOfs >= anchorEndOfs) + { + /* Extend the right side of selection */ + editor->pCursors[0] = tmp_cursor; + if (editor->nSelectionType == stWord) + ME_MoveCursorWords(editor, &editor->pCursors[0], +1); + else + { + ME_DisplayItem *pItem; + ME_DIType searchType = ((editor->nSelectionType == stLine) ? + diStartRowOrParagraphOrEnd:diParagraphOrEnd); + pItem = ME_FindItemFwd(editor->pCursors[0].pRun, searchType); + if (pItem->type == diTextEnd) + editor->pCursors[0].pRun = ME_FindItemBack(pItem, diRun); + else + editor->pCursors[0].pRun = ME_FindItemFwd(pItem, diRun); + editor->pCursors[0].nOffset = 0; + } + } +} + void ME_LButtonDown(ME_TextEditor *editor, int x, int y, int clickNum) { ME_Cursor tmp_cursor; int is_selection = 0; + BOOL is_shift; editor->nUDArrowX = -1; @@ -880,59 +1101,54 @@ void ME_LButtonDown(ME_TextEditor *editor, int x, int y, int clickNum) tmp_cursor = editor->pCursors[0]; is_selection = ME_IsSelection(editor); + is_shift = GetKeyState(VK_SHIFT) < 0; - if (x >= editor->selofs) + ME_FindPixelPos(editor, x, y, &editor->pCursors[0], &editor->bCaretAtEnd); + + if (x >= editor->selofs || is_shift) { - ME_FindPixelPos(editor, x, y, &editor->pCursors[0], &editor->bCaretAtEnd); - if (GetKeyState(VK_SHIFT)>=0) + if (clickNum > 1) { - /* Shift key is not down */ editor->pCursors[1] = editor->pCursors[0]; - if (clickNum > 1) - ME_SelectWord(editor); + if (is_shift) { + if (x >= editor->selofs) + ME_SelectByType(editor, stWord); + else + ME_SelectByType(editor, stParagraph); + } else if (clickNum % 2 == 0) { + ME_SelectByType(editor, stWord); + } else { + ME_SelectByType(editor, stParagraph); + } } - else if (!is_selection) { + else if (!is_shift) + { + editor->nSelectionType = stPosition; + editor->pCursors[1] = editor->pCursors[0]; + } + else if (!is_selection) + { + editor->nSelectionType = stPosition; editor->pCursors[1] = tmp_cursor; - is_selection = 1; + } + else if (editor->nSelectionType != stPosition) + { + ME_ExtendAnchorSelection(editor); } } else { - ME_DisplayItem *pRow; - - editor->linesel = 1; - editor->sely = y; - /* Set pCursors[0] to beginning of line */ - ME_FindPixelPos(editor, x, y, &editor->pCursors[1], &editor->bCaretAtEnd); - /* Set pCursors[1] to end of line */ - pRow = ME_FindItemFwd(editor->pCursors[1].pRun, diStartRowOrParagraphOrEnd); - assert(pRow); - /* pCursor[0] is the position where the cursor will be drawn, - * pCursor[1] is the other end of the selection range - * pCursor[2] and [3] are backups of [0] and [1] so I - * don't have to look them up again - */ - - if (pRow->type == diStartRow) { - /* FIXME WTF was I thinking about here ? */ - ME_DisplayItem *pRun = ME_FindItemFwd(pRow, diRun); - assert(pRun); - editor->pCursors[0].pRun = pRun; - editor->pCursors[0].nOffset = 0; - editor->bCaretAtEnd = 1; + if (clickNum < 2) { + ME_SelectByType(editor, stLine); + } else if (clickNum % 2 == 0 || is_shift) { + ME_SelectByType(editor, stParagraph); } else { - editor->pCursors[0].pRun = ME_FindItemBack(pRow, diRun); - assert(editor->pCursors[0].pRun && editor->pCursors[0].pRun->member.run.nFlags & MERF_ENDPARA); - editor->pCursors[0].nOffset = 0; - editor->bCaretAtEnd = 0; + ME_SelectByType(editor, stDocument); } - editor->pCursors[2] = editor->pCursors[0]; - editor->pCursors[3] = editor->pCursors[1]; } ME_InvalidateSelection(editor); HideCaret(editor->hWnd); - ME_MoveCaret(editor); - ShowCaret(editor->hWnd); + ME_ShowCaret(editor); ME_ClearTempStyle(editor); ME_SendSelChange(editor); } @@ -941,43 +1157,38 @@ void ME_MouseMove(ME_TextEditor *editor, int x, int y) { ME_Cursor tmp_cursor; + if (editor->nSelectionType == stDocument) + return; y += ME_GetYScrollPos(editor); tmp_cursor = editor->pCursors[0]; /* FIXME: do something with the return value of ME_FindPixelPos */ - if (!editor->linesel) - ME_FindPixelPos(editor, x, y, &tmp_cursor, &editor->bCaretAtEnd); - else ME_FindPixelPos(editor, (y > editor->sely) * editor->rcFormat.right, y, &tmp_cursor, &editor->bCaretAtEnd); - - if (!memcmp(&tmp_cursor, editor->pCursors, sizeof(tmp_cursor))) - return; + ME_FindPixelPos(editor, x, y, &tmp_cursor, &editor->bCaretAtEnd); ME_InvalidateSelection(editor); - if (!editor->linesel) - editor->pCursors[0] = tmp_cursor; - else if (!memcmp(&tmp_cursor, editor->pCursors+2, sizeof(tmp_cursor)) || - !memcmp(&tmp_cursor, editor->pCursors+3, sizeof(tmp_cursor))) + editor->pCursors[0] = tmp_cursor; + ME_ExtendAnchorSelection(editor); + + if (editor->nSelectionType != stPosition && + memcmp(&editor->pCursors[1], &editor->pCursors[3], sizeof(ME_Cursor))) { - editor->pCursors[0] = editor->pCursors[2]; - editor->pCursors[1] = editor->pCursors[3]; - } - else if (y < editor->sely) - { - editor->pCursors[0] = tmp_cursor; - editor->pCursors[1] = editor->pCursors[2]; - } - else - { - editor->pCursors[0] = tmp_cursor; - editor->pCursors[1] = editor->pCursors[3]; + /* The scroll the cursor towards the other end, since it was the one + * extended by ME_ExtendAnchorSelection + */ + ME_Cursor tmpCursor = editor->pCursors[0]; + editor->pCursors[0] = editor->pCursors[1]; + editor->pCursors[1] = tmpCursor; + SendMessageW(editor->hWnd, EM_SCROLLCARET, 0, 0); + editor->pCursors[1] = editor->pCursors[0]; + editor->pCursors[0] = tmpCursor; + } else { + SendMessageW(editor->hWnd, EM_SCROLLCARET, 0, 0); } + ME_InvalidateSelection(editor); HideCaret(editor->hWnd); - ME_MoveCaret(editor); - ME_InvalidateSelection(editor); - ShowCaret(editor->hWnd); + ME_ShowCaret(editor); ME_SendSelChange(editor); - SendMessageW(editor->hWnd, EM_SCROLLCARET, 0, 0); } static ME_DisplayItem *ME_FindRunInRow(ME_TextEditor *editor, ME_DisplayItem *pRow, @@ -1048,13 +1259,14 @@ static void ME_MoveCursorLines(ME_TextEditor *editor, ME_Cursor *pCursor, int nRelOfs) { ME_DisplayItem *pRun = pCursor->pRun; - ME_DisplayItem *pItem; + ME_DisplayItem *pItem, *pOldPara, *pNewPara; int x = ME_GetXForArrow(editor, pCursor); if (editor->bCaretAtEnd && !pCursor->nOffset) pRun = ME_FindItemBack(pRun, diRun); if (!pRun) return; + pOldPara = ME_GetParagraph(pRun); if (nRelOfs == -1) { /* start of this row */ @@ -1062,13 +1274,57 @@ ME_MoveCursorLines(ME_TextEditor *editor, ME_Cursor *pCursor, int nRelOfs) assert(pItem); /* start of the previous row */ pItem = ME_FindItemBack(pItem, diStartRow); + if (!pItem) + return; /* row not found - ignore */ + pNewPara = ME_GetParagraph(pItem); + if (pOldPara->member.para.nFlags & MEPF_ROWEND || + (pOldPara->member.para.pCell && + pOldPara->member.para.pCell != pNewPara->member.para.pCell)) + { + /* Brought out of a cell */ + pNewPara = ME_GetTableRowStart(pOldPara)->member.para.prev_para; + if (pNewPara->type == diTextStart) + return; /* At the top, so don't go anywhere. */ + pItem = ME_FindItemFwd(pNewPara, diStartRow); + } + if (pNewPara->member.para.nFlags & MEPF_ROWEND) + { + /* Brought into a table row */ + ME_Cell *cell = &ME_FindItemBack(pNewPara, diCell)->member.cell; + while (x < cell->pt.x && cell->prev_cell) + cell = &cell->prev_cell->member.cell; + if (cell->next_cell) /* else - we are still at the end of the row */ + pItem = ME_FindItemBack(cell->next_cell, diStartRow); + } } else { /* start of the next row */ pItem = ME_FindItemFwd(pRun, diStartRow); + if (!pItem) + return; /* row not found - ignore */ /* FIXME If diParagraph is before diStartRow, wrap the next paragraph? */ + pNewPara = ME_GetParagraph(pItem); + if (pOldPara->member.para.nFlags & MEPF_ROWSTART || + (pOldPara->member.para.pCell && + pOldPara->member.para.pCell != pNewPara->member.para.pCell)) + { + /* Brought out of a cell */ + pNewPara = ME_GetTableRowEnd(pOldPara)->member.para.next_para; + if (pNewPara->type == diTextEnd) + return; /* At the bottom, so don't go anywhere. */ + pItem = ME_FindItemFwd(pNewPara, diStartRow); + } + if (pNewPara->member.para.nFlags & MEPF_ROWSTART) + { + /* Brought into a table row */ + ME_DisplayItem *cell = ME_FindItemFwd(pNewPara, diCell); + while (cell->member.cell.next_cell && + x >= cell->member.cell.next_cell->member.cell.pt.x) + cell = cell->member.cell.next_cell; + pItem = ME_FindItemFwd(cell, diStartRow); + } } if (!pItem) { @@ -1094,8 +1350,8 @@ static void ME_ArrowPageUp(ME_TextEditor *editor, ME_Cursor *pCursor) p = ME_FindItemBack(pRun, diStartRowOrParagraph); assert(p->type == diStartRow); - yp = ME_FindItemBack(p, diParagraph)->member.para.nYPos; - yprev = ys = y = yp + p->member.row.nYPos; + yp = ME_FindItemBack(p, diParagraph)->member.para.pt.y; + yprev = ys = y = yp + p->member.row.pt.y; yd = y - editor->sizeWindow.cy; pLast = p; @@ -1106,10 +1362,10 @@ static void ME_ArrowPageUp(ME_TextEditor *editor, ME_Cursor *pCursor) if (p->type == diParagraph) { /* crossing paragraphs */ if (p->member.para.prev_para == NULL) break; - yp = p->member.para.prev_para->member.para.nYPos; + yp = p->member.para.prev_para->member.para.pt.y; continue; } - y = yp + p->member.row.nYPos; + y = yp + p->member.row.pt.y; if (y < yd) break; pLast = p; @@ -1149,8 +1405,8 @@ static void ME_ArrowPageDown(ME_TextEditor *editor, ME_Cursor *pCursor) p = ME_FindItemBack(pRun, diStartRowOrParagraph); assert(p->type == diStartRow); - yp = ME_FindItemBack(p, diParagraph)->member.para.nYPos; - yprev = ys = y = yp + p->member.row.nYPos; + yp = ME_FindItemBack(p, diParagraph)->member.para.pt.y; + yprev = ys = y = yp + p->member.row.pt.y; yd = y + editor->sizeWindow.cy; pLast = p; @@ -1159,10 +1415,10 @@ static void ME_ArrowPageDown(ME_TextEditor *editor, ME_Cursor *pCursor) if (!p) break; if (p->type == diParagraph) { - yp = p->member.para.nYPos; + yp = p->member.para.pt.y; continue; } - y = yp + p->member.row.nYPos; + y = yp + p->member.row.pt.y; if (y >= yd) break; pLast = p; diff --git a/reactos/dll/win32/riched20/editor.c b/reactos/dll/win32/riched20/editor.c index 2d000616e36..aa5938326a3 100644 --- a/reactos/dll/win32/riched20/editor.c +++ b/reactos/dll/win32/riched20/editor.c @@ -140,10 +140,10 @@ + WM_SETTEXT (resets undo stack !) (proper style?) ANSI&Unicode - WM_STYLECHANGING - WM_STYLECHANGED (things like read-only flag) - - WM_UNICHAR - + + WM_UNICHAR + Notifications - + * EN_CHANGE (sent from the wrong place) - EN_CORRECTTEXT - EN_DROPFILES @@ -320,6 +320,32 @@ static LRESULT ME_StreamInText(ME_TextEditor *editor, DWORD dwFormat, ME_InStrea return 0; } +static void ME_ApplyBorderProperties(RTF_Info *info, + ME_BorderRect *borderRect, + RTFBorder *borderDef) +{ + int i, colorNum; + ME_Border *pBorders[] = {&borderRect->top, + &borderRect->left, + &borderRect->bottom, + &borderRect->right}; + for (i = 0; i < 4; i++) + { + RTFColor *colorDef = info->colorList; + pBorders[i]->width = borderDef[i].width; + colorNum = borderDef[i].color; + while (colorDef && colorDef->rtfCNum != colorNum) + colorDef = colorDef->rtfNextColor; + if (colorDef) + pBorders[i]->colorRef = RGB( + colorDef->rtfCRed >= 0 ? colorDef->rtfCRed : 0, + colorDef->rtfCGreen >= 0 ? colorDef->rtfCGreen : 0, + colorDef->rtfCBlue >= 0 ? colorDef->rtfCBlue : 0); + else + pBorders[i]->colorRef = RGB(0, 0, 0); + } +} + static void ME_RTFCharAttrHook(RTF_Info *info) { CHARFORMAT2W fmt; @@ -451,8 +477,13 @@ static void ME_RTFParAttrHook(RTF_Info *info) switch(info->rtfMinor) { case rtfParDef: /* restores default paragraph attributes */ - fmt.dwMask = PFM_ALIGNMENT | PFM_BORDER | PFM_LINESPACING | PFM_TABSTOPS | PFM_OFFSET | - PFM_RIGHTINDENT | PFM_SPACEAFTER | PFM_SPACEBEFORE | PFM_STARTINDENT; + if (!info->editor->bEmulateVersion10) /* v4.1 */ + info->borderType = RTFBorderParaLeft; + else /* v1.0 - 3.0 */ + info->borderType = RTFBorderParaTop; + fmt.dwMask = PFM_ALIGNMENT | PFM_BORDER | PFM_LINESPACING | PFM_TABSTOPS | + PFM_OFFSET | PFM_RIGHTINDENT | PFM_SPACEAFTER | PFM_SPACEBEFORE | + PFM_STARTINDENT; /* TODO: numbering, shading */ fmt.wAlignment = PFA_LEFT; fmt.cTabCount = 0; @@ -462,31 +493,113 @@ static void ME_RTFParAttrHook(RTF_Info *info) fmt.bLineSpacingRule = 0; fmt.dySpaceBefore = fmt.dySpaceAfter = 0; fmt.dyLineSpacing = 0; - RTFFlushOutputBuffer(info); - ME_GetParagraph(info->editor->pCursors[0].pRun)->member.para.bTable = FALSE; + if (!info->editor->bEmulateVersion10) /* v4.1 */ + { + if (info->tableDef && info->tableDef->tableRowStart && + info->tableDef->tableRowStart->member.para.nFlags & MEPF_ROWEND) + { + ME_Cursor cursor; + ME_DisplayItem *para; + /* We are just after a table row. */ + RTFFlushOutputBuffer(info); + cursor = info->editor->pCursors[0]; + para = ME_GetParagraph(cursor.pRun); + if (para == info->tableDef->tableRowStart->member.para.next_para + && !cursor.nOffset && !cursor.pRun->member.run.nCharOfs) + { + /* Since the table row end, no text has been inserted, and the \intbl + * control word has not be used. We can confirm that we are not in a + * table anymore. + */ + info->tableDef->tableRowStart = NULL; + info->canInheritInTbl = FALSE; + } + } + } else { /* v1.0 - v3.0 */ + fmt.dwMask |= PFM_TABLE; + fmt.wEffects &= ~PFE_TABLE; + } + break; + case rtfNestLevel: + if (!info->editor->bEmulateVersion10) /* v4.1 */ + { + while (info->rtfParam > info->nestingLevel) { + RTFTable *tableDef = ALLOC_OBJ(RTFTable); + ZeroMemory(tableDef, sizeof(RTFTable)); + tableDef->parent = info->tableDef; + info->tableDef = tableDef; + + RTFFlushOutputBuffer(info); + if (tableDef->tableRowStart && + tableDef->tableRowStart->member.para.nFlags & MEPF_ROWEND) + { + ME_DisplayItem *para = tableDef->tableRowStart; + para = para->member.para.next_para; + para = ME_InsertTableRowStartAtParagraph(info->editor, para); + tableDef->tableRowStart = para; + } else { + ME_Cursor cursor; + WCHAR endl = '\r'; + cursor = info->editor->pCursors[0]; + if (cursor.nOffset || cursor.pRun->member.run.nCharOfs) + ME_InsertTextFromCursor(info->editor, 0, &endl, 1, info->style); + tableDef->tableRowStart = ME_InsertTableRowStartFromCursor(info->editor); + } + + info->nestingLevel++; + } + info->canInheritInTbl = FALSE; + } break; case rtfInTable: { - ME_DisplayItem *para; - - RTFFlushOutputBuffer(info); - para = ME_GetParagraph(info->editor->pCursors[0].pRun); - assert(para->member.para.pCells); - para->member.para.bTable = TRUE; - return; + if (!info->editor->bEmulateVersion10) /* v4.1 */ + { + if (info->nestingLevel < 1) + { + RTFTable *tableDef; + if (!info->tableDef) + { + info->tableDef = ALLOC_OBJ(RTFTable); + ZeroMemory(info->tableDef, sizeof(RTFTable)); + } + tableDef = info->tableDef; + RTFFlushOutputBuffer(info); + if (tableDef->tableRowStart && + tableDef->tableRowStart->member.para.nFlags & MEPF_ROWEND) + { + ME_DisplayItem *para = tableDef->tableRowStart; + para = para->member.para.next_para; + para = ME_InsertTableRowStartAtParagraph(info->editor, para); + tableDef->tableRowStart = para; + } else { + ME_Cursor cursor; + WCHAR endl = '\r'; + cursor = info->editor->pCursors[0]; + if (cursor.nOffset || cursor.pRun->member.run.nCharOfs) + ME_InsertTextFromCursor(info->editor, 0, &endl, 1, info->style); + tableDef->tableRowStart = ME_InsertTableRowStartFromCursor(info->editor); + } + info->nestingLevel = 1; + info->canInheritInTbl = TRUE; + } + return; + } else { /* v1.0 - v3.0 */ + fmt.dwMask |= PFM_TABLE; + fmt.wEffects |= PFE_TABLE; + } + break; } case rtfFirstIndent: ME_GetSelectionParaFormat(info->editor, &fmt); - fmt.dwMask |= PFM_STARTINDENT | PFM_OFFSET; - fmt.dxStartIndent += info->rtfParam; + fmt.dwMask = PFM_STARTINDENT | PFM_OFFSET; + fmt.dxStartIndent += fmt.dxOffset + info->rtfParam; fmt.dxOffset = -info->rtfParam; break; case rtfLeftIndent: - /* we assume rtfLeftIndent is always specified before rtfFirstIndent */ ME_GetSelectionParaFormat(info->editor, &fmt); - fmt.dwMask |= PFM_STARTINDENT; - fmt.dxStartIndent = info->rtfParam; - fmt.dxOffset = 0; + fmt.dwMask = PFM_STARTINDENT; + fmt.dxStartIndent = info->rtfParam - fmt.dxOffset; break; case rtfRightIndent: fmt.dwMask = PFM_RIGHTINDENT; @@ -509,11 +622,11 @@ static void ME_RTFParAttrHook(RTF_Info *info) ME_GetSelectionParaFormat(info->editor, &fmt); if (!(fmt.dwMask & PFM_TABSTOPS)) { - fmt.dwMask |= PFM_TABSTOPS; fmt.cTabCount = 0; } - if (fmt.cTabCount < MAX_TAB_STOPS) + if (fmt.cTabCount < MAX_TAB_STOPS && info->rtfParam < 0x1000000) fmt.rgxTabs[fmt.cTabCount++] = info->rtfParam; + fmt.dwMask = PFM_TABSTOPS; break; case rtfKeep: fmt.dwMask = PFM_KEEP; @@ -573,90 +686,138 @@ static void ME_RTFParAttrHook(RTF_Info *info) fmt.wNumberingStart = info->rtfParam; break; case rtfBorderLeft: + info->borderType = RTFBorderParaLeft; ME_GetSelectionParaFormat(info->editor, &fmt); if (!(fmt.dwMask & PFM_BORDER)) { - fmt.dwMask |= PFM_BORDER; fmt.wBorderSpace = 0; fmt.wBorderWidth = 1; fmt.wBorders = 0; } fmt.wBorders |= 1; + fmt.dwMask = PFM_BORDER; break; case rtfBorderRight: + info->borderType = RTFBorderParaRight; ME_GetSelectionParaFormat(info->editor, &fmt); if (!(fmt.dwMask & PFM_BORDER)) { - fmt.dwMask |= PFM_BORDER; fmt.wBorderSpace = 0; fmt.wBorderWidth = 1; fmt.wBorders = 0; } fmt.wBorders |= 2; + fmt.dwMask = PFM_BORDER; break; case rtfBorderTop: + info->borderType = RTFBorderParaTop; ME_GetSelectionParaFormat(info->editor, &fmt); if (!(fmt.dwMask & PFM_BORDER)) { - fmt.dwMask |= PFM_BORDER; fmt.wBorderSpace = 0; fmt.wBorderWidth = 1; fmt.wBorders = 0; } fmt.wBorders |= 4; + fmt.dwMask = PFM_BORDER; break; case rtfBorderBottom: + info->borderType = RTFBorderParaBottom; ME_GetSelectionParaFormat(info->editor, &fmt); if (!(fmt.dwMask & PFM_BORDER)) { - fmt.dwMask |= PFM_BORDER; fmt.wBorderSpace = 0; fmt.wBorderWidth = 1; fmt.wBorders = 0; } fmt.wBorders |= 8; + fmt.dwMask = PFM_BORDER; break; case rtfBorderSingle: ME_GetSelectionParaFormat(info->editor, &fmt); /* we assume that borders have been created before (RTF spec) */ fmt.wBorders &= ~0x700; fmt.wBorders |= 1 << 8; + fmt.dwMask = PFM_BORDER; break; case rtfBorderThick: ME_GetSelectionParaFormat(info->editor, &fmt); /* we assume that borders have been created before (RTF spec) */ fmt.wBorders &= ~0x700; fmt.wBorders |= 2 << 8; + fmt.dwMask = PFM_BORDER; break; case rtfBorderShadow: ME_GetSelectionParaFormat(info->editor, &fmt); /* we assume that borders have been created before (RTF spec) */ fmt.wBorders &= ~0x700; fmt.wBorders |= 10 << 8; + fmt.dwMask = PFM_BORDER; break; case rtfBorderDouble: ME_GetSelectionParaFormat(info->editor, &fmt); /* we assume that borders have been created before (RTF spec) */ fmt.wBorders &= ~0x700; fmt.wBorders |= 7 << 8; + fmt.dwMask = PFM_BORDER; break; case rtfBorderDot: ME_GetSelectionParaFormat(info->editor, &fmt); /* we assume that borders have been created before (RTF spec) */ fmt.wBorders &= ~0x700; fmt.wBorders |= 11 << 8; + fmt.dwMask = PFM_BORDER; break; case rtfBorderWidth: + { + int borderSide = info->borderType & RTFBorderSideMask; + RTFTable *tableDef = info->tableDef; ME_GetSelectionParaFormat(info->editor, &fmt); /* we assume that borders have been created before (RTF spec) */ fmt.wBorderWidth |= ((info->rtfParam / 15) & 7) << 8; + if ((info->borderType & RTFBorderTypeMask) == RTFBorderTypeCell) + { + RTFBorder *border; + if (!tableDef || tableDef->numCellsDefined >= MAX_TABLE_CELLS) + break; + border = &tableDef->cells[tableDef->numCellsDefined].border[borderSide]; + border->width = info->rtfParam; + break; + } + fmt.dwMask = PFM_BORDER; break; + } case rtfBorderSpace: ME_GetSelectionParaFormat(info->editor, &fmt); /* we assume that borders have been created before (RTF spec) */ fmt.wBorderSpace = info->rtfParam; + fmt.dwMask = PFM_BORDER; break; - } + case rtfBorderColor: + { + RTFTable *tableDef = info->tableDef; + int borderSide = info->borderType & RTFBorderSideMask; + int borderType = info->borderType & RTFBorderTypeMask; + switch(borderType) + { + case RTFBorderTypePara: + if (!info->editor->bEmulateVersion10) /* v4.1 */ + break; + /* v1.0 - 3.0 treat paragraph and row borders the same. */ + case RTFBorderTypeRow: + if (tableDef) { + tableDef->border[borderSide].color = info->rtfParam; + } + break; + case RTFBorderTypeCell: + if (tableDef && tableDef->numCellsDefined < MAX_TABLE_CELLS) { + tableDef->cells[tableDef->numCellsDefined].border[borderSide].color = info->rtfParam; + } + break; + } + break; + } + } if (fmt.dwMask) { RTFFlushOutputBuffer(info); /* FIXME too slow ? how come ?*/ @@ -666,35 +827,249 @@ static void ME_RTFParAttrHook(RTF_Info *info) static void ME_RTFTblAttrHook(RTF_Info *info) { - ME_DisplayItem *para; - switch (info->rtfMinor) { case rtfRowDef: - RTFFlushOutputBuffer(info); - para = ME_GetParagraph(info->editor->pCursors[0].pRun); - - /* Release possibly inherited cell definitions */ - ME_DestroyTableCellList(para); - - para->member.para.pCells = ALLOC_OBJ(ME_TableCell); - para->member.para.pCells->nRightBoundary = 0; - para->member.para.pCells->next = NULL; - para->member.para.pLastCell = para->member.para.pCells; - break; - case rtfCellPos: - RTFFlushOutputBuffer(info); - para = ME_GetParagraph(info->editor->pCursors[0].pRun); - - if (para->member.para.pLastCell->nRightBoundary) - { - ME_TableCell *pCell = ALLOC_OBJ(ME_TableCell); - - pCell->next = NULL; - para->member.para.pLastCell->next = pCell; - para->member.para.pLastCell = pCell; + { + if (!info->editor->bEmulateVersion10) /* v4.1 */ + info->borderType = 0; /* Not sure */ + else /* v1.0 - 3.0 */ + info->borderType = RTFBorderRowTop; + if (!info->tableDef) { + info->tableDef = ME_MakeTableDef(info->editor); + } else { + ME_InitTableDef(info->editor, info->tableDef); + } + break; + } + case rtfCellPos: + if (!info->tableDef) + { + info->tableDef = ME_MakeTableDef(info->editor); + } + if (info->tableDef->numCellsDefined >= MAX_TABLE_CELLS) + break; + info->tableDef->cells[info->tableDef->numCellsDefined].rightBoundary = info->rtfParam; + { + /* Tab stops were used to store cell positions before v4.1 but v4.1 + * still seems to set the tabstops without using them. */ + ME_DisplayItem *para = ME_GetParagraph(info->editor->pCursors[0].pRun); + PARAFORMAT2 *pFmt = para->member.para.pFmt; + int cellNum = info->tableDef->numCellsDefined; + pFmt->rgxTabs[cellNum] &= ~0x00FFFFFF; + pFmt->rgxTabs[cellNum] = 0x00FFFFFF & info->rtfParam; + } + info->tableDef->numCellsDefined++; + break; + case rtfRowBordTop: + info->borderType = RTFBorderRowTop; + break; + case rtfRowBordLeft: + info->borderType = RTFBorderRowLeft; + break; + case rtfRowBordBottom: + info->borderType = RTFBorderRowBottom; + break; + case rtfRowBordRight: + info->borderType = RTFBorderRowRight; + break; + case rtfCellBordTop: + info->borderType = RTFBorderCellTop; + break; + case rtfCellBordLeft: + info->borderType = RTFBorderCellLeft; + break; + case rtfCellBordBottom: + info->borderType = RTFBorderCellBottom; + break; + case rtfCellBordRight: + info->borderType = RTFBorderCellRight; + break; + case rtfRowGapH: + if (info->tableDef) + info->tableDef->gapH = info->rtfParam; + break; + case rtfRowLeftEdge: + if (info->tableDef) + info->tableDef->leftEdge = info->rtfParam; + break; + } +} + +static void ME_RTFSpecialCharHook(RTF_Info *info) +{ + RTFTable *tableDef = info->tableDef; + switch (info->rtfMinor) + { + case rtfNestCell: + if (info->editor->bEmulateVersion10) /* v1.0 - v3.0 */ + break; + /* else fall through since v4.1 treats rtfNestCell and rtfCell the same */ + case rtfCell: + if (!tableDef) + break; + RTFFlushOutputBuffer(info); + if (!info->editor->bEmulateVersion10) { /* v4.1 */ + if (tableDef->tableRowStart) + { + if (!info->nestingLevel && + tableDef->tableRowStart->member.para.nFlags & MEPF_ROWEND) + { + ME_DisplayItem *para = tableDef->tableRowStart; + para = para->member.para.next_para; + para = ME_InsertTableRowStartAtParagraph(info->editor, para); + tableDef->tableRowStart = para; + info->nestingLevel = 1; + } + ME_InsertTableCellFromCursor(info->editor); + } + } else { /* v1.0 - v3.0 */ + ME_DisplayItem *para = ME_GetParagraph(info->editor->pCursors[0].pRun); + PARAFORMAT2 *pFmt = para->member.para.pFmt; + if (pFmt->dwMask & PFM_TABLE && pFmt->wEffects & PFE_TABLE && + tableDef->numCellsInserted < tableDef->numCellsDefined) + { + WCHAR tab = '\t'; + ME_InsertTextFromCursor(info->editor, 0, &tab, 1, info->style); + tableDef->numCellsInserted++; + } + } + break; + case rtfNestRow: + if (info->editor->bEmulateVersion10) /* v1.0 - v3.0 */ + break; + /* else fall through since v4.1 treats rtfNestRow and rtfRow the same */ + case rtfRow: + { + ME_DisplayItem *para, *cell, *run; + int i; + + if (!tableDef) + break; + RTFFlushOutputBuffer(info); + if (!info->editor->bEmulateVersion10) { /* v4.1 */ + if (!tableDef->tableRowStart) + break; + if (!info->nestingLevel && + tableDef->tableRowStart->member.para.nFlags & MEPF_ROWEND) + { + para = tableDef->tableRowStart; + para = para->member.para.next_para; + para = ME_InsertTableRowStartAtParagraph(info->editor, para); + tableDef->tableRowStart = para; + info->nestingLevel++; + } + para = tableDef->tableRowStart; + cell = ME_FindItemFwd(para, diCell); + assert(cell && !cell->member.cell.prev_cell); + if (tableDef->numCellsDefined < 1) + { + /* 2000 twips appears to be the cell size that native richedit uses + * when no cell sizes are specified. */ + const int defaultCellSize = 2000; + int nRightBoundary = defaultCellSize; + cell->member.cell.nRightBoundary = nRightBoundary; + while (cell->member.cell.next_cell) { + cell = cell->member.cell.next_cell; + nRightBoundary += defaultCellSize; + cell->member.cell.nRightBoundary = nRightBoundary; + } + para = ME_InsertTableCellFromCursor(info->editor); + cell = para->member.para.pCell; + cell->member.cell.nRightBoundary = nRightBoundary; + } else { + for (i = 0; i < tableDef->numCellsDefined; i++) + { + RTFCell *cellDef = &tableDef->cells[i]; + cell->member.cell.nRightBoundary = cellDef->rightBoundary; + ME_ApplyBorderProperties(info, &cell->member.cell.border, + cellDef->border); + cell = cell->member.cell.next_cell; + if (!cell) + { + para = ME_InsertTableCellFromCursor(info->editor); + cell = para->member.para.pCell; + } + } + /* Cell for table row delimiter is empty */ + cell->member.cell.nRightBoundary = tableDef->cells[i-1].rightBoundary; + } + + run = ME_FindItemFwd(cell, diRun); + if (info->editor->pCursors[0].pRun != run || + info->editor->pCursors[0].nOffset) + { + int nOfs, nChars; + /* Delete inserted cells that aren't defined. */ + info->editor->pCursors[1].pRun = run; + info->editor->pCursors[1].nOffset = 0; + nOfs = ME_GetCursorOfs(info->editor, 1); + nChars = ME_GetCursorOfs(info->editor, 0) - nOfs; + ME_InternalDeleteText(info->editor, nOfs, nChars, TRUE); + } + + para = ME_InsertTableRowEndFromCursor(info->editor); + para->member.para.pFmt->dxOffset = abs(info->tableDef->gapH); + para->member.para.pFmt->dxStartIndent = info->tableDef->leftEdge; + ME_ApplyBorderProperties(info, ¶->member.para.border, + tableDef->border); + info->nestingLevel--; + if (!info->nestingLevel) + { + if (info->canInheritInTbl) { + tableDef->tableRowStart = para; + } else { + while (info->tableDef) { + tableDef = info->tableDef; + info->tableDef = tableDef->parent; + heap_free(tableDef); + } + } + } else { + info->tableDef = tableDef->parent; + heap_free(tableDef); + } + } else { /* v1.0 - v3.0 */ + WCHAR endl = '\r'; + ME_DisplayItem *para = ME_GetParagraph(info->editor->pCursors[0].pRun); + PARAFORMAT2 *pFmt = para->member.para.pFmt; + pFmt->dxOffset = info->tableDef->gapH; + pFmt->dxStartIndent = info->tableDef->leftEdge; + + para = ME_GetParagraph(info->editor->pCursors[0].pRun); + ME_ApplyBorderProperties(info, ¶->member.para.border, + tableDef->border); + while (tableDef->numCellsInserted < tableDef->numCellsDefined) + { + WCHAR tab = '\t'; + ME_InsertTextFromCursor(info->editor, 0, &tab, 1, info->style); + tableDef->numCellsInserted++; + } + pFmt->cTabCount = tableDef->numCellsDefined; + if (!tableDef->numCellsDefined) + pFmt->wEffects &= ~PFE_TABLE; + ME_InsertTextFromCursor(info->editor, 0, &endl, 1, info->style); + tableDef->numCellsInserted = 0; + } + break; + } + case rtfTab: + case rtfPar: + if (info->editor->bEmulateVersion10) { /* v1.0 - 3.0 */ + ME_DisplayItem *para; + PARAFORMAT2 *pFmt; + RTFFlushOutputBuffer(info); + para = ME_GetParagraph(info->editor->pCursors[0].pRun); + pFmt = para->member.para.pFmt; + if (pFmt->dwMask & PFM_TABLE && pFmt->wEffects & PFE_TABLE) + { + /* rtfPar is treated like a space within a table. */ + info->rtfClass = rtfText; + info->rtfMajor = ' '; + } + else if (info->rtfMinor == rtfPar && tableDef) + tableDef->numCellsInserted = 0; } - para->member.para.pLastCell->nRightBoundary = info->rtfParam; break; } } @@ -1001,11 +1376,8 @@ static void ME_RTFReadHook(RTF_Info *info) { ME_RTFTblAttrHook(info); break; case rtfSpecialChar: - if (info->rtfMinor == rtfCell) - { - RTFFlushOutputBuffer(info); - ME_InsertTableCellFromCursor(info->editor, 0); - } + ME_RTFSpecialCharHook(info); + break; } break; } @@ -1037,16 +1409,19 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre if ((format & SFF_SELECTION) && (editor->mode & TM_RICHTEXT)) { style = ME_GetSelectionInsertStyle(editor); - ME_InternalDeleteText(editor, from, to-from); + ME_InternalDeleteText(editor, from, to-from, FALSE); } else { + ME_DisplayItem *para_item; style = editor->pBuffer->pDefaultStyle; ME_AddRefStyle(style); SendMessageA(editor->hWnd, EM_SETSEL, 0, 0); - ME_InternalDeleteText(editor, 0, ME_GetTextLength(editor)); + ME_InternalDeleteText(editor, 0, ME_GetTextLength(editor), FALSE); from = to = 0; ME_ClearTempStyle(editor); - /* FIXME restore default paragraph formatting ! */ + + para_item = ME_GetParagraph(editor->pCursors[0].pRun); + ME_SetDefaultParaFormat(para_item->member.para.pFmt); } @@ -1080,6 +1455,8 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre if (!invalidRTF && !inStream.editstream->dwError) { if (format & SF_RTF) { + ME_DisplayItem *para; + /* setup the RTF parser */ memset(&parser, 0, sizeof parser); RTFSetEditStream(&parser, &inStream); @@ -1092,11 +1469,50 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre RTFSetReadHook(&parser, ME_RTFReadHook); RTFSetDestinationCallback(&parser, rtfPict, ME_RTFReadPictGroup); RTFSetDestinationCallback(&parser, rtfObject, ME_RTFReadObjectGroup); + if (!parser.editor->bEmulateVersion10) /* v4.1 */ + RTFSetDestinationCallback(&parser, rtfNoNestTables, RTFSkipGroup); BeginFile(&parser); /* do the parsing */ RTFRead(&parser); RTFFlushOutputBuffer(&parser); + if (!editor->bEmulateVersion10) { /* v4.1 */ + if (parser.tableDef && parser.tableDef->tableRowStart) + { + /* Delete any incomplete table row at the end of the rich text. */ + int nOfs, nChars; + ME_DisplayItem *pCell; + + para = parser.tableDef->tableRowStart; + + parser.rtfMinor = rtfRow; + /* Complete the table row before deleting it. + * By doing it this way we will have the current paragraph format set + * properly to reflect that is not in the complete table, and undo items + * will be added for this change to the current paragraph format. */ + if (parser.nestingLevel > 0) + { + while (parser.nestingLevel--) + ME_RTFSpecialCharHook(&parser); + } else if (parser.canInheritInTbl) { + ME_RTFSpecialCharHook(&parser); + } + if (parser.tableDef && parser.tableDef->tableRowStart && + para->member.para.nFlags & MEPF_ROWEND) + { + para = para->member.para.next_para; + } + pCell = para->member.para.pCell; + + editor->pCursors[1].pRun = ME_FindItemFwd(para, diRun); + editor->pCursors[1].nOffset = 0; + nOfs = ME_GetCursorOfs(editor, 1); + nChars = ME_GetCursorOfs(editor, 0) - nOfs; + ME_InternalDeleteText(editor, nOfs, nChars, TRUE); + parser.tableDef->tableRowStart = NULL; + } + } + ME_CheckTablesForCorruption(editor); RTFDestroy(&parser); if (parser.lpRichEditOle) IRichEditOle_Release(parser.lpRichEditOle); @@ -1117,7 +1533,7 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre ME_GetTextW(editor, lastchar, newto - linebreakSize, linebreakSize, 0); if (lastchar[0] == '\r' && (lastchar[1] == '\n' || lastchar[1] == '\0')) { - ME_InternalDeleteText(editor, newto - linebreakSize, linebreakSize); + ME_InternalDeleteText(editor, newto - linebreakSize, linebreakSize, FALSE); } } } @@ -1537,7 +1953,10 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey) { BOOL ctrl_is_down = GetKeyState(VK_CONTROL) & 0x8000; BOOL shift_is_down = GetKeyState(VK_SHIFT) & 0x8000; - + + if (nKey != VK_SHIFT && nKey != VK_CONTROL && nKey != VK_MENU) + editor->nSelectionType = stPosition; + switch (nKey) { case VK_LEFT: @@ -1573,10 +1992,17 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey) } else if (ME_ArrowKey(editor, VK_LEFT, FALSE, FALSE)) { - /* Backspace can be grouped for a single undo */ - ME_ContinueCoalescingTransaction(editor); - ME_DeleteTextAtCursor(editor, 1, 1); - ME_CommitCoalescingUndo(editor); + BOOL bDeletionSucceeded; + /* Backspace can be grouped for a single undo */ + ME_ContinueCoalescingTransaction(editor); + bDeletionSucceeded = ME_DeleteTextAtCursor(editor, 1, 1); + if (!bDeletionSucceeded && !editor->bEmulateVersion10) { /* v4.1 */ + /* Deletion was prevented so the cursor is moved back to where it was. + * (e.g. this happens when trying to delete cell boundaries) + */ + ME_ArrowKey(editor, VK_RIGHT, FALSE, FALSE); + } + ME_CommitCoalescingUndo(editor); } else return TRUE; @@ -1609,15 +2035,102 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey) return FALSE; } -static BOOL ME_SetCursor(ME_TextEditor *editor, int x) +/* Process the message and calculate the new click count. + * + * returns: The click count if it is mouse down event, else returns 0. */ +static int ME_CalculateClickCount(HWND hWnd, UINT msg, WPARAM wParam, + LPARAM lParam) { + static int clickNum = 0; + if (msg < WM_MOUSEFIRST || msg > WM_MOUSELAST) + return 0; + + if ((msg == WM_LBUTTONDBLCLK) || + (msg == WM_RBUTTONDBLCLK) || + (msg == WM_MBUTTONDBLCLK) || + (msg == WM_XBUTTONDBLCLK)) + { + msg -= (WM_LBUTTONDBLCLK - WM_LBUTTONDOWN); + } + + if ((msg == WM_LBUTTONDOWN) || + (msg == WM_RBUTTONDOWN) || + (msg == WM_MBUTTONDOWN) || + (msg == WM_XBUTTONDOWN)) + { + static MSG prevClickMsg; + MSG clickMsg; + clickMsg.hwnd = hWnd; + clickMsg.message = msg; + clickMsg.wParam = wParam; + clickMsg.lParam = lParam; + clickMsg.time = GetMessageTime(); + clickMsg.pt.x = (short)LOWORD(lParam); + clickMsg.pt.y = (short)HIWORD(lParam); + if ((clickNum != 0) && + (clickMsg.message == prevClickMsg.message) && + (clickMsg.hwnd == prevClickMsg.hwnd) && + (clickMsg.wParam == prevClickMsg.wParam) && + (clickMsg.time - prevClickMsg.time < GetDoubleClickTime()) && + (abs(clickMsg.pt.x - prevClickMsg.pt.x) < GetSystemMetrics(SM_CXDOUBLECLK)/2) && + (abs(clickMsg.pt.y - prevClickMsg.pt.y) < GetSystemMetrics(SM_CYDOUBLECLK)/2)) + { + clickNum++; + } else { + clickNum = 1; + } + prevClickMsg = clickMsg; + } else { + return 0; + } + return clickNum; +} + +static BOOL ME_SetCursor(ME_TextEditor *editor) +{ + POINT pt; + BOOL isExact; + int offset; + DWORD messagePos = GetMessagePos(); + pt.x = (short)LOWORD(messagePos); + pt.y = (short)HIWORD(messagePos); + ScreenToClient(editor->hWnd, &pt); if ((GetWindowLongW(editor->hWnd, GWL_STYLE) & ES_SELECTIONBAR) && - (x < editor->selofs || editor->linesel)) + (pt.x < editor->selofs || + (editor->nSelectionType == stLine && GetCapture() == editor->hWnd))) { SetCursor(hLeft); return TRUE; } - return FALSE; + offset = ME_CharFromPos(editor, pt.x, pt.y, &isExact); + if (isExact) + { + if (editor->AutoURLDetect_bEnable) + { + ME_Cursor cursor; + ME_Run *run; + ME_CursorFromCharOfs(editor, offset, &cursor); + run = &cursor.pRun->member.run; + if (editor->AutoURLDetect_bEnable && + run->style->fmt.dwMask & CFM_LINK && + run->style->fmt.dwEffects & CFE_LINK) + { + SetCursor(LoadCursorW(NULL, (WCHAR*)IDC_HAND)); + return TRUE; + } + } + if (ME_IsSelection(editor)) + { + int selStart, selEnd; + ME_GetSelection(editor, &selStart, &selEnd); + if (selStart <= offset && selEnd >= offset) { + SetCursor(LoadCursorW(NULL, (WCHAR*)IDC_ARROW)); + return TRUE; + } + } + } + SetCursor(LoadCursorW(NULL, (WCHAR*)IDC_IBEAM)); + return TRUE; } static BOOL ME_ShowContextMenu(ME_TextEditor *editor, int x, int y) @@ -1653,7 +2166,12 @@ ME_TextEditor *ME_MakeEditor(HWND hWnd) { ed->pBuffer = ME_MakeText(); ed->nZoomNumerator = ed->nZoomDenominator = 0; ME_MakeFirstParagraph(ed); - ed->bCaretShown = FALSE; + /* The four cursors are for: + * 0 - The position where the caret is shown + * 1 - The anchored end of the selection (for normal selection) + * 2 & 3 - The anchored start and end respectively for word, line, + * or paragraph selection. + */ ed->nCursors = 4; ed->pCursors = ALLOC_N_OBJ(ME_Cursor, ed->nCursors); ed->pCursors[0].pRun = ME_FindItemFwd(ed->pBuffer->pFirst, diRun); @@ -1700,7 +2218,7 @@ ME_TextEditor *ME_MakeEditor(HWND hWnd) { ed->selofs = SELECTIONBAR_WIDTH; else ed->selofs = 0; - ed->linesel = 0; + ed->nSelectionType = stPosition; if (GetWindowLongW(hWnd, GWL_STYLE) & ES_PASSWORD) ed->cPasswordMask = '*'; @@ -1709,6 +2227,15 @@ ME_TextEditor *ME_MakeEditor(HWND hWnd) { ed->notified_cr.cpMin = ed->notified_cr.cpMax = 0; + /* Default vertical scrollbar information */ + ed->vert_si.cbSize = sizeof(SCROLLINFO); + ed->vert_si.nMin = 0; + ed->vert_si.nMax = 0; + ed->vert_si.nPage = 0; + ed->vert_si.nPos = 0; + + OleInitialize(NULL); + return ed; } @@ -1777,6 +2304,7 @@ void ME_DestroyEditor(ME_TextEditor *editor) DeleteObject(editor->hbrBackground); if(editor->lpOleCallback) IUnknown_Release(editor->lpOleCallback); + OleUninitialize(); FREE_OBJ(editor->pBuffer); FREE_OBJ(editor->pCursors); @@ -1996,10 +2524,9 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, UNSUPPORTED_MSG(EM_SETWORDBREAKPROCEX) UNSUPPORTED_MSG(WM_STYLECHANGING) UNSUPPORTED_MSG(WM_STYLECHANGED) -/* UNSUPPORTED_MSG(WM_UNICHAR) FIXME missing in Wine headers */ - + /* Messages specific to Richedit controls */ - + case EM_STREAMIN: return ME_StreamIn(editor, wParam, (EDITSTREAM*)lParam, TRUE); case EM_STREAMOUT: @@ -2134,6 +2661,8 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, ME_InvalidateSelection(editor); ME_SetSelection(editor, wParam, lParam); ME_InvalidateSelection(editor); + HideCaret(editor->hWnd); + ME_ShowCaret(editor); ME_SendSelChange(editor); return 0; } @@ -2166,6 +2695,8 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, ME_InvalidateSelection(editor); end = ME_SetSelection(editor, range.cpMin, range.cpMax); ME_InvalidateSelection(editor); + HideCaret(editor->hWnd); + ME_ShowCaret(editor); ME_SendSelChange(editor); return end; @@ -2197,16 +2728,16 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, if (pStruct->flags & ST_SELECTION) { ME_GetSelection(editor, &from, &to); style = ME_GetSelectionInsertStyle(editor); - ME_InternalDeleteText(editor, from, to - from); + ME_InternalDeleteText(editor, from, to - from, FALSE); if (pStruct->codepage != 1200 && lParam && !strncmp((char *)lParam, "{\\rtf", 5)) - ME_StreamInRTFString(editor, 0, (char *)lParam); + ME_StreamInRTFString(editor, 1, (char *)lParam); else ME_InsertTextFromCursor(editor, 0, wszText, len, style); ME_ReleaseStyle(style); if (editor->AutoURLDetect_bEnable) ME_UpdateSelectionLinkAttribute(editor); } else { - ME_InternalDeleteText(editor, 0, ME_GetTextLength(editor)); + ME_InternalDeleteText(editor, 0, ME_GetTextLength(editor), FALSE); if (pStruct->codepage != 1200 && lParam && !strncmp((char *)lParam, "{\\rtf", 5)) ME_StreamInRTFString(editor, 0, (char *)lParam); else ME_InsertTextFromCursor(editor, 0, wszText, len, editor->pBuffer->pDefaultStyle); @@ -2328,13 +2859,15 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, return tmp.dwMask; } case EM_SETPARAFORMAT: - ME_SetSelectionParaFormat(editor, (PARAFORMAT2 *)lParam); + { + BOOL result = ME_SetSelectionParaFormat(editor, (PARAFORMAT2 *)lParam); ME_RewrapRepaint(editor); ME_CommitUndo(editor); - return 0; + return result; + } case EM_GETPARAFORMAT: ME_GetSelectionParaFormat(editor, (PARAFORMAT2 *)lParam); - return 0; + return ((PARAFORMAT2 *)lParam)->dwMask; case EM_GETFIRSTVISIBLELINE: { ME_DisplayItem *p = editor->pBuffer->pFirst; @@ -2347,10 +2880,10 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, if (p->type == diTextEnd) break; if (p->type == diParagraph) { - ypara = p->member.para.nYPos; + ypara = p->member.para.pt.y; continue; } - ystart = ypara + p->member.row.nYPos; + ystart = ypara + p->member.row.pt.y; yend = ystart + p->member.row.nHeight; if (y < yend) { break; @@ -2374,7 +2907,7 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, { int from, to; ME_GetSelection(editor, &from, &to); - ME_InternalDeleteText(editor, from, to-from); + ME_InternalDeleteText(editor, from, to-from, FALSE); ME_CommitUndo(editor); ME_UpdateRepaint(editor); return 0; @@ -2389,7 +2922,7 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, ME_GetSelection(editor, &from, &to); style = ME_GetSelectionInsertStyle(editor); - ME_InternalDeleteText(editor, from, to-from); + ME_InternalDeleteText(editor, from, to-from, FALSE); ME_InsertTextFromCursor(editor, 0, wszText, len, style); ME_ReleaseStyle(style); /* drop temporary style if line end */ @@ -2416,7 +2949,7 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, nPos = ME_GetYScrollPos(editor); row = ME_RowStart(editor->pCursors[0].pRun); para = ME_GetParagraph(row); - top = para->member.para.nYPos + row->member.row.nYPos; + top = para->member.para.pt.y + row->member.row.pt.y; bottom = top + row->member.row.nHeight; if (top < nPos) /* caret above window */ @@ -2448,7 +2981,7 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, } case WM_SETTEXT: { - ME_InternalDeleteText(editor, 0, ME_GetTextLength(editor)); + ME_InternalDeleteText(editor, 0, ME_GetTextLength(editor), FALSE); if (lParam) { TRACE("WM_SETTEXT lParam==%lx\n",lParam); @@ -2548,7 +3081,7 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, } if (SUCCEEDED(hr) && msg == WM_CUT) { - ME_InternalDeleteText(editor, range.cpMin, range.cpMax-range.cpMin); + ME_InternalDeleteText(editor, range.cpMin, range.cpMax-range.cpMin, FALSE); ME_CommitUndo(editor); ME_UpdateRepaint(editor); } @@ -2914,7 +3447,7 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, case EM_SETZOOM: return ME_SetZoom(editor, wParam, lParam); case EM_CHARFROMPOS: - return ME_CharFromPos(editor, ((POINTL *)lParam)->x, ((POINTL *)lParam)->y); + return ME_CharFromPos(editor, ((POINTL *)lParam)->x, ((POINTL *)lParam)->y, NULL); case EM_POSFROMCHAR: { ME_DisplayItem *pRun; @@ -2933,10 +3466,10 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, assert(pRun->type == diRun); pt.y = pRun->member.run.pt.y; pt.x = pRun->member.run.pt.x + ME_PointFromChar(editor, &pRun->member.run, nOffset); - pt.y += ME_GetParagraph(pRun)->member.para.nYPos; + pt.y += ME_GetParagraph(pRun)->member.para.pt.y; } else { pt.x = 0; - pt.y = editor->pBuffer->pLast->member.para.nYPos; + pt.y = editor->pBuffer->pLast->member.para.pt.y; } pt.x += editor->selofs; @@ -2953,33 +3486,50 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, return (wParam >= 0x40000) ? 0 : MAKELONG( pt.x, pt.y ); } case WM_CREATE: + { + SCROLLINFO si; + GetClientRect(hWnd, &editor->rcFormat); if (GetWindowLongW(hWnd, GWL_STYLE) & WS_HSCROLL) { /* Squelch the default horizontal scrollbar it would make */ ShowScrollBar(editor->hWnd, SB_HORZ, FALSE); } + + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + if (GetWindowLongW(hWnd, GWL_STYLE) & ES_DISABLENOSCROLL) + si.fMask |= SIF_DISABLENOSCROLL; + si.nMax = (si.fMask & SIF_DISABLENOSCROLL) ? 1 : 0; + si.nMin = 0; + si.nPage = 0; + SetScrollInfo(hWnd, SB_VERT, &si, TRUE); + ME_CommitUndo(editor); ME_WrapMarkedParagraphs(editor); ME_MoveCaret(editor); return 0; + } case WM_DESTROY: ME_DestroyEditor(editor); SetWindowLongPtrW(hWnd, 0, 0); return 0; + case WM_SETCURSOR: + { + return ME_SetCursor(editor); + } case WM_LBUTTONDBLCLK: case WM_LBUTTONDOWN: { - int clickNum = (msg == WM_LBUTTONDBLCLK) ? 2 : 1; ME_CommitUndo(editor); /* End coalesced undos for typed characters */ if ((editor->nEventMask & ENM_MOUSEEVENTS) && !ME_FilterEvent(editor, msg, &wParam, &lParam)) return 0; SetFocus(hWnd); ME_LButtonDown(editor, (short)LOWORD(lParam), (short)HIWORD(lParam), - clickNum); + ME_CalculateClickCount(hWnd, msg, wParam, lParam)); SetCapture(hWnd); ME_LinkNotify(editor,msg,wParam,lParam); - if (!ME_SetCursor(editor, LOWORD(lParam))) goto do_default; + if (!ME_SetCursor(editor)) goto do_default; break; } case WM_MOUSEMOVE: @@ -2989,21 +3539,22 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, if (GetCapture() == hWnd) ME_MouseMove(editor, (short)LOWORD(lParam), (short)HIWORD(lParam)); ME_LinkNotify(editor,msg,wParam,lParam); - if (!ME_SetCursor(editor, LOWORD(lParam))) goto do_default; + /* Set cursor if mouse is captured, since WM_SETCURSOR won't be received. */ + if (GetCapture() == hWnd) + ME_SetCursor(editor); break; case WM_LBUTTONUP: if (GetCapture() == hWnd) ReleaseCapture(); + if (editor->nSelectionType == stDocument) + editor->nSelectionType = stPosition; if ((editor->nEventMask & ENM_MOUSEEVENTS) && !ME_FilterEvent(editor, msg, &wParam, &lParam)) return 0; else { - BOOL ret; - editor->linesel = 0; - ret = ME_SetCursor(editor, LOWORD(lParam)); + ME_SetCursor(editor); ME_LinkNotify(editor,msg,wParam,lParam); - if (!ret) goto do_default; } break; case WM_RBUTTONUP: @@ -3035,8 +3586,8 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, return 0; case WM_KILLFOCUS: ME_CommitUndo(editor); /* End coalesced undos for typed characters */ - ME_HideCaret(editor); editor->bHaveFocus = FALSE; + ME_HideCaret(editor); ME_SendOldNotify(editor, EN_KILLFOCUS); return 0; case WM_ERASEBKGND: @@ -3112,10 +3663,35 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, if (((unsigned)wstr)>=' ' || (wstr=='\r' && (GetWindowLongW(hWnd, GWL_STYLE) & ES_MULTILINE)) || wstr=='\t') { + int from, to; + BOOL ctrl_is_down = GetKeyState(VK_CONTROL) & 0x8000; + ME_GetSelection(editor, &from, &to); + if (wstr=='\t' + /* v4.1 allows tabs to be inserted with ctrl key down */ + && !(ctrl_is_down && !editor->bEmulateVersion10) + ) + { + ME_Cursor cursor = editor->pCursors[0]; + ME_DisplayItem *para; + BOOL bSelectedRow = FALSE; + + para = ME_GetParagraph(cursor.pRun); + if (ME_IsSelection(editor) && + cursor.pRun->member.run.nCharOfs + cursor.nOffset == 0 && + para->member.para.prev_para->type == diParagraph) + { + para = para->member.para.prev_para; + bSelectedRow = TRUE; + } + if (ME_IsInTable(para)) + { + ME_TabPressedInTable(editor, bSelectedRow); + ME_CommitUndo(editor); + return 0; + } + } /* FIXME maybe it would make sense to call EM_REPLACESEL instead ? */ /* WM_CHAR is restricted to nTextLimit */ - int from, to; - ME_GetSelection(editor, &from, &to); if(editor->nTextLimit > ME_GetTextLength(editor) - (to-from)) { ME_Style *style = ME_GetInsertStyle(editor, 0); @@ -3127,6 +3703,7 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, ME_InsertTextFromCursor(editor, 0, &wstr, 1, style); ME_ReleaseStyle(style); ME_CommitCoalescingUndo(editor); + SetCursor(NULL); } if (editor->AutoURLDetect_bEnable) ME_UpdateSelectionLinkAttribute(editor); @@ -3135,6 +3712,23 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, } return 0; } + case WM_UNICHAR: + if (unicode) + { + if(wParam == UNICODE_NOCHAR) return TRUE; + if(wParam <= 0x000fffff) + { + if(wParam > 0xffff) /* convert to surrogates */ + { + wParam -= 0x10000; + SendMessageW(editor->hWnd, WM_CHAR, (wParam >> 10) + 0xd800, 0); + SendMessageW(editor->hWnd, WM_CHAR, (wParam & 0x03ff) + 0xdc00, 0); + } + else SendMessageW(editor->hWnd, WM_CHAR, wParam, 0); + } + return 0; + } + break; case EM_STOPGROUPTYPING: ME_CommitUndo(editor); /* End coalesced undos for typed characters */ return 0; @@ -3429,6 +4023,7 @@ void ME_LinkNotify(ME_TextEditor *editor, UINT msg, WPARAM wParam, LPARAM lParam { int x,y; ME_Cursor tmpCursor; + BOOL isExact; int nCharOfs; /* The start of the clicked text. Absolute character offset */ ME_Run *tmpRun; @@ -3436,8 +4031,8 @@ void ME_LinkNotify(ME_TextEditor *editor, UINT msg, WPARAM wParam, LPARAM lParam ENLINK info; x = (short)LOWORD(lParam); y = (short)HIWORD(lParam); - nCharOfs = ME_CharFromPos(editor, x, y); - if (nCharOfs < 0) return; + nCharOfs = ME_CharFromPos(editor, x, y, &isExact); + if (!isExact) return; ME_CursorFromCharOfs(editor, nCharOfs, &tmpCursor); tmpRun = &tmpCursor.pRun->member.run; @@ -3513,7 +4108,12 @@ int ME_GetTextW(ME_TextEditor *editor, WCHAR *buffer, int nStart, int nChars, in if (nLen > nChars) nLen = nChars; - if (item->member.run.nFlags & MERF_ENDPARA) + if (item->member.run.nFlags & MERF_ENDCELL && + item->member.run.nFlags & MERF_ENDPARA) + { + *buffer = '\t'; + } + else if (item->member.run.nFlags & MERF_ENDPARA) { if (!ME_FindItemFwd(item, diRun)) /* No '\r' is appended to the last paragraph. */ @@ -3525,10 +4125,16 @@ int ME_GetTextW(ME_TextEditor *editor, WCHAR *buffer, int nStart, int nChars, in if (bCRLF) { /* richedit 2.0 case - actual line-break is \r but should report \r\n */ - assert(nLen == 1); + if (ME_GetParagraph(item)->member.para.nFlags & (MEPF_ROWSTART|MEPF_ROWEND)) + assert(nLen == 2); + else + assert(nLen == 1); *buffer++ = '\r'; *buffer = '\n'; /* Later updated by nLen==1 at the end of the loop */ - nWritten++; + if (nLen == 1) + nWritten++; + else + buffer--; } else { diff --git a/reactos/dll/win32/riched20/editor.h b/reactos/dll/win32/riched20/editor.h index a23fb8b3972..5e6f4cb502c 100644 --- a/reactos/dll/win32/riched20/editor.h +++ b/reactos/dll/win32/riched20/editor.h @@ -84,7 +84,6 @@ ME_DisplayItem *ME_FindItemFwdOrHere(ME_DisplayItem *di, ME_DIType nTypeOrClass) BOOL ME_DITypesEqual(ME_DIType type, ME_DIType nTypeOrClass); ME_DisplayItem *ME_MakeDI(ME_DIType type); void ME_DestroyDisplayItem(ME_DisplayItem *item); -void ME_DestroyTableCellList(ME_DisplayItem *item); void ME_DumpDocument(ME_TextBuffer *buffer); const char *ME_GetDITypeName(ME_DIType type); @@ -176,14 +175,14 @@ void ME_SetDefaultCharFormat(ME_TextEditor *editor, CHARFORMAT2W *mod); /* caret.c */ int ME_SetSelection(ME_TextEditor *editor, int from, int to); -void ME_SelectWord(ME_TextEditor *editor); +void ME_SelectByType(ME_TextEditor *editor, ME_SelectionType selectionType); void ME_HideCaret(ME_TextEditor *ed); void ME_ShowCaret(ME_TextEditor *ed); void ME_MoveCaret(ME_TextEditor *ed); -int ME_CharFromPos(ME_TextEditor *editor, int x, int y); +int ME_CharFromPos(ME_TextEditor *editor, int x, int y, BOOL *isExact); void ME_LButtonDown(ME_TextEditor *editor, int x, int y, int clickNum); void ME_MouseMove(ME_TextEditor *editor, int x, int y); -void ME_DeleteTextAtCursor(ME_TextEditor *editor, int nCursor, int nChars); +BOOL ME_DeleteTextAtCursor(ME_TextEditor *editor, int nCursor, int nChars); void ME_InsertTextFromCursor(ME_TextEditor *editor, int nCursor, const WCHAR *str, int len, ME_Style *style); void ME_InsertEndRowFromCursor(ME_TextEditor *editor, int nCursor); @@ -199,8 +198,7 @@ BOOL ME_IsSelection(ME_TextEditor *editor); void ME_DeleteSelection(ME_TextEditor *editor); void ME_SendSelChange(ME_TextEditor *editor); void ME_InsertOLEFromCursor(ME_TextEditor *editor, const REOBJECT* reo, int nCursor); -void ME_InsertTableCellFromCursor(ME_TextEditor *editor, int nCursor); -void ME_InternalDeleteText(ME_TextEditor *editor, int nOfs, int nChars); +BOOL ME_InternalDeleteText(ME_TextEditor *editor, int nOfs, int nChars, BOOL bForce); int ME_GetTextLength(ME_TextEditor *editor); int ME_GetTextLengthEx(ME_TextEditor *editor, const GETTEXTLENGTHEX *how); ME_Style *ME_GetSelectionInsertStyle(ME_TextEditor *editor); @@ -219,18 +217,20 @@ void ME_SendRequestResize(ME_TextEditor *editor, BOOL force); ME_DisplayItem *ME_GetParagraph(ME_DisplayItem *run); void ME_GetSelectionParas(ME_TextEditor *editor, ME_DisplayItem **para, ME_DisplayItem **para_end); void ME_MakeFirstParagraph(ME_TextEditor *editor); -ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *rp, ME_Style *style, int numCR, int numLF); -ME_DisplayItem *ME_JoinParagraphs(ME_TextEditor *editor, ME_DisplayItem *tp); +ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *rp, ME_Style *style, int numCR, int numLF, int paraFlags); +ME_DisplayItem *ME_JoinParagraphs(ME_TextEditor *editor, ME_DisplayItem *tp, + BOOL keepFirstParaFormat); void ME_DumpParaStyle(ME_Paragraph *s); void ME_DumpParaStyleToBuf(const PARAFORMAT2 *pFmt, char buf[2048]); -void ME_SetParaFormat(ME_TextEditor *editor, ME_DisplayItem *para, const PARAFORMAT2 *pFmt); -void ME_SetSelectionParaFormat(ME_TextEditor *editor, const PARAFORMAT2 *pFmt); +BOOL ME_SetParaFormat(ME_TextEditor *editor, ME_DisplayItem *para, const PARAFORMAT2 *pFmt); +BOOL ME_SetSelectionParaFormat(ME_TextEditor *editor, const PARAFORMAT2 *pFmt); void ME_GetParaFormat(ME_TextEditor *editor, const ME_DisplayItem *para, PARAFORMAT2 *pFmt); void ME_GetSelectionParaFormat(ME_TextEditor *editor, PARAFORMAT2 *pFmt); /* marks from first up to (but not including) last */ void ME_MarkForWrapping(ME_TextEditor *editor, ME_DisplayItem *first, const ME_DisplayItem *last); void ME_MarkForPainting(ME_TextEditor *editor, ME_DisplayItem *first, const ME_DisplayItem *last); void ME_MarkAllForWrapping(ME_TextEditor *editor); +void ME_SetDefaultParaFormat(PARAFORMAT2 *pFmt); /* paint.c */ void ME_PaintContent(ME_TextEditor *editor, HDC hDC, BOOL bOnlyNew, const RECT *rcUpdate); @@ -285,6 +285,21 @@ extern BOOL ME_IsCandidateAnURL(ME_TextEditor *editor, int sel_min, int sel_max) BOOL ME_UpdateLinkAttribute(ME_TextEditor *editor, int sel_min, int sel_max); void ME_UpdateSelectionLinkAttribute(ME_TextEditor *editor); +/* table.c */ +BOOL ME_IsInTable(ME_DisplayItem *pItem); +ME_DisplayItem *ME_InsertTableRowStartFromCursor(ME_TextEditor *editor); +ME_DisplayItem *ME_InsertTableRowStartAtParagraph(ME_TextEditor *editor, + ME_DisplayItem *para); +ME_DisplayItem *ME_InsertTableCellFromCursor(ME_TextEditor *editor); +ME_DisplayItem *ME_InsertTableRowEndFromCursor(ME_TextEditor *editor); +ME_DisplayItem *ME_GetTableRowEnd(ME_DisplayItem *para); +ME_DisplayItem *ME_GetTableRowStart(ME_DisplayItem *para); +void ME_CheckTablesForCorruption(ME_TextEditor *editor); +void ME_ProtectPartialTableDeletion(ME_TextEditor *editor, int nOfs,int *nChars); +void ME_TabPressedInTable(ME_TextEditor *editor, BOOL bSelectedRow); +struct RTFTable *ME_MakeTableDef(ME_TextEditor *editor); +void ME_InitTableDef(ME_TextEditor *editor, struct RTFTable *tableDef); + /* undo.c */ ME_UndoItem *ME_AddUndoItem(ME_TextEditor *editor, ME_DIType type, const ME_DisplayItem *pdi); void ME_CommitUndo(ME_TextEditor *editor); diff --git a/reactos/dll/win32/riched20/editstr.h b/reactos/dll/win32/riched20/editstr.h index cab52ad58ad..edbeb131834 100644 --- a/reactos/dll/win32/riched20/editstr.h +++ b/reactos/dll/win32/riched20/editstr.h @@ -67,27 +67,27 @@ typedef enum { diInvalid, diTextStart, /* start of the text buffer */ diParagraph, /* paragraph start */ + diCell, /* cell start */ diRun, /* run (sequence of chars with the same character format) */ diStartRow, /* start of the row (line of text on the screen) */ diTextEnd, /* end of the text buffer */ /********************* these below are meant for finding only *********************/ - diStartRowOrParagraph, /* 5 */ + diStartRowOrParagraph, /* 7 */ diStartRowOrParagraphOrEnd, diRunOrParagraph, diRunOrStartRow, diParagraphOrEnd, - diRunOrParagraphOrEnd, /* 10 */ + diRunOrParagraphOrEnd, /* 12 */ - diUndoInsertRun, /* 11 */ - diUndoDeleteRun, /* 12 */ - diUndoJoinParagraphs, /* 13 */ - diUndoSplitParagraph, /* 14 */ - diUndoSetParagraphFormat, /* 15 */ - diUndoSetCharFormat, /* 16 */ - diUndoEndTransaction, /* 17 - marks the end of a group of changes for undo */ - diUndoSetDefaultCharFormat, /* 18 */ - diUndoPotentialEndTransaction, /* 19 - allows grouping typed chars for undo */ + diUndoInsertRun, /* 13 */ + diUndoDeleteRun, /* 14 */ + diUndoJoinParagraphs, /* 15 */ + diUndoSplitParagraph, /* 16 */ + diUndoSetParagraphFormat, /* 17 */ + diUndoSetCharFormat, /* 18 */ + diUndoEndTransaction, /* 19 - marks the end of a group of changes for undo */ + diUndoPotentialEndTransaction, /* 20 - allows grouping typed chars for undo */ } ME_DIType; #define SELECTIONBAR_WIDTH 9 @@ -99,9 +99,9 @@ typedef enum { /* run is a tab (or, in future, any kind of content whose size is dependent on run position) */ #define MERF_TAB 0x002 /* run is a cell boundary */ -#define MERF_CELL 0x004 +#define MERF_ENDCELL 0x004 /* v4.1 */ -#define MERF_NONTEXT (MERF_GRAPHICS | MERF_TAB | MERF_CELL) +#define MERF_NONTEXT (MERF_GRAPHICS | MERF_TAB | MERF_ENDCELL) /* run is splittable (contains white spaces in the middle or end) */ #define MERF_SPLITTABLE 0x001000 @@ -121,6 +121,8 @@ typedef enum { #define MERF_ENDROW 0x200000 /* run is hidden */ #define MERF_HIDDEN 0x400000 +/* start of a table row has an empty paragraph that should be skipped over. */ +#define MERF_TABLESTART 0x800000 /* v4.1 */ /* runs with any of these flags set cannot be joined */ #define MERF_NOJOIN (MERF_GRAPHICS|MERF_TAB|MERF_ENDPARA|MERF_ENDROW) @@ -133,8 +135,12 @@ typedef enum { /******************************** para flags *************************/ /* this paragraph was already wrapped and hasn't changed, every change resets that flag */ -#define MEPF_REWRAP 1 -#define MEPF_REPAINT 2 +#define MEPF_REWRAP 0x01 +#define MEPF_REPAINT 0x02 +/* v4.1 */ +#define MEPF_CELL 0x04 /* The paragraph is nested in a cell */ +#define MEPF_ROWSTART 0x08 /* Hidden empty paragraph at the start of the row */ +#define MEPF_ROWEND 0x10 /* Visible empty paragraph at the end of the row */ /******************************** structures *************************/ @@ -149,7 +155,6 @@ typedef struct tagME_Run int nFlags; int nAscent, nDescent; /* pixels above/below baseline */ POINT pt; /* relative to para's position */ - struct tagME_TableCell *pCell; /* for MERF_CELL: points to respective cell in ME_Paragraph */ REOBJECT *ole_obj; /* FIXME: should be a union with strText (at least) */ int nCR; int nLF; /* for MERF_ENDPARA: number of \r and \n characters encoded by run */ } ME_Run; @@ -160,28 +165,47 @@ typedef struct tagME_Document { int last_wrapped_line; } ME_Document; -typedef struct tagME_TableCell +typedef struct tagME_Border { - int nRightBoundary; - struct tagME_TableCell *next; -} ME_TableCell; + int width; + COLORREF colorRef; +} ME_Border; + +typedef struct tagME_BorderRect +{ + ME_Border top; + ME_Border left; + ME_Border bottom; + ME_Border right; +} ME_BorderRect; typedef struct tagME_Paragraph { PARAFORMAT2 *pFmt; - - BOOL bTable; /* this paragraph is a table row */ - struct tagME_TableCell *pCells; /* list of cells and their properties */ - struct tagME_TableCell *pLastCell; /* points to the last cell in the list */ + + struct tagME_DisplayItem *pCell; /* v4.1 */ + ME_BorderRect border; int nCharOfs; int nFlags; - int nYPos, nHeight; + POINT pt; + int nHeight; int nLastPaintYPos, nLastPaintHeight; int nRows; struct tagME_DisplayItem *prev_para, *next_para, *document; } ME_Paragraph; +typedef struct tagME_Cell /* v4.1 */ +{ + int nNestingLevel; /* 0 for normal cells, and greater for nested cells */ + int nRightBoundary; + ME_BorderRect border; + POINT pt; + int nHeight, nWidth; + int yTextOffset; /* The text offset is caused by the largest top border. */ + struct tagME_DisplayItem *prev_cell, *next_cell, *parent_cell; +} ME_Cell; + typedef struct tagME_Row { int nHeight; @@ -189,7 +213,7 @@ typedef struct tagME_Row int nWidth; int nLMargin; int nRMargin; - int nYPos; + POINT pt; } ME_Row; /* the display item list layout is like this: @@ -211,6 +235,7 @@ typedef struct tagME_DisplayItem union { ME_Run run; ME_Row row; + ME_Cell cell; ME_Paragraph para; ME_Document doc; /* not used */ ME_Style *ustyle; /* used by diUndoSetCharFormat */ @@ -244,6 +269,14 @@ typedef enum { umAddBackToUndo } ME_UndoMode; +typedef enum { + stPosition = 0, + stWord, + stLine, + stParagraph, + stDocument +} ME_SelectionType; + typedef struct tagME_FontTableItem { BYTE bCharSet; WCHAR *szFaceName; @@ -276,6 +309,9 @@ typedef struct tagME_OutStream { COLORREF colortbl[STREAMOUT_COLORTBL_SIZE]; UINT nDefaultFont; UINT nDefaultCodePage; + /* nNestingLevel = 0 means we aren't in a cell, 1 means we are in a cell, + * an greater numbers mean we are in a cell nested within a cell. */ + UINT nNestingLevel; } ME_OutStream; typedef struct tagME_FontCacheItem @@ -292,7 +328,6 @@ typedef struct tagME_TextEditor { HWND hWnd; BOOL bEmulateVersion10; - BOOL bCaretShown; ME_TextBuffer *pBuffer; ME_Cursor *pCursors; int nCursors; @@ -333,10 +368,14 @@ typedef struct tagME_TextEditor BOOL bHaveFocus; /*for IME */ int imeStartIndex; - DWORD selofs, linesel, sely; + DWORD selofs; /* The size of the selection bar on the left side of control */ + ME_SelectionType nSelectionType; /* Track previous notified selection */ CHARRANGE notified_cr; + + /* Cache previously set vertical scrollbar info */ + SCROLLINFO vert_si; } ME_TextEditor; typedef struct tagME_Context diff --git a/reactos/dll/win32/riched20/list.c b/reactos/dll/win32/riched20/list.c index f5c5f42fd8d..4ddc54a9bfc 100644 --- a/reactos/dll/win32/riched20/list.c +++ b/reactos/dll/win32/riched20/list.c @@ -112,36 +112,20 @@ void ME_DestroyDisplayItem(ME_DisplayItem *item) { /* TRACE("type=%s\n", ME_GetDITypeName(item->type)); */ if (item->type==diParagraph || item->type == diUndoSetParagraphFormat) { FREE_OBJ(item->member.para.pFmt); - ME_DestroyTableCellList(item); } if (item->type==diRun || item->type == diUndoInsertRun) { if (item->member.run.ole_obj) ME_DeleteReObject(item->member.run.ole_obj); ME_ReleaseStyle(item->member.run.style); ME_DestroyString(item->member.run.strText); } - if (item->type==diUndoSetCharFormat || item->type==diUndoSetDefaultCharFormat) { + if (item->type==diUndoSetCharFormat) { ME_ReleaseStyle(item->member.ustyle); } - if (item->type==diUndoSplitParagraph) + if (item->type==diUndoSplitParagraph) { FREE_OBJ(item->member.para.pFmt); - FREE_OBJ(item); -} - -void -ME_DestroyTableCellList(ME_DisplayItem *item) -{ - if (item->member.para.pCells) - { - ME_TableCell *pCell = item->member.para.pCells; - ME_TableCell *pNext; - - while (pCell) { - pNext = pCell->next; - FREE_OBJ(pCell); - pCell = pNext; - } - item->member.para.pCells = NULL; + FREE_OBJ(item->member.para.pCell); } + FREE_OBJ(item); } ME_DisplayItem *ME_MakeDI(ME_DIType type) { @@ -151,8 +135,7 @@ ME_DisplayItem *ME_MakeDI(ME_DIType type) { item->prev = item->next = NULL; if (type == diParagraph || type == diUndoSplitParagraph) { item->member.para.pFmt = ALLOC_OBJ(PARAFORMAT2); - item->member.para.pFmt->cbSize = sizeof(PARAFORMAT2); - item->member.para.pFmt->dwMask = 0; + ME_SetDefaultParaFormat(item->member.para.pFmt); item->member.para.nFlags = MEPF_REWRAP; } @@ -165,6 +148,7 @@ const char *ME_GetDITypeName(ME_DIType type) { case diParagraph: return "diParagraph"; case diRun: return "diRun"; + case diCell: return "diCell"; case diTextStart: return "diTextStart"; case diTextEnd: return "diTextEnd"; case diStartRow: return "diStartRow"; @@ -176,7 +160,6 @@ const char *ME_GetDITypeName(ME_DIType type) case diUndoDeleteRun: return "diUndoDeleteRun"; case diUndoJoinParagraphs: return "diJoinParagraphs"; case diUndoSplitParagraph: return "diSplitParagraph"; - case diUndoSetDefaultCharFormat: return "diUndoSetDefaultCharFormat"; default: return "?"; } } @@ -192,8 +175,17 @@ void ME_DumpDocument(ME_TextBuffer *buffer) case diTextStart: TRACE("Start\n"); break; + case diCell: + TRACE("Cell(level=%d%s)\n", pItem->member.cell.nNestingLevel, + !pItem->member.cell.next_cell ? ", END" : + (!pItem->member.cell.prev_cell ? ", START" :"")); + break; case diParagraph: TRACE("Paragraph(ofs=%d)\n", pItem->member.para.nCharOfs); + if (pItem->member.para.nFlags & MEPF_ROWSTART) + TRACE(" - (Table Row Start)\n"); + if (pItem->member.para.nFlags & MEPF_ROWEND) + TRACE(" - (Table Row End)\n"); break; case diStartRow: TRACE(" - StartRow\n"); diff --git a/reactos/dll/win32/riched20/paint.c b/reactos/dll/win32/riched20/paint.c index a2bc7c52236..9cfc21ef640 100644 --- a/reactos/dll/win32/riched20/paint.c +++ b/reactos/dll/win32/riched20/paint.c @@ -32,13 +32,35 @@ void ME_PaintContent(ME_TextEditor *editor, HDC hDC, BOOL bOnlyNew, const RECT * yoffset = ME_GetYScrollPos(editor); ME_InitContext(&c, editor, hDC); SetBkMode(hDC, TRANSPARENT); - ME_MoveCaret(editor); + ME_MoveCaret(editor); /* Calls ME_WrapMarkedParagraphs */ item = editor->pBuffer->pFirst->next; c.pt.y -= yoffset; while(item != editor->pBuffer->pLast) { + int yTextOffset = 0; int ye; assert(item->type == diParagraph); - ye = c.pt.y + item->member.para.nHeight; + if (item->member.para.pCell + != item->member.para.next_para->member.para.pCell) + { + ME_Cell *cell = NULL; + cell = &ME_FindItemBack(item->member.para.next_para, diCell)->member.cell; + ye = cell->pt.y + cell->nHeight - yoffset; + } else { + ye = c.pt.y + item->member.para.nHeight; + } + if (!(item->member.para.nFlags & MEPF_ROWEND) && + item->member.para.pCell != item->member.para.prev_para->member.para.pCell) + { + ME_DisplayItem *cell; + if (item->member.para.prev_para->member.para.nFlags & MEPF_ROWSTART) + cell = item->member.para.pCell; + else + cell = item->member.para.prev_para->member.para.pCell; + assert(cell); + /* the border shifts the text down */ + yTextOffset = cell->member.cell.yTextOffset; + ye += yTextOffset; + } if (!bOnlyNew || (item->member.para.nFlags & MEPF_REPAINT)) { BOOL bPaint = (rcUpdate == NULL); @@ -46,12 +68,39 @@ void ME_PaintContent(ME_TextEditor *editor, HDC hDC, BOOL bOnlyNew, const RECT * bPaint = c.pt.ybottom && ye>rcUpdate->top; if (bPaint) { + c.pt.y += yTextOffset; ME_DrawParagraph(&c, item); - if (!rcUpdate || (rcUpdate->top<=c.pt.y && rcUpdate->bottom>=ye)) + if (!rcUpdate || (rcUpdate->top<=c.pt.y-yTextOffset && rcUpdate->bottom>=ye)) item->member.para.nFlags &= ~MEPF_REPAINT; } } - c.pt.y = ye; + if (item->member.para.pCell) + { + ME_Cell *cell = &item->member.para.pCell->member.cell; + ME_DisplayItem *next_para = item->member.para.next_para; + c.pt.x = cell->pt.x + cell->nWidth; + if (item->member.para.pCell == next_para->member.para.pCell && + !(next_para->member.para.nFlags & (MEPF_ROWSTART|MEPF_ROWEND))) + { + c.pt.y = ye; + } else { + if (next_para->member.para.nFlags & MEPF_ROWSTART) + { + cell = &ME_FindItemFwd(next_para, diCell)->member.cell; + } + else if (next_para->member.para.nFlags & MEPF_ROWEND) + { + cell = &cell->next_cell->member.cell; + } + else + { + cell = &next_para->member.para.pCell->member.cell; + } + c.pt.y = cell->pt.y - yoffset; + } + } else if (!(item->member.para.nFlags & MEPF_ROWSTART)) { + c.pt.y = ye; + } item = item->member.para.next_para; } if (c.pt.ydpi.cy * c->editor->nZoomNumerator / 1440 / c->editor->nZoomDenominator; } -static void ME_DrawTextWithStyle(ME_Context *c, int x, int y, LPCWSTR szText, int nChars, - ME_Style *s, int *width, int nSelFrom, int nSelTo, int ymin, int cy) { +static void ME_HighlightSpace(ME_Context *c, int x, int y, LPCWSTR szText, + int nChars, ME_Style *s, int width, + int nSelFrom, int nSelTo, int ymin, int cy) +{ + HDC hDC = c->hDC; + HGDIOBJ hOldFont = NULL; + SIZE sz; + int selWidth; + /* Only highlight if there is a selection in the run and when + * EM_HIDESELECTION is not being used to hide the selection. */ + if (nSelFrom >= nChars || nSelTo < 0 || nSelFrom >= nSelTo + || c->editor->bHideSelection) + return; + hOldFont = ME_SelectStyleFont(c, s); + if (width <= 0) + { + GetTextExtentPoint32W(hDC, szText, nChars, &sz); + width = sz.cx; + } + if (nSelFrom < 0) nSelFrom = 0; + if (nSelTo > nChars) nSelTo = nChars; + GetTextExtentPoint32W(hDC, szText, nSelFrom, &sz); + x += sz.cx; + if (nSelTo != nChars) + { + GetTextExtentPoint32W(hDC, szText+nSelFrom, nSelTo-nSelFrom, &sz); + selWidth = sz.cx; + } else { + selWidth = width - sz.cx; + } + ME_UnselectStyleFont(c, s, hOldFont); + + if (c->editor->bEmulateVersion10) + PatBlt(hDC, x, ymin, selWidth, cy, DSTINVERT); + else + { + RECT rect; + HBRUSH hBrush; + rect.left = x; + rect.top = ymin; + rect.right = x + selWidth; + rect.bottom = ymin + cy; + hBrush = CreateSolidBrush(GetSysColor(COLOR_HIGHLIGHT)); + FillRect(hDC, &rect, hBrush); + DeleteObject(hBrush); + } +} + +static void ME_DrawTextWithStyle(ME_Context *c, int x, int y, LPCWSTR szText, + int nChars, ME_Style *s, int width, + int nSelFrom, int nSelTo, int ymin, int cy) +{ HDC hDC = c->hDC; HGDIOBJ hOldFont; COLORREF rgbOld; int yOffset = 0, yTwipsOffset = 0; SIZE sz; COLORREF rgb; + HPEN hPen = NULL, hOldPen = NULL; + BOOL bHighlightedText = (nSelFrom < nChars && nSelTo >= 0 + && nSelFrom < nSelTo && !c->editor->bHideSelection); + int xSelStart = x, xSelEnd = x; + int *lpDx = NULL; + /* lpDx is only needed for tabs to make sure the underline done automatically + * by the font extends to the end of the tab. Tabs are always stored as + * a single character run, so we can handle this case separately, since + * otherwise lpDx would need to specify the lengths of each character. */ + if (width && nChars == 1) + lpDx = &width; /* Make sure underline for tab extends across tab space */ hOldFont = ME_SelectStyleFont(c, s); - if ((s->fmt.dwMask & CFM_LINK) && (s->fmt.dwEffects & CFE_LINK)) - rgb = RGB(0,0,255); - else if ((s->fmt.dwMask & CFM_COLOR) && (s->fmt.dwEffects & CFE_AUTOCOLOR)) - rgb = GetSysColor(COLOR_WINDOWTEXT); - else - rgb = s->fmt.crTextColor; - rgbOld = SetTextColor(hDC, rgb); if ((s->fmt.dwMask & s->fmt.dwEffects) & CFM_OFFSET) { yTwipsOffset = s->fmt.yOffset; } @@ -186,12 +289,45 @@ static void ME_DrawTextWithStyle(ME_Context *c, int x, int y, LPCWSTR szText, in } if (yTwipsOffset) yOffset = ME_twips2pointsY(c, yTwipsOffset); - ExtTextOutW(hDC, x, y-yOffset, 0, NULL, szText, nChars, NULL); + + if ((s->fmt.dwMask & CFM_LINK) && (s->fmt.dwEffects & CFE_LINK)) + rgb = RGB(0,0,255); + else if ((s->fmt.dwMask & CFM_COLOR) && (s->fmt.dwEffects & CFE_AUTOCOLOR)) + rgb = GetSysColor(COLOR_WINDOWTEXT); + else + rgb = s->fmt.crTextColor; + + /* Determine the area that is selected in the run. */ GetTextExtentPoint32W(hDC, szText, nChars, &sz); - if (width) *width = sz.cx; + /* Treat width as an optional parameter. We can get the width from the + * text extent of the string if it isn't specified. */ + if (!width) width = sz.cx; + if (bHighlightedText) + { + if (nSelFrom <= 0) + { + nSelFrom = 0; + } + else + { + GetTextExtentPoint32W(hDC, szText, nSelFrom, &sz); + xSelStart = x + sz.cx; + } + if (nSelTo >= nChars) + { + nSelTo = nChars; + xSelEnd = x + width; + } + else + { + GetTextExtentPoint32W(hDC, szText+nSelFrom, nSelTo-nSelFrom, &sz); + xSelEnd = xSelStart + sz.cx; + } + } + + /* Choose the pen type for underlining the text. */ if (s->fmt.dwMask & CFM_UNDERLINETYPE) { - HPEN hPen; switch (s->fmt.bUnderlineType) { case CFU_UNDERLINE: @@ -210,27 +346,67 @@ static void ME_DrawTextWithStyle(ME_Context *c, int x, int y, LPCWSTR szText, in hPen = NULL; break; } - if (hPen != NULL) + if (hPen) { - HPEN hOldPen = SelectObject(hDC, hPen); - /* FIXME: should use textmetrics info for Descent info */ - MoveToEx(hDC, x, y - yOffset + 1, NULL); - LineTo(hDC, x + sz.cx, y - yOffset + 1); - SelectObject(hDC, hOldPen); - DeleteObject(hPen); + hOldPen = SelectObject(hDC, hPen); } } - if (nSelFrom < nChars && nSelTo >= 0 && nSelFromeditor->bEmulateVersion10) { - if (nSelFrom < 0) nSelFrom = 0; - if (nSelTo > nChars) nSelTo = nChars; - GetTextExtentPoint32W(hDC, szText, nSelFrom, &sz); - x += sz.cx; - GetTextExtentPoint32W(hDC, szText+nSelFrom, nSelTo-nSelFrom, &sz); - - /* Invert selection if not hidden by EM_HIDESELECTION */ - if (c->editor->bHideSelection == FALSE) - PatBlt(hDC, x, ymin, sz.cx, cy, DSTINVERT); + COLORREF rgbBackOld; + RECT dim; + /* FIXME: should use textmetrics info for Descent info */ + if (hPen) + MoveToEx(hDC, x, y - yOffset + 1, NULL); + if (xSelStart > x) + { + ExtTextOutW(hDC, x, y-yOffset, 0, NULL, szText, nSelFrom, NULL); + if (hPen) + LineTo(hDC, xSelStart, y - yOffset + 1); + } + dim.top = ymin; + dim.bottom = ymin + cy; + dim.left = xSelStart; + dim.right = xSelEnd; + SetTextColor(hDC, GetSysColor(COLOR_HIGHLIGHTTEXT)); + rgbBackOld = SetBkColor(hDC, GetSysColor(COLOR_HIGHLIGHT)); + ExtTextOutW(hDC, xSelStart, y-yOffset, ETO_OPAQUE, &dim, + szText+nSelFrom, nSelTo-nSelFrom, lpDx); + if (hPen) + LineTo(hDC, xSelEnd, y - yOffset + 1); + SetBkColor(hDC, rgbBackOld); + if (xSelEnd < x + width) + { + SetTextColor(hDC, rgb); + ExtTextOutW(hDC, xSelEnd, y-yOffset, 0, NULL, szText+nSelTo, + nChars-nSelTo, NULL); + if (hPen) + LineTo(hDC, x + width, y - yOffset + 1); + } + } + else + { + ExtTextOutW(hDC, x, y-yOffset, 0, NULL, szText, nChars, lpDx); + + /* FIXME: should use textmetrics info for Descent info */ + if (hPen) + { + MoveToEx(hDC, x, y - yOffset + 1, NULL); + LineTo(hDC, x + width, y - yOffset + 1); + } + + if (bHighlightedText) /* v1.0 inverts the selection */ + { + PatBlt(hDC, xSelStart, ymin, xSelEnd-xSelStart, cy, DSTINVERT); + } + } + + if (hPen) + { + SelectObject(hDC, hOldPen); + DeleteObject(hPen); } SetTextColor(hDC, rgbOld); ME_UnselectStyleFont(c, s, hOldFont); @@ -261,14 +437,28 @@ static void ME_DrawRun(ME_Context *c, int x, int y, ME_DisplayItem *rundi, ME_Pa ME_GetSelection(c->editor, &nSelFrom, &nSelTo); /* Draw selected end-of-paragraph mark */ - if (run->nFlags & MERF_ENDPARA && runofs >= nSelFrom && runofs < nSelTo) - ME_DrawTextWithStyle(c, x, y, wszSpace, 1, run->style, NULL, 0, 1, - c->pt.y + start->member.row.nYPos, - start->member.row.nHeight); - /* you can always comment it out if you need visible paragraph marks */ - if (run->nFlags & (MERF_ENDPARA | MERF_TAB | MERF_CELL)) + if (run->nFlags & MERF_ENDPARA) + { + if (runofs >= nSelFrom && runofs < nSelTo) + { + ME_HighlightSpace(c, x, y, wszSpace, 1, run->style, 0, 0, 1, + c->pt.y + start->member.row.pt.y, + start->member.row.nHeight); + } return; + } + + if (run->nFlags & (MERF_TAB | MERF_ENDCELL)) + { + /* wszSpace is used instead of the tab character because otherwise + * an unwanted symbol can be inserted instead. */ + ME_DrawTextWithStyle(c, x, y, wszSpace, 1, run->style, run->nWidth, + nSelFrom-runofs,nSelTo-runofs, + c->pt.y + start->member.row.pt.y, + start->member.row.nHeight); + return; + } if (run->nFlags & MERF_GRAPHICS) ME_DrawOLE(c, x, y, run, para, (runofs >= nSelFrom) && (runofs < nSelTo)); @@ -277,16 +467,16 @@ static void ME_DrawRun(ME_Context *c, int x, int y, ME_DisplayItem *rundi, ME_Pa if (c->editor->cPasswordMask) { ME_String *szMasked = ME_MakeStringR(c->editor->cPasswordMask,ME_StrVLen(run->strText)); - ME_DrawTextWithStyle(c, x, y, - szMasked->szData, ME_StrVLen(szMasked), run->style, NULL, - nSelFrom-runofs,nSelTo-runofs, c->pt.y+start->member.row.nYPos, start->member.row.nHeight); + ME_DrawTextWithStyle(c, x, y, + szMasked->szData, ME_StrVLen(szMasked), run->style, run->nWidth, + nSelFrom-runofs,nSelTo-runofs, c->pt.y+start->member.row.pt.y, start->member.row.nHeight); ME_DestroyString(szMasked); } else - ME_DrawTextWithStyle(c, x, y, - run->strText->szData, ME_StrVLen(run->strText), run->style, NULL, - nSelFrom-runofs,nSelTo-runofs, c->pt.y+start->member.row.nYPos, start->member.row.nHeight); - } + ME_DrawTextWithStyle(c, x, y, + run->strText->szData, ME_StrVLen(run->strText), run->style, run->nWidth, + nSelFrom-runofs,nSelTo-runofs, c->pt.y+start->member.row.pt.y, start->member.row.nHeight); + } } static const struct {unsigned width_num : 4, width_den : 4, pen_style : 4, dble : 1;} border_details[] = { @@ -375,14 +565,45 @@ static void ME_DrawParaDecoration(ME_Context* c, ME_Paragraph* para, int y, RECT { int idx, border_width, top_border, bottom_border; RECT rc; + BOOL hasParaBorder; SetRectEmpty(bounds); if (!(para->pFmt->dwMask & (PFM_BORDER | PFM_SPACEBEFORE | PFM_SPACEAFTER))) return; border_width = top_border = bottom_border = 0; idx = (para->pFmt->wBorders >> 8) & 0xF; - if ((para->pFmt->dwMask & PFM_BORDER) && idx != 0 && (para->pFmt->wBorders & 0xF)) + hasParaBorder = (!(c->editor->bEmulateVersion10 && + para->pFmt->dwMask & PFM_TABLE && + para->pFmt->wEffects & PFE_TABLE) && + (para->pFmt->dwMask & PFM_BORDER) && + idx != 0 && + (para->pFmt->wBorders & 0xF)); + if (hasParaBorder) { + /* FIXME: wBorders is not stored as MSDN says in v1.0 - 4.1 of richedit + * controls. It actually stores the paragraph or row border style. Although + * the value isn't used for drawing, it is used for streaming out rich text. + * + * wBorders stores the border style for each side (top, left, bottom, right) + * using nibble (4 bits) to store each border style. The rich text format + * control words, and their associated value are the following: + * \brdrdash 0 + * \brdrdashsm 1 + * \brdrdb 2 + * \brdrdot 3 + * \brdrhair 4 + * \brdrs 5 + * \brdrth 6 + * \brdrtriple 7 + * + * The order of the sides stored actually differs from v1.0 to 3.0 and v4.1. + * The mask corresponding to each side for the version are the following: + * mask v1.0-3.0 v4.1 + * 0x000F top left + * 0x00F0 left top + * 0x0F00 bottom right + * 0xF000 right bottom + */ if (para->pFmt->wBorders & 0x00B0) FIXME("Unsupported border flags %x\n", para->pFmt->wBorders); border_width = ME_GetParaBorderWidth(c->editor, para->pFmt->wBorders); @@ -410,7 +631,9 @@ static void ME_DrawParaDecoration(ME_Context* c, ME_Paragraph* para, int y, RECT FillRect(c->hDC, &rc, c->editor->hbrBackground); } - if ((para->pFmt->dwMask & PFM_BORDER) && idx != 0 && (para->pFmt->wBorders & 0xF)) { + /* Native richedit doesn't support paragraph borders in v1.0 - 4.1, + * but might support it in later versions. */ + if (hasParaBorder) { int pen_width; COLORREF pencr; HPEN pen = NULL, oldpen = NULL; @@ -489,49 +712,253 @@ static void ME_DrawParaDecoration(ME_Context* c, ME_Paragraph* para, int y, RECT } } +static void ME_DrawTableBorders(ME_Context *c, ME_DisplayItem *paragraph) +{ + ME_Paragraph *para = ¶graph->member.para; + if (!c->editor->bEmulateVersion10) /* v4.1 */ + { + if (para->pCell) + { + RECT rc; + ME_Cell *cell = ¶->pCell->member.cell; + ME_DisplayItem *paraAfterRow; + HPEN pen, oldPen; + LOGBRUSH logBrush; + HBRUSH brush; + COLORREF color; + POINT oldPt; + int width; + BOOL atTop = (para->pCell != para->prev_para->member.para.pCell); + BOOL atBottom = (para->pCell != para->next_para->member.para.pCell); + int top = (atTop ? cell->pt.y : para->pt.y) - ME_GetYScrollPos(c->editor); + int bottom = (atBottom ? + cell->pt.y + cell->nHeight - ME_GetYScrollPos(c->editor): + top + para->nHeight + (atTop ? cell->yTextOffset : 0)); + rc.left = cell->pt.x; + rc.right = rc.left + cell->nWidth; + if (atTop) { + /* Erase gap before text if not all borders are the same height. */ + width = max(ME_twips2pointsY(c, cell->border.top.width), 1); + rc.top = top + width; + width = cell->yTextOffset - width; + rc.bottom = rc.top + width; + if (width) { + FillRect(c->hDC, &rc, c->editor->hbrBackground); + } + } + /* Draw cell borders. + * The borders borders are draw in is left, top, bottom, right in order + * to be consistent with native richedit. This is noticeable from the + * overlap of borders of different colours. */ + if (!(para->nFlags & MEPF_ROWEND)) { + rc.top = top; + rc.bottom = bottom; + if (cell->border.left.width > 0) + { + color = cell->border.left.colorRef; + width = max(ME_twips2pointsX(c, cell->border.left.width), 1); + } else { + color = RGB(192,192,192); + width = 1; + } + logBrush.lbStyle = BS_SOLID; + logBrush.lbColor = color; + logBrush.lbHatch = 0; + pen = ExtCreatePen(PS_GEOMETRIC|PS_SOLID|PS_ENDCAP_FLAT|PS_JOIN_MITER, + width, &logBrush, 0, NULL); + oldPen = SelectObject(c->hDC, pen); + MoveToEx(c->hDC, rc.left, rc.top, &oldPt); + LineTo(c->hDC, rc.left, rc.bottom); + SelectObject(c->hDC, oldPen); + DeleteObject(pen); + MoveToEx(c->hDC, oldPt.x, oldPt.y, NULL); + } + + if (atTop) { + if (cell->border.top.width > 0) + { + brush = CreateSolidBrush(cell->border.top.colorRef); + width = max(ME_twips2pointsY(c, cell->border.top.width), 1); + } else { + brush = GetStockObject(LTGRAY_BRUSH); + width = 1; + } + rc.top = top; + rc.bottom = rc.top + width; + FillRect(c->hDC, &rc, brush); + if (cell->border.top.width > 0) + DeleteObject(brush); + } + + /* Draw the bottom border if at the last paragraph in the cell, and when + * in the last row of the table. */ + if (atBottom) { + int oldLeft = rc.left; + width = max(ME_twips2pointsY(c, cell->border.bottom.width), 1); + paraAfterRow = ME_GetTableRowEnd(paragraph)->member.para.next_para; + if (paraAfterRow->member.para.nFlags & MEPF_ROWSTART) { + ME_DisplayItem *nextEndCell; + nextEndCell = ME_FindItemBack(ME_GetTableRowEnd(paraAfterRow), diCell); + assert(nextEndCell && !nextEndCell->member.cell.next_cell); + rc.left = nextEndCell->member.cell.pt.x; + /* FIXME: Native draws FROM the bottom of the table rather than + * TO the bottom of the table in this case, but just doing so here + * will case the next row to erase the border. */ + /* + rc.top = bottom; + rc.bottom = rc.top + width; + */ + } + if (rc.left < rc.right) { + if (cell->border.bottom.width > 0) { + brush = CreateSolidBrush(cell->border.bottom.colorRef); + } else { + brush = GetStockObject(LTGRAY_BRUSH); + } + rc.bottom = bottom; + rc.top = rc.bottom - width; + FillRect(c->hDC, &rc, brush); + if (cell->border.bottom.width > 0) + DeleteObject(brush); + } + rc.left = oldLeft; + } + + /* Right border only drawn if at the end of the table row. */ + if (!cell->next_cell->member.cell.next_cell && + !(para->nFlags & MEPF_ROWSTART)) + { + rc.top = top; + rc.bottom = bottom; + if (cell->border.right.width > 0) { + color = cell->border.right.colorRef; + width = max(ME_twips2pointsX(c, cell->border.right.width), 1); + } else { + color = RGB(192,192,192); + width = 1; + } + logBrush.lbStyle = BS_SOLID; + logBrush.lbColor = color; + logBrush.lbHatch = 0; + pen = ExtCreatePen(PS_GEOMETRIC|PS_SOLID|PS_ENDCAP_FLAT|PS_JOIN_MITER, + width, &logBrush, 0, NULL); + oldPen = SelectObject(c->hDC, pen); + MoveToEx(c->hDC, rc.right - 1, rc.top, &oldPt); + LineTo(c->hDC, rc.right - 1, rc.bottom); + SelectObject(c->hDC, oldPen); + DeleteObject(pen); + MoveToEx(c->hDC, oldPt.x, oldPt.y, NULL); + } + } + } else { /* v1.0 - 3.0 */ + /* Draw simple table border */ + if (para->pFmt->dwMask & PFM_TABLE && para->pFmt->wEffects & PFE_TABLE) { + HPEN pen = NULL, oldpen = NULL; + int i, firstX, startX, endX, rowY, rowBottom, nHeight; + POINT oldPt; + PARAFORMAT2 *pNextFmt; + + pen = CreatePen(PS_SOLID, 0, para->border.top.colorRef); + oldpen = SelectObject(c->hDC, pen); + + /* Find the start relative to the text */ + firstX = ME_FindItemFwd(paragraph, diRun)->member.run.pt.x; + /* Go back by the horizontal gap, which is stored in dxOffset */ + firstX -= ME_twips2pointsX(c, para->pFmt->dxOffset); + /* The left edge, stored in dxStartIndent affected just the first edge */ + startX = firstX - ME_twips2pointsX(c, para->pFmt->dxStartIndent); + rowY = c->pt.y; + if (para->pFmt->dwMask & PFM_SPACEBEFORE) + rowY += ME_twips2pointsY(c, para->pFmt->dySpaceBefore); + nHeight = ME_FindItemFwd(paragraph, diStartRow)->member.row.nHeight; + rowBottom = rowY + nHeight; + + /* Draw horizontal lines */ + MoveToEx(c->hDC, firstX, rowY, &oldPt); + i = para->pFmt->cTabCount - 1; + endX = startX + ME_twips2pointsX(c, para->pFmt->rgxTabs[i] & 0x00ffffff) + 1; + LineTo(c->hDC, endX, rowY); + pNextFmt = para->next_para->member.para.pFmt; + /* The bottom of the row only needs to be drawn if the next row is + * not a table. */ + if (!(pNextFmt && pNextFmt->dwMask & PFM_TABLE && pNextFmt->wEffects && + para->nRows == 1)) + { + /* Decrement rowBottom to draw the bottom line within the row, and + * to not draw over this line when drawing the vertical lines. */ + rowBottom--; + MoveToEx(c->hDC, firstX, rowBottom, NULL); + LineTo(c->hDC, endX, rowBottom); + } + + /* Draw vertical lines */ + MoveToEx(c->hDC, firstX, rowY, NULL); + LineTo(c->hDC, firstX, rowBottom); + for (i = 0; i < para->pFmt->cTabCount; i++) + { + int rightBoundary = para->pFmt->rgxTabs[i] & 0x00ffffff; + endX = startX + ME_twips2pointsX(c, rightBoundary); + MoveToEx(c->hDC, endX, rowY, NULL); + LineTo(c->hDC, endX, rowBottom); + } + + MoveToEx(c->hDC, oldPt.x, oldPt.y, NULL); + SelectObject(c->hDC, oldpen); + DeleteObject(pen); + } + } +} + void ME_DrawParagraph(ME_Context *c, ME_DisplayItem *paragraph) { int align = SetTextAlign(c->hDC, TA_BASELINE); ME_DisplayItem *p; ME_Run *run; ME_Paragraph *para = NULL; - RECT rc, rcPara, bounds; + RECT rc, bounds; int y = c->pt.y; - int height = 0, baseline = 0, no=0, pno = 0; - int xs = 0, xe = 0; + int height = 0, baseline = 0, no=0; BOOL visible = FALSE; c->pt.x = c->rcView.left; - rcPara.left = c->rcView.left; - rcPara.right = c->rcView.right; + rc.left = c->rcView.left; + rc.right = c->rcView.right; for (p = paragraph; p!=paragraph->member.para.next_para; p = p->next) { switch(p->type) { case diParagraph: para = &p->member.para; assert(para); - pno = 0; - xs = c->rcView.left + ME_twips2pointsX(c, para->pFmt->dxStartIndent); - xe = c->rcView.right - ME_twips2pointsX(c, para->pFmt->dxRightIndent); + if (para->pCell) + { + ME_Cell *cell = ¶->pCell->member.cell; + rc.left = cell->pt.x; + rc.right = rc.left + cell->nWidth; + } + if (para->nFlags & MEPF_ROWSTART) { + ME_Cell *cell = ¶->next_para->member.para.pCell->member.cell; + rc.right = cell->pt.x; + } else if (para->nFlags & MEPF_ROWEND) { + ME_Cell *cell = ¶->prev_para->member.para.pCell->member.cell; + rc.left = cell->pt.x + cell->nWidth; + } ME_DrawParaDecoration(c, para, y, &bounds); y += bounds.top; break; case diStartRow: + /* we should have seen a diParagraph before */ + assert(para); y += height; - rcPara.top = y; - rcPara.bottom = y+p->member.row.nHeight; - visible = RectVisible(c->hDC, &rcPara); - if (visible) { - /* left margin */ - rc.left = c->rcView.left + bounds.left; - rc.right = xs; - rc.top = y; + rc.top = y; + if (para->nFlags & MEPF_ROWSTART) { + ME_Cell *cell = ¶->next_para->member.para.pCell->member.cell; + rc.bottom = y + cell->nHeight; + } else if (para->nFlags & MEPF_ROWEND) { + ME_Cell *cell = ¶->prev_para->member.para.pCell->member.cell; + rc.bottom = y + cell->nHeight; + } else { rc.bottom = y+p->member.row.nHeight; - FillRect(c->hDC, &rc, c->editor->hbrBackground); - /* right margin */ - rc.left = xe; - rc.right = c->rcView.right - bounds.right; - FillRect(c->hDC, &rc, c->editor->hbrBackground); - rc.left = xs; - rc.right = xe; + } + visible = RectVisible(c->hDC, &rc); + if (visible) { FillRect(c->hDC, &rc, c->editor->hbrBackground); } if (me_debug) @@ -543,11 +970,9 @@ void ME_DrawParagraph(ME_Context *c, ME_DisplayItem *paragraph) { pt.y = 12+y; ME_DebugWrite(c->hDC, &pt, buf); } - + height = p->member.row.nHeight; baseline = p->member.row.nBaseline; - if (!pno++) - xe += ME_twips2pointsX(c, para->pFmt->dxOffset); break; case diRun: assert(para); @@ -578,11 +1003,27 @@ void ME_DrawParagraph(ME_Context *c, ME_DisplayItem *paragraph) { } /* c->pt.x += p->member.run.nWidth; */ break; + case diCell: + /* Clear any space at the bottom of the cell after the text. */ + if (para->nFlags & MEPF_ROWSTART) + break; + y += height; + rc.top = y; + rc.bottom = p->member.cell.pt.y + p->member.cell.nHeight + - ME_GetYScrollPos(c->editor); + if (RectVisible(c->hDC, &rc)) + { + FillRect(c->hDC, &rc, c->editor->hbrBackground); + } + break; default: break; } no++; } + + ME_DrawTableBorders(c, paragraph); + SetTextAlign(c->hDC, align); } @@ -641,6 +1082,7 @@ void ME_Scroll(ME_TextEditor *editor, int value, int type) ME_Repaint(editor); } + editor->vert_si.nMax = 0; ME_UpdateScrollBar(editor); } @@ -663,6 +1105,14 @@ void ME_Scroll(ME_TextEditor *editor, int value, int type) bScrollBarWasVisible = ME_GetYScrollVisible(editor); bScrollBarWillBeVisible = editor->nHeight > editor->sizeWindow.cy; + si.fMask = SIF_PAGE | SIF_RANGE; + if (GetWindowLongW(hWnd, GWL_STYLE) & ES_DISABLENOSCROLL) + si.fMask |= SIF_DISABLENOSCROLL; + if ((si.fMask & SIF_DISABLENOSCROLL)) + { + bScrollBarWillBeVisible = TRUE; + } + if (bScrollBarWasVisible != bScrollBarWillBeVisible) { ShowScrollBar(hWnd, SB_VERT, bScrollBarWillBeVisible); @@ -670,17 +1120,27 @@ void ME_Scroll(ME_TextEditor *editor, int value, int type) ME_WrapMarkedParagraphs(editor); } - si.fMask = SIF_PAGE | SIF_RANGE; - if (GetWindowLongW(hWnd, GWL_STYLE) & ES_DISABLENOSCROLL) - si.fMask |= SIF_DISABLENOSCROLL; - si.nMin = 0; si.nMax = editor->nTotalLength; si.nPage = editor->sizeWindow.cy; - TRACE("min=%d max=%d page=%d\n", si.nMin, si.nMax, si.nPage); - SetScrollInfo(hWnd, SB_VERT, &si, TRUE); + if (!(si.nMin == editor->vert_si.nMin && si.nMax == editor->vert_si.nMax && si.nPage == editor->vert_si.nPage)) + { + TRACE("min=%d max=%d page=%d\n", si.nMin, si.nMax, si.nPage); + editor->vert_si.nMin = si.nMin; + editor->vert_si.nMax = si.nMax; + editor->vert_si.nPage = si.nPage; + if (bScrollBarWillBeVisible) + { + SetScrollInfo(hWnd, SB_VERT, &si, TRUE); + } + else + { + if (bScrollBarWasVisible && !(si.fMask & SIF_DISABLENOSCROLL)) + ShowScrollBar(hWnd, SB_VERT, FALSE); + } + } } int ME_GetYScrollPos(ME_TextEditor *editor) @@ -693,10 +1153,7 @@ int ME_GetYScrollPos(ME_TextEditor *editor) BOOL ME_GetYScrollVisible(ME_TextEditor *editor) { /* Returns true if the scrollbar is visible */ - SCROLLBARINFO sbi; - sbi.cbSize = sizeof(sbi); - GetScrollBarInfo(editor->hWnd, OBJID_VSCROLL, &sbi); - return ((sbi.rgstate[0] & STATE_SYSTEM_INVISIBLE) == 0); + return (editor->vert_si.nMax - editor->vert_si.nMin >= max(editor->vert_si.nPage - 1, 0)); } void ME_EnsureVisible(ME_TextEditor *editor, ME_DisplayItem *pRun) @@ -708,7 +1165,7 @@ void ME_EnsureVisible(ME_TextEditor *editor, ME_DisplayItem *pRun) assert(pRow); assert(pPara); - y = pPara->member.para.nYPos+pRow->member.row.nYPos; + y = pPara->member.para.pt.y+pRow->member.row.pt.y; yheight = pRow->member.row.nHeight; yold = ME_GetYScrollPos(editor); yrel = y - yold; diff --git a/reactos/dll/win32/riched20/para.c b/reactos/dll/win32/riched20/para.c index de69794c33d..dd745ffc18a 100644 --- a/reactos/dll/win32/riched20/para.c +++ b/reactos/dll/win32/riched20/para.c @@ -28,7 +28,6 @@ static const WCHAR wszParagraphSign[] = {0xB6, 0}; void ME_MakeFirstParagraph(ME_TextEditor *editor) { ME_Context c; - PARAFORMAT2 fmt; CHARFORMAT2W cf; LOGFONTW lf; HFONT hf; @@ -62,13 +61,6 @@ void ME_MakeFirstParagraph(ME_TextEditor *editor) cf.bPitchAndFamily = lf.lfPitchAndFamily; cf.bCharSet = lf.lfCharSet; - ZeroMemory(&fmt, sizeof(fmt)); - fmt.cbSize = sizeof(fmt); - fmt.dwMask = PFM_ALIGNMENT | PFM_OFFSET | PFM_STARTINDENT | PFM_RIGHTINDENT | PFM_TABSTOPS; - fmt.wAlignment = PFA_LEFT; - - *para->member.para.pFmt = fmt; - style = ME_MakeStyle(&cf); text->pDefaultStyle = style; @@ -112,17 +104,51 @@ void ME_MarkForPainting(ME_TextEditor *editor, ME_DisplayItem *first, const ME_D } } +static void ME_UpdateTableFlags(ME_DisplayItem *para) +{ + para->member.para.pFmt->dwMask |= PFM_TABLE|PFM_TABLEROWDELIMITER; + if (para->member.para.pCell) { + para->member.para.nFlags |= MEPF_CELL; + } else { + para->member.para.nFlags &= ~MEPF_CELL; + } + if (para->member.para.nFlags & MEPF_ROWEND) { + para->member.para.pFmt->wEffects |= PFE_TABLEROWDELIMITER; + } else { + para->member.para.pFmt->wEffects &= ~PFE_TABLEROWDELIMITER; + } + if (para->member.para.nFlags & (MEPF_ROWSTART|MEPF_CELL|MEPF_ROWEND)) + para->member.para.pFmt->wEffects |= PFE_TABLE; + else + para->member.para.pFmt->wEffects &= ~PFE_TABLE; +} + /* split paragraph at the beginning of the run */ -ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run, ME_Style *style, int numCR, int numLF) +ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run, + ME_Style *style, int numCR, int numLF, + int paraFlags) { ME_DisplayItem *next_para = NULL; ME_DisplayItem *run_para = NULL; ME_DisplayItem *new_para = ME_MakeDI(diParagraph); - ME_DisplayItem *end_run = ME_MakeRun(style,ME_MakeString(wszParagraphSign), MERF_ENDPARA); + ME_DisplayItem *end_run; ME_UndoItem *undo = NULL; int ofs; ME_DisplayItem *pp; int end_len = numCR + numLF; + int run_flags = MERF_ENDPARA; + if (!editor->bEmulateVersion10) { /* v4.1 */ + /* At most 1 of MEPF_CELL, MEPF_ROWSTART, or MEPF_ROWEND should be set. */ + assert(!(paraFlags & ~(MEPF_CELL|MEPF_ROWSTART|MEPF_ROWEND))); + assert(!(paraFlags & (paraFlags-1))); + if (paraFlags == MEPF_CELL) + run_flags |= MERF_ENDCELL; + else if (paraFlags == MEPF_ROWSTART) + run_flags |= MERF_TABLESTART|MERF_HIDDEN; + } else { /* v1.0 - v3.0 */ + assert(!(paraFlags & (MEPF_CELL|MEPF_ROWSTART|MEPF_ROWEND))); + } + end_run = ME_MakeRun(style,ME_MakeString(wszParagraphSign), run_flags); assert(run->type == diRun); @@ -147,40 +173,12 @@ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run, ME } new_para->member.para.nCharOfs = ME_GetParagraph(run)->member.para.nCharOfs+ofs; new_para->member.para.nCharOfs += end_len; - - new_para->member.para.nFlags = MEPF_REWRAP; /* FIXME copy flags (if applicable) */ + new_para->member.para.nFlags = MEPF_REWRAP; + /* FIXME initialize format style and call ME_SetParaFormat blah blah */ *new_para->member.para.pFmt = *run_para->member.para.pFmt; + new_para->member.para.border = run_para->member.para.border; - new_para->member.para.bTable = run_para->member.para.bTable; - - /* Inherit previous cell definitions if any */ - new_para->member.para.pCells = NULL; - if (run_para->member.para.pCells) - { - ME_TableCell *pCell, *pNewCell; - - for (pCell = run_para->member.para.pCells; pCell; pCell = pCell->next) - { - pNewCell = ALLOC_OBJ(ME_TableCell); - pNewCell->nRightBoundary = pCell->nRightBoundary; - pNewCell->next = NULL; - if (new_para->member.para.pCells) - new_para->member.para.pLastCell->next = pNewCell; - else - new_para->member.para.pCells = pNewCell; - new_para->member.para.pLastCell = pNewCell; - } - } - - /* fix paragraph properties. FIXME only needed when called from RTF reader */ - if (run_para->member.para.pCells && !run_para->member.para.bTable) - { - /* Paragraph does not have an \intbl keyword, so any table definition - * stored is invalid */ - ME_DestroyTableCellList(run_para); - } - /* insert paragraph into paragraph double linked list */ new_para->member.para.prev_para = run_para; new_para->member.para.next_para = next_para; @@ -191,6 +189,44 @@ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run, ME ME_InsertBefore(run, new_para); ME_InsertBefore(new_para, end_run); + if (!editor->bEmulateVersion10) { /* v4.1 */ + if (paraFlags & (MEPF_ROWSTART|MEPF_CELL)) + { + ME_DisplayItem *cell = ME_MakeDI(diCell); + ME_InsertBefore(new_para, cell); + new_para->member.para.pCell = cell; + cell->member.cell.next_cell = NULL; + if (paraFlags & MEPF_ROWSTART) + { + run_para->member.para.nFlags |= MEPF_ROWSTART; + cell->member.cell.prev_cell = NULL; + cell->member.cell.parent_cell = run_para->member.para.pCell; + if (run_para->member.para.pCell) + cell->member.cell.nNestingLevel = run_para->member.para.pCell->member.cell.nNestingLevel + 1; + else + cell->member.cell.nNestingLevel = 1; + } else { + cell->member.cell.prev_cell = run_para->member.para.pCell; + assert(cell->member.cell.prev_cell); + cell->member.cell.prev_cell->member.cell.next_cell = cell; + assert(run_para->member.para.nFlags & MEPF_CELL); + assert(!(run_para->member.para.nFlags & MEPF_ROWSTART)); + cell->member.cell.nNestingLevel = cell->member.cell.prev_cell->member.cell.nNestingLevel; + cell->member.cell.parent_cell = cell->member.cell.prev_cell->member.cell.parent_cell; + } + } else if (paraFlags & MEPF_ROWEND) { + run_para->member.para.nFlags |= MEPF_ROWEND; + run_para->member.para.pCell = run_para->member.para.pCell->member.cell.parent_cell; + new_para->member.para.pCell = run_para->member.para.pCell; + assert(run_para->member.para.prev_para->member.para.nFlags & MEPF_CELL); + assert(!(run_para->member.para.prev_para->member.para.nFlags & MEPF_ROWSTART)); + } else { + new_para->member.para.pCell = run_para->member.para.pCell; + } + ME_UpdateTableFlags(run_para); + ME_UpdateTableFlags(new_para); + } + /* force rewrap of the */ run_para->member.para.prev_para->member.para.nFlags |= MEPF_REWRAP; new_para->member.para.prev_para->member.para.nFlags |= MEPF_REWRAP; @@ -204,7 +240,8 @@ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run, ME /* join tp with tp->member.para.next_para, keeping tp's style; this * is consistent with the original */ -ME_DisplayItem *ME_JoinParagraphs(ME_TextEditor *editor, ME_DisplayItem *tp) +ME_DisplayItem *ME_JoinParagraphs(ME_TextEditor *editor, ME_DisplayItem *tp, + BOOL keepFirstParaFormat) { ME_DisplayItem *pNext, *pFirstRunInNext, *pRun, *pTmp; int i, shift; @@ -232,14 +269,53 @@ ME_DisplayItem *ME_JoinParagraphs(ME_TextEditor *editor, ME_DisplayItem *tp) ME_InitCharFormat2W(&fmt); ME_SetCharFormat(editor, pNext->member.para.nCharOfs - end_len, end_len, &fmt); } - undo = ME_AddUndoItem(editor, diUndoSplitParagraph, NULL); + undo = ME_AddUndoItem(editor, diUndoSplitParagraph, pNext); if (undo) { undo->nStart = pNext->member.para.nCharOfs - end_len; undo->nCR = pRun->member.run.nCR; undo->nLF = pRun->member.run.nLF; - assert(pNext->member.para.pFmt->cbSize == sizeof(PARAFORMAT2)); - *undo->di.member.para.pFmt = *pNext->member.para.pFmt; + } + if (!keepFirstParaFormat) + { + ME_AddUndoItem(editor, diUndoSetParagraphFormat, tp); + *tp->member.para.pFmt = *pNext->member.para.pFmt; + } + + if (!editor->bEmulateVersion10) { /* v4.1 */ + /* Table cell/row properties are always moved over from the removed para. */ + tp->member.para.nFlags = pNext->member.para.nFlags; + tp->member.para.pCell = pNext->member.para.pCell; + + /* Remove cell boundary if it is between the end paragraph run and the next + * paragraph display item. */ + pTmp = pRun->next; + while (pTmp != pNext) { + if (pTmp->type == diCell) + { + ME_Cell *pCell = &pTmp->member.cell; + if (undo) + { + assert(!(undo->di.member.para.nFlags & MEPF_ROWEND)); + if (!(undo->di.member.para.nFlags & MEPF_ROWSTART)) + undo->di.member.para.nFlags |= MEPF_CELL; + undo->di.member.para.pCell = ALLOC_OBJ(ME_DisplayItem); + *undo->di.member.para.pCell = *pTmp; + undo->di.member.para.pCell->next = NULL; + undo->di.member.para.pCell->prev = NULL; + undo->di.member.para.pCell->member.cell.next_cell = NULL; + undo->di.member.para.pCell->member.cell.prev_cell = NULL; + } + ME_Remove(pTmp); + if (pCell->prev_cell) + pCell->prev_cell->member.cell.next_cell = pCell->next_cell; + if (pCell->next_cell) + pCell->next_cell->member.cell.prev_cell = pCell->prev_cell; + ME_DestroyDisplayItem(pTmp); + break; + } + pTmp = pTmp->next; + } } shift = pNext->member.para.nCharOfs - tp->member.para.nCharOfs - end_len; @@ -355,7 +431,7 @@ void ME_DumpParaStyleToBuf(const PARAFORMAT2 *pFmt, char buf[2048]) #undef DUMP_EFFECT } -void ME_SetParaFormat(ME_TextEditor *editor, ME_DisplayItem *para, const PARAFORMAT2 *pFmt) +BOOL ME_SetParaFormat(ME_TextEditor *editor, ME_DisplayItem *para, const PARAFORMAT2 *pFmt) { PARAFORMAT2 copy; assert(sizeof(*para->member.para.pFmt) == sizeof(PARAFORMAT2)); @@ -375,7 +451,8 @@ void ME_SetParaFormat(ME_TextEditor *editor, ME_DisplayItem *para, const PARAFOR PFM_TABLE) /* we take for granted that PFE_xxx is the hiword of the corresponding PFM_xxx */ if (pFmt->dwMask & EFFECTS_MASK) { - para->member.para.pFmt->dwMask &= ~(pFmt->dwMask & EFFECTS_MASK); + para->member.para.pFmt->dwMask |= pFmt->dwMask & EFFECTS_MASK; + para->member.para.pFmt->wEffects &= ~HIWORD(pFmt->dwMask); para->member.para.pFmt->wEffects |= pFmt->wEffects & HIWORD(pFmt->dwMask); } #undef EFFECTS_MASK @@ -411,6 +488,8 @@ void ME_SetParaFormat(ME_TextEditor *editor, ME_DisplayItem *para, const PARAFOR if (memcmp(©, para->member.para.pFmt, sizeof(PARAFORMAT2))) para->member.para.nFlags |= MEPF_REWRAP; + + return TRUE; } @@ -438,7 +517,7 @@ ME_GetSelectionParas(ME_TextEditor *editor, ME_DisplayItem **para, ME_DisplayIte } -void ME_SetSelectionParaFormat(ME_TextEditor *editor, const PARAFORMAT2 *pFmt) +BOOL ME_SetSelectionParaFormat(ME_TextEditor *editor, const PARAFORMAT2 *pFmt) { ME_DisplayItem *para, *para_end; @@ -450,6 +529,8 @@ void ME_SetSelectionParaFormat(ME_TextEditor *editor, const PARAFORMAT2 *pFmt) break; para = para->member.para.next_para; } while(1); + + return TRUE; } void ME_GetParaFormat(ME_TextEditor *editor, const ME_DisplayItem *para, PARAFORMAT2 *pFmt) @@ -472,6 +553,7 @@ void ME_GetSelectionParaFormat(ME_TextEditor *editor, PARAFORMAT2 *pFmt) ME_GetParaFormat(editor, para, pFmt); if (para == para_end) return; + /* Invalidate values that change across the selected paragraphs. */ do { ZeroMemory(&tmp, sizeof(tmp)); tmp.cbSize = sizeof(tmp); @@ -480,8 +562,8 @@ void ME_GetSelectionParaFormat(ME_TextEditor *editor, PARAFORMAT2 *pFmt) #define CHECK_FIELD(m, f) \ if (pFmt->f != tmp.f) pFmt->dwMask &= ~(m); + pFmt->dwMask &= ~((pFmt->wEffects ^ tmp.wEffects) << 16); CHECK_FIELD(PFM_NUMBERING, wNumbering); - /* para->member.para.pFmt->wEffects = pFmt->wEffects; */ assert(tmp.dwMask & PFM_ALIGNMENT); CHECK_FIELD(PFM_NUMBERING, wNumbering); assert(tmp.dwMask & PFM_STARTINDENT); @@ -520,3 +602,13 @@ void ME_GetSelectionParaFormat(ME_TextEditor *editor, PARAFORMAT2 *pFmt) para = para->member.para.next_para; } while(1); } + +void ME_SetDefaultParaFormat(PARAFORMAT2 *pFmt) +{ + ZeroMemory(pFmt, sizeof(PARAFORMAT2)); + pFmt->cbSize = sizeof(PARAFORMAT2); + pFmt->dwMask = PFM_ALL2; + pFmt->wAlignment = PFA_LEFT; + pFmt->sStyle = -1; + pFmt->bOutlineLevel = TRUE; +} diff --git a/reactos/dll/win32/riched20/reader.c b/reactos/dll/win32/riched20/reader.c index f456a09fdc3..8801137bc96 100644 --- a/reactos/dll/win32/riched20/reader.c +++ b/reactos/dll/win32/riched20/reader.c @@ -169,6 +169,12 @@ RTFDestroy(RTF_Info *info) } RTFDestroyAttrs(info); heap_free(info->cpOutputBuffer); + while (info->tableDef) + { + RTFTable *tableDef = info->tableDef; + info->tableDef = tableDef->parent; + heap_free(tableDef); + } } @@ -235,6 +241,13 @@ void RTFInit(RTF_Info *info) info->dwMaxCPOutputCount = 0x1000; info->cpOutputBuffer = heap_alloc(info->dwMaxCPOutputCount); } + + if (info->tableDef) + ZeroMemory(info->tableDef, sizeof(info->tableDef)); + info->tableDef = NULL; + info->nestingLevel = 0; + info->canInheritInTbl = FALSE; + info->borderType = 0; } /* @@ -1438,6 +1451,8 @@ static RTFKey rtfKey[] = /* is this valid? */ { rtfSpecialChar, rtfCurHeadPict, "chpict", 0 }, { rtfSpecialChar, rtfUnicode, "u", 0 }, + { rtfSpecialChar, rtfNestCell, "nestcell", 0 }, + { rtfSpecialChar, rtfNestRow, "nestrow", 0 }, /* * Character formatting attributes @@ -1601,6 +1616,7 @@ static RTFKey rtfKey[] = { rtfParAttr, rtfDarkDiagHatchBgPat, "bgdkdcross", 0 }, { rtfParAttr, rtfBgPatLineColor, "cfpat", 0 }, { rtfParAttr, rtfBgPatColor, "cbpat", 0 }, + { rtfParAttr, rtfNestLevel, "itap", 0 }, /* * Section formatting attributes @@ -1903,6 +1919,8 @@ static RTFKey rtfKey[] = { rtfDestination, rtfIndexRange, "rxe", 0 }, { rtfDestination, rtfTOC, "tc", 0 }, { rtfDestination, rtfNeXTGraphic, "NeXTGraphic", 0 }, + { rtfDestination, rtfNestTableProps, "nesttableprops", 0 }, + { rtfDestination, rtfNoNestTables, "nonesttables", 0 }, /* * Font families @@ -2605,7 +2623,6 @@ static void SpecialChar (RTF_Info *info) break; case rtfPage: case rtfSect: - case rtfRow: case rtfPar: RTFPutUnicodeChar (info, '\r'); if (info->editor->bEmulateVersion10) RTFPutUnicodeChar (info, '\n'); diff --git a/reactos/dll/win32/riched20/riched20.rbuild b/reactos/dll/win32/riched20/riched20.rbuild index e01a41bb17b..49bcba6bbb3 100644 --- a/reactos/dll/win32/riched20/riched20.rbuild +++ b/reactos/dll/win32/riched20/riched20.rbuild @@ -22,6 +22,7 @@ run.c string.c style.c + table.c txtsrv.c undo.c wrap.c diff --git a/reactos/dll/win32/riched20/rtf.h b/reactos/dll/win32/riched20/rtf.h index 8b39f60f647..ec08161a94b 100644 --- a/reactos/dll/win32/riched20/rtf.h +++ b/reactos/dll/win32/riched20/rtf.h @@ -182,7 +182,9 @@ # define rtfTOC 72 # define rtfNeXTGraphic 73 # define rtfGenerator 74 -# define rtfMaxDestination 75 /* highest dest + 1 */ +# define rtfNestTableProps 75 +# define rtfNoNestTables 76 +# define rtfMaxDestination 77 /* highest dest + 1 */ # define rtfFontFamily 4 # define rtfFFNil 0 @@ -261,6 +263,8 @@ # define rtfCurHeadPict 57 /* valid? */ /*# define rtfCurAnnot 58*/ /* apparently not used */ # define rtfUnicode 58 /* no better category*/ +# define rtfNestCell 59 +# define rtfNestRow 60 # define rtfStyleAttr 7 # define rtfAdditive 0 /* new in 1.10 */ @@ -551,6 +555,7 @@ # define rtfDarkDiagHatchBgPat 101 # define rtfBgPatLineColor 102 # define rtfBgPatColor 103 +# define rtfNestLevel 104 # define rtfCharAttr 12 # define rtfPlain 0 @@ -945,7 +950,9 @@ typedef struct RTFFont RTFFont; typedef struct RTFColor RTFColor; typedef struct RTFStyle RTFStyle; typedef struct RTFStyleElt RTFStyleElt; - +typedef struct RTFBorder RTFBorder; +typedef struct RTFCell RTFCell; +typedef struct RTFTable RTFTable; struct RTFFont { @@ -1000,6 +1007,74 @@ struct RTFStyleElt RTFStyleElt *rtfNextSE; /* next element in style */ }; +struct RTFBorder +{ + int width; + int color; +}; + +struct RTFCell +{ + int rightBoundary; + RTFBorder border[4]; +}; + + +struct RTFTable +{ + RTFCell cells[MAX_TABLE_CELLS]; + int numCellsDefined; + + int gapH, leftEdge; + /* borders for the table row */ + RTFBorder border[6]; + + /* Used in v1.0 - v3.0 */ + int numCellsInserted; + + /* v4.1 */ + /* tableRowStart may be the start row paragraph of the table row, + * or it may store the end of the previous row if it may still be + * continued, otherwise NULL is stored. */ + ME_DisplayItem *tableRowStart; + + /* Table definitions are stored as a stack to support nested tables. */ + RTFTable *parent; +}; + + +# define RTFBorderTypeNone 0x00 +# define RTFBorderTypePara 0x10 /* for \brdrX control words */ +# define RTFBorderTypeRow 0x20 /* for \trbrdrX control words */ +# define RTFBorderTypeCell 0x30 /* for \clbrdrX control words */ +# define RTFBorderTypeMask 0xf0 + +/* The X in the control words \brdrX \trbrdrX and \clbrdrX mentioned above + * should be one of t, l, b, r which stand for top, left, bottom, right + * respectively. */ +# define RTFBorderSideTop 0x00 +# define RTFBorderSideLeft 0x01 +# define RTFBorderSideBottom 0x02 +# define RTFBorderSideRight 0x03 +# define RTFBorderSideHorizontal 0x04 +# define RTFBorderSideVertical 0x05 +# define RTFBorderSideMask 0x0f + +/* Here are the values from the border types and sides put together. */ +# define RTFBorderParaTop 0x10 +# define RTFBorderParaLeft 0x11 +# define RTFBorderParaBottom 0x12 +# define RTFBorderParaRight 0x13 +# define RTFBorderRowTop 0x20 +# define RTFBorderRowLeft 0x21 +# define RTFBorderRowBottom 0x22 +# define RTFBorderRowRight 0x23 +# define RTFBorderRowHorizontal 0x24 +# define RTFBorderRowVertical 0x25 +# define RTFBorderCellTop 0x30 +# define RTFBorderCellLeft 0x31 +# define RTFBorderCellBottom 0x32 +# define RTFBorderCellRight 0x33 /* * Return pointer to new element of type t, or NULL @@ -1105,6 +1180,11 @@ struct _RTF_Info { int stackTop; BOOL styleChanged; LPRICHEDITOLE lpRichEditOle; + + RTFTable *tableDef; + int nestingLevel; + BOOL canInheritInTbl; + int borderType; /* value corresponds to the RTFBorder constants. */ }; diff --git a/reactos/dll/win32/riched20/run.c b/reactos/dll/win32/riched20/run.c index 00285365976..bb34ad864ed 100644 --- a/reactos/dll/win32/riched20/run.c +++ b/reactos/dll/win32/riched20/run.c @@ -134,6 +134,9 @@ void ME_CheckCharOffsets(ME_TextEditor *editor) else ofs += ME_StrLen(p->member.run.strText); break; + case diCell: + TRACE_(richedit_check)("cell\n"); + break; default: assert(0); } @@ -436,7 +439,7 @@ void ME_UpdateRunFlags(ME_TextEditor *editor, ME_Run *run) { assert(run->nCharOfs != -1); - if (RUN_IS_HIDDEN(run)) + if (RUN_IS_HIDDEN(run) || run->nFlags & MERF_TABLESTART) run->nFlags |= MERF_HIDDEN; else run->nFlags &= ~MERF_HIDDEN; @@ -483,7 +486,8 @@ int ME_CharFromPoint(ME_Context *c, int cx, ME_Run *run) if (!run->strText->nLen) return 0; - if (run->nFlags & (MERF_TAB | MERF_CELL)) + if (run->nFlags & MERF_TAB || + (run->nFlags & (MERF_ENDCELL|MERF_ENDPARA)) == MERF_ENDCELL) { if (cx < run->nWidth/2) return 0; @@ -540,7 +544,7 @@ int ME_CharFromPointCursor(ME_TextEditor *editor, int cx, ME_Run *run) if (!run->strText->nLen) return 0; - if (run->nFlags & (MERF_TAB | MERF_CELL)) + if (run->nFlags & (MERF_TAB | MERF_ENDCELL)) { if (cx < run->nWidth/2) return 0; @@ -667,13 +671,21 @@ static SIZE ME_GetRunSizeCommon(ME_Context *c, const ME_Paragraph *para, ME_Run if (run->nFlags & MERF_TAB) { - int pos = 0, i = 0, ppos; + int pos = 0, i = 0, ppos, shift = 0; PARAFORMAT2 *pFmt = para->pFmt; + if (c->editor->bEmulateVersion10 && /* v1.0 - 3.0 */ + pFmt->dwMask & PFM_TABLE && pFmt->wEffects & PFE_TABLE) + /* The horizontal gap shifts the tab positions to leave the gap. */ + shift = pFmt->dxOffset * 2; do { if (i < pFmt->cTabCount) { - pos = pFmt->rgxTabs[i]&0x00FFFFFF; + /* Only one side of the horizontal gap is needed at the end of + * the table row. */ + if (i == pFmt->cTabCount -1) + shift = shift >> 1; + pos = shift + (pFmt->rgxTabs[i]&0x00FFFFFF); i++; } else @@ -697,11 +709,6 @@ static SIZE ME_GetRunSizeCommon(ME_Context *c, const ME_Paragraph *para, ME_Run /* descent is unchanged */ return size; } - if (run->nFlags & MERF_CELL) - { - size.cx = ME_twips2pointsX(c, run->pCell->nRightBoundary) - run->pt.x; - return size; - } return size; } @@ -832,17 +839,8 @@ void ME_SetCharFormat(ME_TextEditor *editor, int nOfs, int nChars, CHARFORMAT2W void ME_SetDefaultCharFormat(ME_TextEditor *editor, CHARFORMAT2W *mod) { ME_Style *style; - ME_UndoItem *undo; - /* FIXME: Should this be removed? It breaks a test. */ assert(mod->cbSize == sizeof(CHARFORMAT2W)); - undo = ME_AddUndoItem(editor, diUndoSetDefaultCharFormat, NULL); - if (undo) { - undo->nStart = -1; - undo->nLen = -1; - undo->di.member.ustyle = editor->pBuffer->pDefaultStyle; - ME_AddRefStyle(undo->di.member.ustyle); - } style = ME_ApplyStyle(editor->pBuffer->pDefaultStyle, mod); editor->pBuffer->pDefaultStyle->fmt = style->fmt; editor->pBuffer->pDefaultStyle->tm = style->tm; diff --git a/reactos/dll/win32/riched20/style.c b/reactos/dll/win32/riched20/style.c index 66e45f5a832..b7dae3e97a5 100644 --- a/reactos/dll/win32/riched20/style.c +++ b/reactos/dll/win32/riched20/style.c @@ -197,7 +197,10 @@ ME_Style *ME_ApplyStyle(ME_Style *sSrc, CHARFORMAT2W *style) COPY_STYLE_ITEM(CFM_LCID, lcid); COPY_STYLE_ITEM(CFM_OFFSET, yOffset); COPY_STYLE_ITEM(CFM_REVAUTHOR, bRevAuthor); - COPY_STYLE_ITEM(CFM_SIZE, yHeight); + if (style->dwMask & CFM_SIZE) { + s->fmt.dwMask |= CFM_SIZE; + s->fmt.yHeight = min(style->yHeight, yHeightCharPtsMost * 20); + } COPY_STYLE_ITEM(CFM_SPACING, sSpacing); COPY_STYLE_ITEM(CFM_STYLE, sStyle); COPY_STYLE_ITEM(CFM_UNDERLINETYPE, bUnderlineType); diff --git a/reactos/dll/win32/riched20/table.c b/reactos/dll/win32/riched20/table.c new file mode 100644 index 00000000000..248ea11719f --- /dev/null +++ b/reactos/dll/win32/riched20/table.c @@ -0,0 +1,618 @@ +/* + * RichEdit functions dealing with on tables + * + * Copyright 2008 by Dylan Smith + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/* + * The implementation of tables differs greatly between version 3.0 + * (in riched20.dll) and version 4.1 (in msftedit.dll) of richedit controls. + * Currently Wine is not distinguishing between version 3.0 and version 4.1, + * so v4.1 is assumed unless v1.0 is being emulated (i.e. riched32.dll is used). + * If this lack of distinction causes a bug in a Windows application, then Wine + * will need to start making this distinction. + * + * Richedit version 1.0 - 3.0: + * Tables are implemented in these versions using tabs at the end of cells, + * and tab stops to position the cells. The paragraph format flag PFE_TABLE + * will indicate the the paragraph is a table row. Note that in this + * implementation there is one paragraph per table row. + * + * Richedit version 4.1: + * Tables are implemented such that cells can contain multiple paragraphs, + * each with it's own paragraph format, and cells may even contain tables + * nested within the cell. + * + * There are is also a paragraph at the start of each table row that contains + * the rows paragraph format (e.g. to change the row alignment to row), and a + * paragraph at the end of the table row with the PFE_TABLEROWDELIMITER flag + * set. The paragraphs at the start and end of the table row should always be + * empty, but should have a length of 2. + * + * Wine implements this using display items (ME_DisplayItem) with a type of + * diCell. These cell display items store the cell properties, and are + * inserted into the editors linked list before each cell, and at the end of + * the last cell. The cell display item for a cell comes before the paragraphs + * for the cell, but the last cell display item refers to no cell, so it is + * just a delimiter. + */ + +#include "editor.h" +#include "rtf.h" + +WINE_DEFAULT_DEBUG_CHANNEL(richedit); +WINE_DECLARE_DEBUG_CHANNEL(richedit_lists); + +static ME_DisplayItem* ME_InsertEndParaFromCursor(ME_TextEditor *editor, + int nCursor, + int numCR, + int numLF, + int paraFlags) +{ + ME_Style *pStyle = ME_GetInsertStyle(editor, nCursor); + ME_DisplayItem *tp; + ME_Cursor* cursor = &editor->pCursors[nCursor]; + if (cursor->nOffset) { + ME_SplitRunSimple(editor, cursor->pRun, cursor->nOffset); + cursor = &editor->pCursors[nCursor]; + } + + tp = ME_SplitParagraph(editor, cursor->pRun, pStyle, numCR, numLF, paraFlags); + cursor->pRun = ME_FindItemFwd(tp, diRun); + return tp; +} + +ME_DisplayItem* ME_InsertTableRowStartFromCursor(ME_TextEditor *editor) +{ + ME_DisplayItem *para; + para = ME_InsertEndParaFromCursor(editor, 0, 1, 1, MEPF_ROWSTART); + return para->member.para.prev_para; +} + +ME_DisplayItem* ME_InsertTableRowStartAtParagraph(ME_TextEditor *editor, + ME_DisplayItem *para) +{ + ME_DisplayItem *prev_para, *end_para; + ME_Cursor savedCursor = editor->pCursors[0]; + ME_DisplayItem *startRowPara; + editor->pCursors[0].pRun = ME_FindItemFwd(para, diRun); + editor->pCursors[0].nOffset = 0; + editor->pCursors[1] = editor->pCursors[0]; + startRowPara = ME_InsertTableRowStartFromCursor(editor); + editor->pCursors[0] = savedCursor; + editor->pCursors[1] = editor->pCursors[0]; + + end_para = ME_GetParagraph(editor->pCursors[0].pRun)->member.para.next_para; + prev_para = startRowPara->member.para.next_para; + para = prev_para->member.para.next_para; + while (para != end_para) + { + para->member.para.pCell = prev_para->member.para.pCell; + para->member.para.nFlags |= MEPF_CELL; + para->member.para.nFlags &= ~(MEPF_ROWSTART|MEPF_ROWEND); + para->member.para.pFmt->dwMask |= PFM_TABLE|PFM_TABLEROWDELIMITER; + para->member.para.pFmt->wEffects |= PFE_TABLE; + para->member.para.pFmt->wEffects &= ~PFE_TABLEROWDELIMITER; + prev_para = para; + para = para->member.para.next_para; + } + return startRowPara; +} + +/* Inserts a diCell and starts a new paragraph for the next cell. + * + * Returns the first paragraph of the new cell. */ +ME_DisplayItem* ME_InsertTableCellFromCursor(ME_TextEditor *editor) +{ + ME_DisplayItem *para; + para = ME_InsertEndParaFromCursor(editor, 0, 1, 0, MEPF_CELL); + return para; +} + +ME_DisplayItem* ME_InsertTableRowEndFromCursor(ME_TextEditor *editor) +{ + ME_DisplayItem *para; + para = ME_InsertEndParaFromCursor(editor, 0, 1, 1, MEPF_ROWEND); + return para->member.para.prev_para; +} + +ME_DisplayItem* ME_GetTableRowEnd(ME_DisplayItem *para) +{ + ME_DisplayItem *cell; + assert(para); + if (para->member.para.nFlags & MEPF_ROWEND) + return para; + if (para->member.para.nFlags & MEPF_ROWSTART) + para = para->member.para.next_para; + cell = para->member.para.pCell; + assert(cell && cell->type == diCell); + while (cell->member.cell.next_cell) + cell = cell->member.cell.next_cell; + + para = ME_FindItemFwd(cell, diParagraph); + assert(para && para->member.para.nFlags & MEPF_ROWEND); + return para; +} + +ME_DisplayItem* ME_GetTableRowStart(ME_DisplayItem *para) +{ + ME_DisplayItem *cell; + assert(para); + if (para->member.para.nFlags & MEPF_ROWSTART) + return para; + if (para->member.para.nFlags & MEPF_ROWEND) + para = para->member.para.prev_para; + cell = para->member.para.pCell; + assert(cell && cell->type == diCell); + while (cell->member.cell.prev_cell) + cell = cell->member.cell.prev_cell; + + para = ME_FindItemBack(cell, diParagraph); + assert(para && para->member.para.nFlags & MEPF_ROWSTART); + return para; +} + +/* Make a bunch of assertions to make sure tables haven't been corrupted. + * + * These invariants may not hold true in the middle of streaming in rich text + * or during an undo and redo of streaming in rich text. It should be safe to + * call this method after an event is processed. + */ +void ME_CheckTablesForCorruption(ME_TextEditor *editor) +{ + if(TRACE_ON(richedit_lists)) + { + TRACE_(richedit_lists)("---\n"); + ME_DumpDocument(editor->pBuffer); + } +#ifndef NDEBUG + { + ME_DisplayItem *p, *pPrev; + pPrev = editor->pBuffer->pFirst; + p = pPrev->next; + if (!editor->bEmulateVersion10) /* v4.1 */ + { + while (p->type == diParagraph) + { + assert(p->member.para.pFmt->dwMask & PFM_TABLE); + assert(p->member.para.pFmt->dwMask & PFM_TABLEROWDELIMITER); + if (p->member.para.pCell) + { + assert(p->member.para.nFlags & MEPF_CELL); + assert(p->member.para.pFmt->wEffects & PFE_TABLE); + } + if (p->member.para.pCell != pPrev->member.para.pCell) + { + /* There must be a diCell in between the paragraphs if pCell changes. */ + ME_DisplayItem *pCell = ME_FindItemBack(p, diCell); + assert(pCell); + assert(ME_FindItemBack(p, diRun) == ME_FindItemBack(pCell, diRun)); + } + if (p->member.para.nFlags & MEPF_ROWEND) + { + /* ROWEND must come after a cell. */ + assert(pPrev->member.para.pCell); + assert(p->member.para.pCell + == pPrev->member.para.pCell->member.cell.parent_cell); + assert(p->member.para.pFmt->wEffects & PFE_TABLEROWDELIMITER); + } + else if (p->member.para.pCell) + { + assert(!(p->member.para.pFmt->wEffects & PFE_TABLEROWDELIMITER)); + assert(pPrev->member.para.pCell || + pPrev->member.para.nFlags & MEPF_ROWSTART); + if (pPrev->member.para.pCell && + !(pPrev->member.para.nFlags & MEPF_ROWSTART)) + { + assert(p->member.para.pCell->member.cell.parent_cell + == pPrev->member.para.pCell->member.cell.parent_cell); + if (pPrev->member.para.pCell != p->member.para.pCell) + assert(pPrev->member.para.pCell + == p->member.para.pCell->member.cell.prev_cell); + } + } + else if (!(p->member.para.nFlags & MEPF_ROWSTART)) + { + assert(!(p->member.para.pFmt->wEffects & (PFE_TABLE|PFE_TABLEROWDELIMITER))); + /* ROWSTART must be followed by a cell. */ + assert(!(p->member.para.nFlags & MEPF_CELL)); + /* ROWSTART must be followed by a cell. */ + assert(!(pPrev->member.para.nFlags & MEPF_ROWSTART)); + } + pPrev = p; + p = p->member.para.next_para; + } + } else { /* v1.0 - 3.0 */ + while (p->type == diParagraph) + { + assert(!(p->member.para.nFlags & (MEPF_ROWSTART|MEPF_ROWEND|MEPF_CELL))); + assert(p->member.para.pFmt->dwMask & PFM_TABLE); + assert(!(p->member.para.pFmt->wEffects & PFM_TABLEROWDELIMITER)); + assert(!p->member.para.pCell); + p = p->member.para.next_para; + } + return; + } + assert(p->type == diTextEnd); + assert(!pPrev->member.para.pCell); + } +#endif +} + +BOOL ME_IsInTable(ME_DisplayItem *pItem) +{ + PARAFORMAT2 *pFmt; + if (!pItem) + return FALSE; + if (pItem->type == diRun) + pItem = ME_GetParagraph(pItem); + if (pItem->type != diParagraph) + return FALSE; + pFmt = pItem->member.para.pFmt; + return pFmt->dwMask & PFM_TABLE && pFmt->wEffects & PFE_TABLE; +} + +/* Table rows should either be deleted completely or not at all. */ +void ME_ProtectPartialTableDeletion(ME_TextEditor *editor, int nOfs,int *nChars) +{ + ME_Cursor c, c2; + ME_DisplayItem *this_para, *end_para; + ME_CursorFromCharOfs(editor, nOfs, &c); + this_para = ME_GetParagraph(c.pRun); + ME_CursorFromCharOfs(editor, nOfs + *nChars, &c2); + end_para = ME_GetParagraph(c2.pRun); + if (c2.pRun->member.run.nFlags & MERF_ENDPARA) { + /* End offset might be in the middle of the end paragraph run. + * If this is the case, then we need to use the next paragraph as the last + * paragraphs. + */ + int remaining = nOfs + *nChars - c2.pRun->member.run.nCharOfs + - end_para->member.para.nCharOfs; + if (remaining) + { + assert(remaining < c2.pRun->member.run.nCR + c2.pRun->member.run.nLF); + end_para = end_para->member.para.next_para; + } + } + if (!editor->bEmulateVersion10) { /* v4.1 */ + if (this_para->member.para.pCell != end_para->member.para.pCell || + ((this_para->member.para.nFlags|end_para->member.para.nFlags) + & (MEPF_ROWSTART|MEPF_ROWEND))) + { + while (this_para != end_para) + { + ME_DisplayItem *next_para = this_para->member.para.next_para; + BOOL bTruancateDeletion = FALSE; + if (this_para->member.para.nFlags & MEPF_ROWSTART) { + /* The following while loop assumes that next_para is MEPF_ROWSTART, + * so moving back one paragraph let's it be processed as the start + * of the row. */ + next_para = this_para; + this_para = this_para->member.para.prev_para; + } else if (next_para->member.para.pCell != this_para->member.para.pCell + || this_para->member.para.nFlags & MEPF_ROWEND) + { + /* Start of the deletion from after the start of the table row. */ + bTruancateDeletion = TRUE; + } + while (!bTruancateDeletion && + next_para->member.para.nFlags & MEPF_ROWSTART) + { + next_para = ME_GetTableRowEnd(next_para)->member.para.next_para; + if (next_para->member.para.nCharOfs > nOfs + *nChars) + { + /* End of deletion is not past the end of the table row. */ + next_para = this_para->member.para.next_para; + /* Delete the end paragraph preceding the table row if the + * preceding table row will be empty. */ + if (this_para->member.para.nCharOfs >= nOfs) + { + next_para = next_para->member.para.next_para; + } + bTruancateDeletion = TRUE; + } else { + this_para = next_para->member.para.prev_para; + } + } + if (bTruancateDeletion) + { + ME_Run *end_run = &ME_FindItemBack(next_para, diRun)->member.run; + int nCharsNew = (next_para->member.para.nCharOfs - nOfs + - end_run->nCR - end_run->nLF); + nCharsNew = max(nCharsNew, 0); + assert(nCharsNew <= *nChars); + *nChars = nCharsNew; + break; + } + this_para = next_para; + } + } + } else { /* v1.0 - 3.0 */ + ME_DisplayItem *pRun; + int nCharsToBoundary; + + if (this_para->member.para.nCharOfs != nOfs && + this_para->member.para.pFmt->dwMask & PFM_TABLE && + this_para->member.para.pFmt->wEffects & PFE_TABLE) + { + pRun = c.pRun; + /* Find the next tab or end paragraph to use as a delete boundary */ + while (!(pRun->member.run.nFlags & (MERF_TAB|MERF_ENDPARA))) + pRun = ME_FindItemFwd(pRun, diRun); + nCharsToBoundary = pRun->member.run.nCharOfs + - c.pRun->member.run.nCharOfs + - c.nOffset; + *nChars = min(*nChars, nCharsToBoundary); + } else if (end_para->member.para.pFmt->dwMask & PFM_TABLE && + end_para->member.para.pFmt->wEffects & PFE_TABLE) + { + if (this_para == end_para) + { + pRun = c2.pRun; + /* Find the previous tab or end paragraph to use as a delete boundary */ + while (pRun && !(pRun->member.run.nFlags & (MERF_TAB|MERF_ENDPARA))) + pRun = ME_FindItemBack(pRun, diRun); + if (pRun && pRun->member.run.nFlags & MERF_ENDPARA) + { + /* We are in the first cell, and have gone back to the previous + * paragraph, so nothing needs to be protected. */ + pRun = NULL; + } + } else { + /* The deletion starts from before the row, so don't join it with + * previous non-empty paragraphs. */ + pRun = NULL; + if (nOfs > this_para->member.para.nCharOfs) + pRun = ME_FindItemBack(end_para, diRun); + if (!pRun) + pRun = ME_FindItemFwd(end_para, diRun); + } + if (pRun) + { + nCharsToBoundary = ME_GetParagraph(pRun)->member.para.nCharOfs + + pRun->member.run.nCharOfs + - nOfs; + if (nCharsToBoundary >= 0) + *nChars = min(*nChars, nCharsToBoundary); + } + } + if (*nChars < 0) + nChars = 0; + } +} + +static ME_DisplayItem* ME_AppendTableRow(ME_TextEditor *editor, + ME_DisplayItem *table_row) +{ + WCHAR endl = '\r', tab = '\t'; + ME_DisplayItem *run; + PARAFORMAT2 *pFmt; + int i; + + assert(table_row); + if (!editor->bEmulateVersion10) { /* v4.1 */ + ME_DisplayItem *insertedCell, *para, *cell; + cell = ME_FindItemFwd(table_row, diCell); + run = ME_GetTableRowEnd(table_row)->member.para.next_para; + run = ME_FindItemFwd(run, diRun); + editor->pCursors[0].pRun = run; + editor->pCursors[0].nOffset = 0; + editor->pCursors[1] = editor->pCursors[0]; + para = ME_InsertTableRowStartFromCursor(editor); + insertedCell = ME_FindItemFwd(para, diCell); + /* Copy cell properties */ + insertedCell->member.cell.nRightBoundary = cell->member.cell.nRightBoundary; + while (cell->member.cell.next_cell) { + cell = cell->member.cell.next_cell; + para = ME_InsertTableCellFromCursor(editor); + insertedCell = ME_FindItemBack(para, diCell); + /* Copy cell properties */ + insertedCell->member.cell.nRightBoundary = cell->member.cell.nRightBoundary; + }; + ME_InsertTableRowEndFromCursor(editor); + /* return the table row start for the inserted paragraph */ + return ME_FindItemFwd(cell, diParagraph)->member.para.next_para; + } else { /* v1.0 - 3.0 */ + run = ME_FindItemBack(table_row->member.para.next_para, diRun); + pFmt = table_row->member.para.pFmt; + assert(pFmt->dwMask & PFM_TABLE && pFmt->wEffects & PFE_TABLE); + editor->pCursors[0].pRun = run; + editor->pCursors[0].nOffset = 0; + editor->pCursors[1] = editor->pCursors[0]; + ME_InsertTextFromCursor(editor, 0, &endl, 1, run->member.run.style); + run = editor->pCursors[0].pRun; + for (i = 0; i < pFmt->cTabCount; i++) { + ME_InsertTextFromCursor(editor, 0, &tab, 1, run->member.run.style); + } + return table_row->member.para.next_para; + } +} + +/* Selects the next table cell or appends a new table row if at end of table */ +static void ME_SelectOrInsertNextCell(ME_TextEditor *editor, + ME_DisplayItem *run) +{ + ME_DisplayItem *para = ME_GetParagraph(run); + int i; + + assert(run && run->type == diRun); + assert(ME_IsInTable(run)); + if (!editor->bEmulateVersion10) { /* v4.1 */ + ME_DisplayItem *cell; + /* Get the initial cell */ + if (para->member.para.nFlags & MEPF_ROWSTART) { + cell = para->member.para.next_para->member.para.pCell; + } else if (para->member.para.nFlags & MEPF_ROWEND) { + cell = para->member.para.prev_para->member.para.pCell; + } else { + cell = para->member.para.pCell; + } + assert(cell); + /* Get the next cell. */ + if (cell->member.cell.next_cell && + cell->member.cell.next_cell->member.cell.next_cell) + { + cell = cell->member.cell.next_cell; + } else { + para = ME_GetTableRowEnd(ME_FindItemFwd(cell, diParagraph)); + para = para->member.para.next_para; + assert(para); + if (para->member.para.nFlags & MEPF_ROWSTART) { + cell = para->member.para.next_para->member.para.pCell; + } else { + /* Insert row */ + para = para->member.para.prev_para; + para = ME_AppendTableRow(editor, ME_GetTableRowStart(para)); + /* Put cursor at the start of the new table row */ + para = para->member.para.next_para; + editor->pCursors[0].pRun = ME_FindItemFwd(para, diRun); + editor->pCursors[0].nOffset = 0; + editor->pCursors[1] = editor->pCursors[0]; + ME_WrapMarkedParagraphs(editor); + return; + } + } + /* Select cell */ + editor->pCursors[1].pRun = ME_FindItemFwd(cell, diRun); + editor->pCursors[1].nOffset = 0; + assert(editor->pCursors[0].pRun); + cell = cell->member.cell.next_cell; + editor->pCursors[0].pRun = ME_FindItemBack(cell, diRun); + editor->pCursors[0].nOffset = 0; + assert(editor->pCursors[1].pRun); + } else { /* v1.0 - 3.0 */ + if (run->member.run.nFlags & MERF_ENDPARA && + ME_IsInTable(ME_FindItemFwd(run, diParagraphOrEnd))) + { + run = ME_FindItemFwd(run, diRun); + assert(run); + } + for (i = 0; i < 2; i++) + { + while (!(run->member.run.nFlags & MERF_TAB)) + { + run = ME_FindItemFwd(run, diRunOrParagraphOrEnd); + if (run->type != diRun) + { + para = run; + if (ME_IsInTable(para)) + { + run = ME_FindItemFwd(para, diRun); + assert(run); + editor->pCursors[0].pRun = run; + editor->pCursors[0].nOffset = 0; + i = 1; + } else { + /* Insert table row */ + para = ME_AppendTableRow(editor, para->member.para.prev_para); + /* Put cursor at the start of the new table row */ + editor->pCursors[0].pRun = ME_FindItemFwd(para, diRun); + editor->pCursors[0].nOffset = 0; + editor->pCursors[1] = editor->pCursors[0]; + ME_WrapMarkedParagraphs(editor); + return; + } + } + } + if (i == 0) + run = ME_FindItemFwd(run, diRun); + editor->pCursors[i].pRun = run; + editor->pCursors[i].nOffset = 0; + } + } +} + + +void ME_TabPressedInTable(ME_TextEditor *editor, BOOL bSelectedRow) +{ + /* FIXME: Shift tab should move to the previous cell. */ + ME_Cursor fromCursor, toCursor; + ME_InvalidateSelection(editor); + { + int from, to; + from = ME_GetCursorOfs(editor, 0); + to = ME_GetCursorOfs(editor, 1); + if (from <= to) + { + fromCursor = editor->pCursors[0]; + toCursor = editor->pCursors[1]; + } else { + fromCursor = editor->pCursors[1]; + toCursor = editor->pCursors[0]; + } + } + if (!editor->bEmulateVersion10) /* v4.1 */ + { + if (!ME_IsInTable(toCursor.pRun)) + { + editor->pCursors[0] = toCursor; + editor->pCursors[1] = toCursor; + } else { + ME_SelectOrInsertNextCell(editor, toCursor.pRun); + } + } else { /* v1.0 - 3.0 */ + if (!ME_IsInTable(fromCursor.pRun)) { + editor->pCursors[0] = fromCursor; + editor->pCursors[1] = fromCursor; + /* FIXME: For some reason the caret is shown at the start of the + * previous paragraph in v1.0 to v3.0, and bCaretAtEnd only works + * within the paragraph for wrapped lines. */ + if (ME_FindItemBack(fromCursor.pRun, diRun)) + editor->bCaretAtEnd = TRUE; + } else if ((bSelectedRow || !ME_IsInTable(toCursor.pRun))) { + ME_SelectOrInsertNextCell(editor, fromCursor.pRun); + } else { + if (ME_IsSelection(editor) && !toCursor.nOffset) + { + ME_DisplayItem *run; + run = ME_FindItemBack(toCursor.pRun, diRunOrParagraphOrEnd); + if (run->type == diRun && run->member.run.nFlags & MERF_TAB) + ME_SelectOrInsertNextCell(editor, run); + else + ME_SelectOrInsertNextCell(editor, toCursor.pRun); + } else { + ME_SelectOrInsertNextCell(editor, toCursor.pRun); + } + } + } + ME_InvalidateSelection(editor); + ME_Repaint(editor); + HideCaret(editor->hWnd); + ME_ShowCaret(editor); + ME_SendSelChange(editor); +} + +struct RTFTable *ME_MakeTableDef(ME_TextEditor *editor) +{ + RTFTable *tableDef = ALLOC_OBJ(RTFTable); + ZeroMemory(tableDef, sizeof(RTFTable)); + if (!editor->bEmulateVersion10) /* v4.1 */ + tableDef->gapH = 10; + return tableDef; +} + +void ME_InitTableDef(ME_TextEditor *editor, struct RTFTable *tableDef) +{ + ZeroMemory(tableDef->cells, sizeof(tableDef->cells)); + ZeroMemory(tableDef->border, sizeof(tableDef->border)); + tableDef->numCellsDefined = 0; + tableDef->leftEdge = 0; + if (!editor->bEmulateVersion10) /* v4.1 */ + tableDef->gapH = 10; + else /* v1.0 - 3.0 */ + tableDef->gapH = 0; +} diff --git a/reactos/dll/win32/riched20/undo.c b/reactos/dll/win32/riched20/undo.c index bf992ab20f7..3ab39d01526 100644 --- a/reactos/dll/win32/riched20/undo.c +++ b/reactos/dll/win32/riched20/undo.c @@ -84,17 +84,22 @@ ME_UndoItem *ME_AddUndoItem(ME_TextEditor *editor, ME_DIType type, const ME_Disp else pItem->member.run.ole_obj = NULL; break; case diUndoSetCharFormat: - case diUndoSetDefaultCharFormat: break; case diUndoDeleteRun: case diUndoJoinParagraphs: break; case diUndoSplitParagraph: + { + ME_DisplayItem *prev_para = pdi->member.para.prev_para; + assert(pdi->member.para.pFmt->cbSize == sizeof(PARAFORMAT2)); pItem->member.para.pFmt = ALLOC_OBJ(PARAFORMAT2); pItem->member.para.pFmt->cbSize = sizeof(PARAFORMAT2); pItem->member.para.pFmt->dwMask = 0; - + *pItem->member.para.pFmt = *pdi->member.para.pFmt; + pItem->member.para.nFlags = prev_para->member.para.nFlags & ~MEPF_CELL; + pItem->member.para.pCell = NULL; break; + } default: assert(0 == "AddUndoItem, unsupported item type"); return NULL; @@ -283,8 +288,11 @@ static void ME_PlayUndoItem(ME_TextEditor *editor, ME_DisplayItem *pItem) case diUndoSetParagraphFormat: { ME_Cursor tmp; + ME_DisplayItem *para; ME_CursorFromCharOfs(editor, pItem->member.para.nCharOfs, &tmp); - ME_SetParaFormat(editor, ME_FindItemBack(tmp.pRun, diParagraph), pItem->member.para.pFmt); + para = ME_FindItemBack(tmp.pRun, diParagraph); + ME_AddUndoItem(editor, diUndoSetParagraphFormat, para); + *para->member.para.pFmt = *pItem->member.para.pFmt; break; } case diUndoSetCharFormat: @@ -292,11 +300,6 @@ static void ME_PlayUndoItem(ME_TextEditor *editor, ME_DisplayItem *pItem) ME_SetCharFormat(editor, pUItem->nStart, pUItem->nLen, &pItem->member.ustyle->fmt); break; } - case diUndoSetDefaultCharFormat: - { - ME_SetDefaultCharFormat(editor, &pItem->member.ustyle->fmt); - break; - } case diUndoInsertRun: { ME_InsertRun(editor, pItem->member.run.nCharOfs, pItem); @@ -304,7 +307,7 @@ static void ME_PlayUndoItem(ME_TextEditor *editor, ME_DisplayItem *pItem) } case diUndoDeleteRun: { - ME_InternalDeleteText(editor, pUItem->nStart, pUItem->nLen); + ME_InternalDeleteText(editor, pUItem->nStart, pUItem->nLen, TRUE); break; } case diUndoJoinParagraphs: @@ -312,22 +315,41 @@ static void ME_PlayUndoItem(ME_TextEditor *editor, ME_DisplayItem *pItem) ME_Cursor tmp; ME_CursorFromCharOfs(editor, pUItem->nStart, &tmp); /* the only thing that's needed is paragraph offset, so no need to split runs */ - ME_JoinParagraphs(editor, ME_GetParagraph(tmp.pRun)); + ME_JoinParagraphs(editor, ME_GetParagraph(tmp.pRun), TRUE); break; } case diUndoSplitParagraph: { ME_Cursor tmp; - ME_DisplayItem *new_para; + ME_DisplayItem *this_para, *new_para; + BOOL bFixRowStart; + int paraFlags = pItem->member.para.nFlags & (MEPF_ROWSTART|MEPF_CELL|MEPF_ROWEND); ME_CursorFromCharOfs(editor, pUItem->nStart, &tmp); if (tmp.nOffset) tmp.pRun = ME_SplitRunSimple(editor, tmp.pRun, tmp.nOffset); assert(pUItem->nCR >= 0); assert(pUItem->nLF >= 0); + this_para = ME_GetParagraph(tmp.pRun); + bFixRowStart = this_para->member.para.nFlags & MEPF_ROWSTART; + if (bFixRowStart) + { + /* Re-insert the paragraph before the table, making sure the nFlag value + * is correct. */ + this_para->member.para.nFlags &= ~MEPF_ROWSTART; + } new_para = ME_SplitParagraph(editor, tmp.pRun, tmp.pRun->member.run.style, - pUItem->nCR, pUItem->nLF); + pUItem->nCR, pUItem->nLF, paraFlags); + if (bFixRowStart) + new_para->member.para.nFlags |= MEPF_ROWSTART; assert(pItem->member.para.pFmt->cbSize == sizeof(PARAFORMAT2)); *new_para->member.para.pFmt = *pItem->member.para.pFmt; + if (pItem->member.para.pCell) + { + ME_DisplayItem *pItemCell, *pCell; + pItemCell = pItem->member.para.pCell; + pCell = new_para->member.para.pCell; + pCell->member.cell.nRightBoundary = pItemCell->member.cell.nRightBoundary; + } break; } default: @@ -365,6 +387,7 @@ BOOL ME_Undo(ME_TextEditor *editor) { if (p) p->prev = NULL; ME_AddUndoItem(editor, diUndoEndTransaction, NULL); + ME_CheckTablesForCorruption(editor); editor->nUndoStackSize--; editor->nUndoMode = nMode; ME_UpdateRepaint(editor); @@ -400,6 +423,7 @@ BOOL ME_Redo(ME_TextEditor *editor) { if (p) p->prev = NULL; ME_AddUndoItem(editor, diUndoEndTransaction, NULL); + ME_CheckTablesForCorruption(editor); editor->nUndoMode = nMode; ME_UpdateRepaint(editor); return TRUE; diff --git a/reactos/dll/win32/riched20/wrap.c b/reactos/dll/win32/riched20/wrap.c index adabea13803..a3c5d544ff6 100644 --- a/reactos/dll/win32/riched20/wrap.c +++ b/reactos/dll/win32/riched20/wrap.c @@ -42,17 +42,48 @@ static ME_DisplayItem *ME_MakeRow(int height, int baseline, int width) return item; } -static void ME_BeginRow(ME_WrapContext *wc) +static void ME_BeginRow(ME_WrapContext *wc, ME_DisplayItem *para) { + PARAFORMAT2 *pFmt; + assert(para && para->type == diParagraph); + pFmt = para->member.para.pFmt; wc->pRowStart = NULL; wc->bOverflown = FALSE; wc->pLastSplittableRun = NULL; - if (wc->context->editor->bWordWrap) - wc->nAvailWidth = wc->context->rcView.right - wc->context->rcView.left - - (wc->nRow ? wc->nLeftMargin : wc->nFirstMargin) - wc->nRightMargin; - else + if (para->member.para.nFlags & (MEPF_ROWSTART|MEPF_ROWEND)) { + wc->nAvailWidth = 0; + if (para->member.para.nFlags & MEPF_ROWEND) + { + ME_Cell *cell = &ME_FindItemBack(para, diCell)->member.cell; + cell->nWidth = 0; + } + } else if (para->member.para.pCell) { + ME_Cell *cell = ¶->member.para.pCell->member.cell; + int width; + + width = cell->nRightBoundary; + if (cell->prev_cell) + width -= cell->prev_cell->member.cell.nRightBoundary; + if (!cell->prev_cell) + { + int rowIndent = ME_GetTableRowEnd(para)->member.para.pFmt->dxStartIndent; + width -= rowIndent; + } + cell->nWidth = max(ME_twips2pointsX(wc->context, width), 0); + + wc->nAvailWidth = cell->nWidth + - (wc->nRow ? wc->nLeftMargin : wc->nFirstMargin) - wc->nRightMargin; + } else if (wc->context->editor->bWordWrap) { + wc->nAvailWidth = wc->context->rcView.right - wc->context->rcView.left + - (wc->nRow ? wc->nLeftMargin : wc->nFirstMargin) - wc->nRightMargin; + } else { wc->nAvailWidth = ~0u >> 1; - wc->pt.x = 0; + } + wc->pt.x = wc->context->pt.x; + if (wc->context->editor->bEmulateVersion10 && /* v1.0 - 3.0 */ + pFmt->dwMask & PFM_TABLE && pFmt->wEffects & PFE_TABLE) + /* Shift the text down because of the border. */ + wc->pt.y++; } static void ME_InsertRowStart(ME_WrapContext *wc, const ME_DisplayItem *pEnd) @@ -60,8 +91,10 @@ static void ME_InsertRowStart(ME_WrapContext *wc, const ME_DisplayItem *pEnd) ME_DisplayItem *p, *row, *para; BOOL bSkippingSpaces = TRUE; int ascent = 0, descent = 0, width=0, shift = 0, align = 0; + PARAFORMAT2 *pFmt; /* wrap text */ para = ME_GetParagraph(wc->pRowStart); + pFmt = para->member.para.pFmt; for (p = pEnd->prev; p!=wc->pRowStart->prev; p = p->prev) { @@ -100,7 +133,16 @@ static void ME_InsertRowStart(ME_WrapContext *wc, const ME_DisplayItem *pEnd) } row = ME_MakeRow(ascent+descent, ascent, width); - row->member.row.nYPos = wc->pt.y; + if (wc->context->editor->bEmulateVersion10 && /* v1.0 - 3.0 */ + pFmt->dwMask & PFM_TABLE && pFmt->wEffects & PFE_TABLE) + { + /* The text was shifted down in ME_BeginRow so move the wrap context + * back to where it should be. */ + wc->pt.y--; + /* The height of the row is increased by the borders. */ + row->member.row.nHeight += 2; + } + row->member.row.pt = wc->pt; row->member.row.nLMargin = (!wc->nRow ? wc->nFirstMargin : wc->nLeftMargin); row->member.row.nRMargin = wc->nRightMargin; assert(para->member.para.pFmt->dwMask & PFM_ALIGNMENT); @@ -117,14 +159,23 @@ static void ME_InsertRowStart(ME_WrapContext *wc, const ME_DisplayItem *pEnd) } ME_InsertBefore(wc->pRowStart, row); wc->nRow++; - wc->pt.y += ascent+descent; - ME_BeginRow(wc); + wc->pt.y += row->member.row.nHeight; + ME_BeginRow(wc, para); } static void ME_WrapEndParagraph(ME_WrapContext *wc, ME_DisplayItem *p) { + ME_DisplayItem *para = p->member.para.prev_para; + PARAFORMAT2 *pFmt = para->member.para.pFmt; if (wc->pRowStart) ME_InsertRowStart(wc, p); + if (wc->context->editor->bEmulateVersion10 && /* v1.0 - 3.0 */ + pFmt->dwMask & PFM_TABLE && pFmt->wEffects & PFE_TABLE) + { + /* ME_BeginRow was called an extra time for the paragraph, and it shifts the + * text down by one pixel for the border, so fix up the wrap context. */ + wc->pt.y--; + } /* p = p->member.para.prev_para->next; @@ -290,9 +341,13 @@ static ME_DisplayItem *ME_WrapHandleRun(ME_WrapContext *wc, ME_DisplayItem *p) if (wc->bOverflown) /* just skipping final whitespaces */ { - if (run->nFlags & (MERF_WHITESPACE|MERF_TAB)) { + /* End paragraph run can't overflow to the next line by itself. */ + if (run->nFlags & MERF_ENDPARA) + return p->next; + + if (run->nFlags & MERF_WHITESPACE) { p->member.run.nFlags |= MERF_SKIPPED; - /* wc->pt.x += run->nWidth; */ + wc->pt.x += run->nWidth; /* skip runs consisting of only whitespaces */ return p->next; } @@ -320,17 +375,11 @@ static ME_DisplayItem *ME_WrapHandleRun(ME_WrapContext *wc, ME_DisplayItem *p) ME_InsertRowStart(wc, p); return p; } - /* we're not at the end of the row */ - if (run->nFlags & MERF_TAB) { - /* force recomputation of tabs' size as it depends on position */ - ME_CalcRunExtent(wc->context, &ME_GetParagraph(p)->member.para, - wc->nRow ? wc->nLeftMargin : wc->nFirstMargin, run); - } /* will current run fit? */ - if (wc->pt.x + run->nWidth > wc->nAvailWidth) + if (wc->pt.x + run->nWidth > wc->context->pt.x + wc->nAvailWidth) { - int loc = wc->nAvailWidth - wc->pt.x; + int loc = wc->context->pt.x + wc->nAvailWidth - wc->pt.x; /* total white run ? */ if (run->nFlags & MERF_WHITESPACE) { /* let the overflow logic handle it */ @@ -340,7 +389,12 @@ static ME_DisplayItem *ME_WrapHandleRun(ME_WrapContext *wc, ME_DisplayItem *p) /* TAB: we can split before */ if (run->nFlags & MERF_TAB) { wc->bOverflown = TRUE; - return p; + if (wc->pRowStart == p) + /* Don't split before the start of the run, or we will get an + * endless loop. */ + return p->next; + else + return p; } /* graphics: we can split before, if run's width is smaller than row's width */ if ((run->nFlags & MERF_GRAPHICS) && run->nWidth <= wc->nAvailWidth) { @@ -360,8 +414,20 @@ static ME_DisplayItem *ME_WrapHandleRun(ME_WrapContext *wc, ME_DisplayItem *p) pp = ME_SplitByBacktracking(wc, p, loc); if (pp == wc->pRowStart) { - /* we had only spaces so far, entire content can be omitted */ - wc->pt.x = 0; + if (run->nFlags & MERF_STARTWHITE) + { + /* we had only spaces so far, so we must be on the first line of the + * paragraph, since no other lines of the paragraph start with spaces. */ + assert(!wc->nRow); + /* The lines will only contain spaces, and the rest of the run will + * overflow onto the next line. */ + wc->bOverflown = TRUE; + return p; + } + /* Couldn't split the first run, possible because we have a large font + * with a single character that caused an overflow. + */ + wc->pt.x += run->nWidth; return p->next; } if (p != pp) /* found a suitable split point */ @@ -392,46 +458,55 @@ static void ME_WrapTextParagraph(ME_Context *c, ME_DisplayItem *tp, DWORD begino ME_WrapContext wc; int border = 0; int linespace = 0; + PARAFORMAT2 *pFmt; assert(tp->type == diParagraph); if (!(tp->member.para.nFlags & MEPF_REWRAP)) { return; } ME_PrepareParagraphForWrapping(c, tp); + pFmt = tp->member.para.pFmt; wc.context = c; /* wc.para_style = tp->member.para.style; */ wc.style = NULL; - wc.nFirstMargin = ME_twips2pointsX(c, tp->member.para.pFmt->dxStartIndent) + beginofs; - wc.nLeftMargin = wc.nFirstMargin + ME_twips2pointsX(c, tp->member.para.pFmt->dxOffset); - wc.nRightMargin = ME_twips2pointsX(c, tp->member.para.pFmt->dxRightIndent); + if (tp->member.para.nFlags & MEPF_ROWEND) { + wc.nFirstMargin = wc.nLeftMargin = wc.nRightMargin = 0; + } else { + int dxStartIndent = pFmt->dxStartIndent; + if (tp->member.para.pCell) { + dxStartIndent += ME_GetTableRowEnd(tp)->member.para.pFmt->dxOffset; + } + wc.nFirstMargin = ME_twips2pointsX(c, dxStartIndent); + wc.nLeftMargin = wc.nFirstMargin + ME_twips2pointsX(c, pFmt->dxOffset); + wc.nRightMargin = ME_twips2pointsX(c, pFmt->dxRightIndent); + } + if (c->editor->bEmulateVersion10 && /* v1.0 - 3.0 */ + pFmt->dwMask & PFM_TABLE && pFmt->wEffects & PFE_TABLE) + { + wc.nFirstMargin += ME_twips2pointsX(c, pFmt->dxOffset * 2); + } wc.nRow = 0; - wc.pt.x = 0; wc.pt.y = 0; - if (tp->member.para.pFmt->dwMask & PFM_SPACEBEFORE) - wc.pt.y += ME_twips2pointsY(c, tp->member.para.pFmt->dySpaceBefore); - if (tp->member.para.pFmt->dwMask & PFM_BORDER) + if (pFmt->dwMask & PFM_SPACEBEFORE) + wc.pt.y += ME_twips2pointsY(c, pFmt->dySpaceBefore); + if (!(pFmt->dwMask & PFM_TABLE && pFmt->wEffects & PFE_TABLE) && + pFmt->dwMask & PFM_BORDER) { border = ME_GetParaBorderWidth(c->editor, tp->member.para.pFmt->wBorders); - if (tp->member.para.pFmt->wBorders & 1) { + if (pFmt->wBorders & 1) { wc.nFirstMargin += border; wc.nLeftMargin += border; } - if (tp->member.para.pFmt->wBorders & 2) + if (pFmt->wBorders & 2) wc.nRightMargin -= border; - if (tp->member.para.pFmt->wBorders & 4) + if (pFmt->wBorders & 4) wc.pt.y += border; } - if (c->editor->bWordWrap) - wc.nAvailWidth = c->rcView.right - c->rcView.left - wc.nFirstMargin - wc.nRightMargin; - else - wc.nAvailWidth = ~0u >> 1; - wc.pRowStart = NULL; - linespace = ME_GetParaLineSpace(c, &tp->member.para); - ME_BeginRow(&wc); + ME_BeginRow(&wc, tp); for (p = tp->next; p!=tp->member.para.next_para; ) { assert(p->type != diStartRow); if (p->type == diRun) { @@ -442,10 +517,11 @@ static void ME_WrapTextParagraph(ME_Context *c, ME_DisplayItem *tp, DWORD begino wc.pt.y += linespace; } ME_WrapEndParagraph(&wc, p); - if ((tp->member.para.pFmt->dwMask & PFM_BORDER) && (tp->member.para.pFmt->wBorders & 8)) + if (!(pFmt->dwMask & PFM_TABLE && pFmt->wEffects & PFE_TABLE) && + (pFmt->dwMask & PFM_BORDER) && (pFmt->wBorders & 8)) wc.pt.y += border; if (tp->member.para.pFmt->dwMask & PFM_SPACEAFTER) - wc.pt.y += ME_twips2pointsY(c, tp->member.para.pFmt->dySpaceAfter); + wc.pt.y += ME_twips2pointsY(c, pFmt->dySpaceAfter); tp->member.para.nFlags &= ~MEPF_REWRAP; tp->member.para.nHeight = wc.pt.y; @@ -500,17 +576,18 @@ BOOL ME_WrapMarkedParagraphs(ME_TextEditor *editor) { int yLastPos = 0; ME_InitContext(&c, editor, GetDC(editor->hWnd)); + c.pt.x = editor->selofs; editor->nHeight = 0; item = editor->pBuffer->pFirst->next; while(item != editor->pBuffer->pLast) { BOOL bRedraw = FALSE; assert(item->type == diParagraph); - editor->nHeight = max(editor->nHeight, item->member.para.nYPos); + editor->nHeight = max(editor->nHeight, item->member.para.pt.y); if ((item->member.para.nFlags & MEPF_REWRAP) - || (item->member.para.nYPos != c.pt.y)) + || (item->member.para.pt.y != c.pt.y)) bRedraw = TRUE; - item->member.para.nYPos = c.pt.y; + item->member.para.pt = c.pt; ME_WrapTextParagraph(&c, item, editor->selofs); @@ -523,24 +600,129 @@ BOOL ME_WrapMarkedParagraphs(ME_TextEditor *editor) { bModified = bModified | bRedraw; - yLastPos = c.pt.y; - c.pt.y += item->member.para.nHeight; + yLastPos = max(yLastPos, c.pt.y); + + if (item->member.para.nFlags & MEPF_ROWSTART) + { + ME_DisplayItem *cell = ME_FindItemFwd(item, diCell); + ME_DisplayItem *endRowPara; + int borderWidth = 0; + cell->member.cell.pt = c.pt; + /* Offset the text by the largest top border width. */ + while (cell->member.cell.next_cell) { + borderWidth = max(borderWidth, cell->member.cell.border.top.width); + cell = cell->member.cell.next_cell; + } + endRowPara = ME_FindItemFwd(cell, diParagraph); + assert(endRowPara->member.para.nFlags & MEPF_ROWEND); + if (borderWidth > 0) + { + borderWidth = max(ME_twips2pointsY(&c, borderWidth), 1); + while (cell) { + cell->member.cell.yTextOffset = borderWidth; + cell = cell->member.cell.prev_cell; + } + c.pt.y += borderWidth; + } + if (endRowPara->member.para.pFmt->dxStartIndent > 0) + { + int dxStartIndent = endRowPara->member.para.pFmt->dxStartIndent; + cell = ME_FindItemFwd(item, diCell); + cell->member.cell.pt.x += ME_twips2pointsX(&c, dxStartIndent); + c.pt.x = cell->member.cell.pt.x; + } + } + else if (item->member.para.nFlags & MEPF_ROWEND) + { + /* Set all the cells to the height of the largest cell */ + ME_DisplayItem *startRowPara; + int prevHeight, nHeight, bottomBorder = 0; + ME_DisplayItem *cell = ME_FindItemBack(item, diCell); + if (!(item->member.para.next_para->member.para.nFlags & MEPF_ROWSTART)) + { + /* Last row, the bottom border is added to the height. */ + cell = cell->member.cell.prev_cell; + while (cell) + { + bottomBorder = max(bottomBorder, cell->member.cell.border.bottom.width); + cell = cell->member.cell.prev_cell; + } + bottomBorder = ME_twips2pointsY(&c, bottomBorder); + cell = ME_FindItemBack(item, diCell); + } + prevHeight = cell->member.cell.nHeight; + nHeight = cell->member.cell.prev_cell->member.cell.nHeight + bottomBorder; + cell->member.cell.nHeight = nHeight; + item->member.para.nHeight = nHeight; + cell = cell->member.cell.prev_cell; + cell->member.cell.nHeight = nHeight; + while (cell->member.cell.prev_cell) + { + cell = cell->member.cell.prev_cell; + cell->member.cell.nHeight = nHeight; + } + /* Also set the height of the start row paragraph */ + startRowPara = ME_FindItemBack(cell, diParagraph); + startRowPara->member.para.nHeight = nHeight; + c.pt.x = startRowPara->member.para.pt.x; + c.pt.y = cell->member.cell.pt.y + nHeight; + if (prevHeight < nHeight) + { + /* The height of the cells has grown, so invalidate the bottom of + * the cells. */ + item->member.para.nFlags |= MEPF_REPAINT; + cell = ME_FindItemBack(item, diCell); + while (cell) { + ME_FindItemBack(cell, diParagraph)->member.para.nFlags |= MEPF_REPAINT; + cell = cell->member.cell.prev_cell; + } + } + } + else if (item->member.para.pCell && + item->member.para.pCell != item->member.para.next_para->member.para.pCell) + { + /* The next paragraph is in the next cell in the table row. */ + ME_Cell *cell = &item->member.para.pCell->member.cell; + cell->nHeight = c.pt.y + item->member.para.nHeight - cell->pt.y; + + /* Propagate the largest height to the end so that it can be easily + * sent back to all the cells at the end of the row. */ + if (cell->prev_cell) + cell->nHeight = max(cell->nHeight, cell->prev_cell->member.cell.nHeight); + + c.pt.x = cell->pt.x + cell->nWidth; + c.pt.y = cell->pt.y; + cell->next_cell->member.cell.pt = c.pt; + c.pt.y += cell->yTextOffset; + } + else + { + if (item->member.para.pCell) { + /* Next paragraph in the same cell. */ + c.pt.x = item->member.para.pCell->member.cell.pt.x; + } else { + /* Normal paragraph */ + c.pt.x = editor->selofs; + } + c.pt.y += item->member.para.nHeight; + } item = item->member.para.next_para; } editor->sizeWindow.cx = c.rcView.right-c.rcView.left; editor->sizeWindow.cy = c.rcView.bottom-c.rcView.top; editor->nTotalLength = c.pt.y; - editor->pBuffer->pLast->member.para.nYPos = yLastPos; + editor->pBuffer->pLast->member.para.pt.x = 0; + editor->pBuffer->pLast->member.para.pt.y = yLastPos; ME_DestroyContext(&c, editor->hWnd); /* Each paragraph may contain multiple rows, which should be scrollable, even - if the containing paragraph has nYPos == 0 */ + if the containing paragraph has pt.y == 0 */ item = editor->pBuffer->pFirst; while ((item = ME_FindItemFwd(item, diStartRow)) != NULL) { assert(item->type == diStartRow); - editor->nHeight = max(editor->nHeight, item->member.row.nYPos); + editor->nHeight = max(editor->nHeight, item->member.row.pt.y); } if (bModified || editor->nTotalLength < editor->nLastTotalLength) @@ -560,8 +742,8 @@ void ME_InvalidateMarkedParagraphs(ME_TextEditor *editor) { ME_DisplayItem *item = editor->pBuffer->pFirst; while(item != editor->pBuffer->pLast) { if (item->member.para.nFlags & MEPF_REPAINT) { - rc.top = item->member.para.nYPos - ofs; - rc.bottom = item->member.para.nYPos + item->member.para.nHeight - ofs; + rc.top = item->member.para.pt.y - ofs; + rc.bottom = item->member.para.pt.y + item->member.para.nHeight - ofs; InvalidateRect(editor->hWnd, &rc, TRUE); } item = item->member.para.next_para; diff --git a/reactos/dll/win32/riched20/writer.c b/reactos/dll/win32/riched20/writer.c index ce9e8537d7f..912cae3f48e 100644 --- a/reactos/dll/win32/riched20/writer.c +++ b/reactos/dll/win32/riched20/writer.c @@ -41,6 +41,7 @@ ME_StreamOutInit(ME_TextEditor *editor, EDITSTREAM *stream) pStream->written = 0; pStream->nFontTblLen = 0; pStream->nColorTblLen = 1; + pStream->nNestingLevel = 0; return pStream; } @@ -283,35 +284,64 @@ ME_StreamOutRTFFontAndColorTbl(ME_OutStream *pStream, ME_DisplayItem *pFirstRun, return TRUE; } +static BOOL +ME_StreamOutRTFTableProps(ME_TextEditor *editor, ME_OutStream *pStream, + const ME_DisplayItem *para) +{ + ME_DisplayItem *cell; + char props[STREAMOUT_BUFFER_SIZE] = ""; + + if (!ME_StreamOutPrint(pStream, "\\trowd")) + return FALSE; + if (!editor->bEmulateVersion10) { /* v4.1 */ + assert(para->member.para.nFlags & MEPF_ROWSTART); + cell = para->member.para.next_para->member.para.pCell; + assert(cell); + do { + sprintf(props + strlen(props), "\\cellx%d", cell->member.cell.nRightBoundary); + cell = cell->member.cell.next_cell; + } while (cell->member.cell.next_cell); + } else { /* v1.0 - 3.0 */ + PARAFORMAT2 *pFmt = para->member.para.pFmt; + int i; + + assert(!(para->member.para.nFlags & (MEPF_ROWSTART|MEPF_ROWEND|MEPF_CELL))); + if (pFmt->dxOffset) + sprintf(props + strlen(props), "\\trgaph%d", pFmt->dxOffset); + if (pFmt->dxStartIndent) + sprintf(props + strlen(props), "\\trleft%d", pFmt->dxStartIndent); + for (i = 0; i < pFmt->cTabCount; i++) + { + sprintf(props + strlen(props), "\\cellx%d", pFmt->rgxTabs[i] & 0x00FFFFFF); + } + } + if (!ME_StreamOutPrint(pStream, props)) + return FALSE; + props[0] = '\0'; + return TRUE; +} static BOOL -ME_StreamOutRTFParaProps(ME_OutStream *pStream, const ME_DisplayItem *para) +ME_StreamOutRTFParaProps(ME_TextEditor *editor, ME_OutStream *pStream, + const ME_DisplayItem *para) { PARAFORMAT2 *fmt = para->member.para.pFmt; char props[STREAMOUT_BUFFER_SIZE] = ""; int i; - - if (para->member.para.pCells) - { - ME_TableCell *cell = para->member.para.pCells; - - if (!ME_StreamOutPrint(pStream, "\\trowd")) - return FALSE; - do { - sprintf(props, "\\cellx%d", cell->nRightBoundary); - if (!ME_StreamOutPrint(pStream, props)) - return FALSE; - cell = cell->next; - } while (cell); - props[0] = '\0'; - } /* TODO: Don't emit anything if the last PARAFORMAT2 is inherited */ if (!ME_StreamOutPrint(pStream, "\\pard")) return FALSE; - if (para->member.para.bTable) - strcat(props, "\\intbl"); + if (!editor->bEmulateVersion10) { /* v4.1 */ + if (pStream->nNestingLevel > 0) + strcat(props, "\\intbl"); + if (pStream->nNestingLevel > 1) + sprintf(props + strlen(props), "\\itap%d", pStream->nNestingLevel); + } else { /* v1.0 - 3.0 */ + if (fmt->dwMask & PFM_TABLE && fmt->wEffects & PFE_TABLE) + strcat(props, "\\intbl"); + } /* TODO: PFM_BORDER. M$ does not emit any keywords for these properties, and * when streaming border keywords in, PFM_BORDER is set, but wBorder field is @@ -376,46 +406,46 @@ ME_StreamOutRTFParaProps(ME_OutStream *pStream, const ME_DisplayItem *para) strcat(props, "\\rtlpar"); if (fmt->dwMask & PFM_SIDEBYSIDE && fmt->wEffects & PFE_SIDEBYSIDE) strcat(props, "\\sbys"); - if (fmt->dwMask & PFM_TABLE && fmt->dwMask & PFE_TABLE) - strcat(props, "\\intbl"); - if (fmt->dwMask & PFM_OFFSET) - sprintf(props + strlen(props), "\\li%d", fmt->dxOffset); - if (fmt->dwMask & PFM_OFFSETINDENT || fmt->dwMask & PFM_STARTINDENT) - sprintf(props + strlen(props), "\\fi%d", fmt->dxStartIndent); - if (fmt->dwMask & PFM_RIGHTINDENT) - sprintf(props + strlen(props), "\\ri%d", fmt->dxRightIndent); + if (!(editor->bEmulateVersion10 && /* v1.0 - 3.0 */ + fmt->dwMask & PFM_TABLE && fmt->wEffects & PFE_TABLE)) + { + if (fmt->dwMask & PFM_OFFSET) + sprintf(props + strlen(props), "\\li%d", fmt->dxOffset); + if (fmt->dwMask & PFM_OFFSETINDENT || fmt->dwMask & PFM_STARTINDENT) + sprintf(props + strlen(props), "\\fi%d", fmt->dxStartIndent); + if (fmt->dwMask & PFM_RIGHTINDENT) + sprintf(props + strlen(props), "\\ri%d", fmt->dxRightIndent); + if (fmt->dwMask & PFM_TABSTOPS) { + static const char * const leader[6] = { "", "\\tldot", "\\tlhyph", "\\tlul", "\\tlth", "\\tleq" }; + + for (i = 0; i < fmt->cTabCount; i++) { + switch ((fmt->rgxTabs[i] >> 24) & 0xF) { + case 1: + strcat(props, "\\tqc"); + break; + case 2: + strcat(props, "\\tqr"); + break; + case 3: + strcat(props, "\\tqdec"); + break; + case 4: + /* Word bar tab (vertical bar). Handled below */ + break; + } + if (fmt->rgxTabs[i] >> 28 <= 5) + strcat(props, leader[fmt->rgxTabs[i] >> 28]); + sprintf(props+strlen(props), "\\tx%d", fmt->rgxTabs[i]&0x00FFFFFF); + } + } + } if (fmt->dwMask & PFM_SPACEAFTER) sprintf(props + strlen(props), "\\sa%d", fmt->dySpaceAfter); if (fmt->dwMask & PFM_SPACEBEFORE) sprintf(props + strlen(props), "\\sb%d", fmt->dySpaceBefore); if (fmt->dwMask & PFM_STYLE) sprintf(props + strlen(props), "\\s%d", fmt->sStyle); - - if (fmt->dwMask & PFM_TABSTOPS) { - static const char * const leader[6] = { "", "\\tldot", "\\tlhyph", "\\tlul", "\\tlth", "\\tleq" }; - - for (i = 0; i < fmt->cTabCount; i++) { - switch ((fmt->rgxTabs[i] >> 24) & 0xF) { - case 1: - strcat(props, "\\tqc"); - break; - case 2: - strcat(props, "\\tqr"); - break; - case 3: - strcat(props, "\\tqdec"); - break; - case 4: - /* Word bar tab (vertical bar). Handled below */ - break; - } - if (fmt->rgxTabs[i] >> 28 <= 5) - strcat(props, leader[fmt->rgxTabs[i] >> 28]); - sprintf(props+strlen(props), "\\tx%d", fmt->rgxTabs[i]&0x00FFFFFF); - } - } - if (fmt->dwMask & PFM_SHADING) { static const char * const style[16] = { "", "\\bgdkhoriz", "\\bgdkvert", "\\bgdkfdiag", @@ -680,7 +710,7 @@ ME_StreamOutRTF(ME_TextEditor *editor, ME_OutStream *pStream, int nStart, int nC /* TODO: section formatting properties */ - if (!ME_StreamOutRTFParaProps(pStream, ME_GetParagraph(p))) + if (!ME_StreamOutRTFParaProps(editor, pStream, ME_GetParagraph(p))) return FALSE; while(1) @@ -688,8 +718,39 @@ ME_StreamOutRTF(ME_TextEditor *editor, ME_OutStream *pStream, int nStart, int nC switch(p->type) { case diParagraph: - if (!ME_StreamOutRTFParaProps(pStream, p)) - return FALSE; + if (!editor->bEmulateVersion10) { /* v4.1 */ + if (p->member.para.nFlags & MEPF_ROWSTART) { + pStream->nNestingLevel++; + if (pStream->nNestingLevel == 1) { + if (!ME_StreamOutRTFTableProps(editor, pStream, p)) + return FALSE; + } + } else if (p->member.para.nFlags & MEPF_ROWEND) { + pStream->nNestingLevel--; + if (pStream->nNestingLevel > 1) { + if (!ME_StreamOutPrint(pStream, "{\\*\\nesttableprops")) + return FALSE; + if (!ME_StreamOutRTFTableProps(editor, pStream, p)) + return FALSE; + if (!ME_StreamOutPrint(pStream, "\\nestrow}{\\nonesttables\\par}\r\n")) + return FALSE; + } else { + if (!ME_StreamOutPrint(pStream, "\\row \r\n")) + return FALSE; + } + } else if (!ME_StreamOutRTFParaProps(editor, pStream, p)) { + return FALSE; + } + } else { /* v1.0 - 3.0 */ + if (p->member.para.pFmt->dwMask & PFM_TABLE && + p->member.para.pFmt->wEffects & PFE_TABLE) + { + if (!ME_StreamOutRTFTableProps(editor, pStream, p)) + return FALSE; + } + if (!ME_StreamOutRTFParaProps(editor, pStream, p)) + return FALSE; + } pPara = p; break; case diRun: @@ -697,14 +758,35 @@ ME_StreamOutRTF(ME_TextEditor *editor, ME_OutStream *pStream, int nStart, int nC break; TRACE("flags %xh\n", p->member.run.nFlags); /* TODO: emit embedded objects */ - if (p->member.run.nFlags & MERF_GRAPHICS) + if (pPara->member.para.nFlags & (MEPF_ROWSTART|MEPF_ROWEND)) + break; + if (p->member.run.nFlags & MERF_GRAPHICS) { FIXME("embedded objects are not handled\n"); - if (p->member.run.nFlags & MERF_CELL) { - if (!ME_StreamOutPrint(pStream, "\\cell ")) - return FALSE; + } else if (p->member.run.nFlags & MERF_TAB) { + if (editor->bEmulateVersion10 && /* v1.0 - 3.0 */ + pPara->member.para.pFmt->dwMask & PFM_TABLE && + pPara->member.para.pFmt->wEffects & PFE_TABLE) + { + if (!ME_StreamOutPrint(pStream, "\\cell ")) + return FALSE; + } else { + if (!ME_StreamOutPrint(pStream, "\\tab ")) + return FALSE; + } + } else if (p->member.run.nFlags & MERF_ENDCELL) { + if (pStream->nNestingLevel > 1) { + if (!ME_StreamOutPrint(pStream, "\\nestcell ")) + return FALSE; + } else { + if (!ME_StreamOutPrint(pStream, "\\cell ")) + return FALSE; + } nChars--; } else if (p->member.run.nFlags & MERF_ENDPARA) { - if (pPara->member.para.bTable) { + if (pPara->member.para.pFmt->dwMask & PFM_TABLE && + pPara->member.para.pFmt->wEffects & PFE_TABLE && + !(pPara->member.para.nFlags & (MEPF_ROWSTART|MEPF_ROWEND|MEPF_CELL))) + { if (!ME_StreamOutPrint(pStream, "\\row \r\n")) return FALSE; } else { diff --git a/reactos/include/reactos/wine/winuser.h b/reactos/include/reactos/wine/winuser.h index be58b229247..9d11b5cb047 100644 --- a/reactos/include/reactos/wine/winuser.h +++ b/reactos/include/reactos/wine/winuser.h @@ -23,6 +23,8 @@ typedef struct tagCWPSTRUCT *LPCWPSTRUCT; #define WM_ALTTABACTIVE 0x0029 +#define UNICODE_NOCHAR 0xFFFF + #ifndef E_PROP_ID_UNSUPPORTED #define E_PROP_ID_UNSUPPORTED ((HRESULT)0x80070490) #endif From 687df0212aa1cddccc6eb3f0b4bc1148faa2e8f5 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Thu, 28 Aug 2008 10:54:35 +0000 Subject: [PATCH 214/324] Synced riched20_winetest, riched32_winetest with Wine HEAD svn path=/trunk/; revision=35729 --- rostests/winetests/riched20/editor.c | 862 ++++++++++++++++++++++++- rostests/winetests/riched20/richole.c | 6 +- rostests/winetests/riched20/testlist.c | 4 - rostests/winetests/riched32/testlist.c | 2 - 4 files changed, 842 insertions(+), 32 deletions(-) diff --git a/rostests/winetests/riched20/editor.c b/rostests/winetests/riched20/editor.c index 0776fe47f14..765e8e27d3f 100644 --- a/rostests/winetests/riched20/editor.c +++ b/rostests/winetests/riched20/editor.c @@ -614,7 +614,7 @@ static void test_EM_SETCHARFORMAT(void) (LPARAM) &cf2); ok(rc == 1, "EM_SETCHARFORMAT returned %d instead of 1\n", rc); rc = SendMessage(hwndRichEdit, EM_CANUNDO, 0, 0); - todo_wine ok(rc == FALSE, "Should not be able to undo here.\n"); + ok(rc == FALSE, "Should not be able to undo here.\n"); SendMessage(hwndRichEdit, EM_EMPTYUNDOBUFFER, 0, 0); /* A valid flag, CHARFORMAT2 structure minimally filled */ @@ -1087,6 +1087,27 @@ static void test_EM_SETTEXTMODE(void) DestroyWindow(hwndRichEdit); } +static void test_SETPARAFORMAT(void) +{ + HWND hwndRichEdit = new_richedit(NULL); + PARAFORMAT2 fmt; + HRESULT ret; + fmt.cbSize = sizeof(PARAFORMAT2); + fmt.dwMask = PFM_ALIGNMENT; + fmt.wAlignment = PFA_LEFT; + + ret = SendMessage(hwndRichEdit, EM_SETPARAFORMAT, 0, (LPARAM) &fmt); + ok(ret != 0, "expected non-zero got %d\n", ret); + + fmt.cbSize = sizeof(PARAFORMAT2); + fmt.dwMask = -1; + ret = SendMessage(hwndRichEdit, EM_GETPARAFORMAT, 0, (LPARAM) &fmt); + ok(ret == PFM_ALL2, "expected %x got %x\n", PFM_ALL2, ret); + ok(fmt.dwMask == PFM_ALL2, "expected %x got %x\n", PFM_ALL2, fmt.dwMask); + + DestroyWindow(hwndRichEdit); +} + static void test_TM_PLAINTEXT(void) { /*Tests plain text properties*/ @@ -1383,6 +1404,9 @@ static HWND new_static_wnd(HWND parent) { static void test_EM_AUTOURLDETECT(void) { + /* DO NOT change the properties of the first two elements. To shorten the + tests, all tests after WM_SETTEXT test just the first two elements - + one non-URL and one URL */ struct urls_s { const char *text; int is_url; @@ -1647,10 +1671,12 @@ static void test_EM_AUTOURLDETECT(void) } /* Test detection of URLs within normal text - WM_CHAR case. */ - for (i = 0; i < sizeof(urls)/sizeof(struct urls_s); i++) { + /* Test only the first two URL examples for brevity */ + for (i = 0; i < 2; i++) { hwndRichEdit = new_richedit(parent); - for (j = 0; j < sizeof(templates_delim) / sizeof(const char *); j++) { + /* Also for brevity, test only the first three delimiters */ + for (j = 0; j < 3; j++) { char * at_pos; int at_offset; int end_offset; @@ -1674,7 +1700,6 @@ static void test_EM_AUTOURLDETECT(void) } } SendMessage(hwndRichEdit, WM_GETTEXT, sizeof(buffer), (LPARAM)buffer); - trace("Using template: %s\n", templates_delim[j]); /* This assumes no templates start with the URL itself, and that they have at least two characters before the URL text */ @@ -1784,7 +1809,8 @@ static void test_EM_AUTOURLDETECT(void) } /* Test detection of URLs within normal text - EM_SETTEXTEX case. */ - for (i = 0; i < sizeof(urls)/sizeof(struct urls_s); i++) { + /* Test just the first two URL examples for brevity */ + for (i = 0; i < 2; i++) { SETTEXTEX st; hwndRichEdit = new_richedit(parent); @@ -1971,7 +1997,8 @@ static void test_EM_AUTOURLDETECT(void) } /* Test detection of URLs within normal text - EM_REPLACESEL case. */ - for (i = 0; i < sizeof(urls)/sizeof(struct urls_s); i++) { + /* Test just the first two URL examples for brevity */ + for (i = 0; i < 2; i++) { hwndRichEdit = new_richedit(parent); /* Set selection with X to the URL */ @@ -2223,6 +2250,728 @@ static void test_EM_SCROLL(void) DestroyWindow(hwndRichEdit); } +unsigned int recursionLevel = 0; +unsigned int WM_SIZE_recursionLevel = 0; +BOOL bailedOutOfRecursion = FALSE; +LRESULT WINAPI (*richeditProc)(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); + +static LRESULT WINAPI RicheditStupidOverrideProcA(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + LRESULT r; + + if (bailedOutOfRecursion) return 0; + if (recursionLevel >= 32) { + bailedOutOfRecursion = TRUE; + return 0; + } + + recursionLevel++; + switch (message) { + case WM_SIZE: + WM_SIZE_recursionLevel++; + r = richeditProc(hwnd, message, wParam, lParam); + /* Because, uhhhh... I never heard of ES_DISABLENOSCROLL */ + ShowScrollBar(hwnd, SB_VERT, TRUE); + WM_SIZE_recursionLevel--; + break; + default: + r = richeditProc(hwnd, message, wParam, lParam); + break; + } + recursionLevel--; + return r; +} + +static void test_scrollbar_visibility(void) +{ + HWND hwndRichEdit; + const char * text="a\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\n"; + SCROLLINFO si; + WNDCLASSA cls; + BOOL r; + + /* These tests show that richedit should temporarily refrain from automatically + hiding or showing its scrollbars (vertical at least) when an explicit request + is made via ShowScrollBar() or similar, outside of standard richedit logic. + Some applications depend on forced showing (when otherwise richedit would + hide the vertical scrollbar) and are thrown on an endless recursive loop + if richedit auto-hides the scrollbar again. Apparently they never heard of + the ES_DISABLENOSCROLL style... */ + + hwndRichEdit = new_richedit(NULL); + + /* Test default scrollbar visibility behavior */ + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), + "Vertical scrollbar is visible, should be invisible.\n"); + ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 0, + "reported page/range is %d (%d..%d) expected all 0\n", + si.nPage, si.nMin, si.nMax); + + SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), + "Vertical scrollbar is visible, should be invisible.\n"); + ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 0, + "reported page/range is %d (%d..%d) expected all 0\n", + si.nPage, si.nMin, si.nMax); + + SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), + "Vertical scrollbar is invisible, should be visible.\n"); + ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, + "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n", + si.nPage, si.nMin, si.nMax); + + /* Oddly, setting text to NULL does *not* reset the scrollbar range, + even though it hides the scrollbar */ + SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), + "Vertical scrollbar is visible, should be invisible.\n"); + ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, + "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n", + si.nPage, si.nMin, si.nMax); + + /* Setting non-scrolling text again does *not* reset scrollbar range */ + SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"a"); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), + "Vertical scrollbar is visible, should be invisible.\n"); + ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, + "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n", + si.nPage, si.nMin, si.nMax); + + SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), + "Vertical scrollbar is visible, should be invisible.\n"); + ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, + "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n", + si.nPage, si.nMin, si.nMax); + + SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"a"); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), + "Vertical scrollbar is visible, should be invisible.\n"); + ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, + "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n", + si.nPage, si.nMin, si.nMax); + + SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)""); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), + "Vertical scrollbar is visible, should be invisible.\n"); + ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, + "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n", + si.nPage, si.nMin, si.nMax); + + DestroyWindow(hwndRichEdit); + + /* Test again, with ES_DISABLENOSCROLL style */ + hwndRichEdit = new_window(RICHEDIT_CLASS, ES_MULTILINE|ES_DISABLENOSCROLL, NULL); + + /* Test default scrollbar visibility behavior */ + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), + "Vertical scrollbar is invisible, should be visible.\n"); + ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 1, + "reported page/range is %d (%d..%d) expected 0 (0..1)\n", + si.nPage, si.nMin, si.nMax); + + SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), + "Vertical scrollbar is invisible, should be visible.\n"); + ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 1, + "reported page/range is %d (%d..%d) expected 0 (0..1)\n", + si.nPage, si.nMin, si.nMax); + + SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), + "Vertical scrollbar is invisible, should be visible.\n"); + ok(si.nPage != 0 && si.nMin == 0 && si.nMax > 1, + "reported page/range is %d (%d..%d)\n", + si.nPage, si.nMin, si.nMax); + + /* Oddly, setting text to NULL does *not* reset the scrollbar range */ + SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), + "Vertical scrollbar is invisible, should be visible.\n"); + ok(si.nPage != 0 && si.nMin == 0 && si.nMax > 1, + "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n", + si.nPage, si.nMin, si.nMax); + + /* Setting non-scrolling text again does *not* reset scrollbar range */ + SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"a"); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), + "Vertical scrollbar is invisible, should be visible.\n"); + ok(si.nPage != 0 && si.nMin == 0 && si.nMax > 1, + "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n", + si.nPage, si.nMin, si.nMax); + + SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), + "Vertical scrollbar is invisible, should be visible.\n"); + ok(si.nPage != 0 && si.nMin == 0 && si.nMax > 1, + "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n", + si.nPage, si.nMin, si.nMax); + + SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"a"); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), + "Vertical scrollbar is invisible, should be visible.\n"); + ok(si.nPage != 0 && si.nMin == 0 && si.nMax > 1, + "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n", + si.nPage, si.nMin, si.nMax); + + SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)""); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), + "Vertical scrollbar is invisible, should be visible.\n"); + ok(si.nPage != 0 && si.nMin == 0 && si.nMax > 1, + "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n", + si.nPage, si.nMin, si.nMax); + + DestroyWindow(hwndRichEdit); + + /* Test behavior with explicit visibility request, using ShowScrollBar() */ + hwndRichEdit = new_richedit(NULL); + + /* Previously failed because builtin incorrectly re-hides scrollbar forced visible */ + ShowScrollBar(hwndRichEdit, SB_VERT, TRUE); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), + "Vertical scrollbar is invisible, should be visible.\n"); + todo_wine { + ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 100, + "reported page/range is %d (%d..%d) expected 0 (0..100)\n", + si.nPage, si.nMin, si.nMax); + } + + /* Ditto, see above */ + SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), + "Vertical scrollbar is invisible, should be visible.\n"); + todo_wine { + ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 100, + "reported page/range is %d (%d..%d) expected 0 (0..100)\n", + si.nPage, si.nMin, si.nMax); + } + + /* Ditto, see above */ + SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"a"); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), + "Vertical scrollbar is invisible, should be visible.\n"); + todo_wine { + ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 100, + "reported page/range is %d (%d..%d) expected 0 (0..100)\n", + si.nPage, si.nMin, si.nMax); + } + + /* Ditto, see above */ + SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"a\na"); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), + "Vertical scrollbar is invisible, should be visible.\n"); + todo_wine { + ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 100, + "reported page/range is %d (%d..%d) expected 0 (0..100)\n", + si.nPage, si.nMin, si.nMax); + } + + /* Ditto, see above */ + SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), + "Vertical scrollbar is invisible, should be visible.\n"); + todo_wine { + ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 100, + "reported page/range is %d (%d..%d) expected 0 (0..100)\n", + si.nPage, si.nMin, si.nMax); + } + + SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text); + SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), + "Vertical scrollbar is visible, should be invisible.\n"); + ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, + "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n", + si.nPage, si.nMin, si.nMax); + + DestroyWindow(hwndRichEdit); + + hwndRichEdit = new_richedit(NULL); + + ShowScrollBar(hwndRichEdit, SB_VERT, FALSE); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), + "Vertical scrollbar is visible, should be invisible.\n"); + ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 0, + "reported page/range is %d (%d..%d) expected all 0\n", + si.nPage, si.nMin, si.nMax); + + SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), + "Vertical scrollbar is visible, should be invisible.\n"); + ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 0, + "reported page/range is %d (%d..%d) expected all 0\n", + si.nPage, si.nMin, si.nMax); + + SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"a"); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), + "Vertical scrollbar is visible, should be invisible.\n"); + ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 0, + "reported page/range is %d (%d..%d) expected all 0\n", + si.nPage, si.nMin, si.nMax); + + SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), + "Vertical scrollbar is visible, should be invisible.\n"); + ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 0, + "reported page/range is %d (%d..%d) expected all 0\n", + si.nPage, si.nMin, si.nMax); + + SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), + "Vertical scrollbar is invisible, should be visible.\n"); + ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, + "reported page/range is %d (%d..%d)\n", + si.nPage, si.nMin, si.nMax); + + /* Previously, builtin incorrectly re-shows explicitly hidden scrollbar */ + ShowScrollBar(hwndRichEdit, SB_VERT, FALSE); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), + "Vertical scrollbar is visible, should be invisible.\n"); + ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, + "reported page/range is %d (%d..%d)\n", + si.nPage, si.nMin, si.nMax); + + SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), + "Vertical scrollbar is visible, should be invisible.\n"); + ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, + "reported page/range is %d (%d..%d)\n", + si.nPage, si.nMin, si.nMax); + + /* Testing effect of EM_SCROLL on scrollbar visibility. It seems that + EM_SCROLL will make visible any forcefully invisible scrollbar */ + SendMessage(hwndRichEdit, EM_SCROLL, SB_LINEDOWN, 0); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), + "Vertical scrollbar is invisible, should be visible.\n"); + ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, + "reported page/range is %d (%d..%d)\n", + si.nPage, si.nMin, si.nMax); + + ShowScrollBar(hwndRichEdit, SB_VERT, FALSE); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), + "Vertical scrollbar is visible, should be invisible.\n"); + ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, + "reported page/range is %d (%d..%d)\n", + si.nPage, si.nMin, si.nMax); + + /* Again, EM_SCROLL, with SB_LINEUP */ + SendMessage(hwndRichEdit, EM_SCROLL, SB_LINEUP, 0); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), + "Vertical scrollbar is invisible, should be visible.\n"); + ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, + "reported page/range is %d (%d..%d)\n", + si.nPage, si.nMin, si.nMax); + + SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), + "Vertical scrollbar is visible, should be invisible.\n"); + ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, + "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n", + si.nPage, si.nMin, si.nMax); + + SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), + "Vertical scrollbar is invisible, should be visible.\n"); + ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, + "reported page/range is %d (%d..%d)\n", + si.nPage, si.nMin, si.nMax); + + DestroyWindow(hwndRichEdit); + + + /* Test behavior with explicit visibility request, using SetWindowLong()() */ + hwndRichEdit = new_richedit(NULL); + +#define ENABLE_WS_VSCROLL(hwnd) \ + SetWindowLongA(hwnd, GWL_STYLE, GetWindowLongA(hwnd, GWL_STYLE) | WS_VSCROLL) +#define DISABLE_WS_VSCROLL(hwnd) \ + SetWindowLongA(hwnd, GWL_STYLE, GetWindowLongA(hwnd, GWL_STYLE) & ~WS_VSCROLL) + + /* Previously failed because builtin incorrectly re-hides scrollbar forced visible */ + ENABLE_WS_VSCROLL(hwndRichEdit); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), + "Vertical scrollbar is invisible, should be visible.\n"); + ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 0, + "reported page/range is %d (%d..%d) expected all 0\n", + si.nPage, si.nMin, si.nMax); + + /* Ditto, see above */ + SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), + "Vertical scrollbar is invisible, should be visible.\n"); + ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 0, + "reported page/range is %d (%d..%d) expected all 0\n", + si.nPage, si.nMin, si.nMax); + + /* Ditto, see above */ + SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"a"); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), + "Vertical scrollbar is invisible, should be visible.\n"); + ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 0, + "reported page/range is %d (%d..%d) expected all 0\n", + si.nPage, si.nMin, si.nMax); + + /* Ditto, see above */ + SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"a\na"); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), + "Vertical scrollbar is invisible, should be visible.\n"); + ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 0, + "reported page/range is %d (%d..%d) expected all 0\n", + si.nPage, si.nMin, si.nMax); + + /* Ditto, see above */ + SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), + "Vertical scrollbar is invisible, should be visible.\n"); + ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 0, + "reported page/range is %d (%d..%d) expected all 0\n", + si.nPage, si.nMin, si.nMax); + + SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text); + SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), + "Vertical scrollbar is visible, should be invisible.\n"); + ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, + "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n", + si.nPage, si.nMin, si.nMax); + + DestroyWindow(hwndRichEdit); + + hwndRichEdit = new_richedit(NULL); + + DISABLE_WS_VSCROLL(hwndRichEdit); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), + "Vertical scrollbar is visible, should be invisible.\n"); + ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 0, + "reported page/range is %d (%d..%d) expected all 0\n", + si.nPage, si.nMin, si.nMax); + + SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), + "Vertical scrollbar is visible, should be invisible.\n"); + ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 0, + "reported page/range is %d (%d..%d) expected all 0\n", + si.nPage, si.nMin, si.nMax); + + SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"a"); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), + "Vertical scrollbar is visible, should be invisible.\n"); + ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 0, + "reported page/range is %d (%d..%d) expected all 0\n", + si.nPage, si.nMin, si.nMax); + + SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), + "Vertical scrollbar is visible, should be invisible.\n"); + ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 0, + "reported page/range is %d (%d..%d) expected all 0\n", + si.nPage, si.nMin, si.nMax); + + SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), + "Vertical scrollbar is invisible, should be visible.\n"); + ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, + "reported page/range is %d (%d..%d)\n", + si.nPage, si.nMin, si.nMax); + + /* Previously, builtin incorrectly re-shows explicitly hidden scrollbar */ + DISABLE_WS_VSCROLL(hwndRichEdit); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), + "Vertical scrollbar is visible, should be invisible.\n"); + ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, + "reported page/range is %d (%d..%d)\n", + si.nPage, si.nMin, si.nMax); + + SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), + "Vertical scrollbar is visible, should be invisible.\n"); + ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, + "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n", + si.nPage, si.nMin, si.nMax); + + SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), + "Vertical scrollbar is invisible, should be visible.\n"); + ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, + "reported page/range is %d (%d..%d)\n", + si.nPage, si.nMin, si.nMax); + + DISABLE_WS_VSCROLL(hwndRichEdit); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), + "Vertical scrollbar is visible, should be invisible.\n"); + ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, + "reported page/range is %d (%d..%d)\n", + si.nPage, si.nMin, si.nMax); + + /* Testing effect of EM_SCROLL on scrollbar visibility. It seems that + EM_SCROLL will make visible any forcefully invisible scrollbar */ + SendMessage(hwndRichEdit, EM_SCROLL, SB_LINEDOWN, 0); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), + "Vertical scrollbar is invisible, should be visible.\n"); + ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, + "reported page/range is %d (%d..%d)\n", + si.nPage, si.nMin, si.nMax); + + DISABLE_WS_VSCROLL(hwndRichEdit); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), + "Vertical scrollbar is visible, should be invisible.\n"); + ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, + "reported page/range is %d (%d..%d)\n", + si.nPage, si.nMin, si.nMax); + + /* Again, EM_SCROLL, with SB_LINEUP */ + SendMessage(hwndRichEdit, EM_SCROLL, SB_LINEUP, 0); + memset(&si, 0, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_PAGE | SIF_RANGE; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), + "Vertical scrollbar is invisible, should be visible.\n"); + ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, + "reported page/range is %d (%d..%d)\n", + si.nPage, si.nMin, si.nMax); + + DestroyWindow(hwndRichEdit); + + /* This window proc models what is going on with Corman Lisp 3.0. + At WM_SIZE, this proc unconditionally calls ShowScrollBar() to + force the scrollbar into visibility. Recursion should NOT happen + as a result of this action. + */ + r = GetClassInfoA(NULL, RICHEDIT_CLASS, &cls); + if (r) { + richeditProc = cls.lpfnWndProc; + cls.lpfnWndProc = RicheditStupidOverrideProcA; + cls.lpszClassName = "RicheditStupidOverride"; + if(!RegisterClassA(&cls)) assert(0); + + recursionLevel = 0; + WM_SIZE_recursionLevel = 0; + bailedOutOfRecursion = FALSE; + hwndRichEdit = new_window(cls.lpszClassName, ES_MULTILINE, NULL); + ok(!bailedOutOfRecursion, + "WM_SIZE/scrollbar mutual recursion detected, expected none!\n"); + + recursionLevel = 0; + WM_SIZE_recursionLevel = 0; + bailedOutOfRecursion = FALSE; + MoveWindow(hwndRichEdit, 0, 0, 250, 100, TRUE); + ok(!bailedOutOfRecursion, + "WM_SIZE/scrollbar mutual recursion detected, expected none!\n"); + + /* Unblock window in order to process WM_DESTROY */ + recursionLevel = 0; + bailedOutOfRecursion = FALSE; + WM_SIZE_recursionLevel = 0; + DestroyWindow(hwndRichEdit); + } +} + static void test_EM_SETUNDOLIMIT(void) { /* cases we test for: @@ -2452,6 +3201,12 @@ static void test_EM_SETTEXTEX(void) WCHAR TestItem1[] = {'T', 'e', 's', 't', 'S', 'o', 'm', 'e', 'T', 'e', 'x', 't', 0}; + WCHAR TestItem1alt[] = {'T', 'T', 'e', 's', + 't', 'S', 'o', 'm', + 'e', 'T', 'e', 'x', + 't', 't', 'S', 'o', + 'm', 'e', 'T', 'e', + 'x', 't', 0}; WCHAR TestItem2[] = {'T', 'e', 's', 't', 'S', 'o', 'm', 'e', 'T', 'e', 'x', 't', @@ -2480,6 +3235,7 @@ static void test_EM_SETTEXTEX(void) ' ','\r', 0}; #define MAX_BUF_LEN 1024 WCHAR buf[MAX_BUF_LEN]; + char bufACP[MAX_BUF_LEN]; char * p; int result; CHARRANGE cr; @@ -2499,7 +3255,7 @@ static void test_EM_SETTEXTEX(void) "EM_GETTEXTEX results not what was set by EM_SETTEXTEX\n"); /* Unlike WM_SETTEXT/WM_GETTEXT pair, EM_SETTEXTEX/EM_GETTEXTEX does not - convert \r to \r\n on return + convert \r to \r\n on return: !ST_SELECTION && Unicode && !\rtf */ setText.codepage = 1200; /* no constant for unicode */ getText.codepage = 1200; /* no constant for unicode */ @@ -2545,7 +3301,7 @@ static void test_EM_SETTEXTEX(void) "EM_GETTEXTEX results not what was set by EM_SETTEXTEX\n"); - /* \r\n pairs get changed into \r */ + /* \r\n pairs get changed into \r: !ST_SELECTION && Unicode && !\rtf */ setText.codepage = 1200; /* no constant for unicode */ getText.codepage = 1200; /* no constant for unicode */ getText.cb = MAX_BUF_LEN; @@ -2558,7 +3314,7 @@ static void test_EM_SETTEXTEX(void) ok(lstrcmpW(buf, TestItem3_after) == 0, "EM_SETTEXTEX did not convert properly\n"); - /* \n also gets changed to \r */ + /* \n also gets changed to \r: !ST_SELECTION && Unicode && !\rtf */ setText.codepage = 1200; /* no constant for unicode */ getText.codepage = 1200; /* no constant for unicode */ getText.cb = MAX_BUF_LEN; @@ -2571,7 +3327,7 @@ static void test_EM_SETTEXTEX(void) ok(lstrcmpW(buf, TestItem3_after) == 0, "EM_SETTEXTEX did not convert properly\n"); - /* \r\r\n gets changed into single space */ + /* \r\r\n gets changed into single space: !ST_SELECTION && Unicode && !\rtf */ setText.codepage = 1200; /* no constant for unicode */ getText.codepage = 1200; /* no constant for unicode */ getText.cb = MAX_BUF_LEN; @@ -2584,6 +3340,7 @@ static void test_EM_SETTEXTEX(void) ok(lstrcmpW(buf, TestItem4_after) == 0, "EM_SETTEXTEX did not convert properly\n"); + /* !ST_SELECTION && Unicode && !\rtf */ result = SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) NULL); SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf); @@ -2593,14 +3350,14 @@ static void test_EM_SETTEXTEX(void) ok(lstrlenW(buf) == 0, "EM_SETTEXTEX with NULL lParam should clear rich edit.\n"); - /* put some text back */ + /* put some text back: !ST_SELECTION && Unicode && !\rtf */ setText.flags = 0; SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem1); /* select some text */ cr.cpMax = 1; cr.cpMin = 3; SendMessage(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM) &cr); - /* replace current selection */ + /* replace current selection: ST_SELECTION && Unicode && !\rtf */ setText.flags = ST_SELECTION; result = SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) NULL); @@ -2609,14 +3366,14 @@ static void test_EM_SETTEXTEX(void) " with no text should return 0. Got %i\n", result); - /* put some text back */ + /* put some text back: !ST_SELECTION && Unicode && !\rtf */ setText.flags = 0; SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem1); /* select some text */ cr.cpMax = 1; cr.cpMin = 3; SendMessage(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM) &cr); - /* replace current selection */ + /* replace current selection: ST_SELECTION && Unicode && !\rtf */ setText.flags = ST_SELECTION; result = SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem1); @@ -2641,6 +3398,7 @@ static void test_EM_SETTEXTEX(void) (WPARAM)(SF_RTF), (LPARAM)&es); trace("EM_STREAMOUT produced: \n%s\n", (char *)buf); + /* !ST_SELECTION && !Unicode && \rtf */ setText.codepage = CP_ACP;/* EM_STREAMOUT saved as ANSI string */ getText.codepage = 1200; /* no constant for unicode */ getText.cb = MAX_BUF_LEN; @@ -2654,6 +3412,66 @@ static void test_EM_SETTEXTEX(void) ok(lstrcmpW(buf, TestItem1) == 0, "EM_GETTEXTEX results not what was set by EM_SETTEXTEX\n"); + /* The following test demonstrates that EM_SETTEXTEX supports RTF strings with a selection */ + SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) "TestSomeText"); /* TestItem1 */ + p = (char *)buf; + es.dwCookie = (DWORD_PTR)&p; + es.dwError = 0; + es.pfnCallback = test_WM_SETTEXT_esCallback; + memset(buf, 0, sizeof(buf)); + SendMessage(hwndRichEdit, EM_STREAMOUT, + (WPARAM)(SF_RTF), (LPARAM)&es); + trace("EM_STREAMOUT produced: \n%s\n", (char *)buf); + + /* select some text */ + cr.cpMax = 1; + cr.cpMin = 3; + SendMessage(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM) &cr); + + /* ST_SELECTION && !Unicode && \rtf */ + setText.codepage = CP_ACP;/* EM_STREAMOUT saved as ANSI string */ + getText.codepage = 1200; /* no constant for unicode */ + getText.cb = MAX_BUF_LEN; + getText.flags = GT_DEFAULT; + getText.lpDefaultChar = NULL; + getText.lpUsedDefChar = NULL; + + setText.flags = ST_SELECTION; + SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) buf); + SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf); + ok(lstrcmpW(buf, TestItem1alt) == 0, + "EM_GETTEXTEX results not what was set by EM_SETTEXTEX when" + " using ST_SELECTION on an RTF string and non-Unicode\n"); + + /* The following test demonstrates that EM_SETTEXTEX replacing a selection */ + setText.codepage = 1200; /* no constant for unicode */ + getText.codepage = CP_ACP; + getText.cb = MAX_BUF_LEN; + + setText.flags = 0; + SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem1); /* TestItem1 */ + SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) bufACP); + + /* select some text */ + cr.cpMax = 1; + cr.cpMin = 3; + SendMessage(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM) &cr); + + /* ST_SELECTION && !Unicode && !\rtf */ + setText.codepage = CP_ACP; + getText.codepage = 1200; /* no constant for unicode */ + getText.cb = MAX_BUF_LEN; + getText.flags = GT_DEFAULT; + getText.lpDefaultChar = NULL; + getText.lpUsedDefChar = NULL; + + setText.flags = ST_SELECTION; + SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) bufACP); + SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf); + ok(lstrcmpW(buf, TestItem1alt) == 0, + "EM_GETTEXTEX results not what was set by EM_SETTEXTEX when" + " using ST_SELECTION and non-Unicode\n"); + DestroyWindow(hwndRichEdit); } @@ -3687,7 +4505,7 @@ static void test_EM_STREAMIN(void) struct StringWithLength cookieForStream4; const char * streamText4 = "This text just needs to be long enough to cause run to be split onto "\ - "two seperate lines and make sure the null terminating character is "\ + "two separate lines and make sure the null terminating character is "\ "handled properly.\0"; int length4 = strlen(streamText4) + 1; cookieForStream4.buffer = (char *)streamText4; @@ -4492,25 +5310,25 @@ static void test_word_movement(void) /* one |two three */ SendMessage(hwnd, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end); ok(sel_start == sel_end, "Selection should be empty\n"); - ok(sel_start == 4, "Cursur is at %d instead of %d\n", sel_start, 4); + ok(sel_start == 4, "Cursor is at %d instead of %d\n", sel_start, 4); SEND_CTRL_RIGHT(hwnd); /* one two |three */ SendMessage(hwnd, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end); ok(sel_start == sel_end, "Selection should be empty\n"); - ok(sel_start == 9, "Cursur is at %d instead of %d\n", sel_start, 9); + ok(sel_start == 9, "Cursor is at %d instead of %d\n", sel_start, 9); SEND_CTRL_LEFT(hwnd); /* one |two three */ SendMessage(hwnd, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end); ok(sel_start == sel_end, "Selection should be empty\n"); - ok(sel_start == 4, "Cursur is at %d instead of %d\n", sel_start, 4); + ok(sel_start == 4, "Cursor is at %d instead of %d\n", sel_start, 4); SEND_CTRL_LEFT(hwnd); /* |one two three */ SendMessage(hwnd, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end); ok(sel_start == sel_end, "Selection should be empty\n"); - ok(sel_start == 0, "Cursur is at %d instead of %d\n", sel_start, 0); + ok(sel_start == 0, "Cursor is at %d instead of %d\n", sel_start, 0); SendMessage(hwnd, EM_SETSEL, 8, 8); /* one two | three */ @@ -4518,7 +5336,7 @@ static void test_word_movement(void) /* one two |three */ SendMessage(hwnd, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end); ok(sel_start == sel_end, "Selection should be empty\n"); - ok(sel_start == 9, "Cursur is at %d instead of %d\n", sel_start, 9); + ok(sel_start == 9, "Cursor is at %d instead of %d\n", sel_start, 9); SendMessage(hwnd, EM_SETSEL, 11, 11); /* one two th|ree */ @@ -4526,7 +5344,7 @@ static void test_word_movement(void) /* one two |three */ SendMessage(hwnd, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end); ok(sel_start == sel_end, "Selection should be empty\n"); - ok(sel_start == 9, "Cursur is at %d instead of %d\n", sel_start, 9); + ok(sel_start == 9, "Cursor is at %d instead of %d\n", sel_start, 9); DestroyWindow(hwnd); } @@ -4565,6 +5383,7 @@ START_TEST( editor ) test_EM_POSFROMCHAR(); test_EM_SCROLLCARET(); test_EM_SCROLL(); + test_scrollbar_visibility(); test_WM_SETTEXT(); test_EM_LINELENGTH(); test_EM_SETCHARFORMAT(); @@ -4598,6 +5417,7 @@ START_TEST( editor ) test_undo_coalescing(); test_word_movement(); test_EM_CHARFROMPOS(); + test_SETPARAFORMAT(); /* Set the environment variable WINETEST_RICHED20 to keep windows * responsive and open for 30 seconds. This is useful for debugging. diff --git a/rostests/winetests/riched20/richole.c b/rostests/winetests/riched20/richole.c index f6c2928e3d0..6eefdd0ffb5 100644 --- a/rostests/winetests/riched20/richole.c +++ b/rostests/winetests/riched20/richole.c @@ -26,17 +26,13 @@ #include #include #include +#include #include #include #include #include #include -#include -DEFINE_GUID(IID_ITextDocument, 0x8cc497c0, 0xa1df, 0x11ce, 0x80, 0x98, 0x00, 0xaa, 0x00, 0x47, 0xbe, 0x5d); -DEFINE_GUID(IID_ITextRange, 0x8cc497c2, 0xa1df, 0x11ce, 0x80, 0x98, 0x00, 0xaa, 0x00, 0x47, 0xbe, 0x5d); -DEFINE_GUID(IID_ITextSelection, 0x8cc497c1, 0xa1df, 0x11ce, 0x80, 0x98, 0x00, 0xaa, 0x00, 0x47, 0xbe, 0x5d); - static HMODULE hmoduleRichEdit; static HWND new_window(LPCTSTR lpClassName, DWORD dwStyle, HWND parent) diff --git a/rostests/winetests/riched20/testlist.c b/rostests/winetests/riched20/testlist.c index b9d14484609..1248a7cdc6a 100644 --- a/rostests/winetests/riched20/testlist.c +++ b/rostests/winetests/riched20/testlist.c @@ -6,12 +6,8 @@ #define STANDALONE #include "wine/test.h" -extern void func_editor(void); -extern void func_richole(void); const struct test winetest_testlist[] = { - { "editor", func_editor }, - { "richole", func_richole }, { 0, 0 } }; diff --git a/rostests/winetests/riched32/testlist.c b/rostests/winetests/riched32/testlist.c index 08e717eeb0d..1248a7cdc6a 100644 --- a/rostests/winetests/riched32/testlist.c +++ b/rostests/winetests/riched32/testlist.c @@ -6,10 +6,8 @@ #define STANDALONE #include "wine/test.h" -extern void func_editor(void); const struct test winetest_testlist[] = { - { "editor", func_editor }, { 0, 0 } }; From d1d5f6306d904d742bb9dae8fb7693d554475b95 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Thu, 28 Aug 2008 11:50:29 +0000 Subject: [PATCH 215/324] - Added a base address for netshell.dll - Relocated imm32.dll svn path=/trunk/; revision=35730 --- reactos/baseaddress.rbuild | 3 ++- reactos/dll/win32/netshell/netshell.c | 21 +++++++++++++++++++++ reactos/dll/win32/netshell/netshell.rbuild | 2 +- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/reactos/baseaddress.rbuild b/reactos/baseaddress.rbuild index 45bb2d5addd..f2cb3154735 100644 --- a/reactos/baseaddress.rbuild +++ b/reactos/baseaddress.rbuild @@ -127,11 +127,12 @@ + - + diff --git a/reactos/dll/win32/netshell/netshell.c b/reactos/dll/win32/netshell/netshell.c index 0bf1a6e455a..d89419e5630 100644 --- a/reactos/dll/win32/netshell/netshell.c +++ b/reactos/dll/win32/netshell/netshell.c @@ -47,6 +47,8 @@ DllCanUnloadNow(void) return S_FALSE; } +//#define CHECKPOINT1 ERR("\n"); + STDAPI DllRegisterServer(void) { @@ -55,21 +57,29 @@ DllRegisterServer(void) WCHAR szNet[20]; UINT Length, Offset; + //CHECKPOINT1; + if (RegCreateKeyExW(HKEY_CLASSES_ROOT, szNetConnectClass, 0, NULL, 0, KEY_WRITE, NULL, &hKey, NULL) != ERROR_SUCCESS) return SELFREG_E_CLASS; + //CHECKPOINT1; + if (LoadStringW(netshell_hInstance, IDS_NETWORKCONNECTION, szName, MAX_PATH)) { szName[MAX_PATH-1] = L'\0'; RegSetValueW(hKey, NULL, REG_SZ, szName, (wcslen(szName)+1) * sizeof(WCHAR)); } + //CHECKPOINT1; + if (RegCreateKeyExW(HKEY_LOCAL_MACHINE, szNamespaceKey, 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS) { RegSetValueW(hSubKey, NULL, REG_SZ, szName, (wcslen(szName)+1) * sizeof(WCHAR)); RegCloseKey(hSubKey); } + //CHECKPOINT1; + Length = swprintf(szNet, L",-%u", IDS_NETWORKCONNECTION); Offset = GetModuleFileNameW(netshell_hInstance, &szName[1], MAX_PATH); if (Offset + Length + 2 < MAX_PATH) @@ -80,26 +90,37 @@ DllRegisterServer(void) RegSetValueExW(hKey, L"LocalizedString", 0, REG_SZ, (const LPBYTE)szName, (wcslen(szName)+1) * sizeof(WCHAR)); } + + //CHECKPOINT1; + szName[Offset+1] = L'\0'; + //CHECKPOINT1; + /* store default icon */ if (RegCreateKeyExW(hKey, L"DefaultIcon", 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS) { RegSetValueW(hSubKey, NULL, REG_SZ, &szName[1], (Offset+1) * sizeof(WCHAR)); RegCloseKey(hSubKey); } + //CHECKPOINT1; if (RegCreateKeyExW(hKey, L"InProcServer32", 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS) { RegSetValueW(hSubKey, NULL, REG_SZ, &szName[1], (Offset+1) * sizeof(WCHAR)); RegCloseKey(hSubKey); } + + //CHECKPOINT1; + if (RegCreateKeyExW(hKey, L"ShellFolder", 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS) { DWORD dwAttributes = SFGAO_FOLDER; RegSetValueExW(hSubKey, L"Attributes",0, REG_BINARY, (const LPBYTE)&dwAttributes, sizeof(DWORD)); } + //CHECKPOINT1; + return S_OK; } diff --git a/reactos/dll/win32/netshell/netshell.rbuild b/reactos/dll/win32/netshell/netshell.rbuild index 1c1cd4de95e..63606570ef2 100644 --- a/reactos/dll/win32/netshell/netshell.rbuild +++ b/reactos/dll/win32/netshell/netshell.rbuild @@ -1,4 +1,4 @@ - + . From aa17a34237bfa80c687fc18214d1eea096416907 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Thu, 28 Aug 2008 11:55:35 +0000 Subject: [PATCH 216/324] Sorry, I committed stuff I shouldn't svn path=/trunk/; revision=35731 --- reactos/dll/win32/netshell/netshell.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/reactos/dll/win32/netshell/netshell.c b/reactos/dll/win32/netshell/netshell.c index d89419e5630..0bf1a6e455a 100644 --- a/reactos/dll/win32/netshell/netshell.c +++ b/reactos/dll/win32/netshell/netshell.c @@ -47,8 +47,6 @@ DllCanUnloadNow(void) return S_FALSE; } -//#define CHECKPOINT1 ERR("\n"); - STDAPI DllRegisterServer(void) { @@ -57,29 +55,21 @@ DllRegisterServer(void) WCHAR szNet[20]; UINT Length, Offset; - //CHECKPOINT1; - if (RegCreateKeyExW(HKEY_CLASSES_ROOT, szNetConnectClass, 0, NULL, 0, KEY_WRITE, NULL, &hKey, NULL) != ERROR_SUCCESS) return SELFREG_E_CLASS; - //CHECKPOINT1; - if (LoadStringW(netshell_hInstance, IDS_NETWORKCONNECTION, szName, MAX_PATH)) { szName[MAX_PATH-1] = L'\0'; RegSetValueW(hKey, NULL, REG_SZ, szName, (wcslen(szName)+1) * sizeof(WCHAR)); } - //CHECKPOINT1; - if (RegCreateKeyExW(HKEY_LOCAL_MACHINE, szNamespaceKey, 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS) { RegSetValueW(hSubKey, NULL, REG_SZ, szName, (wcslen(szName)+1) * sizeof(WCHAR)); RegCloseKey(hSubKey); } - //CHECKPOINT1; - Length = swprintf(szNet, L",-%u", IDS_NETWORKCONNECTION); Offset = GetModuleFileNameW(netshell_hInstance, &szName[1], MAX_PATH); if (Offset + Length + 2 < MAX_PATH) @@ -90,37 +80,26 @@ DllRegisterServer(void) RegSetValueExW(hKey, L"LocalizedString", 0, REG_SZ, (const LPBYTE)szName, (wcslen(szName)+1) * sizeof(WCHAR)); } - - //CHECKPOINT1; - szName[Offset+1] = L'\0'; - //CHECKPOINT1; - /* store default icon */ if (RegCreateKeyExW(hKey, L"DefaultIcon", 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS) { RegSetValueW(hSubKey, NULL, REG_SZ, &szName[1], (Offset+1) * sizeof(WCHAR)); RegCloseKey(hSubKey); } - //CHECKPOINT1; if (RegCreateKeyExW(hKey, L"InProcServer32", 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS) { RegSetValueW(hSubKey, NULL, REG_SZ, &szName[1], (Offset+1) * sizeof(WCHAR)); RegCloseKey(hSubKey); } - - //CHECKPOINT1; - if (RegCreateKeyExW(hKey, L"ShellFolder", 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS) { DWORD dwAttributes = SFGAO_FOLDER; RegSetValueExW(hSubKey, L"Attributes",0, REG_BINARY, (const LPBYTE)&dwAttributes, sizeof(DWORD)); } - //CHECKPOINT1; - return S_OK; } From de3ef9b8238c760d6104351eff9ed2babdc239d8 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Thu, 28 Aug 2008 15:37:57 +0000 Subject: [PATCH 217/324] - Use CmpCompressedNameSize to obtain the compressed name length (I'll convert the other part of the routine to use CmpCopyCompressedName later, instead of assuming the current way of things). - Fix incorrect freeing of a buffer returned by a call to CmpConstructName (spotted by Stefan Ginsberg). - Changes in a couple of comments for better description, and a couple of 80col exceeders fixed. svn path=/trunk/; revision=35732 --- reactos/ntoskrnl/config/cmkcbncb.c | 18 +++++++++++++----- reactos/ntoskrnl/config/cmsysini.c | 7 +++++-- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/reactos/ntoskrnl/config/cmkcbncb.c b/reactos/ntoskrnl/config/cmkcbncb.c index b104fa298f5..90271a532f2 100644 --- a/reactos/ntoskrnl/config/cmkcbncb.c +++ b/reactos/ntoskrnl/config/cmkcbncb.c @@ -898,7 +898,7 @@ CmpConstructName(IN PCM_KEY_CONTROL_BLOCK Kcb) PWCHAR TargetBuffer, CurrentNameW; PUCHAR CurrentName; - /* Calculate how much size our key name is going to occupy */ + /* Calculate how much size our key name is going to occupy */ NameLength = 0; MyKcb = Kcb; @@ -906,11 +906,16 @@ CmpConstructName(IN PCM_KEY_CONTROL_BLOCK Kcb) { /* Add length of the name */ if (!MyKcb->NameBlock->Compressed) + { NameLength += MyKcb->NameBlock->NameLength; + } else - NameLength += MyKcb->NameBlock->NameLength * sizeof(WCHAR); + { + NameLength += CmpCompressedNameSize(MyKcb->NameBlock->Name, + MyKcb->NameBlock->NameLength); + } - /* Sum up the separator also */ + /* Sum up the separator too */ NameLength += sizeof(WCHAR); /* Go to the parent KCB */ @@ -918,10 +923,13 @@ CmpConstructName(IN PCM_KEY_CONTROL_BLOCK Kcb) } /* Allocate the unicode string now */ - KeyName = ExAllocatePoolWithTag(PagedPool, NameLength + sizeof(UNICODE_STRING), TAG_CM); + KeyName = ExAllocatePoolWithTag(PagedPool, + NameLength + sizeof(UNICODE_STRING), + TAG_CM); if (!KeyName) return NULL; + /* Set it up */ KeyName->Buffer = (PWSTR)(KeyName + 1); KeyName->Length = NameLength; KeyName->MaximumLength = NameLength; @@ -932,7 +940,7 @@ CmpConstructName(IN PCM_KEY_CONTROL_BLOCK Kcb) while (MyKcb) { - /* Sanity checks for deleted keys */ + /* Sanity checks for deleted and fake keys */ if ((!MyKcb->KeyCell && !MyKcb->Delete) || !MyKcb->KeyHive || MyKcb->ExtFlags & CM_KCB_KEY_NON_EXIST) diff --git a/reactos/ntoskrnl/config/cmsysini.c b/reactos/ntoskrnl/config/cmsysini.c index 06d9dba71d4..59321b9b0c3 100644 --- a/reactos/ntoskrnl/config/cmsysini.c +++ b/reactos/ntoskrnl/config/cmsysini.c @@ -159,7 +159,7 @@ CmpQueryKeyName(IN PVOID ObjectBody, (Length < (*ReturnLength - sizeof(OBJECT_NAME_INFORMATION)))) { /* Free the buffer allocated by CmpConstructName */ - ExFreePool(KeyName->Buffer); + ExFreePool(KeyName); /* Return buffer length failure */ return STATUS_INFO_LENGTH_MISMATCH; @@ -174,7 +174,9 @@ CmpQueryKeyName(IN PVOID ObjectBody, ObjectNameInfo->Name.Length = KeyName->Length; /* Copy string content*/ - RtlCopyMemory(ObjectNameInfo->Name.Buffer, KeyName->Buffer, *ReturnLength); + RtlCopyMemory(ObjectNameInfo->Name.Buffer, + KeyName->Buffer, + *ReturnLength); } _SEH_HANDLE { @@ -186,6 +188,7 @@ CmpQueryKeyName(IN PVOID ObjectBody, /* Free the buffer allocated by CmpConstructName */ ExFreePool(KeyName); + /* Return status */ return Status; } From 56968e5d6f64864fe10ee7d70114255452b6be32 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 28 Aug 2008 23:21:05 +0000 Subject: [PATCH 218/324] - Merge aicom-network-fixes up to r35714 svn path=/trunk/; revision=35734 --- reactos/lib/drivers/ip/transport/tcp/tcp.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/reactos/lib/drivers/ip/transport/tcp/tcp.c b/reactos/lib/drivers/ip/transport/tcp/tcp.c index 7468b456cd7..c6657fd0407 100644 --- a/reactos/lib/drivers/ip/transport/tcp/tcp.c +++ b/reactos/lib/drivers/ip/transport/tcp/tcp.c @@ -592,10 +592,7 @@ NTSTATUS TCPConnect TcpipRecursiveMutexLeave( &TCPLock ); - if( Status == OSK_EINPROGRESS ) - return STATUS_PENDING; - else - return Status; + return Status; } NTSTATUS TCPDisconnect From 71189715c9e429dee1a2f1795acf1034db4581f7 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Thu, 28 Aug 2008 23:47:23 +0000 Subject: [PATCH 219/324] Fix warning that variable might be used uninitialized svn path=/trunk/; revision=35735 --- reactos/lib/fslib/vfatlib/check/fat.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/reactos/lib/fslib/vfatlib/check/fat.c b/reactos/lib/fslib/vfatlib/check/fat.c index 7e2ad9c1d62..e5a5504232f 100644 --- a/reactos/lib/fslib/vfatlib/check/fat.c +++ b/reactos/lib/fslib/vfatlib/check/fat.c @@ -66,6 +66,8 @@ void read_fat(DOS_FS *fs) second = NULL; if (second && memcmp(first,second,eff_size) != 0) { FAT_ENTRY first_media, second_media; + memset (&first_media, 0, sizeof (first_media)); + memset (&second_media, 0, sizeof (second_media)); get_fat(&first_media,first,0,fs); get_fat(&second_media,second,0,fs); first_ok = (first_media.value & FAT_EXTD(fs)) == FAT_EXTD(fs); From b1d48577f8fd315e29160ffc080d803889084d6c Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Fri, 29 Aug 2008 10:01:06 +0000 Subject: [PATCH 220/324] - GetServiceDisplayNameA/W and GetServiceKeyNameA/W: Fix returned name size. - RGetServiceDisplayNameW: Return the service name if the display name is not available. - Implement RGetServiceDisplayNameA and RGetServiceKeyNameA. svn path=/trunk/; revision=35748 --- reactos/base/system/services/rpcserver.c | 210 +++++++++++++++++++++-- reactos/dll/win32/advapi32/service/scm.c | 20 ++- 2 files changed, 209 insertions(+), 21 deletions(-) diff --git a/reactos/base/system/services/rpcserver.c b/reactos/base/system/services/rpcserver.c index 77baac1c323..416cc13f502 100644 --- a/reactos/base/system/services/rpcserver.c +++ b/reactos/base/system/services/rpcserver.c @@ -2241,15 +2241,37 @@ DWORD RGetServiceDisplayNameW( if (lpService == NULL) { DPRINT1("Could not find a service!\n"); + + /* If the service could not be found and lpcchBuffer is 0, windows + puts null in lpDisplayName and puts 1 in lpcchBuffer */ + if (*lpcchBuffer == 0) + { + *lpcchBuffer = 1; + *lpDisplayName = '\0'; + } + return ERROR_SERVICE_DOES_NOT_EXIST; } - dwLength = wcslen(lpService->lpDisplayName) + 1; - - if (lpDisplayName != NULL && - *lpcchBuffer >= dwLength) + if (!lpService->lpDisplayName) { - wcscpy(lpDisplayName, lpService->lpDisplayName); + dwLength = wcslen(lpService->lpServiceName); + + if (lpServiceName != NULL && + *lpcchBuffer > dwLength) + { + wcscpy(lpDisplayName, lpService->lpServiceName); + } + } + else + { + dwLength = wcslen(lpService->lpDisplayName); + + if (lpDisplayName != NULL && + *lpcchBuffer > dwLength) + { + wcscpy(lpDisplayName, lpService->lpDisplayName); + } } dwError = (*lpcchBuffer > dwLength) ? ERROR_SUCCESS : ERROR_INSUFFICIENT_BUFFER; @@ -2291,20 +2313,31 @@ DWORD RGetServiceKeyNameW( if (lpService == NULL) { DPRINT1("Could not find a service!\n"); + + /* If the service could not be found and lpcchBuffer is 0, windows + puts null in lpDisplayName and puts 2 in lpcchBuffer */ + if (*lpcchBuffer == 0) + { + *lpcchBuffer = 2; + *lpServiceName = '\0'; + } + return ERROR_SERVICE_DOES_NOT_EXIST; } - dwLength = wcslen(lpService->lpServiceName) + 1; + dwLength = wcslen(lpService->lpServiceName); if (lpServiceName != NULL && - *lpcchBuffer >= dwLength) + *lpcchBuffer > dwLength) { wcscpy(lpServiceName, lpService->lpServiceName); + *lpcchBuffer = dwLength; + return ERROR_SUCCESS; } dwError = (*lpcchBuffer > dwLength) ? ERROR_SUCCESS : ERROR_INSUFFICIENT_BUFFER; - *lpcchBuffer = dwLength; + *lpcchBuffer = dwLength * 2; return dwError; } @@ -2559,8 +2592,97 @@ DWORD RGetServiceDisplayNameA( LPSTR lpDisplayName, LPBOUNDED_DWORD_4K lpcchBuffer) { - UNIMPLEMENTED; - return ERROR_CALL_NOT_IMPLEMENTED; +// PMANAGER_HANDLE hManager; + PSERVICE lpService; + DWORD dwLength; + DWORD dwError; + LPWSTR lpServiceNameW; + + DPRINT("RGetServiceDisplayNameA() called\n"); + DPRINT("hSCManager = %p\n", hSCManager); + DPRINT("lpServiceName: %s\n", lpServiceName); + DPRINT("lpDisplayName: %p\n", lpDisplayName); + DPRINT("*lpcchBuffer: %lu\n", *lpcchBuffer); + +// hManager = (PMANAGER_HANDLE)hSCManager; +// if (hManager->Handle.Tag != MANAGER_TAG) +// { +// DPRINT1("Invalid manager handle!\n"); +// return ERROR_INVALID_HANDLE; +// } + + dwLength = strlen(lpServiceName) + 1; + lpServiceNameW = HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, + dwLength * sizeof(WCHAR)); + if (!lpServiceNameW) + return ERROR_NOT_ENOUGH_MEMORY; + + MultiByteToWideChar(CP_ACP, + 0, + lpServiceName, + strlen(lpServiceName), + lpServiceNameW, + dwLength); + + lpService = ScmGetServiceEntryByName(lpServiceNameW); + + HeapFree(GetProcessHeap(), 0, lpServiceNameW); + + if (lpService == NULL) + { + DPRINT1("Could not find a service!\n"); + + /* If the service could not be found and lpcchBuffer is 0, windows + puts null in lpDisplayName and puts 1 in lpcchBuffer */ + if (*lpcchBuffer == 0) + { + *lpcchBuffer = 1; + *lpDisplayName = '\0'; + } + return ERROR_SERVICE_DOES_NOT_EXIST; + } + + if (!lpService->lpDisplayName) + { + dwLength = wcslen(lpService->lpServiceName); + if (lpServiceName != NULL && + *lpcchBuffer > dwLength) + { + WideCharToMultiByte(CP_ACP, + 0, + lpService->lpServiceName, + wcslen(lpService->lpServiceName), + lpDisplayName, + *lpcchBuffer, + NULL, + NULL); + return ERROR_SUCCESS; + } + } + else + { + dwLength = wcslen(lpService->lpDisplayName); + if (lpDisplayName != NULL && + *lpcchBuffer > dwLength) + { + WideCharToMultiByte(CP_ACP, + 0, + lpService->lpDisplayName, + wcslen(lpService->lpDisplayName), + lpDisplayName, + *lpcchBuffer, + NULL, + NULL); + return ERROR_SUCCESS; + } + } + + dwError = (*lpcchBuffer > dwLength) ? ERROR_SUCCESS : ERROR_INSUFFICIENT_BUFFER; + + *lpcchBuffer = dwLength * 2; + + return dwError; } @@ -2569,11 +2691,73 @@ DWORD RGetServiceKeyNameA( handle_t BindingHandle, SC_RPC_HANDLE hSCManager, LPSTR lpDisplayName, - LPSTR lpKeyName, + LPSTR lpServiceName, LPBOUNDED_DWORD_4K lpcchBuffer) { - UNIMPLEMENTED; - return ERROR_CALL_NOT_IMPLEMENTED; + PSERVICE lpService; + DWORD dwLength; + DWORD dwError; + LPWSTR lpDisplayNameW; + + DPRINT("RGetServiceKeyNameA() called\n"); + DPRINT("hSCManager = %p\n", hSCManager); + DPRINT("lpDisplayName: %s\n", lpDisplayName); + DPRINT("lpServiceName: %p\n", lpServiceName); + DPRINT("*lpcchBuffer: %lu\n", *lpcchBuffer); + + dwLength = strlen(lpDisplayName) + 1; + lpDisplayNameW = HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, + dwLength * sizeof(WCHAR)); + if (!lpDisplayNameW) + return ERROR_NOT_ENOUGH_MEMORY; + + MultiByteToWideChar(CP_ACP, + 0, + lpDisplayName, + strlen(lpDisplayName), + lpDisplayNameW, + dwLength); + + lpService = ScmGetServiceEntryByDisplayName(lpDisplayNameW); + + HeapFree(GetProcessHeap(), 0, lpDisplayNameW); + + if (lpService == NULL) + { + DPRINT1("Could not find the service!\n"); + + /* If the service could not be found and lpcchBuffer is 0, + put null in lpDisplayName and puts 1 in lpcchBuffer, verified WINXP. */ + if (*lpcchBuffer == 0) + { + *lpcchBuffer = 1; + *lpServiceName = '\0'; + } + + return ERROR_SERVICE_DOES_NOT_EXIST; + } + + dwLength = wcslen(lpService->lpServiceName); + if (lpService != NULL && + *lpcchBuffer > dwLength) + { + WideCharToMultiByte(CP_ACP, + 0, + lpService->lpServiceName, + wcslen(lpService->lpServiceName), + lpServiceName, + dwLength, + NULL, + NULL); + return ERROR_SUCCESS; + } + + dwError = (*lpcchBuffer > dwLength) ? ERROR_SUCCESS : ERROR_INSUFFICIENT_BUFFER; + + *lpcchBuffer = dwLength * 2; + + return dwError; } diff --git a/reactos/dll/win32/advapi32/service/scm.c b/reactos/dll/win32/advapi32/service/scm.c index 52c36981709..44df54502f6 100644 --- a/reactos/dll/win32/advapi32/service/scm.c +++ b/reactos/dll/win32/advapi32/service/scm.c @@ -1227,6 +1227,9 @@ GetServiceDisplayNameA(SC_HANDLE hSCManager, TRACE("GetServiceDisplayNameA() called\n"); + if (!lpDisplayName) + *lpcchBuffer = 0; + HandleBind(); _SEH_TRY @@ -1253,8 +1256,6 @@ GetServiceDisplayNameA(SC_HANDLE hSCManager, return FALSE; } - (*lpcchBuffer)--; - return TRUE; } @@ -1274,6 +1275,9 @@ GetServiceDisplayNameW(SC_HANDLE hSCManager, TRACE("GetServiceDisplayNameW() called\n"); + if (!lpDisplayName) + *lpcchBuffer = 0; + HandleBind(); _SEH_TRY @@ -1297,8 +1301,6 @@ GetServiceDisplayNameW(SC_HANDLE hSCManager, return FALSE; } - (*lpcchBuffer)--; - return TRUE; } @@ -1318,6 +1320,9 @@ GetServiceKeyNameA(SC_HANDLE hSCManager, TRACE("GetServiceKeyNameA() called\n"); + if (!lpServiceName) + *lpcchBuffer = 0; + HandleBind(); _SEH_TRY @@ -1341,8 +1346,6 @@ GetServiceKeyNameA(SC_HANDLE hSCManager, return FALSE; } - (*lpcchBuffer)--; - return TRUE; } @@ -1362,6 +1365,9 @@ GetServiceKeyNameW(SC_HANDLE hSCManager, TRACE("GetServiceKeyNameW() called\n"); + if (!lpDisplayName) + *lpcchBuffer = 0; + HandleBind(); _SEH_TRY @@ -1385,8 +1391,6 @@ GetServiceKeyNameW(SC_HANDLE hSCManager, return FALSE; } - (*lpcchBuffer)--; - return TRUE; } From e2a4d8be510500e43cb570991304e57364d427e8 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Fri, 29 Aug 2008 10:34:23 +0000 Subject: [PATCH 221/324] - ScmCreateManagerHandle: Fail on invalid database names. - ROpenServiceW: Fail if lpServiceName is NULL. - ROpenServiceA: Don't pass an empty string to ROpenServiceW if lpServiceName is NULL. Use NULL instead. This patch is based on bug report #3669 by bugboy . svn path=/trunk/; revision=35750 --- reactos/base/system/services/rpcserver.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/reactos/base/system/services/rpcserver.c b/reactos/base/system/services/rpcserver.c index 416cc13f502..e7902c9e02d 100644 --- a/reactos/base/system/services/rpcserver.c +++ b/reactos/base/system/services/rpcserver.c @@ -152,6 +152,17 @@ ScmCreateManagerHandle(LPWSTR lpDatabaseName, if (lpDatabaseName == NULL) lpDatabaseName = SERVICES_ACTIVE_DATABASEW; + if (wcsicmp(lpDatabaseName,SERVICES_FAILED_DATABASEW)==0) + { + DPRINT1("Database %S, does not exist\n",lpDatabaseName); + return ERROR_DATABASE_DOES_NOT_EXIST; + } + else if (wcsicmp(lpDatabaseName, SERVICES_ACTIVE_DATABASEW) != 0) + { + DPRINT1("Invalid Database name %S.\n",lpDatabaseName); + return ERROR_INVALID_NAME; + } + Ptr = (MANAGER_HANDLE*) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(MANAGER_HANDLE) + wcslen(lpDatabaseName) * sizeof(WCHAR)); @@ -1936,6 +1947,9 @@ DWORD ROpenServiceW( if (!lpServiceHandle) return ERROR_INVALID_PARAMETER; + if (!lpServiceName) + return ERROR_INVALID_ADDRESS; + hManager = (PMANAGER_HANDLE)hSCManager; if (!hManager || hManager->Handle.Tag != MANAGER_TAG) { @@ -2489,8 +2503,9 @@ DWORD ROpenServiceA( DPRINT("ROpenServiceA() called\n"); - RtlCreateUnicodeStringFromAsciiz(&ServiceName, - lpServiceName); + if (lpServiceName) + RtlCreateUnicodeStringFromAsciiz(&ServiceName, + lpServiceName); dwError = ROpenServiceW(BindingHandle, hSCManager, @@ -2498,7 +2513,8 @@ DWORD ROpenServiceA( dwDesiredAccess, lpServiceHandle); - RtlFreeUnicodeString(&ServiceName); + if (lpServiceName) + RtlFreeUnicodeString(&ServiceName); return dwError; } From 532fd2c7b0930f777cabaf3545fcdf86b1b8e876 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Fri, 29 Aug 2008 11:15:53 +0000 Subject: [PATCH 222/324] - QueryServiceConfig2A/W: Fail if lpBuffer is NULL but cbBufSize is not 0. - RChangeServiceConfigW: Update the display name if it has been changed. - RQueryServiceConfigW: Return pointers to empty strings instead of NULL pointers if information is not available. - RQueryServiceConfig2W: Fail if lpBuffer is NULL. - Implement RChangeServiceConfigA, RQueryServiceConfigA and RQueryServiceConfig2A. Patch is based on bug report #3669 by bugboy . svn path=/trunk/; revision=35752 --- reactos/base/system/services/rpcserver.c | 637 ++++++++++++++++++++++- reactos/dll/win32/advapi32/service/scm.c | 12 + 2 files changed, 623 insertions(+), 26 deletions(-) diff --git a/reactos/base/system/services/rpcserver.c b/reactos/base/system/services/rpcserver.c index e7902c9e02d..3088efca883 100644 --- a/reactos/base/system/services/rpcserver.c +++ b/reactos/base/system/services/rpcserver.c @@ -801,6 +801,7 @@ DWORD RChangeServiceConfigW( PSERVICE_HANDLE hSvc; PSERVICE lpService = NULL; HKEY hServiceKey = NULL; + LPWSTR lpDisplayNameW = NULL; DPRINT("RChangeServiceConfigW() called\n"); DPRINT("dwServiceType = %lu\n", dwServiceType); @@ -860,7 +861,21 @@ DWORD RChangeServiceConfigW( REG_SZ, (LPBYTE)lpDisplayName, (wcslen(lpDisplayName) + 1) * sizeof(WCHAR)); - /* FIXME: update lpService->lpDisplayName */ + + /* Update the display name */ + lpDisplayNameW = (LPWSTR)HeapAlloc(GetProcessHeap(), + 0, + (wcslen(lpDisplayName) + 1) * sizeof(WCHAR)); + if (lpDisplayNameW == NULL) + { + dwError = ERROR_NOT_ENOUGH_MEMORY; + goto done; + } + + if (lpService->lpDisplayName != lpService->lpServiceName) + HeapFree(GetProcessHeap(), 0, lpService->lpDisplayName); + + lpService->lpDisplayName = lpDisplayNameW; } if (dwServiceType != SERVICE_NO_CHANGE) @@ -2011,7 +2026,8 @@ DWORD RQueryServiceConfigW( LPWSTR lpImagePath = NULL; LPWSTR lpServiceStartName = NULL; DWORD dwRequiredSize; - LPQUERY_SERVICE_CONFIGW lpConfig; + LPQUERY_SERVICE_CONFIGW lpConfig = NULL; + WCHAR lpEmptyString[] = {0,0}; LPWSTR lpStr; DPRINT("RQueryServiceConfigW() called\n"); @@ -2062,17 +2078,25 @@ DWORD RQueryServiceConfigW( if (lpImagePath != NULL) dwRequiredSize += ((wcslen(lpImagePath) + 1) * sizeof(WCHAR)); + else + dwRequiredSize += 2 * sizeof(WCHAR); if (lpService->lpGroup != NULL) dwRequiredSize += ((wcslen(lpService->lpGroup->lpGroupName) + 1) * sizeof(WCHAR)); + else + dwRequiredSize += 2 * sizeof(WCHAR); /* FIXME: Add Dependencies length*/ if (lpServiceStartName != NULL) dwRequiredSize += ((wcslen(lpServiceStartName) + 1) * sizeof(WCHAR)); + else + dwRequiredSize += 2 * sizeof(WCHAR); if (lpService->lpDisplayName != NULL) dwRequiredSize += ((wcslen(lpService->lpDisplayName) + 1) * sizeof(WCHAR)); + else + dwRequiredSize += 2 * sizeof(WCHAR); if (lpServiceConfig == NULL || cbBufSize < dwRequiredSize) { @@ -2091,48 +2115,55 @@ DWORD RQueryServiceConfigW( if (lpImagePath != NULL) { wcscpy(lpStr, lpImagePath); - lpConfig->lpBinaryPathName = (LPWSTR)((ULONG_PTR)lpStr - (ULONG_PTR)lpConfig); - lpStr += (wcslen(lpImagePath) + 1); } else { - lpConfig->lpBinaryPathName = NULL; + wcscpy(lpStr, lpEmptyString); } + lpConfig->lpBinaryPathName = (LPWSTR)((ULONG_PTR)lpStr - (ULONG_PTR)lpConfig); + lpStr += (wcslen(lpStr) + 1); + if (lpService->lpGroup != NULL) { wcscpy(lpStr, lpService->lpGroup->lpGroupName); - lpConfig->lpLoadOrderGroup = (LPWSTR)((ULONG_PTR)lpStr - (ULONG_PTR)lpConfig); - lpStr += (wcslen(lpService->lpGroup->lpGroupName) + 1); } else { - lpConfig->lpLoadOrderGroup = NULL; + wcscpy(lpStr, lpEmptyString); } + lpConfig->lpLoadOrderGroup = (LPWSTR)((ULONG_PTR)lpStr - (ULONG_PTR)lpConfig); + lpStr += (wcslen(lpStr) + 1); + /* FIXME: Append Dependencies */ - lpConfig->lpDependencies = NULL; + wcscpy(lpStr, lpEmptyString); + + lpStr += (wcslen(lpStr) + 1); + lpConfig->lpDependencies = (LPWSTR)((ULONG_PTR)lpStr - (ULONG_PTR)lpConfig); if (lpServiceStartName != NULL) { wcscpy(lpStr, lpServiceStartName); - lpConfig->lpServiceStartName = (LPWSTR)((ULONG_PTR)lpStr - (ULONG_PTR)lpConfig); - lpStr += (wcslen(lpServiceStartName) + 1); } else { - lpConfig->lpServiceStartName = NULL; + wcscpy(lpStr, lpEmptyString); } + lpConfig->lpServiceStartName = (LPWSTR)((ULONG_PTR)lpStr - (ULONG_PTR)lpConfig); + lpStr += (wcslen(lpStr) + 1); + if (lpService->lpDisplayName != NULL) { wcscpy(lpStr, lpService->lpDisplayName); - lpConfig->lpDisplayName = (LPWSTR)((ULONG_PTR)lpStr - (ULONG_PTR)lpConfig); } else { - lpConfig->lpDisplayName = NULL; + wcscpy(lpStr, lpEmptyString); } + + lpConfig->lpDisplayName = (LPWSTR)((ULONG_PTR)lpStr - (ULONG_PTR)lpConfig); } if (pcbBytesNeeded != NULL) @@ -2388,8 +2419,271 @@ DWORD RChangeServiceConfigA( DWORD dwPwSize, LPSTR lpDisplayName) { - UNIMPLEMENTED; - return ERROR_CALL_NOT_IMPLEMENTED; + DWORD dwError = ERROR_SUCCESS; + PSERVICE_HANDLE hSvc; + PSERVICE lpService = NULL; + HKEY hServiceKey = NULL; + LPWSTR lpDisplayNameW = NULL; + // LPWSTR lpBinaryPathNameW = NULL; + LPWSTR lpLoadOrderGroupW = NULL; + LPWSTR lpDependenciesW = NULL; + // LPWSTR lpPasswordW = NULL; + + DPRINT("RChangeServiceConfigA() called\n"); + DPRINT("dwServiceType = %lu\n", dwServiceType); + DPRINT("dwStartType = %lu\n", dwStartType); + DPRINT("dwErrorControl = %lu\n", dwErrorControl); + DPRINT("lpBinaryPathName = %s\n", lpBinaryPathName); + DPRINT("lpLoadOrderGroup = %s\n", lpLoadOrderGroup); + DPRINT("lpDisplayName = %s\n", lpDisplayName); + + if (ScmShutdown) + return ERROR_SHUTDOWN_IN_PROGRESS; + + hSvc = (PSERVICE_HANDLE)hService; + if (!hSvc || hSvc->Handle.Tag != SERVICE_TAG) + { + DPRINT1("Invalid handle tag!\n"); + return ERROR_INVALID_HANDLE; + } + + if (!RtlAreAllAccessesGranted(hSvc->Handle.DesiredAccess, + SERVICE_CHANGE_CONFIG)) + { + DPRINT1("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess); + return ERROR_ACCESS_DENIED; + } + + lpService = hSvc->ServiceEntry; + if (lpService == NULL) + { + DPRINT1("lpService == NULL!\n"); + return ERROR_INVALID_HANDLE; + } + + /* FIXME: Lock database exclusively */ + + if (lpService->bDeleted) + { + /* FIXME: Unlock database */ + DPRINT1("The service has already been marked for delete!\n"); + return ERROR_SERVICE_MARKED_FOR_DELETE; + } + + /* Open the service key */ + dwError = ScmOpenServiceKey(lpService->szServiceName, + KEY_SET_VALUE, + &hServiceKey); + if (dwError != ERROR_SUCCESS) + goto done; + + /* Write service data to the registry */ + + if (lpDisplayName != NULL && *lpDisplayName != 0) + { + /* Set the display name */ + lpDisplayNameW = HeapAlloc(GetProcessHeap(), + 0, + (strlen(lpDisplayName) + 1) * sizeof(WCHAR)); + if (lpDisplayNameW == NULL) + { + dwError = ERROR_NOT_ENOUGH_MEMORY; + goto done; + } + + MultiByteToWideChar(CP_ACP, + 0, + lpDisplayName, + -1, + lpDisplayNameW, + (wcslen(lpDisplayNameW) + 1) * sizeof(WCHAR)); + + RegSetValueExW(hServiceKey, + L"DisplayName", + 0, + REG_SZ, + (LPBYTE)lpDisplayNameW, + (wcslen(lpDisplayNameW) + 1) * sizeof(WCHAR)); + + /* Update lpService->lpDisplayName */ + if (lpService->lpDisplayName) + HeapFree(GetProcessHeap(), 0, lpService->lpDisplayName); + + lpService->lpDisplayName = lpDisplayNameW; + } + + if (dwServiceType != SERVICE_NO_CHANGE) + { + /* Set the service type */ + dwError = RegSetValueExW(hServiceKey, + L"Type", + 0, + REG_DWORD, + (LPBYTE)&dwServiceType, + sizeof(DWORD)); + if (dwError != ERROR_SUCCESS) + goto done; + + lpService->Status.dwServiceType = dwServiceType; + } + + if (dwStartType != SERVICE_NO_CHANGE) + { + /* Set the start value */ + dwError = RegSetValueExW(hServiceKey, + L"Start", + 0, + REG_DWORD, + (LPBYTE)&dwStartType, + sizeof(DWORD)); + if (dwError != ERROR_SUCCESS) + goto done; + + lpService->dwStartType = dwStartType; + } + + if (dwErrorControl != SERVICE_NO_CHANGE) + { + /* Set the error control value */ + dwError = RegSetValueExW(hServiceKey, + L"ErrorControl", + 0, + REG_DWORD, + (LPBYTE)&dwErrorControl, + sizeof(DWORD)); + if (dwError != ERROR_SUCCESS) + goto done; + + lpService->dwErrorControl = dwErrorControl; + } + +#if 0 + /* FIXME: set the new ImagePath value */ + + /* Set the image path */ + if (dwServiceType & SERVICE_WIN32) + { + if (lpBinaryPathName != NULL && *lpBinaryPathName != 0) + { + lpBinaryPathNameW=HeapAlloc(GetProcessHeap(),0, (strlen(lpBinaryPathName)+1) * sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, lpBinaryPathName, -1, lpBinaryPathNameW, (wcslen(lpBinaryPathNameW)+1) * sizeof(WCHAR)); + dwError = RegSetValueExW(hServiceKey, + L"ImagePath", + 0, + REG_EXPAND_SZ, + (LPBYTE)lpBinaryPathNameW, + (wcslen(lpBinaryPathNameW) + 1) * sizeof(WCHAR)); + if (dwError != ERROR_SUCCESS) + goto done; + } + } + else if (dwServiceType & SERVICE_DRIVER) + { + if (lpImagePath != NULL && *lpImagePath != 0) + { + dwError = RegSetValueExW(hServiceKey, + L"ImagePath", + 0, + REG_EXPAND_SZ, + (LPBYTE)lpImagePath, + (wcslen(lpImagePath) + 1) *sizeof(WCHAR)); + if (dwError != ERROR_SUCCESS) + goto done; + } + } +#endif + + /* Set the group name */ + if (lpLoadOrderGroup != NULL && *lpLoadOrderGroup != 0) + { + lpLoadOrderGroupW = HeapAlloc(GetProcessHeap(), + 0, + (strlen(lpLoadOrderGroup)+1) * sizeof(WCHAR)); + if (lpLoadOrderGroupW == NULL) + { + dwError = ERROR_NOT_ENOUGH_MEMORY; + goto done; + } + + MultiByteToWideChar(CP_ACP, + 0, + lpLoadOrderGroup, + -1, + lpLoadOrderGroupW, + (wcslen(lpLoadOrderGroupW) + 1) * sizeof(WCHAR)); + + dwError = RegSetValueExW(hServiceKey, + L"Group", + 0, + REG_SZ, + (LPBYTE)lpLoadOrderGroupW, + (wcslen(lpLoadOrderGroupW) + 1) * sizeof(WCHAR)); + if (dwError != ERROR_SUCCESS) + goto done; + + /* FIXME: Update lpService->lpServiceGroup */ + + HeapFree(GetProcessHeap(), 0, lpLoadOrderGroupW); + } + + if (lpdwTagId != NULL) + { + dwError = ScmAssignNewTag(lpService); + if (dwError != ERROR_SUCCESS) + goto done; + + dwError = RegSetValueExW(hServiceKey, + L"Tag", + 0, + REG_DWORD, + (LPBYTE)&lpService->dwTag, + sizeof(DWORD)); + if (dwError != ERROR_SUCCESS) + goto done; + + *lpdwTagId = lpService->dwTag; + } + + /* Write dependencies */ + if (lpDependencies != NULL && *lpDependencies != 0) + { + lpDependenciesW = HeapAlloc(GetProcessHeap(), + 0, + (strlen(lpDependencies)+1) * sizeof(WCHAR)); + if (lpDependenciesW == NULL) + { + dwError = ERROR_NOT_ENOUGH_MEMORY; + goto done; + } + + MultiByteToWideChar(CP_ACP, + 0, + lpDependencies, + dwDependSize, + lpDependenciesW, + (wcslen(lpDependenciesW)+1) * sizeof(WCHAR)); + + dwError = ScmWriteDependencies(hServiceKey, + (LPWSTR)lpDependenciesW, + dwDependSize); + + HeapFree(GetProcessHeap(), 0, lpDependenciesW); + } + + if (lpPassword != NULL) + { + /* FIXME: Write password */ + } + + /* FIXME: Unlock database */ + +done: + if (hServiceKey != NULL) + RegCloseKey(hServiceKey); + + DPRINT("RChangeServiceConfigA() done (Error %lu)\n", dwError); + + return dwError; } @@ -2528,8 +2822,204 @@ DWORD RQueryServiceConfigA( DWORD cbBufSize, LPBOUNDED_DWORD_8K pcbBytesNeeded) { - UNIMPLEMENTED; - return ERROR_CALL_NOT_IMPLEMENTED; + LPQUERY_SERVICE_CONFIGA lpServiceConfig = (LPQUERY_SERVICE_CONFIGA)lpBuf; + DWORD dwError = ERROR_SUCCESS; + PSERVICE_HANDLE hSvc; + PSERVICE lpService = NULL; + HKEY hServiceKey = NULL; + LPWSTR lpImagePath = NULL; + LPWSTR lpServiceStartName = NULL; + DWORD dwRequiredSize; + LPQUERY_SERVICE_CONFIGA lpConfig = NULL; + CHAR lpEmptyString[]={0,0}; + LPSTR lpStr; + + DPRINT("RQueryServiceConfigA() called\n"); + + if (ScmShutdown) + return ERROR_SHUTDOWN_IN_PROGRESS; + + hSvc = (PSERVICE_HANDLE)hService; + if (!hSvc || hSvc->Handle.Tag != SERVICE_TAG) + { + DPRINT1("Invalid handle tag!\n"); + return ERROR_INVALID_HANDLE; + } + + if (!RtlAreAllAccessesGranted(hSvc->Handle.DesiredAccess, + SERVICE_QUERY_CONFIG)) + { + DPRINT1("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess); + return ERROR_ACCESS_DENIED; + } + + lpService = hSvc->ServiceEntry; + if (lpService == NULL) + { + DPRINT1("lpService == NULL!\n"); + return ERROR_INVALID_HANDLE; + } + + /* FIXME: Lock the service database shared */ + + dwError = ScmOpenServiceKey(lpService->lpServiceName, + KEY_READ, + &hServiceKey); + if (dwError != ERROR_SUCCESS) + goto Done; + + dwError = ScmReadString(hServiceKey, + L"ImagePath", + &lpImagePath); + if (dwError != ERROR_SUCCESS) + goto Done; + + ScmReadString(hServiceKey, + L"ObjectName", + &lpServiceStartName); + + dwRequiredSize = sizeof(QUERY_SERVICE_CONFIGW); + + if (lpImagePath != NULL) + dwRequiredSize += wcslen(lpImagePath) + 1; + else + dwRequiredSize += 2; + + if (lpService->lpGroup != NULL) + dwRequiredSize += wcslen(lpService->lpGroup->lpGroupName) + 1; + else + dwRequiredSize += 2; + + /* FIXME: Add Dependencies length*/ + dwRequiredSize += 2; + + if (lpServiceStartName != NULL) + dwRequiredSize += wcslen(lpServiceStartName) + 1; + else + dwRequiredSize += 2; + + if (lpService->lpDisplayName != NULL) + dwRequiredSize += wcslen(lpService->lpDisplayName) + 1; + else + dwRequiredSize += 2; + + if (lpServiceConfig == NULL || cbBufSize < dwRequiredSize) + { + dwError = ERROR_INSUFFICIENT_BUFFER; + } + else + { + lpConfig = (LPQUERY_SERVICE_CONFIGA)lpServiceConfig; + lpConfig->dwServiceType = lpService->Status.dwServiceType; + lpConfig->dwStartType = lpService->dwStartType; + lpConfig->dwErrorControl = lpService->dwErrorControl; + lpConfig->dwTagId = lpService->dwTag; + + lpStr = (LPSTR)(lpServiceConfig + 1); + + /* NOTE: Strings that are NULL for QUERY_SERVICE_CONFIG are pointers to empty strings. + Verified in WINXP*/ + + if (lpImagePath) + { + WideCharToMultiByte(CP_ACP, + 0, + lpImagePath, + -1, + lpStr, + wcslen(lpImagePath), + 0, + 0); + } + else + { + strcpy(lpStr, lpEmptyString); + } + + lpConfig->lpBinaryPathName = (LPSTR)((ULONG_PTR)lpStr - (ULONG_PTR)lpConfig); + lpStr += (strlen((LPSTR)lpStr) + 1); + + if (lpService->lpGroup) + { + WideCharToMultiByte(CP_ACP, + 0, + lpService->lpGroup->lpGroupName, + -1, + lpStr, + wcslen(lpService->lpGroup->lpGroupName), + 0, + 0); + } + else + { + strcpy(lpStr, lpEmptyString); + } + + lpConfig->lpLoadOrderGroup = (LPSTR)((ULONG_PTR)lpStr - (ULONG_PTR)lpConfig); + lpStr += (strlen(lpStr) + 1); + + /* FIXME: Append Dependencies */ + strcpy(lpStr, lpEmptyString); + + lpConfig->lpDependencies = (LPSTR)((ULONG_PTR)lpStr - (ULONG_PTR)lpConfig); + lpStr += (strlen(lpStr) + 1); + + if (lpServiceStartName) + { + WideCharToMultiByte(CP_ACP, + 0, + lpServiceStartName, + -1, + lpStr, + wcslen(lpServiceStartName), + 0, + 0); + } + else + { + strcpy(lpStr, lpEmptyString); + } + + lpConfig->lpServiceStartName = (LPSTR)((ULONG_PTR)lpStr - (ULONG_PTR)lpConfig); + lpStr += (strlen(lpStr) + 1); + + if (lpService->lpDisplayName) + { + WideCharToMultiByte(CP_ACP, + 0, + lpService->lpDisplayName, + -1, + lpStr, + wcslen(lpService->lpDisplayName), + 0, + 0); + } + else + { + strcpy(lpStr, lpEmptyString); + } + + lpConfig->lpDisplayName = (LPSTR)((ULONG_PTR)lpStr - (ULONG_PTR)lpConfig); + } + + if (pcbBytesNeeded != NULL) + *pcbBytesNeeded = dwRequiredSize; + +Done:; + if (lpImagePath != NULL) + HeapFree(GetProcessHeap(), 0, lpImagePath); + + if (lpServiceStartName != NULL) + HeapFree(GetProcessHeap(), 0, lpServiceStartName); + + if (hServiceKey != NULL) + RegCloseKey(hServiceKey); + + /* FIXME: Unlock the service database */ + + DPRINT("RQueryServiceConfigA() done\n"); + + return dwError; } @@ -2917,8 +3407,102 @@ DWORD RQueryServiceConfig2A( DWORD cbBufSize, LPBOUNDED_DWORD_8K pcbBytesNeeded) { - UNIMPLEMENTED; - return ERROR_CALL_NOT_IMPLEMENTED; + DWORD dwError = ERROR_SUCCESS; + PSERVICE_HANDLE hSvc; + PSERVICE lpService = NULL; + HKEY hServiceKey = NULL; + DWORD dwRequiredSize; + LPWSTR lpDescriptionW = NULL; + LPSTR lpDescription = NULL; + + DPRINT("RQueryServiceConfig2W() called\n"); + + if (!lpBuffer) + return ERROR_INVALID_ADDRESS; + + if (ScmShutdown) + return ERROR_SHUTDOWN_IN_PROGRESS; + + hSvc = (PSERVICE_HANDLE)hService; + if (!hSvc || hSvc->Handle.Tag != SERVICE_TAG) + { + DPRINT1("Invalid handle tag!\n"); + return ERROR_INVALID_HANDLE; + } + + if (!RtlAreAllAccessesGranted(hSvc->Handle.DesiredAccess, + SERVICE_QUERY_CONFIG)) + { + DPRINT1("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess); + return ERROR_ACCESS_DENIED; + } + + lpService = hSvc->ServiceEntry; + if (lpService == NULL) + { + DPRINT1("lpService == NULL!\n"); + return ERROR_INVALID_HANDLE; + } + + /* FIXME: Lock the service database shared */ + + dwError = ScmOpenServiceKey(lpService->lpServiceName, + KEY_READ, + &hServiceKey); + if (dwError != ERROR_SUCCESS) + goto done; + + if (dwInfoLevel & SERVICE_CONFIG_DESCRIPTION) + { + LPSERVICE_DESCRIPTIONA lpServiceDescription = (LPSERVICE_DESCRIPTIONA)lpBuffer; + LPSTR lpStr; + + dwError = ScmReadString(hServiceKey, + L"Description", + &lpDescriptionW); + if (dwError != ERROR_SUCCESS) + goto done; + + dwRequiredSize = sizeof(SERVICE_DESCRIPTIONA) + ((wcslen(lpDescriptionW) + 1)); + + if (cbBufSize < dwRequiredSize) + { + *pcbBytesNeeded = dwRequiredSize; + dwError = ERROR_INSUFFICIENT_BUFFER; + goto done; + } + + lpStr = (LPSTR)(lpServiceDescription + 1); + + WideCharToMultiByte(CP_ACP, + 0, + lpDescriptionW, + -1, + lpStr, + wcslen(lpDescriptionW), + NULL, + NULL); + lpServiceDescription->lpDescription = (LPSTR)((ULONG_PTR)lpStr - (ULONG_PTR)lpServiceDescription); + } + else if (dwInfoLevel & SERVICE_CONFIG_FAILURE_ACTIONS) + { + UNIMPLEMENTED; + dwError = ERROR_CALL_NOT_IMPLEMENTED; + goto done; + } + +done: + if (lpDescription != NULL) + HeapFree(GetProcessHeap(), 0, lpDescription); + + if (hServiceKey != NULL) + RegCloseKey(hServiceKey); + + /* FIXME: Unlock database */ + + DPRINT("RQueryServiceConfig2W() done (Error %lu)\n", dwError); + + return dwError; } @@ -2940,6 +3524,9 @@ DWORD RQueryServiceConfig2W( DPRINT("RQueryServiceConfig2W() called\n"); + if (!lpBuffer) + return ERROR_INVALID_ADDRESS; + if (ScmShutdown) return ERROR_SHUTDOWN_IN_PROGRESS; @@ -2991,12 +3578,10 @@ DWORD RQueryServiceConfig2W( dwError = ERROR_INSUFFICIENT_BUFFER; goto done; } - else - { - lpStr = (LPWSTR)(lpServiceDescription + 1); - wcscpy(lpStr, lpDescription); - lpServiceDescription->lpDescription = (LPWSTR)((ULONG_PTR)lpStr - (ULONG_PTR)lpServiceDescription); - } + + lpStr = (LPWSTR)(lpServiceDescription + 1); + wcscpy(lpStr, lpDescription); + lpServiceDescription->lpDescription = (LPWSTR)((ULONG_PTR)lpStr - (ULONG_PTR)lpServiceDescription); } else if (dwInfoLevel & SERVICE_CONFIG_FAILURE_ACTIONS) { diff --git a/reactos/dll/win32/advapi32/service/scm.c b/reactos/dll/win32/advapi32/service/scm.c index 44df54502f6..98b51b60620 100644 --- a/reactos/dll/win32/advapi32/service/scm.c +++ b/reactos/dll/win32/advapi32/service/scm.c @@ -1831,6 +1831,12 @@ QueryServiceConfig2A(SC_HANDLE hService, TRACE("QueryServiceConfig2A(%p, %lu, %p, %lu, %p)\n", hService, dwInfoLevel, lpBuffer, cbBufSize, pcbBytesNeeded); + if (lpBuffer == NULL && cbBufSize != 0) + { + SetLastError(ERROR_INVALID_ADDRESS); + return FALSE; + } + HandleBind(); _SEH_TRY @@ -1915,6 +1921,12 @@ QueryServiceConfig2W(SC_HANDLE hService, TRACE("QueryServiceConfig2W(%p, %lu, %p, %lu, %p)\n", hService, dwInfoLevel, lpBuffer, cbBufSize, pcbBytesNeeded); + if (lpBuffer == NULL && cbBufSize != 0) + { + SetLastError(ERROR_INVALID_ADDRESS); + return FALSE; + } + HandleBind(); _SEH_TRY From d5efa7522bdabdb8570c677bfc548a8fafb062a4 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Fri, 29 Aug 2008 11:56:39 +0000 Subject: [PATCH 223/324] Implement REnumDependentServicesA/W. Patch is based on bug report #3669 by bugboy svn path=/trunk/; revision=35753 --- reactos/base/system/services/rpcserver.c | 400 ++++++++++++++++++++++- 1 file changed, 396 insertions(+), 4 deletions(-) diff --git a/reactos/base/system/services/rpcserver.c b/reactos/base/system/services/rpcserver.c index 3088efca883..3061ad463de 100644 --- a/reactos/base/system/services/rpcserver.c +++ b/reactos/base/system/services/rpcserver.c @@ -246,6 +246,159 @@ ScmAssignNewTag(PSERVICE lpService) } +/* Internal recursive function */ +/* Need to search for every dependency on every service */ +static DWORD +Int_EnumDependentServicesW(HKEY hServicesKey, + PSERVICE lpService, + DWORD dwServiceState, + PSERVICE *lpServices, + LPDWORD pcbBytesNeeded, + LPDWORD lpServicesReturned) +{ + DWORD dwError = ERROR_SUCCESS; + WCHAR szNameBuf[MAX_PATH]; + WCHAR szValueBuf[MAX_PATH]; + WCHAR *lpszNameBuf = szNameBuf; + WCHAR *lpszValueBuf = szValueBuf; + DWORD dwSize; + DWORD dwNumSubKeys; + DWORD dwIteration; + PSERVICE lpCurrentService; + HKEY hServiceEnumKey; + DWORD dwCurrentServiceState = SERVICE_ACTIVE; + DWORD dwDependServiceStrPtr = 0; + DWORD dwRequiredSize = 0; + + /* Get the number of service keys */ + dwError = RegQueryInfoKeyW(hServicesKey, + NULL, + NULL, + NULL, + &dwNumSubKeys, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL); + if (dwError != ERROR_SUCCESS) + { + DPRINT1("ERROR! Unable to get number of services keys.\n"); + return dwError; + } + + /* Iterate the service keys to see if another service depends on the this service */ + for (dwIteration = 0; dwIteration < dwNumSubKeys; dwIteration++) + { + dwSize = MAX_PATH; + dwError = RegEnumKeyExW(hServicesKey, + dwIteration, + lpszNameBuf, + &dwSize, + NULL, + NULL, + NULL, + NULL); + if (dwError != ERROR_SUCCESS) + return dwError; + + /* Open the Service key */ + dwError = RegOpenKeyExW(hServicesKey, + lpszNameBuf, + 0, + KEY_READ, + &hServiceEnumKey); + if (dwError != ERROR_SUCCESS) + return dwError; + + dwSize = MAX_PATH; + + /* Check for the DependOnService Value */ + dwError = RegQueryValueExW(hServiceEnumKey, + L"DependOnService", + NULL, + NULL, + (LPBYTE)lpszValueBuf, + &dwSize); + + /* FIXME: Handle load order. */ + + /* If the service found has a DependOnService value */ + if (dwError == ERROR_SUCCESS) + { + dwDependServiceStrPtr = 0; + + /* Can be more than one Dependencies in the DependOnService string */ + while (wcslen(lpszValueBuf + dwDependServiceStrPtr) > 0) + { + if (wcsicmp(lpszValueBuf + dwDependServiceStrPtr, lpService->lpServiceName) == 0) + { + /* Get the current enumed service pointer */ + lpCurrentService = ScmGetServiceEntryByName(lpszNameBuf); + + /* Check for valid Service */ + if (!lpCurrentService) + { + /* This should never happen! */ + DPRINT1("This should not happen at this point, report to Developer\n"); + return ERROR_NOT_FOUND; + } + + /* Determine state the service is in */ + if (lpCurrentService->Status.dwCurrentState == SERVICE_STOPPED) + dwCurrentServiceState = SERVICE_INACTIVE; + + /* If the ServiceState matches that requested or searching for SERVICE_STATE_ALL */ + if ((dwCurrentServiceState == dwServiceState) || + (dwServiceState == SERVICE_STATE_ALL)) + { + /* Calculate the required size */ + dwRequiredSize += sizeof(SERVICE_STATUS); + dwRequiredSize += ((wcslen(lpCurrentService->lpServiceName) + 1) * sizeof(WCHAR)); + dwRequiredSize += ((wcslen(lpCurrentService->lpDisplayName) + 1) * sizeof(WCHAR)); + + /* Add the size for service name and display name pointers */ + dwRequiredSize += (2 * sizeof(PVOID)); + + /* increase the BytesNeeded size */ + *pcbBytesNeeded = *pcbBytesNeeded + dwRequiredSize; + + /* Don't fill callers buffer yet, as MSDN read that the last service with dependency + comes first */ + + /* Recursive call to check for its dependencies */ + Int_EnumDependentServicesW(hServicesKey, + lpCurrentService, + dwServiceState, + lpServices, + pcbBytesNeeded, + lpServicesReturned); + + /* If the lpServices is valid set the service pointer */ + if (lpServices) + lpServices[*lpServicesReturned] = lpCurrentService; + + *lpServicesReturned = *lpServicesReturned + 1; + } + } + + dwDependServiceStrPtr += (wcslen(lpszValueBuf + dwDependServiceStrPtr) + 1); + } + } + else if (*pcbBytesNeeded) + { + dwError = ERROR_SUCCESS; + } + + RegCloseKey(hServiceEnumKey); + } + + return dwError; +} + + /* Function 0 */ DWORD RCloseServiceHandle( handle_t BindingHandle, @@ -1676,12 +1829,120 @@ DWORD REnumDependentServicesW( LPBOUNDED_DWORD_256K lpServicesReturned) { DWORD dwError = ERROR_SUCCESS; + DWORD dwServicesReturned = 0; + DWORD dwServiceCount; + HKEY hServicesKey = NULL; + LPSC_RPC_HANDLE hSCObject; + PSERVICE_HANDLE hSvc; + PSERVICE lpService = NULL; + PSERVICE *lpServicesArray = NULL; + LPENUM_SERVICE_STATUSW lpServicesPtr = NULL; + LPWSTR lpStr; - UNIMPLEMENTED; *pcbBytesNeeded = 0; *lpServicesReturned = 0; - DPRINT1("REnumDependentServicesW() done (Error %lu)\n", dwError); + DPRINT("REnumDependentServicesW() called\n"); + + hSCObject = &hService; + hSvc = (PSERVICE_HANDLE) *hSCObject; + lpService = hSvc->ServiceEntry; + + /* Check access rights */ + if (!RtlAreAllAccessesGranted(hSvc->Handle.DesiredAccess, + SC_MANAGER_ENUMERATE_SERVICE)) + { + DPRINT1("Insufficient access rights! 0x%lx\n", + hSvc->Handle.DesiredAccess); + return ERROR_ACCESS_DENIED; + } + + /* Open the Services Reg key */ + dwError = RegOpenKeyExW(HKEY_LOCAL_MACHINE, + L"System\\CurrentControlSet\\Services", + 0, + KEY_READ, + &hServicesKey); + if (dwError != ERROR_SUCCESS) + return dwError; + + /* First determine the bytes needed and get the number of dependent services */ + dwError = Int_EnumDependentServicesW(hServicesKey, + lpService, + dwServiceState, + NULL, + pcbBytesNeeded, + &dwServicesReturned); + if (dwError != ERROR_SUCCESS) + goto Done; + + /* If buffer size is less than the bytes needed or pointer is null */ + if ((!lpServices) || (cbBufSize < *pcbBytesNeeded)) + { + dwError = ERROR_MORE_DATA; + goto Done; + } + + /* Allocate memory for array of service pointers */ + lpServicesArray = HeapAlloc(GetProcessHeap(), + 0, + (dwServicesReturned + 1) * sizeof(PSERVICE)); + if (!lpServicesArray) + { + DPRINT1("Could not allocate a buffer!!\n"); + dwError = ERROR_NOT_ENOUGH_MEMORY; + goto Done; + } + + dwServicesReturned = 0; + *pcbBytesNeeded = 0; + + dwError = Int_EnumDependentServicesW(hServicesKey, + lpService, + dwServiceState, + lpServicesArray, + pcbBytesNeeded, + &dwServicesReturned); + if (dwError != ERROR_SUCCESS) + { + goto Done; + } + + lpServicesPtr = (LPENUM_SERVICE_STATUSW) lpServices; + lpStr = (LPWSTR)(lpServices + (dwServicesReturned * sizeof(ENUM_SERVICE_STATUSW))); + + /* Copy EnumDepenedentService to Buffer */ + for (dwServiceCount = 0; dwServiceCount < dwServicesReturned; dwServiceCount++) + { + lpService = lpServicesArray[dwServiceCount]; + + /* Copy status info */ + memcpy(&lpServicesPtr->ServiceStatus, + &lpService->Status, + sizeof(SERVICE_STATUS)); + + /* Copy display name */ + wcscpy(lpStr, lpService->lpDisplayName); + lpServicesPtr->lpDisplayName = (LPWSTR)((ULONG_PTR)lpStr - (ULONG_PTR)lpServices); + lpStr += (wcslen(lpService->lpDisplayName) + 1); + + /* Copy service name */ + wcscpy(lpStr, lpService->lpServiceName); + lpServicesPtr->lpServiceName = (LPWSTR)((ULONG_PTR)lpStr - (ULONG_PTR)lpServices); + lpStr += (wcslen(lpService->lpServiceName) + 1); + + lpServicesPtr ++; + } + + *lpServicesReturned = dwServicesReturned; + +Done: + if (lpServicesArray != NULL) + HeapFree(GetProcessHeap(), 0, lpServicesArray); + + RegCloseKey(hServicesKey); + + DPRINT("REnumDependentServicesW() done (Error %lu)\n", dwError); return dwError; } @@ -2722,10 +2983,141 @@ DWORD REnumDependentServicesA( LPBOUNDED_DWORD_256K pcbBytesNeeded, LPBOUNDED_DWORD_256K lpServicesReturned) { - UNIMPLEMENTED; + DWORD dwError = ERROR_SUCCESS; + DWORD dwServicesReturned = 0; + DWORD dwServiceCount; + HKEY hServicesKey = NULL; + LPSC_RPC_HANDLE hSCObject; + PSERVICE_HANDLE hSvc; + PSERVICE lpService = NULL; + PSERVICE *lpServicesArray = NULL; + LPENUM_SERVICE_STATUSA lpServicesPtr = NULL; + LPSTR lpStr; + *pcbBytesNeeded = 0; *lpServicesReturned = 0; - return ERROR_CALL_NOT_IMPLEMENTED; + + DPRINT("REnumDependentServicesA() called\n"); + + hSCObject = &hService; + hSvc = (PSERVICE_HANDLE) *hSCObject; + lpService = hSvc->ServiceEntry; + + /* Check access rights */ + if (!RtlAreAllAccessesGranted(hSvc->Handle.DesiredAccess, + SC_MANAGER_ENUMERATE_SERVICE)) + { + DPRINT1("Insufficient access rights! 0x%lx\n", + hSvc->Handle.DesiredAccess); + return ERROR_ACCESS_DENIED; + } + + /* Open the Services Reg key */ + dwError = RegOpenKeyExW(HKEY_LOCAL_MACHINE, + L"System\\CurrentControlSet\\Services", + 0, + KEY_READ, + &hServicesKey); + + if (dwError != ERROR_SUCCESS) return dwError; + + /* NOTE: Windows calculates the pcbBytesNeeded based on WCHAR strings for + both EnumDependentServicesA and EnumDependentServicesW. So returned pcbBytesNeeded + are the same for both. Verified in WINXP. */ + + /* First determine the bytes needed and get the number of dependent services*/ + dwError = Int_EnumDependentServicesW(hServicesKey, + lpService, + dwServiceState, + NULL, + pcbBytesNeeded, + &dwServicesReturned); + if (dwError != ERROR_SUCCESS) + goto Done; + + /* If buffer size is less than the bytes needed or pointer is null*/ + if ((!lpServices) || (cbBufSize < *pcbBytesNeeded)) + { + dwError = ERROR_MORE_DATA; + goto Done; + } + + /* Allocate memory for array of service pointers */ + lpServicesArray = HeapAlloc(GetProcessHeap(), + 0, + (dwServicesReturned + 1) * sizeof(PSERVICE)); + if (!lpServicesArray) + { + DPRINT1("Could not allocate a buffer!!\n"); + dwError = ERROR_NOT_ENOUGH_MEMORY; + goto Done; + } + + dwServicesReturned = 0; + *pcbBytesNeeded = 0; + + dwError = Int_EnumDependentServicesW(hServicesKey, + lpService, + dwServiceState, + lpServicesArray, + pcbBytesNeeded, + &dwServicesReturned); + if (dwError != ERROR_SUCCESS) + { + goto Done; + } + + lpServicesPtr = (LPENUM_SERVICE_STATUSA)lpServices; + lpStr = (LPSTR)(lpServices + (dwServicesReturned * sizeof(ENUM_SERVICE_STATUSA))); + + /* Copy EnumDepenedentService to Buffer */ + for (dwServiceCount = 0; dwServiceCount < dwServicesReturned; dwServiceCount++) + { + lpService = lpServicesArray[dwServiceCount]; + + /* Copy the status info */ + memcpy(&lpServicesPtr->ServiceStatus, + &lpService->Status, + sizeof(SERVICE_STATUS)); + + /* Copy display name */ + WideCharToMultiByte(CP_ACP, + 0, + lpService->lpDisplayName, + -1, + lpStr, + wcslen(lpService->lpDisplayName), + 0, + 0); + lpServicesPtr->lpDisplayName = (LPSTR)((ULONG_PTR)lpStr - (ULONG_PTR)lpServices); + lpStr += strlen(lpStr) + 1; + + /* Copy service name */ + WideCharToMultiByte(CP_ACP, + 0, + lpService->lpServiceName, + -1, + lpStr, + wcslen(lpService->lpServiceName), + 0, + 0); + lpServicesPtr->lpServiceName = (LPSTR)((ULONG_PTR)lpStr - (ULONG_PTR)lpServices); + lpStr += strlen(lpStr) + 1; + + lpServicesPtr ++; + } + + *lpServicesReturned = dwServicesReturned; + +Done: + if (lpServicesArray) + HeapFree(GetProcessHeap(), 0, lpServicesArray); + + RegCloseKey(hServicesKey); + + DPRINT("REnumDependentServicesA() done (Error %lu)\n", dwError); + + return dwError; } From 9bde3fcc597fb9ba50b88dcb4e6641f5d910444b Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Fri, 29 Aug 2008 12:59:27 +0000 Subject: [PATCH 224/324] - RCreateServiceW: - Add more parameter checks. - Set the services "ObjectName" value to "LocalSystem" if it doesn't have a name. - REnumServicesStatusW: Simplify it a little. svn path=/trunk/; revision=35755 --- reactos/base/system/services/rpcserver.c | 119 ++++++++++++++++------- 1 file changed, 84 insertions(+), 35 deletions(-) diff --git a/reactos/base/system/services/rpcserver.c b/reactos/base/system/services/rpcserver.c index 3061ad463de..e51e70c7f1b 100644 --- a/reactos/base/system/services/rpcserver.c +++ b/reactos/base/system/services/rpcserver.c @@ -1599,9 +1599,47 @@ DWORD RCreateServiceW( return ERROR_ACCESS_DENIED; } - /* Fail if the service already exists! */ - if (ScmGetServiceEntryByName(lpServiceName) != NULL) + if (wcslen(lpServiceName) == 0) + { + return ERROR_INVALID_NAME; + } + + if (wcslen(lpBinaryPathName) == 0) + { + return ERROR_INVALID_PARAMETER; + } + + if ((dwServiceType == (SERVICE_WIN32_OWN_PROCESS | SERVICE_INTERACTIVE_PROCESS)) && + (lpServiceStartName)) + { + return ERROR_INVALID_PARAMETER; + } + + if ((dwServiceType > SERVICE_WIN32_SHARE_PROCESS) && + (dwServiceType != (SERVICE_WIN32_OWN_PROCESS | SERVICE_INTERACTIVE_PROCESS)) && + (dwServiceType != (SERVICE_WIN32_SHARE_PROCESS | SERVICE_INTERACTIVE_PROCESS))) + { + return ERROR_INVALID_PARAMETER; + } + + if (dwStartType > SERVICE_DISABLED) + { + return ERROR_INVALID_PARAMETER; + } + + lpService = ScmGetServiceEntryByName(lpServiceName); + if (lpService) + { + /* check if it is marked for deletion */ + if (lpService->bDeleted) + return ERROR_SERVICE_MARKED_FOR_DELETE; + /* Return Error exist */ return ERROR_SERVICE_EXISTS; + } + + if (lpDisplayName != NULL && + ScmGetServiceEntryByDisplayName(lpDisplayName) != NULL) + return ERROR_DUPLICATE_SERVICE_NAME; if (dwServiceType & SERVICE_DRIVER) { @@ -1612,6 +1650,14 @@ DWORD RCreateServiceW( if (dwError != ERROR_SUCCESS) goto done; } + else + { + if (dwStartType == SERVICE_BOOT_START || + dwStartType == SERVICE_SYSTEM_START) + { + return ERROR_INVALID_PARAMETER; + } + } /* Allocate a new service entry */ dwError = ScmCreateNewServiceRecord(lpServiceName, @@ -1764,6 +1810,19 @@ DWORD RCreateServiceW( goto done; } + /* If a non driver and NULL for lpServiceName, write ObjectName as LocalSystem */ + if ((dwServiceType & SERVICE_WIN32) && (!lpServiceName)) + { + dwError = RegSetValueExW(hServiceKey, + L"ObjectName", + 0, + REG_SZ, + (LPBYTE)L"LocalSystem", + 24); + if (dwError != ERROR_SUCCESS) + goto done; + } + if (lpPassword != NULL) { /* FIXME: Write password */ @@ -2033,19 +2092,16 @@ DWORD REnumServicesStatusW( ((wcslen(CurrentService->lpServiceName) + 1) * sizeof(WCHAR)) + ((wcslen(CurrentService->lpDisplayName) + 1) * sizeof(WCHAR)); - if (dwRequiredSize + dwSize <= dwBufSize) - { - DPRINT("Service name: %S fit\n", CurrentService->lpServiceName); - dwRequiredSize += dwSize; - dwServiceCount++; - dwLastResumeCount = CurrentService->dwResumeCount; - } - else + if (dwRequiredSize + dwSize > dwBufSize) { DPRINT("Service name: %S no fit\n", CurrentService->lpServiceName); break; } + DPRINT("Service name: %S fit\n", CurrentService->lpServiceName); + dwRequiredSize += dwSize; + dwServiceCount++; + dwLastResumeCount = CurrentService->dwResumeCount; } DPRINT("dwRequiredSize: %lu\n", dwRequiredSize); @@ -2109,33 +2165,26 @@ DWORD REnumServicesStatusW( ((wcslen(CurrentService->lpServiceName) + 1) * sizeof(WCHAR)) + ((wcslen(CurrentService->lpDisplayName) + 1) * sizeof(WCHAR)); - if (dwRequiredSize + dwSize <= dwBufSize) - { - /* Copy the service name */ - wcscpy(lpStringPtr, - CurrentService->lpServiceName); - lpStatusPtr->lpServiceName = (LPWSTR)((ULONG_PTR)lpStringPtr - (ULONG_PTR)lpBuffer); - lpStringPtr += (wcslen(CurrentService->lpServiceName) + 1); - - /* Copy the display name */ - wcscpy(lpStringPtr, - CurrentService->lpDisplayName); - lpStatusPtr->lpDisplayName = (LPWSTR)((ULONG_PTR)lpStringPtr - (ULONG_PTR)lpBuffer); - lpStringPtr += (wcslen(CurrentService->lpDisplayName) + 1); - - /* Copy the status information */ - memcpy(&lpStatusPtr->ServiceStatus, - &CurrentService->Status, - sizeof(SERVICE_STATUS)); - - lpStatusPtr++; - dwRequiredSize += dwSize; - } - else - { + if (dwRequiredSize + dwSize > dwBufSize) break; - } + /* Copy the service name */ + wcscpy(lpStringPtr, CurrentService->lpServiceName); + lpStatusPtr->lpServiceName = (LPWSTR)((ULONG_PTR)lpStringPtr - (ULONG_PTR)lpBuffer); + lpStringPtr += (wcslen(CurrentService->lpServiceName) + 1); + + /* Copy the display name */ + wcscpy(lpStringPtr, CurrentService->lpDisplayName); + lpStatusPtr->lpDisplayName = (LPWSTR)((ULONG_PTR)lpStringPtr - (ULONG_PTR)lpBuffer); + lpStringPtr += (wcslen(CurrentService->lpDisplayName) + 1); + + /* Copy the status information */ + memcpy(&lpStatusPtr->ServiceStatus, + &CurrentService->Status, + sizeof(SERVICE_STATUS)); + + lpStatusPtr++; + dwRequiredSize += dwSize; } Done:; From 8e4fa83a876702b222d429e55d989f8d79fa6dfa Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Fri, 29 Aug 2008 13:08:03 +0000 Subject: [PATCH 225/324] [FORMATTING] No code changes. svn path=/trunk/; revision=35756 --- reactos/base/system/services/rpcserver.c | 30 +++++++++++------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/reactos/base/system/services/rpcserver.c b/reactos/base/system/services/rpcserver.c index e51e70c7f1b..45d918789d1 100644 --- a/reactos/base/system/services/rpcserver.c +++ b/reactos/base/system/services/rpcserver.c @@ -6,7 +6,6 @@ * COPYRIGHT: Copyright 2005-2006 Eric Kohl * Copyright 2006-2007 Hervй Poussineau * Copyright 2007 Ged Murphy - * */ /* INCLUDES ****************************************************************/ @@ -1168,6 +1167,7 @@ done: return dwError; } + /* Create a path suitable for the bootloader out of the full path */ DWORD ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName) @@ -1183,12 +1183,12 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName) DPRINT("ScmConvertToBootPathName %S\n", CanonName); ServiceNameLen = wcslen(CanonName); + /* First check, if it's already good */ if (ServiceNameLen > 12 && !wcsnicmp(L"\\SystemRoot\\", CanonName, 12)) { *RelativeName = LocalAlloc(LMEM_ZEROINIT, ServiceNameLen * sizeof(WCHAR) + sizeof(WCHAR)); - if (*RelativeName == NULL) { DPRINT1("Error allocating memory for boot driver name!\n"); @@ -1236,8 +1236,8 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName) Expanded = LocalAlloc(LMEM_ZEROINIT, BufferSize * sizeof(WCHAR) + sizeof(WCHAR)); if (!Expanded) { - DPRINT1("Error allocating memory for boot driver name!\n"); - return ERROR_NOT_ENOUGH_MEMORY; + DPRINT1("Error allocating memory for boot driver name!\n"); + return ERROR_NOT_ENOUGH_MEMORY; } /* Expand it */ @@ -1279,7 +1279,6 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName) /* Only \SystemRoot\ is missing */ *RelativeName = LocalAlloc(LMEM_ZEROINIT, (ServiceNameLen - ExpandedLen) * sizeof(WCHAR) + 13*sizeof(WCHAR)); - if (*RelativeName == NULL) { DPRINT1("Error allocating memory for boot driver name!\n"); @@ -1644,9 +1643,8 @@ DWORD RCreateServiceW( if (dwServiceType & SERVICE_DRIVER) { dwError = ScmCanonDriverImagePath(dwStartType, - lpBinaryPathName, - &lpImagePath); - + lpBinaryPathName, + &lpImagePath); if (dwError != ERROR_SUCCESS) goto done; } @@ -3210,10 +3208,10 @@ DWORD ROpenSCManagerA( lpDatabaseName); dwError = ROpenSCManagerW(BindingHandle, - lpMachineName ? MachineName.Buffer : NULL, - lpDatabaseName ? DatabaseName.Buffer : NULL, - dwDesiredAccess, - lpScHandle); + lpMachineName ? MachineName.Buffer : NULL, + lpDatabaseName ? DatabaseName.Buffer : NULL, + dwDesiredAccess, + lpScHandle); if (lpMachineName) RtlFreeUnicodeString(&MachineName); @@ -3243,10 +3241,10 @@ DWORD ROpenServiceA( lpServiceName); dwError = ROpenServiceW(BindingHandle, - hSCManager, - ServiceName.Buffer, - dwDesiredAccess, - lpServiceHandle); + hSCManager, + lpServiceName ? ServiceName.Buffer : NULL, + dwDesiredAccess, + lpServiceHandle); if (lpServiceName) RtlFreeUnicodeString(&ServiceName); From af96ae0aeddc2ebfcaf47daf3e0d3bb3ca6ad8a3 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Fri, 29 Aug 2008 14:12:01 +0000 Subject: [PATCH 226/324] - add INetConnectionPropertyUi iid svn path=/trunk/; revision=35758 --- reactos/lib/sdk/uuid/uuid.c | 1 + 1 file changed, 1 insertion(+) diff --git a/reactos/lib/sdk/uuid/uuid.c b/reactos/lib/sdk/uuid/uuid.c index 00007ba59ee..6d0698f238d 100644 --- a/reactos/lib/sdk/uuid/uuid.c +++ b/reactos/lib/sdk/uuid/uuid.c @@ -98,6 +98,7 @@ DEFINE_GUID(IID_IBindStatusCallbackHolder,0x79eac9cc,0xbaf9,0x11ce,0x8c,0x82,0x0 DEFINE_GUID(IID_IEnumNetConnection, 0xC08956A0,0x1CD3,0x11D1,0xB1,0xC5,0x00,0x80,0x5F,0xC1,0x27,0x0E); DEFINE_GUID(IID_INetConnection, 0xC08956A1,0x1CD3,0x11D1,0xB1,0xC5,0x00,0x80,0x5F,0xC1,0x27,0x0E); DEFINE_GUID(IID_INetConnectionManager, 0xC08956A2,0x1CD3,0x11D1,0xB1,0xC5,0x00,0x80,0x5F,0xC1,0x27,0x0E); +DEFINE_GUID(IID_INetConnectionPropertyUi, 0xC08956A4,0x1CD3,0x11D1,0xB1,0xC5,0x00,0x80,0x5F,0xC1,0x27,0x0E); DEFINE_GUID(FMTID_SummaryInformation,0xF29F85E0,0x4FF9,0x1068,0xAB,0x91,0x08,0x00,0x2B,0x27,0xB3,0xD9); DEFINE_GUID(FMTID_DocSummaryInformation,0xD5CDD502,0x2E9C,0x101B,0x93,0x97,0x08,0x00,0x2B,0x2C,0xF9,0xAE); From 86fffd0e4a5ead7111cf93df57f283bb180150e4 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Fri, 29 Aug 2008 14:12:34 +0000 Subject: [PATCH 227/324] - add INetConnectionProperty interface svn path=/trunk/; revision=35759 --- reactos/include/psdk/netcon.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/reactos/include/psdk/netcon.h b/reactos/include/psdk/netcon.h index fd535b14363..c5aee83898b 100644 --- a/reactos/include/psdk/netcon.h +++ b/reactos/include/psdk/netcon.h @@ -168,4 +168,30 @@ DECLARE_INTERFACE_(INetConnectionManager, IUnknown) EXTERN_C const CLSID CLSID_ConnectionManager; EXTERN_C const IID IID_INetConnectionManager; +#undef INTERFACE +#define INTERFACE INetConnectionPropertyUi +DECLARE_INTERFACE_(INetConnectionPropertyUi, IUnknown) +{ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void **ppv) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + STDMETHOD_(HRESULT, SetConnection) (THIS_ INetConnection *pCon) PURE; + STDMETHOD_(HRESULT, AddPages) (THIS_ HWND hwndParent, LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam) PURE; + + +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define INetConnectionPropertyUi_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define INetConnectionPropertyUi_AddRef(p) (p)->lpVtbl->AddRef(p) +#define INetConnectionPropertyUi_Release(p) (p)->lpVtbl->Release(p) +#define INetConnectionPropertyUi_SetConnection(p,a) (p)->lpVtbl->SetConnection(p,a) +#define INetConnectionPropertyUi_AddPages(p,a,b,c) (p)->lpVtbl->AddPages(p,a,b,c) +#endif + +EXTERN_C const IID IID_INetConnectionPropertyUi; + +VOID STDCALL NcFreeNetconProperties (NETCON_PROPERTIES* pProps); + #endif From 7f5edc03e3e358b3441fcf763514d4971d27b537 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Fri, 29 Aug 2008 14:18:55 +0000 Subject: [PATCH 228/324] - Activate INetConnection::GetProperties code - Import from ncpa properties and status dialog - Implement INetConnectionProperty interface - Fix a bug & handle leak in registering code - Implement NcFreeNetconProperties - Make resources of netshell to be similar of Windows XP to allow netshell to be loaded - Add NCF constants from ncpa - Implement enumerating control/protocol and devices - items dont appear for some unknown reason - Load property dialog in the same way like Windows (using INetConnectionProperty) interface svn path=/trunk/; revision=35760 --- reactos/dll/win32/netshell/classfactory.c | 1 - reactos/dll/win32/netshell/connectmanager.c | 17 +- reactos/dll/win32/netshell/lanconnectui.c | 456 ++++++++++++++++++ reactos/dll/win32/netshell/lang/de-DE.rc | 45 ++ reactos/dll/win32/netshell/lang/en-US.rc | 46 ++ reactos/dll/win32/netshell/netshell.c | 21 +- reactos/dll/win32/netshell/netshell.rbuild | 2 + reactos/dll/win32/netshell/netshell.rc | 11 + reactos/dll/win32/netshell/netshell.spec | 2 +- reactos/dll/win32/netshell/precomp.h | 18 + reactos/dll/win32/netshell/resource.h | 27 +- .../dll/win32/netshell/shfldr_netconnect.c | 71 ++- 12 files changed, 701 insertions(+), 16 deletions(-) create mode 100644 reactos/dll/win32/netshell/lanconnectui.c diff --git a/reactos/dll/win32/netshell/classfactory.c b/reactos/dll/win32/netshell/classfactory.c index 6da3a6c1c67..d03c5f340cc 100644 --- a/reactos/dll/win32/netshell/classfactory.c +++ b/reactos/dll/win32/netshell/classfactory.c @@ -21,7 +21,6 @@ IClassFactory_fnQueryInterface( IClassFactoryImpl *This = (IClassFactoryImpl *)iface; *ppvObj = NULL; - if(IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IClassFactory)) { *ppvObj = This; diff --git a/reactos/dll/win32/netshell/connectmanager.c b/reactos/dll/win32/netshell/connectmanager.c index 41aecc5c46b..38f5dea17e6 100644 --- a/reactos/dll/win32/netshell/connectmanager.c +++ b/reactos/dll/win32/netshell/connectmanager.c @@ -211,17 +211,14 @@ INetConnection_fnGetProperties( INetConnection * iface, NETCON_PROPERTIES **ppProps) { -#if 0 + NETCON_PROPERTIES * pProperties; -#endif + INetConnectionImpl * This = (INetConnectionImpl*)iface; if (!ppProps) return E_POINTER; -#if 1 - *ppProps = &This->Props; -#else pProperties = CoTaskMemAlloc(sizeof(NETCON_PROPERTIES)); if (!pProperties) return E_OUTOFMEMORY; @@ -241,7 +238,6 @@ INetConnection_fnGetProperties( } *ppProps = pProperties; -#endif return NOERROR; } @@ -252,6 +248,15 @@ INetConnection_fnGetUiObjectClassId( INetConnection * iface, CLSID *pclsid) { + + INetConnectionImpl * This = (INetConnectionImpl*)iface; + + if (This->Props.MediaType == NCM_LAN) + { + CopyMemory(pclsid, &CLSID_LANConnectUI, sizeof(CLSID)); + return S_OK; + } + return E_NOTIMPL; } diff --git a/reactos/dll/win32/netshell/lanconnectui.c b/reactos/dll/win32/netshell/lanconnectui.c new file mode 100644 index 00000000000..d42c97be52e --- /dev/null +++ b/reactos/dll/win32/netshell/lanconnectui.c @@ -0,0 +1,456 @@ +#include + +typedef enum +{ + NET_TYPE_CLIENT = 1, + NET_TYPE_SERVICE = 2, + NET_TYPE_PROTOCOL = 3 +}NET_TYPE; + +typedef struct +{ + NET_TYPE Type; + DWORD dwCharacteristics; + LPWSTR szHelp; +}NET_ITEM, *PNET_ITEM; + +typedef struct +{ + INetConnectionPropertyUi *lpVtbl; + INetConnection * pCon; + LONG ref; +}INetConnectionPropertyUiImpl, *LPINetConnectionPropertyUiImpl; + + +/// CLASSID +/// {7007ACC5-3202-11D1-AAD2-00805FC1270E} +/// open network properties and wlan properties + +HPROPSHEETPAGE +InitializePropertySheetPage(LPWSTR resname, DLGPROC dlgproc, LPARAM lParam, LPWSTR szTitle) +{ + PROPSHEETPAGEW ppage; + + memset(&ppage, 0x0, sizeof(PROPSHEETPAGEW)); + ppage.dwSize = sizeof(PROPSHEETPAGEW); + ppage.dwFlags = PSP_DEFAULT; + ppage.u.pszTemplate = resname; + ppage.pfnDlgProc = dlgproc; + ppage.lParam = lParam; + ppage.hInstance = netshell_hInstance; + ppage.pszTitle = szTitle; + if (szTitle) + { + ppage.dwFlags |= PSP_USETITLE; + } + return CreatePropertySheetPageW(&ppage); +} + +HRESULT +LaunchUIDlg(UINT * pResourceIDs, DLGPROC * pDlgs, UINT Count, NETCON_PROPERTIES * pProperties) +{ + HPROPSHEETPAGE * hpsp; + PROPSHEETHEADERW psh; + BOOL ret; + UINT Index, Offset; + + hpsp = CoTaskMemAlloc(Count * sizeof(HPROPSHEETPAGE)); + if (!hpsp) + return E_OUTOFMEMORY; + + ZeroMemory(hpsp, Count * sizeof(HPROPSHEETPAGE)); + + Index = 0; + Offset = 0; + do + { + hpsp[Offset] = InitializePropertySheetPage(MAKEINTRESOURCEW(pResourceIDs[Index]), pDlgs[Index], (LPARAM)pProperties, NULL); + if (hpsp[Offset]) + Offset++; + + }while(++Index < Count); + + if (!Offset) + { + CoTaskMemFree(hpsp); + return E_FAIL; + } + + + ZeroMemory(&psh, sizeof(PROPSHEETHEADERW)); + psh.dwSize = sizeof(PROPSHEETHEADERW); + psh.dwFlags = PSP_DEFAULT | PSH_PROPTITLE; + psh.pszCaption = pProperties->pszwName; + psh.hwndParent = NULL; + psh.u3.phpage = hpsp; + psh.nPages = Offset; + psh.hInstance = netshell_hInstance; + + + ret = PropertySheetW(&psh); + CoTaskMemFree(hpsp); + + if (ret < 0) + return E_FAIL; + else + return S_OK; +} + +VOID +AddItemToListView(HWND hDlgCtrl, PNET_ITEM pItem, LPWSTR szName) +{ + LVITEMW lvItem; + + ZeroMemory(&lvItem, sizeof(lvItem)); + lvItem.mask = LVIF_TEXT | LVIF_PARAM; + lvItem.pszText = szName; + lvItem.lParam = (LPARAM)pItem; + lvItem.iItem = ListView_GetItemCount(hDlgCtrl); + + SendMessageW(hDlgCtrl, LVM_INSERTITEMW, 0, (LPARAM)&lvItem); +} + +VOID +EnumClientServiceProtocol(HWND hDlgCtrl, HKEY hKey, UINT Type) +{ + DWORD dwIndex = 0; + DWORD dwSize; + DWORD dwRetVal; + DWORD dwCharacteristics; + WCHAR szName[60]; + WCHAR szText[40]; + WCHAR szHelp[200]; + HKEY hSubKey; + static WCHAR szNDI[] = L"\\Ndi"; + PNET_ITEM pItem; + + do + { + szHelp[0] = L'\0'; + dwCharacteristics = 0; + szText[0] = L'\0'; + + dwSize = sizeof(szName)/sizeof(WCHAR); + if (RegEnumKeyExW(hKey, dwIndex++, szName, &dwSize, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) + { + /* Get Help Text */ + if (dwSize + (sizeof(szNDI)/sizeof(WCHAR)) + 1 < sizeof(szName)/sizeof(WCHAR)) + { + wcscpy(&szName[dwSize], szNDI); + if (RegOpenKeyExW(hKey, szName, 0, KEY_READ, &hSubKey) == ERROR_SUCCESS) + { +#if 0 + if (RegLoadMUIStringW(hSubKey, L"HelpText", szHelp, sizeof(szHelp)/sizeof(WCHAR), &dwRetVal, 0, NULL) == ERROR_SUCCESS) + szHelp[(sizeof(szHelp)/sizeof(WCHAR))-1] = L'\0'; +#else + DWORD dwType; + dwRetVal = sizeof(szHelp); + if (RegQueryValueExW(hSubKey, L"HelpText", NULL, &dwType, (LPBYTE)szHelp, &dwRetVal) == ERROR_SUCCESS) + szHelp[(sizeof(szHelp)/sizeof(WCHAR))-1] = L'\0'; +#endif + RegCloseKey(hSubKey); + } + szName[dwSize] = L'\0'; + } + /* Get Characteristics */ + if (RegOpenKeyExW(hKey, szName, 0, KEY_READ, &hSubKey) == ERROR_SUCCESS) + { + dwSize = sizeof(dwCharacteristics); + if (RegQueryValueExW(hSubKey, L"Characteristics", NULL, NULL, (LPBYTE)&dwCharacteristics, &dwSize) == ERROR_SUCCESS) + { + if (dwCharacteristics & NCF_HIDDEN) + { + RegCloseKey(hSubKey); + continue; + } + } + /* Get the Client/Procotol/Service name */ + dwSize = sizeof(szText); + if (RegQueryValueExW(hSubKey, L"Description", NULL, NULL, (LPBYTE)szText, &dwSize) == ERROR_SUCCESS) + { + szText[(sizeof(szText)/sizeof(WCHAR))-1] = L'\0'; + } + RegCloseKey(hSubKey); + } + + pItem = CoTaskMemAlloc(sizeof(NET_ITEM)); + if (!pItem) + continue; + + pItem->dwCharacteristics = dwCharacteristics; + pItem->Type = Type; + pItem->szHelp = CoTaskMemAlloc((wcslen(szHelp)+1)*sizeof(WCHAR)); + if (pItem->szHelp) + wcscpy(pItem->szHelp, szHelp); + + AddItemToListView(hDlgCtrl, pItem, szText); + } + else + break; + + }while(TRUE); + +} + + +VOID +InitializeLANPropertiesUIDlg(HWND hwndDlg) +{ + static WCHAR szNetClient[] = L"SYSTEM\\CurrentControlSet\\Control\\Network\\{4d36e973-e325-11ce-bfc1-08002be10318}"; + static WCHAR szNetService[] = L"SYSTEM\\CurrentControlSet\\Control\\Network\\{4d36e974-e325-11ce-bfc1-08002be10318}"; + static WCHAR szNetProtocol[] =L"System\\CurrentControlSet\\Control\\Network\\{4D36E975-E325-11CE-BFC1-08002BE10318}"; + HKEY hKey; + HWND hDlgCtrl; + + hDlgCtrl = GetDlgItem(hwndDlg, IDC_COMPONENTSLIST); + /* Enumerate Clients */ + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szNetClient, 0, KEY_READ, &hKey) == ERROR_SUCCESS) + { + EnumClientServiceProtocol(hwndDlg, hKey, NET_TYPE_CLIENT); + RegCloseKey(hKey); + } + + /* Enumerate Service */ + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szNetService, 0, KEY_READ, &hKey) == ERROR_SUCCESS) + { + EnumClientServiceProtocol(hwndDlg, hKey, NET_TYPE_SERVICE); + RegCloseKey(hKey); + } + + /* Enumerate Protocol */ + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szNetProtocol, 0, KEY_READ, &hKey) == ERROR_SUCCESS) + { + EnumClientServiceProtocol(hwndDlg, hKey, NET_TYPE_PROTOCOL); + RegCloseKey(hKey); + } + + +} + + +INT_PTR +CALLBACK +LANPropertiesUIDlg( + HWND hwndDlg, + UINT uMsg, + WPARAM wParam, + LPARAM lParam +) +{ + PROPSHEETPAGE *page; + NETCON_PROPERTIES * pProperties = (NETCON_PROPERTIES*)GetWindowLongPtr(hwndDlg, DWLP_USER); + switch(uMsg) + { + case WM_INITDIALOG: + page = (PROPSHEETPAGE*)lParam; + pProperties = (NETCON_PROPERTIES*)page->lParam; + SendDlgItemMessageW(hwndDlg, IDC_NETCARDNAME, WM_SETTEXT, 0, (LPARAM)pProperties->pszwDeviceName); + if (pProperties->dwCharacter & NCCF_SHOW_ICON) + { + /* check show item on taskbar*/ + SendDlgItemMessageW(hwndDlg, IDC_SHOWTASKBAR, BM_SETCHECK, BST_CHECKED, 0); + } + if (pProperties->dwCharacter & NCCF_NOTIFY_DISCONNECTED) + { + /* check notify item */ + SendDlgItemMessageW(hwndDlg, IDC_NOTIFYNOCONNECTION, BM_SETCHECK, BST_CHECKED, 0); + } + InitializeLANPropertiesUIDlg(hwndDlg); + return TRUE; + } + return FALSE; +} + + +HRESULT +ShowLANConnectionPropertyDialog(NETCON_PROPERTIES * pProperties) +{ + UINT ResourceId[1] = { IDD_NETPROPERTIES }; + DLGPROC Dlgs[1] = {LANPropertiesUIDlg}; + INITCOMMONCONTROLSEX ic; + + + ic.dwSize = sizeof(INITCOMMONCONTROLSEX); + ic.dwICC = ICC_LISTVIEW_CLASSES; + InitCommonControlsEx(&ic); + + return LaunchUIDlg(ResourceId, Dlgs, 1, pProperties); +} + +INT_PTR +CALLBACK +LANStatusUIDlg( + HWND hwndDlg, + UINT uMsg, + WPARAM wParam, + LPARAM lParam +) +{ + NETCON_PROPERTIES * pProperties = (NETCON_PROPERTIES*)GetWindowLongPtr(hwndDlg, DWLP_USER); + switch(uMsg) + { + case WM_INITDIALOG: + pProperties = (NETCON_PROPERTIES*)lParam; + return TRUE; + } + return FALSE; +} + + +HRESULT +ShowLANConnectionStatusDialog(NETCON_PROPERTIES * pProperties) +{ + UINT ResourceId[1] = { IDD_NETSTATUS }; + DLGPROC Dlgs[1] = {LANStatusUIDlg}; + return LaunchUIDlg(ResourceId, Dlgs, 1, pProperties); +} + +static +HRESULT +WINAPI +INetConnectionPropertyUi_fnQueryInterface( + INetConnectionPropertyUi * iface, + REFIID iid, + LPVOID * ppvObj) +{ + INetConnectionPropertyUiImpl * This = (INetConnectionPropertyUiImpl*)iface; + *ppvObj = NULL; + + if (IsEqualIID (iid, &IID_IUnknown) || + IsEqualIID (iid, &IID_INetConnectionPropertyUi)) + { + *ppvObj = This; + IUnknown_AddRef(iface); + return S_OK; + } + + return E_NOINTERFACE; +} + +static +ULONG +WINAPI +INetConnectionPropertyUi_fnAddRef( + INetConnectionPropertyUi * iface) +{ + INetConnectionPropertyUiImpl * This = (INetConnectionPropertyUiImpl*)iface; + ULONG refCount = InterlockedIncrement(&This->ref); + + return refCount; +} + +static +ULONG +WINAPI +INetConnectionPropertyUi_fnRelease( + INetConnectionPropertyUi * iface) +{ + INetConnectionPropertyUiImpl * This = (INetConnectionPropertyUiImpl*)iface; + ULONG refCount = InterlockedDecrement(&This->ref); + + if (!refCount) + { + CoTaskMemFree (This); + } + return refCount; +} + +static +HRESULT +WINAPI +INetConnectionPropertyUi_fnSetConnection( + INetConnectionPropertyUi * iface, + INetConnection *pCon) +{ + INetConnectionPropertyUiImpl * This = (INetConnectionPropertyUiImpl*)iface; + + if (!pCon) + return E_POINTER; + + if (This->pCon) + INetConnection_Release(This->pCon); + + This->pCon = pCon; + INetConnection_AddRef(This->pCon); + return S_OK; +} + +static +HRESULT +WINAPI +INetConnectionPropertyUi_fnAddPages( + INetConnectionPropertyUi * iface, + HWND hwndParent, + LPFNADDPROPSHEETPAGE pfnAddPage, + LPARAM lParam) +{ + HPROPSHEETPAGE hProp; + NETCON_PROPERTIES * pProperties; + BOOL ret; + HRESULT hr; + INITCOMMONCONTROLSEX initEx; + INetConnectionPropertyUiImpl * This = (INetConnectionPropertyUiImpl*)iface; + + + initEx.dwSize = sizeof(initEx); + initEx.dwICC = ICC_LISTVIEW_CLASSES; + + + if(!InitCommonControlsEx(&initEx)) + return E_FAIL; + + + + hr = INetConnection_GetProperties(This->pCon, &pProperties); + if (FAILED(hr)) + return hr; + + hProp = InitializePropertySheetPage(MAKEINTRESOURCEW(IDD_NETPROPERTIES), LANPropertiesUIDlg, (LPARAM)pProperties, pProperties->pszwName); + if (hProp) + { + ret = (*pfnAddPage)(hProp, lParam); + if (ret) + { + return NOERROR; + } + DestroyPropertySheetPage(hProp); + } + return E_FAIL; +} + +static const INetConnectionPropertyUiVtbl vt_NetConnectionPropertyUi = +{ + INetConnectionPropertyUi_fnQueryInterface, + INetConnectionPropertyUi_fnAddRef, + INetConnectionPropertyUi_fnRelease, + INetConnectionPropertyUi_fnSetConnection, + INetConnectionPropertyUi_fnAddPages, +}; + +HRESULT WINAPI LanConnectUI_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) +{ + INetConnectionPropertyUiImpl * This; + + if (!ppv) + return E_POINTER; + + if (pUnkOuter) + return CLASS_E_NOAGGREGATION; + + This = (INetConnectionPropertyUiImpl *) CoTaskMemAlloc(sizeof (INetConnectionPropertyUiImpl)); + if (!This) + return E_OUTOFMEMORY; + + This->ref = 1; + This->pCon = NULL; + This->lpVtbl = (INetConnectionPropertyUi*)&vt_NetConnectionPropertyUi; + + if (!SUCCEEDED (INetConnectionPropertyUi_fnQueryInterface ((INetConnectionPropertyUi*)This, riid, ppv))) + { + IUnknown_Release((IUnknown*)This); + return E_NOINTERFACE; + } + + IUnknown_Release((IUnknown*)This); + return S_OK; +} diff --git a/reactos/dll/win32/netshell/lang/de-DE.rc b/reactos/dll/win32/netshell/lang/de-DE.rc index 4900a1add15..b33fd563031 100644 --- a/reactos/dll/win32/netshell/lang/de-DE.rc +++ b/reactos/dll/win32/netshell/lang/de-DE.rc @@ -1,5 +1,50 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL +IDD_NETPROPERTIES DIALOGEX DISCARDABLE 0, 0, 246, 246 +STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION +CAPTION "Allgemein" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Verbindung herstellen ьber:", -1, 9,9,217,8 + EDITTEXT IDC_NETCARDNAME, 9, 21, 230, 12, WS_BORDER | WS_DISABLED | WS_TABSTOP + PUSHBUTTON "&Konfigurieren", IDC_CONFIGURE, 189, 38, 50, 14 + LTEXT "Diese &Verbindung verwendet folgende Elemente:", -1, 9, 59, 217, 8 + CONTROL "List3", IDC_COMPONENTSLIST, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | WS_BORDER | WS_TABSTOP, 9, 71, 230, 55 + PUSHBUTTON "&Installieren", IDC_INSTALL, 9, 130, 65, 14, WS_DISABLED | WS_TABSTOP + PUSHBUTTON "&Deinstallieren", IDC_UNINSTALL, 90, 130, 65, 14, WS_DISABLED | WS_TABSTOP + PUSHBUTTON "&Eigenschaften", IDC_PROPERTIES, 174, 130, 65, 14 + GROUPBOX "Beschreibung", -1, 9, 153, 230, 46, BS_GROUPBOX + LTEXT "Hier wird die Beschreibung des Elementes stehen....", IDC_DESCRIPTION, 15, 165, 217, 28, WS_GROUP + CHECKBOX "&Symbol bei Verbindung im Infobereich anzeigen", IDC_SHOWTASKBAR, 9, 206, 230, 12, BS_AUTOCHECKBOX | WS_TABSTOP + CHECKBOX "&Benachrichtigen, wenn diese Verbindung eingeschrдnkte oder\nkeine Konnektivitдt besitzt", IDC_NOTIFYNOCONNECTION, 9, 220, 230, 24, BS_AUTOCHECKBOX | WS_TABSTOP +END + +IDD_NETSTATUS DIALOGEX DISCARDABLE 0, 0, 200,180 +STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION +CAPTION "Allgemein" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Allgemein", -1, 9, 8, 182, 58, BS_GROUPBOX + LTEXT "Status:", -1, 19, 20, 60, 8 + LTEXT "Dauer:", -1, 19, 34, 60, 8 + LTEXT "Ьbertragungsrate:", -1, 19, 48, 60, 8 + GROUPBOX "Aktivitдt", -1, 9, 74, 182, 70, BS_GROUPBOX + RTEXT "Gesendet", -1, 26, 90, 60, 8 + ICON IDI_HORIZONTAL, -1, 90, 85, 18, 20 + ICON IDI_NETSTAT, -1, 110, 85, 18, 20 + ICON IDI_HORIZONTAL, -1, 130, 85, 18, 20 + LTEXT "Empfangen", -1, 149, 90, 37, 8 + LTEXT "Bytes:", -1, 17, 115, 32, 8 + RTEXT "000.000.000", IDC_SEND, 63, 115, 44, 8 + ICON IDI_VERTICAL, -1, 110, 108, 18, 20 + RTEXT "000.000.000", IDC_RECEIVED, 139, 115, 44, 8 + PUSHBUTTON "E&igenschaften", IDC_STATUS_PROPERTIES, 10, 150, 50, 14 + PUSHBUTTON "&Deaktivieren", IDC_ENDISABLE, 66, 150, 50, 14 + RTEXT "",IDC_STATUS,83,20,98,8 + RTEXT "",IDC_DURATION,83,34,98,8 + RTEXT "",IDC_SPEED,83,48,98,8 +END + STRINGTABLE DISCARDABLE BEGIN diff --git a/reactos/dll/win32/netshell/lang/en-US.rc b/reactos/dll/win32/netshell/lang/en-US.rc index 89a2256e3dd..69d88789425 100644 --- a/reactos/dll/win32/netshell/lang/en-US.rc +++ b/reactos/dll/win32/netshell/lang/en-US.rc @@ -1,5 +1,51 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +IDD_NETPROPERTIES DIALOGEX DISCARDABLE 0, 0, 246, 246 +STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Connect Using:", -1, 9,9,217,8 + EDITTEXT IDC_NETCARDNAME, 9, 21, 230, 12, WS_BORDER | WS_DISABLED | WS_TABSTOP + PUSHBUTTON "&Configure", IDC_CONFIGURE, 189, 38, 50, 14 + LTEXT "Components checked are used by this connection:", -1, 9, 59, 217, 8 + CONTROL "", IDC_COMPONENTSLIST, "SysListView32", LVS_LIST | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 9, 71, 230, 55 + PUSHBUTTON "&Install", IDC_INSTALL, 9, 130, 65, 14, WS_DISABLED | WS_TABSTOP + PUSHBUTTON "&Uninstall", IDC_UNINSTALL, 90, 130, 65, 14, WS_DISABLED | WS_TABSTOP + PUSHBUTTON "&Properties", IDC_PROPERTIES, 174, 130, 65, 14 + GROUPBOX "Description", -1, 9, 153, 230, 46, BS_GROUPBOX + LTEXT "Component Description goes here...", IDC_DESCRIPTION, 15, 165, 217, 28, WS_GROUP + CHECKBOX "Show Icon in taskbar when connected", IDC_SHOWTASKBAR, 9, 206, 230, 12, BS_AUTOCHECKBOX | WS_TABSTOP + CHECKBOX "Notify me when this connection has limited or no connectivity", IDC_NOTIFYNOCONNECTION, 9, 220, 230, 12, BS_AUTOCHECKBOX | WS_TABSTOP +END + +IDD_NETSTATUS DIALOGEX DISCARDABLE 0, 0, 200,180 +STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Connection", -1, 9, 8, 182, 58, BS_GROUPBOX + LTEXT "Status:", -1, 19, 20, 60, 8 + LTEXT "Duration:", -1, 19, 34, 60, 8 + LTEXT "Speed:", -1, 19, 48, 60, 8 + GROUPBOX "Activity", -1, 9, 74, 182, 70, BS_GROUPBOX + RTEXT "Sent", -1, 26, 90, 60, 8 + ICON IDI_HORIZONTAL, -1, 90, 85, 18, 20 + ICON IDI_NETSTAT, -1, 110, 85, 18, 20 + ICON IDI_HORIZONTAL, -1, 130, 85, 18, 20 + LTEXT "Received", -1, 149, 90, 37, 8 + LTEXT "Bytes:", -1, 17, 115, 32, 8 + RTEXT "000.000.000", IDC_SEND, 63, 115, 44, 8 + ICON IDI_VERTICAL, -1, 110, 108, 18, 20 + RTEXT "000.000.000", IDC_RECEIVED, 139, 115, 44, 8 + PUSHBUTTON "&Properties", IDC_STATUS_PROPERTIES, 10, 150, 50, 14 + PUSHBUTTON "&Disable", IDC_ENDISABLE, 66, 150, 50, 14 + RTEXT "",IDC_STATUS,83,20,98,8 + RTEXT "",IDC_DURATION,83,34,98,8 + RTEXT "",IDC_SPEED,83,48,98,8 +END + + STRINGTABLE DISCARDABLE BEGIN IDS_NETWORKCONNECTION "Network Connection" diff --git a/reactos/dll/win32/netshell/netshell.c b/reactos/dll/win32/netshell/netshell.c index 0bf1a6e455a..515a16e55e2 100644 --- a/reactos/dll/win32/netshell/netshell.c +++ b/reactos/dll/win32/netshell/netshell.c @@ -1,9 +1,12 @@ #include "precomp.h" HINSTANCE netshell_hInstance; +const GUID CLSID_LANConnectUI = {0x7007ACC5, 0x3202, 0x11D1, {0xAA, 0xD2, 0x00, 0x80, 0x5F, 0xC1, 0x27, 0x0E}}; const GUID CLSID_NetworkConnections = {0x7007ACC7, 0x3202, 0x11D1, {0xAA, 0xD2, 0x00, 0x80, 0x5F, 0xC1, 0x27, 0x0E}}; const GUID GUID_DEVCLASS_NET = {0x4d36e972, 0xe325, 0x11ce, {0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18}}; + static const WCHAR szNetConnectClass[] = L"CLSID\\{7007ACC7-3202-11D1-AAD2-00805FC1270E}"; +static const WCHAR szLanConnectUI[] = L"CLSID\\{7007ACC5-3202-11D1-AA-D200805FC1270E}"; static const WCHAR szNamespaceKey[] = L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ControlPanel\\NameSpace\\{7007ACC7-3202-11D1-AAD2-00805FC1270E}"; static INTERFACE_TABLE InterfaceTable[] = @@ -16,6 +19,10 @@ static INTERFACE_TABLE InterfaceTable[] = &CLSID_ConnectionManager, INetConnectionManager_Constructor }, + { + &CLSID_LANConnectUI, + LanConnectUI_Constructor + }, { NULL, NULL @@ -51,7 +58,7 @@ STDAPI DllRegisterServer(void) { HKEY hKey, hSubKey; - WCHAR szName[MAX_PATH] = {0}; + WCHAR szName[MAX_PATH+20] = {0}; WCHAR szNet[20]; UINT Length, Offset; @@ -71,7 +78,7 @@ DllRegisterServer(void) } Length = swprintf(szNet, L",-%u", IDS_NETWORKCONNECTION); - Offset = GetModuleFileNameW(netshell_hInstance, &szName[1], MAX_PATH); + Offset = GetModuleFileNameW(netshell_hInstance, &szName[1], (sizeof(szName)/sizeof(WCHAR))-1); if (Offset + Length + 2 < MAX_PATH) { /* set localized name */ @@ -100,6 +107,7 @@ DllRegisterServer(void) RegSetValueExW(hSubKey, L"Attributes",0, REG_BINARY, (const LPBYTE)&dwAttributes, sizeof(DWORD)); } + RegCloseKey(hKey); return S_OK; } @@ -146,3 +154,12 @@ DllGetClassObject( return hres; } + +VOID +STDCALL +NcFreeNetconProperties (NETCON_PROPERTIES* pProps) +{ + CoTaskMemFree(pProps->pszwName); + CoTaskMemFree(pProps->pszwDeviceName); + CoTaskMemFree(pProps); +} diff --git a/reactos/dll/win32/netshell/netshell.rbuild b/reactos/dll/win32/netshell/netshell.rbuild index 63606570ef2..615fbe955ad 100644 --- a/reactos/dll/win32/netshell/netshell.rbuild +++ b/reactos/dll/win32/netshell/netshell.rbuild @@ -17,6 +17,7 @@ uuid advapi32 setupapi + comctl32 precomp.h netshell.c shfldr_netconnect.c @@ -25,4 +26,5 @@ classfactory.c connectmanager.c netshell.spec + lanconnectui.c diff --git a/reactos/dll/win32/netshell/netshell.rc b/reactos/dll/win32/netshell/netshell.rc index 78822aec2de..dc669e19c9c 100644 --- a/reactos/dll/win32/netshell/netshell.rc +++ b/reactos/dll/win32/netshell/netshell.rc @@ -4,6 +4,17 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL + +#define REACTOS_VERSION_DLL +#define REACTOS_STR_FILE_DESCRIPTION "W32 subsystem kernel\0" +#define REACTOS_STR_INTERNAL_NAME "netshell.dll\0" +#define REACTOS_STR_ORIGINAL_FILENAME "netshell.dll\0" +#define REACTOS_STR_PRODUCT_VERSION "5.1.2600.3264\0" +#define REACTOS_STR_FILE_VERSION "5.1.2600.3264\0" + +#include + + IDI_SHELL_NETWORK_FOLDER ICON "res/netshell.ico" #include "lang/de-DE.rc" diff --git a/reactos/dll/win32/netshell/netshell.spec b/reactos/dll/win32/netshell/netshell.spec index e0ebfe62459..1561c749334 100644 --- a/reactos/dll/win32/netshell/netshell.spec +++ b/reactos/dll/win32/netshell/netshell.spec @@ -20,7 +20,7 @@ 19 stub HrRenameConnection 20 stub HrRunWizard 21 stub InvokeDunFile -22 stub NcFreeNetconProperties +22 stdcall NcFreeNetconProperties(ptr) 23 stub NcIsValidConnectionName 24 stub NetSetupAddRasConnection 25 stub NetSetupFinishInstall diff --git a/reactos/dll/win32/netshell/precomp.h b/reactos/dll/win32/netshell/precomp.h index 2d0a14355b3..3a51304e97a 100644 --- a/reactos/dll/win32/netshell/precomp.h +++ b/reactos/dll/win32/netshell/precomp.h @@ -38,6 +38,17 @@ #include "wine/unicode.h" #include "resource.h" +#define NCF_VIRTUAL 0x1 +#define NCF_SOFTWARE_ENUMERATED 0x2 +#define NCF_PHYSICAL 0x4 +#define NCF_HIDDEN 0x8 +#define NCF_NO_SERVICE 0x10 +#define NCF_NOT_USER_REMOVABLE 0x20 +#define NCF_MULTIPORT_INSTANCED_ADAPTER 0x40 +#define NCF_HAS_UI 0x80 +#define NCF_FILTER 0x400 +#define NCF_NDIS_PROTOCOL 0x4000 + typedef struct { int colnameid; int pcsFlags; @@ -60,6 +71,7 @@ typedef struct tagVALUEStruct /* globals */ extern HINSTANCE netshell_hInstance; extern const GUID CLSID_NetworkConnections; +extern const GUID CLSID_LANConnectUI; extern const GUID GUID_DEVCLASS_NET; @@ -80,4 +92,10 @@ IClassFactory * IClassFactory_fnConstructor(LPFNCREATEINSTANCE lpfnCI, PLONG pcR /* connectmanager.c */ HRESULT WINAPI INetConnectionManager_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); +/* lanconnectui.c */ +HRESULT WINAPI LanConnectUI_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); +HRESULT ShowLANConnectionStatusDialog(NETCON_PROPERTIES * pProperties); + +#define NCCF_NOTIFY_DISCONNECTED 0x100000 + #endif diff --git a/reactos/dll/win32/netshell/resource.h b/reactos/dll/win32/netshell/resource.h index 9c11a18000e..bd082bff3d6 100644 --- a/reactos/dll/win32/netshell/resource.h +++ b/reactos/dll/win32/netshell/resource.h @@ -2,15 +2,32 @@ /* icons */ #define IDI_SHELL_NETWORK_FOLDER 100 - +#define IDI_HORIZONTAL 101 +#define IDI_NETSTAT 102 +#define IDI_VERTICAL 103 /* dialogs */ - - - - +#define IDD_NETPROPERTIES 400 +#define IDD_NETSTATUS 401 /* dialog controls */ +#define IDC_NETCARDNAME 1000 +#define IDC_CONFIGURE 1001 +#define IDC_COMPONENTSLIST 2800 +#define IDC_INSTALL 1003 +#define IDC_UNINSTALL 1004 +#define IDC_PROPERTIES 1005 +#define IDC_DESCRIPTION 1006 +#define IDC_SHOWTASKBAR 1007 +#define IDC_NOTIFYNOCONNECTION 1008 + +#define IDC_SEND 1100 +#define IDC_RECEIVED 1101 +#define IDC_STATUS_PROPERTIES 1102 +#define IDC_ENDISABLE 1103 +#define IDC_STATUS 1104 +#define IDC_DURATION 1105 +#define IDC_SPEED 1106 /* resource constants */ diff --git a/reactos/dll/win32/netshell/shfldr_netconnect.c b/reactos/dll/win32/netshell/shfldr_netconnect.c index 7d1e334f9d6..71702d7405a 100644 --- a/reactos/dll/win32/netshell/shfldr_netconnect.c +++ b/reactos/dll/win32/netshell/shfldr_netconnect.c @@ -22,6 +22,8 @@ WINE_DEFAULT_DEBUG_CHANNEL (shell); +#define MAX_PROPERTY_SHEET_PAGE (10) + /*********************************************************************** * IShellFolder implementation */ @@ -732,6 +734,19 @@ static HRESULT WINAPI ISF_NetConnect_IContextMenu2_QueryContextMenu( return MAKE_HRESULT(SEVERITY_SUCCESS, 0, 9); } +BOOL +CALLBACK +PropSheetExCallback(HPROPSHEETPAGE hPage, LPARAM lParam) +{ + PROPSHEETHEADERW *pinfo = (PROPSHEETHEADERW *)lParam; + + if (pinfo->nPages < MAX_PROPERTY_SHEET_PAGE) + { + pinfo->u3.phpage[pinfo->nPages++] = hPage; + return TRUE; + } + return FALSE; +} /************************************************************************** * ISF_NetConnect_IContextMenu_InvokeCommand() @@ -740,7 +755,61 @@ static HRESULT WINAPI ISF_NetConnect_IContextMenu2_InvokeCommand( IContextMenu2 *iface, LPCMINVOKECOMMANDINFO lpcmi) { - //IGenericSFImpl * This = impl_from_IContextMenu2(iface); + IGenericSFImpl * This = impl_from_IContextMenu2(iface); + VALUEStruct * val; + NETCON_PROPERTIES * pProperties; + HRESULT hr = S_OK; + PROPSHEETHEADERW pinfo; + CLSID ClassID; + HPROPSHEETPAGE hppages[MAX_PROPERTY_SHEET_PAGE]; + INetConnectionPropertyUi * pNCP; + + val = _ILGetValueStruct(This->apidl); + if (!val) + return E_FAIL; + + if (INetConnection_GetProperties((INetConnection*)val->pItem, &pProperties) != NOERROR) + return E_FAIL; + + if (lpcmi->lpVerb == MAKEINTRESOURCEA(IDS_NET_STATUS)) + { + if (pProperties->MediaType == NCM_LAN) + { + hr = ShowLANConnectionStatusDialog(pProperties); + NcFreeNetconProperties(pProperties); + } + return hr; + } + else if (lpcmi->lpVerb == MAKEINTRESOURCEA(IDS_NET_PROPERTIES)) + { + hr = INetConnection_GetUiObjectClassId(val->pItem, &ClassID); + if (SUCCEEDED(hr)) + { + /* FIXME perform version checks */ + hr = CoCreateInstance(&ClassID, NULL, 0, &IID_INetConnectionPropertyUi, (LPVOID)&pNCP); + if (SUCCEEDED(hr)) + { + hr = INetConnectionPropertyUi_SetConnection(pNCP, val->pItem); + if (SUCCEEDED(hr)) + { + memset(&pinfo, 0x0, sizeof(PROPSHEETHEADERW)); + pinfo.dwSize = sizeof(PROPSHEETHEADERW); + pinfo.dwFlags = PSH_NOCONTEXTHELP | PSH_PROPTITLE; + pinfo.u3.phpage = hppages; + pinfo.pszCaption = pProperties->pszwName; + + hr = INetConnectionPropertyUi_AddPages(pNCP, lpcmi->hwnd, PropSheetExCallback, (LPARAM)&pinfo); + if (SUCCEEDED(hr)) + { + if(PropertySheetW(&pinfo) < 0) + hr = E_FAIL; + } + } + } + } + NcFreeNetconProperties(pProperties); + return hr; + } return S_OK; } From 78adf1b7db1c12652cbf2c23ec00b879043608c7 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Fri, 29 Aug 2008 18:57:31 +0000 Subject: [PATCH 229/324] Gregor Schneider - Only pad with zeroes if padding requested. - Show signs for floating point numbers without checking for SIGN type (since there is no unsigned float/double). See issue #3587 for more details. svn path=/trunk/; revision=35764 --- reactos/lib/sdk/crt/stdio/lnx_sprintf.c | 32 ++++++++++++------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/reactos/lib/sdk/crt/stdio/lnx_sprintf.c b/reactos/lib/sdk/crt/stdio/lnx_sprintf.c index 3b48479e7c7..c8508a577ea 100644 --- a/reactos/lib/sdk/crt/stdio/lnx_sprintf.c +++ b/reactos/lib/sdk/crt/stdio/lnx_sprintf.c @@ -167,18 +167,16 @@ numberf(char * buf, char * end, double num, int base, int size, int precision, i return 0; c = (type & ZEROPAD) ? '0' : ' '; sign = 0; - if (type & SIGN) { - if (num < 0) { - sign = '-'; - num = -num; - size--; - } else if (type & PLUS) { - sign = '+'; - size--; - } else if (type & SPACE) { - sign = ' '; - size--; - } + if (num < 0) { + sign = '-'; + num = -num; + size--; + } else if (type & PLUS) { + sign = '+'; + size--; + } else if (type & SPACE) { + sign = ' '; + size--; } if (type & SPECIAL) { if (base == 16) @@ -231,10 +229,12 @@ numberf(char * buf, char * end, double num, int base, int size, int precision, i ++buf; } } - while (i < precision--) { - if (buf <= end) - *buf = '0'; - ++buf; + if (type & ZEROPAD) { + while (i < precision--) { + if (buf <= end) + *buf = '0'; + ++buf; + } } while (i-- > 0) { if (buf <= end) From 36e3b2153ebbfadfbedfd8d9feaa6795fdf853ed Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Fri, 29 Aug 2008 20:43:12 +0000 Subject: [PATCH 230/324] - Add a reference counter to the service record. - Implement a common service record delete function. - RCloseServiceHandle: Remove a service if it has been marked for deletion and the reference counter reaches 0. - RControlService: Stop a service only if there are no dependent services running. Patch based on bug report #3669 by Michael Martin (aka bugboy) just like the patches r35748, r35750, r35752 and r35753. svn path=/trunk/; revision=35767 --- reactos/base/system/services/rpcserver.c | 149 +++++++++++++++++++++-- reactos/base/system/services/services.h | 2 + 2 files changed, 138 insertions(+), 13 deletions(-) diff --git a/reactos/base/system/services/rpcserver.c b/reactos/base/system/services/rpcserver.c index 45d918789d1..5e11db39dd8 100644 --- a/reactos/base/system/services/rpcserver.c +++ b/reactos/base/system/services/rpcserver.c @@ -404,6 +404,12 @@ DWORD RCloseServiceHandle( LPSC_RPC_HANDLE hSCObject) { PMANAGER_HANDLE hManager; + PSERVICE_HANDLE hService; + PSERVICE lpService; + HKEY hServicesKey; + DWORD dwError; + DWORD pcbBytesNeeded = 0; + DWORD dwServicesReturned = 0; DPRINT("RCloseServiceHandle() called\n"); @@ -413,6 +419,7 @@ DWORD RCloseServiceHandle( return ERROR_INVALID_HANDLE; hManager = (PMANAGER_HANDLE)*hSCObject; + hService = (PSERVICE_HANDLE)*hSCObject; if (hManager->Handle.Tag == MANAGER_TAG) { DPRINT("Found manager handle\n"); @@ -420,24 +427,92 @@ DWORD RCloseServiceHandle( hManager->Handle.RefCount--; if (hManager->Handle.RefCount == 0) { - /* FIXME: add cleanup code */ + /* FIXME: add handle cleanup code */ HeapFree(GetProcessHeap(), 0, hManager); + hManager = NULL; } DPRINT("RCloseServiceHandle() done\n"); return ERROR_SUCCESS; } - else if (hManager->Handle.Tag == SERVICE_TAG) + else if (hService->Handle.Tag == SERVICE_TAG) { DPRINT("Found service handle\n"); - hManager->Handle.RefCount--; - if (hManager->Handle.RefCount == 0) - { - /* FIXME: add cleanup code */ + /* Get the pointer to the service record */ + lpService = hService->ServiceEntry; - HeapFree(GetProcessHeap(), 0, hManager); + ASSERT(hService->Handle.RefCount > 0); + + hService->Handle.RefCount--; + if (hService->Handle.RefCount == 0) + { + /* FIXME: add handle cleanup code */ + + /* Free the handle */ + HeapFree(GetProcessHeap(), 0, hService); + hService = NULL; + } + + ASSERT(lpService->dwRefCount > 0); + + lpService->dwRefCount--; + DPRINT1("CloseServiceHandle - lpService->dwRefCount %u\n", + lpService->dwRefCount); + + if (lpService->dwRefCount == 0) + { + /* If this service has been marked for deletion */ + if (lpService->bDeleted) + { + /* Open the Services Reg key */ + dwError = RegOpenKeyExW(HKEY_LOCAL_MACHINE, + L"System\\CurrentControlSet\\Services", + 0, + KEY_SET_VALUE | KEY_READ, + &hServicesKey); + if (dwError != ERROR_SUCCESS) + { + DPRINT1("Failed to open services key\n"); + return dwError; + } + + /* Call the internal function with NULL, just to get bytes we need */ + Int_EnumDependentServicesW(hServicesKey, + lpService, + SERVICE_ACTIVE, + NULL, + &pcbBytesNeeded, + &dwServicesReturned); + + /* if pcbBytesNeeded returned a value then there are services running that are dependent on this service*/ + if (pcbBytesNeeded) + { + DPRINT1("Deletion failed due to running dependencies.\n", + lpService->lpServiceName); + RegCloseKey(hServicesKey); + return ERROR_SUCCESS; + } + + /* There are no references and no runnning dependencies, + it is now safe to delete the service */ + + /* Delete the Service Key */ + dwError = RegDeleteKey(hServicesKey, + lpService->lpServiceName); + + RegCloseKey(hServicesKey); + + if (dwError != ERROR_SUCCESS) + { + DPRINT1("Failed to Delete the Service Registry key\n"); + return dwError; + } + + /* Delete the Service */ + ScmDeleteServiceRecord(lpService); + } } DPRINT("RCloseServiceHandle() done\n"); @@ -461,6 +536,9 @@ DWORD RControlService( PSERVICE lpService; ACCESS_MASK DesiredAccess; DWORD dwError = ERROR_SUCCESS; + DWORD pcbBytesNeeded = 0; + DWORD dwServicesReturned = 0; + HKEY hServicesKey = NULL; DPRINT("RControlService() called\n"); @@ -475,6 +553,14 @@ DWORD RControlService( return ERROR_INVALID_HANDLE; } + /* Check the service entry point */ + lpService = hSvc->ServiceEntry; + if (lpService == NULL) + { + DPRINT1("lpService == NULL!\n"); + return ERROR_INVALID_HANDLE; + } + /* Check access rights */ switch (dwControl) { @@ -507,12 +593,40 @@ DWORD RControlService( DesiredAccess)) return ERROR_ACCESS_DENIED; - /* Check the service entry point */ - lpService = hSvc->ServiceEntry; - if (lpService == NULL) + if (dwControl == SERVICE_CONTROL_STOP) { - DPRINT1("lpService == NULL!\n"); - return ERROR_INVALID_HANDLE; + /* Check if the service has dependencies running as windows + doesn't stop a service that does */ + + /* Open the Services Reg key */ + dwError = RegOpenKeyExW(HKEY_LOCAL_MACHINE, + L"System\\CurrentControlSet\\Services", + 0, + KEY_READ, + &hServicesKey); + if (dwError != ERROR_SUCCESS) + { + DPRINT1("Failed to open services key\n"); + return dwError; + } + + /* Call the internal function with NULL, just to get bytes we need */ + Int_EnumDependentServicesW(hServicesKey, + lpService, + SERVICE_ACTIVE, + NULL, + &pcbBytesNeeded, + &dwServicesReturned); + + RegCloseKey(hServicesKey); + + /* If pcbBytesNeeded is not zero then there are services running that + are dependent on this service */ + if (pcbBytesNeeded != 0) + { + DPRINT("Service has running dependencies. Failed to stop service.\n"); + return ERROR_DEPENDENT_SERVICES_RUNNING; + } } if (lpService->Status.dwServiceType & SERVICE_DRIVER) @@ -530,6 +644,9 @@ DWORD RControlService( lpServiceStatus); } + if ((dwError == ERROR_SUCCESS) && (pcbBytesNeeded)) + dwError = ERROR_DEPENDENT_SERVICES_RUNNING; + /* Return service status information */ RtlCopyMemory(lpServiceStatus, &lpService->Status, @@ -1120,7 +1237,7 @@ DWORD RChangeServiceConfigW( (wcslen(lpLoadOrderGroup) + 1) * sizeof(WCHAR)); if (dwError != ERROR_SUCCESS) goto done; - /* FIXME: update lpService->lpServiceGroup */ + /* FIXME: Update lpService->lpServiceGroup */ } if (lpdwTagId != NULL) @@ -1836,6 +1953,9 @@ DWORD RCreateServiceW( if (dwError != ERROR_SUCCESS) goto done; + lpService->dwRefCount = 1; + DPRINT1("CreateService - lpService->dwRefCount %u\n", lpService->dwRefCount); + done:; if (hServiceKey != NULL) RegCloseKey(hServiceKey); @@ -2309,6 +2429,9 @@ DWORD ROpenServiceW( return dwError; } + lpService->dwRefCount++; + DPRINT1("OpenService - lpService->dwRefCount %u\n",lpService->dwRefCount); + *lpServiceHandle = (unsigned long)hHandle; /* FIXME: 64 bit portability */ DPRINT("*hService = %p\n", *lpServiceHandle); diff --git a/reactos/base/system/services/services.h b/reactos/base/system/services/services.h index 72343acf553..9bfb452195f 100644 --- a/reactos/base/system/services/services.h +++ b/reactos/base/system/services/services.h @@ -40,6 +40,7 @@ typedef struct _SERVICE PSERVICE_IMAGE lpImage; BOOL bDeleted; DWORD dwResumeCount; + DWORD dwRefCount; CLIENT_HANDLE hClient; SERVICE_STATUS Status; @@ -109,6 +110,7 @@ PSERVICE ScmGetServiceEntryByResumeCount(DWORD dwResumeCount); PSERVICE ScmGetServiceEntryByClientHandle(ULONG ThreadId); DWORD ScmCreateNewServiceRecord(LPWSTR lpServiceName, PSERVICE *lpServiceRecord); +VOID ScmDeleteServiceRecord(PSERVICE lpService); DWORD ScmMarkServiceForDelete(PSERVICE pService); DWORD ScmControlService(PSERVICE Service, From f10a1a9c4da60b4bee70a3f5552723274d1aca0b Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Fri, 29 Aug 2008 20:44:40 +0000 Subject: [PATCH 231/324] Forgot to commit this file too! Patch based on bug report #3669 by Michael Martin (aka bugboy) just like the patches r35748, r35750, r35752 and r35753. svn path=/trunk/; revision=35768 --- reactos/base/system/services/database.c | 39 ++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/reactos/base/system/services/database.c b/reactos/base/system/services/database.c index 9291b7ef3b7..ecc9186bedc 100644 --- a/reactos/base/system/services/database.c +++ b/reactos/base/system/services/database.c @@ -172,10 +172,11 @@ ScmCreateNewServiceRecord(LPWSTR lpServiceName, /* Set the resume count */ lpService->dwResumeCount = dwResumeCount++; - /* Append service entry */ + /* Append service record */ InsertTailList(&ServiceListHead, &lpService->ServiceListEntry); + /* Initialize the service status */ lpService->Status.dwCurrentState = SERVICE_STOPPED; lpService->Status.dwControlsAccepted = 0; lpService->Status.dwWin32ExitCode = ERROR_SERVICE_NEVER_STARTED; @@ -187,6 +188,42 @@ ScmCreateNewServiceRecord(LPWSTR lpServiceName, } +VOID +ScmDeleteServiceRecord(PSERVICE lpService) +{ + DPRINT1("Deleting Service %S\n", lpService->lpServiceName); + + /* Delete the display name */ + if (lpService->lpDisplayName != NULL && + lpService->lpDisplayName != lpService->lpServiceName) + HeapFree(GetProcessHeap(), 0, lpService->lpDisplayName); + + /* Decrement the image reference counter */ + if (lpService->lpImage) + lpService->lpImage->dwServiceRefCount--; + + /* Decrement the group reference counter */ + if (lpService->lpGroup) + lpService->lpGroup->dwRefCount--; + + /* FIXME: SecurityDescriptor */ + + /* Close the control pipe */ + if (lpService->ControlPipeHandle != INVALID_HANDLE_VALUE) + CloseHandle(lpService->ControlPipeHandle); + + /* Remove the Service from the List */ + RemoveEntryList(&lpService->ServiceListEntry); + + DPRINT1("Deleted Service %S\n", lpService->lpServiceName); + + /* Delete the service record */ + HeapFree(GetProcessHeap(), 0, lpService); + + DPRINT1("Done\n"); +} + + static DWORD CreateServiceListEntry(LPWSTR lpServiceName, HKEY hServiceKey) From c1f3e0fa1c21c269ba7339ccd16728c4f604238c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Fri, 29 Aug 2008 21:19:41 +0000 Subject: [PATCH 232/324] win32k: Add tags when allocating memory ntoskrnl: Relax checks when freeing a string svn path=/trunk/; revision=35769 --- reactos/ntoskrnl/rtl/libsupp.c | 9 +++++++-- reactos/subsystems/win32/win32k/eng/surface.c | 4 ++-- reactos/subsystems/win32/win32k/eng/xlate.c | 6 +++--- reactos/subsystems/win32/win32k/ntuser/cursoricon.c | 2 +- reactos/subsystems/win32/win32k/ntuser/msgqueue.c | 4 ++-- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/reactos/ntoskrnl/rtl/libsupp.c b/reactos/ntoskrnl/rtl/libsupp.c index 5221937b58d..b0193cd8d99 100644 --- a/reactos/ntoskrnl/rtl/libsupp.c +++ b/reactos/ntoskrnl/rtl/libsupp.c @@ -74,13 +74,18 @@ RtlpAllocateMemory(ULONG Bytes, } +#define TAG_USTR TAG('U', 'S', 'T', 'R') +#define TAG_ASTR TAG('A', 'S', 'T', 'R') +#define TAG_OSTR TAG('O', 'S', 'T', 'R') VOID STDCALL RtlpFreeMemory(PVOID Mem, ULONG Tag) { - ExFreePoolWithTag(Mem, - Tag); + if (Tag == TAG_ASTR || Tag == TAG_OSTR || Tag == TAG_USTR) + ExFreePool(Mem); + else + ExFreePoolWithTag(Mem, Tag); } /* diff --git a/reactos/subsystems/win32/win32k/eng/surface.c b/reactos/subsystems/win32/win32k/eng/surface.c index bda6561e129..afe3b9afbbe 100644 --- a/reactos/subsystems/win32/win32k/eng/surface.c +++ b/reactos/subsystems/win32/win32k/eng/surface.c @@ -325,7 +325,7 @@ IntCreateBitmap(IN SIZEL Size, SurfObj->lDelta = DIB_GetDIBWidthBytes(Size.cx, BitsPerFormat(BMF_8BPP)); SurfObj->cjBits = SurfObj->lDelta * Size.cy; UncompressedFormat = BMF_8BPP; - UncompressedBits = EngAllocMem(FL_ZERO_MEMORY, SurfObj->cjBits, 0); + UncompressedBits = EngAllocMem(FL_ZERO_MEMORY, SurfObj->cjBits, TAG_DIB); Decompress8bpp(Size, (BYTE *)Bits, (BYTE *)UncompressedBits, SurfObj->lDelta); } else @@ -356,7 +356,7 @@ IntCreateBitmap(IN SIZEL Size, { SurfObj->pvBits = EngAllocMem(0 != (Flags & BMF_NOZEROINIT) ? 0 : FL_ZERO_MEMORY, - SurfObj->cjBits, 0); + SurfObj->cjBits, TAG_DIB); } if (SurfObj->pvBits == NULL) { diff --git a/reactos/subsystems/win32/win32k/eng/xlate.c b/reactos/subsystems/win32/win32k/eng/xlate.c index f484bc3ee7b..1b1265490c9 100644 --- a/reactos/subsystems/win32/win32k/eng/xlate.c +++ b/reactos/subsystems/win32/win32k/eng/xlate.c @@ -243,7 +243,7 @@ IntEngCreateXlate(USHORT DestPalType, USHORT SourcePalType, { XlateObj->cEntries = SourcePalGDI->NumColors; XlateObj->pulXlate = - EngAllocMem(0, sizeof(ULONG) * XlateObj->cEntries, 0); + EngAllocMem(0, sizeof(ULONG) * XlateObj->cEntries, TAG_XLATEOBJ); XlateObj->flXlate |= XO_TRIVIAL; for (i = 0; i < XlateObj->cEntries; i++) @@ -264,7 +264,7 @@ IntEngCreateXlate(USHORT DestPalType, USHORT SourcePalType, { XlateObj->cEntries = SourcePalGDI->NumColors; XlateObj->pulXlate = - EngAllocMem(0, sizeof(ULONG) * XlateObj->cEntries, 0); + EngAllocMem(0, sizeof(ULONG) * XlateObj->cEntries, TAG_XLATEOBJ); for (i = 0; i < XlateObj->cEntries; i++) XlateObj->pulXlate[i] = ShiftAndMask(XlateGDI, *((ULONG *)&SourcePalGDI->IndexedColors[i])); @@ -379,7 +379,7 @@ IntEngCreateSrcMonoXlate(HPALETTE PaletteDest, XlateObj = GDIToObj(XlateGDI, XLATE); XlateObj->cEntries = 2; - XlateObj->pulXlate = EngAllocMem(0, sizeof(ULONG) * XlateObj->cEntries, 0); + XlateObj->pulXlate = EngAllocMem(0, sizeof(ULONG) * XlateObj->cEntries, TAG_XLATEOBJ); if (XlateObj->pulXlate == NULL) { PALETTE_UnlockPalette(DestPalGDI); diff --git a/reactos/subsystems/win32/win32k/ntuser/cursoricon.c b/reactos/subsystems/win32/win32k/ntuser/cursoricon.c index c1c8210e613..caab60dd274 100644 --- a/reactos/subsystems/win32/win32k/ntuser/cursoricon.c +++ b/reactos/subsystems/win32/win32k/ntuser/cursoricon.c @@ -317,7 +317,7 @@ IntSetupCurIconHandles(PWINSTATION_OBJECT WinSta) NULL, 0, sizeof(CURICON_PROCESS), - 0, + TAG_DIB, 128); InitializeListHead(&gCurIconList); diff --git a/reactos/subsystems/win32/win32k/ntuser/msgqueue.c b/reactos/subsystems/win32/win32k/ntuser/msgqueue.c index d472d8ec2cb..ebed9aad710 100644 --- a/reactos/subsystems/win32/win32k/ntuser/msgqueue.c +++ b/reactos/subsystems/win32/win32k/ntuser/msgqueue.c @@ -155,14 +155,14 @@ MsqInitializeImpl(VOID) NULL, 0, sizeof(USER_MESSAGE), - 0, + TAG_USRMSG, 256); ExInitializePagedLookasideList(&TimerLookasideList, NULL, NULL, 0, sizeof(TIMER_ENTRY), - 0, + TAG_TIMER, 64); return(STATUS_SUCCESS); From 46cc92b9b6bb1419bb6e1eb4d0b27d6c583c2990 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Fri, 29 Aug 2008 22:31:54 +0000 Subject: [PATCH 233/324] QueryServiceConfig2A/W: Add more parameter checks. Fixes 3 winetest failures. svn path=/trunk/; revision=35770 --- reactos/dll/win32/advapi32/service/scm.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/reactos/dll/win32/advapi32/service/scm.c b/reactos/dll/win32/advapi32/service/scm.c index 98b51b60620..236933efed0 100644 --- a/reactos/dll/win32/advapi32/service/scm.c +++ b/reactos/dll/win32/advapi32/service/scm.c @@ -1831,7 +1831,15 @@ QueryServiceConfig2A(SC_HANDLE hService, TRACE("QueryServiceConfig2A(%p, %lu, %p, %lu, %p)\n", hService, dwInfoLevel, lpBuffer, cbBufSize, pcbBytesNeeded); - if (lpBuffer == NULL && cbBufSize != 0) + if (dwInfoLevel != SERVICE_CONFIG_DESCRIPTION && + dwInfoLevel != SERVICE_CONFIG_FAILURE_ACTIONS) + { + SetLastError(ERROR_INVALID_LEVEL); + return FALSE; + } + + if ((lpBuffer == NULL && cbBufSize != 0) || + pcbBytesNeeded == NULL) { SetLastError(ERROR_INVALID_ADDRESS); return FALSE; @@ -1921,7 +1929,15 @@ QueryServiceConfig2W(SC_HANDLE hService, TRACE("QueryServiceConfig2W(%p, %lu, %p, %lu, %p)\n", hService, dwInfoLevel, lpBuffer, cbBufSize, pcbBytesNeeded); - if (lpBuffer == NULL && cbBufSize != 0) + if (dwInfoLevel != SERVICE_CONFIG_DESCRIPTION && + dwInfoLevel != SERVICE_CONFIG_FAILURE_ACTIONS) + { + SetLastError(ERROR_INVALID_LEVEL); + return FALSE; + } + + if ((lpBuffer == NULL && cbBufSize != 0) || + pcbBytesNeeded == NULL) { SetLastError(ERROR_INVALID_ADDRESS); return FALSE; From dcae209a083af4027480921f8681e7d58e8d1081 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sat, 30 Aug 2008 01:01:52 +0000 Subject: [PATCH 234/324] Change DC and DC_ATTR members from MATRIX_S and EFLOAT_S, which are explicit fpu emulation types, instead use MATRIX and FLOATOBJ which are the class types. Plug in new FLOATOBJ api and remove old fpu using version. Implement XFORMOBJ api using FLOATOBJ. Remove most of the fpu using code from win32k. svn path=/trunk/; revision=35779 --- reactos/include/reactos/win32k/ntgdihdl.h | 14 +- reactos/subsystems/win32/win32k/eng/float.c | 546 ------------------ .../subsystems/win32/win32k/include/coord.h | 21 +- reactos/subsystems/win32/win32k/include/dc.h | 22 +- .../win32/win32k/include/floatobj.h | 73 +++ .../win32/win32k/include/gdifloat.h | 5 +- .../subsystems/win32/win32k/include/win32k.h | 6 +- .../win32/win32k/include/xformobj.h | 31 + .../subsystems/win32/win32k/objects/coord.c | 59 -- .../win32/win32k/objects/xformobj.c | 525 +++++++++++++++++ reactos/subsystems/win32/win32k/stubs/stubs.c | 39 -- reactos/subsystems/win32/win32k/win32k.rbuild | 8 +- 12 files changed, 666 insertions(+), 683 deletions(-) create mode 100644 reactos/subsystems/win32/win32k/include/floatobj.h create mode 100644 reactos/subsystems/win32/win32k/include/xformobj.h create mode 100644 reactos/subsystems/win32/win32k/objects/xformobj.c diff --git a/reactos/include/reactos/win32k/ntgdihdl.h b/reactos/include/reactos/win32k/ntgdihdl.h index e38622c3635..f30b0c397d8 100644 --- a/reactos/include/reactos/win32k/ntgdihdl.h +++ b/reactos/include/reactos/win32k/ntgdihdl.h @@ -290,13 +290,13 @@ typedef struct _DC_ATTR LONG lBreakExtra; LONG cBreak; HANDLE hlfntNew; - MATRIX_S mxWorldToDevice; - MATRIX_S mxDeviceToWorld; - MATRIX_S mxWorldToPage; - EFLOAT_S efM11PtoD; - EFLOAT_S efM22PtoD; - EFLOAT_S efDxPtoD; - EFLOAT_S efDyPtoD; + MATRIX mxWorldToDevice; + MATRIX mxDeviceToWorld; + MATRIX mxWorldToPage; + FLOATOBJ efM11PtoD; + FLOATOBJ efM22PtoD; + FLOATOBJ efDxPtoD; + FLOATOBJ efDyPtoD; INT iMapMode; DWORD dwLayout; LONG lWindowOrgx; diff --git a/reactos/subsystems/win32/win32k/eng/float.c b/reactos/subsystems/win32/win32k/eng/float.c index 0d348dbd8b0..aa080ab9896 100644 --- a/reactos/subsystems/win32/win32k/eng/float.c +++ b/reactos/subsystems/win32/win32k/eng/float.c @@ -33,30 +33,6 @@ #define NDEBUG #include -/* DEFINES *****************************************************************/ - -#ifdef _M_IX86 -#ifdef __GNUC__ -#define FLOAT_TO_INT(in,out) \ - __asm__ __volatile__ ("fistpl %0" : "=m" (out) : "t" (in) : "st"); -#else -#define FLOAT_TO_INT(in,out) \ - __asm fld in \ - __asm fistp out -#endif -#else -#define FLOAT_TO_INT(in,out) \ - out = (long)in; -#endif - -/* the following deal with IEEE single-precision numbers */ -#define EXCESS 126L -#define SIGNBIT 0x80000000L -#define SIGN(fp) ((fp) & SIGNBIT) -#define EXP(fp) (((fp) >> 23L) & 0xFF) -#define MANT(fp) ((fp) & 0x7FFFFFL) -#define PACK(s,e,m) ((s) | ((e) << 23L) | (m)) - /* FUNCTIONS *****************************************************************/ BOOL @@ -101,525 +77,3 @@ EngSaveFloatingPointState(OUT VOID *Buffer, } return TRUE; } - -VOID -FASTCALL -EF_Negate(EFLOAT_S * efp) -{ - efp->lMant = -efp->lMant; -} - -LONG -FASTCALL -EFtoF( EFLOAT_S * efp) -{ - long Mant, Exp, Sign = 0; - - if (!efp->lMant) return 0; - - Mant = efp->lMant; - Exp = efp->lExp; - Sign = SIGN(Mant); - -//// M$ storage emulation - if( Sign ) Mant = -Mant; - Mant = ((Mant & 0x3fffffff) >> 7); - Exp += (EXCESS-1); -//// - Mant = MANT(Mant); - return PACK(Sign, Exp, Mant); -} - -VOID -FASTCALL -FtoEF( EFLOAT_S * efp, FLOATL f) -{ - long Mant, Exp, Sign = 0; - gxf_long worker; - -#ifdef _X86_ - worker.l = f; // It's a float stored in a long. -#else - worker.f = f; -#endif - - Exp = EXP(worker.l); - Mant = MANT(worker.l); - if (SIGN(worker.l)) Sign = -1; -//// M$ storage emulation - Mant = ((Mant << 7) | 0x40000000); - Mant ^= Sign; - Mant -= Sign; - Exp -= (EXCESS-1); -//// - efp->lMant = Mant; - efp->lExp = Exp; -} - -VOID -STDCALL -FLOATOBJ_Add ( - IN OUT PFLOATOBJ pf, - IN PFLOATOBJ pf1 - ) -{ - // www.osr.com/ddk/graphics/gdifncs_2i3r.htm - EFLOAT_S * efp = (EFLOAT_S *)pf; - EFLOAT_S * efp1 = (EFLOAT_S *)pf1; - gxf_long f; - gxf_long f1; - f.l = EFtoF(efp); - f1.l = EFtoF(efp1); - f.f = f.f + f1.f; -#ifdef _X86_ - FtoEF( efp, f.l ); -#else - FtoEF( efp, f.f ); -#endif -} - -VOID -STDCALL -FLOATOBJ_AddFloat( - IN OUT PFLOATOBJ pf, - IN FLOATL f - ) -{ - // www.osr.com/ddk/graphics/gdifncs_0ip3.htm - EFLOAT_S * efp = (EFLOAT_S *)pf; - gxf_long fe; - gxf_long f1; - fe.l = EFtoF(efp); -#ifdef _X86_ - f1.l = f; -#else - f1.f = f; -#endif - fe.f = fe.f + f1.f; -#ifdef _X86_ - FtoEF( efp, fe.l ); -#else - FtoEF( efp, fe.f ); -#endif -} - -VOID FASTCALL -XForm2MatrixS( MATRIX_S * Matrix, PXFORM XForm) -{ -gxf_long f; - f.f = XForm->eM11; - FtoEF( &Matrix->efM11, f.l); - f.f = XForm->eM12; - FtoEF( &Matrix->efM12, f.l); - f.f = XForm->eM21; - FtoEF( &Matrix->efM21, f.l); - f.f = XForm->eM22; - FtoEF( &Matrix->efM22, f.l); - f.f = XForm->eDx; - FtoEF( &Matrix->efDx, f.l); - f.f = XForm->eDy; - FtoEF( &Matrix->efDy, f.l); - Matrix->flAccel = 0; - if (XForm->eM12 == 0. && XForm->eM21 == 0.) - { - Matrix->flAccel |= MX_SCALE; - } -} - -VOID FASTCALL -MatrixS2XForm( PXFORM XForm, MATRIX_S * Matrix) -{ -gxf_long f; - f.l = EFtoF(&Matrix->efM11); - XForm->eM11 = f.f; - f.l = EFtoF(&Matrix->efM12); - XForm->eM12 = f.f; - f.l = EFtoF(&Matrix->efM21); - XForm->eM21 = f.f; - f.l = EFtoF(&Matrix->efM22); - XForm->eM22 = f.f; - f.l = EFtoF(&Matrix->efDx); - XForm->eDx = f.f; - f.l = EFtoF(&Matrix->efDy); - XForm->eDy = f.f; -} - - -VOID -STDCALL -FLOATOBJ_AddLong( - IN OUT PFLOATOBJ pf, - IN LONG l - ) -{ - // www.osr.com/ddk/graphics/gdifncs_12jr.htm - EFLOAT_S * efp = (EFLOAT_S *)pf; - gxf_long f; - f.l = EFtoF(efp); - f.f = f.f + l; -#ifdef _X86_ - FtoEF( efp, f.l ); -#else - FtoEF( efp, f.f ); -#endif -} - -VOID -STDCALL -FLOATOBJ_Div( - IN OUT PFLOATOBJ pf, - IN PFLOATOBJ pf1 - ) -{ - // www.osr.com/ddk/graphics/gdifncs_3ndz.htm - EFLOAT_S * efp = (EFLOAT_S *)pf; - EFLOAT_S * efp1 = (EFLOAT_S *)pf1; - gxf_long f; - gxf_long f1; - f.l = EFtoF(efp); - f1.l = EFtoF(efp1); - f.f = f.f / f1.f; -#ifdef _X86_ - FtoEF( efp, f.l ); -#else - FtoEF( efp, f.f ); -#endif -} - -VOID -STDCALL -FLOATOBJ_DivFloat( - IN OUT PFLOATOBJ pf, - IN FLOATL f - ) -{ - // www.osr.com/ddk/graphics/gdifncs_0gfb.htm - EFLOAT_S * efp = (EFLOAT_S *)pf; - gxf_long fe; - gxf_long f1; - fe.l = EFtoF(efp); -#ifdef _X86_ - f1.l = f; -#else - f1.f = f; -#endif - fe.f = fe.f / f1.f; -#ifdef _X86_ - FtoEF( efp, fe.l ); -#else - FtoEF( efp, fe.f ); -#endif -} - -VOID -STDCALL -FLOATOBJ_DivLong( - IN OUT PFLOATOBJ pf, - IN LONG l - ) -{ - // www.osr.com/ddk/graphics/gdifncs_6jdz.htm - EFLOAT_S * efp = (EFLOAT_S *)pf; - gxf_long f; - f.l = EFtoF(efp); - f.f = f.f / l; -#ifdef _X86_ - FtoEF( efp, f.l ); -#else - FtoEF( efp, f.f ); -#endif -} - -BOOL -STDCALL -FLOATOBJ_Equal( - IN PFLOATOBJ pf, - IN PFLOATOBJ pf1 - ) -{ - // www.osr.com/ddk/graphics/gdifncs_6ysn.htm - EFLOAT_S * efp = (EFLOAT_S *)pf; - EFLOAT_S * efp1 = (EFLOAT_S *)pf1; - gxf_long f; - gxf_long f1; - f.l = EFtoF(efp); - f1.l = EFtoF(efp1); - if (f.f == f1.f) return TRUE; - return FALSE; -} - -BOOL -STDCALL -FLOATOBJ_EqualLong( - IN PFLOATOBJ pf, - IN LONG l - ) -{ - // www.osr.com/ddk/graphics/gdifncs_1pgn.htm - EFLOAT_S * efp = (EFLOAT_S *)pf; - gxf_long f; - f.l = EFtoF(efp); - if (f.f == l) return TRUE; - return FALSE; -} - -LONG -STDCALL -FLOATOBJ_GetFloat ( IN PFLOATOBJ pf ) -{ - // www.osr.com/ddk/graphics/gdifncs_4d5z.htm - EFLOAT_S * efp = (EFLOAT_S *)pf; - return EFtoF(efp); -} - -LONG -STDCALL -FLOATOBJ_GetLong ( IN PFLOATOBJ pf ) -{ - // www.osr.com/ddk/graphics/gdifncs_0tgn.htm - EFLOAT_S * efp = (EFLOAT_S *)pf; - gxf_long f; - long l; - - f.l = EFtoF( efp ); - FLOAT_TO_INT(f.f, l); // Let FPP handle it the fasty haxy way. - - return l; -} - -BOOL -STDCALL -FLOATOBJ_GreaterThan( - IN PFLOATOBJ pf, - IN PFLOATOBJ pf1 - ) -{ - // www.osr.com/ddk/graphics/gdifncs_8n53.htm - EFLOAT_S * efp = (EFLOAT_S *)pf; - EFLOAT_S * efp1 = (EFLOAT_S *)pf1; - gxf_long f; - gxf_long f1; - f.l = EFtoF(efp); - f1.l = EFtoF(efp1); - if(f.f > f1.f) return TRUE; - return FALSE; -} - -BOOL -STDCALL -FLOATOBJ_GreaterThanLong( - IN PFLOATOBJ pf, - IN LONG l - ) -{ - // www.osr.com/ddk/graphics/gdifncs_6gx3.htm - EFLOAT_S * efp = (EFLOAT_S *)pf; - gxf_long f; - f.l = EFtoF(efp); - if (f.f > l) return TRUE; - return FALSE; -} - -BOOL -STDCALL -FLOATOBJ_LessThan( - IN PFLOATOBJ pf, - IN PFLOATOBJ pf1 - ) -{ - // www.osr.com/ddk/graphics/gdifncs_1ynb.htm - EFLOAT_S * efp = (EFLOAT_S *)pf; - EFLOAT_S * efp1 = (EFLOAT_S *)pf1; - gxf_long f; - gxf_long f1; - f.l = EFtoF(efp); - f1.l = EFtoF(efp1); - if(f.f < f1.f) return TRUE; - return FALSE; -} - -BOOL -STDCALL -FLOATOBJ_LessThanLong( - IN PFLOATOBJ pf, - IN LONG l - ) -{ - // www.osr.com/ddk/graphics/gdifncs_9nzb.htm - EFLOAT_S * efp = (EFLOAT_S *)pf; - gxf_long f; - f.l = EFtoF(efp); - if (f.f < l) return TRUE; - return FALSE; -} - -VOID -STDCALL -FLOATOBJ_Mul( - IN OUT PFLOATOBJ pf, - IN PFLOATOBJ pf1 - ) -{ - // www.osr.com/ddk/graphics/gdifncs_8ppj.htm - EFLOAT_S * efp = (EFLOAT_S *)pf; - EFLOAT_S * efp1 = (EFLOAT_S *)pf1; - gxf_long f; - gxf_long f1; - f.l = EFtoF(efp); - f1.l = EFtoF(efp1); - f.f = f1.f * f.f; -#ifdef _X86_ - FtoEF( efp, f.l ); -#else - FtoEF( efp, f.f ); -#endif -} - -VOID -STDCALL -FLOATOBJ_MulFloat( - IN OUT PFLOATOBJ pf, - IN FLOATL f - ) -{ - // www.osr.com/ddk/graphics/gdifncs_3puv.htm - EFLOAT_S * efp = (EFLOAT_S *)pf; - gxf_long fe; - gxf_long f1; - fe.l = EFtoF(efp); -#ifdef _X86_ - f1.l = f; -#else - f1.f = f; -#endif - fe.f = f1.f * fe.f; -#ifdef _X86_ - FtoEF( efp, fe.l ); -#else - FtoEF( efp, fe.f ); -#endif -} - -VOID -STDCALL -FLOATOBJ_MulLong( - IN OUT PFLOATOBJ pf, - IN LONG l - ) -{ - // www.osr.com/ddk/graphics/gdifncs_56lj.htm - EFLOAT_S * efp = (EFLOAT_S *)pf; - gxf_long f; - f.l = EFtoF(efp); - f.f = f.f * l; -#ifdef _X86_ - FtoEF( efp, f.l ); -#else - FtoEF( efp, f.f ); -#endif -} - -VOID -STDCALL -FLOATOBJ_Neg ( IN OUT PFLOATOBJ pf ) -{ - // www.osr.com/ddk/graphics/gdifncs_14pz.htm - EFLOAT_S * efp = (EFLOAT_S *)pf; - EF_Negate(efp); -} - -VOID -STDCALL -FLOATOBJ_SetFloat( - OUT PFLOATOBJ pf, - IN FLOATL f - ) -{ - // www.osr.com/ddk/graphics/gdifncs_1prb.htm - EFLOAT_S * efp = (EFLOAT_S *)pf; - FtoEF( efp, f); -} - -VOID -STDCALL -FLOATOBJ_SetLong( - OUT PFLOATOBJ pf, - IN LONG l - ) -{ - // www.osr.com/ddk/graphics/gdifncs_0gpz.htm - EFLOAT_S * efp = (EFLOAT_S *)pf; - gxf_long f; - f.f = (float) l; // Convert it now. -#ifdef _X86_ - FtoEF( efp, f.l ); -#else - FtoEF( efp, f.f ); -#endif -} - -VOID -STDCALL -FLOATOBJ_Sub( - IN OUT PFLOATOBJ pf, - IN PFLOATOBJ pf1 - ) -{ - // www.osr.com/ddk/graphics/gdifncs_6lyf.htm - EFLOAT_S * efp = (EFLOAT_S *)pf; - EFLOAT_S * efp1 = (EFLOAT_S *)pf1; - gxf_long f; - gxf_long f1; - f.l = EFtoF(efp); - f1.l = EFtoF(efp1); - f.f = f.f - f1.f; -#ifdef _X86_ - FtoEF( efp, f.l ); -#else - FtoEF( efp, f.f ); -#endif -} - -VOID -STDCALL -FLOATOBJ_SubFloat( - IN OUT PFLOATOBJ pf, - IN FLOATL f - ) -{ - // www.osr.com/ddk/graphics/gdifncs_2zvr.htm - EFLOAT_S * efp = (EFLOAT_S *)pf; - gxf_long fe; - gxf_long f1; - fe.l = EFtoF(efp); -#ifdef _X86_ - f1.l = f; -#else - f1.f = f; -#endif - fe.f = fe.f - f1.f; -#ifdef _X86_ - FtoEF( efp, fe.l ); -#else - FtoEF( efp, fe.f ); -#endif -} - -VOID -STDCALL -FLOATOBJ_SubLong( - IN OUT PFLOATOBJ pf, - IN LONG l - ) -{ - // www.osr.com/ddk/graphics/gdifncs_852f.htm - EFLOAT_S * efp = (EFLOAT_S *)pf; - gxf_long f; - f.l = EFtoF(efp); - f.f = f.f - l; -#ifdef _X86_ - FtoEF( efp, f.l ); -#else - FtoEF( efp, f.f ); -#endif -} diff --git a/reactos/subsystems/win32/win32k/include/coord.h b/reactos/subsystems/win32/win32k/include/coord.h index 5f69aaeb5c8..89c317e0311 100644 --- a/reactos/subsystems/win32/win32k/include/coord.h +++ b/reactos/subsystems/win32/win32k/include/coord.h @@ -3,26 +3,17 @@ #include -VOID -FASTCALL -IntDPtoLP ( PDC dc, LPPOINT Points, INT Count ); - -VOID -FASTCALL -CoordDPtoLP ( PDC Dc, LPPOINT Point ); +#define IntDPtoLP(dc, pp, c) XFORMOBJ_bApplyXform((XFORMOBJ*)&(dc)->DcLevel.mxDeviceToWorld, XF_LTOL, c, pp, pp); +#define IntLPtoDP(dc, pp, c) XFORMOBJ_bApplyXform((XFORMOBJ*)&(dc)->DcLevel.mxWorldToDevice, XF_LTOL, c, pp, pp); +#define CoordDPtoLP(dc, pp) XFORMOBJ_bApplyXform((XFORMOBJ*)&(dc)->DcLevel.mxDeviceToWorld, XF_LTOL, 1, pp, pp); +#define CoordLPtoDP(dc, pp) XFORMOBJ_bApplyXform((XFORMOBJ*)&(dc)->DcLevel.mxWorldToDevice, XF_LTOL, 1, pp, pp); +#define XForm2MatrixS(m, x) XFORMOBJ_iSetXform((XFORMOBJ*)m, (XFORML*)x) +#define MatrixS2XForm(x, m) XFORMOBJ_iGetXform((XFORMOBJ*)m, (XFORML*)x) int FASTCALL IntGetGraphicsMode ( PDC dc ); -VOID -FASTCALL -CoordLPtoDP ( PDC Dc, LPPOINT Point ); - -VOID -FASTCALL -IntLPtoDP ( PDC dc, LPPOINT Points, INT Count ); - int STDCALL IntGdiSetMapMode(PDC, int); BOOL diff --git a/reactos/subsystems/win32/win32k/include/dc.h b/reactos/subsystems/win32/win32k/include/dc.h index 2d8700df985..fcda0637fad 100644 --- a/reactos/subsystems/win32/win32k/include/dc.h +++ b/reactos/subsystems/win32/win32k/include/dc.h @@ -77,17 +77,17 @@ typedef struct _DCLEVEL BOOL ufiSet; FLONG fl; FLONG flBrush; - MATRIX_S mxWorldToDevice; - MATRIX_S mxDeviceToWorld; - MATRIX_S mxWorldToPage; - EFLOAT_S efM11PtoD; - EFLOAT_S efM22PtoD; - EFLOAT_S efDxPtoD; - EFLOAT_S efDyPtoD; - EFLOAT_S efM11_TWIPS; - EFLOAT_S efM22_TWIPS; - EFLOAT_S efPr11; - EFLOAT_S efPr22; + MATRIX mxWorldToDevice; + MATRIX mxDeviceToWorld; + MATRIX mxWorldToPage; + FLOATOBJ efM11PtoD; + FLOATOBJ efM22PtoD; + FLOATOBJ efDxPtoD; + FLOATOBJ efDyPtoD; + FLOATOBJ efM11_TWIPS; + FLOATOBJ efM22_TWIPS; + FLOATOBJ efPr11; + FLOATOBJ efPr22; PBITMAPOBJ pSurface; // SURFACE* SIZE sizl; } DCLEVEL, *PDCLEVEL; diff --git a/reactos/subsystems/win32/win32k/include/floatobj.h b/reactos/subsystems/win32/win32k/include/floatobj.h new file mode 100644 index 00000000000..631ec8f0cdc --- /dev/null +++ b/reactos/subsystems/win32/win32k/include/floatobj.h @@ -0,0 +1,73 @@ +#ifndef _WIN32K_FLOATOBJ_H_ +#define _WIN32K_FLOATOBJ_H_ + +#if defined(_X86_) + +FORCEINLINE +BOOL +_FLOATOBJ_Equal(FLOATOBJ *pf1, FLOATOBJ *pf2) +{ + EFLOAT_S *pef1 = (EFLOAT_S*)pf1; + EFLOAT_S *pef2 = (EFLOAT_S*)pf2; + return (pef1->lMant == pef2->lMant && pef1->lExp == pef2->lExp); +} + +FORCEINLINE +LONG +_FLOATOBJ_GetLong(FLOATOBJ *pf) +{ + EFLOAT_S *pef = (EFLOAT_S*)pf; + return pef->lMant >> (32 - pef->lExp); +} + +FORCEINLINE +LONG +_FLOATOBJ_GetFix(FLOATOBJ *pf) +{ + EFLOAT_S *pef = (EFLOAT_S*)pf; + LONG Shift = (28 - pef->lExp); + return (Shift >= 0 ? pef->lMant >> Shift : pef->lMant << -Shift); +} + +FORCEINLINE +BOOL +_FLOATOBJ_IsLong(FLOATOBJ *pf) +{ + EFLOAT_S *pef = (EFLOAT_S*)pf; + ULONG Shift = 32 - pef->lExp; + return (((pef->lMant >> Shift) << Shift) == pef->lMant); +} + +FORCEINLINE +BOOL +_FLOATOBJ_Equal0(FLOATOBJ *pf) +{ + EFLOAT_S *pef = (EFLOAT_S*)pf; + return (pef->lMant == 0 && pef->lExp == 0); +} + +FORCEINLINE +BOOL +_FLOATOBJ_Equal1(FLOATOBJ *pf) +{ + EFLOAT_S *pef = (EFLOAT_S*)pf; + return (pef->lMant == 0x40000000 && pef->lExp == 2); +} + +#define FLOATOBJ_Set0(fo) (fo)->ul1 = 0; (fo)->ul2 = 0; +#define FLOATOBJ_Set1(fo) (fo)->ul1 = 0x40000000; (fo)->ul2 = 2; + +#else + +#define _FLOATOBJ_Equal(pf,pf1) (*(pf) == *(pf1)) +#define _FLOATOBJ_GetLong(pf) ((LONG)*(pf)) +#define _FLOATOBJ_IsLong(pf) ((FLOAT)((LONG)*(pf)) == *(pf)) +#define _FLOATOBJ_Equal0(pf) (*(pf) == 0.) +#define _FLOATOBJ_Equal1(pf) (*(pf) == 1.) + +#define FLOATOBJ_Set0(fo) *(fo) = 0; +#define FLOATOBJ_Set1(fo) *(fo) = 1; + +#endif + +#endif /* not _WIN32K_FLOATOBJ_H_ */ diff --git a/reactos/subsystems/win32/win32k/include/gdifloat.h b/reactos/subsystems/win32/win32k/include/gdifloat.h index dabef3beb56..15081a526ed 100644 --- a/reactos/subsystems/win32/win32k/include/gdifloat.h +++ b/reactos/subsystems/win32/win32k/include/gdifloat.h @@ -24,9 +24,8 @@ static __inline INT GDI_ROUND(FLOAT val) } -VOID FASTCALL XForm2MatrixS( MATRIX_S *, PXFORM); -VOID FASTCALL MatrixS2XForm( PXFORM, MATRIX_S *); -/* Performs a world-to-viewport transformation on the specified point (which +/* FIXME: Do not use the fpu in kernel on x86, use FLOATOBJ_Xxx api instead + * Performs a world-to-viewport transformation on the specified point (which * is in floating point format). */ static __inline void INTERNAL_LPTODP_FLOAT(DC *dc, FLOAT_POINT *point) diff --git a/reactos/subsystems/win32/win32k/include/win32k.h b/reactos/subsystems/win32/win32k/include/win32k.h index a2f3c7cb32c..95423ad799b 100644 --- a/reactos/subsystems/win32/win32k/include/win32k.h +++ b/reactos/subsystems/win32/win32k/include/win32k.h @@ -12,8 +12,6 @@ #define INTERNAL_CALL NTAPI /* Internal Win32k Headers */ -#include - #include #include #include @@ -29,13 +27,16 @@ #include #include #include +#include #include +#include #include #include #include #include #include #include +#include #include #include @@ -74,4 +75,5 @@ #include #include #include + #endif /* __WIN32K_H */ diff --git a/reactos/subsystems/win32/win32k/include/xformobj.h b/reactos/subsystems/win32/win32k/include/xformobj.h new file mode 100644 index 00000000000..5daf643a69d --- /dev/null +++ b/reactos/subsystems/win32/win32k/include/xformobj.h @@ -0,0 +1,31 @@ +#ifndef _WIN32K_XFORMOBJ_H_ +#define _WIN32K_XFORMOBJ_H_ + +ULONG +INTERNAL_CALL +XFORMOBJ_iSetXform( + OUT XFORMOBJ *pxo, + IN XFORML * pxform); + +ULONG +INTERNAL_CALL +XFORMOBJ_iCombine( + IN XFORMOBJ *pxo, + IN XFORMOBJ *pxo1, + IN XFORMOBJ *pxo2); + +ULONG +INTERNAL_CALL +XFORMOBJ_iCombineXform( + IN XFORMOBJ *pxo, + IN XFORMOBJ *pxo1, + IN XFORML *pxform, + IN BOOL bLeftMultiply); + +ULONG +INTERNAL_CALL +XFORMOBJ_Inverse( + OUT XFORMOBJ *pxoDst, + IN XFORMOBJ *pxoSrc); + +#endif /* not _WIN32K_XFORMOBJ_H_ */ diff --git a/reactos/subsystems/win32/win32k/objects/coord.c b/reactos/subsystems/win32/win32k/objects/coord.c index bc4cc602562..7c673d0f896 100644 --- a/reactos/subsystems/win32/win32k/objects/coord.c +++ b/reactos/subsystems/win32/win32k/objects/coord.c @@ -116,33 +116,6 @@ BOOL STDCALL NtGdiCombineTransform(LPXFORM UnsafeXFormResult, return Ret; } -VOID FASTCALL -CoordDPtoLP(PDC Dc, LPPOINT Point) -{ -FLOAT x, y; - x = (FLOAT)Point->x; - y = (FLOAT)Point->y; - XFORM xformVport2World; - - MatrixS2XForm(&xformVport2World, &Dc->DcLevel.mxDeviceToWorld); - - Point->x = x * xformVport2World.eM11 + - y * xformVport2World.eM21 + xformVport2World.eDx; - Point->y = x * xformVport2World.eM12 + - y * xformVport2World.eM22 + xformVport2World.eDy; -} - -VOID -FASTCALL -IntDPtoLP ( PDC dc, LPPOINT Points, INT Count ) -{ - INT i; - - ASSERT ( Points ); - - for ( i = 0; i < Count; i++ ) - CoordDPtoLP ( dc, &Points[i] ); -} int FASTCALL @@ -245,38 +218,6 @@ NtGdiGetTransform(HDC hDC, return NT_SUCCESS(Status); } -VOID -FASTCALL -CoordLPtoDP ( PDC Dc, LPPOINT Point ) -{ - FLOAT x, y; - XFORM xformWorld2Vport; - - ASSERT(Dc); - ASSERT(Point); - - x = (FLOAT)Point->x; - y = (FLOAT)Point->y; - - MatrixS2XForm(&xformWorld2Vport, &Dc->DcLevel.mxWorldToDevice); - - Point->x = x * xformWorld2Vport.eM11 + - y * xformWorld2Vport.eM21 + xformWorld2Vport.eDx; - Point->y = x * xformWorld2Vport.eM12 + - y * xformWorld2Vport.eM22 + xformWorld2Vport.eDy; -} - -VOID -FASTCALL -IntLPtoDP ( PDC dc, LPPOINT Points, INT Count ) -{ - INT i; - - ASSERT ( Points ); - - for ( i = 0; i < Count; i++ ) - CoordLPtoDP ( dc, &Points[i] ); -} /*! * Converts points from logical coordinates into device coordinates. Conversion depends on the mapping mode, diff --git a/reactos/subsystems/win32/win32k/objects/xformobj.c b/reactos/subsystems/win32/win32k/objects/xformobj.c new file mode 100644 index 00000000000..53697ccc3b7 --- /dev/null +++ b/reactos/subsystems/win32/win32k/objects/xformobj.c @@ -0,0 +1,525 @@ +/* + * PROJECT: ReactOS win32 kernel mode subsystem + * LICENSE: GPL - See COPYING in the top level directory + * FILE: subsystems/win32/win32k/objects/xformobj.c + * PURPOSE: XFORMOBJ api + * PROGRAMMER: Timo Kreuzer + */ + +/** Includes ******************************************************************/ + +#include +#define NDEBUG +#include + +C_ASSERT(sizeof(FIX) == sizeof(LONG)); +#define FIX2LONG(x) ((x) >> 4) +#define LONG2FIX(x) ((x) << 4) + +#define FLOATOBJ_Equal _FLOATOBJ_Equal +#define FLOATOBJ_GetLong _FLOATOBJ_GetLong +#define FLOATOBJ_GetFix _FLOATOBJ_GetFix +#define FLOATOBJ_IsLong _FLOATOBJ_IsLong +#define FLOATOBJ_Equal0 _FLOATOBJ_Equal0 +#define FLOATOBJ_Equal1 _FLOATOBJ_Equal1 + +/** Inline helper functions ***************************************************/ + +/* + * Inline helper to calculate pfo1 * pfo2 + pfo3 * pfo4 + */ +VOID FORCEINLINE +MulAdd( + PFLOATOBJ pfoDest, + PFLOATOBJ pfo1, + PFLOATOBJ pfo2, + PFLOATOBJ pfo3, + PFLOATOBJ pfo4) +{ + FLOATOBJ foTmp; + + *pfoDest = *pfo1; + FLOATOBJ_Mul(pfoDest, pfo2); + foTmp = *pfo3; + FLOATOBJ_Mul(&foTmp, pfo4); + FLOATOBJ_Add(pfoDest, &foTmp); +} + +/* + * Inline helper to calculate pfo1 * l2 + pfo3 * l4 + */ +VOID FORCEINLINE +MulAddLong( + PFLOATOBJ pfoDest, + PFLOATOBJ pfo1, + LONG l2, + PFLOATOBJ pfo3, + LONG l4) +{ + FLOATOBJ foTmp; + + *pfoDest = *pfo1; + FLOATOBJ_MulLong(pfoDest, l2); + foTmp = *pfo3; + FLOATOBJ_MulLong(&foTmp, l4); + FLOATOBJ_Add(pfoDest, &foTmp); +} + +/* + * Inline helper to calculate pfo1 * pfo2 - pfo3 * pfo4 + */ +VOID FORCEINLINE +MulSub( + PFLOATOBJ pfoDest, + PFLOATOBJ pfo1, + PFLOATOBJ pfo2, + PFLOATOBJ pfo3, + PFLOATOBJ pfo4) +{ + FLOATOBJ foTmp; + + *pfoDest = *pfo1; + FLOATOBJ_Mul(pfoDest, pfo2); + foTmp = *pfo3; + FLOATOBJ_Mul(&foTmp, pfo4); + FLOATOBJ_Sub(pfoDest, &foTmp); +} + +/* + * Inline helper to get the complexity hint from flAccel + */ +ULONG FORCEINLINE +HintFromAccel(ULONG flAccel) +{ + switch (flAccel & (MX_NOTRANSLATE | MX_IDENTITYSCALE | MX_SCALE)) + { + case (MX_SCALE | MX_IDENTITYSCALE | MX_NOTRANSLATE): + return GX_IDENTITY; + case (MX_SCALE | MX_IDENTITYSCALE): + return GX_OFFSET; + case MX_SCALE: + return GX_SCALE; + default: + return GX_GENERAL; + } +} + +/** Internal functions ********************************************************/ + +ULONG +INTERNAL_CALL +XFORMOBJ_UpdateAccel( + IN XFORMOBJ *pxo) +{ + PMATRIX pmx = (PMATRIX)pxo; + + /* Copy Dx and Dy to FIX format */ + pmx->fxDx = FLOATOBJ_GetFix(&pmx->efDx); + pmx->fxDy = FLOATOBJ_GetFix(&pmx->efDy); + + pmx->flAccel = 0; + + if (FLOATOBJ_Equal0(&pmx->efDx) && + FLOATOBJ_Equal0(&pmx->efDy)) + { + pmx->flAccel |= MX_NOTRANSLATE; + } + + if (FLOATOBJ_Equal0(&pmx->efM12) && + FLOATOBJ_Equal0(&pmx->efM21)) + { + pmx->flAccel |= MX_SCALE; + } + + if (FLOATOBJ_Equal1(&pmx->efM11) && + FLOATOBJ_Equal1(&pmx->efM22)) + { + pmx->flAccel |= MX_IDENTITYSCALE; + } + + if (FLOATOBJ_IsLong(&pmx->efM11) && FLOATOBJ_IsLong(&pmx->efM12) && + FLOATOBJ_IsLong(&pmx->efM21) && FLOATOBJ_IsLong(&pmx->efM22)) + { + pmx->flAccel |= MX_INTEGER; + } + + return HintFromAccel(pmx->flAccel); +} + + +ULONG +INTERNAL_CALL +XFORMOBJ_iSetXform( + OUT XFORMOBJ *pxo, + IN XFORML * pxform) +{ + PMATRIX pmx = (PMATRIX)pxo; + + /* Check parameters */ + if (!pxo || !pxform) + { + return DDI_ERROR; + } + + /* Copy members */ + FLOATOBJ_SetFloat(&pmx->efM11, pxform->eM11); + FLOATOBJ_SetFloat(&pmx->efM12, pxform->eM12); + FLOATOBJ_SetFloat(&pmx->efM21, pxform->eM21); + FLOATOBJ_SetFloat(&pmx->efM22, pxform->eM22); + FLOATOBJ_SetFloat(&pmx->efDx, pxform->eDx); + FLOATOBJ_SetFloat(&pmx->efDy, pxform->eDy); + + /* Update accelerators and return complexity */ + return XFORMOBJ_UpdateAccel(pxo); +} + + +/* + * Multiplies pxo1 with pxo2 and stores the result in pxo. + * returns complexity hint + * | efM11 efM12 0 | + * | efM21 efM22 0 | + * | efDx efDy 1 | + */ +ULONG +INTERNAL_CALL +XFORMOBJ_iCombine( + IN XFORMOBJ *pxo, + IN XFORMOBJ *pxo1, + IN XFORMOBJ *pxo2) +{ + MATRIX mx; + PMATRIX pmx, pmx1, pmx2; + + pmx = (PMATRIX)pxo; + pmx1 = (PMATRIX)pxo1; + pmx2 = (PMATRIX)pxo2; + + /* Do a 3 x 3 matrix multiplication with mx as destinantion */ + MulAdd(&mx.efM11, &pmx1->efM11, &pmx2->efM11, &pmx1->efM12, &pmx2->efM21); + MulAdd(&mx.efM12, &pmx1->efM11, &pmx2->efM12, &pmx1->efM12, &pmx2->efM22); + MulAdd(&mx.efM21, &pmx1->efM21, &pmx2->efM11, &pmx1->efM22, &pmx2->efM21); + MulAdd(&mx.efM22, &pmx1->efM21, &pmx2->efM12, &pmx1->efM22, &pmx2->efM22); + MulAdd(&mx.efDx, &pmx1->efDx, &pmx2->efM11, &pmx1->efDy, &pmx2->efM21); + FLOATOBJ_Add(&mx.efDx, &pmx2->efDx); + MulAdd(&mx.efDy, &pmx1->efDx, &pmx2->efM12, &pmx1->efDy, &pmx2->efM22); + FLOATOBJ_Add(&mx.efDy, &pmx2->efDy); + + /* Copy back */ + *pmx = mx; + + /* Update accelerators and return complexity */ + return XFORMOBJ_UpdateAccel(pxo); +} + + +ULONG +INTERNAL_CALL +XFORMOBJ_iCombineXform( + IN XFORMOBJ *pxo, + IN XFORMOBJ *pxo1, + IN XFORML *pxform, + IN BOOL bLeftMultiply) +{ + MATRIX mx; + XFORMOBJ *pxo2 = (XFORMOBJ*)&mx; + + XFORMOBJ_iSetXform(pxo2, pxform); + + if (bLeftMultiply) + { + return XFORMOBJ_iCombine(pxo, pxo2, pxo1); + } + else + { + return XFORMOBJ_iCombine(pxo, pxo1, pxo2); + } +} + +/* + * A^-1 = adj(A) / det(AT) + * A^-1 = 1/(a*d - b*c) * (a22,-a12,a21,-a11) + */ +ULONG +INTERNAL_CALL +XFORMOBJ_Inverse( + OUT XFORMOBJ *pxoDst, + IN XFORMOBJ *pxoSrc) +{ + PMATRIX pmxDst, pmxSrc; + FLOATOBJ foDet; + + pmxDst = (PMATRIX)pxoDst; + pmxSrc = (PMATRIX)pxoSrc; + + /* det = M11 * M22 - M12 * M21 */ + MulSub(&foDet, &pmxSrc->efM11, &pmxSrc->efM22, &pmxSrc->efM12, &pmxSrc->efM21); + + if (FLOATOBJ_Equal0(&foDet)) + { + /* Determinant is 0! */ + return DDI_ERROR; + } + + /* Calculate adj(A) / det(A) */ + pmxDst->efM11 = pmxSrc->efM22; + FLOATOBJ_Div(&pmxDst->efM11, &foDet); + pmxDst->efM22 = pmxSrc->efM11; + FLOATOBJ_Div(&pmxDst->efM22, &foDet); + + /* The other 2 are negative, negate foDet for that */ + FLOATOBJ_Neg(&foDet); + pmxDst->efM12 = pmxSrc->efM21; + FLOATOBJ_Div(&pmxDst->efM12, &foDet); + pmxDst->efM21 = pmxSrc->efM12; + FLOATOBJ_Div(&pmxDst->efM22, &foDet); + + /* Update accelerators and return complexity */ + return XFORMOBJ_UpdateAccel(pxoDst); +} + + +BOOL +INTERNAL_CALL +XFORMOBJ_bXformFixPoints( + IN XFORMOBJ *pxo, + IN ULONG cPoints, + IN PPOINTL pptIn, + OUT PPOINTL pptOut) +{ + PMATRIX pmx; + INT i; + FLOATOBJ fo1, fo2; + FLONG flAccel; + + pmx = (PMATRIX)pxo; + flAccel = pmx->flAccel & (MX_INTEGER|MX_SCALE|MX_IDENTITYSCALE); + + switch (flAccel) + { + case (MX_SCALE | MX_IDENTITYSCALE): + case (MX_SCALE | MX_IDENTITYSCALE | MX_INTEGER): + /* Identity transformation, nothing todo */ + break; + + case (MX_IDENTITYSCALE | MX_INTEGER): + /* 1-scale integer transform */ + i = cPoints - 1; + do + { + LONG x = pptIn[i].x + pptIn[i].y * FLOATOBJ_GetLong(&pmx->efM21); + LONG y = pptIn[i].y + pptIn[i].x * FLOATOBJ_GetLong(&pmx->efM12); + pptOut[i].y = y; + pptOut[i].x = x; + } + while (--i >= 0); + break; + + case (MX_SCALE | MX_INTEGER): + /* Diagonal integer transform */ + i = cPoints - 1; + do + { + pptOut[i].x = pptIn[i].x * FLOATOBJ_GetLong(&pmx->efM11); + pptOut[i].y = pptIn[i].y * FLOATOBJ_GetLong(&pmx->efM22); + } + while (--i >= 0); + break; + + case (MX_INTEGER): + /* Full integer transform */ + i = cPoints - 1; + do + { + LONG x; + x = pptIn[i].x * FLOATOBJ_GetLong(&pmx->efM11); + x += pptIn[i].y * FLOATOBJ_GetLong(&pmx->efM21); + pptOut[i].y = pptIn[i].y * FLOATOBJ_GetLong(&pmx->efM22); + pptOut[i].y += pptIn[i].x * FLOATOBJ_GetLong(&pmx->efM12); + pptOut[i].x = x; + } + while (--i >= 0); + break; + + case (MX_IDENTITYSCALE): + /* 1-scale transform */ + i = cPoints - 1; + do + { + fo1 = pmx->efM21; + FLOATOBJ_MulLong(&fo1, pptIn[i].y); + fo2 = pmx->efM12; + FLOATOBJ_MulLong(&fo2, pptIn[i].x); + pptOut[i].x = pptIn[i].x + FLOATOBJ_GetLong(&fo1); + pptOut[i].y = pptIn[i].y + FLOATOBJ_GetLong(&fo2); + } + while (--i >= 0); + break; + + case (MX_SCALE): + /* Diagonal float transform */ + i = cPoints - 1; + do + { + fo1 = pmx->efM11; + FLOATOBJ_MulLong(&fo1, pptIn[i].x); + pptOut[i].x = FLOATOBJ_GetLong(&fo1); + fo2 = pmx->efM22; + FLOATOBJ_MulLong(&fo2, pptIn[i].y); + pptOut[i].y = FLOATOBJ_GetLong(&fo2); + } + while (--i >= 0); + break; + + default: + /* Full float transform */ + i = cPoints - 1; + do + { + MulAddLong(&fo1, &pmx->efM11, pptIn[i].x, &pmx->efM21, pptIn[i].y); + MulAddLong(&fo2, &pmx->efM12, pptIn[i].x, &pmx->efM22, pptIn[i].y); + pptOut[i].x = FLOATOBJ_GetLong(&fo1); + pptOut[i].y = FLOATOBJ_GetLong(&fo2); + } + while (--i >= 0); + break; + } + + if (!(pmx->flAccel & MX_NOTRANSLATE)) + { + /* Translate points */ + i = cPoints - 1; + do + { +// DPRINT1("Translating Points (%d,%d)->(%d,%d)\n", pptOut[i].x, pptOut[i].y, pptOut[i].x + pmx->fxDx, pptOut[i].y + pmx->fxDy); + pptOut[i].x += pmx->fxDx; + pptOut[i].y += pmx->fxDy; + } + while (--i >= 0); + } + + return TRUE; +} + +/** Public functions **********************************************************/ + +// www.osr.com/ddk/graphics/gdifncs_0s2v.htm +ULONG +NTAPI +XFORMOBJ_iGetXform( + IN XFORMOBJ *pxo, + OUT XFORML *pxform) +{ + PMATRIX pmx = (PMATRIX)pxo; + + /* Check parameters */ + if (!pxo || !pxform) + { + return DDI_ERROR; + } + + /* Copy members */ + pxform->eM11 = FLOATOBJ_GetFloat(&pmx->efM11); + pxform->eM12 = FLOATOBJ_GetFloat(&pmx->efM12); + pxform->eM21 = FLOATOBJ_GetFloat(&pmx->efM21); + pxform->eM22 = FLOATOBJ_GetFloat(&pmx->efM22); + pxform->eDx = FLOATOBJ_GetFloat(&pmx->efDx); + pxform->eDy = FLOATOBJ_GetFloat(&pmx->efDy); + + /* Return complexity hint */ + return HintFromAccel(pmx->flAccel); +} + + +// www.osr.com/ddk/graphics/gdifncs_5ig7.htm +ULONG +NTAPI +XFORMOBJ_iGetFloatObjXform( + IN XFORMOBJ *pxo, + OUT FLOATOBJ_XFORM *pxfo) +{ + PMATRIX pmx = (PMATRIX)pxo; + + /* Check parameters */ + if (!pxo || !pxfo) + { + return DDI_ERROR; + } + + /* Copy members */ + pxfo->eM11 = pmx->efM11; + pxfo->eM12 = pmx->efM12; + pxfo->eM21 = pmx->efM21; + pxfo->eM22 = pmx->efM22; + pxfo->eDx = pmx->efDx; + pxfo->eDy = pmx->efDy; + + /* Return complexity hint */ + return HintFromAccel(pmx->flAccel); +} + + +// www.osr.com/ddk/graphics/gdifncs_027b.htm +BOOL +NTAPI +XFORMOBJ_bApplyXform( + IN XFORMOBJ *pxo, + IN ULONG iMode, + IN ULONG cPoints, + IN PVOID pvIn, + OUT PVOID pvOut) +{ + MATRIX mx; + POINTL *pptl; + INT i; + + /* Check parameters */ + if (!pxo || !pvIn || !pvOut || cPoints < 1) + { + return FALSE; + } + + /* Use inverse xform? */ + if (iMode == XF_INV_FXTOL || iMode == XF_INV_LTOL) + { + ULONG ret; + ret = XFORMOBJ_Inverse((XFORMOBJ*)&mx, pxo); + if (ret == DDI_ERROR) + { + return FALSE; + } + pxo = (XFORMOBJ*)&mx; + } + + /* Convert POINTL to POINTFIX? */ + if (iMode == XF_LTOFX || iMode == XF_LTOL || iMode == XF_INV_LTOL) + { + pptl = pvIn; + for (i = cPoints - 1; i >= 0; i--) + { + pptl[i].x = LONG2FIX(pptl[i].x); + pptl[i].y = LONG2FIX(pptl[i].y); + } + } + + /* Do the actual fixpoint transformation */ + if (!XFORMOBJ_bXformFixPoints(pxo, cPoints, pvIn, pvOut)) + { + return FALSE; + } + + /* Convert POINTFIX to POINTL? */ + if (iMode == XF_INV_FXTOL || iMode == XF_INV_LTOL || iMode == XF_LTOL) + { + pptl = pvOut; + for (i = cPoints - 1; i >= 0; i--) + { + pptl[i].x = FIX2LONG(pptl[i].x); + pptl[i].y = FIX2LONG(pptl[i].y); + } + } + + return TRUE; +} + +/* EOF */ diff --git a/reactos/subsystems/win32/win32k/stubs/stubs.c b/reactos/subsystems/win32/win32k/stubs/stubs.c index 2851bbc50c2..c662f170356 100644 --- a/reactos/subsystems/win32/win32k/stubs/stubs.c +++ b/reactos/subsystems/win32/win32k/stubs/stubs.c @@ -736,45 +736,6 @@ PATHOBJ_vGetBounds( UNIMPLEMENTED; } -BOOL -APIENTRY -XFORMOBJ_bApplyXform( - IN XFORMOBJ *pxo, - IN ULONG iMode, - IN ULONG cPoints, - IN PVOID pvIn, - OUT PVOID pvOut - ) -{ - // www.osr.com/ddk/graphics/gdifncs_027b.htm - UNIMPLEMENTED; - return FALSE; -} - -ULONG -APIENTRY -XFORMOBJ_iGetFloatObjXform( - IN XFORMOBJ *pxo, - OUT FLOATOBJ_XFORM *pxfo - ) -{ - // www.osr.com/ddk/graphics/gdifncs_5ig7.htm - UNIMPLEMENTED; - return 0; -} - -ULONG -APIENTRY -XFORMOBJ_iGetXform( - IN XFORMOBJ *pxo, - OUT XFORML *pxform - ) -{ - // www.osr.com/ddk/graphics/gdifncs_0s2v.htm - UNIMPLEMENTED; - return 0; -} - /* * @unimplemented */ diff --git a/reactos/subsystems/win32/win32k/win32k.rbuild b/reactos/subsystems/win32/win32k/win32k.rbuild index bc25e040634..413cdc26514 100644 --- a/reactos/subsystems/win32/win32k/win32k.rbuild +++ b/reactos/subsystems/win32/win32k/win32k.rbuild @@ -53,6 +53,11 @@ error.c event.c float.c + + + floatobj.S + + gradient.c lineto.c mem.c @@ -82,7 +87,7 @@ copy.c usrheap.c - + cos_asm.s sin_asm.s atan2_asm.s @@ -173,6 +178,7 @@ stockobj.c text.c wingl.c + xformobj.c stubs.c From 7641cc07cc5328249ac93a9aaf98be4b8c03739b Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 30 Aug 2008 03:42:46 +0000 Subject: [PATCH 235/324] - Merge aicom-network-fixes up to r35787 svn path=/trunk/; revision=35788 --- reactos/drivers/network/afd/afd/bind.c | 1 + reactos/drivers/network/afd/afd/connect.c | 23 +++++++---- reactos/drivers/network/afd/afd/listen.c | 41 +++++++++++++------- reactos/drivers/network/afd/afd/tdi.c | 3 +- reactos/drivers/network/ndis/ndis/miniport.c | 2 +- reactos/drivers/network/tcpip/tcpip/ninfo.c | 5 ++- 6 files changed, 49 insertions(+), 26 deletions(-) diff --git a/reactos/drivers/network/afd/afd/bind.c b/reactos/drivers/network/afd/afd/bind.c index 74967aa8bc0..4745b841b51 100644 --- a/reactos/drivers/network/afd/afd/bind.c +++ b/reactos/drivers/network/afd/afd/bind.c @@ -53,6 +53,7 @@ AfdBindSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp, return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, 0, NULL ); + if( FCB->LocalAddress ) ExFreePool( FCB->LocalAddress ); FCB->LocalAddress = TaCopyTransportAddress( &BindReq->Address ); if( FCB->LocalAddress ) diff --git a/reactos/drivers/network/afd/afd/connect.c b/reactos/drivers/network/afd/afd/connect.c index 905b9ccd997..8759aca017d 100644 --- a/reactos/drivers/network/afd/afd/connect.c +++ b/reactos/drivers/network/afd/afd/connect.c @@ -33,6 +33,7 @@ NTSTATUS WarmSocketForConnection( PAFD_FCB FCB ) { } NTSTATUS MakeSocketIntoConnection( PAFD_FCB FCB ) { + NTSTATUS Status; /* Allocate the receive area and start receiving */ FCB->Recv.Window = @@ -50,14 +51,18 @@ NTSTATUS MakeSocketIntoConnection( PAFD_FCB FCB ) { FCB->State = SOCKET_STATE_CONNECTED; - return TdiReceive( &FCB->ReceiveIrp.InFlightRequest, - FCB->Connection.Object, - TDI_RECEIVE_NORMAL, - FCB->Recv.Window, - FCB->Recv.Size, - &FCB->ReceiveIrp.Iosb, - ReceiveComplete, - FCB ); + Status = TdiReceive( &FCB->ReceiveIrp.InFlightRequest, + FCB->Connection.Object, + TDI_RECEIVE_NORMAL, + FCB->Recv.Window, + FCB->Recv.Size, + &FCB->ReceiveIrp.Iosb, + ReceiveComplete, + FCB ); + + if( Status == STATUS_PENDING ) Status = STATUS_SUCCESS; + + return Status; } static NTSTATUS NTAPI StreamSocketConnectComplete @@ -166,6 +171,7 @@ AfdStreamSocketConnect(PDEVICE_OBJECT DeviceObject, PIRP Irp, return LeaveIrpUntilLater( FCB, Irp, FUNCTION_CONNECT ); case SOCKET_STATE_CREATED: + if( FCB->LocalAddress ) ExFreePool( FCB->LocalAddress ); FCB->LocalAddress = TaCopyTransportAddress( &ConnectReq->RemoteAddress ); @@ -193,6 +199,7 @@ AfdStreamSocketConnect(PDEVICE_OBJECT DeviceObject, PIRP Irp, /* Drop through to SOCKET_STATE_BOUND */ case SOCKET_STATE_BOUND: + if( FCB->RemoteAddress ) ExFreePool( FCB->RemoteAddress ); FCB->RemoteAddress = TaCopyTransportAddress( &ConnectReq->RemoteAddress ); diff --git a/reactos/drivers/network/afd/afd/listen.c b/reactos/drivers/network/afd/afd/listen.c index 62fa22b8bf3..85a8bf2eeaf 100644 --- a/reactos/drivers/network/afd/afd/listen.c +++ b/reactos/drivers/network/afd/afd/listen.c @@ -17,6 +17,7 @@ static VOID SatisfyAccept( PAFD_DEVICE_EXTENSION DeviceExt, PFILE_OBJECT NewFileObject, PAFD_TDI_OBJECT_QELT Qelt ) { PAFD_FCB FCB = NewFileObject->FsContext; + NTSTATUS Status; if( !SocketAcquireStateLock( FCB ) ) { LostSocket( Irp ); @@ -26,21 +27,28 @@ static VOID SatisfyAccept( PAFD_DEVICE_EXTENSION DeviceExt, /* Transfer the connection to the new socket, launch the opening read */ AFD_DbgPrint(MID_TRACE,("Completing a real accept (FCB %x)\n", FCB)); - FCB->State = SOCKET_STATE_CONNECTED; FCB->Connection = Qelt->Object; + + if( FCB->RemoteAddress ) ExFreePool( FCB->RemoteAddress ); FCB->RemoteAddress = TaCopyTransportAddress( Qelt->ConnInfo->RemoteAddress ); + if( !FCB->RemoteAddress ) + Status = STATUS_NO_MEMORY; + else + Status = MakeSocketIntoConnection( FCB ); + + if( NT_SUCCESS(Status) ) { + FCB->PollState |= AFD_EVENT_SEND; + PollReeval( DeviceExt, NewFileObject ); + } + if( Irp->MdlAddress ) UnlockRequest( Irp, IoGetCurrentIrpStackLocation( Irp ) ); - + Irp->IoStatus.Information = 0; - Irp->IoStatus.Status = STATUS_SUCCESS; + Irp->IoStatus.Status = Status; IoCompleteRequest( Irp, IO_NETWORK_INCREMENT ); - MakeSocketIntoConnection( FCB ); - FCB->PollState |= AFD_EVENT_SEND; - PollReeval( DeviceExt, NewFileObject ); - SocketStateUnlock( FCB ); } @@ -90,7 +98,7 @@ static NTSTATUS NTAPI ListenComplete ( PDEVICE_OBJECT DeviceObject, PIRP Irp, PVOID Context ) { - NTSTATUS Status = STATUS_FILE_CLOSED; + NTSTATUS Status = STATUS_SUCCESS; PAFD_FCB FCB = (PAFD_FCB)Context; PAFD_TDI_OBJECT_QELT Qelt; @@ -99,7 +107,7 @@ static NTSTATUS NTAPI ListenComplete return STATUS_CANCELLED; } - if( !SocketAcquireStateLock( FCB ) ) return Status; + if( !SocketAcquireStateLock( FCB ) ) return STATUS_FILE_CLOSED; FCB->ListenIrp.InFlightRequest = NULL; @@ -114,8 +122,10 @@ static NTSTATUS NTAPI ListenComplete Qelt = ExAllocatePool( NonPagedPool, sizeof(*Qelt) ); if( !Qelt ) { + /* Is this correct? */ TdiCloseDevice( FCB->Connection.Handle, FCB->Connection.Object ); + Status = STATUS_NO_MEMORY; } else { UINT AddressType = FCB->LocalAddress->Address[0].AddressType; @@ -128,11 +138,12 @@ static NTSTATUS NTAPI ListenComplete ConnectionReturnInfo->RemoteAddress)); TdiBuildNullConnectionInfo( &Qelt->ConnInfo, AddressType ); - TaCopyTransportAddressInPlace - ( Qelt->ConnInfo->RemoteAddress, - FCB->ListenIrp.ConnectionReturnInfo->RemoteAddress ); - - InsertTailList( &FCB->PendingConnections, &Qelt->ListEntry ); + if( Qelt->ConnInfo ) { + TaCopyTransportAddressInPlace + ( Qelt->ConnInfo->RemoteAddress, + FCB->ListenIrp.ConnectionReturnInfo->RemoteAddress ); + InsertTailList( &FCB->PendingConnections, &Qelt->ListEntry ); + } else Status = STATUS_NO_MEMORY; } /* Satisfy a pre-accept request if one is available */ @@ -160,7 +171,7 @@ static NTSTATUS NTAPI ListenComplete SocketStateUnlock( FCB ); - return STATUS_SUCCESS; + return Status; } NTSTATUS AfdListenSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp, diff --git a/reactos/drivers/network/afd/afd/tdi.c b/reactos/drivers/network/afd/afd/tdi.c index c4501f1842c..dbe74cee242 100644 --- a/reactos/drivers/network/afd/afd/tdi.c +++ b/reactos/drivers/network/afd/afd/tdi.c @@ -136,7 +136,8 @@ static NTSTATUS TdiOpenDevice( NULL); /* Handle information */ if (!NT_SUCCESS(Status)) { AFD_DbgPrint(MIN_TRACE, ("ObReferenceObjectByHandle() failed with status (0x%X).\n", Status)); - ZwClose(*Handle); + ZwClose(*Handle); + *Handle = NULL; } else { AFD_DbgPrint(MAX_TRACE, ("Got handle (0x%X) Object (0x%X)\n", *Handle, *Object)); diff --git a/reactos/drivers/network/ndis/ndis/miniport.c b/reactos/drivers/network/ndis/ndis/miniport.c index de2fec6969d..bcad528bce8 100644 --- a/reactos/drivers/network/ndis/ndis/miniport.c +++ b/reactos/drivers/network/ndis/ndis/miniport.c @@ -1625,7 +1625,7 @@ NdisIAddDevice( Status = IoGetDeviceProperty(PhysicalDeviceObject, DevicePropertyDriverKeyName, 0, NULL, &DriverKeyLength); - if (Status != STATUS_BUFFER_TOO_SMALL) + if (Status != STATUS_BUFFER_TOO_SMALL && Status != STATUS_BUFFER_OVERFLOW) { NDIS_DbgPrint(DEBUG_MINIPORT, ("Can't get miniport driver key length.\n")); return Status; diff --git a/reactos/drivers/network/tcpip/tcpip/ninfo.c b/reactos/drivers/network/tcpip/tcpip/ninfo.c index c32822447fb..f39b35b5929 100644 --- a/reactos/drivers/network/tcpip/tcpip/ninfo.c +++ b/reactos/drivers/network/tcpip/tcpip/ninfo.c @@ -27,6 +27,9 @@ TDI_STATUS InfoTdiQueryGetAddrTable( PNDIS_BUFFER Buffer, TI_DbgPrint(DEBUG_INFO, ("Called.\n")); + if (!IpAddress) + return TDI_NO_RESOURCES; + TcpipAcquireSpinLock(&InterfaceListLock, &OldIrql); ForEachInterface(CurrentIF) { @@ -80,7 +83,7 @@ TDI_STATUS InfoTdiQueryGetRouteTable( PNDIS_BUFFER Buffer, PUINT BufferSize ) { if( !RCache || !RouteEntries ) { if( RCache ) ExFreePool( RCache ); if( RouteEntries ) ExFreePool( RouteEntries ); - return STATUS_NO_MEMORY; + return TDI_NO_RESOURCES; } RtlZeroMemory( RouteEntries, Size ); From c4ec9d697b2a148c686c5d835d08789d4a220beb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sat, 30 Aug 2008 07:11:57 +0000 Subject: [PATCH 236/324] GCC doesn't need CDECL on variables svn path=/trunk/; revision=35790 --- reactos/include/psdk/ks.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/reactos/include/psdk/ks.h b/reactos/include/psdk/ks.h index 5bda665365b..0563313c039 100644 --- a/reactos/include/psdk/ks.h +++ b/reactos/include/psdk/ks.h @@ -73,8 +73,11 @@ typedef PVOID PKSWORKER; #ifndef _NTRTL_ #ifndef DEFINE_GUIDEX - /* CDECL is used here in MS DDK but does this really work?? */ - #define DEFINE_GUIDEX(name) EXTERN_C const CDECL GUID name + #ifdef _MSC_VER + #define DEFINE_GUIDEX(name) EXTERN_C const CDECL GUID name + #else + #define DEFINE_GUIDEX(name) EXTERN_C const GUID name + #endif #endif #ifndef STATICGUIDOF From fc5403e61137be559367ddc2b54df081a322984a Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Sat, 30 Aug 2008 07:57:06 +0000 Subject: [PATCH 237/324] - Fix broken MMPTE_LIST structure definition. svn path=/trunk/; revision=35791 --- reactos/include/ndk/i386/mmtypes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/include/ndk/i386/mmtypes.h b/reactos/include/ndk/i386/mmtypes.h index 9572ffdf304..01bc426ca6b 100644 --- a/reactos/include/ndk/i386/mmtypes.h +++ b/reactos/include/ndk/i386/mmtypes.h @@ -115,9 +115,9 @@ typedef struct _MMPTE_LIST ULONG Valid:1; ULONG OneEntry:1; ULONG filler0:8; - ULONG NextEntry:20; ULONG Prototype:1; ULONG filler1:1; + ULONG NextEntry:20; } MMPTE_LIST; #ifndef CONFIG_SMP From 81b80004153f46c27b54bd1b30a9871935d2925b Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Sat, 30 Aug 2008 08:16:39 +0000 Subject: [PATCH 238/324] - Import Netcfgx.h svn path=/trunk/; revision=35792 --- reactos/include/psdk/netcfgx.h | 105 +++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 reactos/include/psdk/netcfgx.h diff --git a/reactos/include/psdk/netcfgx.h b/reactos/include/psdk/netcfgx.h new file mode 100644 index 00000000000..d1298c46180 --- /dev/null +++ b/reactos/include/psdk/netcfgx.h @@ -0,0 +1,105 @@ +#ifndef __NETCFGX_H__ +#define __NETCFGX_H__ + +#undef INTERFACE +#define INTERFACE INetCfgComponent +DECLARE_INTERFACE_(INetCfgComponent, IUnknown) +{ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void **ppv) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + STDMETHOD_(HRESULT,GetDisplayName)(THIS_ LPWSTR *ppszwDisplayName) PURE; + STDMETHOD_(HRESULT,SetDisplayName)(THIS_ LPWSTR *ppszwDisplayName) PURE; + STDMETHOD_(HRESULT,GetHelpText)(THIS_ LPWSTR *pszwHelpText) PURE; + STDMETHOD_(HRESULT,GetId)(THIS_ LPWSTR *ppszwId) PURE; + STDMETHOD_(HRESULT,GetCharacteristics)(THIS_ LPDWORD pdwCharacteristics) PURE; + STDMETHOD_(HRESULT,GetInstanceGuid)(THIS_ GUID *pGuid) PURE; + STDMETHOD_(HRESULT,GetPnpDevNodeId)(THIS_ LPWSTR *ppszwDevNodeId) PURE; + STDMETHOD_(HRESULT,GetClassGuid)(THIS_ GUID *pGuid) PURE; + STDMETHOD_(HRESULT,GetBindName)(THIS_ LPWSTR *ppszwBindName) PURE; + STDMETHOD_(HRESULT,GetDeviceStatus)(THIS_ ULONG *pulStatus) PURE; + STDMETHOD_(HRESULT,OpenParamKey)(THIS_ HKEY *phkey) PURE; + STDMETHOD_(HRESULT,RaisePropertyUi)(THIS_ HWND hwndParent, DWORD dwFlags, IUnknown *punkContext) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define INetCfgComponent_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define INetCfgComponent_AddRef(p) (p)->lpVtbl->AddRef(p) +#define INetCfgComponent_Release(p) (p)->lpVtbl->Release(p) +#define INetCfgComponent_GetDisplayName(p,a) (p)->lpVtbl->GetDisplayName(p,a) +#define INetCfgComponent_SetDisplayName(p,a) (p)->lpVtbl->SetDisplayName(p,a) +#define INetCfgComponent_GetHelpText(p,a) (p)->lpVtbl->GetHelpText(p,a) +#define INetCfgComponent_GetId(p,a) (p)->lpVtbl->GetId(p,a) +#define INetCfgComponent_GetCharacteristics(p,a) (p)->lpVtbl->GetCharacteristics(p,a) +#define INetCfgComponent_GetInstanceGuid(p,a) (p)->lpVtbl->GetInstanceGuid(p,a) +#define INetCfgComponent_GetPnpDevNodeId(p,a) (p)->lpVtbl->GetPnpDevNodeId(p,a) +#define INetCfgComponent_GetClassGuid(p,a) (p)->lpVtbl->GetClassGuid(p,a) +#define INetCfgComponent_GetBindName(p,a) (p)->lpVtbl->GetBindName(p,a) +#define INetCfgComponent_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a) +#define INetCfgComponent_OpenParamKey(p,a) (p)->lpVtbl->OpenParamKey(p,a) +#define INetCfgComponent_RaisePropertyUi(p,a,b,c) (p)->lpVtbl->OpenParamKey(p,a,b,c) +#endif + +#undef INTERFACE +#define INTERFACE IEnumNetCfgComponent +DECLARE_INTERFACE_(IEnumNetCfgComponent, IUnknown) +{ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void **ppv) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + STDMETHOD_(HRESULT,Next)(THIS_ ULONG celt, INetCfgComponent **rgelt, ULONG *pceltFetched) PURE; + STDMETHOD_(HRESULT,Skip) (THIS_ ULONG celt) PURE; + STDMETHOD_(HRESULT,Reset) (THIS) PURE; + STDMETHOD_(HRESULT,Clone) (THIS_ IEnumNetCfgComponent **ppenum) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IEnumNetCfgComponent_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IEnumNetCfgComponent_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IEnumNetCfgComponent_Release(p) (p)->lpVtbl->Release(p) +#define IEnumNetCfgComponent_Next(p,a,b,c) (p)->lpVtbl->Next(p,a,b,c) +#define IEnumNetCfgComponent_Skip(p,a) (p)->lpVtbl->Skip(p,a) +#define IEnumNetCfgComponent_Reset(p) (p)->lpVtbl->Reset(p) +#define IEnumNetCfgComponent_Clone(p,a) (p)->lpVtbl->Clone(p,a) +#endif + + +#undef INTERFACE +#define INTERFACE INetCfg +DECLARE_INTERFACE_(INetCfg, IUnknown) +{ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void **ppv) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + STDMETHOD_(HRESULT,Initialize) (THIS_ PVOID pvReserved) PURE; + STDMETHOD_(HRESULT,Uninitialize) (THIS) PURE; + STDMETHOD_(HRESULT,Apply) (THIS) PURE; + STDMETHOD_(HRESULT,Cancel) (THIS) PURE; + STDMETHOD_(HRESULT,EnumComponents) (THIS_ const GUID *pguidClass, IEnumNetCfgComponent **ppenumComponent) PURE; + STDMETHOD_(HRESULT,FindComponent) (THIS_ LPCWSTR pszwInfId, IEnumNetCfgComponent **ppenumComponent) PURE; + STDMETHOD_(HRESULT,QueryNetCfgClass) (THIS_ const GUID *pguidClass, REFIID riid, void **ppvObject) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define INetCfg_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define INetCfg_AddRef(p) (p)->lpVtbl->AddRef(p) +#define INetCfg_Release(p) (p)->lpVtbl->Release(p) +#define INetCfg_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) +#define INetCfg_Uninitialize(p) (p)->lpVtbl->Uninitialize(p) +#define INetCfg_Apply(p) (p)->lpVtbl->Apply(p) +#define INetCfg_Cancel(p) (p)->lpVtbl->Cancel(p) +#define INetCfg_EnumComponents(p,a,b) (p)->lpVtbl->EnumComponents(p,a,b) +#define INetCfg_FindComponent(p,a,b) (p)->lpVtbl->FindComponent(p,a,b) +#define INetCfg_QueryNetCfgClass(p,a,b,c) (p)->lpVtbl->QueryNetCfgClass(p,a,b,c) +#endif + +EXTERN_C const GUID CLSID_CNetCfg; +EXTERN_C const IID IID_INetCfg; + +#endif From 0914ac4a4491baa76aa363331adc6722ff953594 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Sat, 30 Aug 2008 08:17:33 +0000 Subject: [PATCH 239/324] - Add IIDs && GUID of Netcfg svn path=/trunk/; revision=35793 --- reactos/lib/sdk/uuid/uuid.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/reactos/lib/sdk/uuid/uuid.c b/reactos/lib/sdk/uuid/uuid.c index 6d0698f238d..a12b340e2bf 100644 --- a/reactos/lib/sdk/uuid/uuid.c +++ b/reactos/lib/sdk/uuid/uuid.c @@ -99,6 +99,11 @@ DEFINE_GUID(IID_IEnumNetConnection, 0xC08956A0,0x1CD3,0x11D1,0xB1,0xC5,0x0 DEFINE_GUID(IID_INetConnection, 0xC08956A1,0x1CD3,0x11D1,0xB1,0xC5,0x00,0x80,0x5F,0xC1,0x27,0x0E); DEFINE_GUID(IID_INetConnectionManager, 0xC08956A2,0x1CD3,0x11D1,0xB1,0xC5,0x00,0x80,0x5F,0xC1,0x27,0x0E); DEFINE_GUID(IID_INetConnectionPropertyUi, 0xC08956A4,0x1CD3,0x11D1,0xB1,0xC5,0x00,0x80,0x5F,0xC1,0x27,0x0E); +DEFINE_GUID(IID_IEnumNetCfgComponent, 0xC0E8AE92,0x306E,0x11D1,0xAA,0xCF,0x00,0x80,0x5F,0xC1,0x27,0x0E); +DEFINE_GUID(IID_INetCfg, 0xC0E8AE93,0x306E,0x11D1,0xAA,0xCF,0x00,0x80,0x5F,0xC1,0x27,0x0E); +DEFINE_GUID(IID_INetCfgComponent, 0xC0E8AE99,0x306E,0x11D1,0xAA,0xCF,0x00,0x80,0x5F,0xC1,0x27,0x0E); +DEFINE_GUID(IID_INetCfgLock, 0xC0E8AE9F,0x306E,0x11D1,0xAA,0xCF,0x00,0x80,0x5F,0xC1,0x27,0x0E); + DEFINE_GUID(FMTID_SummaryInformation,0xF29F85E0,0x4FF9,0x1068,0xAB,0x91,0x08,0x00,0x2B,0x27,0xB3,0xD9); DEFINE_GUID(FMTID_DocSummaryInformation,0xD5CDD502,0x2E9C,0x101B,0x93,0x97,0x08,0x00,0x2B,0x2C,0xF9,0xAE); @@ -127,4 +132,6 @@ DEFINE_GUID(CLSID_StdEvent, 0x0000032b,0x0000,0x0000,0xc0,0x00,0x0 DEFINE_GUID(CLSID_ManualResetEvent, 0x0000032c,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); DEFINE_GUID(CLSID_SynchronizeContainer, 0x0000032d,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); DEFINE_GUID(CLSID_InProcFreeMarshaler, 0x0000033a,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); -DEFINE_GUID(CLSID_ConnectionManager, 0xBA126AD1,0x2166, 0x11D1,0xB1,0xD0,0x0,0x80,0x5F,0xC1,0x27,0x0E); +DEFINE_GUID(CLSID_ConnectionManager, 0xBA126AD1,0x2166,0x11D1,0xB1,0xD0,0x0,0x80,0x5F,0xC1,0x27,0x0E); +DEFINE_GUID(CLSID_CNetCfg, 0x5B035261,0x40F9,0x11D1,0xAA,0xEC,0x00,0x80,0x5F,0xC1,0x27,0x0E); + From 82290bf5a98109e69e0572938d63c326c70ac3ce Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Sat, 30 Aug 2008 08:33:22 +0000 Subject: [PATCH 240/324] - NDK fixes. svn path=/trunk/; revision=35794 --- reactos/include/ndk/mmtypes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/include/ndk/mmtypes.h b/reactos/include/ndk/mmtypes.h index d550184dd4e..924f4fb4f8b 100644 --- a/reactos/include/ndk/mmtypes.h +++ b/reactos/include/ndk/mmtypes.h @@ -389,9 +389,9 @@ typedef struct _SEGMENT // typedef struct _EVENT_COUNTER { + SLIST_ENTRY ListEntry; ULONG RefCount; KEVENT Event; - LIST_ENTRY ListEntry; } EVENT_COUNTER, *PEVENT_COUNTER; // @@ -642,7 +642,7 @@ typedef struct _MMWSLENTRY ULONG Hashed:1; ULONG Direct:1; ULONG Age:2; - ULONG VirtualPageNumber:14; + ULONG VirtualPageNumber:20; } MMWSLENTRY, *PMMWSLENTRY; typedef struct _MMWSLE From 4554d3964d8996ca20fa9e6fc7da492c10fe2a39 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Sat, 30 Aug 2008 10:18:48 +0000 Subject: [PATCH 241/324] Gregor Schneider - Negative position values are allowed, fixes 3 "msvcrt_winetest.exe printf" failures (25 fails left). svn path=/trunk/; revision=35799 --- reactos/lib/sdk/crt/stdlib/fcvtbuf.c | 1 - 1 file changed, 1 deletion(-) diff --git a/reactos/lib/sdk/crt/stdlib/fcvtbuf.c b/reactos/lib/sdk/crt/stdlib/fcvtbuf.c index 9d145be717d..a76b27bc515 100644 --- a/reactos/lib/sdk/crt/stdlib/fcvtbuf.c +++ b/reactos/lib/sdk/crt/stdlib/fcvtbuf.c @@ -48,7 +48,6 @@ static char *cvt(double arg, int ndigits, int *decpt, int *sign, char *buf, int double fi, fj; char *p, *p1; - if (ndigits < 0) ndigits = 0; if (ndigits >= CVTBUFSIZE - 1) ndigits = CVTBUFSIZE - 2; r2 = 0; *sign = 0; From 1423b9dab9e0e03a59d55cc1bdc4eeb4d83d0993 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Sat, 30 Aug 2008 10:50:52 +0000 Subject: [PATCH 242/324] - Add missing KdD0Transition and KdD3Transition prototypes svn path=/trunk/; revision=35800 --- reactos/include/reactos/kddll.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/reactos/include/reactos/kddll.h b/reactos/include/reactos/kddll.h index 6790fee0d5c..85916327adb 100644 --- a/reactos/include/reactos/kddll.h +++ b/reactos/include/reactos/kddll.h @@ -51,4 +51,16 @@ KdSendPacket( IN OUT PKD_CONTEXT Context ); +NTSTATUS +NTAPI +KdD0Transition( + VOID +); + +NTSTATUS +NTAPI +KdD3Transition( + VOID +); + #endif From 8e2e5b6501fa0e8ff17e74e856b12a18e4bfe167 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Sat, 30 Aug 2008 13:01:10 +0000 Subject: [PATCH 243/324] - KEBUGCHECK(0) -> KeBugCheck(FILE_SYSTEM) svn path=/trunk/; revision=35802 --- reactos/ntoskrnl/fsrtl/dbcsname.c | 8 ++++---- reactos/ntoskrnl/fsrtl/fastio.c | 4 ++-- reactos/ntoskrnl/fsrtl/filelock.c | 14 +++++++------- reactos/ntoskrnl/fsrtl/filtrctx.c | 16 ++++++++-------- reactos/ntoskrnl/fsrtl/fsfilter.c | 2 +- reactos/ntoskrnl/fsrtl/largemcb.c | 22 +++++++++++----------- reactos/ntoskrnl/fsrtl/notify.c | 16 ++++++++-------- reactos/ntoskrnl/fsrtl/oplock.c | 12 ++++++------ reactos/ntoskrnl/fsrtl/pnp.c | 2 +- reactos/ntoskrnl/fsrtl/stackovf.c | 2 +- reactos/ntoskrnl/fsrtl/tunnel.c | 10 +++++----- reactos/ntoskrnl/fsrtl/unc.c | 4 ++-- 12 files changed, 56 insertions(+), 56 deletions(-) diff --git a/reactos/ntoskrnl/fsrtl/dbcsname.c b/reactos/ntoskrnl/fsrtl/dbcsname.c index f2535d3c6db..6be74e4c95c 100644 --- a/reactos/ntoskrnl/fsrtl/dbcsname.c +++ b/reactos/ntoskrnl/fsrtl/dbcsname.c @@ -45,7 +45,7 @@ FsRtlDissectDbcs(IN ANSI_STRING Name, OUT PANSI_STRING FirstPart, OUT PANSI_STRING RemainingPart) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); } /*++ @@ -109,7 +109,7 @@ NTAPI FsRtlIsDbcsInExpression(IN PANSI_STRING Expression, IN PANSI_STRING Name) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); return FALSE; } @@ -143,7 +143,7 @@ FsRtlIsFatDbcsLegal(IN ANSI_STRING DbcsName, IN BOOLEAN PathNamePermissible, IN BOOLEAN LeadingBackslashPermissible) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); return FALSE; } @@ -177,6 +177,6 @@ FsRtlIsHpfsDbcsLegal(IN ANSI_STRING DbcsName, IN BOOLEAN PathNamePermissible, IN BOOLEAN LeadingBackslashPermissible) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); return FALSE; } diff --git a/reactos/ntoskrnl/fsrtl/fastio.c b/reactos/ntoskrnl/fsrtl/fastio.c index 99acb807da7..d6490876651 100644 --- a/reactos/ntoskrnl/fsrtl/fastio.c +++ b/reactos/ntoskrnl/fsrtl/fastio.c @@ -1398,7 +1398,7 @@ FsRtlAcquireFileExclusive(IN PFILE_OBJECT FileObject) PAGED_CODE(); FsRtlAcquireFileExclusiveCommon(FileObject,0,0); */ - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); } /* @@ -1409,7 +1409,7 @@ NTAPI FsRtlReleaseFile(IN PFILE_OBJECT FileObject) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); } /*++ diff --git a/reactos/ntoskrnl/fsrtl/filelock.c b/reactos/ntoskrnl/fsrtl/filelock.c index 5491088d99c..8e28eb48859 100644 --- a/reactos/ntoskrnl/fsrtl/filelock.c +++ b/reactos/ntoskrnl/fsrtl/filelock.c @@ -55,7 +55,7 @@ NTAPI FsRtlGetNextFileLock(IN PFILE_LOCK FileLock, IN BOOLEAN Restart) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); return NULL; } @@ -115,7 +115,7 @@ NTAPI FsRtlCheckLockForReadAccess(IN PFILE_LOCK FileLock, IN PIRP Irp) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); return FALSE; } @@ -127,7 +127,7 @@ NTAPI FsRtlCheckLockForWriteAccess(IN PFILE_LOCK FileLock, IN PIRP Irp) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); return FALSE; } @@ -143,7 +143,7 @@ FsRtlFastCheckLockForRead(IN PFILE_LOCK FileLock, IN PFILE_OBJECT FileObject, IN PEPROCESS Process) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); return FALSE; } @@ -159,7 +159,7 @@ FsRtlFastCheckLockForWrite(IN PFILE_LOCK FileLock, IN PFILE_OBJECT FileObject, IN PEPROCESS Process) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); return FALSE; } @@ -192,7 +192,7 @@ FsRtlFastUnlockAll(IN PFILE_LOCK FileLock, IN PEPROCESS Process, IN PVOID Context OPTIONAL) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); return STATUS_UNSUCCESSFUL; } @@ -207,7 +207,7 @@ FsRtlFastUnlockAllByKey(IN PFILE_LOCK FileLock, IN ULONG Key, IN PVOID Context OPTIONAL) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); return STATUS_UNSUCCESSFUL; } diff --git a/reactos/ntoskrnl/fsrtl/filtrctx.c b/reactos/ntoskrnl/fsrtl/filtrctx.c index 7ce96f4fafd..63149bf94e0 100644 --- a/reactos/ntoskrnl/fsrtl/filtrctx.c +++ b/reactos/ntoskrnl/fsrtl/filtrctx.c @@ -32,7 +32,7 @@ LOGICAL NTAPI FsRtlIsPagingFile(IN PFILE_OBJECT FileObject) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); return FALSE; } @@ -45,7 +45,7 @@ FsRtlLookupPerStreamContextInternal(IN PFSRTL_ADVANCED_FCB_HEADER StreamContext, IN PVOID OwnerId OPTIONAL, IN PVOID InstanceId OPTIONAL) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); return FALSE; } @@ -58,7 +58,7 @@ FsRtlLookupPerFileObjectContext(IN PFILE_OBJECT FileObject, IN PVOID OwnerId OPTIONAL, IN PVOID InstanceId OPTIONAL) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); return FALSE; } @@ -70,7 +70,7 @@ NTAPI FsRtlInsertPerStreamContext(IN PFSRTL_ADVANCED_FCB_HEADER PerStreamContext, IN PFSRTL_PER_STREAM_CONTEXT Ptr) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); return STATUS_NOT_IMPLEMENTED; } @@ -83,7 +83,7 @@ FsRtlRemovePerStreamContext(IN PFSRTL_ADVANCED_FCB_HEADER StreamContext, IN PVOID OwnerId OPTIONAL, IN PVOID InstanceId OPTIONAL) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); return NULL; } @@ -95,7 +95,7 @@ NTAPI FsRtlInsertPerFileObjectContext(IN PFILE_OBJECT FileObject, IN PFSRTL_PER_FILEOBJECT_CONTEXT Ptr) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); return STATUS_NOT_IMPLEMENTED; } @@ -108,7 +108,7 @@ FsRtlRemovePerFileObjectContext(IN PFILE_OBJECT PerFileObjectContext, IN PVOID OwnerId OPTIONAL, IN PVOID InstanceId OPTIONAL) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); return NULL; } @@ -119,6 +119,6 @@ VOID NTAPI FsRtlTeardownPerStreamContexts(IN PFSRTL_ADVANCED_FCB_HEADER AdvancedHeader) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); } diff --git a/reactos/ntoskrnl/fsrtl/fsfilter.c b/reactos/ntoskrnl/fsrtl/fsfilter.c index 378c816fa8e..78904e7982b 100644 --- a/reactos/ntoskrnl/fsrtl/fsfilter.c +++ b/reactos/ntoskrnl/fsrtl/fsfilter.c @@ -69,7 +69,7 @@ FsRtlCreateSectionForDataScan(OUT PHANDLE SectionHandle, IN ULONG Flags) { /* Unimplemented */ - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); return STATUS_NOT_IMPLEMENTED; } diff --git a/reactos/ntoskrnl/fsrtl/largemcb.c b/reactos/ntoskrnl/fsrtl/largemcb.c index a63dc90a623..2785f97b6b5 100644 --- a/reactos/ntoskrnl/fsrtl/largemcb.c +++ b/reactos/ntoskrnl/fsrtl/largemcb.c @@ -24,7 +24,7 @@ FsRtlAddLargeMcbEntry(IN PLARGE_MCB Mcb, IN LONGLONG Lbn, IN LONGLONG SectorCount) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); return FALSE; } @@ -57,7 +57,7 @@ FsRtlGetNextLargeMcbEntry(IN PLARGE_MCB Mcb, OUT PLONGLONG Lbn, OUT PLONGLONG SectorCount) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); *Vbn = 0; *Lbn = 0; *SectorCount= 0; @@ -105,7 +105,7 @@ NTAPI FsRtlInitializeLargeMcb(IN PLARGE_MCB Mcb, IN POOL_TYPE PoolType) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); } /* @@ -134,7 +134,7 @@ FsRtlLookupLargeMcbEntry(IN PLARGE_MCB Mcb, OUT PLONGLONG SectorCountFromStartingLbn OPTIONAL, OUT PULONG Index OPTIONAL) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); *Lbn = 0; *SectorCountFromLbn = 0; return FALSE; @@ -150,7 +150,7 @@ FsRtlLookupLastLargeMcbEntryAndIndex(IN PLARGE_MCB OpaqueMcb, OUT PLONGLONG LargeLbn, OUT PULONG Index) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); *LargeVbn = 0; *LargeLbn = 0; *Index = 0; @@ -166,7 +166,7 @@ FsRtlLookupLastLargeMcbEntry(IN PLARGE_MCB Mcb, OUT PLONGLONG Vbn, OUT PLONGLONG Lbn) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); return(FALSE); } @@ -269,7 +269,7 @@ FsRtlRemoveLargeMcbEntry(IN PLARGE_MCB Mcb, IN LONGLONG Vbn, IN LONGLONG SectorCount) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); } /* @@ -295,7 +295,7 @@ NTAPI FsRtlResetLargeMcb(IN PLARGE_MCB Mcb, IN BOOLEAN SelfSynchronized) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); } /* @@ -307,7 +307,7 @@ FsRtlSplitLargeMcb(IN PLARGE_MCB Mcb, IN LONGLONG Vbn, IN LONGLONG Amount) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); return FALSE; } @@ -319,7 +319,7 @@ NTAPI FsRtlTruncateLargeMcb(IN PLARGE_MCB Mcb, IN LONGLONG Vbn) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); } /* @@ -342,7 +342,7 @@ VOID NTAPI FsRtlUninitializeLargeMcb(IN PLARGE_MCB Mcb) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); } /* diff --git a/reactos/ntoskrnl/fsrtl/notify.c b/reactos/ntoskrnl/fsrtl/notify.c index fae90245469..bd2cf09f0ca 100644 --- a/reactos/ntoskrnl/fsrtl/notify.c +++ b/reactos/ntoskrnl/fsrtl/notify.c @@ -96,7 +96,7 @@ FsRtlNotifyCleanup(IN PNOTIFY_SYNC NotifySync, IN PLIST_ENTRY NotifyList, IN PVOID FsContext) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); } /*++ @@ -157,7 +157,7 @@ FsRtlNotifyFilterChangeDirectory(IN PNOTIFY_SYNC NotifySync, IN PSECURITY_SUBJECT_CONTEXT SubjectContext OPTIONAL, IN PFILTER_REPORT_CHANGE FilterCallback OPTIONAL) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); } /*++ @@ -214,7 +214,7 @@ FsRtlNotifyFilterReportChange(IN PNOTIFY_SYNC NotifySync, IN PVOID TargetContext, IN PVOID FilterContext) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); } /*++ @@ -271,7 +271,7 @@ FsRtlNotifyFullChangeDirectory(IN PNOTIFY_SYNC NotifySync, IN PCHECK_FOR_TRAVERSE_ACCESS TraverseCallback OPTIONAL, IN PSECURITY_SUBJECT_CONTEXT SubjectContext OPTIONAL) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); } /*++ @@ -324,7 +324,7 @@ FsRtlNotifyFullReportChange(IN PNOTIFY_SYNC NotifySync, IN ULONG Action, IN PVOID TargetContext) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); } /*++ @@ -345,7 +345,7 @@ VOID NTAPI FsRtlNotifyInitializeSync(IN PNOTIFY_SYNC *NotifySync) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); } /*++ @@ -382,7 +382,7 @@ FsRtlNotifyReportChange(IN PNOTIFY_SYNC NotifySync, IN PUSHORT FileNamePartLength, IN ULONG FilterMatch) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); } /*++ @@ -404,6 +404,6 @@ VOID NTAPI FsRtlNotifyUninitializeSync(IN PNOTIFY_SYNC *NotifySync) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); } diff --git a/reactos/ntoskrnl/fsrtl/oplock.c b/reactos/ntoskrnl/fsrtl/oplock.c index d92643ed418..c02521d397d 100644 --- a/reactos/ntoskrnl/fsrtl/oplock.c +++ b/reactos/ntoskrnl/fsrtl/oplock.c @@ -49,7 +49,7 @@ FsRtlCheckOplock(IN POPLOCK Oplock, IN POPLOCK_FS_PREPOST_IRP PostIrpRoutine OPTIONAL) { /* Unimplemented */ - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); return STATUS_NOT_IMPLEMENTED; } @@ -72,7 +72,7 @@ NTAPI FsRtlCurrentBatchOplock(IN POPLOCK Oplock) { /* Unimplemented */ - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); return FALSE; } @@ -95,7 +95,7 @@ NTAPI FsRtlInitializeOplock(IN OUT POPLOCK Oplock) { /* Unimplemented */ - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); } /*++ @@ -125,7 +125,7 @@ FsRtlOplockFsctrl(IN POPLOCK Oplock, IN ULONG OpenCount) { /* Unimplemented */ - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); return STATUS_NOT_IMPLEMENTED; } @@ -148,7 +148,7 @@ NTAPI FsRtlOplockIsFastIoPossible(IN POPLOCK Oplock) { /* Unimplemented */ - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); return FALSE; } @@ -171,6 +171,6 @@ NTAPI FsRtlUninitializeOplock(IN POPLOCK Oplock) { /* Unimplemented */ - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); } diff --git a/reactos/ntoskrnl/fsrtl/pnp.c b/reactos/ntoskrnl/fsrtl/pnp.c index f0b23f310ca..f3ce085a764 100644 --- a/reactos/ntoskrnl/fsrtl/pnp.c +++ b/reactos/ntoskrnl/fsrtl/pnp.c @@ -37,6 +37,6 @@ FsRtlNotifyVolumeEvent(IN PFILE_OBJECT FileObject, IN ULONG EventCode) { /* Unimplemented */ - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); return STATUS_NOT_IMPLEMENTED; } diff --git a/reactos/ntoskrnl/fsrtl/stackovf.c b/reactos/ntoskrnl/fsrtl/stackovf.c index af6cd579c3a..776cb4b23e7 100644 --- a/reactos/ntoskrnl/fsrtl/stackovf.c +++ b/reactos/ntoskrnl/fsrtl/stackovf.c @@ -63,7 +63,7 @@ FsRtlPostStackOverflow(IN PVOID Context, IN PKEVENT Event, IN PFSRTL_STACK_OVERFLOW_ROUTINE StackOverflowRoutine) { - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); } /* EOF */ diff --git a/reactos/ntoskrnl/fsrtl/tunnel.c b/reactos/ntoskrnl/fsrtl/tunnel.c index 6347126994e..9ede1ec5693 100644 --- a/reactos/ntoskrnl/fsrtl/tunnel.c +++ b/reactos/ntoskrnl/fsrtl/tunnel.c @@ -57,7 +57,7 @@ FsRtlAddToTunnelCache(IN PTUNNEL Cache, IN PVOID Data) { /* Unimplemented */ - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); } /*++ @@ -83,7 +83,7 @@ FsRtlDeleteKeyFromTunnelCache(IN PTUNNEL Cache, IN ULONGLONG DirectoryKey) { /* Unimplemented */ - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); } /*++ @@ -105,7 +105,7 @@ NTAPI FsRtlDeleteTunnelCache(IN PTUNNEL Cache) { /* Unimplemented */ - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); } /*++ @@ -151,7 +151,7 @@ FsRtlFindInTunnelCache(IN PTUNNEL Cache, OUT PVOID Data) { /* Unimplemented */ - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); return FALSE; } @@ -174,7 +174,7 @@ NTAPI FsRtlInitializeTunnelCache(IN PTUNNEL Cache) { /* Unimplemented */ - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); } /* EOF */ diff --git a/reactos/ntoskrnl/fsrtl/unc.c b/reactos/ntoskrnl/fsrtl/unc.c index 8738a97ee1c..e0fe5081e09 100644 --- a/reactos/ntoskrnl/fsrtl/unc.c +++ b/reactos/ntoskrnl/fsrtl/unc.c @@ -33,7 +33,7 @@ NTAPI FsRtlDeregisterUncProvider(IN HANDLE Handle) { /* Unimplemented */ - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); } /*++ @@ -62,6 +62,6 @@ FsRtlRegisterUncProvider(IN OUT PHANDLE Handle, IN BOOLEAN MailslotsSupported) { /* Unimplemented */ - KEBUGCHECK(0); + KeBugCheck(FILE_SYSTEM); return STATUS_NOT_IMPLEMENTED; } From 5ae7cefa816a7435541ff4fa84111d3a675a1e95 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Sat, 30 Aug 2008 15:14:12 +0000 Subject: [PATCH 244/324] - Get rid of ASSERT_IRQL, deprecated since long ago - Remove various dead stuff from headers, and move ASSERT_IRQL_LESS_OR_EQUAL, ASSERT_IRQL_EQUAL and ASSERT_IRQL_LESS to global debug.h svn path=/trunk/; revision=35803 --- reactos/drivers/video/videoprt/ddc.c | 2 +- reactos/drivers/video/videoprt/videoprt.c | 2 +- reactos/hal/halppc/generic/dma.c | 2 +- reactos/hal/halx86/generic/dma.c | 2 +- reactos/include/reactos/debug.h | 25 +++---------------- reactos/include/reactos/helper.h | 9 ------- reactos/ntoskrnl/ex/fmutex.c | 2 +- reactos/ntoskrnl/include/internal/debug.h | 16 ------------ reactos/ntoskrnl/mm/pool.c | 2 +- reactos/ntoskrnl/mm/ppool.c | 4 +-- reactos/ntoskrnl/po/power.c | 2 +- .../subsystems/win32/win32k/eng/engwindow.c | 2 +- .../subsystems/win32/win32k/eng/semaphor.c | 2 +- 13 files changed, 14 insertions(+), 58 deletions(-) diff --git a/reactos/drivers/video/videoprt/ddc.c b/reactos/drivers/video/videoprt/ddc.c index 0b51f35b6f6..a29f639ddd6 100644 --- a/reactos/drivers/video/videoprt/ddc.c +++ b/reactos/drivers/video/videoprt/ddc.c @@ -183,7 +183,7 @@ VideoPortDDCMonitorHelper( TRACE_(VIDEOPRT, "VideoPortDDCMonitorHelper()\n"); - ASSERT_IRQL(PASSIVE_LEVEL); + ASSERT_IRQL_LESS_OR_EQUAL(PASSIVE_LEVEL); if (ddc->Size != sizeof (ddc)) { WARN_(VIDEOPRT, "ddc->Size != %d (%d)\n", sizeof (ddc), ddc->Size); diff --git a/reactos/drivers/video/videoprt/videoprt.c b/reactos/drivers/video/videoprt/videoprt.c index e21a044cfec..636b7120f5a 100644 --- a/reactos/drivers/video/videoprt/videoprt.c +++ b/reactos/drivers/video/videoprt/videoprt.c @@ -875,7 +875,7 @@ VideoPortSetRegistryParameters( TRACE_(VIDEOPRT, "VideoPortSetRegistryParameters ParameterName %S, RegPath: %wZ\n", ValueName, &VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension)->RegistryPath); - ASSERT_IRQL(PASSIVE_LEVEL); + ASSERT_IRQL_LESS_OR_EQUAL(PASSIVE_LEVEL); Status = RtlWriteRegistryValue( RTL_REGISTRY_ABSOLUTE, VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension)->RegistryPath.Buffer, diff --git a/reactos/hal/halppc/generic/dma.c b/reactos/hal/halppc/generic/dma.c index 57b6dfe80c6..a3bf04aaaf4 100644 --- a/reactos/hal/halppc/generic/dma.c +++ b/reactos/hal/halppc/generic/dma.c @@ -1569,7 +1569,7 @@ IoFlushAdapterBuffers( PHYSICAL_ADDRESS PhysicalAddress; PPFN_NUMBER MdlPagesPtr; - ASSERT_IRQL(DISPATCH_LEVEL); + ASSERT_IRQL_LESS_OR_EQUAL(DISPATCH_LEVEL); if (AdapterObject != NULL && !AdapterObject->MasterDevice) { diff --git a/reactos/hal/halx86/generic/dma.c b/reactos/hal/halx86/generic/dma.c index d55a56b5a6f..efd53f430d6 100644 --- a/reactos/hal/halx86/generic/dma.c +++ b/reactos/hal/halx86/generic/dma.c @@ -1569,7 +1569,7 @@ IoFlushAdapterBuffers( PHYSICAL_ADDRESS PhysicalAddress; PPFN_NUMBER MdlPagesPtr; - ASSERT_IRQL(DISPATCH_LEVEL); + ASSERT_IRQL_LESS_OR_EQUAL(DISPATCH_LEVEL); if (AdapterObject != NULL && !AdapterObject->MasterDevice) { diff --git a/reactos/include/reactos/debug.h b/reactos/include/reactos/debug.h index 47d12eda3b0..10d36fa0f20 100644 --- a/reactos/include/reactos/debug.h +++ b/reactos/include/reactos/debug.h @@ -16,11 +16,6 @@ #ifndef __INTERNAL_DEBUG #define __INTERNAL_DEBUG -/* FIXME: should probably remove this later */ -#if !defined(CHECKED) && !defined(NDEBUG) -#define CHECKED -#endif - /* Define DbgPrint/DbgPrintEx/RtlAssert unless the NDK is used */ #if !defined(_RTLFUNCS_H) && (!defined(_NTDDK_) || !defined(__NTDDK_H)) @@ -87,13 +82,11 @@ RtlAssert( /* These are always printed */ #define DPRINT1 DbgPrint("(%s:%d) ",__FILE__,__LINE__), DbgPrint - #define CHECKPOINT1 do { DbgPrint("%s:%d\n",__FILE__,__LINE__); } while(0); /* These are printed only if NDEBUG is NOT defined */ #ifndef NDEBUG #define DPRINT DbgPrint("(%s:%d) ",__FILE__,__LINE__), DbgPrint - #define CHECKPOINT do { DbgPrint("%s:%d\n",__FILE__,__LINE__); } while(0); #else #ifdef _MSC_VER @@ -104,7 +97,6 @@ RtlAssert( #else #define DPRINT(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0) #endif - #define CHECKPOINT #endif #define UNIMPLEMENTED DbgPrint("WARNING: %s at %s:%d is UNIMPLEMENTED!\n",__FUNCTION__,__FILE__,__LINE__); @@ -122,8 +114,6 @@ RtlAssert( #define DPRINT1(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0) #define DPRINT(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0) - #define CHECKPOINT1 - #define CHECKPOINT #define UNIMPLEMENTED #define ERR_(ch, ...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0) @@ -132,17 +122,8 @@ RtlAssert( #define INFO_(ch, ...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0) #endif -/* - * FUNCTION: Assert a maximum value for the current irql - * ARGUMENTS: - * x = Maximum irql - */ -#define ASSERT_IRQL(x) assert(KeGetCurrentIrql()<=(x)) -#define assert_irql(x) assert(KeGetCurrentIrql()<=(x)) - -#ifndef KEBUGCHECK -#define KEBUGCHECK(a) DbgPrint("KeBugCheck (0x%X) at %s:%i\n", a, __FILE__,__LINE__), KeBugCheck(a) -#define KEBUGCHECKEX(a,b,c,d,e) DbgPrint("KeBugCheckEx (0x%X, 0x%X, 0x%X, 0x%X, 0x%X) at %s:%i\n", a, b, c, d, e, __FILE__,__LINE__), KeBugCheckEx(a,b,c,d,e) -#endif +#define ASSERT_IRQL_LESS_OR_EQUAL(x) ASSERT(KeGetCurrentIrql()<=(x)) +#define ASSERT_IRQL_EQUAL(x) ASSERT(KeGetCurrentIrql()==(x)) +#define ASSERT_IRQL_LESS(x) ASSERT(KeGetCurrentIrql()<(x)) #endif /* __INTERNAL_DEBUG */ diff --git a/reactos/include/reactos/helper.h b/reactos/include/reactos/helper.h index f3fdd7f9be4..1bb7a52cfe4 100644 --- a/reactos/include/reactos/helper.h +++ b/reactos/include/reactos/helper.h @@ -27,15 +27,6 @@ #define PAGE_ROUND_UP(x) ( (((ULONG_PTR)(x)) + PAGE_SIZE-1) & (~(PAGE_SIZE-1)) ) #endif -#define ABS_VALUE(V) (((V) < 0) ? -(V) : (V)) - -#define RtlRosMin3(X,Y,Z) (((X) < (Y)) ? RtlRosMin(X,Z) : RtlRosMin(Y,Z)) - -#ifndef KEBUGCHECK -#define KEBUGCHECKEX(a,b,c,d,e) DbgPrint("KeBugCheckEx at %s:%i\n",__FILE__,__LINE__), KeBugCheckEx(a,b,c,d,e) -#define KEBUGCHECK(a) DbgPrint("KeBugCheck at %s:%i\n",__FILE__,__LINE__), KeBugCheck(a) -#endif - /* iterate through the list using a list entry. * elem is set to NULL if the list is run thru without breaking out or if list is empty. */ diff --git a/reactos/ntoskrnl/ex/fmutex.c b/reactos/ntoskrnl/ex/fmutex.c index 4b22f8b9e01..e84e1cc613a 100644 --- a/reactos/ntoskrnl/ex/fmutex.c +++ b/reactos/ntoskrnl/ex/fmutex.c @@ -131,7 +131,7 @@ FASTCALL ExReleaseFastMutex(IN OUT PFAST_MUTEX FastMutex) { KIRQL OldIrql; - ASSERT_IRQL(APC_LEVEL); + ASSERT_IRQL_LESS_OR_EQUAL(APC_LEVEL); /* Erase the owner */ FastMutex->Owner = NULL; diff --git a/reactos/ntoskrnl/include/internal/debug.h b/reactos/ntoskrnl/include/internal/debug.h index a45e5ca8af4..0d10b91f9a6 100644 --- a/reactos/ntoskrnl/include/internal/debug.h +++ b/reactos/ntoskrnl/include/internal/debug.h @@ -15,27 +15,11 @@ * Define NASSERT before including this header to disable assertions */ -#include #ifndef __NTOSKRNL_DEBUG #define __NTOSKRNL_DEBUG #include -#if defined(_MSC_VER) && (_MSC_VER < 1300) -/* TODO: Verify which version the MS compiler learned the __FUNCTION__ macro */ -#define __FUNCTION__ "" -#endif - -#define CPRINT DPRINT1 - -/* - * FUNCTION: Assert a maximum value for the current irql - * ARGUMENTS: - * x = Maximum irql - */ -#define ASSERT_IRQL_LESS_OR_EQUAL(x) ASSERT(KeGetCurrentIrql()<=(x)) -#define ASSERT_IRQL_EQUAL(x) ASSERT(KeGetCurrentIrql()==(x)) -#define ASSERT_IRQL_LESS(x) ASSERT(KeGetCurrentIrql()<(x)) #endif /* __NTOSKRNL_DEBUG */ diff --git a/reactos/ntoskrnl/mm/pool.c b/reactos/ntoskrnl/mm/pool.c index 6febb0adc3f..a1582ba559f 100644 --- a/reactos/ntoskrnl/mm/pool.c +++ b/reactos/ntoskrnl/mm/pool.c @@ -225,7 +225,7 @@ ExAllocatePoolWithQuotaTag (IN POOL_TYPE PoolType, VOID STDCALL ExFreePool(IN PVOID Block) { - ASSERT_IRQL(DISPATCH_LEVEL); + ASSERT_IRQL_LESS_OR_EQUAL(DISPATCH_LEVEL); if (Block >= MmPagedPoolBase && (char*)Block < ((char*)MmPagedPoolBase + MmPagedPoolSize)) { diff --git a/reactos/ntoskrnl/mm/ppool.c b/reactos/ntoskrnl/mm/ppool.c index b2cc217fcf7..2e7993e38a3 100644 --- a/reactos/ntoskrnl/mm/ppool.c +++ b/reactos/ntoskrnl/mm/ppool.c @@ -91,7 +91,7 @@ ExAllocatePagedPoolWithTag (IN POOL_TYPE PoolType, else align = 0; - ASSERT_IRQL(APC_LEVEL); + ASSERT_IRQL_LESS_OR_EQUAL(APC_LEVEL); return RPoolAlloc ( MmPagedPool, NumberOfBytes, Tag, align ); } @@ -99,7 +99,7 @@ ExAllocatePagedPoolWithTag (IN POOL_TYPE PoolType, VOID STDCALL ExFreePagedPool(IN PVOID Block) { - ASSERT_IRQL(APC_LEVEL); + ASSERT_IRQL_LESS_OR_EQUAL(APC_LEVEL); RPoolFree ( MmPagedPool, Block ); } diff --git a/reactos/ntoskrnl/po/power.c b/reactos/ntoskrnl/po/power.c index 6dd7d636c1f..f0b6ae4e188 100644 --- a/reactos/ntoskrnl/po/power.c +++ b/reactos/ntoskrnl/po/power.c @@ -349,7 +349,7 @@ PoSetPowerState(IN PDEVICE_OBJECT DeviceObject, { POWER_STATE ps; - ASSERT_IRQL(DISPATCH_LEVEL); + ASSERT_IRQL_LESS_OR_EQUAL(DISPATCH_LEVEL); ps.SystemState = PowerSystemWorking; // Fully on ps.DeviceState = PowerDeviceD0; // Fully on diff --git a/reactos/subsystems/win32/win32k/eng/engwindow.c b/reactos/subsystems/win32/win32k/eng/engwindow.c index a3f505468f9..ffae58cc2bc 100644 --- a/reactos/subsystems/win32/win32k/eng/engwindow.c +++ b/reactos/subsystems/win32/win32k/eng/engwindow.c @@ -153,7 +153,7 @@ IntEngWindowChanged( PLIST_ENTRY CurrentEntry; WNDGDI *Current; - ASSERT_IRQL(PASSIVE_LEVEL); + ASSERT_IRQL_LESS_OR_EQUAL(PASSIVE_LEVEL); CurrentEntry = Window->WndObjListHead.Flink; while (CurrentEntry != &Window->WndObjListHead) diff --git a/reactos/subsystems/win32/win32k/eng/semaphor.c b/reactos/subsystems/win32/win32k/eng/semaphor.c index 0cb96b75792..50d20841cd1 100644 --- a/reactos/subsystems/win32/win32k/eng/semaphor.c +++ b/reactos/subsystems/win32/win32k/eng/semaphor.c @@ -134,7 +134,7 @@ EngInitializeSafeSemaphore( { /* Wait for the other thread to create the semaphore */ ASSERT(Semaphore->lCount > 1); - ASSERT_IRQL(PASSIVE_LEVEL); + ASSERT_IRQL_LESS_OR_EQUAL(PASSIVE_LEVEL); while (Semaphore->hsem == NULL); } From 12f349df1d414a2a9872b2538ad9c3b5ee0f4101 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Sat, 30 Aug 2008 16:31:06 +0000 Subject: [PATCH 245/324] - Remove the (now deprecated) ntoskrnl/internal/debug.h header and fix all its includers to use the global debug.h svn path=/trunk/; revision=35806 --- reactos/ntoskrnl/cc/cacheman.c | 2 +- reactos/ntoskrnl/cc/copy.c | 2 +- reactos/ntoskrnl/cc/fs.c | 2 +- reactos/ntoskrnl/cc/mdl.c | 2 +- reactos/ntoskrnl/cc/pin.c | 2 +- reactos/ntoskrnl/cc/view.c | 2 +- reactos/ntoskrnl/dbgk/dbgkobj.c | 2 +- reactos/ntoskrnl/ex/atom.c | 2 +- reactos/ntoskrnl/ex/callback.c | 2 +- reactos/ntoskrnl/ex/dbgctrl.c | 2 +- reactos/ntoskrnl/ex/efi.c | 2 +- reactos/ntoskrnl/ex/event.c | 2 +- reactos/ntoskrnl/ex/evtpair.c | 2 +- reactos/ntoskrnl/ex/harderr.c | 2 +- reactos/ntoskrnl/ex/locale.c | 2 +- reactos/ntoskrnl/ex/mutant.c | 2 +- reactos/ntoskrnl/ex/profile.c | 2 +- reactos/ntoskrnl/ex/rundown.c | 2 +- reactos/ntoskrnl/ex/sem.c | 2 +- reactos/ntoskrnl/ex/shutdown.c | 2 +- reactos/ntoskrnl/ex/sysinfo.c | 2 +- reactos/ntoskrnl/ex/time.c | 2 +- reactos/ntoskrnl/ex/uuid.c | 2 +- reactos/ntoskrnl/ex/win32k.c | 2 +- reactos/ntoskrnl/ex/work.c | 2 +- reactos/ntoskrnl/fstub/disksup.c | 2 +- reactos/ntoskrnl/fstub/fstubex.c | 2 +- reactos/ntoskrnl/fstub/halstub.c | 2 +- reactos/ntoskrnl/include/internal/debug.h | 25 ------------------- reactos/ntoskrnl/io/iomgr/adapter.c | 2 +- reactos/ntoskrnl/io/iomgr/bootlog.c | 2 +- reactos/ntoskrnl/io/iomgr/controller.c | 2 +- reactos/ntoskrnl/io/iomgr/device.c | 2 +- reactos/ntoskrnl/io/iomgr/deviface.c | 2 +- reactos/ntoskrnl/io/iomgr/driver.c | 2 +- reactos/ntoskrnl/io/iomgr/drvrlist.c | 2 +- reactos/ntoskrnl/io/iomgr/error.c | 2 +- reactos/ntoskrnl/io/iomgr/iocomp.c | 2 +- reactos/ntoskrnl/io/iomgr/ioevent.c | 2 +- reactos/ntoskrnl/io/iomgr/iomdl.c | 2 +- reactos/ntoskrnl/io/iomgr/iomgr.c | 2 +- reactos/ntoskrnl/io/iomgr/iorsrce.c | 2 +- reactos/ntoskrnl/io/iomgr/iotimer.c | 2 +- reactos/ntoskrnl/io/iomgr/iowork.c | 2 +- reactos/ntoskrnl/io/iomgr/irp.c | 2 +- reactos/ntoskrnl/io/iomgr/irq.c | 2 +- reactos/ntoskrnl/io/iomgr/remlock.c | 2 +- reactos/ntoskrnl/io/iomgr/symlink.c | 2 +- reactos/ntoskrnl/io/iomgr/util.c | 2 +- reactos/ntoskrnl/io/iomgr/volume.c | 2 +- reactos/ntoskrnl/io/pnpmgr/plugplay.c | 2 +- reactos/ntoskrnl/io/pnpmgr/pnpdma.c | 2 +- reactos/ntoskrnl/io/pnpmgr/pnpmgr.c | 2 +- reactos/ntoskrnl/io/pnpmgr/pnproot.c | 2 +- reactos/ntoskrnl/kd/i386/kdmemsup.c | 2 +- reactos/ntoskrnl/kd/kdinit.c | 2 +- reactos/ntoskrnl/kd/kdio.c | 2 +- reactos/ntoskrnl/kd/kdmain.c | 2 +- reactos/ntoskrnl/kd/wrappers/bochs.c | 2 +- reactos/ntoskrnl/kd/wrappers/gdbstub.c | 2 +- .../ntoskrnl/kd/wrappers/gdbstub_powerpc.c | 2 +- reactos/ntoskrnl/kd/wrappers/kdbg.c | 2 +- reactos/ntoskrnl/kdbg/kdb.c | 2 +- reactos/ntoskrnl/kdbg/kdb_cli.c | 2 +- reactos/ntoskrnl/kdbg/kdb_expr.c | 2 +- reactos/ntoskrnl/kdbg/kdb_symbols.c | 2 +- reactos/ntoskrnl/ke/apc.c | 2 +- reactos/ntoskrnl/ke/bug.c | 2 +- reactos/ntoskrnl/ke/config.c | 2 +- reactos/ntoskrnl/ke/devqueue.c | 2 +- reactos/ntoskrnl/ke/eventobj.c | 2 +- reactos/ntoskrnl/ke/except.c | 2 +- reactos/ntoskrnl/ke/gate.c | 2 +- reactos/ntoskrnl/ke/gmutex.c | 2 +- reactos/ntoskrnl/ke/i386/ldt.c | 2 +- reactos/ntoskrnl/ke/i386/usercall.c | 2 +- reactos/ntoskrnl/ke/ipi.c | 2 +- reactos/ntoskrnl/ke/mutex.c | 2 +- reactos/ntoskrnl/ke/powerpc/ppc_irq.c | 2 +- reactos/ntoskrnl/ke/procobj.c | 2 +- reactos/ntoskrnl/ke/profobj.c | 2 +- reactos/ntoskrnl/ke/queue.c | 2 +- reactos/ntoskrnl/ke/semphobj.c | 2 +- reactos/ntoskrnl/ke/spinlock.c | 2 +- reactos/ntoskrnl/ke/thrdobj.c | 2 +- reactos/ntoskrnl/mm/anonmem.c | 2 +- reactos/ntoskrnl/mm/balance.c | 2 +- reactos/ntoskrnl/mm/cont.c | 2 +- reactos/ntoskrnl/mm/drvlck.c | 2 +- reactos/ntoskrnl/mm/elf.inc.h | 2 +- reactos/ntoskrnl/mm/freelist.c | 2 +- reactos/ntoskrnl/mm/i386/page.c | 2 +- reactos/ntoskrnl/mm/i386/pagepae.c | 2 +- reactos/ntoskrnl/mm/iospace.c | 2 +- reactos/ntoskrnl/mm/kmap.c | 2 +- reactos/ntoskrnl/mm/marea.c | 2 +- reactos/ntoskrnl/mm/mdlsup.c | 2 +- reactos/ntoskrnl/mm/mm.c | 2 +- reactos/ntoskrnl/mm/mminit.c | 2 +- reactos/ntoskrnl/mm/mpw.c | 2 +- reactos/ntoskrnl/mm/ncache.c | 2 +- reactos/ntoskrnl/mm/npool.c | 2 +- reactos/ntoskrnl/mm/pagefile.c | 2 +- reactos/ntoskrnl/mm/pageop.c | 2 +- reactos/ntoskrnl/mm/pe.c | 2 +- reactos/ntoskrnl/mm/pool.c | 2 +- reactos/ntoskrnl/mm/powerpc/page.c | 2 +- reactos/ntoskrnl/mm/powerpc/pfault.c | 2 +- reactos/ntoskrnl/mm/ppool.c | 2 +- reactos/ntoskrnl/mm/procsup.c | 2 +- reactos/ntoskrnl/mm/region.c | 2 +- reactos/ntoskrnl/mm/rmap.c | 2 +- reactos/ntoskrnl/mm/section.c | 2 +- reactos/ntoskrnl/mm/verifier.c | 2 +- reactos/ntoskrnl/mm/wset.c | 2 +- reactos/ntoskrnl/ob/oblife.c | 2 +- reactos/ntoskrnl/ob/oblink.c | 2 +- reactos/ntoskrnl/ob/obwait.c | 2 +- reactos/ntoskrnl/po/events.c | 2 +- reactos/ntoskrnl/po/power.c | 2 +- reactos/ntoskrnl/ps/job.c | 2 +- reactos/ntoskrnl/ps/kill.c | 2 +- reactos/ntoskrnl/ps/process.c | 2 +- reactos/ntoskrnl/ps/psmgr.c | 2 +- reactos/ntoskrnl/ps/query.c | 2 +- reactos/ntoskrnl/ps/quota.c | 2 +- reactos/ntoskrnl/ps/security.c | 2 +- reactos/ntoskrnl/ps/state.c | 2 +- reactos/ntoskrnl/ps/thread.c | 2 +- reactos/ntoskrnl/ps/win32.c | 2 +- reactos/ntoskrnl/rtl/libsupp.c | 2 +- reactos/ntoskrnl/rtl/misc.c | 2 +- reactos/ntoskrnl/wmi/wmi.c | 2 +- 133 files changed, 132 insertions(+), 157 deletions(-) delete mode 100644 reactos/ntoskrnl/include/internal/debug.h diff --git a/reactos/ntoskrnl/cc/cacheman.c b/reactos/ntoskrnl/cc/cacheman.c index 9921b4b786e..87c0ab5cb1a 100644 --- a/reactos/ntoskrnl/cc/cacheman.c +++ b/reactos/ntoskrnl/cc/cacheman.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include PFSN_PREFETCHER_GLOBALS CcPfGlobals; diff --git a/reactos/ntoskrnl/cc/copy.c b/reactos/ntoskrnl/cc/copy.c index 8397d912951..37bdd8a1b9b 100644 --- a/reactos/ntoskrnl/cc/copy.c +++ b/reactos/ntoskrnl/cc/copy.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include /* GLOBALS *******************************************************************/ diff --git a/reactos/ntoskrnl/cc/fs.c b/reactos/ntoskrnl/cc/fs.c index e6fa791a7f5..2a06df76159 100644 --- a/reactos/ntoskrnl/cc/fs.c +++ b/reactos/ntoskrnl/cc/fs.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include #ifndef VACB_MAPPING_GRANULARITY #define VACB_MAPPING_GRANULARITY (256 * 1024) diff --git a/reactos/ntoskrnl/cc/mdl.c b/reactos/ntoskrnl/cc/mdl.c index 5dde9884825..f334f38ad94 100644 --- a/reactos/ntoskrnl/cc/mdl.c +++ b/reactos/ntoskrnl/cc/mdl.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include /* FUNCTIONS *****************************************************************/ diff --git a/reactos/ntoskrnl/cc/pin.c b/reactos/ntoskrnl/cc/pin.c index 1645883181d..2afde1e358c 100644 --- a/reactos/ntoskrnl/cc/pin.c +++ b/reactos/ntoskrnl/cc/pin.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include /* GLOBALS *******************************************************************/ diff --git a/reactos/ntoskrnl/cc/view.c b/reactos/ntoskrnl/cc/view.c index 982c85add3d..8edec604722 100644 --- a/reactos/ntoskrnl/cc/view.c +++ b/reactos/ntoskrnl/cc/view.c @@ -33,7 +33,7 @@ #include #define NDEBUG -#include +#include #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, CcInitView) diff --git a/reactos/ntoskrnl/dbgk/dbgkobj.c b/reactos/ntoskrnl/dbgk/dbgkobj.c index bc8c0c4c96b..8a558d6dd52 100644 --- a/reactos/ntoskrnl/dbgk/dbgkobj.c +++ b/reactos/ntoskrnl/dbgk/dbgkobj.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include POBJECT_TYPE DbgkDebugObjectType; FAST_MUTEX DbgkpProcessDebugPortMutex; diff --git a/reactos/ntoskrnl/ex/atom.c b/reactos/ntoskrnl/ex/atom.c index 27f605fda58..de2c030c492 100644 --- a/reactos/ntoskrnl/ex/atom.c +++ b/reactos/ntoskrnl/ex/atom.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include #define TAG_ATOM TAG('A', 't', 'o', 'm') diff --git a/reactos/ntoskrnl/ex/callback.c b/reactos/ntoskrnl/ex/callback.c index 429b0953719..f8705f2bfa2 100644 --- a/reactos/ntoskrnl/ex/callback.c +++ b/reactos/ntoskrnl/ex/callback.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include /* TYPES *********************************************************************/ diff --git a/reactos/ntoskrnl/ex/dbgctrl.c b/reactos/ntoskrnl/ex/dbgctrl.c index 78c02cd1867..34badf7a868 100644 --- a/reactos/ntoskrnl/ex/dbgctrl.c +++ b/reactos/ntoskrnl/ex/dbgctrl.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include /* FUNCTIONS *****************************************************************/ diff --git a/reactos/ntoskrnl/ex/efi.c b/reactos/ntoskrnl/ex/efi.c index 38c6c01ab43..b13fe15ce2d 100644 --- a/reactos/ntoskrnl/ex/efi.c +++ b/reactos/ntoskrnl/ex/efi.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include /* FUNCTIONS *****************************************************************/ diff --git a/reactos/ntoskrnl/ex/event.c b/reactos/ntoskrnl/ex/event.c index c8998b596f6..890ccd46830 100644 --- a/reactos/ntoskrnl/ex/event.c +++ b/reactos/ntoskrnl/ex/event.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, ExpInitializeEventImplementation) diff --git a/reactos/ntoskrnl/ex/evtpair.c b/reactos/ntoskrnl/ex/evtpair.c index b7dab929c56..65a7dddc109 100644 --- a/reactos/ntoskrnl/ex/evtpair.c +++ b/reactos/ntoskrnl/ex/evtpair.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, ExpInitializeEventPairImplementation) diff --git a/reactos/ntoskrnl/ex/harderr.c b/reactos/ntoskrnl/ex/harderr.c index 722cc0ba758..74a5fdeaffc 100644 --- a/reactos/ntoskrnl/ex/harderr.c +++ b/reactos/ntoskrnl/ex/harderr.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include #define TAG_ERR TAG('E', 'r', 'r', ' ') diff --git a/reactos/ntoskrnl/ex/locale.c b/reactos/ntoskrnl/ex/locale.c index bf1bf5047de..daecdb08440 100644 --- a/reactos/ntoskrnl/ex/locale.c +++ b/reactos/ntoskrnl/ex/locale.c @@ -12,7 +12,7 @@ #include #define NDEBUG -#include +#include /* GLOBALS *******************************************************************/ diff --git a/reactos/ntoskrnl/ex/mutant.c b/reactos/ntoskrnl/ex/mutant.c index 13fc099cab6..87c5485b030 100644 --- a/reactos/ntoskrnl/ex/mutant.c +++ b/reactos/ntoskrnl/ex/mutant.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, ExpInitializeMutantImplementation) diff --git a/reactos/ntoskrnl/ex/profile.c b/reactos/ntoskrnl/ex/profile.c index 15c0150c388..02b15043762 100644 --- a/reactos/ntoskrnl/ex/profile.c +++ b/reactos/ntoskrnl/ex/profile.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, ExpInitializeProfileImplementation) diff --git a/reactos/ntoskrnl/ex/rundown.c b/reactos/ntoskrnl/ex/rundown.c index aa1ab24c612..0466e6ed664 100644 --- a/reactos/ntoskrnl/ex/rundown.c +++ b/reactos/ntoskrnl/ex/rundown.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include /* FUNCTIONS *****************************************************************/ diff --git a/reactos/ntoskrnl/ex/sem.c b/reactos/ntoskrnl/ex/sem.c index ff496cd9b44..b6499c6722b 100644 --- a/reactos/ntoskrnl/ex/sem.c +++ b/reactos/ntoskrnl/ex/sem.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, ExpInitializeSemaphoreImplementation) diff --git a/reactos/ntoskrnl/ex/shutdown.c b/reactos/ntoskrnl/ex/shutdown.c index 79734055ccd..abf92ee2747 100644 --- a/reactos/ntoskrnl/ex/shutdown.c +++ b/reactos/ntoskrnl/ex/shutdown.c @@ -10,7 +10,7 @@ /* INCLUDES *****************************************************************/ #include -#include +#include /* FUNCTIONS *****************************************************************/ diff --git a/reactos/ntoskrnl/ex/sysinfo.c b/reactos/ntoskrnl/ex/sysinfo.c index c89f60a6c2a..f65093060f0 100644 --- a/reactos/ntoskrnl/ex/sysinfo.c +++ b/reactos/ntoskrnl/ex/sysinfo.c @@ -12,7 +12,7 @@ #include #define NDEBUG -#include +#include VOID MmPrintMemoryStatistic(VOID); diff --git a/reactos/ntoskrnl/ex/time.c b/reactos/ntoskrnl/ex/time.c index 8dd4aaed68f..ddf0b64eba4 100644 --- a/reactos/ntoskrnl/ex/time.c +++ b/reactos/ntoskrnl/ex/time.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include #define TICKSPERMINUTE 600000000 diff --git a/reactos/ntoskrnl/ex/uuid.c b/reactos/ntoskrnl/ex/uuid.c index c3957a5c4ab..ff953b331f7 100644 --- a/reactos/ntoskrnl/ex/uuid.c +++ b/reactos/ntoskrnl/ex/uuid.c @@ -12,7 +12,7 @@ #include #define NDEBUG -#include +#include #define SEED_BUFFER_SIZE 6 diff --git a/reactos/ntoskrnl/ex/win32k.c b/reactos/ntoskrnl/ex/win32k.c index 6180de75dd2..ff9d753f308 100644 --- a/reactos/ntoskrnl/ex/win32k.c +++ b/reactos/ntoskrnl/ex/win32k.c @@ -8,7 +8,7 @@ #include #define NDEBUG -#include +#include #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, ExpWin32kInit) diff --git a/reactos/ntoskrnl/ex/work.c b/reactos/ntoskrnl/ex/work.c index f735b1749f3..7d1e8146663 100644 --- a/reactos/ntoskrnl/ex/work.c +++ b/reactos/ntoskrnl/ex/work.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, ExpInitializeWorkerThreads) diff --git a/reactos/ntoskrnl/fstub/disksup.c b/reactos/ntoskrnl/fstub/disksup.c index e799d605796..462e522a9cc 100644 --- a/reactos/ntoskrnl/fstub/disksup.c +++ b/reactos/ntoskrnl/fstub/disksup.c @@ -12,7 +12,7 @@ #include #define NDEBUG -#include +#include #include /* DEPRECATED FUNCTIONS ******************************************************/ diff --git a/reactos/ntoskrnl/fstub/fstubex.c b/reactos/ntoskrnl/fstub/fstubex.c index 87125b4121f..bd419931f16 100644 --- a/reactos/ntoskrnl/fstub/fstubex.c +++ b/reactos/ntoskrnl/fstub/fstubex.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include /* FUNCTIONS *****************************************************************/ diff --git a/reactos/ntoskrnl/fstub/halstub.c b/reactos/ntoskrnl/fstub/halstub.c index 4cd0d418610..fbce1057a90 100644 --- a/reactos/ntoskrnl/fstub/halstub.c +++ b/reactos/ntoskrnl/fstub/halstub.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include /* GLOBALS *******************************************************************/ diff --git a/reactos/ntoskrnl/include/internal/debug.h b/reactos/ntoskrnl/include/internal/debug.h deleted file mode 100644 index 0d10b91f9a6..00000000000 --- a/reactos/ntoskrnl/include/internal/debug.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: include/internal/debug.h - * PURPOSE: Useful debugging macros - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * 28/05/98: Created - */ - -/* - * NOTES: Define DBG in configuration file for "checked" version - * Define NDEBUG before including this header to disable debugging - * macros - * Define NASSERT before including this header to disable assertions - */ - - -#ifndef __NTOSKRNL_DEBUG -#define __NTOSKRNL_DEBUG - -#include - - -#endif /* __NTOSKRNL_DEBUG */ diff --git a/reactos/ntoskrnl/io/iomgr/adapter.c b/reactos/ntoskrnl/io/iomgr/adapter.c index 222a12dda84..1d402c95045 100644 --- a/reactos/ntoskrnl/io/iomgr/adapter.c +++ b/reactos/ntoskrnl/io/iomgr/adapter.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include /* DATA **********************************************************************/ diff --git a/reactos/ntoskrnl/io/iomgr/bootlog.c b/reactos/ntoskrnl/io/iomgr/bootlog.c index 485b8b280e7..2426f6e3a4c 100644 --- a/reactos/ntoskrnl/io/iomgr/bootlog.c +++ b/reactos/ntoskrnl/io/iomgr/bootlog.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, IopInitBootLog) diff --git a/reactos/ntoskrnl/io/iomgr/controller.c b/reactos/ntoskrnl/io/iomgr/controller.c index 8616926b4d2..6220ba8de43 100644 --- a/reactos/ntoskrnl/io/iomgr/controller.c +++ b/reactos/ntoskrnl/io/iomgr/controller.c @@ -9,7 +9,7 @@ /* INCLUDES *****************************************************************/ #include -#include +#include /* GLOBALS *******************************************************************/ diff --git a/reactos/ntoskrnl/io/iomgr/device.c b/reactos/ntoskrnl/io/iomgr/device.c index 3c79e0250fc..d010cb09818 100644 --- a/reactos/ntoskrnl/io/iomgr/device.c +++ b/reactos/ntoskrnl/io/iomgr/device.c @@ -12,7 +12,7 @@ #include #define NDEBUG -#include +#include /* GLOBALS ********************************************************************/ diff --git a/reactos/ntoskrnl/io/iomgr/deviface.c b/reactos/ntoskrnl/io/iomgr/deviface.c index 81122e429b2..c2dac1d7fdc 100644 --- a/reactos/ntoskrnl/io/iomgr/deviface.c +++ b/reactos/ntoskrnl/io/iomgr/deviface.c @@ -14,7 +14,7 @@ #include #define NDEBUG -#include +#include /* FUNCTIONS *****************************************************************/ diff --git a/reactos/ntoskrnl/io/iomgr/driver.c b/reactos/ntoskrnl/io/iomgr/driver.c index 6db9421a465..90fddac6eb7 100644 --- a/reactos/ntoskrnl/io/iomgr/driver.c +++ b/reactos/ntoskrnl/io/iomgr/driver.c @@ -12,7 +12,7 @@ #include #define NDEBUG -#include +#include /* GLOBALS ********************************************************************/ diff --git a/reactos/ntoskrnl/io/iomgr/drvrlist.c b/reactos/ntoskrnl/io/iomgr/drvrlist.c index 1dbb4d87b12..b1abfc1c16e 100644 --- a/reactos/ntoskrnl/io/iomgr/drvrlist.c +++ b/reactos/ntoskrnl/io/iomgr/drvrlist.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include typedef struct _SERVICE_GROUP { diff --git a/reactos/ntoskrnl/io/iomgr/error.c b/reactos/ntoskrnl/io/iomgr/error.c index 3d2065f4450..749149ab481 100644 --- a/reactos/ntoskrnl/io/iomgr/error.c +++ b/reactos/ntoskrnl/io/iomgr/error.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include /* TYPES *********************************************************************/ diff --git a/reactos/ntoskrnl/io/iomgr/iocomp.c b/reactos/ntoskrnl/io/iomgr/iocomp.c index 8924a8903ae..e2cee39ee14 100644 --- a/reactos/ntoskrnl/io/iomgr/iocomp.c +++ b/reactos/ntoskrnl/io/iomgr/iocomp.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include POBJECT_TYPE IoCompletionType; diff --git a/reactos/ntoskrnl/io/iomgr/ioevent.c b/reactos/ntoskrnl/io/iomgr/ioevent.c index c3e6ff3f660..01b4f8dc22c 100644 --- a/reactos/ntoskrnl/io/iomgr/ioevent.c +++ b/reactos/ntoskrnl/io/iomgr/ioevent.c @@ -10,7 +10,7 @@ /* INCLUDES *****************************************************************/ #include -#include +#include /* PRIVATE FUNCTIONS *********************************************************/ diff --git a/reactos/ntoskrnl/io/iomgr/iomdl.c b/reactos/ntoskrnl/io/iomgr/iomdl.c index fbfa8a029e8..8ccb16d330f 100644 --- a/reactos/ntoskrnl/io/iomgr/iomdl.c +++ b/reactos/ntoskrnl/io/iomgr/iomdl.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include /* FUNCTIONS *****************************************************************/ diff --git a/reactos/ntoskrnl/io/iomgr/iomgr.c b/reactos/ntoskrnl/io/iomgr/iomgr.c index 336cb0c81b6..015018e38db 100644 --- a/reactos/ntoskrnl/io/iomgr/iomgr.c +++ b/reactos/ntoskrnl/io/iomgr/iomgr.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include ULONG IopTraceLevel = 0; BOOLEAN PnpSystemInit = FALSE; diff --git a/reactos/ntoskrnl/io/iomgr/iorsrce.c b/reactos/ntoskrnl/io/iomgr/iorsrce.c index ec9c742a5ab..23828e9f774 100644 --- a/reactos/ntoskrnl/io/iomgr/iorsrce.c +++ b/reactos/ntoskrnl/io/iomgr/iorsrce.c @@ -11,7 +11,7 @@ /* INCLUDES *****************************************************************/ #include -#include +#include /* GLOBALS *******************************************************************/ diff --git a/reactos/ntoskrnl/io/iomgr/iotimer.c b/reactos/ntoskrnl/io/iomgr/iotimer.c index 87066cba770..e462ce0e200 100644 --- a/reactos/ntoskrnl/io/iomgr/iotimer.c +++ b/reactos/ntoskrnl/io/iomgr/iotimer.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include /* GLOBALS *******************************************************************/ diff --git a/reactos/ntoskrnl/io/iomgr/iowork.c b/reactos/ntoskrnl/io/iomgr/iowork.c index 594a875c8fe..f4aad64691f 100644 --- a/reactos/ntoskrnl/io/iomgr/iowork.c +++ b/reactos/ntoskrnl/io/iomgr/iowork.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include /* PRIVATE FUNCTIONS *********************************************************/ diff --git a/reactos/ntoskrnl/io/iomgr/irp.c b/reactos/ntoskrnl/io/iomgr/irp.c index d9e6b9ebe6a..0a2b65ac57b 100644 --- a/reactos/ntoskrnl/io/iomgr/irp.c +++ b/reactos/ntoskrnl/io/iomgr/irp.c @@ -12,7 +12,7 @@ #include #define NDEBUG -#include +#include /* Undefine some macros we implement here */ #undef IoCallDriver diff --git a/reactos/ntoskrnl/io/iomgr/irq.c b/reactos/ntoskrnl/io/iomgr/irq.c index 46190187bc6..6d45b254343 100644 --- a/reactos/ntoskrnl/io/iomgr/irq.c +++ b/reactos/ntoskrnl/io/iomgr/irq.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include /* FUNCTIONS *****************************************************************/ diff --git a/reactos/ntoskrnl/io/iomgr/remlock.c b/reactos/ntoskrnl/io/iomgr/remlock.c index 2bd05720344..b5f301830dd 100644 --- a/reactos/ntoskrnl/io/iomgr/remlock.c +++ b/reactos/ntoskrnl/io/iomgr/remlock.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include /* FUNCTIONS *****************************************************************/ diff --git a/reactos/ntoskrnl/io/iomgr/symlink.c b/reactos/ntoskrnl/io/iomgr/symlink.c index a2dc900c63c..6c2f083bf14 100644 --- a/reactos/ntoskrnl/io/iomgr/symlink.c +++ b/reactos/ntoskrnl/io/iomgr/symlink.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include /* FUNCTIONS ****************************************************************/ diff --git a/reactos/ntoskrnl/io/iomgr/util.c b/reactos/ntoskrnl/io/iomgr/util.c index 7b9b18b4698..871b3b9f23f 100644 --- a/reactos/ntoskrnl/io/iomgr/util.c +++ b/reactos/ntoskrnl/io/iomgr/util.c @@ -12,7 +12,7 @@ #include #define NDEBUG -#include +#include VOID NTAPI diff --git a/reactos/ntoskrnl/io/iomgr/volume.c b/reactos/ntoskrnl/io/iomgr/volume.c index 102ae54e860..56d7d06856d 100644 --- a/reactos/ntoskrnl/io/iomgr/volume.c +++ b/reactos/ntoskrnl/io/iomgr/volume.c @@ -12,7 +12,7 @@ #include #define NDEBUG -#include +#include #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, IoInitFileSystemImplementation) diff --git a/reactos/ntoskrnl/io/pnpmgr/plugplay.c b/reactos/ntoskrnl/io/pnpmgr/plugplay.c index fda41f45eb8..15239bab02c 100644 --- a/reactos/ntoskrnl/io/pnpmgr/plugplay.c +++ b/reactos/ntoskrnl/io/pnpmgr/plugplay.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, IopInitPlugPlayEvents) diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpdma.c b/reactos/ntoskrnl/io/pnpmgr/pnpdma.c index 28ed2765015..c0bd951b1f3 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpdma.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpdma.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include #include /* PUBLIC FUNCTIONS **********************************************************/ diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c index b06f3d4893b..f56c241492f 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include //#define ENABLE_ACPI diff --git a/reactos/ntoskrnl/io/pnpmgr/pnproot.c b/reactos/ntoskrnl/io/pnpmgr/pnproot.c index 997a60c8cd4..01d003667dc 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnproot.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnproot.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include /* GLOBALS *******************************************************************/ diff --git a/reactos/ntoskrnl/kd/i386/kdmemsup.c b/reactos/ntoskrnl/kd/i386/kdmemsup.c index c3054ac2269..5a3d4b818b8 100644 --- a/reactos/ntoskrnl/kd/i386/kdmemsup.c +++ b/reactos/ntoskrnl/kd/i386/kdmemsup.c @@ -9,7 +9,7 @@ #include #define NDEBUG -#include +#include #define HIGH_PHYS_MASK 0x80000000 #define PAGE_TABLE_MASK 0x3ff diff --git a/reactos/ntoskrnl/kd/kdinit.c b/reactos/ntoskrnl/kd/kdinit.c index 6746593bb29..979fe789514 100644 --- a/reactos/ntoskrnl/kd/kdinit.c +++ b/reactos/ntoskrnl/kd/kdinit.c @@ -9,7 +9,7 @@ #include #define NDEBUG -#include +#include #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, KdInitSystem) diff --git a/reactos/ntoskrnl/kd/kdio.c b/reactos/ntoskrnl/kd/kdio.c index 45a68db079f..a0d0286dee0 100644 --- a/reactos/ntoskrnl/kd/kdio.c +++ b/reactos/ntoskrnl/kd/kdio.c @@ -10,7 +10,7 @@ /* INCLUDES ******************************************************************/ #include -#include +#include /* GLOBALS *******************************************************************/ diff --git a/reactos/ntoskrnl/kd/kdmain.c b/reactos/ntoskrnl/kd/kdmain.c index 0858982cce5..3b02aa253db 100644 --- a/reactos/ntoskrnl/kd/kdmain.c +++ b/reactos/ntoskrnl/kd/kdmain.c @@ -9,7 +9,7 @@ #include #define NDEBUG -#include +#include /* VARIABLES ***************************************************************/ diff --git a/reactos/ntoskrnl/kd/wrappers/bochs.c b/reactos/ntoskrnl/kd/wrappers/bochs.c index df2702b9836..bc2266d9143 100644 --- a/reactos/ntoskrnl/kd/wrappers/bochs.c +++ b/reactos/ntoskrnl/kd/wrappers/bochs.c @@ -9,7 +9,7 @@ #include #define NDEBUG -#include +#include /* bochs debug output */ #define BOCHS_LOGGER_PORT ((PVOID)0xe9) diff --git a/reactos/ntoskrnl/kd/wrappers/gdbstub.c b/reactos/ntoskrnl/kd/wrappers/gdbstub.c index aedf32da54b..cc77b28f435 100644 --- a/reactos/ntoskrnl/kd/wrappers/gdbstub.c +++ b/reactos/ntoskrnl/kd/wrappers/gdbstub.c @@ -85,7 +85,7 @@ #include #define NDEBUG -#include +#include /************************************************************************/ /* BUFMAX defines the maximum number of characters in inbound/outbound buffers*/ diff --git a/reactos/ntoskrnl/kd/wrappers/gdbstub_powerpc.c b/reactos/ntoskrnl/kd/wrappers/gdbstub_powerpc.c index 043333b249f..acf6fee7e8c 100644 --- a/reactos/ntoskrnl/kd/wrappers/gdbstub_powerpc.c +++ b/reactos/ntoskrnl/kd/wrappers/gdbstub_powerpc.c @@ -85,7 +85,7 @@ #include #define NDEBUG -#include +#include /************************************************************************/ /* BUFMAX defines the maximum number of characters in inbound/outbound buffers*/ diff --git a/reactos/ntoskrnl/kd/wrappers/kdbg.c b/reactos/ntoskrnl/kd/wrappers/kdbg.c index 54f82d73aab..342120752a1 100644 --- a/reactos/ntoskrnl/kd/wrappers/kdbg.c +++ b/reactos/ntoskrnl/kd/wrappers/kdbg.c @@ -9,7 +9,7 @@ #include #define NDEBUG -#include +#include VOID NTAPI KdbInitialize(PKD_DISPATCH_TABLE DispatchTable, ULONG BootPhase); diff --git a/reactos/ntoskrnl/kdbg/kdb.c b/reactos/ntoskrnl/kdbg/kdb.c index 9e6c843659a..14295cf0217 100644 --- a/reactos/ntoskrnl/kdbg/kdb.c +++ b/reactos/ntoskrnl/kdbg/kdb.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include /* TYPES *********************************************************************/ diff --git a/reactos/ntoskrnl/kdbg/kdb_cli.c b/reactos/ntoskrnl/kdbg/kdb_cli.c index 9d907818f72..9344839cd0f 100644 --- a/reactos/ntoskrnl/kdbg/kdb_cli.c +++ b/reactos/ntoskrnl/kdbg/kdb_cli.c @@ -31,7 +31,7 @@ #include #define NDEBUG -#include +#include /* DEFINES *******************************************************************/ diff --git a/reactos/ntoskrnl/kdbg/kdb_expr.c b/reactos/ntoskrnl/kdbg/kdb_expr.c index 198a5c0b622..8e08d88b614 100644 --- a/reactos/ntoskrnl/kdbg/kdb_expr.c +++ b/reactos/ntoskrnl/kdbg/kdb_expr.c @@ -35,7 +35,7 @@ #include #define NDEBUG -#include +#include /* TYPES *********************************************************************/ typedef enum _RPN_OP_TYPE diff --git a/reactos/ntoskrnl/kdbg/kdb_symbols.c b/reactos/ntoskrnl/kdbg/kdb_symbols.c index bfb5e378b33..d141fc984e8 100644 --- a/reactos/ntoskrnl/kdbg/kdb_symbols.c +++ b/reactos/ntoskrnl/kdbg/kdb_symbols.c @@ -12,7 +12,7 @@ #include #define NDEBUG -#include +#include /* GLOBALS ******************************************************************/ diff --git a/reactos/ntoskrnl/ke/apc.c b/reactos/ntoskrnl/ke/apc.c index 0f658e988f9..4839df2e452 100644 --- a/reactos/ntoskrnl/ke/apc.c +++ b/reactos/ntoskrnl/ke/apc.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include /* PRIVATE FUNCTIONS *********************************************************/ diff --git a/reactos/ntoskrnl/ke/bug.c b/reactos/ntoskrnl/ke/bug.c index 3d431d5be17..86430d3290b 100644 --- a/reactos/ntoskrnl/ke/bug.c +++ b/reactos/ntoskrnl/ke/bug.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, KiInitializeBugCheck) diff --git a/reactos/ntoskrnl/ke/config.c b/reactos/ntoskrnl/ke/config.c index 01807226548..aa92e96ea67 100644 --- a/reactos/ntoskrnl/ke/config.c +++ b/reactos/ntoskrnl/ke/config.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include /* FUNCTIONS *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/devqueue.c b/reactos/ntoskrnl/ke/devqueue.c index 337df9306ca..c7b23c3db2c 100644 --- a/reactos/ntoskrnl/ke/devqueue.c +++ b/reactos/ntoskrnl/ke/devqueue.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include /* FUNCTIONS *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/eventobj.c b/reactos/ntoskrnl/ke/eventobj.c index ab3c11659fc..2f798a1b05c 100644 --- a/reactos/ntoskrnl/ke/eventobj.c +++ b/reactos/ntoskrnl/ke/eventobj.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include /* FUNCTIONS *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/except.c b/reactos/ntoskrnl/ke/except.c index b994d077585..c83b938fbc8 100644 --- a/reactos/ntoskrnl/ke/except.c +++ b/reactos/ntoskrnl/ke/except.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include /* FUNCTIONS *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/gate.c b/reactos/ntoskrnl/ke/gate.c index ea15bcc097e..15619ab0847 100644 --- a/reactos/ntoskrnl/ke/gate.c +++ b/reactos/ntoskrnl/ke/gate.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include /* FUNCTIONS ****************************************************************/ diff --git a/reactos/ntoskrnl/ke/gmutex.c b/reactos/ntoskrnl/ke/gmutex.c index 79c267d8e6c..e2b762d2224 100644 --- a/reactos/ntoskrnl/ke/gmutex.c +++ b/reactos/ntoskrnl/ke/gmutex.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include /* PRIVATE FUNCTIONS *********************************************************/ diff --git a/reactos/ntoskrnl/ke/i386/ldt.c b/reactos/ntoskrnl/ke/i386/ldt.c index 2d3f5480448..a6ce3b6ea00 100644 --- a/reactos/ntoskrnl/ke/i386/ldt.c +++ b/reactos/ntoskrnl/ke/i386/ldt.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include /* GLOBALS *******************************************************************/ diff --git a/reactos/ntoskrnl/ke/i386/usercall.c b/reactos/ntoskrnl/ke/i386/usercall.c index cc2f418a22f..57811c1594e 100644 --- a/reactos/ntoskrnl/ke/i386/usercall.c +++ b/reactos/ntoskrnl/ke/i386/usercall.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include extern PGDI_BATCHFLUSH_ROUTINE KeGdiFlushUserBatch; diff --git a/reactos/ntoskrnl/ke/ipi.c b/reactos/ntoskrnl/ke/ipi.c index d7d1c2a6ce0..979fcdd87b2 100644 --- a/reactos/ntoskrnl/ke/ipi.c +++ b/reactos/ntoskrnl/ke/ipi.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include /* GLOBALS *******************************************************************/ diff --git a/reactos/ntoskrnl/ke/mutex.c b/reactos/ntoskrnl/ke/mutex.c index 18836750267..73bb15ee738 100644 --- a/reactos/ntoskrnl/ke/mutex.c +++ b/reactos/ntoskrnl/ke/mutex.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include /* FUNCTIONS *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/powerpc/ppc_irq.c b/reactos/ntoskrnl/ke/powerpc/ppc_irq.c index 9f1a8e4f4e5..909dc0a25ff 100644 --- a/reactos/ntoskrnl/ke/powerpc/ppc_irq.c +++ b/reactos/ntoskrnl/ke/powerpc/ppc_irq.c @@ -21,7 +21,7 @@ #include #define NDEBUG -#include +#include KDPC KiExpireTimerDpc; extern ULONG KiMaximumDpcQueueDepth; diff --git a/reactos/ntoskrnl/ke/procobj.c b/reactos/ntoskrnl/ke/procobj.c index 49a61da4f13..fd52948dbae 100644 --- a/reactos/ntoskrnl/ke/procobj.c +++ b/reactos/ntoskrnl/ke/procobj.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include /* GLOBALS *******************************************************************/ diff --git a/reactos/ntoskrnl/ke/profobj.c b/reactos/ntoskrnl/ke/profobj.c index 88c052c1513..1927f77560a 100644 --- a/reactos/ntoskrnl/ke/profobj.c +++ b/reactos/ntoskrnl/ke/profobj.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include /* GLOBALS *******************************************************************/ diff --git a/reactos/ntoskrnl/ke/queue.c b/reactos/ntoskrnl/ke/queue.c index efe31c44064..a548a7df098 100644 --- a/reactos/ntoskrnl/ke/queue.c +++ b/reactos/ntoskrnl/ke/queue.c @@ -12,7 +12,7 @@ #include #define NDEBUG -#include +#include /* PRIVATE FUNCTIONS *********************************************************/ diff --git a/reactos/ntoskrnl/ke/semphobj.c b/reactos/ntoskrnl/ke/semphobj.c index 918dd1c2f51..7c92e0670d1 100644 --- a/reactos/ntoskrnl/ke/semphobj.c +++ b/reactos/ntoskrnl/ke/semphobj.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include /* FUNCTIONS *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/spinlock.c b/reactos/ntoskrnl/ke/spinlock.c index d4be3b5fac3..fe4c43e68cb 100644 --- a/reactos/ntoskrnl/ke/spinlock.c +++ b/reactos/ntoskrnl/ke/spinlock.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include #define LQ_WAIT 1 #define LQ_OWN 2 diff --git a/reactos/ntoskrnl/ke/thrdobj.c b/reactos/ntoskrnl/ke/thrdobj.c index cd930222008..e8b6dfaec97 100644 --- a/reactos/ntoskrnl/ke/thrdobj.c +++ b/reactos/ntoskrnl/ke/thrdobj.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include extern EX_WORK_QUEUE ExWorkerQueue[MaximumWorkQueue]; extern LIST_ENTRY PspReaperListHead; diff --git a/reactos/ntoskrnl/mm/anonmem.c b/reactos/ntoskrnl/mm/anonmem.c index 656526364d2..e7e68b48841 100644 --- a/reactos/ntoskrnl/mm/anonmem.c +++ b/reactos/ntoskrnl/mm/anonmem.c @@ -41,7 +41,7 @@ #include #define NDEBUG -#include +#include /* FUNCTIONS *****************************************************************/ diff --git a/reactos/ntoskrnl/mm/balance.c b/reactos/ntoskrnl/mm/balance.c index b8ac23b45c0..a364c5afcf1 100644 --- a/reactos/ntoskrnl/mm/balance.c +++ b/reactos/ntoskrnl/mm/balance.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, MmInitializeBalancer) diff --git a/reactos/ntoskrnl/mm/cont.c b/reactos/ntoskrnl/mm/cont.c index 899c7ffefa0..0e1e21b78c7 100644 --- a/reactos/ntoskrnl/mm/cont.c +++ b/reactos/ntoskrnl/mm/cont.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include /* FUNCTIONS *****************************************************************/ diff --git a/reactos/ntoskrnl/mm/drvlck.c b/reactos/ntoskrnl/mm/drvlck.c index 63551d5f2e5..1b5036caabf 100644 --- a/reactos/ntoskrnl/mm/drvlck.c +++ b/reactos/ntoskrnl/mm/drvlck.c @@ -10,7 +10,7 @@ /* INCLUDES *****************************************************************/ #include -#include +#include /* FUNCTIONS *****************************************************************/ diff --git a/reactos/ntoskrnl/mm/elf.inc.h b/reactos/ntoskrnl/mm/elf.inc.h index 3592c1b40ca..b5795d130b4 100644 --- a/reactos/ntoskrnl/mm/elf.inc.h +++ b/reactos/ntoskrnl/mm/elf.inc.h @@ -1,5 +1,5 @@ #define NDEBUG -#include +#include #include diff --git a/reactos/ntoskrnl/mm/freelist.c b/reactos/ntoskrnl/mm/freelist.c index 0f5bda54bb3..f824cf25981 100644 --- a/reactos/ntoskrnl/mm/freelist.c +++ b/reactos/ntoskrnl/mm/freelist.c @@ -12,7 +12,7 @@ #include #define NDEBUG -#include +#include #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, MmInitializePageList) diff --git a/reactos/ntoskrnl/mm/i386/page.c b/reactos/ntoskrnl/mm/i386/page.c index 9d9c7af1aa3..8c887816b30 100644 --- a/reactos/ntoskrnl/mm/i386/page.c +++ b/reactos/ntoskrnl/mm/i386/page.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, MmInitGlobalKernelPageDirectory) diff --git a/reactos/ntoskrnl/mm/i386/pagepae.c b/reactos/ntoskrnl/mm/i386/pagepae.c index 64ef87c3390..de52e2b8d4f 100644 --- a/reactos/ntoskrnl/mm/i386/pagepae.c +++ b/reactos/ntoskrnl/mm/i386/pagepae.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, MmInitGlobalKernelPageDirectory) diff --git a/reactos/ntoskrnl/mm/iospace.c b/reactos/ntoskrnl/mm/iospace.c index 944ba9022b7..fa31f5e0a01 100644 --- a/reactos/ntoskrnl/mm/iospace.c +++ b/reactos/ntoskrnl/mm/iospace.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include /* FUNCTIONS *****************************************************************/ diff --git a/reactos/ntoskrnl/mm/kmap.c b/reactos/ntoskrnl/mm/kmap.c index 7cd2794dd6e..16ee67007f6 100644 --- a/reactos/ntoskrnl/mm/kmap.c +++ b/reactos/ntoskrnl/mm/kmap.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include /* GLOBALS *****************************************************************/ diff --git a/reactos/ntoskrnl/mm/marea.c b/reactos/ntoskrnl/mm/marea.c index f779883e3ec..87763493466 100644 --- a/reactos/ntoskrnl/mm/marea.c +++ b/reactos/ntoskrnl/mm/marea.c @@ -43,7 +43,7 @@ #include #define NDEBUG -#include +#include #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, MmInitMemoryAreas) diff --git a/reactos/ntoskrnl/mm/mdlsup.c b/reactos/ntoskrnl/mm/mdlsup.c index 70038cf0070..f90a681860b 100644 --- a/reactos/ntoskrnl/mm/mdlsup.c +++ b/reactos/ntoskrnl/mm/mdlsup.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, MmInitializeMdlImplementation) diff --git a/reactos/ntoskrnl/mm/mm.c b/reactos/ntoskrnl/mm/mm.c index 7f0bd5ae3da..890a5bb8abc 100644 --- a/reactos/ntoskrnl/mm/mm.c +++ b/reactos/ntoskrnl/mm/mm.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include /* GLOBALS *****************************************************************/ diff --git a/reactos/ntoskrnl/mm/mminit.c b/reactos/ntoskrnl/mm/mminit.c index 54634da983a..ea66bdf6a04 100644 --- a/reactos/ntoskrnl/mm/mminit.c +++ b/reactos/ntoskrnl/mm/mminit.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include /* GLOBALS *******************************************************************/ diff --git a/reactos/ntoskrnl/mm/mpw.c b/reactos/ntoskrnl/mm/mpw.c index 3c631691907..d96b13a59e4 100644 --- a/reactos/ntoskrnl/mm/mpw.c +++ b/reactos/ntoskrnl/mm/mpw.c @@ -12,7 +12,7 @@ #include #define NDEBUG -#include +#include /* GLOBALS *******************************************************************/ diff --git a/reactos/ntoskrnl/mm/ncache.c b/reactos/ntoskrnl/mm/ncache.c index 66eed2ebe8b..aafde19da07 100644 --- a/reactos/ntoskrnl/mm/ncache.c +++ b/reactos/ntoskrnl/mm/ncache.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include /* FUNCTIONS *****************************************************************/ diff --git a/reactos/ntoskrnl/mm/npool.c b/reactos/ntoskrnl/mm/npool.c index ed9ee5bed00..4cff298c7fe 100644 --- a/reactos/ntoskrnl/mm/npool.c +++ b/reactos/ntoskrnl/mm/npool.c @@ -13,7 +13,7 @@ #include #define NDEBUG -#include +#include #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, MiInitializeNonPagedPool) diff --git a/reactos/ntoskrnl/mm/pagefile.c b/reactos/ntoskrnl/mm/pagefile.c index 356d6e33684..4f83ebde7ab 100644 --- a/reactos/ntoskrnl/mm/pagefile.c +++ b/reactos/ntoskrnl/mm/pagefile.c @@ -29,7 +29,7 @@ #include #define NDEBUG -#include +#include #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, MmInitPagingFile) diff --git a/reactos/ntoskrnl/mm/pageop.c b/reactos/ntoskrnl/mm/pageop.c index 099b915921f..a0d0eb2eb0c 100644 --- a/reactos/ntoskrnl/mm/pageop.c +++ b/reactos/ntoskrnl/mm/pageop.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, MmInitializePageOp) diff --git a/reactos/ntoskrnl/mm/pe.c b/reactos/ntoskrnl/mm/pe.c index 7e0465f9837..56d96cedaf9 100644 --- a/reactos/ntoskrnl/mm/pe.c +++ b/reactos/ntoskrnl/mm/pe.c @@ -12,7 +12,7 @@ #include //#define NDEBUG -#include +#include #include diff --git a/reactos/ntoskrnl/mm/pool.c b/reactos/ntoskrnl/mm/pool.c index a1582ba559f..c326a492a2a 100644 --- a/reactos/ntoskrnl/mm/pool.c +++ b/reactos/ntoskrnl/mm/pool.c @@ -12,7 +12,7 @@ #include #define NDEBUG -#include +#include extern ULONG MiNonPagedPoolLength; extern ULONG MmTotalPagedPoolQuota; diff --git a/reactos/ntoskrnl/mm/powerpc/page.c b/reactos/ntoskrnl/mm/powerpc/page.c index 2dd9e2b76b1..5000bbf5747 100644 --- a/reactos/ntoskrnl/mm/powerpc/page.c +++ b/reactos/ntoskrnl/mm/powerpc/page.c @@ -13,7 +13,7 @@ #include #include //#define NDEBUG -#include +#include #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, MmInitGlobalKernelPageDirectory) diff --git a/reactos/ntoskrnl/mm/powerpc/pfault.c b/reactos/ntoskrnl/mm/powerpc/pfault.c index bb6b302e0b2..2c4104e7c15 100644 --- a/reactos/ntoskrnl/mm/powerpc/pfault.c +++ b/reactos/ntoskrnl/mm/powerpc/pfault.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include #include /* EXTERNS *******************************************************************/ diff --git a/reactos/ntoskrnl/mm/ppool.c b/reactos/ntoskrnl/mm/ppool.c index 2e7993e38a3..fbbf20a739f 100644 --- a/reactos/ntoskrnl/mm/ppool.c +++ b/reactos/ntoskrnl/mm/ppool.c @@ -12,7 +12,7 @@ #include #define NDEBUG -#include +#include #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, MmInitializePagedPool) diff --git a/reactos/ntoskrnl/mm/procsup.c b/reactos/ntoskrnl/mm/procsup.c index 83e1af8f003..38582e4d360 100644 --- a/reactos/ntoskrnl/mm/procsup.c +++ b/reactos/ntoskrnl/mm/procsup.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include extern ULONG NtMajorVersion; extern ULONG NtMinorVersion; diff --git a/reactos/ntoskrnl/mm/region.c b/reactos/ntoskrnl/mm/region.c index d74184f9b74..6e760104197 100644 --- a/reactos/ntoskrnl/mm/region.c +++ b/reactos/ntoskrnl/mm/region.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include /* FUNCTIONS *****************************************************************/ diff --git a/reactos/ntoskrnl/mm/rmap.c b/reactos/ntoskrnl/mm/rmap.c index 3607d9136ae..cf6b00fa5b1 100644 --- a/reactos/ntoskrnl/mm/rmap.c +++ b/reactos/ntoskrnl/mm/rmap.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, MmInitializeRmapList) diff --git a/reactos/ntoskrnl/mm/section.c b/reactos/ntoskrnl/mm/section.c index ad062e3bc14..00a15702668 100644 --- a/reactos/ntoskrnl/mm/section.c +++ b/reactos/ntoskrnl/mm/section.c @@ -46,7 +46,7 @@ #include #define NDEBUG -#include +#include #include #if defined (ALLOC_PRAGMA) diff --git a/reactos/ntoskrnl/mm/verifier.c b/reactos/ntoskrnl/mm/verifier.c index 0b30939b49c..f2682991609 100644 --- a/reactos/ntoskrnl/mm/verifier.c +++ b/reactos/ntoskrnl/mm/verifier.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include /* GLOBALS *******************************************************************/ diff --git a/reactos/ntoskrnl/mm/wset.c b/reactos/ntoskrnl/mm/wset.c index df570353d6c..1978caa816c 100644 --- a/reactos/ntoskrnl/mm/wset.c +++ b/reactos/ntoskrnl/mm/wset.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include /* FUNCTIONS *****************************************************************/ diff --git a/reactos/ntoskrnl/ob/oblife.c b/reactos/ntoskrnl/ob/oblife.c index 570225a6329..9a1e26c932f 100644 --- a/reactos/ntoskrnl/ob/oblife.c +++ b/reactos/ntoskrnl/ob/oblife.c @@ -15,7 +15,7 @@ #include #define NDEBUG -#include +#include extern ULONG NtGlobalFlag; diff --git a/reactos/ntoskrnl/ob/oblink.c b/reactos/ntoskrnl/ob/oblink.c index fa083fc16d6..8c7c9a2838f 100644 --- a/reactos/ntoskrnl/ob/oblink.c +++ b/reactos/ntoskrnl/ob/oblink.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include /* GLOBALS ******************************************************************/ diff --git a/reactos/ntoskrnl/ob/obwait.c b/reactos/ntoskrnl/ob/obwait.c index a110604b6d5..e644af66340 100644 --- a/reactos/ntoskrnl/ob/obwait.c +++ b/reactos/ntoskrnl/ob/obwait.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include /* FUNCTIONS *****************************************************************/ diff --git a/reactos/ntoskrnl/po/events.c b/reactos/ntoskrnl/po/events.c index 63567cd006c..0cd97405a47 100644 --- a/reactos/ntoskrnl/po/events.c +++ b/reactos/ntoskrnl/po/events.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include /* GLOBALS *******************************************************************/ diff --git a/reactos/ntoskrnl/po/power.c b/reactos/ntoskrnl/po/power.c index f0b6ae4e188..21fe70624b1 100644 --- a/reactos/ntoskrnl/po/power.c +++ b/reactos/ntoskrnl/po/power.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include /* GLOBALS *******************************************************************/ diff --git a/reactos/ntoskrnl/ps/job.c b/reactos/ntoskrnl/ps/job.c index 9d6162d1fbc..a1fa2f145d2 100644 --- a/reactos/ntoskrnl/ps/job.c +++ b/reactos/ntoskrnl/ps/job.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include /* GLOBALS *******************************************************************/ diff --git a/reactos/ntoskrnl/ps/kill.c b/reactos/ntoskrnl/ps/kill.c index afb9623a7b9..8dab39600ec 100644 --- a/reactos/ntoskrnl/ps/kill.c +++ b/reactos/ntoskrnl/ps/kill.c @@ -12,7 +12,7 @@ #include #define NDEBUG -#include +#include /* GLOBALS *******************************************************************/ diff --git a/reactos/ntoskrnl/ps/process.c b/reactos/ntoskrnl/ps/process.c index 6b92a99e8c0..85989a3dbfa 100644 --- a/reactos/ntoskrnl/ps/process.c +++ b/reactos/ntoskrnl/ps/process.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include /* GLOBALS *******************************************************************/ diff --git a/reactos/ntoskrnl/ps/psmgr.c b/reactos/ntoskrnl/ps/psmgr.c index 29cda1baece..7d271d5a3b5 100644 --- a/reactos/ntoskrnl/ps/psmgr.c +++ b/reactos/ntoskrnl/ps/psmgr.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include extern ULONG ExpInitializationPhase; extern BOOLEAN SysThreadCreated; diff --git a/reactos/ntoskrnl/ps/query.c b/reactos/ntoskrnl/ps/query.c index 472d5545010..11bde0afdf2 100644 --- a/reactos/ntoskrnl/ps/query.c +++ b/reactos/ntoskrnl/ps/query.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include /* Include Information Class Tables */ #include "internal/ps_i.h" diff --git a/reactos/ntoskrnl/ps/quota.c b/reactos/ntoskrnl/ps/quota.c index ab73d045418..d07e2c137f2 100644 --- a/reactos/ntoskrnl/ps/quota.c +++ b/reactos/ntoskrnl/ps/quota.c @@ -12,7 +12,7 @@ #include #define NDEBUG -#include +#include EPROCESS_QUOTA_BLOCK PspDefaultQuotaBlock; diff --git a/reactos/ntoskrnl/ps/security.c b/reactos/ntoskrnl/ps/security.c index 27ea3162350..45ec74d6533 100644 --- a/reactos/ntoskrnl/ps/security.c +++ b/reactos/ntoskrnl/ps/security.c @@ -12,7 +12,7 @@ #include #define NDEBUG -#include +#include PTOKEN PspBootAccessToken; diff --git a/reactos/ntoskrnl/ps/state.c b/reactos/ntoskrnl/ps/state.c index 562153b8520..4b6b6702c89 100644 --- a/reactos/ntoskrnl/ps/state.c +++ b/reactos/ntoskrnl/ps/state.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include /* PRIVATE FUNCTIONS *********************************************************/ diff --git a/reactos/ntoskrnl/ps/thread.c b/reactos/ntoskrnl/ps/thread.c index 6de4bfc6490..2090314a842 100644 --- a/reactos/ntoskrnl/ps/thread.c +++ b/reactos/ntoskrnl/ps/thread.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include /* GLOBALS ******************************************************************/ diff --git a/reactos/ntoskrnl/ps/win32.c b/reactos/ntoskrnl/ps/win32.c index adea459425d..8e8a78af4b6 100644 --- a/reactos/ntoskrnl/ps/win32.c +++ b/reactos/ntoskrnl/ps/win32.c @@ -11,7 +11,7 @@ #include #include #define NDEBUG -#include +#include /* GLOBALS ******************************************************************/ diff --git a/reactos/ntoskrnl/rtl/libsupp.c b/reactos/ntoskrnl/rtl/libsupp.c index b0193cd8d99..e7a50724e6e 100644 --- a/reactos/ntoskrnl/rtl/libsupp.c +++ b/reactos/ntoskrnl/rtl/libsupp.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include extern ULONG NtGlobalFlag; diff --git a/reactos/ntoskrnl/rtl/misc.c b/reactos/ntoskrnl/rtl/misc.c index 925aa724e4c..f933c57070a 100644 --- a/reactos/ntoskrnl/rtl/misc.c +++ b/reactos/ntoskrnl/rtl/misc.c @@ -11,7 +11,7 @@ #include #define NDEBUG -#include +#include /* GLOBALS *******************************************************************/ diff --git a/reactos/ntoskrnl/wmi/wmi.c b/reactos/ntoskrnl/wmi/wmi.c index 56e3ea4aecc..5ebb2101ab4 100644 --- a/reactos/ntoskrnl/wmi/wmi.c +++ b/reactos/ntoskrnl/wmi/wmi.c @@ -10,7 +10,7 @@ #include #define NDEBUG -#include +#include /* FUNCTIONS *****************************************************************/ From 1f361c34ed261ec4790a8d7db77110140b86e2f2 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Sat, 30 Aug 2008 16:50:43 +0000 Subject: [PATCH 246/324] - [FORMATTING] Indentation and typo fixes svn path=/trunk/; revision=35808 --- reactos/ntoskrnl/config/i386/cmhardwr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reactos/ntoskrnl/config/i386/cmhardwr.c b/reactos/ntoskrnl/config/i386/cmhardwr.c index 96db7f34687..90b72c7931e 100644 --- a/reactos/ntoskrnl/config/i386/cmhardwr.c +++ b/reactos/ntoskrnl/config/i386/cmhardwr.c @@ -95,7 +95,7 @@ CmpGetBiosDate(IN PCHAR BiosStart, } } - /* Add slashes were we previously had NULLs */ + /* Add slashes where we previously had NULLs */ CurrentDate[4] = CurrentDate[7] = '/'; /* Check which date is newer */ @@ -636,7 +636,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc if (BiosHandle) { /* Get the BIOS Date Identifier */ - RtlCopyMemory(Buffer, (PCHAR)BaseAddress + (16*PAGE_SIZE - 11), 8); + RtlCopyMemory(Buffer, (PCHAR)BaseAddress + (16 * PAGE_SIZE - 11), 8); Buffer[8] = ANSI_NULL; /* Convert it to unicode */ @@ -665,7 +665,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc } /* Get the BIOS Version */ - if (CmpGetBiosVersion(BaseAddress, 16* PAGE_SIZE, Buffer)) + if (CmpGetBiosVersion(BaseAddress, 16 * PAGE_SIZE, Buffer)) { /* Start at the beginning of our buffer */ CurrentVersion = BiosVersion; @@ -764,7 +764,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc } /* Get the Video BIOS Version */ - if (CmpGetBiosVersion(BaseAddress, 8* PAGE_SIZE, Buffer)) + if (CmpGetBiosVersion(BaseAddress, 8 * PAGE_SIZE, Buffer)) { /* Start at the beginning of our buffer */ CurrentVersion = BiosVersion; From 48d386505aaf3c7ad7cf9dfd0f16654b86abcf75 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Sat, 30 Aug 2008 18:40:00 +0000 Subject: [PATCH 247/324] - Updates to our vectored exception handling: - KiUserExceptionDispatcher: RtlDispatchException directly - RtlDispatchException: Call vectored exception handlers before doing anything else - Rename RtlpExecuteVectoredExceptionHandlers to RtlCallVectoredExceptionHandlers as this is the real name - References: "New Vectored Exception Handling in Windows XP" by Matt Pietrek svn path=/trunk/; revision=35812 --- reactos/dll/ntdll/dispatch/dispatch.c | 26 ++++------------- reactos/dll/ntdll/dispatch/i386/dispatch.S | 33 +--------------------- reactos/lib/rtl/i386/except.c | 7 +++++ reactos/lib/rtl/rtlp.h | 7 +++++ reactos/lib/rtl/vectoreh.c | 11 ++++---- 5 files changed, 27 insertions(+), 57 deletions(-) diff --git a/reactos/dll/ntdll/dispatch/dispatch.c b/reactos/dll/ntdll/dispatch/dispatch.c index 6fd4f70024f..c6f749c70bd 100644 --- a/reactos/dll/ntdll/dispatch/dispatch.c +++ b/reactos/dll/ntdll/dispatch/dispatch.c @@ -15,10 +15,6 @@ typedef NTSTATUS (NTAPI *USER_CALL)(PVOID Argument, ULONG ArgumentLength); -EXCEPTION_DISPOSITION NTAPI -RtlpExecuteVectoredExceptionHandlers(IN PEXCEPTION_RECORD ExceptionRecord, - IN PCONTEXT Context); - /* FUNCTIONS ****************************************************************/ /* @@ -32,26 +28,16 @@ KiUserExceptionDispatcher(PEXCEPTION_RECORD ExceptionRecord, EXCEPTION_RECORD NestedExceptionRecord; NTSTATUS Status; - /* call the vectored exception handlers */ - if(RtlpExecuteVectoredExceptionHandlers(ExceptionRecord, - Context) != ExceptionContinueExecution) + /* Dispatch the exception and check the result */ + if (RtlDispatchException(ExceptionRecord, Context)) { - goto ContinueExecution; + /* Continue executing */ + Status = NtContinue(Context, FALSE); } else { - /* Dispatch the exception and check the result */ - if(RtlDispatchException(ExceptionRecord, Context)) - { -ContinueExecution: - /* Continue executing */ - Status = NtContinue(Context, FALSE); - } - else - { - /* Raise an exception */ - Status = NtRaiseException(ExceptionRecord, Context, FALSE); - } + /* Raise an exception */ + Status = NtRaiseException(ExceptionRecord, Context, FALSE); } /* Setup the Exception record */ diff --git a/reactos/dll/ntdll/dispatch/i386/dispatch.S b/reactos/dll/ntdll/dispatch/i386/dispatch.S index 526e5b8f189..00a21f47b82 100644 --- a/reactos/dll/ntdll/dispatch/i386/dispatch.S +++ b/reactos/dll/ntdll/dispatch/i386/dispatch.S @@ -183,43 +183,13 @@ _KiRaiseUserExceptionDispatcher@0: .globl _KiUserExceptionDispatcher@8 _KiUserExceptionDispatcher@8: - /* clear the direct flag - * text from bug 2279 - * if it not clear it means that if an exception occurs while - * the direction flag is set (typically inside memmove), the - * exception handlers will be called with the direction flag still - * set. The Windows x86-32 and x86-64 ABI requires that the - * direction flag be Calling memset() with a compile-time constant - * size on both GCC and MSVC will result in inlining a "rep stosd" - * instruction. Because of the ABI, they will assume that the - * direction flag is clear and not emit a "cld" instruction. - * Using memset() in an exception handler therefore will - * corrupt memory if the exception occurred during a reverse copy - * such as a forward overlapping memmove(). - * - * For reliability and ease of debugging, please add "cld" to the beginning of - * KiUserExceptionDispatcher. Note that the same will be true of x86-64 whenever - * that happens. This does not affect continuing execution; the CONTEXT of the - * exception has the direction flag set and will be restored upon NtContinue. - * KiUserApcDispatcher and KiUserCallbackDispatcher need to be evaluated for this - * issue. - */ - + /* Clear direction flag */ cld /* Save the Context and Exception Records */ mov ecx, [esp+4] mov ebx, [esp] - /* Call the vectored exception handler */ - push ecx - push ebx - call _RtlpExecuteVectoredExceptionHandlers@8 - - /* Check for success */ - or al, al - jnz ContinueExecution - /* Dispatch the exception */ sub esp, 8 call _RtlDispatchException@8 @@ -228,7 +198,6 @@ _KiUserExceptionDispatcher@8: or al, al jz RaiseException -ContinueExecution: /* Pop off the records */ pop ebx pop ecx diff --git a/reactos/lib/rtl/i386/except.c b/reactos/lib/rtl/i386/except.c index dc56aed3ec0..087ab74fcb1 100644 --- a/reactos/lib/rtl/i386/except.c +++ b/reactos/lib/rtl/i386/except.c @@ -74,6 +74,13 @@ RtlDispatchException(IN PEXCEPTION_RECORD ExceptionRecord, ULONG_PTR StackLow, StackHigh; ULONG_PTR RegistrationFrameEnd; + /* Call any registered vectored handlers */ + if (RtlCallVectoredExceptionHandlers(ExceptionRecord, Context)) + { + /* Exception handled, continue execution */ + return TRUE; + } + /* Get the current stack limits and registration frame */ RtlpGetStackLimits(&StackLow, &StackHigh); RegistrationFrame = RtlpGetExceptionList(); diff --git a/reactos/lib/rtl/rtlp.h b/reactos/lib/rtl/rtlp.h index 845f625cbee..4bfba098a83 100644 --- a/reactos/lib/rtl/rtlp.h +++ b/reactos/lib/rtl/rtlp.h @@ -37,6 +37,13 @@ VOID NTAPI RtlpSetExceptionList(PEXCEPTION_REGISTRATION_RECORD NewExceptionList); +BOOLEAN +NTAPI +RtlCallVectoredExceptionHandlers( + IN PEXCEPTION_RECORD ExceptionRecord, + IN PCONTEXT Context +); + typedef struct _DISPATCHER_CONTEXT { PEXCEPTION_REGISTRATION_RECORD RegistrationPointer; diff --git a/reactos/lib/rtl/vectoreh.c b/reactos/lib/rtl/vectoreh.c index d1a39138622..52d6667cce6 100644 --- a/reactos/lib/rtl/vectoreh.c +++ b/reactos/lib/rtl/vectoreh.c @@ -28,9 +28,10 @@ typedef struct _RTL_VECTORED_EXCEPTION_HANDLER /* FUNCTIONS ***************************************************************/ -EXCEPTION_DISPOSITION NTAPI -RtlpExecuteVectoredExceptionHandlers(IN PEXCEPTION_RECORD ExceptionRecord, - IN PCONTEXT Context) +BOOLEAN +NTAPI +RtlCallVectoredExceptionHandlers(IN PEXCEPTION_RECORD ExceptionRecord, + IN PCONTEXT Context) { PLIST_ENTRY CurrentEntry; PRTL_VECTORED_EXCEPTION_HANDLER veh; @@ -55,7 +56,7 @@ RtlpExecuteVectoredExceptionHandlers(IN PEXCEPTION_RECORD ExceptionRecord, if(VectoredHandler(&ExceptionInfo) == EXCEPTION_CONTINUE_EXECUTION) { - return ExceptionContinueSearch; + return TRUE; } RtlEnterCriticalSection(&RtlpVectoredExceptionLock); @@ -63,7 +64,7 @@ RtlpExecuteVectoredExceptionHandlers(IN PEXCEPTION_RECORD ExceptionRecord, RtlLeaveCriticalSection(&RtlpVectoredExceptionLock); } - return ExceptionContinueExecution; + return FALSE; } VOID From d44a0a0009325fe644a201d4b49cd10533e992af Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sat, 30 Aug 2008 18:53:27 +0000 Subject: [PATCH 248/324] Primary implementation of sfc.dll. To have it "fully" working, sfc_os.dll is will be needed. It does nothing more. Don't shout, Fireball agreed for commit ;). svn path=/trunk/; revision=35813 --- reactos/baseaddress.rbuild | 1 + reactos/boot/bootdata/packages/reactos.dff | 1 + reactos/dll/win32/sfc/precomp.h | 14 +++ reactos/dll/win32/sfc/sfc.c | 130 +++++++++++++++++++++ reactos/dll/win32/sfc/sfc.rbuild | 8 ++ reactos/dll/win32/sfc/sfc.spec | 18 +++ reactos/dll/win32/win32.rbuild | 3 + reactos/include/psdk/srrestoreptapi.h | 64 ++++++++++ 8 files changed, 239 insertions(+) create mode 100644 reactos/dll/win32/sfc/precomp.h create mode 100644 reactos/dll/win32/sfc/sfc.c create mode 100644 reactos/dll/win32/sfc/sfc.rbuild create mode 100644 reactos/dll/win32/sfc/sfc.spec create mode 100644 reactos/include/psdk/srrestoreptapi.h diff --git a/reactos/baseaddress.rbuild b/reactos/baseaddress.rbuild index f2cb3154735..d826b3ec2ef 100644 --- a/reactos/baseaddress.rbuild +++ b/reactos/baseaddress.rbuild @@ -148,6 +148,7 @@ + diff --git a/reactos/boot/bootdata/packages/reactos.dff b/reactos/boot/bootdata/packages/reactos.dff index b6a9cb01bf8..e6c973dfca5 100644 --- a/reactos/boot/bootdata/packages/reactos.dff +++ b/reactos/boot/bootdata/packages/reactos.dff @@ -320,6 +320,7 @@ dll\win32\security\security.dll 1 dll\win32\sensapi\sensapi.dll 1 dll\win32\serialui\serialui.dll 1 dll\win32\setupapi\setupapi.dll 1 +dll\win32\sfc\sfc.dll 1 dll\win32\shdocvw\shdocvw.dll 1 dll\win32\shell32\shell32.dll 1 dll\win32\shfolder\shfolder.dll 1 diff --git a/reactos/dll/win32/sfc/precomp.h b/reactos/dll/win32/sfc/precomp.h new file mode 100644 index 00000000000..2801b0ffdbd --- /dev/null +++ b/reactos/dll/win32/sfc/precomp.h @@ -0,0 +1,14 @@ +#ifndef _PRECOMP_H__ +#define _PRECOMP_H__ + +#include +#include +#include + +DWORD WINAPI sfc_8(); +DWORD WINAPI sfc_9(); + +typedef BOOL (WINAPI *PSRSRPA)(PRESTOREPOINTINFOA, PSTATEMGRSTATUS); +typedef BOOL (WINAPI *PSRSRPW)(PRESTOREPOINTINFOW, PSTATEMGRSTATUS); + +#endif diff --git a/reactos/dll/win32/sfc/sfc.c b/reactos/dll/win32/sfc/sfc.c new file mode 100644 index 00000000000..ed180e199d2 --- /dev/null +++ b/reactos/dll/win32/sfc/sfc.c @@ -0,0 +1,130 @@ +/* + * System File Checker (Windows File Protection) + * + * Copyright 2008 Pierre Schweitzer + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "precomp.h" + +HINSTANCE hLibModule; + +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +{ + switch (fdwReason) + { + case DLL_PROCESS_ATTACH: + { + DisableThreadLibraryCalls(hinstDLL); + hLibModule = hinstDLL; + break; + } + case DLL_PROCESS_DETACH: + { + break; + } + } + + return TRUE; +} + +DWORD WINAPI sfc_8() +{ + return ERROR_CALL_NOT_IMPLEMENTED; +} + +DWORD WINAPI sfc_9() +{ + return ERROR_CALL_NOT_IMPLEMENTED; +} + +BOOL WINAPI SRSetRestorePointA(PRESTOREPOINTINFOA pRestorePtSpec, PSTATEMGRSTATUS pSMgrStatus) +{ + HMODULE hModule; + PSRSRPA pSRSRPA; + BOOL bStatus = FALSE; + LPCWSTR lpLibFileName = L"srclient.dll"; + LPCSTR lpProcName = "SRSetRestorePointA"; + + hModule = LoadLibraryW(lpLibFileName); + if (hModule) + { + pSRSRPA = (PSRSRPA)GetProcAddress(hModule, lpProcName); + if (pSRSRPA) + { + bStatus = pSRSRPA(pRestorePtSpec, pSMgrStatus); + } + else + { + if (pSMgrStatus) + { + pSMgrStatus->nStatus = ERROR_CALL_NOT_IMPLEMENTED; + } + } + FreeLibrary(hModule); + } + else + { + if (pSMgrStatus) + { + pSMgrStatus->nStatus = ERROR_CALL_NOT_IMPLEMENTED; + } + } + + return bStatus; +} + +BOOL WINAPI SRSetRestorePointW(PRESTOREPOINTINFOW pRestorePtSpec, PSTATEMGRSTATUS pSMgrStatus) +{ + HMODULE hModule; + PSRSRPW pSRSRPW; + BOOL bStatus = FALSE; + LPCWSTR lpLibFileName = L"srclient.dll"; + LPCSTR lpProcName = "SRSetRestorePointW"; + + hModule = LoadLibraryW(lpLibFileName); + if (hModule) + { + pSRSRPW = (PSRSRPW)GetProcAddress(hModule, lpProcName); + if (pSRSRPW) + { + bStatus = pSRSRPW(pRestorePtSpec, pSMgrStatus); + } + else + { + if (pSMgrStatus) + { + pSMgrStatus->nStatus = ERROR_CALL_NOT_IMPLEMENTED; + } + } + FreeLibrary(hModule); + } + else + { + if (pSMgrStatus) + { + pSMgrStatus->nStatus = ERROR_CALL_NOT_IMPLEMENTED; + } + } + + return bStatus; +} + +BOOL WINAPI SfpVerifyFile(LPCSTR pszFileName, LPSTR pszError, DWORD dwErrSize) +{ + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} diff --git a/reactos/dll/win32/sfc/sfc.rbuild b/reactos/dll/win32/sfc/sfc.rbuild new file mode 100644 index 00000000000..d3ad6561cb4 --- /dev/null +++ b/reactos/dll/win32/sfc/sfc.rbuild @@ -0,0 +1,8 @@ + + + . + kernel32 + sfc.c + sfc.spec + precomp.h + diff --git a/reactos/dll/win32/sfc/sfc.spec b/reactos/dll/win32/sfc/sfc.spec new file mode 100644 index 00000000000..dbfea33c6f6 --- /dev/null +++ b/reactos/dll/win32/sfc/sfc.spec @@ -0,0 +1,18 @@ +@ stub sfc_1 +@ stub sfc_2 +@ stub sfc_3 +@ stub sfc_4 +@ stub sfc_5 +@ stub sfc_6 +@ stub sfc_7 +@ stdcall sfc_8 () +@ stdcall sfc_9 () +@ stdcall SRSetRestorePoint (ptr ptr) SRSetRestorePointA +@ stdcall SRSetRestorePointA (ptr ptr) +@ stdcall SRSetRestorePointW (ptr ptr) +@ stub SfcGetNextProtectedFile +@ stub SfcIsFileProtected +@ stub SfcWLEventLogoff +@ stub SfcWLEventLogon +@ stdcall SfpVerifyFile (ptr ptr long) +@ stdcall start (long long ptr) DllMain \ No newline at end of file diff --git a/reactos/dll/win32/win32.rbuild b/reactos/dll/win32/win32.rbuild index 5be582cddd6..1b9714b873d 100644 --- a/reactos/dll/win32/win32.rbuild +++ b/reactos/dll/win32/win32.rbuild @@ -295,6 +295,9 @@ + + + diff --git a/reactos/include/psdk/srrestoreptapi.h b/reactos/include/psdk/srrestoreptapi.h new file mode 100644 index 00000000000..456186c4094 --- /dev/null +++ b/reactos/include/psdk/srrestoreptapi.h @@ -0,0 +1,64 @@ +/* + * Definitions for the System File Checker (Windows File Protection) + * + * Copyright 2008 Pierre Schweitzer + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef _SRRESTOREPTAPI_H +#define _SRRESTOREPTAPI_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Defines */ + +#define MAX_DESC 64 +#define MAX_DESC_W 256 + +/* Types */ + +typedef struct _RESTOREPTINFOA { + DWORD dwEventType; + DWORD dwRestorePtType; + INT64 llSequenceNumber; + CHAR szDescription[MAX_DESC]; +} RESTOREPOINTINFOA, *PRESTOREPOINTINFOA; + +typedef struct _RESTOREPTINFOW { + DWORD dwEventType; + DWORD dwRestorePtType; + INT64 llSequenceNumber; + WCHAR szDescription[MAX_DESC_W]; +} RESTOREPOINTINFOW, *PRESTOREPOINTINFOW; + +typedef struct _SMGRSTATUS { + DWORD nStatus; + INT64 llSequenceNumber; +} STATEMGRSTATUS, *PSTATEMGRSTATUS; + +/* Functions */ + +BOOL WINAPI SRSetRestorePointA(PRESTOREPOINTINFOA, PSTATEMGRSTATUS); +BOOL WINAPI SRSetRestorePointW(PRESTOREPOINTINFOW, PSTATEMGRSTATUS); +DWORD WINAPI SRRemoveRestorePoint(DWORD); + +#ifdef __cplusplus +} +#endif + +#endif From 3a6cb4814691904bc2d96287a4717cf5d14d74ba Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Sat, 30 Aug 2008 19:05:19 +0000 Subject: [PATCH 249/324] - Implement enumerating network components (Client/Service/Transport) using NetCfg COM api - Add a check box to for enabling/disabling notification for network problems - Implement IOleCommandTarget interface for the LAN status dialog - Register the LAN property and LAN status CLSIDs svn path=/trunk/; revision=35814 --- reactos/dll/win32/netshell/lanconnectui.c | 256 +++++++++--------- reactos/dll/win32/netshell/lang/de-DE.rc | 4 +- reactos/dll/win32/netshell/lang/en-US.rc | 2 +- reactos/dll/win32/netshell/lanstatusui.c | 170 ++++++++++++ reactos/dll/win32/netshell/netshell.c | 43 ++- reactos/dll/win32/netshell/netshell.rbuild | 1 + reactos/dll/win32/netshell/precomp.h | 7 +- .../dll/win32/netshell/shfldr_netconnect.c | 2 + 8 files changed, 349 insertions(+), 136 deletions(-) create mode 100644 reactos/dll/win32/netshell/lanstatusui.c diff --git a/reactos/dll/win32/netshell/lanconnectui.c b/reactos/dll/win32/netshell/lanconnectui.c index d42c97be52e..e44462654af 100644 --- a/reactos/dll/win32/netshell/lanconnectui.c +++ b/reactos/dll/win32/netshell/lanconnectui.c @@ -1,5 +1,9 @@ #include +/// CLASSID +/// {7007ACC5-3202-11D1-AAD2-00805FC1270E} +/// open network properties and wlan properties + typedef enum { NET_TYPE_CLIENT = 1, @@ -21,11 +25,6 @@ typedef struct LONG ref; }INetConnectionPropertyUiImpl, *LPINetConnectionPropertyUiImpl; - -/// CLASSID -/// {7007ACC5-3202-11D1-AAD2-00805FC1270E} -/// open network properties and wlan properties - HPROPSHEETPAGE InitializePropertySheetPage(LPWSTR resname, DLGPROC dlgproc, LPARAM lParam, LPWSTR szTitle) { @@ -46,56 +45,6 @@ InitializePropertySheetPage(LPWSTR resname, DLGPROC dlgproc, LPARAM lParam, LPWS return CreatePropertySheetPageW(&ppage); } -HRESULT -LaunchUIDlg(UINT * pResourceIDs, DLGPROC * pDlgs, UINT Count, NETCON_PROPERTIES * pProperties) -{ - HPROPSHEETPAGE * hpsp; - PROPSHEETHEADERW psh; - BOOL ret; - UINT Index, Offset; - - hpsp = CoTaskMemAlloc(Count * sizeof(HPROPSHEETPAGE)); - if (!hpsp) - return E_OUTOFMEMORY; - - ZeroMemory(hpsp, Count * sizeof(HPROPSHEETPAGE)); - - Index = 0; - Offset = 0; - do - { - hpsp[Offset] = InitializePropertySheetPage(MAKEINTRESOURCEW(pResourceIDs[Index]), pDlgs[Index], (LPARAM)pProperties, NULL); - if (hpsp[Offset]) - Offset++; - - }while(++Index < Count); - - if (!Offset) - { - CoTaskMemFree(hpsp); - return E_FAIL; - } - - - ZeroMemory(&psh, sizeof(PROPSHEETHEADERW)); - psh.dwSize = sizeof(PROPSHEETHEADERW); - psh.dwFlags = PSP_DEFAULT | PSH_PROPTITLE; - psh.pszCaption = pProperties->pszwName; - psh.hwndParent = NULL; - psh.u3.phpage = hpsp; - psh.nPages = Offset; - psh.hInstance = netshell_hInstance; - - - ret = PropertySheetW(&psh); - CoTaskMemFree(hpsp); - - if (ret < 0) - return E_FAIL; - else - return S_OK; -} - VOID AddItemToListView(HWND hDlgCtrl, PNET_ITEM pItem, LPWSTR szName) { @@ -106,8 +55,8 @@ AddItemToListView(HWND hDlgCtrl, PNET_ITEM pItem, LPWSTR szName) lvItem.pszText = szName; lvItem.lParam = (LPARAM)pItem; lvItem.iItem = ListView_GetItemCount(hDlgCtrl); - - SendMessageW(hDlgCtrl, LVM_INSERTITEMW, 0, (LPARAM)&lvItem); + lvItem.iItem = SendMessageW(hDlgCtrl, LVM_INSERTITEMW, 0, (LPARAM)&lvItem); + ListView_SetCheckState(hDlgCtrl, lvItem.iItem, TRUE); } VOID @@ -117,8 +66,8 @@ EnumClientServiceProtocol(HWND hDlgCtrl, HKEY hKey, UINT Type) DWORD dwSize; DWORD dwRetVal; DWORD dwCharacteristics; - WCHAR szName[60]; - WCHAR szText[40]; + WCHAR szName[100]; + WCHAR szText[100]; WCHAR szHelp[200]; HKEY hSubKey; static WCHAR szNDI[] = L"\\Ndi"; @@ -173,6 +122,10 @@ EnumClientServiceProtocol(HWND hDlgCtrl, HKEY hKey, UINT Type) RegCloseKey(hSubKey); } + if (!wcslen(szText)) + continue; + + pItem = CoTaskMemAlloc(sizeof(NET_ITEM)); if (!pItem) continue; @@ -192,42 +145,98 @@ EnumClientServiceProtocol(HWND hDlgCtrl, HKEY hKey, UINT Type) } +VOID +EnumComponents(HWND hDlgCtrl, INetCfg * pNCfg, const GUID * CompGuid, UINT Type) +{ + HRESULT hr; + IEnumNetCfgComponent * pENetCfg; + INetCfgComponent *pNCfgComp; + ULONG Num; + DWORD dwCharacteristics; + LPOLESTR pDisplayName, pHelpText; + PNET_ITEM pItem; + + + hr = INetCfg_EnumComponents(pNCfg, CompGuid, &pENetCfg); + if (FAILED(hr)) + { + INetCfg_Release(pNCfg); + return; + } + while(IEnumNetCfgComponent_Next(pENetCfg, 1, &pNCfgComp, &Num) == S_OK) + { + hr = INetCfgComponent_GetCharacteristics(pNCfgComp, &dwCharacteristics); + if (SUCCEEDED(hr) && (dwCharacteristics & NCF_HIDDEN)) + { + INetCfgComponent_Release(pNCfgComp); + continue; + } + pDisplayName = NULL; + pHelpText = NULL; + hr = INetCfgComponent_GetDisplayName(pNCfgComp, &pDisplayName); + hr = INetCfgComponent_GetHelpText(pNCfgComp, &pHelpText); + + pItem = CoTaskMemAlloc(sizeof(NET_ITEM)); + if (!pItem) + continue; + pItem->dwCharacteristics = dwCharacteristics; + pItem->szHelp = pHelpText; + pItem->Type = Type; + AddItemToListView(hDlgCtrl, pItem, pDisplayName); + CoTaskMemFree(pDisplayName); + + INetCfgComponent_Release(pNCfgComp); + } + IEnumNetCfgComponent_Release(pENetCfg); +} + VOID InitializeLANPropertiesUIDlg(HWND hwndDlg) { - static WCHAR szNetClient[] = L"SYSTEM\\CurrentControlSet\\Control\\Network\\{4d36e973-e325-11ce-bfc1-08002be10318}"; - static WCHAR szNetService[] = L"SYSTEM\\CurrentControlSet\\Control\\Network\\{4d36e974-e325-11ce-bfc1-08002be10318}"; - static WCHAR szNetProtocol[] =L"System\\CurrentControlSet\\Control\\Network\\{4D36E975-E325-11CE-BFC1-08002BE10318}"; - HKEY hKey; - HWND hDlgCtrl; + HRESULT hr; + INetCfg * pNCfg; + HWND hDlgCtrl = GetDlgItem(hwndDlg, IDC_COMPONENTSLIST); + LVCOLUMNW lc; + RECT rc; + DWORD dwStyle; - hDlgCtrl = GetDlgItem(hwndDlg, IDC_COMPONENTSLIST); - /* Enumerate Clients */ - if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szNetClient, 0, KEY_READ, &hKey) == ERROR_SUCCESS) + memset(&lc, 0, sizeof(LV_COLUMN)); + lc.mask = LVCF_TEXT | LVCF_SUBITEM | LVCF_FMT; + lc.fmt = LVCFMT_FIXED_WIDTH; + if (GetClientRect(hDlgCtrl, &rc)) { - EnumClientServiceProtocol(hwndDlg, hKey, NET_TYPE_CLIENT); - RegCloseKey(hKey); - } - - /* Enumerate Service */ - if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szNetService, 0, KEY_READ, &hKey) == ERROR_SUCCESS) - { - EnumClientServiceProtocol(hwndDlg, hKey, NET_TYPE_SERVICE); - RegCloseKey(hKey); - } - - /* Enumerate Protocol */ - if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szNetProtocol, 0, KEY_READ, &hKey) == ERROR_SUCCESS) - { - EnumClientServiceProtocol(hwndDlg, hKey, NET_TYPE_PROTOCOL); - RegCloseKey(hKey); + lc.mask |= LVCF_WIDTH; + lc.cx = rc.right - rc.left; + } + lc.pszText = L""; + (void)SendMessageW(hDlgCtrl, LVM_INSERTCOLUMNW, 0, (LPARAM)&lc); + dwStyle = (DWORD) SendMessage(hDlgCtrl, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0); + dwStyle = dwStyle | LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES; + SendMessage(hDlgCtrl, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, dwStyle); + + + + hr = CoCreateInstance(&CLSID_CNetCfg, NULL, CLSCTX_INPROC_SERVER, &IID_INetCfg, (LPVOID*)&pNCfg); + if (FAILED(hr)) + return; + + hr = INetCfg_Initialize(pNCfg, NULL); + if (FAILED(hr)) + { + INetCfg_Release(pNCfg); + return; } + EnumComponents(hDlgCtrl, pNCfg, &GUID_DEVCLASS_NETCLIENT, NET_TYPE_CLIENT); + EnumComponents(hDlgCtrl, pNCfg, &GUID_DEVCLASS_NETSERVICE, NET_TYPE_SERVICE); + EnumComponents(hDlgCtrl, pNCfg, &GUID_DEVCLASS_NETTRANS, NET_TYPE_PROTOCOL); + INetCfg_Release(pNCfg); } + INT_PTR CALLBACK LANPropertiesUIDlg( @@ -238,7 +247,11 @@ LANPropertiesUIDlg( ) { PROPSHEETPAGE *page; - NETCON_PROPERTIES * pProperties = (NETCON_PROPERTIES*)GetWindowLongPtr(hwndDlg, DWLP_USER); + LPNMLISTVIEW lppl; + LVITEMW li; + PNET_ITEM pItem; + NETCON_PROPERTIES * pProperties; + switch(uMsg) { case WM_INITDIALOG: @@ -257,54 +270,41 @@ LANPropertiesUIDlg( } InitializeLANPropertiesUIDlg(hwndDlg); return TRUE; + case WM_NOTIFY: + lppl = (LPNMLISTVIEW) lParam; + if (lppl->hdr.code == LVN_ITEMCHANGING) + { + ZeroMemory(&li, sizeof(li)); + li.mask = LVIF_PARAM; + li.iItem = lppl->iItem; + if (!SendMessageW(lppl->hdr.hwndFrom, LVM_GETITEMW, 0, (LPARAM)&li)) + return TRUE; + + pItem = (PNET_ITEM)li.lParam; + if (!pItem) + return TRUE; + + if (!(lppl->uOldState & LVIS_FOCUSED) && (lppl->uNewState & LVIS_FOCUSED)) + { + /* new focused item */ + if (pItem->dwCharacteristics & NCF_NOT_USER_REMOVABLE) + EnableWindow(GetDlgItem(hwndDlg, IDC_UNINSTALL), FALSE); + else + EnableWindow(GetDlgItem(hwndDlg, IDC_UNINSTALL), TRUE); + + if (pItem->dwCharacteristics & NCF_HAS_UI) + EnableWindow(GetDlgItem(hwndDlg, IDC_PROPERTIES), TRUE); + else + EnableWindow(GetDlgItem(hwndDlg, IDC_PROPERTIES), FALSE); + + SendDlgItemMessageW(hwndDlg, IDC_DESCRIPTION, WM_SETTEXT, 0, (LPARAM)pItem->szHelp); + } + } + break; } return FALSE; } - -HRESULT -ShowLANConnectionPropertyDialog(NETCON_PROPERTIES * pProperties) -{ - UINT ResourceId[1] = { IDD_NETPROPERTIES }; - DLGPROC Dlgs[1] = {LANPropertiesUIDlg}; - INITCOMMONCONTROLSEX ic; - - - ic.dwSize = sizeof(INITCOMMONCONTROLSEX); - ic.dwICC = ICC_LISTVIEW_CLASSES; - InitCommonControlsEx(&ic); - - return LaunchUIDlg(ResourceId, Dlgs, 1, pProperties); -} - -INT_PTR -CALLBACK -LANStatusUIDlg( - HWND hwndDlg, - UINT uMsg, - WPARAM wParam, - LPARAM lParam -) -{ - NETCON_PROPERTIES * pProperties = (NETCON_PROPERTIES*)GetWindowLongPtr(hwndDlg, DWLP_USER); - switch(uMsg) - { - case WM_INITDIALOG: - pProperties = (NETCON_PROPERTIES*)lParam; - return TRUE; - } - return FALSE; -} - - -HRESULT -ShowLANConnectionStatusDialog(NETCON_PROPERTIES * pProperties) -{ - UINT ResourceId[1] = { IDD_NETSTATUS }; - DLGPROC Dlgs[1] = {LANStatusUIDlg}; - return LaunchUIDlg(ResourceId, Dlgs, 1, pProperties); -} - static HRESULT WINAPI diff --git a/reactos/dll/win32/netshell/lang/de-DE.rc b/reactos/dll/win32/netshell/lang/de-DE.rc index b33fd563031..b497886071d 100644 --- a/reactos/dll/win32/netshell/lang/de-DE.rc +++ b/reactos/dll/win32/netshell/lang/de-DE.rc @@ -5,11 +5,11 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION CAPTION "Allgemein" FONT 8, "MS Shell Dlg" BEGIN + CONTROL "List3", IDC_COMPONENTSLIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOCOLUMNHEADER | WS_BORDER | WS_TABSTOP | LVS_EX_FULLROWSELECT, 9, 71, 230, 55 LTEXT "Verbindung herstellen ьber:", -1, 9,9,217,8 - EDITTEXT IDC_NETCARDNAME, 9, 21, 230, 12, WS_BORDER | WS_DISABLED | WS_TABSTOP + EDITTEXT IDC_NETCARDNAME, 9, 21, 230, 12, WS_BORDER | WS_TABSTOP | ES_READONLY PUSHBUTTON "&Konfigurieren", IDC_CONFIGURE, 189, 38, 50, 14 LTEXT "Diese &Verbindung verwendet folgende Elemente:", -1, 9, 59, 217, 8 - CONTROL "List3", IDC_COMPONENTSLIST, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | WS_BORDER | WS_TABSTOP, 9, 71, 230, 55 PUSHBUTTON "&Installieren", IDC_INSTALL, 9, 130, 65, 14, WS_DISABLED | WS_TABSTOP PUSHBUTTON "&Deinstallieren", IDC_UNINSTALL, 90, 130, 65, 14, WS_DISABLED | WS_TABSTOP PUSHBUTTON "&Eigenschaften", IDC_PROPERTIES, 174, 130, 65, 14 diff --git a/reactos/dll/win32/netshell/lang/en-US.rc b/reactos/dll/win32/netshell/lang/en-US.rc index 69d88789425..a4cf3995dc1 100644 --- a/reactos/dll/win32/netshell/lang/en-US.rc +++ b/reactos/dll/win32/netshell/lang/en-US.rc @@ -5,11 +5,11 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg" BEGIN + CONTROL "", IDC_COMPONENTSLIST, "SysListView32", LVS_LIST | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 9, 71, 230, 55 LTEXT "Connect Using:", -1, 9,9,217,8 EDITTEXT IDC_NETCARDNAME, 9, 21, 230, 12, WS_BORDER | WS_DISABLED | WS_TABSTOP PUSHBUTTON "&Configure", IDC_CONFIGURE, 189, 38, 50, 14 LTEXT "Components checked are used by this connection:", -1, 9, 59, 217, 8 - CONTROL "", IDC_COMPONENTSLIST, "SysListView32", LVS_LIST | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 9, 71, 230, 55 PUSHBUTTON "&Install", IDC_INSTALL, 9, 130, 65, 14, WS_DISABLED | WS_TABSTOP PUSHBUTTON "&Uninstall", IDC_UNINSTALL, 90, 130, 65, 14, WS_DISABLED | WS_TABSTOP PUSHBUTTON "&Properties", IDC_PROPERTIES, 174, 130, 65, 14 diff --git a/reactos/dll/win32/netshell/lanstatusui.c b/reactos/dll/win32/netshell/lanstatusui.c new file mode 100644 index 00000000000..5b8591cb69f --- /dev/null +++ b/reactos/dll/win32/netshell/lanstatusui.c @@ -0,0 +1,170 @@ +#include + + +/// CLSID +/// HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{7007ACCF-3202-11D1-AAD2-00805FC1270E} +// IID B722BCCB-4E68-101B-A2BC-00AA00404770 +typedef struct +{ + IOleCommandTarget * lpVtbl; + LONG ref; +}ILanStatusImpl, *LPILanStatusImpl; + + +INT_PTR +CALLBACK +LANStatusUIDlg( + HWND hwndDlg, + UINT uMsg, + WPARAM wParam, + LPARAM lParam +) +{ + switch(uMsg) + { + case WM_INITDIALOG: + return TRUE; + } + return FALSE; +} + + + +static +HRESULT +WINAPI +IOleCommandTarget_fnQueryInterface( + IOleCommandTarget * iface, + REFIID iid, + LPVOID * ppvObj) +{ + ILanStatusImpl * This = (ILanStatusImpl*)iface; + *ppvObj = NULL; + + if (IsEqualIID (iid, &IID_IUnknown) || + IsEqualIID (iid, &IID_IOleCommandTarget)) + { + *ppvObj = This; + IUnknown_AddRef(iface); + return S_OK; + } + + return E_NOINTERFACE; +} + +static +ULONG +WINAPI +IOleCommandTarget_fnAddRef( + IOleCommandTarget * iface) +{ + ILanStatusImpl * This = (ILanStatusImpl*)iface; + ULONG refCount = InterlockedIncrement(&This->ref); + + return refCount; +} + +static +ULONG +WINAPI +IOleCommandTarget_fnRelease( + IOleCommandTarget * iface) +{ + ILanStatusImpl * This = (ILanStatusImpl*)iface; + ULONG refCount = InterlockedDecrement(&This->ref); + + if (!refCount) + { + CoTaskMemFree (This); + } + return refCount; +} + +static +HRESULT +WINAPI +IOleCommandTarget_fnQueryStatus( + IOleCommandTarget * iface, + const GUID *pguidCmdGroup, + ULONG cCmds, + OLECMD *prgCmds, + OLECMDTEXT *pCmdText) +{ + MessageBoxW(NULL, L"IOleCommandTarget_fnQueryStatus", NULL, MB_OK); + return E_NOTIMPL; +} + +static +HRESULT +WINAPI +IOleCommandTarget_fnExec( + IOleCommandTarget * iface, + const GUID *pguidCmdGroup, + DWORD nCmdID, + DWORD nCmdexecopt, + VARIANT *pvaIn, + VARIANT *pvaOut) +{ + NOTIFYICONDATA nid; + HWND hwndDlg; + //ILanStatusImpl * This = (ILanStatusImpl*)iface; + + hwndDlg = CreateDialogW(netshell_hInstance, MAKEINTRESOURCEW(IDD_NETSTATUS), NULL, LANStatusUIDlg); + if (pguidCmdGroup) + { + if (IsEqualIID(pguidCmdGroup, &CGID_ShellServiceObject)) + { + nid.cbSize = sizeof(nid); + nid.uID = 100; + nid.uFlags = NIF_ICON; + nid.u.uVersion = NOTIFYICON_VERSION; + nid.hWnd = hwndDlg; + nid.hIcon = LoadIcon(netshell_hInstance, MAKEINTRESOURCE(IDI_SHELL_NETWORK_FOLDER)); + + Shell_NotifyIcon(NIM_ADD, &nid); + return S_OK; + } + } + return S_OK; +} + + +static const IOleCommandTargetVtbl vt_OleCommandTarget = +{ + IOleCommandTarget_fnQueryInterface, + IOleCommandTarget_fnAddRef, + IOleCommandTarget_fnRelease, + IOleCommandTarget_fnQueryStatus, + IOleCommandTarget_fnExec, +}; + + +HRESULT WINAPI LanConnectStatusUI_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) +{ + ILanStatusImpl * This; + + if (!ppv) + return E_POINTER; + + if (pUnkOuter) + return CLASS_E_NOAGGREGATION; + + This = (ILanStatusImpl *) CoTaskMemAlloc(sizeof (ILanStatusImpl)); + if (!This) + return E_OUTOFMEMORY; + + This->ref = 1; + This->lpVtbl = (IOleCommandTarget*)&vt_OleCommandTarget; + + if (!SUCCEEDED (IOleCommandTarget_fnQueryInterface ((IOleCommandTarget*)This, riid, ppv))) + { + IOleCommandTarget_Release((IUnknown*)This); + return E_NOINTERFACE; + } + + IOleCommandTarget_Release((IUnknown*)This); + return S_OK; +} + + + diff --git a/reactos/dll/win32/netshell/netshell.c b/reactos/dll/win32/netshell/netshell.c index 515a16e55e2..9d1b0b39ba1 100644 --- a/reactos/dll/win32/netshell/netshell.c +++ b/reactos/dll/win32/netshell/netshell.c @@ -1,12 +1,15 @@ #include "precomp.h" +#include +#include HINSTANCE netshell_hInstance; const GUID CLSID_LANConnectUI = {0x7007ACC5, 0x3202, 0x11D1, {0xAA, 0xD2, 0x00, 0x80, 0x5F, 0xC1, 0x27, 0x0E}}; const GUID CLSID_NetworkConnections = {0x7007ACC7, 0x3202, 0x11D1, {0xAA, 0xD2, 0x00, 0x80, 0x5F, 0xC1, 0x27, 0x0E}}; -const GUID GUID_DEVCLASS_NET = {0x4d36e972, 0xe325, 0x11ce, {0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18}}; +const GUID CLSID_LanConnectStatusUI = {0x7007ACCF, 0x3202, 0x11D1, {0xAA, 0xD2, 0x00, 0x80, 0x5F, 0xC1, 0x27, 0x0E}}; -static const WCHAR szNetConnectClass[] = L"CLSID\\{7007ACC7-3202-11D1-AAD2-00805FC1270E}"; -static const WCHAR szLanConnectUI[] = L"CLSID\\{7007ACC5-3202-11D1-AA-D200805FC1270E}"; +static const WCHAR szNetConnectClass[] = L"CLSID\\{7007ACC7-3202-11D1-AAD2-00805FC1270E}"; +static const WCHAR szLanConnectUI[] = L"CLSID\\{7007ACC5-3202-11D1-AA-D200805FC1270E}"; +static const WCHAR szLanConnectStatusUI[] = L"CLSID\\{7007ACCF-3202-11D1-AA-D200805FC1270E}"; static const WCHAR szNamespaceKey[] = L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ControlPanel\\NameSpace\\{7007ACC7-3202-11D1-AAD2-00805FC1270E}"; static INTERFACE_TABLE InterfaceTable[] = @@ -23,6 +26,10 @@ static INTERFACE_TABLE InterfaceTable[] = &CLSID_LANConnectUI, LanConnectUI_Constructor }, + { + &CLSID_LanConnectStatusUI, + LanConnectStatusUI_Constructor + }, { NULL, NULL @@ -62,6 +69,7 @@ DllRegisterServer(void) WCHAR szNet[20]; UINT Length, Offset; + if (RegCreateKeyExW(HKEY_CLASSES_ROOT, szNetConnectClass, 0, NULL, 0, KEY_WRITE, NULL, &hKey, NULL) != ERROR_SUCCESS) return SELFREG_E_CLASS; @@ -98,6 +106,7 @@ DllRegisterServer(void) if (RegCreateKeyExW(hKey, L"InProcServer32", 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS) { RegSetValueW(hSubKey, NULL, REG_SZ, &szName[1], (Offset+1) * sizeof(WCHAR)); + RegSetValueExW(hSubKey, L"ThreadingModel", 0, REG_SZ, (LPBYTE)L"Both", 10); RegCloseKey(hSubKey); } @@ -108,6 +117,32 @@ DllRegisterServer(void) } RegCloseKey(hKey); + + if (RegCreateKeyExW(HKEY_CLASSES_ROOT, szLanConnectUI, 0, NULL, 0, KEY_WRITE, NULL, &hKey, NULL) != ERROR_SUCCESS) + return SELFREG_E_CLASS; + + if (RegCreateKeyExW(hKey, L"InProcServer32", 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS) + { + RegSetValueW(hSubKey, NULL, REG_SZ, &szName[1], (Offset+1) * sizeof(WCHAR)); + RegSetValueExW(hSubKey, L"ThreadingModel", 0, REG_SZ, (LPBYTE)L"Both", 10); + RegCloseKey(hSubKey); + } + + RegCloseKey(hKey); + + if (RegCreateKeyExW(HKEY_CLASSES_ROOT, szLanConnectStatusUI, 0, NULL, 0, KEY_WRITE, NULL, &hKey, NULL) != ERROR_SUCCESS) + return SELFREG_E_CLASS; + + if (RegCreateKeyExW(hKey, L"InProcServer32", 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS) + { + RegSetValueW(hSubKey, NULL, REG_SZ, &szName[1], (Offset+1) * sizeof(WCHAR)); + RegSetValueExW(hSubKey, L"ThreadingModel", 0, REG_SZ, (LPBYTE)L"Both", 10); + RegCloseKey(hSubKey); + } + + RegCloseKey(hKey); + + return S_OK; } @@ -128,7 +163,7 @@ DllGetClassObject( { UINT i; HRESULT hres = E_OUTOFMEMORY; - IClassFactory * pcf = NULL; + IClassFactory * pcf = NULL; if (!ppv) return E_INVALIDARG; diff --git a/reactos/dll/win32/netshell/netshell.rbuild b/reactos/dll/win32/netshell/netshell.rbuild index 615fbe955ad..e2bb4ce657a 100644 --- a/reactos/dll/win32/netshell/netshell.rbuild +++ b/reactos/dll/win32/netshell/netshell.rbuild @@ -27,4 +27,5 @@ connectmanager.c netshell.spec lanconnectui.c + lanstatusui.c diff --git a/reactos/dll/win32/netshell/precomp.h b/reactos/dll/win32/netshell/precomp.h index 3a51304e97a..63b790b472c 100644 --- a/reactos/dll/win32/netshell/precomp.h +++ b/reactos/dll/win32/netshell/precomp.h @@ -33,6 +33,9 @@ #include #include #include +#include +#include + #include "wine/debug.h" #include "wine/unicode.h" @@ -94,7 +97,9 @@ HRESULT WINAPI INetConnectionManager_Constructor (IUnknown * pUnkOuter, REFIID r /* lanconnectui.c */ HRESULT WINAPI LanConnectUI_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); -HRESULT ShowLANConnectionStatusDialog(NETCON_PROPERTIES * pProperties); + +/* lanstatusui.c */ +HRESULT WINAPI LanConnectStatusUI_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); #define NCCF_NOTIFY_DISCONNECTED 0x100000 diff --git a/reactos/dll/win32/netshell/shfldr_netconnect.c b/reactos/dll/win32/netshell/shfldr_netconnect.c index 71702d7405a..4a193f19293 100644 --- a/reactos/dll/win32/netshell/shfldr_netconnect.c +++ b/reactos/dll/win32/netshell/shfldr_netconnect.c @@ -773,11 +773,13 @@ static HRESULT WINAPI ISF_NetConnect_IContextMenu2_InvokeCommand( if (lpcmi->lpVerb == MAKEINTRESOURCEA(IDS_NET_STATUS)) { +#if 0 if (pProperties->MediaType == NCM_LAN) { hr = ShowLANConnectionStatusDialog(pProperties); NcFreeNetconProperties(pProperties); } +#endif return hr; } else if (lpcmi->lpVerb == MAKEINTRESOURCEA(IDS_NET_PROPERTIES)) From d78551628c4452223b9d93808a14f327a07bd5e2 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Sat, 30 Aug 2008 19:10:50 +0000 Subject: [PATCH 250/324] - update russian translation by tower at reactos org svn path=/trunk/; revision=35815 --- reactos/dll/win32/netshell/lang/ru-RU.rc | 46 ++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/reactos/dll/win32/netshell/lang/ru-RU.rc b/reactos/dll/win32/netshell/lang/ru-RU.rc index 510bccccfa4..f95012cd4dd 100644 --- a/reactos/dll/win32/netshell/lang/ru-RU.rc +++ b/reactos/dll/win32/netshell/lang/ru-RU.rc @@ -1,5 +1,51 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT +IDD_NETPROPERTIES DIALOGEX DISCARDABLE 0, 0, 246, 246 +STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION +CAPTION "Основные" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "", IDC_COMPONENTSLIST, "SysListView32", LVS_LIST | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 9, 71, 230, 55 + LTEXT "Соединение Использует:", -1, 9,9,217,8 + EDITTEXT IDC_NETCARDNAME, 9, 21, 230, 12, WS_BORDER | WS_DISABLED | WS_TABSTOP + PUSHBUTTON "&Настроить", IDC_CONFIGURE, 189, 38, 50, 14 + LTEXT "Отмеченые элементы используются при соединении:", -1, 9, 59, 217, 8 + PUSHBUTTON "&Установить", IDC_INSTALL, 9, 130, 65, 14, WS_DISABLED | WS_TABSTOP + PUSHBUTTON "&Удалить", IDC_UNINSTALL, 90, 130, 65, 14, WS_DISABLED | WS_TABSTOP + PUSHBUTTON "&Свойства", IDC_PROPERTIES, 174, 130, 65, 14 + GROUPBOX "Описание", -1, 9, 153, 230, 46, BS_GROUPBOX + LTEXT "Свойства компонента изложены ниже...", IDC_DESCRIPTION, 15, 165, 217, 28, WS_GROUP + CHECKBOX "Отображать значек в трее при установленом соединении", IDC_SHOWTASKBAR, 9, 206, 230, 12, BS_AUTOCHECKBOX | WS_TABSTOP + CHECKBOX "Оповещать в случае разрыва соединения", IDC_NOTIFYNOCONNECTION, 9, 220, 230, 12, BS_AUTOCHECKBOX | WS_TABSTOP +END + +IDD_NETSTATUS DIALOGEX DISCARDABLE 0, 0, 200,180 +STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION +CAPTION "Основные" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Соединение", -1, 9, 8, 182, 58, BS_GROUPBOX + LTEXT "Статус:", -1, 19, 20, 60, 8 + LTEXT "Продолжительность:", -1, 19, 34, 60, 8 + LTEXT "Скорость:", -1, 19, 48, 60, 8 + GROUPBOX "Активность", -1, 9, 74, 182, 70, BS_GROUPBOX + RTEXT "Отправлено", -1, 26, 90, 60, 8 + ICON IDI_HORIZONTAL, -1, 90, 85, 18, 20 + ICON IDI_NETSTAT, -1, 110, 85, 18, 20 + ICON IDI_HORIZONTAL, -1, 130, 85, 18, 20 + LTEXT "Принято", -1, 149, 90, 37, 8 + LTEXT "Байт:", -1, 17, 115, 32, 8 + RTEXT "000.000.000", IDC_SEND, 63, 115, 44, 8 + ICON IDI_VERTICAL, -1, 110, 108, 18, 20 + RTEXT "000.000.000", IDC_RECEIVED, 139, 115, 44, 8 + PUSHBUTTON "&Свойства", IDC_STATUS_PROPERTIES, 10, 150, 50, 14 + PUSHBUTTON "&Отключить", IDC_ENDISABLE, 66, 150, 50, 14 + RTEXT "",IDC_STATUS,83,20,98,8 + RTEXT "",IDC_DURATION,83,34,98,8 + RTEXT "",IDC_SPEED,83,48,98,8 +END + + STRINGTABLE DISCARDABLE BEGIN IDS_NETWORKCONNECTION "Сетевые подключения" From 53b639b3cfd4478b3e5f3c9cc02b8a02e96d311c Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sat, 30 Aug 2008 20:22:35 +0000 Subject: [PATCH 251/324] - Primary implementation of sfc_os.dll. - Linked some functions of sfc.dll to sfc_os.dll svn path=/trunk/; revision=35816 --- reactos/baseaddress.rbuild | 1 + reactos/boot/bootdata/packages/reactos.dff | 1 + reactos/dll/win32/sfc/sfc.spec | 6 ++-- reactos/dll/win32/sfc_os/precomp.h | 6 ++++ reactos/dll/win32/sfc_os/sfc_os.c | 42 ++++++++++++++++++++++ reactos/dll/win32/sfc_os/sfc_os.rbuild | 8 +++++ reactos/dll/win32/sfc_os/sfc_os.spec | 12 +++++++ reactos/dll/win32/win32.rbuild | 3 ++ 8 files changed, 76 insertions(+), 3 deletions(-) create mode 100644 reactos/dll/win32/sfc_os/precomp.h create mode 100644 reactos/dll/win32/sfc_os/sfc_os.c create mode 100644 reactos/dll/win32/sfc_os/sfc_os.rbuild create mode 100644 reactos/dll/win32/sfc_os/sfc_os.spec diff --git a/reactos/baseaddress.rbuild b/reactos/baseaddress.rbuild index d826b3ec2ef..a00d0205734 100644 --- a/reactos/baseaddress.rbuild +++ b/reactos/baseaddress.rbuild @@ -149,6 +149,7 @@ + diff --git a/reactos/boot/bootdata/packages/reactos.dff b/reactos/boot/bootdata/packages/reactos.dff index e6c973dfca5..d5bd143b127 100644 --- a/reactos/boot/bootdata/packages/reactos.dff +++ b/reactos/boot/bootdata/packages/reactos.dff @@ -321,6 +321,7 @@ dll\win32\sensapi\sensapi.dll 1 dll\win32\serialui\serialui.dll 1 dll\win32\setupapi\setupapi.dll 1 dll\win32\sfc\sfc.dll 1 +dll\win32\sfc_os\sfc_os.dll 1 dll\win32\shdocvw\shdocvw.dll 1 dll\win32\shell32\shell32.dll 1 dll\win32\shfolder\shfolder.dll 1 diff --git a/reactos/dll/win32/sfc/sfc.spec b/reactos/dll/win32/sfc/sfc.spec index dbfea33c6f6..07f3c75c3e0 100644 --- a/reactos/dll/win32/sfc/sfc.spec +++ b/reactos/dll/win32/sfc/sfc.spec @@ -10,9 +10,9 @@ @ stdcall SRSetRestorePoint (ptr ptr) SRSetRestorePointA @ stdcall SRSetRestorePointA (ptr ptr) @ stdcall SRSetRestorePointW (ptr ptr) -@ stub SfcGetNextProtectedFile -@ stub SfcIsFileProtected +@ stdcall SfcGetNextProtectedFile (ptr ptr) sfc_os.SfcGetNextProtectedFile +@ stdcall SfcIsFileProtected (ptr wstr) sfc_os.SfcIsFileProtected @ stub SfcWLEventLogoff @ stub SfcWLEventLogon -@ stdcall SfpVerifyFile (ptr ptr long) +@ stdcall SfpVerifyFile (str str long) @ stdcall start (long long ptr) DllMain \ No newline at end of file diff --git a/reactos/dll/win32/sfc_os/precomp.h b/reactos/dll/win32/sfc_os/precomp.h new file mode 100644 index 00000000000..3a0b5e06545 --- /dev/null +++ b/reactos/dll/win32/sfc_os/precomp.h @@ -0,0 +1,6 @@ +#ifndef _PRECOMP_H__ +#define _PRECOMP_H__ + +#include + +#endif diff --git a/reactos/dll/win32/sfc_os/sfc_os.c b/reactos/dll/win32/sfc_os/sfc_os.c new file mode 100644 index 00000000000..f51d7f146f7 --- /dev/null +++ b/reactos/dll/win32/sfc_os/sfc_os.c @@ -0,0 +1,42 @@ +/* + * System File Checker (Windows File Protection) + * + * Copyright 2008 Pierre Schweitzer + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "precomp.h" + +HINSTANCE hLibModule; + +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +{ + switch (fdwReason) + { + case DLL_PROCESS_ATTACH: + { + DisableThreadLibraryCalls(hinstDLL); + hLibModule = hinstDLL; + break; + } + case DLL_PROCESS_DETACH: + { + break; + } + } + + return TRUE; +} diff --git a/reactos/dll/win32/sfc_os/sfc_os.rbuild b/reactos/dll/win32/sfc_os/sfc_os.rbuild new file mode 100644 index 00000000000..2e02263c20e --- /dev/null +++ b/reactos/dll/win32/sfc_os/sfc_os.rbuild @@ -0,0 +1,8 @@ + + + . + kernel32 + sfc_os.c + sfc_os.spec + precomp.h + diff --git a/reactos/dll/win32/sfc_os/sfc_os.spec b/reactos/dll/win32/sfc_os/sfc_os.spec new file mode 100644 index 00000000000..e672dd1581e --- /dev/null +++ b/reactos/dll/win32/sfc_os/sfc_os.spec @@ -0,0 +1,12 @@ +@ stub sfc_os_1 +@ stub sfc_os_2 +@ stub sfc_os_3 +@ stub sfc_os_4 +@ stub sfc_os_5 +@ stub sfc_os_6 +@ stub sfc_os_7 +@ stub SfcGetNextProtectedFile +@ stub SfcIsFileProtected +@ stub SfcWLEventLogoff +@ stub SfcWLEventLogon +@ stdcall start (long long ptr) DllMain \ No newline at end of file diff --git a/reactos/dll/win32/win32.rbuild b/reactos/dll/win32/win32.rbuild index 1b9714b873d..bd011344499 100644 --- a/reactos/dll/win32/win32.rbuild +++ b/reactos/dll/win32/win32.rbuild @@ -298,6 +298,9 @@ + + + From d53b0eb9e6ff0a5024e3160eeae8c787593ec802 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Sat, 30 Aug 2008 20:29:57 +0000 Subject: [PATCH 252/324] - Add APIs new to Windows 2003/SP1 (including XP SP1) - Add missing NtGetCurrentProcessorNumber to ntdll - Update headers with missing structures svn path=/trunk/; revision=35817 --- reactos/dll/ntdll/def/ntdll_arm.def | 1 + reactos/dll/ntdll/def/ntdll_i386.def | 1 + reactos/dll/win32/advapi32/advapi32.def | 1 + reactos/dll/win32/advapi32/token/token.c | 16 +++- reactos/dll/win32/kernel32/kernel32.def | 20 ++++- reactos/dll/win32/kernel32/misc/stubs.c | 101 ++++++++++++++++++++++ reactos/dll/win32/kernel32/misc/sysinfo.c | 8 ++ reactos/dll/win32/psapi/psapi.c | 13 +++ reactos/dll/win32/psapi/psapi.def | 1 + reactos/include/psdk/winnt.h | 39 +++++++++ 10 files changed, 196 insertions(+), 5 deletions(-) diff --git a/reactos/dll/ntdll/def/ntdll_arm.def b/reactos/dll/ntdll/def/ntdll_arm.def index 6622e24e0e4..e6fede57361 100644 --- a/reactos/dll/ntdll/def/ntdll_arm.def +++ b/reactos/dll/ntdll/def/ntdll_arm.def @@ -291,6 +291,7 @@ NtWriteFileGather NtWriteRequestData NtWriteVirtualMemory NtYieldExecution +NtGetCurrentProcessorNumber ;PfxFindPrefix ;PfxInitialize ;PfxInsertPrefix diff --git a/reactos/dll/ntdll/def/ntdll_i386.def b/reactos/dll/ntdll/def/ntdll_i386.def index ad9b6cdfe2c..d0048b29bee 100644 --- a/reactos/dll/ntdll/def/ntdll_i386.def +++ b/reactos/dll/ntdll/def/ntdll_i386.def @@ -291,6 +291,7 @@ NtWriteFileGather@36 NtWriteRequestData@24 NtWriteVirtualMemory@20 NtYieldExecution@0 +NtGetCurrentProcessorNumber@0 ;PfxFindPrefix ;PfxInitialize ;PfxInsertPrefix diff --git a/reactos/dll/win32/advapi32/advapi32.def b/reactos/dll/win32/advapi32/advapi32.def index d0e140511c3..6d87ef4624a 100644 --- a/reactos/dll/win32/advapi32/advapi32.def +++ b/reactos/dll/win32/advapi32/advapi32.def @@ -107,6 +107,7 @@ CreateProcessAsUserA@44 ;CreateProcessAsUserSecure CreateProcessAsUserW@44 ;CreateProcessWithLogonW +CreateProcessWithTokenW@36 CreateRestrictedToken@36 CreateServiceA@52 CreateServiceW@52 diff --git a/reactos/dll/win32/advapi32/token/token.c b/reactos/dll/win32/advapi32/token/token.c index 9bb6f6556dd..c7115b08398 100644 --- a/reactos/dll/win32/advapi32/token/token.c +++ b/reactos/dll/win32/advapi32/token/token.c @@ -670,4 +670,18 @@ GetSiteSidFromToken(IN HANDLE TokenHandle) return PSiteSid; } - +BOOL +WINAPI +CreateProcessWithTokenW(IN HANDLE hToken, + IN DWORD dwLogonFlags, + IN LPCWSTR lpApplicationName OPTIONAL, + IN OUT LPWSTR lpCommandLine OPTIONAL, + IN DWORD dwCreationFlags, + IN LPVOID lpEnvironment OPTIONAL, + IN LPCWSTR lpCurrentDirectory OPTIONAL, + IN LPSTARTUPINFOW lpStartupInfo, + OUT LPPROCESS_INFORMATION lpProcessInfo) +{ + UNIMPLEMENTED; + return FALSE; +} diff --git a/reactos/dll/win32/kernel32/kernel32.def b/reactos/dll/win32/kernel32/kernel32.def index 9b444c2d930..00d10eda7c0 100644 --- a/reactos/dll/win32/kernel32/kernel32.def +++ b/reactos/dll/win32/kernel32/kernel32.def @@ -97,6 +97,7 @@ ContinueDebugEvent@12 ConvertDefaultLocale@4 ConvertFiberToThread@0 ConvertThreadToFiber@4 +ConvertThreadToFiberEx@8 CopyFileA@12 CopyFileExA@24 CopyFileExW@24 @@ -210,6 +211,7 @@ EnumResourceTypesA@12 EnumResourceTypesW@12 EnumSystemCodePagesA@8 EnumSystemCodePagesW@8 +EnumSystemFirmwareTables@12 EnumSystemGeoID@12 EnumSystemLanguageGroupsA@12 EnumSystemLanguageGroupsW@12 @@ -272,10 +274,10 @@ FindResourceExW@16 FindResourceW@12 FindVolumeClose@4 FindVolumeMountPointClose@4 -;FlsAlloc@4 ;new for 2003 -;FlsFree@4 ;new for 2003 -;FlsGetValue@4 ;new for 2003 -;FlsSetValue@8 ;new for 2003 +FlsAlloc@4 +FlsFree@4 +FlsGetValue@4 +FlsSetValue@8 FlushConsoleInputBuffer@4 FlushFileBuffers@4 FlushInstructionCache@12 @@ -366,6 +368,7 @@ GetCurrentDirectoryA@8 GetCurrentDirectoryW@8 GetCurrentProcess@0 GetCurrentProcessId@0 +GetCurrentProcessorNumber@0 GetCurrentThread@0 GetCurrentThreadId@0 GetDateFormatA@24 @@ -423,6 +426,7 @@ GetLocaleInfoEx@16 GetLogicalDriveStringsA@8 GetLogicalDriveStringsW@8 GetLogicalDrives@0 +GetLogicalProcessorInformation@8 GetLongPathNameA@12 GetLongPathNameW@12 GetMailslotInfo@20 @@ -438,6 +442,7 @@ GetNamedPipeInfo@20 GetNativeSystemInfo@4 GetNextVDMCommand@4 GetNlsSectionName@24 +GetNumaAvailableMemoryNode@8 GetNumaHighestNodeNumber@4 GetNumaNodeProcessorMask@8 ;GetNumaProcessorMap @@ -473,6 +478,7 @@ GetProcessShutdownParameters@8 GetProcessTimes@20 GetProcessVersion@4 GetProcessWorkingSetSize@12 +GetProcessWorkingSetSizeEx@16 GetProfileIntA@12 GetProfileIntW@12 GetProfileSectionA@12 @@ -494,6 +500,8 @@ GetSystemDefaultLangID@0 GetSystemDefaultUILanguage@0 GetSystemDirectoryA@8 GetSystemDirectoryW@8 +GetSystemFileCacheSize@12 +GetSystemFirmwareTable@16 GetSystemInfo@4 GetSystemPowerStatus@4 GetSystemRegistryQuota@8 @@ -763,6 +771,7 @@ RemoveDirectoryW@4 ;RemoveLocalAlternateComputerNameA ;RemoveLocalAlternateComputerNameW RemoveVectoredExceptionHandler@4=NTDLL.RtlRemoveVectoredExceptionHandler +ReOpenFile@16 ReplaceFile=ReplaceFileW@24 ReplaceFileA@24 ReplaceFileW@24 @@ -874,7 +883,9 @@ SetProcessAffinityMask@8 SetProcessPriorityBoost@8 SetProcessShutdownParameters@8 SetProcessWorkingSetSize@12 +SetProcessWorkingSetSizeEx@16 SetStdHandle@8 +SetSystemFileCacheSize@12 SetSystemPowerState@8 SetSystemTime@4 SetSystemTimeAdjustment@8 @@ -888,6 +899,7 @@ SetThreadIdealProcessor@8 SetThreadLocale@4 SetThreadPriority@8 SetThreadPriorityBoost@8 +SetThreadStackGuarantee@4 SetThreadUILanguage@4 SetTimerQueueTimer@24 SetTimeZoneInformation@4 diff --git a/reactos/dll/win32/kernel32/misc/stubs.c b/reactos/dll/win32/kernel32/misc/stubs.c index 754f2fa4125..b4498951c01 100644 --- a/reactos/dll/win32/kernel32/misc/stubs.c +++ b/reactos/dll/win32/kernel32/misc/stubs.c @@ -1402,3 +1402,104 @@ Wow64RevertWow64FsRedirection (VOID * pv) STUB; return FALSE; } + +UINT +WINAPI +EnumSystemFirmwareTables(IN DWORD FirmwareTableProviderSignature, + OUT PVOID pFirmwareTableBuffer, + IN DWORD BufferSize) +{ + STUB; + return 0; +} + +BOOL +WINAPI +GetSystemFileCacheSize(OUT PSIZE_T lpMinimumFileCacheSize, + OUT PSIZE_T lpMaximumFileCacheSize, + OUT PDWORD lpFlags) +{ + STUB; + return FALSE; +} + +UINT +WINAPI +GetSystemFirmwareTable(IN DWORD FirmwareTableProviderSignature, + IN DWORD FirmwareTableID, + OUT PVOID pFirmwareTableBuffer, + IN DWORD BufferSize) +{ + STUB; + return 0; +} + +BOOL +WINAPI +SetSystemFileCacheSize(IN SIZE_T MinimumFileCacheSize, + IN SIZE_T MaximumFileCacheSize, + IN DWORD Flags) +{ + STUB; + return FALSE; +} + +BOOL +WINAPI +SetThreadStackGuarantee(IN OUT PULONG StackSizeInBytes) +{ + STUB; + return FALSE; +} + +HANDLE +WINAPI +ReOpenFile(IN HANDLE hOriginalFile, + IN DWORD dwDesiredAccess, + IN DWORD dwShareMode, + IN DWORD dwFlags) +{ + STUB; + return INVALID_HANDLE_VALUE; +} + +BOOL +WINAPI +SetProcessWorkingSetSizeEx(IN HANDLE hProcess, + IN SIZE_T dwMinimumWorkingSetSize, + IN SIZE_T dwMaximumWorkingSetSize, + IN DWORD Flags) +{ + STUB; + return FALSE; +} + + +BOOL +WINAPI +GetProcessWorkingSetSizeEx(IN HANDLE hProcess, + OUT PSIZE_T lpMinimumWorkingSetSize, + OUT PSIZE_T lpMaximumWorkingSetSize, + OUT PDWORD Flags) +{ + STUB; + return FALSE; +} + +BOOL +WINAPI +GetLogicalProcessorInformation(OUT PSYSTEM_LOGICAL_PROCESSOR_INFORMATION Buffer, + IN OUT PDWORD ReturnLength) +{ + STUB; + return FALSE; +} + +BOOL +WINAPI +GetNumaAvailableMemoryNode(IN UCHAR Node, + OUT PULONGLONG AvailableBytes) +{ + STUB; + return FALSE; +} diff --git a/reactos/dll/win32/kernel32/misc/sysinfo.c b/reactos/dll/win32/kernel32/misc/sysinfo.c index 6db8a5644bf..bf0acea526f 100644 --- a/reactos/dll/win32/kernel32/misc/sysinfo.c +++ b/reactos/dll/win32/kernel32/misc/sysinfo.c @@ -233,4 +233,12 @@ GetNativeSystemInfo( GetSystemInfo(lpSystemInfo); } +DWORD +WINAPI +GetCurrentProcessorNumber(VOID) +{ + /* Forward to kernel */ + return NtGetCurrentProcessorNumber(); +} + /* EOF */ diff --git a/reactos/dll/win32/psapi/psapi.c b/reactos/dll/win32/psapi/psapi.c index 7add84ec870..934aeb3694a 100644 --- a/reactos/dll/win32/psapi/psapi.c +++ b/reactos/dll/win32/psapi/psapi.c @@ -1398,4 +1398,17 @@ QueryWorkingSet(HANDLE hProcess, return TRUE; } +/* + * @unimplemented + */ +BOOL +WINAPI +QueryWorkingSetEx(IN HANDLE hProcess, + IN OUT PVOID pv, + IN DWORD cb) +{ + UNIMPLEMENTED; + return FALSE; +} + /* EOF */ diff --git a/reactos/dll/win32/psapi/psapi.def b/reactos/dll/win32/psapi/psapi.def index 16b71423835..b7c93913814 100644 --- a/reactos/dll/win32/psapi/psapi.def +++ b/reactos/dll/win32/psapi/psapi.def @@ -32,3 +32,4 @@ GetProcessMemoryInfo@12 @21 GetWsChanges@12 @22 InitializeProcessForWsWatch@4 @23 QueryWorkingSet@12 @24 +QueryWorkingSetEx@12 @25 \ No newline at end of file diff --git a/reactos/include/psdk/winnt.h b/reactos/include/psdk/winnt.h index 632d57efbc2..36c20e2925c 100644 --- a/reactos/include/psdk/winnt.h +++ b/reactos/include/psdk/winnt.h @@ -4400,6 +4400,45 @@ typedef OSVERSIONINFOEXA OSVERSIONINFOEX,*POSVERSIONINFOEX,*LPOSVERSIONINFOEX; ULONGLONG WINAPI VerSetConditionMask(ULONGLONG,DWORD,BYTE); #endif +typedef enum _PROCESSOR_CACHE_TYPE { + CacheUnified, + CacheInstruction, + CacheData, + CacheTrace +} PROCESSOR_CACHE_TYPE; + +typedef enum _LOGICAL_PROCESSOR_RELATIONSHIP { + RelationProcessorCore, + RelationNumaNode, + RelationCache, + RelationProcessorPackage +} LOGICAL_PROCESSOR_RELATIONSHIP; + +#define CACHE_FULLY_ASSOCIATIVE 0xFF + +typedef struct _CACHE_DESCRIPTOR { + BYTE Level; + BYTE Associativity; + WORD LineSize; + DWORD Size; + PROCESSOR_CACHE_TYPE Type; +} CACHE_DESCRIPTOR, *PCACHE_DESCRIPTOR; + +typedef struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION { + ULONG_PTR ProcessorMask; + LOGICAL_PROCESSOR_RELATIONSHIP Relationship; + union { + struct { + BYTE Flags; + } ProcessorCore; + struct { + DWORD NodeNumber; + } NumaNode; + CACHE_DESCRIPTOR Cache; + ULONGLONG Reserved[2]; + }; +} SYSTEM_LOGICAL_PROCESSOR_INFORMATION, *PSYSTEM_LOGICAL_PROCESSOR_INFORMATION; + NTSYSAPI SIZE_T STDCALL From 8dc92e28197588c4c1722a4862d75f83aefdd374 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sat, 30 Aug 2008 20:41:26 +0000 Subject: [PATCH 253/324] Removed useless defines svn path=/trunk/; revision=35818 --- reactos/dll/win32/sfc/sfc.spec | 3 +-- reactos/dll/win32/sfc_os/sfc_os.spec | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/reactos/dll/win32/sfc/sfc.spec b/reactos/dll/win32/sfc/sfc.spec index 07f3c75c3e0..4fa278bcda3 100644 --- a/reactos/dll/win32/sfc/sfc.spec +++ b/reactos/dll/win32/sfc/sfc.spec @@ -14,5 +14,4 @@ @ stdcall SfcIsFileProtected (ptr wstr) sfc_os.SfcIsFileProtected @ stub SfcWLEventLogoff @ stub SfcWLEventLogon -@ stdcall SfpVerifyFile (str str long) -@ stdcall start (long long ptr) DllMain \ No newline at end of file +@ stdcall SfpVerifyFile (str str long) \ No newline at end of file diff --git a/reactos/dll/win32/sfc_os/sfc_os.spec b/reactos/dll/win32/sfc_os/sfc_os.spec index e672dd1581e..7506386f2b5 100644 --- a/reactos/dll/win32/sfc_os/sfc_os.spec +++ b/reactos/dll/win32/sfc_os/sfc_os.spec @@ -8,5 +8,4 @@ @ stub SfcGetNextProtectedFile @ stub SfcIsFileProtected @ stub SfcWLEventLogoff -@ stub SfcWLEventLogon -@ stdcall start (long long ptr) DllMain \ No newline at end of file +@ stub SfcWLEventLogon \ No newline at end of file From e0e7f47d032f63cf6612c574fa221f4e3716dd71 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Sat, 30 Aug 2008 21:34:56 +0000 Subject: [PATCH 254/324] - CACHE_DESCRIPTOR and PROCESSOR_CACHE_TYPE are public and defined in winnt.h, so no need to define them in the NDK (the NDK includes winnt.h through windef.h, so this breaks build) svn path=/trunk/; revision=35819 --- reactos/include/ndk/ketypes.h | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/reactos/include/ndk/ketypes.h b/reactos/include/ndk/ketypes.h index 3c6f5a954c6..f64d80cdc7c 100644 --- a/reactos/include/ndk/ketypes.h +++ b/reactos/include/ndk/ketypes.h @@ -541,17 +541,6 @@ typedef enum _KAPC_ENVIRONMENT InsertApcEnvironment } KAPC_ENVIRONMENT; -// -// CPU Cache Types -// -typedef enum _PROCESSOR_CACHE_TYPE -{ - CacheUnified, - CacheInstruction, - CacheData, - CacheTrace, -} PROCESSOR_CACHE_TYPE; - // // PRCB DPC Data // @@ -572,18 +561,6 @@ typedef struct _PP_LOOKASIDE_LIST struct _GENERAL_LOOKASIDE *L; } PP_LOOKASIDE_LIST, *PPP_LOOKASIDE_LIST; -// -// CPU Cache Descriptor -// -typedef struct _CACHE_DESCRIPTOR -{ - UCHAR Level; - UCHAR Associativity; - USHORT LineSize; - ULONG Size; - PROCESSOR_CACHE_TYPE Type; -} CACHE_DESCRIPTOR, *PCACHE_DESCRIPTOR; - // // Architectural Types // From a68427fcce25c4b6295e820bc3089d4ea0edd8f0 Mon Sep 17 00:00:00 2001 From: Sylvain Petreolle Date: Sat, 30 Aug 2008 21:58:12 +0000 Subject: [PATCH 255/324] fix typo svn path=/trunk/; revision=35820 --- reactos/drivers/usb/directory.rbuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/drivers/usb/directory.rbuild b/reactos/drivers/usb/directory.rbuild index 8bc30145c16..50f53bccb70 100644 --- a/reactos/drivers/usb/directory.rbuild +++ b/reactos/drivers/usb/directory.rbuild @@ -10,7 +10,7 @@ - directory name="usbstor"> + From 4b96ec60dd8f2e1a81cdc63dd5d09c9ba874f9a9 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Sat, 30 Aug 2008 22:54:27 +0000 Subject: [PATCH 256/324] - Add SecureZeroMemory/RtlSecureZeroMemory - Add x86 versions of PreFetchCacheLine and MemoryBarrier (TODO for other architectures) svn path=/trunk/; revision=35821 --- reactos/include/psdk/winbase.h | 1 + reactos/include/psdk/winnt.h | 54 ++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) diff --git a/reactos/include/psdk/winbase.h b/reactos/include/psdk/winbase.h index 28ece8ba31d..3b129ce1454 100644 --- a/reactos/include/psdk/winbase.h +++ b/reactos/include/psdk/winbase.h @@ -1208,6 +1208,7 @@ BOOL WINAPI CopyFileExW(LPCWSTR,LPCWSTR,LPPROGRESS_ROUTINE,LPVOID,LPBOOL,DWORD); #define CopyMemory RtlCopyMemory #define FillMemory RtlFillMemory #define ZeroMemory RtlZeroMemory +#define SecureZeroMemory RtlSecureZeroMemory BOOL WINAPI CopySid(DWORD,PSID,PSID); #if (_WIN32_WINNT >= 0x0501) HANDLE WINAPI CreateActCtxA(PCACTCTXA); diff --git a/reactos/include/psdk/winnt.h b/reactos/include/psdk/winnt.h index 36c20e2925c..5b0a9f3fe9f 100644 --- a/reactos/include/psdk/winnt.h +++ b/reactos/include/psdk/winnt.h @@ -4453,6 +4453,23 @@ RtlCompareMemory ( #define RtlFillMemory(d,l,f) memset((d), (f), (l)) #define RtlZeroMemory(d,l) RtlFillMemory((d),(l),0) +FORCEINLINE +PVOID +RtlSecureZeroMemory(IN PVOID ptr, + IN SIZE_T cnt) +{ + volatile char *vptr = (volatile char *)ptr; + + while (cnt) + { + *vptr = 0; + vptr++; + cnt--; + } + + return ptr; +} + typedef struct _OBJECT_TYPE_LIST { WORD Level; WORD Sbz; @@ -4656,6 +4673,43 @@ BitScanReverse(OUT ULONG *Index, #endif +/* TODO: Other architectures than X86 */ +#if defined(_M_IX86) +#define PF_TEMPORAL_LEVEL_1 +#define PF_NON_TEMPORAL_LEVEL_ALL +#define PreFetchCacheLine(l, a) +#elif defined (_M_AMD64) +#define PreFetchCacheLine(l, a) +#elif defined(_M_PPC) +#define PreFetchCacheLine(l, a) +#elif defined(_M_ARM) +#define PreFetchCacheLine(l, a) +#else +#error Unknown architecture +#endif + +/* TODO: Other architectures than X86 */ +#if defined(_M_IX86) +FORCEINLINE +VOID +MemoryBarrier(VOID) +{ + LONG Barrier; + __asm__ __volatile__ + { + xchg Barrier, eax + } +} +#elif defined (_M_AMD64) +#define MemoryBarrier() +#elif defined(_M_PPC) +#define MemoryBarrier() +#elif defined(_M_ARM) +#define MemoryBarrier() +#else +#error Unknown architecture +#endif + #if defined(_M_IX86) #define YieldProcessor() __asm__ __volatile__("pause"); #elif defined (_M_AMD64) From faedfbacd7de5d7224f6131cb891c3f8f1145201 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Sat, 30 Aug 2008 23:06:13 +0000 Subject: [PATCH 257/324] - Fix build... svn path=/trunk/; revision=35822 --- reactos/include/psdk/winnt.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/reactos/include/psdk/winnt.h b/reactos/include/psdk/winnt.h index 5b0a9f3fe9f..5e95559803e 100644 --- a/reactos/include/psdk/winnt.h +++ b/reactos/include/psdk/winnt.h @@ -4695,10 +4695,7 @@ VOID MemoryBarrier(VOID) { LONG Barrier; - __asm__ __volatile__ - { - xchg Barrier, eax - } + __asm__ __volatile__("xchgl %%eax, %[Barrier]" : : [Barrier] "m" (Barrier) : "memory"); } #elif defined (_M_AMD64) #define MemoryBarrier() From b93a09c0b176fdbeb4b55bf506267330b895e5e7 Mon Sep 17 00:00:00 2001 From: Gregor Brunmar Date: Sun, 31 Aug 2008 11:36:55 +0000 Subject: [PATCH 258/324] D3D9: * Replaced depricated IsBadWritePtr() call to a simple NULL check instead (see http://blogs.msdn.com/oldnewthing/archive/2006/09/27/773741.aspx for more info) * Implemented correct device hierarchy for the HAL Device svn path=/trunk/; revision=35830 --- reactos/dll/directx/d3d9/d3d9.rbuild | 2 + reactos/dll/directx/d3d9/d3d9_device.c | 823 +----------- reactos/dll/directx/d3d9/d3d9_device.h | 1412 ++------------------ reactos/dll/directx/d3d9/d3d9_haldevice.c | 596 +++++++++ reactos/dll/directx/d3d9/d3d9_haldevice.h | 1010 ++++++++++++++ reactos/dll/directx/d3d9/d3d9_impl.c | 44 +- reactos/dll/directx/d3d9/d3d9_puredevice.c | 859 ++++++++++++ reactos/dll/directx/d3d9/d3d9_puredevice.h | 418 ++++++ reactos/dll/directx/d3d9/d3d9_surface.h | 21 +- reactos/dll/directx/d3d9/d3d9_swapchain.c | 6 +- reactos/dll/directx/d3d9/device.c | 2 +- reactos/dll/directx/d3d9/device.h | 2 +- 12 files changed, 3086 insertions(+), 2109 deletions(-) create mode 100644 reactos/dll/directx/d3d9/d3d9_haldevice.c create mode 100644 reactos/dll/directx/d3d9/d3d9_haldevice.h create mode 100644 reactos/dll/directx/d3d9/d3d9_puredevice.c create mode 100644 reactos/dll/directx/d3d9/d3d9_puredevice.h diff --git a/reactos/dll/directx/d3d9/d3d9.rbuild b/reactos/dll/directx/d3d9/d3d9.rbuild index a908ac4c1ac..913f0742f19 100644 --- a/reactos/dll/directx/d3d9/d3d9.rbuild +++ b/reactos/dll/directx/d3d9/d3d9.rbuild @@ -20,6 +20,8 @@ d3d9_caps.c d3d9_device.c d3d9_swapchain.c + d3d9_puredevice.c + d3d9_haldevice.c adapter.c device.c format.c diff --git a/reactos/dll/directx/d3d9/d3d9_device.c b/reactos/dll/directx/d3d9/d3d9_device.c index 376658eedbb..c763724ce0a 100644 --- a/reactos/dll/directx/d3d9/d3d9_device.c +++ b/reactos/dll/directx/d3d9/d3d9_device.c @@ -15,18 +15,18 @@ #define UNLOCK_D3DDEVICE9() if (This->bLockDevice) LeaveCriticalSection(&This->CriticalSection); /* Convert a IDirect3D9 pointer safely to the internal implementation struct */ -LPDIRECT3DDEVICE9_INT impl_from_IDirect3DDevice9(LPDIRECT3DDEVICE9 iface) +static LPDIRECT3DDEVICE9_INT IDirect3DDevice9ToImpl(LPDIRECT3DDEVICE9 iface) { - if (IsBadWritePtr(iface, sizeof(LPDIRECT3DDEVICE9_INT))) + if (NULL == iface) return NULL; return (LPDIRECT3DDEVICE9_INT)((ULONG_PTR)iface - FIELD_OFFSET(DIRECT3DDEVICE9_INT, lpVtbl)); } /* IDirect3DDevice9: IUnknown implementation */ -static HRESULT WINAPI IDirect3DDevice9Impl_QueryInterface(LPDIRECT3DDEVICE9 iface, REFIID riid, void** ppvObject) +HRESULT WINAPI IDirect3DDevice9Base_QueryInterface(LPDIRECT3DDEVICE9 iface, REFIID riid, void** ppvObject) { - LPDIRECT3DDEVICE9_INT This = impl_from_IDirect3DDevice9(iface); + LPDIRECT3DDEVICE9_INT This = IDirect3DDevice9ToImpl(iface); if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirect3DDevice9)) { @@ -39,17 +39,17 @@ static HRESULT WINAPI IDirect3DDevice9Impl_QueryInterface(LPDIRECT3DDEVICE9 ifac return E_NOINTERFACE; } -static ULONG WINAPI IDirect3DDevice9Impl_AddRef(LPDIRECT3DDEVICE9 iface) +ULONG WINAPI IDirect3DDevice9Base_AddRef(LPDIRECT3DDEVICE9 iface) { - LPDIRECT3DDEVICE9_INT This = impl_from_IDirect3DDevice9(iface); + LPDIRECT3DDEVICE9_INT This = IDirect3DDevice9ToImpl(iface); ULONG ref = InterlockedIncrement(&This->lRefCnt); return ref; } -static ULONG WINAPI IDirect3DDevice9Impl_Release(LPDIRECT3DDEVICE9 iface) +ULONG WINAPI IDirect3DDevice9Base_Release(LPDIRECT3DDEVICE9 iface) { - LPDIRECT3DDEVICE9_INT This = impl_from_IDirect3DDevice9(iface); + LPDIRECT3DDEVICE9_INT This = IDirect3DDevice9ToImpl(iface); ULONG ref = InterlockedDecrement(&This->lRefCnt); if (ref == 0) @@ -72,7 +72,7 @@ static ULONG WINAPI IDirect3DDevice9Impl_Release(LPDIRECT3DDEVICE9 iface) } /* IDirect3D9Device interface */ -static HRESULT WINAPI IDirect3DDevice9Impl_TestCooperativeLevel(LPDIRECT3DDEVICE9 iface) +HRESULT WINAPI IDirect3DDevice9Base_TestCooperativeLevel(LPDIRECT3DDEVICE9 iface) { UNIMPLEMENTED @@ -83,7 +83,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_TestCooperativeLevel(LPDIRECT3DDEVICE * @name IDirect3DDevice9::GetAvailableTextureMem * @implemented * -* The function IDirect3DDevice9Impl_GetAvailableTextureMem returns a pointer to the IDirect3D9 object +* The function IDirect3DDevice9Base_GetAvailableTextureMem returns a pointer to the IDirect3D9 object * that created this device. * * @param LPDIRECT3D iface @@ -94,12 +94,12 @@ static HRESULT WINAPI IDirect3DDevice9Impl_TestCooperativeLevel(LPDIRECT3DDEVICE * to the nearest MB. Applications should NOT use this as an exact number. * */ -static UINT WINAPI IDirect3DDevice9Impl_GetAvailableTextureMem(LPDIRECT3DDEVICE9 iface) +UINT WINAPI IDirect3DDevice9Base_GetAvailableTextureMem(LPDIRECT3DDEVICE9 iface) { UINT AvailableTextureMemory = 0; D3D9_GETAVAILDRIVERMEMORYDATA d3d9GetAvailDriverMemoryData; - LPDIRECT3DDEVICE9_INT This = impl_from_IDirect3DDevice9(iface); + LPDIRECT3DDEVICE9_INT This = IDirect3DDevice9ToImpl(iface); LOCK_D3DDEVICE9(); memset(&d3d9GetAvailDriverMemoryData, 0, sizeof(d3d9GetAvailDriverMemoryData)); @@ -116,7 +116,7 @@ static UINT WINAPI IDirect3DDevice9Impl_GetAvailableTextureMem(LPDIRECT3DDEVICE9 return AvailableTextureMemory; } -static HRESULT WINAPI IDirect3DDevice9Impl_EvictManagedResources(LPDIRECT3DDEVICE9 iface) +HRESULT WINAPI IDirect3DDevice9Base_EvictManagedResources(LPDIRECT3DDEVICE9 iface) { UNIMPLEMENTED @@ -127,7 +127,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_EvictManagedResources(LPDIRECT3DDEVIC * @name IDirect3DDevice9::GetDirect3D * @implemented * -* The function IDirect3DDevice9Impl_GetDirect3D returns a pointer to the IDirect3D9 object +* The function IDirect3DDevice9Base_GetDirect3D returns a pointer to the IDirect3D9 object * that created this device. * * @param LPDIRECT3D iface @@ -141,13 +141,13 @@ static HRESULT WINAPI IDirect3DDevice9Impl_EvictManagedResources(LPDIRECT3DDEVIC * If ppD3D9 is a bad pointer, the return value will be D3DERR_INVALIDCALL. * */ -static HRESULT WINAPI IDirect3DDevice9Impl_GetDirect3D(LPDIRECT3DDEVICE9 iface, IDirect3D9** ppD3D9) +HRESULT WINAPI IDirect3DDevice9Base_GetDirect3D(LPDIRECT3DDEVICE9 iface, IDirect3D9** ppD3D9) { IDirect3D9* pDirect3D9; - LPDIRECT3DDEVICE9_INT This = impl_from_IDirect3DDevice9(iface); + LPDIRECT3DDEVICE9_INT This = IDirect3DDevice9ToImpl(iface); LOCK_D3DDEVICE9(); - if (IsBadWritePtr(ppD3D9, sizeof(IDirect3D9*))) + if (NULL == ppD3D9) { DPRINT1("Invalid ppD3D9 parameter specified"); UNLOCK_D3DDEVICE9(); @@ -166,7 +166,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetDirect3D(LPDIRECT3DDEVICE9 iface, * @name IDirect3DDevice9::GetDeviceCaps * @implemented * -* The function IDirect3DDevice9Impl_GetDeviceCaps fills the pCaps argument with the +* The function IDirect3DDevice9Base_GetDeviceCaps fills the pCaps argument with the * capabilities of the device. * * @param LPDIRECT3D iface @@ -180,12 +180,12 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetDirect3D(LPDIRECT3DDEVICE9 iface, * If pCaps is a bad pointer the return value will be D3DERR_INVALIDCALL. * */ -static HRESULT WINAPI IDirect3DDevice9Impl_GetDeviceCaps(LPDIRECT3DDEVICE9 iface, D3DCAPS9* pCaps) +HRESULT WINAPI IDirect3DDevice9Base_GetDeviceCaps(LPDIRECT3DDEVICE9 iface, D3DCAPS9* pCaps) { - LPDIRECT3DDEVICE9_INT This = impl_from_IDirect3DDevice9(iface); + LPDIRECT3DDEVICE9_INT This = IDirect3DDevice9ToImpl(iface); LOCK_D3DDEVICE9(); - if (IsBadWritePtr(pCaps, sizeof(D3DCAPS9))) + if (NULL == pCaps) { DPRINT1("Invalid pCaps parameter specified"); UNLOCK_D3DDEVICE9(); @@ -202,7 +202,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetDeviceCaps(LPDIRECT3DDEVICE9 iface * @name IDirect3DDevice9::GetDisplayMode * @implemented * -* The function IDirect3DDevice9Impl_GetDisplayMode fills the pMode argument with the +* The function IDirect3DDevice9Base_GetDisplayMode fills the pMode argument with the * display mode for the specified swap chain. * * @param LPDIRECT3D iface @@ -220,9 +220,9 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetDeviceCaps(LPDIRECT3DDEVICE9 iface * If iSwapChain is out of range or pMode is a bad pointer, the return value will be D3DERR_INVALIDCALL. * */ -static HRESULT WINAPI IDirect3DDevice9Impl_GetDisplayMode(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, D3DDISPLAYMODE* pMode) +HRESULT WINAPI IDirect3DDevice9Base_GetDisplayMode(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, D3DDISPLAYMODE* pMode) { - LPDIRECT3DDEVICE9_INT This = impl_from_IDirect3DDevice9(iface); + LPDIRECT3DDEVICE9_INT This = IDirect3DDevice9ToImpl(iface); LOCK_D3DDEVICE9(); if (iSwapChain >= IDirect3DDevice9_GetNumberOfSwapChains(iface)) @@ -232,7 +232,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetDisplayMode(LPDIRECT3DDEVICE9 ifac return D3DERR_INVALIDCALL; } - if (IsBadWritePtr(pMode, sizeof(D3DDISPLAYMODE))) + if (NULL == pMode) { DPRINT1("Invalid pMode parameter specified"); UNLOCK_D3DDEVICE9(); @@ -252,7 +252,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetDisplayMode(LPDIRECT3DDEVICE9 ifac * @name IDirect3DDevice9::GetCreationParameters * @implemented * -* The function IDirect3DDevice9Impl_GetCreationParameters fills the pParameters argument with the +* The function IDirect3DDevice9Base_GetCreationParameters fills the pParameters argument with the * parameters the device was created with. * * @param LPDIRECT3D iface @@ -267,12 +267,12 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetDisplayMode(LPDIRECT3DDEVICE9 ifac * If pParameters is a bad pointer, the return value will be D3DERR_INVALIDCALL. * */ -static HRESULT WINAPI IDirect3DDevice9Impl_GetCreationParameters(LPDIRECT3DDEVICE9 iface, D3DDEVICE_CREATION_PARAMETERS* pParameters) +HRESULT WINAPI IDirect3DDevice9Base_GetCreationParameters(LPDIRECT3DDEVICE9 iface, D3DDEVICE_CREATION_PARAMETERS* pParameters) { - LPDIRECT3DDEVICE9_INT This = impl_from_IDirect3DDevice9(iface); + LPDIRECT3DDEVICE9_INT This = IDirect3DDevice9ToImpl(iface); LOCK_D3DDEVICE9(); - if (IsBadWritePtr(pParameters, sizeof(D3DDEVICE_CREATION_PARAMETERS))) + if (NULL == pParameters) { DPRINT1("Invalid pParameters parameter specified"); UNLOCK_D3DDEVICE9(); @@ -288,26 +288,26 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetCreationParameters(LPDIRECT3DDEVIC return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice9Impl_SetCursorProperties(LPDIRECT3DDEVICE9 iface, UINT XHotSpot, UINT YHotSpot, IDirect3DSurface9* pCursorBitmap) +HRESULT WINAPI IDirect3DDevice9Base_SetCursorProperties(LPDIRECT3DDEVICE9 iface, UINT XHotSpot, UINT YHotSpot, IDirect3DSurface9* pCursorBitmap) { UNIMPLEMENTED return D3D_OK; } -static void WINAPI IDirect3DDevice9Impl_SetCursorPosition(LPDIRECT3DDEVICE9 iface, int X, int Y, DWORD Flags) +VOID WINAPI IDirect3DDevice9Base_SetCursorPosition(LPDIRECT3DDEVICE9 iface, int X, int Y, DWORD Flags) { UNIMPLEMENTED } -static BOOL WINAPI IDirect3DDevice9Impl_ShowCursor(LPDIRECT3DDEVICE9 iface, BOOL bShow) +BOOL WINAPI IDirect3DDevice9Base_ShowCursor(LPDIRECT3DDEVICE9 iface, BOOL bShow) { UNIMPLEMENTED return TRUE; } -static HRESULT WINAPI IDirect3DDevice9Impl_CreateAdditionalSwapChain(LPDIRECT3DDEVICE9 iface, D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DSwapChain9** ppSwapChain) +HRESULT WINAPI IDirect3DDevice9Base_CreateAdditionalSwapChain(LPDIRECT3DDEVICE9 iface, D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DSwapChain9** ppSwapChain) { UNIMPLEMENTED @@ -318,7 +318,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_CreateAdditionalSwapChain(LPDIRECT3DD * @name IDirect3DDevice9::GetSwapChain * @implemented * -* The function IDirect3DDevice9Impl_GetSwapChain returns a pointer to a swap chain object. +* The function IDirect3DDevice9Base_GetSwapChain returns a pointer to a swap chain object. * * @param LPDIRECT3D iface * Pointer to the IDirect3DDevice9 object returned from IDirect3D9::CreateDevice() @@ -336,12 +336,12 @@ static HRESULT WINAPI IDirect3DDevice9Impl_CreateAdditionalSwapChain(LPDIRECT3DD * will be D3DERR_INVALIDCALL. * */ -static HRESULT WINAPI IDirect3DDevice9Impl_GetSwapChain(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, IDirect3DSwapChain9** ppSwapChain) +HRESULT WINAPI IDirect3DDevice9Base_GetSwapChain(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, IDirect3DSwapChain9** ppSwapChain) { - LPDIRECT3DDEVICE9_INT This = impl_from_IDirect3DDevice9(iface); + LPDIRECT3DDEVICE9_INT This = IDirect3DDevice9ToImpl(iface); LOCK_D3DDEVICE9(); - if (IsBadWritePtr(ppSwapChain, sizeof(IDirect3DSwapChain9*))) + if (NULL == ppSwapChain) { DPRINT1("Invalid ppSwapChain parameter specified"); UNLOCK_D3DDEVICE9(); @@ -376,7 +376,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetSwapChain(LPDIRECT3DDEVICE9 iface, * @name IDirect3DDevice9::GetNumberOfSwapChains * @implemented * -* The function IDirect3DDevice9Impl_GetNumberOfSwapChains returns the number of swap chains +* The function IDirect3DDevice9Base_GetNumberOfSwapChains returns the number of swap chains * created by IDirect3D9::CreateDevice(). * * @param LPDIRECT3D iface @@ -389,11 +389,11 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetSwapChain(LPDIRECT3DDEVICE9 iface, * IDirect3DDevice9::CreateAdditionalSwapChain() method. * */ -static UINT WINAPI IDirect3DDevice9Impl_GetNumberOfSwapChains(LPDIRECT3DDEVICE9 iface) +UINT WINAPI IDirect3DDevice9Base_GetNumberOfSwapChains(LPDIRECT3DDEVICE9 iface) { UINT NumSwapChains; - LPDIRECT3DDEVICE9_INT This = impl_from_IDirect3DDevice9(iface); + LPDIRECT3DDEVICE9_INT This = IDirect3DDevice9ToImpl(iface); LOCK_D3DDEVICE9(); NumSwapChains = This->NumAdaptersInDevice; @@ -402,846 +402,145 @@ static UINT WINAPI IDirect3DDevice9Impl_GetNumberOfSwapChains(LPDIRECT3DDEVICE9 return NumSwapChains; } -static HRESULT WINAPI IDirect3DDevice9Impl_Reset(LPDIRECT3DDEVICE9 iface, D3DPRESENT_PARAMETERS* pPresentationParameters) +HRESULT WINAPI IDirect3DDevice9Base_Reset(LPDIRECT3DDEVICE9 iface, D3DPRESENT_PARAMETERS* pPresentationParameters) { UNIMPLEMENTED return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice9Impl_Present(LPDIRECT3DDEVICE9 iface, CONST RECT* pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion) +HRESULT WINAPI IDirect3DDevice9Base_Present(LPDIRECT3DDEVICE9 iface, CONST RECT* pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion) { UNIMPLEMENTED return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice9Impl_GetBackBuffer(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, UINT iBackBuffer, D3DBACKBUFFER_TYPE Type, IDirect3DSurface9** ppBackBuffer) +HRESULT WINAPI IDirect3DDevice9Base_GetBackBuffer(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, UINT iBackBuffer, D3DBACKBUFFER_TYPE Type, IDirect3DSurface9** ppBackBuffer) { UNIMPLEMENTED return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice9Impl_GetRasterStatus(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, D3DRASTER_STATUS* pRasterStatus) +HRESULT WINAPI IDirect3DDevice9Base_GetRasterStatus(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, D3DRASTER_STATUS* pRasterStatus) { UNIMPLEMENTED return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice9Impl_SetDialogBoxMode(LPDIRECT3DDEVICE9 iface, BOOL bEnableDialogs) +HRESULT WINAPI IDirect3DDevice9Base_SetDialogBoxMode(LPDIRECT3DDEVICE9 iface, BOOL bEnableDialogs) { UNIMPLEMENTED return D3D_OK; } -static void WINAPI IDirect3DDevice9Impl_SetGammaRamp(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, DWORD Flags, CONST D3DGAMMARAMP* pRamp) +VOID WINAPI IDirect3DDevice9Base_SetGammaRamp(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, DWORD Flags, CONST D3DGAMMARAMP* pRamp) { UNIMPLEMENTED } -static void WINAPI IDirect3DDevice9Impl_GetGammaRamp(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, D3DGAMMARAMP* pRamp) +VOID WINAPI IDirect3DDevice9Base_GetGammaRamp(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, D3DGAMMARAMP* pRamp) { UNIMPLEMENTED } -static HRESULT WINAPI IDirect3DDevice9Impl_CreateTexture(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DTexture9** ppTexture, HANDLE* pSharedHandle) +HRESULT WINAPI IDirect3DDevice9Base_CreateTexture(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DTexture9** ppTexture, HANDLE* pSharedHandle) { UNIMPLEMENTED return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice9Impl_CreateVolumeTexture(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, UINT Depth, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DVolumeTexture9** ppVolumeTexture, HANDLE* pSharedHandle) +HRESULT WINAPI IDirect3DDevice9Base_CreateVolumeTexture(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, UINT Depth, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DVolumeTexture9** ppVolumeTexture, HANDLE* pSharedHandle) { UNIMPLEMENTED return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice9Impl_CreateCubeTexture(LPDIRECT3DDEVICE9 iface, UINT EdgeLength, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DCubeTexture9** ppCubeTexture, HANDLE* pSharedHandle) +HRESULT WINAPI IDirect3DDevice9Base_CreateCubeTexture(LPDIRECT3DDEVICE9 iface, UINT EdgeLength, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DCubeTexture9** ppCubeTexture, HANDLE* pSharedHandle) { UNIMPLEMENTED return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexBuffer(LPDIRECT3DDEVICE9 iface, UINT Length, DWORD Usage, DWORD FVF, D3DPOOL Pool, IDirect3DVertexBuffer9** ppVertexBuffer, HANDLE* pSharedHandle) +HRESULT WINAPI IDirect3DDevice9Base_CreateVertexBuffer(LPDIRECT3DDEVICE9 iface, UINT Length, DWORD Usage, DWORD FVF, D3DPOOL Pool, IDirect3DVertexBuffer9** ppVertexBuffer, HANDLE* pSharedHandle) { UNIMPLEMENTED return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice9Impl_CreateIndexBuffer(LPDIRECT3DDEVICE9 iface, UINT Length, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DIndexBuffer9** ppIndexBuffer, HANDLE* pSharedHandle) +HRESULT WINAPI IDirect3DDevice9Base_CreateIndexBuffer(LPDIRECT3DDEVICE9 iface, UINT Length, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DIndexBuffer9** ppIndexBuffer, HANDLE* pSharedHandle) { UNIMPLEMENTED return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice9Impl_CreateRenderTarget(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Lockable, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle) +HRESULT WINAPI IDirect3DDevice9Base_CreateRenderTarget(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Lockable, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle) { UNIMPLEMENTED return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice9Impl_CreateDepthStencilSurface(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Discard, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle) +HRESULT WINAPI IDirect3DDevice9Base_CreateDepthStencilSurface(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Discard, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle) { UNIMPLEMENTED return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice9Impl_UpdateSurface(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9* pSourceSurface, CONST RECT* pSourceRect, IDirect3DSurface9* pDestinationSurface, CONST POINT* pDestPoint) +HRESULT WINAPI IDirect3DDevice9Base_UpdateSurface(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9* pSourceSurface, CONST RECT* pSourceRect, IDirect3DSurface9* pDestinationSurface, CONST POINT* pDestPoint) { UNIMPLEMENTED return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice9Impl_UpdateTexture(LPDIRECT3DDEVICE9 iface, IDirect3DBaseTexture9* pSourceTexture, IDirect3DBaseTexture9* pDestinationTexture) +HRESULT WINAPI IDirect3DDevice9Base_UpdateTexture(LPDIRECT3DDEVICE9 iface, IDirect3DBaseTexture9* pSourceTexture, IDirect3DBaseTexture9* pDestinationTexture) { UNIMPLEMENTED return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice9Impl_GetRenderTargetData(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9* pRenderTarget, IDirect3DSurface9* pDestSurface) +HRESULT WINAPI IDirect3DDevice9Base_GetRenderTargetData(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9* pRenderTarget, IDirect3DSurface9* pDestSurface) { UNIMPLEMENTED return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice9Impl_GetFrontBufferData(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, IDirect3DSurface9* pDestSurface) +HRESULT WINAPI IDirect3DDevice9Base_GetFrontBufferData(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, IDirect3DSurface9* pDestSurface) { UNIMPLEMENTED return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice9Impl_StretchRect(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9* pSourceSurface, CONST RECT* pSourceRect, IDirect3DSurface9* pDestSurface, CONST RECT* pDestRect, D3DTEXTUREFILTERTYPE Filter) +HRESULT WINAPI IDirect3DDevice9Base_StretchRect(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9* pSourceSurface, CONST RECT* pSourceRect, IDirect3DSurface9* pDestSurface, CONST RECT* pDestRect, D3DTEXTUREFILTERTYPE Filter) { UNIMPLEMENTED return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice9Impl_ColorFill(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9* pSurface, CONST RECT* pRect, D3DCOLOR color) +HRESULT WINAPI IDirect3DDevice9Base_ColorFill(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9* pSurface, CONST RECT* pRect, D3DCOLOR color) { UNIMPLEMENTED return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice9Impl_CreateOffscreenPlainSurface(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, D3DFORMAT Format, D3DPOOL Pool, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle) +HRESULT WINAPI IDirect3DDevice9Base_CreateOffscreenPlainSurface(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, D3DFORMAT Format, D3DPOOL Pool, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle) { UNIMPLEMENTED return D3D_OK; } - -static HRESULT WINAPI IDirect3DDevice9Impl_SetRenderTarget(LPDIRECT3DDEVICE9 iface, DWORD RenderTargetIndex, IDirect3DSurface9* pRenderTarget) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetRenderTarget(LPDIRECT3DDEVICE9 iface, DWORD RenderTargetIndex,IDirect3DSurface9** ppRenderTarget) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_SetDepthStencilSurface(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9* pNewZStencil) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetDepthStencilSurface(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9** ppZStencilSurface) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_BeginScene(LPDIRECT3DDEVICE9 iface) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_EndScene(LPDIRECT3DDEVICE9 iface) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_Clear(LPDIRECT3DDEVICE9 iface, DWORD Count, CONST D3DRECT* pRects, DWORD Flags, D3DCOLOR Color, float Z, DWORD Stencil) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_SetTransform(LPDIRECT3DDEVICE9 iface, D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* pMatrix) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetTransform(LPDIRECT3DDEVICE9 iface, D3DTRANSFORMSTATETYPE State, D3DMATRIX* pMatrix) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_MultiplyTransform(LPDIRECT3DDEVICE9 iface, D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* pMatrix) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_SetViewport(LPDIRECT3DDEVICE9 iface, CONST D3DVIEWPORT9* pViewport) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetViewport(LPDIRECT3DDEVICE9 iface, D3DVIEWPORT9* pViewport) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_SetMaterial(LPDIRECT3DDEVICE9 iface, CONST D3DMATERIAL9* pMaterial) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetMaterial(LPDIRECT3DDEVICE9 iface, D3DMATERIAL9* pMaterial) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_SetLight(LPDIRECT3DDEVICE9 iface, DWORD Index, CONST D3DLIGHT9* pLight) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetLight(LPDIRECT3DDEVICE9 iface, DWORD Index, D3DLIGHT9* pLight) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_LightEnable(LPDIRECT3DDEVICE9 iface, DWORD Index, BOOL Enable) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetLightEnable(LPDIRECT3DDEVICE9 iface, DWORD Index, BOOL* pEnable) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_SetClipPlane(LPDIRECT3DDEVICE9 iface, DWORD Index, CONST float* pPlane) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetClipPlane(LPDIRECT3DDEVICE9 iface, DWORD Index, float* pPlane) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_SetRenderState(LPDIRECT3DDEVICE9 iface, D3DRENDERSTATETYPE State, DWORD Value) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetRenderState(LPDIRECT3DDEVICE9 iface, D3DRENDERSTATETYPE State, DWORD* pValue) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_CreateStateBlock(LPDIRECT3DDEVICE9 iface, D3DSTATEBLOCKTYPE Type, IDirect3DStateBlock9** ppSB) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_BeginStateBlock(LPDIRECT3DDEVICE9 iface) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_EndStateBlock(LPDIRECT3DDEVICE9 iface, IDirect3DStateBlock9** ppSB) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_SetClipStatus(LPDIRECT3DDEVICE9 iface, CONST D3DCLIPSTATUS9* pClipStatus) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetClipStatus(LPDIRECT3DDEVICE9 iface, D3DCLIPSTATUS9* pClipStatus) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetTexture(LPDIRECT3DDEVICE9 iface, DWORD Stage, IDirect3DBaseTexture9** ppTexture) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_SetTexture(LPDIRECT3DDEVICE9 iface, DWORD Stage, IDirect3DBaseTexture9* pTexture) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetTextureStageState(LPDIRECT3DDEVICE9 iface, DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD* pValue) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_SetTextureStageState(LPDIRECT3DDEVICE9 iface, DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD Value) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetSamplerState(LPDIRECT3DDEVICE9 iface, DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD* pValue) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_SetSamplerState(LPDIRECT3DDEVICE9 iface, DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD Value) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_ValidateDevice(LPDIRECT3DDEVICE9 iface, DWORD* pNumPasses) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_SetPaletteEntries(LPDIRECT3DDEVICE9 iface, UINT PaletteNumber, CONST PALETTEENTRY* pEntries) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetPaletteEntries(LPDIRECT3DDEVICE9 iface, UINT PaletteNumber, PALETTEENTRY* pEntries) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_SetCurrentTexturePalette(LPDIRECT3DDEVICE9 iface, UINT PaletteNumber) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetCurrentTexturePalette(LPDIRECT3DDEVICE9 iface, UINT* pPaletteNumber) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_SetScissorRect(LPDIRECT3DDEVICE9 iface, CONST RECT* pRect) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetScissorRect(LPDIRECT3DDEVICE9 iface, RECT* pRect) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_SetSoftwareVertexProcessing(LPDIRECT3DDEVICE9 iface, BOOL bSoftware) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static BOOL WINAPI IDirect3DDevice9Impl_GetSoftwareVertexProcessing(LPDIRECT3DDEVICE9 iface) -{ - UNIMPLEMENTED - - return TRUE; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_SetNPatchMode(LPDIRECT3DDEVICE9 iface, float nSegments) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static float WINAPI IDirect3DDevice9Impl_GetNPatchMode(LPDIRECT3DDEVICE9 iface) -{ - UNIMPLEMENTED - - return 0.0f; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_DrawPrimitive(LPDIRECT3DDEVICE9 iface, D3DPRIMITIVETYPE PrimitiveType, UINT StartVertex, UINT PrimitiveCount) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_DrawIndexedPrimitive(LPDIRECT3DDEVICE9 iface, D3DPRIMITIVETYPE PrimitiveType, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_DrawPrimitiveUP(LPDIRECT3DDEVICE9 iface, D3DPRIMITIVETYPE PrimitiveType, UINT PrimitiveCount, CONST void* pVertexStreamZeroData, UINT VertexStreamZeroStride) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_DrawIndexedPrimitiveUP(LPDIRECT3DDEVICE9 iface, D3DPRIMITIVETYPE PrimitiveType, UINT MinVertexIndex, UINT NumVertices, UINT PrimitiveCount, CONST void* pIndexData, D3DFORMAT IndexDataFormat, CONST void* pVertexStreamZeroData, UINT VertexStreamZeroStride) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_ProcessVertices(LPDIRECT3DDEVICE9 iface, UINT SrcStartIndex, UINT DestIndex, UINT VertexCount, IDirect3DVertexBuffer9* pDestBuffer, IDirect3DVertexDeclaration9* pVertexDecl, DWORD Flags) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexDeclaration(LPDIRECT3DDEVICE9 iface, CONST D3DVERTEXELEMENT9* pVertexElements, IDirect3DVertexDeclaration9** ppDecl) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_SetVertexDeclaration(LPDIRECT3DDEVICE9 iface, IDirect3DVertexDeclaration9* pDecl) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetVertexDeclaration(LPDIRECT3DDEVICE9 iface, IDirect3DVertexDeclaration9** ppDecl) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_SetFVF(LPDIRECT3DDEVICE9 iface, DWORD FVF) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetFVF(LPDIRECT3DDEVICE9 iface, DWORD* pFVF) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexShader(LPDIRECT3DDEVICE9 iface, CONST DWORD* pFunction, IDirect3DVertexShader9** ppShader) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShader(LPDIRECT3DDEVICE9 iface, IDirect3DVertexShader9* pShader) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShader(LPDIRECT3DDEVICE9 iface, IDirect3DVertexShader9** ppShader) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantF(LPDIRECT3DDEVICE9 iface, UINT StartRegister, CONST float* pConstantData, UINT Vector4fCount) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantF(LPDIRECT3DDEVICE9 iface, UINT StartRegister, float* pConstantData, UINT Vector4fCount) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantI(LPDIRECT3DDEVICE9 iface, UINT StartRegister, CONST int* pConstantData, UINT Vector4iCount) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantI(LPDIRECT3DDEVICE9 iface, UINT StartRegister, int* pConstantData, UINT Vector4iCount) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantB(LPDIRECT3DDEVICE9 iface, UINT StartRegister, CONST BOOL* pConstantData, UINT BoolCount) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantB(LPDIRECT3DDEVICE9 iface, UINT StartRegister, BOOL* pConstantData, UINT BoolCount) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_SetStreamSource(LPDIRECT3DDEVICE9 iface, UINT StreamNumber, IDirect3DVertexBuffer9* pStreamData, UINT OffsetInBytes, UINT Stride) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetStreamSource(LPDIRECT3DDEVICE9 iface, UINT StreamNumber, IDirect3DVertexBuffer9** ppStreamData, UINT* pOffsetInBytes, UINT* pStride) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_SetStreamSourceFreq(LPDIRECT3DDEVICE9 iface, UINT StreamNumber,UINT Setting) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetStreamSourceFreq(LPDIRECT3DDEVICE9 iface, UINT StreamNumber, UINT* pSetting) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_SetIndices(LPDIRECT3DDEVICE9 iface, IDirect3DIndexBuffer9* pIndexData) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetIndices(LPDIRECT3DDEVICE9 iface, IDirect3DIndexBuffer9** ppIndexData) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_CreatePixelShader(LPDIRECT3DDEVICE9 iface, CONST DWORD* pFunction, IDirect3DPixelShader9** ppShader) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShader(LPDIRECT3DDEVICE9 iface, IDirect3DPixelShader9* pShader) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShader(LPDIRECT3DDEVICE9 iface, IDirect3DPixelShader9** ppShader) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShaderConstantF(LPDIRECT3DDEVICE9 iface, UINT StartRegister, CONST float* pConstantData, UINT Vector4fCount) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShaderConstantF(LPDIRECT3DDEVICE9 iface, UINT StartRegister, float* pConstantData, UINT Vector4fCount) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShaderConstantI(LPDIRECT3DDEVICE9 iface, UINT StartRegister, CONST int* pConstantData, UINT Vector4iCount) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShaderConstantI(LPDIRECT3DDEVICE9 iface, UINT StartRegister, int* pConstantData, UINT Vector4iCount) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShaderConstantB(LPDIRECT3DDEVICE9 iface, UINT StartRegister, CONST BOOL* pConstantData, UINT BoolCount) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShaderConstantB(LPDIRECT3DDEVICE9 iface, UINT StartRegister, BOOL* pConstantData, UINT BoolCount) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_DrawRectPatch(LPDIRECT3DDEVICE9 iface, UINT Handle, CONST float* pNumSegs, CONST D3DRECTPATCH_INFO* pRectPatchInfo) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_DrawTriPatch(LPDIRECT3DDEVICE9 iface, UINT Handle, CONST float* pNumSegs, CONST D3DTRIPATCH_INFO* pTriPatchInfo) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_DeletePatch(LPDIRECT3DDEVICE9 iface, UINT Handle) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_CreateQuery(LPDIRECT3DDEVICE9 iface, D3DQUERYTYPE Type, IDirect3DQuery9** ppQuery) -{ - UNIMPLEMENTED - - return D3D_OK; -} - -IDirect3DDevice9Vtbl Direct3DDevice9_Vtbl = -{ - /* IUnknown */ - IDirect3DDevice9Impl_QueryInterface, - IDirect3DDevice9Impl_AddRef, - IDirect3DDevice9Impl_Release, - - /* IDirect3D9Device */ - IDirect3DDevice9Impl_TestCooperativeLevel, - IDirect3DDevice9Impl_GetAvailableTextureMem, - IDirect3DDevice9Impl_EvictManagedResources, - IDirect3DDevice9Impl_GetDirect3D, - IDirect3DDevice9Impl_GetDeviceCaps, - IDirect3DDevice9Impl_GetDisplayMode, - IDirect3DDevice9Impl_GetCreationParameters, - IDirect3DDevice9Impl_SetCursorProperties, - IDirect3DDevice9Impl_SetCursorPosition, - IDirect3DDevice9Impl_ShowCursor, - IDirect3DDevice9Impl_CreateAdditionalSwapChain, - IDirect3DDevice9Impl_GetSwapChain, - IDirect3DDevice9Impl_GetNumberOfSwapChains, - IDirect3DDevice9Impl_Reset, - IDirect3DDevice9Impl_Present, - IDirect3DDevice9Impl_GetBackBuffer, - IDirect3DDevice9Impl_GetRasterStatus, - IDirect3DDevice9Impl_SetDialogBoxMode, - IDirect3DDevice9Impl_SetGammaRamp, - IDirect3DDevice9Impl_GetGammaRamp, - IDirect3DDevice9Impl_CreateTexture, - IDirect3DDevice9Impl_CreateVolumeTexture, - IDirect3DDevice9Impl_CreateCubeTexture, - IDirect3DDevice9Impl_CreateVertexBuffer, - IDirect3DDevice9Impl_CreateIndexBuffer, - IDirect3DDevice9Impl_CreateRenderTarget, - IDirect3DDevice9Impl_CreateDepthStencilSurface, - IDirect3DDevice9Impl_UpdateSurface, - IDirect3DDevice9Impl_UpdateTexture, - IDirect3DDevice9Impl_GetRenderTargetData, - IDirect3DDevice9Impl_GetFrontBufferData, - IDirect3DDevice9Impl_StretchRect, - IDirect3DDevice9Impl_ColorFill, - IDirect3DDevice9Impl_CreateOffscreenPlainSurface, - IDirect3DDevice9Impl_SetRenderTarget, - IDirect3DDevice9Impl_GetRenderTarget, - IDirect3DDevice9Impl_SetDepthStencilSurface, - IDirect3DDevice9Impl_GetDepthStencilSurface, - IDirect3DDevice9Impl_BeginScene, - IDirect3DDevice9Impl_EndScene, - IDirect3DDevice9Impl_Clear, - IDirect3DDevice9Impl_SetTransform, - IDirect3DDevice9Impl_GetTransform, - IDirect3DDevice9Impl_MultiplyTransform, - IDirect3DDevice9Impl_SetViewport, - IDirect3DDevice9Impl_GetViewport, - IDirect3DDevice9Impl_SetMaterial, - IDirect3DDevice9Impl_GetMaterial, - IDirect3DDevice9Impl_SetLight, - IDirect3DDevice9Impl_GetLight, - IDirect3DDevice9Impl_LightEnable, - IDirect3DDevice9Impl_GetLightEnable, - IDirect3DDevice9Impl_SetClipPlane, - IDirect3DDevice9Impl_GetClipPlane, - IDirect3DDevice9Impl_SetRenderState, - IDirect3DDevice9Impl_GetRenderState, - IDirect3DDevice9Impl_CreateStateBlock, - IDirect3DDevice9Impl_BeginStateBlock, - IDirect3DDevice9Impl_EndStateBlock, - IDirect3DDevice9Impl_SetClipStatus, - IDirect3DDevice9Impl_GetClipStatus, - IDirect3DDevice9Impl_GetTexture, - IDirect3DDevice9Impl_SetTexture, - IDirect3DDevice9Impl_GetTextureStageState, - IDirect3DDevice9Impl_SetTextureStageState, - IDirect3DDevice9Impl_GetSamplerState, - IDirect3DDevice9Impl_SetSamplerState, - IDirect3DDevice9Impl_ValidateDevice, - IDirect3DDevice9Impl_SetPaletteEntries, - IDirect3DDevice9Impl_GetPaletteEntries, - IDirect3DDevice9Impl_SetCurrentTexturePalette, - IDirect3DDevice9Impl_GetCurrentTexturePalette, - IDirect3DDevice9Impl_SetScissorRect, - IDirect3DDevice9Impl_GetScissorRect, - IDirect3DDevice9Impl_SetSoftwareVertexProcessing, - IDirect3DDevice9Impl_GetSoftwareVertexProcessing, - IDirect3DDevice9Impl_SetNPatchMode, - IDirect3DDevice9Impl_GetNPatchMode, - IDirect3DDevice9Impl_DrawPrimitive, - IDirect3DDevice9Impl_DrawIndexedPrimitive, - IDirect3DDevice9Impl_DrawPrimitiveUP, - IDirect3DDevice9Impl_DrawIndexedPrimitiveUP, - IDirect3DDevice9Impl_ProcessVertices, - IDirect3DDevice9Impl_CreateVertexDeclaration, - IDirect3DDevice9Impl_SetVertexDeclaration, - IDirect3DDevice9Impl_GetVertexDeclaration, - IDirect3DDevice9Impl_SetFVF, - IDirect3DDevice9Impl_GetFVF, - IDirect3DDevice9Impl_CreateVertexShader, - IDirect3DDevice9Impl_SetVertexShader, - IDirect3DDevice9Impl_GetVertexShader, - IDirect3DDevice9Impl_SetVertexShaderConstantF, - IDirect3DDevice9Impl_GetVertexShaderConstantF, - IDirect3DDevice9Impl_SetVertexShaderConstantI, - IDirect3DDevice9Impl_GetVertexShaderConstantI, - IDirect3DDevice9Impl_SetVertexShaderConstantB, - IDirect3DDevice9Impl_GetVertexShaderConstantB, - IDirect3DDevice9Impl_SetStreamSource, - IDirect3DDevice9Impl_GetStreamSource, - IDirect3DDevice9Impl_SetStreamSourceFreq, - IDirect3DDevice9Impl_GetStreamSourceFreq, - IDirect3DDevice9Impl_SetIndices, - IDirect3DDevice9Impl_GetIndices, - IDirect3DDevice9Impl_CreatePixelShader, - IDirect3DDevice9Impl_SetPixelShader, - IDirect3DDevice9Impl_GetPixelShader, - IDirect3DDevice9Impl_SetPixelShaderConstantF, - IDirect3DDevice9Impl_GetPixelShaderConstantF, - IDirect3DDevice9Impl_SetPixelShaderConstantI, - IDirect3DDevice9Impl_GetPixelShaderConstantI, - IDirect3DDevice9Impl_SetPixelShaderConstantB, - IDirect3DDevice9Impl_GetPixelShaderConstantB, - IDirect3DDevice9Impl_DrawRectPatch, - IDirect3DDevice9Impl_DrawTriPatch, - IDirect3DDevice9Impl_DeletePatch, - IDirect3DDevice9Impl_CreateQuery, -}; - diff --git a/reactos/dll/directx/d3d9/d3d9_device.h b/reactos/dll/directx/d3d9/d3d9_device.h index 5dd82327cba..2eca346cab9 100644 --- a/reactos/dll/directx/d3d9/d3d9_device.h +++ b/reactos/dll/directx/d3d9/d3d9_device.h @@ -10,17 +10,64 @@ #include "d3d9_common.h" #include +#include #include "d3d9_private.h" #include "d3d9_swapchain.h" #include "d3d9_surface.h" -extern struct IDirect3DDevice9Vtbl Direct3DDevice9_Vtbl; +#if !defined(__cplusplus) || defined(CINTERFACE) +typedef struct _IDirect3DDevice9Vtbl_INT +{ + struct IDirect3DDevice9Vtbl PublicInterface; + + HRESULT (WINAPI *SetRenderStateWorker)(LPDIRECT3DDEVICE9 iface, D3DRENDERSTATETYPE State, DWORD Value); // Value = D3DDEGREETYPE Degree ); + HRESULT (WINAPI *SetTextureStageStateI)(LPDIRECT3DDEVICE9 iface, DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD Value); + HRESULT (WINAPI *SetSamplerStateI)(LPDIRECT3DDEVICE9 iface, DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD Value); + HRESULT (WINAPI *SetMaterial)(LPDIRECT3DDEVICE9 iface, CONST D3DMATERIAL9* pMaterial); + HRESULT (WINAPI *SetVertexShader)(LPDIRECT3DDEVICE9 iface, IDirect3DVertexShader9* pShader); + HRESULT (WINAPI *SetVertexShaderConstantF)(LPDIRECT3DDEVICE9 iface, UINT StartRegister,CONST float* pConstantData,UINT Vector4fCount); + HRESULT (WINAPI *SetVertexShaderConstantI)(LPDIRECT3DDEVICE9 iface, UINT StartRegister,CONST int* pConstantData,UINT Vector4iCount); + HRESULT (WINAPI *SetVertexShaderConstantB)(LPDIRECT3DDEVICE9 iface, UINT StartRegister,CONST BOOL* pConstantData,UINT BoolCount); + HRESULT (WINAPI *SetPixelShader)(LPDIRECT3DDEVICE9 iface, IDirect3DPixelShader9* pShader); + HRESULT (WINAPI *SetPixelShaderConstantF)(LPDIRECT3DDEVICE9 iface, UINT StartRegister,CONST float* pConstantData,UINT Vector4fCount); + HRESULT (WINAPI *SetPixelShaderConstantI)(LPDIRECT3DDEVICE9 iface, UINT StartRegister,CONST int* pConstantData,UINT Vector4iCount); + HRESULT (WINAPI *SetPixelShaderConstantB)(LPDIRECT3DDEVICE9 iface, UINT StartRegister,CONST BOOL* pConstantData,UINT BoolCount); + HRESULT (WINAPI *SetFVF)(LPDIRECT3DDEVICE9 iface, DWORD FVF); + HRESULT (WINAPI *SetTexture)(LPDIRECT3DDEVICE9 iface, DWORD Stage,IDirect3DBaseTexture9* pTexture); + HRESULT (WINAPI *SetIndices)(LPDIRECT3DDEVICE9 iface, IDirect3DIndexBuffer9* pIndexData); + HRESULT (WINAPI *SetStreamSource)(LPDIRECT3DDEVICE9 iface, UINT StreamNumber,IDirect3DVertexBuffer9* pStreamData,UINT OffsetInBytes,UINT Stride); + HRESULT (WINAPI *SetStreamSourceFreq)(LPDIRECT3DDEVICE9 iface, UINT StreamNumber,UINT Setting); + VOID (WINAPI *UpdateRenderState)(LPDIRECT3DDEVICE9 iface, DWORD Unknown1, DWORD Unknown2); + HRESULT (WINAPI *SetTransform)(LPDIRECT3DDEVICE9 iface, D3DTRANSFORMSTATETYPE State,CONST D3DMATRIX* pMatrix); + HRESULT (WINAPI *MultiplyTransform)(LPDIRECT3DDEVICE9 iface, D3DTRANSFORMSTATETYPE,CONST D3DMATRIX*); + HRESULT (WINAPI *SetClipPlane)(LPDIRECT3DDEVICE9 iface, DWORD Index,CONST float* pPlane); + VOID (WINAPI *UpdateDriverState)(LPDIRECT3DDEVICE9 iface); + HRESULT (WINAPI *SetViewport)(LPDIRECT3DDEVICE9 iface, CONST D3DVIEWPORT9* pViewport); + VOID (WINAPI *SetStreamSourceInt)(LPDIRECT3DDEVICE9 iface, LPVOID UnknownStreamData); + HRESULT (WINAPI *SetPixelShaderConstantFWorker)(LPDIRECT3DDEVICE9 iface, UINT StartRegister,CONST float* pConstantData,UINT Vector4fCount); + HRESULT (WINAPI *SetPixelShaderConstantIWorker)(LPDIRECT3DDEVICE9 iface, UINT StartRegister,CONST int* pConstantData,UINT Vector4iCount); + HRESULT (WINAPI *SetPixelShaderConstantBWorker)(LPDIRECT3DDEVICE9 iface, UINT StartRegister,CONST BOOL* pConstantData,UINT BoolCount); + VOID (WINAPI *DrawPrimitiveWorker)(LPDIRECT3DDEVICE9 iface, D3DPRIMITIVETYPE PrimitiveType,UINT StartVertex,UINT PrimitiveCount); + HRESULT (WINAPI *SetLight)(LPDIRECT3DDEVICE9 iface, DWORD Index,CONST D3DLIGHT9*); + HRESULT (WINAPI *LightEnable)(LPDIRECT3DDEVICE9 iface, DWORD Index,BOOL Enable); + HRESULT (WINAPI *SetRenderStateInt)(LPDIRECT3DDEVICE9 iface, D3DRENDERSTATETYPE State, DWORD Value ); // Value = D3DDEGREETYPE Degree ); + HRESULT (WINAPI *DrawPrimitiveUPInt)(LPDIRECT3DDEVICE9 iface, D3DPRIMITIVETYPE PrimitiveType, UINT PrimitiveCount); + HRESULT (WINAPI *Clear)(LPDIRECT3DDEVICE9 iface, DWORD Count,CONST D3DRECT* pRects,DWORD Flags,D3DCOLOR Color,float Z,DWORD Stencil); + VOID (WINAPI *DrawPrimitivesWorker)(LPDIRECT3DDEVICE9 iface); + VOID (WINAPI *UpdateVertexShader)(LPDIRECT3DDEVICE9 iface); + HRESULT (WINAPI *ValidateDrawCall)(LPDIRECT3DDEVICE9 iface, D3DPRIMITIVETYPE PrimitiveType, UINT Unknown1, UINT Unknown2, UINT Unknown3, INT Unknown4, UINT Unknown5, INT Unknown6); + HRESULT (WINAPI *Init)(LPDIRECT3DDEVICE9 iface); + VOID (WINAPI *InitState)(LPDIRECT3DDEVICE9 iface, INT State); + VOID (WINAPI *Destroy)(LPDIRECT3DDEVICE9 iface); + VOID (WINAPI *VirtualDestructor)(LPDIRECT3DDEVICE9 iface); +} IDirect3DDevice9Vtbl_INT; +#endif typedef struct _D3D9HeapTexture { /* 0x0000 */ DWORD dwUnknown00; -/* 0x0004 */ DWORD dwUnknown04; -/* 0x0008 */ LPDWORD pUnknown08; +/* 0x0004 */ DWORD dwUnknown04; // 0x400 +/* 0x0008 */ LPDWORD pUnknown08; // malloc(dwUnknown04 * 2) } D3D9HeapTexture; typedef struct _D3D9ResourceManager @@ -57,7 +104,7 @@ typedef struct _D3D9Cursor typedef struct _Direct3DDevice9_INT { -/* 0x0000 */ struct IDirect3DDevice9Vtbl* lpVtbl; +/* 0x0000 */ struct _IDirect3DDevice9Vtbl_INT* lpVtbl; /* 0x0004 */ CRITICAL_SECTION CriticalSection; #ifdef D3D_DEBUG_INFO /* N/A - 0x001c */ DWORD dbg0004; @@ -77,7 +124,7 @@ typedef struct _Direct3DDevice9_INT #endif /* 0x001c - 0x0054 */ BOOL bLockDevice; /* 0x0020 - 0x0058 */ DWORD dwProcessId; -/* 0x0024 - 0x005c */ struct _D3D9PUREDEVICE* lpThis; +/* 0x0024 - 0x005c */ IUnknown* pUnknown; /* 0x0028 - 0x0060 */ DWORD dwDXVersion; /* 0x002c - 0x0064 */ DWORD unknown000011; /* 0x0030 - 0x0068 */ LONG lRefCnt; @@ -91,8 +138,8 @@ typedef struct _Direct3DDevice9_INT /* 0x0050 - 0x0088 */ D3DDISPLAYMODE CurrentDisplayMode[D3D9_INT_MAX_NUM_ADAPTERS]; /* 0x0110 - 0x0148 */ DWORD AdapterIndexInGroup[D3D9_INT_MAX_NUM_ADAPTERS]; /* 0x0140 - 0x0178 */ D3D9_DEVICEDATA DeviceData[D3D9_INT_MAX_NUM_ADAPTERS]; -/* 0x1df0 - 0x1e28 */ LPDIRECT3DSWAPCHAIN9_INT pSwapChains[D3D9_INT_MAX_NUM_ADAPTERS]; -/* 0x1e20 */ LPDIRECT3DSWAPCHAIN9_INT pSwapChains2[D3D9_INT_MAX_NUM_ADAPTERS]; +/* 0x1df0 - 0x1e28 */ LPDIRECT3DSWAPCHAIN9_INT pSwapChains[D3D9_INT_MAX_NUM_ADAPTERS]; +/* 0x1e20 - 0x1e58 */ LPDIRECT3DSWAPCHAIN9_INT pSwapChains2[D3D9_INT_MAX_NUM_ADAPTERS]; /* 0x1e50 */ D3D9BaseSurface* pRenderTargetList; /* 0x1e54 */ DWORD unknown001941; /* 0x1e58 */ DWORD unknown001942; @@ -157,1318 +204,45 @@ typedef struct _Direct3DDevice9_INT /* 0x1f44 */ DWORD unknown002001; } DIRECT3DDEVICE9_INT, FAR* LPDIRECT3DDEVICE9_INT; -typedef struct _D3D9PUREDEVICE -{ -/* 0x0000 - 0x0000 */ DIRECT3DDEVICE9_INT BaseDevice; -/* 0x1f48 */ DWORD unknown002002; -/* 0x1f4c */ DWORD unknown002003; -/* 0x1f50 */ DWORD unknown002004; -/* 0x1f54 */ DWORD unknown002005; -/* 0x1f58 */ DWORD unknown002006; -/* 0x1f5c */ DWORD unknown002007; -/* 0x1f60 */ DWORD unknown002008; -/* 0x1f64 */ DWORD unknown002009; -/* 0x1f68 */ DWORD unknown002010; -/* 0x1f6c */ DWORD unknown002011; -/* 0x1f70 */ DWORD unknown002012; -/* 0x1f74 */ DWORD unknown002013; -/* 0x1f78 */ DWORD unknown002014; -/* 0x1f7c */ DWORD unknown002015; -/* 0x1f80 */ DWORD unknown002016; -/* 0x1f84 */ DWORD unknown002017; -/* 0x1f88 */ DWORD unknown002018; -/* 0x1f8c */ DWORD unknown002019; -/* 0x1f90 */ DWORD unknown002020; -/* 0x1f94 */ DWORD unknown002021; -/* 0x1f98 */ DWORD unknown002022; -/* 0x1f9c */ DWORD unknown002023; -/* 0x1fa0 */ DWORD unknown002024; -/* 0x1fa4 */ DWORD unknown002025; -/* 0x1fa8 - 0x1fe0 */ DWORD unknown002026; -/* 0x1fac */ DWORD unknown002027; -/* 0x1fb0 */ DWORD unknown002028; -/* 0x1fb4 */ DWORD unknown002029; -/* 0x1fb8 */ DWORD unknown002030; -/* 0x1fbc */ DWORD unknown002031; -/* 0x1fc0 */ DWORD unknown002032; -/* 0x1fc4 */ DWORD unknown002033; -/* 0x1fc8 */ DWORD unknown002034; -/* 0x1fcc */ DWORD unknown002035; -/* 0x1fd0 */ DWORD unknown002036; -/* 0x1fd4 */ DWORD unknown002037; -/* 0x1fd8 */ DWORD unknown002038; -/* 0x1fdc */ DWORD unknown002039; -/* 0x1fe0 */ DWORD unknown002040; -/* 0x1fe4 */ DWORD unknown002041; -/* 0x1fe8 */ DWORD unknown002042; -/* 0x1fec */ DWORD unknown002043; -/* 0x1ff0 */ DWORD unknown002044; -/* 0x1ff4 */ DWORD unknown002045; -/* 0x1ff8 */ DWORD unknown002046; -/* 0x1ffc */ DWORD unknown002047; -/* 0x2000 */ DWORD unknown002048; -/* 0x2004 */ DWORD unknown002049; -/* 0x2008 */ DWORD unknown002050; -/* 0x200c */ DWORD unknown002051; -/* 0x2010 */ DWORD unknown002052; -/* 0x2014 */ DWORD unknown002053; -/* 0x2018 */ DWORD unknown002054; -/* 0x201c */ DWORD unknown002055; -/* 0x2020 */ DWORD unknown002056; -/* 0x2024 */ DWORD unknown002057; -/* 0x2028 */ DWORD unknown002058; -/* 0x202c */ DWORD unknown002059; -/* 0x2030 */ DWORD unknown002060; -/* 0x2034 */ DWORD unknown002061; -/* 0x2038 */ DWORD unknown002062; -/* 0x203c */ DWORD unknown002063; -/* 0x2040 */ DWORD unknown002064; -/* 0x2044 */ DWORD unknown002065; -/* 0x2048 */ DWORD unknown002066; -/* 0x204c */ DWORD unknown002067; -/* 0x2050 */ DWORD unknown002068; -/* 0x2054 */ DWORD unknown002069; -/* 0x2058 */ DWORD unknown002070; -/* 0x205c */ DWORD unknown002071; -/* 0x2060 */ DWORD unknown002072; -/* 0x2064 */ DWORD unknown002073; -/* 0x2068 */ DWORD unknown002074; -/* 0x206c */ DWORD unknown002075; -/* 0x2070 */ DWORD unknown002076; -/* 0x2074 */ DWORD unknown002077; -/* 0x2078 */ DWORD unknown002078; -/* 0x207c */ DWORD unknown002079; -/* 0x2080 */ DWORD unknown002080; -/* 0x2084 */ DWORD unknown002081; -/* 0x2088 */ DWORD unknown002082; -/* 0x208c */ DWORD unknown002083; -/* 0x2090 */ DWORD unknown002084; -/* 0x2094 */ DWORD unknown002085; -/* 0x2098 */ DWORD unknown002086; -/* 0x209c */ DWORD unknown002087; -/* 0x20a0 */ DWORD unknown002088; -/* 0x20a4 */ DWORD unknown002089; -/* 0x20a8 */ DWORD unknown002090; -/* 0x20ac */ DWORD unknown002091; -/* 0x20b0 */ DWORD unknown002092; -/* 0x20b4 */ DWORD unknown002093; -/* 0x20b8 */ DWORD unknown002094; -/* 0x20bc */ DWORD unknown002095; -/* 0x20c0 */ DWORD unknown002096; -/* 0x20c4 */ DWORD unknown002097; -/* 0x20c8 */ DWORD unknown002098; -/* 0x20cc */ DWORD unknown002099; -/* 0x20d0 */ DWORD unknown002100; -/* 0x20d4 */ DWORD unknown002101; -/* 0x20d8 */ DWORD unknown002102; -/* 0x20dc */ DWORD unknown002103; -/* 0x20e0 */ DWORD unknown002104; -/* 0x20e4 */ DWORD unknown002105; -/* 0x20e8 */ DWORD unknown002106; -/* 0x20ec */ DWORD unknown002107; -/* 0x20f0 */ DWORD unknown002108; -/* 0x20f4 */ DWORD unknown002109; -/* 0x20f8 */ DWORD unknown002110; -/* 0x20fc */ DWORD unknown002111; -/* 0x2100 */ DWORD unknown002112; -/* 0x2104 */ DWORD unknown002113; -/* 0x2108 */ DWORD unknown002114; -/* 0x210c */ DWORD unknown002115; -/* 0x2110 */ DWORD unknown002116; -/* 0x2114 */ DWORD unknown002117; -/* 0x2118 */ DWORD unknown002118; -/* 0x211c */ DWORD unknown002119; -/* 0x2120 */ DWORD unknown002120; -/* 0x2124 */ DWORD unknown002121; -/* 0x2128 */ DWORD unknown002122; -/* 0x212c */ DWORD unknown002123; -/* 0x2130 */ DWORD unknown002124; -/* 0x2134 */ DWORD unknown002125; -/* 0x2138 */ DWORD unknown002126; -/* 0x213c */ DWORD unknown002127; -/* 0x2140 */ DWORD unknown002128; -/* 0x2144 */ DWORD unknown002129; -/* 0x2148 */ DWORD unknown002130; -/* 0x214c */ DWORD unknown002131; -/* 0x2150 */ DWORD unknown002132; -/* 0x2154 */ DWORD unknown002133; -/* 0x2158 */ DWORD unknown002134; -/* 0x215c */ DWORD unknown002135; -/* 0x2160 */ DWORD unknown002136; -/* 0x2164 */ DWORD unknown002137; -/* 0x2168 */ DWORD unknown002138; -/* 0x216c */ DWORD unknown002139; -/* 0x2170 */ DWORD unknown002140; -/* 0x2174 */ DWORD unknown002141; -/* 0x2178 */ DWORD unknown002142; -/* 0x217c */ DWORD unknown002143; -/* 0x2180 */ DWORD unknown002144; -/* 0x2184 */ DWORD unknown002145; -/* 0x2188 */ DWORD unknown002146; -/* 0x218c */ DWORD unknown002147; -/* 0x2190 */ DWORD unknown002148; -/* 0x2194 */ DWORD unknown002149; -/* 0x2198 */ DWORD unknown002150; -/* 0x219c */ DWORD unknown002151; -/* 0x21a0 */ DWORD unknown002152; -/* 0x21a4 */ DWORD unknown002153; -/* 0x21a8 */ DWORD unknown002154; -/* 0x21ac */ DWORD unknown002155; -/* 0x21b0 */ DWORD unknown002156; -/* 0x21b4 */ DWORD unknown002157; -/* 0x21b8 */ DWORD unknown002158; -/* 0x21bc */ DWORD unknown002159; -/* 0x21c0 */ DWORD unknown002160; -/* 0x21c4 */ DWORD unknown002161; -/* 0x21c8 */ DWORD unknown002162; -/* 0x21cc */ DWORD unknown002163; -/* 0x21d0 */ DWORD unknown002164; -/* 0x21d4 */ DWORD unknown002165; -/* 0x21d8 */ DWORD unknown002166; -/* 0x21dc */ DWORD unknown002167; -/* 0x21e0 */ DWORD unknown002168; -/* 0x21e4 */ DWORD unknown002169; -/* 0x21e8 */ DWORD unknown002170; -/* 0x21ec */ DWORD unknown002171; -/* 0x21f0 */ DWORD unknown002172; -/* 0x21f4 */ DWORD unknown002173; -/* 0x21f8 */ DWORD unknown002174; -/* 0x21fc */ DWORD unknown002175; -/* 0x2200 */ DWORD unknown002176; -/* 0x2204 */ DWORD unknown002177; -/* 0x2208 */ DWORD unknown002178; -/* 0x220c */ DWORD unknown002179; -/* 0x2210 */ DWORD unknown002180; -/* 0x2214 */ DWORD unknown002181; -/* 0x2218 */ DWORD unknown002182; -/* 0x221c */ DWORD unknown002183; -/* 0x2220 */ DWORD unknown002184; -/* 0x2224 */ DWORD unknown002185; -/* 0x2228 */ DWORD unknown002186; -/* 0x222c */ DWORD unknown002187; -/* 0x2230 */ DWORD unknown002188; -/* 0x2234 */ DWORD unknown002189; -/* 0x2238 */ DWORD unknown002190; -/* 0x223c */ DWORD unknown002191; -/* 0x2240 */ DWORD unknown002192; -/* 0x2244 */ DWORD unknown002193; -/* 0x2248 */ DWORD unknown002194; -/* 0x224c */ DWORD unknown002195; -/* 0x2250 */ DWORD unknown002196; -/* 0x2254 */ DWORD unknown002197; -/* 0x2258 */ DWORD unknown002198; -/* 0x225c */ DWORD unknown002199; -/* 0x2260 */ DWORD unknown002200; -/* 0x2264 */ DWORD unknown002201; -/* 0x2268 */ DWORD unknown002202; -/* 0x226c */ DWORD unknown002203; -/* 0x2270 */ DWORD unknown002204; -/* 0x2274 */ DWORD unknown002205; -/* 0x2278 */ DWORD unknown002206; -/* 0x227c */ DWORD unknown002207; -/* 0x2280 */ DWORD unknown002208; -/* 0x2284 */ DWORD unknown002209; -/* 0x2288 */ DWORD unknown002210; -/* 0x228c */ DWORD unknown002211; -/* 0x2290 */ DWORD unknown002212; -/* 0x2294 */ DWORD unknown002213; -/* 0x2298 */ DWORD unknown002214; -/* 0x229c */ DWORD unknown002215; -/* 0x22a0 */ DWORD unknown002216; -/* 0x22a4 */ DWORD unknown002217; -/* 0x22a8 */ DWORD unknown002218; -/* 0x22ac */ DWORD unknown002219; -/* 0x22b0 */ DWORD unknown002220; -/* 0x22b4 */ DWORD unknown002221; -/* 0x22b8 */ DWORD unknown002222; -/* 0x22bc */ DWORD unknown002223; -/* 0x22c0 */ DWORD unknown002224; -/* 0x22c4 */ DWORD unknown002225; -/* 0x22c8 */ DWORD unknown002226; -/* 0x22cc */ DWORD unknown002227; -/* 0x22d0 */ DWORD unknown002228; -/* 0x22d4 */ DWORD unknown002229; -/* 0x22d8 */ DWORD unknown002230; -/* 0x22dc */ DWORD unknown002231; -/* 0x22e0 */ DWORD unknown002232; -/* 0x22e4 */ DWORD unknown002233; -/* 0x22e8 */ DWORD unknown002234; -/* 0x22ec */ DWORD unknown002235; -/* 0x22f0 */ DWORD unknown002236; -/* 0x22f4 */ DWORD unknown002237; -/* 0x22f8 */ DWORD unknown002238; -/* 0x22fc */ DWORD unknown002239; -/* 0x2300 */ DWORD unknown002240; -/* 0x2304 */ DWORD unknown002241; -/* 0x2308 */ DWORD unknown002242; -/* 0x230c */ DWORD unknown002243; -/* 0x2310 */ DWORD unknown002244; -/* 0x2314 */ DWORD unknown002245; -/* 0x2318 */ DWORD unknown002246; -/* 0x231c */ DWORD unknown002247; -/* 0x2320 */ DWORD unknown002248; -/* 0x2324 */ DWORD unknown002249; -/* 0x2328 */ DWORD unknown002250; -/* 0x232c */ DWORD unknown002251; -/* 0x2330 */ DWORD unknown002252; -/* 0x2334 */ DWORD unknown002253; -/* 0x2338 */ DWORD unknown002254; -/* 0x233c */ DWORD unknown002255; -/* 0x2340 */ DWORD unknown002256; -/* 0x2344 */ DWORD unknown002257; -/* 0x2348 */ DWORD unknown002258; -/* 0x234c */ DWORD unknown002259; -/* 0x2350 */ DWORD unknown002260; -/* 0x2354 */ DWORD unknown002261; -/* 0x2358 */ DWORD unknown002262; -/* 0x235c */ DWORD unknown002263; -/* 0x2360 */ DWORD unknown002264; -/* 0x2364 */ DWORD unknown002265; -/* 0x2368 */ DWORD unknown002266; -/* 0x236c */ DWORD unknown002267; -/* 0x2370 */ DWORD unknown002268; -/* 0x2374 */ DWORD unknown002269; -/* 0x2378 */ DWORD unknown002270; -/* 0x237c */ DWORD unknown002271; -/* 0x2380 */ DWORD unknown002272; -/* 0x2384 */ DWORD unknown002273; -/* 0x2388 */ DWORD unknown002274; -/* 0x238c */ DWORD unknown002275; -/* 0x2390 */ DWORD unknown002276; -/* 0x2394 */ DWORD unknown002277; -/* 0x2398 */ DWORD unknown002278; -/* 0x239c */ DWORD unknown002279; -/* 0x23a0 */ DWORD unknown002280; -/* 0x23a4 */ DWORD unknown002281; -/* 0x23a8 */ DWORD unknown002282; -/* 0x23ac */ DWORD unknown002283; -/* 0x23b0 */ DWORD unknown002284; -/* 0x23b4 */ DWORD unknown002285; -/* 0x23b8 */ DWORD unknown002286; -/* 0x23bc */ DWORD unknown002287; -/* 0x23c0 */ DWORD unknown002288; -/* 0x23c4 */ DWORD unknown002289; -/* 0x23c8 */ DWORD unknown002290; -/* 0x23cc */ DWORD unknown002291; -/* 0x23d0 */ DWORD unknown002292; -/* 0x23d4 */ DWORD unknown002293; -/* 0x23d8 */ DWORD unknown002294; -/* 0x23dc */ DWORD unknown002295; -/* 0x23e0 */ DWORD unknown002296; -/* 0x23e4 */ DWORD unknown002297; -/* 0x23e8 */ DWORD unknown002298; -/* 0x23ec */ DWORD unknown002299; -/* 0x23f0 */ DWORD unknown002300; -/* 0x23f4 */ DWORD unknown002301; -/* 0x23f8 */ DWORD unknown002302; -/* 0x23fc */ DWORD unknown002303; -/* 0x2400 */ DWORD unknown002304; -/* 0x2404 */ DWORD unknown002305; -/* 0x2408 */ DWORD unknown002306; -/* 0x240c */ DWORD unknown002307; -/* 0x2410 */ DWORD unknown002308; -/* 0x2414 */ DWORD unknown002309; -/* 0x2418 */ DWORD unknown002310; -/* 0x241c */ DWORD unknown002311; -/* 0x2420 */ DWORD unknown002312; -/* 0x2424 */ DWORD unknown002313; -/* 0x2428 */ DWORD unknown002314; -/* 0x242c */ DWORD unknown002315; -/* 0x2430 */ DWORD unknown002316; -/* 0x2434 */ DWORD unknown002317; -} D3D9PUREDEVICE, FAR *LPD3D9PUREDEVICE; +/* IUnknown interface */ +HRESULT WINAPI IDirect3DDevice9Base_QueryInterface(LPDIRECT3DDEVICE9 iface, REFIID riid, void** ppvObject); +ULONG WINAPI IDirect3DDevice9Base_AddRef(LPDIRECT3DDEVICE9 iface); +ULONG WINAPI IDirect3DDevice9Base_Release(LPDIRECT3DDEVICE9 iface); -typedef struct _D3D9HALDEVICE -{ -/* 0x0000 */ D3D9PUREDEVICE PureDevice; -#ifdef D3D_DEBUG_INFO -/* N/A - 0x0004 */ DWORD dbg0004; -/* N/A - 0x0008 */ DWORD dbg0008; -/* N/A - 0x000c */ DWORD dbg000c; -/* N/A - 0x0010 */ DWORD dbg0010; -/* N/A - 0x0014 */ DWORD dbg0014; -/* N/A - 0x0018 */ DWORD dbg0018; -/* N/A - 0x001c */ DWORD dbg001c; -/* N/A - 0x0020 */ DWORD dbg0020; -/* N/A - 0x0024 */ DWORD dbg0024; -/* N/A - 0x0028 */ DWORD dbg0028; -/* N/A - 0x002c */ DWORD dbg002c; -/* N/A - 0x0030 */ DWORD dbg0030; -/* N/A - 0x0034 */ DWORD dbg0034; -/* N/A - 0x0038 */ DWORD dbg0038; -#endif -/* 0x2438 */ DWORD unknown002438; -/* 0x243c */ DWORD unknown00243c; -/* 0x2440 */ DWORD unknown002440; -/* 0x2444 */ DWORD unknown002444; -/* 0x2448 */ DWORD unknown002448; -/* 0x244c */ DWORD unknown00244c; -/* 0x2450 */ DWORD unknown002450; -/* 0x2454 */ DWORD unknown002454; -/* 0x2458 */ DWORD unknown002458; -/* 0x245c */ DWORD unknown00245c; -/* 0x2460 */ DWORD unknown002460; -/* 0x2464 */ DWORD unknown002464; -/* 0x2468 */ DWORD unknown002468; -/* 0x246c */ DWORD unknown00246c; -/* 0x2470 */ DWORD unknown002470; -/* 0x2474 */ DWORD unknown002474; -/* 0x2478 */ DWORD unknown002478; -/* 0x247c */ DWORD unknown00247c; -/* 0x2480 */ DWORD unknown002480; -/* 0x2484 */ DWORD unknown002484; -/* 0x2488 */ DWORD unknown002488; -/* 0x248c */ DWORD unknown00248c; -/* 0x2490 */ DWORD unknown002490; -/* 0x2494 */ DWORD unknown002494; -/* 0x2498 */ DWORD unknown002498; -/* 0x249c */ DWORD unknown00249c; -/* 0x24a0 */ DWORD unknown0024a0; -/* 0x24a4 */ DWORD unknown0024a4; -/* 0x24a8 */ DWORD unknown0024a8; -/* 0x24ac */ DWORD unknown0024ac; -/* 0x24b0 */ DWORD unknown0024b0; -/* 0x24b4 */ DWORD unknown0024b4; -/* 0x24b8 */ DWORD unknown0024b8; -/* 0x24bc */ DWORD unknown0024bc; -/* 0x24c0 */ DWORD unknown0024c0; -/* 0x24c4 */ DWORD unknown0024c4; -/* 0x24c8 */ DWORD unknown0024c8; -/* 0x24cc */ DWORD unknown0024cc; -/* 0x24d0 */ DWORD unknown0024d0; -/* 0x24d4 */ DWORD unknown0024d4; -/* 0x24d8 */ DWORD unknown0024d8; -/* 0x24dc */ DWORD unknown0024dc; -/* 0x24e0 */ DWORD unknown0024e0; -/* 0x24e4 */ DWORD unknown0024e4; -/* 0x24e8 */ DWORD unknown0024e8; -/* 0x24ec */ DWORD unknown0024ec; -/* 0x24f0 */ DWORD unknown0024f0; -/* 0x24f4 */ DWORD unknown0024f4; -/* 0x24f8 */ DWORD unknown0024f8; -/* 0x24fc */ DWORD unknown0024fc; -/* 0x2500 */ DWORD unknown002500; -/* 0x2504 */ DWORD unknown002504; -/* 0x2508 */ DWORD unknown002508; -/* 0x250c */ DWORD unknown00250c; -/* 0x2510 */ DWORD unknown002510; -/* 0x2514 */ DWORD unknown002514; -/* 0x2518 */ DWORD unknown002518; -/* 0x251c */ DWORD unknown00251c; -/* 0x2520 */ DWORD unknown002520; -/* 0x2524 */ DWORD unknown002524; -/* 0x2528 */ DWORD unknown002528; -/* 0x252c */ DWORD unknown00252c; -/* 0x2530 */ DWORD unknown002530; -/* 0x2534 */ DWORD unknown002534; -/* 0x2538 */ DWORD unknown002538; -/* 0x253c */ DWORD unknown00253c; -/* 0x2540 */ DWORD unknown002540; -/* 0x2544 */ DWORD unknown002544; -/* 0x2548 */ DWORD unknown002548; -/* 0x254c */ DWORD unknown00254c; -/* 0x2550 */ DWORD unknown002550; -/* 0x2554 */ DWORD unknown002554; -/* 0x2558 */ DWORD unknown002558; -/* 0x255c */ DWORD unknown00255c; -/* 0x2560 */ DWORD unknown002560; -/* 0x2564 */ DWORD unknown002564; -/* 0x2568 */ DWORD unknown002568; -/* 0x256c */ DWORD unknown00256c; -/* 0x2570 */ DWORD unknown002570; -/* 0x2574 */ DWORD unknown002574; -/* 0x2578 */ DWORD unknown002578; -/* 0x257c */ DWORD unknown00257c; -/* 0x2580 */ DWORD unknown002580; -/* 0x2584 */ DWORD unknown002584; -/* 0x2588 */ DWORD unknown002588; -/* 0x258c */ DWORD unknown00258c; -/* 0x2590 */ DWORD unknown002590; -/* 0x2594 */ DWORD unknown002594; -/* 0x2598 */ DWORD unknown002598; -/* 0x259c */ DWORD unknown00259c; -/* 0x25a0 */ DWORD unknown0025a0; -/* 0x25a4 */ DWORD unknown0025a4; -/* 0x25a8 */ DWORD unknown0025a8; -/* 0x25ac */ DWORD unknown0025ac; -/* 0x25b0 */ DWORD unknown0025b0; -/* 0x25b4 */ DWORD unknown0025b4; -/* 0x25b8 */ DWORD unknown0025b8; -/* 0x25bc */ DWORD unknown0025bc; -/* 0x25c0 */ DWORD unknown0025c0; -/* 0x25c4 */ DWORD unknown0025c4; -/* 0x25c8 */ DWORD unknown0025c8; -/* 0x25cc */ DWORD unknown0025cc; -/* 0x25d0 */ DWORD unknown0025d0; -/* 0x25d4 */ DWORD unknown0025d4; -/* 0x25d8 */ DWORD unknown0025d8; -/* 0x25dc */ DWORD unknown0025dc; -/* 0x25e0 */ DWORD unknown0025e0; -/* 0x25e4 */ DWORD unknown0025e4; -/* 0x25e8 */ DWORD unknown0025e8; -/* 0x25ec */ DWORD unknown0025ec; -/* 0x25f0 */ DWORD unknown0025f0; -/* 0x25f4 */ DWORD unknown0025f4; -/* 0x25f8 */ DWORD unknown0025f8; -/* 0x25fc */ DWORD unknown0025fc; - -/* 0x2600 */ DWORD unknown002600; -/* 0x2604 */ DWORD unknown002604; -/* 0x2608 */ DWORD unknown002608; -/* 0x260c */ DWORD unknown00260c; -/* 0x2610 */ DWORD unknown002610; -/* 0x2614 */ DWORD unknown002614; -/* 0x2618 */ DWORD unknown002618; -/* 0x261c */ DWORD unknown00261c; -/* 0x2620 */ DWORD unknown002620; -/* 0x2624 */ DWORD unknown002624; -/* 0x2628 */ DWORD unknown002628; -/* 0x262c */ DWORD unknown00262c; -/* 0x2630 */ DWORD unknown002630; -/* 0x2634 */ DWORD unknown002634; -/* 0x2638 */ DWORD unknown002638; -/* 0x263c */ DWORD unknown00263c; -/* 0x2640 */ DWORD unknown002640; -/* 0x2644 */ DWORD unknown002644; -/* 0x2648 */ DWORD unknown002648; -/* 0x264c */ DWORD unknown00264c; -/* 0x2650 */ DWORD unknown002650; -/* 0x2654 */ DWORD unknown002654; -/* 0x2658 */ DWORD unknown002658; -/* 0x265c */ DWORD unknown00265c; -/* 0x2660 */ DWORD unknown002660; -/* 0x2664 */ DWORD unknown002664; -/* 0x2668 */ DWORD unknown002668; -/* 0x266c */ DWORD unknown00266c; -/* 0x2670 */ DWORD unknown002670; -/* 0x2674 */ DWORD unknown002674; -/* 0x2678 */ DWORD unknown002678; -/* 0x267c */ DWORD unknown00267c; -/* 0x2680 */ DWORD unknown002680; -/* 0x2684 */ DWORD unknown002684; -/* 0x2688 */ DWORD unknown002688; -/* 0x268c */ DWORD unknown00268c; -/* 0x2690 */ DWORD unknown002690; -/* 0x2694 */ DWORD unknown002694; -/* 0x2698 */ DWORD unknown002698; -/* 0x269c */ DWORD unknown00269c; -/* 0x26a0 */ DWORD unknown0026a0; -/* 0x26a4 */ DWORD unknown0026a4; -/* 0x26a8 */ DWORD unknown0026a8; -/* 0x26ac */ DWORD unknown0026ac; -/* 0x26b0 */ DWORD unknown0026b0; -/* 0x26b4 */ DWORD unknown0026b4; -/* 0x26b8 */ DWORD unknown0026b8; -/* 0x26bc */ DWORD unknown0026bc; -/* 0x26c0 */ DWORD unknown0026c0; -/* 0x26c4 */ DWORD unknown0026c4; -/* 0x26c8 */ DWORD unknown0026c8; -/* 0x26cc */ DWORD unknown0026cc; -/* 0x26d0 */ DWORD unknown0026d0; -/* 0x26d4 */ DWORD unknown0026d4; -/* 0x26d8 */ DWORD unknown0026d8; -/* 0x26dc */ DWORD unknown0026dc; -/* 0x26e0 */ DWORD unknown0026e0; -/* 0x26e4 */ DWORD unknown0026e4; -/* 0x26e8 */ DWORD unknown0026e8; -/* 0x26ec */ DWORD unknown0026ec; -/* 0x26f0 */ DWORD unknown0026f0; -/* 0x26f4 */ DWORD unknown0026f4; -/* 0x26f8 */ DWORD unknown0026f8; -/* 0x26fc */ DWORD unknown0026fc; - -/* 0x2700 */ DWORD unknown002700; -/* 0x2704 */ DWORD unknown002704; -/* 0x2708 */ DWORD unknown002708; -/* 0x270c */ DWORD unknown00270c; -/* 0x2710 */ DWORD unknown002710; -/* 0x2714 */ DWORD unknown002714; -/* 0x2718 */ DWORD unknown002718; -/* 0x271c */ DWORD unknown00271c; -/* 0x2720 */ DWORD unknown002720; -/* 0x2724 */ DWORD unknown002724; -/* 0x2728 */ DWORD unknown002728; -/* 0x272c */ DWORD unknown00272c; -/* 0x2730 */ DWORD unknown002730; -/* 0x2734 */ DWORD unknown002734; -/* 0x2738 */ DWORD unknown002738; -/* 0x273c */ DWORD unknown00273c; -/* 0x2740 */ DWORD unknown002740; -/* 0x2744 */ DWORD unknown002744; -/* 0x2748 */ DWORD unknown002748; -/* 0x274c */ DWORD unknown00274c; -/* 0x2750 */ DWORD unknown002750; -/* 0x2754 */ DWORD unknown002754; -/* 0x2758 */ DWORD unknown002758; -/* 0x275c */ DWORD unknown00275c; -/* 0x2760 */ DWORD unknown002760; -/* 0x2764 */ DWORD unknown002764; -/* 0x2768 */ DWORD unknown002768; -/* 0x276c */ DWORD unknown00276c; -/* 0x2770 */ DWORD unknown002770; -/* 0x2774 */ DWORD unknown002774; -/* 0x2778 */ DWORD unknown002778; -/* 0x277c */ DWORD unknown00277c; -/* 0x2780 */ DWORD unknown002780; -/* 0x2784 */ DWORD unknown002784; -/* 0x2788 */ DWORD unknown002788; -/* 0x278c */ DWORD unknown00278c; -/* 0x2790 */ DWORD unknown002790; -/* 0x2794 */ DWORD unknown002794; -/* 0x2798 */ DWORD unknown002798; -/* 0x279c */ DWORD unknown00279c; -/* 0x27a0 */ DWORD unknown0027a0; -/* 0x27a4 */ DWORD unknown0027a4; -/* 0x27a8 */ DWORD unknown0027a8; -/* 0x27ac */ DWORD unknown0027ac; -/* 0x27b0 */ DWORD unknown0027b0; -/* 0x27b4 */ DWORD unknown0027b4; -/* 0x27b8 */ DWORD unknown0027b8; -/* 0x27bc */ DWORD unknown0027bc; -/* 0x27c0 */ DWORD unknown0027c0; -/* 0x27c4 */ DWORD unknown0027c4; -/* 0x27c8 */ DWORD unknown0027c8; -/* 0x27cc */ DWORD unknown0027cc; -/* 0x27d0 */ DWORD unknown0027d0; -/* 0x27d4 */ DWORD unknown0027d4; -/* 0x27d8 */ DWORD unknown0027d8; -/* 0x27dc */ DWORD unknown0027dc; -/* 0x27e0 */ DWORD unknown0027e0; -/* 0x27e4 */ DWORD unknown0027e4; -/* 0x27e8 */ DWORD unknown0027e8; -/* 0x27ec */ DWORD unknown0027ec; -/* 0x27f0 */ DWORD unknown0027f0; -/* 0x27f4 */ DWORD unknown0027f4; -/* 0x27f8 */ DWORD unknown0027f8; -/* 0x27fc */ DWORD unknown0027fc; - -/* 0x2800 */ DWORD unknown002800; -/* 0x2804 */ DWORD unknown002804; -/* 0x2808 */ DWORD unknown002808; -/* 0x280c */ DWORD unknown00280c; -/* 0x2810 */ DWORD unknown002810; -/* 0x2814 */ DWORD unknown002814; -/* 0x2818 */ DWORD unknown002818; -/* 0x281c */ DWORD unknown00281c; -/* 0x2820 */ DWORD unknown002820; -/* 0x2824 */ DWORD unknown002824; -/* 0x2828 */ DWORD unknown002828; -/* 0x282c */ DWORD unknown00282c; -/* 0x2830 */ DWORD unknown002830; -/* 0x2834 */ DWORD unknown002834; -/* 0x2838 */ DWORD unknown002838; -/* 0x283c */ DWORD unknown00283c; -/* 0x2840 */ DWORD unknown002840; -/* 0x2844 */ DWORD unknown002844; -/* 0x2848 */ DWORD unknown002848; -/* 0x284c */ DWORD unknown00284c; -/* 0x2850 */ DWORD unknown002850; -/* 0x2854 */ DWORD unknown002854; -/* 0x2858 */ DWORD unknown002858; -/* 0x285c */ DWORD unknown00285c; -/* 0x2860 */ DWORD unknown002860; -/* 0x2864 */ DWORD unknown002864; -/* 0x2868 */ DWORD unknown002868; -/* 0x286c */ DWORD unknown00286c; -/* 0x2870 */ DWORD unknown002870; -/* 0x2874 */ DWORD unknown002874; -/* 0x2878 */ DWORD unknown002878; -/* 0x287c */ DWORD unknown00287c; -/* 0x2880 */ DWORD unknown002880; -/* 0x2884 */ DWORD unknown002884; -/* 0x2888 */ DWORD unknown002888; -/* 0x288c */ DWORD unknown00288c; -/* 0x2890 */ DWORD unknown002890; -/* 0x2894 */ DWORD unknown002894; -/* 0x2898 */ DWORD unknown002898; -/* 0x289c */ DWORD unknown00289c; -/* 0x28a0 */ DWORD unknown0028a0; -/* 0x28a4 */ DWORD unknown0028a4; -/* 0x28a8 */ DWORD unknown0028a8; -/* 0x28ac */ DWORD unknown0028ac; -/* 0x28b0 */ DWORD unknown0028b0; -/* 0x28b4 */ DWORD unknown0028b4; -/* 0x28b8 */ DWORD unknown0028b8; -/* 0x28bc */ DWORD unknown0028bc; -/* 0x28c0 */ DWORD unknown0028c0; -/* 0x28c4 */ DWORD unknown0028c4; -/* 0x28c8 */ DWORD unknown0028c8; -/* 0x28cc */ DWORD unknown0028cc; -/* 0x28d0 */ DWORD unknown0028d0; -/* 0x28d4 */ DWORD unknown0028d4; -/* 0x28d8 */ DWORD unknown0028d8; -/* 0x28dc */ DWORD unknown0028dc; -/* 0x28e0 */ DWORD unknown0028e0; -/* 0x28e4 */ DWORD unknown0028e4; -/* 0x28e8 */ DWORD unknown0028e8; -/* 0x28ec */ DWORD unknown0028ec; -/* 0x28f0 */ DWORD unknown0028f0; -/* 0x28f4 */ DWORD unknown0028f4; -/* 0x28f8 */ DWORD unknown0028f8; -/* 0x28fc */ DWORD unknown0028fc; - -/* 0x2900 */ DWORD unknown002900; -/* 0x2904 */ DWORD unknown002904; -/* 0x2908 */ DWORD unknown002908; -/* 0x290c */ DWORD unknown00290c; -/* 0x2910 */ DWORD unknown002910; -/* 0x2914 */ DWORD unknown002914; -/* 0x2918 */ DWORD unknown002918; -/* 0x291c */ DWORD unknown00291c; -/* 0x2920 */ DWORD unknown002920; -/* 0x2924 */ DWORD unknown002924; -/* 0x2928 */ DWORD unknown002928; -/* 0x292c */ DWORD unknown00292c; -/* 0x2930 */ DWORD unknown002930; -/* 0x2934 */ DWORD unknown002934; -/* 0x2938 */ DWORD unknown002938; -/* 0x293c */ DWORD unknown00293c; -/* 0x2940 */ DWORD unknown002940; -/* 0x2944 */ DWORD unknown002944; -/* 0x2948 */ DWORD unknown002948; -/* 0x294c */ DWORD unknown00294c; -/* 0x2950 */ DWORD unknown002950; -/* 0x2954 */ DWORD unknown002954; -/* 0x2958 */ DWORD unknown002958; -/* 0x295c */ DWORD unknown00295c; -/* 0x2960 */ DWORD unknown002960; -/* 0x2964 */ DWORD unknown002964; -/* 0x2968 */ DWORD unknown002968; -/* 0x296c */ DWORD unknown00296c; -/* 0x2970 */ DWORD unknown002970; -/* 0x2974 */ DWORD unknown002974; -/* 0x2978 */ DWORD unknown002978; -/* 0x297c */ DWORD unknown00297c; -/* 0x2980 */ DWORD unknown002980; -/* 0x2984 */ DWORD unknown002984; -/* 0x2988 */ DWORD unknown002988; -/* 0x298c */ DWORD unknown00298c; -/* 0x2990 */ DWORD unknown002990; -/* 0x2994 */ DWORD unknown002994; -/* 0x2998 */ DWORD unknown002998; -/* 0x299c */ DWORD unknown00299c; -/* 0x29a0 */ DWORD unknown0029a0; -/* 0x29a4 */ DWORD unknown0029a4; -/* 0x29a8 */ DWORD unknown0029a8; -/* 0x29ac */ DWORD unknown0029ac; -/* 0x29b0 */ DWORD unknown0029b0; -/* 0x29b4 */ DWORD unknown0029b4; -/* 0x29b8 */ DWORD unknown0029b8; -/* 0x29bc */ DWORD unknown0029bc; -/* 0x29c0 */ DWORD unknown0029c0; -/* 0x29c4 */ DWORD unknown0029c4; -/* 0x29c8 */ DWORD unknown0029c8; -/* 0x29cc */ DWORD unknown0029cc; -/* 0x29d0 */ DWORD unknown0029d0; -/* 0x29d4 */ DWORD unknown0029d4; -/* 0x29d8 */ DWORD unknown0029d8; -/* 0x29dc */ DWORD unknown0029dc; -/* 0x29e0 */ DWORD unknown0029e0; -/* 0x29e4 */ DWORD unknown0029e4; -/* 0x29e8 */ DWORD unknown0029e8; -/* 0x29ec */ DWORD unknown0029ec; -/* 0x29f0 */ DWORD unknown0029f0; -/* 0x29f4 */ DWORD unknown0029f4; -/* 0x29f8 */ DWORD unknown0029f8; -/* 0x29fc */ DWORD unknown0029fc; - -/* 0x2a00 */ DWORD unknown002a00; -/* 0x2a04 */ DWORD unknown002a04; -/* 0x2a08 */ DWORD unknown002a08; -/* 0x2a0c */ DWORD unknown002a0c; -/* 0x2a10 */ DWORD unknown002a10; -/* 0x2a14 */ DWORD unknown002a14; -/* 0x2a18 */ DWORD unknown002a18; -/* 0x2a1c */ DWORD unknown002a1c; -/* 0x2a20 */ DWORD unknown002a20; -/* 0x2a24 */ DWORD unknown002a24; -/* 0x2a28 */ DWORD unknown002a28; -/* 0x2a2c */ DWORD unknown002a2c; -/* 0x2a30 */ DWORD unknown002a30; -/* 0x2a34 */ DWORD unknown002a34; -/* 0x2a38 */ DWORD unknown002a38; -/* 0x2a3c */ DWORD unknown002a3c; -/* 0x2a40 */ DWORD unknown002a40; -/* 0x2a44 */ DWORD unknown002a44; -/* 0x2a48 */ DWORD unknown002a48; -/* 0x2a4c */ DWORD unknown002a4c; -/* 0x2a50 */ DWORD unknown002a50; -/* 0x2a54 */ DWORD unknown002a54; -/* 0x2a58 */ DWORD unknown002a58; -/* 0x2a5c */ DWORD unknown002a5c; -/* 0x2a60 */ DWORD unknown002a60; -/* 0x2a64 */ DWORD unknown002a64; -/* 0x2a68 */ DWORD unknown002a68; -/* 0x2a6c */ DWORD unknown002a6c; -/* 0x2a70 */ DWORD unknown002a70; -/* 0x2a74 */ DWORD unknown002a74; -/* 0x2a78 */ DWORD unknown002a78; -/* 0x2a7c */ DWORD unknown002a7c; -/* 0x2a80 */ DWORD unknown002a80; -/* 0x2a84 */ DWORD unknown002a84; -/* 0x2a88 */ DWORD unknown002a88; -/* 0x2a8c */ DWORD unknown002a8c; -/* 0x2a90 */ DWORD unknown002a90; -/* 0x2a94 */ DWORD unknown002a94; -/* 0x2a98 */ DWORD unknown002a98; -/* 0x2a9c */ DWORD unknown002a9c; -/* 0x2aa0 */ DWORD unknown002aa0; -/* 0x2aa4 */ DWORD unknown002aa4; -/* 0x2aa8 */ DWORD unknown002aa8; -/* 0x2aac */ DWORD unknown002aac; -/* 0x2ab0 */ DWORD unknown002ab0; -/* 0x2ab4 */ DWORD unknown002ab4; -/* 0x2ab8 */ DWORD unknown002ab8; -/* 0x2abc */ DWORD unknown002abc; -/* 0x2ac0 */ DWORD unknown002ac0; -/* 0x2ac4 */ DWORD unknown002ac4; -/* 0x2ac8 */ DWORD unknown002ac8; -/* 0x2acc */ DWORD unknown002acc; -/* 0x2ad0 */ DWORD unknown002ad0; -/* 0x2ad4 */ DWORD unknown002ad4; -/* 0x2ad8 */ DWORD unknown002ad8; -/* 0x2adc */ DWORD unknown002adc; -/* 0x2ae0 */ DWORD unknown002ae0; -/* 0x2ae4 */ DWORD unknown002ae4; -/* 0x2ae8 */ DWORD unknown002ae8; -/* 0x2aec */ DWORD unknown002aec; -/* 0x2af0 */ DWORD unknown002af0; -/* 0x2af4 */ DWORD unknown002af4; -/* 0x2af8 */ DWORD unknown002af8; -/* 0x2afc */ DWORD unknown002afc; - -/* 0x2b00 */ DWORD unknown002b00; -/* 0x2b04 */ DWORD unknown002b04; -/* 0x2b08 */ DWORD unknown002b08; -/* 0x2b0c */ DWORD unknown002b0c; -/* 0x2b10 */ DWORD unknown002b10; -/* 0x2b14 */ DWORD unknown002b14; -/* 0x2b18 */ DWORD unknown002b18; -/* 0x2b1c */ DWORD unknown002b1c; -/* 0x2b20 */ DWORD unknown002b20; -/* 0x2b24 */ DWORD unknown002b24; -/* 0x2b28 */ DWORD unknown002b28; -/* 0x2b2c */ DWORD unknown002b2c; -/* 0x2b30 */ DWORD unknown002b30; -/* 0x2b34 */ DWORD unknown002b34; -/* 0x2b38 */ DWORD unknown002b38; -/* 0x2b3c */ DWORD unknown002b3c; -/* 0x2b40 */ DWORD unknown002b40; -/* 0x2b44 */ DWORD unknown002b44; -/* 0x2b48 */ DWORD unknown002b48; -/* 0x2b4c */ DWORD unknown002b4c; -/* 0x2b50 */ DWORD unknown002b50; -/* 0x2b54 */ DWORD unknown002b54; -/* 0x2b58 */ DWORD unknown002b58; -/* 0x2b5c */ DWORD unknown002b5c; -/* 0x2b60 */ DWORD unknown002b60; -/* 0x2b64 */ DWORD unknown002b64; -/* 0x2b68 */ DWORD unknown002b68; -/* 0x2b6c */ DWORD unknown002b6c; -/* 0x2b70 */ DWORD unknown002b70; -/* 0x2b74 */ DWORD unknown002b74; -/* 0x2b78 */ DWORD unknown002b78; -/* 0x2b7c */ DWORD unknown002b7c; -/* 0x2b80 */ DWORD unknown002b80; -/* 0x2b84 */ DWORD unknown002b84; -/* 0x2b88 */ DWORD unknown002b88; -/* 0x2b8c */ DWORD unknown002b8c; -/* 0x2b90 */ DWORD unknown002b90; -/* 0x2b94 */ DWORD unknown002b94; -/* 0x2b98 */ DWORD unknown002b98; -/* 0x2b9c */ DWORD unknown002b9c; -/* 0x2ba0 */ DWORD unknown002ba0; -/* 0x2ba4 */ DWORD unknown002ba4; -/* 0x2ba8 */ DWORD unknown002ba8; -/* 0x2bac */ DWORD unknown002bac; -/* 0x2bb0 */ DWORD unknown002bb0; -/* 0x2bb4 */ DWORD unknown002bb4; -/* 0x2bb8 */ DWORD unknown002bb8; -/* 0x2bbc */ DWORD unknown002bbc; -/* 0x2bc0 */ DWORD unknown002bc0; -/* 0x2bc4 */ DWORD unknown002bc4; -/* 0x2bc8 */ DWORD unknown002bc8; -/* 0x2bcc */ DWORD unknown002bcc; -/* 0x2bd0 */ DWORD unknown002bd0; -/* 0x2bd4 */ DWORD unknown002bd4; -/* 0x2bd8 */ DWORD unknown002bd8; -/* 0x2bdc */ DWORD unknown002bdc; -/* 0x2be0 */ DWORD unknown002be0; -/* 0x2be4 */ DWORD unknown002be4; -/* 0x2be8 */ DWORD unknown002be8; -/* 0x2bec */ DWORD unknown002bec; -/* 0x2bf0 */ DWORD unknown002bf0; -/* 0x2bf4 */ DWORD unknown002bf4; -/* 0x2bf8 */ DWORD unknown002bf8; -/* 0x2bfc */ DWORD unknown002bfc; - -/* 0x2c00 */ DWORD unknown002c00; -/* 0x2c04 */ DWORD unknown002c04; -/* 0x2c08 */ DWORD unknown002c08; -/* 0x2c0c */ DWORD unknown002c0c; -/* 0x2c10 */ DWORD unknown002c10; -/* 0x2c14 */ DWORD unknown002c14; -/* 0x2c18 */ DWORD unknown002c18; -/* 0x2c1c */ DWORD unknown002c1c; -/* 0x2c20 */ DWORD unknown002c20; -/* 0x2c24 */ DWORD unknown002c24; -/* 0x2c28 */ DWORD unknown002c28; -/* 0x2c2c */ DWORD unknown002c2c; -/* 0x2c30 */ DWORD unknown002c30; -/* 0x2c34 */ DWORD unknown002c34; -/* 0x2c38 */ DWORD unknown002c38; -/* 0x2c3c */ DWORD unknown002c3c; -/* 0x2c40 */ DWORD unknown002c40; -/* 0x2c44 */ DWORD unknown002c44; -/* 0x2c48 */ DWORD unknown002c48; -/* 0x2c4c */ DWORD unknown002c4c; -/* 0x2c50 */ DWORD unknown002c50; -/* 0x2c54 */ DWORD unknown002c54; -/* 0x2c58 */ DWORD unknown002c58; -/* 0x2c5c */ DWORD unknown002c5c; -/* 0x2c60 */ DWORD unknown002c60; -/* 0x2c64 */ DWORD unknown002c64; -/* 0x2c68 */ DWORD unknown002c68; -/* 0x2c6c */ DWORD unknown002c6c; -/* 0x2c70 */ DWORD unknown002c70; -/* 0x2c74 */ DWORD unknown002c74; -/* 0x2c78 */ DWORD unknown002c78; -/* 0x2c7c */ DWORD unknown002c7c; -/* 0x2c80 */ DWORD unknown002c80; -/* 0x2c84 */ DWORD unknown002c84; -/* 0x2c88 */ DWORD unknown002c88; -/* 0x2c8c */ DWORD unknown002c8c; -/* 0x2c90 */ DWORD unknown002c90; -/* 0x2c94 */ DWORD unknown002c94; -/* 0x2c98 */ DWORD unknown002c98; -/* 0x2c9c */ DWORD unknown002c9c; -/* 0x2ca0 */ DWORD unknown002ca0; -/* 0x2ca4 */ DWORD unknown002ca4; -/* 0x2ca8 */ DWORD unknown002ca8; -/* 0x2cac */ DWORD unknown002cac; -/* 0x2cb0 */ DWORD unknown002cb0; -/* 0x2cb4 */ DWORD unknown002cb4; -/* 0x2cb8 */ DWORD unknown002cb8; -/* 0x2cbc */ DWORD unknown002cbc; -/* 0x2cc0 */ DWORD unknown002cc0; -/* 0x2cc4 */ DWORD unknown002cc4; -/* 0x2cc8 */ DWORD unknown002cc8; -/* 0x2ccc */ DWORD unknown002ccc; -/* 0x2cd0 */ DWORD unknown002cd0; -/* 0x2cd4 */ DWORD unknown002cd4; -/* 0x2cd8 */ DWORD unknown002cd8; -/* 0x2cdc */ DWORD unknown002cdc; -/* 0x2ce0 */ DWORD unknown002ce0; -/* 0x2ce4 */ DWORD unknown002ce4; -/* 0x2ce8 */ DWORD unknown002ce8; -/* 0x2cec */ DWORD unknown002cec; -/* 0x2cf0 */ DWORD unknown002cf0; -/* 0x2cf4 */ DWORD unknown002cf4; -/* 0x2cf8 */ DWORD unknown002cf8; -/* 0x2cfc */ DWORD unknown002cfc; - -/* 0x2d00 */ DWORD unknown002d00; -/* 0x2d04 */ DWORD unknown002d04; -/* 0x2d08 */ DWORD unknown002d08; -/* 0x2d0c */ DWORD unknown002d0c; -/* 0x2d10 */ DWORD unknown002d10; -/* 0x2d14 */ DWORD unknown002d14; -/* 0x2d18 */ DWORD unknown002d18; -/* 0x2d1c */ DWORD unknown002d1c; -/* 0x2d20 */ DWORD unknown002d20; -/* 0x2d24 */ DWORD unknown002d24; -/* 0x2d28 */ DWORD unknown002d28; -/* 0x2d2c */ DWORD unknown002d2c; -/* 0x2d30 */ DWORD unknown002d30; -/* 0x2d34 */ DWORD unknown002d34; -/* 0x2d38 */ DWORD unknown002d38; -/* 0x2d3c */ DWORD unknown002d3c; -/* 0x2d40 */ DWORD unknown002d40; -/* 0x2d44 */ DWORD unknown002d44; -/* 0x2d48 */ DWORD unknown002d48; -/* 0x2d4c */ DWORD unknown002d4c; -/* 0x2d50 */ DWORD unknown002d50; -/* 0x2d54 */ DWORD unknown002d54; -/* 0x2d58 */ DWORD unknown002d58; -/* 0x2d5c */ DWORD unknown002d5c; -/* 0x2d60 */ DWORD unknown002d60; -/* 0x2d64 */ DWORD unknown002d64; -/* 0x2d68 */ DWORD unknown002d68; -/* 0x2d6c */ DWORD unknown002d6c; -/* 0x2d70 */ DWORD unknown002d70; -/* 0x2d74 */ DWORD unknown002d74; -/* 0x2d78 */ DWORD unknown002d78; -/* 0x2d7c */ DWORD unknown002d7c; -/* 0x2d80 */ DWORD unknown002d80; -/* 0x2d84 */ DWORD unknown002d84; -/* 0x2d88 */ DWORD unknown002d88; -/* 0x2d8c */ DWORD unknown002d8c; -/* 0x2d90 */ DWORD unknown002d90; -/* 0x2d94 */ DWORD unknown002d94; -/* 0x2d98 */ DWORD unknown002d98; -/* 0x2d9c */ DWORD unknown002d9c; -/* 0x2da0 */ DWORD unknown002da0; -/* 0x2da4 */ DWORD unknown002da4; -/* 0x2da8 */ DWORD unknown002da8; -/* 0x2dac */ DWORD unknown002dac; -/* 0x2db0 */ DWORD unknown002db0; -/* 0x2db4 */ DWORD unknown002db4; -/* 0x2db8 */ DWORD unknown002db8; -/* 0x2dbc */ DWORD unknown002dbc; -/* 0x2dc0 */ DWORD unknown002dc0; -/* 0x2dc4 */ DWORD unknown002dc4; -/* 0x2dc8 */ DWORD unknown002dc8; -/* 0x2dcc */ DWORD unknown002dcc; -/* 0x2dd0 */ DWORD unknown002dd0; -/* 0x2dd4 */ DWORD unknown002dd4; -/* 0x2dd8 */ DWORD unknown002dd8; -/* 0x2ddc */ DWORD unknown002ddc; -/* 0x2de0 */ DWORD unknown002de0; -/* 0x2de4 */ DWORD unknown002de4; -/* 0x2de8 */ DWORD unknown002de8; -/* 0x2dec */ DWORD unknown002dec; -/* 0x2df0 */ DWORD unknown002df0; -/* 0x2df4 */ DWORD unknown002df4; -/* 0x2df8 */ DWORD unknown002df8; -/* 0x2dfc */ DWORD unknown002dfc; - -/* 0x2e00 */ DWORD unknown002e00; -/* 0x2e04 */ DWORD unknown002e04; -/* 0x2e08 */ DWORD unknown002e08; -/* 0x2e0c */ DWORD unknown002e0c; -/* 0x2e10 */ DWORD unknown002e10; -/* 0x2e14 */ DWORD unknown002e14; -/* 0x2e18 */ DWORD unknown002e18; -/* 0x2e1c */ DWORD unknown002e1c; -/* 0x2e20 */ DWORD unknown002e20; -/* 0x2e24 */ DWORD unknown002e24; -/* 0x2e28 */ DWORD unknown002e28; -/* 0x2e2c */ DWORD unknown002e2c; -/* 0x2e30 */ DWORD unknown002e30; -/* 0x2e34 */ DWORD unknown002e34; -/* 0x2e38 */ DWORD unknown002e38; -/* 0x2e3c */ DWORD unknown002e3c; -/* 0x2e40 */ DWORD unknown002e40; -/* 0x2e44 */ DWORD unknown002e44; -/* 0x2e48 */ DWORD unknown002e48; -/* 0x2e4c */ DWORD unknown002e4c; -/* 0x2e50 */ DWORD unknown002e50; -/* 0x2e54 */ DWORD unknown002e54; -/* 0x2e58 */ DWORD unknown002e58; -/* 0x2e5c */ DWORD unknown002e5c; -/* 0x2e60 */ DWORD unknown002e60; -/* 0x2e64 */ DWORD unknown002e64; -/* 0x2e68 */ DWORD unknown002e68; -/* 0x2e6c */ DWORD unknown002e6c; -/* 0x2e70 */ DWORD unknown002e70; -/* 0x2e74 */ DWORD unknown002e74; -/* 0x2e78 */ DWORD unknown002e78; -/* 0x2e7c */ DWORD unknown002e7c; -/* 0x2e80 */ DWORD unknown002e80; -/* 0x2e84 */ DWORD unknown002e84; -/* 0x2e88 */ DWORD unknown002e88; -/* 0x2e8c */ DWORD unknown002e8c; -/* 0x2e90 */ DWORD unknown002e90; -/* 0x2e94 */ DWORD unknown002e94; -/* 0x2e98 */ DWORD unknown002e98; -/* 0x2e9c */ DWORD unknown002e9c; -/* 0x2ea0 */ DWORD unknown002ea0; -/* 0x2ea4 */ DWORD unknown002ea4; -/* 0x2ea8 */ DWORD unknown002ea8; -/* 0x2eac */ DWORD unknown002eac; -/* 0x2eb0 */ DWORD unknown002eb0; -/* 0x2eb4 */ DWORD unknown002eb4; -/* 0x2eb8 */ DWORD unknown002eb8; -/* 0x2ebc */ DWORD unknown002ebc; -/* 0x2ec0 */ DWORD unknown002ec0; -/* 0x2ec4 */ DWORD unknown002ec4; -/* 0x2ec8 */ DWORD unknown002ec8; -/* 0x2ecc */ DWORD unknown002ecc; -/* 0x2ed0 */ DWORD unknown002ed0; -/* 0x2ed4 */ DWORD unknown002ed4; -/* 0x2ed8 */ DWORD unknown002ed8; -/* 0x2edc */ DWORD unknown002edc; -/* 0x2ee0 */ DWORD unknown002ee0; -/* 0x2ee4 */ DWORD unknown002ee4; -/* 0x2ee8 */ DWORD unknown002ee8; -/* 0x2eec */ DWORD unknown002eec; -/* 0x2ef0 */ DWORD unknown002ef0; -/* 0x2ef4 */ DWORD unknown002ef4; -/* 0x2ef8 */ DWORD unknown002ef8; -/* 0x2efc */ DWORD unknown002efc; - -/* 0x2f00 */ DWORD unknown002f00; -/* 0x2f04 */ DWORD unknown002f04; -/* 0x2f08 */ DWORD unknown002f08; -/* 0x2f0c */ DWORD unknown002f0c; -/* 0x2f10 */ DWORD unknown002f10; -/* 0x2f14 */ DWORD unknown002f14; -/* 0x2f18 */ DWORD unknown002f18; -/* 0x2f1c */ DWORD unknown002f1c; -/* 0x2f20 */ DWORD unknown002f20; -/* 0x2f24 */ DWORD unknown002f24; -/* 0x2f28 */ DWORD unknown002f28; -/* 0x2f2c */ DWORD unknown002f2c; -/* 0x2f30 */ DWORD unknown002f30; -/* 0x2f34 */ DWORD unknown002f34; -/* 0x2f38 */ DWORD unknown002f38; -/* 0x2f3c */ DWORD unknown002f3c; -/* 0x2f40 */ DWORD unknown002f40; -/* 0x2f44 */ DWORD unknown002f44; -/* 0x2f48 */ DWORD unknown002f48; -/* 0x2f4c */ DWORD unknown002f4c; -/* 0x2f50 */ DWORD unknown002f50; -/* 0x2f54 */ DWORD unknown002f54; -/* 0x2f58 */ DWORD unknown002f58; -/* 0x2f5c */ DWORD unknown002f5c; -/* 0x2f60 */ DWORD unknown002f60; -/* 0x2f64 */ DWORD unknown002f64; -/* 0x2f68 */ DWORD unknown002f68; -/* 0x2f6c */ DWORD unknown002f6c; -/* 0x2f70 */ DWORD unknown002f70; -/* 0x2f74 */ DWORD unknown002f74; -/* 0x2f78 */ DWORD unknown002f78; -/* 0x2f7c */ DWORD unknown002f7c; -/* 0x2f80 */ DWORD unknown002f80; -/* 0x2f84 */ DWORD unknown002f84; -/* 0x2f88 */ DWORD unknown002f88; -/* 0x2f8c */ DWORD unknown002f8c; -/* 0x2f90 */ DWORD unknown002f90; -/* 0x2f94 */ DWORD unknown002f94; -/* 0x2f98 */ DWORD unknown002f98; -/* 0x2f9c */ DWORD unknown002f9c; -/* 0x2fa0 */ DWORD unknown002fa0; -/* 0x2fa4 */ DWORD unknown002fa4; -/* 0x2fa8 */ DWORD unknown002fa8; -/* 0x2fac */ DWORD unknown002fac; -/* 0x2fb0 */ DWORD unknown002fb0; -/* 0x2fb4 */ DWORD unknown002fb4; -/* 0x2fb8 */ DWORD unknown002fb8; -/* 0x2fbc */ DWORD unknown002fbc; -/* 0x2fc0 */ DWORD unknown002fc0; -/* 0x2fc4 */ DWORD unknown002fc4; -/* 0x2fc8 */ DWORD unknown002fc8; -/* 0x2fcc */ DWORD unknown002fcc; -/* 0x2fd0 */ DWORD unknown002fd0; -/* 0x2fd4 */ DWORD unknown002fd4; -/* 0x2fd8 */ DWORD unknown002fd8; -/* 0x2fdc */ DWORD unknown002fdc; -/* 0x2fe0 */ DWORD unknown002fe0; -/* 0x2fe4 */ DWORD unknown002fe4; -/* 0x2fe8 */ DWORD unknown002fe8; -/* 0x2fec */ DWORD unknown002fec; -/* 0x2ff0 */ DWORD unknown002ff0; -/* 0x2ff4 */ DWORD unknown002ff4; -/* 0x2ff8 */ DWORD unknown002ff8; -/* 0x2ffc */ DWORD unknown002ffc; - -/* 0x3000 */ DWORD unknown003000; -/* 0x3004 */ DWORD unknown003004; -/* 0x3008 */ DWORD unknown003008; -/* 0x300c */ DWORD unknown00300c; -/* 0x3010 */ DWORD unknown003010; -/* 0x3014 */ DWORD unknown003014; -/* 0x3018 */ DWORD unknown003018; -/* 0x301c */ DWORD unknown00301c; -/* 0x3020 */ DWORD unknown003020; -/* 0x3024 */ DWORD unknown003024; -/* 0x3028 */ DWORD unknown003028; -/* 0x302c */ DWORD unknown00302c; -/* 0x3030 */ DWORD unknown003030; -/* 0x3034 */ DWORD unknown003034; -/* 0x3038 */ DWORD unknown003038; -/* 0x303c */ DWORD unknown00303c; -/* 0x3040 */ DWORD unknown003040; -/* 0x3044 */ DWORD unknown003044; -/* 0x3048 */ DWORD unknown003048; -/* 0x304c */ DWORD unknown00304c; -/* 0x3050 */ DWORD unknown003050; -/* 0x3054 */ DWORD unknown003054; -/* 0x3058 */ DWORD unknown003058; -/* 0x305c */ DWORD unknown00305c; -/* 0x3060 */ DWORD unknown003060; -/* 0x3064 */ DWORD unknown003064; -/* 0x3068 */ DWORD unknown003068; -/* 0x306c */ DWORD unknown00306c; -/* 0x3070 */ DWORD unknown003070; -/* 0x3074 */ DWORD unknown003074; -/* 0x3078 */ DWORD unknown003078; -/* 0x307c */ DWORD unknown00307c; -/* 0x3080 */ DWORD unknown003080; -/* 0x3084 */ DWORD unknown003084; -/* 0x3088 */ DWORD unknown003088; -/* 0x308c */ DWORD unknown00308c; -/* 0x3090 */ DWORD unknown003090; -/* 0x3094 */ DWORD unknown003094; -/* 0x3098 */ DWORD unknown003098; -/* 0x309c */ DWORD unknown00309c; -/* 0x30a0 */ DWORD unknown0030a0; -/* 0x30a4 */ DWORD unknown0030a4; -/* 0x30a8 */ DWORD unknown0030a8; -/* 0x30ac */ DWORD unknown0030ac; -/* 0x30b0 */ DWORD unknown0030b0; -/* 0x30b4 */ DWORD unknown0030b4; -/* 0x30b8 */ DWORD unknown0030b8; -/* 0x30bc */ DWORD unknown0030bc; -/* 0x30c0 */ DWORD unknown0030c0; -/* 0x30c4 */ DWORD unknown0030c4; -/* 0x30c8 */ DWORD unknown0030c8; -/* 0x30cc */ DWORD unknown0030cc; -/* 0x30d0 */ DWORD unknown0030d0; -/* 0x30d4 */ DWORD unknown0030d4; -/* 0x30d8 */ DWORD unknown0030d8; -/* 0x30dc */ DWORD unknown0030dc; -/* 0x30e0 */ DWORD unknown0030e0; -/* 0x30e4 */ DWORD unknown0030e4; -/* 0x30e8 */ DWORD unknown0030e8; -/* 0x30ec */ DWORD unknown0030ec; -/* 0x30f0 */ DWORD unknown0030f0; -/* 0x30f4 */ DWORD unknown0030f4; -/* 0x30f8 */ DWORD unknown0030f8; -/* 0x30fc */ DWORD unknown0030fc; - -/* 0x3100 */ DWORD unknown003100; -/* 0x3104 */ DWORD unknown003104; -/* 0x3108 */ DWORD unknown003108; -/* 0x310c */ DWORD unknown00310c; -/* 0x3110 */ DWORD unknown003110; -/* 0x3114 */ DWORD unknown003114; -/* 0x3118 */ DWORD unknown003118; -/* 0x311c */ DWORD unknown00311c; -/* 0x3120 */ DWORD unknown003120; -/* 0x3124 */ DWORD unknown003124; -/* 0x3128 */ DWORD unknown003128; -/* 0x312c */ DWORD unknown00312c; -/* 0x3130 */ DWORD unknown003130; -/* 0x3134 */ DWORD unknown003134; -/* 0x3138 */ DWORD unknown003138; -/* 0x313c */ DWORD unknown00313c; -/* 0x3140 */ DWORD unknown003140; -/* 0x3144 */ DWORD unknown003144; -/* 0x3148 */ DWORD unknown003148; -/* 0x314c */ DWORD unknown00314c; -/* 0x3150 */ DWORD unknown003150; -/* 0x3154 */ DWORD unknown003154; -/* 0x3158 */ DWORD unknown003158; -/* 0x315c */ DWORD unknown00315c; -/* 0x3160 */ DWORD unknown003160; -/* 0x3164 */ DWORD unknown003164; -/* 0x3168 */ DWORD unknown003168; -/* 0x316c */ DWORD unknown00316c; -/* 0x3170 */ DWORD unknown003170; -/* 0x3174 */ DWORD unknown003174; -/* 0x3178 */ DWORD unknown003178; -/* 0x317c */ DWORD unknown00317c; -/* 0x3180 */ DWORD unknown003180; -/* 0x3184 */ DWORD unknown003184; -/* 0x3188 */ DWORD unknown003188; -/* 0x318c */ DWORD unknown00318c; -/* 0x3190 */ DWORD unknown003190; -/* 0x3194 */ DWORD unknown003194; -/* 0x3198 */ DWORD unknown003198; -/* 0x319c */ DWORD unknown00319c; -/* 0x31a0 */ DWORD unknown0031a0; -/* 0x31a4 */ DWORD unknown0031a4; -/* 0x31a8 */ DWORD unknown0031a8; -/* 0x31ac */ DWORD unknown0031ac; -/* 0x31b0 */ DWORD unknown0031b0; -/* 0x31b4 */ DWORD unknown0031b4; -/* 0x31b8 */ DWORD unknown0031b8; -/* 0x31bc */ DWORD unknown0031bc; -/* 0x31c0 */ DWORD unknown0031c0; -/* 0x31c4 */ DWORD unknown0031c4; -/* 0x31c8 */ DWORD unknown0031c8; -/* 0x31cc */ DWORD unknown0031cc; -/* 0x31d0 */ DWORD unknown0031d0; -/* 0x31d4 */ DWORD unknown0031d4; -/* 0x31d8 */ DWORD unknown0031d8; -/* 0x31dc */ DWORD unknown0031dc; -/* 0x31e0 */ DWORD unknown0031e0; -/* 0x31e4 */ DWORD unknown0031e4; -/* 0x31e8 */ DWORD unknown0031e8; -/* 0x31ec */ DWORD unknown0031ec; -/* 0x31f0 */ DWORD unknown0031f0; -/* 0x31f4 */ DWORD unknown0031f4; -/* 0x31f8 */ DWORD unknown0031f8; -/* 0x31fc */ DWORD unknown0031fc; - -/* 0x3200 */ DWORD unknown003200; -/* 0x3204 */ DWORD unknown003204; -/* 0x3208 */ DWORD unknown003208; -/* 0x320c */ DWORD unknown00320c; -/* 0x3210 */ DWORD unknown003210; -/* 0x3214 */ DWORD unknown003214; -/* 0x3218 */ DWORD unknown003218; -/* 0x321c */ DWORD unknown00321c; -/* 0x3220 */ DWORD unknown003220; -/* 0x3224 */ DWORD unknown003224; -/* 0x3228 */ DWORD unknown003228; -/* 0x322c */ DWORD unknown00322c; -/* 0x3230 */ DWORD unknown003230; -/* 0x3234 */ DWORD unknown003234; -/* 0x3238 */ DWORD unknown003238; -/* 0x323c */ DWORD unknown00323c; -/* 0x3240 */ DWORD unknown003240; -/* 0x3244 */ DWORD unknown003244; -/* 0x3248 */ DWORD unknown003248; -/* 0x324c */ DWORD unknown00324c; -/* 0x3250 */ DWORD unknown003250; -/* 0x3254 */ DWORD unknown003254; -/* 0x3258 */ DWORD unknown003258; -/* 0x325c */ DWORD unknown00325c; -/* 0x3260 */ DWORD unknown003260; -/* 0x3264 */ DWORD unknown003264; -/* 0x3268 */ DWORD unknown003268; -/* 0x326c */ DWORD unknown00326c; -/* 0x3270 */ DWORD unknown003270; -/* 0x3274 */ DWORD unknown003274; -/* 0x3278 */ DWORD unknown003278; -/* 0x327c */ DWORD unknown00327c; -/* 0x3280 */ DWORD unknown003280; -/* 0x3284 */ DWORD unknown003284; -/* 0x3288 */ DWORD unknown003288; -/* 0x328c */ DWORD unknown00328c; -/* 0x3290 */ DWORD unknown003290; -/* 0x3294 */ DWORD unknown003294; -/* 0x3298 */ DWORD unknown003298; -/* 0x329c */ DWORD unknown00329c; -/* 0x32a0 */ DWORD unknown0032a0; -/* 0x32a4 */ DWORD unknown0032a4; -/* 0x32a8 */ DWORD unknown0032a8; -/* 0x32ac */ DWORD unknown0032ac; -/* 0x32b0 */ DWORD unknown0032b0; -/* 0x32b4 */ DWORD unknown0032b4; -/* 0x32b8 */ DWORD unknown0032b8; -/* 0x32bc */ DWORD unknown0032bc; -/* 0x32c0 */ DWORD unknown0032c0; -/* 0x32c4 */ DWORD unknown0032c4; -/* 0x32c8 */ DWORD unknown0032c8; -/* 0x32cc */ DWORD unknown0032cc; -/* 0x32d0 */ DWORD unknown0032d0; -/* 0x32d4 */ DWORD unknown0032d4; -/* 0x32d8 */ DWORD unknown0032d8; -/* 0x32dc */ DWORD unknown0032dc; -/* 0x32e0 */ DWORD unknown0032e0; -/* 0x32e4 */ DWORD unknown0032e4; -/* 0x32e8 */ DWORD unknown0032e8; -/* 0x32ec */ DWORD unknown0032ec; -/* 0x32f0 */ DWORD unknown0032f0; -/* 0x32f4 */ DWORD unknown0032f4; -/* 0x32f8 */ DWORD unknown0032f8; -/* 0x32fc */ DWORD unknown0032fc; - -/* 0x3300 */ DWORD unknown003300; -/* 0x3304 */ DWORD unknown003304; -/* 0x3308 */ DWORD unknown003308; -/* 0x330c */ DWORD unknown00330c; -/* 0x3310 */ DWORD unknown003310; -/* 0x3314 */ DWORD unknown003314; -/* 0x3318 */ DWORD unknown003318; -/* 0x331c */ DWORD unknown00331c; -/* 0x3320 */ DWORD unknown003320; -/* 0x3324 */ DWORD unknown003324; -/* 0x3328 */ DWORD unknown003328; -/* 0x332c */ DWORD unknown00332c; -} D3D9HALDEVICE, FAR *LPD3D9HALDEVICE; +/* IDirect3D9Device public interface */ +HRESULT WINAPI IDirect3DDevice9Base_TestCooperativeLevel(LPDIRECT3DDEVICE9 iface); +UINT WINAPI IDirect3DDevice9Base_GetAvailableTextureMem(LPDIRECT3DDEVICE9 iface); +HRESULT WINAPI IDirect3DDevice9Base_EvictManagedResources(LPDIRECT3DDEVICE9 iface); +HRESULT WINAPI IDirect3DDevice9Base_GetDirect3D(LPDIRECT3DDEVICE9 iface, IDirect3D9** ppD3D9); +HRESULT WINAPI IDirect3DDevice9Base_GetDeviceCaps(LPDIRECT3DDEVICE9 iface, D3DCAPS9* pCaps); +HRESULT WINAPI IDirect3DDevice9Base_GetDisplayMode(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, D3DDISPLAYMODE* pMode); +HRESULT WINAPI IDirect3DDevice9Base_GetCreationParameters(LPDIRECT3DDEVICE9 iface, D3DDEVICE_CREATION_PARAMETERS* pParameters); +HRESULT WINAPI IDirect3DDevice9Base_SetCursorProperties(LPDIRECT3DDEVICE9 iface, UINT XHotSpot, UINT YHotSpot, IDirect3DSurface9* pCursorBitmap); +VOID WINAPI IDirect3DDevice9Base_SetCursorPosition(LPDIRECT3DDEVICE9 iface, int X, int Y, DWORD Flags); +BOOL WINAPI IDirect3DDevice9Base_ShowCursor(LPDIRECT3DDEVICE9 iface, BOOL bShow); +HRESULT WINAPI IDirect3DDevice9Base_CreateAdditionalSwapChain(LPDIRECT3DDEVICE9 iface, D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DSwapChain9** ppSwapChain); +HRESULT WINAPI IDirect3DDevice9Base_GetSwapChain(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, IDirect3DSwapChain9** ppSwapChain); +UINT WINAPI IDirect3DDevice9Base_GetNumberOfSwapChains(LPDIRECT3DDEVICE9 iface); +HRESULT WINAPI IDirect3DDevice9Base_Reset(LPDIRECT3DDEVICE9 iface, D3DPRESENT_PARAMETERS* pPresentationParameters); +HRESULT WINAPI IDirect3DDevice9Base_Present(LPDIRECT3DDEVICE9 iface, CONST RECT* pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion); +HRESULT WINAPI IDirect3DDevice9Base_GetBackBuffer(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, UINT iBackBuffer, D3DBACKBUFFER_TYPE Type, IDirect3DSurface9** ppBackBuffer); +HRESULT WINAPI IDirect3DDevice9Base_GetRasterStatus(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, D3DRASTER_STATUS* pRasterStatus); +HRESULT WINAPI IDirect3DDevice9Base_SetDialogBoxMode(LPDIRECT3DDEVICE9 iface, BOOL bEnableDialogs); +VOID WINAPI IDirect3DDevice9Base_SetGammaRamp(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, DWORD Flags, CONST D3DGAMMARAMP* pRamp); +VOID WINAPI IDirect3DDevice9Base_GetGammaRamp(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, D3DGAMMARAMP* pRamp); +HRESULT WINAPI IDirect3DDevice9Base_CreateTexture(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DTexture9** ppTexture, HANDLE* pSharedHandle); +HRESULT WINAPI IDirect3DDevice9Base_CreateVolumeTexture(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, UINT Depth, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DVolumeTexture9** ppVolumeTexture, HANDLE* pSharedHandle); +HRESULT WINAPI IDirect3DDevice9Base_CreateCubeTexture(LPDIRECT3DDEVICE9 iface, UINT EdgeLength, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DCubeTexture9** ppCubeTexture, HANDLE* pSharedHandle); +HRESULT WINAPI IDirect3DDevice9Base_CreateVertexBuffer(LPDIRECT3DDEVICE9 iface, UINT Length, DWORD Usage, DWORD FVF, D3DPOOL Pool, IDirect3DVertexBuffer9** ppVertexBuffer, HANDLE* pSharedHandle); +HRESULT WINAPI IDirect3DDevice9Base_CreateIndexBuffer(LPDIRECT3DDEVICE9 iface, UINT Length, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DIndexBuffer9** ppIndexBuffer, HANDLE* pSharedHandle); +HRESULT WINAPI IDirect3DDevice9Base_CreateRenderTarget(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Lockable, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle); +HRESULT WINAPI IDirect3DDevice9Base_CreateDepthStencilSurface(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Discard, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle); +HRESULT WINAPI IDirect3DDevice9Base_UpdateSurface(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9* pSourceSurface, CONST RECT* pSourceRect, IDirect3DSurface9* pDestinationSurface, CONST POINT* pDestPoint); +HRESULT WINAPI IDirect3DDevice9Base_UpdateTexture(LPDIRECT3DDEVICE9 iface, IDirect3DBaseTexture9* pSourceTexture, IDirect3DBaseTexture9* pDestinationTexture); +HRESULT WINAPI IDirect3DDevice9Base_GetRenderTargetData(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9* pRenderTarget, IDirect3DSurface9* pDestSurface); +HRESULT WINAPI IDirect3DDevice9Base_GetFrontBufferData(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, IDirect3DSurface9* pDestSurface); +HRESULT WINAPI IDirect3DDevice9Base_StretchRect(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9* pSourceSurface, CONST RECT* pSourceRect, IDirect3DSurface9* pDestSurface, CONST RECT* pDestRect, D3DTEXTUREFILTERTYPE Filter); +HRESULT WINAPI IDirect3DDevice9Base_ColorFill(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9* pSurface, CONST RECT* pRect, D3DCOLOR color); +HRESULT WINAPI IDirect3DDevice9Base_CreateOffscreenPlainSurface(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, D3DFORMAT Format, D3DPOOL Pool, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle); #endif /* _D3D9_DEVICE_H_ */ diff --git a/reactos/dll/directx/d3d9/d3d9_haldevice.c b/reactos/dll/directx/d3d9/d3d9_haldevice.c new file mode 100644 index 00000000000..781573cd8a0 --- /dev/null +++ b/reactos/dll/directx/d3d9/d3d9_haldevice.c @@ -0,0 +1,596 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS ReactX + * FILE: dll/directx/d3d9/d3d9_haldevice.c + * PURPOSE: d3d9.dll internal HAL device functions + * PROGRAMERS: Gregor Gullwi + */ +#include "d3d9_haldevice.h" +#include + +#define LOCK_D3DDEVICE9() if (This->bLockDevice) EnterCriticalSection(&This->CriticalSection); +#define UNLOCK_D3DDEVICE9() if (This->bLockDevice) LeaveCriticalSection(&This->CriticalSection); + +/* Convert a IDirect3D9 pointer safely to the internal implementation struct */ +/*static LPD3D9HALDEVICE IDirect3DDevice9ToImpl(LPDIRECT3DDEVICE9 iface) +{ + if (NULL == iface) + return NULL; + + return (LPD3D9HALDEVICE)((ULONG_PTR)iface - FIELD_OFFSET(D3D9HALDEVICE, PureDevice.BaseDevice.lpVtbl)); +}*/ + +/* IDirect3DDevice9 public interface */ +HRESULT WINAPI IDirect3DDevice9HAL_GetTransform(LPDIRECT3DDEVICE9 iface, D3DTRANSFORMSTATETYPE State, D3DMATRIX* pMatrix) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_GetMaterial(LPDIRECT3DDEVICE9 iface, D3DMATERIAL9* pMaterial) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_GetLight(LPDIRECT3DDEVICE9 iface, DWORD Index, D3DLIGHT9* pLight) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_GetLightEnable(LPDIRECT3DDEVICE9 iface, DWORD Index, BOOL* pEnable) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_GetClipPlane(LPDIRECT3DDEVICE9 iface, DWORD Index, float* pPlane) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_SetRenderState(LPDIRECT3DDEVICE9 iface, D3DRENDERSTATETYPE State, DWORD Value) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_GetRenderState(LPDIRECT3DDEVICE9 iface, D3DRENDERSTATETYPE State, DWORD* pValue) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_SetClipStatus(LPDIRECT3DDEVICE9 iface, CONST D3DCLIPSTATUS9* pClipStatus) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_GetClipStatus(LPDIRECT3DDEVICE9 iface, D3DCLIPSTATUS9* pClipStatus) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_GetTextureStageState(LPDIRECT3DDEVICE9 iface, DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD* pValue) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_GetSamplerState(LPDIRECT3DDEVICE9 iface, DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD* pValue) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_ValidateDevice(LPDIRECT3DDEVICE9 iface, DWORD* pNumPasses) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_SetSoftwareVertexProcessing(LPDIRECT3DDEVICE9 iface, BOOL bSoftware) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +BOOL WINAPI IDirect3DDevice9HAL_GetSoftwareVertexProcessing(LPDIRECT3DDEVICE9 iface) +{ + UNIMPLEMENTED + + return TRUE; +} + +HRESULT WINAPI IDirect3DDevice9HAL_ProcessVertices(LPDIRECT3DDEVICE9 iface, UINT SrcStartIndex, UINT DestIndex, UINT VertexCount, IDirect3DVertexBuffer9* pDestBuffer, IDirect3DVertexDeclaration9* pVertexDecl, DWORD Flags) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_GetVertexShader(LPDIRECT3DDEVICE9 iface, IDirect3DVertexShader9** ppShader) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_GetPixelShader(LPDIRECT3DDEVICE9 iface, IDirect3DPixelShader9** ppShader) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_GetPixelShaderConstantF(LPDIRECT3DDEVICE9 iface, UINT StartRegister, float* pConstantData, UINT Vector4fCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_GetPixelShaderConstantI(LPDIRECT3DDEVICE9 iface, UINT StartRegister, int* pConstantData, UINT Vector4iCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_GetPixelShaderConstantB(LPDIRECT3DDEVICE9 iface, UINT StartRegister, BOOL* pConstantData, UINT BoolCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +/* IDirect3DDevice9 private interface */ +HRESULT WINAPI IDirect3DDevice9HAL_SetRenderStateWorker(LPDIRECT3DDEVICE9 iface, D3DRENDERSTATETYPE State, DWORD Value) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_SetTextureStageStateInt(LPDIRECT3DDEVICE9 iface, DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD Value) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_SetSamplerStateInt(LPDIRECT3DDEVICE9 iface, DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD Value) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_SetMaterialInt(LPDIRECT3DDEVICE9 iface, CONST D3DMATERIAL9* pMaterial) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_SetVertexShaderInt(LPDIRECT3DDEVICE9 iface, IDirect3DVertexShader9* pShader) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_SetVertexShaderConstantFInt(LPDIRECT3DDEVICE9 iface, UINT StartRegister,CONST float* pConstantData,UINT Vector4fCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_SetVertexShaderConstantIInt(LPDIRECT3DDEVICE9 iface, UINT StartRegister,CONST int* pConstantData,UINT Vector4iCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_SetVertexShaderConstantBInt(LPDIRECT3DDEVICE9 iface, UINT StartRegister,CONST BOOL* pConstantData,UINT BoolCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_SetPixelShaderInt(LPDIRECT3DDEVICE9 iface, IDirect3DPixelShader9* pShader) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_SetPixelShaderConstantFInt(LPDIRECT3DDEVICE9 iface, UINT StartRegister,CONST float* pConstantData,UINT Vector4fCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_SetPixelShaderConstantIInt(LPDIRECT3DDEVICE9 iface, UINT StartRegister,CONST int* pConstantData,UINT Vector4iCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_SetPixelShaderConstantBInt(LPDIRECT3DDEVICE9 iface, UINT StartRegister,CONST BOOL* pConstantData,UINT BoolCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_SetFVFInt(LPDIRECT3DDEVICE9 iface, DWORD FVF) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_SetTextureInt(LPDIRECT3DDEVICE9 iface, DWORD Stage,IDirect3DBaseTexture9* pTexture) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_SetIndicesInt(LPDIRECT3DDEVICE9 iface, IDirect3DIndexBuffer9* pIndexData) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_SetStreamSourceInt(LPDIRECT3DDEVICE9 iface, UINT StreamNumber,IDirect3DVertexBuffer9* pStreamData,UINT OffsetInBytes,UINT Stride) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_SetStreamSourceFreqInt(LPDIRECT3DDEVICE9 iface, UINT StreamNumber,UINT Setting) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +VOID WINAPI IDirect3DDevice9HAL_UpdateRenderState(LPDIRECT3DDEVICE9 iface, DWORD Unknown1, DWORD Unknown2) +{ + UNIMPLEMENTED +} + +HRESULT WINAPI IDirect3DDevice9HAL_SetTransformInt(LPDIRECT3DDEVICE9 iface, D3DTRANSFORMSTATETYPE State,CONST D3DMATRIX* pMatrix) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_MultiplyTransformInt(LPDIRECT3DDEVICE9 iface, D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* pMatrix) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_SetClipPlaneInt(LPDIRECT3DDEVICE9 iface, DWORD Index, CONST float* pPlane) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +VOID WINAPI IDirect3DDevice9HAL_UpdateDriverState(LPDIRECT3DDEVICE9 iface) +{ + UNIMPLEMENTED +} + +HRESULT WINAPI IDirect3DDevice9HAL_SetViewportInt(LPDIRECT3DDEVICE9 iface, CONST D3DVIEWPORT9* pViewport) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +VOID WINAPI IDirect3DDevice9HAL_SetStreamSourceWorker(LPDIRECT3DDEVICE9 iface, LPVOID UnknownStreamData) +{ + UNIMPLEMENTED +} + +HRESULT WINAPI IDirect3DDevice9HAL_SetPixelShaderConstantFWorker(LPDIRECT3DDEVICE9 iface, UINT StartRegister, CONST float* pConstantData, UINT Vector4fCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_SetPixelShaderConstantIWorker(LPDIRECT3DDEVICE9 iface, UINT StartRegister, CONST int* pConstantData, UINT Vector4iCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_SetPixelShaderConstantBWorker(LPDIRECT3DDEVICE9 iface, UINT StartRegister, CONST BOOL* pConstantData, UINT BoolCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +VOID WINAPI IDirect3DDevice9HAL_DrawPrimitiveWorker(LPDIRECT3DDEVICE9 iface, D3DPRIMITIVETYPE PrimitiveType, UINT StartVertex, UINT PrimitiveCount) +{ + UNIMPLEMENTED +} + +HRESULT WINAPI IDirect3DDevice9HAL_SetLightInt(LPDIRECT3DDEVICE9 iface, DWORD Index, CONST D3DLIGHT9* pLight) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_LightEnableInt(LPDIRECT3DDEVICE9 iface, DWORD Index, BOOL Enable) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_SetRenderStateInt(LPDIRECT3DDEVICE9 iface, D3DRENDERSTATETYPE State, DWORD Value) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_DrawPrimitiveUPInt(LPDIRECT3DDEVICE9 iface, D3DPRIMITIVETYPE PrimitiveType, UINT PrimitiveCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_ClearInt(LPDIRECT3DDEVICE9 iface, DWORD Count, CONST D3DRECT* pRects, DWORD Flags, D3DCOLOR Color, float Z, DWORD Stencil) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +VOID WINAPI IDirect3DDevice9HAL_DrawPrimitivesWorker(LPDIRECT3DDEVICE9 iface) +{ + UNIMPLEMENTED +} + +VOID WINAPI IDirect3DDevice9HAL_UpdateVertexShader(LPDIRECT3DDEVICE9 iface) +{ + UNIMPLEMENTED +} + +HRESULT WINAPI IDirect3DDevice9HAL_ValidateDrawCall(LPDIRECT3DDEVICE9 iface, D3DPRIMITIVETYPE PrimitiveType, UINT Unknown1, UINT Unknown2, UINT Unknown3, INT Unknown4, UINT Unknown5, INT Unknown6) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9HAL_Init(LPDIRECT3DDEVICE9 iface) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +VOID WINAPI IDirect3DDevice9HAL_InitState(LPDIRECT3DDEVICE9 iface, INT State) +{ + UNIMPLEMENTED +} + +VOID WINAPI IDirect3DDevice9HAL_Destroy(LPDIRECT3DDEVICE9 iface) +{ + UNIMPLEMENTED +} + +VOID WINAPI IDirect3DDevice9HAL_VirtualDestructor(LPDIRECT3DDEVICE9 iface) +{ + UNIMPLEMENTED +} + +IDirect3DDevice9Vtbl_INT Direct3DDevice9HAL_Vtbl = +{ + { + /* IUnknown */ + IDirect3DDevice9Base_QueryInterface, + IDirect3DDevice9Base_AddRef, + IDirect3DDevice9Base_Release, + + /* IDirect3DDevice9 public */ + IDirect3DDevice9Base_TestCooperativeLevel, + IDirect3DDevice9Base_GetAvailableTextureMem, + IDirect3DDevice9Base_EvictManagedResources, + IDirect3DDevice9Base_GetDirect3D, + IDirect3DDevice9Base_GetDeviceCaps, + IDirect3DDevice9Base_GetDisplayMode, + IDirect3DDevice9Base_GetCreationParameters, + IDirect3DDevice9Base_SetCursorProperties, + IDirect3DDevice9Base_SetCursorPosition, + IDirect3DDevice9Base_ShowCursor, + IDirect3DDevice9Base_CreateAdditionalSwapChain, + IDirect3DDevice9Base_GetSwapChain, + IDirect3DDevice9Base_GetNumberOfSwapChains, + IDirect3DDevice9Base_Reset, + IDirect3DDevice9Base_Present, + IDirect3DDevice9Base_GetBackBuffer, + IDirect3DDevice9Base_GetRasterStatus, + IDirect3DDevice9Base_SetDialogBoxMode, + IDirect3DDevice9Base_SetGammaRamp, + IDirect3DDevice9Base_GetGammaRamp, + IDirect3DDevice9Base_CreateTexture, + IDirect3DDevice9Base_CreateVolumeTexture, + IDirect3DDevice9Base_CreateCubeTexture, + IDirect3DDevice9Base_CreateVertexBuffer, + IDirect3DDevice9Base_CreateIndexBuffer, + IDirect3DDevice9Base_CreateRenderTarget, + IDirect3DDevice9Base_CreateDepthStencilSurface, + IDirect3DDevice9Base_UpdateSurface, + IDirect3DDevice9Base_UpdateTexture, + IDirect3DDevice9Base_GetRenderTargetData, + IDirect3DDevice9Base_GetFrontBufferData, + IDirect3DDevice9Base_StretchRect, + IDirect3DDevice9Base_ColorFill, + IDirect3DDevice9Base_CreateOffscreenPlainSurface, + IDirect3DDevice9Pure_SetRenderTarget, + IDirect3DDevice9Pure_GetRenderTarget, + IDirect3DDevice9Pure_SetDepthStencilSurface, + IDirect3DDevice9Pure_GetDepthStencilSurface, + IDirect3DDevice9Pure_BeginScene, + IDirect3DDevice9Pure_EndScene, + IDirect3DDevice9Pure_Clear, + IDirect3DDevice9Pure_SetTransform, + IDirect3DDevice9HAL_GetTransform, + IDirect3DDevice9Pure_MultiplyTransform, + IDirect3DDevice9Pure_SetViewport, + IDirect3DDevice9Pure_GetViewport, + IDirect3DDevice9Pure_SetMaterial, + IDirect3DDevice9HAL_GetMaterial, + IDirect3DDevice9Pure_SetLight, + IDirect3DDevice9HAL_GetLight, + IDirect3DDevice9Pure_LightEnable, + IDirect3DDevice9HAL_GetLightEnable, + IDirect3DDevice9Pure_SetClipPlane, + IDirect3DDevice9HAL_GetClipPlane, + IDirect3DDevice9HAL_SetRenderState, + IDirect3DDevice9HAL_GetRenderState, + IDirect3DDevice9Pure_CreateStateBlock, + IDirect3DDevice9Pure_BeginStateBlock, + IDirect3DDevice9Pure_EndStateBlock, + IDirect3DDevice9HAL_SetClipStatus, + IDirect3DDevice9HAL_GetClipStatus, + IDirect3DDevice9Pure_GetTexture, + IDirect3DDevice9Pure_SetTexture, + IDirect3DDevice9HAL_GetTextureStageState, + IDirect3DDevice9Pure_SetTextureStageState, + IDirect3DDevice9HAL_GetSamplerState, + IDirect3DDevice9Pure_SetSamplerState, + IDirect3DDevice9HAL_ValidateDevice, + IDirect3DDevice9Pure_SetPaletteEntries, + IDirect3DDevice9Pure_GetPaletteEntries, + IDirect3DDevice9Pure_SetCurrentTexturePalette, + IDirect3DDevice9Pure_GetCurrentTexturePalette, + IDirect3DDevice9Pure_SetScissorRect, + IDirect3DDevice9Pure_GetScissorRect, + IDirect3DDevice9HAL_SetSoftwareVertexProcessing, + IDirect3DDevice9HAL_GetSoftwareVertexProcessing, + IDirect3DDevice9Pure_SetNPatchMode, + IDirect3DDevice9Pure_GetNPatchMode, + IDirect3DDevice9Pure_DrawPrimitive, + IDirect3DDevice9Pure_DrawIndexedPrimitive, + IDirect3DDevice9Pure_DrawPrimitiveUP, + IDirect3DDevice9Pure_DrawIndexedPrimitiveUP, + IDirect3DDevice9HAL_ProcessVertices, + IDirect3DDevice9Pure_CreateVertexDeclaration, + IDirect3DDevice9Pure_SetVertexDeclaration, + IDirect3DDevice9Pure_GetVertexDeclaration, + IDirect3DDevice9Pure_SetFVF, + IDirect3DDevice9Pure_GetFVF, + IDirect3DDevice9Pure_CreateVertexShader, + IDirect3DDevice9Pure_SetVertexShader, + IDirect3DDevice9HAL_GetVertexShader, + IDirect3DDevice9Pure_SetVertexShaderConstantF, + IDirect3DDevice9Pure_GetVertexShaderConstantF, + IDirect3DDevice9Pure_SetVertexShaderConstantI, + IDirect3DDevice9Pure_GetVertexShaderConstantI, + IDirect3DDevice9Pure_SetVertexShaderConstantB, + IDirect3DDevice9Pure_GetVertexShaderConstantB, + IDirect3DDevice9Pure_SetStreamSource, + IDirect3DDevice9Pure_GetStreamSource, + IDirect3DDevice9Pure_SetStreamSourceFreq, + IDirect3DDevice9Pure_GetStreamSourceFreq, + IDirect3DDevice9Pure_SetIndices, + IDirect3DDevice9Pure_GetIndices, + IDirect3DDevice9Pure_CreatePixelShader, + IDirect3DDevice9Pure_SetPixelShader, + IDirect3DDevice9HAL_GetPixelShader, + IDirect3DDevice9Pure_SetPixelShaderConstantF, + IDirect3DDevice9HAL_GetPixelShaderConstantF, + IDirect3DDevice9Pure_SetPixelShaderConstantI, + IDirect3DDevice9HAL_GetPixelShaderConstantI, + IDirect3DDevice9Pure_SetPixelShaderConstantB, + IDirect3DDevice9HAL_GetPixelShaderConstantB, + IDirect3DDevice9Pure_DrawRectPatch, + IDirect3DDevice9Pure_DrawTriPatch, + IDirect3DDevice9Pure_DeletePatch, + IDirect3DDevice9Pure_CreateQuery, + }, + + /* IDirect3DDevice9 private */ + IDirect3DDevice9HAL_SetRenderStateWorker, + IDirect3DDevice9HAL_SetTextureStageStateInt, + IDirect3DDevice9HAL_SetSamplerStateInt, + IDirect3DDevice9HAL_SetMaterialInt, + IDirect3DDevice9HAL_SetVertexShaderInt, + IDirect3DDevice9HAL_SetVertexShaderConstantFInt, + IDirect3DDevice9HAL_SetVertexShaderConstantIInt, + IDirect3DDevice9HAL_SetVertexShaderConstantBInt, + IDirect3DDevice9HAL_SetPixelShaderInt, + IDirect3DDevice9HAL_SetPixelShaderConstantFInt, + IDirect3DDevice9HAL_SetPixelShaderConstantIInt, + IDirect3DDevice9HAL_SetPixelShaderConstantBInt, + IDirect3DDevice9HAL_SetFVFInt, + IDirect3DDevice9HAL_SetTextureInt, + IDirect3DDevice9HAL_SetIndicesInt, + IDirect3DDevice9HAL_SetStreamSourceInt, + IDirect3DDevice9HAL_SetStreamSourceFreqInt, + IDirect3DDevice9HAL_UpdateRenderState, + IDirect3DDevice9HAL_SetTransformInt, + IDirect3DDevice9HAL_MultiplyTransformInt, + IDirect3DDevice9HAL_SetClipPlaneInt, + IDirect3DDevice9HAL_UpdateDriverState, + IDirect3DDevice9HAL_SetViewportInt, + IDirect3DDevice9HAL_SetStreamSourceWorker, + IDirect3DDevice9HAL_SetPixelShaderConstantFWorker, + IDirect3DDevice9HAL_SetPixelShaderConstantIWorker, + IDirect3DDevice9HAL_SetPixelShaderConstantBWorker, + IDirect3DDevice9HAL_DrawPrimitiveWorker, + IDirect3DDevice9HAL_SetLightInt, + IDirect3DDevice9HAL_LightEnableInt, + IDirect3DDevice9HAL_SetRenderStateInt, + IDirect3DDevice9HAL_DrawPrimitiveUPInt, + IDirect3DDevice9HAL_ClearInt, + IDirect3DDevice9HAL_DrawPrimitivesWorker, + IDirect3DDevice9HAL_UpdateVertexShader, + IDirect3DDevice9HAL_ValidateDrawCall, + IDirect3DDevice9HAL_Init, + IDirect3DDevice9HAL_InitState, + IDirect3DDevice9HAL_Destroy, + IDirect3DDevice9HAL_VirtualDestructor, +}; + diff --git a/reactos/dll/directx/d3d9/d3d9_haldevice.h b/reactos/dll/directx/d3d9/d3d9_haldevice.h new file mode 100644 index 00000000000..42e73d990a3 --- /dev/null +++ b/reactos/dll/directx/d3d9/d3d9_haldevice.h @@ -0,0 +1,1010 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS ReactX + * FILE: dll/directx/d3d9/d3d9_haldevice.h + * PURPOSE: d3d9.dll internal HAL device structures + * PROGRAMERS: Gregor Gullwi + */ +#ifndef _D3D9_HALDEVICE_H_ +#define _D3D9_HALDEVICE_H_ + +#include "d3d9_puredevice.h" + +#if !defined(__cplusplus) || defined(CINTERFACE) +extern IDirect3DDevice9Vtbl_INT Direct3DDevice9HAL_Vtbl; +#endif + +typedef struct _D3D9HALDEVICE +{ +/* 0x0000 */ D3D9PUREDEVICE PureDevice; +#ifdef D3D_DEBUG_INFO +/* N/A - 0x0004 */ DWORD dbg0004; +/* N/A - 0x0008 */ DWORD dbg0008; +/* N/A - 0x000c */ DWORD dbg000c; +/* N/A - 0x0010 */ DWORD dbg0010; +/* N/A - 0x0014 */ DWORD dbg0014; +/* N/A - 0x0018 */ DWORD dbg0018; +/* N/A - 0x001c */ DWORD dbg001c; +/* N/A - 0x0020 */ DWORD dbg0020; +/* N/A - 0x0024 */ DWORD dbg0024; +/* N/A - 0x0028 */ DWORD dbg0028; +/* N/A - 0x002c */ DWORD dbg002c; +/* N/A - 0x0030 */ DWORD dbg0030; +/* N/A - 0x0034 */ DWORD dbg0034; +/* N/A - 0x0038 */ DWORD dbg0038; +#endif +/* 0x2438 */ DWORD unknown002438; +/* 0x243c */ DWORD unknown00243c; +/* 0x2440 */ DWORD unknown002440; +/* 0x2444 */ DWORD unknown002444; +/* 0x2448 */ DWORD unknown002448; +/* 0x244c */ DWORD unknown00244c; +/* 0x2450 */ DWORD unknown002450; +/* 0x2454 */ DWORD unknown002454; +/* 0x2458 */ DWORD unknown002458; +/* 0x245c */ DWORD unknown00245c; +/* 0x2460 */ DWORD unknown002460; +/* 0x2464 */ DWORD unknown002464; +/* 0x2468 */ DWORD unknown002468; +/* 0x246c */ DWORD unknown00246c; +/* 0x2470 */ DWORD unknown002470; +/* 0x2474 */ DWORD unknown002474; +/* 0x2478 */ DWORD unknown002478; +/* 0x247c */ DWORD unknown00247c; +/* 0x2480 */ DWORD unknown002480; +/* 0x2484 */ DWORD unknown002484; +/* 0x2488 */ DWORD unknown002488; +/* 0x248c */ DWORD unknown00248c; +/* 0x2490 */ DWORD unknown002490; +/* 0x2494 */ DWORD unknown002494; +/* 0x2498 */ DWORD unknown002498; +/* 0x249c */ DWORD unknown00249c; +/* 0x24a0 */ DWORD unknown0024a0; +/* 0x24a4 */ DWORD unknown0024a4; +/* 0x24a8 */ DWORD unknown0024a8; +/* 0x24ac */ DWORD unknown0024ac; +/* 0x24b0 */ DWORD unknown0024b0; +/* 0x24b4 */ DWORD unknown0024b4; +/* 0x24b8 */ DWORD unknown0024b8; +/* 0x24bc */ DWORD unknown0024bc; +/* 0x24c0 */ DWORD unknown0024c0; +/* 0x24c4 */ DWORD unknown0024c4; +/* 0x24c8 */ DWORD unknown0024c8; +/* 0x24cc */ DWORD unknown0024cc; +/* 0x24d0 */ DWORD unknown0024d0; +/* 0x24d4 */ DWORD unknown0024d4; +/* 0x24d8 */ DWORD unknown0024d8; +/* 0x24dc */ DWORD unknown0024dc; +/* 0x24e0 */ DWORD unknown0024e0; +/* 0x24e4 */ DWORD unknown0024e4; +/* 0x24e8 */ DWORD unknown0024e8; +/* 0x24ec */ DWORD unknown0024ec; +/* 0x24f0 */ DWORD unknown0024f0; +/* 0x24f4 */ DWORD unknown0024f4; +/* 0x24f8 */ DWORD unknown0024f8; +/* 0x24fc */ DWORD unknown0024fc; +/* 0x2500 */ DWORD unknown002500; +/* 0x2504 */ DWORD unknown002504; +/* 0x2508 */ DWORD unknown002508; +/* 0x250c */ DWORD unknown00250c; +/* 0x2510 */ DWORD unknown002510; +/* 0x2514 */ DWORD unknown002514; +/* 0x2518 */ DWORD unknown002518; +/* 0x251c */ DWORD unknown00251c; +/* 0x2520 */ DWORD unknown002520; +/* 0x2524 */ DWORD unknown002524; +/* 0x2528 */ DWORD unknown002528; +/* 0x252c */ DWORD unknown00252c; +/* 0x2530 */ DWORD unknown002530; +/* 0x2534 */ DWORD unknown002534; +/* 0x2538 */ DWORD unknown002538; +/* 0x253c */ DWORD unknown00253c; +/* 0x2540 */ DWORD unknown002540; +/* 0x2544 */ DWORD unknown002544; +/* 0x2548 */ DWORD unknown002548; +/* 0x254c */ DWORD unknown00254c; +/* 0x2550 */ DWORD unknown002550; +/* 0x2554 */ DWORD unknown002554; +/* 0x2558 */ DWORD unknown002558; +/* 0x255c */ DWORD unknown00255c; +/* 0x2560 */ DWORD unknown002560; +/* 0x2564 */ DWORD unknown002564; +/* 0x2568 */ DWORD unknown002568; +/* 0x256c */ DWORD unknown00256c; +/* 0x2570 */ DWORD unknown002570; +/* 0x2574 */ DWORD unknown002574; +/* 0x2578 */ DWORD unknown002578; +/* 0x257c */ DWORD unknown00257c; +/* 0x2580 */ DWORD unknown002580; +/* 0x2584 */ DWORD unknown002584; +/* 0x2588 */ DWORD unknown002588; +/* 0x258c */ DWORD unknown00258c; +/* 0x2590 */ DWORD unknown002590; +/* 0x2594 */ DWORD unknown002594; +/* 0x2598 */ DWORD unknown002598; +/* 0x259c */ DWORD unknown00259c; +/* 0x25a0 */ DWORD unknown0025a0; +/* 0x25a4 */ DWORD unknown0025a4; +/* 0x25a8 */ DWORD unknown0025a8; +/* 0x25ac */ DWORD unknown0025ac; +/* 0x25b0 */ DWORD unknown0025b0; +/* 0x25b4 */ DWORD unknown0025b4; +/* 0x25b8 */ DWORD unknown0025b8; +/* 0x25bc */ DWORD unknown0025bc; +/* 0x25c0 */ DWORD unknown0025c0; +/* 0x25c4 */ DWORD unknown0025c4; +/* 0x25c8 */ DWORD unknown0025c8; +/* 0x25cc */ DWORD unknown0025cc; +/* 0x25d0 */ DWORD unknown0025d0; +/* 0x25d4 */ DWORD unknown0025d4; +/* 0x25d8 */ DWORD unknown0025d8; +/* 0x25dc */ DWORD unknown0025dc; +/* 0x25e0 */ DWORD unknown0025e0; +/* 0x25e4 */ DWORD unknown0025e4; +/* 0x25e8 */ DWORD unknown0025e8; +/* 0x25ec */ DWORD unknown0025ec; +/* 0x25f0 */ DWORD unknown0025f0; +/* 0x25f4 */ DWORD unknown0025f4; +/* 0x25f8 */ DWORD unknown0025f8; +/* 0x25fc */ DWORD unknown0025fc; + +/* 0x2600 */ DWORD unknown002600; +/* 0x2604 */ DWORD unknown002604; +/* 0x2608 */ DWORD unknown002608; +/* 0x260c */ DWORD unknown00260c; +/* 0x2610 */ DWORD unknown002610; +/* 0x2614 */ DWORD unknown002614; +/* 0x2618 */ DWORD unknown002618; +/* 0x261c */ DWORD unknown00261c; +/* 0x2620 */ DWORD unknown002620; +/* 0x2624 */ DWORD unknown002624; +/* 0x2628 */ DWORD unknown002628; +/* 0x262c */ DWORD unknown00262c; +/* 0x2630 */ DWORD unknown002630; +/* 0x2634 */ DWORD unknown002634; +/* 0x2638 */ DWORD unknown002638; +/* 0x263c */ DWORD unknown00263c; +/* 0x2640 */ DWORD unknown002640; +/* 0x2644 */ DWORD unknown002644; +/* 0x2648 */ DWORD unknown002648; +/* 0x264c */ DWORD unknown00264c; +/* 0x2650 */ DWORD unknown002650; +/* 0x2654 */ DWORD unknown002654; +/* 0x2658 */ DWORD unknown002658; +/* 0x265c */ DWORD unknown00265c; +/* 0x2660 */ DWORD unknown002660; +/* 0x2664 */ DWORD unknown002664; +/* 0x2668 */ DWORD unknown002668; +/* 0x266c */ DWORD unknown00266c; +/* 0x2670 */ DWORD unknown002670; +/* 0x2674 */ DWORD unknown002674; +/* 0x2678 */ DWORD unknown002678; +/* 0x267c */ DWORD unknown00267c; +/* 0x2680 */ DWORD unknown002680; +/* 0x2684 */ DWORD unknown002684; +/* 0x2688 */ DWORD unknown002688; +/* 0x268c */ DWORD unknown00268c; +/* 0x2690 */ DWORD unknown002690; +/* 0x2694 */ DWORD unknown002694; +/* 0x2698 */ DWORD unknown002698; +/* 0x269c */ DWORD unknown00269c; +/* 0x26a0 */ DWORD unknown0026a0; +/* 0x26a4 */ DWORD unknown0026a4; +/* 0x26a8 */ DWORD unknown0026a8; +/* 0x26ac */ DWORD unknown0026ac; +/* 0x26b0 */ DWORD unknown0026b0; +/* 0x26b4 */ DWORD unknown0026b4; +/* 0x26b8 */ DWORD unknown0026b8; +/* 0x26bc */ DWORD unknown0026bc; +/* 0x26c0 */ DWORD unknown0026c0; +/* 0x26c4 */ DWORD unknown0026c4; +/* 0x26c8 */ DWORD unknown0026c8; +/* 0x26cc */ DWORD unknown0026cc; +/* 0x26d0 */ DWORD unknown0026d0; +/* 0x26d4 */ DWORD unknown0026d4; +/* 0x26d8 */ DWORD unknown0026d8; +/* 0x26dc */ DWORD unknown0026dc; +/* 0x26e0 */ DWORD unknown0026e0; +/* 0x26e4 */ DWORD unknown0026e4; +/* 0x26e8 */ DWORD unknown0026e8; +/* 0x26ec */ DWORD unknown0026ec; +/* 0x26f0 */ DWORD unknown0026f0; +/* 0x26f4 */ DWORD unknown0026f4; +/* 0x26f8 */ DWORD unknown0026f8; +/* 0x26fc */ DWORD unknown0026fc; + +/* 0x2700 */ DWORD unknown002700; +/* 0x2704 */ DWORD unknown002704; +/* 0x2708 */ DWORD unknown002708; +/* 0x270c */ DWORD unknown00270c; +/* 0x2710 */ DWORD unknown002710; +/* 0x2714 */ DWORD unknown002714; +/* 0x2718 */ DWORD unknown002718; +/* 0x271c */ DWORD unknown00271c; +/* 0x2720 */ DWORD unknown002720; +/* 0x2724 */ DWORD unknown002724; +/* 0x2728 */ DWORD unknown002728; +/* 0x272c */ DWORD unknown00272c; +/* 0x2730 */ DWORD unknown002730; +/* 0x2734 */ DWORD unknown002734; +/* 0x2738 */ DWORD unknown002738; +/* 0x273c */ DWORD unknown00273c; +/* 0x2740 */ DWORD unknown002740; +/* 0x2744 */ DWORD unknown002744; +/* 0x2748 */ DWORD unknown002748; +/* 0x274c */ DWORD unknown00274c; +/* 0x2750 */ DWORD unknown002750; +/* 0x2754 */ DWORD unknown002754; +/* 0x2758 */ DWORD unknown002758; +/* 0x275c */ DWORD unknown00275c; +/* 0x2760 */ DWORD unknown002760; +/* 0x2764 */ DWORD unknown002764; +/* 0x2768 */ DWORD unknown002768; +/* 0x276c */ DWORD unknown00276c; +/* 0x2770 */ DWORD unknown002770; +/* 0x2774 */ DWORD unknown002774; +/* 0x2778 */ DWORD unknown002778; +/* 0x277c */ DWORD unknown00277c; +/* 0x2780 */ DWORD unknown002780; +/* 0x2784 */ DWORD unknown002784; +/* 0x2788 */ DWORD unknown002788; +/* 0x278c */ DWORD unknown00278c; +/* 0x2790 */ DWORD unknown002790; +/* 0x2794 */ DWORD unknown002794; +/* 0x2798 */ DWORD unknown002798; +/* 0x279c */ DWORD unknown00279c; +/* 0x27a0 */ DWORD unknown0027a0; +/* 0x27a4 */ DWORD unknown0027a4; +/* 0x27a8 */ DWORD unknown0027a8; +/* 0x27ac */ DWORD unknown0027ac; +/* 0x27b0 */ DWORD unknown0027b0; +/* 0x27b4 */ DWORD unknown0027b4; +/* 0x27b8 */ DWORD unknown0027b8; +/* 0x27bc */ DWORD unknown0027bc; +/* 0x27c0 */ DWORD unknown0027c0; +/* 0x27c4 */ DWORD unknown0027c4; +/* 0x27c8 */ DWORD unknown0027c8; +/* 0x27cc */ DWORD unknown0027cc; +/* 0x27d0 */ DWORD unknown0027d0; +/* 0x27d4 */ DWORD unknown0027d4; +/* 0x27d8 */ DWORD unknown0027d8; +/* 0x27dc */ DWORD unknown0027dc; +/* 0x27e0 */ DWORD unknown0027e0; +/* 0x27e4 */ DWORD unknown0027e4; +/* 0x27e8 */ DWORD unknown0027e8; +/* 0x27ec */ DWORD unknown0027ec; +/* 0x27f0 */ DWORD unknown0027f0; +/* 0x27f4 */ DWORD unknown0027f4; +/* 0x27f8 */ DWORD unknown0027f8; +/* 0x27fc */ DWORD unknown0027fc; + +/* 0x2800 */ DWORD unknown002800; +/* 0x2804 */ DWORD unknown002804; +/* 0x2808 */ DWORD unknown002808; +/* 0x280c */ DWORD unknown00280c; +/* 0x2810 */ DWORD unknown002810; +/* 0x2814 */ DWORD unknown002814; +/* 0x2818 */ DWORD unknown002818; +/* 0x281c */ DWORD unknown00281c; +/* 0x2820 */ DWORD unknown002820; +/* 0x2824 */ DWORD unknown002824; +/* 0x2828 */ DWORD unknown002828; +/* 0x282c */ DWORD unknown00282c; +/* 0x2830 */ DWORD unknown002830; +/* 0x2834 */ DWORD unknown002834; +/* 0x2838 */ DWORD unknown002838; +/* 0x283c */ DWORD unknown00283c; +/* 0x2840 */ DWORD unknown002840; +/* 0x2844 */ DWORD unknown002844; +/* 0x2848 */ DWORD unknown002848; +/* 0x284c */ DWORD unknown00284c; +/* 0x2850 */ DWORD unknown002850; +/* 0x2854 */ DWORD unknown002854; +/* 0x2858 */ DWORD unknown002858; +/* 0x285c */ DWORD unknown00285c; +/* 0x2860 */ DWORD unknown002860; +/* 0x2864 */ DWORD unknown002864; +/* 0x2868 */ DWORD unknown002868; +/* 0x286c */ DWORD unknown00286c; +/* 0x2870 */ DWORD unknown002870; +/* 0x2874 */ DWORD unknown002874; +/* 0x2878 */ DWORD unknown002878; +/* 0x287c */ DWORD unknown00287c; +/* 0x2880 */ DWORD unknown002880; +/* 0x2884 */ DWORD unknown002884; +/* 0x2888 */ DWORD unknown002888; +/* 0x288c */ DWORD unknown00288c; +/* 0x2890 */ DWORD unknown002890; +/* 0x2894 */ DWORD unknown002894; +/* 0x2898 */ DWORD unknown002898; +/* 0x289c */ DWORD unknown00289c; +/* 0x28a0 */ DWORD unknown0028a0; +/* 0x28a4 */ DWORD unknown0028a4; +/* 0x28a8 */ DWORD unknown0028a8; +/* 0x28ac */ DWORD unknown0028ac; +/* 0x28b0 */ DWORD unknown0028b0; +/* 0x28b4 */ DWORD unknown0028b4; +/* 0x28b8 */ DWORD unknown0028b8; +/* 0x28bc */ DWORD unknown0028bc; +/* 0x28c0 */ DWORD unknown0028c0; +/* 0x28c4 */ DWORD unknown0028c4; +/* 0x28c8 */ DWORD unknown0028c8; +/* 0x28cc */ DWORD unknown0028cc; +/* 0x28d0 */ DWORD unknown0028d0; +/* 0x28d4 */ DWORD unknown0028d4; +/* 0x28d8 */ DWORD unknown0028d8; +/* 0x28dc */ DWORD unknown0028dc; +/* 0x28e0 */ DWORD unknown0028e0; +/* 0x28e4 */ DWORD unknown0028e4; +/* 0x28e8 */ DWORD unknown0028e8; +/* 0x28ec */ DWORD unknown0028ec; +/* 0x28f0 */ DWORD unknown0028f0; +/* 0x28f4 */ DWORD unknown0028f4; +/* 0x28f8 */ DWORD unknown0028f8; +/* 0x28fc */ DWORD unknown0028fc; + +/* 0x2900 */ DWORD unknown002900; +/* 0x2904 */ DWORD unknown002904; +/* 0x2908 */ DWORD unknown002908; +/* 0x290c */ DWORD unknown00290c; +/* 0x2910 */ DWORD unknown002910; +/* 0x2914 */ DWORD unknown002914; +/* 0x2918 */ DWORD unknown002918; +/* 0x291c */ DWORD unknown00291c; +/* 0x2920 */ DWORD unknown002920; +/* 0x2924 */ DWORD unknown002924; +/* 0x2928 */ DWORD unknown002928; +/* 0x292c */ DWORD unknown00292c; +/* 0x2930 */ DWORD unknown002930; +/* 0x2934 */ DWORD unknown002934; +/* 0x2938 */ DWORD unknown002938; +/* 0x293c */ DWORD unknown00293c; +/* 0x2940 */ DWORD unknown002940; +/* 0x2944 */ DWORD unknown002944; +/* 0x2948 */ DWORD unknown002948; +/* 0x294c */ DWORD unknown00294c; +/* 0x2950 */ DWORD unknown002950; +/* 0x2954 */ DWORD unknown002954; +/* 0x2958 */ DWORD unknown002958; +/* 0x295c */ DWORD unknown00295c; +/* 0x2960 */ DWORD unknown002960; +/* 0x2964 */ DWORD unknown002964; +/* 0x2968 */ DWORD unknown002968; +/* 0x296c */ DWORD unknown00296c; +/* 0x2970 */ DWORD unknown002970; +/* 0x2974 */ DWORD unknown002974; +/* 0x2978 */ DWORD unknown002978; +/* 0x297c */ DWORD unknown00297c; +/* 0x2980 */ DWORD unknown002980; +/* 0x2984 */ DWORD unknown002984; +/* 0x2988 */ DWORD unknown002988; +/* 0x298c */ DWORD unknown00298c; +/* 0x2990 */ DWORD unknown002990; +/* 0x2994 */ DWORD unknown002994; +/* 0x2998 */ DWORD unknown002998; +/* 0x299c */ DWORD unknown00299c; +/* 0x29a0 */ DWORD unknown0029a0; +/* 0x29a4 */ DWORD unknown0029a4; +/* 0x29a8 */ DWORD unknown0029a8; +/* 0x29ac */ DWORD unknown0029ac; +/* 0x29b0 */ DWORD unknown0029b0; +/* 0x29b4 */ DWORD unknown0029b4; +/* 0x29b8 */ DWORD unknown0029b8; +/* 0x29bc */ DWORD unknown0029bc; +/* 0x29c0 */ DWORD unknown0029c0; +/* 0x29c4 */ DWORD unknown0029c4; +/* 0x29c8 */ DWORD unknown0029c8; +/* 0x29cc */ DWORD unknown0029cc; +/* 0x29d0 */ DWORD unknown0029d0; +/* 0x29d4 */ DWORD unknown0029d4; +/* 0x29d8 */ DWORD unknown0029d8; +/* 0x29dc */ DWORD unknown0029dc; +/* 0x29e0 */ DWORD unknown0029e0; +/* 0x29e4 */ DWORD unknown0029e4; +/* 0x29e8 */ DWORD unknown0029e8; +/* 0x29ec */ DWORD unknown0029ec; +/* 0x29f0 */ DWORD unknown0029f0; +/* 0x29f4 */ DWORD unknown0029f4; +/* 0x29f8 */ DWORD unknown0029f8; +/* 0x29fc */ DWORD unknown0029fc; + +/* 0x2a00 */ DWORD unknown002a00; +/* 0x2a04 */ DWORD unknown002a04; +/* 0x2a08 */ DWORD unknown002a08; +/* 0x2a0c */ DWORD unknown002a0c; +/* 0x2a10 */ DWORD unknown002a10; +/* 0x2a14 */ DWORD unknown002a14; +/* 0x2a18 */ DWORD unknown002a18; +/* 0x2a1c */ DWORD unknown002a1c; +/* 0x2a20 */ DWORD unknown002a20; +/* 0x2a24 */ DWORD unknown002a24; +/* 0x2a28 */ DWORD unknown002a28; +/* 0x2a2c */ DWORD unknown002a2c; +/* 0x2a30 */ DWORD unknown002a30; +/* 0x2a34 */ DWORD unknown002a34; +/* 0x2a38 */ DWORD unknown002a38; +/* 0x2a3c */ DWORD unknown002a3c; +/* 0x2a40 */ DWORD unknown002a40; +/* 0x2a44 */ DWORD unknown002a44; +/* 0x2a48 */ DWORD unknown002a48; +/* 0x2a4c */ DWORD unknown002a4c; +/* 0x2a50 */ DWORD unknown002a50; +/* 0x2a54 */ DWORD unknown002a54; +/* 0x2a58 */ DWORD unknown002a58; +/* 0x2a5c */ DWORD unknown002a5c; +/* 0x2a60 */ DWORD unknown002a60; +/* 0x2a64 */ DWORD unknown002a64; +/* 0x2a68 */ DWORD unknown002a68; +/* 0x2a6c */ DWORD unknown002a6c; +/* 0x2a70 */ DWORD unknown002a70; +/* 0x2a74 */ DWORD unknown002a74; +/* 0x2a78 */ DWORD unknown002a78; +/* 0x2a7c */ DWORD unknown002a7c; +/* 0x2a80 */ DWORD unknown002a80; +/* 0x2a84 */ DWORD unknown002a84; +/* 0x2a88 */ DWORD unknown002a88; +/* 0x2a8c */ DWORD unknown002a8c; +/* 0x2a90 */ DWORD unknown002a90; +/* 0x2a94 */ DWORD unknown002a94; +/* 0x2a98 */ DWORD unknown002a98; +/* 0x2a9c */ DWORD unknown002a9c; +/* 0x2aa0 */ DWORD unknown002aa0; +/* 0x2aa4 */ DWORD unknown002aa4; +/* 0x2aa8 */ DWORD unknown002aa8; +/* 0x2aac */ DWORD unknown002aac; +/* 0x2ab0 */ DWORD unknown002ab0; +/* 0x2ab4 */ DWORD unknown002ab4; +/* 0x2ab8 */ DWORD unknown002ab8; +/* 0x2abc */ DWORD unknown002abc; +/* 0x2ac0 */ DWORD unknown002ac0; +/* 0x2ac4 */ DWORD unknown002ac4; +/* 0x2ac8 */ DWORD unknown002ac8; +/* 0x2acc */ DWORD unknown002acc; +/* 0x2ad0 */ DWORD unknown002ad0; +/* 0x2ad4 */ DWORD unknown002ad4; +/* 0x2ad8 */ DWORD unknown002ad8; +/* 0x2adc */ DWORD unknown002adc; +/* 0x2ae0 */ DWORD unknown002ae0; +/* 0x2ae4 */ DWORD unknown002ae4; +/* 0x2ae8 */ DWORD unknown002ae8; +/* 0x2aec */ DWORD unknown002aec; +/* 0x2af0 */ DWORD unknown002af0; +/* 0x2af4 */ DWORD unknown002af4; +/* 0x2af8 */ DWORD unknown002af8; +/* 0x2afc */ DWORD unknown002afc; + +/* 0x2b00 */ DWORD unknown002b00; +/* 0x2b04 */ DWORD unknown002b04; +/* 0x2b08 */ DWORD unknown002b08; +/* 0x2b0c */ DWORD unknown002b0c; +/* 0x2b10 */ DWORD unknown002b10; +/* 0x2b14 */ DWORD unknown002b14; +/* 0x2b18 */ DWORD unknown002b18; +/* 0x2b1c */ DWORD unknown002b1c; +/* 0x2b20 */ DWORD unknown002b20; +/* 0x2b24 */ DWORD unknown002b24; +/* 0x2b28 */ DWORD unknown002b28; +/* 0x2b2c */ DWORD unknown002b2c; +/* 0x2b30 */ DWORD unknown002b30; +/* 0x2b34 */ DWORD unknown002b34; +/* 0x2b38 */ DWORD unknown002b38; +/* 0x2b3c */ DWORD unknown002b3c; +/* 0x2b40 */ DWORD unknown002b40; +/* 0x2b44 */ DWORD unknown002b44; +/* 0x2b48 */ DWORD unknown002b48; +/* 0x2b4c */ DWORD unknown002b4c; +/* 0x2b50 */ DWORD unknown002b50; +/* 0x2b54 */ DWORD unknown002b54; +/* 0x2b58 */ DWORD unknown002b58; +/* 0x2b5c */ DWORD unknown002b5c; +/* 0x2b60 */ DWORD unknown002b60; +/* 0x2b64 */ DWORD unknown002b64; +/* 0x2b68 */ DWORD unknown002b68; +/* 0x2b6c */ DWORD unknown002b6c; +/* 0x2b70 */ DWORD unknown002b70; +/* 0x2b74 */ DWORD unknown002b74; +/* 0x2b78 */ DWORD unknown002b78; +/* 0x2b7c */ DWORD unknown002b7c; +/* 0x2b80 */ DWORD unknown002b80; +/* 0x2b84 */ DWORD unknown002b84; +/* 0x2b88 */ DWORD unknown002b88; +/* 0x2b8c */ DWORD unknown002b8c; +/* 0x2b90 */ DWORD unknown002b90; +/* 0x2b94 */ DWORD unknown002b94; +/* 0x2b98 */ DWORD unknown002b98; +/* 0x2b9c */ DWORD unknown002b9c; +/* 0x2ba0 */ DWORD unknown002ba0; +/* 0x2ba4 */ DWORD unknown002ba4; +/* 0x2ba8 */ DWORD unknown002ba8; +/* 0x2bac */ DWORD unknown002bac; +/* 0x2bb0 */ DWORD unknown002bb0; +/* 0x2bb4 */ DWORD unknown002bb4; +/* 0x2bb8 */ DWORD unknown002bb8; +/* 0x2bbc */ DWORD unknown002bbc; +/* 0x2bc0 */ DWORD unknown002bc0; +/* 0x2bc4 */ DWORD unknown002bc4; +/* 0x2bc8 */ DWORD unknown002bc8; +/* 0x2bcc */ DWORD unknown002bcc; +/* 0x2bd0 */ DWORD unknown002bd0; +/* 0x2bd4 */ DWORD unknown002bd4; +/* 0x2bd8 */ DWORD unknown002bd8; +/* 0x2bdc */ DWORD unknown002bdc; +/* 0x2be0 */ DWORD unknown002be0; +/* 0x2be4 */ DWORD unknown002be4; +/* 0x2be8 */ DWORD unknown002be8; +/* 0x2bec */ DWORD unknown002bec; +/* 0x2bf0 */ DWORD unknown002bf0; +/* 0x2bf4 */ DWORD unknown002bf4; +/* 0x2bf8 */ DWORD unknown002bf8; +/* 0x2bfc */ DWORD unknown002bfc; + +/* 0x2c00 */ DWORD unknown002c00; +/* 0x2c04 */ DWORD unknown002c04; +/* 0x2c08 */ DWORD unknown002c08; +/* 0x2c0c */ DWORD unknown002c0c; +/* 0x2c10 */ DWORD unknown002c10; +/* 0x2c14 */ DWORD unknown002c14; +/* 0x2c18 */ DWORD unknown002c18; +/* 0x2c1c */ DWORD unknown002c1c; +/* 0x2c20 */ DWORD unknown002c20; +/* 0x2c24 */ DWORD unknown002c24; +/* 0x2c28 */ DWORD unknown002c28; +/* 0x2c2c */ DWORD unknown002c2c; +/* 0x2c30 */ DWORD unknown002c30; +/* 0x2c34 */ DWORD unknown002c34; +/* 0x2c38 */ DWORD unknown002c38; +/* 0x2c3c */ DWORD unknown002c3c; +/* 0x2c40 */ DWORD unknown002c40; +/* 0x2c44 */ DWORD unknown002c44; +/* 0x2c48 */ DWORD unknown002c48; +/* 0x2c4c */ DWORD unknown002c4c; +/* 0x2c50 */ DWORD unknown002c50; +/* 0x2c54 */ DWORD unknown002c54; +/* 0x2c58 */ DWORD unknown002c58; +/* 0x2c5c */ DWORD unknown002c5c; +/* 0x2c60 */ DWORD unknown002c60; +/* 0x2c64 */ DWORD unknown002c64; +/* 0x2c68 */ DWORD unknown002c68; +/* 0x2c6c */ DWORD unknown002c6c; +/* 0x2c70 */ DWORD unknown002c70; +/* 0x2c74 */ DWORD unknown002c74; +/* 0x2c78 */ DWORD unknown002c78; +/* 0x2c7c */ DWORD unknown002c7c; +/* 0x2c80 */ DWORD unknown002c80; +/* 0x2c84 */ DWORD unknown002c84; +/* 0x2c88 */ DWORD unknown002c88; +/* 0x2c8c */ DWORD unknown002c8c; +/* 0x2c90 */ DWORD unknown002c90; +/* 0x2c94 */ DWORD unknown002c94; +/* 0x2c98 */ DWORD unknown002c98; +/* 0x2c9c */ DWORD unknown002c9c; +/* 0x2ca0 */ DWORD unknown002ca0; +/* 0x2ca4 */ DWORD unknown002ca4; +/* 0x2ca8 */ DWORD unknown002ca8; +/* 0x2cac */ DWORD unknown002cac; +/* 0x2cb0 */ DWORD unknown002cb0; +/* 0x2cb4 */ DWORD unknown002cb4; +/* 0x2cb8 */ DWORD unknown002cb8; +/* 0x2cbc */ DWORD unknown002cbc; +/* 0x2cc0 */ DWORD unknown002cc0; +/* 0x2cc4 */ DWORD unknown002cc4; +/* 0x2cc8 */ DWORD unknown002cc8; +/* 0x2ccc */ DWORD unknown002ccc; +/* 0x2cd0 */ DWORD unknown002cd0; +/* 0x2cd4 */ DWORD unknown002cd4; +/* 0x2cd8 */ DWORD unknown002cd8; +/* 0x2cdc */ DWORD unknown002cdc; +/* 0x2ce0 */ DWORD unknown002ce0; +/* 0x2ce4 */ DWORD unknown002ce4; +/* 0x2ce8 */ DWORD unknown002ce8; +/* 0x2cec */ DWORD unknown002cec; +/* 0x2cf0 */ DWORD unknown002cf0; +/* 0x2cf4 */ DWORD unknown002cf4; +/* 0x2cf8 */ DWORD unknown002cf8; +/* 0x2cfc */ DWORD unknown002cfc; + +/* 0x2d00 */ DWORD unknown002d00; +/* 0x2d04 */ DWORD unknown002d04; +/* 0x2d08 */ DWORD unknown002d08; +/* 0x2d0c */ DWORD unknown002d0c; +/* 0x2d10 */ DWORD unknown002d10; +/* 0x2d14 */ DWORD unknown002d14; +/* 0x2d18 */ DWORD unknown002d18; +/* 0x2d1c */ DWORD unknown002d1c; +/* 0x2d20 */ DWORD unknown002d20; +/* 0x2d24 */ DWORD unknown002d24; +/* 0x2d28 */ DWORD unknown002d28; +/* 0x2d2c */ DWORD unknown002d2c; +/* 0x2d30 */ DWORD unknown002d30; +/* 0x2d34 */ DWORD unknown002d34; +/* 0x2d38 */ DWORD unknown002d38; +/* 0x2d3c */ DWORD unknown002d3c; +/* 0x2d40 */ DWORD unknown002d40; +/* 0x2d44 */ DWORD unknown002d44; +/* 0x2d48 */ DWORD unknown002d48; +/* 0x2d4c */ DWORD unknown002d4c; +/* 0x2d50 */ DWORD unknown002d50; +/* 0x2d54 */ DWORD unknown002d54; +/* 0x2d58 */ DWORD unknown002d58; +/* 0x2d5c */ DWORD unknown002d5c; +/* 0x2d60 */ DWORD unknown002d60; +/* 0x2d64 */ DWORD unknown002d64; +/* 0x2d68 */ DWORD unknown002d68; +/* 0x2d6c */ DWORD unknown002d6c; +/* 0x2d70 */ DWORD unknown002d70; +/* 0x2d74 */ DWORD unknown002d74; +/* 0x2d78 */ DWORD unknown002d78; +/* 0x2d7c */ DWORD unknown002d7c; +/* 0x2d80 */ DWORD unknown002d80; +/* 0x2d84 */ DWORD unknown002d84; +/* 0x2d88 */ DWORD unknown002d88; +/* 0x2d8c */ DWORD unknown002d8c; +/* 0x2d90 */ DWORD unknown002d90; +/* 0x2d94 */ DWORD unknown002d94; +/* 0x2d98 */ DWORD unknown002d98; +/* 0x2d9c */ DWORD unknown002d9c; +/* 0x2da0 */ DWORD unknown002da0; +/* 0x2da4 */ DWORD unknown002da4; +/* 0x2da8 */ DWORD unknown002da8; +/* 0x2dac */ DWORD unknown002dac; +/* 0x2db0 */ DWORD unknown002db0; +/* 0x2db4 */ DWORD unknown002db4; +/* 0x2db8 */ DWORD unknown002db8; +/* 0x2dbc */ DWORD unknown002dbc; +/* 0x2dc0 */ DWORD unknown002dc0; +/* 0x2dc4 */ DWORD unknown002dc4; +/* 0x2dc8 */ DWORD unknown002dc8; +/* 0x2dcc */ DWORD unknown002dcc; +/* 0x2dd0 */ DWORD unknown002dd0; +/* 0x2dd4 */ DWORD unknown002dd4; +/* 0x2dd8 */ DWORD unknown002dd8; +/* 0x2ddc */ DWORD unknown002ddc; +/* 0x2de0 */ DWORD unknown002de0; +/* 0x2de4 */ DWORD unknown002de4; +/* 0x2de8 */ DWORD unknown002de8; +/* 0x2dec */ DWORD unknown002dec; +/* 0x2df0 */ DWORD unknown002df0; +/* 0x2df4 */ DWORD unknown002df4; +/* 0x2df8 */ DWORD unknown002df8; +/* 0x2dfc */ DWORD unknown002dfc; + +/* 0x2e00 */ DWORD unknown002e00; +/* 0x2e04 */ DWORD unknown002e04; +/* 0x2e08 */ DWORD unknown002e08; +/* 0x2e0c */ DWORD unknown002e0c; +/* 0x2e10 */ DWORD unknown002e10; +/* 0x2e14 */ DWORD unknown002e14; +/* 0x2e18 */ DWORD unknown002e18; +/* 0x2e1c */ DWORD unknown002e1c; +/* 0x2e20 */ DWORD unknown002e20; +/* 0x2e24 */ DWORD unknown002e24; +/* 0x2e28 */ DWORD unknown002e28; +/* 0x2e2c */ DWORD unknown002e2c; +/* 0x2e30 */ DWORD unknown002e30; +/* 0x2e34 */ DWORD unknown002e34; +/* 0x2e38 */ DWORD unknown002e38; +/* 0x2e3c */ DWORD unknown002e3c; +/* 0x2e40 */ DWORD unknown002e40; +/* 0x2e44 */ DWORD unknown002e44; +/* 0x2e48 */ DWORD unknown002e48; +/* 0x2e4c */ DWORD unknown002e4c; +/* 0x2e50 */ DWORD unknown002e50; +/* 0x2e54 */ DWORD unknown002e54; +/* 0x2e58 */ DWORD unknown002e58; +/* 0x2e5c */ DWORD unknown002e5c; +/* 0x2e60 */ DWORD unknown002e60; +/* 0x2e64 */ DWORD unknown002e64; +/* 0x2e68 */ DWORD unknown002e68; +/* 0x2e6c */ DWORD unknown002e6c; +/* 0x2e70 */ DWORD unknown002e70; +/* 0x2e74 */ DWORD unknown002e74; +/* 0x2e78 */ DWORD unknown002e78; +/* 0x2e7c */ DWORD unknown002e7c; +/* 0x2e80 */ DWORD unknown002e80; +/* 0x2e84 */ DWORD unknown002e84; +/* 0x2e88 */ DWORD unknown002e88; +/* 0x2e8c */ DWORD unknown002e8c; +/* 0x2e90 */ DWORD unknown002e90; +/* 0x2e94 */ DWORD unknown002e94; +/* 0x2e98 */ DWORD unknown002e98; +/* 0x2e9c */ DWORD unknown002e9c; +/* 0x2ea0 */ DWORD unknown002ea0; +/* 0x2ea4 */ DWORD unknown002ea4; +/* 0x2ea8 */ DWORD unknown002ea8; +/* 0x2eac */ DWORD unknown002eac; +/* 0x2eb0 */ DWORD unknown002eb0; +/* 0x2eb4 */ DWORD unknown002eb4; +/* 0x2eb8 */ DWORD unknown002eb8; +/* 0x2ebc */ DWORD unknown002ebc; +/* 0x2ec0 */ DWORD unknown002ec0; +/* 0x2ec4 */ DWORD unknown002ec4; +/* 0x2ec8 */ DWORD unknown002ec8; +/* 0x2ecc */ DWORD unknown002ecc; +/* 0x2ed0 */ DWORD unknown002ed0; +/* 0x2ed4 */ DWORD unknown002ed4; +/* 0x2ed8 */ DWORD unknown002ed8; +/* 0x2edc */ DWORD unknown002edc; +/* 0x2ee0 */ DWORD unknown002ee0; +/* 0x2ee4 */ DWORD unknown002ee4; +/* 0x2ee8 */ DWORD unknown002ee8; +/* 0x2eec */ DWORD unknown002eec; +/* 0x2ef0 */ DWORD unknown002ef0; +/* 0x2ef4 */ DWORD unknown002ef4; +/* 0x2ef8 */ DWORD unknown002ef8; +/* 0x2efc */ DWORD unknown002efc; + +/* 0x2f00 */ DWORD unknown002f00; +/* 0x2f04 */ DWORD unknown002f04; +/* 0x2f08 */ DWORD unknown002f08; +/* 0x2f0c */ DWORD unknown002f0c; +/* 0x2f10 */ DWORD unknown002f10; +/* 0x2f14 */ DWORD unknown002f14; +/* 0x2f18 */ DWORD unknown002f18; +/* 0x2f1c */ DWORD unknown002f1c; +/* 0x2f20 */ DWORD unknown002f20; +/* 0x2f24 */ DWORD unknown002f24; +/* 0x2f28 */ DWORD unknown002f28; +/* 0x2f2c */ DWORD unknown002f2c; +/* 0x2f30 */ DWORD unknown002f30; +/* 0x2f34 */ DWORD unknown002f34; +/* 0x2f38 */ DWORD unknown002f38; +/* 0x2f3c */ DWORD unknown002f3c; +/* 0x2f40 */ DWORD unknown002f40; +/* 0x2f44 */ DWORD unknown002f44; +/* 0x2f48 */ DWORD unknown002f48; +/* 0x2f4c */ DWORD unknown002f4c; +/* 0x2f50 */ DWORD unknown002f50; +/* 0x2f54 */ DWORD unknown002f54; +/* 0x2f58 */ DWORD unknown002f58; +/* 0x2f5c */ DWORD unknown002f5c; +/* 0x2f60 */ DWORD unknown002f60; +/* 0x2f64 */ DWORD unknown002f64; +/* 0x2f68 */ DWORD unknown002f68; +/* 0x2f6c */ DWORD unknown002f6c; +/* 0x2f70 */ DWORD unknown002f70; +/* 0x2f74 */ DWORD unknown002f74; +/* 0x2f78 */ DWORD unknown002f78; +/* 0x2f7c */ DWORD unknown002f7c; +/* 0x2f80 */ DWORD unknown002f80; +/* 0x2f84 */ DWORD unknown002f84; +/* 0x2f88 */ DWORD unknown002f88; +/* 0x2f8c */ DWORD unknown002f8c; +/* 0x2f90 */ DWORD unknown002f90; +/* 0x2f94 */ DWORD unknown002f94; +/* 0x2f98 */ DWORD unknown002f98; +/* 0x2f9c */ DWORD unknown002f9c; +/* 0x2fa0 */ DWORD unknown002fa0; +/* 0x2fa4 */ DWORD unknown002fa4; +/* 0x2fa8 */ DWORD unknown002fa8; +/* 0x2fac */ DWORD unknown002fac; +/* 0x2fb0 */ DWORD unknown002fb0; +/* 0x2fb4 */ DWORD unknown002fb4; +/* 0x2fb8 */ DWORD unknown002fb8; +/* 0x2fbc */ DWORD unknown002fbc; +/* 0x2fc0 */ DWORD unknown002fc0; +/* 0x2fc4 */ DWORD unknown002fc4; +/* 0x2fc8 */ DWORD unknown002fc8; +/* 0x2fcc */ DWORD unknown002fcc; +/* 0x2fd0 */ DWORD unknown002fd0; +/* 0x2fd4 */ DWORD unknown002fd4; +/* 0x2fd8 */ DWORD unknown002fd8; +/* 0x2fdc */ DWORD unknown002fdc; +/* 0x2fe0 */ DWORD unknown002fe0; +/* 0x2fe4 */ DWORD unknown002fe4; +/* 0x2fe8 */ DWORD unknown002fe8; +/* 0x2fec */ DWORD unknown002fec; +/* 0x2ff0 */ DWORD unknown002ff0; +/* 0x2ff4 */ DWORD unknown002ff4; +/* 0x2ff8 */ DWORD unknown002ff8; +/* 0x2ffc */ DWORD unknown002ffc; + +/* 0x3000 */ DWORD unknown003000; +/* 0x3004 */ DWORD unknown003004; +/* 0x3008 */ DWORD unknown003008; +/* 0x300c */ DWORD unknown00300c; +/* 0x3010 */ DWORD unknown003010; +/* 0x3014 */ DWORD unknown003014; +/* 0x3018 */ DWORD unknown003018; +/* 0x301c */ DWORD unknown00301c; +/* 0x3020 */ DWORD unknown003020; +/* 0x3024 */ DWORD unknown003024; +/* 0x3028 */ DWORD unknown003028; +/* 0x302c */ DWORD unknown00302c; +/* 0x3030 */ DWORD unknown003030; +/* 0x3034 */ DWORD unknown003034; +/* 0x3038 */ DWORD unknown003038; +/* 0x303c */ DWORD unknown00303c; +/* 0x3040 */ DWORD unknown003040; +/* 0x3044 */ DWORD unknown003044; +/* 0x3048 */ DWORD unknown003048; +/* 0x304c */ DWORD unknown00304c; +/* 0x3050 */ DWORD unknown003050; +/* 0x3054 */ DWORD unknown003054; +/* 0x3058 */ DWORD unknown003058; +/* 0x305c */ DWORD unknown00305c; +/* 0x3060 */ DWORD unknown003060; +/* 0x3064 */ DWORD unknown003064; +/* 0x3068 */ DWORD unknown003068; +/* 0x306c */ DWORD unknown00306c; +/* 0x3070 */ DWORD unknown003070; +/* 0x3074 */ DWORD unknown003074; +/* 0x3078 */ DWORD unknown003078; +/* 0x307c */ DWORD unknown00307c; +/* 0x3080 */ DWORD unknown003080; +/* 0x3084 */ DWORD unknown003084; +/* 0x3088 */ DWORD unknown003088; +/* 0x308c */ DWORD unknown00308c; +/* 0x3090 */ DWORD unknown003090; +/* 0x3094 */ DWORD unknown003094; +/* 0x3098 */ DWORD unknown003098; +/* 0x309c */ DWORD unknown00309c; +/* 0x30a0 */ DWORD unknown0030a0; +/* 0x30a4 */ DWORD unknown0030a4; +/* 0x30a8 */ DWORD unknown0030a8; +/* 0x30ac */ DWORD unknown0030ac; +/* 0x30b0 */ DWORD unknown0030b0; +/* 0x30b4 */ DWORD unknown0030b4; +/* 0x30b8 */ DWORD unknown0030b8; +/* 0x30bc */ DWORD unknown0030bc; +/* 0x30c0 */ DWORD unknown0030c0; +/* 0x30c4 */ DWORD unknown0030c4; +/* 0x30c8 */ DWORD unknown0030c8; +/* 0x30cc */ DWORD unknown0030cc; +/* 0x30d0 */ DWORD unknown0030d0; +/* 0x30d4 */ DWORD unknown0030d4; +/* 0x30d8 */ DWORD unknown0030d8; +/* 0x30dc */ DWORD unknown0030dc; +/* 0x30e0 */ DWORD unknown0030e0; +/* 0x30e4 */ DWORD unknown0030e4; +/* 0x30e8 */ DWORD unknown0030e8; +/* 0x30ec */ DWORD unknown0030ec; +/* 0x30f0 */ DWORD unknown0030f0; +/* 0x30f4 */ DWORD unknown0030f4; +/* 0x30f8 */ DWORD unknown0030f8; +/* 0x30fc */ DWORD unknown0030fc; + +/* 0x3100 */ DWORD unknown003100; +/* 0x3104 */ DWORD unknown003104; +/* 0x3108 */ DWORD unknown003108; +/* 0x310c */ DWORD unknown00310c; +/* 0x3110 */ DWORD unknown003110; +/* 0x3114 */ DWORD unknown003114; +/* 0x3118 */ DWORD unknown003118; +/* 0x311c */ DWORD unknown00311c; +/* 0x3120 */ DWORD unknown003120; +/* 0x3124 */ DWORD unknown003124; +/* 0x3128 */ DWORD unknown003128; +/* 0x312c */ DWORD unknown00312c; +/* 0x3130 */ DWORD unknown003130; +/* 0x3134 */ DWORD unknown003134; +/* 0x3138 */ DWORD unknown003138; +/* 0x313c */ DWORD unknown00313c; +/* 0x3140 */ DWORD unknown003140; +/* 0x3144 */ DWORD unknown003144; +/* 0x3148 */ DWORD unknown003148; +/* 0x314c */ DWORD unknown00314c; +/* 0x3150 */ DWORD unknown003150; +/* 0x3154 */ DWORD unknown003154; +/* 0x3158 */ DWORD unknown003158; +/* 0x315c */ DWORD unknown00315c; +/* 0x3160 */ DWORD unknown003160; +/* 0x3164 */ DWORD unknown003164; +/* 0x3168 */ DWORD unknown003168; +/* 0x316c */ DWORD unknown00316c; +/* 0x3170 */ DWORD unknown003170; +/* 0x3174 */ DWORD unknown003174; +/* 0x3178 */ DWORD unknown003178; +/* 0x317c */ DWORD unknown00317c; +/* 0x3180 */ DWORD unknown003180; +/* 0x3184 */ DWORD unknown003184; +/* 0x3188 */ DWORD unknown003188; +/* 0x318c */ DWORD unknown00318c; +/* 0x3190 */ DWORD unknown003190; +/* 0x3194 */ DWORD unknown003194; +/* 0x3198 */ DWORD unknown003198; +/* 0x319c */ DWORD unknown00319c; +/* 0x31a0 */ DWORD unknown0031a0; +/* 0x31a4 */ DWORD unknown0031a4; +/* 0x31a8 */ DWORD unknown0031a8; +/* 0x31ac */ DWORD unknown0031ac; +/* 0x31b0 */ DWORD unknown0031b0; +/* 0x31b4 */ DWORD unknown0031b4; +/* 0x31b8 */ DWORD unknown0031b8; +/* 0x31bc */ DWORD unknown0031bc; +/* 0x31c0 */ DWORD unknown0031c0; +/* 0x31c4 */ DWORD unknown0031c4; +/* 0x31c8 */ DWORD unknown0031c8; +/* 0x31cc */ DWORD unknown0031cc; +/* 0x31d0 */ DWORD unknown0031d0; +/* 0x31d4 */ DWORD unknown0031d4; +/* 0x31d8 */ DWORD unknown0031d8; +/* 0x31dc */ DWORD unknown0031dc; +/* 0x31e0 */ DWORD unknown0031e0; +/* 0x31e4 */ DWORD unknown0031e4; +/* 0x31e8 */ DWORD unknown0031e8; +/* 0x31ec */ DWORD unknown0031ec; +/* 0x31f0 */ DWORD unknown0031f0; +/* 0x31f4 */ DWORD unknown0031f4; +/* 0x31f8 */ DWORD unknown0031f8; +/* 0x31fc */ DWORD unknown0031fc; + +/* 0x3200 */ DWORD unknown003200; +/* 0x3204 */ DWORD unknown003204; +/* 0x3208 */ DWORD unknown003208; +/* 0x320c */ DWORD unknown00320c; +/* 0x3210 */ DWORD unknown003210; +/* 0x3214 */ DWORD unknown003214; +/* 0x3218 */ DWORD unknown003218; +/* 0x321c */ DWORD unknown00321c; +/* 0x3220 */ DWORD unknown003220; +/* 0x3224 */ DWORD unknown003224; +/* 0x3228 */ DWORD unknown003228; +/* 0x322c */ DWORD unknown00322c; +/* 0x3230 */ DWORD unknown003230; +/* 0x3234 */ DWORD unknown003234; +/* 0x3238 */ DWORD unknown003238; +/* 0x323c */ DWORD unknown00323c; +/* 0x3240 */ DWORD unknown003240; +/* 0x3244 */ DWORD unknown003244; +/* 0x3248 */ DWORD unknown003248; +/* 0x324c */ DWORD unknown00324c; +/* 0x3250 */ DWORD unknown003250; +/* 0x3254 */ DWORD unknown003254; +/* 0x3258 */ DWORD unknown003258; +/* 0x325c */ DWORD unknown00325c; +/* 0x3260 */ DWORD unknown003260; +/* 0x3264 */ DWORD unknown003264; +/* 0x3268 */ DWORD unknown003268; +/* 0x326c */ DWORD unknown00326c; +/* 0x3270 */ DWORD unknown003270; +/* 0x3274 */ DWORD unknown003274; +/* 0x3278 */ DWORD unknown003278; +/* 0x327c */ DWORD unknown00327c; +/* 0x3280 */ DWORD unknown003280; +/* 0x3284 */ DWORD unknown003284; +/* 0x3288 */ DWORD unknown003288; +/* 0x328c */ DWORD unknown00328c; +/* 0x3290 */ DWORD unknown003290; +/* 0x3294 */ DWORD unknown003294; +/* 0x3298 */ DWORD unknown003298; +/* 0x329c */ DWORD unknown00329c; +/* 0x32a0 */ DWORD unknown0032a0; +/* 0x32a4 */ DWORD unknown0032a4; +/* 0x32a8 */ DWORD unknown0032a8; +/* 0x32ac */ DWORD unknown0032ac; +/* 0x32b0 */ DWORD unknown0032b0; +/* 0x32b4 */ DWORD unknown0032b4; +/* 0x32b8 */ DWORD unknown0032b8; +/* 0x32bc */ DWORD unknown0032bc; +/* 0x32c0 */ DWORD unknown0032c0; +/* 0x32c4 */ DWORD unknown0032c4; +/* 0x32c8 */ DWORD unknown0032c8; +/* 0x32cc */ DWORD unknown0032cc; +/* 0x32d0 */ DWORD unknown0032d0; +/* 0x32d4 */ DWORD unknown0032d4; +/* 0x32d8 */ DWORD unknown0032d8; +/* 0x32dc */ DWORD unknown0032dc; +/* 0x32e0 */ DWORD unknown0032e0; +/* 0x32e4 */ DWORD unknown0032e4; +/* 0x32e8 */ DWORD unknown0032e8; +/* 0x32ec */ DWORD unknown0032ec; +/* 0x32f0 */ DWORD unknown0032f0; +/* 0x32f4 */ DWORD unknown0032f4; +/* 0x32f8 */ DWORD unknown0032f8; +/* 0x32fc */ DWORD unknown0032fc; + +/* 0x3300 */ DWORD unknown003300; +/* 0x3304 */ DWORD unknown003304; +/* 0x3308 */ DWORD unknown003308; +/* 0x330c */ DWORD unknown00330c; +/* 0x3310 */ DWORD unknown003310; +/* 0x3314 */ DWORD unknown003314; +/* 0x3318 */ DWORD unknown003318; +/* 0x331c */ DWORD unknown00331c; +/* 0x3320 */ DWORD unknown003320; +/* 0x3324 */ DWORD unknown003324; +/* 0x3328 */ DWORD unknown003328; +/* 0x332c */ DWORD unknown00332c; +} D3D9HALDEVICE, FAR *LPD3D9HALDEVICE; + +#endif // _D3D9_HALDEVICE_H_ diff --git a/reactos/dll/directx/d3d9/d3d9_impl.c b/reactos/dll/directx/d3d9/d3d9_impl.c index 9bb2109883b..b593383c4a3 100644 --- a/reactos/dll/directx/d3d9/d3d9_impl.c +++ b/reactos/dll/directx/d3d9/d3d9_impl.c @@ -18,9 +18,9 @@ #define UNLOCK_D3D9() LeaveCriticalSection(&This->d3d9_cs); /* Convert a IDirect3D9 pointer safely to the internal implementation struct */ -static LPDIRECT3D9_INT impl_from_IDirect3D9(LPDIRECT3D9 iface) +static LPDIRECT3D9_INT IDirect3D9ToImpl(LPDIRECT3D9 iface) { - if (IsBadWritePtr(iface, sizeof(LPDIRECT3D9_INT))) + if (NULL == iface) return NULL; return (LPDIRECT3D9_INT)((ULONG_PTR)iface - FIELD_OFFSET(DIRECT3D9_INT, lpVtbl)); @@ -29,7 +29,7 @@ static LPDIRECT3D9_INT impl_from_IDirect3D9(LPDIRECT3D9 iface) /* IDirect3D9: IUnknown implementation */ static HRESULT WINAPI IDirect3D9Impl_QueryInterface(LPDIRECT3D9 iface, REFIID riid, LPVOID* ppvObject) { - LPDIRECT3D9_INT This = impl_from_IDirect3D9(iface); + LPDIRECT3D9_INT This = IDirect3D9ToImpl(iface); if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirect3D9)) { @@ -44,7 +44,7 @@ static HRESULT WINAPI IDirect3D9Impl_QueryInterface(LPDIRECT3D9 iface, REFIID ri static ULONG WINAPI IDirect3D9Impl_AddRef(LPDIRECT3D9 iface) { - LPDIRECT3D9_INT This = impl_from_IDirect3D9(iface); + LPDIRECT3D9_INT This = IDirect3D9ToImpl(iface); ULONG ref = InterlockedIncrement(&This->lRefCnt); return ref; @@ -52,7 +52,7 @@ static ULONG WINAPI IDirect3D9Impl_AddRef(LPDIRECT3D9 iface) static ULONG WINAPI IDirect3D9Impl_Release(LPDIRECT3D9 iface) { - LPDIRECT3D9_INT This = impl_from_IDirect3D9(iface); + LPDIRECT3D9_INT This = IDirect3D9ToImpl(iface); ULONG ref = InterlockedDecrement(&This->lRefCnt); if (ref == 0) @@ -91,7 +91,7 @@ static UINT WINAPI IDirect3D9Impl_GetAdapterCount(LPDIRECT3D9 iface) { UINT NumDisplayAdapters; - LPDIRECT3D9_INT This = impl_from_IDirect3D9(iface); + LPDIRECT3D9_INT This = IDirect3D9ToImpl(iface); LOCK_D3D9(); NumDisplayAdapters = This->NumDisplayAdapters; @@ -130,7 +130,7 @@ static UINT WINAPI IDirect3D9Impl_GetAdapterCount(LPDIRECT3D9 iface) HRESULT WINAPI IDirect3D9Impl_GetAdapterIdentifier(LPDIRECT3D9 iface, UINT Adapter, DWORD Flags, D3DADAPTER_IDENTIFIER9* pIdentifier) { - LPDIRECT3D9_INT This = impl_from_IDirect3D9(iface); + LPDIRECT3D9_INT This = IDirect3D9ToImpl(iface); LOCK_D3D9(); if (Adapter >= This->NumDisplayAdapters) @@ -147,7 +147,7 @@ HRESULT WINAPI IDirect3D9Impl_GetAdapterIdentifier(LPDIRECT3D9 iface, UINT Adapt return D3DERR_INVALIDCALL; } - if (IsBadWritePtr(pIdentifier, sizeof(D3DADAPTER_IDENTIFIER9))) + if (NULL == pIdentifier) { DPRINT1("Invalid pIdentifier parameter specified"); UNLOCK_D3D9(); @@ -193,7 +193,7 @@ static UINT WINAPI IDirect3D9Impl_GetAdapterModeCount(LPDIRECT3D9 iface, UINT Ad { UINT AdapterModeCount; - LPDIRECT3D9_INT This = impl_from_IDirect3D9(iface); + LPDIRECT3D9_INT This = IDirect3D9ToImpl(iface); LOCK_D3D9(); if (Adapter >= This->NumDisplayAdapters) @@ -258,7 +258,7 @@ static HRESULT WINAPI IDirect3D9Impl_EnumAdapterModes(LPDIRECT3D9 iface, UINT Ad UINT Mode, D3DDISPLAYMODE* pMode) { const D3DDISPLAYMODE* pMatchingDisplayFormat; - LPDIRECT3D9_INT This = impl_from_IDirect3D9(iface); + LPDIRECT3D9_INT This = IDirect3D9ToImpl(iface); LOCK_D3D9(); if (Adapter >= This->NumDisplayAdapters) @@ -268,7 +268,7 @@ static HRESULT WINAPI IDirect3D9Impl_EnumAdapterModes(LPDIRECT3D9 iface, UINT Ad return D3DERR_INVALIDCALL; } - if (IsBadWritePtr(pMode, sizeof(D3DDISPLAYMODE))) + if (NULL == pMode) { DPRINT1("Invalid pMode parameter specified"); UNLOCK_D3D9(); @@ -329,7 +329,7 @@ static HRESULT WINAPI IDirect3D9Impl_EnumAdapterModes(LPDIRECT3D9 iface, UINT Ad */ static HRESULT WINAPI IDirect3D9Impl_GetAdapterDisplayMode(LPDIRECT3D9 iface, UINT Adapter, D3DDISPLAYMODE* pMode) { - LPDIRECT3D9_INT This = impl_from_IDirect3D9(iface); + LPDIRECT3D9_INT This = IDirect3D9ToImpl(iface); LOCK_D3D9(); if (Adapter >= This->NumDisplayAdapters) @@ -339,7 +339,7 @@ static HRESULT WINAPI IDirect3D9Impl_GetAdapterDisplayMode(LPDIRECT3D9 iface, UI return D3DERR_INVALIDCALL; } - if (IsBadWritePtr(pMode, sizeof(D3DDISPLAYMODE))) + if (NULL == pMode) { DPRINT1("Invalid pMode parameter specified"); UNLOCK_D3D9(); @@ -393,7 +393,7 @@ static HRESULT WINAPI IDirect3D9Impl_CheckDeviceType(LPDIRECT3D9 iface, UINT Ada { HRESULT hResult; - LPDIRECT3D9_INT This = impl_from_IDirect3D9(iface); + LPDIRECT3D9_INT This = IDirect3D9ToImpl(iface); LOCK_D3D9(); if (Adapter >= This->NumDisplayAdapters) @@ -493,7 +493,7 @@ static HRESULT WINAPI IDirect3D9Impl_CheckDeviceFormat(LPDIRECT3D9 iface, UINT A BOOL bIsTextureRType = FALSE; HRESULT hResult; - LPDIRECT3D9_INT This = impl_from_IDirect3D9(iface); + LPDIRECT3D9_INT This = IDirect3D9ToImpl(iface); LOCK_D3D9(); if (Adapter >= This->NumDisplayAdapters) @@ -687,7 +687,7 @@ static HRESULT WINAPI IDirect3D9Impl_CheckDepthStencilMatch(LPDIRECT3D9 iface, U { HRESULT hResult; - LPDIRECT3D9_INT This = impl_from_IDirect3D9(iface); + LPDIRECT3D9_INT This = IDirect3D9ToImpl(iface); LOCK_D3D9(); if (Adapter >= This->NumDisplayAdapters) @@ -756,7 +756,7 @@ static HRESULT WINAPI IDirect3D9Impl_CheckDeviceFormatConversion(LPDIRECT3D9 ifa D3DFORMAT SourceFormat, D3DFORMAT TargetFormat) { HRESULT hResult; - LPDIRECT3D9_INT This = impl_from_IDirect3D9(iface); + LPDIRECT3D9_INT This = IDirect3D9ToImpl(iface); LOCK_D3D9(); if (Adapter >= This->NumDisplayAdapters) @@ -827,7 +827,7 @@ static HRESULT WINAPI IDirect3D9Impl_CheckDeviceFormatConversion(LPDIRECT3D9 ifa static HRESULT WINAPI IDirect3D9Impl_GetDeviceCaps(LPDIRECT3D9 iface, UINT Adapter, D3DDEVTYPE DeviceType, D3DCAPS9* pCaps) { HRESULT hResult; - LPDIRECT3D9_INT This = impl_from_IDirect3D9(iface); + LPDIRECT3D9_INT This = IDirect3D9ToImpl(iface); LOCK_D3D9(); if (Adapter >= This->NumDisplayAdapters) @@ -837,7 +837,7 @@ static HRESULT WINAPI IDirect3D9Impl_GetDeviceCaps(LPDIRECT3D9 iface, UINT Adapt return D3DERR_INVALIDCALL; } - if (IsBadWritePtr(pCaps, sizeof(D3DCAPS9))) + if (NULL == pCaps) { DPRINT1("Invalid pCaps parameter specified"); UNLOCK_D3D9(); @@ -873,7 +873,7 @@ static HMONITOR WINAPI IDirect3D9Impl_GetAdapterMonitor(LPDIRECT3D9 iface, UINT { HMONITOR hAdapterMonitor = NULL; - LPDIRECT3D9_INT This = impl_from_IDirect3D9(iface); + LPDIRECT3D9_INT This = IDirect3D9ToImpl(iface); LOCK_D3D9(); if (Adapter < This->NumDisplayAdapters) @@ -937,7 +937,7 @@ static HRESULT WINAPI IDirect3D9Impl_CreateDevice(LPDIRECT3D9 iface, UINT Adapte DWORD NumAdaptersToCreate; HRESULT Ret; - LPDIRECT3D9_INT This = impl_from_IDirect3D9(iface); + LPDIRECT3D9_INT This = IDirect3D9ToImpl(iface); LOCK_D3D9(); if (Adapter >= This->NumDisplayAdapters) @@ -1005,7 +1005,7 @@ static HRESULT WINAPI IDirect3D9Impl_CreateDevice(LPDIRECT3D9 iface, UINT Adapte return D3DERR_INVALIDCALL; } - if (IsBadWritePtr(ppReturnedDeviceInterface, sizeof(IDirect3DDevice9*))) + if (NULL == ppReturnedDeviceInterface) { DPRINT1("Invalid ppReturnedDeviceInterface parameter specified"); UNLOCK_D3D9(); diff --git a/reactos/dll/directx/d3d9/d3d9_puredevice.c b/reactos/dll/directx/d3d9/d3d9_puredevice.c new file mode 100644 index 00000000000..a70aceeecea --- /dev/null +++ b/reactos/dll/directx/d3d9/d3d9_puredevice.c @@ -0,0 +1,859 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS ReactX + * FILE: dll/directx/d3d9/d3d9_puredevice.c + * PURPOSE: d3d9.dll internal device functions + * PROGRAMERS: Gregor Gullwi + */ +#include "d3d9_puredevice.h" +#include + +#define LOCK_D3DDEVICE9() if (This->bLockDevice) EnterCriticalSection(&This->CriticalSection); +#define UNLOCK_D3DDEVICE9() if (This->bLockDevice) LeaveCriticalSection(&This->CriticalSection); + +/* Convert a IDirect3D9 pointer safely to the internal implementation struct */ +/*static LPD3D9PUREDEVICE IDirect3DDevice9ToImpl(LPDIRECT3DDEVICE9 iface) +{ + if (NULL == iface) + return NULL; + + return (LPD3D9PUREDEVICE)((ULONG_PTR)iface - FIELD_OFFSET(D3D9PUREDEVICE, BaseDevice.lpVtbl)); +}*/ + +/* IDirect3DDevice9 public interface */ +HRESULT WINAPI IDirect3DDevice9Pure_SetRenderTarget(LPDIRECT3DDEVICE9 iface, DWORD RenderTargetIndex, IDirect3DSurface9* pRenderTarget) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_GetRenderTarget(LPDIRECT3DDEVICE9 iface, DWORD RenderTargetIndex,IDirect3DSurface9** ppRenderTarget) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetDepthStencilSurface(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9* pNewZStencil) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_GetDepthStencilSurface(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9** ppZStencilSurface) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_BeginScene(LPDIRECT3DDEVICE9 iface) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_EndScene(LPDIRECT3DDEVICE9 iface) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_Clear(LPDIRECT3DDEVICE9 iface, DWORD Count, CONST D3DRECT* pRects, DWORD Flags, D3DCOLOR Color, float Z, DWORD Stencil) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetTransform(LPDIRECT3DDEVICE9 iface, D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* pMatrix) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_GetTransform(LPDIRECT3DDEVICE9 iface, D3DTRANSFORMSTATETYPE State, D3DMATRIX* pMatrix) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_MultiplyTransform(LPDIRECT3DDEVICE9 iface, D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* pMatrix) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetViewport(LPDIRECT3DDEVICE9 iface, CONST D3DVIEWPORT9* pViewport) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_GetViewport(LPDIRECT3DDEVICE9 iface, D3DVIEWPORT9* pViewport) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetMaterial(LPDIRECT3DDEVICE9 iface, CONST D3DMATERIAL9* pMaterial) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_GetMaterial(LPDIRECT3DDEVICE9 iface, D3DMATERIAL9* pMaterial) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetLight(LPDIRECT3DDEVICE9 iface, DWORD Index, CONST D3DLIGHT9* pLight) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_GetLight(LPDIRECT3DDEVICE9 iface, DWORD Index, D3DLIGHT9* pLight) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_LightEnable(LPDIRECT3DDEVICE9 iface, DWORD Index, BOOL Enable) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_GetLightEnable(LPDIRECT3DDEVICE9 iface, DWORD Index, BOOL* pEnable) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetClipPlane(LPDIRECT3DDEVICE9 iface, DWORD Index, CONST float* pPlane) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_GetClipPlane(LPDIRECT3DDEVICE9 iface, DWORD Index, float* pPlane) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetRenderState(LPDIRECT3DDEVICE9 iface, D3DRENDERSTATETYPE State, DWORD Value) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_GetRenderState(LPDIRECT3DDEVICE9 iface, D3DRENDERSTATETYPE State, DWORD* pValue) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_CreateStateBlock(LPDIRECT3DDEVICE9 iface, D3DSTATEBLOCKTYPE Type, IDirect3DStateBlock9** ppSB) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_BeginStateBlock(LPDIRECT3DDEVICE9 iface) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_EndStateBlock(LPDIRECT3DDEVICE9 iface, IDirect3DStateBlock9** ppSB) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetClipStatus(LPDIRECT3DDEVICE9 iface, CONST D3DCLIPSTATUS9* pClipStatus) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_GetClipStatus(LPDIRECT3DDEVICE9 iface, D3DCLIPSTATUS9* pClipStatus) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_GetTexture(LPDIRECT3DDEVICE9 iface, DWORD Stage, IDirect3DBaseTexture9** ppTexture) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetTexture(LPDIRECT3DDEVICE9 iface, DWORD Stage, IDirect3DBaseTexture9* pTexture) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_GetTextureStageState(LPDIRECT3DDEVICE9 iface, DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD* pValue) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetTextureStageState(LPDIRECT3DDEVICE9 iface, DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD Value) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_GetSamplerState(LPDIRECT3DDEVICE9 iface, DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD* pValue) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetSamplerState(LPDIRECT3DDEVICE9 iface, DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD Value) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_ValidateDevice(LPDIRECT3DDEVICE9 iface, DWORD* pNumPasses) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetPaletteEntries(LPDIRECT3DDEVICE9 iface, UINT PaletteNumber, CONST PALETTEENTRY* pEntries) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_GetPaletteEntries(LPDIRECT3DDEVICE9 iface, UINT PaletteNumber, PALETTEENTRY* pEntries) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetCurrentTexturePalette(LPDIRECT3DDEVICE9 iface, UINT PaletteNumber) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_GetCurrentTexturePalette(LPDIRECT3DDEVICE9 iface, UINT* pPaletteNumber) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetScissorRect(LPDIRECT3DDEVICE9 iface, CONST RECT* pRect) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_GetScissorRect(LPDIRECT3DDEVICE9 iface, RECT* pRect) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetSoftwareVertexProcessing(LPDIRECT3DDEVICE9 iface, BOOL bSoftware) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +BOOL WINAPI IDirect3DDevice9Pure_GetSoftwareVertexProcessing(LPDIRECT3DDEVICE9 iface) +{ + UNIMPLEMENTED + + return TRUE; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetNPatchMode(LPDIRECT3DDEVICE9 iface, float nSegments) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +float WINAPI IDirect3DDevice9Pure_GetNPatchMode(LPDIRECT3DDEVICE9 iface) +{ + UNIMPLEMENTED + + return 0.0f; +} + +HRESULT WINAPI IDirect3DDevice9Pure_DrawPrimitive(LPDIRECT3DDEVICE9 iface, D3DPRIMITIVETYPE PrimitiveType, UINT StartVertex, UINT PrimitiveCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_DrawIndexedPrimitive(LPDIRECT3DDEVICE9 iface, D3DPRIMITIVETYPE PrimitiveType, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_DrawPrimitiveUP(LPDIRECT3DDEVICE9 iface, D3DPRIMITIVETYPE PrimitiveType, UINT PrimitiveCount, CONST void* pVertexStreamZeroData, UINT VertexStreamZeroStride) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_DrawIndexedPrimitiveUP(LPDIRECT3DDEVICE9 iface, D3DPRIMITIVETYPE PrimitiveType, UINT MinVertexIndex, UINT NumVertices, UINT PrimitiveCount, CONST void* pIndexData, D3DFORMAT IndexDataFormat, CONST void* pVertexStreamZeroData, UINT VertexStreamZeroStride) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_ProcessVertices(LPDIRECT3DDEVICE9 iface, UINT SrcStartIndex, UINT DestIndex, UINT VertexCount, IDirect3DVertexBuffer9* pDestBuffer, IDirect3DVertexDeclaration9* pVertexDecl, DWORD Flags) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_CreateVertexDeclaration(LPDIRECT3DDEVICE9 iface, CONST D3DVERTEXELEMENT9* pVertexElements, IDirect3DVertexDeclaration9** ppDecl) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetVertexDeclaration(LPDIRECT3DDEVICE9 iface, IDirect3DVertexDeclaration9* pDecl) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_GetVertexDeclaration(LPDIRECT3DDEVICE9 iface, IDirect3DVertexDeclaration9** ppDecl) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetFVF(LPDIRECT3DDEVICE9 iface, DWORD FVF) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_GetFVF(LPDIRECT3DDEVICE9 iface, DWORD* pFVF) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_CreateVertexShader(LPDIRECT3DDEVICE9 iface, CONST DWORD* pFunction, IDirect3DVertexShader9** ppShader) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetVertexShader(LPDIRECT3DDEVICE9 iface, IDirect3DVertexShader9* pShader) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_GetVertexShader(LPDIRECT3DDEVICE9 iface, IDirect3DVertexShader9** ppShader) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetVertexShaderConstantF(LPDIRECT3DDEVICE9 iface, UINT StartRegister, CONST float* pConstantData, UINT Vector4fCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_GetVertexShaderConstantF(LPDIRECT3DDEVICE9 iface, UINT StartRegister, float* pConstantData, UINT Vector4fCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetVertexShaderConstantI(LPDIRECT3DDEVICE9 iface, UINT StartRegister, CONST int* pConstantData, UINT Vector4iCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_GetVertexShaderConstantI(LPDIRECT3DDEVICE9 iface, UINT StartRegister, int* pConstantData, UINT Vector4iCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetVertexShaderConstantB(LPDIRECT3DDEVICE9 iface, UINT StartRegister, CONST BOOL* pConstantData, UINT BoolCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_GetVertexShaderConstantB(LPDIRECT3DDEVICE9 iface, UINT StartRegister, BOOL* pConstantData, UINT BoolCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetStreamSource(LPDIRECT3DDEVICE9 iface, UINT StreamNumber, IDirect3DVertexBuffer9* pStreamData, UINT OffsetInBytes, UINT Stride) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_GetStreamSource(LPDIRECT3DDEVICE9 iface, UINT StreamNumber, IDirect3DVertexBuffer9** ppStreamData, UINT* pOffsetInBytes, UINT* pStride) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetStreamSourceFreq(LPDIRECT3DDEVICE9 iface, UINT StreamNumber,UINT Setting) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_GetStreamSourceFreq(LPDIRECT3DDEVICE9 iface, UINT StreamNumber, UINT* pSetting) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetIndices(LPDIRECT3DDEVICE9 iface, IDirect3DIndexBuffer9* pIndexData) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_GetIndices(LPDIRECT3DDEVICE9 iface, IDirect3DIndexBuffer9** ppIndexData) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_CreatePixelShader(LPDIRECT3DDEVICE9 iface, CONST DWORD* pFunction, IDirect3DPixelShader9** ppShader) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetPixelShader(LPDIRECT3DDEVICE9 iface, IDirect3DPixelShader9* pShader) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_GetPixelShader(LPDIRECT3DDEVICE9 iface, IDirect3DPixelShader9** ppShader) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetPixelShaderConstantF(LPDIRECT3DDEVICE9 iface, UINT StartRegister, CONST float* pConstantData, UINT Vector4fCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_GetPixelShaderConstantF(LPDIRECT3DDEVICE9 iface, UINT StartRegister, float* pConstantData, UINT Vector4fCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetPixelShaderConstantI(LPDIRECT3DDEVICE9 iface, UINT StartRegister, CONST int* pConstantData, UINT Vector4iCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_GetPixelShaderConstantI(LPDIRECT3DDEVICE9 iface, UINT StartRegister, int* pConstantData, UINT Vector4iCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetPixelShaderConstantB(LPDIRECT3DDEVICE9 iface, UINT StartRegister, CONST BOOL* pConstantData, UINT BoolCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_GetPixelShaderConstantB(LPDIRECT3DDEVICE9 iface, UINT StartRegister, BOOL* pConstantData, UINT BoolCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_DrawRectPatch(LPDIRECT3DDEVICE9 iface, UINT Handle, CONST float* pNumSegs, CONST D3DRECTPATCH_INFO* pRectPatchInfo) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_DrawTriPatch(LPDIRECT3DDEVICE9 iface, UINT Handle, CONST float* pNumSegs, CONST D3DTRIPATCH_INFO* pTriPatchInfo) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_DeletePatch(LPDIRECT3DDEVICE9 iface, UINT Handle) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_CreateQuery(LPDIRECT3DDEVICE9 iface, D3DQUERYTYPE Type, IDirect3DQuery9** ppQuery) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +/* IDirect3DDevice9 private interface */ +HRESULT WINAPI IDirect3DDevice9Pure_SetRenderStateWorker(LPDIRECT3DDEVICE9 iface, D3DRENDERSTATETYPE State, DWORD Value) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetTextureStageStateInt(LPDIRECT3DDEVICE9 iface, DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD Value) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetSamplerStateInt(LPDIRECT3DDEVICE9 iface, DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD Value) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetMaterialInt(LPDIRECT3DDEVICE9 iface, CONST D3DMATERIAL9* pMaterial) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetVertexShaderInt(LPDIRECT3DDEVICE9 iface, IDirect3DVertexShader9* pShader) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetVertexShaderConstantFInt(LPDIRECT3DDEVICE9 iface, UINT StartRegister,CONST float* pConstantData,UINT Vector4fCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetVertexShaderConstantIInt(LPDIRECT3DDEVICE9 iface, UINT StartRegister,CONST int* pConstantData,UINT Vector4iCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetVertexShaderConstantBInt(LPDIRECT3DDEVICE9 iface, UINT StartRegister,CONST BOOL* pConstantData,UINT BoolCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetPixelShaderInt(LPDIRECT3DDEVICE9 iface, IDirect3DPixelShader9* pShader) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetPixelShaderConstantFInt(LPDIRECT3DDEVICE9 iface, UINT StartRegister,CONST float* pConstantData,UINT Vector4fCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetPixelShaderConstantIInt(LPDIRECT3DDEVICE9 iface, UINT StartRegister,CONST int* pConstantData,UINT Vector4iCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetPixelShaderConstantBInt(LPDIRECT3DDEVICE9 iface, UINT StartRegister,CONST BOOL* pConstantData,UINT BoolCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetFVFInt(LPDIRECT3DDEVICE9 iface, DWORD FVF) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetTextureInt(LPDIRECT3DDEVICE9 iface, DWORD Stage,IDirect3DBaseTexture9* pTexture) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetIndicesInt(LPDIRECT3DDEVICE9 iface, IDirect3DIndexBuffer9* pIndexData) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetStreamSourceInt(LPDIRECT3DDEVICE9 iface, UINT StreamNumber,IDirect3DVertexBuffer9* pStreamData,UINT OffsetInBytes,UINT Stride) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetStreamSourceFreqInt(LPDIRECT3DDEVICE9 iface, UINT StreamNumber,UINT Setting) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +VOID WINAPI IDirect3DDevice9Pure_UpdateRenderState(LPDIRECT3DDEVICE9 iface, DWORD Unknown1, DWORD Unknown2) +{ + UNIMPLEMENTED +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetTransformInt(LPDIRECT3DDEVICE9 iface, D3DTRANSFORMSTATETYPE State,CONST D3DMATRIX* pMatrix) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_MultiplyTransformInt(LPDIRECT3DDEVICE9 iface, D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* pMatrix) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetClipPlaneInt(LPDIRECT3DDEVICE9 iface, DWORD Index, CONST float* pPlane) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +VOID WINAPI IDirect3DDevice9Pure_UpdateDriverState(LPDIRECT3DDEVICE9 iface) +{ + UNIMPLEMENTED +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetViewportInt(LPDIRECT3DDEVICE9 iface, CONST D3DVIEWPORT9* pViewport) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +VOID WINAPI IDirect3DDevice9Pure_SetStreamSourceWorker(LPDIRECT3DDEVICE9 iface, LPVOID UnknownStreamData) +{ + UNIMPLEMENTED +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetPixelShaderConstantFWorker(LPDIRECT3DDEVICE9 iface, UINT StartRegister, CONST float* pConstantData, UINT Vector4fCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetPixelShaderConstantIWorker(LPDIRECT3DDEVICE9 iface, UINT StartRegister, CONST int* pConstantData, UINT Vector4iCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetPixelShaderConstantBWorker(LPDIRECT3DDEVICE9 iface, UINT StartRegister, CONST BOOL* pConstantData, UINT BoolCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +VOID WINAPI IDirect3DDevice9Pure_DrawPrimitiveWorker(LPDIRECT3DDEVICE9 iface, D3DPRIMITIVETYPE PrimitiveType, UINT StartVertex, UINT PrimitiveCount) +{ + UNIMPLEMENTED +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetLightInt(LPDIRECT3DDEVICE9 iface, DWORD Index, CONST D3DLIGHT9* pLight) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_LightEnableInt(LPDIRECT3DDEVICE9 iface, DWORD Index, BOOL Enable) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_SetRenderStateInt(LPDIRECT3DDEVICE9 iface, D3DRENDERSTATETYPE State, DWORD Value) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_DrawPrimitiveUPInt(LPDIRECT3DDEVICE9 iface, D3DPRIMITIVETYPE PrimitiveType, UINT PrimitiveCount) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_ClearInt(LPDIRECT3DDEVICE9 iface, DWORD Count, CONST D3DRECT* pRects, DWORD Flags, D3DCOLOR Color, float Z, DWORD Stencil) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +VOID WINAPI IDirect3DDevice9Pure_DrawPrimitivesWorker(LPDIRECT3DDEVICE9 iface) +{ + UNIMPLEMENTED +} + +VOID WINAPI IDirect3DDevice9Pure_UpdateVertexShader(LPDIRECT3DDEVICE9 iface) +{ + UNIMPLEMENTED +} + +HRESULT WINAPI IDirect3DDevice9Pure_ValidateDrawCall(LPDIRECT3DDEVICE9 iface, D3DPRIMITIVETYPE PrimitiveType, UINT Unknown1, UINT Unknown2, UINT Unknown3, INT Unknown4, UINT Unknown5, INT Unknown6) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +HRESULT WINAPI IDirect3DDevice9Pure_Init(LPDIRECT3DDEVICE9 iface) +{ + UNIMPLEMENTED + + return D3D_OK; +} + +VOID WINAPI IDirect3DDevice9Pure_InitState(LPDIRECT3DDEVICE9 iface, INT State) +{ + UNIMPLEMENTED +} + +VOID WINAPI IDirect3DDevice9Pure_Destroy(LPDIRECT3DDEVICE9 iface) +{ + UNIMPLEMENTED +} + +VOID WINAPI IDirect3DDevice9Pure_VirtualDestructor(LPDIRECT3DDEVICE9 iface) +{ + UNIMPLEMENTED +} diff --git a/reactos/dll/directx/d3d9/d3d9_puredevice.h b/reactos/dll/directx/d3d9/d3d9_puredevice.h new file mode 100644 index 00000000000..fea2d889288 --- /dev/null +++ b/reactos/dll/directx/d3d9/d3d9_puredevice.h @@ -0,0 +1,418 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS ReactX + * FILE: dll/directx/d3d9/d3d9_haldevice.h + * PURPOSE: d3d9.dll internal device structures + * PROGRAMERS: Gregor Gullwi + */ +#ifndef _D3D9_PUREDEVICE_H_ +#define _D3D9_PUREDEVICE_H_ + +#include "d3d9_device.h" + +typedef struct _D3D9PUREDEVICE +{ +/* 0x0000 - 0x0000 */ DIRECT3DDEVICE9_INT BaseDevice; +/* 0x1f48 */ DWORD unknown002002; +/* 0x1f4c */ DWORD unknown002003; +/* 0x1f50 */ DWORD unknown002004; +/* 0x1f54 */ DWORD unknown002005; +/* 0x1f58 */ DWORD unknown002006; +/* 0x1f5c */ DWORD unknown002007; +/* 0x1f60 */ DWORD unknown002008; +/* 0x1f64 */ DWORD unknown002009; +/* 0x1f68 */ DWORD unknown002010; +/* 0x1f6c */ DWORD unknown002011; +/* 0x1f70 */ DWORD unknown002012; +/* 0x1f74 */ DWORD unknown002013; +/* 0x1f78 */ DWORD unknown002014; +/* 0x1f7c */ DWORD unknown002015; +/* 0x1f80 */ DWORD unknown002016; +/* 0x1f84 */ DWORD unknown002017; +/* 0x1f88 */ DWORD unknown002018; +/* 0x1f8c */ DWORD unknown002019; +/* 0x1f90 */ DWORD unknown002020; +/* 0x1f94 */ DWORD unknown002021; +/* 0x1f98 */ DWORD unknown002022; +/* 0x1f9c */ DWORD unknown002023; +/* 0x1fa0 */ DWORD unknown002024; +/* 0x1fa4 */ DWORD unknown002025; +/* 0x1fa8 - 0x1fe0 */ DWORD unknown002026; +/* 0x1fac */ DWORD unknown002027; +/* 0x1fb0 */ LPDWORD unknown002028; +/* 0x1fb4 */ DWORD unknown002029; +/* 0x1fb8 */ DWORD unknown002030; +/* 0x1fbc */ DWORD unknown002031; +/* 0x1fc0 */ DWORD unknown002032; +/* 0x1fc4 */ DWORD unknown002033; +/* 0x1fc8 */ DWORD unknown002034; +/* 0x1fcc */ DWORD unknown002035; +/* 0x1fd0 */ DWORD unknown002036; +/* 0x1fd4 */ DWORD unknown002037; +/* 0x1fd8 */ DWORD unknown002038; +/* 0x1fdc */ DWORD unknown002039; +/* 0x1fe0 */ DWORD unknown002040; +/* 0x1fe4 */ DWORD unknown002041; +/* 0x1fe8 */ DWORD unknown002042; +/* 0x1fec */ DWORD unknown002043; +/* 0x1ff0 */ DWORD unknown002044; +/* 0x1ff4 */ DWORD unknown002045; +/* 0x1ff8 */ DWORD unknown002046; +/* 0x1ffc */ DWORD unknown002047; +/* 0x2000 */ DWORD unknown002048; +/* 0x2004 */ DWORD unknown002049; +/* 0x2008 */ DWORD unknown002050; +/* 0x200c */ DWORD unknown002051; +/* 0x2010 */ DWORD unknown002052; +/* 0x2014 */ DWORD unknown002053; +/* 0x2018 */ DWORD unknown002054; +/* 0x201c */ DWORD unknown002055; +/* 0x2020 */ DWORD unknown002056; +/* 0x2024 */ DWORD unknown002057; +/* 0x2028 */ DWORD unknown002058; +/* 0x202c */ DWORD unknown002059; +/* 0x2030 */ DWORD unknown002060; +/* 0x2034 */ DWORD unknown002061; +/* 0x2038 */ DWORD unknown002062; +/* 0x203c */ DWORD unknown002063; +/* 0x2040 */ DWORD unknown002064; +/* 0x2044 */ DWORD unknown002065; +/* 0x2048 */ DWORD unknown002066; +/* 0x204c */ DWORD unknown002067; +/* 0x2050 */ DWORD unknown002068; +/* 0x2054 */ DWORD unknown002069; +/* 0x2058 */ DWORD unknown002070; +/* 0x205c */ DWORD unknown002071; +/* 0x2060 */ DWORD unknown002072; +/* 0x2064 */ DWORD unknown002073; +/* 0x2068 */ DWORD unknown002074; +/* 0x206c */ DWORD unknown002075; +/* 0x2070 */ DWORD unknown002076; +/* 0x2074 */ DWORD unknown002077; +/* 0x2078 */ DWORD unknown002078; +/* 0x207c */ DWORD unknown002079; +/* 0x2080 */ DWORD unknown002080; +/* 0x2084 */ DWORD unknown002081; +/* 0x2088 */ DWORD unknown002082; +/* 0x208c */ DWORD unknown002083; // SurfaceManager? +/* 0x2090 */ DWORD unknown002084; +/* 0x2094 */ DWORD unknown002085; +/* 0x2098 */ DWORD unknown002086; +/* 0x209c */ DWORD unknown002087; +/* 0x20a0 */ DWORD unknown002088; +/* 0x20a4 */ DWORD unknown002089; +/* 0x20a8 */ DWORD unknown002090; +/* 0x20ac */ DWORD unknown002091; +/* 0x20b0 */ DWORD unknown002092; +/* 0x20b4 */ DWORD unknown002093; +/* 0x20b8 */ DWORD unknown002094; +/* 0x20bc */ DWORD unknown002095; +/* 0x20c0 */ DWORD unknown002096; +/* 0x20c4 */ DWORD unknown002097; +/* 0x20c8 */ DWORD unknown002098; +/* 0x20cc */ DWORD unknown002099; +/* 0x20d0 */ DWORD unknown002100; // VSOutputDecl? +/* 0x20d4 */ DWORD unknown002101; +/* 0x20d8 */ DWORD unknown002102; +/* 0x20dc */ DWORD unknown002103; +/* 0x20e0 */ DWORD unknown002104; +/* 0x20e4 */ DWORD unknown002105; +/* 0x20e8 */ DWORD unknown002106; +/* 0x20ec */ DWORD unknown002107; +/* 0x20f0 */ DWORD unknown002108; +/* 0x20f4 */ DWORD unknown002109; +/* 0x20f8 */ DWORD unknown002110; +/* 0x20fc */ DWORD unknown002111; +/* 0x2100 */ DWORD unknown002112; +/* 0x2104 */ DWORD unknown002113; +/* 0x2108 */ DWORD unknown002114; +/* 0x210c */ DWORD unknown002115; +/* 0x2110 */ DWORD unknown002116; +/* 0x2114 */ DWORD unknown002117; +/* 0x2118 */ DWORD unknown002118; +/* 0x211c */ DWORD unknown002119; +/* 0x2120 */ DWORD unknown002120; +/* 0x2124 */ DWORD unknown002121; +/* 0x2128 */ DWORD unknown002122; +/* 0x212c */ DWORD unknown002123; +/* 0x2130 */ DWORD unknown002124; +/* 0x2134 */ DWORD unknown002125; +/* 0x2138 */ DWORD unknown002126; +/* 0x213c */ DWORD unknown002127; +/* 0x2140 */ DWORD unknown002128; +/* 0x2144 */ DWORD unknown002129; +/* 0x2148 */ DWORD unknown002130; +/* 0x214c */ DWORD unknown002131; +/* 0x2150 */ DWORD unknown002132; +/* 0x2154 */ DWORD unknown002133; +/* 0x2158 */ DWORD unknown002134; +/* 0x215c */ DWORD unknown002135; +/* 0x2160 */ DWORD unknown002136; +/* 0x2164 */ DWORD unknown002137; +/* 0x2168 */ DWORD unknown002138; +/* 0x216c */ DWORD unknown002139; +/* 0x2170 */ DWORD unknown002140; +/* 0x2174 */ DWORD unknown002141; +/* 0x2178 */ DWORD unknown002142; +/* 0x217c */ DWORD unknown002143; +/* 0x2180 */ DWORD unknown002144; +/* 0x2184 */ DWORD unknown002145; +/* 0x2188 */ DWORD unknown002146; +/* 0x218c */ DWORD unknown002147; +/* 0x2190 */ DWORD unknown002148; +/* 0x2194 */ DWORD unknown002149; +/* 0x2198 */ DWORD unknown002150; +/* 0x219c */ DWORD unknown002151; +/* 0x21a0 */ DWORD unknown002152; +/* 0x21a4 */ DWORD unknown002153; +/* 0x21a8 */ DWORD unknown002154; +/* 0x21ac */ DWORD unknown002155; +/* 0x21b0 */ DWORD unknown002156; +/* 0x21b4 */ DWORD unknown002157; +/* 0x21b8 */ DWORD unknown002158; +/* 0x21bc */ DWORD unknown002159; +/* 0x21c0 */ DWORD unknown002160; +/* 0x21c4 */ DWORD unknown002161; +/* 0x21c8 */ DWORD unknown002162; +/* 0x21cc */ DWORD unknown002163; +/* 0x21d0 */ DWORD unknown002164; +/* 0x21d4 */ DWORD unknown002165; +/* 0x21d8 */ DWORD unknown002166; +/* 0x21dc */ DWORD unknown002167; +/* 0x21e0 */ DWORD unknown002168; +/* 0x21e4 */ DWORD unknown002169; +/* 0x21e8 */ DWORD unknown002170; +/* 0x21ec */ DWORD unknown002171; +/* 0x21f0 */ DWORD unknown002172; +/* 0x21f4 */ DWORD unknown002173; +/* 0x21f8 */ DWORD unknown002174; +/* 0x21fc */ DWORD unknown002175; +/* 0x2200 */ DWORD unknown002176; +/* 0x2204 */ DWORD unknown002177; +/* 0x2208 */ DWORD unknown002178; +/* 0x220c */ DWORD unknown002179; +/* 0x2210 */ DWORD unknown002180; +/* 0x2214 */ DWORD unknown002181; +/* 0x2218 */ DWORD unknown002182; +/* 0x221c */ DWORD unknown002183; +/* 0x2220 */ DWORD unknown002184; +/* 0x2224 */ DWORD unknown002185; +/* 0x2228 */ DWORD unknown002186; +/* 0x222c */ DWORD unknown002187; +/* 0x2230 */ DWORD unknown002188; +/* 0x2234 */ DWORD unknown002189; +/* 0x2238 */ DWORD unknown002190; +/* 0x223c */ DWORD unknown002191; +/* 0x2240 */ DWORD unknown002192; +/* 0x2244 */ DWORD unknown002193; +/* 0x2248 */ DWORD unknown002194; +/* 0x224c */ DWORD unknown002195; +/* 0x2250 */ DWORD unknown002196; +/* 0x2254 */ DWORD unknown002197; +/* 0x2258 */ DWORD unknown002198; +/* 0x225c */ DWORD unknown002199; +/* 0x2260 */ DWORD unknown002200; +/* 0x2264 */ DWORD unknown002201; +/* 0x2268 */ DWORD unknown002202; +/* 0x226c */ DWORD unknown002203; +/* 0x2270 */ DWORD unknown002204; +/* 0x2274 */ DWORD unknown002205; +/* 0x2278 */ DWORD unknown002206; +/* 0x227c */ DWORD unknown002207; +/* 0x2280 */ DWORD unknown002208; +/* 0x2284 */ DWORD unknown002209; +/* 0x2288 */ DWORD unknown002210; +/* 0x228c */ DWORD unknown002211; +/* 0x2290 */ DWORD unknown002212; +/* 0x2294 */ DWORD unknown002213; +/* 0x2298 */ DWORD unknown002214; +/* 0x229c */ DWORD unknown002215; +/* 0x22a0 */ DWORD unknown002216; +/* 0x22a4 */ DWORD unknown002217; +/* 0x22a8 */ DWORD unknown002218; +/* 0x22ac */ DWORD unknown002219; +/* 0x22b0 */ DWORD unknown002220; +/* 0x22b4 */ DWORD unknown002221; +/* 0x22b8 */ DWORD unknown002222; +/* 0x22bc */ DWORD unknown002223; +/* 0x22c0 */ DWORD unknown002224; +/* 0x22c4 */ DWORD unknown002225; +/* 0x22c8 */ DWORD unknown002226; +/* 0x22cc */ DWORD unknown002227; +/* 0x22d0 */ DWORD unknown002228; +/* 0x22d4 */ DWORD unknown002229; +/* 0x22d8 */ DWORD unknown002230; +/* 0x22dc */ DWORD unknown002231; +/* 0x22e0 */ DWORD unknown002232; +/* 0x22e4 */ DWORD unknown002233; +/* 0x22e8 */ DWORD unknown002234; +/* 0x22ec */ DWORD unknown002235; +/* 0x22f0 */ DWORD unknown002236; +/* 0x22f4 */ DWORD unknown002237; +/* 0x22f8 */ DWORD unknown002238; +/* 0x22fc */ DWORD unknown002239; +/* 0x2300 */ DWORD unknown002240; +/* 0x2304 */ DWORD unknown002241; +/* 0x2308 */ DWORD unknown002242; +/* 0x230c */ DWORD unknown002243; +/* 0x2310 */ DWORD unknown002244; +/* 0x2314 */ DWORD unknown002245; +/* 0x2318 */ DWORD unknown002246; +/* 0x231c */ DWORD unknown002247; +/* 0x2320 */ DWORD unknown002248; +/* 0x2324 */ DWORD unknown002249; +/* 0x2328 */ DWORD unknown002250; +/* 0x232c */ DWORD unknown002251; +/* 0x2330 */ DWORD unknown002252; +/* 0x2334 */ DWORD unknown002253; +/* 0x2338 */ DWORD unknown002254; +/* 0x233c */ DWORD unknown002255; +/* 0x2340 */ DWORD unknown002256; +/* 0x2344 */ DWORD unknown002257; +/* 0x2348 */ DWORD unknown002258; +/* 0x234c */ DWORD unknown002259; +/* 0x2350 */ DWORD unknown002260; +/* 0x2354 */ DWORD unknown002261; +/* 0x2358 */ DWORD unknown002262; +/* 0x235c */ DWORD unknown002263; +/* 0x2360 */ DWORD unknown002264; +/* 0x2364 */ DWORD unknown002265; +/* 0x2368 */ DWORD unknown002266; +/* 0x236c */ DWORD unknown002267; +/* 0x2370 */ DWORD unknown002268; +/* 0x2374 */ DWORD unknown002269; +/* 0x2378 */ DWORD unknown002270; +/* 0x237c */ DWORD unknown002271; +/* 0x2380 */ DWORD unknown002272; +/* 0x2384 */ DWORD unknown002273; +/* 0x2388 */ DWORD unknown002274; +/* 0x238c */ DWORD unknown002275; +/* 0x2390 */ DWORD unknown002276; +/* 0x2394 */ DWORD unknown002277; +/* 0x2398 */ DWORD unknown002278; +/* 0x239c */ DWORD unknown002279; +/* 0x23a0 */ DWORD unknown002280; +/* 0x23a4 */ DWORD unknown002281; +/* 0x23a8 */ DWORD unknown002282; +/* 0x23ac */ DWORD unknown002283; +/* 0x23b0 */ DWORD unknown002284; +/* 0x23b4 */ DWORD unknown002285; +/* 0x23b8 */ DWORD unknown002286; +/* 0x23bc */ DWORD unknown002287; +/* 0x23c0 */ DWORD unknown002288; +/* 0x23c4 */ DWORD unknown002289; +/* 0x23c8 */ DWORD unknown002290; +/* 0x23cc */ DWORD unknown002291; +/* 0x23d0 */ DWORD unknown002292; +/* 0x23d4 */ DWORD unknown002293; +/* 0x23d8 */ DWORD unknown002294; +/* 0x23dc */ DWORD unknown002295; +/* 0x23e0 */ DWORD unknown002296; +/* 0x23e4 */ DWORD unknown002297; +/* 0x23e8 */ DWORD unknown002298; +/* 0x23ec */ DWORD unknown002299; +/* 0x23f0 */ DWORD unknown002300; +/* 0x23f4 */ DWORD unknown002301; +/* 0x23f8 */ DWORD unknown002302; +/* 0x23fc */ DWORD unknown002303; +/* 0x2400 */ DWORD unknown002304; +/* 0x2404 */ DWORD unknown002305; +/* 0x2408 */ DWORD unknown002306; +/* 0x240c */ DWORD unknown002307; +/* 0x2410 */ DWORD unknown002308; +/* 0x2414 */ DWORD unknown002309; +/* 0x2418 */ DWORD unknown002310; +/* 0x241c */ DWORD unknown002311; +/* 0x2420 */ DWORD unknown002312; +/* 0x2424 */ DWORD unknown002313; +/* 0x2428 */ DWORD unknown002314; +/* 0x242c */ DWORD unknown002315; +/* 0x2430 */ DWORD unknown002316; +/* 0x2434 */ DWORD unknown002317; +} D3D9PUREDEVICE, FAR *LPD3D9PUREDEVICE; + +/* IDirect3D9Device public interface */ +HRESULT WINAPI IDirect3DDevice9Pure_SetRenderTarget(LPDIRECT3DDEVICE9 iface, DWORD RenderTargetIndex, IDirect3DSurface9* pRenderTarget); +HRESULT WINAPI IDirect3DDevice9Pure_GetRenderTarget(LPDIRECT3DDEVICE9 iface, DWORD RenderTargetIndex,IDirect3DSurface9** ppRenderTarget); +HRESULT WINAPI IDirect3DDevice9Pure_SetDepthStencilSurface(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9* pNewZStencil); +HRESULT WINAPI IDirect3DDevice9Pure_GetDepthStencilSurface(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9** ppZStencilSurface); +HRESULT WINAPI IDirect3DDevice9Pure_BeginScene(LPDIRECT3DDEVICE9 iface); +HRESULT WINAPI IDirect3DDevice9Pure_EndScene(LPDIRECT3DDEVICE9 iface); +HRESULT WINAPI IDirect3DDevice9Pure_Clear(LPDIRECT3DDEVICE9 iface, DWORD Count, CONST D3DRECT* pRects, DWORD Flags, D3DCOLOR Color, float Z, DWORD Stencil); +HRESULT WINAPI IDirect3DDevice9Pure_SetTransform(LPDIRECT3DDEVICE9 iface, D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* pMatrix); +HRESULT WINAPI IDirect3DDevice9Pure_GetTransform(LPDIRECT3DDEVICE9 iface, D3DTRANSFORMSTATETYPE State, D3DMATRIX* pMatrix); +HRESULT WINAPI IDirect3DDevice9Pure_MultiplyTransform(LPDIRECT3DDEVICE9 iface, D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* pMatrix); +HRESULT WINAPI IDirect3DDevice9Pure_SetViewport(LPDIRECT3DDEVICE9 iface, CONST D3DVIEWPORT9* pViewport); +HRESULT WINAPI IDirect3DDevice9Pure_GetViewport(LPDIRECT3DDEVICE9 iface, D3DVIEWPORT9* pViewport); +HRESULT WINAPI IDirect3DDevice9Pure_SetMaterial(LPDIRECT3DDEVICE9 iface, CONST D3DMATERIAL9* pMaterial); +HRESULT WINAPI IDirect3DDevice9Pure_GetMaterial(LPDIRECT3DDEVICE9 iface, D3DMATERIAL9* pMaterial); +HRESULT WINAPI IDirect3DDevice9Pure_SetLight(LPDIRECT3DDEVICE9 iface, DWORD Index, CONST D3DLIGHT9* pLight); +HRESULT WINAPI IDirect3DDevice9Pure_GetLight(LPDIRECT3DDEVICE9 iface, DWORD Index, D3DLIGHT9* pLight); +HRESULT WINAPI IDirect3DDevice9Pure_LightEnable(LPDIRECT3DDEVICE9 iface, DWORD Index, BOOL Enable); +HRESULT WINAPI IDirect3DDevice9Pure_GetLightEnable(LPDIRECT3DDEVICE9 iface, DWORD Index, BOOL* pEnable); +HRESULT WINAPI IDirect3DDevice9Pure_SetClipPlane(LPDIRECT3DDEVICE9 iface, DWORD Index, CONST float* pPlane); +HRESULT WINAPI IDirect3DDevice9Pure_GetClipPlane(LPDIRECT3DDEVICE9 iface, DWORD Index, float* pPlane); +HRESULT WINAPI IDirect3DDevice9Pure_SetRenderState(LPDIRECT3DDEVICE9 iface, D3DRENDERSTATETYPE State, DWORD Value); +HRESULT WINAPI IDirect3DDevice9Pure_GetRenderState(LPDIRECT3DDEVICE9 iface, D3DRENDERSTATETYPE State, DWORD* pValue); +HRESULT WINAPI IDirect3DDevice9Pure_CreateStateBlock(LPDIRECT3DDEVICE9 iface, D3DSTATEBLOCKTYPE Type, IDirect3DStateBlock9** ppSB); +HRESULT WINAPI IDirect3DDevice9Pure_BeginStateBlock(LPDIRECT3DDEVICE9 iface); +HRESULT WINAPI IDirect3DDevice9Pure_EndStateBlock(LPDIRECT3DDEVICE9 iface, IDirect3DStateBlock9** ppSB); +HRESULT WINAPI IDirect3DDevice9Pure_SetClipStatus(LPDIRECT3DDEVICE9 iface, CONST D3DCLIPSTATUS9* pClipStatus); +HRESULT WINAPI IDirect3DDevice9Pure_GetClipStatus(LPDIRECT3DDEVICE9 iface, D3DCLIPSTATUS9* pClipStatus); +HRESULT WINAPI IDirect3DDevice9Pure_GetTexture(LPDIRECT3DDEVICE9 iface, DWORD Stage, IDirect3DBaseTexture9** ppTexture); +HRESULT WINAPI IDirect3DDevice9Pure_SetTexture(LPDIRECT3DDEVICE9 iface, DWORD Stage, IDirect3DBaseTexture9* pTexture); +HRESULT WINAPI IDirect3DDevice9Pure_GetTextureStageState(LPDIRECT3DDEVICE9 iface, DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD* pValue); +HRESULT WINAPI IDirect3DDevice9Pure_SetTextureStageState(LPDIRECT3DDEVICE9 iface, DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD Value); +HRESULT WINAPI IDirect3DDevice9Pure_GetSamplerState(LPDIRECT3DDEVICE9 iface, DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD* pValue); +HRESULT WINAPI IDirect3DDevice9Pure_SetSamplerState(LPDIRECT3DDEVICE9 iface, DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD Value); +HRESULT WINAPI IDirect3DDevice9Pure_ValidateDevice(LPDIRECT3DDEVICE9 iface, DWORD* pNumPasses); +HRESULT WINAPI IDirect3DDevice9Pure_SetPaletteEntries(LPDIRECT3DDEVICE9 iface, UINT PaletteNumber, CONST PALETTEENTRY* pEntries); +HRESULT WINAPI IDirect3DDevice9Pure_GetPaletteEntries(LPDIRECT3DDEVICE9 iface, UINT PaletteNumber, PALETTEENTRY* pEntries); +HRESULT WINAPI IDirect3DDevice9Pure_SetCurrentTexturePalette(LPDIRECT3DDEVICE9 iface, UINT PaletteNumber); +HRESULT WINAPI IDirect3DDevice9Pure_GetCurrentTexturePalette(LPDIRECT3DDEVICE9 iface, UINT* pPaletteNumber); +HRESULT WINAPI IDirect3DDevice9Pure_SetScissorRect(LPDIRECT3DDEVICE9 iface, CONST RECT* pRect); +HRESULT WINAPI IDirect3DDevice9Pure_GetScissorRect(LPDIRECT3DDEVICE9 iface, RECT* pRect); +HRESULT WINAPI IDirect3DDevice9Pure_SetSoftwareVertexProcessing(LPDIRECT3DDEVICE9 iface, BOOL bSoftware); +BOOL WINAPI IDirect3DDevice9Pure_GetSoftwareVertexProcessing(LPDIRECT3DDEVICE9 iface); +HRESULT WINAPI IDirect3DDevice9Pure_SetNPatchMode(LPDIRECT3DDEVICE9 iface, float nSegments); +float WINAPI IDirect3DDevice9Pure_GetNPatchMode(LPDIRECT3DDEVICE9 iface); +HRESULT WINAPI IDirect3DDevice9Pure_DrawPrimitive(LPDIRECT3DDEVICE9 iface, D3DPRIMITIVETYPE PrimitiveType, UINT StartVertex, UINT PrimitiveCount); +HRESULT WINAPI IDirect3DDevice9Pure_DrawIndexedPrimitive(LPDIRECT3DDEVICE9 iface, D3DPRIMITIVETYPE PrimitiveType, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount); +HRESULT WINAPI IDirect3DDevice9Pure_DrawPrimitiveUP(LPDIRECT3DDEVICE9 iface, D3DPRIMITIVETYPE PrimitiveType, UINT PrimitiveCount, CONST void* pVertexStreamZeroData, UINT VertexStreamZeroStride); +HRESULT WINAPI IDirect3DDevice9Pure_DrawIndexedPrimitiveUP(LPDIRECT3DDEVICE9 iface, D3DPRIMITIVETYPE PrimitiveType, UINT MinVertexIndex, UINT NumVertices, UINT PrimitiveCount, CONST void* pIndexData, D3DFORMAT IndexDataFormat, CONST void* pVertexStreamZeroData, UINT VertexStreamZeroStride); +HRESULT WINAPI IDirect3DDevice9Pure_ProcessVertices(LPDIRECT3DDEVICE9 iface, UINT SrcStartIndex, UINT DestIndex, UINT VertexCount, IDirect3DVertexBuffer9* pDestBuffer, IDirect3DVertexDeclaration9* pVertexDecl, DWORD Flags); +HRESULT WINAPI IDirect3DDevice9Pure_CreateVertexDeclaration(LPDIRECT3DDEVICE9 iface, CONST D3DVERTEXELEMENT9* pVertexElements, IDirect3DVertexDeclaration9** ppDecl); +HRESULT WINAPI IDirect3DDevice9Pure_SetVertexDeclaration(LPDIRECT3DDEVICE9 iface, IDirect3DVertexDeclaration9* pDecl); +HRESULT WINAPI IDirect3DDevice9Pure_GetVertexDeclaration(LPDIRECT3DDEVICE9 iface, IDirect3DVertexDeclaration9** ppDecl); +HRESULT WINAPI IDirect3DDevice9Pure_SetFVF(LPDIRECT3DDEVICE9 iface, DWORD FVF); +HRESULT WINAPI IDirect3DDevice9Pure_GetFVF(LPDIRECT3DDEVICE9 iface, DWORD* pFVF); +HRESULT WINAPI IDirect3DDevice9Pure_CreateVertexShader(LPDIRECT3DDEVICE9 iface, CONST DWORD* pFunction, IDirect3DVertexShader9** ppShader); +HRESULT WINAPI IDirect3DDevice9Pure_SetVertexShader(LPDIRECT3DDEVICE9 iface, IDirect3DVertexShader9* pShader); +HRESULT WINAPI IDirect3DDevice9Pure_GetVertexShader(LPDIRECT3DDEVICE9 iface, IDirect3DVertexShader9** ppShader); +HRESULT WINAPI IDirect3DDevice9Pure_SetVertexShaderConstantF(LPDIRECT3DDEVICE9 iface, UINT StartRegister, CONST float* pConstantData, UINT Vector4fCount); +HRESULT WINAPI IDirect3DDevice9Pure_GetVertexShaderConstantF(LPDIRECT3DDEVICE9 iface, UINT StartRegister, float* pConstantData, UINT Vector4fCount); +HRESULT WINAPI IDirect3DDevice9Pure_SetVertexShaderConstantI(LPDIRECT3DDEVICE9 iface, UINT StartRegister, CONST int* pConstantData, UINT Vector4iCount); +HRESULT WINAPI IDirect3DDevice9Pure_GetVertexShaderConstantI(LPDIRECT3DDEVICE9 iface, UINT StartRegister, int* pConstantData, UINT Vector4iCount); +HRESULT WINAPI IDirect3DDevice9Pure_SetVertexShaderConstantB(LPDIRECT3DDEVICE9 iface, UINT StartRegister, CONST BOOL* pConstantData, UINT BoolCount); +HRESULT WINAPI IDirect3DDevice9Pure_GetVertexShaderConstantB(LPDIRECT3DDEVICE9 iface, UINT StartRegister, BOOL* pConstantData, UINT BoolCount); +HRESULT WINAPI IDirect3DDevice9Pure_SetStreamSource(LPDIRECT3DDEVICE9 iface, UINT StreamNumber, IDirect3DVertexBuffer9* pStreamData, UINT OffsetInBytes, UINT Stride); +HRESULT WINAPI IDirect3DDevice9Pure_GetStreamSource(LPDIRECT3DDEVICE9 iface, UINT StreamNumber, IDirect3DVertexBuffer9** ppStreamData, UINT* pOffsetInBytes, UINT* pStride); +HRESULT WINAPI IDirect3DDevice9Pure_SetStreamSourceFreq(LPDIRECT3DDEVICE9 iface, UINT StreamNumber,UINT Setting); +HRESULT WINAPI IDirect3DDevice9Pure_GetStreamSourceFreq(LPDIRECT3DDEVICE9 iface, UINT StreamNumber, UINT* pSetting); +HRESULT WINAPI IDirect3DDevice9Pure_SetIndices(LPDIRECT3DDEVICE9 iface, IDirect3DIndexBuffer9* pIndexData); +HRESULT WINAPI IDirect3DDevice9Pure_GetIndices(LPDIRECT3DDEVICE9 iface, IDirect3DIndexBuffer9** ppIndexData); +HRESULT WINAPI IDirect3DDevice9Pure_CreatePixelShader(LPDIRECT3DDEVICE9 iface, CONST DWORD* pFunction, IDirect3DPixelShader9** ppShader); +HRESULT WINAPI IDirect3DDevice9Pure_SetPixelShader(LPDIRECT3DDEVICE9 iface, IDirect3DPixelShader9* pShader); +HRESULT WINAPI IDirect3DDevice9Pure_GetPixelShader(LPDIRECT3DDEVICE9 iface, IDirect3DPixelShader9** ppShader); +HRESULT WINAPI IDirect3DDevice9Pure_SetPixelShaderConstantF(LPDIRECT3DDEVICE9 iface, UINT StartRegister, CONST float* pConstantData, UINT Vector4fCount); +HRESULT WINAPI IDirect3DDevice9Pure_GetPixelShaderConstantF(LPDIRECT3DDEVICE9 iface, UINT StartRegister, float* pConstantData, UINT Vector4fCount); +HRESULT WINAPI IDirect3DDevice9Pure_SetPixelShaderConstantI(LPDIRECT3DDEVICE9 iface, UINT StartRegister, CONST int* pConstantData, UINT Vector4iCount); +HRESULT WINAPI IDirect3DDevice9Pure_GetPixelShaderConstantI(LPDIRECT3DDEVICE9 iface, UINT StartRegister, int* pConstantData, UINT Vector4iCount); +HRESULT WINAPI IDirect3DDevice9Pure_SetPixelShaderConstantB(LPDIRECT3DDEVICE9 iface, UINT StartRegister, CONST BOOL* pConstantData, UINT BoolCount); +HRESULT WINAPI IDirect3DDevice9Pure_GetPixelShaderConstantB(LPDIRECT3DDEVICE9 iface, UINT StartRegister, BOOL* pConstantData, UINT BoolCount); +HRESULT WINAPI IDirect3DDevice9Pure_DrawRectPatch(LPDIRECT3DDEVICE9 iface, UINT Handle, CONST float* pNumSegs, CONST D3DRECTPATCH_INFO* pRectPatchInfo); +HRESULT WINAPI IDirect3DDevice9Pure_DrawTriPatch(LPDIRECT3DDEVICE9 iface, UINT Handle, CONST float* pNumSegs, CONST D3DTRIPATCH_INFO* pTriPatchInfo); +HRESULT WINAPI IDirect3DDevice9Pure_DeletePatch(LPDIRECT3DDEVICE9 iface, UINT Handle); +HRESULT WINAPI IDirect3DDevice9Pure_CreateQuery(LPDIRECT3DDEVICE9 iface, D3DQUERYTYPE Type, IDirect3DQuery9** ppQuery); + +#endif // _D3D9_PUREDEVICE_H_ diff --git a/reactos/dll/directx/d3d9/d3d9_surface.h b/reactos/dll/directx/d3d9/d3d9_surface.h index b877c4a3b38..2a019811288 100644 --- a/reactos/dll/directx/d3d9/d3d9_surface.h +++ b/reactos/dll/directx/d3d9/d3d9_surface.h @@ -3,9 +3,28 @@ #include "d3d9_baseobject.h" +struct _D3D9BaseSurface; + +typedef struct _D3D9BaseSurfaceVtbl +{ + HRESULT (*QueryInterface)(struct _D3D9BaseSurface* iface, REFIID riid, LPVOID* ppvObject); + ULONG (*AddRef)(struct _D3D9BaseSurface* iface); + ULONG (*Release)(struct _D3D9BaseSurface* iface); + IDirect3DDevice9* (*GetDevice)(struct _D3D9BaseSurface* iface); + HRESULT (*SetPrivateData)(struct _D3D9BaseSurface* iface, REFIID riid, CONST LPVOID pData, DWORD DataSize, DWORD Flags); + HRESULT (*GetPrivateData)(struct _D3D9BaseSurface* iface, REFIID riid, LPVOID pData, DWORD* DataSize); + HRESULT (*FreePrivateData)(struct _D3D9BaseSurface* iface, REFIID riid); + DWORD (*SetPriority)(struct _D3D9BaseSurface* iface, DWORD NewPriority); + DWORD (*GetPriority)(struct _D3D9BaseSurface* iface); + VOID (*Load)(struct _D3D9BaseSurface* iface); + D3DRESOURCETYPE (*GetResourceType)(struct _D3D9BaseSurface* iface); + +} ID3D9BaseSurfaceVtbl; + + typedef struct _D3D9BaseSurface { -/* 0x0000 */ LPDWORD lpVtbl; +/* 0x0020 */ ID3D9BaseSurfaceVtbl* lpVtbl; /* 0x0024 */ D3DFORMAT DisplayFormat2; // Back buffer format? /* 0x0028 */ DWORD dwUnknown0028; // Constant/ref count? (1) /* 0x002c */ DWORD dwUnknown002c; // Refresh rate? diff --git a/reactos/dll/directx/d3d9/d3d9_swapchain.c b/reactos/dll/directx/d3d9/d3d9_swapchain.c index 661d6ed36f4..72d5cdddd66 100644 --- a/reactos/dll/directx/d3d9/d3d9_swapchain.c +++ b/reactos/dll/directx/d3d9/d3d9_swapchain.c @@ -21,7 +21,7 @@ /* Convert a IDirect3DSwapChain9 pointer safely to the internal implementation struct */ static LPDIRECT3DSWAPCHAIN9_INT IDirect3DSwapChain9ToImpl(LPDIRECT3DSWAPCHAIN9 iface) { - if (IsBadWritePtr(iface, sizeof(LPDIRECT3DSWAPCHAIN9_INT))) + if (NULL == iface) return NULL; return (LPDIRECT3DSWAPCHAIN9_INT)((ULONG_PTR)iface - FIELD_OFFSET(Direct3DSwapChain9_INT, lpVtbl)); @@ -110,7 +110,7 @@ static HRESULT WINAPI Direct3DSwapChain9_GetDevice(LPDIRECT3DSWAPCHAIN9 iface, I LPDIRECT3DSWAPCHAIN9_INT This = IDirect3DSwapChain9ToImpl(iface); LOCK_D3DDEVICE9(); - if (IsBadWritePtr(ppDevice, sizeof(IDirect3DDevice9**))) + if (NULL == ppDevice) { DPRINT1("Invalid ppDevice parameter specified"); UNLOCK_D3DDEVICE9(); @@ -151,7 +151,7 @@ static HRESULT WINAPI Direct3DSwapChain9_GetPresentParameters(LPDIRECT3DSWAPCHAI LPDIRECT3DSWAPCHAIN9_INT This = IDirect3DSwapChain9ToImpl(iface); LOCK_D3DDEVICE9(); - if (IsBadWritePtr(pPresentationParameters, sizeof(D3DPRESENT_PARAMETERS))) + if (NULL == pPresentationParameters) { DPRINT1("Invalid pPresentationParameters parameter specified"); UNLOCK_D3DDEVICE9(); diff --git a/reactos/dll/directx/d3d9/device.c b/reactos/dll/directx/d3d9/device.c index 48ed888fd59..bddd3805732 100644 --- a/reactos/dll/directx/d3d9/device.c +++ b/reactos/dll/directx/d3d9/device.c @@ -49,7 +49,7 @@ HRESULT InitD3D9BaseDevice(LPDIRECT3DDEVICE9_INT pThisBaseDevice, LPDIRECT3D9_IN pThisBaseDevice->pResourceManager = pResourceManager; - pThisBaseDevice->lpVtbl = &Direct3DDevice9_Vtbl; + pThisBaseDevice->lpVtbl = &Direct3DDevice9HAL_Vtbl; pThisBaseDevice->lRefCnt = 1; pThisBaseDevice->dwProcessId = GetCurrentThreadId(); pThisBaseDevice->pUnknown = (IUnknown*) &pThisBaseDevice->lpVtbl; diff --git a/reactos/dll/directx/d3d9/device.h b/reactos/dll/directx/d3d9/device.h index 88cc105e987..94058177f2f 100644 --- a/reactos/dll/directx/d3d9/device.h +++ b/reactos/dll/directx/d3d9/device.h @@ -9,7 +9,7 @@ #ifndef _DEVICE_H_ #define _DEVICE_H_ -#include "d3d9_device.h" +#include "d3d9_haldevice.h" HRESULT CreateD3D9HalDevice(LPDIRECT3D9_INT pDirect3D9, UINT Adapter, HWND hFocusWindow, DWORD BehaviourFlags, From e1b80cf07e2b5e504ea4a7faf9fd8060db55443d Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Sun, 31 Aug 2008 11:55:17 +0000 Subject: [PATCH 259/324] - Fix over-reading the input buffer (sometimes by even more than 400 bytes), and hashing random pool contents instead of the specified buffer. svn path=/trunk/; revision=35831 --- reactos/ntoskrnl/ob/obsdcach.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/reactos/ntoskrnl/ob/obsdcach.c b/reactos/ntoskrnl/ob/obsdcach.c index c339c8cdbe9..9a27a2a7b5c 100644 --- a/reactos/ntoskrnl/ob/obsdcach.c +++ b/reactos/ntoskrnl/ob/obsdcach.c @@ -81,11 +81,12 @@ ObpHash(IN PVOID Buffer, PULONG p, pp; PUCHAR pb, ppb; ULONG Hash = 0; - + /* Setup aligned and byte buffers */ p = Buffer; + pb = (PUCHAR)p; ppb = (PUCHAR)((ULONG_PTR)Buffer + Length); - pp = (PULONG)ALIGN_DOWN(p + Length, ULONG); + pp = (PULONG)ALIGN_DOWN(pb + Length, ULONG); /* Loop aligned data */ while (p < pp) @@ -94,7 +95,7 @@ ObpHash(IN PVOID Buffer, Hash ^= *p++; Hash = _rotl(Hash, 3); } - + /* Loop non-aligned data */ pb = (PUCHAR)p; while (pb < ppb) From 56c56ab228c5c58ac783f45170e8f38200ee2679 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Sun, 31 Aug 2008 12:45:56 +0000 Subject: [PATCH 260/324] - Make ntdll exports compatible with 2003 SP2 (except for some Vista routines) - "Implement" Nt* and Zw* routines, and export 3 missing Dbg* routines which we implement - Remove range list routines (those appear to be kernel mode only) - Remove strtoull export svn path=/trunk/; revision=35832 --- reactos/dll/ntdll/def/ntdll_i386.def | 376 ++++++++++++++++++++++++--- 1 file changed, 347 insertions(+), 29 deletions(-) diff --git a/reactos/dll/ntdll/def/ntdll_i386.def b/reactos/dll/ntdll/def/ntdll_i386.def index d0048b29bee..2e05d98f16b 100644 --- a/reactos/dll/ntdll/def/ntdll_i386.def +++ b/reactos/dll/ntdll/def/ntdll_i386.def @@ -1,4 +1,3 @@ -; $Id$ ; ; ReactOS Operating System ; @@ -23,11 +22,14 @@ CsrSetPriorityClass@8 DbgBreakPoint@0 DbgPrint DbgPrintEx +DbgPrintReturnControlC DbgPrompt@12 -DbgUiConvertStateChangeStructure@8 -DbgUiDebugActiveProcess@4 +DbgQueryDebugFilterState@8 +DbgSetDebugFilterState@12 DbgUiConnectToDbg@0 DbgUiContinue@8 +DbgUiConvertStateChangeStructure@8 +DbgUiDebugActiveProcess@4 DbgUiGetThreadDebugObject@0 DbgUiIssueRemoteBreakin@4 DbgUiRemoteBreakin@0 @@ -35,30 +37,89 @@ DbgUiSetThreadDebugObject@4 DbgUiStopDebugging@4 DbgUiWaitStateChange@8 DbgUserBreakPoint@0 +;EtwControlTraceA +;EtwControlTraceW +;EtwControlTraceW +;EtwCreateTraceInstanceId +;EtwEnableTrace +;EtwEnumerateTraceGuids +;EtwFlushTraceA +;EtwFlushTraceW +;EtwGetTraceEnableFlags +;EtwGetTraceEnableLevel +;EtwGetTraceLoggerHandle +;EtwNotificationRegistrationA +;EtwNotificationRegistrationW +;EtwQueryAllTracesA +;EtwQueryAllTracesW +;EtwQueryTraceA +;EtwQueryTraceW +;EtwReceiveNotificationsA +;EtwReceiveNotificationsW +;EtwRegisterTraceGuidsA +;EtwRegisterTraceGuidsW +;EtwStartTraceA +;EtwStartTraceW +;EtwStopTraceA +;EtwStopTraceW +;EtwTraceEvent +;EtwTraceEventInstance +;EtwTraceMessage +;EtwTraceMessageVa +;EtwUnregisterTraceGuids +;EtwUpdateTraceA +;EtwUpdateTraceW +;EtwpGetTraceBuffer +;EtwpSetHWConfigFunction +;ExpInterlockedPopEntrySListEnd +;ExpInterlockedPopEntrySListFault +;ExpInterlockedPopEntrySListResume +KiFastSystemCall@0 +KiFastSystemCallRet@0 +KiIntSystemCall@0 KiRaiseUserExceptionDispatcher@0 KiUserApcDispatcher@16 KiUserCallbackDispatcher@12 KiUserExceptionDispatcher@8 -KiIntSystemCall@0 -KiFastSystemCallRet@0 -KiFastSystemCall@0 +;LdrAccessOutOfProcessResource LdrAccessResource@16 LdrAddRefDll@8 +;LdrAlternateResourcesEnabled +;LdrCreateOutOfProcessImage +;LdrDestroyOutOfProcessImage LdrDisableThreadCalloutsForDll@4 LdrEnumResources@20 LdrFindEntryForAddress@8 +;LdrEnumerateLoadedModules +;LdrFindCreateProcessManifest +;LdrFindEntryForAddress LdrFindResourceDirectory_U@16 +;LdrFindResourceEx_U LdrFindResource_U@16 LdrGetDllHandle@16 +;LdrFlushAlternateResourceModules +;LdrGetDllHandle +;LdrGetDllHandleEx LdrGetProcedureAddress@16 +;LdrHotPatchRoutine +;LdrInitShimEngineDynamic LdrInitializeThunk@16 +;LdrLoadAlternateResourceModule LdrLoadDll@16 +;LdrLockLoaderLock +;LdrOpenImageFileOptionsKey LdrProcessRelocationBlock@16 LdrQueryImageFileExecutionOptions@24 +;LdrQueryImageFileExecutionOptionsEx +;LdrQueryImageFileKeyOption LdrQueryProcessModuleInformation@12 +;LdrSetAppCompatDllRedirectionCallback +;LdrSetDllManifestProber LdrShutdownProcess@0 LdrShutdownThread@0 +;LdrUnloadAlternateResourceModule LdrUnloadDll@4 +;LdrUnlockLoaderLock LdrVerifyImageMatchesChecksum@16 NlsAnsiCodePage DATA NlsMbCodePageTag DATA @@ -66,24 +127,36 @@ NlsMbOemCodePageTag DATA NtAcceptConnectPort@24 NtAccessCheck@32 NtAccessCheckAndAuditAlarm@44 +NtAccessCheckByType@44 +NtAccessCheckByTypeAndAuditAlarm@64 +NtAccessCheckByTypeResultList@44 +NtAccessCheckByTypeResultListAndAuditAlarm@64 +NtAccessCheckByTypeResultListAndAuditAlarmByHandle@68 NtAddAtom@12 NtAddBootEntry@8 +NtAddDriverEntry@8 NtAdjustGroupsToken@24 NtAdjustPrivilegesToken@24 NtAlertResumeThread@8 NtAlertThread@4 NtAllocateLocallyUniqueId@4 +NtAllocateUserPhysicalPages@12 NtAllocateUuids@16 NtAllocateVirtualMemory@24 +NtApphelpCacheControl@8 +NtAreMappedFilesTheSame@8 NtAssignProcessToJobObject@8 NtCallbackReturn@12 +NtCancelDeviceWakeupRequest@4 NtCancelIoFile@8 NtCancelTimer@8 NtClearEvent@4 NtClose@4 NtCloseObjectAuditAlarm@12 +NtCompactKeys@8 NtCompareTokens@12 NtCompleteConnectPort@4 +NtCompressKey@4 NtConnectPort@32 NtContinue@8 NtCreateDebugObject@16 @@ -93,13 +166,16 @@ NtCreateEventPair@12 NtCreateFile@44 NtCreateIoCompletion@16 NtCreateJobObject@12 +NtCreateJobSet@12 NtCreateKey@28 +NtCreateKeyedEvent@16 NtCreateMailslotFile@32 NtCreateMutant@16 NtCreateNamedPipeFile@56 NtCreatePagingFile@16 NtCreatePort@20 NtCreateProcess@32 +NtCreateProcessEx@36 NtCreateProfile@36 NtCreateSection@28 NtCreateSemaphore@20 @@ -109,9 +185,12 @@ NtCreateTimer@16 NtCreateToken@52 NtCreateWaitablePort@20 NtCurrentTeb=_NtCurrentTeb@0 +NtDebugActiveProcess@8 NtDebugContinue@12 NtDelayExecution@8 NtDeleteAtom@4 +NtDeleteBootEntry@4 +NtDeleteDriverEntry@4 NtDeleteFile@4 NtDeleteKey@4 NtDeleteObjectAuditAlarm@12 @@ -120,34 +199,54 @@ NtDeviceIoControlFile@40 NtDisplayString@4 NtDuplicateObject@28 NtDuplicateToken@24 +NtEnumerateBootEntries@8 +NtEnumerateDriverEntries@8 NtEnumerateKey@24 +NtEnumerateSystemEnvironmentValuesEx@12 NtEnumerateValueKey@24 NtExtendSection@8 +NtFilterToken@24 NtFindAtom@12 NtFlushBuffersFile@8 NtFlushInstructionCache@12 NtFlushKey@4 NtFlushVirtualMemory@16 NtFlushWriteBuffer@0 +NtFreeUserPhysicalPages@12 NtFreeVirtualMemory@16 NtFsControlFile@40 NtGetContextThread@8 +NtGetCurrentProcessorNumber@0 +NtGetDevicePowerState@8 NtGetPlugPlayEvent@16 +;NtGetTickCount +NtGetWriteWatch@28 NtImpersonateAnonymousToken@4 NtImpersonateClientOfPort@8 NtImpersonateThread@12 NtInitializeRegistry@4 +NtInitiatePowerAction@16 NtIsProcessInJob@8 +NtIsSystemResumeAutomatic@0 NtListenPort@8 NtLoadDriver@4 NtLoadKey@8 NtLoadKey2@12 +NtLoadKeyEx@16 NtLockFile@40 +NtLockProductActivationKeys@8 +NtLockRegistryKey@4 NtLockVirtualMemory@16 +NtMakePermanentObject@4 NtMakeTemporaryObject@4 +NtMapUserPhysicalPages@12 +NtMapUserPhysicalPagesScatter@12 NtMapViewOfSection@40 +NtModifyBootEntry@4 +NtModifyDriverEntry@4 NtNotifyChangeDirectoryFile@36 NtNotifyChangeKey@40 +NtNotifyChangeMultipleKeys@48 NtOpenDirectoryObject@12 NtOpenEvent@12 NtOpenEventPair@12 @@ -155,29 +254,35 @@ NtOpenFile@24 NtOpenIoCompletion@12 NtOpenJobObject@12 NtOpenKey@12 +NtOpenKeyedEvent@12 NtOpenMutant@12 NtOpenObjectAuditAlarm@48 NtOpenProcess@16 NtOpenProcessToken@12 +NtOpenProcessTokenEx@16 NtOpenSection@12 NtOpenSemaphore@12 NtOpenSymbolicLinkObject@12 NtOpenThread@16 NtOpenThreadToken@16 +NtOpenThreadTokenEx@20 NtOpenTimer@12 NtPlugPlayControl@12 NtPowerInformation@20 NtPrivilegeCheck@12 -NtPrivilegedServiceAuditAlarm@20 NtPrivilegeObjectAuditAlarm@24 +NtPrivilegedServiceAuditAlarm@20 NtProtectVirtualMemory@20 NtPulseEvent@8 NtQueryAttributesFile@8 +NtQueryBootEntryOrder@8 +NtQueryBootOptions@8 NtQueryDebugFilterState@8 NtQueryDefaultLocale@8 NtQueryDefaultUILanguage@4 NtQueryDirectoryFile@44 NtQueryDirectoryObject@28 +NtQueryDriverEntryOrder@8 NtQueryEaFile@36 NtQueryEvent@20 NtQueryFullAttributesFile@8 @@ -195,12 +300,17 @@ NtQueryKey@20 NtQueryMultipleValueKey@24 NtQueryMutant@20 NtQueryObject@20 +NtQueryOpenSubKeys@8 +NtQueryOpenSubKeysEx@16 NtQueryPerformanceCounter@8 +NtQueryPortInformationProcess@0 +NtQueryQuotaInformationFile@36 NtQuerySection@20 NtQuerySecurityObject@20 NtQuerySemaphore@20 NtQuerySymbolicLinkObject@12 NtQuerySystemEnvironmentValue@16 +NtQuerySystemEnvironmentValueEx@20 NtQuerySystemInformation@16 NtQuerySystemTime@4 NtQueryTimer@20 @@ -216,29 +326,41 @@ NtReadFileScatter@36 NtReadRequestData@24 NtReadVirtualMemory@20 NtRegisterThreadTerminatePort@4 +NtReleaseKeyedEvent@16 NtReleaseMutant@8 NtReleaseSemaphore@12 NtRemoveIoCompletion@20 +NtRemoveProcessDebug@8 +NtRenameKey@8 NtReplaceKey@12 NtReplyPort@8 NtReplyWaitReceivePort@16 NtReplyWaitReceivePortEx@20 NtReplyWaitReplyPort@8 +NtRequestDeviceWakeup@4 NtRequestPort@8 NtRequestWaitReplyPort@12 +NtRequestWakeupLatency@4 NtResetEvent@8 +NtResetWriteWatch@12 NtRestoreKey@12 NtResumeProcess@4 NtResumeThread@8 NtSaveKey@8 +NtSaveKeyEx@12 +NtSaveMergedKeys@12 NtSecureConnectPort@36 +NtSetBootEntryOrder@8 +NtSetBootOptions@8 NtSetContextThread@8 NtSetDebugFilterState@12 NtSetDefaultHardErrorPort@4 NtSetDefaultLocale@8 NtSetDefaultUILanguage@4 +NtSetDriverEntryOrder@8 NtSetEaFile@16 NtSetEvent@8 +NtSetEventBoostPriority@4 NtSetHighEventPair@4 NtSetHighWaitLowEventPair@4 NtSetInformationDebugObject@20 @@ -254,11 +376,14 @@ NtSetIoCompletion@20 NtSetLdtEntries@24 NtSetLowEventPair@4 NtSetLowWaitHighEventPair@4 +NtSetQuotaInformationFile@16 NtSetSecurityObject@12 NtSetSystemEnvironmentValue@8 +NtSetSystemEnvironmentValueEx@8 NtSetSystemInformation@12 NtSetSystemPowerState@12 NtSetSystemTime@8 +NtSetThreadExecutionState@8 NtSetTimer@28 NtSetTimerResolution@12 NtSetUuidSeed@4 @@ -275,14 +400,20 @@ NtTerminateJobObject@8 NtTerminateProcess@8 NtTerminateThread@8 NtTestAlert@0 +NtTraceEvent@16 +NtTranslateFilePath@16 NtUnloadDriver@4 NtUnloadKey@4 +NtUnloadKey2@8 +NtUnloadKeyEx@8 NtUnlockFile@20 NtUnlockVirtualMemory@16 NtUnmapViewOfSection@8 NtVdmControl@8 NtWaitForDebugEvent@16 +NtWaitForKeyedEvent@16 NtWaitForMultipleObjects@20 +NtWaitForMultipleObjects32@20 NtWaitForSingleObject@12 NtWaitHighEventPair@4 NtWaitLowEventPair@4 @@ -291,20 +422,22 @@ NtWriteFileGather@36 NtWriteRequestData@24 NtWriteVirtualMemory@20 NtYieldExecution@0 -NtGetCurrentProcessorNumber@0 ;PfxFindPrefix ;PfxInitialize ;PfxInsertPrefix ;PfxRemovePrefix ;PropertyLengthAsVariant -;RestoreEm87Context ;RtlAbortRXact RtlAbsoluteToSelfRelativeSD@12 RtlAcquirePebLock@0 +;RtlAcquirePrivilege RtlAcquireResourceExclusive@8 RtlAcquireResourceShared@8 RtlAcquireSRWLockExclusive@4 RtlAcquireSRWLockShared@4 +;RtlActivateActivationContext +;RtlActivateActivationContextEx +;RtlActivateActivationContextUnsafeFast RtlAddAccessAllowedAce@16 RtlAddAccessAllowedAceEx@20 RtlAddAccessAllowedObjectAce@28 @@ -320,9 +453,13 @@ RtlAddAuditAccessAceEx@28 RtlAddAuditAccessObjectAce@36 ;RtlAddCompoundAce RtlAddMandatoryAce@24 -RtlAddRange@36 +;RtlAddRefActivationContext +;RtlAddRefMemoryStream +;RtlAddVectoredContinueHandler RtlAddVectoredExceptionHandler@8 +;RtlAddressInSectionTable RtlAdjustPrivilege@16 +;RtlAllocateActivationContextStack RtlAllocateAndInitializeSid@44 RtlAllocateHandle@8 RtlAllocateHeap@12 @@ -330,6 +467,7 @@ RtlAnsiCharToUnicodeChar@4 RtlAnsiStringToUnicodeSize@4=RtlxAnsiStringToUnicodeSize@4 RtlAnsiStringToUnicodeString@12 RtlAppendAsciizToString@8 +;RtlAppendPathElement RtlAppendStringToString@8 RtlAppendUnicodeStringToString@8 RtlAppendUnicodeToString@8 @@ -340,11 +478,18 @@ RtlAreAnyAccessesGranted@8 RtlAreBitsClear@12 RtlAreBitsSet@12 RtlAssert@16 +;RtlCancelTimer +;RtlCaptureContext RtlCaptureStackBackTrace@16 +;RtlCaptureStackContext RtlCharToInteger@12 +;RtlCheckForOrphanedCriticalSections +;RtlCheckProcessParameters RtlCheckRegistryKey@8 RtlClearAllBits@4 RtlClearBits@12 +;RtlCloneMemoryStream +;RtlCommitMemoryStream RtlCompactHeap@8 RtlCompareMemory@12 RtlCompareMemoryUlong@12 @@ -352,30 +497,40 @@ RtlCompareString@12 RtlCompareUnicodeString@12 RtlCompressBuffer@32 RtlComputeCrc32@12 +;RtlComputeImportTableHash +;RtlComputePrivatizedDllName_U ;RtlConsoleMultiByteToUnicodeN RtlConvertExclusiveToShared@4 RtlConvertLongToLargeInteger@4 +;RtlConvertPropertyToVariant RtlConvertSharedToExclusive@4 RtlConvertSidToUnicodeString@12 +;RtlConvertToAutoInheritSecurityObject ;RtlConvertUiListToApiList RtlConvertUlongToLargeInteger@4 +;RtlConvertVariantToProperty RtlCopyLuid@8 RtlCopyLuidAndAttributesArray@12 -RtlCopyRangeList@8 +;RtlCopyMappedMemory +;RtlCopyMemoryStreamTo +;RtlCopyOutOfProcessMemoryStreamTo RtlCopySecurityDescriptor@8 RtlCopySid@12 RtlCopySidAndAttributesArray@28 RtlCopyString@8 RtlCopyUnicodeString@8 RtlCreateAcl@12 +;RtlCreateActivationContext ;RtlCreateAndSetSD RtlCreateAtomTable@8 +;RtlCreateBootStatusDataFile RtlCreateEnvironment@8 RtlCreateHeap@24 RtlCreateProcessParameters@40 RtlCreateQueryDebugBuffer@8 RtlCreateRegistryKey@8 RtlCreateSecurityDescriptor@8 +;RtlCreateSystemVolumeInformationFolder RtlCreateTagHeap@16 RtlCreateTimer@28 RtlCreateTimerQueue@4 @@ -387,9 +542,12 @@ RtlCreateUserThread@40 RtlCustomCPToUnicodeN@24 RtlCutoverTimeToSystemTime@16 RtlDeNormalizeProcessParams@4 +;RtlDeactivateActivationContext RtlDecodePointer=RtlEncodePointer@4 +;RtlDecodeSystemPointer RtlDecompressBuffer@24 RtlDecompressFragment@32 +;RtlDefaultNpAcl RtlDelete@4 RtlDeleteAce@8 RtlDeleteAtomFromAtomTable@8 @@ -397,8 +555,6 @@ RtlDeleteCriticalSection@4 RtlDeleteElementGenericTable@8 RtlDeleteElementGenericTableAvl@8 RtlDeleteNoSplay@8 -RtlDeleteOwnersRanges@8 -RtlDeleteRange@24 RtlDeleteRegistryValue@12 RtlDeleteResource@4 RtlDeleteSecurityObject@4 @@ -415,16 +571,23 @@ RtlDestroyProcessParameters@4 RtlDestroyQueryDebugBuffer@4 RtlDetermineDosPathNameType_U@4 RtlDllShutdownInProgress@0 +;RtlDnsHostNameToComputerName RtlDoesFileExists_U@4 +;RtlDosApplyFileIsolationRedirection_Ustr RtlDosPathNameToNtPathName_U@16 +;RtlDosPathNameToNtPathName_U_WithStatus RtlDosPathNameToRelativeNtPathName_U@16 +;RtlDosPathNameToRelativeNtPathName_U_WithStatus RtlDosSearchPath_U@24 +;RtlDosSearchPath_Ustr RtlDowncaseUnicodeChar@4 RtlDowncaseUnicodeString@12 RtlDumpResource@4 RtlDuplicateUnicodeString@12 RtlEmptyAtomTable@8 +;RtlEnableEarlyCriticalSectionEventCreation RtlEncodePointer@4 +;RtlEncodeSystemPointer RtlEnlargedIntegerMultiply@8 RtlEnlargedUnsignedDivide@16 RtlEnlargedUnsignedMultiply@8 @@ -451,47 +614,60 @@ RtlExtendedLargeIntegerDivide@16 RtlExtendedMagicDivide@20 RtlFillMemory@12 RtlFillMemoryUlong@12 +;RtlFinalReleaseOutOfProcessMemoryStream +;RtlFindActivationContextSectionGuid +;RtlFindActivationContextSectionString +;RtlFindCharInUnicodeString RtlFindClearBits@12 RtlFindClearBitsAndSet@12 RtlFindClearRuns@16 RtlFindLastBackwardRunClear@12 RtlFindLeastSignificantBit@8 RtlFindLongestRunClear@8 -RtlFindLongestRunSet@8 RtlFindMessage@20 RtlFindMostSignificantBit@8 RtlFindNextForwardRunClear@12 -RtlFindRange@48 RtlFindSetBits@12 RtlFindSetBitsAndClear@12 +;RtlFirstEntrySList RtlFirstFreeAce@8 +;RtlFlushSecureMemoryCache RtlFormatCurrentUserKeyPath@4 RtlFormatMessage@32 +;RtlFormatMessageEx +;RtlFreeActivationContextStack RtlFreeAnsiString@4 RtlFreeHandle@8 RtlFreeHeap@12 RtlFreeOemString@4 -RtlFreeRangeList@4 RtlFreeSid@4 +;RtlFreeThreadActivationContextStack RtlFreeUnicodeString@4 RtlFreeUserThreadStack@8 RtlGUIDFromString@8 RtlGenerate8dot3Name@16 RtlGetAce@12 +;RtlGetActiveActivationContext ;RtlGetCallersAddress RtlGetCompressionWorkSpaceSize@12 RtlGetControlSecurityDescriptor@12 +;RtlGetCriticalSectionRecursionCount RtlGetCurrentDirectory_U@8 +;RtlGetCurrentPeb +;RtlGetCurrentProcessorNumber RtlGetDaclSecurityDescriptor@16 RtlGetElementGenericTable@8 RtlGetElementGenericTableAvl@8 -RtlGetFirstRange@12 +;RtlGetFrame RtlGetFullPathName_U@16 +;RtlGetFullPathName_UstrEx RtlGetGroupSecurityDescriptor@12 RtlGetLastNtStatus@0 RtlGetLastWin32Error@0 +;RtlGetLengthWithoutLastFullDosOrNtPathElement +;RtlGetLengthWithoutTrailingPathSeperators RtlGetLongestNtPathLength@0 -RtlGetNextRange@12 +;RtlGetNativeSystemInformation RtlGetNtGlobalFlags@0 RtlGetNtProductType@4 RtlGetNtVersionNumbers@12 @@ -500,18 +676,24 @@ RtlGetProcessHeaps@8 RtlGetSaclSecurityDescriptor@16 RtlGetSecurityDescriptorRMControl@8 RtlGetSetBootStatusData@24 +;RtlGetThreadErrorMode +;RtlGetUnloadEventTrace RtlGetUserInfoHeap@20 RtlGetVersion@4 RtlHashUnicodeString@16 RtlIdentifierAuthoritySid@4 RtlImageDirectoryEntryToData@16 RtlImageNtHeader@4 +;RtlImageNtHeaderEx RtlImageRvaToSection@12 RtlImageRvaToVa@16 RtlImpersonateSelf@4 RtlInitAnsiString@8 +;RtlInitAnsiStringEx RtlInitCodePageTable@8 +;RtlInitMemoryStream RtlInitNlsTables@16 +;RtlInitOutOfProcessMemoryStream RtlInitString@8 RtlInitUnicodeString@8 RtlInitUnicodeStringEx@8 @@ -524,9 +706,9 @@ RtlInitializeCriticalSectionAndSpinCount@8 RtlInitializeGenericTable@20 RtlInitializeGenericTableAvl@20 RtlInitializeHandleTable@12 -RtlInitializeRangeList@4 -RtlInitializeResource@4 ;RtlInitializeRXact +RtlInitializeResource@4 +;RtlInitializeSListHead RtlInitializeSid@12 RtlInitializeSRWLock@4 RtlInsertElementGenericTable@16 @@ -536,7 +718,11 @@ RtlInsertElementGenericTableFullAvl@24 RtlInt64ToUnicodeString@16 RtlIntegerToChar@16 RtlIntegerToUnicodeString@12 -RtlInvertRangeList@8 +;RtlInterlockedCompareExchange64 +;RtlInterlockedFlushSList +;RtlInterlockedPopEntrySList +;RtlInterlockedPushEntrySList +;RtlInterlockedPushListSList RtlIpv4AddressToStringA@8 RtlIpv4AddressToStringExA@16 RtlIpv4AddressToStringExW@16 @@ -553,12 +739,15 @@ RtlIpv6StringToAddressA@12 RtlIpv6StringToAddressExA@16 RtlIpv6StringToAddressExW@16 RtlIpv6StringToAddressW@12 +;RtlIsActivationContextActive +;RtlIsCriticalSectionLocked +;RtlIsCriticalSectionLockedByThread RtlIsDosDeviceName_U@4 RtlIsGenericTableEmpty@4 RtlIsGenericTableEmptyAvl@4 RtlIsNameLegalDOS8Dot3@12 -RtlIsRangeAvailable@40 RtlIsTextUnicode@12 +;RtlIsThreadWithinLoaderCallout RtlIsValidHandle@8 RtlIsValidIndexHandle@12 RtlLargeIntegerAdd@16 @@ -576,6 +765,8 @@ RtlLengthSid@4 RtlLocalTimeToSystemTime@8 RtlLockBootStatusData@4 RtlLockHeap@4 +;RtlLockMemoryStreamRegion +;RtlLogStackBackTrace RtlLookupAtomInAtomTable@12 RtlLookupElementGenericTable@8 RtlLookupElementGenericTableAvl@8 @@ -583,16 +774,22 @@ RtlLookupElementGenericTableFull@16 RtlLookupElementGenericTableFullAvl@16 RtlMakeSelfRelativeSD@12 RtlMapGenericMask@8 -RtlMergeRangeLists@16 +;RtlMapSecurityErrorToNtStatus RtlMoveMemory@12 +;RtlMultiAppendUnicodeStringBuffer RtlMultiByteToUnicodeN@20 RtlMultiByteToUnicodeSize@12 +;RtlMultipleAllocateHeap +;RtlMultipleFreeHeap ;RtlNewInstanceSecurityObject ;RtlNewSecurityGrantedAccess RtlNewSecurityObject@24 +;RtlNewSecurityObjectEx +;RtlNewSecurityObjectWithMultipleInheritance RtlNormalizeProcessParams@4 RtlNtPathNameToDosPathName@16 RtlNtStatusToDosError@4 +;RtlNtStatusToDosErrorNoTeb RtlNumberGenericTableElements@4 RtlNumberGenericTableElementsAvl@4 RtlNumberOfClearBits@4 @@ -603,12 +800,19 @@ RtlOemToUnicodeN@20 RtlOpenCurrentUser@8 RtlPcToFileHeader@8 RtlPinAtomInAtomTable@8 +;RtlPopFrame RtlPrefixString@12 RtlPrefixUnicodeString@12 ;RtlProtectHeap +;RtlPushFrame RtlQueryAtomInAtomTable@24 +;RtlQueryDepthSList RtlQueryEnvironmentVariable_U@12 +;RtlQueryHeapInformation RtlQueryInformationAcl@16 +;RtlQueryInformationActivationContext +;RtlQueryInformationActiveActivationContext +;RtlQueryInterfaceMemoryStream ;RtlQueryProcessBackTraceInformation RtlQueryProcessDebugInformation@12 ;RtlQueryProcessHeapInformation @@ -617,30 +821,40 @@ RtlQueryRegistryValues@20 RtlQuerySecurityObject@20 RtlQueryTagHeap@20 RtlQueryTimeZoneInformation@4 +;RtlQueueApcWow64Thread RtlQueueWorkItem@12 RtlRaiseException@4 RtlRaiseStatus@4 RtlRandom@4 RtlRandomEx=RtlRandom@4 RtlReAllocateHeap@16 +;RtlReadMemoryStream +;RtlReadOutOfProcessMemoryStream RtlRealPredecessor@4 RtlRealSuccessor@4 +;RtlRegisterSecureMemoryCacheCallback RtlRegisterWait@24 +;RtlReleaseActivationContext +;RtlReleaseMemoryStream RtlReleasePebLock@0 +;RtlReleasePrivilege RtlReleaseRelativeName@4 RtlReleaseResource@4 RtlReleaseSRWLockExclusive@4 RtlReleaseSRWLockShared@4 ;RtlRemoteCall +;RtlRemoveVectoredContinueHandler RtlRemoveVectoredExceptionHandler@4 RtlResetRtlTranslations@4 RtlRestoreLastWin32Error@4=RtlSetLastWin32Error@4 +;RtlRevertMemoryStream RtlRunDecodeUnicodeString@8 RtlRunEncodeUnicodeString@8 RtlSecondsSince1970ToTime@8 RtlSecondsSince1980ToTime@8 -RtlSelfRelativeToAbsoluteSD2@8 +;RtlSeekMemoryStream RtlSelfRelativeToAbsoluteSD@44 +RtlSelfRelativeToAbsoluteSD2@8 RtlSetAllBits@4 RtlSetAttributesSecurityDescriptor@12 RtlSetBits@12 @@ -649,17 +863,27 @@ RtlSetCriticalSectionSpinCount@8 RtlSetCurrentDirectory_U@4 RtlSetCurrentEnvironment@8 RtlSetDaclSecurityDescriptor@16 +;RtlSetEnvironmentStrings RtlSetEnvironmentVariable@12 RtlSetGroupSecurityDescriptor@12 +;RtlSetHeapInformation RtlSetInformationAcl@16 +;RtlSetIoCompletionCallback RtlSetLastWin32Error@4 RtlSetLastWin32ErrorAndNtStatusFromNtStatus@4 +;RtlSetMemoryStreamSize RtlSetOwnerSecurityDescriptor@12 RtlSetProcessIsCritical@12 RtlSetSaclSecurityDescriptor@16 RtlSetSecurityDescriptorRMControl@8 RtlSetSecurityObject@20 +;RtlSetSecurityObjectEx +;RtlSetThreadErrorMode +;RtlSetThreadIsCritical +;RtlSetThreadPoolStartFunc RtlSetTimeZoneInformation@4 +;RtlSetTimer +;RtlSetUnhandledExceptionFilter ;RtlSetUnicodeCallouts RtlSetUserFlagsHeap@16 RtlSetUserValueHeap@16 @@ -668,6 +892,7 @@ RtlSleepConditionVariableCS@12 RtlSleepConditionVariableSRW@16 RtlSplay@4 ;RtlStartRXact +;RtlStatMemoryStream RtlStringFromGUID@8 RtlSubAuthorityCountSid@4 RtlSubAuthoritySid@8 @@ -679,10 +904,19 @@ RtlTimeToElapsedTimeFields@8 RtlTimeToSecondsSince1970@8 RtlTimeToSecondsSince1980@8 RtlTimeToTimeFields@8 +;RtlTraceDatabaseAdd +;RtlTraceDatabaseCreate +;RtlTraceDatabaseDestroy +;RtlTraceDatabaseEnumerate +;RtlTraceDatabaseFind +;RtlTraceDatabaseLock +;RtlTraceDatabaseUnlock +;RtlTraceDatabaseValidate RtlTryEnterCriticalSection@4 @RtlUlongByteSwap@4 @RtlUlonglongByteSwap@8 RtlUnhandledExceptionFilter@4 +;RtlUnhandledExceptionFilter2 RtlUnicodeStringToAnsiSize@4=RtlxUnicodeStringToAnsiSize@4 RtlUnicodeStringToAnsiString@12 RtlUnicodeStringToCountedOemString@12 @@ -696,6 +930,7 @@ RtlUnicodeToOemN@20 RtlUniform@4 RtlUnlockBootStatusData@4 RtlUnlockHeap@4 +;RtlUnlockMemoryStreamRegion RtlUnwind@16 RtlUpcaseUnicodeChar@4 RtlUpcaseUnicodeString@12 @@ -718,13 +953,21 @@ RtlValidateHeap@12 RtlValidateProcessHeaps@0 RtlValidateUnicodeString@8 RtlVerifyVersionInfo@16 +;RtlWalkFrameChain ;RtlWalkHeap +;RtlWow64EnableFsRedirection +;RtlWow64EnableFsRedirectionEx RtlWakeAllConditionVariable@4 RtlWakeConditionVariable@4 RtlWriteRegistryValue@24 +;RtlWriteMemoryStream +;RtlWriteRegistryValue ;RtlZeroHeap RtlZeroMemory@8 +;RtlZombifyActivationContext +;RtlpApplyLengthFunction RtlpEnsureBufferSize@12 +;RtlpNotOwnerCriticalSection RtlpNtCreateKey@24 RtlpNtEnumerateSubKey@16 RtlpNtMakeTemporaryKey@4 @@ -737,28 +980,39 @@ RtlxAnsiStringToUnicodeSize@4 RtlxOemStringToUnicodeSize@4 RtlxUnicodeStringToAnsiSize@4 RtlxUnicodeStringToOemSize@4 -;SaveEm87Context VerSetConditionMask@16 ZwAcceptConnectPort@24 ZwAccessCheck@32 ZwAccessCheckAndAuditAlarm@44 +ZwAccessCheckByType@44 +ZwAccessCheckByTypeAndAuditAlarm@64 +ZwAccessCheckByTypeResultList@44 +ZwAccessCheckByTypeResultListAndAuditAlarm@64 +ZwAccessCheckByTypeResultListAndAuditAlarmByHandle@68 ZwAddAtom@12 +ZwAddBootEntry@8 +ZwAddDriverEntry@8 ZwAdjustGroupsToken@24 ZwAdjustPrivilegesToken@24 ZwAlertResumeThread@8 ZwAlertThread@4 ZwAllocateLocallyUniqueId@4 +ZwAllocateUserPhysicalPages@12 ZwAllocateUuids@16 ZwAllocateVirtualMemory@24 +ZwApphelpCacheControl@8 ZwAssignProcessToJobObject@8 ZwCallbackReturn@12 +ZwCancelDeviceWakeupRequest@4 ZwCancelIoFile@8 ZwCancelTimer@8 ZwClearEvent@4 ZwClose@4 ZwCloseObjectAuditAlarm@12 +ZwCompactKeys@8 ZwCompareTokens@12 ZwCompleteConnectPort@4 +ZwCompressKey@4 ZwConnectPort@32 ZwContinue@8 ZwCreateDebugObject@16 @@ -768,13 +1022,16 @@ ZwCreateEventPair@12 ZwCreateFile@44 ZwCreateIoCompletion@16 ZwCreateJobObject@12 +ZwCreateJobSet@12 ZwCreateKey@28 +ZwCreateKeyedEvent@16 ZwCreateMailslotFile@32 ZwCreateMutant@16 ZwCreateNamedPipeFile@56 ZwCreatePagingFile@16 ZwCreatePort@20 ZwCreateProcess@32 +ZwCreateProcessEx@36 ZwCreateProfile@36 ZwCreateSection@28 ZwCreateSemaphore@20 @@ -783,9 +1040,12 @@ ZwCreateThread@32 ZwCreateTimer@16 ZwCreateToken@52 ZwCreateWaitablePort@20 +ZwDebugActiveProcess@8 ZwDebugContinue@12 ZwDelayExecution@8 ZwDeleteAtom@4 +ZwDeleteBootEntry@4 +ZwDeleteDriverEntry@4 ZwDeleteFile@4 ZwDeleteKey@4 ZwDeleteObjectAuditAlarm@12 @@ -794,9 +1054,13 @@ ZwDeviceIoControlFile@40 ZwDisplayString@4 ZwDuplicateObject@28 ZwDuplicateToken@24 +ZwEnumerateBootEntries@8 +ZwEnumerateDriverEntries@8 ZwEnumerateKey@24 +ZwEnumerateSystemEnvironmentValuesEx@12 ZwEnumerateValueKey@24 ZwExtendSection@8 +ZwFilterToken@24 ZwFindAtom@12 ZwFlushBuffersFile@8 ZwFlushInstructionCache@12 @@ -806,22 +1070,36 @@ ZwFlushWriteBuffer@0 ZwFreeVirtualMemory@16 ZwFsControlFile@40 ZwGetContextThread@8 +ZwGetCurrentProcessorNumber@0 +ZwGetDevicePowerState@8 ZwGetPlugPlayEvent@16 +ZwGetWriteWatch@28 ZwImpersonateAnonymousToken@4 ZwImpersonateClientOfPort@8 ZwImpersonateThread@12 ZwInitializeRegistry@4 +ZwInitiatePowerAction@16 ZwIsProcessInJob@8 +ZwIsSystemResumeAutomatic@0 ZwListenPort@8 ZwLoadDriver@4 ZwLoadKey@8 ZwLoadKey2@12 +ZwLoadKeyEx@16 ZwLockFile@40 +ZwLockProductActivationKeys@8 +ZwLockRegistryKey@4 ZwLockVirtualMemory@16 +ZwMakePermanentObject@4 ZwMakeTemporaryObject@4 +ZwMapUserPhysicalPages@12 +ZwMapUserPhysicalPagesScatter@12 ZwMapViewOfSection@40 +ZwModifyBootEntry@4 +ZwModifyDriverEntry@4 ZwNotifyChangeDirectoryFile@36 ZwNotifyChangeKey@40 +ZwNotifyChangeMultipleKeys@48 ZwOpenDirectoryObject@12 ZwOpenEvent@12 ZwOpenEventPair@12 @@ -829,29 +1107,35 @@ ZwOpenFile@24 ZwOpenIoCompletion@12 ZwOpenJobObject@12 ZwOpenKey@12 +ZwOpenKeyedEvent@12 ZwOpenMutant@12 ZwOpenObjectAuditAlarm@48 ZwOpenProcess@16 ZwOpenProcessToken@12 +ZwOpenProcessTokenEx@16 ZwOpenSection@12 ZwOpenSemaphore@12 ZwOpenSymbolicLinkObject@12 ZwOpenThread@16 ZwOpenThreadToken@16 +ZwOpenThreadTokenEx@20 ZwOpenTimer@12 ZwPlugPlayControl@12 ZwPowerInformation@20 ZwPrivilegeCheck@12 -ZwPrivilegedServiceAuditAlarm@20 ZwPrivilegeObjectAuditAlarm@24 +ZwPrivilegedServiceAuditAlarm@20 ZwProtectVirtualMemory@20 ZwPulseEvent@8 ZwQueryAttributesFile@8 +ZwQueryBootEntryOrder@8 +ZwQueryBootOptions@8 ZwQueryDebugFilterState@8 ZwQueryDefaultLocale@8 ZwQueryDefaultUILanguage@4 ZwQueryDirectoryFile@44 ZwQueryDirectoryObject@28 +ZwQueryDriverEntryOrder@8 ZwQueryEaFile@36 ZwQueryEvent@20 ZwQueryFullAttributesFile@8 @@ -869,12 +1153,17 @@ ZwQueryKey@20 ZwQueryMultipleValueKey@24 ZwQueryMutant@20 ZwQueryObject@20 +ZwQueryOpenSubKeys@8 +ZwQueryOpenSubKeysEx@16 ZwQueryPerformanceCounter@8 +ZwQueryPortInformationProcess@0 +ZwQueryQuotaInformationFile@36 ZwQuerySection@20 ZwQuerySecurityObject@20 ZwQuerySemaphore@20 ZwQuerySymbolicLinkObject@12 ZwQuerySystemEnvironmentValue@16 +ZwQuerySystemEnvironmentValueEx@20 ZwQuerySystemInformation@16 ZwQuerySystemTime@4 ZwQueryTimer@20 @@ -890,29 +1179,41 @@ ZwReadFileScatter@36 ZwReadRequestData@24 ZwReadVirtualMemory@20 ZwRegisterThreadTerminatePort@4 +ZwReleaseKeyedEvent@16 ZwReleaseMutant@8 ZwReleaseSemaphore@12 ZwRemoveIoCompletion@20 +ZwRemoveProcessDebug@8 +ZwRenameKey@8 ZwReplaceKey@12 ZwReplyPort@8 ZwReplyWaitReceivePort@16 ZwReplyWaitReceivePortEx@20 ZwReplyWaitReplyPort@8 +ZwRequestDeviceWakeup@4 ZwRequestPort@8 ZwRequestWaitReplyPort@12 +ZwRequestWakeupLatency@4 ZwResetEvent@8 +ZwResetWriteWatch@12 ZwRestoreKey@12 ZwResumeProcess@4 ZwResumeThread@8 ZwSaveKey@8 +ZwSaveKeyEx@12 +ZwSaveMergedKeys@12 ZwSecureConnectPort@36 +ZwSetBootEntryOrder@8 +ZwSetBootOptions@8 ZwSetContextThread@8 ZwSetDebugFilterState@12 ZwSetDefaultHardErrorPort@4 ZwSetDefaultLocale@8 ZwSetDefaultUILanguage@4 +ZwSetDriverEntryOrder@8 ZwSetEaFile@16 ZwSetEvent@8 +ZwSetEventBoostPriority@4 ZwSetHighEventPair@4 ZwSetHighWaitLowEventPair@4 ZwSetInformationDebugObject@20 @@ -928,11 +1229,14 @@ ZwSetIoCompletion@20 ZwSetLdtEntries@24 ZwSetLowEventPair@4 ZwSetLowWaitHighEventPair@4 +ZwSetQuotaInformationFile@16 ZwSetSecurityObject@12 ZwSetSystemEnvironmentValue@8 +ZwSetSystemEnvironmentValueEx@8 ZwSetSystemInformation@12 ZwSetSystemPowerState@12 ZwSetSystemTime@8 +ZwSetThreadExecutionState@8 ZwSetTimer@28 ZwSetTimerResolution@12 ZwSetUuidSeed@4 @@ -949,14 +1253,20 @@ ZwTerminateJobObject@8 ZwTerminateProcess@8 ZwTerminateThread@8 ZwTestAlert@0 +ZwTraceEvent@16 +ZwTranslateFilePath@16 ZwUnloadDriver@4 ZwUnloadKey@4 +ZwUnloadKey2@8 +ZwUnloadKeyEx@8 ZwUnlockFile@20 ZwUnlockVirtualMemory@16 ZwUnmapViewOfSection@8 ZwVdmControl@8 ZwWaitForDebugEvent@16 +ZwWaitForKeyedEvent@16 ZwWaitForMultipleObjects@20 +ZwWaitForMultipleObjects32@20 ZwWaitForSingleObject@12 ZwWaitHighEventPair@4 ZwWaitLowEventPair@4 @@ -965,11 +1275,17 @@ ZwWriteFileGather@36 ZwWriteRequestData@24 ZwWriteVirtualMemory@20 ZwYieldExecution@0 +;_CIcos +;_CIlog +;_CIpow +;_CIsin +;_CIsqrt __isascii __iscsym __iscsymf __toascii _alldiv +;_alldvrm _allmul _alloca_probe _allrem @@ -977,6 +1293,7 @@ _allshl _allshr _atoi64 _aulldiv +;_aulldvrm _aullrem _aullshr _chkstk @@ -1005,11 +1322,13 @@ _ui64toa _ui64tow _ultoa _ultow +;_vscwprintf _vsnprintf _vsnwprintf _wcsicmp _wcslwr _wcsnicmp +;_wcstoui64 _wcsupr _wtoi _wtoi64 @@ -1069,15 +1388,15 @@ strspn strstr strtol strtoul -strtoull swprintf tan tolower toupper towlower towupper -vsprintf +vDbgPrintEx@16 vDbgPrintExWithPrefix@20 +vsprintf wcscat wcschr wcscmp @@ -1094,4 +1413,3 @@ wcsstr wcstol wcstombs wcstoul -; EOF From d2ba8bac964170c4f7b34b78a345ae9e971f6475 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sun, 31 Aug 2008 15:29:21 +0000 Subject: [PATCH 261/324] Replace some ExFreePool by ExFreePoolWithTag svn path=/trunk/; revision=35834 --- reactos/ntoskrnl/config/cmalloc.c | 6 +++--- reactos/ntoskrnl/config/cmconfig.c | 2 +- reactos/ntoskrnl/config/cmse.c | 4 ++-- reactos/ntoskrnl/config/cmsysini.c | 14 ++++++------- reactos/ntoskrnl/config/i386/cmhardwr.c | 4 ++-- reactos/ntoskrnl/ex/init.c | 2 +- reactos/ntoskrnl/fstub/disksup.c | 27 +++++++++++++------------ reactos/ntoskrnl/io/iomgr/arcname.c | 10 ++++----- reactos/ntoskrnl/io/iomgr/device.c | 8 ++++---- reactos/ntoskrnl/io/iomgr/driver.c | 4 +++- reactos/ntoskrnl/io/iomgr/drvrlist.c | 6 ++++-- reactos/ntoskrnl/io/iomgr/file.c | 2 +- reactos/ntoskrnl/io/iomgr/iofunc.c | 2 +- reactos/ntoskrnl/io/iomgr/iorsrce.c | 18 ++++++++--------- reactos/ntoskrnl/io/iomgr/irp.c | 4 ++-- reactos/ntoskrnl/mm/section.c | 8 ++++---- reactos/ntoskrnl/mm/sysldr.c | 20 +++++++++--------- reactos/ntoskrnl/ob/obdir.c | 6 +++--- reactos/ntoskrnl/ob/obhandle.c | 6 +++--- reactos/ntoskrnl/ob/obname.c | 2 +- reactos/ntoskrnl/ob/obsecure.c | 4 ++-- reactos/ntoskrnl/ob/obwait.c | 2 +- reactos/ntoskrnl/rtl/libsupp.c | 20 +++++++++--------- reactos/ntoskrnl/se/sd.c | 12 ++++++----- 24 files changed, 101 insertions(+), 92 deletions(-) diff --git a/reactos/ntoskrnl/config/cmalloc.c b/reactos/ntoskrnl/config/cmalloc.c index 3c8cdbbcc35..a0e6c0a6b83 100644 --- a/reactos/ntoskrnl/config/cmalloc.c +++ b/reactos/ntoskrnl/config/cmalloc.c @@ -62,7 +62,7 @@ CmpFreeKeyControlBlock(IN PCM_KEY_CONTROL_BLOCK Kcb) if (!Kcb->PrivateAlloc) { /* Free it from the pool */ - ExFreePool(Kcb); + ExFreePoolWithTag(Kcb, TAG_CM); return; } @@ -99,7 +99,7 @@ CmpFreeKeyControlBlock(IN PCM_KEY_CONTROL_BLOCK Kcb) } /* Free the page */ - ExFreePool(AllocPage); + ExFreePoolWithTag(AllocPage, TAG_CM); } /* Release the lock */ @@ -296,7 +296,7 @@ CmpFreeDelayItem(PVOID Entry) } /* Now free the page */ - ExFreePool(AllocPage); + ExFreePoolWithTag(AllocPage, TAG_CM); } /* Release the lock */ diff --git a/reactos/ntoskrnl/config/cmconfig.c b/reactos/ntoskrnl/config/cmconfig.c index e56a60ca2fd..7aae14da7a6 100644 --- a/reactos/ntoskrnl/config/cmconfig.c +++ b/reactos/ntoskrnl/config/cmconfig.c @@ -386,7 +386,7 @@ CmpInitializeHardwareConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBlock) } /* Close our handle, free the buffer and return status */ - ExFreePool(CmpConfigurationData); + ExFreePoolWithTag(CmpConfigurationData, TAG_CM); NtClose(KeyHandle); return Status; } diff --git a/reactos/ntoskrnl/config/cmse.c b/reactos/ntoskrnl/config/cmse.c index 16e91241688..4ee2335c064 100644 --- a/reactos/ntoskrnl/config/cmse.c +++ b/reactos/ntoskrnl/config/cmse.c @@ -129,8 +129,8 @@ CmpHiveRootSecurityDescriptor(VOID) if (!NT_SUCCESS(Status)) KeBugCheckEx(REGISTRY_ERROR, 11, 8, Status, 0); /* Free the SIDs and original ACL */ - for (i = 0; i < 4; i++) ExFreePool(Sid[i]); - ExFreePool(Acl); + for (i = 0; i < 4; i++) ExFreePoolWithTag(Sid[i], TAG_CM); + ExFreePoolWithTag(Acl, TAG_CM); /* Return the security descriptor */ return SecurityDescriptor; diff --git a/reactos/ntoskrnl/config/cmsysini.c b/reactos/ntoskrnl/config/cmsysini.c index 59321b9b0c3..f95e6ed2e81 100644 --- a/reactos/ntoskrnl/config/cmsysini.c +++ b/reactos/ntoskrnl/config/cmsysini.c @@ -804,7 +804,7 @@ CmpInitializeSystemHive(IN PLOADER_PARAMETER_BLOCK LoaderBlock) SecurityDescriptor); /* Free the security descriptor */ - ExFreePool(SecurityDescriptor); + ExFreePoolWithTag(SecurityDescriptor, TAG_CM); if (!NT_SUCCESS(Status)) return FALSE; /* Add the hive to the hive list */ @@ -944,7 +944,7 @@ CmpCreateRegistryRoot(VOID) 0, 0, (PVOID*)&RootKey); - ExFreePool(SecurityDescriptor); + ExFreePoolWithTag(SecurityDescriptor, TAG_CM); if (!NT_SUCCESS(Status)) return FALSE; /* Sanity check, and get the key cell */ @@ -1041,7 +1041,7 @@ CmpGetRegistryPath(IN PWCHAR ConfigPath) if (!NT_SUCCESS(Status)) { /* Fail */ - ExFreePool(ValueInfo); + ExFreePoolWithTag(ValueInfo, TAG_CM); return Status; } @@ -1050,7 +1050,7 @@ CmpGetRegistryPath(IN PWCHAR ConfigPath) ValueInfo->Data, ValueInfo->DataLength); ConfigPath[ValueInfo->DataLength / sizeof(WCHAR)] = UNICODE_NULL; - ExFreePool(ValueInfo); + ExFreePoolWithTag(ValueInfo, TAG_CM); } else { @@ -1356,7 +1356,7 @@ CmpInitializeHiveList(IN USHORT Flag) } /* Get rid of the SD */ - ExFreePool(SecurityDescriptor); + ExFreePoolWithTag(SecurityDescriptor, TAG_CM); /* FIXME: Link SECURITY to SAM */ @@ -1541,7 +1541,7 @@ CmInitSystem1(VOID) /* FIXME: Add to HiveList key */ /* Free the security descriptor */ - ExFreePool(SecurityDescriptor); + ExFreePoolWithTag(SecurityDescriptor, TAG_CM); /* Fill out the Hardware key with the ARC Data from the Loader */ Status = CmpInitializeHardwareConfiguration(KeLoaderBlock); @@ -1568,7 +1568,7 @@ CmInitSystem1(VOID) } /* Free the load options */ - ExFreePool(CmpLoadOptions.Buffer); + ExFreePoolWithTag(CmpLoadOptions.Buffer, TAG_CM); /* If we got here, all went well */ return TRUE; diff --git a/reactos/ntoskrnl/config/i386/cmhardwr.c b/reactos/ntoskrnl/config/i386/cmhardwr.c index 90b72c7931e..a3a04fe7e58 100644 --- a/reactos/ntoskrnl/config/i386/cmhardwr.c +++ b/reactos/ntoskrnl/config/i386/cmhardwr.c @@ -546,7 +546,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc } /* Free the configuration data */ - ExFreePool(CmpConfigurationData); + ExFreePoolWithTag(CmpConfigurationData, TAG_CM); } /* Open physical memory */ @@ -824,7 +824,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc ZwClose(SectionHandle); /* Free the BIOS version string buffer */ - if (BiosVersion) ExFreePool(BiosVersion); + if (BiosVersion) ExFreePoolWithTag(BiosVersion, TAG_CM); Quickie: /* Close the procesor handle */ diff --git a/reactos/ntoskrnl/ex/init.c b/reactos/ntoskrnl/ex/init.c index 4ce02eb6a69..9e3c6f4d28a 100644 --- a/reactos/ntoskrnl/ex/init.c +++ b/reactos/ntoskrnl/ex/init.c @@ -324,7 +324,7 @@ ExpInitNls(IN PLOADER_PARAMETER_BLOCK LoaderBlock) RtlCopyMemory(SectionBase, ExpNlsTableBase, ExpNlsTableSize); /* Free the previously allocated buffer and set the new location */ - ExFreePool(ExpNlsTableBase); + ExFreePoolWithTag(ExpNlsTableBase, TAG('R', 't', 'l', 'i')); ExpNlsTableBase = SectionBase; /* Initialize the NLS Tables */ diff --git a/reactos/ntoskrnl/fstub/disksup.c b/reactos/ntoskrnl/fstub/disksup.c index 462e522a9cc..725ac343b75 100644 --- a/reactos/ntoskrnl/fstub/disksup.c +++ b/reactos/ntoskrnl/fstub/disksup.c @@ -948,7 +948,7 @@ HalpGetFullGeometry(IN PDEVICE_OBJECT DeviceObject, if (!Irp) { /* Fail, free the event */ - ExFreePool(Event); + ExFreePoolWithTag(Event, TAG_FILE_SYSTEM); return STATUS_INSUFFICIENT_RESOURCES; } @@ -977,7 +977,7 @@ HalpGetFullGeometry(IN PDEVICE_OBJECT DeviceObject, if (!Irp) { /* Fail, free the event */ - ExFreePool(Event); + ExFreePoolWithTag(Event, TAG_FILE_SYSTEM); return STATUS_INSUFFICIENT_RESOURCES; } @@ -1000,7 +1000,7 @@ HalpGetFullGeometry(IN PDEVICE_OBJECT DeviceObject, } /* Free the event and return the Status */ - ExFreePool(Event); + ExFreePoolWithTag(Event, TAG_FILE_SYSTEM); return Status; } @@ -1200,7 +1200,7 @@ xHalGetPartialGeometry(IN PDEVICE_OBJECT DeviceObject, Cleanup: /* Free all the pointers */ - if (Event) ExFreePool(Event); + if (Event) ExFreePoolWithTag(Event, TAG_FILE_SYSTEM); if (IoStatusBlock) ExFreePool(IoStatusBlock); if (DiskGeometry) ExFreePool(DiskGeometry); return; @@ -1251,7 +1251,7 @@ xHalExamineMBR(IN PDEVICE_OBJECT DeviceObject, if (!Irp) { /* Failed */ - ExFreePool(Buffer); + ExFreePoolWithTag(Buffer, TAG_FILE_SYSTEM); return; } @@ -1275,7 +1275,7 @@ xHalExamineMBR(IN PDEVICE_OBJECT DeviceObject, if (((PUSHORT)Buffer)[BOOT_SIGNATURE_OFFSET] != BOOT_RECORD_SIGNATURE) { /* Failed */ - ExFreePool(Buffer); + ExFreePoolWithTag(Buffer, TAG_FILE_SYSTEM); return; } @@ -1287,7 +1287,7 @@ xHalExamineMBR(IN PDEVICE_OBJECT DeviceObject, if (PartitionDescriptor->PartitionType != MbrTypeIdentifier) { /* It's not, free our buffer */ - ExFreePool(Buffer); + ExFreePoolWithTag(Buffer, TAG_FILE_SYSTEM); } else { @@ -1367,7 +1367,7 @@ xHalIoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject, Status = HalpGetFullGeometry(DeviceObject, &DiskGeometry, &MaxOffset); if (!NT_SUCCESS(Status)) { - ExFreePool(*PartitionBuffer); + ExFreePoolWithTag(*PartitionBuffer, TAG_FILE_SYSTEM); *PartitionBuffer = NULL; return Status; } @@ -1383,7 +1383,8 @@ xHalIoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject, if (!Buffer) { /* Fail, free the input buffer */ - ExFreePool(*PartitionBuffer); + ExFreePoolWithTag(*PartitionBuffer, TAG_FILE_SYSTEM); + *PartitionBuffer = NULL; return STATUS_INSUFFICIENT_RESOURCES; } @@ -1549,7 +1550,7 @@ xHalIoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject, BufferSize); /* Free the old buffer and set this one as the new one */ - ExFreePool(*PartitionBuffer); + ExFreePoolWithTag(*PartitionBuffer, TAG_FILE_SYSTEM); *PartitionBuffer = DriveLayoutInfo; /* Double the size */ @@ -1732,8 +1733,8 @@ xHalIoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject, if (!i) (*PartitionBuffer)->Signature = 0; /* Free the buffer and check for success */ - if (Buffer) ExFreePool(Buffer); - if (!NT_SUCCESS(Status)) ExFreePool(*PartitionBuffer); + if (Buffer) ExFreePoolWithTag(Buffer, TAG_FILE_SYSTEM); + if (!NT_SUCCESS(Status)) ExFreePoolWithTag(*PartitionBuffer, TAG_FILE_SYSTEM); /* Return status */ return Status; @@ -2212,7 +2213,7 @@ xHalIoWritePartitionTable(IN PDEVICE_OBJECT DeviceObject, } /* If we had a buffer, free it, then return status */ - if (Buffer) ExFreePool(Buffer); + if (Buffer) ExFreePoolWithTag(Buffer, TAG_FILE_SYSTEM); return Status; } diff --git a/reactos/ntoskrnl/io/iomgr/arcname.c b/reactos/ntoskrnl/io/iomgr/arcname.c index c18a31c3d62..6560a3d732f 100644 --- a/reactos/ntoskrnl/io/iomgr/arcname.c +++ b/reactos/ntoskrnl/io/iomgr/arcname.c @@ -242,8 +242,8 @@ IopGetDiskInformation(IN ULONG i, if (!NT_SUCCESS(Status)) { /* Try again */ - ExFreePool(PartitionBuffer); - ExFreePool(DriveLayout); + ExFreePoolWithTag(PartitionBuffer, TAG_IO); + ExFreePoolWithTag(DriveLayout, TAG_FILE_SYSTEM); return FALSE; } @@ -257,8 +257,8 @@ IopGetDiskInformation(IN ULONG i, *PartitionCount = DriveLayout->PartitionCount; /* Free the buffer */ - ExFreePool(PartitionBuffer); - ExFreePool(DriveLayout); + ExFreePoolWithTag(PartitionBuffer, TAG_IO); + ExFreePoolWithTag(DriveLayout, TAG_FILE_SYSTEM); return TRUE; } @@ -574,7 +574,7 @@ IopCreateArcNames(IN PLOADER_PARAMETER_BLOCK LoaderBlock) } /* Free the buffer */ - ExFreePool(PartitionBuffer); + ExFreePoolWithTag(PartitionBuffer, TAG_IO); } /* Return success */ diff --git a/reactos/ntoskrnl/io/iomgr/device.c b/reactos/ntoskrnl/io/iomgr/device.c index d010cb09818..4d88d8c88c8 100644 --- a/reactos/ntoskrnl/io/iomgr/device.c +++ b/reactos/ntoskrnl/io/iomgr/device.c @@ -122,7 +122,7 @@ IoShutdownRegisteredDevices(VOID) } /* Free the shutdown entry and reset the event */ - ExFreePool(ShutdownEntry); + ExFreePoolWithTag(ShutdownEntry, TAG_SHUTDOWN_ENTRY); KeClearEvent(&Event); /* Go to the next entry */ @@ -317,7 +317,7 @@ IopUnloadDevice(IN PDEVICE_OBJECT DeviceObject) if (DeviceObject->SecurityDescriptor) { /* Free it */ - ExFreePool(DeviceObject->SecurityDescriptor); + ExFreePoolWithTag(DeviceObject->SecurityDescriptor, TAG_SD); } /* Remove the device from the list */ @@ -1328,7 +1328,7 @@ IoUnregisterShutdownNotification(PDEVICE_OBJECT DeviceObject) NextEntry = NextEntry->Blink; /* Free the entry */ - ExFreePool(ShutdownEntry); + ExFreePoolWithTag(ShutdownEntry, TAG_SHUTDOWN_ENTRY); } /* Go to the next entry */ @@ -1352,7 +1352,7 @@ IoUnregisterShutdownNotification(PDEVICE_OBJECT DeviceObject) NextEntry = NextEntry->Blink; /* Free the entry */ - ExFreePool(ShutdownEntry); + ExFreePoolWithTag(ShutdownEntry, TAG_SHUTDOWN_ENTRY); } /* Go to the next entry */ diff --git a/reactos/ntoskrnl/io/iomgr/driver.c b/reactos/ntoskrnl/io/iomgr/driver.c index 90fddac6eb7..68aeeea33d0 100644 --- a/reactos/ntoskrnl/io/iomgr/driver.c +++ b/reactos/ntoskrnl/io/iomgr/driver.c @@ -29,6 +29,8 @@ UNICODE_STRING IopHardwareDatabaseKey = POBJECT_TYPE IoDriverObjectType = NULL; +#define TAG_RTLREGISTRY TAG('R', 'q', 'r', 'v') + extern BOOLEAN ExpInTextModeSetup; /* PRIVATE FUNCTIONS **********************************************************/ @@ -246,7 +248,7 @@ IopNormalizeImagePath( RtlAppendUnicodeStringToString(ImagePath, &InputImagePath); /* Free caller's string */ - RtlFreeUnicodeString(&InputImagePath); + ExFreePoolWithTag(InputImagePath.Buffer, TAG_RTLREGISTRY); } return STATUS_SUCCESS; diff --git a/reactos/ntoskrnl/io/iomgr/drvrlist.c b/reactos/ntoskrnl/io/iomgr/drvrlist.c index b1abfc1c16e..e8f3a720ee4 100644 --- a/reactos/ntoskrnl/io/iomgr/drvrlist.c +++ b/reactos/ntoskrnl/io/iomgr/drvrlist.c @@ -37,6 +37,8 @@ typedef struct _SERVICE /* BOOLEAN ServiceRunning;*/ // needed ?? } SERVICE, *PSERVICE; +#define TAG_RTLREGISTRY TAG('R', 'q', 'r', 'v') + /* GLOBALS ********************************************************************/ LIST_ENTRY GroupListHead = {NULL, NULL}; @@ -205,11 +207,11 @@ IopCreateServiceListEntry(PUNICODE_STRING ServiceName) */ if (Service->ServiceGroup.Buffer) { - ExFreePool(Service->ServiceGroup.Buffer); + ExFreePoolWithTag(Service->ServiceGroup.Buffer, TAG_RTLREGISTRY); } if (Service->ImagePath.Buffer) { - ExFreePool(Service->ImagePath.Buffer); + ExFreePoolWithTag(Service->ImagePath.Buffer, TAG_RTLREGISTRY); } ExFreePool(Service); return(Status); diff --git a/reactos/ntoskrnl/io/iomgr/file.c b/reactos/ntoskrnl/io/iomgr/file.c index fd92560aee0..2efe9b05784 100644 --- a/reactos/ntoskrnl/io/iomgr/file.c +++ b/reactos/ntoskrnl/io/iomgr/file.c @@ -1031,7 +1031,7 @@ IopDeleteFile(IN PVOID ObjectBody) /* Clear the file name */ if (FileObject->FileName.Buffer) { - ExFreePool(FileObject->FileName.Buffer); + ExFreePoolWithTag(FileObject->FileName.Buffer, TAG_IO_NAME); FileObject->FileName.Buffer = NULL; } diff --git a/reactos/ntoskrnl/io/iomgr/iofunc.c b/reactos/ntoskrnl/io/iomgr/iofunc.c index bc4bc770977..a6abaf8c693 100644 --- a/reactos/ntoskrnl/io/iomgr/iofunc.c +++ b/reactos/ntoskrnl/io/iomgr/iofunc.c @@ -1890,7 +1890,7 @@ NtQueryInformationFile(IN HANDLE FileHandle, { /* Clear it in the IRP for completion */ Irp->UserEvent = NULL; - ExFreePool(Event); + ExFreePoolWithTag(Event, TAG_IO); } /* Set the caller IOSB */ diff --git a/reactos/ntoskrnl/io/iomgr/iorsrce.c b/reactos/ntoskrnl/io/iomgr/iorsrce.c index 23828e9f774..6e0d2f37134 100644 --- a/reactos/ntoskrnl/io/iomgr/iorsrce.c +++ b/reactos/ntoskrnl/io/iomgr/iorsrce.c @@ -179,7 +179,7 @@ IopQueryDeviceDescription( if (!NT_SUCCESS(Status)) { if (ControllerFullInformation != NULL) - ExFreePool(ControllerFullInformation); + ExFreePoolWithTag(ControllerFullInformation, TAG_IO_RESOURCE); return Status; } @@ -188,7 +188,7 @@ IopQueryDeviceDescription( MaximumControllerNumber = ControllerFullInformation->SubKeys; /* Free Memory */ - ExFreePool(ControllerFullInformation); + ExFreePoolWithTag(ControllerFullInformation, TAG_IO_RESOURCE); ControllerFullInformation = NULL; } @@ -318,7 +318,7 @@ IopQueryDeviceDescription( MaximumPeripheralNumber = PeripheralFullInformation->SubKeys; /* Free Memory */ - ExFreePool(PeripheralFullInformation); + ExFreePoolWithTag(PeripheralFullInformation, TAG_IO_RESOURCE); PeripheralFullInformation = NULL; } @@ -400,7 +400,7 @@ IopQueryDeviceDescription( { if (PeripheralInformation[PeripheralLoop]) { - ExFreePool(PeripheralInformation[PeripheralLoop]); + ExFreePoolWithTag(PeripheralInformation[PeripheralLoop], TAG_IO_RESOURCE); PeripheralInformation[PeripheralLoop] = NULL; } } @@ -416,7 +416,7 @@ EndLoop: { if (ControllerInformation[ControllerLoop]) { - ExFreePool(ControllerInformation[ControllerLoop]); + ExFreePoolWithTag(ControllerInformation[ControllerLoop], TAG_IO_RESOURCE); ControllerInformation[ControllerLoop] = NULL; } } @@ -498,7 +498,7 @@ IopQueryBusDescription( } /* Deallocate the old Buffer */ - ExFreePool(FullInformation); + ExFreePoolWithTag(FullInformation, TAG_IO_RESOURCE); /* Try to find a Bus */ for (BusLoop = 0; NT_SUCCESS(Status); BusLoop++) @@ -619,7 +619,7 @@ IopQueryBusDescription( { if (BusInformation[SubBusLoop]) { - ExFreePool(BusInformation[SubBusLoop]); + ExFreePoolWithTag(BusInformation[SubBusLoop], TAG_IO_RESOURCE); BusInformation[SubBusLoop] = NULL; } } @@ -645,7 +645,7 @@ IopQueryBusDescription( /* Free the last remaining Allocated Memory */ if (BasicInformation) - ExFreePool(BasicInformation); + ExFreePoolWithTag(BasicInformation, TAG_IO_RESOURCE); return Status; } @@ -788,7 +788,7 @@ IoQueryDeviceDescription(PINTERFACE_TYPE BusType OPTIONAL, } /* Free Memory */ - ExFreePool(RootRegKey.Buffer); + ExFreePoolWithTag(RootRegKey.Buffer, TAG_IO_RESOURCE); return Status; } diff --git a/reactos/ntoskrnl/io/iomgr/irp.c b/reactos/ntoskrnl/io/iomgr/irp.c index 0a2b65ac57b..0d445bb1abb 100644 --- a/reactos/ntoskrnl/io/iomgr/irp.c +++ b/reactos/ntoskrnl/io/iomgr/irp.c @@ -1499,7 +1499,7 @@ IoFreeIrp(IN PIRP Irp) if (!(Irp->AllocationFlags & IRP_ALLOCATED_FIXED_SIZE)) { /* Free it */ - ExFreePool(Irp); + ExFreePoolWithTag(Irp, TAG_IRP); } else { @@ -1528,7 +1528,7 @@ IoFreeIrp(IN PIRP Irp) { /* All lists failed, use the pool */ List->L.FreeMisses++; - ExFreePool(Irp); + ExFreePoolWithTag(Irp, TAG_IRP); Irp = NULL; } } diff --git a/reactos/ntoskrnl/mm/section.c b/reactos/ntoskrnl/mm/section.c index 00a15702668..fd4ec5181ff 100644 --- a/reactos/ntoskrnl/mm/section.c +++ b/reactos/ntoskrnl/mm/section.c @@ -136,7 +136,7 @@ MmGetFileNameForSection(IN PROS_SECTION_OBJECT Section, if (!NT_SUCCESS(Status)) { /* Failed, free memory */ - ExFreePool(ObjectNameInfo); + ExFreePoolWithTag(ObjectNameInfo, TAG('M', 'm', ' ', ' ')); return Status; } @@ -2759,7 +2759,7 @@ ExeFmtpReadFile(IN PVOID File, } else { - ExFreePool(Buffer); + ExFreePoolWithTag(Buffer, TAG('M', 'm', 'X', 'r')); } return Status; @@ -3168,7 +3168,7 @@ ExeFmtpCreateImageSection(HANDLE FileHandle, break; } - ExFreePool(FileHeaderBuffer); + ExFreePoolWithTag(FileHeaderBuffer, TAG('M', 'm', 'X', 'r')); /* * No loader handled the format @@ -3963,7 +3963,7 @@ MmUnmapViewOfSegment(PMM_AVL_TABLE AddressSpace, { CurrentEntry = RemoveHeadList(RegionListHead); CurrentRegion = CONTAINING_RECORD(CurrentEntry, MM_REGION, RegionListEntry); - ExFreePool(CurrentRegion); + ExFreePoolWithTag(CurrentRegion, TAG_MM_REGION); } if (Section->AllocationAttributes & SEC_PHYSICALMEMORY) diff --git a/reactos/ntoskrnl/mm/sysldr.c b/reactos/ntoskrnl/mm/sysldr.c index aacc93c4836..78eaf46f716 100644 --- a/reactos/ntoskrnl/mm/sysldr.c +++ b/reactos/ntoskrnl/mm/sysldr.c @@ -660,7 +660,7 @@ MiSnapThunk(IN PVOID DllBase, &MissingForwarder); /* Free the forwarder name and set the thunk */ - ExFreePool(ForwardName); + ExFreePoolWithTag(ForwardName, TAG_LDR_WSTR); Address->u1 = ForwardThunk.u1; break; } @@ -876,7 +876,7 @@ MiResolveImageReferences(IN PVOID ImageBase, { /* Failed */ MiDereferenceImports(LoadedImports); - if (LoadedImports) ExFreePool(LoadedImports); + if (LoadedImports) ExFreePoolWithTag(LoadedImports, TAG_LDR_WSTR); return Status; } @@ -997,7 +997,7 @@ CheckDllState: /* Cleanup and return */ RtlFreeUnicodeString(&NameString); MiDereferenceImports(LoadedImports); - if (LoadedImports) ExFreePool(LoadedImports); + if (LoadedImports) ExFreePoolWithTag(LoadedImports, TAG_LDR_WSTR); return Status; } @@ -1030,7 +1030,7 @@ CheckDllState: { /* Cleanup and return */ MiDereferenceImports(LoadedImports); - if (LoadedImports) ExFreePool(LoadedImports); + if (LoadedImports) ExFreePoolWithTag(LoadedImports, TAG_LDR_WSTR); return STATUS_DRIVER_ENTRYPOINT_NOT_FOUND; } @@ -1059,7 +1059,7 @@ CheckDllState: { /* Cleanup and return */ MiDereferenceImports(LoadedImports); - if (LoadedImports) ExFreePool(LoadedImports); + if (LoadedImports) ExFreePoolWithTag(LoadedImports, TAG_LDR_WSTR); return Status; } @@ -1091,13 +1091,13 @@ CheckDllState: if (!ImportCount) { /* Free the list and set it to no imports */ - ExFreePool(LoadedImports); + ExFreePoolWithTag(LoadedImports, TAG_LDR_WSTR); LoadedImports = (PVOID)-2; } else if (ImportCount == 1) { /* Just one entry, we can free the table and only use our entry */ - ExFreePool(LoadedImports); + ExFreePoolWithTag(LoadedImports, TAG_LDR_WSTR); LoadedImports = (PLOAD_IMPORTS)ImportEntry; } else if (ImportCount != LoadedImports->Count) @@ -1125,7 +1125,7 @@ CheckDllState: } /* Free the old copy */ - ExFreePool(LoadedImports); + ExFreePoolWithTag(LoadedImports, TAG_LDR_WSTR); LoadedImports = NewImports; } } @@ -1834,7 +1834,7 @@ LoaderScan: } /* Free the entry itself */ - ExFreePool(LdrEntry); + ExFreePoolWithTag(LdrEntry, TAG_MODULE_OBJECT); LdrEntry = NULL; goto Quickie; } @@ -1924,7 +1924,7 @@ Quickie: if (NamePrefix) ExFreePool(PrefixName.Buffer); /* Free the name buffer and return status */ - ExFreePool(Buffer); + ExFreePoolWithTag(Buffer, TAG_LDR_WSTR); return Status; } diff --git a/reactos/ntoskrnl/ob/obdir.c b/reactos/ntoskrnl/ob/obdir.c index 7fc6c1acb51..0bccc1234a0 100644 --- a/reactos/ntoskrnl/ob/obdir.c +++ b/reactos/ntoskrnl/ob/obdir.c @@ -326,7 +326,7 @@ ObpDeleteEntryDirectory(POBP_LOOKUP_CONTEXT Context) CurrentEntry->ChainLink = NULL; /* Free it */ - ExFreePool(CurrentEntry); + ExFreePoolWithTag(CurrentEntry, OB_DIR_TAG); /* Return */ return TRUE; @@ -529,7 +529,7 @@ NtQueryDirectoryObject(IN HANDLE DirectoryHandle, if (!NT_SUCCESS(Status)) { /* Free the buffer and fail */ - ExFreePool(LocalBuffer); + ExFreePoolWithTag(LocalBuffer, OB_NAME_TAG); return Status; } @@ -701,7 +701,7 @@ Quickie: /* Dereference the directory and free our buffer */ ObDereferenceObject(Directory); - ExFreePool(LocalBuffer); + ExFreePoolWithTag(LocalBuffer, OB_NAME_TAG); /* Return status to caller */ return Status; diff --git a/reactos/ntoskrnl/ob/obhandle.c b/reactos/ntoskrnl/ob/obhandle.c index 9ec6266471e..5916040c591 100644 --- a/reactos/ntoskrnl/ob/obhandle.c +++ b/reactos/ntoskrnl/ob/obhandle.c @@ -289,7 +289,7 @@ ObpInsertHandleCount(IN POBJECT_HEADER ObjectHeader) else { /* Otherwise we had a DB, free it */ - ExFreePool(OldHandleDatabase); + ExFreePoolWithTag(OldHandleDatabase, TAG_OB_HANDLE); } /* Find the end of the copy and zero out the new data */ @@ -2425,7 +2425,7 @@ ObOpenObjectByName(IN POBJECT_ATTRIBUTES ObjectAttributes, if (!NT_SUCCESS(Status)) { /* Fail */ - ExFreePool(TempBuffer); + ExFreePoolWithTag(TempBuffer, TAG_OB_TEMP_STORAGE); return Status; } @@ -2533,7 +2533,7 @@ Quickie: /* Release the object attributes and temporary buffer */ ObpReleaseObjectCreateInformation(&TempBuffer->ObjectCreateInfo); if (ObjectName.Buffer) ObpFreeObjectNameBuffer(&ObjectName); - ExFreePool(TempBuffer); + ExFreePoolWithTag(TempBuffer, TAG_OB_TEMP_STORAGE); /* Return status */ OBTRACE(OB_HANDLE_DEBUG, diff --git a/reactos/ntoskrnl/ob/obname.c b/reactos/ntoskrnl/ob/obname.c index a23a2df9e89..79800319003 100644 --- a/reactos/ntoskrnl/ob/obname.c +++ b/reactos/ntoskrnl/ob/obname.c @@ -720,7 +720,7 @@ ParseFromRoot: if (ObjectNameInfo->Name.Buffer) { /* Free it */ - ExFreePool(ObjectNameInfo->Name.Buffer); + ExFreePoolWithTag(ObjectNameInfo->Name.Buffer, OB_NAME_TAG ); } /* Write new one */ diff --git a/reactos/ntoskrnl/ob/obsecure.c b/reactos/ntoskrnl/ob/obsecure.c index 6d4653804a0..493f3a45e3b 100644 --- a/reactos/ntoskrnl/ob/obsecure.c +++ b/reactos/ntoskrnl/ob/obsecure.c @@ -40,7 +40,7 @@ ObAssignObjectSecurityDescriptor(IN PVOID Object, if (NT_SUCCESS(Status)) { /* Free the old copy */ - ExFreePool(SecurityDescriptor); + ExFreePoolWithTag(SecurityDescriptor, TAG_SD); /* Set the new pointer */ ASSERT(NewSd); @@ -633,7 +633,7 @@ ObGetObjectSecurity(IN PVOID Object, if (!NT_SUCCESS(Status)) { /* Free the descriptor and tell the caller we failed */ - ExFreePool(*SecurityDescriptor); + ExFreePoolWithTag(*SecurityDescriptor, TAG_SEC_QUERY); *MemoryAllocated = FALSE; } diff --git a/reactos/ntoskrnl/ob/obwait.c b/reactos/ntoskrnl/ob/obwait.c index e644af66340..eddb17d4ba3 100644 --- a/reactos/ntoskrnl/ob/obwait.c +++ b/reactos/ntoskrnl/ob/obwait.c @@ -279,7 +279,7 @@ Quickie: } /* Free wait block array */ - if (WaitBlockArray) ExFreePool(WaitBlockArray); + if (WaitBlockArray) ExFreePoolWithTag(WaitBlockArray, TAG_WAIT); /* Re-enable APCs if needed */ if (LockInUse) KeLeaveCriticalRegion(); diff --git a/reactos/ntoskrnl/rtl/libsupp.c b/reactos/ntoskrnl/rtl/libsupp.c index e7a50724e6e..52f388efa36 100644 --- a/reactos/ntoskrnl/rtl/libsupp.c +++ b/reactos/ntoskrnl/rtl/libsupp.c @@ -13,6 +13,8 @@ #define NDEBUG #include +#define TAG_ATMT TAG('A', 't', 'o', 'T') /* Atom table */ + extern ULONG NtGlobalFlag; typedef struct _RTL_RANGE_ENTRY @@ -482,21 +484,21 @@ RtlpFreeAtomTable(PRTL_ATOM_TABLE AtomTable) PRTL_ATOM_TABLE_ENTRY RtlpAllocAtomTableEntry(ULONG Size) { - PRTL_ATOM_TABLE_ENTRY Entry = ExAllocatePool(NonPagedPool, - Size); - if (Entry != NULL) - { - RtlZeroMemory(Entry, - Size); - } + PRTL_ATOM_TABLE_ENTRY Entry; - return Entry; + Entry = ExAllocatePoolWithTag(NonPagedPool, Size, TAG_ATMT); + if (Entry != NULL) + { + RtlZeroMemory(Entry, Size); + } + + return Entry; } VOID RtlpFreeAtomTableEntry(PRTL_ATOM_TABLE_ENTRY Entry) { - ExFreePool(Entry); + ExFreePoolWithTag(Entry, TAG_ATMT); } VOID diff --git a/reactos/ntoskrnl/se/sd.c b/reactos/ntoskrnl/se/sd.c index 2c58e399b12..a4891437f78 100644 --- a/reactos/ntoskrnl/se/sd.c +++ b/reactos/ntoskrnl/se/sd.c @@ -619,8 +619,9 @@ DescriptorCopy.AclType = NULL; \ /* allocate enough memory to store a complete copy of a self-relative security descriptor */ - NewDescriptor = ExAllocatePool(PoolType, - DescriptorSize); + NewDescriptor = ExAllocatePoolWithTag(PoolType, + DescriptorSize, + TAG_SD); if(NewDescriptor != NULL) { ULONG_PTR Offset = sizeof(SECURITY_DESCRIPTOR); @@ -872,7 +873,7 @@ SeReleaseSecurityDescriptor(IN PSECURITY_DESCRIPTOR CapturedSecurityDescriptor, (CurrentMode == KernelMode && CaptureIfKernelMode))) { /* only delete the descriptor when SeCaptureSecurityDescriptor() allocated one! */ - ExFreePool(CapturedSecurityDescriptor); + ExFreePoolWithTag(CapturedSecurityDescriptor, TAG_SD); } return STATUS_SUCCESS; @@ -1450,8 +1451,9 @@ SeAssignSecurity(PSECURITY_DESCRIPTOR _ParentDescriptor OPTIONAL, DaclLength, SaclLength); - Descriptor = ExAllocatePool(PagedPool, - Length); + Descriptor = ExAllocatePoolWithTag(PagedPool, + Length, + TAG_SD); if (Descriptor == NULL) { DPRINT1("ExAlloctePool() failed\n"); From a04c3e8d7f3dd74d00f89b7c37091de44a09d2d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sun, 31 Aug 2008 15:52:56 +0000 Subject: [PATCH 262/324] Check if tags match in ExFreePoolWithTag Check if provided tag is valid in ExAllocatePoolWithTag Add lots of BugCheck(BAD_POOL_CALLER) svn path=/trunk/; revision=35835 --- reactos/ntoskrnl/mm/npool.c | 12 +++-- reactos/ntoskrnl/mm/pool.c | 90 +++++++++++++++++++++++++------------ reactos/ntoskrnl/mm/ppool.c | 6 +++ 3 files changed, 76 insertions(+), 32 deletions(-) diff --git a/reactos/ntoskrnl/mm/npool.c b/reactos/ntoskrnl/mm/npool.c index 4cff298c7fe..08629b3e0aa 100644 --- a/reactos/ntoskrnl/mm/npool.c +++ b/reactos/ntoskrnl/mm/npool.c @@ -1556,14 +1556,12 @@ VOID STDCALL ExFreeNonPagedPool (PVOID block) { if (blk->hdr.Magic == BLOCK_HDR_FREE_MAGIC) { - DbgPrint("ExFreePool of already freed address %x\n", block); + KeBugCheckEx(BAD_POOL_CALLER, 0x07, 0, (ULONG_PTR)blk, (ULONG_PTR)block); } else { - DbgPrint("ExFreePool of non-allocated address %x (magic %x)\n", - block, blk->hdr.Magic); + KeBugCheckEx(BAD_POOL_CALLER, 0x46, (ULONG_PTR)block, 0, 0); } - ASSERT(FALSE); return; } @@ -1684,6 +1682,12 @@ ExAllocateNonPagedPoolWithTag(POOL_TYPE Type, ULONG Size, ULONG Tag, PVOID Calle return(block); } +ULONG NTAPI +EiGetNonPagedPoolTag(PVOID Block) +{ + return ((HDR_USED*)((ULONG_PTR)Block - HDR_USED_SIZE))->Tag; +} + VOID INIT_FUNCTION NTAPI diff --git a/reactos/ntoskrnl/mm/pool.c b/reactos/ntoskrnl/mm/pool.c index c326a492a2a..67d617279f4 100644 --- a/reactos/ntoskrnl/mm/pool.c +++ b/reactos/ntoskrnl/mm/pool.c @@ -21,6 +21,12 @@ extern MM_STATS MmStats; /* FUNCTIONS ***************************************************************/ +ULONG NTAPI +EiGetPagedPoolTag(IN PVOID Block); + +ULONG NTAPI +EiGetNonPagedPoolTag(IN PVOID Block); + static PVOID STDCALL EiAllocatePool(POOL_TYPE PoolType, ULONG NumberOfBytes, @@ -28,22 +34,39 @@ EiAllocatePool(POOL_TYPE PoolType, PVOID Caller) { PVOID Block; + PCHAR TagChars = (PCHAR)&Tag; - /* FIXME: Handle SESSION_POOL_MASK, VERIFIER_POOL_MASK, QUOTA_POOL_MASK */ - if (PoolType & PAGED_POOL_MASK) - { - Block = ExAllocatePagedPoolWithTag(PoolType,NumberOfBytes,Tag); - } - else - { - Block = ExAllocateNonPagedPoolWithTag(PoolType,NumberOfBytes,Tag,Caller); - } + if (NumberOfBytes == 0) + KeBugCheckEx(BAD_POOL_CALLER, 0x00, 0, PoolType, Tag); + if (Tag == 0) + KeBugCheckEx(BAD_POOL_CALLER, 0x9b, PoolType, NumberOfBytes, (ULONG_PTR)Caller); + if (Tag == TAG('B','I','G',0)) + KeBugCheckEx(BAD_POOL_CALLER, 0x9c, PoolType, NumberOfBytes, (ULONG_PTR)Caller); - if ((PoolType & MUST_SUCCEED_POOL_MASK) && Block==NULL) - { - KeBugCheck(MUST_SUCCEED_POOL_EMPTY); - } - return(Block); +#define IS_LETTER_OR_DIGIT(c) (((c) >= 'a' && (c) <= 'z') || ((c) >= 'A' && (c) <= 'Z') || ((c) >= '0' && (c) <= '9')) + if (!IS_LETTER_OR_DIGIT(TagChars[0]) && + !IS_LETTER_OR_DIGIT(TagChars[1]) && + !IS_LETTER_OR_DIGIT(TagChars[2]) && + !IS_LETTER_OR_DIGIT(TagChars[3])) + KeBugCheckEx(BAD_POOL_CALLER, 0x9d, Tag, PoolType, (ULONG_PTR)Caller); + + /* FIXME: Handle SESSION_POOL_MASK, VERIFIER_POOL_MASK, QUOTA_POOL_MASK */ + if (PoolType & PAGED_POOL_MASK) + { + if (KeGetCurrentIrql() > APC_LEVEL) + KeBugCheckEx(BAD_POOL_CALLER, 0x08, KeGetCurrentIrql(), PoolType, Tag); + Block = ExAllocatePagedPoolWithTag(PoolType, NumberOfBytes, Tag); + } + else + { + if (KeGetCurrentIrql() > DISPATCH_LEVEL) + KeBugCheckEx(BAD_POOL_CALLER, 0x08, KeGetCurrentIrql(), PoolType, Tag); + Block = ExAllocateNonPagedPoolWithTag(PoolType, NumberOfBytes, Tag, Caller); + } + + if ((PoolType & MUST_SUCCEED_POOL_MASK) && !Block) + KeBugCheckEx(BAD_POOL_CALLER, 0x9a, PoolType, NumberOfBytes, Tag); + return Block; } /* @@ -222,29 +245,40 @@ ExAllocatePoolWithQuotaTag (IN POOL_TYPE PoolType, * @implemented */ #undef ExFreePool -VOID STDCALL +VOID NTAPI ExFreePool(IN PVOID Block) { - ASSERT_IRQL_LESS_OR_EQUAL(DISPATCH_LEVEL); - - if (Block >= MmPagedPoolBase && (char*)Block < ((char*)MmPagedPoolBase + MmPagedPoolSize)) - { - ExFreePagedPool(Block); - } - else - { - ExFreeNonPagedPool(Block); - } + if (Block >= MmPagedPoolBase && (char*)Block < ((char*)MmPagedPoolBase + MmPagedPoolSize)) + { + if (KeGetCurrentIrql() > APC_LEVEL) + KeBugCheckEx(BAD_POOL_CALLER, 0x09, KeGetCurrentIrql(), PagedPool, (ULONG_PTR)Block); + ExFreePagedPool(Block); + } + else + { + if (KeGetCurrentIrql() > DISPATCH_LEVEL) + KeBugCheckEx(BAD_POOL_CALLER, 0x09, KeGetCurrentIrql(), NonPagedPool, (ULONG_PTR)Block); + ExFreeNonPagedPool(Block); + } } /* * @implemented */ -VOID STDCALL +VOID NTAPI ExFreePoolWithTag(IN PVOID Block, IN ULONG Tag) { - /* FIXME: Validate the tag */ - ExFreePool(Block); + ULONG BlockTag; + + if (Block >= MmPagedPoolBase && (char*)Block < ((char*)MmPagedPoolBase + MmPagedPoolSize)) + BlockTag = EiGetPagedPoolTag(Block); + else + BlockTag = EiGetNonPagedPoolTag(Block); + + if (BlockTag != Tag) + KeBugCheckEx(BAD_POOL_CALLER, 0x0a, (ULONG_PTR)Block, BlockTag, Tag); + + ExFreePool(Block); } /* diff --git a/reactos/ntoskrnl/mm/ppool.c b/reactos/ntoskrnl/mm/ppool.c index fbbf20a739f..2575c8c37a3 100644 --- a/reactos/ntoskrnl/mm/ppool.c +++ b/reactos/ntoskrnl/mm/ppool.c @@ -103,6 +103,12 @@ ExFreePagedPool(IN PVOID Block) RPoolFree ( MmPagedPool, Block ); } +ULONG NTAPI +EiGetPagedPoolTag(IN PVOID Block) +{ + return RBodyToHdr(Block)->Tag; +} + #ifdef PPOOL_UMODE_TEST From d658f95e0cb67b0458ef574edaceb753f441b1c6 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Sun, 31 Aug 2008 16:24:29 +0000 Subject: [PATCH 263/324] - Fix two major problems in CmpCleanUpKcbCacheWithLock: * Accessing (reading and writing - corruption!) freed paged pool memory. * Lacking a dereference of a parent key. - Fix a typo in the comment ("reference" -> "dereference"). svn path=/trunk/; revision=35836 --- reactos/ntoskrnl/config/cmkcbncb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/reactos/ntoskrnl/config/cmkcbncb.c b/reactos/ntoskrnl/config/cmkcbncb.c index 90271a532f2..716cb289205 100644 --- a/reactos/ntoskrnl/config/cmkcbncb.c +++ b/reactos/ntoskrnl/config/cmkcbncb.c @@ -483,7 +483,7 @@ CmpCleanUpKcbCacheWithLock(IN PCM_KEY_CONTROL_BLOCK Kcb, /* Cleanup the value cache */ CmpCleanUpKcbValueCache(Kcb); - /* Reference the NCB */ + /* Dereference the NCB */ CmpDereferenceNameControlBlockWithLock(Kcb->NameBlock); /* Check if we have an index hint block and free it */ @@ -492,10 +492,10 @@ CmpCleanUpKcbCacheWithLock(IN PCM_KEY_CONTROL_BLOCK Kcb, /* Check if we were already deleted */ Parent = Kcb->ParentKcb; if (!Kcb->Delete) CmpRemoveKeyControlBlock(Kcb); - + /* Set invalid KCB signature */ Kcb->Signature = CM_KCB_INVALID_SIGNATURE; - + /* Free the KCB as well */ CmpFreeKeyControlBlock(Kcb); @@ -504,8 +504,8 @@ CmpCleanUpKcbCacheWithLock(IN PCM_KEY_CONTROL_BLOCK Kcb, { /* Dereference the parent */ LockHeldExclusively ? - CmpDereferenceKeyControlBlockWithLock(Kcb,LockHeldExclusively) : - CmpDelayDerefKeyControlBlock(Kcb); + CmpDereferenceKeyControlBlockWithLock(Parent,LockHeldExclusively) : + CmpDelayDerefKeyControlBlock(Parent); } } From bdc53e84d984fd1b5e62d4f17cf845d6638aba66 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Sun, 31 Aug 2008 17:56:13 +0000 Subject: [PATCH 264/324] - "0xbadf00d" is not a valid tag. use "PcNt" instead svn path=/trunk/; revision=35837 --- reactos/drivers/network/dd/pcnet/pcnet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/drivers/network/dd/pcnet/pcnet.h b/reactos/drivers/network/dd/pcnet/pcnet.h index f455155e1bc..be9ae0ca6dc 100644 --- a/reactos/drivers/network/dd/pcnet/pcnet.h +++ b/reactos/drivers/network/dd/pcnet/pcnet.h @@ -146,7 +146,7 @@ MiGetMediaState(PADAPTER Adapter); #endif /* memory pool tag */ -#define PCNET_TAG 0xbaadf00d +#define PCNET_TAG TAG('P', 'c', 'N', 't') #endif // _PCNET_H_ From 17fc0b6a1d7d80021e637df5851b8bd68ab3dc6d Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Sun, 31 Aug 2008 18:01:36 +0000 Subject: [PATCH 265/324] - Add INetCfgLock interface - Add NCRP flags svn path=/trunk/; revision=35838 --- reactos/include/psdk/netcfgx.h | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/reactos/include/psdk/netcfgx.h b/reactos/include/psdk/netcfgx.h index d1298c46180..7a97b86d0bc 100644 --- a/reactos/include/psdk/netcfgx.h +++ b/reactos/include/psdk/netcfgx.h @@ -1,6 +1,38 @@ #ifndef __NETCFGX_H__ #define __NETCFGX_H__ +#undef INTERFACE +#define INTERFACE INetCfgLock +DECLARE_INTERFACE_(INetCfgLock, IUnknown) +{ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void **ppv) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + STDMETHOD_(HRESULT,AcquireWriteLock)(THIS_ DWORD cmsTimeout, LPCWSTR pszwClientDescription, LPWSTR *ppszwClientDescription) PURE; + STDMETHOD_(HRESULT,ReleaseWriteLock)(THIS) PURE; + STDMETHOD_(HRESULT,IsWriteLocked)(THIS_ LPWSTR *ppszwClientDescription) PURE; +}; +#undef INTERFACE + +EXTERN_C const IID IID_INetCfgLock; + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define INetCfgLock_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define INetCfgLock_AddRef(p) (p)->lpVtbl->AddRef(p) +#define INetCfgLock_Release(p) (p)->lpVtbl->Release(p) +#define INetCfgLock_AcquireWriteLock(p,a,b,c) (p)->lpVtbl->AcquireWriteLock(p,a,b,c) +#define INetCfgLock_ReleaseWriteLock(p) (p)->lpVtbl->ReleaseWriteLock(p) +#define INetCfgLock_IsWriteLocked(p,a) (p)->lpVtbl->IsWriteLocked(p,a) +#endif + +typedef enum +{ + NCRP_QUERY_PROPERTY_UI = 1, + NCRP_SHOW_PROPERTY_UI = 2 +}NCRP_FLAGS; + + #undef INTERFACE #define INTERFACE INetCfgComponent DECLARE_INTERFACE_(INetCfgComponent, IUnknown) @@ -39,7 +71,7 @@ DECLARE_INTERFACE_(INetCfgComponent, IUnknown) #define INetCfgComponent_GetBindName(p,a) (p)->lpVtbl->GetBindName(p,a) #define INetCfgComponent_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a) #define INetCfgComponent_OpenParamKey(p,a) (p)->lpVtbl->OpenParamKey(p,a) -#define INetCfgComponent_RaisePropertyUi(p,a,b,c) (p)->lpVtbl->OpenParamKey(p,a,b,c) +#define INetCfgComponent_RaisePropertyUi(p,a,b,c) (p)->lpVtbl->RaisePropertyUi(p,a,b,c) #endif #undef INTERFACE From 99082621a4e589c44e01020418d77c7f22be20f7 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Sun, 31 Aug 2008 18:07:21 +0000 Subject: [PATCH 266/324] - Remove old unused enumeration code - Implement displaying network component properties svn path=/trunk/; revision=35839 --- reactos/dll/win32/netshell/lanconnectui.c | 240 ++++++++++++---------- reactos/dll/win32/netshell/netshell.rc | 1 + 2 files changed, 127 insertions(+), 114 deletions(-) diff --git a/reactos/dll/win32/netshell/lanconnectui.c b/reactos/dll/win32/netshell/lanconnectui.c index e44462654af..2c211a12e9a 100644 --- a/reactos/dll/win32/netshell/lanconnectui.c +++ b/reactos/dll/win32/netshell/lanconnectui.c @@ -16,12 +16,15 @@ typedef struct NET_TYPE Type; DWORD dwCharacteristics; LPWSTR szHelp; + INetCfgComponent *pNCfgComp; + UINT NumPropDialogOpen; }NET_ITEM, *PNET_ITEM; typedef struct { INetConnectionPropertyUi *lpVtbl; INetConnection * pCon; + INetCfg * pNCfg; LONG ref; }INetConnectionPropertyUiImpl, *LPINetConnectionPropertyUiImpl; @@ -59,92 +62,6 @@ AddItemToListView(HWND hDlgCtrl, PNET_ITEM pItem, LPWSTR szName) ListView_SetCheckState(hDlgCtrl, lvItem.iItem, TRUE); } -VOID -EnumClientServiceProtocol(HWND hDlgCtrl, HKEY hKey, UINT Type) -{ - DWORD dwIndex = 0; - DWORD dwSize; - DWORD dwRetVal; - DWORD dwCharacteristics; - WCHAR szName[100]; - WCHAR szText[100]; - WCHAR szHelp[200]; - HKEY hSubKey; - static WCHAR szNDI[] = L"\\Ndi"; - PNET_ITEM pItem; - - do - { - szHelp[0] = L'\0'; - dwCharacteristics = 0; - szText[0] = L'\0'; - - dwSize = sizeof(szName)/sizeof(WCHAR); - if (RegEnumKeyExW(hKey, dwIndex++, szName, &dwSize, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) - { - /* Get Help Text */ - if (dwSize + (sizeof(szNDI)/sizeof(WCHAR)) + 1 < sizeof(szName)/sizeof(WCHAR)) - { - wcscpy(&szName[dwSize], szNDI); - if (RegOpenKeyExW(hKey, szName, 0, KEY_READ, &hSubKey) == ERROR_SUCCESS) - { -#if 0 - if (RegLoadMUIStringW(hSubKey, L"HelpText", szHelp, sizeof(szHelp)/sizeof(WCHAR), &dwRetVal, 0, NULL) == ERROR_SUCCESS) - szHelp[(sizeof(szHelp)/sizeof(WCHAR))-1] = L'\0'; -#else - DWORD dwType; - dwRetVal = sizeof(szHelp); - if (RegQueryValueExW(hSubKey, L"HelpText", NULL, &dwType, (LPBYTE)szHelp, &dwRetVal) == ERROR_SUCCESS) - szHelp[(sizeof(szHelp)/sizeof(WCHAR))-1] = L'\0'; -#endif - RegCloseKey(hSubKey); - } - szName[dwSize] = L'\0'; - } - /* Get Characteristics */ - if (RegOpenKeyExW(hKey, szName, 0, KEY_READ, &hSubKey) == ERROR_SUCCESS) - { - dwSize = sizeof(dwCharacteristics); - if (RegQueryValueExW(hSubKey, L"Characteristics", NULL, NULL, (LPBYTE)&dwCharacteristics, &dwSize) == ERROR_SUCCESS) - { - if (dwCharacteristics & NCF_HIDDEN) - { - RegCloseKey(hSubKey); - continue; - } - } - /* Get the Client/Procotol/Service name */ - dwSize = sizeof(szText); - if (RegQueryValueExW(hSubKey, L"Description", NULL, NULL, (LPBYTE)szText, &dwSize) == ERROR_SUCCESS) - { - szText[(sizeof(szText)/sizeof(WCHAR))-1] = L'\0'; - } - RegCloseKey(hSubKey); - } - - if (!wcslen(szText)) - continue; - - - pItem = CoTaskMemAlloc(sizeof(NET_ITEM)); - if (!pItem) - continue; - - pItem->dwCharacteristics = dwCharacteristics; - pItem->Type = Type; - pItem->szHelp = CoTaskMemAlloc((wcslen(szHelp)+1)*sizeof(WCHAR)); - if (pItem->szHelp) - wcscpy(pItem->szHelp, szHelp); - - AddItemToListView(hDlgCtrl, pItem, szText); - } - else - break; - - }while(TRUE); - -} - VOID EnumComponents(HWND hDlgCtrl, INetCfg * pNCfg, const GUID * CompGuid, UINT Type) { @@ -182,17 +99,17 @@ EnumComponents(HWND hDlgCtrl, INetCfg * pNCfg, const GUID * CompGuid, UINT Type) pItem->dwCharacteristics = dwCharacteristics; pItem->szHelp = pHelpText; pItem->Type = Type; + pItem->pNCfgComp = pNCfgComp; + pItem->NumPropDialogOpen = 0; AddItemToListView(hDlgCtrl, pItem, pDisplayName); CoTaskMemFree(pDisplayName); - - INetCfgComponent_Release(pNCfgComp); } IEnumNetCfgComponent_Release(pENetCfg); } VOID -InitializeLANPropertiesUIDlg(HWND hwndDlg) +InitializeLANPropertiesUIDlg(HWND hwndDlg, INetConnectionPropertyUiImpl * This) { HRESULT hr; INetCfg * pNCfg; @@ -200,6 +117,23 @@ InitializeLANPropertiesUIDlg(HWND hwndDlg) LVCOLUMNW lc; RECT rc; DWORD dwStyle; + NETCON_PROPERTIES * pProperties; + + hr = INetConnection_GetProperties(This->pCon, &pProperties); + if (FAILED(hr)) + return; + + SendDlgItemMessageW(hwndDlg, IDC_NETCARDNAME, WM_SETTEXT, 0, (LPARAM)pProperties->pszwDeviceName); + if (pProperties->dwCharacter & NCCF_SHOW_ICON) + { + /* check show item on taskbar*/ + SendDlgItemMessageW(hwndDlg, IDC_SHOWTASKBAR, BM_SETCHECK, BST_CHECKED, 0); + } + if (pProperties->dwCharacter & NCCF_NOTIFY_DISCONNECTED) + { + /* check notify item */ + SendDlgItemMessageW(hwndDlg, IDC_NOTIFYNOCONNECTION, BM_SETCHECK, BST_CHECKED, 0); + } memset(&lc, 0, sizeof(LV_COLUMN)); lc.mask = LVCF_TEXT | LVCF_SUBITEM | LVCF_FMT; @@ -231,10 +165,92 @@ InitializeLANPropertiesUIDlg(HWND hwndDlg) EnumComponents(hDlgCtrl, pNCfg, &GUID_DEVCLASS_NETCLIENT, NET_TYPE_CLIENT); EnumComponents(hDlgCtrl, pNCfg, &GUID_DEVCLASS_NETSERVICE, NET_TYPE_SERVICE); EnumComponents(hDlgCtrl, pNCfg, &GUID_DEVCLASS_NETTRANS, NET_TYPE_PROTOCOL); - - INetCfg_Release(pNCfg); + This->pNCfg = pNCfg; } +VOID +ShowNetworkComponentProperties( + HWND hwndDlg, + INetConnectionPropertyUiImpl * This) +{ + LVITEMW lvItem; + HWND hDlgCtrl; + UINT Index, Count; + HRESULT hr; + INetConnectionPropertyUi * pConUI = NULL; + INetCfgComponent * pNCfgComp; + PNET_ITEM pItem; + INetCfgLock * pLock; + LPWSTR pLockApp; + + hDlgCtrl = GetDlgItem(hwndDlg, IDC_COMPONENTSLIST); + Count = ListView_GetItemCount(hDlgCtrl); + if (!Count) + return; + + + hr = CoCreateInstance(&CLSID_LANConnectUI, + NULL, + CLSCTX_INPROC_SERVER | CLSCTX_NO_CODE_DOWNLOAD, + &IID_INetConnectionPropertyUi, + (LPVOID)&pConUI); + + if (FAILED(hr)) + { + return; + } + hr = INetConnectionPropertyUi_SetConnection(pConUI, This->pCon); + if (FAILED(hr)) + { + INetConnectionPropertyUi_Release(pConUI); + return; + } + + ZeroMemory(&lvItem, sizeof(LVITEMW)); + lvItem.mask = LVIF_PARAM | LVIF_STATE; + lvItem.stateMask = (UINT)-1; + for (Index = 0; Index < Count; Index++) + { + lvItem.iItem = Index; + if (SendMessageW(hDlgCtrl, LVM_GETITEMW, 0, (LPARAM)&lvItem)) + { + if (lvItem.state & LVIS_SELECTED) + break; + } + } + + if (!(lvItem.state & LVIS_SELECTED)) + { + INetConnectionPropertyUi_Release(pConUI); + return; + } + + pItem = (PNET_ITEM)lvItem.lParam; + pNCfgComp = (INetCfgComponent*) pItem->pNCfgComp; + + hr = INetCfg_QueryInterface(This->pNCfg, &IID_INetCfgLock, (LPVOID*)&pLock); + if (FAILED(hr)) + return; + + hr = INetCfgLock_AcquireWriteLock(pLock, 10000, L"", &pLockApp); + if (FAILED(hr)) + { + CoTaskMemFree(pLockApp); + INetConnectionPropertyUi_Release(pConUI); + return; + } + + + hr = INetCfgComponent_RaisePropertyUi(pNCfgComp, GetParent(hwndDlg), NCRP_QUERY_PROPERTY_UI, (IUnknown*)pConUI); + if (SUCCEEDED(hr)) + { + hr = INetCfgComponent_RaisePropertyUi(pNCfgComp, GetParent(hwndDlg), NCRP_SHOW_PROPERTY_UI, (IUnknown*)pConUI); + } + + INetCfgLock_ReleaseWriteLock(pLock); + INetConnectionPropertyUi_Release(pConUI); + +} INT_PTR @@ -250,25 +266,15 @@ LANPropertiesUIDlg( LPNMLISTVIEW lppl; LVITEMW li; PNET_ITEM pItem; - NETCON_PROPERTIES * pProperties; + INetConnectionPropertyUiImpl * This; switch(uMsg) { case WM_INITDIALOG: page = (PROPSHEETPAGE*)lParam; - pProperties = (NETCON_PROPERTIES*)page->lParam; - SendDlgItemMessageW(hwndDlg, IDC_NETCARDNAME, WM_SETTEXT, 0, (LPARAM)pProperties->pszwDeviceName); - if (pProperties->dwCharacter & NCCF_SHOW_ICON) - { - /* check show item on taskbar*/ - SendDlgItemMessageW(hwndDlg, IDC_SHOWTASKBAR, BM_SETCHECK, BST_CHECKED, 0); - } - if (pProperties->dwCharacter & NCCF_NOTIFY_DISCONNECTED) - { - /* check notify item */ - SendDlgItemMessageW(hwndDlg, IDC_NOTIFYNOCONNECTION, BM_SETCHECK, BST_CHECKED, 0); - } - InitializeLANPropertiesUIDlg(hwndDlg); + This = (INetConnectionPropertyUiImpl*)page->lParam; + InitializeLANPropertiesUIDlg(hwndDlg, This); + SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)This); return TRUE; case WM_NOTIFY: lppl = (LPNMLISTVIEW) lParam; @@ -301,6 +307,14 @@ LANPropertiesUIDlg( } } break; + case WM_COMMAND: + if (LOWORD(wParam) == IDC_PROPERTIES) + { + This = (INetConnectionPropertyUiImpl*) GetWindowLongPtr(hwndDlg, DWLP_USER); + ShowNetworkComponentProperties(hwndDlg, This); + return FALSE; + } + break; } return FALSE; } @@ -385,37 +399,34 @@ INetConnectionPropertyUi_fnAddPages( LPARAM lParam) { HPROPSHEETPAGE hProp; - NETCON_PROPERTIES * pProperties; BOOL ret; - HRESULT hr; + HRESULT hr = E_FAIL; INITCOMMONCONTROLSEX initEx; + NETCON_PROPERTIES * pProperties; INetConnectionPropertyUiImpl * This = (INetConnectionPropertyUiImpl*)iface; initEx.dwSize = sizeof(initEx); initEx.dwICC = ICC_LISTVIEW_CLASSES; - - if(!InitCommonControlsEx(&initEx)) return E_FAIL; - - hr = INetConnection_GetProperties(This->pCon, &pProperties); if (FAILED(hr)) return hr; - hProp = InitializePropertySheetPage(MAKEINTRESOURCEW(IDD_NETPROPERTIES), LANPropertiesUIDlg, (LPARAM)pProperties, pProperties->pszwName); + hProp = InitializePropertySheetPage(MAKEINTRESOURCEW(IDD_NETPROPERTIES), LANPropertiesUIDlg, (LPARAM)This, pProperties->pszwName); if (hProp) { ret = (*pfnAddPage)(hProp, lParam); if (ret) { - return NOERROR; + hr = NOERROR; } DestroyPropertySheetPage(hProp); } - return E_FAIL; + //NcFreeNetconProperties(pProperties); + return hr; } static const INetConnectionPropertyUiVtbl vt_NetConnectionPropertyUi = @@ -443,6 +454,7 @@ HRESULT WINAPI LanConnectUI_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVO This->ref = 1; This->pCon = NULL; + This->pNCfg = NULL; This->lpVtbl = (INetConnectionPropertyUi*)&vt_NetConnectionPropertyUi; if (!SUCCEEDED (INetConnectionPropertyUi_fnQueryInterface ((INetConnectionPropertyUi*)This, riid, ppv))) diff --git a/reactos/dll/win32/netshell/netshell.rc b/reactos/dll/win32/netshell/netshell.rc index dc669e19c9c..be69dd1bc83 100644 --- a/reactos/dll/win32/netshell/netshell.rc +++ b/reactos/dll/win32/netshell/netshell.rc @@ -11,6 +11,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #define REACTOS_STR_ORIGINAL_FILENAME "netshell.dll\0" #define REACTOS_STR_PRODUCT_VERSION "5.1.2600.3264\0" #define REACTOS_STR_FILE_VERSION "5.1.2600.3264\0" +#define REACTOS_STR_COMPANY_NAME "Microsoft Corporation" #include From f558d870926277028c0290dddf0a406c4fe51408 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Sun, 31 Aug 2008 18:09:35 +0000 Subject: [PATCH 267/324] - Fix resource svn path=/trunk/; revision=35840 --- reactos/dll/win32/netshell/netshell.rc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/reactos/dll/win32/netshell/netshell.rc b/reactos/dll/win32/netshell/netshell.rc index be69dd1bc83..6b50742a821 100644 --- a/reactos/dll/win32/netshell/netshell.rc +++ b/reactos/dll/win32/netshell/netshell.rc @@ -6,12 +6,11 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #define REACTOS_VERSION_DLL -#define REACTOS_STR_FILE_DESCRIPTION "W32 subsystem kernel\0" +#define REACTOS_STR_FILE_DESCRIPTION "Shell for Network Connections\0" #define REACTOS_STR_INTERNAL_NAME "netshell.dll\0" #define REACTOS_STR_ORIGINAL_FILENAME "netshell.dll\0" #define REACTOS_STR_PRODUCT_VERSION "5.1.2600.3264\0" #define REACTOS_STR_FILE_VERSION "5.1.2600.3264\0" -#define REACTOS_STR_COMPANY_NAME "Microsoft Corporation" #include From d9f427a1eb9f815bfb2bddae329bca511347d07c Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sun, 31 Aug 2008 19:15:06 +0000 Subject: [PATCH 268/324] Define TAG macro before use. That fixes build svn path=/trunk/; revision=35843 --- reactos/drivers/network/dd/pcnet/pcnet.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/reactos/drivers/network/dd/pcnet/pcnet.h b/reactos/drivers/network/dd/pcnet/pcnet.h index be9ae0ca6dc..27e51f02d44 100644 --- a/reactos/drivers/network/dd/pcnet/pcnet.h +++ b/reactos/drivers/network/dd/pcnet/pcnet.h @@ -145,6 +145,10 @@ MiGetMediaState(PADAPTER Adapter); #define BREAKPOINT #endif +#ifndef TAG +#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24)) +#endif + /* memory pool tag */ #define PCNET_TAG TAG('P', 'c', 'N', 't') From 481f0751b48caa043647dd1c4beaa621b9dd86ad Mon Sep 17 00:00:00 2001 From: Daniel Reimer Date: Sun, 31 Aug 2008 20:20:14 +0000 Subject: [PATCH 269/324] =?UTF-8?q?Bug=203670:=20update=20translate=20file?= =?UTF-8?q?=20by=20Lars=20Martin=20Hambro=20Bug=203675:=20Translate=20file?= =?UTF-8?q?=20base\setup\reactos\lang=20by=20Lars=20martin=20Hambro=20Bug?= =?UTF-8?q?=203682:=20Italian=20translation=20updates=20by=20Paolo=20Devot?= =?UTF-8?q?i=20Bug=203694:=20Netshell=20polish=20translation=20by=20Maciej?= =?UTF-8?q?=20Bialas=20Bug=203697:=20Bulgarian=20language=20update=20for?= =?UTF-8?q?=20ReactOS=20by=20=D0=A1=D1=82=D0=B0=D0=BD=D0=B5=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit svn path=/trunk/; revision=35845 --- .../base/applications/dxdiag/lang/no-NO.rc | 18 +- .../base/applications/kbswitch/lang/it-IT.rc | 11 ++ reactos/base/applications/kbswitch/rsrc.rc | 1 + .../base/applications/shutdown/lang/it-IT.rc | 14 ++ reactos/base/applications/shutdown/rsrc.rc | 1 + .../base/applications/taskmgr/lang/no-NO.rc | 156 +++++++++--------- reactos/base/setup/reactos/lang/no-NO.rc | 125 +++++++++++++- reactos/base/setup/reactos/rsrc.rc | 2 +- reactos/base/setup/usetup/lang/bg-BG.h | 4 +- reactos/base/shell/cmd/lang/it-IT.rc | 92 ++++++++--- reactos/dll/cpl/access/lang/it-IT.rc | 2 +- reactos/dll/win32/netid/lang/no-NO.rc | 8 +- reactos/dll/win32/netshell/lang/bg-BG.rc | 20 +++ reactos/dll/win32/netshell/lang/pl-PL.rc | 20 +++ reactos/dll/win32/netshell/netshell.rc | 2 + reactos/dll/win32/shell32/lang/bg-BG.rc | 120 +++++++------- reactos/dll/win32/shell32/lang/no-NO.rc | 146 +++++++++------- 17 files changed, 501 insertions(+), 241 deletions(-) create mode 100644 reactos/base/applications/kbswitch/lang/it-IT.rc create mode 100644 reactos/base/applications/shutdown/lang/it-IT.rc create mode 100644 reactos/dll/win32/netshell/lang/bg-BG.rc create mode 100644 reactos/dll/win32/netshell/lang/pl-PL.rc diff --git a/reactos/base/applications/dxdiag/lang/no-NO.rc b/reactos/base/applications/dxdiag/lang/no-NO.rc index edfb55829b1..3ce74d0a7ce 100644 --- a/reactos/base/applications/dxdiag/lang/no-NO.rc +++ b/reactos/base/applications/dxdiag/lang/no-NO.rc @@ -4,13 +4,13 @@ IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 478, 280 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME -CAPTION "ReactX-Diagnostic program" +CAPTION "ReactX-diagnose program" FONT 8, "MS Shell Dlg" BEGIN CONTROL "Tab1",IDC_TAB_CONTROL,"SysTabControl32",WS_TABSTOP,2,2,474,250 PUSHBUTTON "&Hjelp", IDC_BUTTON_HELP, 2, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP DEFPUSHBUTTON "&Neste side", IDC_BUTTON_NEXT, 257, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "&Lagre Alt Informasjon...", IDC_BUTTON_SAVE_INFO, 311, 261, 110, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "&Lagre alt informasjon...", IDC_BUTTON_SAVE_INFO, 311, 261, 110, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP PUSHBUTTON "&Avslutt", IDC_BUTTON_EXIT, 425, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END @@ -122,7 +122,7 @@ BEGIN RTEXT "Dato:", -1, 275, 45, 55, 10 RTEXT "WHQL-Logo:", -1, 275, 55, 55, 10 RTEXT "Andre filer:", -1, 275, 65, 55, 10 - RTEXT "Provider:", -1, 275, 75, 55, 10 + RTEXT "Fabrikant:", -1, 275, 75, 55, 10 LTEXT "", IDC_STATIC_DSOUND_DRIVER, 335, 25, 100, 10 LTEXT "", IDC_STATIC_DSOUND_VERSION, 335, 35, 100, 10 LTEXT "", IDC_STATIC_DSOUND_DATE, 335, 45, 100, 10 @@ -148,9 +148,9 @@ IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "DirectInput Enheter", -1, 10, 10, 452, 80 + GROUPBOX "Direkteinndata enheter", -1, 10, 10, 452, 80 CONTROL "", IDC_LIST_DEVICE, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 22, 432, 60 - GROUPBOX "Input Enheter", -1, 10, 100, 452, 60 + GROUPBOX "Inndata enheter", -1, 10, 100, 452, 60 CONTROL "", IDC_TREE_PORT, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 20, 112, 432, 40, 0x00000200 GROUPBOX "Informasjon", -1, 10, 170, 452, 50 EDITTEXT IDC_RICH_INFO, 20, 182, 432, 30, WS_DISABLED | WS_TABSTOP @@ -160,7 +160,7 @@ IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Registered DirectPlay Service Provider", -1, 10, 10, 452, 80 + GROUPBOX "Registert DirectPlay tjeneste leverandшr", -1, 10, 10, 452, 80 CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 22, 432, 60 END @@ -177,13 +177,13 @@ BEGIN IDS_DISPLAY_DIALOG "Skjerm" IDS_SOUND_DIALOG "Lyd" IDS_MUSIC_DIALOG "Musikk" - IDS_INPUT_DIALOG "Input" + IDS_INPUT_DIALOG "Inndata" IDS_NETWORK_DIALOG "Nettverk" IDS_HELP_DIALOG "Hjelp" IDS_FORMAT_MB "%I64uMB RAM" IDS_FORMAT_SWAP "%I64u MB brukt, %I64u MB tilgjengelig" - IDS_FORMAT_UNIPROC "%s (%u CPU)" - IDS_FORMAT_MPPROC "%s (%u CPUs)" + IDS_FORMAT_UNIPROC "%s (%u prosessor)" + IDS_FORMAT_MPPROC "%s (%u prosesorer)" IDS_VERSION_UNKNOWN "Ukjent versjon" IDS_DEVICE_STATUS_ATTACHED "Koblet til" IDS_DEVICE_STATUS_MISSING "Koblet fra" diff --git a/reactos/base/applications/kbswitch/lang/it-IT.rc b/reactos/base/applications/kbswitch/lang/it-IT.rc new file mode 100644 index 00000000000..e61973e2107 --- /dev/null +++ b/reactos/base/applications/kbswitch/lang/it-IT.rc @@ -0,0 +1,11 @@ +LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL + +IDR_POPUP MENU +BEGIN + POPUP "popup" + BEGIN + MENUITEM "&Preferenze...", ID_PREFERENCES + MENUITEM SEPARATOR + MENUITEM "&Esci", ID_EXIT + END +END diff --git a/reactos/base/applications/kbswitch/rsrc.rc b/reactos/base/applications/kbswitch/rsrc.rc index b8eb13b6888..c8ead289907 100644 --- a/reactos/base/applications/kbswitch/rsrc.rc +++ b/reactos/base/applications/kbswitch/rsrc.rc @@ -4,6 +4,7 @@ #include "lang/en-US.rc" #include "lang/es-ES.rc" #include "lang/fr-FR.rc" +#include "lang/it-IT.rc" #include "lang/lt-LT.rc" #include "lang/no-NO.rc" #include "lang/pl-PL.rc" diff --git a/reactos/base/applications/shutdown/lang/it-IT.rc b/reactos/base/applications/shutdown/lang/it-IT.rc new file mode 100644 index 00000000000..b3c5c20fb6d --- /dev/null +++ b/reactos/base/applications/shutdown/lang/it-IT.rc @@ -0,0 +1,14 @@ +LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL + +STRINGTABLE DISCARDABLE +BEGIN + +IDS_USAGE, "Uso: shutdown [-?] [-l | -s | -r] [-f]\n\n\ + Senza parametri o con -?\tvisualizza questo messaggio\n\ + -l\t\t\tChiude la sessione\n\ + -s\t\t\tSpegnimento del computer\n\ + -r\t\t\tRiavvio del computer\n\ + -f\t\t\tArresta le applicazioni senza nessun avviso\n\ + \t\t\tSe non viene specificato nessun altro parametro verrа\n\ + \t\t\tchiusa la sessione" +END diff --git a/reactos/base/applications/shutdown/rsrc.rc b/reactos/base/applications/shutdown/rsrc.rc index 8424e473d5c..7b92abdbd7f 100644 --- a/reactos/base/applications/shutdown/rsrc.rc +++ b/reactos/base/applications/shutdown/rsrc.rc @@ -6,6 +6,7 @@ #include "lang/el-GR.rc" #include "lang/en-US.rc" #include "lang/fr-FR.rc" +#include "lang/it-IT.rc" #include "lang/ko-KR.rc" #include "lang/lt-LT.rc" #include "lang/no-NO.rc" diff --git a/reactos/base/applications/taskmgr/lang/no-NO.rc b/reactos/base/applications/taskmgr/lang/no-NO.rc index f55298790fe..8afc8d6d63f 100644 --- a/reactos/base/applications/taskmgr/lang/no-NO.rc +++ b/reactos/base/applications/taskmgr/lang/no-NO.rc @@ -80,7 +80,7 @@ BEGIN MENUITEM "Sorter &vertikalt", ID_WINDOWS_TILEVERTICALLY MENUITEM "&Minimer", ID_WINDOWS_MINIMIZE MENUITEM "Ma&ksimer", ID_WINDOWS_MAXIMIZE - MENUITEM "&Cascade", ID_WINDOWS_CASCADE + MENUITEM "&Overlappet", ID_WINDOWS_CASCADE MENUITEM "&Plasser lengst frem", ID_WINDOWS_BRINGTOFRONT END @@ -193,8 +193,8 @@ BEGIN CONTROL "Liste2",IDC_APPLIST,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,7,7,233,177 PUSHBUTTON "&Ny oppgave...",IDC_NEWTASK,187,189,53,14 - PUSHBUTTON "&Bytt til",IDC_SWITCHTO,131,189,53,14,WS_DISABLED - PUSHBUTTON "&Avslutt oppgave",IDC_ENDTASK,75,189,53,14,WS_DISABLED + PUSHBUTTON "&Bytt til",IDC_SWITCHTO,129,189,53,14,WS_DISABLED + PUSHBUTTON "&Avslutt oppgave",IDC_ENDTASK,60,189,65,14,WS_DISABLED END IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 @@ -214,8 +214,8 @@ IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Bruk av CPU",IDC_CPU_USAGE_FRAME,5,5,60,54,WS_TABSTOP, WS_EX_TRANSPARENT - GROUPBOX "Bruk av vekslefil",IDC_MEM_USAGE_FRAME,5,63,60,54,BS_LEFTTEXT, WS_EX_TRANSPARENT + GROUPBOX "Prosessorbruk",IDC_CPU_USAGE_FRAME,5,5,70,54,WS_TABSTOP, WS_EX_TRANSPARENT + GROUPBOX "Minnebruk",IDC_MEM_USAGE_FRAME,5,63,60,54,BS_LEFTTEXT, WS_EX_TRANSPARENT GROUPBOX "Totalt",IDC_TOTALS_FRAME,5,122,111,39,0,WS_EX_TRANSPARENT GROUPBOX "Tildelt minne (kb)",IDC_COMMIT_CHARGE_FRAME,5,166,111,39,0,WS_EX_TRANSPARENT GROUPBOX "Fysisk minne (kb)",IDC_PHYSICAL_MEMORY_FRAME,131,122,111,39,0,WS_EX_TRANSPARENT @@ -241,30 +241,30 @@ BEGIN LTEXT "Totalt",IDS_PHYSICAL_MEMORY_TOTAL,137,131,27,8 LTEXT "Tilgjengelig",IDS_PHYSICAL_MEMORY_AVAILABLE,137,140,40,8 LTEXT "Systembuffer",IDS_PHYSICAL_MEMORY_SYSTEM_CACHE,137,149,46,8 - EDITTEXT IDC_PHYSICAL_MEMORY_TOTAL,185,131,48,8,ES_RIGHT | + EDITTEXT IDC_PHYSICAL_MEMORY_TOTAL,187,131,48,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER - EDITTEXT IDC_PHYSICAL_MEMORY_AVAILABLE,185,140,48,8,ES_RIGHT | + EDITTEXT IDC_PHYSICAL_MEMORY_AVAILABLE,187,140,48,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER - EDITTEXT IDC_PHYSICAL_MEMORY_SYSTEM_CACHE,185,149,48,8,ES_RIGHT | + EDITTEXT IDC_PHYSICAL_MEMORY_SYSTEM_CACHE,187,149,48,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER LTEXT "Totalt",IDS_KERNEL_MEMORY_TOTAL,137,174,27,8 - LTEXT "Sidevekslet",IDS_KERNEL_MEMORY_PAGED,137,184,50,8 - LTEXT "Ikke sidevekslet",IDS_KERNEL_MEMORY_NONPAGED,137,193,75,8 - EDITTEXT IDC_KERNEL_MEMORY_TOTAL,185,174,48,8,ES_RIGHT | + LTEXT "Sidevekslet",IDS_KERNEL_MEMORY_PAGED,137,184,54,8 + LTEXT "Ikke sidevekslet",IDS_KERNEL_MEMORY_NONPAGED,137,193,85,8 + EDITTEXT IDC_KERNEL_MEMORY_TOTAL,187,174,48,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER - EDITTEXT IDC_KERNEL_MEMORY_PAGED,185,184,48,8,ES_RIGHT | + EDITTEXT IDC_KERNEL_MEMORY_PAGED,187,184,48,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER - EDITTEXT IDC_KERNEL_MEMORY_NONPAGED,185,193,48,8,ES_RIGHT | + EDITTEXT IDC_KERNEL_MEMORY_NONPAGED,187,193,48,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER - GROUPBOX "Bruk av CPU",IDC_CPU_USAGE_HISTORY_FRAME,74,5,168,54,0,WS_EX_TRANSPARENT - GROUPBOX "Logg for bruk av sidevekslingsfil",IDC_MEMORY_USAGE_HISTORY_FRAME,74,63,168,54,0,WS_EX_TRANSPARENT - PUSHBUTTON "Vis bruk av CPU",IDC_CPU_USAGE_GRAPH,12,17,47,37,0, + GROUPBOX "Logg for bruk av prosessor",IDC_CPU_USAGE_HISTORY_FRAME,74,5,168,54,0,WS_EX_TRANSPARENT + GROUPBOX "Logg for bruk av fysisk minne",IDC_MEMORY_USAGE_HISTORY_FRAME,74,63,168,54,0,WS_EX_TRANSPARENT + PUSHBUTTON "Vis prosessorbruk",IDC_CPU_USAGE_GRAPH,12,17,47,37,0, WS_EX_CLIENTEDGE - PUSHBUTTON "Vis bruk av MEM",IDC_MEM_USAGE_GRAPH,12,75,47,37,0, + PUSHBUTTON "Vis minnebruk",IDC_MEM_USAGE_GRAPH,12,75,47,37,0, WS_EX_CLIENTEDGE - PUSHBUTTON "Logg for bruk av CPU",IDC_CPU_USAGE_HISTORY_GRAPH,81,17, + PUSHBUTTON "Logg for prosessorbruk",IDC_CPU_USAGE_HISTORY_GRAPH,81,17, 153,37,0,WS_EX_CLIENTEDGE - PUSHBUTTON "MEM bruk historie",IDC_MEM_USAGE_HISTORY_GRAPH,81,75, + PUSHBUTTON "Minne bruk historie",IDC_MEM_USAGE_HISTORY_GRAPH,81,75, 153,37,0,WS_EX_CLIENTEDGE END @@ -356,21 +356,21 @@ END IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 195, 199 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Velg spaltevis" +CAPTION "Velg kolonnene" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK",IDOK,84,178,50,14 PUSHBUTTON "Avbryt",IDCANCEL,138,178,50,14 - LTEXT "Velg spaltevis det vil oppstе pе Prosess side av oppgavebehandler.", + LTEXT "Velg kolonnene som skal vises pе prosesssiden i Oppgavebehandling.", IDC_STATIC,7,7,181,17 - CONTROL "&Bilde navn",IDC_IMAGENAME,"Button",BS_AUTOCHECKBOX | + CONTROL "&Bildenavn",IDC_IMAGENAME,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,7,28,56,10 - CONTROL "&PID (Prosess identifikator)",IDC_PID,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,7,39,88,10 - CONTROL "&CPU brukt",IDC_CPUUSAGE,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,7,50,53,10 - CONTROL "CPU Ti&d",IDC_CPUTIME,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,7,61,48,10 + CONTROL "&PID (prosessidentifikator)",IDC_PID,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,7,39,93,10 + CONTROL "&Prosessorbruk",IDC_CPUUSAGE,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,7,50,60,10 + CONTROL "Prosessorti&d",IDC_CPUTIME,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,7,61,52,10 CONTROL "&Minne brukt",IDC_MEMORYUSAGE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,72,63,10 CONTROL "Minne brukt &Delta",IDC_MEMORYUSAGEDELTA,"Button", @@ -378,40 +378,40 @@ BEGIN CONTROL "Ma&ks minne bruk",IDC_PEAKMEMORYUSAGE,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,7,94,82,10 CONTROL "Side &mangeler",IDC_PAGEFAULTS,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,7,105,53,10 + WS_TABSTOP,7,105,56,10 CONTROL "&Bruker objekt",IDC_USEROBJECTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,116,62,10 - CONTROL "I/O Leser",IDC_IOREADS,"Button",BS_AUTOCHECKBOX | + CONTROL "I/O Lest",IDC_IOREADS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,127,49,10 - CONTROL "I/O Leser Bytes",IDC_IOREADBYTES,"Button", + CONTROL "I/O skrevet",IDC_IOREADBYTES,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,7,138,65,10 - CONTROL "&Sesjon ID",IDC_SESSIONID,"Button",BS_AUTOCHECKBOX | + CONTROL "&Шkt ID",IDC_SESSIONID,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,149,50,10 - CONTROL "Bruker &Navn",IDC_USERNAME,"Button",BS_AUTOCHECKBOX | + CONTROL "Bruker&navn",IDC_USERNAME,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,160,51,10 CONTROL "Side &mangel Delta",IDC_PAGEFAULTSDELTA,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,107,28,72,10 - CONTROL "&Virtuelt minne Stшrrelse",IDC_VIRTUALMEMORYSIZE,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,107,39,77,10 + CONTROL "&Virtuelt minne stшrrelse",IDC_VIRTUALMEMORYSIZE,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,107,39,86,10 CONTROL "Si&de innsats",IDC_PAGEDPOOL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,50,53,10 CONTROL "I&ngen-side innsats",IDC_NONPAGEDPOOL,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,107,61,67,10 - CONTROL "Base P&rioritet",IDC_BASEPRIORITY,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,107,61,72,10 + CONTROL "Basisp&rioritet",IDC_BASEPRIORITY,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,107,72,55,10 CONTROL "&Handle regne",IDC_HANDLECOUNT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,83,59,10 CONTROL "&Trеd medregne",IDC_THREADCOUNT,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,107,94,59,10 + WS_TABSTOP,107,94,65,10 CONTROL "GDI Objekt",IDC_GDIOBJECTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,105,55,10 - CONTROL "I/O skriver",IDC_IOWRITES,"Button",BS_AUTOCHECKBOX | + CONTROL "I/O skrevet",IDC_IOWRITES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,116,49,10 - CONTROL "I/O skriver Bytes",IDC_IOWRITEBYTES,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,107,127,65,10 + CONTROL "I/O skrevne byte",IDC_IOWRITEBYTES,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,107,127,70,10 CONTROL "I/O Annet",IDC_IOOTHER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,138,46,10 - CONTROL "I/O Annet Byte",IDC_IOOTHERBYTES,"Button", + CONTROL "I/O Andre byte",IDC_IOOTHERBYTES,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,107,149,65,10 END @@ -544,39 +544,39 @@ END STRINGTABLE DISCARDABLE BEGIN ID_FILE_NEW "Kjшr et nytt program" - ID_OPTIONS_ALWAYSONTOP "Oppgavebehandler fortsette е vжre forran av alle andre vinduer uten minimert" + ID_OPTIONS_ALWAYSONTOP "Oppgavebehandler fortsette е vжre over alle andre vinduer med mindre de er minimert" ID_OPTIONS_MINIMIZEONUSE - "Oppgavebehandelen er minimert nеr en SwitchTo operasjon er oppfшrt" + "Oppgavebehandling er minimert nеr en 'Skift til' operasjon utfшres" ID_OPTIONS_HIDEWHENMINIMIZED "Skjule oppgavebehandelen nеr det er minimert" - ID_VIEW_REFRESH "Nшdvendighet for oppgavebehandelen е oppdateres nе, hensynslшs av oppdatering hastighet innstillingen" - ID_VIEW_LARGE "Vis oppgavene ved е bruke store ikoner" - ID_VIEW_SMALL "Vis oppgavene ved е bruke smе ikoner" - ID_VIEW_DETAILS "Vis informasjon om hver oppgave" + ID_VIEW_REFRESH "Oppdater nе, uahengig av innstillingene for oppdatering hastighet" + ID_VIEW_LARGE "Viser oppgavene ved е bruke store ikoner" + ID_VIEW_SMALL "Viser oppgavene ved е bruke smе ikoner" + ID_VIEW_DETAILS "Viser informasjon om hver oppgave" ID_VIEW_UPDATESPEED_HIGH "Oppdater skjermen to ganger per sekund" - ID_VIEW_UPDATESPEED_NORMAL "Oppdater skjermen hver to sekunds" - ID_VIEW_UPDATESPEED_LOW "Oppdater skjermen hver fire sekund" + ID_VIEW_UPDATESPEED_NORMAL "Oppdater skjermen annenhver sekund" + ID_VIEW_UPDATESPEED_LOW "Oppdater skjermen hvert fjerde sekund" END STRINGTABLE DISCARDABLE BEGIN - ID_VIEW_UPDATESPEED_PAUSED "Kan ikke automatisk oppdateres" + ID_VIEW_UPDATESPEED_PAUSED "Skjermen oppdaterer ikke automatisk" ID_WINDOWS_TILEHORIZONTALLY - "Tittel vindu horisontalt pе skrivebordet" - ID_WINDOWS_TILEVERTICALLY "Tittel vindu vertikalt pе skrivebordet" + "Viser tittel vindu horisontalt pе skrivebordet" + ID_WINDOWS_TILEVERTICALLY "Viser tittel vindu vertikalt pе skrivebordet" ID_WINDOWS_MINIMIZE "Minimalisere vinduet" ID_WINDOWS_MAXIMIZE "Maksimere vinduet" - ID_WINDOWS_CASCADE "Cascades vinduet diagonalt pе skrivebordet" - ID_WINDOWS_BRINGTOFRONT "Bringe vinduet front, men kan ikke bryter til det" - ID_HELP_TOPICS "Vis oppgavebehandler emner i hjelp" - ID_HELP_ABOUT "Vis program informasjon, versjon nummer, og enerett" - ID_FILE_EXIT "Avslutt oppgavebehandler applikasjon" + ID_WINDOWS_CASCADE "Overlapper vinduet diagonalt pе skrivebordet" + ID_WINDOWS_BRINGTOFRONT "Legger vinduet шverst, men kan ikke skifte til det" + ID_HELP_TOPICS "Viser emner i hjelp for oppgavebehandling" + ID_HELP_ABOUT "Viser program informasjon, versjon nummer, og enerett" + ID_FILE_EXIT "Avslutter oppgavebehandling" ID_OPTIONS_SHOW16BITTASKS - "Vis 16-bit oppgaver under assosiert ntvdm.exe" - ID_VIEW_SELECTCOLUMNS "Velg hva kolonner vil bli synlig pе Prosess side" - ID_VIEW_SHOWKERNELTIMES "Vis kernel tid i utfшrelse diagramer" + "Viser 16-biters oppgaver under tilknyttende ntvdm.exe" + ID_VIEW_SELECTCOLUMNS "Velg hvilken kolonner som vil bli synlig pе prosess siden" + ID_VIEW_SHOWKERNELTIMES "Viser kjerne tid i ytelses grafene" ID_VIEW_CPUHISTORY_ONEGRAPHALL - "En singel historie graf viser totalt CPU bruk" - ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU "Hver CPU har dems egene historie graf" + "En enkelt logg graf viser totalt prosessorbruk" + ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU "Hver prosessor har sin egen logg graf" ID_APPLICATION_PAGE_SWITCHTO "Skaffe en oppgave til forgrunn, endre fokus til den oppgaven" END @@ -617,10 +617,10 @@ BEGIN IDS_TAB_PID "PID" IDS_TAB_USERNAME "Brukernavn" IDS_TAB_SESSIONID "Sesjon ID" - IDS_TAB_CPU "CPU" - IDS_TAB_CPUTIME "CPU Tid" - IDS_TAB_MEMUSAGE "Bruk av vekslefil" - IDS_TAB_PEAKMEMUSAGE "Maks bruk av Mem" + IDS_TAB_CPU "Prosessor" + IDS_TAB_CPUTIME "Prosessor tid" + IDS_TAB_MEMUSAGE "Minnebruk" + IDS_TAB_PEAKMEMUSAGE "Maks minnebruk" IDS_TAB_MEMDELTA "Mem Delta" IDS_TAB_PAGEFAULT "Side mangel" IDS_TAB_PFDELTA "PF Delta" @@ -638,21 +638,21 @@ BEGIN IDS_TAB_IOREADBYTES "I/O Leser Byte" IDS_TAB_IOWRITESBYTES "I/O Skriver Byte" IDS_TAB_IOOTHERBYTES "I/O Annet Byte" - IDS_MENU_SELECTCOLUMNS "&Velg kollone..." + IDS_MENU_SELECTCOLUMNS "&Velg kolonner..." IDS_MENU_16BITTASK "&Vis 16-biter oppgave" IDS_MENU_WINDOWS "&Vinduer" - IDS_MENU_LARGEICONS "St&ore Ikoner" - IDS_MENU_SMALLICONS "S&mе Ikoner" + IDS_MENU_LARGEICONS "St&ore ikoner" + IDS_MENU_SMALLICONS "S&mе ikoner" IDS_MENU_DETAILS "&Detaljer" - IDS_MENU_ONEGRAPHALLCPUS "&En Graf, Alle CPU" - IDS_MENU_ONEGRAPHPERCPU "En Graf &Per CPU" - IDS_MENU_CPUHISTORY "&CPU Historie" - IDS_MENU_SHOWKERNELTIMES "&Vis Kernel tider" + IDS_MENU_ONEGRAPHALLCPUS "&En Graf, alle prosessorer" + IDS_MENU_ONEGRAPHPERCPU "En Graf &per prosessor" + IDS_MENU_CPUHISTORY "&Prosessor Historie" + IDS_MENU_SHOWKERNELTIMES "&Vis Kjerne tider" IDS_CREATENEWTASK "Opprett ny oppgave" - IDS_CREATENEWTASK_DESC "Skriv navnet av et program, mappe, dokument, eller Internett-ressursen, og oppgavebehandelen vil еpne det for deg." - IDS_MSG_ACCESSPROCESSAFF "Ikke i stand til tilgang eller sette Prosess slektskap" + IDS_CREATENEWTASK_DESC "Skriv navnet pе et program, mappe, dokument, eller Internett-ressursen, som oppgavebehandelen vil еpne for deg." + IDS_MSG_ACCESSPROCESSAFF "Ikke mulig е fo tilgang eller sette prosess slektskap" IDS_MSG_PROCESSONEPRO "Prosessen mе ha tiltrekning med minst en prosessor." - IDS_MSG_INVALIDOPTION "Ugyldig Operasjon" + IDS_MSG_INVALIDOPTION "Ugyldig operasjon" IDS_MSG_UNABLEDEBUGPROCESS "Ute av stand til feilsшking prosess" IDS_MSG_WARNINGDEBUG "ADVARSEL: Feilretning denne prosess kan fшlge е miste data.\nEr du sikker du vil tilknytte feilsшkingsprogramet?" IDS_MSG_TASKMGRWARNING "Oppgavebehandler advarsel" @@ -660,7 +660,7 @@ BEGIN IDS_MSG_UNABLETERMINATEPRO "Ikke i stand til е avslutte prosess" IDS_MSG_UNABLECHANGEPRIORITY "Ikke i stand til endre prioritet" IDS_MSG_WARNINGCHANGEPRIORITY "ADVARSEL: Endring av prioritet klasse av denne prosess kan\nforutsake uшnsket resultat inkluderer systemet kan bli ustabilt. Er du\nsikker pе at du vil endre prioritet klassen?" - IDS_MSG_TRAYICONCPUUSAGE "Bruk av CPU : %d%%" + IDS_MSG_TRAYICONCPUUSAGE "Bruk av CPU: %d%%" IDS_STATUS_MEMUSAGE "Tildelt minne: %dK / %dK" IDS_STATUS_CPUUSAGE "Bruk av CPU: %3d%%" IDS_STATUS_PROCESSES "Prosesser: %d" diff --git a/reactos/base/setup/reactos/lang/no-NO.rc b/reactos/base/setup/reactos/lang/no-NO.rc index 6e7550bb501..e2c3ead444b 100644 --- a/reactos/base/setup/reactos/lang/no-NO.rc +++ b/reactos/base/setup/reactos/lang/no-NO.rc @@ -2,11 +2,128 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL -/* String Tables */ -STRINGTABLE DISCARDABLE +IDD_STARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "ReactOS installering" +FONT 8, "MS Shell Dlg" BEGIN - IDS_CAPTION "ReactOS Installering" - IDS_TEXT "Du kan ikke installere ReactOS direkte fra denne CD!\n\nVennligst restart din datamaskin fra denne CD i anvisning for е installere ReactOS." + LTEXT "Velkommen til ReactOS installering veiviseren.", IDC_STARTTITLE, 115, 8, 220, 24 + LTEXT "Du kan ennе ikke installere ReactOS direkte fra denne CD-en! "\ + "Vennligst start datamaskinen pе nytt og start fra denne platen for е "\ + "installere ReactOS.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "Trykk pе Fullfшrt for е avslutte installeringen.", IDC_STATIC, 115, 169, 195, 17 END +IDD_LANGSELPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "ReactOS installering" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "IDB_LOGO", IDB_ROSLOGO, "Static", WS_CHILD | WS_VISIBLE | SS_OWNERDRAW, 18, 0, 290, 99 + CONTROL "Installering sprеk:", IDC_STATIC, "Static", WS_CHILD | WS_VISIBLE | WS_GROUP | SS_RIGHT, 20, 109, 106, 11 + CONTROL "", IDC_LANGUAGES, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST, 132, 107, 176, 142 + CONTROL "Tastatur eller inndatasprеk:", IDC_STATIC, "Static", WS_CHILD | WS_VISIBLE | WS_GROUP | SS_RIGHT, 20, 142, 106, 11 + CONTROL "", IDC_KEYLAYOUT, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST, 132, 141, 176, 81 + LTEXT "Trykk pе Neste for е velge installering type.", IDC_STATIC, 10, 180 ,297, 10 +END + +IDD_TYPEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "ReactOS installering" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "Installeringsvalg", IDC_STATIC, "Button", BS_GROUPBOX, 10,0,297,172 + CONTROL "Installere ReactOS", IDC_INSTALL, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 20, 15, 277, 10 + CONTROL "Reparere eller oppdatere en installert ReactOS", IDC_SETUP, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 20, 30, 277, 10 + LTEXT "Trykk pе Neste for installere enhetene.", IDC_STATIC, 10, 180 ,297, 10 +END + +IDD_DEVICEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "ReactOS installering" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "Enhetsinnstillinger", IDC_STATIC, "Button", BS_GROUPBOX, 10,0,297,172 + LTEXT "Datamaskin:", IDC_STATIC, 20,15, 80, 10 + CONTROL "", IDC_COMPUTER, "ComboBox", WS_TABSTOP | CBS_DROPDOWNLIST , 100, 15, 150, 80 + LTEXT "Skjerm:", IDC_STATIC, 20,35, 80, 10 + CONTROL "", IDC_DISPLAY, "ComboBox", WS_TABSTOP | CBS_DROPDOWNLIST , 100, 35, 150, 80 + LTEXT "Tastatur:", IDC_STATIC, 20,55, 80, 10 + CONTROL "", IDC_KEYBOARD, "ComboBox", WS_TABSTOP | CBS_DROPDOWNLIST , 100, 55, 150, 80 + LTEXT "Trykk pе Neste for е installere enhetene.", IDC_STATIC, 10, 180 ,277, 20 +END + +IDD_DRIVEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "ReactOS installering" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "ReactOS partisjon installasjon", IDC_STATIC, "Button", BS_GROUPBOX, 10,1,298,176 + LISTBOX IDC_PARTITION, 20,12,278,142,LBS_HASSTRINGS | WS_VSCROLL + PUSHBUTTON "&Opprett", IDC_PARTCREATE, 20,155,50,15 + PUSHBUTTON "&Slett", IDC_PARTDELETE, 76,155,50,15 + PUSHBUTTON "&Avansert valg...", IDC_PARTMOREOPTS, 218,155,80,15 + LTEXT "Trykk pе Neste for е starte installasjon prosessen.", IDC_STATIC, 10, 180 ,277, 20 +END + +IDD_BOOTOPTIONS DIALOGEX DISCARDABLE 0, 0, 305, 105 +STYLE WS_VISIBLE|WS_CAPTION|WS_SYSMENU|WS_THICKFRAME +CAPTION "Avansert partisjon innstillinger" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "Installasjon mappe", IDC_STATIC, "Button", BS_GROUPBOX, 4,1,298,30 + EDITTEXT IDC_PATH, 10,11,278,13, WS_VISIBLE + + CONTROL "Oppstartslaster installasjon", IDC_STATIC, "Button", BS_GROUPBOX, 4,36,298,41 + + CONTROL "Installer oppstartslaster pе harddiskens (MBR)", IDC_INSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10,46,278,11 + CONTROL "Ikke installer oppstartslaster", IDC_NOINSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 10,57,278,11 +END + +IDD_PROCESSPAGE DIALOGEX 0, 0, 317, 193 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "ReactOS installering" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "Installasjon handling", IDC_ACTION, "Button", BS_GROUPBOX, 10,0,297,172 + LTEXT "Installer filer...", IDC_ACTIVITY, 20, 50, 277, 10 + LTEXT "test.txt", IDC_ITEM, 30, 80, 257, 10 + CONTROL "", IDC_PROCESSPROGRESS, "msctls_progress32", + PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 +END + + +IDD_RESTARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Fullfшrer ReactOS installering" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "Fullfшrer fшrste steget av ReactOS installering", IDC_FINISHTITLE, "Button", BS_GROUPBOX, 10,0,297,172 + LTEXT "Du har nе fullfшrt fшrste steget av ReactOS installering.", IDC_STATIC, 20, 50, 277, 10 + + LTEXT "Nеr du trykker Fullfшrt, vil din datamaskin starte pе nytt.", IDC_STATIC, 20, 80, 277, 10 + CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 + LTEXT "Hvis du fortsatt har CD platen i stasjon, fjern denne. Ogsе, for е starte "\ + "din datamaskin pе nytt, trykk pе Fullfшrt.", IDC_STATIC, 10, 180, 297, 20 +END + + +STRINGTABLE +BEGIN + IDS_LANGTITLE "Sprеk valg" + IDS_LANGSUBTITLE "Velg sprеk for installering og til ferdig system." + IDS_TYPETITLE "Velkommen til ReactOS installering" + IDS_TYPESUBTITLE "Velg installering type." + IDS_DEVICETITLE "Installer grunnleggende enheter" + IDS_DEVICESUBTITLE "Velg innstillingene til skjermen og tastaturet." + IDS_DRIVETITLE "Valg av installasjon partisjon og system mappe" + IDS_DRIVESUBTITLE "Forbrede installasjon partisjon, system mappe og oppstartslaster." + IDS_PROCESSTITLE "Forbrede partisjon, kopiere filer og installere system" + IDS_PROCESSSUBTITLE "Opprett og formater partisjon, kopier filer, installere og sett opp oppstartlaster" + IDS_RESTARTTITLE "Fшrste steget av installering er fullfшrt" + IDS_RESTARTSUBTITLE "Fшrste steget av installering har blitt fullfшrt, start pе nytt for е fortsette til andre steget" + IDS_ABORTSETUP "ReactOS er ikke fullstendig installert pе datamaskinen. Hvis du avslutter nе, trenger du е kjшre installeringen pе nytt for е installere Reactos. Vil du virkelig avslutte?" + IDS_ABORTSETUP2 "Avbryt installasjonen?" +END /* EOF */ + diff --git a/reactos/base/setup/reactos/rsrc.rc b/reactos/base/setup/reactos/rsrc.rc index 217b12b5db4..2287b042eeb 100644 --- a/reactos/base/setup/reactos/rsrc.rc +++ b/reactos/base/setup/reactos/rsrc.rc @@ -7,6 +7,7 @@ #include "lang/de-DE.rc" //#include "lang/el-GR.rc" #include "lang/en-US.rc" +#include "lang/no-NO.rc" /*#include "lang/es-ES.rc" #include "lang/fi-FI.rc"*/ #include "lang/fr-FR.rc" @@ -15,7 +16,6 @@ #include "lang/it-IT.rc" #include "lang/ja-JP.rc" #include "lang/lt-LT.rc" -#include "lang/no-NO.rc" #include "lang/nl-NL.rc"*/ #include "lang/pl-PL.rc" /*#include "lang/pt-BR.rc"*/ diff --git a/reactos/base/setup/usetup/lang/bg-BG.h b/reactos/base/setup/usetup/lang/bg-BG.h index ca3889eed20..d418680ead7 100644 --- a/reactos/base/setup/usetup/lang/bg-BG.h +++ b/reactos/base/setup/usetup/lang/bg-BG.h @@ -4,6 +4,8 @@ MUI_LAYOUTS bgBGLayouts[] = { { L"0402", L"00000402" }, + { L"0402", L"00020402" }, + { L"0402", L"00030402" }, { L"0409", L"00000409" }, { NULL, NULL } }; @@ -1086,7 +1088,7 @@ static MUI_ENTRY bgBGLayoutSettingsEntries[] = { 6, 8, - "Please select a layout to be installed by default.", + "€§ЎҐаҐвҐ Ї®¤а §ЎЁа ­  Є« ўЁ вга­  Ї®¤аҐ¤Ў .", TEXT_STYLE_NORMAL }, { diff --git a/reactos/base/shell/cmd/lang/it-IT.rc b/reactos/base/shell/cmd/lang/it-IT.rc index 8a83fb716e0..3aef3da45ae 100644 --- a/reactos/base/shell/cmd/lang/it-IT.rc +++ b/reactos/base/shell/cmd/lang/it-IT.rc @@ -36,6 +36,7 @@ STRING_CALL_HELP, "Chiama un programma batch da un altro.\n\n\ CALL [disco:][percorso]nomefile [Parametri]\n\n\ Parametri Indicano le informazioni richieste per il programma batch." + STRING_CD_HELP, "Cambia la cartella corrente o ne visualizza nome\n\n\ CHDIR [/D][disco:][percorso]\n\ CHDIR[..|.]\n\ @@ -89,21 +90,21 @@ CMD [/[C|K] comando][/P][/Q][/T:bf]\n\n\ STRING_COLOR_HELP1, "Definisce i colori predefiniti di primo piano e sfondo.\n\n\ COLOR [attr [/-F]] \n\n\ attr Indica gli attributi di colore per i messaggi su console\n\ - /-F Non riempie lo spazio vuoto della consol con gli attributi di colore\n\n\ + /-F Non riempie lo spazio vuoto della console con gli attributi di colore\n\n\ Ci sono tre modi per indicare i colori:\n\ 1) [bright] nome su [bright] nome (sono necessarie solo le prime tre lettere)\n\ 2) decimale su decimale\n\ 3) due cifre esadecimali\n\n\ I colori sono:\n\ dec esa name dec esa nome\n\ -0 0 Black 8 8 Gray(Bright black)\n\ -1 1 Blue 9 9 Bright Blue\n\ -2 2 Green 10 A Bright Green\n\ -3 3 Cyan 11 B Bright Cyan\n\ -4 4 Red 12 C Bright Red\n\ -5 5 Magenta 13 D Bright Magenta\n\ -6 6 Yellow 14 E Bright Yellow\n\ -7 7 White 15 F Bright White\n" +0 0 Nero 8 8 Grigio (Nero acceso)\n\ +1 1 Blu 9 9 Blu acceso\n\ +2 2 Verde 10 A Verde acceso\n\ +3 3 Ciano 11 B Ciano acceso\n\ +4 4 Rosso 12 C Rosso acceso\n\ +5 5 Magenta 13 D Magenta acceso\n\ +6 6 Giallo 14 E Giallo acceso\n\ +7 7 Bianco 15 F Bianco acceso\n" STRING_COPY_HELP1, "Sovrascrivi %s (Si/No/Tutti)? " @@ -114,7 +115,7 @@ COPY [/V][/Y|/-Y][/A|/B] sorgente [/A|/B]\n\ /A Indica un file di testo ASCII.\n\ /B Indica un file binario.\n\ destinazione Indica la cartella e/o il nome di file per i nuovi/o file.\n\ - /V Verifies that new files are written correctly.\n\ + /V Verifica che i file sono stati scritti correttamente.\n\ /Y Elimina le richieste di conferma per le sovrascrittura\n\ di un file di destinazione giа esistente.\n\ /-Y Effettua le richieste di conferma per le sovrascrittura\n\ @@ -205,8 +206,8 @@ STRING_DIR_HELP6, "%16i Cartelle% 15s byte\n" STRING_DIR_HELP7, "\n Cartelle di %s\n\n" STRING_DIR_HELP8, "%16i File% 14s byte\n" -STRING_DIRSTACK_HELP1, "Salva la directory corrente per l'uso con il comando POPD, poi\n\ -cambia alla cartella indicata.\n\n\ +STRING_DIRSTACK_HELP1, "Salva la cartella corrente per l'uso con il comando POPD, poi\n\ +passa alla cartella indicata.\n\n\ PUSHD [percorso | ..]\n\n\ percorso Indica la cartella che deve diventare quella corrente\n" @@ -289,9 +290,8 @@ STRING_LABEL_HELP5, "Etichetta del disco (11 Caratteri, INVIO per nessuna)? " STRING_LOCALE_HELP1, "L'ora attuale и" -STRING_MKDIR_HELP, "Crea una directory.\n\n\ -MKDIR [disco:]percorso\n\ -MD [disco:]percorso" +STRING_MKDIR_HELP, "Crea una cartella.\n\n\ +MKDIR [disco:]percorso\nMD [disco:]percorso" STRING_MEMMORY_HELP1, "Visualizza la quantitа della memoria di sistema.\n\n\ MEMORY" @@ -311,7 +311,7 @@ STRING_MOVE_HELP1, "Sovrascrivi %s (Si/No/Tutti)? " STRING_MOVE_HELP2, "Sposta i file o cambia il nome a file e cartelle.\n\n\ Per spostare uno o piщ file:\n\ MOVE [/N][disco:][percorso]nomefile1[,...] destinazione\n\n\ -To rename a directory:\n\ +Per rinominare una cartella:\n\ MOVE [/N][disco:][percorso]]cartella1 cartella2\n\n\ [disco:][percorso]nomefile1 indica la posizione e il nome del file\n\ o dei file da spostare.\n\ @@ -395,6 +395,46 @@ STRING_REN_HELP2, " %lu file rinominato\n" STRING_REN_HELP3, " %lu files rinominati\n" +STRING_REPLACE_HELP1, "Sostituisce i file.\n\n\ +REPLACE [disco1:][percorso1]nomefile [disco2:][percorso2] [/A] [/P] [/R] [/W]\n\ +REPLACE [disco1:][percorso1]nomefile [disco2:][percorso2] [/P] [/R] [/S] [/W] [/U]\n\n\ + [drive1:][path1]nomefile Specifica il o i file sorgenti.\n\ + [disco2:][percorso2] Specifica la cartella dove i file devono essere\n\ + sostituiti.\n\ + /A Aggiunge i file alla cartella di destinazione. Non puт\n\ + essere usato con /S o /U .\n\ + /P Chiede conferma prima di sostituire o aggiungere\n\ + un file.\n\ + /R Sostituisce sia i file in sola lettura che quelli\n\ + non protetti.\n\ + /S Sostituisce i file in tutte le sottocartelle\n\ + della cartella di destinazione. Non puт essere\n\ + usato con /A .\n\ + /W Aspetta che sia inserito un disco prima di iniziare.\n\ + /U Sostituisce (aggiorna) solo i file piщ vecchi\n\ + dei file sorgenti. Non puт essere usato con /A .\n" + +STRING_REPLACE_HELP2, "Il percorso sorgente и obbligatorio\n" + +STRING_REPLACE_HELP3, "Nessun file sostituito\n" + +STRING_REPLACE_HELP4, "%lu file sostituiti\n" + +STRING_REPLACE_HELP5, "Sostituzione di %s in corso\n" + +STRING_REPLACE_HELP6, "Sostituzione di %s\n" + +STRING_REPLACE_HELP7, "Nessun file aggiunto\n" + +STRING_REPLACE_HELP8, "%lu file aggiunti\n" + +STRING_REPLACE_HELP9, "Aggiungere %s (S/N) " + +STRING_REPLACE_HELP10, "Sostituire %s (S/N) " + +STRING_REPLACE_HELP11, "Aggiunta di %s in corso\n" + + STRING_SHIFT_HELP, "Cambia la posizione dei parametri in un batch.\n\n\ SHIFT [DOWN]" @@ -490,16 +530,16 @@ STRING_VERSION_HELP7, "\nVersione ReactOS scritto da:\n" STRING_VOL_HELP1, " Il Volume del disco %c и %s\n" STRING_VOL_HELP2, " Il Volume del disco %c non ha etichetta\n" -STRING_VOL_HELP3, " Il numero diserie del Volume и %04X-%04X\n" +STRING_VOL_HELP3, " Il numero di serie del Volume и %04X-%04X\n" STRING_VOL_HELP4, "Visualizza l'etichetta del volume del disco e il numero di serie se disponibili.\n\n\ VOL [disco:]" STRING_WINDOW_HELP1, "cambia l'aspetto della finestra della console\n\n\ WINDOW [/POS[=]sinistra,alto,larghezza,altezza]\n\ [MIN|MAX|RESTORE] ['titolo']\n\n\ -/POS specify window placement and dimensions\n\ +/POS specifica la posizione e la dimensione della finestra\n\ MIN minimizza la finestra\n\ -MAX massimizzala finestra\n\ +MAX massimizza la finestra\n\ RESTORE ripristina la finestra" STRING_WINDOW_HELP2, "cambia l'aspetto della finestra della console\n\n\ @@ -508,7 +548,7 @@ ACTIVATE 'window' [/POS[=]sinistra,alto,larghezza,altezza]\n\ window finestra su cui eseguire l'azione\n\ /POS indica la posizione e la dimensione della finestra\n\ MIN minimizza la finestra\n\ -MAX massimizzala finestra\n\ +MAX massimizza la finestra\n\ RESTORE ripristina la finestra\n\ titolo il nuovo titolo\n" @@ -530,12 +570,12 @@ COPY Copia uno o pi DATE Visualizza o modifica la data.\n\ DELETE Cancella uno o piщ file.\n\ DIR Visualizza un elenco di file e sottocartelle in una cartella.\n\ -ECHO Visualizza messaggi, o abilita e disabilita la visualizzazione dei comandi.\n\ +ECHO Visualizza messaggi o abilita e disabilita la visualizzazione dei comandi.\n\ ERASE Cancella uno o piщ file.\n\ EXIT Esce dall'interprete dei comandi.\n\ FOR Esegue un comando per ognuno dei file indicati.\n\ FREE Spazio libero.\n\ -GOTO Salta a una etichettadurante l'esecuzione di un batch.\n\ +GOTO Salta a una etichetta durante l'esecuzione di un batch.\n\ HELP Fornisce informazioni sui comandi di ReactOS.\n\ HISTORY Elenco degli ultimi comandi usati\n\ IF Esegue elaborazioni condizionali in un batch.\n\ @@ -640,6 +680,14 @@ STRING_ERROR_DRIVER_NOT_READY, "Disco non pronto" STRING_PATH_ERROR, "CMD: Non nell'ambiente '%s'\n" +STRING_REPLACE_ERROR1, "Parametro non valido - %s\n" +STRING_REPLACE_ERROR2, "Percorso non trovato - %s\n" +STRING_REPLACE_ERROR3, "Il nome del file, della cartella o della etichetta di volume и errato.\n" +STRING_REPLACE_ERROR4, "Combinazione di parametri non valida\n" +STRING_REPLACE_ERROR5, "Accesso negato - %s\n" +STRING_REPLACE_ERROR6, "Nessun file trovato - %s\n" +STRING_REPLACE_ERROR7, "Errore esteso 32\n" + STRING_CMD_SHELLINFO, "\nInterprete di linea di comando di ReactOS" STRING_VERSION_RUNVER, " in esecuzione su %s" STRING_COPY_FILE , " %d file copiati\n" diff --git a/reactos/dll/cpl/access/lang/it-IT.rc b/reactos/dll/cpl/access/lang/it-IT.rc index 01f776becd6..4e95bac8a8a 100644 --- a/reactos/dll/cpl/access/lang/it-IT.rc +++ b/reactos/dll/cpl/access/lang/it-IT.rc @@ -274,7 +274,7 @@ CAPTION "Impostazione tasti da seriale" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Tasti da seriale",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(10) - LTEXT "Choose the port where you connect an alternative input device.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) + LTEXT "Scegliere la porta dove verrа connesso il dispositivo di input alternativo.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) LTEXT "&Porta seriale:",-1,PROPSHEETPADDING(2),LABELLINE(3)+5,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) COMBOBOX IDC_SERIAL_PORT_COMBO, PROPSHEETPADDING(2), LABELLINE(4)+7, PROPSHEETWIDTH-PROPSHEETPADDING(4), LABELLINE(6), diff --git a/reactos/dll/win32/netid/lang/no-NO.rc b/reactos/dll/win32/netid/lang/no-NO.rc index b4122643be4..641a54be503 100644 --- a/reactos/dll/win32/netid/lang/no-NO.rc +++ b/reactos/dll/win32/netid/lang/no-NO.rc @@ -7,12 +7,12 @@ FONT 8, "MS Shell Dlg" BEGIN ICON IDI_COMPNAME, IDC_STATIC, 4, 3, 26, 24, SS_ICON LTEXT "ReactOS bruker fшlgende informasjon for е identifisere datamaskinen pе nettverket.", IDC_STATIC, 40, 5, 204, 20 - LTEXT "Beskrivelse av datamaskinen:", IDC_STATIC, 6, 40, 90, 9 - EDITTEXT IDC_COMPDESC, 98, 38, 146, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP + LTEXT "Beskrivelse av datamaskinen:", IDC_STATIC, 6, 40, 135, 9 + EDITTEXT IDC_COMPDESC, 110, 38, 136, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP LTEXT "Fullt datamaskinnavn:", IDC_STATIC, 6, 68, 85, 9 - LTEXT "(Standard)", IDC_COMPUTERNAME, 98, 68, 144, 11 + LTEXT "(Standard)", IDC_COMPUTERNAME, 110, 68, 144, 11 LTEXT "Arbeidsgruppe:", IDC_WORKGROUPDOMAIN, 6, 84, 64, 9 - LTEXT "(Tom)", IDC_WORKGROUPDOMAIN_NAME, 98, 84, 144, 9 + LTEXT "(Tom)", IDC_WORKGROUPDOMAIN_NAME, 110, 84, 144, 9 LTEXT "Klikk nettverks-ID for е bruke veiviseren for nettverksidentifikasjon til е bli med i et domene og opprette en lokal brukerkonto.", IDC_STATIC, 6, 113, 172, 24 PUSHBUTTON "&Nettverk-ID...", IDC_NETWORK_ID, 190, 114, 58, 15 LTEXT "Klikk Endre for е gi datamaskinen et nytt navn eller bli med i et domenet.", IDC_STATIC, 6, 149, 170, 17 diff --git a/reactos/dll/win32/netshell/lang/bg-BG.rc b/reactos/dll/win32/netshell/lang/bg-BG.rc new file mode 100644 index 00000000000..193ecae5b81 --- /dev/null +++ b/reactos/dll/win32/netshell/lang/bg-BG.rc @@ -0,0 +1,20 @@ +LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT + +STRINGTABLE DISCARDABLE +BEGIN + IDS_NETWORKCONNECTION "Мрежово свързване" + IDS_SHV_COLUMN_NAME "Име" + IDS_SHV_COLUMN_TYPE "Вид" + IDS_SHV_COLUMN_STATE "Състояние" + IDS_SHV_COLUMN_DEVNAME "Име на устройството" + IDS_SHV_COLUMN_PHONE "Телефонен № или приемник" + IDS_SHV_COLUMN_OWNER "Собственик" + IDS_TYPE_ETHERNET "Местна мрежа или високоскоростен интернет" + IDS_STATUS_NON_OPERATIONAL "Забранен" + IDS_STATUS_UNREACHABLE "Несвързан" + IDS_STATUS_DISCONNECTED "Откачен е мрежов кабел" + IDS_STATUS_CONNECTING "Получаване на мрежов адрес" + IDS_STATUS_CONNECTED "Свързан" + IDS_STATUS_OPERATIONAL "Свързан" +END + diff --git a/reactos/dll/win32/netshell/lang/pl-PL.rc b/reactos/dll/win32/netshell/lang/pl-PL.rc new file mode 100644 index 00000000000..1b5eae4470d --- /dev/null +++ b/reactos/dll/win32/netshell/lang/pl-PL.rc @@ -0,0 +1,20 @@ +LANGUAGE LANG_POLISH, SUBLANG_DEFAULT + +STRINGTABLE DISCARDABLE +BEGIN + IDS_NETWORKCONNECTION "Poі№czenie sieciowe" + IDS_SHV_COLUMN_NAME "Nazwa" + IDS_SHV_COLUMN_TYPE "Typ" + IDS_SHV_COLUMN_STATE "Status" + IDS_SHV_COLUMN_DEVNAME "Nazwa urz№dzenia" + IDS_SHV_COLUMN_PHONE "Numer telefonu lub adres hosta" + IDS_SHV_COLUMN_OWNER "Wіaњciciel" + IDS_TYPE_ETHERNET "Sieж LAN lub szerokopasmowy Internet" + IDS_STATUS_NON_OPERATIONAL "Wyі№czony" + IDS_STATUS_UNREACHABLE "Niepoі№czony" + IDS_STATUS_DISCONNECTED "Kabel sieciowy odі№czony" + IDS_STATUS_CONNECTING "Pobieranie adresu sieciowego" + IDS_STATUS_CONNECTED "Poі№czony" + IDS_STATUS_OPERATIONAL "Poі№czony" +END + diff --git a/reactos/dll/win32/netshell/netshell.rc b/reactos/dll/win32/netshell/netshell.rc index 6b50742a821..6d0971f51bd 100644 --- a/reactos/dll/win32/netshell/netshell.rc +++ b/reactos/dll/win32/netshell/netshell.rc @@ -17,6 +17,8 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDI_SHELL_NETWORK_FOLDER ICON "res/netshell.ico" +#include "lang/bg-BG.rc" #include "lang/de-DE.rc" #include "lang/en-US.rc" +#include "lang/pl-PL.rc" #include "lang/ru-RU.rc" diff --git a/reactos/dll/win32/shell32/lang/bg-BG.rc b/reactos/dll/win32/shell32/lang/bg-BG.rc index c6942c72caf..a56669c98fa 100644 --- a/reactos/dll/win32/shell32/lang/bg-BG.rc +++ b/reactos/dll/win32/shell32/lang/bg-BG.rc @@ -143,7 +143,7 @@ IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 STYLE DS_SHELLFONT | WS_CHILD FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Реактос достигна до вас, благодарение на:", IDC_STATIC, 0, 0, 250, 10 + LTEXT "РеактОС достигна до вас, благодарение на:", IDC_STATIC, 0, 0, 250, 10 LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 END @@ -206,18 +206,18 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY - LTEXT "Type of file:", 14004, 8, 35, 50, 10 - LTEXT "Folder", 14005, 68, 35, 160, 10 - LTEXT "Location:", 14006, 8, 53, 50, 10 + LTEXT "Вид на файла:", 14004, 8, 35, 50, 10 + LTEXT "Папка", 14005, 68, 35, 160, 10 + LTEXT "Място:", 14006, 8, 53, 50, 10 LTEXT "", 14007, 68, 53, 315, 10 - LTEXT "Size:", 14008, 8, 72, 45, 10 + LTEXT "Размер:", 14008, 8, 72, 45, 10 LTEXT "", 14009, 68, 72, 315, 10 - LTEXT "Contains:", 14010, 8, 93, 45, 10 + LTEXT "Съдържа:", 14010, 8, 93, 45, 10 LTEXT "", 14011, 68, 93, 160, 10 - LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "Създадено:", 14014, 8, 118, 45, 10 LTEXT "", 14015, 68, 118, 160, 10 - AUTOCHECKBOX "&Read-only", 14021, 45, 150, 67, 10 - AUTOCHECKBOX "&Hidden", 14022, 126, 150, 50, 10 + AUTOCHECKBOX "&Само за четене", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "&Скрит", 14022, 126, 150, 50, 10 END SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 @@ -528,8 +528,6 @@ BEGIN PUSHBUTTON "Отказ", IDCANCEL, 159, 160, 60, 14 END - - SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION CAPTION "Изключване на РеактОС" @@ -565,17 +563,17 @@ BEGIN AUTOCHECKBOX "&Използване на уплътняване", 28675, 16, 152, 155, 10 END -CHKDSK_DLG DIALOGEX 50, 50, 194, 120 +CHKDSK_DLG DIALOGEX 50, 50, 244, 120 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "Check Disk" +CAPTION "Проверка на диска" FONT 8, "MS Shell Dlg" BEGIN - DEFPUSHBUTTON "Start", IDOK, 53, 100, 60, 14 - GROUPBOX "Check disk options", -1, 7, 6, 179, 50 - PUSHBUTTON "Cancel", IDCANCEL, 118, 100, 60, 14 - AUTOCHECKBOX "Automatically fix file system errors", 14000, 16, 15, 155, 10 - AUTOCHECKBOX "&Scan for and attempt recovery of bad sectors", 14001, 16, 30, 165, 10 - CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 + DEFPUSHBUTTON "Начало", IDOK, 53, 100, 60, 14 + GROUPBOX "Настройки за проверката", -1, 7, 6, 229, 50 + PUSHBUTTON "Отказ", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "Самопоправяне на системните грешки на файловете", 14000, 16, 15, 210, 10 + AUTOCHECKBOX "Об&хождане и опит за възстановяване на лошите сектори", 14001, 16, 30, 210, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 42, 60, 170, 8 LTEXT "", 14003, 60, 80, 170, 10 END @@ -608,25 +606,25 @@ BEGIN IDS_SHV_COLUMN9 "Забележки" IDS_SHV_COLUMN10 "Собственик" IDS_SHV_COLUMN11 "Група" - IDS_SHV_COLUMN12 "Filename" - IDS_SHV_COLUMN13 "Category" + IDS_SHV_COLUMN12 "Файлово име" + IDS_SHV_COLUMN13 "Раздел" IDS_SHV_COLUMN_DELFROM "Първоначално място" IDS_SHV_COLUMN_DELDATE "Дата на изтриване" - IDS_SHV_COLUMN_FONTTYPE "Fonttype" - IDS_SHV_COLUMN_WORKGROUP "Workgroup" - IDS_SHV_NETWORKLOCATION "Network Location" - IDS_SHV_COLUMN_DOCUMENTS "Documents" - IDS_SHV_COLUMN_STATUS "Status" - IDS_SHV_COLUMN_COMMENTS "Comments" - IDS_SHV_COLUMN_LOCATION "Location" - IDS_SHV_COLUMN_MODEL "Model" + IDS_SHV_COLUMN_FONTTYPE "Вид шрифт" + IDS_SHV_COLUMN_WORKGROUP "Работна група" + IDS_SHV_NETWORKLOCATION "Място в мрежата" + IDS_SHV_COLUMN_DOCUMENTS "Книжа" + IDS_SHV_COLUMN_STATUS "Състояние" + IDS_SHV_COLUMN_COMMENTS "Забележки" + IDS_SHV_COLUMN_LOCATION "Място" + IDS_SHV_COLUMN_MODEL "Модел" // special folders IDS_DESKTOP "Работна площ" IDS_MYCOMPUTER "Моят компютър" IDS_RECYCLEBIN_FOLDER_NAME "Кошче" IDS_CONTROLPANEL "Крило за управление" - IDS_ADMINISTRATIVETOOLS "Administrative Tools" + IDS_ADMINISTRATIVETOOLS "Управленски средства" // context menus IDS_VIEW_LARGE "&Големи значета" @@ -640,10 +638,10 @@ BEGIN IDS_DELETE "Из&триване" IDS_PROPERTIES "&Свойства" IDS_CUT "Из&рязване" - IDS_RESTORE "Restore" - IDS_FORMATDRIVE "Format..." - IDS_RENAME "Rename" - IDS_INSERT "Insert" + IDS_RESTORE "Възвръщане" + IDS_FORMATDRIVE "Оразмеряване..." + IDS_RENAME "Преименуване" + IDS_INSERT "Вмъкване" IDS_CREATEFOLDER_DENIED "Създаването на нова папка е невъзможно: недостатъчни права." IDS_CREATEFOLDER_CAPTION "Грешка при създаване на нова папка" @@ -721,36 +719,36 @@ BEGIN IDS_PICK_ICON_FILTER "Файлове със значета(*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" IDS_OPEN_WITH_FILTER "Изпълними файлове\0*.exe\0" IDS_DIRECTORY "Папка" - IDS_VIRTUAL_DRIVER "Virtual Device Driver" - IDS_BAT_FILE "ReactOS Batch File" - IDS_CMD_FILE "ReactOS Command Script" - IDS_COM_FILE "Dos Application" - IDS_CPL_FILE "Control Panel Item" - IDS_CUR_FILE "Cursor" - IDS_DLL_FILE "Application Extension" - IDS_DRV_FILE "Device Driver" - IDS_EXE_FILE "Application" - IDS_FON_FILE "Font file" - IDS_TTF_FILE "TrueType Font file" - IDS_HLP_FILE "Help File" - IDS_INI_FILE "Configuration Settings" - IDS_LNK_FILE "Shortcut" - IDS_SYS_FILE "System file" + IDS_VIRTUAL_DRIVER "Водач на привидно устройство" + IDS_BAT_FILE "Пакетен файл на РеактОС" + IDS_CMD_FILE "Писание за управление на РеактОС" + IDS_COM_FILE "Приложение за ДОС" + IDS_CPL_FILE "Предмет от крилото за управление" + IDS_CUR_FILE "Показалец" + IDS_DLL_FILE "Разширение за приложения" + IDS_DRV_FILE "Водача на устройство" + IDS_EXE_FILE "Приложение" + IDS_FON_FILE "Шрифтов файл" + IDS_TTF_FILE "Файл с шрифт TrueType " + IDS_HLP_FILE "Помощен файл" + IDS_INI_FILE "Настроечен файл" + IDS_LNK_FILE "Препратка" + IDS_SYS_FILE "Системен файл" - IDS_OPEN_VERB "Open" - IDS_RUNAS_VERB "Run as " - IDS_EDIT_VERB "Edit" - IDS_FIND_VERB "Find" - IDS_PRINT_VERB "Print" - IDS_PLAY_VERB "Play" - IDS_PREVIEW_VERB "Preview" + IDS_OPEN_VERB "Отваряне" + IDS_RUNAS_VERB "Изпълняване като " + IDS_EDIT_VERB "Обработка" + IDS_FIND_VERB "Търсене" + IDS_PRINT_VERB "Разпечатване" + IDS_PLAY_VERB "Възпроизвеждане" + IDS_PREVIEW_VERB "Преглед" - IDS_FILE_FOLDER "%u Files, %u Folders" - IDS_PRINTERS "Printers" - IDS_FONTS "Fonts" - IDS_INSTALLNEWFONT "Install New Font..." + IDS_FILE_FOLDER "%u файла, %u папки" + IDS_PRINTERS "Печатачи" + IDS_FONTS "Шрифтове" + IDS_INSTALLNEWFONT "Слагане на нов шрифт..." - IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" + IDS_DEFAULT_CLUSTER_SIZE "Подразбиран разпределителен размер" END diff --git a/reactos/dll/win32/shell32/lang/no-NO.rc b/reactos/dll/win32/shell32/lang/no-NO.rc index c3b13ef4d5a..f1269cd40c9 100644 --- a/reactos/dll/win32/shell32/lang/no-NO.rc +++ b/reactos/dll/win32/shell32/lang/no-NO.rc @@ -149,7 +149,7 @@ END SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Kjшr" FONT 8, "MS Shell Dlg" BEGIN ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE @@ -167,11 +167,11 @@ CAPTION "Snarvei" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN ICON "", 14000, 10, 5, 30, 30, WS_VISIBLE - LTEXT "Target type:", 14004, 10, 30, 50, 10 + LTEXT "Plasseringstype:", 14004, 10, 30, 50, 10 LTEXT "", 14005, 70, 30, 150, 10 - LTEXT "Target sted:", 14006, 10, 40, 70, 10 + LTEXT "Plasseringssted:", 14006, 10, 40, 70, 10 LTEXT "", 14007, 70, 40, 150, 10 - LTEXT "Target:", 14008, 10, 55, 45, 10 + LTEXT "Plassering:", 14008, 10, 55, 45, 10 EDITTEXT 14009, 70, 55, 150, 10, ES_LEFT | ES_AUTOHSCROLL LTEXT "&Start i:",14010, 10, 65, 57, 10 EDITTEXT 14011, 70, 65, 150, 10, ES_LEFT | ES_AUTOHSCROLL @@ -188,17 +188,39 @@ END SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION -CAPTION "Utvidet Egenskaper" +CAPTION "Avanserte egenskaper" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "Velg avansert egenskaper som du vil for denne snarveien.", -1, 5, 30, 210, 10 - CHECKBOX "Kjшr med forskjellig credentials", 14000, 25, 50, 150, 10 - LTEXT "Dette valget vil godta deg е kjшre denne snarveien med en annen bruker, eller fortsette som deg selv mens du beskytter din datamaskin og data fra uautorisert program aktivitet.", -1, 50, 60, 175, 40 - CHECKBOX "Kjшr i seperat ledig minne plass", 14001, 25, 100, 90, 10, WS_DISABLED + CHECKBOX "Kjшr som administrator", 14000, 25, 50, 150, 10 + LTEXT "Med dette valget kan du kjшre denne snarveien med som en administrator, mens du beskytter din datamaskin og data fra uautorisert program aktivitet.", -1, 50, 60, 175, 40 + CHECKBOX "Kjшr i seperat minneplass", 14001, 25, 100, 90, 10, WS_DISABLED PUSHBUTTON "OK", IDOK, 25, 120, 50, 15, WS_VISIBLE PUSHBUTTON "Avbryt", IDCANCEL, 120, 120, 50, 15, WS_VISIBLE END +SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Generielt" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Filtype:", 14004, 8, 35, 50, 10 + LTEXT "Mappe", 14005, 68, 35, 160, 10 + LTEXT "Lokalisjon:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 315, 10 + LTEXT "Stшrrelse:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Inneholder:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Opprettet:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + AUTOCHECKBOX "&Bare-lesbar", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "&Skjult", 14022, 126, 150, 50, 10 +END + + SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Generielt" @@ -237,7 +259,7 @@ BEGIN LTEXT "", 14003, 77, 27, 152, 10 LTEXT "Enerett: ", 14004, 10, 46, 66, 10 LTEXT "", 14005, 77, 46, 152, 10 - GROUPBOX "Other version information: ", 14006, 6, 70, 222, 115 + GROUPBOX "Annet versjon informasjon: ", 14006, 6, 70, 222, 115 LTEXT "Enhetsnavn: ", 14007, 13, 82, 50, 10 LTEXT "Verdi: ", 14008, 112, 82, 45, 10 LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY @@ -288,7 +310,7 @@ BEGIN PUSHBUTTON "Kontroller nе...", 14000, 130, 45, 90, 15, WS_TABSTOP GROUPBOX "Defragmentering", -1, 5, 65, 230, 60 LTEXT "Dette alternativet defragmenterer filene pе volumet.", -1, 40, 85, 160, 20 - PUSHBUTTON "Defragmenter Nе...", 14001, 130, 105, 90, 15, WS_TABSTOP + PUSHBUTTON "Defragmenter nе...", 14001, 130, 105, 90, 15, WS_TABSTOP GROUPBOX "Sikkerhetskopi", -1, 5, 130, 230, 60 LTEXT "Dette alternativet tar sikkerhetskopi av filene pе volumet.", -1, 40, 150, 160, 20 PUSHBUTTON "Ta sikkerhetskopi...", 14002, 130, 170, 90, 15, WS_TABSTOP @@ -307,7 +329,7 @@ CAPTION "Kj FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "Hvilken brukerkonto vil du bruke for е kjшre dette programmet?", -1, 10, 20, 220, 20 - CHECKBOX "Current User %s", 14000, 10, 45, 150, 10 + CHECKBOX "Fшlgende bruker %s", 14000, 10, 45, 150, 10 LTEXT "Beskytt min datamaskin og data fra uautorisert program aktivitet", -1, 25, 57, 200, 10, WS_DISABLED CHECKBOX "Dette valget kan forebygge data virus fra е uskadeliggjшre din datamaskin eller personlige data, men utvelging det skulle kanskje forеrsake program til funksjon formatfeil.", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE CHECKBOX "Fшlgende bruker:", 14002, 10, 100, 90, 10 @@ -452,21 +474,21 @@ END AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION -CAPTION "AutoPlay" +CAPTION "Autostart" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&Select a content type, then choose an action for ReactOS to perform automatically when that type is used in this device:", 1000, 7, 7, 215, 20 + LTEXT "&Velg en innhold type, ogsе velg en handling for ReactOS for е gjennomfшre automatisk nеr denne type er brukt til denne enheten:", 1000, 7, 7, 215, 20 CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 GROUPBOX "Handlinger", -1, 7, 45, 212, 146 AUTORADIOBUTTON "Velg en handling for е &utfшre:", 1005, 14, 54, 202, 10, WS_GROUP CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 - AUTORADIOBUTTON "Prompt me each time to &choose an action", 1006, 14, 177, 202, 10 + AUTORADIOBUTTON "Velg denne handlingen hver gang jeg &utfшrer denne handlingen", 1006, 14, 177, 202, 10 PUSHBUTTON "&Gjenopprett standard", 1008, 108, 197, 110, 14, WS_DISABLED END MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION -CAPTION "Mixed Content" +CAPTION "Mikset innhold" FONT 8, "MS Shell Dlg" BEGIN ICON "", 1000, 5, 7, 21, 20 @@ -479,7 +501,7 @@ END MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION -CAPTION "Mixed Content" +CAPTION "Mikset innhold" FONT 8, "MS Shell Dlg" BEGIN ICON "", 1000, 5, 7, 21, 20 @@ -495,7 +517,7 @@ END AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION -CAPTION "Autoplay" +CAPTION "Autostart" FONT 8, "MS Shell Dlg" BEGIN ICON "", 1000, 5, 7, 21, 20 @@ -515,7 +537,7 @@ BEGIN ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP LTEXT "Hva vil du at datamaskinen skal gjшre?", -1, 39, 7, 167, 10 COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL - LTEXT "Maintains your session, keeping the computer running on low power with data still in memory. The computer wakes up when you press a key or move the mouse.", 8225, 39, 40, 167, 37 + LTEXT "Behandle din sesjon, din datamaskin bruker lite strшm nеr data er i minnet. Datamaskinen vil vеkne hvis du trykker pе en tast eller beveger pе musen.", 8225, 39, 40, 167, 37 DEFPUSHBUTTON "OK", 1, 7, 82, 60, 14, WS_GROUP PUSHBUTTON "Avbryt", IDCANCEL, 75, 82, 60, 14 PUSHBUTTON "&Hjelp", IDHELP, 144, 82, 60, 14 @@ -533,9 +555,9 @@ BEGIN LTEXT "&Filsystem", -1, 7, 35, 170, 9 COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 - LTEXT "&Allocation unit size", -1, 7, 64, 170, 9 + LTEXT "&Stшrrelse pе tildelingsenheten", -1, 7, 64, 170, 9 COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "Volum &label", -1, 7, 93, 170, 9 + LTEXT "Volum&navn", -1, 7, 93, 170, 9 EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL GROUPBOX "Formatterings &valg", 4610, 7, 121, 170, 49 AUTOCHECKBOX "&Rask formattering", 28674, 16, 135, 155, 10 @@ -544,24 +566,25 @@ END CHKDSK_DLG DIALOGEX 50, 50, 194, 120 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "Check Disk" +CAPTION "Kontroller disken" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "Start", IDOK, 53, 100, 60, 14 - GROUPBOX "Check disk options", -1, 7, 6, 179, 50 - PUSHBUTTON "Cancel", IDCANCEL, 118, 100, 60, 14 - AUTOCHECKBOX "Automatically fix file system errors", 14000, 16, 15, 155, 10 - AUTOCHECKBOX "&Scan for and attempt recovery of bad sectors", 14001, 16, 30, 165, 10 + GROUPBOX "Alternativer for diskkontroll", -1, 7, 6, 179, 50 + PUSHBUTTON "Avbryt", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "Reparer feil i filsysten automatisk", 14000, 16, 15, 155, 10 + AUTOCHECKBOX "&Sшk etter og forsшk е reparere skadet sektorer", 14001, 16, 30, 165, 10 CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 LTEXT "", 14003, 60, 80, 170, 10 END + IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "Endre Ikon" +CAPTION "Endre ikon" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - LTEXT "Filename:", -1, 7, 14, 208, 10 + LTEXT "Filnavn:", -1, 7, 14, 208, 10 PUSHBUTTON "Utforsk...",IDC_BUTTON_PATH, 148, 24,67,14 EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL LTEXT "Icons:", -1, 7, 47, 208, 10 @@ -584,25 +607,26 @@ BEGIN IDS_SHV_COLUMN9 "Kommentarer" IDS_SHV_COLUMN10 "Eier" IDS_SHV_COLUMN11 "Gruppe" - IDS_SHV_COLUMN12 "Filename" - IDS_SHV_COLUMN13 "Category" + IDS_SHV_COLUMN12 "Filnavn" + IDS_SHV_COLUMN13 "Kategori" IDS_SHV_COLUMN_DELFROM "Opprinnelig plassering" IDS_SHV_COLUMN_DELDATE "Dato slettet" - IDS_SHV_COLUMN_FONTTYPE "Fonttype" - IDS_SHV_COLUMN_WORKGROUP "Workgroup" - IDS_SHV_NETWORKLOCATION "Network Location" - IDS_SHV_COLUMN_DOCUMENTS "Documents" + IDS_SHV_COLUMN_FONTTYPE "Skrifttype" + IDS_SHV_COLUMN_WORKGROUP "Arbeidsgruppe" + IDS_SHV_NETWORKLOCATION "Nettverksplassering" + IDS_SHV_COLUMN_DOCUMENTS "Dokumenter" + IDS_SHV_COLUMN_STATUS "Status" - IDS_SHV_COLUMN_COMMENTS "Comments" - IDS_SHV_COLUMN_LOCATION "Location" - IDS_SHV_COLUMN_MODEL "Model" + IDS_SHV_COLUMN_COMMENTS "Kommentarer" + IDS_SHV_COLUMN_LOCATION "Plassering" + IDS_SHV_COLUMN_MODEL "Modell" /* special folders */ IDS_DESKTOP "Skrivebord" IDS_MYCOMPUTER "Min datamaskin" IDS_RECYCLEBIN_FOLDER_NAME "Papirkurv" IDS_CONTROLPANEL "Kontrollpanel" - IDS_ADMINISTRATIVETOOLS "Administrative Tools" + IDS_ADMINISTRATIVETOOLS "Administrative verktшy" /* context menus */ IDS_VIEW_LARGE "&Store ikoner" @@ -612,14 +636,14 @@ BEGIN IDS_SELECT "Velg" IDS_OPEN "Еpne" IDS_CREATELINK "&Opprett snarvei" - IDS_COPY "&Kopier" - IDS_DELETE "&Slett" - IDS_PROPERTIES "Egenska&per" - IDS_CUT "Klipp &ut" - IDS_RESTORE "Restore" - IDS_FORMATDRIVE "Format..." - IDS_RENAME "Rename" - IDS_INSERT "Insert" + IDS_COPY "Kopier" + IDS_DELETE "Slett" + IDS_PROPERTIES "Egenskaper" + IDS_CUT "Klipp ut" + IDS_RESTORE "Gjenopprett" + IDS_FORMATDRIVE "Formatering..." + IDS_RENAME "Endre navn" + IDS_INSERT "Sett inn" IDS_CREATEFOLDER_DENIED "Kunne ikke opprette ny mappe: tilgang nektet." IDS_CREATEFOLDER_CAPTION "Klarte ikke opprette ny mappe" @@ -651,7 +675,7 @@ BEGIN IDS_FAVORITES "Favoritter" IDS_STARTUP "Start-meny\\Programmer\\Oppstart" IDS_RECENT "Siste" - IDS_SENDTO "SendTil" + IDS_SENDTO "Sendtil" IDS_STARTMENU "Start-meny" IDS_MYMUSIC "Min musikk" IDS_MYVIDEO "Mine videoklipp" @@ -690,13 +714,14 @@ BEGIN FCIDM_SHVIEW_NEWFOLDER "Ny &mappe" FCIDM_SHVIEW_NEWLINK "Ny &snarvei" IDS_FOLDER_OPTIONS "Mappe valg" - IDS_RECYCLEBIN_LOCATION "Papirkurv localtion" + IDS_RECYCLEBIN_LOCATION "Papirkurv plassering" IDS_RECYCLEBIN_DISKSPACE "Ledig plass" + IDS_EMPTY_BITBUCKET "Tшm papirkurven" IDS_PICK_ICON_TITLE "Velg Ikon" IDS_PICK_ICON_FILTER "Ikon Fil(*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" IDS_OPEN_WITH_FILTER "Kjшrbare filer\0*.exe\0" IDS_DIRECTORY "Mappe" - IDS_VIRTUAL_DRIVER "Virtuell enhet driver" + IDS_VIRTUAL_DRIVER "Virtuell enhetdriver" IDS_BAT_FILE "ReactOS Batch fil" IDS_CMD_FILE "ReactOS Kommando skript" IDS_COM_FILE "Dos applikasjon" @@ -712,18 +737,19 @@ BEGIN IDS_LNK_FILE "Snarvei" IDS_SYS_FILE "Systemfil" - IDS_OPEN_VERB "Open" - IDS_RUNAS_VERB "Run as " - IDS_EDIT_VERB "Edit" - IDS_FIND_VERB "Find" - IDS_PRINT_VERB "Print" - IDS_PLAY_VERB "Play" - IDS_PREVIEW_VERB "Preview" + IDS_OPEN_VERB "Еpne" + IDS_RUNAS_VERB "Kjшr som" + IDS_EDIT_VERB "Rediger" + IDS_FIND_VERB "Finn" + IDS_PRINT_VERB "Skriv ut" + IDS_PLAY_VERB "Spill" + IDS_PREVIEW_VERB "Forhеndsvis" - IDS_FILE_FOLDER "%u Files, %u Folders" - IDS_PRINTERS "Printers" - IDS_FONTS "Fonts" - IDS_INSTALLNEWFONT "Install New Font..." + IDS_FILE_FOLDER "%u filer, %u mapper" + IDS_PRINTERS "Skrivere" + IDS_FONTS "Skrifttyper" + IDS_INSTALLNEWFONT "Installere nye skrifttyper..." + + IDS_DEFAULT_CLUSTER_SIZE "Standard tildelingsstшrrelse" - IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" END From af64e75b22ffb2060f39520e263b1c4c3c7e705f Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sun, 31 Aug 2008 21:58:44 +0000 Subject: [PATCH 270/324] Reverted r35812 because of unwanted triple fault bug. See issue #3704,3706 for more details. svn path=/trunk/; revision=35846 --- reactos/dll/ntdll/dispatch/dispatch.c | 26 +++++++++++++---- reactos/dll/ntdll/dispatch/i386/dispatch.S | 33 +++++++++++++++++++++- reactos/lib/rtl/i386/except.c | 7 ----- reactos/lib/rtl/rtlp.h | 7 ----- reactos/lib/rtl/vectoreh.c | 11 ++++---- 5 files changed, 57 insertions(+), 27 deletions(-) diff --git a/reactos/dll/ntdll/dispatch/dispatch.c b/reactos/dll/ntdll/dispatch/dispatch.c index c6f749c70bd..6fd4f70024f 100644 --- a/reactos/dll/ntdll/dispatch/dispatch.c +++ b/reactos/dll/ntdll/dispatch/dispatch.c @@ -15,6 +15,10 @@ typedef NTSTATUS (NTAPI *USER_CALL)(PVOID Argument, ULONG ArgumentLength); +EXCEPTION_DISPOSITION NTAPI +RtlpExecuteVectoredExceptionHandlers(IN PEXCEPTION_RECORD ExceptionRecord, + IN PCONTEXT Context); + /* FUNCTIONS ****************************************************************/ /* @@ -28,16 +32,26 @@ KiUserExceptionDispatcher(PEXCEPTION_RECORD ExceptionRecord, EXCEPTION_RECORD NestedExceptionRecord; NTSTATUS Status; - /* Dispatch the exception and check the result */ - if (RtlDispatchException(ExceptionRecord, Context)) + /* call the vectored exception handlers */ + if(RtlpExecuteVectoredExceptionHandlers(ExceptionRecord, + Context) != ExceptionContinueExecution) { - /* Continue executing */ - Status = NtContinue(Context, FALSE); + goto ContinueExecution; } else { - /* Raise an exception */ - Status = NtRaiseException(ExceptionRecord, Context, FALSE); + /* Dispatch the exception and check the result */ + if(RtlDispatchException(ExceptionRecord, Context)) + { +ContinueExecution: + /* Continue executing */ + Status = NtContinue(Context, FALSE); + } + else + { + /* Raise an exception */ + Status = NtRaiseException(ExceptionRecord, Context, FALSE); + } } /* Setup the Exception record */ diff --git a/reactos/dll/ntdll/dispatch/i386/dispatch.S b/reactos/dll/ntdll/dispatch/i386/dispatch.S index 00a21f47b82..526e5b8f189 100644 --- a/reactos/dll/ntdll/dispatch/i386/dispatch.S +++ b/reactos/dll/ntdll/dispatch/i386/dispatch.S @@ -183,13 +183,43 @@ _KiRaiseUserExceptionDispatcher@0: .globl _KiUserExceptionDispatcher@8 _KiUserExceptionDispatcher@8: - /* Clear direction flag */ + /* clear the direct flag + * text from bug 2279 + * if it not clear it means that if an exception occurs while + * the direction flag is set (typically inside memmove), the + * exception handlers will be called with the direction flag still + * set. The Windows x86-32 and x86-64 ABI requires that the + * direction flag be Calling memset() with a compile-time constant + * size on both GCC and MSVC will result in inlining a "rep stosd" + * instruction. Because of the ABI, they will assume that the + * direction flag is clear and not emit a "cld" instruction. + * Using memset() in an exception handler therefore will + * corrupt memory if the exception occurred during a reverse copy + * such as a forward overlapping memmove(). + * + * For reliability and ease of debugging, please add "cld" to the beginning of + * KiUserExceptionDispatcher. Note that the same will be true of x86-64 whenever + * that happens. This does not affect continuing execution; the CONTEXT of the + * exception has the direction flag set and will be restored upon NtContinue. + * KiUserApcDispatcher and KiUserCallbackDispatcher need to be evaluated for this + * issue. + */ + cld /* Save the Context and Exception Records */ mov ecx, [esp+4] mov ebx, [esp] + /* Call the vectored exception handler */ + push ecx + push ebx + call _RtlpExecuteVectoredExceptionHandlers@8 + + /* Check for success */ + or al, al + jnz ContinueExecution + /* Dispatch the exception */ sub esp, 8 call _RtlDispatchException@8 @@ -198,6 +228,7 @@ _KiUserExceptionDispatcher@8: or al, al jz RaiseException +ContinueExecution: /* Pop off the records */ pop ebx pop ecx diff --git a/reactos/lib/rtl/i386/except.c b/reactos/lib/rtl/i386/except.c index 087ab74fcb1..dc56aed3ec0 100644 --- a/reactos/lib/rtl/i386/except.c +++ b/reactos/lib/rtl/i386/except.c @@ -74,13 +74,6 @@ RtlDispatchException(IN PEXCEPTION_RECORD ExceptionRecord, ULONG_PTR StackLow, StackHigh; ULONG_PTR RegistrationFrameEnd; - /* Call any registered vectored handlers */ - if (RtlCallVectoredExceptionHandlers(ExceptionRecord, Context)) - { - /* Exception handled, continue execution */ - return TRUE; - } - /* Get the current stack limits and registration frame */ RtlpGetStackLimits(&StackLow, &StackHigh); RegistrationFrame = RtlpGetExceptionList(); diff --git a/reactos/lib/rtl/rtlp.h b/reactos/lib/rtl/rtlp.h index 4bfba098a83..845f625cbee 100644 --- a/reactos/lib/rtl/rtlp.h +++ b/reactos/lib/rtl/rtlp.h @@ -37,13 +37,6 @@ VOID NTAPI RtlpSetExceptionList(PEXCEPTION_REGISTRATION_RECORD NewExceptionList); -BOOLEAN -NTAPI -RtlCallVectoredExceptionHandlers( - IN PEXCEPTION_RECORD ExceptionRecord, - IN PCONTEXT Context -); - typedef struct _DISPATCHER_CONTEXT { PEXCEPTION_REGISTRATION_RECORD RegistrationPointer; diff --git a/reactos/lib/rtl/vectoreh.c b/reactos/lib/rtl/vectoreh.c index 52d6667cce6..d1a39138622 100644 --- a/reactos/lib/rtl/vectoreh.c +++ b/reactos/lib/rtl/vectoreh.c @@ -28,10 +28,9 @@ typedef struct _RTL_VECTORED_EXCEPTION_HANDLER /* FUNCTIONS ***************************************************************/ -BOOLEAN -NTAPI -RtlCallVectoredExceptionHandlers(IN PEXCEPTION_RECORD ExceptionRecord, - IN PCONTEXT Context) +EXCEPTION_DISPOSITION NTAPI +RtlpExecuteVectoredExceptionHandlers(IN PEXCEPTION_RECORD ExceptionRecord, + IN PCONTEXT Context) { PLIST_ENTRY CurrentEntry; PRTL_VECTORED_EXCEPTION_HANDLER veh; @@ -56,7 +55,7 @@ RtlCallVectoredExceptionHandlers(IN PEXCEPTION_RECORD ExceptionRecord, if(VectoredHandler(&ExceptionInfo) == EXCEPTION_CONTINUE_EXECUTION) { - return TRUE; + return ExceptionContinueSearch; } RtlEnterCriticalSection(&RtlpVectoredExceptionLock); @@ -64,7 +63,7 @@ RtlCallVectoredExceptionHandlers(IN PEXCEPTION_RECORD ExceptionRecord, RtlLeaveCriticalSection(&RtlpVectoredExceptionLock); } - return FALSE; + return ExceptionContinueExecution; } VOID From bf514701b88b11ec957ac79cc3b4cc319545a962 Mon Sep 17 00:00:00 2001 From: James Tabor Date: Mon, 1 Sep 2008 00:51:05 +0000 Subject: [PATCH 271/324] - Add flag sets and clears for SetMapMode. Assosiate Map Mode flags with Xform flags and start the use and implementation for user mode. svn path=/trunk/; revision=35847 --- reactos/subsystems/win32/win32k/objects/coord.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/reactos/subsystems/win32/win32k/objects/coord.c b/reactos/subsystems/win32/win32k/objects/coord.c index 7c673d0f896..305c0737d67 100644 --- a/reactos/subsystems/win32/win32k/objects/coord.c +++ b/reactos/subsystems/win32/win32k/objects/coord.c @@ -668,6 +668,10 @@ IntGdiSetMapMode(PDC dc, Dc_Attr->szlWindowExt.cy = 1; Dc_Attr->szlViewportExt.cx = 1; Dc_Attr->szlViewportExt.cy = 1; + Dc_Attr->flXform &= ~(ISO_OR_ANISO_MAP_MODE|PTOD_EFM22_NEGATIVE| + PTOD_EFM11_NEGATIVE|POSITIVE_Y_IS_UP); + Dc_Attr->flXform |= (PAGE_XLATE_CHANGED|PAGE_TO_DEVICE_SCALE_IDENTITY| + INVALIDATE_ATTRIBUTES|DEVICE_TO_WORLD_INVALID); break; case MM_LOMETRIC: @@ -707,7 +711,12 @@ IntGdiSetMapMode(PDC dc, break; case MM_ANISOTROPIC: + Dc_Attr->flXform &= ~(PAGE_TO_DEVICE_IDENTITY|POSITIVE_Y_IS_UP); + Dc_Attr->flXform |= ISO_OR_ANISO_MAP_MODE; break; + default: + Dc_Attr->iMapMode = PrevMapMode; + PrevMapMode = 0; } DC_UpdateXforms(dc); From e504422cb3237a9b46a672fa92c3ce264438ac33 Mon Sep 17 00:00:00 2001 From: Ged Murphy Date: Mon, 1 Sep 2008 08:00:22 +0000 Subject: [PATCH 272/324] Check for null pointers passed to inet_addr See issue #3695 for more details. svn path=/trunk/; revision=35851 --- reactos/dll/win32/ws2_32/misc/ns.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/reactos/dll/win32/ws2_32/misc/ns.c b/reactos/dll/win32/ws2_32/misc/ns.c index 1db254dee9b..b95b2af53ee 100644 --- a/reactos/dll/win32/ws2_32/misc/ns.c +++ b/reactos/dll/win32/ws2_32/misc/ns.c @@ -1298,6 +1298,12 @@ inet_addr(IN CONST CHAR FAR* cp) p = (PCHAR)cp; + if (!p) + { + WSASetLastError(WSAEFAULT); + return INADDR_NONE; + } + if (strlen(p) == 0) return INADDR_NONE; From 5a12bfa450b489a138091e13cf10042f7d865b5f Mon Sep 17 00:00:00 2001 From: Ged Murphy Date: Mon, 1 Sep 2008 12:51:49 +0000 Subject: [PATCH 273/324] - Fix file logging to be asynchronous and more robust - Convert to unicode svn path=/trunk/; revision=35854 --- reactos/base/services/tcpsvcs/chargen.c | 16 +- reactos/base/services/tcpsvcs/daytime.c | 10 +- reactos/base/services/tcpsvcs/discard.c | 18 +- reactos/base/services/tcpsvcs/echo.c | 24 +-- reactos/base/services/tcpsvcs/log.c | 204 +++++++++++++-------- reactos/base/services/tcpsvcs/qotd.c | 46 ++--- reactos/base/services/tcpsvcs/skelserver.c | 46 ++--- reactos/base/services/tcpsvcs/tcpsvcs.c | 79 ++++---- reactos/base/services/tcpsvcs/tcpsvcs.h | 15 +- 9 files changed, 262 insertions(+), 196 deletions(-) diff --git a/reactos/base/services/tcpsvcs/chargen.c b/reactos/base/services/tcpsvcs/chargen.c index 2f2b17124bd..8b9d8c818c8 100644 --- a/reactos/base/services/tcpsvcs/chargen.c +++ b/reactos/base/services/tcpsvcs/chargen.c @@ -32,16 +32,16 @@ SendLine(SOCKET sock, LPSTR lpLine) } else { - LogEvent(_T("Chargen: Not sent enough bytes"), 0, 0, LOG_FILE); + LogEvent(L"Chargen: Not sent enough bytes", 0, 0, LOG_FILE); } } else if (retVal == SOCKET_ERROR) { - LogEvent(_T("Chargen: Socket error\n"), WSAGetLastError(), 0, LOG_ERROR); + LogEvent(L"Chargen: Socket error\n", WSAGetLastError(), 0, LOG_ERROR); } else { - LogEvent(_T("Chargen: unknown error\n"), WSAGetLastError(), 0, LOG_ERROR); + LogEvent(L"Chargen: unknown error\n", WSAGetLastError(), 0, LOG_ERROR); } return bRet;; @@ -100,21 +100,21 @@ ChargenHandler(VOID* sock_) if (!GenerateChars(sock)) { - LogEvent(_T("Chargen: Char generation failed"), 0, 0, LOG_FILE); + LogEvent(L"Chargen: Char generation failed", 0, 0, LOG_FILE); retVal = 1; } - LogEvent(_T("Chargen: Shutting connection down..."), 0, 0, LOG_FILE); + LogEvent(L"Chargen: Shutting connection down...", 0, 0, LOG_FILE); if (ShutdownConnection(sock, FALSE)) { - LogEvent(_T("Chargen: Connection is down"), 0, 0, LOG_FILE); + LogEvent(L"Chargen: Connection is down", 0, 0, LOG_FILE); } else { - LogEvent(_T("Chargen: Connection shutdown failed"), 0, 0, LOG_FILE); + LogEvent(L"Chargen: Connection shutdown failed", 0, 0, LOG_FILE); retVal = 1; } - LogEvent(_T("Chargen: Terminating thread"), 0, 0, LOG_FILE); + LogEvent(L"Chargen: Terminating thread", 0, 0, LOG_FILE); ExitThread(retVal); } diff --git a/reactos/base/services/tcpsvcs/daytime.c b/reactos/base/services/tcpsvcs/daytime.c index 26d3c0d868f..309620650a4 100644 --- a/reactos/base/services/tcpsvcs/daytime.c +++ b/reactos/base/services/tcpsvcs/daytime.c @@ -15,7 +15,7 @@ SendTime(SOCKET sock, CHAR *time) DWORD stringSize = strlen(time) + 1; if (send(sock, time, stringSize, 0) == SOCKET_ERROR) { - LogEvent(_T("DayTime: Error sending data"), WSAGetLastError(), 0, LOG_ERROR); + LogEvent(L"DayTime: Error sending data", WSAGetLastError(), 0, LOG_ERROR); return FALSE; } @@ -41,15 +41,15 @@ DaytimeHandler(VOID* Sock_) retVal = 1; } - LogEvent(_T("DayTime: Shutting connection down"), 0, 0, LOG_FILE); + LogEvent(L"DayTime: Shutting connection down", 0, 0, LOG_FILE); if (ShutdownConnection(Sock, FALSE)) - LogEvent(_T("DayTime: Connection is down"), 0, 0, LOG_FILE); + LogEvent(L"DayTime: Connection is down", 0, 0, LOG_FILE); else { - LogEvent(_T("DayTime: Connection shutdown failed"), 0, 0, LOG_FILE); + LogEvent(L"DayTime: Connection shutdown failed", 0, 0, LOG_FILE); retVal = 1; } - LogEvent(_T("DayTime: Terminating thread"), 0, 0, LOG_FILE); + LogEvent(L"DayTime: Terminating thread", 0, 0, LOG_FILE); ExitThread(retVal); } diff --git a/reactos/base/services/tcpsvcs/discard.c b/reactos/base/services/tcpsvcs/discard.c index 5a3324cf9b8..94f95639ec4 100644 --- a/reactos/base/services/tcpsvcs/discard.c +++ b/reactos/base/services/tcpsvcs/discard.c @@ -14,7 +14,7 @@ static BOOL RecieveIncomingPackets(SOCKET sock) { - char readBuffer[BUFSIZE]; + CHAR readBuffer[BUFSIZE]; INT readBytes; do @@ -24,18 +24,18 @@ RecieveIncomingPackets(SOCKET sock) { TCHAR logBuf[256]; - _stprintf(logBuf, _T("Discard: Received %d bytes from client"), readBytes); + _swprintf(logBuf, L"Discard: Received %d bytes from client", readBytes); LogEvent(logBuf, 0, 0, LOG_FILE); } else if (readBytes == SOCKET_ERROR) { - LogEvent(_T("Discard: Socket Error"), WSAGetLastError(), 0, LOG_ERROR); + LogEvent(L"Discard: Socket Error", WSAGetLastError(), 0, LOG_ERROR); return FALSE; } } while ((readBytes > 0) && (!bShutdown)); if (!bShutdown) - LogEvent(_T("Discard: Connection closed by peer"), 0, 0, LOG_FILE); + LogEvent(L"Discard: Connection closed by peer", 0, 0, LOG_FILE); return TRUE; } @@ -48,21 +48,21 @@ DiscardHandler(VOID* sock_) if (!RecieveIncomingPackets(sock)) { - LogEvent(_T("Discard: RecieveIncomingPackets failed"), 0, 0, LOG_FILE); + LogEvent(L"Discard: RecieveIncomingPackets failed", 0, 0, LOG_FILE); retVal = 1; } - LogEvent(_T("Discard: Shutting connection down"), 0, 0, LOG_FILE); + LogEvent(L"Discard: Shutting connection down", 0, 0, LOG_FILE); if (ShutdownConnection(sock, TRUE)) { - LogEvent(_T("Discard: Connection is down."), 0, 0, LOG_FILE); + LogEvent(L"Discard: Connection is down.", 0, 0, LOG_FILE); } else { - LogEvent(_T("Discard: Connection shutdown failed"), 0, 0, LOG_FILE); + LogEvent(L"Discard: Connection shutdown failed", 0, 0, LOG_FILE); retVal = 1; } - LogEvent(_T("Discard: Terminating thread"), 0, 0, LOG_FILE); + LogEvent(L"Discard: Terminating thread", 0, 0, LOG_FILE); ExitThread(retVal); } diff --git a/reactos/base/services/tcpsvcs/echo.c b/reactos/base/services/tcpsvcs/echo.c index 1fcca241d12..95aed129bfd 100644 --- a/reactos/base/services/tcpsvcs/echo.c +++ b/reactos/base/services/tcpsvcs/echo.c @@ -15,7 +15,7 @@ static BOOL EchoIncomingPackets(SOCKET sock) { CHAR readBuffer[RECV_BUF]; - TCHAR logBuf[256]; + WCHAR logBuf[256]; INT totalSentBytes; INT readBytes; INT retVal; @@ -25,7 +25,7 @@ EchoIncomingPackets(SOCKET sock) readBytes = recv(sock, readBuffer, RECV_BUF, 0); if (readBytes > 0) { - _stprintf(logBuf, _T("Received %d bytes from client"), readBytes); + _swprintf(logBuf, L"Received %d bytes from client", readBytes); LogEvent(logBuf, 0, 0, LOG_FILE); totalSentBytes = 0; @@ -34,33 +34,33 @@ EchoIncomingPackets(SOCKET sock) retVal = send(sock, readBuffer + totalSentBytes, readBytes - totalSentBytes, 0); if (retVal > 0) { - _stprintf(logBuf, _T("Sent %d bytes back to client"), retVal); + _swprintf(logBuf, L"Sent %d bytes back to client", retVal); LogEvent(logBuf, 0, 0, LOG_FILE); totalSentBytes += retVal; } else if (retVal == SOCKET_ERROR) { - LogEvent(_T("Echo: socket error"), WSAGetLastError(), 0, LOG_ERROR); + LogEvent(L"Echo: socket error", WSAGetLastError(), 0, LOG_ERROR); return FALSE; } else { /* Client closed connection before we could reply to all the data it sent, so quit early. */ - LogEvent(_T("Peer unexpectedly dropped connection!"), 0, 0, LOG_FILE); + LogEvent(L"Peer unexpectedly dropped connection!", 0, 0, LOG_FILE); return FALSE; } } } else if (readBytes == SOCKET_ERROR) { - LogEvent(_T("Echo: socket error"), WSAGetLastError(), 0, LOG_ERROR); + LogEvent(L"Echo: socket error", WSAGetLastError(), 0, LOG_ERROR); return FALSE; } } while ((readBytes != 0) && (!bShutdown)); if (!bShutdown) - LogEvent(_T("Echo: Connection closed by peer"), 0, 0, LOG_FILE); + LogEvent(L"Echo: Connection closed by peer", 0, 0, LOG_FILE); return TRUE; } @@ -73,22 +73,22 @@ EchoHandler(VOID* sock_) if (!EchoIncomingPackets(sock)) { - LogEvent(_T("Echo: EchoIncomingPackets failed"), 0, 0, LOG_FILE); + LogEvent(L"Echo: EchoIncomingPackets failed", 0, 0, LOG_FILE); retVal = 1; } - LogEvent(_T("Echo: Shutting connection down"), 0, 0, LOG_FILE); + LogEvent(L"Echo: Shutting connection down", 0, 0, LOG_FILE); if (ShutdownConnection(sock, TRUE)) { - LogEvent(_T("Echo: Connection is down"), 0, 0, LOG_FILE); + LogEvent(L"Echo: Connection is down", 0, 0, LOG_FILE); } else { - LogEvent(_T("Echo: Connection shutdown failed"), 0, 0, LOG_FILE); + LogEvent(L"Echo: Connection shutdown failed", 0, 0, LOG_FILE); retVal = 1; } - LogEvent(_T("Echo: Terminating thread"), 0, 0, LOG_FILE); + LogEvent(L"Echo: Terminating thread", 0, 0, LOG_FILE); ExitThread(retVal); } diff --git a/reactos/base/services/tcpsvcs/log.c b/reactos/base/services/tcpsvcs/log.c index 8ef9066ffec..81b749590bc 100644 --- a/reactos/base/services/tcpsvcs/log.c +++ b/reactos/base/services/tcpsvcs/log.c @@ -11,31 +11,35 @@ #define DEBUG -static LPTSTR lpEventSource = _T("tcpsvcs"); -static LPCTSTR lpLogFileName = _T("C:\\tcpsvcs_log.log"); -static HANDLE hLogFile; +static LPWSTR lpEventSource = L"tcpsvcs"; +static LPCWSTR lpLogFileName = L"C:\\tcpsvcs_log.log"; +static HANDLE hLogFile = NULL; + +static BOOL bWaitingOnRead = FALSE; +static OVERLAPPED olWrite; + // needs work static VOID -LogToEventLog(LPCTSTR lpMsg, +LogToEventLog(LPCWSTR lpMsg, DWORD errNum, DWORD exitCode, UINT flags) { HANDLE hEventLog; - hEventLog = RegisterEventSource(NULL, lpEventSource); + hEventLog = RegisterEventSourceW(NULL, lpEventSource); if (hEventLog) { - ReportEvent(hEventLog, - (flags & LOG_ERROR) ? EVENTLOG_ERROR_TYPE : EVENTLOG_SUCCESS, - 0, - 0, - NULL, - 1, - 0, - &lpMsg, - NULL); + ReportEventW(hEventLog, + (flags & LOG_ERROR) ? EVENTLOG_ERROR_TYPE : EVENTLOG_SUCCESS, + 0, + 0, + NULL, + 1, + 0, + &lpMsg, + NULL); CloseEventLog(hEventLog); } @@ -44,45 +48,45 @@ LogToEventLog(LPCTSTR lpMsg, static BOOL OpenLogFile() { - hLogFile = CreateFile(lpLogFileName, - GENERIC_WRITE, - 0, - NULL, - OPEN_ALWAYS, - FILE_ATTRIBUTE_NORMAL, - NULL); - if (hLogFile == INVALID_HANDLE_VALUE) + hLogFile = CreateFileW(lpLogFileName, + GENERIC_WRITE, + 0, + NULL, + OPEN_ALWAYS, + FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, + NULL); + if (hLogFile == INVALID_HANDLE_VALUE) + { + hLogFile = NULL; return FALSE; + } return TRUE; } static VOID -LogToFile(LPCTSTR lpMsg, +LogToFile(LPCWSTR lpMsg, DWORD errNum, DWORD exitCode, UINT flags) { - LPTSTR lpFullMsg = NULL; + LPWSTR lpFullMsg = NULL; DWORD msgLen; - if (!OpenLogFile()) - return; - - msgLen = _tcslen(lpMsg) + 1; + msgLen = wcslen(lpMsg) + 1; if (flags & LOG_ERROR) { LPVOID lpSysMsg; DWORD eMsgLen; - eMsgLen = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, - NULL, - errNum, - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPTSTR)&lpSysMsg, - 0, - NULL); + eMsgLen = FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, + NULL, + errNum, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPTSTR)&lpSysMsg, + 0, + NULL); msgLen = msgLen + eMsgLen + 40; @@ -91,9 +95,9 @@ LogToFile(LPCTSTR lpMsg, msgLen * sizeof(TCHAR)); if (lpFullMsg) { - _sntprintf(lpFullMsg, + _snwprintf(lpFullMsg, msgLen, - _T("%s : %s\tErrNum = %lu ExitCode = %lu\r\n"), + L"%s : %s\tErrNum = %lu ExitCode = %lu\r\n", lpMsg, lpSysMsg, errNum, @@ -112,9 +116,9 @@ LogToFile(LPCTSTR lpMsg, msgLen * sizeof(TCHAR)); if (lpFullMsg) { - _sntprintf(lpFullMsg, + _snwprintf(lpFullMsg, msgLen, - _T("%s\r\n"), + L"%s\r\n", lpMsg); } } @@ -122,17 +126,50 @@ LogToFile(LPCTSTR lpMsg, if (lpFullMsg) { DWORD bytesWritten; + DWORD dwRet; + BOOL bRet; - SetFilePointer(hLogFile, 0, NULL, FILE_END); - - WriteFile(hLogFile, - lpFullMsg, - _tcslen(lpFullMsg) * sizeof(TCHAR), - &bytesWritten, - NULL); - if (bytesWritten == 0) + bRet = WriteFile(hLogFile, + lpFullMsg, + wcslen(lpFullMsg) * sizeof(WCHAR), + &bytesWritten, + &olWrite); + if (!bRet) { - LogToEventLog(_T("Failed to write to log file"), + if (GetLastError() != ERROR_IO_PENDING) + { + bRet = FALSE; + } + else + { + // Write is pending + dwRet = WaitForSingleObject(olWrite.hEvent, INFINITE); + + switch (dwRet) + { + // event has been signaled + case WAIT_OBJECT_0: + { + bRet = GetOverlappedResult(hLogFile, + &olWrite, + &bytesWritten, + FALSE); + break; + } + + default: + // An error has occurred in WaitForSingleObject. + // This usually indicates a problem with the + // OVERLAPPED structure's event handle. + bRet = FALSE; + break; + } + } + } + + if (!bRet || bytesWritten == 0) + { + LogToEventLog(L"Failed to write to log file", GetLastError(), 0, LOG_EVENTLOG | LOG_ERROR); @@ -143,8 +180,6 @@ LogToFile(LPCTSTR lpMsg, lpFullMsg); } - CloseHandle(hLogFile); - if (exitCode > 0) ExitProcess(exitCode); } @@ -152,7 +187,7 @@ LogToFile(LPCTSTR lpMsg, VOID -LogEvent(LPCTSTR lpMsg, +LogEvent(LPCWSTR lpMsg, DWORD errNum, DWORD exitCode, UINT flags) @@ -165,39 +200,64 @@ LogEvent(LPCTSTR lpMsg, LogToEventLog(lpMsg, errNum, exitCode, flags); } -VOID +BOOL InitLogging() { - WCHAR wcBom = 0xFEFF; +#ifdef DEBUG + BOOL bRet = FALSE; - DeleteFile(lpLogFileName); - -#ifdef _UNICODE - if (OpenLogFile()) + ZeroMemory(&olWrite, sizeof(OVERLAPPED)); + olWrite.Offset = 0xFFFFFFFF; + olWrite.OffsetHigh = 0xFFFFFFFF; + olWrite.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); + if (olWrite.hEvent) { - DWORD bytesWritten; + DeleteFileW(lpLogFileName); - WriteFile(hLogFile, - &wcBom, - sizeof(WCHAR), - &bytesWritten, - NULL); - if (bytesWritten == 0) + if (OpenLogFile()) { - LogToEventLog(_T("Failed to write to log file"), - GetLastError(), - 0, - LOG_EVENTLOG | LOG_ERROR); - } + WCHAR wcBom = 0xFEFF; + DWORD bytesWritten; - CloseHandle(hLogFile); + bRet = WriteFile(hLogFile, + &wcBom, + sizeof(WCHAR), + &bytesWritten, + &olWrite); + if (!bRet) + { + if (GetLastError() != ERROR_IO_PENDING) + { + LogToEventLog(L"Failed to write to log file", + GetLastError(), + 0, + LOG_EVENTLOG | LOG_ERROR); + } + else + { + bRet = TRUE; + } + } + } } + + return bRet; +#else + return TRUE; #endif } VOID UninitLogging() { - FlushFileBuffers(hLogFile); - CloseHandle(hLogFile); + if (hLogFile) + { + FlushFileBuffers(hLogFile); + CloseHandle(hLogFile); + } + + if (olWrite.hEvent) + { + CloseHandle(olWrite.hEvent); + } } diff --git a/reactos/base/services/tcpsvcs/qotd.c b/reactos/base/services/tcpsvcs/qotd.c index 94b69ddb0b5..b082ff460e0 100644 --- a/reactos/base/services/tcpsvcs/qotd.c +++ b/reactos/base/services/tcpsvcs/qotd.c @@ -9,7 +9,7 @@ #include "tcpsvcs.h" -static LPCTSTR lpFilePath = _T("\\drivers\\etc\\quotes"); +static WCHAR szFilePath[] = L"\\drivers\\etc\\quotes"; static BOOL SendQuote(SOCKET sock, char* Quote) @@ -25,33 +25,33 @@ static BOOL RetrieveQuote(SOCKET sock) { HANDLE hFile; - TCHAR lpFullPath[MAX_PATH + 20]; + WCHAR szFullPath[MAX_PATH + 20]; DWORD dwBytesRead; LPSTR lpQuotes; LPSTR lpStr; - DWORD quoteNum; - DWORD NumQuotes = 0; + INT quoteNum; + INT NumQuotes = 0; INT i; - if(!GetSystemDirectory(lpFullPath, MAX_PATH)) + if(!GetSystemDirectoryW(szFullPath, MAX_PATH)) { - LogEvent(_T("QOTD: Getting system path failed"), GetLastError(), 0, LOG_FILE); + LogEvent(L"QOTD: Getting system path failed", GetLastError(), 0, LOG_FILE); return FALSE; } - _tcscat(lpFullPath, lpFilePath); + wcscat(szFullPath, szFilePath); - LogEvent(_T("QOTD: Opening quotes file"), 0, 0, LOG_FILE); - hFile = CreateFile(lpFullPath, - GENERIC_READ, - 0, - NULL, - OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, - NULL); + LogEvent(L"QOTD: Opening quotes file", 0, 0, LOG_FILE); + hFile = CreateFileW(szFullPath, + GENERIC_READ, + 0, + NULL, + OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, + NULL); if (hFile == INVALID_HANDLE_VALUE) { - LogEvent(_T("QOTD: Error opening quotes file"), GetLastError(), 0, LOG_FILE); + LogEvent(L"QOTD: Error opening quotes file", GetLastError(), 0, LOG_FILE); } else { @@ -105,7 +105,7 @@ RetrieveQuote(SOCKET sock) /* send the quote */ if (!SendQuote(sock, lpStart)) - LogEvent(_T("QOTD: Error sending data"), 0, 0, LOG_FILE); + LogEvent(L"QOTD: Error sending data", 0, 0, LOG_FILE); break; } else @@ -133,22 +133,22 @@ QotdHandler(VOID* sock_) if (!RetrieveQuote(sock)) { - LogEvent(_T("QOTD: Error retrieving quote"), 0, 0, LOG_FILE); + LogEvent(L"QOTD: Error retrieving quote", 0, 0, LOG_FILE); retVal = 1; } - LogEvent(_T("QOTD: Shutting connection down"), 0, 0, LOG_FILE); + LogEvent(L"QOTD: Shutting connection down", 0, 0, LOG_FILE); if (ShutdownConnection(sock, FALSE)) { - LogEvent(_T("QOTD: Connection is down"), 0, 0, LOG_FILE); + LogEvent(L"QOTD: Connection is down", 0, 0, LOG_FILE); } else { - LogEvent(_T("QOTD: Connection shutdown failed"), 0, 0, LOG_FILE); - LogEvent(_T("QOTD: Terminating thread"), 0, 0, LOG_FILE); + LogEvent(L"QOTD: Connection shutdown failed", 0, 0, LOG_FILE); + LogEvent(L"QOTD: Terminating thread", 0, 0, LOG_FILE); retVal = 1; } - LogEvent(_T("QOTD: Terminating thread"), 0, 0, LOG_FILE); + LogEvent(L"QOTD: Terminating thread", 0, 0, LOG_FILE); ExitThread(retVal); } diff --git a/reactos/base/services/tcpsvcs/skelserver.c b/reactos/base/services/tcpsvcs/skelserver.c index f12cacbcb65..7d0666db5aa 100644 --- a/reactos/base/services/tcpsvcs/skelserver.c +++ b/reactos/base/services/tcpsvcs/skelserver.c @@ -33,17 +33,17 @@ SetUpListener(USHORT Port) } else { - LogEvent(_T("listen() failed"), WSAGetLastError(), 0, LOG_ERROR); + LogEvent(L"listen() failed", WSAGetLastError(), 0, LOG_ERROR); } } else { - LogEvent(_T("bind() failed"), WSAGetLastError(), 0, LOG_ERROR); + LogEvent(L"bind() failed", WSAGetLastError(), 0, LOG_ERROR); } } else { - LogEvent(_T("socket() failed"), WSAGetLastError(), 0, LOG_ERROR); + LogEvent(L"socket() failed", WSAGetLastError(), 0, LOG_ERROR); } return bSetup ? sock : INVALID_SOCKET; @@ -53,14 +53,14 @@ SetUpListener(USHORT Port) static VOID AcceptConnections(SOCKET listeningSocket, LPTHREAD_START_ROUTINE lpService, - LPTSTR lpName) + LPWSTR lpName) { SOCKADDR_IN client; SOCKET sock; HANDLE hThread; TIMEVAL timeVal; FD_SET readFD; - TCHAR logBuf[256]; + WCHAR logBuf[256]; INT timeOut = 2000; timeVal.tv_sec = timeOut / 1000; @@ -83,14 +83,14 @@ AcceptConnections(SOCKET listeningSocket, sock = accept(listeningSocket, (SOCKADDR*)&client, &addrSize); if (sock != INVALID_SOCKET) { - _stprintf(logBuf, - _T("Accepted connection to %s server from %s:%d"), + _swprintf(logBuf, + L"Accepted connection to %s server from %S:%d", lpName, inet_ntoa(client.sin_addr), ntohs(client.sin_port)); LogEvent(logBuf, 0, 0, LOG_FILE); - _stprintf(logBuf, _T("Creating worker thread for %s"), lpName); + _swprintf(logBuf, L"Creating worker thread for %s", lpName); LogEvent(logBuf, 0, 0, LOG_FILE); if (!bShutdown) @@ -102,7 +102,7 @@ AcceptConnections(SOCKET listeningSocket, } else { - _stprintf(logBuf, _T("Failed to start worker thread for the %s server"), + _swprintf(logBuf, L"Failed to start worker thread for the %s server", lpName); LogEvent(logBuf, 0, 0, LOG_FILE); } @@ -110,13 +110,13 @@ AcceptConnections(SOCKET listeningSocket, } else { - LogEvent(_T("accept failed"), WSAGetLastError(), 0, LOG_ERROR); + LogEvent(L"accept failed", WSAGetLastError(), 0, LOG_ERROR); } } } else if (selRet == SOCKET_ERROR) { - LogEvent(_T("select failed"), WSAGetLastError(), 0, LOG_ERROR); + LogEvent(L"select failed", WSAGetLastError(), 0, LOG_ERROR); } } } @@ -125,14 +125,14 @@ BOOL ShutdownConnection(SOCKET sock, BOOL bRec) { - TCHAR logBuf[256]; + WCHAR logBuf[256]; /* Disallow any further data sends. This will tell the other side that we want to go away now. If we skip this step, we don't shut the connection down nicely. */ if (shutdown(sock, SD_SEND) == SOCKET_ERROR) { - LogEvent(_T("Error in shutdown()"), WSAGetLastError(), 0, LOG_ERROR); + LogEvent(L"Error in shutdown()", WSAGetLastError(), 0, LOG_ERROR); return FALSE; } @@ -148,7 +148,7 @@ ShutdownConnection(SOCKET sock, ret = recv(sock, readBuffer, BUF, 0); if (ret >= 0) { - _stprintf(logBuf, _T("FYI, received %d unexpected bytes during shutdown"), ret); + _swprintf(logBuf, L"FYI, received %d unexpected bytes during shutdown", ret); LogEvent(logBuf, 0, 0, LOG_FILE); } } while (ret > 0); @@ -169,7 +169,7 @@ StartServer(LPVOID lpParam) pServices = (PSERVICES)lpParam; - _stprintf(logBuf, _T("Starting %s server"), pServices->Name); + _swprintf(logBuf, L"Starting %s server", pServices->lpName); LogEvent(logBuf, 0, 0, LOG_FILE); if (!bShutdown) @@ -177,23 +177,23 @@ StartServer(LPVOID lpParam) listeningSocket = SetUpListener(htons(pServices->Port)); if (!bShutdown && listeningSocket != INVALID_SOCKET) { - _stprintf(logBuf, - _T("%s is waiting for connections on port %d"), - pServices->Name, + _swprintf(logBuf, + L"%s is waiting for connections on port %d", + pServices->lpName, pServices->Port); LogEvent(logBuf, 0, 0, LOG_FILE); - AcceptConnections(listeningSocket, pServices->Service, pServices->Name); + AcceptConnections(listeningSocket, pServices->lpService, pServices->lpName); } else { - LogEvent(_T("Socket error when setting up listener"), 0, 0, LOG_FILE); + LogEvent(L"Socket error when setting up listener", 0, 0, LOG_FILE); } } - _stprintf(logBuf, - _T("Exiting %s thread"), - pServices->Name); + _swprintf(logBuf, + L"Exiting %s thread", + pServices->lpName); LogEvent(logBuf, 0, 0, LOG_FILE); ExitThread(0); } diff --git a/reactos/base/services/tcpsvcs/tcpsvcs.c b/reactos/base/services/tcpsvcs/tcpsvcs.c index 70bad6a1658..74df4069bb5 100644 --- a/reactos/base/services/tcpsvcs/tcpsvcs.c +++ b/reactos/base/services/tcpsvcs/tcpsvcs.c @@ -9,7 +9,7 @@ #include "tcpsvcs.h" -static LPTSTR ServiceName = _T("tcpsvcs"); +static WCHAR ServiceName[] = L"tcpsvcs"; volatile BOOL bShutdown = FALSE; volatile BOOL bPause = FALSE; @@ -23,11 +23,11 @@ typedef struct _ServiceInfo static SERVICES Services[NUM_SERVICES] = { - {ECHO_PORT, _T("Echo"), EchoHandler}, - {DISCARD_PORT, _T("Discard"), DiscardHandler}, - {DAYTIME_PORT, _T("Daytime"), DaytimeHandler}, - {QOTD_PORT, _T("QOTD"), QotdHandler}, - {CHARGEN_PORT, _T("Chargen"), ChargenHandler} + {ECHO_PORT, L"Echo", EchoHandler}, + {DISCARD_PORT, L"Discard", DiscardHandler}, + {DAYTIME_PORT, L"Daytime", DaytimeHandler}, + {QOTD_PORT, L"QOTD", QotdHandler}, + {CHARGEN_PORT, L"Chargen", ChargenHandler} }; @@ -36,7 +36,7 @@ UpdateStatus(PSERVICEINFO pServInfo, DWORD NewStatus, DWORD Check) { - TCHAR szSet[50]; + WCHAR szSet[50]; if (Check > 0) pServInfo->servStatus.dwCheckPoint += Check; @@ -46,15 +46,15 @@ UpdateStatus(PSERVICEINFO pServInfo, if (NewStatus > 0) pServInfo->servStatus.dwCurrentState = NewStatus; - _sntprintf(szSet, + _snwprintf(szSet, 49, - _T("Service state 0x%lu, CheckPoint %lu"), + L"Service state 0x%lu, CheckPoint %lu", pServInfo->servStatus.dwCurrentState, pServInfo->servStatus.dwCheckPoint); LogEvent(szSet, 0, 0, LOG_FILE); if (!SetServiceStatus(pServInfo->hStatus, &pServInfo->servStatus)) - LogEvent(_T("Cannot set service status"), GetLastError(), 0, LOG_ALL); + LogEvent(L"Cannot set service status", GetLastError(), 0, LOG_ALL); } @@ -64,25 +64,25 @@ CreateServers(PSERVICEINFO pServInfo) DWORD dwThreadId[NUM_SERVICES]; HANDLE hThread[NUM_SERVICES]; WSADATA wsaData; - TCHAR buf[256]; + WCHAR buf[256]; INT i; DWORD RetVal; if ((RetVal = WSAStartup(MAKEWORD(2, 2), &wsaData)) != 0) { - _stprintf(buf, _T("WSAStartup() failed : %lu\n"), RetVal); + _swprintf(buf, L"WSAStartup() failed : %lu\n", RetVal); LogEvent(buf, 0, 100, LOG_ALL); return FALSE; } UpdateStatus(pServInfo, 0, 1); - LogEvent(_T("\nCreating server Threads"), 0, 0, LOG_FILE); + LogEvent(L"\nCreating server Threads", 0, 0, LOG_FILE); /* Create worker threads. */ - for(i = 0; i < NUM_SERVICES; i++) + for (i = 0; i < NUM_SERVICES; i++) { - _stprintf(buf, _T("Creating thread for %s server"), Services[i].Name); + _swprintf(buf, L"Creating thread for %s server", Services[i].lpName); LogEvent(buf, 0, 0, LOG_FILE); hThread[i] = CreateThread(NULL, @@ -94,26 +94,26 @@ CreateServers(PSERVICEINFO pServInfo) if (hThread[i] == NULL) { - _stprintf(buf, _T("\nFailed to start %s server\n"), Services[i].Name); + _swprintf(buf, L"\nFailed to start %s server\n", Services[i].lpName); LogEvent(buf, GetLastError(), 0, LOG_ALL); } UpdateStatus(pServInfo, 0, 1); } - LogEvent(_T("Setting service status to running"), 0, 0, LOG_FILE); + LogEvent(L"Setting service status to running", 0, 0, LOG_FILE); UpdateStatus(pServInfo, SERVICE_RUNNING, 0); /* Wait until all threads have terminated. */ WaitForMultipleObjects(NUM_SERVICES, hThread, TRUE, INFINITE); - for(i = 0; i < NUM_SERVICES; i++) + for (i = 0; i < NUM_SERVICES; i++) { if (hThread[i] != NULL) CloseHandle(hThread[i]); } - LogEvent(_T("Detaching Winsock2"), 0, 0, LOG_FILE); + LogEvent(L"Detaching Winsock2", 0, 0, LOG_FILE); WSACleanup(); return 0; @@ -131,7 +131,7 @@ ServerCtrlHandler(DWORD dwControl, { case SERVICE_CONTROL_SHUTDOWN: case SERVICE_CONTROL_STOP: - LogEvent(_T("\nSetting the service to SERVICE_STOP_PENDING"), 0, 0, LOG_FILE); + LogEvent(L"\nSetting the service to SERVICE_STOP_PENDING", 0, 0, LOG_FILE); InterlockedExchange((LONG *)&bShutdown, TRUE); pServInfo->servStatus.dwWin32ExitCode = 0; pServInfo->servStatus.dwWaitHint = 0; @@ -139,13 +139,13 @@ ServerCtrlHandler(DWORD dwControl, break; case SERVICE_CONTROL_PAUSE: /* not yet implemented */ - LogEvent(_T("Setting the service to SERVICE_PAUSED"), 0, 0, LOG_FILE); + LogEvent(L"Setting the service to SERVICE_PAUSED", 0, 0, LOG_FILE); InterlockedExchange((LONG *)&bPause, TRUE); UpdateStatus(pServInfo, SERVICE_PAUSED, 0); break; case SERVICE_CONTROL_CONTINUE: - LogEvent(_T("Setting the service to SERVICE_RUNNING"), 0, 0, LOG_FILE); + LogEvent(L"Setting the service to SERVICE_RUNNING", 0, 0, LOG_FILE); InterlockedExchange((LONG *)&bPause, FALSE); UpdateStatus(pServInfo, SERVICE_RUNNING, 0); break; @@ -155,19 +155,19 @@ ServerCtrlHandler(DWORD dwControl, default: if (dwControl > 127 && dwControl < 256) /* user defined */ - LogEvent(_T("User defined control code"), 0, 0, LOG_FILE); + LogEvent(L"User defined control code", 0, 0, LOG_FILE); else - LogEvent(_T("ERROR: Bad control code"), 0, 0, LOG_FILE); + LogEvent(L"ERROR: Bad control code", 0, 0, LOG_FILE); break; } } VOID WINAPI -ServiceMain(DWORD argc, LPTSTR argv[]) +ServiceMain(DWORD argc, LPWSTR argv[]) { SERVICEINFO servInfo; - LogEvent (_T("Entering ServiceMain."), 0, 0, LOG_FILE); + LogEvent(L"Entering ServiceMain.", 0, 0, LOG_FILE); servInfo.servStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS; servInfo.servStatus.dwCurrentState = SERVICE_STOPPED; @@ -177,12 +177,12 @@ ServiceMain(DWORD argc, LPTSTR argv[]) servInfo.servStatus.dwCheckPoint = 0; servInfo.servStatus.dwWaitHint = 2 * CS_TIMEOUT; - LogEvent(_T("Registering service control handler"), 0, 0, LOG_FILE); - servInfo.hStatus = RegisterServiceCtrlHandlerEx(ServiceName, - (LPHANDLER_FUNCTION_EX)ServerCtrlHandler, - &servInfo); + LogEvent(L"Registering service control handler", 0, 0, LOG_FILE); + servInfo.hStatus = RegisterServiceCtrlHandlerExW(ServiceName, + (LPHANDLER_FUNCTION_EX)ServerCtrlHandler, + &servInfo); if (!servInfo.hStatus) - LogEvent(_T("Failed to register service\n"), GetLastError(), 100, LOG_ALL); + LogEvent(L"Failed to register service", GetLastError(), 100, LOG_ALL); UpdateStatus(&servInfo, SERVICE_START_PENDING, 1); @@ -193,27 +193,28 @@ ServiceMain(DWORD argc, LPTSTR argv[]) return; } - LogEvent(_T("Service threads shut down. Set SERVICE_STOPPED status"), 0, 0, LOG_FILE); + LogEvent(L"Service threads shut down. Set SERVICE_STOPPED status", 0, 0, LOG_FILE); UpdateStatus(&servInfo, SERVICE_STOPPED, 0); - LogEvent(_T("Leaving ServiceMain\n"), 0, 0, LOG_FILE); + LogEvent(L"Leaving ServiceMain\n", 0, 0, LOG_FILE); } int _tmain (int argc, LPTSTR argv []) { - SERVICE_TABLE_ENTRY ServiceTable[] = + SERVICE_TABLE_ENTRYW ServiceTable[] = { {ServiceName, ServiceMain}, {NULL, NULL } }; - InitLogging(); + if (InitLogging()) + { + if (!StartServiceCtrlDispatcherW(ServiceTable)) + LogEvent(L"failed to start the service control dispatcher", GetLastError(), 101, LOG_ALL); - if (!StartServiceCtrlDispatcher(ServiceTable)) - LogEvent(_T("failed to start the service control dispatcher"), GetLastError(), 101, LOG_ALL); - - UninitLogging(); + UninitLogging(); + } return 0; } diff --git a/reactos/base/services/tcpsvcs/tcpsvcs.h b/reactos/base/services/tcpsvcs/tcpsvcs.h index 1af8749d0a3..e1d3c987ab3 100644 --- a/reactos/base/services/tcpsvcs/tcpsvcs.h +++ b/reactos/base/services/tcpsvcs/tcpsvcs.h @@ -3,6 +3,10 @@ #include #include +#ifndef _MSC_VER +#define _swprintf swprintf +#endif + #define LOG_FILE 1 #define LOG_EVENTLOG 2 #define LOG_ERROR 4 @@ -20,19 +24,20 @@ /* data structure to pass to threads */ -typedef struct _Services { +typedef struct _Services +{ USHORT Port; - TCHAR *Name; - LPTHREAD_START_ROUTINE Service; + LPWSTR lpName; + LPTHREAD_START_ROUTINE lpService; } SERVICES, *PSERVICES; extern volatile BOOL bShutdown; extern volatile BOOL bPause; /* logging functions */ -VOID InitLogging(); +BOOL InitLogging(); VOID UninitLogging(); -VOID LogEvent(LPCTSTR lpMsg, DWORD errNum, DWORD exitCode, UINT flags); +VOID LogEvent(LPCWSTR lpMsg, DWORD errNum, DWORD exitCode, UINT flags); /* skelserver functions */ DWORD WINAPI StartServer(LPVOID lpParam); From 7d5a02d484d176204eb07807db5b54aeae29b1f1 Mon Sep 17 00:00:00 2001 From: Ged Murphy Date: Mon, 1 Sep 2008 13:08:52 +0000 Subject: [PATCH 274/324] remove warning svn path=/trunk/; revision=35855 --- reactos/base/services/tcpsvcs/log.c | 1 - 1 file changed, 1 deletion(-) diff --git a/reactos/base/services/tcpsvcs/log.c b/reactos/base/services/tcpsvcs/log.c index 81b749590bc..f1571501018 100644 --- a/reactos/base/services/tcpsvcs/log.c +++ b/reactos/base/services/tcpsvcs/log.c @@ -15,7 +15,6 @@ static LPWSTR lpEventSource = L"tcpsvcs"; static LPCWSTR lpLogFileName = L"C:\\tcpsvcs_log.log"; static HANDLE hLogFile = NULL; -static BOOL bWaitingOnRead = FALSE; static OVERLAPPED olWrite; From 1d9ff6256c31f58149fd79b90fb21d18b60b7db2 Mon Sep 17 00:00:00 2001 From: Gregor Brunmar Date: Mon, 1 Sep 2008 18:32:57 +0000 Subject: [PATCH 275/324] D3D9: * Initial cursor creation in swap chain * Changed from screen width/height in swap chains to back buffer width/height svn path=/trunk/; revision=35860 --- reactos/dll/directx/d3d9/d3d9.rbuild | 13 +++++---- reactos/dll/directx/d3d9/d3d9_baseobject.c | 15 ++++++++++ reactos/dll/directx/d3d9/d3d9_baseobject.h | 2 ++ reactos/dll/directx/d3d9/d3d9_cursor.c | 34 ++++++++++++++++++++++ reactos/dll/directx/d3d9/d3d9_cursor.h | 34 ++++++++++++++++++++++ reactos/dll/directx/d3d9/d3d9_device.c | 16 ++++++++-- reactos/dll/directx/d3d9/d3d9_device.h | 28 +++++------------- reactos/dll/directx/d3d9/d3d9_swapchain.c | 24 ++++++++++++--- reactos/dll/directx/d3d9/d3d9_swapchain.h | 2 +- reactos/dll/directx/d3d9/device.c | 1 - 10 files changed, 135 insertions(+), 34 deletions(-) create mode 100644 reactos/dll/directx/d3d9/d3d9_cursor.c create mode 100644 reactos/dll/directx/d3d9/d3d9_cursor.h diff --git a/reactos/dll/directx/d3d9/d3d9.rbuild b/reactos/dll/directx/d3d9/d3d9.rbuild index 913f0742f19..c6693b1ae26 100644 --- a/reactos/dll/directx/d3d9/d3d9.rbuild +++ b/reactos/dll/directx/d3d9/d3d9.rbuild @@ -13,15 +13,16 @@ d3d8thk d3d9.c + d3d9_baseobject.c + d3d9_caps.c + d3d9_create.c + d3d9_cursor.c + d3d9_device.c + d3d9_haldevice.c d3d9_helpers.c d3d9_impl.c - d3d9_baseobject.c - d3d9_create.c - d3d9_caps.c - d3d9_device.c - d3d9_swapchain.c d3d9_puredevice.c - d3d9_haldevice.c + d3d9_swapchain.c adapter.c device.c format.c diff --git a/reactos/dll/directx/d3d9/d3d9_baseobject.c b/reactos/dll/directx/d3d9/d3d9_baseobject.c index aef859673df..41a7681316a 100644 --- a/reactos/dll/directx/d3d9/d3d9_baseobject.c +++ b/reactos/dll/directx/d3d9/d3d9_baseobject.c @@ -71,3 +71,18 @@ HRESULT D3D9BaseObject_GetDevice(D3D9BaseObject* pBaseObject, IDirect3DDevice9** return E_NOINTERFACE; } + +HRESULT D3D9BaseObject_GetDeviceInt(D3D9BaseObject* pBaseObject, DIRECT3DDEVICE9_INT** ppDevice) +{ + if (pBaseObject->pUnknown) + { + LPDIRECT3DDEVICE9 pDevice; + if (FAILED(pBaseObject->pUnknown->lpVtbl->QueryInterface((IUnknown*) &pBaseObject->pUnknown->lpVtbl, &IID_IDirect3DDevice9, (void**)&pDevice))) + return E_NOINTERFACE; + + *ppDevice = IDirect3DDevice9ToImpl(pDevice); + return D3D_OK; + } + + return E_NOINTERFACE; +} diff --git a/reactos/dll/directx/d3d9/d3d9_baseobject.h b/reactos/dll/directx/d3d9/d3d9_baseobject.h index 73bfbab06b3..33a8f9e1a3d 100644 --- a/reactos/dll/directx/d3d9/d3d9_baseobject.h +++ b/reactos/dll/directx/d3d9/d3d9_baseobject.h @@ -12,6 +12,7 @@ #include struct _D3D9BaseObject; +struct _Direct3DDevice9_INT; enum REF_TYPE { @@ -42,5 +43,6 @@ VOID InitD3D9BaseObject(D3D9BaseObject* pBaseObject, enum REF_TYPE RefType, IUnk ULONG D3D9BaseObject_AddRef(D3D9BaseObject* pBaseObject); ULONG D3D9BaseObject_Release(D3D9BaseObject* pBaseObject); HRESULT D3D9BaseObject_GetDevice(D3D9BaseObject* pBaseObject, IDirect3DDevice9** ppDevice); +HRESULT D3D9BaseObject_GetDeviceInt(D3D9BaseObject* pBaseObject, struct _Direct3DDevice9_INT** ppDevice); #endif // _D3D9_BASEOBJECT_H_ diff --git a/reactos/dll/directx/d3d9/d3d9_cursor.c b/reactos/dll/directx/d3d9/d3d9_cursor.c new file mode 100644 index 00000000000..477eeb7775f --- /dev/null +++ b/reactos/dll/directx/d3d9/d3d9_cursor.c @@ -0,0 +1,34 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS ReactX + * FILE: dll/directx/d3d9/d3d9_cursor.h + * PURPOSE: d3d9.dll internal cursor methods + * PROGRAMERS: Gregor Gullwi + */ +#include "d3d9_cursor.h" + +#include +#include +#include "d3d9_private.h" +#include "adapter.h" +#include "d3d9_device.h" +#include "d3d9_swapchain.h" +#include "d3d9_helpers.h" + +D3D9Cursor* CreateD3D9Cursor(struct _Direct3DDevice9_INT* pBaseDevice, struct _Direct3DSwapChain9_INT* pSwapChain) +{ + D3D9Cursor* pCursor; + + if (FAILED(AlignedAlloc((LPVOID*)&pCursor, sizeof(D3D9Cursor)))) + { + DPRINT1("Failed to allocate D3D9Cursor"); + return NULL; + } + + pCursor->pBaseDevice = pBaseDevice; + pCursor->pSwapChain = pSwapChain; + pCursor->dwWidth = pSwapChain->dwWidth / 2; + pCursor->dwHeight = pSwapChain->dwHeight / 2; + + return pCursor; +} diff --git a/reactos/dll/directx/d3d9/d3d9_cursor.h b/reactos/dll/directx/d3d9/d3d9_cursor.h new file mode 100644 index 00000000000..a43280d3d47 --- /dev/null +++ b/reactos/dll/directx/d3d9/d3d9_cursor.h @@ -0,0 +1,34 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS ReactX + * FILE: dll/directx/d3d9/d3d9_cursor.h + * PURPOSE: d3d9.dll internal cursor methods + * PROGRAMERS: Gregor Gullwi + */ +#ifndef _D3D9_CURSOR_H +#define _D3D9_CURSOR_H + +#include "d3d9_common.h" + +typedef struct _D3D9Cursor +{ +/* 0x0000 */ DWORD dwUnknown0000; +/* 0x0004 */ DWORD dwUnknown0004; +/* 0x0008 */ DWORD dwUnknown0008; +/* 0x000c */ DWORD dwUnknown000c; +/* 0x0010 */ DWORD dwUnknown0010; +/* 0x0014 */ DWORD dwUnknown0014; +/* 0x0018 */ DWORD dwWidth; +/* 0x001c */ DWORD dwHeight; +/* 0x0020 */ DWORD dwUnknown0020[18]; +/* 0x0070 */ struct _Direct3DDevice9_INT* pBaseDevice; +/* 0x0074 */ struct _Direct3DSwapChain9_INT* pSwapChain; +/* 0x0078 */ DWORD dwUnknown0078; +/* 0x007c */ DWORD dwMonitorVirtualX; +/* 0x0080 */ DWORD dwMonitorVirtualY; +/* 0x0084 */ DWORD dwUnknown0084; +} D3D9Cursor; + +D3D9Cursor* CreateD3D9Cursor(struct _Direct3DDevice9_INT* pBaseDevice, struct _Direct3DSwapChain9_INT* pSwapChain); + +#endif // _D3D9_CURSOR_H diff --git a/reactos/dll/directx/d3d9/d3d9_device.c b/reactos/dll/directx/d3d9/d3d9_device.c index c763724ce0a..1023040fefb 100644 --- a/reactos/dll/directx/d3d9/d3d9_device.c +++ b/reactos/dll/directx/d3d9/d3d9_device.c @@ -15,7 +15,7 @@ #define UNLOCK_D3DDEVICE9() if (This->bLockDevice) LeaveCriticalSection(&This->CriticalSection); /* Convert a IDirect3D9 pointer safely to the internal implementation struct */ -static LPDIRECT3DDEVICE9_INT IDirect3DDevice9ToImpl(LPDIRECT3DDEVICE9 iface) +LPDIRECT3DDEVICE9_INT IDirect3DDevice9ToImpl(LPDIRECT3DDEVICE9 iface) { if (NULL == iface) return NULL; @@ -63,6 +63,7 @@ ULONG WINAPI IDirect3DDevice9Base_Release(LPDIRECT3DDEVICE9 iface) { DestroyD3D9DeviceData(&This->DeviceData[iAdapter]); } + This->lpVtbl->VirtualDestructor(iface); LeaveCriticalSection(&This->CriticalSection); AlignedFree(This); @@ -71,7 +72,7 @@ ULONG WINAPI IDirect3DDevice9Base_Release(LPDIRECT3DDEVICE9 iface) return ref; } -/* IDirect3D9Device interface */ +/* IDirect3DDevice9 public interface */ HRESULT WINAPI IDirect3DDevice9Base_TestCooperativeLevel(LPDIRECT3DDEVICE9 iface) { UNIMPLEMENTED @@ -544,3 +545,14 @@ HRESULT WINAPI IDirect3DDevice9Base_CreateOffscreenPlainSurface(LPDIRECT3DDEVICE return D3D_OK; } + +/* IDirect3DDevice9 private interface */ +VOID WINAPI IDirect3DDevice9Base_Destroy(LPDIRECT3DDEVICE9 iface) +{ + UNIMPLEMENTED +} + +VOID WINAPI IDirect3DDevice9Base_VirtualDestructor(LPDIRECT3DDEVICE9 iface) +{ + UNIMPLEMENTED +} diff --git a/reactos/dll/directx/d3d9/d3d9_device.h b/reactos/dll/directx/d3d9/d3d9_device.h index 2eca346cab9..37cf71f8f7b 100644 --- a/reactos/dll/directx/d3d9/d3d9_device.h +++ b/reactos/dll/directx/d3d9/d3d9_device.h @@ -83,25 +83,6 @@ typedef struct _D3D9ResourceManager /* 0x0014 - 0x0174 */ D3D9HeapTexture* pTextureHeap; } D3D9ResourceManager; -typedef struct _D3D9Cursor -{ -/* 0x0000 */ DWORD dwUnknown0000; -/* 0x0004 */ DWORD dwUnknown0004; -/* 0x0008 */ DWORD dwUnknown0008; -/* 0x000c */ DWORD dwUnknown000c; -/* 0x0010 */ DWORD dwUnknown0010; -/* 0x0014 */ DWORD dwUnknown0014; -/* 0x0018 */ DWORD dwWidth; -/* 0x001c */ DWORD dwHeight; -/* 0x0020 */ DWORD dwUnknown0020[18]; -/* 0x0070 */ struct _Direct3DDevice9_INT* pBaseDevice; -/* 0x0074 */ struct _Direct3DSwapChain9_INT* pSwapChain; -/* 0x0078 */ DWORD dwUnknown0078; -/* 0x007c */ DWORD dwMonitorVirtualX; -/* 0x0080 */ DWORD dwMonitorVirtualY; -/* 0x0084 */ DWORD dwUnknown0084; -} D3D9Cursor; - typedef struct _Direct3DDevice9_INT { /* 0x0000 */ struct _IDirect3DDevice9Vtbl_INT* lpVtbl; @@ -204,12 +185,15 @@ typedef struct _Direct3DDevice9_INT /* 0x1f44 */ DWORD unknown002001; } DIRECT3DDEVICE9_INT, FAR* LPDIRECT3DDEVICE9_INT; +/* Helper functions */ +LPDIRECT3DDEVICE9_INT IDirect3DDevice9ToImpl(LPDIRECT3DDEVICE9 iface); + /* IUnknown interface */ HRESULT WINAPI IDirect3DDevice9Base_QueryInterface(LPDIRECT3DDEVICE9 iface, REFIID riid, void** ppvObject); ULONG WINAPI IDirect3DDevice9Base_AddRef(LPDIRECT3DDEVICE9 iface); ULONG WINAPI IDirect3DDevice9Base_Release(LPDIRECT3DDEVICE9 iface); -/* IDirect3D9Device public interface */ +/* IDirect3DDevice9 public interface */ HRESULT WINAPI IDirect3DDevice9Base_TestCooperativeLevel(LPDIRECT3DDEVICE9 iface); UINT WINAPI IDirect3DDevice9Base_GetAvailableTextureMem(LPDIRECT3DDEVICE9 iface); HRESULT WINAPI IDirect3DDevice9Base_EvictManagedResources(LPDIRECT3DDEVICE9 iface); @@ -245,4 +229,8 @@ HRESULT WINAPI IDirect3DDevice9Base_StretchRect(LPDIRECT3DDEVICE9 iface, IDirect HRESULT WINAPI IDirect3DDevice9Base_ColorFill(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9* pSurface, CONST RECT* pRect, D3DCOLOR color); HRESULT WINAPI IDirect3DDevice9Base_CreateOffscreenPlainSurface(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, D3DFORMAT Format, D3DPOOL Pool, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle); +/* IDirect3DDevice9 private interface */ +VOID WINAPI IDirect3DDevice9Base_Destroy(LPDIRECT3DDEVICE9 iface); +VOID WINAPI IDirect3DDevice9Base_VirtualDestructor(LPDIRECT3DDEVICE9 iface); + #endif /* _D3D9_DEVICE_H_ */ diff --git a/reactos/dll/directx/d3d9/d3d9_swapchain.c b/reactos/dll/directx/d3d9/d3d9_swapchain.c index 72d5cdddd66..28011da1354 100644 --- a/reactos/dll/directx/d3d9/d3d9_swapchain.c +++ b/reactos/dll/directx/d3d9/d3d9_swapchain.c @@ -12,6 +12,7 @@ #include "d3d9_helpers.h" #include "d3d9_device.h" +#include "d3d9_cursor.h" #define LOCK_D3DDEVICE9() if (This->BaseObject.pUnknown && ((LPDIRECT3DDEVICE9_INT)This->BaseObject.pUnknown)->bLockDevice) \ EnterCriticalSection(&((LPDIRECT3DDEVICE9_INT)This->BaseObject.pUnknown)->CriticalSection); @@ -184,7 +185,7 @@ static IDirect3DSwapChain9Vtbl Direct3DSwapChain9_Vtbl = Direct3DSwapChain9_INT* CreateDirect3DSwapChain9(enum REF_TYPE RefType, struct _Direct3DDevice9_INT* pBaseDevice, DWORD ChainIndex) { Direct3DSwapChain9_INT* pThisSwapChain; - if (FAILED(AlignedAlloc((LPVOID *)&pThisSwapChain, sizeof(Direct3DSwapChain9_INT)))) + if (FAILED(AlignedAlloc((LPVOID*)&pThisSwapChain, sizeof(Direct3DSwapChain9_INT)))) { DPRINT1("Could not create Direct3DSwapChain9_INT"); return NULL; @@ -202,15 +203,16 @@ Direct3DSwapChain9_INT* CreateDirect3DSwapChain9(enum REF_TYPE RefType, struct _ return pThisSwapChain; } -VOID Direct3DSwapChain9_SetDisplayMode(Direct3DSwapChain9_INT* pThisSwapChain, D3DDISPLAYMODE* pMode) +VOID Direct3DSwapChain9_SetDisplayMode(Direct3DSwapChain9_INT* pThisSwapChain, D3DPRESENT_PARAMETERS* pPresentationParameters) { - pThisSwapChain->dwWidth = pMode->Width; - pThisSwapChain->dwHeight = pMode->Height; + pThisSwapChain->dwWidth = pPresentationParameters->BackBufferWidth; + pThisSwapChain->dwHeight = pPresentationParameters->BackBufferHeight; } HRESULT Direct3DSwapChain9_Init(Direct3DSwapChain9_INT* pThisSwapChain, D3DPRESENT_PARAMETERS* pPresentationParameters) { int i; + DIRECT3DDEVICE9_INT* pDevice; for (i = 0; i < 256; i++) { @@ -221,6 +223,20 @@ HRESULT Direct3DSwapChain9_Init(Direct3DSwapChain9_INT* pThisSwapChain, D3DPRESE pThisSwapChain->PresentParameters = pPresentationParameters[pThisSwapChain->ChainIndex]; pThisSwapChain->SwapEffect = pPresentationParameters->SwapEffect; + Direct3DSwapChain9_SetDisplayMode(pThisSwapChain, &pThisSwapChain->PresentParameters); + + if (FAILED(D3D9BaseObject_GetDeviceInt(&pThisSwapChain->BaseObject, &pDevice))) + { + DPRINT1("Could not get the swapchain device"); + return DDERR_GENERIC; + } + + pThisSwapChain->pCursor = CreateD3D9Cursor(pDevice, pThisSwapChain); + if (NULL == pThisSwapChain->pCursor) + { + DPRINT1("Could not allocate D3D9Cursor"); + return DDERR_OUTOFMEMORY; + } return Direct3DSwapChain9_Reset(pThisSwapChain, pPresentationParameters); } diff --git a/reactos/dll/directx/d3d9/d3d9_swapchain.h b/reactos/dll/directx/d3d9/d3d9_swapchain.h index 4a2de2210c8..c6e76095fdc 100644 --- a/reactos/dll/directx/d3d9/d3d9_swapchain.h +++ b/reactos/dll/directx/d3d9/d3d9_swapchain.h @@ -74,7 +74,7 @@ typedef struct _Direct3DSwapChain9_INT Direct3DSwapChain9_INT* CreateDirect3DSwapChain9(enum REF_TYPE RefType, struct _Direct3DDevice9_INT* pBaseDevice, DWORD ChainIndex); -VOID Direct3DSwapChain9_SetDisplayMode(Direct3DSwapChain9_INT* pThisSwapChain, D3DDISPLAYMODE* pMode); +VOID Direct3DSwapChain9_SetDisplayMode(Direct3DSwapChain9_INT* pThisSwapChain, D3DPRESENT_PARAMETERS* pPresentationParameters); HRESULT Direct3DSwapChain9_Init(Direct3DSwapChain9_INT* pThisSwapChain, D3DPRESENT_PARAMETERS* pPresentationParameters); HRESULT Direct3DSwapChain9_Reset(Direct3DSwapChain9_INT* pThisSwapChain, D3DPRESENT_PARAMETERS* pPresentationParameters); diff --git a/reactos/dll/directx/d3d9/device.c b/reactos/dll/directx/d3d9/device.c index bddd3805732..049d3074e95 100644 --- a/reactos/dll/directx/d3d9/device.c +++ b/reactos/dll/directx/d3d9/device.c @@ -81,7 +81,6 @@ HRESULT InitD3D9BaseDevice(LPDIRECT3DDEVICE9_INT pThisBaseDevice, LPDIRECT3D9_IN pThisBaseDevice->pSwapChains[i] = CreateDirect3DSwapChain9(RT_BUILTIN, pThisBaseDevice, i); pThisBaseDevice->pSwapChains2[i] = pThisBaseDevice->pSwapChains[i]; - Direct3DSwapChain9_SetDisplayMode(pThisBaseDevice->pSwapChains[i], &pThisBaseDevice->CurrentDisplayMode[i]); if (FAILED(Direct3DSwapChain9_Init(pThisBaseDevice->pSwapChains[i], pPresentationParameters))) { From 056316f3ac43820fbaee3b620b4bb8507f5c4cc1 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Mon, 1 Sep 2008 19:32:18 +0000 Subject: [PATCH 276/324] - Fix SHARED_CACHE_MAP structure: it should contain a PRIVATE_CACHE_MAP, not a pointer to it! (confirmed by OSR). - The same error in VacbPushLock field (also confirmed by OSR). svn path=/trunk/; revision=35861 --- reactos/include/ndk/cctypes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/include/ndk/cctypes.h b/reactos/include/ndk/cctypes.h index 238680180de..c8d342815c4 100644 --- a/reactos/include/ndk/cctypes.h +++ b/reactos/include/ndk/cctypes.h @@ -127,8 +127,8 @@ typedef struct _SHARED_CACHE_MAP ULONG BcbSpinLock; PVOID Reserved; KEVENT Event; - PEX_PUSH_LOCK VacbPushLock; - PPRIVATE_CACHE_MAP PrivateCacheMap; + EX_PUSH_LOCK VacbPushLock; + PRIVATE_CACHE_MAP PrivateCacheMap; } SHARED_CACHE_MAP; #endif /* _NTIFS_INCLUDED_ */ From 944616a1eaec8337705184aa278f40e28e2566e9 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Mon, 1 Sep 2008 20:42:21 +0000 Subject: [PATCH 277/324] - When creating a mutex, and you intend to release it without waiting for it, then you should specify so in bInitialOwner svn path=/trunk/; revision=35862 --- reactos/dll/win32/shell32/control.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/dll/win32/shell32/control.c b/reactos/dll/win32/shell32/control.c index baa42c8d462..e2038e67a99 100644 --- a/reactos/dll/win32/shell32/control.c +++ b/reactos/dll/win32/shell32/control.c @@ -357,7 +357,7 @@ static void Control_DoLaunch(CPanel* panel, HWND hWnd, LPCWSTR wszCmd) memcpy(szName, (LPVOID)ptr, Length * sizeof(WCHAR)); szName[Length] = L'\0'; - hMutex = CreateMutexW(NULL, FALSE, szName); + hMutex = CreateMutexW(NULL, TRUE, szName); if ((!hMutex) || (GetLastError() == ERROR_ALREADY_EXISTS)) return; From 366666bddbcd0053f2ff1d184b5a55276983d8d4 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Mon, 1 Sep 2008 20:45:26 +0000 Subject: [PATCH 278/324] patch by Cristo Silva criso-clycoscom: Initialize keyboard layout before startung the keyboard thread. svn path=/trunk/; revision=35863 --- reactos/subsystems/win32/win32k/ntuser/input.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/reactos/subsystems/win32/win32k/ntuser/input.c b/reactos/subsystems/win32/win32k/ntuser/input.c index a86b1984c7a..4657293394b 100644 --- a/reactos/subsystems/win32/win32k/ntuser/input.c +++ b/reactos/subsystems/win32/win32k/ntuser/input.c @@ -839,6 +839,12 @@ InitInputImpl(VOID) KeInitializeEvent(&InputThreadsStart, NotificationEvent, FALSE); + /* Initialize the default keyboard layout */ + if(!UserInitDefaultKeyboardLayout()) + { + DPRINT1("Failed to initialize default keyboard layout!\n"); + } + Status = PsCreateSystemThread(&KeyboardThreadHandle, THREAD_ALL_ACCESS, NULL, @@ -851,12 +857,6 @@ InitInputImpl(VOID) DPRINT1("Win32K: Failed to create keyboard thread.\n"); } - /* Initialize the default keyboard layout */ - if(!UserInitDefaultKeyboardLayout()) - { - DPRINT1("Failed to initialize default keyboard layout!\n"); - } - Status = PsCreateSystemThread(&MouseThreadHandle, THREAD_ALL_ACCESS, NULL, From f5a9dc4b296a3bf28200474344622300c0664a95 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Mon, 1 Sep 2008 23:18:40 +0000 Subject: [PATCH 279/324] Don't use a NULL tag with EngAllocMem, that doesn't work anymore. svn path=/trunk/; revision=35869 --- reactos/subsystems/win32/win32k/eng/surface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/subsystems/win32/win32k/eng/surface.c b/reactos/subsystems/win32/win32k/eng/surface.c index afe3b9afbbe..7fb5c1fbc0c 100644 --- a/reactos/subsystems/win32/win32k/eng/surface.c +++ b/reactos/subsystems/win32/win32k/eng/surface.c @@ -317,7 +317,7 @@ IntCreateBitmap(IN SIZEL Size, SurfObj->lDelta = DIB_GetDIBWidthBytes(Size.cx, BitsPerFormat(BMF_4BPP)); SurfObj->cjBits = SurfObj->lDelta * Size.cy; UncompressedFormat = BMF_4BPP; - UncompressedBits = EngAllocMem(FL_ZERO_MEMORY, SurfObj->cjBits, 0); + UncompressedBits = EngAllocMem(FL_ZERO_MEMORY, SurfObj->cjBits, TAG_DIB); Decompress4bpp(Size, (BYTE *)Bits, (BYTE *)UncompressedBits, SurfObj->lDelta); } else if (Format == BMF_8RLE) From 4695ff389c3b3188ff0a19772154743305e9320a Mon Sep 17 00:00:00 2001 From: Ged Murphy Date: Tue, 2 Sep 2008 08:05:25 +0000 Subject: [PATCH 280/324] allow the log file to be opened whilst the service is running svn path=/trunk/; revision=35870 --- reactos/base/services/tcpsvcs/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/base/services/tcpsvcs/log.c b/reactos/base/services/tcpsvcs/log.c index f1571501018..6b117244993 100644 --- a/reactos/base/services/tcpsvcs/log.c +++ b/reactos/base/services/tcpsvcs/log.c @@ -49,7 +49,7 @@ OpenLogFile() { hLogFile = CreateFileW(lpLogFileName, GENERIC_WRITE, - 0, + FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, From f2b500d25cf587438fbd6db8c404a1ae7ed8ba6d Mon Sep 17 00:00:00 2001 From: Ged Murphy Date: Tue, 2 Sep 2008 08:21:13 +0000 Subject: [PATCH 281/324] Fix return value so we exit ServerMain correctly, thus we now see all log until death svn path=/trunk/; revision=35871 --- reactos/base/services/tcpsvcs/tcpsvcs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/reactos/base/services/tcpsvcs/tcpsvcs.c b/reactos/base/services/tcpsvcs/tcpsvcs.c index 74df4069bb5..f91e88b01d6 100644 --- a/reactos/base/services/tcpsvcs/tcpsvcs.c +++ b/reactos/base/services/tcpsvcs/tcpsvcs.c @@ -94,8 +94,9 @@ CreateServers(PSERVICEINFO pServInfo) if (hThread[i] == NULL) { - _swprintf(buf, L"\nFailed to start %s server\n", Services[i].lpName); + _swprintf(buf, L"\nError creating %s server thread\n", Services[i].lpName); LogEvent(buf, GetLastError(), 0, LOG_ALL); + return FALSE; } UpdateStatus(pServInfo, 0, 1); @@ -116,7 +117,7 @@ CreateServers(PSERVICEINFO pServInfo) LogEvent(L"Detaching Winsock2", 0, 0, LOG_FILE); WSACleanup(); - return 0; + return TRUE; } VOID WINAPI @@ -188,6 +189,7 @@ ServiceMain(DWORD argc, LPWSTR argv[]) if (!CreateServers(&servInfo)) { + LogEvent(L"Error creating servers", GetLastError(), 1, LOG_ALL); servInfo.servStatus.dwServiceSpecificExitCode = 1; UpdateStatus(&servInfo, SERVICE_STOPPED, 0); return; From d8667982798bc6bd961ef762dc14f577893714c4 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Tue, 2 Sep 2008 08:26:05 +0000 Subject: [PATCH 282/324] - MmLoadSystemImage's last parameter (BaseAddress) is not marked as OPTIONAL. Fix callers. svn path=/trunk/; revision=35872 --- reactos/ntoskrnl/io/iomgr/driver.c | 6 ++++-- reactos/ntoskrnl/mm/pagefile.c | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/reactos/ntoskrnl/io/iomgr/driver.c b/reactos/ntoskrnl/io/iomgr/driver.c index 68aeeea33d0..d4fe8ab6b6c 100644 --- a/reactos/ntoskrnl/io/iomgr/driver.c +++ b/reactos/ntoskrnl/io/iomgr/driver.c @@ -277,6 +277,7 @@ IopLoadServiceModule( UNICODE_STRING ServiceImagePath, CCSName; NTSTATUS Status; HANDLE CCSKey, ServiceKey; + PVOID BaseAddress; DPRINT("IopLoadServiceModule(%wZ, 0x%p)\n", ServiceName, ModuleObject); @@ -358,7 +359,7 @@ IopLoadServiceModule( else { DPRINT("Loading module\n"); - Status = MmLoadSystemImage(&ServiceImagePath, NULL, NULL, 0, (PVOID)ModuleObject, NULL); + Status = MmLoadSystemImage(&ServiceImagePath, NULL, NULL, 0, (PVOID)ModuleObject, &BaseAddress); } ExFreePool(ServiceImagePath.Buffer); @@ -1561,6 +1562,7 @@ IopLoadUnloadDriver(PLOAD_UNLOAD_PARAMS LoadParams) PDEVICE_NODE DeviceNode; PDRIVER_OBJECT DriverObject; PLDR_DATA_TABLE_ENTRY ModuleObject; + PVOID BaseAddress; WCHAR *cur; /* Check if it's an unload request */ @@ -1671,7 +1673,7 @@ IopLoadUnloadDriver(PLOAD_UNLOAD_PARAMS LoadParams) * Load the driver module */ - Status = MmLoadSystemImage(&ImagePath, NULL, NULL, 0, (PVOID)&ModuleObject, NULL); + Status = MmLoadSystemImage(&ImagePath, NULL, NULL, 0, (PVOID)&ModuleObject, &BaseAddress); if (!NT_SUCCESS(Status) && Status != STATUS_IMAGE_ALREADY_LOADED) { DPRINT("MmLoadSystemImage() failed (Status %lx)\n", Status); diff --git a/reactos/ntoskrnl/mm/pagefile.c b/reactos/ntoskrnl/mm/pagefile.c index 4f83ebde7ab..3d27c249a1c 100644 --- a/reactos/ntoskrnl/mm/pagefile.c +++ b/reactos/ntoskrnl/mm/pagefile.c @@ -694,6 +694,7 @@ MmInitializeCrashDump(HANDLE PageFileHandle, ULONG PageFileNum) ANSI_STRING ProcName; PIO_STACK_LOCATION StackPtr; PLDR_DATA_TABLE_ENTRY ModuleObject = NULL; + PVOID BaseAddress; Status = ZwFsControlFile(PageFileHandle, 0, @@ -766,13 +767,13 @@ MmInitializeCrashDump(HANDLE PageFileHandle, ULONG PageFileNum) } /* Load the diskdump driver. */ - Status = MmLoadSystemImage(&DiskDumpName, NULL, NULL, 0, (PVOID)&ModuleObject, NULL); + Status = MmLoadSystemImage(&DiskDumpName, NULL, NULL, 0, (PVOID)&ModuleObject, &BaseAddress); if (ModuleObject == NULL) { return(STATUS_OBJECT_NAME_NOT_FOUND); } RtlInitAnsiString(&ProcName, "DiskDumpFunctions"); - MmCoreDumpFunctions = MiFindExportedRoutineByName(ModuleObject->DllBase, + MmCoreDumpFunctions = MiFindExportedRoutineByName(BaseAddress, &ProcName); if (!NT_SUCCESS(Status)) { From 27e6b3ca2f4238a7ca6ba961b1ea1f1aa48e6827 Mon Sep 17 00:00:00 2001 From: James Tabor Date: Tue, 2 Sep 2008 08:44:41 +0000 Subject: [PATCH 283/324] - We always supported global WH_KEYBOARD_LL and WH_MOUSE_LL. svn path=/trunk/; revision=35873 --- reactos/subsystems/win32/win32k/ntuser/hook.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/subsystems/win32/win32k/ntuser/hook.c b/reactos/subsystems/win32/win32k/ntuser/hook.c index 1f8846a5de0..525e323e159 100644 --- a/reactos/subsystems/win32/win32k/ntuser/hook.c +++ b/reactos/subsystems/win32/win32k/ntuser/hook.c @@ -1045,7 +1045,7 @@ NtUserSetWindowsHookEx( Global = TRUE; } - if ( Global || + if ( ( Global && (HookId != WH_KEYBOARD_LL || HookId != WH_MOUSE_LL) ) || WH_DEBUG == HookId || WH_JOURNALPLAYBACK == HookId || WH_JOURNALRECORD == HookId) From 3da774ad40e8368f4a2e5bce6eaa1ac00838b333 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Tue, 2 Sep 2008 10:24:56 +0000 Subject: [PATCH 284/324] - Don't pass an unitialized variable as buffer size to RegQueryValueEx. This fixes "(lib\rtl\heap.c:777) Could not allocate 78010000 bytes" problem during 2nd stage install. svn path=/trunk/; revision=35875 --- reactos/base/setup/vmwinst/vmwinst.c | 1 + 1 file changed, 1 insertion(+) diff --git a/reactos/base/setup/vmwinst/vmwinst.c b/reactos/base/setup/vmwinst/vmwinst.c index 0269195eeba..80484c9e908 100644 --- a/reactos/base/setup/vmwinst/vmwinst.c +++ b/reactos/base/setup/vmwinst/vmwinst.c @@ -260,6 +260,7 @@ IsVmwSVGAEnabled(VOID) { return FALSE; } + Size = sizeof(DWORD); if(RegQueryValueEx(hReg, L"Start", 0, &Type, (BYTE*)&Value, &Size) != ERROR_SUCCESS || Type != REG_DWORD) { From 03ba3b67d10ac846af9a2b4ea273ebc1b0d58681 Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Tue, 2 Sep 2008 12:57:26 +0000 Subject: [PATCH 285/324] delete sysreg, it is obsolete now svn path=/trunk/; revision=35878 --- reactos/tools/sysreg/comp_factory.h | 205 ---- reactos/tools/sysreg/conf_parser.cpp | 112 -- reactos/tools/sysreg/conf_parser.h | 97 -- reactos/tools/sysreg/data_source.h | 51 - reactos/tools/sysreg/env_var.cpp | 61 - reactos/tools/sysreg/env_var.h | 72 -- reactos/tools/sysreg/file_reader.cpp | 127 -- reactos/tools/sysreg/file_reader.h | 93 -- reactos/tools/sysreg/namedpipe_reader.cpp | 330 ----- reactos/tools/sysreg/namedpipe_reader.h | 142 --- reactos/tools/sysreg/os_support.cpp | 341 ------ reactos/tools/sysreg/os_support.h | 160 --- reactos/tools/sysreg/pipe_reader.cpp | 101 -- reactos/tools/sysreg/pipe_reader.h | 110 -- reactos/tools/sysreg/reg_test.h | 93 -- reactos/tools/sysreg/rosboot_test.cpp | 1063 ----------------- reactos/tools/sysreg/rosboot_test.h | 194 --- reactos/tools/sysreg/sym_file.cpp | 191 --- reactos/tools/sysreg/sym_file.h | 111 -- reactos/tools/sysreg/sysreg.cpp | 87 -- reactos/tools/sysreg/sysreg.h | 23 - reactos/tools/sysreg/sysreg.rbuild | 14 - reactos/tools/sysreg/timer_callback.h | 56 - .../tools/sysreg/timer_command_callback.cpp | 41 - reactos/tools/sysreg/timer_command_callback.h | 57 - reactos/tools/sysreg/txtmode.cfg | 110 -- reactos/tools/sysreg/user_types.h | 29 - reactos/tools/tools.rbuild | 3 - 28 files changed, 4074 deletions(-) delete mode 100644 reactos/tools/sysreg/comp_factory.h delete mode 100644 reactos/tools/sysreg/conf_parser.cpp delete mode 100644 reactos/tools/sysreg/conf_parser.h delete mode 100644 reactos/tools/sysreg/data_source.h delete mode 100644 reactos/tools/sysreg/env_var.cpp delete mode 100644 reactos/tools/sysreg/env_var.h delete mode 100644 reactos/tools/sysreg/file_reader.cpp delete mode 100644 reactos/tools/sysreg/file_reader.h delete mode 100644 reactos/tools/sysreg/namedpipe_reader.cpp delete mode 100644 reactos/tools/sysreg/namedpipe_reader.h delete mode 100644 reactos/tools/sysreg/os_support.cpp delete mode 100644 reactos/tools/sysreg/os_support.h delete mode 100644 reactos/tools/sysreg/pipe_reader.cpp delete mode 100644 reactos/tools/sysreg/pipe_reader.h delete mode 100644 reactos/tools/sysreg/reg_test.h delete mode 100644 reactos/tools/sysreg/rosboot_test.cpp delete mode 100644 reactos/tools/sysreg/rosboot_test.h delete mode 100644 reactos/tools/sysreg/sym_file.cpp delete mode 100644 reactos/tools/sysreg/sym_file.h delete mode 100644 reactos/tools/sysreg/sysreg.cpp delete mode 100644 reactos/tools/sysreg/sysreg.h delete mode 100644 reactos/tools/sysreg/sysreg.rbuild delete mode 100644 reactos/tools/sysreg/timer_callback.h delete mode 100644 reactos/tools/sysreg/timer_command_callback.cpp delete mode 100644 reactos/tools/sysreg/timer_command_callback.h delete mode 100644 reactos/tools/sysreg/txtmode.cfg delete mode 100644 reactos/tools/sysreg/user_types.h diff --git a/reactos/tools/sysreg/comp_factory.h b/reactos/tools/sysreg/comp_factory.h deleted file mode 100644 index d3d0ec07b22..00000000000 --- a/reactos/tools/sysreg/comp_factory.h +++ /dev/null @@ -1,205 +0,0 @@ -#ifndef COMPONENT_FACTORY_TEMPLATE_H_ //comp_factory.h -#define COMPONENT_FACTORY_TEMPLATE_H_ - -/* $Id$ - * - * PROJECT: System regression tool for ReactOS - * LICENSE: GPL - See COPYING in the top level directory - * FILE: tools/sysreg/comp_factory.h - * PURPOSE: component management - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) - */ - - -#include "user_types.h" -#include -#include - -namespace System_ -{ - using std::map; - using std::vector; - -//---------------------------------------------------------- -/// -/// ComponentFactoryTemplate -/// -/// This class servess as a factory class for components. In general -/// can be used for any possible class which has base class -/// and a derrived class -/// - -//-------------------------------------------------------------------- -/// -/// create -/// -/// Description: this template function creates a function which returns -/// objects of type ElementType but in real are objects of DerrivedType -/// - - template - static ElementType * create () - { - return new DerrivedType(); - } - -//-------------------------------------------------------------------- - - template - class ComponentFactoryTemplate - { - typedef ElementType * (*creation_function)(); - typedef map ElementMap; - typedef vector ElementIdVector; - public: - -//-------------------------------------------------------------------- -/// -/// ComponentFactoryTemplate -/// -/// Description: default destructor of class ComponentFactoryTemplate -/// - - ComponentFactoryTemplate() - { - - } - -//-------------------------------------------------------------------- -/// -/// ~ComponentFactoryTemplate -/// -/// Description: default destructor of class ComponentFactoryTemplate -/// - - virtual ~ComponentFactoryTemplate() - { - - } -//-------------------------------------------------------------------- -/// -/// listComponent -/// -/// Description: lists all registererd components ids - - void listComponentIds() - { - for(unsigned i = 0; i < ids_.size (); i++) - cout< - bool registerComponent(ElementId const & id) - { - typename ElementMap::const_iterator iter = elements_.find(id); - if(iter != elements_.end()) - return false; - ids_.insert(ids_.begin(),id); - elements_.insert(std::make_pair(id, &create)); - return true; - - } - - //-------------------------------------------------------------------- -/// -/// deregisterComponent -/// -/// Description: unregisters a given component indentified by param id -/// After unregistration, the specified component can no longer be -/// created -/// @return bool -/// @param id the element id of the ContentType - - template - const bool deregisterComponent(ElementId const & id) - { - typename ElementMap::const_iterator iterator = elements_.find(id); - if(iterator != elements_.end()) - { - elements_.erase(iterator); - return true; - } - else - return false; - } - - -//-------------------------------------------------------------------- -/// -/// createComponent -/// -/// Description: creates a component according to the specified information -/// returns the component encapsulated in an std::auto_ptr -/// @param id specifies the key id, to look for -/// @return std::auto_ptr - ElementType * createComponent(ElementId const & id) const - { - typename ElementMap::const_iterator first_it = elements_.find(id); - if(first_it != elements_.end()) - return (first_it->second)(); - else - return 0; - } - -//-------------------------------------------------------------------- -/// -/// deleteComponent -/// -/// Description: deletes a component -/// @param element the element to be deleted - - void deleteComponent(ElementType * element) - { - delete element; - } - protected: - ElementMap elements_; - ElementIdVector ids_; - }; - - -} //end of namespace Sysreg_ - -#endif - diff --git a/reactos/tools/sysreg/conf_parser.cpp b/reactos/tools/sysreg/conf_parser.cpp deleted file mode 100644 index f999a4fca5b..00000000000 --- a/reactos/tools/sysreg/conf_parser.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/* $Id$ - * - * PROJECT: System regression tool for ReactOS - * LICENSE: GPL - See COPYING in the top level directory - * FILE: tools/sysreg/conf_parser.h - * PURPOSE: configuration parser - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) - */ - -#include "conf_parser.h" - -namespace Sysreg_ -{ - using std::ifstream; -//--------------------------------------------------------------------------------------- - ConfigParser::ConfigParser() - { - - } - -//--------------------------------------------------------------------------------------- - ConfigParser::~ConfigParser() - { - m_Map.clear (); - } - -//--------------------------------------------------------------------------------------- - bool ConfigParser::parseFile(char * FileName) - { - FILE * file = fopen(FileName, "rt"); - if (!file) - { - cerr << "Error: ConfigParser::parseFile failed to open configuration file " << FileName << endl; - return false; - } - bool ret = false; - while (!feof(file)) - { - char buffer[500]; - char * buf; - - buf = fgets(buffer, sizeof(buffer) / sizeof(char), file); - if (buf) - { - if (buffer[0] != ';') - { - string s_buffer = string(buffer); - string::size_type ws_pos = s_buffer.find_first_of ("="); - - if (ws_pos != string::npos && ws_pos > 0 && ws_pos < s_buffer.size()) - { - string name = s_buffer.substr (0, ws_pos); - string value = s_buffer.substr (ws_pos + 1, s_buffer.size() - ws_pos - 2); -/* - if (value[value.length () -1] == 0xA) - { - // remove newline char - value[value.length ()-1] = '\0'; - } -*/ -// cerr << "name: "<< name << "value: "<< value << "|" << endl; - m_Map[name] = value; - ret = true; - } - } - } - } - fclose(file); - return ret; - } - -//--------------------------------------------------------------------------------------- - bool ConfigParser::getStringValue(string &ConfVariable, string &ConfValue) - { - ConfigMap::iterator it = m_Map.find (ConfVariable); - if (it == m_Map.end ()) - { - //cerr << "ConfigParser::getValue failed to find " << ConfVariable << endl; - return false; - } - - ConfValue = it->second; - return true; - } -//---------------------------------------------------------------------------------------- - bool ConfigParser::getDoubleValue(string ConfVariable, double & ConfValue) - { - ConfigMap::iterator it = m_Map.find (ConfVariable); - if (it == m_Map.end ()) - { - cerr << "ConfigParser::getValue failed to find " << ConfVariable << endl; - return false; - } - - ConfValue = strtod(it->second.c_str(), NULL); - return true; - } -//----------------------------------------------------------------------------------------- - bool ConfigParser::getIntValue(string ConfVariable, long int & ConfValue) - { - ConfigMap::iterator it = m_Map.find (ConfVariable); - if (it == m_Map.end ()) - { - cerr << "ConfigParser::getValue failed to find " << ConfVariable << endl; - return false; - } - - ConfValue = strtol(it->second.c_str(), NULL, 10); - return true; - } - -} // end of namespace Sysreg_ diff --git a/reactos/tools/sysreg/conf_parser.h b/reactos/tools/sysreg/conf_parser.h deleted file mode 100644 index 78991263cf7..00000000000 --- a/reactos/tools/sysreg/conf_parser.h +++ /dev/null @@ -1,97 +0,0 @@ -#ifndef CONF_PARSER_H__ -#define CONF_PARSER_H__ - -/* $Id$ - * - * PROJECT: System regression tool for ReactOS - * LICENSE: GPL - See COPYING in the top level directory - * FILE: tools/sysreg/conf_parser.h - * PURPOSE: configuration parser - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) - */ - -#include "user_types.h" -#include -#include -#include -#include -#include -#include - -namespace Sysreg_ -{ - using std::map; -//--------------------------------------------------------------------------------------- -/// -/// class ConfigParser -/// -/// Description: this class reads configuration entries from a configuration file -/// Each entry must have the form of VALUE=XXX. The entries are stored -/// in a map which can be queried after parsing the configuration file -/// -/// Note: lines beginning with an ; are ignored -/// -/// Usage: First, call parseFile with param to file. Finally, call getValue with the -/// appropiate type - - class ConfigParser - { - public: - - typedef map ConfigMap; -//--------------------------------------------------------------------------------------- -/// -/// ConfigParser -/// -/// Description: constructor of class ConfigParser - - ConfigParser(); - -//--------------------------------------------------------------------------------------- -/// -/// ~ConfigParser -/// -/// Description: destructor of class ConfigParser - - virtual ~ConfigParser(); - -//--------------------------------------------------------------------------------------- -/// -/// parseFile -/// -/// Description: this function takes as param a path to file. it attempts to parse this specific -/// file with the given syntax. On success it returns true. -/// -/// Note: Everytime parseFile is called, the previous stored values are cleared -/// -/// @param FileName path to configuration file -/// @return bool - - bool parseFile(char * FileName); - -//-------------------------------------------------------------------------------------- -/// -/// getStringValue -/// -/// Description: attempts to read a config variable from the configuration file -/// If the variable name is not found, it returns false and the param -/// ConfValue remains untouched. On success it returns the true. -/// -/// @param ConfVariable name of the configuration variable to retrieve -/// @param ConfValue type of value to retrieve - - bool getStringValue(string & ConfVariable, string & ConfValue); - - bool getDoubleValue(string ConfVariable, double & value); - bool getIntValue(string ConfVariable, long int & value); - - protected: - ConfigMap m_Map; - - }; // end of class ConfigParser - - -} // end of namspace Sysreg_ - - -#endif /* end of CONF_PARSER_H__ */ diff --git a/reactos/tools/sysreg/data_source.h b/reactos/tools/sysreg/data_source.h deleted file mode 100644 index 748a8d3df12..00000000000 --- a/reactos/tools/sysreg/data_source.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef DATA_SOURCE_H__ -#define DATA_SOURCE_H__ - - -/* $Id$ - * - * PROJECT: System regression tool for ReactOS - * LICENSE: GPL - See COPYING in the top level directory - * FILE: tools/sysreg/conf_parser.h - * PURPOSE: data source abstraction - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) - */ - -#include -#include "user_types.h" - -namespace System_ -{ - - -class DataSource -{ -public: - - DataSource() - {} - - virtual ~DataSource() - {} - - virtual bool openSource(const string & opencmd) = 0; - - virtual bool closeSource() = 0; - - virtual bool readSource(std::vector & vect) = 0; - - virtual bool isSourceOpen() = 0; - -}; // end of class DataSource - - - -} // end of namespace System_ - - - - - - - -#endif /* end of DATA_SOURCE_H__ */ diff --git a/reactos/tools/sysreg/env_var.cpp b/reactos/tools/sysreg/env_var.cpp deleted file mode 100644 index a9958baae42..00000000000 --- a/reactos/tools/sysreg/env_var.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/* $Id$ - * - * PROJECT: System regression tool for ReactOS - * LICENSE: GPL - See COPYING in the top level directory - * FILE: tools/sysreg/conf_parser.h - * PURPOSE: environment variable lookup - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) - */ - - -#include "env_var.h" - -namespace System_ -{ - - EnvironmentVariable::EnvironmentMap EnvironmentVariable::m_Map; - -//--------------------------------------------------------------------------------------- - EnvironmentVariable::EnvironmentVariable() - { - - } - -//--------------------------------------------------------------------------------------- - EnvironmentVariable::~EnvironmentVariable() - { - m_Map.clear (); - } - -//--------------------------------------------------------------------------------------- - - bool EnvironmentVariable::getValue( string const &EnvName, string &EnvValue) - { - EnvironmentMap::const_iterator it = m_Map.find (EnvName); - if (it != m_Map.end()) - { - EnvValue = it->second; - return true; - } - - char * value = getenv(EnvName.c_str ()); - - if (!value) - { - cerr << "EnvironmentVariable::getValue found no value for " << EnvName << endl; - return false; - } - - if (!strlen(value)) - { - cerr << "EnvironmentVariable::getValue found no value for " << EnvName << endl; - return false; - } - - EnvValue = value; - m_Map[EnvName] = EnvValue; - return true; - } - - -} // end of namespace System_ diff --git a/reactos/tools/sysreg/env_var.h b/reactos/tools/sysreg/env_var.h deleted file mode 100644 index 2b82b194509..00000000000 --- a/reactos/tools/sysreg/env_var.h +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef ENV_VAR_H__ -#define ENV_VAR_H__ - -/* $Id$ - * - * PROJECT: System regression tool for ReactOS - * LICENSE: GPL - See COPYING in the top level directory - * FILE: tools/sysreg/conf_parser.h - * PURPOSE: environment variable lookup - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) - */ - -#include "user_types.h" -#include -#include -#include -#include - -namespace System_ -{ - using std::map; -//--------------------------------------------------------------------------------------- -/// -/// class EnvironmentVariable -/// -/// Description: this class performs looking up environment variable from the system -/// The result is also stored in its internal map to cache results - - class EnvironmentVariable - { - public: - typedef map EnvironmentMap; -//--------------------------------------------------------------------------------------- -/// -/// ~EnvironmentVariable -/// -/// Description: destructor of class EnvironmentVariable - - virtual ~EnvironmentVariable(); - -//--------------------------------------------------------------------------------------- -/// -/// getValue -/// -/// Description: this function returns the value of an associated environment variable. if -/// the variable is set it returns true and the value in the parameter EnvValue. On error -/// it returns false and the param EnvValue remains untouched -/// -/// @param EnvName name of environment variable to retrieve -/// @param EnvValue value of the environment variable -/// @return bool - - static bool getValue(const string & EnvName, string & EnvValue); - - - protected: - -//--------------------------------------------------------------------------------------- -/// -/// EnvironmentVariable -/// -/// Description: constructor of class EnvironmentVariable - - EnvironmentVariable(); - - static EnvironmentMap m_Map; - - }; // end of class EnvironmentVariable - -} // end of namespace System_ - -#endif /* end of ENV_VAR_H__ */ diff --git a/reactos/tools/sysreg/file_reader.cpp b/reactos/tools/sysreg/file_reader.cpp deleted file mode 100644 index 6997d6ac82d..00000000000 --- a/reactos/tools/sysreg/file_reader.cpp +++ /dev/null @@ -1,127 +0,0 @@ -/* $Id$ - * - * PROJECT: System regression tool for ReactOS - * LICENSE: GPL - See COPYING in the top level directory - * FILE: tools/sysreg/conf_parser.h - * PURPOSE: file reading support - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) - */ - -#include "file_reader.h" - -namespace System_ -{ -//--------------------------------------------------------------------------------------- - FileReader::FileReader() : DataSource(), m_File(NULL) - { - } -//--------------------------------------------------------------------------------------- - FileReader::~FileReader() - { - } -//--------------------------------------------------------------------------------------- - bool FileReader::openSource(const string & filename) - { - m_File = fopen((char*)filename.c_str(), (char*)"rb"); - - if (m_File) - { - return true; - } - else - { - return false; - } - } -//--------------------------------------------------------------------------------------- - bool FileReader::closeSource() - { - if (!m_File) - { - return false; - } - - if (!fclose(m_File)) - { - m_File = NULL; - return true; - } - - return false; - } -//--------------------------------------------------------------------------------------- - bool FileReader::readSource(vector & lines) - { - if (!m_File) - { - return false; - } - - bool ret = true; - size_t total_length = 0; - size_t line_count = lines.size(); - size_t num = 0; - char szBuffer[256]; - int readoffset = 0; - - if (m_BufferedLines.length()) - { - strcpy(szBuffer, m_BufferedLines.c_str()); - readoffset = m_BufferedLines.length(); - } - - do - { - if (total_length < num) - { - memmove(szBuffer, &szBuffer[total_length], num - total_length); - readoffset = num - total_length; - } - - num = fread(&szBuffer[readoffset], - sizeof(char), sizeof(szBuffer)/sizeof(char) - (readoffset+1) * sizeof(char), - m_File); - - szBuffer[num] = L'\0'; - - if (!num) - { - if (line_count == lines.size ()) - { - ret = false; - } - break; - } - char * ptr; - char * offset = szBuffer; - - total_length = 0; - while((ptr = strstr(offset, "\x0D\x0A")) != NULL) - { - long length = ((long )ptr - (long)offset); - length /= sizeof(char); - - offset[length] = '\0'; - - string line = offset; - lines.push_back (line); - - offset += length + 2; - total_length += length + 2; - - if (total_length == num) - { - break; - } - } - }while(num ); - - if (total_length < num) - { - m_BufferedLines = &szBuffer[total_length]; - } - - return ret; - } - -} // end of namespace System_ diff --git a/reactos/tools/sysreg/file_reader.h b/reactos/tools/sysreg/file_reader.h deleted file mode 100644 index aed6dbd3c5d..00000000000 --- a/reactos/tools/sysreg/file_reader.h +++ /dev/null @@ -1,93 +0,0 @@ -#ifndef FILE_READER_H__ -#define FILE_READER_H__ - -/* $Id$ - * - * PROJECT: System regression tool for ReactOS - * LICENSE: GPL - See COPYING in the top level directory - * FILE: tools/sysreg/conf_parser.h - * PURPOSE: pipe reader support - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) - */ - - -#include "user_types.h" -#include "data_source.h" -#include -#include -#include -#include - -namespace System_ -{ - using std::vector; -//--------------------------------------------------------------------------------------- -/// -/// class FileReader -/// -/// Description: this class implements reading from a file - - class FileReader : public DataSource - { - public: -//--------------------------------------------------------------------------------------- -/// -/// FileReader -/// -/// Description: constructor of class FileReader - - FileReader(); - -//--------------------------------------------------------------------------------------- -/// -/// ~FileReader -/// -/// Description: destructor of class FileReader - - virtual ~FileReader(); - -//--------------------------------------------------------------------------------------- -/// -/// openFile -/// -/// Description: attempts to open a file. Returns true on success -/// -/// @param filename name of the file to open -/// @return bool - - virtual bool openSource(const string & filename); -//--------------------------------------------------------------------------------------- -/// -/// closeFile -/// -/// Description: attempts to close a file. Returns true on success -/// -/// @return bool - - virtual bool closeSource(); - -//--------------------------------------------------------------------------------------- -/// -/// readFile -/// -/// Description: reads from file. The result is stored in a vector of strings -/// -/// Note: returns true on success -/// - - virtual bool readSource(vector & lines); - - - - protected: - FILE * m_File; - string m_BufferedLines; - - - }; // end of class FileReader - - -} // end of namespace System_ - - -#endif /* end of FILE_READER_H__ */ diff --git a/reactos/tools/sysreg/namedpipe_reader.cpp b/reactos/tools/sysreg/namedpipe_reader.cpp deleted file mode 100644 index 5175422617d..00000000000 --- a/reactos/tools/sysreg/namedpipe_reader.cpp +++ /dev/null @@ -1,330 +0,0 @@ -/* $Id: pipe_reader.cpp 24643 2006-10-24 11:45:21Z janderwald $ - * - * PROJECT: System regression tool for ReactOS - * LICENSE: GPL - See COPYING in the top level directory - * FILE: tools/sysreg/namedpipe_reader.cpp - * PURPOSE: pipe reader support - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) - * Christoph von Wittich (Christoph_vW@ReactOS.org) - */ - -#include "namedpipe_reader.h" - -namespace System_ -{ -#define MIN(a, b) (((a) < (b)) ? (a) : (b)) - -#ifndef WIN32 - const char * NamedPipeReader::s_LineBreak = "\x0A\0"; -#else - const char * NamedPipeReader::s_LineBreak = "\x0D\x0A\0"; -#endif - using std::vector; -//--------------------------------------------------------------------------------------- - NamedPipeReader::NamedPipeReader() : DataSource(), h_Pipe(NULLVAL), m_Buffer(0) - { - } - -//--------------------------------------------------------------------------------------- - NamedPipeReader::~NamedPipeReader() - { - if (m_Buffer) - free(m_Buffer); - } - - bool NamedPipeReader::isSourceOpen() - { - return true; - } - -//--------------------------------------------------------------------------------------- - - bool NamedPipeReader::openSource(const string & PipeCmd) - { - if (h_Pipe != NULLVAL) - { - cerr << "NamedPipeReader::openPipe> pipe already open" << endl; - return false; - } -#ifdef WIN32 - h_Pipe = CreateFile(PipeCmd.c_str(), - GENERIC_WRITE | GENERIC_READ, - 0, - NULL, - OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, - (HANDLE) - NULL); - - if(INVALID_HANDLE_VALUE == h_Pipe) { - cerr << "NamedPipeReader::openPipe> failed to open pipe " << PipeCmd << " Error:" << GetLastError() << endl; - h_Pipe = NULLVAL; - return false; - } - else - { - cout << "NamedPipeReader::openPipe> successfully opened pipe" << endl; - - if (!m_Buffer) - { - m_BufferLength = 100; - m_Buffer = (char*)malloc(sizeof(char) * m_BufferLength); - } - ConnectNamedPipe(h_Pipe, - 0); - return true; - } -#else - h_Pipe = open(PipeCmd.c_str(), O_RDONLY); - - if(INVALID_HANDLE_VALUE == h_Pipe) { - cerr << "NamedPipeReader::openPipe> failed to open pipe " << PipeCmd << endl; - h_Pipe = NULLVAL; - return false; - } - else - { - cout << "NamedPipeReader::openPipe> successfully opened pipe handle: "<< h_Pipe << endl << "Src: " << PipeCmd << endl; - if (!m_Buffer) - { - m_BufferLength = 100; - m_Buffer = (char*)malloc(sizeof(char) * m_BufferLength); - } - return true; - } -#endif - } - -//--------------------------------------------------------------------------------------- - - bool NamedPipeReader::closeSource() - { - cerr << "NamedPipeReader::closePipe> entered" << endl; - if (h_Pipe == NULLVAL) - { - cerr << "NamedPipeReader::closePipe> pipe is not open" << endl; - return false; - } -#ifndef WIN32 - close(h_Pipe); -#else - DisconnectNamedPipe(h_Pipe); - CloseHandle(h_Pipe); -#endif - h_Pipe = NULLVAL; - return true; - } -//--------------------------------------------------------------------------------------- - void NamedPipeReader::insertLine(std::vector & vect, string line, bool append_line) - { - if (append_line && vect.size ()) - { - string prev = vect[vect.size () - 1]; - prev += line; - vect[vect.size () - 1] = prev; - } - else - { - vect.push_back (line); - } - - } -//--------------------------------------------------------------------------------------- - void NamedPipeReader::extractLines(char * buffer, std::vector & vect, bool & append_line, unsigned long cbRead) - { -#if 0 - long offset = 0; - size_t start_size = vect.size (); - char * start = buffer; - buffer[cbRead] = '\0'; - char * end = strstr(buffer, s_LineBreak); - - //cout << "extractLines entered with append_line: " << append_line << " cbRead: " << cbRead << "buffer: " << buffer << endl; - - do - { - if (end) - { - end[0] = '\0'; - string line = start; - end += (sizeof(s_LineBreak) / sizeof(char)); - start = end; - offset += line.length() + (sizeof(s_LineBreak) / sizeof(char)); - - // cout << "Offset: "<< offset << "cbRead: " << cbRead << "line: " << line << endl; - insertLine(vect, line, append_line); - if (append_line) - { - append_line = false; - } - } - else - { - string line = start; -// cout << "inserting line start_size: " << start_size << "current: " << vect.size () << "line length: "<< line.length () << endl; - if (!line.length ()) - { - if (start_size == vect.size ()) - append_line = true; - break; - } - if (start_size == vect.size ()) - { - insertLine(vect, line, true); - } - else - { - insertLine(vect, line, false); - } - append_line = true; - break; - } - - end = strstr(end, s_LineBreak); - - }while(append_line); - -#else - DWORD buf_offset = 0; - char * offset = strchr(buffer, '\x0D'); - while(offset) - { - /// - /// HACKHACK - /// due to some mysterious reason, strchr / strstr sometimes returns - /// not always the offset to the CR character but to the next LF - /// in MSVC 2005 (Debug Modus) - - if (offset[0] == '\x0A') - { - if (buf_offset) - { - offset--; - } - else - { - //TODO - // implement me special case - } - } - - if (offset[0] == '\x0D') - { - buf_offset += 2; - offset[0] = '\0'; - offset +=2; - } - else - { - /// - /// BUG detected in parsing code - /// - abort(); - } - - string line = buffer; - if (append_line) - { - assert(vect.empty () == false); - string prev_line = vect[vect.size () -1]; - prev_line += line; - vect.pop_back (); - vect.push_back (prev_line); - append_line = false; - } - else - { - vect.push_back (line); - } - - buf_offset += line.length(); - if (buf_offset >= cbRead) - { - break; - } - buffer = offset; - - offset = strstr(buffer, "\n"); - } - if (buf_offset < cbRead) - { - buffer[cbRead - buf_offset] = '\0'; - string line = buffer; - if (append_line) - { - assert(vect.empty () == false); - string prev_line = vect[vect.size () -1]; - vect.pop_back (); - prev_line += line; - vect.push_back (prev_line); - } - else - { - vect.push_back (line); - append_line = true; - } - } - else - { - append_line = false; - } -#endif - } -//--------------------------------------------------------------------------------------- - bool NamedPipeReader::readPipe(char * buffer, int bufferlength, long & bytesread) - { - -#ifndef WIN32 - long cbRead = read(h_Pipe, - buffer, - (bufferlength-1) * sizeof(char)); -#else - DWORD cbRead = 0; - BOOL fSuccess = ReadFile(h_Pipe, - buffer, - (bufferlength-1) * sizeof(char), - &cbRead, - NULL); - - if (!fSuccess && GetLastError() != ERROR_MORE_DATA) - return false; -#endif - - bytesread = cbRead; - return true; - } -//--------------------------------------------------------------------------------------- - - bool NamedPipeReader::readSource(vector & vect) - { - size_t lines = vect.size (); - - if (h_Pipe == NULLVAL) - { - cerr << "Error: pipe is not open" << endl; - return false; - } - - if (!m_Buffer) - { - cerr << "Error: no memory" << endl; - return false; - } - - bool append_line = false; - do - { - memset(m_Buffer, 0x0, m_BufferLength * sizeof(char)); - long cbRead = 0; - - if (!readPipe(m_Buffer, m_BufferLength-1, cbRead)) - break; - - extractLines(m_Buffer, vect, append_line, cbRead); - }while (append_line); - - return (vect.size () - lines); -} - - -} // end of namespace System_ diff --git a/reactos/tools/sysreg/namedpipe_reader.h b/reactos/tools/sysreg/namedpipe_reader.h deleted file mode 100644 index fe1dcf4a721..00000000000 --- a/reactos/tools/sysreg/namedpipe_reader.h +++ /dev/null @@ -1,142 +0,0 @@ -#ifndef NAMEDPIPE_READER_H__ -#define NAMEDPIPE_READER_H__ - -/* $Id: namedpipe_reader.h 24643 2006-10-24 11:45:21Z janderwald $ - * - * PROJECT: System regression tool for ReactOS - * LICENSE: GPL - See COPYING in the top level directory - * FILE: tools/sysreg/namedpipe_reader.h - * PURPOSE: file reading support - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) - * Christoph von Wittich (Christoph@ApiViewer.de) - */ - - - -#include "user_types.h" -#include "data_source.h" -#include -#include -#include -#include -#include -#include - -#if defined(WIN32) -#include -#define NULLVAL NULL -#else -#include -#include -#define NULLVAL 0 -#define DWORD unsigned long -#define HANDLE long -#ifndef INVALID_HANDLE_VALUE -#define INVALID_HANDLE_VALUE -1 -#endif -#endif - -namespace System_ -{ -//--------------------------------------------------------------------------------------- -/// -/// class NamedPipeReader -/// -/// Description: this class implements a named pipe reader. - - class NamedPipeReader : public DataSource - { - public: - -//--------------------------------------------------------------------------------------- -/// -/// NamedPipeReader -/// -/// Description: constructor of class PipeReader - - NamedPipeReader(); - -//--------------------------------------------------------------------------------------- -/// -/// virtual ~NamedPipeReader -/// -/// Description: destructor of class PipeReader - - virtual ~NamedPipeReader(); - -//--------------------------------------------------------------------------------------- -/// -/// open -/// -/// Description: this function attempts to open a pipe. If an pipe is already open or -/// it fails to open a pipe, the function returns false -/// -/// @param PipeCmd command of the pipe to open -/// -/// @return bool - - virtual bool openSource(const string & PipeCmd); - -//--------------------------------------------------------------------------------------- -/// -/// close -/// -/// Description: closes a pipe. Returns true on success -/// -/// @return bool - - virtual bool closeSource(); - -//--------------------------------------------------------------------------------------- -/// -/// readPipe -/// -/// Description: attempts to read from the pipe. Returns true on success. If it returns -/// false, call PipeReader::isEoF() to determine if the pipe should be closed -/// -/// @param Buffer to be written to -/// @return size_t - - virtual bool readSource(std::vector & vect); - -//--------------------------------------------------------------------------------------- -/// -/// isEof -/// -/// Description: returns true if the pipe has reached end of file. The caller should call -/// closePipe if this function returns true - - virtual bool isSourceOpen(); - -protected: -//--------------------------------------------------------------------------------------- -/// -/// extractLines -/// -/// Description: this functions extract lines from a buffer and pushes them into the supplied vector -/// -/// @param buffer from which the lines are extracted from -/// @param vect vector storing the extracted lines -/// @param append_line if the line isnt fully read, the line is appended - - void extractLines(char * buffer, std::vector & vect, bool & append_line, unsigned long cbRead); - void insertLine(std::vector & vect, string line, bool append_line); - - bool readPipe(char * buffer, int bufferlength, long & read); - - - HANDLE h_Pipe; - char * m_Buffer; - int m_BufferLength; -#ifdef UNICODE - WCHAR * m_WBuffer; -#endif - - static const char * s_LineBreak; - }; // end of class NamedPipeReader - -} // end of namespace System_ - - - -#endif /* end of NAMEDPIPE_READER_H__ */ diff --git a/reactos/tools/sysreg/os_support.cpp b/reactos/tools/sysreg/os_support.cpp deleted file mode 100644 index f8b610bbbba..00000000000 --- a/reactos/tools/sysreg/os_support.cpp +++ /dev/null @@ -1,341 +0,0 @@ -/* $Id: os_support.h 24643 2006-10-24 11:45:21Z janderwald $ - * - * PROJECT: System regression tool for ReactOS - * LICENSE: GPL - See COPYING in the top level directory - * FILE: tools/sysreg/conf_parser.h - * PURPOSE: operating systems specific code - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) - */ - -#include "os_support.h" - -namespace System_ -{ - - OsSupport::TimeEntryVector OsSupport::s_Entries; - - //int gettimeofday(struct timeval *tv, void * tz); -//------------------------------------------------------------------------ - void OsSupport::checkAlarms() - { - struct timeval tm; - size_t i; -#if 0 -// gettimeofday(&tm, 0); -#else - memset(&tm, 0, sizeof(tm)); -#endif - for (i = 0; i < s_Entries.size(); i++) - { - long diffsec = s_Entries[i]->tm.tv_sec - tm.tv_sec; - if (diffsec < 0) - { - cout << "terminating process pid:" << s_Entries[i]->pid << endl; - terminateProcess(s_Entries[i]->pid, -2); - free(s_Entries[i]); - s_Entries.erase (s_Entries.begin () + i); - i = MAX(0, i-1); - } - } - -#ifndef WIN32 - if (s_Entries.size()) - { - long secs = s_Entries[i]->tm.tv_sec - tm.tv_sec; - alarm(secs); - } -#endif - } - bool OsSupport::hasAlarms () - { - return (s_Entries.size () != 0); - } -//------------------------------------------------------------------------ - void OsSupport::cancelAlarms() - { - -#ifdef WIN32 - if (s_hThread) - { - TerminateThread(s_hThread, 0); - s_hThread = 0; - } -#endif - - for(size_t i = 0; i < s_Entries.size(); i++) - { - free(s_Entries[i]); - } - - s_Entries.clear(); - - - } - - -#ifdef WIN32 - - HANDLE OsSupport::s_hThread = 0; - static HANDLE hTimer; -#if 0 -__inline int gettimeofday(struct timeval *tv, struct timezone *tz) -{ - FILETIME ft; - LARGE_INTEGER li; - __int64 t; - static int tzflag; - - if (tv) - { - GetSystemTimeAsFileTime(&ft); - li.LowPart = ft.dwLowDateTime; - li.HighPart = ft.dwHighDateTime; - t = li.QuadPart; /* In 100-nanosecond intervals */ - t -= EPOCHFILETIME; /* Offset to the Epoch time */ - t /= 10; /* In microseconds */ - tv->tv_sec = (long)(t / 1000000); - tv->tv_usec = (long)(t % 1000000); - } - - if (tz) - { - if (!tzflag) - { - _tzset(); - tzflag++; - } - tz->tz_minuteswest = _timezone / 60; - tz->tz_dsttime = _daylight; - } - - return 0; -} -#endif - bool OsSupport::terminateProcess(OsSupport::ProcessID pid, int exitcode) - { - HANDLE hProcess = OpenProcess(PROCESS_TERMINATE, FALSE, pid); - if (!hProcess) - { - return false; - } - - bool ret = TerminateProcess(hProcess, exitcode); - CloseHandle(hProcess); - return ret; - } - - OsSupport::ProcessID OsSupport::createProcess(const char *procname, int procargsnum, const char **procargs, bool wait) - { - STARTUPINFO siStartInfo; - PROCESS_INFORMATION piProcInfo; - OsSupport::ProcessID pid; - DWORD length = 0; - char * szBuffer; - char * cmd; - ZeroMemory(&siStartInfo, sizeof(STARTUPINFO)); - ZeroMemory(&piProcInfo, sizeof(PROCESS_INFORMATION)); - - siStartInfo.cb = sizeof(STARTUPINFO); - siStartInfo.wShowWindow = SW_SHOWNORMAL; - siStartInfo.dwFlags = STARTF_USESHOWWINDOW; - - if (procargsnum) - { - for (int i = 1; i < procargsnum; i++) - { - length += strlen(procargs[i]); - } - - length += procargsnum; - szBuffer = (char*)malloc(length * sizeof(char)); - length = 0; - for (int i = 1; i < procargsnum; i++) - { - strcpy(&szBuffer[length], procargs[i]); - length += strlen(procargs[i]); - if (i + 1 < procargsnum) - { - szBuffer[length] = ' '; - } - else - { - szBuffer[length] = '\0'; - } - length++; - } - length = strlen(procname) + strlen(szBuffer) + 2; - cmd = (char*)malloc(length * sizeof(char)); - strcpy(cmd, procname); - strcat(cmd, " "); - strcat(cmd, szBuffer); - free(szBuffer); - } - else - { - cmd = _strdup(procname); - - } - if (!CreateProcess(NULL, cmd, NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS, NULL, NULL, &siStartInfo, &piProcInfo)) - { - cerr << "Error: CreateProcess failed " << cmd << endl; - pid = 0; - } - else - { - pid = piProcInfo.dwProcessId; - if (wait) - { - WaitForSingleObject(piProcInfo.hThread, INFINITE); - } - CloseHandle(piProcInfo.hProcess); - CloseHandle(piProcInfo.hThread); - } - free(cmd); - return pid; - } - void OsSupport::delayExecution(long value) - { - Sleep(value * 1000); - } - - DWORD WINAPI AlarmThread(LPVOID param) - { - LARGE_INTEGER liDueTime; - - hTimer = CreateWaitableTimer(NULL, TRUE, "SysRegTimer"); - if (!hTimer) - { - return 0; - } - liDueTime.QuadPart = -100000000LL; - while(1) - { - SetWaitableTimer(hTimer, &liDueTime, 5000, NULL, NULL, FALSE); - WaitForSingleObject(hTimer, INFINITE); - OsSupport::checkAlarms (); - } - return 0; - } - - void OsSupport::setAlarm(long secs, OsSupport::ProcessID pid) - { - return; - PTIME_ENTRY entry = (PTIME_ENTRY) malloc(sizeof(TIME_ENTRY)); - if (entry) - { - cout << "secs: " << secs << endl; - struct timeval tm; -#if 0 - gettimeofday(&tm, 0); -#else -#endif - tm.tv_sec += secs; - - entry->tm = tm; - entry->pid = pid; - s_Entries.push_back(entry); - if (s_Entries.size () == 1) - { - s_hThread = CreateThread(NULL, 0, AlarmThread, 0, 0, NULL); - } - } - } - -#else -/********************************************************************************************************************/ - - - struct sigaction OsSupport::s_sact; - - - OsSupport::ProcessID OsSupport::createProcess(const char *procname, int procargsnum, const char **procargs, bool bWait) - { - ProcessID pid; - - if ((pid = fork()) < 0) - { - cerr << "OsSupport::createProcess> fork failed" << endl; - return 0; - } - if (pid == 0) - { - execv(procname, (char* const*)procargs); - return 0; - } - else - { - /* parent process */ - if (bWait) - { - waitpid(pid, NULL, 0); - } - } - return pid; - } - - bool OsSupport::terminateProcess(OsSupport::ProcessID pid, int exitcode) - { - kill(pid, SIGKILL); - return true; - } - - void OsSupport::delayExecution(long value) - { - sleep( value ); - } - - void handleSignal(int sig) - { - if (sig == SIGALRM) - { - OsSupport::checkAlarms(); - } - else if (sig == SIGCHLD) - { - if (OsSupport::hasAlarms()) - { - /// - /// FIXME - /// - /// there are expiriation alarms active and a child died unexpectly - /// lets commit suicide - exit(-2); - } - } - } - void OsSupport::setAlarm(long secs, OsSupport::ProcessID pid) - { - sigemptyset( &s_sact.sa_mask ); - s_sact.sa_flags = 0; - s_sact.sa_handler = handleSignal; - sigaction( SIGALRM, &s_sact, NULL ); - - PTIME_ENTRY entry = (PTIME_ENTRY) malloc(sizeof(TIME_ENTRY)); - if (entry) - { - struct timeval tm; - gettimeofday(&tm, 0); - tm.tv_sec += secs; - - entry->tm = tm; - entry->pid = pid; - for(size_t i = 0; i < s_Entries.size(); i++) - { - if (tm.tv_sec < s_Entries[i]->tm.tv_sec && tm.tv_usec < s_Entries[i]->tm.tv_usec) - { - if (i == 0) - { - /* adjust alarm timer to new period */ - alarm(secs); - } - s_Entries.insert(s_Entries.begin() + i, entry); - return; - } - } - s_Entries.push_back(entry); - alarm(secs); - } - } -#endif - -} // end of namespace System_ diff --git a/reactos/tools/sysreg/os_support.h b/reactos/tools/sysreg/os_support.h deleted file mode 100644 index 2d33a70e6da..00000000000 --- a/reactos/tools/sysreg/os_support.h +++ /dev/null @@ -1,160 +0,0 @@ -#ifndef OS_SUPPORT_H__ -#define OS_SUPPORT_H__ - -/* $Id: os_support.h 24643 2006-10-24 11:45:21Z janderwald $ - * - * PROJECT: System regression tool for ReactOS - * LICENSE: GPL - See COPYING in the top level directory - * FILE: tools/sysreg/conf_parser.h - * PURPOSE: operating systems specific code - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) - */ - -#ifdef WIN32 -#include -#else -#include -#include -#include -#include -#endif - -#include "user_types.h" -#include -#include -#include -#include - -#ifndef _MSC_VER -#include -#endif - -#define MAX(a, b) (((a) > (b)) ? (a) : (b)) - -namespace System_ -{ -//--------------------------------------------------------------------------------------- -/// -/// class OsSupport -/// -/// Description: this class encapsulates operating system specific functions -/// -/// - - class OsSupport - { - public: -#ifdef WIN32 - typedef DWORD ProcessID; -#else - typedef pid_t ProcessID; -#endif - -//--------------------------------------------------------------------------------------- -/// -/// OsSupport -/// -/// Description: constructor of class OsSupport - - virtual ~OsSupport() - {} - -//--------------------------------------------------------------------------------------- -/// -/// createProcess -/// -/// Description: this functions creates a new process and returns its pid on success -/// -/// @param procname name of the file to execute -/// @param procargsnum num of arguments for the new process -/// @param procargs arguments for the new process -/// -/// - - static ProcessID createProcess(const char * procname, int procargsnum, const char ** procargs, bool wait); - -//--------------------------------------------------------------------------------------- -/// -/// terminateProcess -/// -/// Description: this function terminates a process given by its pid -/// -/// Note: returns true if the process with the given pid was terminated -/// -/// @param pid process id of the process to terminate -/// @param exitcode for the killed process - - static bool terminateProcess(ProcessID pid, int exitcode); - - -//---------------------------------------------------------------------------------------- -/// -/// delayExecution -/// -/// Description: this function sleeps the current process for the amount given in seconds -/// -/// @param sec amount of seconds to sleep - - static void delayExecution(long sec); - -///--------------------------------------------------------------------------------------- -/// -/// initializeTimer -/// -/// Description: this function initializes an alarm. When the alarm expires, it will terminate -/// the given process - - static void setAlarm(long sec, OsSupport::ProcessID pid); - -///--------------------------------------------------------------------------------------- -/// -/// cancelAlarms -/// -/// Description: this function cancels all available timers - - static void cancelAlarms(); - -///--------------------------------------------------------------------------------------- -/// -/// checkAlarms -/// -/// Description: this function checks for expired alarams - - static void checkAlarms(); - -///--------------------------------------------------------------------------------------- -/// -/// hasAlarms -/// -/// Description: this function checks wether there are alarms set active - - static bool hasAlarms(); - - protected: -//--------------------------------------------------------------------------------------- -/// -/// OsSupport -/// -/// Description: constructor of class OsSupport - - OsSupport() - {} - -#ifndef WIN32 - static struct sigaction s_sact; -#else - static HANDLE s_hThread; -#endif - - typedef struct - { - struct timeval tm; - ProcessID pid; - }TIME_ENTRY, *PTIME_ENTRY; - typedef std::vector TimeEntryVector; - static TimeEntryVector s_Entries; - }; // end of class OsSupport - -} // end of namespace System_ - -#endif /* end of OS_SUPPORT_H__ */ diff --git a/reactos/tools/sysreg/pipe_reader.cpp b/reactos/tools/sysreg/pipe_reader.cpp deleted file mode 100644 index b3e97b35c28..00000000000 --- a/reactos/tools/sysreg/pipe_reader.cpp +++ /dev/null @@ -1,101 +0,0 @@ -/* $Id$ - * - * PROJECT: System regression tool for ReactOS - * LICENSE: GPL - See COPYING in the top level directory - * FILE: tools/sysreg/conf_parser.h - * PURPOSE: pipe reader support - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) - */ - -#include "pipe_reader.h" - -namespace System_ -{ - using std::vector; -//--------------------------------------------------------------------------------------- - PipeReader::PipeReader() : m_File(NULL) - { - - } - -//--------------------------------------------------------------------------------------- - PipeReader::~PipeReader() - { - - } - -//--------------------------------------------------------------------------------------- - - bool PipeReader::openSource(string const & PipeCmd) - { - if (m_File != NULL) - { - cerr << "PipeReader::openPipe> pipe already open" << endl; - return false; - } - - cerr << "cmd>" << PipeCmd << endl; - - m_File = popen(PipeCmd.c_str(), "r"); //AccessMode.c_str()); - if (m_File) - { - cerr << "PipeReader::openPipe> successfully opened pipe" << endl; - return true; - } - - cerr << "PipeReader::openPipe> failed to open pipe " << PipeCmd << endl; - return false; - } - -//--------------------------------------------------------------------------------------- - - bool PipeReader::closeSource() - { - if (!m_File) - { - cerr << "PipeReader::closePipe> pipe is not open" << endl; - return false; - } - - int res = pclose(m_File); - - if (res == INT_MAX) - { - cerr << "Error: _pclose failed " < & lines) - { - char * buf = (char*)malloc(100 * sizeof(char)); -//#ifdef NDEBUG - memset(buf, 0x0, sizeof(char) * 100); -//#endif - - char * res = fgets(buf, 100, m_File); - if (!res) - { - //cerr << "Error: PipeReader::readPipe failed" << endl; - free(buf); - return false; - } - fflush(m_File); - string line(buf); - lines.push_back(line); - return true; - } - -} // end of namespace System_ diff --git a/reactos/tools/sysreg/pipe_reader.h b/reactos/tools/sysreg/pipe_reader.h deleted file mode 100644 index 17eaaf269ae..00000000000 --- a/reactos/tools/sysreg/pipe_reader.h +++ /dev/null @@ -1,110 +0,0 @@ -#ifndef PIPE_READER_H__ -#define PIPE_READER_H__ - -/* $Id$ - * - * PROJECT: System regression tool for ReactOS - * LICENSE: GPL - See COPYING in the top level directory - * FILE: tools/sysreg/conf_parser.h - * PURPOSE: file reading support - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) - */ - - - -#include "user_types.h" -#include "data_source.h" -#include -#include -#include -#include -#include -#include - -namespace System_ -{ -//--------------------------------------------------------------------------------------- -/// -/// class PipeReader -/// -/// Description: this class implements a pipe reader. It uses _popen to perform opening of -/// pipe / _pclose - - class PipeReader : public DataSource - { - public: - -//--------------------------------------------------------------------------------------- -/// -/// PipeReader -/// -/// Description: constructor of class PipeReader - - PipeReader(); - -//--------------------------------------------------------------------------------------- -/// -/// virtual ~PipeReader -/// -/// Description: destructor of class PipeReader - - virtual ~PipeReader(); - -//--------------------------------------------------------------------------------------- -/// -/// openPipe -/// -/// Description: this function attempts to open a pipe. If an pipe is already open or -/// it fails to open a pipe, the function returns false -/// -/// @param PipeCmd command of the pipe to open -/// @param AccessMode on how to open the pipe -/// accepted modes are t ... text mode - not compatible with b -/// b ... binary mode - not compatible with t -/// r ... allows reading from the pipe -/// w ... allows writing to the pipe -/// @return bool - - virtual bool openSource(const string & PipeCmd); - -//--------------------------------------------------------------------------------------- -/// -/// closePipe -/// -/// Description: closes a pipe. Returns true on success -/// -/// @return bool - - virtual bool closeSource(); - -//--------------------------------------------------------------------------------------- -/// -/// readPipe -/// -/// Description: attempts to read from the pipe. Returns true on success. If it returns -/// false, call PipeReader::isEoF() to determine if the pipe should be closed -/// -/// @param Buffer to be written to -/// @return string::size_type - - bool readSource(std::vector & lines); - -//--------------------------------------------------------------------------------------- -/// -/// isEof -/// -/// Description: returns true if the pipe has reached end of file. The caller should call -/// closePipe if this function returns true - - virtual bool isSourceOpen(); - -protected: - FILE * m_File; - - }; // end of class PipeReader - -} // end of namespace System_ - - - -#endif /* end of PIPE_READER_H__ */ diff --git a/reactos/tools/sysreg/reg_test.h b/reactos/tools/sysreg/reg_test.h deleted file mode 100644 index ae492340cd8..00000000000 --- a/reactos/tools/sysreg/reg_test.h +++ /dev/null @@ -1,93 +0,0 @@ -#ifndef REG_TEST_H__ -#define REG_TEST_H__ - -/* $Id$ - * - * PROJECT: System regression tool for ReactOS - * LICENSE: GPL - See COPYING in the top level directory - * FILE: tools/sysreg/conf_parser.h - * PURPOSE: regression test abstract class - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) - */ - -#include "user_types.h" -#include "conf_parser.h" - -namespace Sysreg_ -{ - using Sysreg_::ConfigParser; -//------------------------------------------------------------------- -/// -/// class RegressionTest -/// -/// Description: The class RegressionTest is an abstract base class. Every -/// regression test class derives from this class. - - - class RegressionTest - { - public: - -//--------------------------------------------------------------------------------------- -/// -/// RegressionTest -/// -/// Description: constructor of class RegressionTest -/// -/// @param RegName name of derriving subclass - - RegressionTest(const string RegName) : m_Name(RegName) - {} - -//--------------------------------------------------------------------------------------- -/// -/// ~RegressionTest -/// -/// Description: destructor of class RegressionTest - - virtual ~RegressionTest() - {} - -//--------------------------------------------------------------------------------------- -/// -/// getName -/// -/// Description: returns the value of the member m_Name - - const string & getName() const - { return m_Name; } - -//--------------------------------------------------------------------------------------- -/// -/// execute -/// -/// Description: the execute function passes an System_::ConfigParser object to the -/// derriving RegresssionTest class. The class can then read required options from the -/// configuration file. The RegressionTest shall then perform its specific regression test. -/// @see System_::PipeReader -/// @see System_::SymbolFile -/// -/// Note : if an error happens or the option cannot be found, this function -/// should return false. - - virtual bool execute(ConfigParser & conf_parser) = 0; - -//--------------------------------------------------------------------------------------- -/// -/// checkForHang -/// -/// -/// - - - - - protected: - string m_Name; - - }; // end of class RegressionTest - - -} // end of namespace Sysreg_ - -#endif diff --git a/reactos/tools/sysreg/rosboot_test.cpp b/reactos/tools/sysreg/rosboot_test.cpp deleted file mode 100644 index da4ad9d6a1f..00000000000 --- a/reactos/tools/sysreg/rosboot_test.cpp +++ /dev/null @@ -1,1063 +0,0 @@ - -/* $Id$ - * - * PROJECT: System regression tool for ReactOS - * LICENSE: GPL - See COPYING in the top level directory - * FILE: tools/sysreg/conf_parser.h - * PURPOSE: ReactOS boot test - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) - */ - - -#include "rosboot_test.h" - -namespace Sysreg_ -{ - using std::vector; - using System_::PipeReader; - using System_::NamedPipeReader; -/* using System_::SymbolFile; */ - using System_::FileReader; - using System_::OsSupport; - using System_::EnvironmentVariable; - -#ifdef UNICODE - using std::wofstream; - typedef wofstream ofstream; -#else - using std::ofstream; -#endif - - string RosBootTest::ROS_EMU_TYPE= "ROS_EMU_TYPE"; - string RosBootTest::EMU_TYPE_QEMU = "qemu"; - string RosBootTest::EMU_TYPE_VMWARE = "vmware"; - string RosBootTest::EMU_TYPE_XEN = "xen"; - string RosBootTest::ROS_HDD_IMAGE= "ROS_HDD_IMAGE"; - string RosBootTest::ROS_CD_IMAGE = "ROS_CD_IMAGE"; - string RosBootTest::ROS_MAX_TIME = "ROS_MAX_TIME"; - string RosBootTest::ROS_LOG_FILE = "ROS_LOG_FILE"; - string RosBootTest::ROS_SYM_DIR = "ROS_SYM_DIR"; - string RosBootTest::ROS_DELAY_READ = "ROS_DELAY_READ"; - string RosBootTest::ROS_SYSREG_CHECKPOINT = "SYSREG_CHECKPOINT:"; - string RosBootTest::ROS_CRITICAL_IMAGE = "ROS_CRITICAL_IMAGE"; - string RosBootTest::ROS_EMU_KILL = "ROS_EMU_KILL"; - string RosBootTest::ROS_EMU_MEM = "ROS_EMU_MEM"; - string RosBootTest::ROS_BOOT_CMD = "ROS_BOOT_CMD"; - string RosBootTest::XEN_CONFIG_FILE = "XEN_CONFIG_FILE"; - string RosBootTest::XEN_CONFIG_NAME = "XEN_CONFIG_NAME"; - -#ifndef WIN32 - string RosBootTest::ROS_EMU_PATH = "ROS_EMU_PATH_LIN"; -#else - string RosBootTest::ROS_EMU_PATH = "ROS_EMU_PATH_WIN"; -#endif - -//--------------------------------------------------------------------------------------- - RosBootTest::RosBootTest() : m_MaxTime(65), m_DelayRead(0) - { - - } - -//--------------------------------------------------------------------------------------- - RosBootTest::~RosBootTest() - { - - } -//--------------------------------------------------------------------------------------- - bool RosBootTest::executeBootCmd() - { - int numargs = 0; - const char * args[128]; - char * pBuf; - char szBuffer[128]; - - pBuf = (char*)m_BootCmd.c_str (); - if (pBuf) - { - pBuf = strtok(pBuf, " "); - while(pBuf != NULL) - { - if (!numargs) - strcpy(szBuffer, pBuf); - - args[numargs] = pBuf; - numargs++; - pBuf = strtok(NULL, " "); - } - args[numargs++] = 0; - } - else - { - strcpy(szBuffer, pBuf); - } - m_Pid = OsSupport::createProcess (szBuffer, numargs-1, args, false); - if (!m_Pid) - { - cerr << "Error: failed to launch boot cmd " << m_BootCmd << endl; - return false; - } - - return true; - } -//--------------------------------------------------------------------------------------- - void RosBootTest::delayRead() - { - if (m_DelayRead) - { - /// - /// delay reading until emulator is ready - /// - - OsSupport::delayExecution(m_DelayRead); - } - } -//--------------------------------------------------------------------------------------- - void RosBootTest::getDefaultHDDImage(string & img) - { - img = "output-i386"; - - EnvironmentVariable::getValue("ROS_OUTPUT", img); -#ifndef WIN32 - img += "/ros.hd"; -#else - img += "\\ros.hd"; -#endif - } -//--------------------------------------------------------------------------------------- - bool RosBootTest::isFileExisting(string output) - { - FILE * file; - file = fopen(output.c_str(), "r"); - - if (file) - { - /* the file exists */ - fclose(file); - return true; - } - return false; - } - -//--------------------------------------------------------------------------------------- - bool RosBootTest::isDefaultHDDImageExisting() - { - string img; - - getDefaultHDDImage(img); - return isFileExisting(img); - } - -//--------------------------------------------------------------------------------------- - bool RosBootTest::createHDDImage(string image) - { - - string qemuimgdir; - if (!getQemuDir(qemuimgdir)) - { - cerr << "Error: failed to retrieve qemu directory path" << endl; - return false; - } - - -#ifndef WIN32 - qemuimgdir += "/qemu-img"; - -#else - qemuimgdir += "\\qemu-img.exe"; -#endif - - if (!isFileExisting(qemuimgdir)) - { - cerr << "Error: ROS_EMU_PATH must contain the path to qemu and qemu-img " << qemuimgdir << endl; - return false; - } - remove(image.c_str ()); - - const char * options[] = {NULL, - "create", - "-f", -#ifndef WIN32 - "raw", -#else - "vmdk", -#endif - NULL, - "100M", - NULL - }; - - - options[0] = qemuimgdir.c_str(); - options[4] = image.c_str(); - - cerr << "Creating HDD Image ..." << image << endl; - OsSupport::createProcess (qemuimgdir.c_str(), 6, options, true); - if (isFileExisting(image)) - { - m_HDDImage = image; - return true; - } - return false; - } -//---------------------------------------------------------------------------------------- - bool RosBootTest::isQemuPathValid() - { - string qemupath; - - if (m_BootCmd.length()) - { - /* the boot cmd is already provided - * check if path to qemu is valid - */ - string::size_type pos = m_BootCmd.find_first_of(" "); - if (pos == string::npos) - { - /* the bootcmd is certainly not valid */ - return false; - } - qemupath = m_BootCmd.substr(0, pos); - } - else - { - /* the qemu path is provided ROS_EMU_PATH variable */ - qemupath = m_EmuPath; - } - - - return isFileExisting(qemupath); - } -//---------------------------------------------------------------------------------------- - bool RosBootTest::hasQemuNoRebootOption() - { - /// - /// FIXME - /// extract version - /// - - return true; - } -//---------------------------------------------------------------------------------------- - bool RosBootTest::getQemuDir(string & qemupath) - { - string::size_type pos; - -#ifndef WIN32 - pos = m_EmuPath.find_last_of("/"); -#else - pos = m_EmuPath.find_last_of("\\"); -#endif - if (pos == string::npos) - { - cerr << "Error: ROS_EMU_PATH is invalid!!!" << endl; - return false; - } - qemupath = m_EmuPath.substr(0, pos); - return true; - } -//---------------------------------------------------------------------------------------- - bool RosBootTest::createBootCmd() - { - string pipe; - string qemudir; - char pipename[] = "qemuXXXXXX"; - if (m_MaxMem.length() == 0) - { - /* set default memory size to 64M */ - m_MaxMem = "64"; - } - -#ifndef WIN32 - - if (mktemp(pipename)) - { - string temp = pipename; - m_Src = "/tmp/" + temp; - pipe = "pipe:" + m_Src; - } - else - { - - pipe = "pipe:/tmp/qemu"; - m_Src = "/tmp/qemu"; - } - - qemudir = "/usr/share/qemu"; - m_DebugPort = "pipe"; -#else - if (_mktemp(pipename)) - { - string temp = pipename; - pipe = "pipe:" + temp; - m_Src = "\\\\.\\pipe\\" + temp; - } - else - { - pipe = "pipe:qemu"; - m_Src = "\\\\.\\pipe\\qemu"; - } - m_DebugPort = "pipe"; - - if (!getQemuDir(qemudir)) - { - return false; - } -#endif - - - m_BootCmd = m_EmuPath + " -L " + qemudir + " -m " + m_MaxMem + " -serial " + pipe; - - if (m_CDImage.length()) - { - /* boot from cdrom */ - m_BootCmd += " -boot d -cdrom " + m_CDImage; - - if (m_HDDImage.length ()) - { - /* add disk when specified */ - m_BootCmd += " -hda " + m_HDDImage; - } - - } - else if (m_HDDImage.length ()) - { - /* boot from hdd */ - m_BootCmd += " -boot c -hda " + m_HDDImage; - } - else - { - /* - * no boot device provided - */ - cerr << "Error: no bootdevice provided" << endl; - return false; - } - -#ifndef WIN32 - /* on linux we need get pid in order to be able - * to terminate the emulator in case of errors - * on windows we can get pid as return of CreateProcess - */ - m_PidFile = "output-i386"; - EnvironmentVariable::getValue("ROS_OUTPUT", m_PidFile); - m_PidFile += "/pid.txt"; - m_BootCmd += " -pidfile "; - m_BootCmd += m_PidFile; - m_BootCmd += " -nographic"; -#else - - if (hasQemuNoRebootOption()) - { - m_BootCmd += " -no-reboot "; - } -#endif - return true; - } -//---------------------------------------------------------------------------------------- - bool RosBootTest::extractPipeFromBootCmd() - { - string::size_type pos = m_BootCmd.find("-serial pipe:"); - if (pos == string::npos) - { - /* no debug options provided */ - cerr << "Error: provided boot cmd does not specify a pipe debugging port" << endl; - return false; - } - - string pipe = m_BootCmd.substr(pos + 13, m_BootCmd.size() - pos - 13); - pos = pipe.find(" "); - if (pos != string::npos) - { - pipe = pipe.substr(0, pos); - } -#ifndef WIN32 - m_Src = pipe; -#else - m_Src = "\\\\.\\pipe\\" + pipe.substr(0, pos); -#endif - m_DebugPort = "pipe"; - return true; - } -//---------------------------------------------------------------------------------------- - bool RosBootTest::configureHDDImage() - { - //cout << "configureHDDImage m_HDDImage " << m_HDDImage.length() << " m_CDImage " << m_CDImage.length() << " m_BootCmd: " << m_BootCmd.length() << endl; - if (m_HDDImage.length()) - { - /* check if ROS_HDD_IMAGE points to hdd image */ - if (!isFileExisting(m_HDDImage)) - { - if (!m_CDImage.length ()) - { - cerr << "Error: HDD image is not existing and CDROM image not provided" << endl; - return false; - } - /* create it */ - return createHDDImage(m_HDDImage); - } - return true; - } - else if (!m_BootCmd.length ()) - { - /* no hdd image provided - * but also no override by - * ROS_BOOT_CMD - */ - if (!m_CDImage.length ()) - { - cerr << "Error: no HDD and CDROM image provided" << endl; - return false; - } - - getDefaultHDDImage(m_HDDImage); - if (isFileExisting(m_HDDImage)) - { - cerr << "Falling back to default hdd image " << m_HDDImage << endl; - return true; - } - return createHDDImage(m_HDDImage); - } - /* - * verify the provided ROS_BOOT_CMD for hdd image - * - */ - - bool hdaboot = false; - string::size_type pos = m_BootCmd.find ("-boot c"); - if (pos != string::npos) - { - hdaboot = true; - } - - pos = m_BootCmd.find("-hda "); - if (pos != string::npos) - { - string hdd = m_BootCmd.substr(pos + 5, m_BootCmd.length() - pos - 5); - if (!hdd.length ()) - { - cerr << "Error: ROS_BOOT_CMD misses value of -hda option" << endl; - return false; - } - pos = m_BootCmd.find(" "); - if (pos != string::npos) - { - /// FIXME - /// sysreg assumes that the hdd image filename has no spaces - /// - hdd = hdd.substr(0, pos); - } - if (!isFileExisting(hdd)) - { - if (hdaboot) - { - cerr << "Error: ROS_BOOT_CMD specifies booting from hda but no valid hdd image " << hdd << " provided" << endl; - return false; - } - - /* the file does not exist create it */ - return createHDDImage(hdd); - } - return true; - } - - return false; - } -//---------------------------------------------------------------------------------------- - bool RosBootTest::configureCDImage() - { - if (!m_BootCmd.length ()) - { - if (m_CDImage.length()) - { - /* we have a cd image lets check if its valid */ - if (isFileExisting(m_CDImage)) - { - cerr << "Using CDROM image " << m_CDImage << endl; - return true; - } - } - if (isFileExisting("ReactOS-RegTest.iso")) - { - m_CDImage = "ReactOS-RegTest.iso"; - cerr << "Falling back to default CDROM image " << m_CDImage << endl; - return true; - } - cerr << "No CDROM image found, boot device is HDD" << endl; - m_CDImage = ""; - return true; - } - - string::size_type pos = m_BootCmd.find("-boot "); - if (pos == string::npos) - { - /* ROS_BOOT_CMD must provide a boot parameter*/ - cerr << "Error: ROS_BOOT_CMD misses boot parameter" << endl; - return false; - } - - string rest = m_BootCmd.substr(pos + 6, m_BootCmd.length() - pos - 6); - if (rest.length() < 1) - { - /* boot parameter misses option where to boot from */ - cerr << "Error: ROS_BOOT_CMD misses boot parameter" << endl; - return false; - } - if (rest[0] != 'c' && rest[0] != 'd') - { - cerr << "Error: ROS_BOOT_CMD has invalid boot parameter" << endl; - return false; - } - - if (rest[0] == 'c') - { - /* ROS_BOOT_CMD boots from hdd */ - return true; - } - - pos = m_BootCmd.find("-cdrom "); - if (pos == string::npos) - { - cerr << "Error: ROS_BOOT_CMD misses cdrom parameter" << endl; - return false; - } - rest = m_BootCmd.substr(pos + 7, m_BootCmd.length() - pos - 7); - if (!rest.length()) - { - cerr << "Error: ROS_BOOT_CMD misses cdrom parameter" << endl; - return false; - } - pos = rest.find(" "); - if (pos != string::npos) - { - rest = rest.substr(0, pos); - } - - if (!isFileExisting(rest)) - { - cerr << "Error: cdrom image " << rest << " does not exist" << endl; - return false; - } - else - { - m_CDImage = rest; - return true; - } - } -//---------------------------------------------------------------------------------------- - bool RosBootTest::configureQemu() - { - if (!isQemuPathValid()) - { - cerr << "Error: the path to qemu is not valid" << endl; - return false; - } - - if (!configureCDImage()) - { - cerr << "Error: failed to set a valid cdrom configuration" << endl; - return false; - } - - if (!configureHDDImage()) - { - cerr << "Error: failed to set a valid hdd configuration" << endl; - return false; - } - - if (m_BootCmd.length()) - { - if (!extractPipeFromBootCmd()) - { - return false; - } - } - else - { - if (!createBootCmd()) - { - return false; - } - } -#ifndef WIN32 - if (mkfifo(m_Src.c_str(), 400)) - { -/* - if (errno != EEXIST) - { - cerr <<"Error: mkfifo failed with " << errno << endl; - } -*/ - return false; - } - -#endif - if (m_PidFile.length () && isFileExisting(m_PidFile)) - { - cerr << "Deleting pid file " << m_PidFile << endl; - remove(m_PidFile.c_str ()); - } - - cerr << "Opening Data Source:" << m_BootCmd << endl; - m_DataSource = new NamedPipeReader(); - if (!executeBootCmd()) - { - - cerr << "Error: failed to launch emulator with: " << m_BootCmd << endl; - return false; - } - - return true; - } - -//--------------------------------------------------------------------------------------- - bool RosBootTest::xenGetCaps() - { - FILE *fp; - int ch, i; - char buffer[2048]; - - fp = popen("xm info", "r"); - if (!fp) - { - cerr << "Error getting Xen caps." << endl; - return false; - } - for (i=0;(i<2049)&&(feof(fp) == 0 && ((ch = fgetc(fp)) != -1)); i++) - { - buffer[i] = (char) ch; - } - buffer[i] = '\0'; - pclose(fp); - - if (strstr(buffer, "hvm") == 0) - { - cerr << "No hvm support detected!" << endl; - return false; - } - else - { - return true; - } - - } - -//--------------------------------------------------------------------------------------- - bool RosBootTest::configureXen(ConfigParser &conf_parser) - { - if (!xenGetCaps()) - { - return false; - } - - if (!isFileExisting(m_XenConfig)) - { - cerr << "Xen configuration file missing" << endl; - return false; - } - m_Src = "xm console "; - string xen_name = "reactos"; - conf_parser.getStringValue(RosBootTest::XEN_CONFIG_NAME, xen_name); - m_Src += xen_name; - - m_DataSource = new PipeReader(); - m_BootCmd = m_EmuPath + "/xm create " + m_XenConfig; - if (!executeBootCmd()) - return false; - - return true; - } -//--------------------------------------------------------------------------------------- - bool RosBootTest::configureVmWare() - { - cerr << "VmWare is currently not yet supported" << endl; - return false; - } -//--------------------------------------------------------------------------------------- - bool RosBootTest::readConfigurationValues(ConfigParser &conf_parser) - { - - if (!conf_parser.getStringValue(RosBootTest::ROS_EMU_TYPE, m_EmuType)) - { - cerr << "Error: ROS_EMU_TYPE is not set" << endl; - return false; - } - - if (m_EmuType == EMU_TYPE_XEN) - { - if (!conf_parser.getStringValue(RosBootTest::XEN_CONFIG_FILE, m_XenConfig)) - { - cerr << "Error: XEN_CONFIG_FILE is not set" << endl; - return false; - } - } - if (!conf_parser.getStringValue(RosBootTest::ROS_EMU_PATH, m_EmuPath)) - { - cerr << "Error: ROS_EMU_PATH_[LIN/WIN] is not set" << endl; - return false; - } - if (!m_HDDImage.length()) - { - /* only read image once */ - conf_parser.getStringValue (RosBootTest::ROS_HDD_IMAGE, m_HDDImage); - } - if (!m_CDImage.length()) - { - /* only read cdimage once */ - conf_parser.getStringValue (RosBootTest::ROS_CD_IMAGE, m_CDImage); - } - /* reset boot cmd */ - m_BootCmd = ""; - - - conf_parser.getIntValue (RosBootTest::ROS_MAX_TIME, m_MaxTime); - conf_parser.getStringValue (RosBootTest::ROS_LOG_FILE, m_DebugFile); - conf_parser.getStringValue (RosBootTest::ROS_SYM_DIR, m_SymDir); - conf_parser.getIntValue (RosBootTest::ROS_DELAY_READ, m_DelayRead); - conf_parser.getStringValue (RosBootTest::ROS_SYSREG_CHECKPOINT, m_Checkpoint); - conf_parser.getStringValue (RosBootTest::ROS_CRITICAL_IMAGE, m_CriticalImage); - conf_parser.getStringValue (RosBootTest::ROS_EMU_KILL, m_KillEmulator); - conf_parser.getStringValue (RosBootTest::ROS_EMU_MEM, m_MaxMem); - conf_parser.getStringValue (RosBootTest::ROS_BOOT_CMD, m_BootCmd); - - return true; - } -//--------------------------------------------------------------------------------------- - void RosBootTest::cleanup(ConfigParser &conf_parser) - { - m_DataSource->closeSource(); - OsSupport::delayExecution(3); - - if (m_EmuType == EMU_TYPE_XEN) - { - string xen_name = "reactos"; - conf_parser.getStringValue(RosBootTest::XEN_CONFIG_NAME, xen_name); - string cmd = "xm destroy " + xen_name; - system(cmd.c_str ()); - } - else - { - if (m_Pid) - { - OsSupport::terminateProcess (m_Pid, 0); - } - } - delete m_DataSource; - m_DataSource = NULL; - - if (m_PidFile.length ()) - { - remove(m_PidFile.c_str ()); - } - } - -//--------------------------------------------------------------------------------------- - bool RosBootTest::execute(ConfigParser &conf_parser) - { - if (!readConfigurationValues(conf_parser)) - { - return false; - } - - if (m_EmuType == EMU_TYPE_QEMU) - { - if (!configureQemu()) - { - cerr << "Error: failed to configure qemu" << endl; - return false; - } - } - else if (m_EmuType == EMU_TYPE_VMWARE) - { - if (!configureVmWare()) - { - cerr << "Error: failed to configure vmware" << endl; - return false; - } - } - else if (m_EmuType == EMU_TYPE_XEN) - { - if (!configureXen(conf_parser)) - { - cerr << "Error: failed to configure xen" << endl; - return false; - } - } - else - { - /// - /// unsupported emulator - - cerr << "Error: ROS_EMU_TYPE value is not supported:" << m_EmuType << "=" << EMU_TYPE_QEMU << endl; - return false; - } - - if (m_DelayRead) - { - cerr << "Delaying read for " << m_DelayRead << " seconds" << endl; - OsSupport::delayExecution(m_DelayRead); - } - - if (!m_DataSource->openSource(m_Src)) - { - cerr << "Error: failed to open data source with " << m_Src << endl; - cleanup(conf_parser); - return false; - } -#ifndef WIN32 - /* - * For linux systems we can only - * check if the emulator runs by - * opening pid.txt and lookthrough if - * it exists - */ - - if (m_EmuType != EMU_TYPE_XEN) - { - FILE * file = fopen(m_PidFile.c_str(), "r"); - if (!file) - { - cerr << "Error: failed to launch emulator" << endl; - cleanup(conf_parser); - return false; - } - char buffer[128]; - if (!fread(buffer, 1, sizeof(buffer), file)) - { - cerr << "Error: pid file w/o pid!!! " << endl; - fclose(file); - cleanup(conf_parser); - return false; - } - m_Pid = atoi(buffer); - fclose(file); - } -#endif - OsSupport::cancelAlarms(); -#ifndef WIN32 - // OsSupport::setAlarm (m_MaxTime, m_Pid); - // OsSupport::setAlarm(m_MaxTime, getpid()); -#else - OsSupport::setAlarm (m_MaxTime, m_Pid); - OsSupport::setAlarm(m_MaxTime, GetCurrentProcessId()); -#endif - - bool ret = analyzeDebugData(); - cleanup(conf_parser); - - return ret; -} -//--------------------------------------------------------------------------------------- - void RosBootTest::dumpCheckpoints() - { - if (m_Checkpoints.size ()) - { - cerr << "Dumping list of checkpoints: "<< endl; - while(!m_Checkpoints.empty ()) - { - cerr << m_Checkpoints[0] << endl; - m_Checkpoints.erase (m_Checkpoints.begin ()); - } - } - } -//--------------------------------------------------------------------------------------- - RosBootTest::DebugState RosBootTest::checkDebugData(vector & debug_data) - { - /// TBD the information needs to be written into an provided log object - /// which writes the info into HTML/log / sends etc .... - - bool clear = true; - DebugState state = DebugStateContinue; - - for(size_t i = 0; i < debug_data.size();i++) - { - string line = debug_data[i]; - - cout << line << endl; - - if (line.find (RosBootTest::ROS_SYSREG_CHECKPOINT) != string::npos) - { - line.erase (0, line.find (RosBootTest::ROS_SYSREG_CHECKPOINT) + - RosBootTest::ROS_SYSREG_CHECKPOINT.length ()); - if (!strncmp(line.c_str (), m_Checkpoint.c_str (), m_Checkpoint.length ())) - { - state = DebugStateCPReached; - break; - } - m_Checkpoints.push_back (line); - } - - - if (line.find ("*** Fatal System Error") != string::npos) - { - cerr << "Blue Screen of Death detected" <= debug_data.size ()) - { - /// - /// missing information is cut off -> try reconstruct at next call - /// - clear = false; - break; - } - - /// - /// extract address from next line - /// - - string address = debug_data[i+2]; - string::size_type pos = address.find_last_of (" "); - if (pos == string::npos) - { - cerr << "Error: trace is not available (corrupted debug info" << endl; - continue; - } - - - address = address.substr (pos, address.length () - 1 - pos); - - /// - /// extract module name - /// - string modulename = debug_data[i+3]; - - pos = modulename.find_last_of ("\\"); - if (pos == string::npos) - { - cerr << "Error: trace is not available (corrupted debug info" << endl; - continue; - } - - string appname = modulename.substr (pos + 1, modulename.length () - pos); - if (m_CriticalImage.find (appname) == string::npos && m_CriticalImage.length () > 1) - { - /// the application is not in the list of - /// critical apps. Therefore we ignore the user-mode - /// exception - - continue; - } - - pos = appname.find_last_of ("."); - if (pos == string::npos) - { - cerr << "Error: trace is not available (corrupted debug info" << endl; - continue; - } - - modulename = appname.substr (0, pos); - - cerr << "UM detected" < 5) - { - debug_data.clear (); - } - return state; - } -//--------------------------------------------------------------------------------------- - bool RosBootTest::analyzeDebugData() - { - vector vect; - size_t lines = 0; - bool write_log; - ofstream file; - bool ret = true; - - if (m_DebugFile.length ()) - { - remove(m_DebugFile.c_str ()); - file.open (m_DebugFile.c_str ()); - } - - write_log = file.is_open (); - while(1) - { - size_t prev_count = vect.size (); - if (!m_DataSource->readSource (vect)) - { - continue; - } - if (write_log) - { - for (size_t i = prev_count; i < vect.size (); i++) - { - string & line = vect[i]; - file << line; - } - } - - DebugState state = checkDebugData(vect); - if (state == DebugStateBSODDetected || state == DebugStateUMEDetected) - { - ret = false; - break; - } - else if (state == DebugStateCPReached) - { - break; - } - lines += (vect.size() -prev_count); //WTF? - } - if (write_log) - { - file.close(); - } - - return ret; - } -} // end of namespace Sysreg_ diff --git a/reactos/tools/sysreg/rosboot_test.h b/reactos/tools/sysreg/rosboot_test.h deleted file mode 100644 index bc2345fd76e..00000000000 --- a/reactos/tools/sysreg/rosboot_test.h +++ /dev/null @@ -1,194 +0,0 @@ -#ifndef ROSBOOT_TEST_H__ -#define ROSBOOT_TEST_H__ - -/* $Id$ - * - * PROJECT: System regression tool for ReactOS - * LICENSE: GPL - See COPYING in the top level directory - * FILE: tools/sysreg/conf_parser.h - * PURPOSE: ReactOS boot test - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) - */ -#include "data_source.h" -#include "conf_parser.h" -#include "os_support.h" -#include "user_types.h" -#include "pipe_reader.h" -#include "namedpipe_reader.h" -#include "file_reader.h" -#include "os_support.h" -#include "env_var.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef WIN32 -#include -#include -#endif - -#ifndef WIN32 -#include -#include -#if defined(__FreeBSD__) || defined(__APPLE__) -# include -#endif // __FreeBSD__ -#endif - -namespace Sysreg_ -{ - using std::vector; - using System_::DataSource; - using System_::OsSupport; - - -//--------------------------------------------------------------------------------------- -/// -/// class RosBootTest -/// -/// Description: this class attempts to boot ReactOS in an emulator with console logging enabled. -/// It - - class RosBootTest - { - public: - - static string ROS_EMU_TYPE; - static string EMU_TYPE_QEMU; - static string EMU_TYPE_VMWARE; - static string EMU_TYPE_XEN; - static string ROS_EMU_PATH; - static string ROS_HDD_IMAGE; - static string ROS_CD_IMAGE; - static string ROS_MAX_TIME; - static string ROS_LOG_FILE; - static string ROS_SYM_DIR; - static string ROS_DELAY_READ; - static string ROS_SYSREG_CHECKPOINT; - static string ROS_CRITICAL_IMAGE; - static string ROS_EMU_KILL; - static string ROS_EMU_MEM; - static string ROS_BOOT_CMD; - static string XEN_CONFIG_FILE; - static string XEN_CONFIG_NAME; - -//--------------------------------------------------------------------------------------- -/// -/// RosBootTest -/// -/// Description: constructor of class RosBootTest -/// - - RosBootTest(); - -//--------------------------------------------------------------------------------------- -/// -/// ~RosBootTest -/// -/// Description: destructor of class RosBootTest -/// - - virtual ~RosBootTest(); - -//--------------------------------------------------------------------------------------- -/// -/// execute -/// -/// Description: this function performs a ReactOS boot test. It reads the variable -/// ROSBOOT_CMD and executes this specific command. This command shall contain the path -/// to an emulator (i.e. qemu) and the required arguments (-serial switch, hdd img etc) to be able -/// to read from console. If an error is detected, it attempts to resolve the faulting -/// module and address. - - virtual bool execute(ConfigParser & conf_parser); - - protected: - - void getDefaultHDDImage(string & img); - bool isFileExisting(string filename); - bool isDefaultHDDImageExisting(); - bool createHDDImage(string filename); - bool isQemuPathValid(); - bool getQemuDir(string &); - bool createBootCmd(); - bool extractPipeFromBootCmd(); - bool configureCDImage(); - bool configureHDDImage(); - void getPidFromFile(); - bool executeBootCmd(); - void delayRead(); - bool configurePipe(); - bool configureFile(); - bool analyzeDebugData(); - bool readConfigurationValues(ConfigParser & conf_parser); - bool configureQemu(); - bool configureVmWare(); - bool configureXen(ConfigParser &conf_parser); - bool hasQemuNoRebootOption(); - void cleanup(ConfigParser &conf_parser); - bool xenGetCaps(); -//--------------------------------------------------------------------------------------- -/// -/// dumpCheckpoints -/// -/// Description: prints a list of all reached checkpoints so far - - void dumpCheckpoints(); - -enum DebugState -{ - DebugStateContinue = 1, /* continue debugging */ - DebugStateBSODDetected, /* bsod detected */ - DebugStateUMEDetected, /* user-mode exception detected */ - DebugStateCPReached /* check-point reached */ -}; - -//--------------------------------------------------------------------------------------- -/// -/// checkDebugData -/// -/// Description: this function parses the given debug data for BSOD, UM exception etc -/// If it detects an fatal error, it should return false -/// -/// Note: the received debug information should be written to an internal log object -/// to facilate post-processing of the results - - DebugState checkDebugData(vector & debug_data); - -protected: - - string m_EmuType; - string m_EmuPath; - string m_HDDImage; - string m_CDImage; - long int m_MaxTime; - string m_DebugFile; - string m_SymDir; - long int m_DelayRead; - string m_Checkpoint; - string m_CriticalImage; - string m_KillEmulator; - string m_MaxMem; - string m_BootCmd; - string m_Src; - string m_DebugPort; - string m_PidFile; - string m_XenConfig; - - DataSource * m_DataSource; - OsSupport::ProcessID m_Pid; - std::vector m_Checkpoints; - - }; // end of class RosBootTest - -} // end of namespace Sysreg_ - -#endif /* end of ROSBOOT_H__ */ diff --git a/reactos/tools/sysreg/sym_file.cpp b/reactos/tools/sysreg/sym_file.cpp deleted file mode 100644 index 29bcfb76257..00000000000 --- a/reactos/tools/sysreg/sym_file.cpp +++ /dev/null @@ -1,191 +0,0 @@ - -/* $Id$ - * - * PROJECT: System regression tool for ReactOS - * LICENSE: GPL - See COPYING in the top level directory - * FILE: tools/sysreg/conf_parser.h - * PURPOSE: source symbol lookup - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) - */ - - -#include "sym_file.h" -#include "env_var.h" -#include "pipe_reader.h" -#include "conf_parser.h" - -#include -#include -#include -#include -#define _FINDDATA_T_DEFINED -#include -#include - - -namespace System_ -{ - - using std::vector; - string SymbolFile::VAR_ROS_OUTPUT = "ROS_OUTPUT"; - string SymbolFile::ROS_ADDR2LINE = "ROS_ADDR2LINE"; - string SymbolFile::m_SymbolPath= ""; - string SymbolFile::m_SymResolver= ""; - SymbolFile::SymbolMap SymbolFile::m_Map; - -//--------------------------------------------------------------------------------------- - SymbolFile::SymbolFile() - { - - } - -//--------------------------------------------------------------------------------------- - SymbolFile::~SymbolFile() - { - - } - -//--------------------------------------------------------------------------------------- - bool SymbolFile::initialize(ConfigParser & conf_parser, string const &Path) - { - vector vect; - string current_dir; - - if (Path == "") - { - current_dir = "output-i386"; - EnvironmentVariable::getValue(SymbolFile::VAR_ROS_OUTPUT, current_dir); - } - else - { - current_dir = Path; - } - - m_SymbolPath = current_dir; - - if (!conf_parser.getStringValue (ROS_ADDR2LINE, m_SymResolver)) - { - cerr << "Warning: ROS_ADDR2LINE is not set in configuration file -> symbol lookup will fail" < failed" <(modulename, path)); - - } - if (c_file.attrib & _A_SUBDIR) - { - if (c_file.name[0] != _T('.')) - { - string path = current_dir; - path.insert (path.length ()-1, "\\"); - path.insert (path.length ()-1, c_file.name); - vect.push_back (path); - } - } - - }while(_tfindnexti64(hFile, &c_file) == 0); - - _findclose(hFile); - hFile = -1L; - - while(!vect.empty ()) - { - current_dir = vect.front (); - vect.erase (vect.begin()); - val = current_dir; - val.insert (val.length() -1, "\\*"); - hFile = _tfindfirsti64(val.c_str(), &c_file); - if (hFile != -1L) - { - break; - } - } - - if (hFile == -1L) - { - break; - } - - }while(1); - - - return !m_Map.empty(); - } - -//--------------------------------------------------------------------------------------- - bool SymbolFile::resolveAddress(const string &module_name, const string &module_address, string &Buffer) - { - SymbolMap::const_iterator it = m_Map.find (module_name); - - if (it == m_Map.end () || m_SymResolver == "") - { - cerr << "SymbolFile::resolveAddress> no symbol file or ROS_ADDR2LINE not set" << endl; - return false; - } - - char szCmd[300]; - - sprintf(szCmd, "%s %s %s", m_SymResolver.c_str (), it->second.c_str (), module_address.c_str()); - string pipe_cmd(szCmd); - vector vect; - PipeReader pipe_reader; - - if (!pipe_reader.openSource(pipe_cmd)) - { - cerr << "SymbolFile::resolveAddress> failed to open pipe" < no symbol file found for module " << ModuleName << endl; - return false; - } - - FilePath = it->second; - return true; - } - -} // end of namespace System_ diff --git a/reactos/tools/sysreg/sym_file.h b/reactos/tools/sysreg/sym_file.h deleted file mode 100644 index 9973a2e7316..00000000000 --- a/reactos/tools/sysreg/sym_file.h +++ /dev/null @@ -1,111 +0,0 @@ -#ifndef SYM_FILE_H__ -#define SYM_FILE_H__ - - -/* $Id$ - * - * PROJECT: System regression tool for ReactOS - * LICENSE: GPL - See COPYING in the top level directory - * FILE: tools/sysreg/conf_parser.h - * PURPOSE: source symbol lookup - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) - */ - -#include "conf_parser.h" -#include - -namespace System_ -{ - using Sysreg_::ConfigParser; - -//--------------------------------------------------------------------------------------- -/// -/// class SymbolFile -/// -/// Description: this class performs 2 tasks: First, it locates all available module names -/// and their associated symbol files. Secondly, it performs resolving address to source addresses -/// via the function resolveAddress -/// -/// Usage: call initialize(). Then call resolveAddress(); -/// i.e. resolveAddress("comctl32.dll", 0xBLABLABLA, result); - - class SymbolFile - { - public: - static string VAR_ROS_OUTPUT; - static string ROS_ADDR2LINE; - typedef std::map SymbolMap; -//--------------------------------------------------------------------------------------- -/// -/// ~SymbolFile -/// -/// Description: destructor of class SymbolFile - - virtual ~SymbolFile(); - -//--------------------------------------------------------------------------------------- -/// -/// initialize -/// -/// Description: this function initialize the class. It searches the subdirs -/// of ROS_OUTPUT and adds all files with name *.nostrip.* to a map with module -/// name as the key. -/// -/// Note: if the param Path is not empty, it adds all found modules to the internal -/// map -/// -/// Note: if the path does not exist or the no symbol files were added then false is returned -/// -/// Note: if a module with same module name is already in the map, then the new module is not added -/// -/// @param Path path to ROS_OUTPUT containing symbol files -/// @return bool - - static bool initialize(ConfigParser & conf_parser, const string & Path); - -//--------------------------------------------------------------------------------------- -/// -/// resolveAddress -/// -/// Description: this function attempts to resolve an address using a given symbol file -/// -/// Note: the lookup is performed with raddr2line -/// -/// @param module_name name of the module to examine -/// @param module_address address of the module to resolve -/// @param buffer receives information about the resolved location -/// @return bool - - static bool resolveAddress(const string & module_name, const string & module_address, string & Buffer); - -//--------------------------------------------------------------------------------------- -/// -/// getSymbolFilePath -/// -/// Description: this function returns the associated FilePath to a given module name. If -/// the module name is not known, it returns false and the param FilePath remains untouched -/// -/// @param ModuleName name of the module to lookup -/// @param FilePath buffer receiving the address of symbol file - - static bool getSymbolFilePath(const string & ModuleName, string & FilePath); - - protected: - -//--------------------------------------------------------------------------------------- -/// -/// SymbolFile -/// -/// Description: constructor of class SymbolFile - - SymbolFile(); - - static SymbolMap m_Map; - static string m_SymbolPath; - static string m_SymResolver; - }; -} // end of namespace System_ - - - -#endif /* end of SYM_FILE_H__ */ diff --git a/reactos/tools/sysreg/sysreg.cpp b/reactos/tools/sysreg/sysreg.cpp deleted file mode 100644 index 0f193c398ba..00000000000 --- a/reactos/tools/sysreg/sysreg.cpp +++ /dev/null @@ -1,87 +0,0 @@ - -/* $Id$ - * - * PROJECT: System regression tool for ReactOS - * LICENSE: GPL - See COPYING in the top level directory - * FILE: tools/sysreg/conf_parser.h - * PURPOSE: app initialization - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) - */ - - -#include "sysreg.h" - -using System_::EnvironmentVariable; - -using Sysreg_::ConfigParser; - -//regression test classes -using Sysreg_::RosBootTest; - -#if 0 -using System_::SymbolFile; -#endif - -static const char USAGE[] = -"sysreg.exe [conf_file]\nconfiguration file (default: sysreg.cfg)"; - - - - -int main(int argc, char * argv[]) -{ - ConfigParser config; - char DefaultConfig[] = "sysreg.cfg"; - char *ConfigFile; - - if ((argc > 2)) - { - cerr << USAGE << endl; - return -1; - } - -//--------------------------------------------------------------------------------------- - - if (argc == 2) - { - ConfigFile = argv[1]; - } - else - { - ConfigFile = DefaultConfig; - } - - if (!config.parseFile (ConfigFile)) - { - cerr << USAGE << endl; - return -1; - } - - RosBootTest * regtest = new RosBootTest(); - if (!regtest) - { - cerr << "Error: failed to create regression test" << endl; - return -1; - } - - string envvar; - string ros = "ROS_OUTPUT"; - config.getStringValue (ros, envvar); -#if 0 - SymbolFile::initialize (config, envvar); -#endif - - for(int i = 0; i < 3; i++) - { - bool ret = regtest->execute(config); - if (!ret) - { - cout << "The regression test has failed at stage: " << i << endl; - delete regtest; - return -2; - } - } - cout << "The regression test completed successfully" << endl; - delete regtest; - return 0; -} diff --git a/reactos/tools/sysreg/sysreg.h b/reactos/tools/sysreg/sysreg.h deleted file mode 100644 index dc27283ccce..00000000000 --- a/reactos/tools/sysreg/sysreg.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef SYSREG_H__ -#define SYSREG_H__ - -/* $Id$ - * - * PROJECT: System regression tool for ReactOS - * LICENSE: GPL - See COPYING in the top level directory - * FILE: tools/sysreg/conf_parser.h - * PURPOSE: app initialization - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) - */ - -#include "user_types.h" -#include "env_var.h" -#include "sym_file.h" -#include "conf_parser.h" - -// regression test classes -#include "rosboot_test.h" - - - -#endif /* end of SYSREG_H__ */ diff --git a/reactos/tools/sysreg/sysreg.rbuild b/reactos/tools/sysreg/sysreg.rbuild deleted file mode 100644 index 458e67cea25..00000000000 --- a/reactos/tools/sysreg/sysreg.rbuild +++ /dev/null @@ -1,14 +0,0 @@ - - - - - conf_parser.cpp - env_var.cpp - rosboot_test.cpp - namedpipe_reader.cpp - pipe_reader.cpp - sysreg.cpp - file_reader.cpp - os_support.cpp - timer_command_callback.cpp - diff --git a/reactos/tools/sysreg/timer_callback.h b/reactos/tools/sysreg/timer_callback.h deleted file mode 100644 index a786fe1f9a0..00000000000 --- a/reactos/tools/sysreg/timer_callback.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef TIMER_CALLBACK_H__ -#define TIMER_CALLBACK_H__ - - -namespace System_ -{ -//--------------------------------------------------------------------------------------- -/// -/// TimerCallback -/// -/// Description: base class for all timer callback functions - - class TimerCallback - { - public: -//--------------------------------------------------------------------------------------- -/// -/// TimerCallback -/// -/// Description: constructor of class TimerCallback - - TimerCallback() {} - -//--------------------------------------------------------------------------------------- -/// -/// TimerCallback -/// -/// Description: destructor of class TimerCallback - - virtual ~TimerCallback() {} - - -//--------------------------------------------------------------------------------------- -/// -/// initialize -/// -/// Description: this function is called when the timercallback object is initialized in -/// in the callback mechanism - - virtual bool initialize(){ return true;} - - -//--------------------------------------------------------------------------------------- -/// -/// hasExpired -/// -/// Description: this function is called everytime timer event has started. The callback object -/// should return true if the expiration function has expired. -/// Note: the function should then also cleanup all consumed resourced - - virtual bool hasExpired() = 0; - }; //end of class TimerCallback - -}// end of namespace System_ - -#endif diff --git a/reactos/tools/sysreg/timer_command_callback.cpp b/reactos/tools/sysreg/timer_command_callback.cpp deleted file mode 100644 index f83fb98cd56..00000000000 --- a/reactos/tools/sysreg/timer_command_callback.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include "timer_command_callback.h" - - -namespace System_ -{ - using Sysreg_::ConfigParser; - - string TimerCommandCallback::ROS_TIMER_COMMAND="ROS_TIMER_COMMAND"; - string TimerCommandCallback::ROS_TIMER_TIMEOUT="ROS_TIMER_TIMEOUT"; - -//--------------------------------------------------------------- - TimerCommandCallback::TimerCommandCallback(ConfigParser &conf_parser) : TimerCallback(), m_parser(conf_parser), m_Cmd(""), m_Timeout(0) - { - } -//--------------------------------------------------------------- - TimerCommandCallback::~TimerCommandCallback() - { - } -//--------------------------------------------------------------- - bool TimerCommandCallback::initialize() - { - m_parser.getStringValue(ROS_TIMER_COMMAND, m_Cmd); - m_parser.getIntValue(ROS_TIMER_TIMEOUT, m_Timeout); - //FIXME - // calculate current time - - return true; - } - -//--------------------------------------------------------------- - bool TimerCommandCallback::hasExpired() - { - - // FIXME - // calculate current time - // calculate difference - // and invoke m_Cmd when it has expired - return false; - } - -} // end of namespace System_ diff --git a/reactos/tools/sysreg/timer_command_callback.h b/reactos/tools/sysreg/timer_command_callback.h deleted file mode 100644 index 79beabe83ff..00000000000 --- a/reactos/tools/sysreg/timer_command_callback.h +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef TIMER_COMMAND_CALLBACK_H__ //timer_command_callback.h -#define TIMER_COMMAND_CALLBACK_H__ - -#include "conf_parser.h" -#include "timer_callback.h" - -namespace System_ -{ - - class TimerCommandCallback : public TimerCallback - { - public: -//--------------------------------------------------------------- -/// -/// TimerCommandCallback -/// -/// Description: constructor of class TimerCommandCallback -/// -/// @param conf_parser contains configuration data - - TimerCommandCallback(Sysreg_::ConfigParser &conf_parser); - -//--------------------------------------------------------------- -/// -/// ~TimerCommandCallback -/// -/// Description: destructor of class TimerCommandCallback - - virtual ~TimerCommandCallback(); - -//--------------------------------------------------------------- -/// -/// initialize -/// -/// Description: initializes the callback object - - virtual bool initialize(); - -//--------------------------------------------------------------- -/// -/// hasExpired -/// -/// Description: returns true when the callback object has expired - - virtual bool hasExpired(); - protected: - Sysreg_::ConfigParser & m_parser; - string m_Cmd; - long int m_Timeout; - static string ROS_TIMER_TIMEOUT; - static string ROS_TIMER_COMMAND; - }; - -} /* EOF namspace System_ */ - - -#endif /* EOF TIMER_COMMAND_CALLBACK_H__ */ diff --git a/reactos/tools/sysreg/txtmode.cfg b/reactos/tools/sysreg/txtmode.cfg deleted file mode 100644 index 78078578944..00000000000 --- a/reactos/tools/sysreg/txtmode.cfg +++ /dev/null @@ -1,110 +0,0 @@ -; ROS_EMULATOR_TYPE -; -; This variable defines which emulator should be used to emulate ReactOS -; -;ROS_EMU_TYPE=[qemu|vmware|xen] - -ROS_EMU_TYPE=qemu - -; ROS_EMU_PATH[LIN|WIN] -; -; This variable sets the path to the emulator (path to xm for xen [/usr/sbin]) -; -ROS_EMU_PATH_WIN=E:\reactos\qemu\qemu.exe -ROS_EMU_PATH_LIN=/usr/bin/qemu - -; ROS_HDD_IMAGE -; -; The hdd image to use for running the emulator. If this variable is not -; set, SysReg will create a HDD with name "ros.img" using the qemu-img tool. It will search -; this tool in the directory of emulator and abort if the tool cannot be found -;ROS_HDD_IMAGE=E:\reactos\qemu\ReactOS.hd - -; ROS_CD_IMAGE -; -; Set this variable if you want sysreg to perform a full ReactOS installation using -; an ReactOS unattended installation disk. If this variable is not set, SysReg lets the emulator boot -; from harddisk. -; - -;ROS_CD_IMAGE=E:\reactos\qemu\Reactos-Regtest.iso - -;------------------------------------------------------------------------------------------- -; Additional Options -; - -; ROS_MAX_TIME -; -; -; Set this variable to value which is the maximum time the emulator lets ReactOS run -; If not set, the emulator runs as long as no exception occurs in the emulator. -ROS_MAX_TIME=180 - -; ROS_LOG_FILE -; -; filename of log which receives all debugging data gained from the Emulator -; ROS_LOG_FILE=debug.log - -; ROS_SYM_DIR -; -; This directory sets the location where to search symbol files for modules -; In case of an BSOD, usermode exception, Sysreg will attempt to create a backtrace -; from the debugging data -; -; ROS_SYM_DIR=E:\reactos\output-i386 - -; ROS_DELAY_READ; -; -; When the emulator is started, it spends a little time loading and running through its -; BIOS. This time delays reading from the pipe/file untill the specified value. -; -; Note: set this value if you have problems with timeouts or cutoff debugging data -; -ROS_DELAY_READ=1 - -; ROS_CHECK_POINT -; -; RosBoot will stop executing when it finds a string in the form -; SYSREG_CHECKPOINT:YOUR_CHECKPOINT_NAME -; -;ROS_CHECK_POINT=YOUR_CHECKPOINT_NAME - -;ROS_CRITICAL_IMAGE -; -; If an user-mode exception occurs in an critical application, dll etc, i.e. setup.exe / explorer.exe, sysreg will report -; that the test has failed and quit debugging immediately -; -;ROS_CRITICAL_IMAGE=setup.exe userinit.exe smss.exe winlogon.exe csrss.exe explorer.exe - -; ROS_EMU_KILL -; -; Set this variable to true if you want SysReg to kill the emulator process when it has decided to exit. -; -; Note: Qemu>=0.9.0 has the option to shutdown on reboot (-no--reboot) -; -; ROS_EMU_KILL=yes - -; ROS_EMU_MEM -; -; Controls how much memory the emulator use for ReactOS -; -; ROS_EMU_MEM=64 - -; ROS_BOOT_CMD -; -; Sysreg normally builds the boot command from ROS_EMU_PATH and ROS_CD_IMAGE etc... If you want to override -; all settings set this value -; -; ROS_BOOT_CMD=/usr/bin/qemu -serial stdio -m 64 -hda ~/reactos/qemu/ReactOS.hd -boot d -cdrom ~/reactos/qemu/bootcd.iso -; -no-reboot - -; XEN_CONFIG_FILE -; -; Set this variable to path of xen config file when ROS_EMU_TYPE=xen is used -; XEN_CONFIG_FILE= - - -; XEN_CONFIG_NAME -; -; Set this variable to the name of xen station -; XEN_CONFIG_NAME=reactos diff --git a/reactos/tools/sysreg/user_types.h b/reactos/tools/sysreg/user_types.h deleted file mode 100644 index a1ed1870599..00000000000 --- a/reactos/tools/sysreg/user_types.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef USER_TYPES_H__ -#define USER_TYPES_H__ - -/* $Id$ - * - * PROJECT: System regression tool for ReactOS - * LICENSE: GPL - See COPYING in the top level directory - * FILE: tools/sysreg/user_types.h - * PURPOSE: user types - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) - */ - -#include -#include - -#ifdef WIN32 -#define popen _popen -#define pclose _pclose -#endif - -typedef std::basic_string string; -typedef std::basic_istringstream istringstream; - -using std::cout; -using std::cerr; -using std::endl; - - -#endif // end of USER_TYPES_H__ diff --git a/reactos/tools/tools.rbuild b/reactos/tools/tools.rbuild index f4817fbf554..6b571e6c010 100644 --- a/reactos/tools/tools.rbuild +++ b/reactos/tools/tools.rbuild @@ -13,9 +13,6 @@ - - - From 7f5e74d59966ccd52f7a6c2a491d349563960309 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Tue, 2 Sep 2008 12:57:42 +0000 Subject: [PATCH 286/324] - Copy classfactory interface to netcfgx - Required to implement netcfgx interfaces) svn path=/trunk/; revision=35879 --- reactos/dll/win32/netcfgx/classfactory.c | 124 +++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 reactos/dll/win32/netcfgx/classfactory.c diff --git a/reactos/dll/win32/netcfgx/classfactory.c b/reactos/dll/win32/netcfgx/classfactory.c new file mode 100644 index 00000000000..d03c5f340cc --- /dev/null +++ b/reactos/dll/win32/netcfgx/classfactory.c @@ -0,0 +1,124 @@ +#include + +typedef struct +{ + const IClassFactoryVtbl *lpVtbl; + LONG ref; + CLSID *rclsid; + LPFNCREATEINSTANCE lpfnCI; + const IID * riidInst; +} IClassFactoryImpl; + + +static +HRESULT +WINAPI +IClassFactory_fnQueryInterface( + LPCLASSFACTORY iface, + REFIID riid, + LPVOID *ppvObj) +{ + IClassFactoryImpl *This = (IClassFactoryImpl *)iface; + + *ppvObj = NULL; + if(IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IClassFactory)) + { + *ppvObj = This; + InterlockedIncrement(&This->ref); + return S_OK; + } + return E_NOINTERFACE; +} + +static +ULONG +WINAPI +IClassFactory_fnAddRef( + LPCLASSFACTORY iface) +{ + IClassFactoryImpl *This = (IClassFactoryImpl *)iface; + ULONG refCount = InterlockedIncrement(&This->ref); + + return refCount; +} + +static +ULONG +WINAPI +IClassFactory_fnRelease( + LPCLASSFACTORY iface) +{ + IClassFactoryImpl *This = (IClassFactoryImpl *)iface; + ULONG refCount = InterlockedDecrement(&This->ref); + + if (!refCount) + { + CoTaskMemFree(This); + return 0; + } + return refCount; +} + +static +HRESULT +WINAPI +IClassFactory_fnCreateInstance( + LPCLASSFACTORY iface, + LPUNKNOWN pUnkOuter, + REFIID riid, + LPVOID *ppvObject) +{ + IClassFactoryImpl *This = (IClassFactoryImpl *)iface; + + *ppvObject = NULL; + + if ( This->riidInst==NULL || IsEqualCLSID(riid, This->riidInst) || IsEqualCLSID(riid, &IID_IUnknown) ) + { + return This->lpfnCI(pUnkOuter, riid, ppvObject); + } + + return E_NOINTERFACE; +} + +static +HRESULT +WINAPI IClassFactory_fnLockServer( + LPCLASSFACTORY iface, + BOOL fLock) +{ + //IClassFactoryImpl *This = (IClassFactoryImpl *)iface; + return E_NOTIMPL; +} + + +static const IClassFactoryVtbl dclfvt = +{ + IClassFactory_fnQueryInterface, + IClassFactory_fnAddRef, + IClassFactory_fnRelease, + IClassFactory_fnCreateInstance, + IClassFactory_fnLockServer +}; + + +IClassFactory * +IClassFactory_fnConstructor( + LPFNCREATEINSTANCE lpfnCI, + PLONG pcRefDll, + REFIID riidInst) +{ + IClassFactoryImpl* lpclf; + + lpclf = CoTaskMemAlloc(sizeof(IClassFactoryImpl)); + lpclf->ref = 1; + lpclf->lpVtbl = &dclfvt; + lpclf->lpfnCI = lpfnCI; + + if (pcRefDll) + InterlockedIncrement(pcRefDll); + lpclf->riidInst = riidInst; + + return (LPCLASSFACTORY)lpclf; +} + + From 8b132fb5d0e5b77b68d9dcda509937d357e89314 Mon Sep 17 00:00:00 2001 From: Daniel Reimer Date: Tue, 2 Sep 2008 14:00:30 +0000 Subject: [PATCH 287/324] Bug 3637: Norwegian rosapps translation from Lars Martin Hambro svn path=/trunk/; revision=35880 --- .../devutils/zoomin/lang/en-US.rc | 85 +++++++ .../devutils/zoomin/lang/no-NO.rc | 85 +++++++ .../applications/devutils/zoomin/zoomin.rc | 83 +------ rosapps/applications/fontview/fontview.rc | 1 + rosapps/applications/fontview/lang/no-NO.rc | 16 ++ rosapps/applications/fraginator/Fraginator.rc | 228 +---------------- rosapps/applications/fraginator/lang/en-US.rc | 230 ++++++++++++++++++ rosapps/applications/fraginator/lang/no-NO.rc | 230 ++++++++++++++++++ rosapps/applications/imagesoft/lang/no-NO.rc | 42 ++-- .../applications/packmgr/gui/lang/no-NO.rc | 43 ++++ rosapps/applications/packmgr/gui/packmgr.rc | 1 + .../applications/packmgr/lib/lang/no-NO.rc | 25 ++ rosapps/applications/packmgr/lib/package.rc | 1 + .../screensavers/blankscr/lang/no-NO.rc | 7 + .../screensavers/blankscr/scrnsave.rc | 1 + .../screensavers/cylfrac/cylfrac.rc | 1 + .../screensavers/cylfrac/lang/no-NO.rc | 8 + .../screensavers/matrix/lang/no-NO.rc | 53 ++++ .../applications/screensavers/matrix/rsrc.rc | 1 + .../screensavers/mazescr/lang/no-NO.rc | 8 + .../screensavers/mazescr/scrnsave.rc | 1 + .../screensavers/starfield/lang/no-NO.rc | 8 + .../screensavers/starfield/starfield.rc | 1 + rosapps/applications/sysutils/ctm/ctm.rc | 1 + .../applications/sysutils/ctm/lang/no-NO.rc | 32 +++ .../sysutils/systeminfo/lang/no-NO.rc | 64 +++++ .../applications/sysutils/systeminfo/rsrc.rc | 1 + 27 files changed, 934 insertions(+), 323 deletions(-) create mode 100644 rosapps/applications/devutils/zoomin/lang/en-US.rc create mode 100644 rosapps/applications/devutils/zoomin/lang/no-NO.rc create mode 100644 rosapps/applications/fontview/lang/no-NO.rc create mode 100644 rosapps/applications/fraginator/lang/en-US.rc create mode 100644 rosapps/applications/fraginator/lang/no-NO.rc create mode 100644 rosapps/applications/packmgr/gui/lang/no-NO.rc create mode 100644 rosapps/applications/packmgr/lib/lang/no-NO.rc create mode 100644 rosapps/applications/screensavers/blankscr/lang/no-NO.rc create mode 100644 rosapps/applications/screensavers/cylfrac/lang/no-NO.rc create mode 100644 rosapps/applications/screensavers/matrix/lang/no-NO.rc create mode 100644 rosapps/applications/screensavers/mazescr/lang/no-NO.rc create mode 100644 rosapps/applications/screensavers/starfield/lang/no-NO.rc create mode 100644 rosapps/applications/sysutils/ctm/lang/no-NO.rc create mode 100644 rosapps/applications/sysutils/systeminfo/lang/no-NO.rc diff --git a/rosapps/applications/devutils/zoomin/lang/en-US.rc b/rosapps/applications/devutils/zoomin/lang/en-US.rc new file mode 100644 index 00000000000..689705917a7 --- /dev/null +++ b/rosapps/applications/devutils/zoomin/lang/en-US.rc @@ -0,0 +1,85 @@ +/* $Id: zoomin.rc 31932 2008-01-21 21:29:59Z dreimer $ */ + +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ZOOMIN ICON DISCARDABLE "zoomin.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_ZOOMIN_MENU MENU DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + MENUITEM "E&xit\tAlt-F4", ID_EDIT_EXIT + END + POPUP "&Edit" + BEGIN + MENUITEM "&Copy\tCtrl+C", ID_EDIT_COPY, GRAYED + MENUITEM "&Refresh\tF5", ID_EDIT_REFRESH + END + POPUP "&Options" + BEGIN + MENUITEM "&Refresh Rate...", ID_OPTIONS_REFRESH_RATE, GRAYED + END + POPUP "&Help" + BEGIN + MENUITEM "&About ...", ID_HELP_ABOUT + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ABOUTBOX DIALOGEX DISCARDABLE 22, 17, 230, 75 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "About" +FONT 8, "System" +BEGIN + ICON IDI_ZOOMIN,IDI_ZOOMIN,14,9,16,16 + LTEXT "ReactOS zoomin Version 1.0",IDC_STATIC,49,10,119,8, + SS_NOPREFIX + LTEXT "Copyright (C) 2002 ReactOS Team",IDC_STATIC,49,20,119,8 + DEFPUSHBUTTON "OK",IDOK,195,6,30,11,WS_GROUP +END + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_APP_TITLE "ReactOS Zoomin" +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDR_ZOOMIN ACCELERATORS DISCARDABLE +BEGIN + VK_F5, ID_REFRESH, VIRTKEY, NOINVERT +END diff --git a/rosapps/applications/devutils/zoomin/lang/no-NO.rc b/rosapps/applications/devutils/zoomin/lang/no-NO.rc new file mode 100644 index 00000000000..2a0155aec3c --- /dev/null +++ b/rosapps/applications/devutils/zoomin/lang/no-NO.rc @@ -0,0 +1,85 @@ +/* $Id: zoomin.rc 31932 2008-01-21 21:29:59Z dreimer $ */ + +LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ZOOMIN ICON DISCARDABLE "zoomin.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_ZOOMIN_MENU MENU DISCARDABLE +BEGIN + POPUP "&Fil" + BEGIN + MENUITEM "A&vslutt\tAlt-F4", ID_EDIT_EXIT + END + POPUP "&Rediger" + BEGIN + MENUITEM "&Kopier\tCtrl+C", ID_EDIT_COPY, GRAYED + MENUITEM "&Oppdater\tF5", ID_EDIT_REFRESH + END + POPUP "&Valg" + BEGIN + MENUITEM "&Oppdatering hastighet...", ID_OPTIONS_REFRESH_RATE, GRAYED + END + POPUP "&Hjelp" + BEGIN + MENUITEM "&Om ...", ID_HELP_ABOUT + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ABOUTBOX DIALOGEX DISCARDABLE 22, 17, 230, 75 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Om" +FONT 8, "System" +BEGIN + ICON IDI_ZOOMIN,IDI_ZOOMIN,14,9,16,16 + LTEXT "ReactOS zoomin versjon 1.0",IDC_STATIC,49,10,119,8, + SS_NOPREFIX + LTEXT "Enerett (C) 2002 ReactOS gruppen",IDC_STATIC,49,20,119,8 + DEFPUSHBUTTON "OK",IDOK,195,6,30,11,WS_GROUP +END + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_APP_TITLE "ReactOS Zoomin" +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDR_ZOOMIN ACCELERATORS DISCARDABLE +BEGIN + VK_F5, ID_REFRESH, VIRTKEY, NOINVERT +END diff --git a/rosapps/applications/devutils/zoomin/zoomin.rc b/rosapps/applications/devutils/zoomin/zoomin.rc index 16d11c1a50a..3d9efa9ca2e 100644 --- a/rosapps/applications/devutils/zoomin/zoomin.rc +++ b/rosapps/applications/devutils/zoomin/zoomin.rc @@ -8,84 +8,5 @@ #define REACTOS_STR_ORIGINAL_FILENAME "zoomin.exe\0" #include - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_ZOOMIN ICON DISCARDABLE "zoomin.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// Bitmap -// - - -///////////////////////////////////////////////////////////////////////////// -// -// Menu -// - -IDR_ZOOMIN_MENU MENU DISCARDABLE -BEGIN - POPUP "&File" - BEGIN - MENUITEM "E&xit\tAlt-F4", ID_EDIT_EXIT - END - POPUP "&Edit" - BEGIN - MENUITEM "&Copy\tCtrl+C", ID_EDIT_COPY, GRAYED - MENUITEM "&Refresh\tF5", ID_EDIT_REFRESH - END - POPUP "&Options" - BEGIN - MENUITEM "&Refresh Rate...", ID_OPTIONS_REFRESH_RATE, GRAYED - END - POPUP "&Help" - BEGIN - MENUITEM "&About ...", ID_HELP_ABOUT - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22, 17, 230, 75 -STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU -CAPTION "About" -FONT 8, "System" -BEGIN - ICON IDI_ZOOMIN,IDI_ZOOMIN,14,9,16,16 - LTEXT "ReactOS zoomin Version 1.0",IDC_STATIC,49,10,119,8, - SS_NOPREFIX - LTEXT "Copyright (C) 2002 ReactOS Team",IDC_STATIC,49,20,119,8 - DEFPUSHBUTTON "OK",IDOK,195,6,30,11,WS_GROUP -END - - -///////////////////////////////////////////////////////////////////////////// -// -// String Table -// - -STRINGTABLE DISCARDABLE -BEGIN - IDS_APP_TITLE "ReactOS Zoomin" -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Accelerator -// - -IDR_ZOOMIN ACCELERATORS DISCARDABLE -BEGIN - VK_F5, ID_REFRESH, VIRTKEY, NOINVERT -END +#include "lang/en-US.rc" +#include "lang/no-NO.rc" diff --git a/rosapps/applications/fontview/fontview.rc b/rosapps/applications/fontview/fontview.rc index d0e814a108e..27679557cab 100644 --- a/rosapps/applications/fontview/fontview.rc +++ b/rosapps/applications/fontview/fontview.rc @@ -23,3 +23,4 @@ END #include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/uk-UA.rc" +#include "lang/no-NO.rc" diff --git a/rosapps/applications/fontview/lang/no-NO.rc b/rosapps/applications/fontview/lang/no-NO.rc new file mode 100644 index 00000000000..551f8093ef1 --- /dev/null +++ b/rosapps/applications/fontview/lang/no-NO.rc @@ -0,0 +1,16 @@ +LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL + +STRINGTABLE DISCARDABLE +BEGIN + IDS_QUIT, "Avslutt" + IDS_PRINT, "Skriv" + IDS_STRING, "Jackdaws love my big sphinx of quartz. 1234567890" + IDS_ERROR, "Feil" + IDS_ERROR_NOMEM, "Det er ikke nok minne for е fullfшre oppgaven." + IDS_ERROR_NOFONT, "Filen %1 er ikke et gyldig skriftfil." + IDS_ERROR_NOCLASS, "Kunne ikke initialise vindu klassen." + IDS_ERROR_BADCMD, "Ingen skriftfil er gitt.\nSyntaks:\n fontview.exe " +END + + + diff --git a/rosapps/applications/fraginator/Fraginator.rc b/rosapps/applications/fraginator/Fraginator.rc index 2b79af7ff42..ce8d7103ebc 100644 --- a/rosapps/applications/fraginator/Fraginator.rc +++ b/rosapps/applications/fraginator/Fraginator.rc @@ -12,230 +12,6 @@ ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_MAIN DIALOGEX 0, 0, 346, 103 -STYLE DS_SHELLFONT | DS_CENTERMOUSE | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | - WS_CAPTION | WS_SYSMENU -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - COMBOBOX IDC_DRIVES_LIST,78,52,29,111,CBS_DROPDOWNLIST | CBS_SORT | - WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_METHODS_LIST,135,52,77,79,CBS_DROPDOWNLIST | - WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_PRIORITY_LIST,223,52,59,91,CBS_DROPDOWNLIST | - WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "Start",IDC_STARTSTOP,294,7,45,15 - PUSHBUTTON "Help",ID_MAIN_HELP,294,28,45,15 - PUSHBUTTON "Exit",IDC_QUIT,294,49,45,15 - CONTROL 110,-1,"Static",SS_BITMAP | SS_SUNKEN | - WS_BORDER,7,7,63,58 - LTEXT "Choose a drive:",-1,78,40,50,8 - LTEXT "Choose an action:",-1,135,40,58,8 - CONTROL "Progress1",IDC_PROGRESS,"msctls_progress32",WS_BORDER | - 0x1,7,71,299,10 - CONTROL "Static",IDC_STATUS,"Static",SS_LEFTNOWORDWRAP | - SS_SUNKEN | WS_GROUP,7,86,332,10 - LTEXT "I am a monkey, hear me eeK",IDC_WISECRACKS,78,15,91,8 - LTEXT "100.00%",IDC_PERCENT,311,71,28,8,0,WS_EX_RIGHT - LTEXT "Process Priority:",-1,223,40,51,8 -END - -IDD_REPORT DIALOGEX 0, 0, 391, 169 -STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION -CAPTION "Report" -FONT 8, "MS Shell Dlg" -BEGIN - DEFPUSHBUTTON "Bytes",IDC_BYTES,7,148,50,14 - DEFPUSHBUTTON "Kilobytes",IDC_KILOBYTES,61,148,50,14 - DEFPUSHBUTTON "Megabytes",IDC_MEGABYTES,115,148,50,14 - DEFPUSHBUTTON "Gigabytes",IDC_GIGABYTES,169,148,50,14 - DEFPUSHBUTTON "OK",IDC_REPORTOK,334,148,50,14 - RTEXT "Volume",-1,7,7,24,8 - LTEXT "Capacity",-1,7,51,28,8 - RTEXT "(Drive Letter)",IDC_DRIVELETTER,63,7,117,10,SS_SUNKEN - RTEXT "(Disk Size, Bytes)",IDC_DISKSIZEBYTES,63,51,117,10, - SS_SUNKEN - RTEXT "(Disk Size, Clusters)",IDC_DISKSIZECLUSTERS,63,73,117, - 10,SS_SUNKEN - LTEXT "Total clusters",-1,7,73,43,8 - RTEXT "(Cluster size)",IDC_DISKCLUSTERSIZE,63,84,117,10, - SS_SUNKEN - LTEXT "Cluster size",-1,7,84,36,8 - RTEXT "(Files count)",IDC_FILESCOUNT,267,18,117,10,SS_SUNKEN - RTEXT "(Files size, bytes)",IDC_FILESSIZEBYTES,267,29,117,10, - SS_SUNKEN - LTEXT "# of files",-1,194,18,28,8 - LTEXT "Total size",-1,194,29,31,8 - LTEXT "Size on disk",-1,194,40,39,8 - RTEXT "(Total size, bytes)",IDC_FILESSIZEONDISK,267,40,117,10, - SS_SUNKEN - RTEXT "(Files slack bytes)",IDC_FILESSLACKBYTES,267,51,117,10, - SS_SUNKEN - LTEXT "Wasted slack",-1,194,51,44,8 - RTEXT "(Disk Free, Bytes)",IDC_DISKFREEBYTES,63,62,117,10, - SS_SUNKEN - LTEXT "Free space",-1,7,62,36,8 - RTEXT "(Files fragmented, count)",IDC_FILESFRAGGED,267,62,117, - 10,SS_SUNKEN - LTEXT "Fragmented files",-1,194,62,52,8 - RTEXT "(Dirs count)",IDC_DIRSCOUNT,267,7,117,10,SS_SUNKEN - LTEXT "# of directories",-1,194,7,48,8 - RTEXT "File System",-1,7,40,36,8 - RTEXT "(File System Name)",IDC_FILESYSTEM,63,40,117,10, - SS_SUNKEN - RTEXT "Volume Label",-1,7,18,44,8 - RTEXT "(Volume Name)",IDC_VOLUMELABEL,63,18,117,10,SS_SUNKEN - RTEXT "Serial",-1,7,29,18,8 - RTEXT "(Volume Serial)",IDC_VOLUMESERIAL,63,29,117,10, - SS_SUNKEN - RTEXT "(Average Frags Per File)",IDC_AVERAGEFRAGS,267,73,117, - 10,SS_SUNKEN - LTEXT "Average fragments per file",-1,194,73,60,20 - LTEXT "XX.X% of the files on this drive are fragmented. It is recommended that you perform a SSSSSSS defragmentation.", - IDC_RECOMMEND,7,106,377,38,SS_SUNKEN - LTEXT "Recommendations:",-1,7,96,62,8 -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_MAIN, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 339 - TOPMARGIN, 7 - BOTTOMMARGIN, 96 - END - - IDD_REPORT, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 384 - TOPMARGIN, 7 - BOTTOMMARGIN, 162 - END -END -#endif // APSTUDIO_INVOKED - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""windows.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,3,0,0 - PRODUCTVERSION 1,3,0,0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "CompanyName", " " - VALUE "FileDescription", "Fraginator" - VALUE "FileVersion", "1.03" - VALUE "InternalName", "Fraginator" - VALUE "LegalCopyright", "Copyright © 2000-2002 Rick Brewster" - VALUE "OriginalFilename", "Fraginator.exe" - VALUE "ProductName", "Fraginator" - VALUE "ProductVersion", "1.03" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Bitmap -// - -IDB_LOGO BITMAP "Fraginator Motif Icon.bmp" - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_ICON ICON "icon1.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// RT_MANIFEST -// - -1 RT_MANIFEST "default1.bin" -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED +#include "lang/en-US.rc" +#include "lang/no-NO.rc" diff --git a/rosapps/applications/fraginator/lang/en-US.rc b/rosapps/applications/fraginator/lang/en-US.rc new file mode 100644 index 00000000000..2e9e0cfb279 --- /dev/null +++ b/rosapps/applications/fraginator/lang/en-US.rc @@ -0,0 +1,230 @@ +// Microsoft Visual C++ generated resource script. +// + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_MAIN DIALOGEX 0, 0, 346, 103 +STYLE DS_SHELLFONT | DS_CENTERMOUSE | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | + WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + COMBOBOX IDC_DRIVES_LIST,78,52,29,111,CBS_DROPDOWNLIST | CBS_SORT | + WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_METHODS_LIST,135,52,77,79,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_PRIORITY_LIST,223,52,59,91,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "Start",IDC_STARTSTOP,294,7,45,15 + PUSHBUTTON "Help",ID_MAIN_HELP,294,28,45,15 + PUSHBUTTON "Exit",IDC_QUIT,294,49,45,15 + CONTROL 110,-1,"Static",SS_BITMAP | SS_SUNKEN | + WS_BORDER,7,7,63,58 + LTEXT "Choose a drive:",-1,78,40,50,8 + LTEXT "Choose an action:",-1,135,40,58,8 + CONTROL "Progress1",IDC_PROGRESS,"msctls_progress32",WS_BORDER | + 0x1,7,71,299,10 + CONTROL "Static",IDC_STATUS,"Static",SS_LEFTNOWORDWRAP | + SS_SUNKEN | WS_GROUP,7,86,332,10 + LTEXT "I am a monkey, hear me eeK",IDC_WISECRACKS,78,15,91,8 + LTEXT "100.00%",IDC_PERCENT,311,71,28,8,0,WS_EX_RIGHT + LTEXT "Process Priority:",-1,223,40,51,8 +END + +IDD_REPORT DIALOGEX 0, 0, 391, 169 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Report" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Bytes",IDC_BYTES,7,148,50,14 + DEFPUSHBUTTON "Kilobytes",IDC_KILOBYTES,61,148,50,14 + DEFPUSHBUTTON "Megabytes",IDC_MEGABYTES,115,148,50,14 + DEFPUSHBUTTON "Gigabytes",IDC_GIGABYTES,169,148,50,14 + DEFPUSHBUTTON "OK",IDC_REPORTOK,334,148,50,14 + RTEXT "Volume",-1,7,7,24,8 + LTEXT "Capacity",-1,7,51,28,8 + RTEXT "(Drive Letter)",IDC_DRIVELETTER,63,7,117,10,SS_SUNKEN + RTEXT "(Disk Size, Bytes)",IDC_DISKSIZEBYTES,63,51,117,10, + SS_SUNKEN + RTEXT "(Disk Size, Clusters)",IDC_DISKSIZECLUSTERS,63,73,117, + 10,SS_SUNKEN + LTEXT "Total clusters",-1,7,73,43,8 + RTEXT "(Cluster size)",IDC_DISKCLUSTERSIZE,63,84,117,10, + SS_SUNKEN + LTEXT "Cluster size",-1,7,84,36,8 + RTEXT "(Files count)",IDC_FILESCOUNT,267,18,117,10,SS_SUNKEN + RTEXT "(Files size, bytes)",IDC_FILESSIZEBYTES,267,29,117,10, + SS_SUNKEN + LTEXT "# of files",-1,194,18,28,8 + LTEXT "Total size",-1,194,29,31,8 + LTEXT "Size on disk",-1,194,40,39,8 + RTEXT "(Total size, bytes)",IDC_FILESSIZEONDISK,267,40,117,10, + SS_SUNKEN + RTEXT "(Files slack bytes)",IDC_FILESSLACKBYTES,267,51,117,10, + SS_SUNKEN + LTEXT "Wasted slack",-1,194,51,44,8 + RTEXT "(Disk Free, Bytes)",IDC_DISKFREEBYTES,63,62,117,10, + SS_SUNKEN + LTEXT "Free space",-1,7,62,36,8 + RTEXT "(Files fragmented, count)",IDC_FILESFRAGGED,267,62,117, + 10,SS_SUNKEN + LTEXT "Fragmented files",-1,194,62,52,8 + RTEXT "(Dirs count)",IDC_DIRSCOUNT,267,7,117,10,SS_SUNKEN + LTEXT "# of directories",-1,194,7,48,8 + RTEXT "File System",-1,7,40,36,8 + RTEXT "(File System Name)",IDC_FILESYSTEM,63,40,117,10, + SS_SUNKEN + RTEXT "Volume Label",-1,7,18,44,8 + RTEXT "(Volume Name)",IDC_VOLUMELABEL,63,18,117,10,SS_SUNKEN + RTEXT "Serial",-1,7,29,18,8 + RTEXT "(Volume Serial)",IDC_VOLUMESERIAL,63,29,117,10, + SS_SUNKEN + RTEXT "(Average Frags Per File)",IDC_AVERAGEFRAGS,267,73,117, + 10,SS_SUNKEN + LTEXT "Average fragments per file",-1,194,73,60,20 + LTEXT "XX.X% of the files on this drive are fragmented. It is recommended that you perform a SSSSSSS defragmentation.", + IDC_RECOMMEND,7,106,377,38,SS_SUNKEN + LTEXT "Recommendations:",-1,7,96,62,8 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_MAIN, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 339 + TOPMARGIN, 7 + BOTTOMMARGIN, 96 + END + + IDD_REPORT, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 384 + TOPMARGIN, 7 + BOTTOMMARGIN, 162 + END +END +#endif // APSTUDIO_INVOKED + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""windows.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,3,0,0 + PRODUCTVERSION 1,3,0,0 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", " " + VALUE "FileDescription", "Fraginator" + VALUE "FileVersion", "1.03" + VALUE "InternalName", "Fraginator" + VALUE "LegalCopyright", "Copyright © 2000-2002 Rick Brewster" + VALUE "OriginalFilename", "Fraginator.exe" + VALUE "ProductName", "Fraginator" + VALUE "ProductVersion", "1.03" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_LOGO BITMAP "Fraginator Motif Icon.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON ICON "icon1.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// RT_MANIFEST +// + +1 RT_MANIFEST "default1.bin" +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/rosapps/applications/fraginator/lang/no-NO.rc b/rosapps/applications/fraginator/lang/no-NO.rc new file mode 100644 index 00000000000..e744179904b --- /dev/null +++ b/rosapps/applications/fraginator/lang/no-NO.rc @@ -0,0 +1,230 @@ +// Microsoft Visual C++ generated resource script. +// + +///////////////////////////////////////////////////////////////////////////// +// Norwegian (N.O.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_MAIN DIALOGEX 0, 0, 346, 103 +STYLE DS_SHELLFONT | DS_CENTERMOUSE | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | + WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + COMBOBOX IDC_DRIVES_LIST,78,52,29,111,CBS_DROPDOWNLIST | CBS_SORT | + WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_METHODS_LIST,135,52,77,79,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_PRIORITY_LIST,223,52,59,91,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "Start",IDC_STARTSTOP,294,7,45,15 + PUSHBUTTON "Hjelp",ID_MAIN_HELP,294,28,45,15 + PUSHBUTTON "Avslutt",IDC_QUIT,294,49,45,15 + CONTROL 110,-1,"Static",SS_BITMAP | SS_SUNKEN | + WS_BORDER,7,7,63,58 + LTEXT "Velg en stasjon:",-1,78,40,50,8 + LTEXT "Velg en handling:",-1,135,40,58,8 + CONTROL "Prosess1",IDC_PROGRESS,"msctls_progress32",WS_BORDER | + 0x1,7,71,299,10 + CONTROL "Statisk",IDC_STATUS,"Statisk",SS_LEFTNOWORDWRAP | + SS_SUNKEN | WS_GROUP,7,86,332,10 + LTEXT "Jeg er en ape, hшr meg eeK",IDC_WISECRACKS,78,15,91,8 + LTEXT "100.00%",IDC_PERCENT,311,71,28,8,0,WS_EX_RIGHT + LTEXT "Prosess proritet:",-1,223,40,51,8 +END + +IDD_REPORT DIALOGEX 0, 0, 391, 169 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Rapport" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Bytes",IDC_BYTES,7,148,50,14 + DEFPUSHBUTTON "KB",IDC_KILOBYTES,61,148,50,14 + DEFPUSHBUTTON "MB",IDC_MEGABYTES,115,148,50,14 + DEFPUSHBUTTON "GB",IDC_GIGABYTES,169,148,50,14 + DEFPUSHBUTTON "OK",IDC_REPORTOK,334,148,50,14 + RTEXT "Stasjon",-1,7,7,24,8 + LTEXT "Kapasitet",-1,7,51,28,8 + RTEXT "(Stasjon bokstav)",IDC_DRIVELETTER,63,7,117,10,SS_SUNKEN + RTEXT "(Disk stшrrelse, Byte)",IDC_DISKSIZEBYTES,63,51,117,10, + SS_SUNKEN + RTEXT "(Disk stшrrelse, Clusters)",IDC_DISKSIZECLUSTERS,63,73,117, + 10,SS_SUNKEN + LTEXT "Total clusters",-1,7,73,43,8 + RTEXT "(Cluster stшrrelse)",IDC_DISKCLUSTERSIZE,63,84,117,10, + SS_SUNKEN + LTEXT "Cluster stшrrelse",-1,7,84,36,8 + RTEXT "(Files count)",IDC_FILESCOUNT,267,18,117,10,SS_SUNKEN + RTEXT "(Fil stшrrelse, bytes)",IDC_FILESSIZEBYTES,267,29,117,10, + SS_SUNKEN + LTEXT "# filer",-1,194,18,28,8 + LTEXT "Total stшrrelse",-1,194,29,31,8 + LTEXT "diskstшrrelse",-1,194,40,39,8 + RTEXT "(Total stшrrelse, byte)",IDC_FILESSIZEONDISK,267,40,117,10, + SS_SUNKEN + RTEXT "(Fil slack byte)",IDC_FILESSLACKBYTES,267,51,117,10, + SS_SUNKEN + LTEXT "Wasted slack",-1,194,51,44,8 + RTEXT "(Ledig plass, Bytes)",IDC_DISKFREEBYTES,63,62,117,10, + SS_SUNKEN + LTEXT "Ledig plass",-1,7,62,36,8 + RTEXT "(Filer fragmentert, count)",IDC_FILESFRAGGED,267,62,117, + 10,SS_SUNKEN + LTEXT "Fragmenterte filer",-1,194,62,52,8 + RTEXT "(Dirs count)",IDC_DIRSCOUNT,267,7,117,10,SS_SUNKEN + LTEXT "# of directories",-1,194,7,48,8 + RTEXT "Filsystem",-1,7,40,36,8 + RTEXT "(Filsystem navn)",IDC_FILESYSTEM,63,40,117,10, + SS_SUNKEN + RTEXT "Volume Label",-1,7,18,44,8 + RTEXT "(Stasjon navn)",IDC_VOLUMELABEL,63,18,117,10,SS_SUNKEN + RTEXT "Serial",-1,7,29,18,8 + RTEXT "(Volume Serial)",IDC_VOLUMESERIAL,63,29,117,10, + SS_SUNKEN + RTEXT "(Average Frags Per File)",IDC_AVERAGEFRAGS,267,73,117, + 10,SS_SUNKEN + LTEXT "Average fragments per file",-1,194,73,60,20 + LTEXT "XX.X% of the files on this drive are fragmented. It is recommended that you perform a SSSSSSS defragmentation.", + IDC_RECOMMEND,7,106,377,38,SS_SUNKEN + LTEXT "Recommendations:",-1,7,96,62,8 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_MAIN, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 339 + TOPMARGIN, 7 + BOTTOMMARGIN, 96 + END + + IDD_REPORT, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 384 + TOPMARGIN, 7 + BOTTOMMARGIN, 162 + END +END +#endif // APSTUDIO_INVOKED + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""windows.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,3,0,0 + PRODUCTVERSION 1,3,0,0 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Bedriftnavn", " " + VALUE "Filbeskrivelse", "Fraginator" + VALUE "Filversjon", "1.03" + VALUE "Internasjonaltnavn", "Fraginator" + VALUE "LegalCopyright", "enerett © 2000-2002 Rick Brewster" + VALUE "Originalfilnavn", "Fraginator.exe" + VALUE "Produktnavn", "Fraginator" + VALUE "ProduktVersjon", "1.03" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_LOGO BITMAP "Fraginator Motif Icon.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON ICON "icon1.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// RT_MANIFEST +// + +1 RT_MANIFEST "default1.bin" +#endif // Norwegian (N.O.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/rosapps/applications/imagesoft/lang/no-NO.rc b/rosapps/applications/imagesoft/lang/no-NO.rc index 95d1a5a0d1d..9b13f88696b 100644 --- a/rosapps/applications/imagesoft/lang/no-NO.rc +++ b/rosapps/applications/imagesoft/lang/no-NO.rc @@ -45,17 +45,27 @@ BEGIN MENUITEM "&Historie", ID_HISTORY, CHECKED MENUITEM "&Statuslinje", ID_STATUSBAR, CHECKED END - POPUP "&Bilde" + POPUP "&Still" BEGIN - MENUITEM "&Crop...", -1, GRAYED - MENUITEM "&Endre stшrrelse ...", -1, GRAYED - MENUITEM "R&oter ...", -1, GRAYED - MENUITEM "&Flip...", -1, GRAYED - MENUITEM "&Strekk...", -1, GRAYED - MENUITEM "S&kew...", -1, GRAYED - MENUITEM "&Inverter Farger", -1, GRAYED + MENUITEM "Lysstyrke...", ID_BRIGHTNESS + MENUITEM "Kontrast...", ID_CONTRAST + MENUITEM "Fargetone/metning...", -1, GRAYED + POPUP "Farger" + BEGIN + MENUITEM "Svart og hvit" ID_BLACKANDWHITE + MENUITEM "Inverter farger" ID_INVERTCOLORS + END MENUITEM SEPARATOR - MENUITEM "&Attributter...", -1, GRAYED + MENUITEM "Uskarphet", ID_BLUR + MENUITEM "Sharpen", ID_SHARPEN + MENUITEM "Jevne kantlinje", -1, GRAYED + MENUITEM "Legg til skygger", -1, GRAYED + MENUITEM SEPARATOR + MENUITEM "Bilde stшrrelse...", -1, GRAYED + MENUITEM "Flip", -1, GRAYED + MENUITEM "Speil", -1, GRAYED + MENUITEM "Rotere", -1, GRAYED + END POPUP "&Farger" BEGIN @@ -87,21 +97,21 @@ BEGIN END IDD_BRIGHTNESS DIALOGEX 6, 5, 193, 120 -CAPTION "Brightness" +CAPTION "Lysstyrke" FONT 8,"MS Shell Dlg", 0, 0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN LTEXT "", IDC_PICPREVIEW, 0, 1, 132, 96, SS_OWNERDRAW | SS_SUNKEN - LTEXT "Color form:", IDC_STATIC, 135, 5, 36, 9 + LTEXT "Farge form:", IDC_STATIC, 135, 5, 36, 9 GROUPBOX "", IDC_BRI_GROUP, 138 ,30, 50, 48 CONTROL "Full (RGB)", IDC_BRI_FULL, "Button", BS_AUTORADIOBUTTON, 138, 18, 46, 9 - CONTROL "Red", IDC_BRI_RED, "Button", BS_AUTORADIOBUTTON, 142, 38, 42, 9 - CONTROL "Green", IDC_BRI_GREEN, "Button", BS_AUTORADIOBUTTON, 142, 51, 42, 9 - CONTROL "Blue", IDC_BRI_BLUE, "Button", BS_AUTORADIOBUTTON, 142, 64, 42, 9 + CONTROL "Rшd", IDC_BRI_RED, "Button", BS_AUTORADIOBUTTON, 142, 38, 42, 9 + CONTROL "Grшnn", IDC_BRI_GREEN, "Button", BS_AUTORADIOBUTTON, 142, 51, 42, 9 + CONTROL "Blе", IDC_BRI_BLUE, "Button", BS_AUTORADIOBUTTON, 142, 64, 42, 9 EDITTEXT IDC_BRI_EDIT, 98, 103, 28, 13 CONTROL "", IDC_BRI_TRACKBAR, "msctls_trackbar32", TBS_BOTH | TBS_NOTICKS | WS_TABSTOP, 2, 105, 90, 11 PUSHBUTTON "OK", IDOK, 142, 88, 48, 13 - PUSHBUTTON "Cancel", IDCANCEL, 142, 105, 48, 13 + PUSHBUTTON "Avbryt", IDCANCEL, 142, 105, 48, 13 END IDD_ABOUTBOX DIALOGEX 22,16,210,182 @@ -110,7 +120,7 @@ FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME //EXSTYLE WS_EX_LAYERED BEGIN - LTEXT "ImageSoft v0.1\nCopyright (C) 2006\nThomas Weidenmueller (w3seek@reactos.org)\nGed Murphy (gedmurphy@gmail.com)", IDC_STATIC, 48, 7, 150, 36 + LTEXT "ImageSoft v0.1\nEnerett (C) 2006\nThomas Weidenmueller (w3seek@reactos.org)\nGed Murphy (gedmurphy@gmail.com)", IDC_STATIC, 48, 7, 150, 36 PUSHBUTTON "Lukk", IDOK, 75, 162, 44, 15 ICON IDI_IMAGESOFTICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE diff --git a/rosapps/applications/packmgr/gui/lang/no-NO.rc b/rosapps/applications/packmgr/gui/lang/no-NO.rc new file mode 100644 index 00000000000..59d64f03561 --- /dev/null +++ b/rosapps/applications/packmgr/gui/lang/no-NO.rc @@ -0,0 +1,43 @@ + +LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL + +/* Dialogs */ +IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 180, 200 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Valg" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "There are no options yet.", 0, 50, 95, 80, 8 +END + +IDD_DOIT DIALOGEX DISCARDABLE 0, 0, 180, 100 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Utfшre valget" +FONT 8, "MS Shell Dlg" +BEGIN + + CTEXT "{Status}", IDC_TSTATUS, 0, 10, 180, 8 + + CONTROL "", IDC_STATUS1, "msctls_progress32", PBS_SMOOTH, 20, 25, 140, 15 + + CONTROL "", IDC_STATUS2, "msctls_progress32", PBS_SMOOTH, 20, 45, 140, 15 + + PUSHBUTTON "Avbryt", IDC_CANCEL, 65, 70, 50, 14, WS_DISABLED +END + +IDR_POPUP MENU DISCARDABLE +BEGIN + POPUP "PopUp", MENUBARBREAK + BEGIN + MENUITEM "Ingen valg", 1, GRAYED + MENUITEM "Installere (anbefalt)", 2, GRAYED + MENUITEM "Installere fra kilde", 3, GRAYED + MENUITEM "Oppdater", 4, GRAYED + MENUITEM "Avinstaller", 5, GRAYED + MENUITEM SEPARATOR + MENUITEM "Valg", 8 + MENUITEM SEPARATOR + MENUITEM "Gjшr det", 6 + END +END + diff --git a/rosapps/applications/packmgr/gui/packmgr.rc b/rosapps/applications/packmgr/gui/packmgr.rc index 32f152a9dae..86b30f8d000 100644 --- a/rosapps/applications/packmgr/gui/packmgr.rc +++ b/rosapps/applications/packmgr/gui/packmgr.rc @@ -22,5 +22,6 @@ #include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/uk-UA.rc" +#include "lang/no-NO.rc" /* EOF */ diff --git a/rosapps/applications/packmgr/lib/lang/no-NO.rc b/rosapps/applications/packmgr/lib/lang/no-NO.rc new file mode 100644 index 00000000000..ea6076e6133 --- /dev/null +++ b/rosapps/applications/packmgr/lib/lang/no-NO.rc @@ -0,0 +1,25 @@ + +LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL + +/* String Tables */ +STRINGTABLE DISCARDABLE +BEGIN + IDS_LOAD "Laster ..." + ERR_OK "Arbeidsoppgave fullfшrt." + ERR_PACK "Ikke alle pakke kunne bli installert\n\nVennligst se pе logg filen for е fе detaljer." + ERR_GENERIC "En feil har oppstеtt. \nFor mere informasjon vennligst se pе logg filen." + ERR_DOWNL "En fil som trengs kunne ikke bli lastet ned!\nFor mere informasjon vennligst se pе logg filen." + ERR_FILE "Feil med skript utfшrelse.\nFilen kunne ikke еpnes." + + ERR_SYNATX "Feil med skript utfшrelse.\nFeil Syntaks." + ERR_CALL "Feil med skript utfшrelse.\nKunne ikke finne funksjon." + ERR_PARAMETER "Feil med skript utfшrelse.\nFeil Parameter(e)." + + ERR_DEP1 "For е installere denne pakken trenger du ogsе е installere disse pakken(e) ogsе:\n\n:\n\n" + ERR_DEP2 "\nDVil du gjшre dette ?" + ERR_READY "Du har valg е installere %d pakke(r). For е installere disse mе du lese og godta hver av disse lisensene. \n\nШnsker du fortsatt е fortsette ?" +END + +123 RCDATA "options.xml" + +/* EOF */ diff --git a/rosapps/applications/packmgr/lib/package.rc b/rosapps/applications/packmgr/lib/package.rc index 9e93925d924..d6a6e525456 100644 --- a/rosapps/applications/packmgr/lib/package.rc +++ b/rosapps/applications/packmgr/lib/package.rc @@ -17,5 +17,6 @@ #include "lang/fr-FR.rc" #include "lang/ru-RU.rc" #include "lang/uk-UA.rc" +#include "lang/no-NO.rc" /* EOF */ diff --git a/rosapps/applications/screensavers/blankscr/lang/no-NO.rc b/rosapps/applications/screensavers/blankscr/lang/no-NO.rc new file mode 100644 index 00000000000..f83f915f5ef --- /dev/null +++ b/rosapps/applications/screensavers/blankscr/lang/no-NO.rc @@ -0,0 +1,7 @@ +LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL + +STRINGTABLE DISCARDABLE +BEGIN + IDS_DESCRIPTION "Tom skjerm" + IDS_TEXT "Ingen valg trenger е settes." +END diff --git a/rosapps/applications/screensavers/blankscr/scrnsave.rc b/rosapps/applications/screensavers/blankscr/scrnsave.rc index 8e18421df1c..84dbd06854e 100644 --- a/rosapps/applications/screensavers/blankscr/scrnsave.rc +++ b/rosapps/applications/screensavers/blankscr/scrnsave.rc @@ -17,6 +17,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include "lang/fr-FR.rc" #include "lang/lt-LT.rc" #include "lang/nl-NL.rc" +#include "lang/no-NO.rc" #include "lang/pl-PL.rc" #include "lang/sk-SK.rc" #include "lang/uk-UA.rc" diff --git a/rosapps/applications/screensavers/cylfrac/cylfrac.rc b/rosapps/applications/screensavers/cylfrac/cylfrac.rc index 9aa94bffadd..665fe54b6c2 100644 --- a/rosapps/applications/screensavers/cylfrac/cylfrac.rc +++ b/rosapps/applications/screensavers/cylfrac/cylfrac.rc @@ -17,6 +17,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include "lang/fr-FR.rc" #include "lang/lt-LT.rc" #include "lang/nl-NL.rc" +#include "lang/no-NO.rc" #include "lang/pl-PL.rc" #include "lang/sk-SK.rc" #include "lang/uk-UA.rc" diff --git a/rosapps/applications/screensavers/cylfrac/lang/no-NO.rc b/rosapps/applications/screensavers/cylfrac/lang/no-NO.rc new file mode 100644 index 00000000000..9f75d33207f --- /dev/null +++ b/rosapps/applications/screensavers/cylfrac/lang/no-NO.rc @@ -0,0 +1,8 @@ +LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL + +STRINGTABLE DISCARDABLE +BEGIN + IDS_DESCRIPTION "Sylindere fraktal" + IDS_TITLE "Om" + IDS_TEXT "Sylindere fraktal av unC0Rr.\nSpesielt for ReactOS." +END diff --git a/rosapps/applications/screensavers/matrix/lang/no-NO.rc b/rosapps/applications/screensavers/matrix/lang/no-NO.rc new file mode 100644 index 00000000000..11ef165740d --- /dev/null +++ b/rosapps/applications/screensavers/matrix/lang/no-NO.rc @@ -0,0 +1,53 @@ +#include "resource.h" + +LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL + +IDD_CONFIG DIALOGEX DISCARDABLE 0, 0, 340, 183 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Matrix Skjermsparer konfigurasjon" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Dekode &hastighet",IDC_STATIC,7,7,128,36 + LTEXT "Tregere",IDC_STATIC,13,24,22,8 + CONTROL "Slider1",IDC_SLIDER1,"msctls_trackbar32",TBS_AUTOTICKS | + TBS_BOTH | WS_TABSTOP,38,17,62,22 + LTEXT "Raskere",IDC_STATIC,104,24,20,8 + GROUPBOX "Siffer &tetthet",IDC_STATIC,7,50,128,36 + LTEXT "Mindre",IDC_STATIC,13,67,19,8 + CONTROL "Slider1",IDC_SLIDER2,"msctls_trackbar32",TBS_AUTOTICKS | + TBS_BOTH | WS_TABSTOP,38,60,62,22 + LTEXT "Mere",IDC_STATIC,104,67,23,8 + GROUPBOX "&Melding skjermhastighet",IDC_MSGSPEEDGRP,7,93,127,36 + LTEXT "Tregere",IDC_STATIC,13,110,22,8 + CONTROL "Slider3",IDC_SLIDER3,"msctls_trackbar32",TBS_AUTOTICKS | + TBS_BOTH | WS_TABSTOP,38,103,62,22 + LTEXT "Raskere",IDC_STATIC,104,110,22,8 + GROUPBOX "&Skriftstшrrelse",IDC_STATIC,7,137,127,36 + LTEXT "Mindre",IDC_STATIC,13,153,24,8 + CONTROL "Slider3",IDC_SLIDER4,"msctls_trackbar32",TBS_AUTOTICKS | + TBS_BOTH | WS_TABSTOP,38,146,62,22 + LTEXT "Stшrre",IDC_STATIC,104,153,25,8 + GROUPBOX "&Kodet meldinger",IDC_STATIC,145,7,188,142 + COMBOBOX IDC_COMBO1,153,22,172,62,CBS_DROPDOWN | WS_VSCROLL | + WS_TABSTOP + CONTROL "",IDC_PREVIEW,"Static",SS_LEFTNOWORDWRAP | + SS_CENTERIMAGE | WS_GROUP,154,39,116,72 + PUSHBUTTON "&Legg til",IDC_ADD,280,41,44,18 + PUSHBUTTON "&Fjern",IDC_REMOVE,280,66,44,18 + CONTROL "Tilfeldig melding",IDC_RANDOM,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,151,134,85,10 + DEFPUSHBUTTON "OK",IDOK,222,162,50,14 + PUSHBUTTON "Avbryt",IDCANCEL,283,162,50,14 + LTEXT "&Skrifttype:",IDC_STATIC,151,118,38,8 + COMBOBOX IDC_COMBO2,195,116,130,71,CBS_DROPDOWNLIST | CBS_SORT | + WS_VSCROLL | WS_TABSTOP + CONTROL "&Fet skrift",IDC_BOLD,"Button",BS_AUTOCHECKBOX | + BS_MULTILINE | WS_TABSTOP,247,134,46,10 + CTEXT "Matrix Skjermsparer www.catch22.org.uk",IDC_ABOUT,140, + 158,75,18 +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_DESCRIPTION "Matrix Skjermsparer" +END diff --git a/rosapps/applications/screensavers/matrix/rsrc.rc b/rosapps/applications/screensavers/matrix/rsrc.rc index dabf17a0a64..87a8bf410c9 100644 --- a/rosapps/applications/screensavers/matrix/rsrc.rc +++ b/rosapps/applications/screensavers/matrix/rsrc.rc @@ -14,6 +14,7 @@ IDI_ICON1 ICON DISCARDABLE "icon1.ico" #include "lang/fr-FR.rc" #include "lang/lt-LT.rc" #include "lang/nl-NL.rc" +#include "lang/no-NO.rc" #include "lang/pl-PL.rc" #include "lang/sk-SK.rc" #include "lang/th-TH.rc" diff --git a/rosapps/applications/screensavers/mazescr/lang/no-NO.rc b/rosapps/applications/screensavers/mazescr/lang/no-NO.rc new file mode 100644 index 00000000000..0c64f243658 --- /dev/null +++ b/rosapps/applications/screensavers/mazescr/lang/no-NO.rc @@ -0,0 +1,8 @@ +LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL + +STRINGTABLE DISCARDABLE +BEGIN + IDS_DESCRIPTION "Maze Skjermsparer" + IDS_TITLE "Om" + IDS_TEXT "Ingen valg trengs е settes." +END diff --git a/rosapps/applications/screensavers/mazescr/scrnsave.rc b/rosapps/applications/screensavers/mazescr/scrnsave.rc index 66763e61fda..12383a2ff8c 100644 --- a/rosapps/applications/screensavers/mazescr/scrnsave.rc +++ b/rosapps/applications/screensavers/mazescr/scrnsave.rc @@ -18,3 +18,4 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include "lang/pl-PL.rc" #include "lang/sk-SK.rc" #include "lang/uk-UA.rc" +#include "lang/no-NO.rc" diff --git a/rosapps/applications/screensavers/starfield/lang/no-NO.rc b/rosapps/applications/screensavers/starfield/lang/no-NO.rc new file mode 100644 index 00000000000..416890253c6 --- /dev/null +++ b/rosapps/applications/screensavers/starfield/lang/no-NO.rc @@ -0,0 +1,8 @@ +LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL + +STRINGTABLE DISCARDABLE +BEGIN + IDS_DESCRIPTION "Starfield Skjermsparer" + IDS_TITLE "Om" + IDS_TEXT "Ingen valg trenger е settes." +END diff --git a/rosapps/applications/screensavers/starfield/starfield.rc b/rosapps/applications/screensavers/starfield/starfield.rc index f881c504ea3..a7d0515fb32 100644 --- a/rosapps/applications/screensavers/starfield/starfield.rc +++ b/rosapps/applications/screensavers/starfield/starfield.rc @@ -17,6 +17,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include "lang/fr-FR.rc" #include "lang/lt-LT.rc" #include "lang/nl-NL.rc" +#include "lang/no-NO.rc" #include "lang/pl-PL.rc" #include "lang/sk-SK.rc" #include "lang/uk-UA.rc" diff --git a/rosapps/applications/sysutils/ctm/ctm.rc b/rosapps/applications/sysutils/ctm/ctm.rc index 74a8b5661db..58b17f8ba46 100644 --- a/rosapps/applications/sysutils/ctm/ctm.rc +++ b/rosapps/applications/sysutils/ctm/ctm.rc @@ -15,3 +15,4 @@ #include "lang/el-GR.rc" #include "lang/uk-UA.rc" #include "lang/ru-RU.rc" +#include "lang/no-NO.rc" diff --git a/rosapps/applications/sysutils/ctm/lang/no-NO.rc b/rosapps/applications/sysutils/ctm/lang/no-NO.rc new file mode 100644 index 00000000000..70df79b2340 --- /dev/null +++ b/rosapps/applications/sysutils/ctm/lang/no-NO.rc @@ -0,0 +1,32 @@ +// Norwegian (N.O.) resources + +LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL + +STRINGTABLE DISCARDABLE +BEGIN + IDS_APP_TITLE "Konsoll oppgavebehandler v0.1 av Aleksey Bragin " + + IDS_COLUMN_NUMBER "# " + IDS_COLUMN_IMAGENAME "Bilde navn " + IDS_COLUMN_PID "PID " + IDS_COLUMN_CPU "Prosesor" + IDS_COLUMN_MEM "Minnebruk" + IDS_COLUMN_MEM_UNIT "KB" + IDS_COLUMN_PF "Page Faults" + + IDS_IDLE_PROCESS "System Idle Process" + IDS_YES "J" + IDS_NO "N" + + IDS_MENU "Trykk: S - slutt, A - avslutt prosess" + IDS_MENU_QUIT "S" + IDS_MENU_KILL_PROCESS "A" + + IDS_KILL_PROCESS "Er du sikker pе at du vil avslutte denne prosessen? (J/n)" + IDS_KILL_PROCESS_ERR1 "Ikke mulig og avslutte denne prosessen..." + IDS_KILL_PROCESS_ERR2 "Ikke mulig og avslutte prosess %d (Ikke mulig og ЕpneProsess)" + + IDS_CTM_GENERAL_ERR1 "ctm: kan ikke bruke konsoll." + IDS_CTM_GENERAL_ERR2 "ctm: Kan ikke GetConsoleMode() for input konsoll." + IDS_CTM_GENERAL_ERR3 "ctm: kan ikke GetConsoleMode() for output konsoll." +END diff --git a/rosapps/applications/sysutils/systeminfo/lang/no-NO.rc b/rosapps/applications/sysutils/systeminfo/lang/no-NO.rc new file mode 100644 index 00000000000..a583983e594 --- /dev/null +++ b/rosapps/applications/sysutils/systeminfo/lang/no-NO.rc @@ -0,0 +1,64 @@ +LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL + +STRINGTABLE DISCARDABLE +BEGIN + +IDS_USAGE, "SYSTEMINFO [/S system [/U brukernavn [/P [passord]]]] [/FO format] [/NH]\n\n\ +Description:\n\ + This command line tool enables an administrator to query for basic\n\ + system configuration information.\n\n\ +Parameter List:\n\ + /S system Specifies the remote system to connect to.\n\n\ + /U [domene\\]bruker Specifies the user context under which\n\ + the command should execute.\n\n\ + /P [passord] Specifies the password for the given\n\ + user context. Prompts for input if omitted.\n\n\ + /FO format Specifies the format in which the output\n\ + is to be displayed.\n\ + Valid values: \"TABLE\", \"LIST\", \"CSV\".\n\n\ + /NH Specifies that the \"Column Header\" should\n\ + not be displayed in the output.\n\ + Valid only for \"TABLE\" and \"CSV\" formats.\n\n\ + /? Displays this help/usage.\n\n\ +Eksempler:\n\ + SYSTEMINFO\n\ + SYSTEMINFO /?\n\ + SYSTEMINFO /S system\n\ + SYSTEMINFO /S system /U bruker\n\ + SYSTEMINFO /S system /U domene\\user /P passord /FO TABLE\n\ + SYSTEMINFO /S system /FO LIST\n\ + SYSTEMINFO /S system /FO CSV /NH\n" + +IDS_OS_NAME, "OS navn: %s\n" +IDS_OS_VERSION, "OS versjon: %d.%d.%d %s" +IDS_OS_BUILD, " Bygget %s\n" +IDS_OS_BUILD_TYPE, "OS bygg type: %s\n" +IDS_REG_OWNER, "Registert eier: %s\n" +IDS_REG_ORG, "Registerert organisasjon: %s\n" +IDS_PRODUCT_ID, "Produkt ID: %s\n" +IDS_INST_DATE, "Installert dato: %s, " +IDS_INST_TIME, "%s\n" +IDS_SYS_TYPE_UNKNOWN, "System type: Ukjent\n" +IDS_SYS_TYPE_X86, "System type: X86-basert PC\n" +IDS_SYS_TYPE_IA64, "System type: IA64-basert PC\n" +IDS_SYS_TYPE_AMD64, "System type: AMD64-based PC\n" +IDS_PROCESSORS, "Prosessor(er): %u Prosessor(er) installert.\n" +IDS_ROS_DIR, "ReactOS mappe: %s\n" +IDS_SYS_DIR, "System mappe: %s\n" +IDS_BOOT_DEV, "Oppstartsenhet: %s\n" +IDS_SYS_LOCALE, "System lokal: %s\n" +IDS_INPUT_LOCALE, "Input lokal: %s\n" +IDS_TOTAL_PHYS_MEM, "Total fysisk minne: %ld MB (%ld KB)\n" +IDS_AVAIL_PHISICAL_MEM, "Tilgjengelig fysisk minne: %ld MB (%ld KB)\n" +IDS_VIRT_MEM_MAX, "Virtuelt minne: Maks Stшrrelse: %ld MB (%ld KB)\n" +IDS_VIRT_MEM_AVAIL, "Virtuelt minne: Tilgjengelig: %ld MB (%ld KB)\n" +IDS_VIRT_MEM_INUSE, "Virtuelt minne: i bruk: %ld MB (%ld KB)\n" +IDS_HOST_NAME, "Datamaskin navn: %s\n" +IDS_PAGEFILE_LOC, "Sidevekslingsfil lokalsjon(er) %s\n" +IDS_TIME_ZONE, "Tidssone: %s\n" +IDS_DOMINE, "Domene: %s\n" +IDS_BIOS_DATE, "BIOS dato: %s\n" +IDS_BIOS_VERSION, "BIOS Versjon: %s\n" +IDS_NETWORK_CARDS, "Nettverkskort(er) %u installert.\n" + +END diff --git a/rosapps/applications/sysutils/systeminfo/rsrc.rc b/rosapps/applications/sysutils/systeminfo/rsrc.rc index a0ad04fab03..7eb27791e83 100644 --- a/rosapps/applications/sysutils/systeminfo/rsrc.rc +++ b/rosapps/applications/sysutils/systeminfo/rsrc.rc @@ -7,3 +7,4 @@ #include "lang/fr-FR.rc" #include "lang/pl-PL.rc" #include "lang/uk-UA.rc" +#include "lang/no-NO.rc" From 1f06813c1a92c6fdd9a254013b8e3753872a16c7 Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Tue, 2 Sep 2008 14:37:34 +0000 Subject: [PATCH 288/324] remove the sysreg checkpoint as it isn't needed anymore, sysreg2 is smart enough to notice when the vm is shut down svn path=/trunk/; revision=35883 --- reactos/base/setup/usetup/interface/usetup.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/reactos/base/setup/usetup/interface/usetup.c b/reactos/base/setup/usetup/interface/usetup.c index a40728bb76c..2920793bf18 100644 --- a/reactos/base/setup/usetup/interface/usetup.c +++ b/reactos/base/setup/usetup/interface/usetup.c @@ -3752,10 +3752,6 @@ RunUSetup(VOID) } } - /// THE FOLLOWING DPRINT IS FOR THE SYSTEM REGRESSION TOOL - /// DO NOT REMOVE!!! - DPRINT1("SYSREG_CHECKPOINT:USETUP_COMPLETE\n"); - FreeConsole(); /* Avoid bugcheck */ From 923270b5f3e8a4aa7a4d5b7a2a5bc8f085b9c97e Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Tue, 2 Sep 2008 14:41:57 +0000 Subject: [PATCH 289/324] - Patch from hackbunny: Add _SEH_SetExceptionCode svn path=/trunk/; revision=35884 --- reactos/include/reactos/libs/pseh/framebased.h | 1 + 1 file changed, 1 insertion(+) diff --git a/reactos/include/reactos/libs/pseh/framebased.h b/reactos/include/reactos/libs/pseh/framebased.h index ea2c2e4cf2d..5fb06c1fb3b 100644 --- a/reactos/include/reactos/libs/pseh/framebased.h +++ b/reactos/include/reactos/libs/pseh/framebased.h @@ -154,6 +154,7 @@ static _SEHPortableTryLevel_t * const _SEHPortableTryLevel = 0; _SEHHandlers.SH_Finally = (FINALLY_); #endif +#define _SEH_SetExceptionCode(CODE_) (_SEHPortableFrame->SPF_Code = (CODE_)) #define _SEH_GetExceptionCode() (unsigned long)(_SEHPortableFrame->SPF_Code) #define _SEH_GetExceptionPointers() \ From 95880cc2dd2b9e96e668db69a10d3550b3c2c8fb Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Tue, 2 Sep 2008 15:07:27 +0000 Subject: [PATCH 290/324] - Fix 2 warnings (properly comment out unused code) svn path=/trunk/; revision=35886 --- reactos/drivers/wdm/audio/drivers/mpu401/adapter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/drivers/wdm/audio/drivers/mpu401/adapter.cpp b/reactos/drivers/wdm/audio/drivers/mpu401/adapter.cpp index 6011a343a0b..2850711496b 100644 --- a/reactos/drivers/wdm/audio/drivers/mpu401/adapter.cpp +++ b/reactos/drivers/wdm/audio/drivers/mpu401/adapter.cpp @@ -111,8 +111,8 @@ DriverEntry( IN PDRIVER_OBJECT Context1, IN PUNICODE_STRING Context2) { - PDEVICE_OBJECT DeviceObject; - UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Device\\MPU401Static"); + //PDEVICE_OBJECT DeviceObject; + //UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Device\\MPU401Static"); // KeBugCheck(0x0000007F); DPRINT1("MPU401_KS DriverEntry called, redirecting to PcInitializeAdapterDriver\n"); From 766324a01fe3f8f1c68a76ca7d9aa46e87d3608b Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Tue, 2 Sep 2008 18:44:10 +0000 Subject: [PATCH 291/324] - FlsAlloc (and Co.) should first be implemented, and then exported, because some apps/DLLs depend on that (they use FlsAlloc if it's available, and workaround if it's not). svn path=/trunk/; revision=35890 --- reactos/dll/win32/kernel32/kernel32.def | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reactos/dll/win32/kernel32/kernel32.def b/reactos/dll/win32/kernel32/kernel32.def index 00d10eda7c0..bdd6db6941c 100644 --- a/reactos/dll/win32/kernel32/kernel32.def +++ b/reactos/dll/win32/kernel32/kernel32.def @@ -274,10 +274,10 @@ FindResourceExW@16 FindResourceW@12 FindVolumeClose@4 FindVolumeMountPointClose@4 -FlsAlloc@4 -FlsFree@4 -FlsGetValue@4 -FlsSetValue@8 +;FlsAlloc@4 +;FlsFree@4 +;FlsGetValue@4 +;FlsSetValue@8 FlushConsoleInputBuffer@4 FlushFileBuffers@4 FlushInstructionCache@12 From 2e3327d922918e37928c48f2c15de2d892975dfd Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Tue, 2 Sep 2008 19:12:35 +0000 Subject: [PATCH 292/324] - Merge aicom-network-fixes up to r35889 svn path=/trunk/; revision=35891 --- reactos/drivers/network/ndis/ndis/buffer.c | 8 +++++++- reactos/drivers/network/ndis/ndis/config.c | 10 ++++++++-- reactos/drivers/network/ndis/ndis/efilter.c | 1 + reactos/drivers/network/ndis/ndis/hardware.c | 2 +- reactos/drivers/network/ndis/ndis/io.c | 3 ++- reactos/drivers/network/ndis/ndis/miniport.c | 12 +++++------- reactos/drivers/network/ndis/ndis/protocol.c | 2 ++ 7 files changed, 26 insertions(+), 12 deletions(-) diff --git a/reactos/drivers/network/ndis/ndis/buffer.c b/reactos/drivers/network/ndis/ndis/buffer.c index 4ea78f4ab5b..a87d36d6660 100644 --- a/reactos/drivers/network/ndis/ndis/buffer.c +++ b/reactos/drivers/network/ndis/ndis/buffer.c @@ -408,6 +408,8 @@ NdisAllocatePacket( NDIS_DbgPrint(MAX_TRACE, ("Status (0x%X) Packet (0x%X) PoolHandle (0x%X).\n", Status, Packet, PoolHandle)); + *Packet = NULL; + if (Pool == NULL) { *Status = NDIS_STATUS_FAILURE; @@ -488,6 +490,8 @@ NdisAllocatePacketPoolEx( "NumberOfDescriptors (%d) ProtocolReservedLength (%d).\n", Status, PoolHandle, NumberOfDescriptors, ProtocolReservedLength)); + *PoolHandle = NULL; + if (NumberOfDescriptors > 0xffff) { *Status = NDIS_STATUS_RESOURCES; @@ -528,8 +532,9 @@ NdisAllocatePacketPoolEx( *Status = NDIS_STATUS_SUCCESS; *PoolHandle = (PNDIS_HANDLE)Pool; - } else + } else { *Status = NDIS_STATUS_RESOURCES; + } } } @@ -705,6 +710,7 @@ NdisDprAllocatePacket( * PoolHandle = Handle returned by NdisAllocatePacketPool */ { + *Status = NDIS_STATUS_FAILURE; } diff --git a/reactos/drivers/network/ndis/ndis/config.c b/reactos/drivers/network/ndis/ndis/config.c index 2199328e04d..61a2da0d04a 100644 --- a/reactos/drivers/network/ndis/ndis/config.c +++ b/reactos/drivers/network/ndis/ndis/config.c @@ -193,13 +193,14 @@ NdisOpenConfiguration( NDIS_DbgPrint(MAX_TRACE, ("Called\n")); + *ConfigurationHandle = NULL; + *Status = ZwDuplicateObject(NtCurrentProcess(), RootKeyHandle, NtCurrentProcess(), &KeyHandle, 0, 0, DUPLICATE_SAME_ACCESS); if(!NT_SUCCESS(*Status)) { NDIS_DbgPrint(MID_TRACE, ("Failed to open registry configuration for this miniport\n")); - *ConfigurationHandle = NULL; *Status = NDIS_STATUS_FAILURE; return; } @@ -743,7 +744,8 @@ NdisReadNetworkAddress( if(!MiniportResource) { NDIS_DbgPrint(MIN_TRACE,("Insufficient resources.\n")); - *Status = NDIS_STATUS_FAILURE; + ExFreePool(IntArray); + *Status = NDIS_STATUS_RESOURCES; return; } @@ -797,6 +799,8 @@ NdisOpenConfigurationKeyByIndex( NDIS_HANDLE RegKeyHandle; PMINIPORT_CONFIGURATION_CONTEXT ConfigurationContext; + *KeyHandle = NULL; + *Status = ZwEnumerateKey(ConfigurationHandle, Index, KeyBasicInformation, NULL, 0, &KeyInformationLength); if(*Status != STATUS_BUFFER_TOO_SMALL && *Status != STATUS_BUFFER_OVERFLOW && *Status != STATUS_SUCCESS) { @@ -885,6 +889,8 @@ NdisOpenConfigurationKeyByName( OBJECT_ATTRIBUTES KeyAttributes; NDIS_HANDLE RegKeyHandle; + *KeyHandle = NULL; + InitializeObjectAttributes(&KeyAttributes, KeyName, OBJ_CASE_INSENSITIVE, ConfigurationHandle, 0); *Status = ZwOpenKey(&RegKeyHandle, KEY_ALL_ACCESS, &KeyAttributes); diff --git a/reactos/drivers/network/ndis/ndis/efilter.c b/reactos/drivers/network/ndis/ndis/efilter.c index 8c72e8b65d0..90a59b99bb7 100644 --- a/reactos/drivers/network/ndis/ndis/efilter.c +++ b/reactos/drivers/network/ndis/ndis/efilter.c @@ -44,6 +44,7 @@ EthCreateFilter( *Filter = (PETH_FILTER)NewFilter; return TRUE; } + *Filter = NULL; return FALSE; } diff --git a/reactos/drivers/network/ndis/ndis/hardware.c b/reactos/drivers/network/ndis/ndis/hardware.c index f855b0410ca..022fef52daa 100644 --- a/reactos/drivers/network/ndis/ndis/hardware.c +++ b/reactos/drivers/network/ndis/ndis/hardware.c @@ -125,7 +125,7 @@ NdisMQueryAdapterResources( &MiniportBlock->AllocatedResources->List[0].PartialResourceList, ResourceListSize); *BufferSize = ResourceListSize; - *Status = STATUS_SUCCESS; + *Status = NDIS_STATUS_SUCCESS; } else { diff --git a/reactos/drivers/network/ndis/ndis/io.c b/reactos/drivers/network/ndis/ndis/io.c index 439529e3f54..160ea28be79 100644 --- a/reactos/drivers/network/ndis/ndis/io.c +++ b/reactos/drivers/network/ndis/ndis/io.c @@ -841,6 +841,8 @@ NdisMRegisterIoPortRange( PNDIS_MINIPORT_BLOCK Adapter = (PNDIS_MINIPORT_BLOCK)MiniportAdapterHandle; ULONG AddressSpace = 1; /* FIXME The HAL handles this wrong atm */ + *PortOffset = 0; + NDIS_DbgPrint(MAX_TRACE, ("Called - InitialPort 0x%x, NumberOfPorts 0x%x\n", InitialPort, NumberOfPorts)); memset(&PortAddress, 0, sizeof(PortAddress)); @@ -878,7 +880,6 @@ NdisMRegisterIoPortRange( NDIS_DbgPrint(MAX_TRACE, ("calling MmMapIoSpace\n")); - *PortOffset = 0; *PortOffset = MmMapIoSpace(TranslatedAddress, NumberOfPorts, MmNonCached); NDIS_DbgPrint(MAX_TRACE, ("Returning 0x%x for port range\n", *PortOffset)); diff --git a/reactos/drivers/network/ndis/ndis/miniport.c b/reactos/drivers/network/ndis/ndis/miniport.c index bcad528bce8..5927af063b6 100644 --- a/reactos/drivers/network/ndis/ndis/miniport.c +++ b/reactos/drivers/network/ndis/ndis/miniport.c @@ -562,13 +562,6 @@ MiniQueryInformation( /* FIXME: Wait in pending case! */ - /* XXX is status_pending part of success macro? */ - if ((NT_SUCCESS(NdisStatus)) || (NdisStatus == NDIS_STATUS_PENDING)) - { - NDIS_DbgPrint(DEBUG_MINIPORT, ("Miniport returned status (0x%X).\n", NdisStatus)); - return NdisStatus; - } - return NdisStatus; } @@ -1017,6 +1010,7 @@ NdisInitializeWrapper( RegistryPath = ExAllocatePool(PagedPool, sizeof(UNICODE_STRING)); if(!RegistryPath) { + ExFreePool(Miniport); NDIS_DbgPrint(MIN_TRACE, ("Insufficient resources.\n")); return; } @@ -1028,6 +1022,8 @@ NdisInitializeWrapper( if(!RegistryBuffer) { NDIS_DbgPrint(MIN_TRACE, ("Insufficient resources.\n")); + ExFreePool(Miniport); + ExFreePool(RegistryPath); return; } @@ -1424,6 +1420,7 @@ NdisIPnPStartDevice( { NDIS_DbgPrint(MIN_TRACE, ("MiniportInitialize() failed for an adapter.\n")); ExInterlockedRemoveEntryList( &Adapter->ListEntry, &AdapterListLock ); + if (NdisStatus == NDIS_STATUS_SUCCESS) NdisStatus = NDIS_STATUS_FAILURE; return (NTSTATUS)NdisStatus; } @@ -1466,6 +1463,7 @@ NdisIPnPStartDevice( Adapter->LookaheadBuffer = NULL; } ExInterlockedRemoveEntryList( &Adapter->ListEntry, &AdapterListLock ); + if (NdisStatus == NDIS_STATUS_SUCCESS) NdisStatus = NDIS_STATUS_FAILURE; return (NTSTATUS)NdisStatus; } diff --git a/reactos/drivers/network/ndis/ndis/protocol.c b/reactos/drivers/network/ndis/ndis/protocol.c index 3fa7c3922c1..59ad6f2b454 100644 --- a/reactos/drivers/network/ndis/ndis/protocol.c +++ b/reactos/drivers/network/ndis/ndis/protocol.c @@ -674,6 +674,8 @@ NdisRegisterProtocol( NDIS_DbgPrint(MAX_TRACE, ("Called.\n")); + *NdisProtocolHandle = NULL; + /* first validate the PROTOCOL_CHARACTERISTICS */ switch (ProtocolCharacteristics->MajorNdisVersion) { From cae5d127c8ac3155895c9df9fdcd84132bed7e8d Mon Sep 17 00:00:00 2001 From: Andrew Munger Date: Tue, 2 Sep 2008 21:33:51 +0000 Subject: [PATCH 293/324] Pass the ImagePath buffer as the command line, not the application name. After the recent changes, the ImaagePath buffer contains a properly formatted command line. This change allows you to start services with parameters listed in the ImagePath, like Abyss and MySQL. svn path=/trunk/; revision=35893 --- reactos/base/system/services/database.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/base/system/services/database.c b/reactos/base/system/services/database.c index ecc9186bedc..3fd38d94ae6 100644 --- a/reactos/base/system/services/database.c +++ b/reactos/base/system/services/database.c @@ -896,8 +896,8 @@ ScmStartUserModeService(PSERVICE Service, StartupInfo.cbReserved2 = 0; StartupInfo.lpReserved2 = 0; - Result = CreateProcessW(ImagePath.Buffer, - NULL, + Result = CreateProcessW(NULL, + ImagePath.Buffer, NULL, NULL, FALSE, From a84ca6d5c646378a5c7bb325ed22b8f1ea289c4b Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Wed, 3 Sep 2008 00:32:07 +0000 Subject: [PATCH 294/324] - Merge aicom-network-fixes up to r35899 svn path=/trunk/; revision=35901 --- reactos/lib/drivers/ip/network/arp.c | 2 ++ reactos/lib/drivers/ip/transport/rawip/rawip.c | 7 +++++++ reactos/lib/drivers/ip/transport/tcp/if.c | 2 +- reactos/lib/drivers/ip/transport/udp/udp.c | 2 ++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/reactos/lib/drivers/ip/network/arp.c b/reactos/lib/drivers/ip/network/arp.c index 1ac2d5baaef..5c830589ca8 100644 --- a/reactos/lib/drivers/ip/network/arp.c +++ b/reactos/lib/drivers/ip/network/arp.c @@ -150,6 +150,8 @@ BOOLEAN ARPTransmit(PIP_ADDRESS Address, PIP_INTERFACE Interface) &Address->Address, /* Target's (remote) protocol address */ ARP_OPCODE_REQUEST); /* ARP request */ + if( !NdisPacket ) return FALSE; + ASSERT_KM_POINTER(NdisPacket); ASSERT_KM_POINTER(PC(NdisPacket)); PC(NdisPacket)->DLComplete = ARPTransmitComplete; diff --git a/reactos/lib/drivers/ip/transport/rawip/rawip.c b/reactos/lib/drivers/ip/transport/rawip/rawip.c index 5422b17d131..90f0ac7b775 100644 --- a/reactos/lib/drivers/ip/transport/rawip/rawip.c +++ b/reactos/lib/drivers/ip/transport/rawip/rawip.c @@ -143,6 +143,13 @@ NTSTATUS BuildRawIpPacket( break; } + if( !NT_SUCCESS(Status) ) { + TI_DbgPrint(MIN_TRACE, ("Cannot add header. Status = (0x%X)\n", + Status)); + FreeNdisPacket(Packet->NdisPacket); + return Status; + } + TI_DbgPrint(MID_TRACE, ("Copying data (hdr %x data %x (%d))\n", Packet->Header, Packet->Data, (PCHAR)Packet->Data - (PCHAR)Packet->Header)); diff --git a/reactos/lib/drivers/ip/transport/tcp/if.c b/reactos/lib/drivers/ip/transport/tcp/if.c index 9821d367dfe..225215e31f7 100644 --- a/reactos/lib/drivers/ip/transport/tcp/if.c +++ b/reactos/lib/drivers/ip/transport/tcp/if.c @@ -34,9 +34,9 @@ PVOID TCPPrepareInterface( PIP_INTERFACE IF ) { NTSTATUS Status; POSK_IFADDR ifaddr = exAllocatePool ( NonPagedPool, sizeof(*ifaddr) + 2 * sizeof( struct sockaddr_in ) ); + if( !ifaddr ) return NULL; struct sockaddr_in *addr_in = (struct sockaddr_in *)&ifaddr[1]; struct sockaddr_in *dstaddr_in = (struct sockaddr_in *)&addr_in[1]; - if( !ifaddr ) return NULL; TI_DbgPrint(DEBUG_TCPIF,("Called\n")); diff --git a/reactos/lib/drivers/ip/transport/udp/udp.c b/reactos/lib/drivers/ip/transport/udp/udp.c index 07561d44036..1dba3035179 100644 --- a/reactos/lib/drivers/ip/transport/udp/udp.c +++ b/reactos/lib/drivers/ip/transport/udp/udp.c @@ -330,6 +330,8 @@ NTSTATUS UDPShutdown( /* Deregister this protocol with IP layer */ IPRegisterProtocol(IPPROTO_UDP, NULL); + UDPInitialized = FALSE; + return STATUS_SUCCESS; } From ee4c3af21063e6272bcb776b234fa17442af753f Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Wed, 3 Sep 2008 05:43:34 +0000 Subject: [PATCH 295/324] remove another obsolete sysreg checkpoint svn path=/trunk/; revision=35907 --- reactos/dll/win32/syssetup/install.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/reactos/dll/win32/syssetup/install.c b/reactos/dll/win32/syssetup/install.c index 7ec896ffedc..df20011587b 100644 --- a/reactos/dll/win32/syssetup/install.c +++ b/reactos/dll/win32/syssetup/install.c @@ -979,13 +979,6 @@ InstallReactOS(HINSTANCE hInstance) return 0; } - if (SetupData.BootCDRegtestActive) - { - /// THE FOLLOWING DPRINT IS FOR THE SYSTEM REGRESSION TOOL - /// DO NOT REMOVE!!! - DbgPrint("SYSREG_CHECKPOINT:SYSSETUP_COMPLETE\n"); - } - ExitWindowsEx(EWX_REBOOT, 0); return 0; } From 9e70288511f5a1646c767043af7c5d3fca34d42f Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Wed, 3 Sep 2008 06:05:00 +0000 Subject: [PATCH 296/324] netshell doesn't have a DllInstall function svn path=/trunk/; revision=35908 --- reactos/dll/win32/netshell/netshell.rbuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/dll/win32/netshell/netshell.rbuild b/reactos/dll/win32/netshell/netshell.rbuild index e2bb4ce657a..6e9f8e83f2c 100644 --- a/reactos/dll/win32/netshell/netshell.rbuild +++ b/reactos/dll/win32/netshell/netshell.rbuild @@ -1,5 +1,5 @@ - + . 0x600 From 63f818683a72bfc910cbc6ae860bea3e3d9b3ea2 Mon Sep 17 00:00:00 2001 From: Dmitry Chapyshev Date: Wed, 3 Sep 2008 15:43:42 +0000 Subject: [PATCH 297/324] - Update Russian translation svn path=/trunk/; revision=35912 --- reactos/dll/win32/netshell/lang/ru-RU.rc | 69 ++++++++++++------------ reactos/dll/win32/shell32/lang/ru-RU.rc | 6 +-- 2 files changed, 37 insertions(+), 38 deletions(-) diff --git a/reactos/dll/win32/netshell/lang/ru-RU.rc b/reactos/dll/win32/netshell/lang/ru-RU.rc index f95012cd4dd..91c8fff75dd 100644 --- a/reactos/dll/win32/netshell/lang/ru-RU.rc +++ b/reactos/dll/win32/netshell/lang/ru-RU.rc @@ -2,47 +2,47 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_NETPROPERTIES DIALOGEX DISCARDABLE 0, 0, 246, 246 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "Основные" +CAPTION "Общие" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", IDC_COMPONENTSLIST, "SysListView32", LVS_LIST | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 9, 71, 230, 55 - LTEXT "Соединение Использует:", -1, 9,9,217,8 - EDITTEXT IDC_NETCARDNAME, 9, 21, 230, 12, WS_BORDER | WS_DISABLED | WS_TABSTOP - PUSHBUTTON "&Настроить", IDC_CONFIGURE, 189, 38, 50, 14 - LTEXT "Отмеченые элементы используются при соединении:", -1, 9, 59, 217, 8 - PUSHBUTTON "&Установить", IDC_INSTALL, 9, 130, 65, 14, WS_DISABLED | WS_TABSTOP - PUSHBUTTON "&Удалить", IDC_UNINSTALL, 90, 130, 65, 14, WS_DISABLED | WS_TABSTOP - PUSHBUTTON "&Свойства", IDC_PROPERTIES, 174, 130, 65, 14 - GROUPBOX "Описание", -1, 9, 153, 230, 46, BS_GROUPBOX - LTEXT "Свойства компонента изложены ниже...", IDC_DESCRIPTION, 15, 165, 217, 28, WS_GROUP - CHECKBOX "Отображать значек в трее при установленом соединении", IDC_SHOWTASKBAR, 9, 206, 230, 12, BS_AUTOCHECKBOX | WS_TABSTOP - CHECKBOX "Оповещать в случае разрыва соединения", IDC_NOTIFYNOCONNECTION, 9, 220, 230, 12, BS_AUTOCHECKBOX | WS_TABSTOP + CONTROL "", IDC_COMPONENTSLIST, "SysListView32", LVS_LIST | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 9, 71, 230, 55 + LTEXT "Подключение через:", -1, 9, 9, 217, 8 + EDITTEXT IDC_NETCARDNAME, 9, 21, 230, 12, WS_BORDER | WS_DISABLED | WS_TABSTOP + PUSHBUTTON "&Настроить...", IDC_CONFIGURE, 174, 38, 65, 14 + LTEXT "Отмеченые компоненты используются этим подключением:", -1, 9, 59, 217, 8 + PUSHBUTTON "&Установить...", IDC_INSTALL, 9, 130, 65, 14, WS_DISABLED | WS_TABSTOP + PUSHBUTTON "&Удалить", IDC_UNINSTALL, 90, 130, 65, 14, WS_DISABLED | WS_TABSTOP + PUSHBUTTON "&Свойства", IDC_PROPERTIES, 174, 130, 65, 14 + GROUPBOX "Описание", -1, 9, 153, 230, 46, BS_GROUPBOX + LTEXT "Свойства компонента перечислены ниже...", IDC_DESCRIPTION, 15, 165, 217, 28, WS_GROUP + CHECKBOX "Отображать значек в трее при установленом соединении", IDC_SHOWTASKBAR, 9, 206, 230, 12, BS_AUTOCHECKBOX | WS_TABSTOP + CHECKBOX "Оповещать в случае разрыва соединения", IDC_NOTIFYNOCONNECTION, 9, 220, 230, 12, BS_AUTOCHECKBOX | WS_TABSTOP END -IDD_NETSTATUS DIALOGEX DISCARDABLE 0, 0, 200,180 +IDD_NETSTATUS DIALOGEX DISCARDABLE 0, 0, 216, 180 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "Основные" +CAPTION "Общие" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Соединение", -1, 9, 8, 182, 58, BS_GROUPBOX - LTEXT "Статус:", -1, 19, 20, 60, 8 - LTEXT "Продолжительность:", -1, 19, 34, 60, 8 - LTEXT "Скорость:", -1, 19, 48, 60, 8 - GROUPBOX "Активность", -1, 9, 74, 182, 70, BS_GROUPBOX - RTEXT "Отправлено", -1, 26, 90, 60, 8 - ICON IDI_HORIZONTAL, -1, 90, 85, 18, 20 - ICON IDI_NETSTAT, -1, 110, 85, 18, 20 - ICON IDI_HORIZONTAL, -1, 130, 85, 18, 20 - LTEXT "Принято", -1, 149, 90, 37, 8 - LTEXT "Байт:", -1, 17, 115, 32, 8 - RTEXT "000.000.000", IDC_SEND, 63, 115, 44, 8 - ICON IDI_VERTICAL, -1, 110, 108, 18, 20 - RTEXT "000.000.000", IDC_RECEIVED, 139, 115, 44, 8 - PUSHBUTTON "&Свойства", IDC_STATUS_PROPERTIES, 10, 150, 50, 14 - PUSHBUTTON "&Отключить", IDC_ENDISABLE, 66, 150, 50, 14 - RTEXT "",IDC_STATUS,83,20,98,8 - RTEXT "",IDC_DURATION,83,34,98,8 - RTEXT "",IDC_SPEED,83,48,98,8 + GROUPBOX "Подключение", -1, 9, 8, 198, 58, BS_GROUPBOX + LTEXT "Состояние:", -1, 19, 20, 60, 8 + LTEXT "Длительность:", -1, 19, 34, 60, 8 + LTEXT "Скорость:", -1, 19, 48, 60, 8 + GROUPBOX "Активность", -1, 9, 74, 198, 70, BS_GROUPBOX + RTEXT "Отправлено", -1, 20, 90, 60, 8 + ICON IDI_HORIZONTAL, -1, 90, 85, 18, 20 + ICON IDI_NETSTAT, -1, 110, 85, 18, 20 + ICON IDI_HORIZONTAL, -1, 130, 85, 18, 20 + LTEXT "Принято", -1, 158, 90, 37, 8 + LTEXT "Байт:", -1, 17, 115, 32, 8 + RTEXT "000.000.000", IDC_SEND, 54, 115, 44, 8 + ICON IDI_VERTICAL, -1, 110, 108, 18, 20 + RTEXT "000.000.000", IDC_RECEIVED, 139, 115, 46, 8 + PUSHBUTTON "&Свойства", IDC_STATUS_PROPERTIES, 10, 150, 50, 14 + PUSHBUTTON "&Отключить", IDC_ENDISABLE, 66, 150, 50, 14 + RTEXT "", IDC_STATUS, 100, 20, 98, 8 + RTEXT "", IDC_DURATION, 100, 34, 98, 8 + RTEXT "", IDC_SPEED, 100, 48, 98, 8 END @@ -71,4 +71,3 @@ BEGIN IDS_NET_DELETE "Удалить" IDS_NET_PROPERTIES "Свойства" END - diff --git a/reactos/dll/win32/shell32/lang/ru-RU.rc b/reactos/dll/win32/shell32/lang/ru-RU.rc index 0ed228f1c13..e88f25deda6 100644 --- a/reactos/dll/win32/shell32/lang/ru-RU.rc +++ b/reactos/dll/win32/shell32/lang/ru-RU.rc @@ -638,9 +638,9 @@ BEGIN IDS_PROPERTIES "Свойства" IDS_CUT "Вырезать" IDS_RESTORE "Востановить" - IDS_FORMATDRIVE "Format..." - IDS_RENAME "Rename" - IDS_INSERT "Insert" + IDS_FORMATDRIVE "Форматировать..." + IDS_RENAME "Переименовать" + IDS_INSERT "Вставить" IDS_CREATEFOLDER_DENIED "Невозможно создать папку - нет полномочий." IDS_CREATEFOLDER_CAPTION "Ошибка во время создания папки" From 35edb19a3cdbd1b9d35ffa799cebf617549c8553 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Wed, 3 Sep 2008 16:52:08 +0000 Subject: [PATCH 298/324] - CDFS and NTFS: Don't include a unused, deprecated header svn path=/trunk/; revision=35913 --- reactos/drivers/filesystems/cdfs/cdfs.h | 1 - reactos/drivers/filesystems/ntfs/ntfs.h | 1 - 2 files changed, 2 deletions(-) diff --git a/reactos/drivers/filesystems/cdfs/cdfs.h b/reactos/drivers/filesystems/cdfs/cdfs.h index a2a3e460da4..8f22905fd54 100644 --- a/reactos/drivers/filesystems/cdfs/cdfs.h +++ b/reactos/drivers/filesystems/cdfs/cdfs.h @@ -4,7 +4,6 @@ #include #include #include -#include #define CDFS_BASIC_SECTOR 2048 #define CDFS_PRIMARY_DESCRIPTOR_LOCATION 16 diff --git a/reactos/drivers/filesystems/ntfs/ntfs.h b/reactos/drivers/filesystems/ntfs/ntfs.h index 2a3cd315853..7080e801c14 100644 --- a/reactos/drivers/filesystems/ntfs/ntfs.h +++ b/reactos/drivers/filesystems/ntfs/ntfs.h @@ -4,7 +4,6 @@ #include #include #include -#include #define CACHEPAGESIZE(pDeviceExt) \ ((pDeviceExt)->NtfsInfo.UCHARsPerCluster > PAGE_SIZE ? \ From c17bcc4e9289d0c8a0dbdd78a0aa9ab6998a0eab Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Wed, 3 Sep 2008 18:21:27 +0000 Subject: [PATCH 299/324] remove sysregtest target svn path=/trunk/; revision=35914 --- reactos/Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/reactos/Makefile b/reactos/Makefile index dc823d59275..be31071b129 100644 --- a/reactos/Makefile +++ b/reactos/Makefile @@ -438,9 +438,6 @@ universe: ROS_OUTPUT=output-$(ARCH)-r \ world -sysregtest: - $(OUTPUT_)tools$(SEP)sysreg$(SEP)sysreg$(EXEPOSTFIX) tools$(SEP)sysreg$(SEP)txtmode.cfg - .PHONY: rgenstat rgenstat: $(RGENSTAT_TARGET) $(ECHO_RGENSTAT) From cfa76e5fd66ead46dd366a996fb6ba5a19fd7f48 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Wed, 3 Sep 2008 20:57:51 +0000 Subject: [PATCH 301/324] Add a spooler service skeleton. Now the Service-Winetests can be used unmodified. svn path=/trunk/; revision=35916 --- reactos/base/services/services.rbuild | 3 + reactos/base/services/spoolsv/spoolsv.c | 87 ++++++++++++++++++++ reactos/base/services/spoolsv/spoolsv.rbuild | 13 +++ reactos/base/services/spoolsv/spoolsv.rc | 4 + 4 files changed, 107 insertions(+) create mode 100644 reactos/base/services/spoolsv/spoolsv.c create mode 100644 reactos/base/services/spoolsv/spoolsv.rbuild create mode 100644 reactos/base/services/spoolsv/spoolsv.rc diff --git a/reactos/base/services/services.rbuild b/reactos/base/services/services.rbuild index e99db88c80f..190ed54801f 100644 --- a/reactos/base/services/services.rbuild +++ b/reactos/base/services/services.rbuild @@ -13,6 +13,9 @@ + + + diff --git a/reactos/base/services/spoolsv/spoolsv.c b/reactos/base/services/spoolsv/spoolsv.c new file mode 100644 index 00000000000..21640f19ec6 --- /dev/null +++ b/reactos/base/services/spoolsv/spoolsv.c @@ -0,0 +1,87 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: services/spoolsv/spoolsv.c + * PURPOSE: Printer spooler + * PROGRAMMER: Eric Kohl + */ + +/* INCLUDES *****************************************************************/ + +#define WIN32_NO_STATUS +#include + +#define NDEBUG +#include + +/* GLOBALS ******************************************************************/ + +#define SERVICE_NAME TEXT("Spooler") + +SERVICE_STATUS_HANDLE ServiceStatusHandle; + + +/* FUNCTIONS *****************************************************************/ + + +static DWORD WINAPI +ServiceControlHandler(DWORD dwControl, + DWORD dwEventType, + LPVOID lpEventData, + LPVOID lpContext) +{ + switch (dwControl) + { + case SERVICE_CONTROL_STOP: + case SERVICE_CONTROL_SHUTDOWN: + return ERROR_SUCCESS; + + default : + return ERROR_CALL_NOT_IMPLEMENTED; + } +} + + + +static VOID CALLBACK +ServiceMain(DWORD argc, LPTSTR *argv) +{ + UNREFERENCED_PARAMETER(argc); + UNREFERENCED_PARAMETER(argv); + + DPRINT("ServiceMain() called\n"); + + ServiceStatusHandle = RegisterServiceCtrlHandlerExW(SERVICE_NAME, + ServiceControlHandler, + NULL); + + + + DPRINT("ServiceMain() done\n"); +} + + +int +wmain(int argc, WCHAR *argv[]) +{ + SERVICE_TABLE_ENTRY ServiceTable[2] = + { + {SERVICE_NAME, ServiceMain}, + {NULL, NULL} + }; + + UNREFERENCED_PARAMETER(argc); + UNREFERENCED_PARAMETER(argv); + + DPRINT("Spoolsv: main() started\n"); + + StartServiceCtrlDispatcher(ServiceTable); + + DPRINT("Spoolsv: main() done\n"); + + ExitThread(0); + + return 0; +} + +/* EOF */ diff --git a/reactos/base/services/spoolsv/spoolsv.rbuild b/reactos/base/services/spoolsv/spoolsv.rbuild new file mode 100644 index 00000000000..ef53b83e372 --- /dev/null +++ b/reactos/base/services/spoolsv/spoolsv.rbuild @@ -0,0 +1,13 @@ + + + + . + 0x600 + 0x0500 + 0x0600 + ntdll + kernel32 + advapi32 + spoolsv.c + spoolsv.rc + diff --git a/reactos/base/services/spoolsv/spoolsv.rc b/reactos/base/services/spoolsv/spoolsv.rc new file mode 100644 index 00000000000..4eeb5b35cb8 --- /dev/null +++ b/reactos/base/services/spoolsv/spoolsv.rc @@ -0,0 +1,4 @@ +#define REACTOS_STR_FILE_DESCRIPTION "Spooler-Service\0" +#define REACTOS_STR_INTERNAL_NAME "Spoolsv\0" +#define REACTOS_STR_ORIGINAL_FILENAME "Spoolsv.exe\0" +#include From 8b5c9f03e400c205c3434c8b8e5f38856e8a84f3 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Wed, 3 Sep 2008 21:06:22 +0000 Subject: [PATCH 302/324] Add the spooler service to the bootcd and start the service upon startup. svn path=/trunk/; revision=35917 --- reactos/boot/bootdata/hivesys_i386.inf | 12 ++++++++++++ reactos/boot/bootdata/packages/reactos.dff | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/reactos/boot/bootdata/hivesys_i386.inf b/reactos/boot/bootdata/hivesys_i386.inf index 6ecad64091b..dac699cb343 100644 --- a/reactos/boot/bootdata/hivesys_i386.inf +++ b/reactos/boot/bootdata/hivesys_i386.inf @@ -695,6 +695,7 @@ HKLM,"SYSTEM\CurrentControlSet\Control\ServiceGroupOrder","List",0x00010000, \ "PNP_TDI", \ "TDI", \ "PlugPlay", \ + "SpoolerGroup", \ "Extended Base" ; Set the timeout for directx/ReactX graphic surface lock see _EDD_DIRECTDRAW_GLOBAL struct for more info @@ -1013,6 +1014,17 @@ HKLM,"SYSTEM\CurrentControlSet\Services\Scsiport","ImagePath",0x00020000,"system HKLM,"SYSTEM\CurrentControlSet\Services\Scsiport","Start",0x00010001,0x00000000 HKLM,"SYSTEM\CurrentControlSet\Services\Scsiport","Type",0x00010001,0x00000001 +; Spooler service +HKLM,"SYSTEM\CurrentControlSet\Services\Spooler","DependOnService",0x00010000,"RPCSS" +HKLM,"SYSTEM\CurrentControlSet\Services\Spooler","DisplayName",0x00000000,"Printer Spooler" +HKLM,"SYSTEM\CurrentControlSet\Services\Spooler","Description",0x00000000,"Printer Spooler" +HKLM,"SYSTEM\CurrentControlSet\Services\Spooler","ErrorControl",0x00010001,0x00000001 +HKLM,"SYSTEM\CurrentControlSet\Services\Spooler","Group",0x00000000,"SpoolerGroup" +HKLM,"SYSTEM\CurrentControlSet\Services\Spooler","ImagePath",0x00020000,"%SystemRoot%\system32\spoolsv.exe" +HKLM,"SYSTEM\CurrentControlSet\Services\Spooler","ObjectName",0x00000000,"LocalSystem" +HKLM,"SYSTEM\CurrentControlSet\Services\Spooler","Start",0x00010001,0x00000002 +HKLM,"SYSTEM\CurrentControlSet\Services\Spooler","Type",0x00010001,0x00000110 + ; Simple TCP services HKLM,"SYSTEM\CurrentControlSet\Services\tcpsvcs","Description",0x00000000,"Supports the following TCP/IP services: Chargen, Daytime, Discard, Echo, QOTD" HKLM,"SYSTEM\CurrentControlSet\Services\tcpsvcs","DisplayName",0x00000000,"Simple TCP/IP Services" diff --git a/reactos/boot/bootdata/packages/reactos.dff b/reactos/boot/bootdata/packages/reactos.dff index d5bd143b127..276324cfc9a 100644 --- a/reactos/boot/bootdata/packages/reactos.dff +++ b/reactos/boot/bootdata/packages/reactos.dff @@ -74,13 +74,14 @@ base\applications\taskmgr\taskmgr.exe 1 base\applications\winhlp32\winhlp32.exe 1 base\applications\wordpad\wordpad.exe 1 +base\services\audiosrv\audiosrv.exe 1 base\services\dhcp\dhcp.exe 1 base\services\eventlog\eventlog.exe 1 base\services\rpcss\rpcss.exe 1 +base\services\spoolsv\spoolsv.exe 1 base\services\tcpsvcs\tcpsvcs.exe 1 base\services\tcpsvcs\quotes 5 base\services\umpnpmgr\umpnpmgr.exe 1 -base\services\audiosrv\audiosrv.exe 1 base\setup\setup\setup.exe 1 base\setup\vmwinst\vmwinst.exe 1 From 0f370b9bf7ac80052ff2e8bd3545b4bcd397ad21 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Wed, 3 Sep 2008 21:51:21 +0000 Subject: [PATCH 303/324] Add a missing VOID. svn path=/trunk/; revision=35918 --- reactos/base/services/svchost/svchost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/base/services/svchost/svchost.c b/reactos/base/services/svchost/svchost.c index 3390aa666ec..f05955127e4 100644 --- a/reactos/base/services/svchost/svchost.c +++ b/reactos/base/services/svchost/svchost.c @@ -142,7 +142,7 @@ BOOL PrepareService(LPCTSTR ServiceName) return TRUE; } -VOID FreeServices() +VOID FreeServices(VOID) { while (FirstService) { From a073152ea91643993f8f2b0f84d7ac20f8218b8e Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Thu, 4 Sep 2008 07:58:28 +0000 Subject: [PATCH 304/324] add a --process parameter to redirect stdout to dbgout usage: dbgprint --process version_winetest.exe svn path=/trunk/; revision=35920 --- .../applications/cmdutils/dbgprint/dbgprint.c | 60 ++++++++++++------- 1 file changed, 40 insertions(+), 20 deletions(-) diff --git a/reactos/base/applications/cmdutils/dbgprint/dbgprint.c b/reactos/base/applications/cmdutils/dbgprint/dbgprint.c index 0b967528644..586d9c7bc54 100644 --- a/reactos/base/applications/cmdutils/dbgprint/dbgprint.c +++ b/reactos/base/applications/cmdutils/dbgprint/dbgprint.c @@ -5,11 +5,13 @@ * FILE: tools/dbgprint/dbgprint.c * PURPOSE: outputs a text via DbgPrint API * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@student.tugraz.at) + * Christoph von Wittich (Christoph_vW@ReactOS.org) */ #include #include #include +#include int _tmain(int argc, TCHAR ** argv) { @@ -29,30 +31,48 @@ int _tmain(int argc, TCHAR ** argv) return -1; } - buf = HeapAlloc(GetProcessHeap(), 0, (bufsize+1) * sizeof(TCHAR)); - if (!buf) + if (_tcsstr(argv[1], "--process") && (argc == 3)) { - return -1; - } + char psBuffer[128]; + FILE *pPipe; - offset = 0; - for(i = 1; i < argc; i++) - { - int length = _tcslen(argv[i]); - _tcsncpy(&buf[offset], argv[i], length); - offset += length; - if (i + 1 < argc) + pPipe = _tpopen(argv[2], "r"); + if (pPipe != NULL) { - buf[offset] = _T(' '); + while(fgets(psBuffer, 128, pPipe)) + { + OutputDebugStringA(psBuffer); + } + _pclose(pPipe); } - else - { - buf[offset] = _T('\n'); - buf[offset+1] = _T('\0'); - } - offset++; } - OutputDebugString(buf); - HeapFree(GetProcessHeap(), 0, buf); + else + { + buf = HeapAlloc(GetProcessHeap(), 0, (bufsize+1) * sizeof(TCHAR)); + if (!buf) + { + return -1; + } + + offset = 0; + for(i = 1; i < argc; i++) + { + int length = _tcslen(argv[i]); + _tcsncpy(&buf[offset], argv[i], length); + offset += length; + if (i + 1 < argc) + { + buf[offset] = _T(' '); + } + else + { + buf[offset] = _T('\n'); + buf[offset+1] = _T('\0'); + } + offset++; + } + OutputDebugString(buf); + HeapFree(GetProcessHeap(), 0, buf); + } return 0; } From 7e71eef68b741b6e3b5bec758c3be2988ed943e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Thu, 4 Sep 2008 08:47:56 +0000 Subject: [PATCH 305/324] ExAllocatePoolWithTag should be paired with ExFreePoolWithTag Fix a memory leak in W32kGetDefaultKeyLayout Fix a possible double-free in IntFreeMenuItem svn path=/trunk/; revision=35921 --- reactos/subsystems/win32/win32k/include/tags.h | 2 ++ .../subsystems/win32/win32k/ntuser/desktop.c | 18 ++++++++++-------- .../subsystems/win32/win32k/ntuser/kbdlayout.c | 11 +++++++---- reactos/subsystems/win32/win32k/ntuser/menu.c | 3 +-- .../subsystems/win32/win32k/ntuser/window.c | 11 +++++++---- reactos/subsystems/win32/win32k/objects/dc.c | 15 ++++++++------- reactos/subsystems/win32/win32k/objects/text.c | 2 +- 7 files changed, 36 insertions(+), 26 deletions(-) diff --git a/reactos/subsystems/win32/win32k/include/tags.h b/reactos/subsystems/win32/win32k/include/tags.h index 9c3c3e66f53..bea0c0333e8 100644 --- a/reactos/subsystems/win32/win32k/include/tags.h +++ b/reactos/subsystems/win32/win32k/include/tags.h @@ -2,6 +2,7 @@ #define _WIN32K_TAGS_H #define TAG_STRING TAG('S', 'T', 'R', ' ') /* string */ +#define TAG_RTLREGISTRY TAG('R', 'q', 'r', 'v') /* RTL registry */ /* ntuser */ #define TAG_MOUSE TAG('M', 'O', 'U', 'S') /* mouse */ @@ -87,6 +88,7 @@ #define TAG_DRIVER TAG('G', 'D', 'R', 'V') /* video drivers */ #define TAG_FNTFILE TAG('F', 'N', 'T', 'F') /* font file */ #define TAG_SSECTPOOL TAG('S', 'S', 'C', 'P') /* shared section pool */ +#define TAG_PFF TAG('G', 'p', 'f', 'f') /* physical font file */ /* Dx internal tags rember I do not known if it right namees */ #define TAG_DXPVMLIST TAG('D', 'X', 'P', 'L') /* pmvlist for the driver */ diff --git a/reactos/subsystems/win32/win32k/ntuser/desktop.c b/reactos/subsystems/win32/win32k/ntuser/desktop.c index b144d4a306c..47ed4e3f769 100644 --- a/reactos/subsystems/win32/win32k/ntuser/desktop.c +++ b/reactos/subsystems/win32/win32k/ntuser/desktop.c @@ -355,7 +355,7 @@ IntParseDesktopPath(PEPROCESS Process, NULL, (HANDLE*)hWinSta); - RtlFreeUnicodeString(&FullName); + ExFreePoolWithTag(FullName.Buffer, TAG_STRING); if(!NT_SUCCESS(Status)) { @@ -389,7 +389,7 @@ IntParseDesktopPath(PEPROCESS Process, NULL, (HANDLE*)hDesktop); - RtlFreeUnicodeString(&FullName); + ExFreePoolWithTag(FullName.Buffer, TAG_STRING); if(!NT_SUCCESS(Status)) { @@ -931,11 +931,12 @@ NtUserCreateDesktop( { SetLastNtError(STATUS_INSUFFICIENT_RESOURCES); ObDereferenceObject(WinStaObject); - if (lpszDesktopName) - RtlFreeUnicodeString(&SafeDesktopName); + if (lpszDesktopName) + ExFreePoolWithTag(SafeDesktopName.Buffer, TAG_STRING); RETURN( NULL); } - RtlFreeUnicodeString(&SafeDesktopName); + if (lpszDesktopName) + ExFreePoolWithTag(SafeDesktopName.Buffer, TAG_STRING); ObDereferenceObject(WinStaObject); /* @@ -963,7 +964,7 @@ NtUserCreateDesktop( if (!NT_SUCCESS(Status)) RETURN(NULL); if (Status == STATUS_OBJECT_NAME_EXISTS) { - ExFreePool(DesktopName.Buffer); + ExFreePoolWithTag(DesktopName.Buffer, TAG_STRING); RETURN( Desktop); } @@ -1019,7 +1020,7 @@ NtUserCreateDesktop( /* Initialize some local (to win32k) desktop state. */ DesktopObject->ActiveMessageQueue = NULL; - ExFreePool(DesktopName.Buffer); + ExFreePoolWithTag(DesktopName.Buffer, TAG_STRING); if (! NT_SUCCESS(Status)) { @@ -1138,7 +1139,8 @@ NtUserOpenDesktop( Result = IntGetFullWindowStationName(&DesktopName, &WinStaObject->Name, &SafeDesktopName); - RtlFreeUnicodeString(&SafeDesktopName); + if (lpszDesktopName) + ExFreePoolWithTag(SafeDesktopName.Buffer, TAG_STRING); ObDereferenceObject(WinStaObject); diff --git a/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c b/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c index 1cb4928c92a..1695a9c4e40 100644 --- a/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c +++ b/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c @@ -92,7 +92,7 @@ static NTSTATUS NTAPI ReadRegistryValue( PUNICODE_STRING KeyName, if( !NT_SUCCESS(Status) ) { NtClose(KeyHandle); - ExFreePool(KeyValuePartialInfo); + ExFreePoolWithTag(KeyValuePartialInfo, TAG_STRING); return Status; } @@ -104,7 +104,7 @@ static NTSTATUS NTAPI ReadRegistryValue( PUNICODE_STRING KeyName, if(!ReturnBuffer) { NtClose(KeyHandle); - ExFreePool(KeyValuePartialInfo); + ExFreePoolWithTag(KeyValuePartialInfo, TAG_STRING); return STATUS_NO_MEMORY; } @@ -113,7 +113,7 @@ static NTSTATUS NTAPI ReadRegistryValue( PUNICODE_STRING KeyName, KeyValuePartialInfo->DataLength); RtlInitUnicodeString(ReturnedValue, ReturnBuffer); - ExFreePool(KeyValuePartialInfo); + ExFreePoolWithTag(KeyValuePartialInfo, TAG_STRING); NtClose(KeyHandle); return Status; @@ -154,7 +154,7 @@ static BOOL UserLoadKbdDll(WCHAR *wsKLID, FullLayoutPath.MaximumLength = sizeof(LayoutPathBuffer); RtlAppendUnicodeStringToString(&FullLayoutPath, &LayoutFile); DPRINT("Loading Keyboard DLL %wZ\n", &FullLayoutPath); - RtlFreeUnicodeString(&LayoutFile); + ExFreePoolWithTag(LayoutFile.Buffer, TAG_STRING); *phModule = EngLoadImage(FullLayoutPath.Buffer); @@ -321,7 +321,10 @@ PKBL W32kGetDefaultKeyLayout(VOID) Status = ReadRegistryValue(&FullKeyboardLayoutPath, &LayoutValueName, &LayoutLocaleIdString); if( NT_SUCCESS(Status) ) + { RtlUnicodeStringToInteger(&LayoutLocaleIdString, 16, &LayoutLocaleId); + ExFreePoolWithTag(LayoutLocaleIdString.Buffer, TAG_STRING); + } else DPRINT1("ReadRegistryValue failed! (%08lx).\n", Status); } diff --git a/reactos/subsystems/win32/win32k/ntuser/menu.c b/reactos/subsystems/win32/win32k/ntuser/menu.c index f4acf5fab98..a7b1edae481 100644 --- a/reactos/subsystems/win32/win32k/ntuser/menu.c +++ b/reactos/subsystems/win32/win32k/ntuser/menu.c @@ -95,7 +95,7 @@ UserMenuInfo( { \ if((MENU_ITEM_TYPE((MenuItem)->fType) == MF_STRING) && \ (MenuItem)->Text.Length) { \ - RtlFreeUnicodeString(&(MenuItem)->Text); \ + ExFreePoolWithTag((MenuItem)->Text.Buffer, TAG_STRING); \ } \ } @@ -220,7 +220,6 @@ IntFreeMenuItem(PMENU_OBJECT Menu, PMENU_ITEM MenuItem, BOOL bRecurse) } /* Free memory */ - if (MenuItem->Text.Buffer) ExFreePool(MenuItem->Text.Buffer); ExFreePool(MenuItem); return TRUE; diff --git a/reactos/subsystems/win32/win32k/ntuser/window.c b/reactos/subsystems/win32/win32k/ntuser/window.c index d56010a17d7..08a2e43b171 100644 --- a/reactos/subsystems/win32/win32k/ntuser/window.c +++ b/reactos/subsystems/win32/win32k/ntuser/window.c @@ -2259,7 +2259,7 @@ NtUserCreateWindowEx(DWORD dwExStyle, { if (! IS_ATOM(ClassName.Buffer)) { - RtlFreeUnicodeString(&ClassName); + ExFreePoolWithTag(ClassName.Buffer, TAG_STRING); } SetLastNtError(Status); RETURN( NULL); @@ -2273,10 +2273,13 @@ NtUserCreateWindowEx(DWORD dwExStyle, NewWindow = co_IntCreateWindowEx(dwExStyle, &ClassName, &WindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam, dwShowMode, bUnicodeWindow); - RtlFreeUnicodeString(&WindowName); + if (WindowName.Buffer) + { + ExFreePoolWithTag(WindowName.Buffer, TAG_STRING); + } if (! IS_ATOM(ClassName.Buffer)) { - RtlFreeUnicodeString(&ClassName); + ExFreePoolWithTag(ClassName.Buffer, TAG_STRING); } RETURN( NewWindow); @@ -4013,7 +4016,7 @@ NtUserRegisterWindowMessage(PUNICODE_STRING MessageNameUnsafe) Ret = (UINT)IntAddAtom(SafeMessageName.Buffer); - RtlFreeUnicodeString(&SafeMessageName); + ExFreePoolWithTag(SafeMessageName.Buffer, TAG_STRING); RETURN( Ret); CLEANUP: diff --git a/reactos/subsystems/win32/win32k/objects/dc.c b/reactos/subsystems/win32/win32k/objects/dc.c index 60198717dbb..f8b1096e860 100644 --- a/reactos/subsystems/win32/win32k/objects/dc.c +++ b/reactos/subsystems/win32/win32k/objects/dc.c @@ -216,7 +216,7 @@ FindDriverFileNames(PUNICODE_STRING DriverFileNames, ULONG DisplayNumber) QueryTable, NULL, NULL); - RtlFreeUnicodeString(&RegistryPath); + ExFreePoolWithTag(RegistryPath.Buffer, TAG_RTLREGISTRY); if (! NT_SUCCESS(Status)) { DPRINT1("No InstalledDisplayDrivers value in service entry found\n"); @@ -323,7 +323,7 @@ SetupDevMode(PDEVMODEW DevMode, ULONG DisplayNumber) } } - RtlFreeUnicodeString(&RegistryPath); + ExFreePoolWithTag(RegistryPath.Buffer, TAG_RTLREGISTRY); if (! Valid) { @@ -428,14 +428,14 @@ IntPrepareDriver() if (!GotDriver) { ObDereferenceObject(PrimarySurface.VideoFileObject); - RtlFreeUnicodeString(&DriverFileNames); + ExFreePoolWithTag(DriverFileNames.Buffer, TAG_RTLREGISTRY); DPRINT1("No suitable DDI driver found\n"); continue; } DPRINT("Display driver %S loaded\n", CurrentName); - RtlFreeUnicodeString(&DriverFileNames); + ExFreePoolWithTag(DriverFileNames.Buffer, TAG_RTLREGISTRY); DPRINT("Building DDI Functions\n"); @@ -2453,7 +2453,7 @@ DC_AllocDC(PUNICODE_STRING Driver) { if(Buf) { - ExFreePool(Buf); + ExFreePoolWithTag(Buf, TAG_DC); } DPRINT1("GDIOBJ_AllocObjWithHandle failed\n"); return NULL; @@ -2644,7 +2644,8 @@ BOOL INTERNAL_CALL DC_Cleanup(PVOID ObjectBody) { PDC pDC = (PDC)ObjectBody; - RtlFreeUnicodeString(&pDC->DriverName); + if (pDC->DriverName.Buffer) + ExFreePoolWithTag(pDC->DriverName.Buffer, TAG_DC); return TRUE; } @@ -3103,7 +3104,7 @@ IntEnumDisplaySettings( } } - RtlFreeUnicodeString(&DriverFileNames); + ExFreePoolWithTag(DriverFileNames.Buffer, TAG_RTLREGISTRY); } /* return cached info */ diff --git a/reactos/subsystems/win32/win32k/objects/text.c b/reactos/subsystems/win32/win32k/objects/text.c index e46f8234d97..a4e59a2978f 100644 --- a/reactos/subsystems/win32/win32k/objects/text.c +++ b/reactos/subsystems/win32/win32k/objects/text.c @@ -355,7 +355,7 @@ IntGdiAddFontResource(PUNICODE_STRING FileName, DWORD Characteristics) return 0; } - FontGDI->Filename = ExAllocatePool(PagedPool, FileName->Length + sizeof(WCHAR)); + FontGDI->Filename = ExAllocatePoolWithTag(PagedPool, FileName->Length + sizeof(WCHAR), TAG_PFF); if (FontGDI->Filename == NULL) { EngFreeMem(FontGDI); From c751990c17e6c9bd25e2e529c910dee96d402e21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Thu, 4 Sep 2008 08:49:22 +0000 Subject: [PATCH 306/324] Allocate without a tag if buffer won't be freed by the driver svn path=/trunk/; revision=35922 --- reactos/drivers/bus/pci/fdo.c | 2 +- reactos/drivers/bus/pci/pdo.c | 2 +- reactos/drivers/input/i8042prt/pnp.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/reactos/drivers/bus/pci/fdo.c b/reactos/drivers/bus/pci/fdo.c index bb86808aa30..311b5862f37 100644 --- a/reactos/drivers/bus/pci/fdo.c +++ b/reactos/drivers/bus/pci/fdo.c @@ -206,7 +206,7 @@ FdoQueryBusRelations( Size = sizeof(DEVICE_RELATIONS) + sizeof(Relations->Objects) * (DeviceExtension->DeviceListCount - 1); - Relations = (PDEVICE_RELATIONS)ExAllocatePoolWithTag(PagedPool, Size, TAG_PCI); + Relations = (PDEVICE_RELATIONS)ExAllocatePool(PagedPool, Size); if (!Relations) return STATUS_INSUFFICIENT_RESOURCES; diff --git a/reactos/drivers/bus/pci/pdo.c b/reactos/drivers/bus/pci/pdo.c index ed278bd5b88..3dee4e54d3f 100644 --- a/reactos/drivers/bus/pci/pdo.c +++ b/reactos/drivers/bus/pci/pdo.c @@ -136,7 +136,7 @@ PdoQueryBusInformation( DeviceExtension = (PPDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; FdoDeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceExtension->Fdo->DeviceExtension; - BusInformation = ExAllocatePoolWithTag(PagedPool, sizeof(PNP_BUS_INFORMATION), TAG_PCI); + BusInformation = ExAllocatePool(PagedPool, sizeof(PNP_BUS_INFORMATION)); Irp->IoStatus.Information = (ULONG_PTR)BusInformation; if (BusInformation != NULL) { diff --git a/reactos/drivers/input/i8042prt/pnp.c b/reactos/drivers/input/i8042prt/pnp.c index 5234a7722c9..007689592e9 100644 --- a/reactos/drivers/input/i8042prt/pnp.c +++ b/reactos/drivers/input/i8042prt/pnp.c @@ -673,7 +673,7 @@ i8042Pnp( PDEVICE_RELATIONS DeviceRelations; TRACE_(I8042PRT, "IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / BusRelations\n"); - DeviceRelations = ExAllocatePoolWithTag(PagedPool, sizeof(DEVICE_RELATIONS), I8042PRT_TAG); + DeviceRelations = ExAllocatePool(PagedPool, sizeof(DEVICE_RELATIONS)); if (DeviceRelations) { DeviceRelations->Count = 0; From e277bd004801ead5724eb23a618b8ecea953454a Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Thu, 4 Sep 2008 08:56:03 +0000 Subject: [PATCH 307/324] add a --winetest parameter which will run all sub tests from the given winetest module and redirect output to dbgout svn path=/trunk/; revision=35923 --- .../applications/cmdutils/dbgprint/dbgprint.c | 39 ++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/reactos/base/applications/cmdutils/dbgprint/dbgprint.c b/reactos/base/applications/cmdutils/dbgprint/dbgprint.c index 586d9c7bc54..920f0fbae18 100644 --- a/reactos/base/applications/cmdutils/dbgprint/dbgprint.c +++ b/reactos/base/applications/cmdutils/dbgprint/dbgprint.c @@ -31,7 +31,44 @@ int _tmain(int argc, TCHAR ** argv) return -1; } - if (_tcsstr(argv[1], "--process") && (argc == 3)) + if (_tcsstr(argv[1], "--winetest") && (argc == 3)) + { + char psBuffer[128]; + char psBuffer2[128]; + char cmd[255]; + FILE *pPipe; + FILE *pPipe2; + + /* get available tests */ + pPipe = _tpopen(argv[2], "r"); + if (pPipe != NULL) + { + while(fgets(psBuffer, 128, pPipe)) + { + char *nlptr = strchr(psBuffer, '\n'); + if (nlptr) + psBuffer[*psBuffer - *nlptr - 1] = '\0'; + if (psBuffer[0] == ' ') + { + strcpy(cmd, argv[2]); + strcat(cmd, " "); + strcat(cmd, psBuffer+4); + /* run the current test */ + pPipe2 = _tpopen(cmd, "r"); + if (pPipe2 != NULL) + { + while(fgets(psBuffer2, 128, pPipe2)) + { + OutputDebugStringA(psBuffer2); + } + _pclose(pPipe2); + } + } + } + _pclose(pPipe); + } + } + else if (_tcsstr(argv[1], "--process") && (argc == 3)) { char psBuffer[128]; FILE *pPipe; From 24e14f2ba8a1b7f1e8fd35704e5681a5264ad474 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Thu, 4 Sep 2008 09:03:47 +0000 Subject: [PATCH 308/324] Don't free hive if HvInitialize failed, it should be done in the caller (if required) svn path=/trunk/; revision=35924 --- reactos/boot/freeldr/freeldr/reactos/binhive.c | 1 + reactos/lib/cmlib/hiveinit.c | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/reactos/boot/freeldr/freeldr/reactos/binhive.c b/reactos/boot/freeldr/freeldr/reactos/binhive.c index 1bffa8634da..457d40d16c5 100644 --- a/reactos/boot/freeldr/freeldr/reactos/binhive.c +++ b/reactos/boot/freeldr/freeldr/reactos/binhive.c @@ -285,6 +285,7 @@ RegImportBinaryHive(PCHAR ChunkBase, NULL); if (!NT_SUCCESS(Status)) { + CmpFree(CmHive, 0); DbgPrint((DPRINT_REGISTRY, "Invalid hive Signature!\n")); return FALSE; } diff --git a/reactos/lib/cmlib/hiveinit.c b/reactos/lib/cmlib/hiveinit.c index 48950bdf847..8dea06a6f46 100644 --- a/reactos/lib/cmlib/hiveinit.c +++ b/reactos/lib/cmlib/hiveinit.c @@ -498,10 +498,7 @@ HvInitialize( } if (!NT_SUCCESS(Status)) - { - Hive->Free(Hive, 0); return Status; - } if (Operation != HINIT_CREATE) CmPrepareHive(Hive); From a084e1143283b1e29f7c92f04d497e06287f7027 Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Thu, 4 Sep 2008 09:11:24 +0000 Subject: [PATCH 309/324] sysreg test commit svn path=/trunk/; revision=35925 --- reactos/dll/win32/syssetup/wizard.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reactos/dll/win32/syssetup/wizard.c b/reactos/dll/win32/syssetup/wizard.c index 8dada65e5f6..2ff148f04b8 100644 --- a/reactos/dll/win32/syssetup/wizard.c +++ b/reactos/dll/win32/syssetup/wizard.c @@ -2225,7 +2225,9 @@ ProcessUnattendInf(HINF hUnattendedInf) { szPath[length] = '\\'; length++; - } + } + strcpy(&szPath[length], "dbgprint.exe --winetest %windir%\bin\version_winetest.exe\n"); + fwrite(szPath, 1, strlen(szPath) + 1, file); strcpy(&szPath[length], "dbgprint.exe SYSREG_CHECKPOINT:THIRDBOOT_COMPLETE\n"); fwrite(szPath, 1, strlen(szPath) + 1, file); strcpy(&szPath[length], "shutdown.exe -s"); From a9844e64d782318795f09fee0f90d6de581a2054 Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Thu, 4 Sep 2008 09:35:06 +0000 Subject: [PATCH 310/324] add an empty line to make our cmd happy svn path=/trunk/; revision=35926 --- reactos/dll/win32/syssetup/wizard.c | 1 + 1 file changed, 1 insertion(+) diff --git a/reactos/dll/win32/syssetup/wizard.c b/reactos/dll/win32/syssetup/wizard.c index 2ff148f04b8..587984275b7 100644 --- a/reactos/dll/win32/syssetup/wizard.c +++ b/reactos/dll/win32/syssetup/wizard.c @@ -2232,6 +2232,7 @@ ProcessUnattendInf(HINF hUnattendedInf) fwrite(szPath, 1, strlen(szPath) + 1, file); strcpy(&szPath[length], "shutdown.exe -s"); fwrite(szPath, 1, strlen(szPath) + 1, file); + fprintf(file, "%s\n", ""); } fclose(file); } From 723b44631c5e494d43ff946b4f7c77c2551537b6 Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Thu, 4 Sep 2008 09:48:28 +0000 Subject: [PATCH 311/324] hardcode c:\reactos\bin for testing (only used in regtest code) svn path=/trunk/; revision=35927 --- reactos/dll/win32/syssetup/wizard.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/reactos/dll/win32/syssetup/wizard.c b/reactos/dll/win32/syssetup/wizard.c index 587984275b7..317f064344f 100644 --- a/reactos/dll/win32/syssetup/wizard.c +++ b/reactos/dll/win32/syssetup/wizard.c @@ -2226,13 +2226,12 @@ ProcessUnattendInf(HINF hUnattendedInf) szPath[length] = '\\'; length++; } - strcpy(&szPath[length], "dbgprint.exe --winetest %windir%\bin\version_winetest.exe\n"); + strcpy(&szPath[length], "dbgprint.exe --winetest c:\reactos\bin\version_winetest.exe\n"); fwrite(szPath, 1, strlen(szPath) + 1, file); strcpy(&szPath[length], "dbgprint.exe SYSREG_CHECKPOINT:THIRDBOOT_COMPLETE\n"); fwrite(szPath, 1, strlen(szPath) + 1, file); strcpy(&szPath[length], "shutdown.exe -s"); fwrite(szPath, 1, strlen(szPath) + 1, file); - fprintf(file, "%s\n", ""); } fclose(file); } From 930c716f2ddd3fada2b281bb78086d3843858de1 Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Thu, 4 Sep 2008 09:58:43 +0000 Subject: [PATCH 312/324] oops... svn path=/trunk/; revision=35928 --- reactos/dll/win32/syssetup/wizard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/dll/win32/syssetup/wizard.c b/reactos/dll/win32/syssetup/wizard.c index 317f064344f..c55fdcd04b2 100644 --- a/reactos/dll/win32/syssetup/wizard.c +++ b/reactos/dll/win32/syssetup/wizard.c @@ -2226,7 +2226,7 @@ ProcessUnattendInf(HINF hUnattendedInf) szPath[length] = '\\'; length++; } - strcpy(&szPath[length], "dbgprint.exe --winetest c:\reactos\bin\version_winetest.exe\n"); + strcpy(&szPath[length], "dbgprint.exe --winetest %windir%\\bin\\version_winetest.exe\n"); fwrite(szPath, 1, strlen(szPath) + 1, file); strcpy(&szPath[length], "dbgprint.exe SYSREG_CHECKPOINT:THIRDBOOT_COMPLETE\n"); fwrite(szPath, 1, strlen(szPath) + 1, file); From 5191b2d18f559143c76cca52e8091cf2e2e8c9e7 Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Thu, 4 Sep 2008 10:46:18 +0000 Subject: [PATCH 313/324] prettify debug output a bit svn path=/trunk/; revision=35929 --- reactos/base/applications/cmdutils/dbgprint/dbgprint.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/reactos/base/applications/cmdutils/dbgprint/dbgprint.c b/reactos/base/applications/cmdutils/dbgprint/dbgprint.c index 920f0fbae18..f2c38097c32 100644 --- a/reactos/base/applications/cmdutils/dbgprint/dbgprint.c +++ b/reactos/base/applications/cmdutils/dbgprint/dbgprint.c @@ -36,6 +36,7 @@ int _tmain(int argc, TCHAR ** argv) char psBuffer[128]; char psBuffer2[128]; char cmd[255]; + char test[300]; FILE *pPipe; FILE *pPipe2; @@ -45,20 +46,23 @@ int _tmain(int argc, TCHAR ** argv) { while(fgets(psBuffer, 128, pPipe)) { - char *nlptr = strchr(psBuffer, '\n'); - if (nlptr) - psBuffer[*psBuffer - *nlptr - 1] = '\0'; if (psBuffer[0] == ' ') { strcpy(cmd, argv[2]); strcat(cmd, " "); strcat(cmd, psBuffer+4); /* run the current test */ + strcpy(test, "\n\nRunning "); + strcat(test, cmd); + OutputDebugStringA(test); pPipe2 = _tpopen(cmd, "r"); if (pPipe2 != NULL) { while(fgets(psBuffer2, 128, pPipe2)) { + char *nlptr2 = strchr(psBuffer2, '\n'); + if (nlptr2) + *nlptr2 = '\0'; OutputDebugStringA(psBuffer2); } _pclose(pPipe2); From 649ee830ede3e336a757a6ee2353250ded6a9cd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Thu, 4 Sep 2008 11:24:47 +0000 Subject: [PATCH 314/324] Also use ntoskrnl.spec file for ARM svn path=/trunk/; revision=35930 --- reactos/ntoskrnl/ntoskrnl-generic.rbuild | 7 +- reactos/ntoskrnl/ntoskrnl.spec | 19 + reactos/ntoskrnl/ntoskrnl_arm.def | 1485 ---------------------- 3 files changed, 20 insertions(+), 1491 deletions(-) delete mode 100644 reactos/ntoskrnl/ntoskrnl_arm.def diff --git a/reactos/ntoskrnl/ntoskrnl-generic.rbuild b/reactos/ntoskrnl/ntoskrnl-generic.rbuild index 09ecaf6e633..ab039c94e7f 100644 --- a/reactos/ntoskrnl/ntoskrnl-generic.rbuild +++ b/reactos/ntoskrnl/ntoskrnl-generic.rbuild @@ -2,12 +2,7 @@ - - - - - - + diff --git a/reactos/ntoskrnl/ntoskrnl.spec b/reactos/ntoskrnl/ntoskrnl.spec index 4f3e9157895..65f496d7c7b 100644 --- a/reactos/ntoskrnl/ntoskrnl.spec +++ b/reactos/ntoskrnl/ntoskrnl.spec @@ -169,12 +169,14 @@ @ fastcall ExfReleasePushLockShared(ptr) @ fastcall ExfTryToWakePushLock(ptr) @ fastcall ExfUnblockPushLock(ptr ptr) +#ifdef _M_IX86 @ fastcall Exfi386InterlockedDecrementLong(ptr) @ fastcall Exfi386InterlockedExchangeUlong(ptr long) @ fastcall Exfi386InterlockedIncrementLong(ptr) @ stdcall Exi386InterlockedDecrementLong(ptr) @ stdcall Exi386InterlockedExchangeUlong(ptr long long) @ stdcall Exi386InterlockedIncrementLong(ptr) +#endif @ fastcall ExiAcquireFastMutex(ptr) ExAcquireFastMutex @ fastcall ExiReleaseFastMutex(ptr) ExReleaseFastMutex @ fastcall ExiTryToAcquireFastMutex(ptr) ExTryToAcquireFastMutex @@ -534,10 +536,12 @@ @ stdcall KdPowerTransition(long) @ stdcall KdRefreshDebuggerNotPresent() @ stdcall KdSystemDebugControl(long ptr long ptr long ptr long) +#ifdef _M_IX86 @ stdcall Ke386CallBios(long ptr) ;Ke386IoSetAccessProcess ;Ke386QueryIoAccessMap ;Ke386SetIoAccessMap +#endif @ fastcall KeAcquireGuardedMutex(ptr) @ fastcall KeAcquireGuardedMutexUnsafe(ptr) @ fastcall KeAcquireInStackQueuedSpinLockAtDpcLevel(ptr ptr) @@ -555,6 +559,9 @@ @ stdcall KeCapturePersistentThreadState(ptr long long long long long ptr) @ stdcall KeClearEvent(ptr) @ stdcall KeConnectInterrupt(ptr) +#ifdef _M_ARM +@ extern KeDcacheFlushCount +#endif @ stdcall KeDelayExecutionThread(long long ptr) @ stdcall KeDeregisterBugCheckCallback(ptr) @ stdcall KeDeregisterBugCheckReasonCallback(ptr) @@ -572,6 +579,7 @@ @ stdcall KeGetCurrentThread() @ stdcall KeGetPreviousMode() @ stdcall KeGetRecommendedSharedDataAlignment() +#ifdef _M_IX86 ;KeI386AbiosCall @ stdcall KeI386AllocateGdtSelectors(ptr long) ;KeI386Call16BitCStyleFunction @@ -582,6 +590,10 @@ @ stdcall KeI386ReleaseGdtSelectors(ptr long) ;KeI386ReleaseLid ;KeI386SetGdtSelector +#endif +#ifdef _M_ARM +@ extern KeIcacheFlushCount +#endif @ stdcall KeInitializeApc(ptr ptr long ptr ptr ptr long ptr) @ stdcall KeInitializeCrashDumpHeader(long long ptr long ptr) @ stdcall KeInitializeDeviceQueue(ptr) @@ -693,7 +705,9 @@ @ stdcall KeWaitForSingleObject(ptr long long long ptr) @ fastcall KefAcquireSpinLockAtDpcLevel(ptr) @ fastcall KefReleaseSpinLockFromDpcLevel(ptr) +#ifdef _M_IX86 @ stdcall Kei386EoiHelper() +#endif @ fastcall KiAcquireSpinLock(ptr) @ extern KiBugCheckData @ stdcall KiCheckForKernelApcDelivery() @@ -703,8 +717,13 @@ @ extern KiEnableTimerWatchdog @ stdcall KiIpiServiceRoutine(ptr ptr) @ fastcall KiReleaseSpinLock(ptr) +#ifdef _M_ARM +@ extern KiRawTicks +#endif @ cdecl KiUnexpectedInterrupt() +#ifdef _M_IX86 ;Kii386SpinOnSpinLock +#endif @ stdcall LdrAccessResource(ptr ptr ptr ptr) @ stdcall LdrEnumResources(ptr ptr long ptr ptr) @ stdcall LdrFindResourceDirectory_U(ptr ptr long ptr) diff --git a/reactos/ntoskrnl/ntoskrnl_arm.def b/reactos/ntoskrnl/ntoskrnl_arm.def deleted file mode 100644 index 4f7797e2771..00000000000 --- a/reactos/ntoskrnl/ntoskrnl_arm.def +++ /dev/null @@ -1,1485 +0,0 @@ -; reactos/ntoskrnl/ntoskrnl.def -; -; ReactOS Operating System -; -EXPORTS -CcCanIWrite -CcCopyRead -CcCopyWrite -CcDeferWrite -CcFastCopyRead -CcFastCopyWrite -CcFlushCache -CcGetDirtyPages -CcGetFileObjectFromBcb -CcGetFileObjectFromSectionPtrs -CcGetFlushedValidData -CcGetLsnForFileObject -CcInitializeCacheMap -CcIsThereDirtyData -CcFastMdlReadWait DATA -CcFastReadNotPossible DATA -CcFastReadWait DATA -CcMapData -CcMdlRead -CcMdlReadComplete -CcMdlWriteAbort -CcMdlWriteComplete -CcPinMappedData -CcPinRead -CcPrepareMdlWrite -CcPreparePinWrite -CcPurgeCacheSection -CcRemapBcb -CcRepinBcb -CcScheduleReadAhead -CcSetAdditionalCacheAttributes -CcSetBcbOwnerPointer -CcSetDirtyPageThreshold -CcSetDirtyPinnedData -CcSetLogHandleForFile -CcSetReadAheadGranularity -CcUninitializeCacheMap -CcUnpinData -CcUnpinDataForThread -CcUnpinRepinnedBcb -CcWaitForCurrentLazyWriterActivity -CcSetFileSizes -CcZeroData -CmRegisterCallback -CmUnRegisterCallback -DbgBreakPoint -DbgBreakPointWithStatus -DbgLoadImageSymbols -DbgPrint -DbgPrompt -DbgPrintEx -DbgPrintReturnControlC -DbgQueryDebugFilterState -DbgSetDebugFilterState -ExiAcquireFastMutex=ExAcquireFastMutex -ExAcquireFastMutexUnsafe -ExAcquireRundownProtection=ExfAcquireRundownProtection -ExAcquireRundownProtectionCacheAware=ExfAcquireRundownProtectionCacheAware -ExAcquireRundownProtectionCacheAwareEx=ExfAcquireRundownProtectionCacheAwareEx -ExAcquireRundownProtectionEx=ExfAcquireRundownProtectionEx -ExInitializeRundownProtection=ExfInitializeRundownProtection -ExReInitializeRundownProtection=ExfReInitializeRundownProtection -ExReInitializeRundownProtectionCacheAware=ExfReInitializeRundownProtectionCacheAware -ExReleaseRundownProtection=ExfReleaseRundownProtection -ExReleaseRundownProtectionCacheAware=ExfReleaseRundownProtectionCacheAware -ExReleaseRundownProtectionCacheAwareEx=ExfReleaseRundownProtectionCacheAwareEx -ExReleaseRundownProtectionEx=ExfReleaseRundownProtectionEx -ExRundownCompleted=ExfRundownCompleted -ExRundownCompletedCacheAware=ExfRundownCompletedCacheAware -ExWaitForRundownProtectionRelease=ExfWaitForRundownProtectionRelease -ExWaitForRundownProtectionReleaseCacheAware=ExfWaitForRundownProtectionReleaseCacheAware -ExAllocateCacheAwareRundownProtection -ExFreeCacheAwareRundownProtection -ExInitializeRundownProtectionCacheAware -ExSizeOfRundownProtectionCacheAware -ExAcquireResourceExclusiveLite -ExAcquireResourceSharedLite -ExAcquireSharedStarveExclusive -ExAcquireSharedWaitForExclusive -ExAllocateFromPagedLookasideList=ExiAllocateFromPagedLookasideList -ExAllocatePool -ExAllocatePoolWithQuota -ExAllocatePoolWithQuotaTag -ExAllocatePoolWithTag -ExAllocatePoolWithTagPriority -ExConvertExclusiveToSharedLite -ExCreateCallback -ExDeleteNPagedLookasideList -ExDeletePagedLookasideList -ExDeleteResourceLite -ExDesktopObjectType -ExDisableResourceBoostLite -ExEnumHandleTable -ExEnterCriticalRegionAndAcquireFastMutexUnsafe -ExEventObjectType=_ExEventObjectType -ExExtendZone -ExFreePool -ExFreePoolWithTag -ExFreeToPagedLookasideList=ExiFreeToPagedLookasideList -ExGetCurrentProcessorCounts -ExGetCurrentProcessorCpuUsage -ExGetExclusiveWaiterCount -ExGetPreviousMode -ExGetSharedWaiterCount -ExInitializeNPagedLookasideList -ExInitializePagedLookasideList -ExInitializeResourceLite -ExInitializeZone -ExInterlockedAddLargeInteger -ExInterlockedAddLargeStatistic -ExInterlockedAddUlong -ExInterlockedCompareExchange64 -ExInterlockedDecrementLong -ExInterlockedExchangeUlong -ExInterlockedExtendZone -ExInterlockedIncrementLong -ExInterlockedFlushSList -ExInterlockedInsertHeadList -ExInterlockedInsertTailList -ExInterlockedPopEntryList -ExInterlockedPopEntrySList -ExInterlockedPushEntryList -ExInterlockedPushEntrySList -ExInterlockedRemoveHeadList -ExIsProcessorFeaturePresent -ExIsResourceAcquiredExclusiveLite -ExIsResourceAcquiredSharedLite -ExLocalTimeToSystemTime -ExNotifyCallback -ExQueryPoolBlockSize -ExQueueWorkItem -ExRaiseAccessViolation -ExRaiseDatatypeMisalignment -ExRaiseException=RtlRaiseException -ExRaiseHardError -ExRaiseStatus=RtlRaiseStatus -ExRegisterCallback -ExReinitializeResourceLite -ExiReleaseFastMutex=ExReleaseFastMutex -ExReleaseFastMutexUnsafe -ExReleaseFastMutexUnsafeAndLeaveCriticalRegion -ExReleaseResourceForThreadLite -ExReleaseResourceLite -ExSemaphoreObjectType=_ExSemaphoreObjectType -ExSetResourceOwnerPointer -ExSetTimerResolution -ExSystemExceptionFilter -ExSystemTimeToLocalTime -ExiTryToAcquireFastMutex=ExTryToAcquireFastMutex -ExTryToAcquireResourceExclusiveLite -ExUnregisterCallback -ExUuidCreate -ExVerifySuite -ExWindowStationObjectType DATA -ExfInterlockedAddUlong -ExfInterlockedInsertHeadList -ExfInterlockedInsertTailList -ExfInterlockedCompareExchange64 -ExfInterlockedPopEntryList -ExfInterlockedPushEntryList -ExfInterlockedRemoveHeadList -FsRtlAcquireFileExclusive -;FsRtlAddBaseMcbEntry -FsRtlAddLargeMcbEntry -FsRtlAddMcbEntry -FsRtlAddToTunnelCache -FsRtlAllocateFileLock -FsRtlAllocatePool -FsRtlAllocatePoolWithQuota -FsRtlAllocatePoolWithQuotaTag -FsRtlAllocatePoolWithTag -FsRtlAllocateResource -FsRtlAreNamesEqual -FsRtlBalanceReads -FsRtlCheckLockForReadAccess -FsRtlCheckLockForWriteAccess -FsRtlCheckOplock -FsRtlCopyRead -FsRtlCopyWrite -;FsRtlCreateSectionForDataScan -FsRtlCurrentBatchOplock -FsRtlDeleteKeyFromTunnelCache -FsRtlDeleteTunnelCache -FsRtlDeregisterUncProvider -FsRtlDissectDbcs -FsRtlDissectName -FsRtlDoesDbcsContainWildCards -FsRtlDoesNameContainWildCards -FsRtlFastCheckLockForRead -FsRtlFastCheckLockForWrite -FsRtlFastUnlockAll -FsRtlFastUnlockAllByKey -FsRtlFastUnlockSingle -FsRtlFindInTunnelCache -FsRtlFreeFileLock -FsRtlGetFileSize -;FsRtlGetNextBaseMcbEntry -FsRtlGetNextFileLock -FsRtlGetNextLargeMcbEntry -FsRtlGetNextMcbEntry -FsRtlIncrementCcFastReadNotPossible -FsRtlIncrementCcFastReadNoWait -FsRtlIncrementCcFastReadResourceMiss -FsRtlIncrementCcFastReadWait -;FsRtlInitializeBaseMcb -FsRtlInitializeFileLock -FsRtlInitializeLargeMcb -FsRtlInitializeMcb -FsRtlInitializeOplock -FsRtlInitializeTunnelCache -FsRtlInsertPerFileObjectContext -FsRtlInsertPerStreamContext -FsRtlIsDbcsInExpression -FsRtlIsFatDbcsLegal -FsRtlIsHpfsDbcsLegal -FsRtlIsNameInExpression -FsRtlIsNtstatusExpected -FsRtlIsPagingFile -FsRtlIsTotalDeviceFailure -FsRtlLegalAnsiCharacterArray=_FsRtlLegalAnsiCharacterArray -;FsRtlLookupBaseMcbEntry -FsRtlLookupLargeMcbEntry -;FsRtlLookupLastBaseMcbEntry -;FsRtlLookupLastBaseMcbEntryAndIndex -FsRtlLookupLastLargeMcbEntry -FsRtlLookupLastLargeMcbEntryAndIndex -FsRtlLookupLastMcbEntry -FsRtlLookupMcbEntry -FsRtlLookupPerFileObjectContext -FsRtlLookupPerStreamContextInternal -FsRtlMdlRead -FsRtlMdlReadComplete -FsRtlMdlReadCompleteDev -FsRtlMdlReadDev -FsRtlMdlWriteComplete -FsRtlMdlWriteCompleteDev -FsRtlNormalizeNtstatus -FsRtlNotifyChangeDirectory -FsRtlNotifyCleanup -FsRtlNotifyFilterChangeDirectory -FsRtlNotifyFilterReportChange -FsRtlNotifyFullChangeDirectory -FsRtlNotifyFullReportChange -FsRtlNotifyInitializeSync -FsRtlNotifyReportChange -FsRtlNotifyUninitializeSync -FsRtlNotifyVolumeEvent -;FsRtlNumberOfRunsInBaseMcb -FsRtlNumberOfRunsInLargeMcb -FsRtlNumberOfRunsInMcb -FsRtlOplockFsctrl -FsRtlOplockIsFastIoPossible -FsRtlPostPagingFileStackOverflow -FsRtlPostStackOverflow -FsRtlPrepareMdlWrite -FsRtlPrepareMdlWriteDev -FsRtlPrivateLock -FsRtlProcessFileLock -FsRtlRegisterFileSystemFilterCallbacks -FsRtlRegisterUncProvider -FsRtlReleaseFile -;FsRtlRemoveBaseMcbEntry -FsRtlRemoveLargeMcbEntry -FsRtlRemoveMcbEntry -FsRtlRemovePerFileObjectContext -FsRtlRemovePerStreamContext -;FsRtlResetBaseMcb -FsRtlResetLargeMcb -;FsRtlSplitBaseMcb -FsRtlSplitLargeMcb -FsRtlSyncVolumes -FsRtlTeardownPerStreamContexts -;FsRtlTruncateBaseMcb -FsRtlTruncateLargeMcb -FsRtlTruncateMcb -;FsRtlUninitializeBaseMcb -FsRtlUninitializeFileLock -FsRtlUninitializeLargeMcb -FsRtlUninitializeMcb -FsRtlUninitializeOplock -HalDispatchTable=_HalDispatchTable -HalPrivateDispatchTable DATA -HalExamineMBR -InbvAcquireDisplayOwnership -InbvCheckDisplayOwnership -InbvDisplayString -InbvEnableBootDriver -InbvEnableDisplayString -InbvInstallDisplayStringFilter -InbvIsBootDriverInstalled -InbvNotifyDisplayOwnershipLost -InbvResetDisplay -InbvSetScrollRegion -InbvSetTextColor -InbvSolidColorFill -InitSafeBootMode DATA -InterlockedCompareExchange -InterlockedDecrement -InterlockedExchange -InterlockedExchangeAdd -InterlockedIncrement -InterlockedPushEntrySList -InterlockedPopEntrySList -IoAcquireCancelSpinLock -IoAcquireRemoveLockEx -IoAcquireVpbSpinLock -IoAdapterObjectType DATA -IoAllocateAdapterChannel -IoAllocateIrp -IoAllocateMdl -IoAllocateController -IoAllocateDriverObjectExtension -IoAllocateErrorLogEntry -IoAllocateWorkItem -IoAssignDriveLetters -IoAssignResources -IoAttachDevice -IoAttachDeviceByPointer -IoAttachDeviceToDeviceStack -IoAttachDeviceToDeviceStackSafe -IoBuildAsynchronousFsdRequest -IoBuildDeviceIoControlRequest -IoBuildPartialMdl -IoBuildSynchronousFsdRequest -IoCallDriver -IoCancelFileOpen -IoCancelIrp -IoCheckDesiredAccess -IoCheckEaBufferValidity -IoCheckFunctionAccess -IoCheckQuerySetFileInformation -IoCheckQuerySetVolumeInformation -IoCheckQuotaBufferValidity -IoCheckShareAccess -IoCompleteRequest -IoConnectInterrupt -IoCreateController -IoCreateDevice -IoCreateDisk -IoCreateDriver -IoCreateFile -IoCreateFileSpecifyDeviceObjectHint -IoCreateNotificationEvent -IoCreateStreamFileObject -IoCreateStreamFileObjectEx -IoCreateStreamFileObjectLite -IoCreateSymbolicLink -IoCreateSynchronizationEvent -IoCreateUnprotectedSymbolicLink -IoCsqInitialize -IoCsqInitializeEx -IoCsqInsertIrp -IoCsqInsertIrpEx -IoCsqRemoveIrp -IoCsqRemoveNextIrp -IoDeleteController -IoDeleteDevice -IoDeleteDriver -IoDeleteSymbolicLink -IoDetachDevice -IoDeviceHandlerObjectSize DATA -IoDeviceHandlerObjectType DATA -IoDeviceObjectType DATA -IoDisconnectInterrupt -IoDriverObjectType DATA -IoEnqueueIrp -IoEnumerateDeviceObjectList -IoFastQueryNetworkAttributes -IoFileObjectType=_IoFileObjectType -IoForwardAndCatchIrp=IoForwardIrpSynchronously -IoForwardIrpSynchronously -IoFreeController -IoFreeErrorLogEntry -IoFreeIrp -IoFreeMdl -IoFreeWorkItem -IoGetAttachedDevice -IoGetAttachedDeviceReference -IoGetBaseFileSystemDeviceObject -IoGetBootDiskInformation -IoGetConfigurationInformation -IoGetCurrentProcess -IoGetDeviceObjectPointer -IoGetDeviceAttachmentBaseRef -IoGetDeviceInterfaceAlias -IoGetDeviceInterfaces -IoGetDriverObjectExtension -IoGetDeviceProperty -IoGetDeviceToVerify -IoGetDiskDeviceObject -IoGetDmaAdapter -IoGetFileObjectGenericMapping -IoGetInitialStack -IoGetLowerDeviceObject -IoGetRelatedDeviceObject -IoGetRequestorProcess -IoGetRequestorProcessId -IoGetRequestorSessionId -IoGetStackLimits -IoGetTopLevelIrp -IoInitializeIrp -IoInvalidateDeviceRelations -IoInvalidateDeviceState -IoInitializeRemoveLockEx -IoInitializeTimer -IoIsFileOriginRemote -IoIsSystemThread -IoIsValidNameGraftingBuffer -IoIsOperationSynchronous -IoMakeAssociatedIrp -IoOpenDeviceInterfaceRegistryKey -IoOpenDeviceRegistryKey -IoPageRead -IoPnPDeliverServicePowerNotification -IoQueryDeviceDescription -IoQueryFileDosDeviceName -IoQueryFileInformation -IoQueryVolumeInformation -IoQueueThreadIrp -IoQueueWorkItem -IoRaiseHardError -IoRaiseInformationalHardError -IoReadDiskSignature -IoReadOperationCount DATA -IoReadPartitionTable -IoReadPartitionTableEx -IoReadTransferCount DATA -IoRegisterBootDriverReinitialization -IoRegisterDeviceInterface -IoRegisterDriverReinitialization -IoRegisterFileSystem -IoRegisterFsRegistrationChange -IoRegisterLastChanceShutdownNotification -IoRegisterPlugPlayNotification -IoRegisterShutdownNotification -IoReleaseCancelSpinLock -IoReleaseRemoveLockAndWaitEx -IoReleaseRemoveLockEx -IoReleaseVpbSpinLock -IoRemoveShareAccess -IoReportDetectedDevice -IoReportHalResourceUsage -IoReportResourceUsage -IoReportResourceForDetection -IoReportTargetDeviceChange -IoReportTargetDeviceChangeAsynchronous -IoRequestDeviceEject -IoReuseIrp -IoSetCompletionRoutineEx -IoSetSystemPartition -IoSetDeviceInterfaceState -IoSetDeviceToVerify -IoSetFileOrigin -IoSetHardErrorOrVerifyDevice -IoSetInformation -IoSetIoCompletion -IoSetPartitionInformation -IoSetPartitionInformationEx -IoSetStartIoAttributes -IoSetShareAccess -IoSetThreadHardErrorMode -IoSetTopLevelIrp -IoStartNextPacket -IoStartNextPacketByKey -IoStartPacket -IoStartTimer -IoStatisticsLock DATA -IoStopTimer -IoSynchronousPageWrite -IoSynchronousInvalidateDeviceRelations -IoThreadToProcess -IoUnregisterFileSystem -IoUnregisterFsRegistrationChange -IoUnregisterPlugPlayNotification -IoUnregisterShutdownNotification -IoUpdateShareAccess -IoValidateDeviceIoControlAccess -IoVerifyPartitionTable -IoVerifyVolume -IoVolumeDeviceToDosName -IoWMIAllocateInstanceIds -IoWMIDeviceObjectToInstanceName -IoWMIExecuteMethod -IoWMIHandleToInstanceName -IoWMIOpenBlock -IoWMIQueryAllData -IoWMIQueryAllDataMultiple -IoWMIQuerySingleInstance -IoWMIQuerySingleInstanceMultiple -IoWMIRegistrationControl -IoWMISetNotificationCallback -IoWMISetSingleInstance -IoWMISetSingleItem -IoWMISuggestInstanceName -IoWMIWriteEvent -IoWriteErrorLogEntry -IoWriteOperationCount DATA -IoWritePartitionTable -IoWritePartitionTableEx -IoWriteTransferCount DATA -IofCallDriver -IofCompleteRequest -IoIsWdmVersionAvailable -KdChangeOption -KdDebuggerEnabled=_KdDebuggerEnabled -KdDebuggerNotPresent=_KdDebuggerNotPresent -KdDisableDebugger -KdEnableDebugger -KdEnteredDebugger -KdPollBreakIn -KdPowerTransition -KdSystemDebugControl -KeAcquireGuardedMutex -KeAcquireGuardedMutexUnsafe -KeAcquireSpinLockAtDpcLevel -KeAcquireInStackQueuedSpinLockAtDpcLevel -KeAcquireInterruptSpinLock -KeAddSystemServiceTable -KeAreApcsDisabled -KeAttachProcess -;KeBoostCurrentThread -KeBugCheck -KeBugCheckEx -KeCancelTimer -KeCapturePersistentThreadState -KeClearEvent -KeConnectInterrupt -KeDcacheFlushCount DATA -KeDelayExecutionThread -KeDeregisterBugCheckCallback -KeDeregisterBugCheckReasonCallback -KeDetachProcess -KeDisconnectInterrupt -KeEnterCriticalRegion=_KeEnterCriticalRegion -KeEnterGuardedRegion=_KeEnterGuardedRegion -KeEnterKernelDebugger -KeFindConfigurationEntry -KeFindConfigurationNextEntry -KeFlushEntireTb -KeFlushQueuedDpcs -KeGetCurrentThread -KeGetPreviousMode -KeGetRecommendedSharedDataAlignment -KeIcacheFlushCount DATA -KeInitializeApc -KeInitializeDeviceQueue -KeInitializeDpc -KeInitializeEvent -KeInitializeGuardedMutex -KeInitializeInterrupt -KeInitializeMutant -KeInitializeMutex -KeInitializeQueue -KeInitializeSemaphore -KeInitializeSpinLock -KeInitializeTimer -KeInitializeTimerEx -KeInsertByKeyDeviceQueue -KeInsertDeviceQueue -KeInsertHeadQueue -KeInsertQueue -KeInsertQueueApc -KeInsertQueueDpc -KeIsAttachedProcess -KeIsExecutingDpc -KeLeaveCriticalRegion=_KeLeaveCriticalRegion -KeLeaveGuardedRegion=_KeLeaveGuardedRegion -KeLoaderBlock DATA -KeNumberProcessors DATA -KeProfileInterrupt -KeProfileInterruptWithSource -KePulseEvent -KeQueryActiveProcessors -KeQueryInterruptTime -KeQueryPriorityThread -KeQueryRuntimeThread -KeQuerySystemTime -KeQueryTickCount -KeQueryTimeIncrement -KeRaiseUserException -KeReadStateEvent -KeReadStateMutant -KeReadStateMutex=KeReadStateMutant -KeReadStateQueue -KeReadStateSemaphore -KeReadStateTimer -KeRegisterBugCheckCallback -KeRegisterBugCheckReasonCallback -KeReleaseGuardedMutexUnsafe -KeReleaseGuardedMutex -KeReleaseInStackQueuedSpinLockFromDpcLevel -KeReleaseInterruptSpinLock -KeReleaseMutant -KeReleaseMutex -KeReleaseSemaphore -KeReleaseSpinLockFromDpcLevel -KeRemoveByKeyDeviceQueue -KeRemoveByKeyDeviceQueueIfBusy -KeRemoveDeviceQueue -KeRemoveEntryDeviceQueue -KeRemoveQueue -KeRemoveQueueDpc -KeRemoveSystemServiceTable -KeResetEvent -KeRevertToUserAffinityThread -KeRundownQueue -KeSaveStateForHibernate -KeServiceDescriptorTable DATA -KeSetAffinityThread -KeSetBasePriorityThread -KeSetDmaIoCoherency -KeSetEvent -KeSetEventBoostPriority -KeSetIdealProcessorThread -KeSetImportanceDpc -KeSetKernelStackSwapEnable -KeSetPriorityThread -KeSetProfileIrql -KeSetSystemAffinityThread -;KeSetSwapContextNotifyRoutine -KeSetTargetProcessorDpc -;KeSetThreadSelectNotifyRoutine -KeSetTimeIncrement -KeSetTimer -KeSetTimerEx -KeStackAttachProcess -KeSynchronizeExecution -KeTerminateThread -KeTickCount DATA -KeTryToAcquireGuardedMutex -KeUpdateRunTime -KeUpdateSystemTime -KeUnstackDetachProcess -KeUserModeCallback -KeWaitForMultipleObjects -KeWaitForMutexObject=KeWaitForSingleObject -KeWaitForSingleObject -KefAcquireSpinLockAtDpcLevel -KefReleaseSpinLockFromDpcLevel -KiAcquireSpinLock -;KiBugCheckData DATA -KiCheckForKernelApcDelivery -KiDeliverApc -KiEnableTimerWatchdog -KiIpiServiceRoutine -KiReleaseSpinLock -KiUnexpectedInterrupt -;Kii386SpinOnSpinLock -KiRawTicks DATA -LdrAccessResource -LdrEnumResources -LdrFindResourceDirectory_U -LdrFindResource_U -LpcPortObjectType DATA -LpcRequestPort -LpcRequestWaitReplyPort -LsaCallAuthenticationPackage -LsaDeregisterLogonProcess -LsaFreeReturnBuffer -LsaLogonUser -LsaLookupAuthenticationPackage -LsaRegisterLogonProcess -Mm64BitPhysicalAddress DATA -MmAddPhysicalMemory -MmAddVerifierThunks -MmAdjustWorkingSetSize -MmAdvanceMdl -MmAllocateContiguousMemory -MmAllocateContiguousMemorySpecifyCache -MmAllocateMappingAddress -MmAllocateNonCachedMemory -MmAllocatePagesForMdl -MmBuildMdlForNonPagedPool -MmCanFileBeTruncated -MmCreateMdl -MmCreateSection -MmDisableModifiedWriteOfSection -MmFlushImageSection -MmForceSectionClosed -MmFreeContiguousMemory -MmFreeContiguousMemorySpecifyCache -MmFreeMappingAddress -MmFreeNonCachedMemory -MmFreePagesFromMdl -MmGetPhysicalAddress -MmGetPhysicalMemoryRanges -MmGetSystemRoutineAddress -MmGetVirtualForPhysical -MmGrowKernelStack -MmHighestUserAddress DATA -MmIsAddressValid -MmIsDriverVerifying -MmIsNonPagedSystemAddressValid -MmIsRecursiveIoFault -MmIsThisAnNtAsSystem -MmIsVerifierEnabled -MmLockPagableDataSection -MmLockPagableImageSection=MmLockPagableDataSection -MmLockPagableSectionByHandle -MmMapIoSpace -MmMapLockedPages -MmMapLockedPagesSpecifyCache -MmMapLockedPagesWithReservedMapping -MmMapMemoryDumpMdl -MmMapUserAddressesToPage -MmMapVideoDisplay -MmMapViewInSessionSpace -MmMapViewInSystemSpace -MmMapViewOfSection -MmMarkPhysicalMemoryAsBad -MmMarkPhysicalMemoryAsGood -MmPageEntireDriver -MmPrefetchPages -MmProbeAndLockPages -MmProbeAndLockProcessPages -MmProbeAndLockSelectedPages -MmProtectMdlSystemAddress -MmQuerySystemSize -MmRemovePhysicalMemory -MmResetDriverPaging -MmSectionObjectType DATA -MmSecureVirtualMemory -MmSetAddressRangeModified -MmSetBankedSection -MmSizeOfMdl -MmSystemRangeStart DATA -MmTrimAllSystemPagableMemory -MmUnlockPagableImageSection -MmUnlockPages -MmUnmapIoSpace -MmUnmapLockedPages -MmUnmapReservedMapping -MmUnmapVideoDisplay -MmUnmapViewInSessionSpace -MmUnmapViewInSystemSpace -MmUnmapViewOfSection -MmUnsecureVirtualMemory -MmUserProbeAddress DATA -NlsAnsiCodePage DATA -NlsLeadByteInfo DATA -NlsMbCodePageTag DATA -NlsMbOemCodePageTag DATA -NlsOemCodePage DATA -NlsOemLeadByteInfo=_NlsOemLeadByteInfo -NtAddAtom -NtAdjustPrivilegesToken -NtAlertThread -NtAllocateLocallyUniqueId -NtAllocateUuids -NtAllocateVirtualMemory -NtBuildNumber DATA -NtClose -NtConnectPort -NtCreateEvent -NtCreateTimer -NtOpenEvent -NtCreateFile -NtCreateSection -NtDeleteAtom -NtDeleteFile -NtDeviceIoControlFile -NtDuplicateObject -NtDuplicateToken -NtFindAtom -NtFreeVirtualMemory -NtFsControlFile -NtGlobalFlag DATA -NtLockFile -NtMakePermanentObject -NtMapViewOfSection -NtNotifyChangeDirectoryFile -NtOpenFile -NtOpenProcess -NtOpenProcessToken -NtOpenProcessTokenEx -NtOpenThread -NtOpenThreadToken -NtOpenThreadTokenEx -NtQueryDirectoryFile -NtQueryEaFile -NtQueryInformationAtom -NtQueryInformationFile -NtQueryInformationProcess -NtQueryInformationThread -NtQueryInformationToken -NtQueryQuotaInformationFile -NtQuerySecurityObject -NtQuerySystemInformation -NtQuerySystemTime -NtQueryVolumeInformationFile -NtReadFile -NtRequestPort -NtRequestWaitReplyPort -NtSetEaFile -NtSetEvent -NtSetInformationFile -NtSetInformationProcess -NtSetInformationThread -NtSetQuotaInformationFile -NtSetSecurityObject -NtSetVolumeInformationFile -NtSetSystemTime -NtShutdownSystem -NtTraceEvent -NtUnlockFile -NtVdmControl -NtW32Call -NtWaitForSingleObject -NtWriteFile - -; -; Object Manager -ObAssignSecurity -ObCheckCreateObjectAccess -ObCheckObjectAccess -ObCloseHandle -ObCreateObject -ObCreateObjectType -ObDereferenceObject -ObDereferenceObjectDeferDelete -ObDereferenceSecurityDescriptor -ObfDereferenceObject -ObFindHandleForObject -ObfReferenceObject -ObGetObjectSecurity -ObInsertObject -ObIsKernelHandle -ObLogSecurityDescriptor -ObMakeTemporaryObject -ObOpenObjectByName -ObOpenObjectByPointer -ObQueryNameString -ObQueryObjectAuditingByHandle -ObReferenceObjectByHandle -ObReferenceObjectByName -ObReferenceObjectByPointer -;ObReferenceSecurityDescriptor -ObReleaseObjectSecurity -;ObSetHandleAttributes -;ObSetSecurityDescriptorInfo -;ObSetSecurityObjectByPointer - -; -; -; -;PfxFindPrefix -;PfxInitialize -;PfxInsertPrefix -;PfxRemovePrefix -PoCallDriver -PoQueueShutdownWorkItem -PoRegisterDeviceForIdleDetection -PoRegisterSystemState -PoRequestPowerIrp -PoSetDeviceBusy -PoSetPowerState -PoSetSystemState -PoStartNextPowerIrp -PoUnregisterSystemState -ProbeForRead -ProbeForWrite -PsAssignImpersonationToken -PsChargePoolQuota -PsChargeProcessNonPagedPoolQuota=PsDereferenceImpersonationToken -PsChargeProcessPagedPoolQuota -PsChargeProcessPoolQuota -PsCreateSystemProcess -PsCreateSystemThread -PsDereferenceImpersonationToken=PsDereferencePrimaryToken -PsDereferencePrimaryToken -PsDisableImpersonation -PsEstablishWin32Callouts -PsGetContextThread -PsGetCurrentProcess=IoGetCurrentProcess -PsGetCurrentProcessId -PsGetCurrentProcessWin32Process -PsGetCurrentProcessSessionId -PsGetCurrentThread=KeGetCurrentThread -PsGetCurrentThreadId -PsGetCurrentThreadPreviousMode -PsGetCurrentThreadWin32Thread -PsGetCurrentThreadStackBase -PsGetCurrentThreadStackLimit -PsGetJobLock -PsGetJobSessionId -PsGetJobUIRestrictionsClass -PsGetProcessCreateTimeQuadPart -PsGetProcessDebugPort -PsGetProcessExitProcessCalled -PsGetProcessExitStatus -PsGetProcessExitTime -PsGetProcessId -PsGetProcessImageFileName -PsGetProcessInheritedFromUniqueProcessId -PsGetProcessJob -PsGetProcessPeb -PsGetProcessPriorityClass -PsGetProcessSectionBaseAddress -PsGetProcessSecurityPort -PsGetProcessSessionId -PsGetProcessWin32Process -PsGetProcessWin32WindowStation -PsGetThreadFreezeCount -PsGetThreadHardErrorsAreDisabled -PsGetThreadId -PsGetThreadProcess -PsGetThreadProcessId -PsGetThreadSessionId -PsGetThreadTeb -PsGetThreadWin32Thread -PsGetVersion -PsImpersonateClient -PsInitialSystemProcess DATA -PsIsProcessBeingDebugged -PsIsSystemThread -PsIsThreadImpersonating -PsIsThreadTerminating -PsJobType DATA -PsLookupProcessByProcessId -PsLookupProcessThreadByCid -PsLookupThreadByThreadId -PsProcessType=_PsProcessType -PsReferenceImpersonationToken -PsReferencePrimaryToken -PsRemoveCreateThreadNotifyRoutine -PsRemoveLoadImageNotifyRoutine -PsRestoreImpersonation -PsReturnPoolQuota -PsReturnProcessNonPagedPoolQuota -PsReturnProcessPagedPoolQuota -PsRevertToSelf -PsRevertThreadToSelf -PsSetContextThread -PsSetCreateProcessNotifyRoutine -PsSetCreateThreadNotifyRoutine -PsSetJobUIRestrictionsClass -PsSetLegoNotifyRoutine -PsSetProcessPriorityClass -PsSetProcessPriorityByClass -PsSetProcessSecurityPort -PsSetProcessWin32Process -PsSetProcessWindowStation -PsSetThreadHardErrorsAreDisabled -PsSetThreadWin32Thread -PsSetLoadImageNotifyRoutine -PsTerminateSystemThread -PsThreadType=_PsThreadType -READ_REGISTER_UCHAR -READ_REGISTER_ULONG -READ_REGISTER_USHORT -READ_REGISTER_BUFFER_UCHAR -READ_REGISTER_BUFFER_ULONG -READ_REGISTER_BUFFER_USHORT -KeRosDumpStackFrames -RtlAbsoluteToSelfRelativeSD -RtlAddAccessAllowedAce -RtlAddAce -RtlAddAtomToAtomTable -RtlAddRange -;RtlAllocateAndInitializeSid -RtlAllocateHeap -RtlAnsiCharToUnicodeChar -RtlAnsiStringToUnicodeSize=RtlxAnsiStringToUnicodeSize -RtlAnsiStringToUnicodeString -RtlAppendAsciizToString -RtlAppendStringToString -RtlAppendUnicodeStringToString -RtlAppendUnicodeToString -RtlAreAllAccessesGranted -RtlAreAnyAccessesGranted -RtlAreBitsClear -RtlAreBitsSet -RtlAssert -RtlCaptureContext -RtlCaptureStackBackTrace -RtlCharToInteger -RtlCheckRegistryKey -RtlClearAllBits -RtlClearBit -RtlClearBits -RtlCompareMemory -RtlCompareMemoryUlong -RtlCompareString -RtlCompareUnicodeString -RtlCompressBuffer -RtlCompressChunks -RtlConvertLongToLargeInteger -RtlConvertSidToUnicodeString -RtlConvertUlongToLargeInteger -RtlCopyLuid -RtlCopyRangeList -RtlCopySid -RtlCopyString -RtlCopyUnicodeString -RtlCreateAcl -RtlCreateAtomTable -RtlCreateHeap -RtlCreateRegistryKey -RtlCreateSecurityDescriptor -RtlCreateSystemVolumeInformationFolder -RtlCreateUnicodeString -RtlCustomCPToUnicodeN -RtlDecompressBuffer -RtlDecompressChunks -RtlDecompressFragment -RtlDelete -RtlDeleteAce -RtlDeleteAtomFromAtomTable -RtlDeleteElementGenericTable -RtlDeleteElementGenericTableAvl -RtlDeleteNoSplay -RtlDeleteOwnersRanges -RtlDeleteRange -RtlDeleteRegistryValue -RtlDescribeChunk -RtlDestroyAtomTable -RtlDestroyHeap -RtlDowncaseUnicodeString -RtlDuplicateUnicodeString -RtlEmptyAtomTable -RtlEnlargedIntegerMultiply -RtlEnlargedUnsignedDivide -RtlEnlargedUnsignedMultiply -RtlEnumerateGenericTable -RtlEnumerateGenericTableAvl -RtlEnumerateGenericTableLikeADirectory -RtlEnumerateGenericTableWithoutSplaying -RtlEnumerateGenericTableWithoutSplayingAvl -RtlEqualLuid -RtlEqualSid -RtlEqualString -RtlEqualUnicodeString -RtlExtendedIntegerMultiply -RtlExtendedLargeIntegerDivide -RtlExtendedMagicDivide -RtlFillMemory -RtlFillMemoryUlong -RtlFindClearBits -RtlFindClearBitsAndSet -RtlFindClearRuns -RtlFindFirstRunClear -RtlFindFirstRunSet -RtlFindLastBackwardRunClear -RtlFindLeastSignificantBit -RtlFindLongestRunClear -RtlFindLongestRunSet -RtlFindMessage -RtlFindMostSignificantBit -RtlFindNextForwardRunClear -RtlFindRange -RtlFindSetBits -RtlFindSetBitsAndClear -RtlFindUnicodePrefix -RtlFormatCurrentUserKeyPath -RtlFreeAnsiString -RtlFreeHeap -RtlFreeRangeList -RtlFreeOemString -RtlFreeUnicodeString -RtlGUIDFromString -RtlGenerate8dot3Name -RtlGetAce -RtlGetCallersAddress -RtlGetCompressionWorkSpaceSize -RtlGetDaclSecurityDescriptor -RtlGetDefaultCodePage -RtlGetElementGenericTable -RtlGetElementGenericTableAvl -RtlGetFirstRange -RtlGetGroupSecurityDescriptor -RtlGetNextRange -RtlGetNtGlobalFlags -RtlGetOwnerSecurityDescriptor -RtlGetSaclSecurityDescriptor -RtlGetSetBootStatusData -RtlGetVersion -RtlHashUnicodeString -RtlImageNtHeader -RtlImageDirectoryEntryToData -RtlInitAnsiString -RtlInitCodePageTable -RtlInitString -RtlInitUnicodeString -RtlInitializeBitMap -RtlInitializeGenericTable -RtlInitializeGenericTableAvl -RtlInitializeRangeList -RtlInitializeSid -RtlInitializeUnicodePrefix -RtlInsertElementGenericTable -RtlInsertElementGenericTableAvl -RtlInsertElementGenericTableFull -RtlInsertElementGenericTableFullAvl -RtlInsertUnicodePrefix -RtlInt64ToUnicodeString -RtlIntegerToChar -RtlIntegerToUnicode -RtlIntegerToUnicodeString -RtlInvertRangeList -RtlIpv4AddressToStringA -RtlIpv4AddressToStringExA -RtlIpv4AddressToStringExW -RtlIpv4AddressToStringW -RtlIpv4StringToAddressA -RtlIpv4StringToAddressExA -RtlIpv4StringToAddressExW -RtlIpv4StringToAddressW -RtlIpv6AddressToStringA -RtlIpv6AddressToStringExA -RtlIpv6AddressToStringExW -RtlIpv6AddressToStringW -RtlIpv6StringToAddressA -RtlIpv6StringToAddressExA -RtlIpv6StringToAddressExW -RtlIpv6StringToAddressW -RtlIsGenericTableEmpty -RtlIsGenericTableEmptyAvl -RtlIsNameLegalDOS8Dot3 -RtlIsRangeAvailable -RtlIsValidOemCharacter -RtlLargeIntegerAdd -RtlLargeIntegerArithmeticShift -RtlLargeIntegerDivide -RtlLargeIntegerNegate -RtlLargeIntegerShiftLeft -RtlLargeIntegerShiftRight -RtlLargeIntegerSubtract -RtlLengthRequiredSid -RtlLengthSecurityDescriptor -RtlLengthSid -RtlLockBootStatusData -RtlLookupAtomInAtomTable -RtlLookupElementGenericTable -RtlLookupElementGenericTableAvl -RtlLookupElementGenericTableFull -RtlLookupElementGenericTableFullAvl -RtlMapGenericMask -RtlMapSecurityErrorToNtStatus -RtlMergeRangeLists -RtlMoveMemory -RtlMultiByteToUnicodeN -RtlMultiByteToUnicodeSize -RtlNextUnicodePrefix -RtlNtStatusToDosError -RtlNtStatusToDosErrorNoTeb -RtlNumberGenericTableElements -RtlNumberGenericTableElementsAvl -RtlNumberOfClearBits -RtlNumberOfSetBits -RtlOemStringToCountedUnicodeString -RtlOemStringToUnicodeSize=RtlxOemStringToUnicodeSize -RtlOemStringToUnicodeString -RtlOemToUnicodeN -RtlPinAtomInAtomTable -RtlPrefetchMemoryNonTemporal -RtlPrefixString -RtlPrefixUnicodeString -RtlQueryAtomInAtomTable -RtlQueryRegistryValues -RtlQueryTimeZoneInformation -RtlRaiseException -RtlRandom -RtlRandomEx -RtlRealPredecessor -RtlRealSuccessor -RtlRemoveUnicodePrefix -RtlReserveChunk -RtlSecondsSince1970ToTime -RtlSecondsSince1980ToTime -RtlSelfRelativeToAbsoluteSD2 -RtlSelfRelativeToAbsoluteSD -RtlSetAllBits -RtlSetBit -RtlSetBits -RtlSetDaclSecurityDescriptor -RtlSetGroupSecurityDescriptor -RtlSetOwnerSecurityDescriptor -RtlSetSaclSecurityDescriptor -RtlSetTimeZoneInformation -RtlSizeHeap -RtlSplay -RtlStringFromGUID -RtlSubAuthorityCountSid -RtlSubAuthoritySid -RtlSubtreePredecessor -RtlSubtreeSuccessor -RtlTestBit -RtlTimeFieldsToTime -RtlTimeToElapsedTimeFields -RtlTimeToSecondsSince1970 -RtlTimeToSecondsSince1980 -RtlTimeToTimeFields -RtlUlongByteSwap -RtlUlonglongByteSwap -RtlUnicodeStringToAnsiSize=RtlxUnicodeStringToAnsiSize -RtlUnicodeStringToAnsiString -RtlUnicodeStringToCountedOemString -RtlUnicodeStringToInteger -RtlUnicodeStringToOemSize=RtlxUnicodeStringToOemSize -RtlUnicodeStringToOemString -RtlUnicodeToCustomCPN -RtlUnicodeToMultiByteN -RtlUnicodeToMultiByteSize -RtlUnicodeToOemN -RtlUnlockBootStatusData -RtlUnwind -RtlUpcaseUnicodeChar -RtlUpcaseUnicodeString -RtlUpcaseUnicodeStringToAnsiString -RtlUpcaseUnicodeStringToCountedOemString -RtlUpcaseUnicodeStringToOemString -RtlUpcaseUnicodeToCustomCPN -RtlUpcaseUnicodeToMultiByteN -RtlUpcaseUnicodeToOemN -RtlUpperChar -RtlUpperString -RtlUshortByteSwap -RtlValidRelativeSecurityDescriptor -RtlValidSecurityDescriptor -RtlValidSid -RtlVerifyVersionInfo -RtlVolumeDeviceToDosName -RtlWalkFrameChain -RtlWriteRegistryValue -RtlZeroHeap -RtlZeroMemory -RtlxAnsiStringToUnicodeSize -RtlxOemStringToUnicodeSize -RtlxUnicodeStringToAnsiSize -RtlxUnicodeStringToOemSize -SeAccessCheck -SeAppendPrivileges -SeAssignSecurity -SeAssignSecurityEx -SeAuditHardLinkCreation -SeAuditingFileEvents -SeAuditingFileEventsWithContext -SeAuditingFileOrGlobalEvents -SeAuditingHardLinkEvents -SeAuditingHardLinkEventsWithContext -SeCaptureSecurityDescriptor -SeCaptureSubjectContext -SeCloseObjectAuditAlarm -SeCreateAccessState -SeCreateClientSecurity -SeCreateClientSecurityFromSubjectContext -SeDeassignSecurity -SeDeleteAccessState -SeDeleteObjectAuditAlarm -SeExports DATA -SeFilterToken -SeFreePrivileges -SeImpersonateClient -SeImpersonateClientEx -SeLockSubjectContext -SeMarkLogonSessionForTerminationNotification -SeOpenObjectAuditAlarm -SeOpenObjectForDeleteAuditAlarm -SePrivilegeCheck -SePrivilegeObjectAuditAlarm -SePublicDefaultDacl DATA -SeQueryAuthenticationIdToken -SeQueryInformationToken -SeQuerySecurityDescriptorInfo -SeQuerySessionIdToken -SeRegisterLogonSessionTerminatedRoutine -SeReleaseSecurityDescriptor -SeReleaseSubjectContext -SeSetAccessStateGenericMapping -SeSetSecurityDescriptorInfo -SeSetSecurityDescriptorInfoEx -SeSinglePrivilegeCheck -SeSystemDefaultDacl DATA -SeTokenImpersonationLevel -SeTokenIsAdmin -SeTokenIsRestricted -SeTokenIsWriteRestricted -SeTokenType -SeUnlockSubjectContext -SeUnregisterLogonSessionTerminatedRoutine -SeValidSecurityDescriptor -VerSetConditionMask -WRITE_REGISTER_UCHAR -WRITE_REGISTER_ULONG -WRITE_REGISTER_USHORT -WRITE_REGISTER_BUFFER_UCHAR -WRITE_REGISTER_BUFFER_ULONG -WRITE_REGISTER_BUFFER_USHORT -ZwAccessCheckAndAuditAlarm -ZwAddBootEntry -ZwAdjustPrivilegesToken -ZwAlertThread -ZwAllocateVirtualMemory -ZwAssignProcessToJobObject -ZwCancelIoFile -ZwCancelTimer -ZwClearEvent -ZwClose -ZwCloseObjectAuditAlarm -ZwConnectPort -ZwCreateDirectoryObject -ZwCreateEvent -ZwCreateFile -ZwCreateJobObject -ZwCreateKey -ZwCreateSection -ZwCreateSymbolicLinkObject -ZwCreateTimer -ZwDeleteFile -ZwDeleteKey -ZwDeleteValueKey -ZwDeviceIoControlFile -ZwDisplayString -ZwDuplicateObject -ZwDuplicateToken -ZwEnumerateBootEntries -ZwEnumerateKey -ZwEnumerateValueKey -ZwFlushInstructionCache -ZwFlushKey -ZwFlushVirtualMemory -ZwFreeVirtualMemory -ZwFsControlFile -ZwInitiatePowerAction -ZwIsProcessInJob -ZwLoadDriver -ZwLoadKey -ZwMakeTemporaryObject -ZwMapViewOfSection -ZwNotifyChangeKey -ZwOpenDirectoryObject -ZwOpenEvent -ZwOpenFile -ZwOpenJobObject -ZwOpenKey -ZwOpenProcess -ZwOpenProcessToken -ZwOpenProcessTokenEx -ZwOpenSection -ZwOpenSymbolicLinkObject -ZwOpenThread -ZwOpenThreadToken -ZwOpenThreadTokenEx -ZwOpenTimer -ZwPowerInformation -ZwPulseEvent -ZwQueryBootEntryOrder -ZwQueryBootOptions -ZwQueryDefaultLocale -ZwQueryDefaultUILanguage -ZwQueryDirectoryFile -ZwQueryDirectoryObject -ZwQueryEaFile -ZwQueryFullAttributesFile -ZwQueryInformationAtom -ZwQueryInformationFile -ZwQueryInformationJobObject -ZwQueryInformationProcess -ZwQueryInformationThread -ZwQueryInformationToken -ZwQueryInstallUILanguage -ZwQueryKey -ZwQueryObject -ZwQuerySection -ZwQuerySecurityObject -ZwQuerySymbolicLinkObject -ZwQuerySystemInformation -ZwQuerySystemTime -ZwQueryValueKey -ZwQueryVolumeInformationFile -ZwReadFile -ZwReplaceKey -ZwRequestWaitReplyPort -ZwResetEvent -ZwRestoreKey -ZwSaveKey -ZwSaveKeyEx -ZwSetBootEntryOrder -ZwSetBootOptions -ZwSetDefaultLocale -ZwSetDefaultUILanguage -ZwSetEaFile -ZwSetEvent -ZwSetInformationFile -ZwSetInformationJobObject -ZwSetInformationObject -ZwSetInformationProcess -ZwSetInformationThread -ZwSetSecurityObject -ZwSetSystemInformation -ZwSetSystemTime -ZwSetTimer -ZwSetValueKey -ZwSetVolumeInformationFile -ZwTerminateJobObject -ZwTerminateProcess -ZwTranslateFilePath -ZwUnloadDriver -ZwUnloadKey -ZwUnmapViewOfSection -ZwWaitForMultipleObjects -ZwWaitForSingleObject -ZwWriteFile -ZwYieldExecution -_abnormal_termination -_except_handler2 -_except_handler3 -_global_unwind2 -_itoa -_itow -_local_unwind2 -_purecall -_snprintf -_snwprintf -_stricmp -_strlwr -_strnicmp -_strnset -_strrev -_strset -_strupr -_vsnprintf -_vsnwprintf -_wcsicmp -_wcslwr -_wcsnicmp -_wcsnset -_wcsrev -_wcsupr -atoi -atol -isdigit -islower -isprint -isspace -isupper -isxdigit -mbstowcs -mbtowc -memchr -memcpy -memmove -memset -qsort -rand -sprintf -srand -strcat -strchr -strcmp -strcpy -strlen -strncat -strncmp -strncpy -strrchr -strspn -strstr -swprintf -tolower -toupper -towlower -towupper -vDbgPrintEx -vDbgPrintExWithPrefix -vsprintf -wcscat -wcschr -wcscmp -wcscpy -wcscspn -wcslen -wcsncat -wcsncmp -wcsncpy -wcsrchr -wcsspn -wcsstr -wcstombs -wctomb From f26bc8dd86c3ebb5abff5eae140f32680024a88f Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Thu, 4 Sep 2008 11:35:27 +0000 Subject: [PATCH 315/324] dbgprint and shutdown should be in PATH svn path=/trunk/; revision=35931 --- reactos/dll/win32/syssetup/wizard.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/reactos/dll/win32/syssetup/wizard.c b/reactos/dll/win32/syssetup/wizard.c index c55fdcd04b2..5f03bcab1e3 100644 --- a/reactos/dll/win32/syssetup/wizard.c +++ b/reactos/dll/win32/syssetup/wizard.c @@ -2217,22 +2217,9 @@ ProcessUnattendInf(HINF hUnattendedInf) (const BYTE*)szPath, strlen(szPath) * sizeof(char)); - if (GetSystemDirectoryA(szPath, MAX_PATH)) - { - UINT length = strlen(szPath); - - if (szPath[length-1] != '\\') - { - szPath[length] = '\\'; - length++; - } - strcpy(&szPath[length], "dbgprint.exe --winetest %windir%\\bin\\version_winetest.exe\n"); - fwrite(szPath, 1, strlen(szPath) + 1, file); - strcpy(&szPath[length], "dbgprint.exe SYSREG_CHECKPOINT:THIRDBOOT_COMPLETE\n"); - fwrite(szPath, 1, strlen(szPath) + 1, file); - strcpy(&szPath[length], "shutdown.exe -s"); - fwrite(szPath, 1, strlen(szPath) + 1, file); - } + fprintf(file, "dbgprint --winetest %windir%\\bin\\version_winetest.exe\n"); + fprintf(file, "dbgprint SYSREG_CHECKPOINT:THIRDBOOT_COMPLETE\n"); + fprintf(file, "shutdown -s\n"); fclose(file); } RegCloseKey(hKey); From d252c45d777a2535480760892f9389b251481de0 Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Thu, 4 Sep 2008 11:37:40 +0000 Subject: [PATCH 316/324] fix warnings svn path=/trunk/; revision=35932 --- reactos/dll/win32/syssetup/wizard.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reactos/dll/win32/syssetup/wizard.c b/reactos/dll/win32/syssetup/wizard.c index 5f03bcab1e3..51fb58153fc 100644 --- a/reactos/dll/win32/syssetup/wizard.c +++ b/reactos/dll/win32/syssetup/wizard.c @@ -2217,9 +2217,9 @@ ProcessUnattendInf(HINF hUnattendedInf) (const BYTE*)szPath, strlen(szPath) * sizeof(char)); - fprintf(file, "dbgprint --winetest %windir%\\bin\\version_winetest.exe\n"); - fprintf(file, "dbgprint SYSREG_CHECKPOINT:THIRDBOOT_COMPLETE\n"); - fprintf(file, "shutdown -s\n"); + fprintf(file, "%s\n", "dbgprint --winetest %windir%\\bin\\version_winetest.exe"); + fprintf(file, "%s\n", "dbgprint SYSREG_CHECKPOINT:THIRDBOOT_COMPLETE"); + fprintf(file, "%s\n", "shutdown -s"); fclose(file); } RegCloseKey(hKey); From b3e9863132d8fda18d822980728b8d7b380d163c Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Thu, 4 Sep 2008 12:13:20 +0000 Subject: [PATCH 317/324] - Fix kernel exports ARM - Add KeSaveFloatingPointState/KeRestoreFloatingPointState stubs to ARM kernel as is done for other architectures (like AMD64). They have nothing to do on ARM, so they just return success. svn path=/trunk/; revision=35934 --- reactos/ntoskrnl/ke/arm/cpu.c | 26 ++++++++++++++++++++++++++ reactos/ntoskrnl/ntoskrnl.spec | 15 ++++++--------- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/reactos/ntoskrnl/ke/arm/cpu.c b/reactos/ntoskrnl/ke/arm/cpu.c index 28868f3103a..a9154ceaad1 100644 --- a/reactos/ntoskrnl/ke/arm/cpu.c +++ b/reactos/ntoskrnl/ke/arm/cpu.c @@ -261,6 +261,32 @@ KeSaveStateForHibernate(IN PKPROCESSOR_STATE State) KiSaveProcessorControlState(State); } +/* + * @implemented + */ +NTSTATUS +NTAPI +KeSaveFloatingPointState(OUT PKFLOATING_SAVE Save) +{ + // + // Nothing to do on ARM + // + return STATUS_SUCCESS; +} + +/* + * @implemented + */ +NTSTATUS +NTAPI +KeRestoreFloatingPointState(IN PKFLOATING_SAVE Save) +{ + // + // Nothing to do on ARM + // + return STATUS_SUCCESS; +} + /* SYSTEM CALLS NOT VALID ON THIS CPU *****************************************/ /* diff --git a/reactos/ntoskrnl/ntoskrnl.spec b/reactos/ntoskrnl/ntoskrnl.spec index 65f496d7c7b..992a5651790 100644 --- a/reactos/ntoskrnl/ntoskrnl.spec +++ b/reactos/ntoskrnl/ntoskrnl.spec @@ -559,9 +559,6 @@ @ stdcall KeCapturePersistentThreadState(ptr long long long long long ptr) @ stdcall KeClearEvent(ptr) @ stdcall KeConnectInterrupt(ptr) -#ifdef _M_ARM -@ extern KeDcacheFlushCount -#endif @ stdcall KeDelayExecutionThread(long long ptr) @ stdcall KeDeregisterBugCheckCallback(ptr) @ stdcall KeDeregisterBugCheckReasonCallback(ptr) @@ -591,9 +588,6 @@ ;KeI386ReleaseLid ;KeI386SetGdtSelector #endif -#ifdef _M_ARM -@ extern KeIcacheFlushCount -#endif @ stdcall KeInitializeApc(ptr ptr long ptr ptr ptr long ptr) @ stdcall KeInitializeCrashDumpHeader(long long ptr long ptr) @ stdcall KeInitializeDeviceQueue(ptr) @@ -711,15 +705,16 @@ @ fastcall KiAcquireSpinLock(ptr) @ extern KiBugCheckData @ stdcall KiCheckForKernelApcDelivery() +#ifdef _M_IX86 @ stdcall KiCoprocessorError() +#endif @ stdcall KiDeliverApc(long ptr ptr) +#ifdef _M_IX86 @ stdcall KiDispatchInterrupt() +#endif @ extern KiEnableTimerWatchdog @ stdcall KiIpiServiceRoutine(ptr ptr) @ fastcall KiReleaseSpinLock(ptr) -#ifdef _M_ARM -@ extern KiRawTicks -#endif @ cdecl KiUnexpectedInterrupt() #ifdef _M_IX86 ;Kii386SpinOnSpinLock @@ -1521,6 +1516,7 @@ ;_CIsin ;_CIsqrt @ cdecl _abnormal_termination() +#ifdef _M_IX86 @ cdecl _alldiv() @ cdecl _alldvrm() @ cdecl _allmul() @@ -1532,6 +1528,7 @@ @ cdecl _aulldvrm() @ cdecl _aullrem() @ cdecl _aullshr() +#endif @ cdecl _except_handler2() @ cdecl _except_handler3() @ cdecl _global_unwind2() From 93436d4b0f64220437962496b976555bb1c5e0f9 Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Thu, 4 Sep 2008 15:11:49 +0000 Subject: [PATCH 318/324] run all winetests svn path=/trunk/; revision=35936 --- reactos/dll/win32/syssetup/wizard.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/reactos/dll/win32/syssetup/wizard.c b/reactos/dll/win32/syssetup/wizard.c index 51fb58153fc..4e9ae49558a 100644 --- a/reactos/dll/win32/syssetup/wizard.c +++ b/reactos/dll/win32/syssetup/wizard.c @@ -2192,6 +2192,8 @@ ProcessUnattendInf(HINF hUnattendedInf) { char szPath[MAX_PATH]; FILE * file; + WIN32_FIND_DATAA ffd; + HANDLE hFind = INVALID_HANDLE_VALUE; #if 0 if (!SHGetSpecialFolderPathA(0, szPath, CSIDL_DESKTOP, FALSE)) { @@ -2217,7 +2219,20 @@ ProcessUnattendInf(HINF hUnattendedInf) (const BYTE*)szPath, strlen(szPath) * sizeof(char)); - fprintf(file, "%s\n", "dbgprint --winetest %windir%\\bin\\version_winetest.exe"); + + /* winetests */ + hFind = FindFirstFileA("%windir%\\bin\\*.exe", &ffd); + if (hFind != INVALID_HANDLE_VALUE) + { + do + { + if (ffd.dwFileAttributes & ~FILE_ATTRIBUTE_DIRECTORY) + fprintf(file, "%s%s\n", "dbgprint --winetest %windir%\\bin\\", ffd.cFileName); + } + while (FindNextFileA(hFind, &ffd) != 0); + FindClose(hFind); + } + fprintf(file, "%s\n", "dbgprint SYSREG_CHECKPOINT:THIRDBOOT_COMPLETE"); fprintf(file, "%s\n", "shutdown -s"); fclose(file); From 414cbcdc62cb6dc31969e840410f5a8d9c4c7d56 Mon Sep 17 00:00:00 2001 From: Ged Murphy Date: Thu, 4 Sep 2008 15:13:07 +0000 Subject: [PATCH 319/324] Please test your code before you ruin mine. It's annoying fixing other peoples mess in your own code. See issue #3701 for more details. svn path=/trunk/; revision=35937 --- reactos/dll/cpl/timedate/clock.c | 89 +++++++++++++++++++------------- 1 file changed, 54 insertions(+), 35 deletions(-) diff --git a/reactos/dll/cpl/timedate/clock.c b/reactos/dll/cpl/timedate/clock.c index 351726034c6..59e9e8e8b5b 100644 --- a/reactos/dll/cpl/timedate/clock.c +++ b/reactos/dll/cpl/timedate/clock.c @@ -28,16 +28,6 @@ typedef struct _CLOCKDATA static const WCHAR szClockWndClass[] = L"ClockWndClass"; -static VOID -SetIsotropic(HDC hdc, PCLOCKDATA pClockData) -{ - /* set isotropic mode */ - SetMapMode(hdc, MM_ISOTROPIC); - /* position axis in centre of window */ - SetViewportOrgEx(hdc, pClockData->cxClient / 2, pClockData->cyClient / 2, NULL); -} - - static VOID RotatePoint(POINT pt[], INT iNum, INT iAngle) { @@ -141,8 +131,7 @@ ClockWndProc(HWND hwnd, LPARAM lParam) { PCLOCKDATA pClockData; - HDC hdc, dcMem; - HBITMAP bmMem, bmOld; + HDC hdc, hdcMem; PAINTSTRUCT ps; pClockData = (PCLOCKDATA)GetWindowLongPtrW(hwnd, GWLP_USERDATA); @@ -169,38 +158,68 @@ ClockWndProc(HWND hwnd, case WM_TIMER: GetLocalTime(&pClockData->stCurrent); - //InvalidateRect(hwnd, NULL, TRUE); - InvalidateRect(hwnd, NULL, FALSE); + InvalidateRect(hwnd, NULL, TRUE); pClockData->stPrevious = pClockData->stCurrent; break; case WM_PAINT: hdc = BeginPaint(hwnd, &ps); - /* Use an offscreen dc to avoid flicker */ + hdcMem = CreateCompatibleDC(hdc); + if (hdcMem) + { + HBITMAP hBmp, hBmpOld; + + hBmp = CreateCompatibleBitmap(hdc, + pClockData->cxClient, + pClockData->cyClient); + if (hBmp) + { + HBRUSH hWinBrush, hWinBrushOld; + INT oldMap; + POINT oldOrg; - dcMem = CreateCompatibleDC(hdc); - bmMem = CreateCompatibleBitmap(hdc, ps.rcPaint.right - ps.rcPaint.left, ps.rcPaint.bottom - ps.rcPaint.top); + hBmpOld = SelectObject(hdcMem, hBmp); - bmOld = SelectObject(dcMem, bmMem); - SetViewportOrgEx(dcMem, -ps.rcPaint.left, -ps.rcPaint.top, NULL); - FillRect(dcMem, &ps.rcPaint, GetSysColorBrush(COLOR_BTNFACE)); + hWinBrush = GetSysColorBrush(COLOR_BTNFACE); + hWinBrushOld = SelectObject(hdcMem, hWinBrush); + PatBlt(hdcMem, + 0, + 0, + pClockData->cxClient, + pClockData->cyClient, + PATCOPY); - SetIsotropic(dcMem, pClockData); - DrawClock(dcMem, pClockData); - DrawHands(dcMem, &pClockData->stPrevious, TRUE); - - /* Blit the changes to the screen */ - BitBlt(hdc, - ps.rcPaint.left, ps.rcPaint.top, - ps.rcPaint.right - ps.rcPaint.left, ps.rcPaint.bottom - ps.rcPaint.top, - dcMem, - ps.rcPaint.left, ps.rcPaint.top, - SRCCOPY); + oldMap = SetMapMode(hdcMem, MM_ISOTROPIC); + SetViewportOrgEx(hdcMem, + pClockData->cxClient / 2, + pClockData->cyClient / 2, + &oldOrg); + + DrawClock(hdcMem, pClockData); + DrawHands(hdcMem, &pClockData->stPrevious, TRUE); + + SetMapMode(hdcMem, oldMap); + SetViewportOrgEx(hdcMem, oldOrg.x, oldOrg.y, NULL); + + BitBlt(hdc, + 0, + 0, + pClockData->cxClient, + pClockData->cyClient, + hdcMem, + 0, + 0, + SRCCOPY); + + SelectObject(hdcMem, hWinBrushOld); + SelectObject(hdcMem, hBmpOld); + DeleteObject(hBmp); + } + + DeleteDC(hdcMem); + } - SelectObject(dcMem, bmOld); - DeleteObject(bmMem); - DeleteObject(dcMem); EndPaint(hwnd, &ps); break; @@ -226,7 +245,7 @@ ClockWndProc(HWND hwnd, CopyMemory(&pClockData->stPrevious, (LPSYSTEMTIME)lParam, sizeof(SYSTEMTIME)); /* Redraw the clock */ - InvalidateRect(hwnd, NULL, FALSE); + InvalidateRect(hwnd, NULL, TRUE); break; default: From 7f1a28a669b65fdf3511719fd3f87976b4fd57ba Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Thu, 4 Sep 2008 15:28:40 +0000 Subject: [PATCH 320/324] work around a bug in ReactOS (FindFirstFile isn't working with environment vars) svn path=/trunk/; revision=35939 --- reactos/dll/win32/syssetup/wizard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/dll/win32/syssetup/wizard.c b/reactos/dll/win32/syssetup/wizard.c index 4e9ae49558a..d2cd2f1ffce 100644 --- a/reactos/dll/win32/syssetup/wizard.c +++ b/reactos/dll/win32/syssetup/wizard.c @@ -2221,7 +2221,7 @@ ProcessUnattendInf(HINF hUnattendedInf) /* winetests */ - hFind = FindFirstFileA("%windir%\\bin\\*.exe", &ffd); + hFind = FindFirstFileA("c:\\reactos\\bin\\*.exe", &ffd); /* %windir% isn't working on ros */ if (hFind != INVALID_HANDLE_VALUE) { do From c98c9900e01d2d210ef4fddf10a4a17344332078 Mon Sep 17 00:00:00 2001 From: Ged Murphy Date: Thu, 4 Sep 2008 15:51:11 +0000 Subject: [PATCH 321/324] restart the clock when it's been stopped to be altered svn path=/trunk/; revision=35940 --- reactos/dll/cpl/timedate/clock.c | 17 ++++++++++------- reactos/dll/cpl/timedate/dateandtime.c | 8 ++++++-- reactos/dll/cpl/timedate/timedate.h | 3 ++- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/reactos/dll/cpl/timedate/clock.c b/reactos/dll/cpl/timedate/clock.c index 59e9e8e8b5b..7c74ac5f1fe 100644 --- a/reactos/dll/cpl/timedate/clock.c +++ b/reactos/dll/cpl/timedate/clock.c @@ -158,7 +158,7 @@ ClockWndProc(HWND hwnd, case WM_TIMER: GetLocalTime(&pClockData->stCurrent); - InvalidateRect(hwnd, NULL, TRUE); + InvalidateRect(hwnd, NULL, FALSE); pClockData->stPrevious = pClockData->stCurrent; break; @@ -233,19 +233,22 @@ ClockWndProc(HWND hwnd, HeapFree(GetProcessHeap(), 0, pClockData); break; - case CLM_SETTIME: - /* Stop the timer if it is still running */ + case CLM_STOPCLOCK: if (pClockData->bTimer) { KillTimer(hwnd, ID_TIMER); pClockData->bTimer = FALSE; } + break; - /* Set the current time */ - CopyMemory(&pClockData->stPrevious, (LPSYSTEMTIME)lParam, sizeof(SYSTEMTIME)); + case CLM_STARTCLOCK: + if (!pClockData->bTimer) + { + InvalidateRect(hwnd, NULL, FALSE); - /* Redraw the clock */ - InvalidateRect(hwnd, NULL, TRUE); + SetTimer(hwnd, ID_TIMER, 1000, NULL); + pClockData->bTimer = TRUE; + } break; default: diff --git a/reactos/dll/cpl/timedate/dateandtime.c b/reactos/dll/cpl/timedate/dateandtime.c index 493f340afc0..750e895bce7 100644 --- a/reactos/dll/cpl/timedate/dateandtime.c +++ b/reactos/dll/cpl/timedate/dateandtime.c @@ -347,8 +347,8 @@ DateTimePageProc(HWND hwndDlg, KillTimer(hwndDlg, ID_TIMER); /* Tell the clock to stop ticking */ - SendDlgItemMessageW(hwndDlg, IDC_CLOCKWND, CLM_SETTIME, - 0, (LPARAM)&((LPNMDATETIMECHANGE)lpnm)->st); + SendDlgItemMessageW(hwndDlg, IDC_CLOCKWND, CLM_STOPCLOCK, + 0, 0); /* Enable the 'Apply' button */ PropSheet_Changed(GetParent(hwndDlg), hwndDlg); @@ -381,6 +381,10 @@ DateTimePageProc(HWND hwndDlg, case PSN_APPLY: SetLocalSystemTime(hwndDlg); SetTimer(hwndDlg, ID_TIMER, 1000, NULL); + + /* Tell the clock to start ticking */ + SendDlgItemMessageW(hwndDlg, IDC_CLOCKWND, CLM_STARTCLOCK, + 0, 0); return TRUE; } break; diff --git a/reactos/dll/cpl/timedate/timedate.h b/reactos/dll/cpl/timedate/timedate.h index 4f2fce67b7b..54915563b90 100644 --- a/reactos/dll/cpl/timedate/timedate.h +++ b/reactos/dll/cpl/timedate/timedate.h @@ -51,7 +51,8 @@ VOID DisplayWin32Error(DWORD dwErrorCode); /* clock.c */ -#define CLM_SETTIME (WM_USER + 1) +#define CLM_STOPCLOCK (WM_USER + 1) +#define CLM_STARTCLOCK (WM_USER + 2) BOOL RegisterClockControl(VOID); VOID UnregisterClockControl(VOID); From 0728b1b86997fceaffad213f268ce2ab1ca00b8c Mon Sep 17 00:00:00 2001 From: Ged Murphy Date: Thu, 4 Sep 2008 15:55:46 +0000 Subject: [PATCH 322/324] missed this, it's not needed. svn path=/trunk/; revision=35941 --- reactos/dll/cpl/timedate/clock.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/reactos/dll/cpl/timedate/clock.c b/reactos/dll/cpl/timedate/clock.c index 7c74ac5f1fe..b2f5b582071 100644 --- a/reactos/dll/cpl/timedate/clock.c +++ b/reactos/dll/cpl/timedate/clock.c @@ -244,8 +244,6 @@ ClockWndProc(HWND hwnd, case CLM_STARTCLOCK: if (!pClockData->bTimer) { - InvalidateRect(hwnd, NULL, FALSE); - SetTimer(hwnd, ID_TIMER, 1000, NULL); pClockData->bTimer = TRUE; } From fac1457233c8ee56f08bd4b37a2ed028b5d9abdd Mon Sep 17 00:00:00 2001 From: Colin Finck Date: Thu, 4 Sep 2008 18:37:34 +0000 Subject: [PATCH 323/324] - Sync wininet to Wine HEAD - Remove a change from our "wininet_ros.diff" file, which has been applied to Wine as well in the meantime - Eliminate a warning in our "inet_ntop.c" (ROS glue code) svn path=/trunk/; revision=35943 --- reactos/dll/win32/wininet/cookie.c | 16 +- reactos/dll/win32/wininet/ftp.c | 10 +- reactos/dll/win32/wininet/http.c | 195 +++--- reactos/dll/win32/wininet/inet_ntop.c | 3 + reactos/dll/win32/wininet/internet.c | 767 +++++++++++---------- reactos/dll/win32/wininet/internet.h | 18 +- reactos/dll/win32/wininet/netconnection.c | 17 + reactos/dll/win32/wininet/rsrc.rc | 1 + reactos/dll/win32/wininet/urlcache.c | 2 +- reactos/dll/win32/wininet/utility.c | 14 + reactos/dll/win32/wininet/wininet_Ro.rc | 49 ++ reactos/dll/win32/wininet/wininet_ros.diff | 22 - 12 files changed, 611 insertions(+), 503 deletions(-) create mode 100644 reactos/dll/win32/wininet/wininet_Ro.rc diff --git a/reactos/dll/win32/wininet/cookie.c b/reactos/dll/win32/wininet/cookie.c index bd22bc625c4..12d841bc7b9 100644 --- a/reactos/dll/win32/wininet/cookie.c +++ b/reactos/dll/win32/wininet/cookie.c @@ -631,10 +631,10 @@ BOOL WINAPI InternetClearAllPerSiteCookieDecisions( VOID ) * * See InternetEnumPerSiteCookieDecisionW. */ -BOOL WINAPI InternetEnumPerSiteCookieDecisionA( LPSTR pszSiteName, unsigned long *pcSiteNameSize, - unsigned long *pdwDecision, unsigned long dwIndex ) +BOOL WINAPI InternetEnumPerSiteCookieDecisionA( LPSTR pszSiteName, ULONG *pcSiteNameSize, + ULONG *pdwDecision, ULONG dwIndex ) { - FIXME("(%s, %p, %p, 0x%08lx) stub\n", + FIXME("(%s, %p, %p, 0x%08x) stub\n", debugstr_a(pszSiteName), pcSiteNameSize, pdwDecision, dwIndex); return FALSE; } @@ -649,10 +649,10 @@ BOOL WINAPI InternetEnumPerSiteCookieDecisionA( LPSTR pszSiteName, unsigned long * FALSE on failure * */ -BOOL WINAPI InternetEnumPerSiteCookieDecisionW( LPWSTR pszSiteName, unsigned long *pcSiteNameSize, - unsigned long *pdwDecision, unsigned long dwIndex ) +BOOL WINAPI InternetEnumPerSiteCookieDecisionW( LPWSTR pszSiteName, ULONG *pcSiteNameSize, + ULONG *pdwDecision, ULONG dwIndex ) { - FIXME("(%s, %p, %p, 0x%08lx) stub\n", + FIXME("(%s, %p, %p, 0x%08x) stub\n", debugstr_w(pszSiteName), pcSiteNameSize, pdwDecision, dwIndex); return FALSE; } @@ -660,7 +660,7 @@ BOOL WINAPI InternetEnumPerSiteCookieDecisionW( LPWSTR pszSiteName, unsigned lon /*********************************************************************** * InternetGetPerSiteCookieDecisionA (WININET.@) */ -BOOL WINAPI InternetGetPerSiteCookieDecisionA( LPCSTR pwchHostName, unsigned long *pResult ) +BOOL WINAPI InternetGetPerSiteCookieDecisionA( LPCSTR pwchHostName, ULONG *pResult ) { FIXME("(%s, %p) stub\n", debugstr_a(pwchHostName), pResult); return FALSE; @@ -669,7 +669,7 @@ BOOL WINAPI InternetGetPerSiteCookieDecisionA( LPCSTR pwchHostName, unsigned lon /*********************************************************************** * InternetGetPerSiteCookieDecisionW (WININET.@) */ -BOOL WINAPI InternetGetPerSiteCookieDecisionW( LPCWSTR pwchHostName, unsigned long *pResult ) +BOOL WINAPI InternetGetPerSiteCookieDecisionW( LPCWSTR pwchHostName, ULONG *pResult ) { FIXME("(%s, %p) stub\n", debugstr_w(pwchHostName), pResult); return FALSE; diff --git a/reactos/dll/win32/wininet/ftp.c b/reactos/dll/win32/wininet/ftp.c index 36e90057008..cb24782fa4b 100644 --- a/reactos/dll/win32/wininet/ftp.c +++ b/reactos/dll/win32/wininet/ftp.c @@ -1227,8 +1227,7 @@ static DWORD FTPFILE_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, void *b return ERROR_SUCCESS; } - FIXME("Not implemented option %d\n", option); - return ERROR_INTERNET_INVALID_OPTION; + return INET_QueryOption(option, buffer, size, unicode); } static DWORD FTPFILE_ReadFile(WININETHANDLEHEADER *hdr, void *buffer, DWORD size, DWORD *read) @@ -1553,6 +1552,7 @@ static BOOL FTP_FtpGetFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszRemoteFile, &iar, sizeof(INTERNET_ASYNC_RESULT)); } + if (!bSuccess) DeleteFileW(lpszNewFile); return bSuccess; } @@ -2194,8 +2194,7 @@ static DWORD FTPSESSION_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, void return ERROR_SUCCESS; } - FIXME("Not implemented option %d\n", option); - return ERROR_INTERNET_INVALID_OPTION; + return INET_QueryOption(option, buffer, size, unicode); } static const HANDLEHEADERVtbl FTPSESSIONVtbl = { @@ -3275,8 +3274,7 @@ static DWORD FTPFINDNEXT_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, voi return ERROR_SUCCESS; } - FIXME("Not implemented option %d\n", option); - return ERROR_INTERNET_INVALID_OPTION; + return INET_QueryOption(option, buffer, size, unicode); } static DWORD FTPFINDNEXT_FindNextFileW(WININETHANDLEHEADER *hdr, void *data) diff --git a/reactos/dll/win32/wininet/http.c b/reactos/dll/win32/wininet/http.c index a27997e84c8..f0ad6beddc1 100644 --- a/reactos/dll/win32/wininet/http.c +++ b/reactos/dll/win32/wininet/http.c @@ -1348,6 +1348,8 @@ static BOOL HTTP_ResolveName(LPWININETHTTPREQW lpwhr) INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, INTERNET_STATUS_NAME_RESOLVED, szaddr, strlen(szaddr)+1); + + TRACE("resolved %s to %s\n", debugstr_w(lpwhs->lpszServerName), szaddr); return TRUE; } @@ -1394,7 +1396,6 @@ static void HTTPREQ_Destroy(WININETHANDLEHEADER *hdr) static void HTTPREQ_CloseConnection(WININETHANDLEHEADER *hdr) { LPWININETHTTPREQW lpwhr = (LPWININETHTTPREQW) hdr; - LPWININETHTTPSESSIONW lpwhs = NULL; TRACE("%p\n",lpwhr); @@ -1426,8 +1427,6 @@ static void HTTPREQ_CloseConnection(WININETHANDLEHEADER *hdr) lpwhr->pProxyAuthInfo = NULL; } - lpwhs = lpwhr->lpHttpSession; - INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, INTERNET_STATUS_CLOSING_CONNECTION, 0, 0); @@ -1456,14 +1455,20 @@ static DWORD HTTPREQ_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, void *b WCHAR url[INTERNET_MAX_URL_LENGTH]; HTTPHEADERW *host; DWORD len; + WCHAR *pch; - static const WCHAR formatW[] = {'h','t','t','p',':','/','/','%','s','%','s',0}; + static const WCHAR httpW[] = {'h','t','t','p',':','/','/',0}; static const WCHAR hostW[] = {'H','o','s','t',0}; TRACE("INTERNET_OPTION_URL\n"); host = HTTP_GetHeader(req, hostW); - sprintfW(url, formatW, host->lpszValue, req->lpszPath); + strcpyW(url, httpW); + strcatW(url, host->lpszValue); + if (NULL != (pch = strchrW(url + strlenW(httpW), ':'))) + *pch = 0; + strcatW(url, req->lpszPath); + TRACE("INTERNET_OPTION_URL: %s\n",debugstr_w(url)); if(unicode) { @@ -1576,8 +1581,7 @@ static DWORD HTTPREQ_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, void *b } } - FIXME("Not implemented option %d\n", option); - return ERROR_INTERNET_INVALID_OPTION; + return INET_QueryOption(option, buffer, size, unicode); } static DWORD HTTPREQ_SetOption(WININETHANDLEHEADER *hdr, DWORD option, void *buffer, DWORD size) @@ -1886,13 +1890,10 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs, { LPWININETAPPINFOW hIC = NULL; LPWININETHTTPREQW lpwhr; - LPWSTR lpszCookies; - LPWSTR lpszUrl = NULL; - DWORD nCookieSize; + LPWSTR lpszHostName = NULL; HINTERNET handle = NULL; - static const WCHAR szUrlForm[] = {'h','t','t','p',':','/','/','%','s',0}; + static const WCHAR szHostForm[] = {'%','s',':','%','u',0}; DWORD len; - LPHTTPHEADERW Host; TRACE("-->\n"); @@ -1917,6 +1918,14 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs, lpwhr->lpHttpSession = lpwhs; list_add_head( &lpwhs->hdr.children, &lpwhr->hdr.entry ); + lpszHostName = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR) * + (strlenW(lpwhs->lpszHostName) + 7 /* length of ":65535" + 1 */)); + if (NULL == lpszHostName) + { + INTERNET_SetLastError(ERROR_OUTOFMEMORY); + goto lend; + } + handle = WININET_AllocHandle( &lpwhr->hdr ); if (NULL == handle) { @@ -1971,7 +1980,17 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs, else lpwhr->lpszVersion = WININET_strdupW(g_szHttp1_1); - HTTP_ProcessHeader(lpwhr, szHost, lpwhs->lpszHostName, HTTP_ADDREQ_FLAG_ADD | HTTP_ADDHDR_FLAG_REQ); + if (lpwhs->nHostPort != INTERNET_INVALID_PORT_NUMBER && + lpwhs->nHostPort != INTERNET_DEFAULT_HTTP_PORT && + lpwhs->nHostPort != INTERNET_DEFAULT_HTTPS_PORT) + { + sprintfW(lpszHostName, szHostForm, lpwhs->lpszHostName, lpwhs->nHostPort); + HTTP_ProcessHeader(lpwhr, szHost, lpszHostName, + HTTP_ADDREQ_FLAG_ADD | HTTP_ADDHDR_FLAG_REQ); + } + else + HTTP_ProcessHeader(lpwhr, szHost, lpwhs->lpszHostName, + HTTP_ADDREQ_FLAG_ADD | HTTP_ADDHDR_FLAG_REQ); if (lpwhs->nServerPort == INTERNET_INVALID_PORT_NUMBER) lpwhs->nServerPort = (dwFlags & INTERNET_FLAG_SECURE ? @@ -1986,47 +2005,12 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs, if (NULL != hIC->lpszProxy && hIC->lpszProxy[0] != 0) HTTP_DealWithProxy( hIC, lpwhs, lpwhr ); - Host = HTTP_GetHeader(lpwhr,szHost); - - len = lstrlenW(Host->lpszValue) + strlenW(szUrlForm); - lpszUrl = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR)); - sprintfW( lpszUrl, szUrlForm, Host->lpszValue ); - - if (!(lpwhr->hdr.dwFlags & INTERNET_FLAG_NO_COOKIES) && - InternetGetCookieW(lpszUrl, NULL, NULL, &nCookieSize)) - { - int cnt = 0; - static const WCHAR szCookie[] = {'C','o','o','k','i','e',':',' ',0}; - static const WCHAR szcrlf[] = {'\r','\n',0}; - - lpszCookies = HeapAlloc(GetProcessHeap(), 0, (nCookieSize + 1 + 8)*sizeof(WCHAR)); - - cnt += sprintfW(lpszCookies, szCookie); - InternetGetCookieW(lpszUrl, NULL, lpszCookies + cnt, &nCookieSize); - strcatW(lpszCookies, szcrlf); - - HTTP_HttpAddRequestHeadersW(lpwhr, lpszCookies, strlenW(lpszCookies), - HTTP_ADDREQ_FLAG_ADD); - HeapFree(GetProcessHeap(), 0, lpszCookies); - } - HeapFree(GetProcessHeap(), 0, lpszUrl); - - INTERNET_SendCallback(&lpwhs->hdr, dwContext, INTERNET_STATUS_HANDLE_CREATED, &handle, sizeof(handle)); - /* - * A STATUS_REQUEST_COMPLETE is NOT sent here as per my tests on windows - */ - - if (!HTTP_ResolveName(lpwhr)) - { - InternetCloseHandle( handle ); - handle = NULL; - } - lend: + HeapFree(GetProcessHeap(), 0, lpszHostName); if( lpwhr ) WININET_Release( &lpwhr->hdr ); @@ -3027,17 +3011,16 @@ static BOOL HTTP_HandleRedirect(LPWININETHTTPREQW lpwhr, LPCWSTR lpszUrl) if (!using_proxy) { - HeapFree(GetProcessHeap(), 0, lpwhs->lpszServerName); - lpwhs->lpszServerName = WININET_strdupW(hostName); - lpwhs->nServerPort = urlComponents.nPort; + if (strcmpiW(lpwhs->lpszServerName, hostName) || lpwhs->nServerPort != urlComponents.nPort) + { + HeapFree(GetProcessHeap(), 0, lpwhs->lpszServerName); + lpwhs->lpszServerName = WININET_strdupW(hostName); + lpwhs->nServerPort = urlComponents.nPort; - if (!HTTP_ResolveName(lpwhr)) - return FALSE; - - NETCON_close(&lpwhr->netConnection); - - if (!NETCON_init(&lpwhr->netConnection,lpwhr->hdr.dwFlags & INTERNET_FLAG_SECURE)) - return FALSE; + NETCON_close(&lpwhr->netConnection); + if (!HTTP_ResolveName(lpwhr)) return FALSE; + if (!NETCON_init(&lpwhr->netConnection, lpwhr->hdr.dwFlags & INTERNET_FLAG_SECURE)) return FALSE; + } } else TRACE("Redirect through proxy\n"); @@ -3139,6 +3122,37 @@ static BOOL HTTP_SecureProxyConnect(LPWININETHTTPREQW lpwhr) return TRUE; } +static void HTTP_InsertCookies(LPWININETHTTPREQW lpwhr) +{ + static const WCHAR szUrlForm[] = {'h','t','t','p',':','/','/','%','s',0}; + LPWSTR lpszCookies, lpszUrl = NULL; + DWORD nCookieSize, size; + LPHTTPHEADERW Host = HTTP_GetHeader(lpwhr,szHost); + + size = (strlenW(Host->lpszValue) + strlenW(szUrlForm)) * sizeof(WCHAR); + if (!(lpszUrl = HeapAlloc(GetProcessHeap(), 0, size))) return; + sprintfW( lpszUrl, szUrlForm, Host->lpszValue ); + + if (InternetGetCookieW(lpszUrl, NULL, NULL, &nCookieSize)) + { + int cnt = 0; + static const WCHAR szCookie[] = {'C','o','o','k','i','e',':',' ',0}; + static const WCHAR szcrlf[] = {'\r','\n',0}; + + size = sizeof(szCookie) + nCookieSize * sizeof(WCHAR) + sizeof(szcrlf); + if ((lpszCookies = HeapAlloc(GetProcessHeap(), 0, size))) + { + cnt += sprintfW(lpszCookies, szCookie); + InternetGetCookieW(lpszUrl, NULL, lpszCookies + cnt, &nCookieSize); + strcatW(lpszCookies, szcrlf); + + HTTP_HttpAddRequestHeadersW(lpwhr, lpszCookies, strlenW(lpszCookies), HTTP_ADDREQ_FLAG_ADD); + HeapFree(GetProcessHeap(), 0, lpszCookies); + } + } + HeapFree(GetProcessHeap(), 0, lpszUrl); +} + /*********************************************************************** * HTTP_HttpSendRequestW (internal) * @@ -3159,7 +3173,6 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders, INT responseLen; BOOL loop_next; INTERNET_ASYNC_RESULT iar; - static const WCHAR szClose[] = { 'C','l','o','s','e',0 }; static const WCHAR szPost[] = { 'P','O','S','T',0 }; static const WCHAR szContentLength[] = { 'C','o','n','t','e','n','t','-','L','e','n','g','t','h',':',' ','%','l','i','\r','\n',0 }; @@ -3169,9 +3182,6 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders, assert(lpwhr->hdr.htype == WH_HHTTPREQ); - /* Clear any error information */ - INTERNET_SetLastError(0); - /* if the verb is NULL default to GET */ if (!lpwhr->lpszVerb) lpwhr->lpszVerb = WININET_strdupW(szGET); @@ -3194,6 +3204,17 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders, HTTP_HttpAddRequestHeadersW(lpwhr, agent_header, strlenW(agent_header), HTTP_ADDREQ_FLAG_ADD_IF_NEW); HeapFree(GetProcessHeap(), 0, agent_header); } + if (lpwhr->hdr.dwFlags & INTERNET_FLAG_PRAGMA_NOCACHE) + { + static const WCHAR pragma_nocache[] = {'P','r','a','g','m','a',':',' ','n','o','-','c','a','c','h','e','\r','\n',0}; + HTTP_HttpAddRequestHeadersW(lpwhr, pragma_nocache, strlenW(pragma_nocache), HTTP_ADDREQ_FLAG_ADD_IF_NEW); + } + if ((lpwhr->hdr.dwFlags & INTERNET_FLAG_NO_CACHE_WRITE) && !strcmpW(lpwhr->lpszVerb, szPost)) + { + static const WCHAR cache_control[] = {'C','a','c','h','e','-','C','o','n','t','r','o','l',':', + ' ','n','o','-','c','a','c','h','e','\r','\n',0}; + HTTP_HttpAddRequestHeadersW(lpwhr, cache_control, strlenW(cache_control), HTTP_ADDREQ_FLAG_ADD_IF_NEW); + } do { @@ -3214,13 +3235,16 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders, } HTTP_FixURL(lpwhr); - HTTP_ProcessHeader(lpwhr, szConnection, - lpwhr->hdr.dwFlags & INTERNET_FLAG_KEEP_CONNECTION ? szKeepAlive : szClose, - HTTP_ADDHDR_FLAG_REQ | HTTP_ADDHDR_FLAG_REPLACE); - + if (lpwhr->hdr.dwFlags & INTERNET_FLAG_KEEP_CONNECTION) + { + HTTP_ProcessHeader(lpwhr, szConnection, szKeepAlive, HTTP_ADDHDR_FLAG_REQ | HTTP_ADDHDR_FLAG_REPLACE); + } HTTP_InsertAuthorization(lpwhr, lpwhr->pAuthInfo, szAuthorization); HTTP_InsertAuthorization(lpwhr, lpwhr->pProxyAuthInfo, szProxy_Authorization); + if (!(lpwhr->hdr.dwFlags & INTERNET_FLAG_NO_COOKIES)) + HTTP_InsertCookies(lpwhr); + /* add the headers the caller supplied */ if( lpszHeaders && dwHeaderLength ) { @@ -3413,6 +3437,7 @@ lend: sizeof(INTERNET_ASYNC_RESULT)); TRACE("<--\n"); + if (bSuccess) INTERNET_SetLastError(ERROR_SUCCESS); return bSuccess; } @@ -3451,8 +3476,7 @@ static DWORD HTTPSESSION_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, voi return ERROR_SUCCESS; } - FIXME("Not implemented option %d\n", option); - return ERROR_INTERNET_INVALID_OPTION; + return INET_QueryOption(option, buffer, size, unicode); } static const HANDLEHEADERVtbl HTTPSESSIONVtbl = { @@ -3598,6 +3622,7 @@ static BOOL HTTP_OpenConnection(LPWININETHTTPREQW lpwhr) bSuccess = TRUE; goto lend; } + if (!HTTP_ResolveName(lpwhr)) goto lend; lpwhs = lpwhr->lpHttpSession; @@ -3612,7 +3637,7 @@ static BOOL HTTP_OpenConnection(LPWININETHTTPREQW lpwhr) if (!NETCON_create(&lpwhr->netConnection, lpwhs->socketAddress.sin_family, SOCK_STREAM, 0)) { - WARN("Socket creation failed\n"); + WARN("Socket creation failed: %u\n", INTERNET_GetLastError()); goto lend; } @@ -3813,7 +3838,10 @@ lend: if (bSuccess) return rc; else + { + HeapFree(GetProcessHeap(), 0, lpszRawHeaders); return 0; + } } @@ -4026,7 +4054,9 @@ static BOOL HTTP_ProcessHeader(LPWININETHTTPREQW lpwhr, LPCWSTR field, LPCWSTR v BOOL HTTP_FinishedReading(LPWININETHTTPREQW lpwhr) { WCHAR szVersion[10]; + WCHAR szConnectionResponse[20]; DWORD dwBufferSize = sizeof(szVersion); + BOOL keepalive = FALSE; TRACE("\n"); @@ -4036,15 +4066,19 @@ BOOL HTTP_FinishedReading(LPWININETHTTPREQW lpwhr) &dwBufferSize, NULL) || strcmpiW(szVersion, g_szHttp1_1)) { - WCHAR szConnectionResponse[20]; - dwBufferSize = sizeof(szConnectionResponse); - if ((!HTTP_HttpQueryInfoW(lpwhr, HTTP_QUERY_CONNECTION, szConnectionResponse, &dwBufferSize, NULL) || - strcmpiW(szConnectionResponse, szKeepAlive)) && - (!HTTP_HttpQueryInfoW(lpwhr, HTTP_QUERY_PROXY_CONNECTION, szConnectionResponse, &dwBufferSize, NULL) || - strcmpiW(szConnectionResponse, szKeepAlive))) - { - HTTPREQ_CloseConnection(&lpwhr->hdr); - } + keepalive = TRUE; + } + + dwBufferSize = sizeof(szConnectionResponse); + if (HTTP_HttpQueryInfoW(lpwhr, HTTP_QUERY_PROXY_CONNECTION, szConnectionResponse, &dwBufferSize, NULL) || + HTTP_HttpQueryInfoW(lpwhr, HTTP_QUERY_CONNECTION, szConnectionResponse, &dwBufferSize, NULL)) + { + keepalive = !strcmpiW(szConnectionResponse, szKeepAlive); + } + + if (!keepalive) + { + HTTPREQ_CloseConnection(&lpwhr->hdr); } /* FIXME: store data in the URL cache here */ @@ -4142,6 +4176,9 @@ static BOOL HTTP_DeleteCustomHeader(LPWININETHTTPREQW lpwhr, DWORD index) return FALSE; lpwhr->nCustHeaders--; + HeapFree(GetProcessHeap(), 0, lpwhr->pCustHeaders[index].lpszField); + HeapFree(GetProcessHeap(), 0, lpwhr->pCustHeaders[index].lpszValue); + memmove( &lpwhr->pCustHeaders[index], &lpwhr->pCustHeaders[index+1], (lpwhr->nCustHeaders - index)* sizeof(HTTPHEADERW) ); memset( &lpwhr->pCustHeaders[lpwhr->nCustHeaders], 0, sizeof(HTTPHEADERW) ); diff --git a/reactos/dll/win32/wininet/inet_ntop.c b/reactos/dll/win32/wininet/inet_ntop.c index b13bdcce0c3..f29d46d1625 100644 --- a/reactos/dll/win32/wininet/inet_ntop.c +++ b/reactos/dll/win32/wininet/inet_ntop.c @@ -39,7 +39,10 @@ */ static const char *inet_ntop4(const u_char *src, char *dst, size_t size); + +#ifdef INET6 static const char *inet_ntop6(const u_char *src, char *dst, size_t size); +#endif /* char * * inet_ntop(af, src, dst, size) diff --git a/reactos/dll/win32/wininet/internet.c b/reactos/dll/win32/wininet/internet.c index 2301d9c8628..bad795ddbd4 100644 --- a/reactos/dll/win32/wininet/internet.c +++ b/reactos/dll/win32/wininet/internet.c @@ -181,9 +181,13 @@ BOOL WININET_Release( LPWININETHANDLEHEADER info ) TRACE( "closing connection %p\n", info); info->vtbl->CloseConnection( info ); } - INTERNET_SendCallback(info, info->dwContext, - INTERNET_STATUS_HANDLE_CLOSING, &info->hInternet, - sizeof(HINTERNET)); + /* Don't send a callback if this is a session handle created with InternetOpenUrl */ + if (info->htype != WH_HHTTPSESSION || !(info->dwInternalFlags & INET_OPENURL)) + { + INTERNET_SendCallback(info, info->dwContext, + INTERNET_STATUS_HANDLE_CLOSING, &info->hInternet, + sizeof(HINTERNET)); + } TRACE( "destroying object %p\n", info); if ( info->htype != WH_HINIT ) list_remove( &info->entry ); @@ -491,6 +495,8 @@ static VOID APPINFO_Destroy(WININETHANDLEHEADER *hdr) static DWORD APPINFO_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, void *buffer, DWORD *size, BOOL unicode) { + LPWININETAPPINFOW ai = (LPWININETAPPINFOW)hdr; + switch(option) { case INTERNET_OPTION_HANDLE_TYPE: TRACE("INTERNET_OPTION_HANDLE_TYPE\n"); @@ -501,10 +507,98 @@ static DWORD APPINFO_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, void *b *size = sizeof(DWORD); *(DWORD*)buffer = INTERNET_HANDLE_TYPE_INTERNET; return ERROR_SUCCESS; + + case INTERNET_OPTION_USER_AGENT: { + DWORD bufsize; + + TRACE("INTERNET_OPTION_USER_AGENT\n"); + + bufsize = *size; + + if (unicode) { + *size = (strlenW(ai->lpszAgent) + 1) * sizeof(WCHAR); + if(!buffer || bufsize < *size) + return ERROR_INSUFFICIENT_BUFFER; + + strcpyW(buffer, ai->lpszAgent); + }else { + *size = WideCharToMultiByte(CP_ACP, 0, ai->lpszAgent, -1, NULL, 0, NULL, NULL); + if(!buffer || bufsize < *size) + return ERROR_INSUFFICIENT_BUFFER; + + WideCharToMultiByte(CP_ACP, 0, ai->lpszAgent, -1, buffer, *size, NULL, NULL); + } + + return ERROR_SUCCESS; } - FIXME("Not implemented option %d\n", option); - return ERROR_INTERNET_INVALID_OPTION; + case INTERNET_OPTION_PROXY: + if (unicode) { + INTERNET_PROXY_INFOW *pi = (INTERNET_PROXY_INFOW *)buffer; + DWORD proxyBytesRequired = 0, proxyBypassBytesRequired = 0; + LPWSTR proxy, proxy_bypass; + + if (ai->lpszProxy) + proxyBytesRequired = (lstrlenW(ai->lpszProxy) + 1) * sizeof(WCHAR); + if (ai->lpszProxyBypass) + proxyBypassBytesRequired = (lstrlenW(ai->lpszProxyBypass) + 1) * sizeof(WCHAR); + if (*size < sizeof(INTERNET_PROXY_INFOW) + proxyBytesRequired + proxyBypassBytesRequired) + return ERROR_INSUFFICIENT_BUFFER; + + proxy = (LPWSTR)((LPBYTE)buffer + sizeof(INTERNET_PROXY_INFOW)); + proxy_bypass = (LPWSTR)((LPBYTE)buffer + sizeof(INTERNET_PROXY_INFOW) + proxyBytesRequired); + + pi->dwAccessType = ai->dwAccessType; + pi->lpszProxy = NULL; + pi->lpszProxyBypass = NULL; + if (ai->lpszProxy) { + lstrcpyW(proxy, ai->lpszProxy); + pi->lpszProxy = proxy; + } + + if (ai->lpszProxyBypass) { + lstrcpyW(proxy_bypass, ai->lpszProxyBypass); + pi->lpszProxyBypass = proxy_bypass; + } + + *size = sizeof(INTERNET_PROXY_INFOW) + proxyBytesRequired + proxyBypassBytesRequired; + return ERROR_SUCCESS; + }else { + INTERNET_PROXY_INFOA *pi = (INTERNET_PROXY_INFOA *)buffer; + DWORD proxyBytesRequired = 0, proxyBypassBytesRequired = 0; + LPSTR proxy, proxy_bypass; + + if (ai->lpszProxy) + proxyBytesRequired = WideCharToMultiByte(CP_ACP, 0, ai->lpszProxy, -1, NULL, 0, NULL, NULL); + if (ai->lpszProxyBypass) + proxyBypassBytesRequired = WideCharToMultiByte(CP_ACP, 0, ai->lpszProxyBypass, -1, + NULL, 0, NULL, NULL); + if (*size < sizeof(INTERNET_PROXY_INFOA) + proxyBytesRequired + proxyBypassBytesRequired) + return ERROR_INSUFFICIENT_BUFFER; + + proxy = (LPSTR)((LPBYTE)buffer + sizeof(INTERNET_PROXY_INFOA)); + proxy_bypass = (LPSTR)((LPBYTE)buffer + sizeof(INTERNET_PROXY_INFOA) + proxyBytesRequired); + + pi->dwAccessType = ai->dwAccessType; + pi->lpszProxy = NULL; + pi->lpszProxyBypass = NULL; + if (ai->lpszProxy) { + WideCharToMultiByte(CP_ACP, 0, ai->lpszProxy, -1, proxy, proxyBytesRequired, NULL, NULL); + pi->lpszProxy = proxy; + } + + if (ai->lpszProxyBypass) { + WideCharToMultiByte(CP_ACP, 0, ai->lpszProxyBypass, -1, proxy_bypass, + proxyBypassBytesRequired, NULL, NULL); + pi->lpszProxyBypass = proxy_bypass; + } + + *size = sizeof(INTERNET_PROXY_INFOA) + proxyBytesRequired + proxyBypassBytesRequired; + return ERROR_SUCCESS; + } + } + + return INET_QueryOption(option, buffer, size, unicode); } static const HANDLEHEADERVtbl APPINFOVtbl = { @@ -1046,14 +1140,14 @@ BOOL WINAPI InternetCloseHandle(HINTERNET hInternet) /*********************************************************************** * ConvertUrlComponentValue (Internal) * - * Helper function for InternetCrackUrlW + * Helper function for InternetCrackUrlA * */ static void ConvertUrlComponentValue(LPSTR* lppszComponent, LPDWORD dwComponentLen, LPWSTR lpwszComponent, DWORD dwwComponentLen, LPCSTR lpszStart, LPCWSTR lpwszStart) { - TRACE("%p %d %p %d %p %p\n", lppszComponent, *dwComponentLen, lpwszComponent, dwwComponentLen, lpszStart, lpwszStart); + TRACE("%p %d %p %d %p %p\n", *lppszComponent, *dwComponentLen, lpwszComponent, dwwComponentLen, lpszStart, lpwszStart); if (*dwComponentLen != 0) { DWORD nASCIILength=WideCharToMultiByte(CP_ACP,0,lpwszComponent,dwwComponentLen,NULL,0,NULL,NULL); @@ -1087,9 +1181,13 @@ BOOL WINAPI InternetCrackUrlA(LPCSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags, { DWORD nLength; URL_COMPONENTSW UCW; - WCHAR* lpwszUrl; + BOOL ret = FALSE; + WCHAR *lpwszUrl, *hostname = NULL, *username = NULL, *password = NULL, *path = NULL, + *scheme = NULL, *extra = NULL; - TRACE("(%s %u %x %p)\n", debugstr_a(lpszUrl), dwUrlLength, dwFlags, lpUrlComponents); + TRACE("(%s %u %x %p)\n", + lpszUrl ? debugstr_an(lpszUrl, dwUrlLength ? dwUrlLength : strlen(lpszUrl)) : "(null)", + dwUrlLength, dwFlags, lpUrlComponents); if (!lpszUrl || !*lpszUrl || !lpUrlComponents || lpUrlComponents->dwStructSize != sizeof(URL_COMPONENTSA)) @@ -1111,53 +1209,92 @@ BOOL WINAPI InternetCrackUrlA(LPCSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags, memset(&UCW,0,sizeof(UCW)); UCW.dwStructSize = sizeof(URL_COMPONENTSW); - if(lpUrlComponents->dwHostNameLength!=0) - UCW.dwHostNameLength= lpUrlComponents->dwHostNameLength; - if(lpUrlComponents->dwUserNameLength!=0) - UCW.dwUserNameLength=lpUrlComponents->dwUserNameLength; - if(lpUrlComponents->dwPasswordLength!=0) - UCW.dwPasswordLength=lpUrlComponents->dwPasswordLength; - if(lpUrlComponents->dwUrlPathLength!=0) - UCW.dwUrlPathLength=lpUrlComponents->dwUrlPathLength; - if(lpUrlComponents->dwSchemeLength!=0) - UCW.dwSchemeLength=lpUrlComponents->dwSchemeLength; - if(lpUrlComponents->dwExtraInfoLength!=0) - UCW.dwExtraInfoLength=lpUrlComponents->dwExtraInfoLength; - if(!InternetCrackUrlW(lpwszUrl,nLength,dwFlags,&UCW)) + if (lpUrlComponents->dwHostNameLength) { - HeapFree(GetProcessHeap(), 0, lpwszUrl); - return FALSE; + UCW.dwHostNameLength = lpUrlComponents->dwHostNameLength; + if (lpUrlComponents->lpszHostName) + { + hostname = HeapAlloc(GetProcessHeap(), 0, UCW.dwHostNameLength * sizeof(WCHAR)); + UCW.lpszHostName = hostname; + } } + if (lpUrlComponents->dwUserNameLength) + { + UCW.dwUserNameLength = lpUrlComponents->dwUserNameLength; + if (lpUrlComponents->lpszUserName) + { + username = HeapAlloc(GetProcessHeap(), 0, UCW.dwUserNameLength * sizeof(WCHAR)); + UCW.lpszUserName = username; + } + } + if (lpUrlComponents->dwPasswordLength) + { + UCW.dwPasswordLength = lpUrlComponents->dwPasswordLength; + if (lpUrlComponents->lpszPassword) + { + password = HeapAlloc(GetProcessHeap(), 0, UCW.dwPasswordLength * sizeof(WCHAR)); + UCW.lpszPassword = password; + } + } + if (lpUrlComponents->dwUrlPathLength) + { + UCW.dwUrlPathLength = lpUrlComponents->dwUrlPathLength; + if (lpUrlComponents->lpszUrlPath) + { + path = HeapAlloc(GetProcessHeap(), 0, UCW.dwUrlPathLength * sizeof(WCHAR)); + UCW.lpszUrlPath = path; + } + } + if (lpUrlComponents->dwSchemeLength) + { + UCW.dwSchemeLength = lpUrlComponents->dwSchemeLength; + if (lpUrlComponents->lpszScheme) + { + scheme = HeapAlloc(GetProcessHeap(), 0, UCW.dwSchemeLength * sizeof(WCHAR)); + UCW.lpszScheme = scheme; + } + } + if (lpUrlComponents->dwExtraInfoLength) + { + UCW.dwExtraInfoLength = lpUrlComponents->dwExtraInfoLength; + if (lpUrlComponents->lpszExtraInfo) + { + extra = HeapAlloc(GetProcessHeap(), 0, UCW.dwExtraInfoLength * sizeof(WCHAR)); + UCW.lpszExtraInfo = extra; + } + } + if ((ret = InternetCrackUrlW(lpwszUrl, nLength, dwFlags, &UCW))) + { + ConvertUrlComponentValue(&lpUrlComponents->lpszHostName, &lpUrlComponents->dwHostNameLength, + UCW.lpszHostName, UCW.dwHostNameLength, lpszUrl, lpwszUrl); + ConvertUrlComponentValue(&lpUrlComponents->lpszUserName, &lpUrlComponents->dwUserNameLength, + UCW.lpszUserName, UCW.dwUserNameLength, lpszUrl, lpwszUrl); + ConvertUrlComponentValue(&lpUrlComponents->lpszPassword, &lpUrlComponents->dwPasswordLength, + UCW.lpszPassword, UCW.dwPasswordLength, lpszUrl, lpwszUrl); + ConvertUrlComponentValue(&lpUrlComponents->lpszUrlPath, &lpUrlComponents->dwUrlPathLength, + UCW.lpszUrlPath, UCW.dwUrlPathLength, lpszUrl, lpwszUrl); + ConvertUrlComponentValue(&lpUrlComponents->lpszScheme, &lpUrlComponents->dwSchemeLength, + UCW.lpszScheme, UCW.dwSchemeLength, lpszUrl, lpwszUrl); + ConvertUrlComponentValue(&lpUrlComponents->lpszExtraInfo, &lpUrlComponents->dwExtraInfoLength, + UCW.lpszExtraInfo, UCW.dwExtraInfoLength, lpszUrl, lpwszUrl); - ConvertUrlComponentValue(&lpUrlComponents->lpszHostName, &lpUrlComponents->dwHostNameLength, - UCW.lpszHostName, UCW.dwHostNameLength, - lpszUrl, lpwszUrl); - ConvertUrlComponentValue(&lpUrlComponents->lpszUserName, &lpUrlComponents->dwUserNameLength, - UCW.lpszUserName, UCW.dwUserNameLength, - lpszUrl, lpwszUrl); - ConvertUrlComponentValue(&lpUrlComponents->lpszPassword, &lpUrlComponents->dwPasswordLength, - UCW.lpszPassword, UCW.dwPasswordLength, - lpszUrl, lpwszUrl); - ConvertUrlComponentValue(&lpUrlComponents->lpszUrlPath, &lpUrlComponents->dwUrlPathLength, - UCW.lpszUrlPath, UCW.dwUrlPathLength, - lpszUrl, lpwszUrl); - ConvertUrlComponentValue(&lpUrlComponents->lpszScheme, &lpUrlComponents->dwSchemeLength, - UCW.lpszScheme, UCW.dwSchemeLength, - lpszUrl, lpwszUrl); - ConvertUrlComponentValue(&lpUrlComponents->lpszExtraInfo, &lpUrlComponents->dwExtraInfoLength, - UCW.lpszExtraInfo, UCW.dwExtraInfoLength, - lpszUrl, lpwszUrl); - lpUrlComponents->nScheme=UCW.nScheme; - lpUrlComponents->nPort=UCW.nPort; + lpUrlComponents->nScheme = UCW.nScheme; + lpUrlComponents->nPort = UCW.nPort; + + TRACE("%s: scheme(%s) host(%s) path(%s) extra(%s)\n", lpszUrl, + debugstr_an(lpUrlComponents->lpszScheme, lpUrlComponents->dwSchemeLength), + debugstr_an(lpUrlComponents->lpszHostName, lpUrlComponents->dwHostNameLength), + debugstr_an(lpUrlComponents->lpszUrlPath, lpUrlComponents->dwUrlPathLength), + debugstr_an(lpUrlComponents->lpszExtraInfo, lpUrlComponents->dwExtraInfoLength)); + } HeapFree(GetProcessHeap(), 0, lpwszUrl); - - TRACE("%s: scheme(%s) host(%s) path(%s) extra(%s)\n", lpszUrl, - debugstr_an(lpUrlComponents->lpszScheme,lpUrlComponents->dwSchemeLength), - debugstr_an(lpUrlComponents->lpszHostName,lpUrlComponents->dwHostNameLength), - debugstr_an(lpUrlComponents->lpszUrlPath,lpUrlComponents->dwUrlPathLength), - debugstr_an(lpUrlComponents->lpszExtraInfo,lpUrlComponents->dwExtraInfoLength)); - - return TRUE; + HeapFree(GetProcessHeap(), 0, hostname); + HeapFree(GetProcessHeap(), 0, username); + HeapFree(GetProcessHeap(), 0, password); + HeapFree(GetProcessHeap(), 0, path); + HeapFree(GetProcessHeap(), 0, scheme); + HeapFree(GetProcessHeap(), 0, extra); + return ret; } static const WCHAR url_schemes[][7] = @@ -1264,10 +1401,10 @@ BOOL WINAPI InternetCrackUrlW(LPCWSTR lpszUrl_orig, DWORD dwUrlLength_orig, DWOR LPCWSTR lpszcp = NULL; LPWSTR lpszUrl_decode = NULL; DWORD dwUrlLength = dwUrlLength_orig; - const WCHAR lpszSeparators[3]={';','?',0}; - const WCHAR lpszSlash[2]={'/',0}; - TRACE("(%s %u %x %p)\n", debugstr_w(lpszUrl), dwUrlLength, dwFlags, lpUC); + TRACE("(%s %u %x %p)\n", + lpszUrl ? debugstr_wn(lpszUrl, dwUrlLength ? dwUrlLength : strlenW(lpszUrl)) : "(null)", + dwUrlLength, dwFlags, lpUC); if (!lpszUrl_orig || !*lpszUrl_orig || !lpUC) { @@ -1278,16 +1415,33 @@ BOOL WINAPI InternetCrackUrlW(LPCWSTR lpszUrl_orig, DWORD dwUrlLength_orig, DWOR if (dwFlags & ICU_DECODE) { - lpszUrl_decode=HeapAlloc( GetProcessHeap(), 0, dwUrlLength * sizeof (WCHAR) ); - if( InternetCanonicalizeUrlW(lpszUrl_orig, lpszUrl_decode, &dwUrlLength, dwFlags)) - { - lpszUrl = lpszUrl_decode; - } + WCHAR *url_tmp; + DWORD len = dwUrlLength + 1; + + if (!(url_tmp = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)))) + { + INTERNET_SetLastError(ERROR_OUTOFMEMORY); + return FALSE; + } + memcpy(url_tmp, lpszUrl_orig, dwUrlLength * sizeof(WCHAR)); + url_tmp[dwUrlLength] = 0; + if (!(lpszUrl_decode = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)))) + { + HeapFree(GetProcessHeap(), 0, url_tmp); + INTERNET_SetLastError(ERROR_OUTOFMEMORY); + return FALSE; + } + if (InternetCanonicalizeUrlW(url_tmp, lpszUrl_decode, &len, ICU_DECODE | ICU_NO_ENCODE)) + { + dwUrlLength = len; + lpszUrl = lpszUrl_decode; + } + HeapFree(GetProcessHeap(), 0, url_tmp); } lpszap = lpszUrl; /* Determine if the URI is absolute. */ - while (*lpszap != '\0') + while (lpszap - lpszUrl < dwUrlLength) { if (isalnumW(*lpszap)) { @@ -1311,7 +1465,9 @@ BOOL WINAPI InternetCrackUrlW(LPCWSTR lpszUrl_orig, DWORD dwUrlLength_orig, DWOR lpUC->nPort = INTERNET_INVALID_PORT_NUMBER; /* Parse */ - lpszParam = strpbrkW(lpszap, lpszSeparators); + if (!(lpszParam = memchrW(lpszap, ';', dwUrlLength - (lpszap - lpszUrl)))) + lpszParam = memchrW(lpszap, '?', dwUrlLength - (lpszap - lpszUrl)); + SetUrlComponentValueW(&lpUC->lpszExtraInfo, &lpUC->dwExtraInfoLength, lpszParam, lpszParam ? dwUrlLength-(lpszParam-lpszUrl) : 0); @@ -1332,7 +1488,7 @@ BOOL WINAPI InternetCrackUrlW(LPCWSTR lpszUrl_orig, DWORD dwUrlLength_orig, DWOR { lpszcp += 2; - lpszNetLoc = strpbrkW(lpszcp, lpszSlash); + lpszNetLoc = memchrW(lpszcp, '/', dwUrlLength - (lpszcp - lpszUrl)); if (lpszParam) { if (lpszNetLoc) @@ -1352,7 +1508,7 @@ BOOL WINAPI InternetCrackUrlW(LPCWSTR lpszUrl_orig, DWORD dwUrlLength_orig, DWOR /* [[<:password>]@][:] */ /* First find the user and password if they exist */ - lpszHost = strchrW(lpszcp, '@'); + lpszHost = memchrW(lpszcp, '@', dwUrlLength - (lpszcp - lpszUrl)); if (lpszHost == NULL || lpszHost > lpszNetLoc) { /* username and password not specified. */ @@ -1461,7 +1617,7 @@ BOOL WINAPI InternetCrackUrlW(LPCWSTR lpszUrl_orig, DWORD dwUrlLength_orig, DWOR * :[//][/path][;][?][#] * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */ - if (lpszcp != 0 && *lpszcp != '\0' && (!lpszParam || lpszcp < lpszParam)) + if (lpszcp != 0 && lpszcp - lpszUrl < dwUrlLength && (!lpszParam || lpszcp < lpszParam)) { INT len; @@ -1475,7 +1631,7 @@ BOOL WINAPI InternetCrackUrlW(LPCWSTR lpszUrl_orig, DWORD dwUrlLength_orig, DWOR /* Leave the parameter list in lpszUrlPath. Strip off any trailing * newlines if necessary. */ - LPWSTR lpsznewline = strchrW(lpszcp, '\n'); + LPWSTR lpsznewline = memchrW(lpszcp, '\n', dwUrlLength - (lpszcp - lpszUrl)); if (lpsznewline != NULL) len = lpsznewline - lpszcp; else @@ -1486,6 +1642,8 @@ BOOL WINAPI InternetCrackUrlW(LPCWSTR lpszUrl_orig, DWORD dwUrlLength_orig, DWOR } else { + if (lpUC->lpszUrlPath && (lpUC->dwUrlPathLength > 0)) + lpUC->lpszUrlPath[0] = 0; lpUC->dwUrlPathLength = 0; } @@ -1586,7 +1744,7 @@ BOOL WINAPI InternetCanonicalizeUrlW(LPCWSTR lpszUrl, LPWSTR lpszBuffer, DWORD dwURLFlags = URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE; TRACE("(%s, %p, %p, 0x%08x) bufferlength: %d\n", debugstr_w(lpszUrl), lpszBuffer, - lpdwBufferLength, lpdwBufferLength ? *lpdwBufferLength : -1, dwFlags); + lpdwBufferLength, dwFlags, lpdwBufferLength ? *lpdwBufferLength : -1); if(dwFlags & ICU_DECODE) { @@ -1861,315 +2019,137 @@ BOOL WINAPI InternetReadFileExW(HINTERNET hFile, LPINTERNET_BUFFERSW lpBuffer, return FALSE; } -/*********************************************************************** - * INET_QueryOptionHelper (internal) - */ -static BOOL INET_QueryOptionHelper(BOOL bIsUnicode, HINTERNET hInternet, DWORD dwOption, - LPVOID lpBuffer, LPDWORD lpdwBufferLength) +DWORD INET_QueryOption(DWORD option, void *buffer, DWORD *size, BOOL unicode) { - LPWININETHANDLEHEADER lpwhh; - BOOL bSuccess = FALSE; + switch(option) { + case INTERNET_OPTION_REQUEST_FLAGS: + TRACE("INTERNET_OPTION_REQUEST_FLAGS\n"); - TRACE("(%p, 0x%08x, %p, %p)\n", hInternet, dwOption, lpBuffer, lpdwBufferLength); + if (*size < sizeof(ULONG)) + return ERROR_INSUFFICIENT_BUFFER; - lpwhh = WININET_GetObject( hInternet ); + *(ULONG*)buffer = 4; + *size = sizeof(ULONG); - switch (dwOption) - { - case INTERNET_OPTION_REQUEST_FLAGS: - { - ULONG flags = 4; - TRACE("INTERNET_OPTION_REQUEST_FLAGS: %d\n", flags); - if (*lpdwBufferLength < sizeof(ULONG)) - INTERNET_SetLastError(ERROR_INSUFFICIENT_BUFFER); - else - { - memcpy(lpBuffer, &flags, sizeof(ULONG)); - bSuccess = TRUE; - } - *lpdwBufferLength = sizeof(ULONG); - break; - } + return ERROR_SUCCESS; - case INTERNET_OPTION_USER_AGENT: - { - DWORD required; - LPWININETAPPINFOW ai = (LPWININETAPPINFOW)lpwhh; + case INTERNET_OPTION_HTTP_VERSION: + if (*size < sizeof(HTTP_VERSION_INFO)) + return ERROR_INSUFFICIENT_BUFFER; - TRACE("INTERNET_OPTION_USER_AGENT\n"); + /* + * Presently hardcoded to 1.1 + */ + ((HTTP_VERSION_INFO*)buffer)->dwMajorVersion = 1; + ((HTTP_VERSION_INFO*)buffer)->dwMinorVersion = 1; + *size = sizeof(HTTP_VERSION_INFO); - if (lpwhh->htype != INTERNET_HANDLE_TYPE_INTERNET) - { - INTERNET_SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE); - return FALSE; - } - if (bIsUnicode) - { - required = (strlenW(ai->lpszAgent) + 1) * sizeof(WCHAR); - if (*lpdwBufferLength < required) - INTERNET_SetLastError(ERROR_INSUFFICIENT_BUFFER); - else if (lpBuffer) - { - strcpyW(lpBuffer, ai->lpszAgent); - bSuccess = TRUE; - } - } - else - { - required = WideCharToMultiByte(CP_ACP, 0, ai->lpszAgent, -1, NULL, 0, NULL, NULL); - if (*lpdwBufferLength < required) - INTERNET_SetLastError(ERROR_INSUFFICIENT_BUFFER); - else if (lpBuffer) - { - WideCharToMultiByte(CP_ACP, 0, ai->lpszAgent, -1, lpBuffer, required, NULL, NULL); - bSuccess = TRUE; - } - } - *lpdwBufferLength = required; - break; - } - case INTERNET_OPTION_HTTP_VERSION: - { - if (*lpdwBufferLength < sizeof(HTTP_VERSION_INFO)) - INTERNET_SetLastError(ERROR_INSUFFICIENT_BUFFER); - else - { - /* - * Presently hardcoded to 1.1 - */ - ((HTTP_VERSION_INFO*)lpBuffer)->dwMajorVersion = 1; - ((HTTP_VERSION_INFO*)lpBuffer)->dwMinorVersion = 1; - bSuccess = TRUE; - } - *lpdwBufferLength = sizeof(HTTP_VERSION_INFO); - break; - } - case INTERNET_OPTION_CONNECTED_STATE: - { - DWORD *pdwConnectedState = (DWORD *)lpBuffer; - FIXME("INTERNET_OPTION_CONNECTED_STATE: semi-stub\n"); + return ERROR_SUCCESS; - if (*lpdwBufferLength < sizeof(*pdwConnectedState)) - INTERNET_SetLastError(ERROR_INSUFFICIENT_BUFFER); - else - { - *pdwConnectedState = INTERNET_STATE_CONNECTED; - bSuccess = TRUE; - } - *lpdwBufferLength = sizeof(*pdwConnectedState); - break; - } - case INTERNET_OPTION_PROXY: - { - LPWININETAPPINFOW lpwai = (LPWININETAPPINFOW)lpwhh; - WININETAPPINFOW wai; + case INTERNET_OPTION_CONNECTED_STATE: + FIXME("INTERNET_OPTION_CONNECTED_STATE: semi-stub\n"); - if (lpwai == NULL) - { - TRACE("Getting global proxy info\n"); - memset(&wai, 0, sizeof(WININETAPPINFOW)); - INTERNET_ConfigureProxy( &wai ); - lpwai = &wai; - } + if (*size < sizeof(ULONG)) + return ERROR_INSUFFICIENT_BUFFER; - if (bIsUnicode) - { - INTERNET_PROXY_INFOW *pPI = (INTERNET_PROXY_INFOW *)lpBuffer; - DWORD proxyBytesRequired = 0, proxyBypassBytesRequired = 0; + *(ULONG*)buffer = INTERNET_STATE_CONNECTED; + *size = sizeof(ULONG); - if (lpwai->lpszProxy) - proxyBytesRequired = (lstrlenW(lpwai->lpszProxy) + 1) * - sizeof(WCHAR); - if (lpwai->lpszProxyBypass) - proxyBypassBytesRequired = - (lstrlenW(lpwai->lpszProxyBypass) + 1) * sizeof(WCHAR); - if (*lpdwBufferLength < sizeof(INTERNET_PROXY_INFOW) + - proxyBytesRequired + proxyBypassBytesRequired) - INTERNET_SetLastError(ERROR_INSUFFICIENT_BUFFER); - else - { - LPWSTR proxy = (LPWSTR)((LPBYTE)lpBuffer + - sizeof(INTERNET_PROXY_INFOW)); - LPWSTR proxy_bypass = (LPWSTR)((LPBYTE)lpBuffer + - sizeof(INTERNET_PROXY_INFOW) + - proxyBytesRequired); + return ERROR_SUCCESS; - pPI->dwAccessType = lpwai->dwAccessType; - pPI->lpszProxy = NULL; - pPI->lpszProxyBypass = NULL; - if (lpwai->lpszProxy) - { - lstrcpyW(proxy, lpwai->lpszProxy); - pPI->lpszProxy = proxy; - } + case INTERNET_OPTION_PROXY: { + WININETAPPINFOW ai; - if (lpwai->lpszProxyBypass) - { - lstrcpyW(proxy_bypass, lpwai->lpszProxyBypass); - pPI->lpszProxyBypass = proxy_bypass; - } - bSuccess = TRUE; - } - *lpdwBufferLength = sizeof(INTERNET_PROXY_INFOW) + - proxyBytesRequired + proxyBypassBytesRequired; - } - else - { - INTERNET_PROXY_INFOA *pPI = (INTERNET_PROXY_INFOA *)lpBuffer; - DWORD proxyBytesRequired = 0, proxyBypassBytesRequired = 0; + TRACE("Getting global proxy info\n"); + memset(&ai, 0, sizeof(WININETAPPINFOW)); + INTERNET_ConfigureProxy(&ai); - if (lpwai->lpszProxy) - proxyBytesRequired = WideCharToMultiByte(CP_ACP, 0, - lpwai->lpszProxy, -1, NULL, 0, NULL, NULL); - if (lpwai->lpszProxyBypass) - proxyBypassBytesRequired = WideCharToMultiByte(CP_ACP, 0, - lpwai->lpszProxyBypass, -1, NULL, 0, NULL, NULL); - if (*lpdwBufferLength < sizeof(INTERNET_PROXY_INFOA) + - proxyBytesRequired + proxyBypassBytesRequired) - INTERNET_SetLastError(ERROR_INSUFFICIENT_BUFFER); - else - { - LPSTR proxy = (LPSTR)((LPBYTE)lpBuffer + - sizeof(INTERNET_PROXY_INFOA)); - LPSTR proxy_bypass = (LPSTR)((LPBYTE)lpBuffer + - sizeof(INTERNET_PROXY_INFOA) + - proxyBytesRequired); + return APPINFO_QueryOption(&ai.hdr, INTERNET_OPTION_PROXY, buffer, size, unicode); /* FIXME */ + } - pPI->dwAccessType = lpwai->dwAccessType; - pPI->lpszProxy = NULL; - pPI->lpszProxyBypass = NULL; - if (lpwai->lpszProxy) - { - WideCharToMultiByte(CP_ACP, 0, lpwai->lpszProxy, -1, - proxy, proxyBytesRequired, NULL, NULL); - pPI->lpszProxy = proxy; - } + case INTERNET_OPTION_MAX_CONNS_PER_SERVER: + TRACE("INTERNET_OPTION_MAX_CONNS_PER_SERVER\n"); - if (lpwai->lpszProxyBypass) - { - WideCharToMultiByte(CP_ACP, 0, lpwai->lpszProxyBypass, - -1, proxy_bypass, proxyBypassBytesRequired, - NULL, NULL); - pPI->lpszProxyBypass = proxy_bypass; - } - bSuccess = TRUE; - } - *lpdwBufferLength = sizeof(INTERNET_PROXY_INFOA) + - proxyBytesRequired + proxyBypassBytesRequired; - } - break; - } - case INTERNET_OPTION_MAX_CONNS_PER_SERVER: - { - ULONG conn = 2; - TRACE("INTERNET_OPTION_MAX_CONNS_PER_SERVER: %d\n", conn); - if (*lpdwBufferLength < sizeof(ULONG)) - INTERNET_SetLastError(ERROR_INSUFFICIENT_BUFFER); - else - { - memcpy(lpBuffer, &conn, sizeof(ULONG)); - bSuccess = TRUE; - } - *lpdwBufferLength = sizeof(ULONG); - break; - } - case INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVER: - { - ULONG conn = 4; - TRACE("INTERNET_OPTION_MAX_CONNS_1_0_SERVER: %d\n", conn); - if (*lpdwBufferLength < sizeof(ULONG)) - INTERNET_SetLastError(ERROR_INSUFFICIENT_BUFFER); - else - { - memcpy(lpBuffer, &conn, sizeof(ULONG)); - bSuccess = TRUE; - } - *lpdwBufferLength = sizeof(ULONG); - break; - } - case INTERNET_OPTION_SECURITY_FLAGS: - FIXME("INTERNET_OPTION_SECURITY_FLAGS: Stub\n"); - bSuccess = TRUE; - break; + if (*size < sizeof(ULONG)) + return ERROR_INSUFFICIENT_BUFFER; - case INTERNET_OPTION_VERSION: - { - TRACE("INTERNET_OPTION_VERSION\n"); - if (*lpdwBufferLength < sizeof(INTERNET_VERSION_INFO)) - INTERNET_SetLastError(ERROR_INSUFFICIENT_BUFFER); - else - { - static const INTERNET_VERSION_INFO info = { 1, 2 }; - memcpy(lpBuffer, &info, sizeof(info)); - *lpdwBufferLength = sizeof(info); - bSuccess = TRUE; - } - break; - } - case INTERNET_OPTION_PER_CONNECTION_OPTION: - FIXME("INTERNET_OPTION_PER_CONNECTION_OPTION stub\n"); - if (*lpdwBufferLength < sizeof(INTERNET_PER_CONN_OPTION_LISTW)) - INTERNET_SetLastError(ERROR_INSUFFICIENT_BUFFER); - else - { - INTERNET_PER_CONN_OPTION_LISTW *con = lpBuffer; - int x; - bSuccess = TRUE; - for (x = 0; x < con->dwOptionCount; ++x) - { - INTERNET_PER_CONN_OPTIONW *option = con->pOptions + x; - switch (option->dwOption) - { - case INTERNET_PER_CONN_FLAGS: - option->Value.dwValue = PROXY_TYPE_DIRECT; - break; + *(ULONG*)buffer = 2; + *size = sizeof(ULONG); - case INTERNET_PER_CONN_PROXY_SERVER: - case INTERNET_PER_CONN_PROXY_BYPASS: - case INTERNET_PER_CONN_AUTOCONFIG_URL: - case INTERNET_PER_CONN_AUTODISCOVERY_FLAGS: - case INTERNET_PER_CONN_AUTOCONFIG_SECONDARY_URL: - case INTERNET_PER_CONN_AUTOCONFIG_RELOAD_DELAY_MINS: - case INTERNET_PER_CONN_AUTOCONFIG_LAST_DETECT_TIME: - case INTERNET_PER_CONN_AUTOCONFIG_LAST_DETECT_URL: - FIXME("Unhandled dwOption %d\n", option->dwOption); - option->Value.dwValue = 0; - bSuccess = FALSE; - break; + return ERROR_SUCCESS; - default: - FIXME("Unknown dwOption %d\n", option->dwOption); - bSuccess = FALSE; - break; - } - } - if (!bSuccess) - INTERNET_SetLastError(ERROR_INVALID_PARAMETER); - } - break; - case 66: - FIXME("66\n"); - bSuccess = TRUE; - break; - default: { - if(lpwhh) { - DWORD res; + case INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVER: + TRACE("INTERNET_OPTION_MAX_CONNS_1_0_SERVER\n"); - res = lpwhh->vtbl->QueryOption(lpwhh, dwOption, lpBuffer, lpdwBufferLength, bIsUnicode); - if(res == ERROR_SUCCESS) - bSuccess = TRUE; - else - SetLastError(res); - }else { - FIXME("Stub! %d\n", dwOption); + if (*size < sizeof(ULONG)) + return ERROR_INSUFFICIENT_BUFFER; + + *(ULONG*)size = 4; + *size = sizeof(ULONG); + + return ERROR_SUCCESS; + + case INTERNET_OPTION_SECURITY_FLAGS: + FIXME("INTERNET_OPTION_SECURITY_FLAGS: Stub\n"); + return ERROR_SUCCESS; + + case INTERNET_OPTION_VERSION: { + static const INTERNET_VERSION_INFO info = { 1, 2 }; + + TRACE("INTERNET_OPTION_VERSION\n"); + + if (*size < sizeof(INTERNET_VERSION_INFO)) + return ERROR_INSUFFICIENT_BUFFER; + + memcpy(buffer, &info, sizeof(info)); + *size = sizeof(info); + + return ERROR_SUCCESS; + } + + case INTERNET_OPTION_PER_CONNECTION_OPTION: { + INTERNET_PER_CONN_OPTION_LISTW *con = buffer; + DWORD res = ERROR_SUCCESS, i; + + FIXME("INTERNET_OPTION_PER_CONNECTION_OPTION stub\n"); + + if (*size < sizeof(INTERNET_PER_CONN_OPTION_LISTW)) + return ERROR_INSUFFICIENT_BUFFER; + + for (i = 0; i < con->dwOptionCount; i++) { + INTERNET_PER_CONN_OPTIONW *option = con->pOptions + i; + + switch (option->dwOption) { + case INTERNET_PER_CONN_FLAGS: + option->Value.dwValue = PROXY_TYPE_DIRECT; + break; + + case INTERNET_PER_CONN_PROXY_SERVER: + case INTERNET_PER_CONN_PROXY_BYPASS: + case INTERNET_PER_CONN_AUTOCONFIG_URL: + case INTERNET_PER_CONN_AUTODISCOVERY_FLAGS: + case INTERNET_PER_CONN_AUTOCONFIG_SECONDARY_URL: + case INTERNET_PER_CONN_AUTOCONFIG_RELOAD_DELAY_MINS: + case INTERNET_PER_CONN_AUTOCONFIG_LAST_DETECT_TIME: + case INTERNET_PER_CONN_AUTOCONFIG_LAST_DETECT_URL: + FIXME("Unhandled dwOption %d\n", option->dwOption); + option->Value.dwValue = 0; + res = ERROR_INVALID_PARAMETER; + break; + + default: + FIXME("Unknown dwOption %d\n", option->dwOption); + res = ERROR_INVALID_PARAMETER; break; } } - } - if (lpwhh) - WININET_Release( lpwhh ); - return bSuccess; + return res; + } + } + + FIXME("Stub for %d\n", option); + return ERROR_INTERNET_INCORRECT_HANDLE_TYPE; } /*********************************************************************** @@ -2185,7 +2165,24 @@ static BOOL INET_QueryOptionHelper(BOOL bIsUnicode, HINTERNET hInternet, DWORD d BOOL WINAPI InternetQueryOptionW(HINTERNET hInternet, DWORD dwOption, LPVOID lpBuffer, LPDWORD lpdwBufferLength) { - return INET_QueryOptionHelper(TRUE, hInternet, dwOption, lpBuffer, lpdwBufferLength); + LPWININETHANDLEHEADER hdr; + DWORD res = ERROR_INVALID_HANDLE; + + TRACE("%p %d %p %p\n", hInternet, dwOption, lpBuffer, lpdwBufferLength); + + if(hInternet) { + hdr = WININET_GetObject(hInternet); + if (hdr) { + res = hdr->vtbl->QueryOption(hdr, dwOption, lpBuffer, lpdwBufferLength, TRUE); + WININET_Release(hdr); + } + }else { + res = INET_QueryOption(dwOption, lpBuffer, lpdwBufferLength, TRUE); + } + + if(res != ERROR_SUCCESS) + SetLastError(res); + return res == ERROR_SUCCESS; } /*********************************************************************** @@ -2201,7 +2198,24 @@ BOOL WINAPI InternetQueryOptionW(HINTERNET hInternet, DWORD dwOption, BOOL WINAPI InternetQueryOptionA(HINTERNET hInternet, DWORD dwOption, LPVOID lpBuffer, LPDWORD lpdwBufferLength) { - return INET_QueryOptionHelper(FALSE, hInternet, dwOption, lpBuffer, lpdwBufferLength); + LPWININETHANDLEHEADER hdr; + DWORD res = ERROR_INVALID_HANDLE; + + TRACE("%p %d %p %p\n", hInternet, dwOption, lpBuffer, lpdwBufferLength); + + if(hInternet) { + hdr = WININET_GetObject(hInternet); + if (hdr) { + res = hdr->vtbl->QueryOption(hdr, dwOption, lpBuffer, lpdwBufferLength, FALSE); + WININET_Release(hdr); + } + }else { + res = INET_QueryOption(dwOption, lpBuffer, lpdwBufferLength, FALSE); + } + + if(res != ERROR_SUCCESS) + SetLastError(res); + return res == ERROR_SUCCESS; } @@ -2254,44 +2268,44 @@ BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption, break; case INTERNET_OPTION_ERROR_MASK: { - unsigned long flags=*(unsigned long*)lpBuffer; - FIXME("Option INTERNET_OPTION_ERROR_MASK(%ld): STUB\n",flags); + ULONG flags = *(ULONG *)lpBuffer; + FIXME("Option INTERNET_OPTION_ERROR_MASK(%d): STUB\n", flags); } break; case INTERNET_OPTION_CODEPAGE: { - unsigned long codepage=*(unsigned long*)lpBuffer; - FIXME("Option INTERNET_OPTION_CODEPAGE (%ld): STUB\n",codepage); + ULONG codepage = *(ULONG *)lpBuffer; + FIXME("Option INTERNET_OPTION_CODEPAGE (%d): STUB\n", codepage); } break; case INTERNET_OPTION_REQUEST_PRIORITY: { - unsigned long priority=*(unsigned long*)lpBuffer; - FIXME("Option INTERNET_OPTION_REQUEST_PRIORITY (%ld): STUB\n",priority); + ULONG priority = *(ULONG *)lpBuffer; + FIXME("Option INTERNET_OPTION_REQUEST_PRIORITY (%d): STUB\n", priority); } break; case INTERNET_OPTION_CONNECT_TIMEOUT: { - unsigned long connecttimeout=*(unsigned long*)lpBuffer; - FIXME("Option INTERNET_OPTION_CONNECT_TIMEOUT (%ld): STUB\n",connecttimeout); + ULONG connecttimeout = *(ULONG *)lpBuffer; + FIXME("Option INTERNET_OPTION_CONNECT_TIMEOUT (%d): STUB\n", connecttimeout); } break; case INTERNET_OPTION_DATA_RECEIVE_TIMEOUT: { - unsigned long receivetimeout=*(unsigned long*)lpBuffer; - FIXME("Option INTERNET_OPTION_DATA_RECEIVE_TIMEOUT (%ld): STUB\n",receivetimeout); + ULONG receivetimeout = *(ULONG *)lpBuffer; + FIXME("Option INTERNET_OPTION_DATA_RECEIVE_TIMEOUT (%d): STUB\n", receivetimeout); } break; case INTERNET_OPTION_MAX_CONNS_PER_SERVER: { - unsigned long conns=*(unsigned long*)lpBuffer; - FIXME("Option INTERNET_OPTION_MAX_CONNS_PER_SERVER (%ld): STUB\n",conns); + ULONG conns = *(ULONG *)lpBuffer; + FIXME("Option INTERNET_OPTION_MAX_CONNS_PER_SERVER (%d): STUB\n", conns); } break; case INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVER: { - unsigned long conns=*(unsigned long*)lpBuffer; - FIXME("Option INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVER (%ld): STUB\n",conns); + ULONG conns = *(ULONG *)lpBuffer; + FIXME("Option INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVER (%d): STUB\n", conns); } break; case INTERNET_OPTION_RESET_URLCACHE_SESSION: @@ -2308,17 +2322,26 @@ BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption, break; case INTERNET_OPTION_SEND_TIMEOUT: case INTERNET_OPTION_RECEIVE_TIMEOUT: - FIXME("INTERNET_OPTION_SEND/RECEIVE_TIMEOUT\n"); + { + ULONG timeout = *(ULONG *)lpBuffer; + FIXME("INTERNET_OPTION_SEND/RECEIVE_TIMEOUT %d\n", timeout); break; + } case INTERNET_OPTION_CONNECT_RETRIES: - FIXME("Option INTERNET_OPTION_CONNECT_RETRIES: STUB\n"); + { + ULONG retries = *(ULONG *)lpBuffer; + FIXME("INTERNET_OPTION_CONNECT_RETRIES %d\n", retries); break; + } case INTERNET_OPTION_CONTEXT_VALUE: FIXME("Option INTERNET_OPTION_CONTEXT_VALUE; STUB\n"); break; case INTERNET_OPTION_SECURITY_FLAGS: FIXME("Option INTERNET_OPTION_SECURITY_FLAGS; STUB\n"); break; + case INTERNET_OPTION_DISABLE_AUTODIAL: + FIXME("Option INTERNET_OPTION_DISABLE_AUTODIAL; STUB\n"); + break; case 86: FIXME("86\n"); break; @@ -2638,7 +2661,7 @@ BOOL WINAPI InternetCheckConnectionW( LPCWSTR lpszUrl, DWORD dwFlags, DWORD dwRe URL_COMPONENTSW components; ZeroMemory(&components,sizeof(URL_COMPONENTSW)); - components.lpszHostName = (LPWSTR)&hostW; + components.lpszHostName = (LPWSTR)hostW; components.dwHostNameLength = 1024; if (!InternetCrackUrlW(lpszUrl,0,0,&components)) @@ -3353,7 +3376,7 @@ static LPCWSTR INTERNET_GetSchemeString(INTERNET_SCHEME scheme) index = scheme - INTERNET_SCHEME_FIRST; if (index >= sizeof(url_schemes)/sizeof(url_schemes[0])) return NULL; - return (LPCWSTR)&url_schemes[index]; + return (LPCWSTR)url_schemes[index]; } /* we can calculate using ansi strings because we're just diff --git a/reactos/dll/win32/wininet/internet.h b/reactos/dll/win32/wininet/internet.h index 5d4d7e89b6b..2e7f642b32a 100644 --- a/reactos/dll/win32/wininet/internet.h +++ b/reactos/dll/win32/wininet/internet.h @@ -41,18 +41,6 @@ # include # include #endif -#ifdef HAVE_OPENSSL_SSL_H -#define DSA __ssl_DSA /* avoid conflict with commctrl.h */ -#undef FAR -/* avoid conflict with wincrypt.h */ -#undef PKCS7_SIGNER_INFO -#undef X509_NAME -#undef X509_CERT_PAIR -# include -#undef FAR -#define FAR do_not_use_this_in_wine -#undef DSA -#endif #ifdef HAVE_SYS_SOCKET_H # include #endif @@ -72,12 +60,10 @@ typedef struct { BOOL useSSL; int socketFD; -#ifdef HAVE_OPENSSL_SSL_H - SSL *ssl_s; + void *ssl_s; char *peek_msg; char *peek_msg_mem; size_t peek_len; -#endif } WININET_NETCONNECTION; static inline LPWSTR WININET_strdupW( LPCWSTR str ) @@ -364,6 +350,8 @@ LPWININETHANDLEHEADER WININET_AddRef( LPWININETHANDLEHEADER info ); BOOL WININET_Release( LPWININETHANDLEHEADER info ); BOOL WININET_FreeHandle( HINTERNET hinternet ); +DWORD INET_QueryOption(DWORD,void*,DWORD*,BOOL); + time_t ConvertTimeString(LPCWSTR asctime); HINTERNET FTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName, diff --git a/reactos/dll/win32/wininet/netconnection.c b/reactos/dll/win32/wininet/netconnection.c index 45dc40d025d..5d8b4d75534 100644 --- a/reactos/dll/win32/wininet/netconnection.c +++ b/reactos/dll/win32/wininet/netconnection.c @@ -23,6 +23,7 @@ #include "config.h" #include "wine/port.h" +#include #ifdef HAVE_POLL_H #include #endif @@ -42,6 +43,22 @@ #ifdef HAVE_SYS_IOCTL_H # include #endif +#include +#ifdef HAVE_NETDB_H +# include +#endif +#ifdef HAVE_NETINET_IN_H +# include +#endif +#ifdef HAVE_OPENSSL_SSL_H +# include +#undef FAR +#undef DSA +#endif +#ifdef HAVE_SYS_SOCKET_H +# include +#endif + #include #include #include diff --git a/reactos/dll/win32/wininet/rsrc.rc b/reactos/dll/win32/wininet/rsrc.rc index c160c476447..866159d813f 100644 --- a/reactos/dll/win32/wininet/rsrc.rc +++ b/reactos/dll/win32/wininet/rsrc.rc @@ -57,6 +57,7 @@ #include "wininet_No.rc" #include "wininet_Pl.rc" #include "wininet_Pt.rc" +#include "wininet_Ro.rc" #include "wininet_Ru.rc" #include "wininet_Si.rc" #include "wininet_Sv.rc" diff --git a/reactos/dll/win32/wininet/urlcache.c b/reactos/dll/win32/wininet/urlcache.c index 6e768933a07..75bcf342d3f 100644 --- a/reactos/dll/win32/wininet/urlcache.c +++ b/reactos/dll/win32/wininet/urlcache.c @@ -2339,7 +2339,7 @@ static BOOL WINAPI CommitUrlCacheEntryInternal( /* skip container path prefix */ lpszLocalFileName += lstrlenW(pContainer->path); - WideCharToMultiByte(CP_ACP, 0, lpszLocalFileName, -1, achFile, -1, NULL, NULL); + WideCharToMultiByte(CP_ACP, 0, lpszLocalFileName, -1, achFile, MAX_PATH, NULL, NULL); pchLocalFileName = achFile; for (cDirectory = 0; cDirectory < pHeader->DirectoryCount; cDirectory++) diff --git a/reactos/dll/win32/wininet/utility.c b/reactos/dll/win32/wininet/utility.c index 25972688a1e..b0d9c9c91c6 100644 --- a/reactos/dll/win32/wininet/utility.c +++ b/reactos/dll/win32/wininet/utility.c @@ -40,6 +40,16 @@ WINE_DEFAULT_DEBUG_CHANNEL(wininet); +/* critical section to protect non-reentrant gethostbyname() */ +static CRITICAL_SECTION cs_gethostbyname; +static CRITICAL_SECTION_DEBUG critsect_debug = +{ + 0, 0, &cs_gethostbyname, + { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, + 0, 0, { (DWORD_PTR)(__FILE__ ": cs_gethostbyname") } +}; +static CRITICAL_SECTION cs_gethostbyname = { &critsect_debug, -1, 0, 0, 0, 0 }; + #define TIME_STRING_LEN 30 time_t ConvertTimeString(LPCWSTR asctime) @@ -151,12 +161,15 @@ BOOL GetAddress(LPCWSTR lpszServerName, INTERNET_PORT nServerPort, name = HeapAlloc(GetProcessHeap(), 0, sz+1); WideCharToMultiByte( CP_UNIXCP, 0, lpszServerName, len, name, sz, NULL, NULL ); name[sz] = 0; + + EnterCriticalSection( &cs_gethostbyname ); phe = gethostbyname(name); HeapFree( GetProcessHeap(), 0, name ); if (NULL == phe) { TRACE("Failed to get hostname: (%s)\n", debugstr_w(lpszServerName) ); + LeaveCriticalSection( &cs_gethostbyname ); return FALSE; } @@ -165,6 +178,7 @@ BOOL GetAddress(LPCWSTR lpszServerName, INTERNET_PORT nServerPort, psa->sin_family = phe->h_addrtype; psa->sin_port = htons(nServerPort); + LeaveCriticalSection( &cs_gethostbyname ); return TRUE; } diff --git a/reactos/dll/win32/wininet/wininet_Ro.rc b/reactos/dll/win32/wininet/wininet_Ro.rc new file mode 100644 index 00000000000..367bbb5955a --- /dev/null +++ b/reactos/dll/win32/wininet/wininet_Ro.rc @@ -0,0 +1,49 @@ +/* + * Copyright 2003 Mike McCormack for CodeWeavers + * Copyright 2008 Michael Stefaniuc + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL + +#pragma code_page(65001) + +IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Introducere parolДѓ de reИ›ea" +FONT 8, "MS Shell Dlg" +{ + LTEXT "IntroduceИ›i numele de utilizator И™i parola:", -1, 40, 6, 150, 15 + LTEXT "Proxy", -1, 40, 26, 50, 10 + LTEXT "Realm", -1, 40, 46, 50, 10 + LTEXT "Utilizator", -1, 40, 66, 50, 10 + LTEXT "ParolДѓ", -1, 40, 86, 50, 10 + LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0 + LTEXT "" IDC_REALM, 80, 46, 150, 14, 0 + EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP + EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD + CHECKBOX "&SalveazДѓ aceastДѓ parolДѓ (nesigur)", IDC_SAVEPASSWORD, + 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "RenunИ›Дѓ", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP +} + +STRINGTABLE DISCARDABLE +{ + IDS_LANCONNECTION "Conexiune LAN" +} + +#pragma code_page(default) diff --git a/reactos/dll/win32/wininet/wininet_ros.diff b/reactos/dll/win32/wininet/wininet_ros.diff index f83345b96fc..11b26d0c71a 100644 --- a/reactos/dll/win32/wininet/wininet_ros.diff +++ b/reactos/dll/win32/wininet/wininet_ros.diff @@ -9,28 +9,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(wininet); static const WCHAR g_szHttp1_0[] = {'H','T','T','P','/','1','.','0',0}; -@@ -1617,8 +1619,9 @@ - - if(req->lpszCacheFile) { - BOOL res; -+ DWORD dwBytesWritten; - -- res = WriteFile(req->hCacheFile, buffer, bytes_read, NULL, NULL); -+ res = WriteFile(req->hCacheFile, buffer, bytes_read, &dwBytesWritten, NULL); - if(!res) - WARN("WriteFile failed: %u\n", GetLastError()); - } -@@ -1686,7 +1689,9 @@ - - if (req->lpszCacheFile) - { -- if (!WriteFile(req->hCacheFile, p, bytes_read, NULL, NULL)) -+ DWORD dwBytesWritten; -+ -+ if (!WriteFile(req->hCacheFile, p, bytes_read, &dwBytesWritten, NULL)) - WARN("WriteFile failed: %u\n", GetLastError()); - } - p += bytes_read; --- D:/Wine-CVS/wine/dlls/wininet/internet.c Wed May 28 14:33:28 2008 +++ D:/ReactOS-Trunk/reactos/dll/win32/wininet/internet.c Fri May 30 18:04:29 2008 @@ -3101,19 +3101,22 @@ From 0542c270aa35f09bdaa3f1e644e7cc4317885ce5 Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Thu, 4 Sep 2008 18:43:56 +0000 Subject: [PATCH 324/324] fix some advapi crypt winetests svn path=/trunk/; revision=35945 --- reactos/dll/win32/advapi32/crypt/crypt.c | 501 +++++++++++++++++------ 1 file changed, 370 insertions(+), 131 deletions(-) diff --git a/reactos/dll/win32/advapi32/crypt/crypt.c b/reactos/dll/win32/advapi32/crypt/crypt.c index f80bac1d263..1c333372452 100644 --- a/reactos/dll/win32/advapi32/crypt/crypt.c +++ b/reactos/dll/win32/advapi32/crypt/crypt.c @@ -22,8 +22,7 @@ * TODO: * - Reference counting * - Thread-safing - * - Signature checking - */ + */ #include #include "crypt.h" @@ -49,9 +48,7 @@ VOID byteReverse(unsigned char *buf, unsigned longs) } while (--longs); } -HWND crypt_hWindow = 0; - -#define CRYPT_ReturnLastError(err) {SetLastError(err); return FALSE;} +static HWND crypt_hWindow = 0; #define CRYPT_Alloc(size) ((LPVOID)LocalAlloc(LMEM_ZEROINIT, size)) #define CRYPT_Free(buffer) (LocalFree((HLOCAL)buffer)) @@ -127,9 +124,10 @@ static inline BOOL CRYPT_UnicodeToANSI(LPCWSTR wstr, LPSTR* str, int strsize) return TRUE; } count = WideCharToMultiByte(CP_ACP, 0, wstr, -1, NULL, 0, NULL, NULL); - count = count < strsize ? count : strsize; if (strsize == -1) *str = CRYPT_Alloc(count * sizeof(CHAR)); + else + count = min( count, strsize ); if (*str) { WideCharToMultiByte(CP_ACP, 0, wstr, -1, *str, count, NULL, NULL); @@ -146,7 +144,7 @@ static inline BOOL CRYPT_UnicodeToANSI(LPCWSTR wstr, LPSTR* str, int strsize) */ static inline BOOL CRYPT_ANSIToUnicode(LPCSTR str, LPWSTR* wstr, int wstrsize) { - int wcount; + unsigned int wcount; if (!str) { @@ -154,9 +152,10 @@ static inline BOOL CRYPT_ANSIToUnicode(LPCSTR str, LPWSTR* wstr, int wstrsize) return TRUE; } wcount = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0); - wcount = wcount < wstrsize/(int)sizeof(WCHAR) ? wcount : wstrsize/(int)sizeof(WCHAR); if (wstrsize == -1) *wstr = CRYPT_Alloc(wcount * sizeof(WCHAR)); + else + wcount = min( wcount, wstrsize/sizeof(WCHAR) ); if (*wstr) { MultiByteToWideChar(CP_ACP, 0, str, -1, *wstr, wcount); @@ -264,6 +263,64 @@ error: #undef CRYPT_GetProvFunc #undef CRYPT_GetProvFuncOpt +static void CRYPT_CreateMachineGuid(void) +{ + static const WCHAR cryptographyW[] = { + 'S','o','f','t','w','a','r','e','\\', + 'M','i','c','r','o','s','o','f','t','\\', + 'C','r','y','p','t','o','g','r','a','p','h','y',0 }; + static const WCHAR machineGuidW[] = { + 'M','a','c','h','i','n','e','G','u','i','d',0 }; + LONG r; + HKEY key; + + r = RegOpenKeyExW(HKEY_LOCAL_MACHINE, cryptographyW, 0, KEY_ALL_ACCESS, + &key); + if (!r) + { + DWORD size; + + r = RegQueryValueExW(key, machineGuidW, NULL, NULL, NULL, &size); + if (r == ERROR_FILE_NOT_FOUND) + { + static const WCHAR rpcrt4[] = { + 'r','p','c','r','t','4',0 }; + HMODULE lib = LoadLibraryW(rpcrt4); + + if (lib) + { + RPC_STATUS (RPC_ENTRY *pUuidCreate)(UUID *); + UUID uuid; + WCHAR buf[37]; + RPC_STATUS rs; + static const WCHAR uuidFmt[] = { + '%','0','8','x','-','%','0','4','x','-', + '%','0','4','x','-','%','0','2','x', + '%','0','2','x','-','%','0','2','x', + '%','0','2','x','%','0','2','x', + '%','0','2','x','%','0','2','x', + '%','0','2','x',0 }; + + pUuidCreate = (LPVOID) GetProcAddress(lib, "UuidCreate"); + rs = pUuidCreate(&uuid); + if (rs == S_OK) + { + swprintf(buf, uuidFmt, + uuid.Data1, uuid.Data2, uuid.Data3, + uuid.Data4[0], uuid.Data4[1], + uuid.Data4[2], uuid.Data4[3], + uuid.Data4[4], uuid.Data4[5], + uuid.Data4[6], uuid.Data4[7] ); + RegSetValueExW(key, machineGuidW, 0, REG_SZ, + (const BYTE *)buf, + (lstrlenW(buf)+1)*sizeof(WCHAR)); + } + FreeLibrary(lib); + } + } + RegCloseKey(key); + } +} /****************************************************************************** * CryptAcquireContextW (ADVAPI32.@) @@ -308,6 +365,9 @@ BOOL WINAPI CryptAcquireContextW (HCRYPTPROV *phProv, LPCWSTR pszContainer, return FALSE; } + /* Make sure the MachineGuid value exists */ + CRYPT_CreateMachineGuid(); + if (!pszProvider || !*pszProvider) { /* No CSP name specified so try the user default CSP first @@ -566,12 +626,12 @@ BOOL WINAPI CryptContextAddRef (HCRYPTPROV hProv, DWORD *pdwReserved, DWORD dwFl * Success: TRUE * Failure: FALSE */ -BOOL WINAPI CryptReleaseContext (HCRYPTPROV hProv, DWORD dwFlags) +BOOL WINAPI CryptReleaseContext (HCRYPTPROV hProv, ULONG_PTR dwFlags) { PCRYPTPROV pProv = (PCRYPTPROV)hProv; BOOL ret = TRUE; - TRACE("(0x%lx, %08ld)\n", hProv, dwFlags); + TRACE("(0x%lx, %08lx)\n", hProv, dwFlags); if (!pProv) { @@ -579,10 +639,17 @@ BOOL WINAPI CryptReleaseContext (HCRYPTPROV hProv, DWORD dwFlags) return FALSE; } + if (pProv->dwMagic != MAGIC_CRYPTPROV) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + pProv->refcount--; if (pProv->refcount <= 0) { ret = pProv->pFuncs->pCPReleaseContext(pProv->hPrivate, dwFlags); + pProv->dwMagic = 0; FreeLibrary(pProv->hModule); #if 0 CRYPT_Free(pProv->pVTable->pContextInfo); @@ -619,10 +686,16 @@ BOOL WINAPI CryptGenRandom (HCRYPTPROV hProv, DWORD dwLen, BYTE *pbBuffer) TRACE("(0x%lx, %ld, %p)\n", hProv, dwLen, pbBuffer); if (!hProv) - CRYPT_ReturnLastError(ERROR_INVALID_HANDLE); + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } - if (prov->dwMagic != MAGIC_CRYPTPROV) - CRYPT_ReturnLastError(ERROR_INVALID_PARAMETER); + if (prov->dwMagic != MAGIC_CRYPTPROV) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } return prov->pFuncs->pCPGenRandom(prov->hPrivate, dwLen, pbBuffer); } @@ -656,13 +729,25 @@ BOOL WINAPI CryptCreateHash (HCRYPTPROV hProv, ALG_ID Algid, HCRYPTKEY hKey, TRACE("(0x%lx, 0x%x, 0x%lx, %08lx, %p)\n", hProv, Algid, hKey, dwFlags, phHash); if (!prov) - CRYPT_ReturnLastError(ERROR_INVALID_HANDLE); + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } if (!phHash || prov->dwMagic != MAGIC_CRYPTPROV) - CRYPT_ReturnLastError(ERROR_INVALID_PARAMETER); + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } if (dwFlags) - CRYPT_ReturnLastError(NTE_BAD_FLAGS); - if (!(hash = CRYPT_Alloc(sizeof(CRYPTHASH)))) - CRYPT_ReturnLastError(ERROR_NOT_ENOUGH_MEMORY); + { + SetLastError(NTE_BAD_FLAGS); + return FALSE; + } + if ( !(hash = CRYPT_Alloc(sizeof(CRYPTHASH))) ) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return FALSE; + } hash->pProvider = prov; @@ -706,8 +791,11 @@ BOOL WINAPI CryptDecrypt (HCRYPTKEY hKey, HCRYPTHASH hHash, BOOL Final, TRACE("(0x%lx, 0x%lx, %d, %08lx, %p, %p)\n", hKey, hHash, Final, dwFlags, pbData, pdwDataLen); - if (!key || !pbData || !pdwDataLen || key->pProvider->dwMagic != MAGIC_CRYPTPROV) - CRYPT_ReturnLastError(ERROR_INVALID_PARAMETER); + if (!key || !pbData || !pdwDataLen || !key->pProvider || key->pProvider->dwMagic != MAGIC_CRYPTPROV) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } prov = key->pProvider; return prov->pFuncs->pCPDecrypt(prov->hPrivate, key->hPrivate, hash ? hash->hPrivate : 0, @@ -740,11 +828,20 @@ BOOL WINAPI CryptDeriveKey (HCRYPTPROV hProv, ALG_ID Algid, HCRYPTHASH hBaseData TRACE("(0x%lx, 0x%08x, 0x%lx, 0x%08lx, %p)\n", hProv, Algid, hBaseData, dwFlags, phKey); if (!prov || !hash) - CRYPT_ReturnLastError(ERROR_INVALID_HANDLE); + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } if (!phKey || prov->dwMagic != MAGIC_CRYPTPROV) - CRYPT_ReturnLastError(ERROR_INVALID_PARAMETER); - if (!(key = CRYPT_Alloc(sizeof(CRYPTKEY)))) - CRYPT_ReturnLastError(ERROR_NOT_ENOUGH_MEMORY); + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + if ( !(key = CRYPT_Alloc(sizeof(CRYPTKEY))) ) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return FALSE; + } key->pProvider = prov; if (prov->pFuncs->pCPDeriveKey(prov->hPrivate, Algid, hash->hPrivate, dwFlags, &key->hPrivate)) @@ -779,8 +876,17 @@ BOOL WINAPI CryptDestroyHash (HCRYPTHASH hHash) TRACE("(0x%lx)\n", hHash); - if (!hash || hash->pProvider->dwMagic != MAGIC_CRYPTPROV) - CRYPT_ReturnLastError(ERROR_INVALID_HANDLE); + if (!hash) + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + + if (!hash->pProvider || hash->pProvider->dwMagic != MAGIC_CRYPTPROV) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } prov = hash->pProvider; ret = prov->pFuncs->pCPDestroyHash(prov->hPrivate, hash->hPrivate); @@ -809,10 +915,16 @@ BOOL WINAPI CryptDestroyKey (HCRYPTKEY hKey) TRACE("(0x%lx)\n", hKey); if (!key) - CRYPT_ReturnLastError(ERROR_INVALID_HANDLE); + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } - if (!key->pProvider || key->pProvider->dwMagic != MAGIC_CRYPTPROV) - CRYPT_ReturnLastError(ERROR_INVALID_PARAMETER); + if (!key->pProvider || key->pProvider->dwMagic != MAGIC_CRYPTPROV) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } prov = key->pProvider; ret = prov->pFuncs->pCPDestroyKey(prov->hPrivate, key->hPrivate); @@ -844,16 +956,25 @@ BOOL WINAPI CryptDuplicateHash (HCRYPTHASH hHash, DWORD *pdwReserved, TRACE("(0x%lx, %p, %08ld, %p)\n", hHash, pdwReserved, dwFlags, phHash); orghash = (PCRYPTHASH)hHash; - if (!orghash || pdwReserved || !phHash|| - orghash->pProvider->dwMagic != MAGIC_CRYPTPROV) - CRYPT_ReturnLastError(ERROR_INVALID_PARAMETER); + if (!orghash || pdwReserved || !phHash || !orghash->pProvider || + orghash->pProvider->dwMagic != MAGIC_CRYPTPROV) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } prov = orghash->pProvider; if (!prov->pFuncs->pCPDuplicateHash) - CRYPT_ReturnLastError(ERROR_CALL_NOT_IMPLEMENTED); + { + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; + } - if (!(newhash = CRYPT_Alloc(sizeof(CRYPTHASH)))) - CRYPT_ReturnLastError(ERROR_NOT_ENOUGH_MEMORY); + if ( !(newhash = CRYPT_Alloc(sizeof(CRYPTHASH))) ) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return FALSE; + } newhash->pProvider = prov; if (prov->pFuncs->pCPDuplicateHash(prov->hPrivate, orghash->hPrivate, pdwReserved, dwFlags, &newhash->hPrivate)) @@ -888,15 +1009,25 @@ BOOL WINAPI CryptDuplicateKey (HCRYPTKEY hKey, DWORD *pdwReserved, DWORD dwFlags TRACE("(0x%lx, %p, %08ld, %p)\n", hKey, pdwReserved, dwFlags, phKey); orgkey = (PCRYPTKEY)hKey; - if (!orgkey || pdwReserved || !phKey || orgkey->pProvider->dwMagic != MAGIC_CRYPTPROV) - CRYPT_ReturnLastError(ERROR_INVALID_PARAMETER); + if (!orgkey || pdwReserved || !phKey || !orgkey->pProvider || + orgkey->pProvider->dwMagic != MAGIC_CRYPTPROV) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } prov = orgkey->pProvider; if (!prov->pFuncs->pCPDuplicateKey) - CRYPT_ReturnLastError(ERROR_CALL_NOT_IMPLEMENTED); + { + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; + } - if (!(newkey = CRYPT_Alloc(sizeof(CRYPTKEY)))) - CRYPT_ReturnLastError(ERROR_NOT_ENOUGH_MEMORY); + if ( !(newkey = CRYPT_Alloc(sizeof(CRYPTKEY))) ) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return FALSE; + } newkey->pProvider = prov; if (prov->pFuncs->pCPDuplicateKey(prov->hPrivate, orgkey->hPrivate, pdwReserved, dwFlags, &newkey->hPrivate)) @@ -940,8 +1071,11 @@ BOOL WINAPI CryptEncrypt (HCRYPTKEY hKey, HCRYPTHASH hHash, BOOL Final, TRACE("(0x%lx, 0x%lx, %d, %08ld, %p, %p, %ld)\n", hKey, hHash, Final, dwFlags, pbData, pdwDataLen, dwBufLen); - if (!key || !pdwDataLen || key->pProvider->dwMagic != MAGIC_CRYPTPROV) - CRYPT_ReturnLastError(ERROR_INVALID_PARAMETER); + if (!key || !pdwDataLen || !key->pProvider || key->pProvider->dwMagic != MAGIC_CRYPTPROV) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } prov = key->pProvider; return prov->pFuncs->pCPEncrypt(prov->hPrivate, key->hPrivate, hash ? hash->hPrivate : 0, @@ -951,7 +1085,7 @@ BOOL WINAPI CryptEncrypt (HCRYPTKEY hKey, HCRYPTHASH hHash, BOOL Final, /****************************************************************************** * CryptEnumProvidersW (ADVAPI32.@) * - * Returns the next availabe CSP. + * Returns the next available CSP. * * PARAMS * dwIndex [I] Index of the next provider to be enumerated. @@ -979,14 +1113,23 @@ BOOL WINAPI CryptEnumProvidersW (DWORD dwIndex, DWORD *pdwReserved, pdwProvType, pszProvName, pcbProvName); if (pdwReserved || !pcbProvName) - CRYPT_ReturnLastError(ERROR_INVALID_PARAMETER); + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } if (dwFlags) - CRYPT_ReturnLastError(NTE_BAD_FLAGS); + { + SetLastError(NTE_BAD_FLAGS); + return FALSE; + } if (RegOpenKeyW(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Cryptography\\Defaults\\Provider", &hKey)) - CRYPT_ReturnLastError(NTE_FAIL); + { + SetLastError(NTE_FAIL); + return FALSE; + } if (!pszProvName) { @@ -997,16 +1140,21 @@ BOOL WINAPI CryptEnumProvidersW (DWORD dwIndex, DWORD *pdwReserved, NULL, NULL, NULL, NULL, NULL, NULL); if (!(provNameW = CRYPT_Alloc(*pcbProvName * sizeof(WCHAR)))) - CRYPT_ReturnLastError(ERROR_NOT_ENOUGH_MEMORY); + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return FALSE; + } RegEnumKeyExW(hKey, dwIndex, provNameW, pcbProvName, NULL, NULL, NULL, NULL); + CRYPT_Free(provNameW); (*pcbProvName)++; *pcbProvName *= sizeof(WCHAR); - CRYPT_Free(provNameW); - if (dwIndex >= numkeys) - CRYPT_ReturnLastError(ERROR_NO_MORE_ITEMS); + { + SetLastError(ERROR_NO_MORE_ITEMS); + return FALSE; + } } else { @@ -1016,7 +1164,10 @@ BOOL WINAPI CryptEnumProvidersW (DWORD dwIndex, DWORD *pdwReserved, result = RegEnumKeyW(hKey, dwIndex, pszProvName, *pcbProvName / sizeof(WCHAR)); if (result) - CRYPT_ReturnLastError(result); + { + SetLastError(result); + return FALSE; + } if (RegOpenKeyW(hKey, pszProvName, &subkey)) return FALSE; if (RegQueryValueExW(subkey, L"Type", NULL, NULL, (BYTE*)pdwProvType, &size)) @@ -1044,12 +1195,15 @@ BOOL WINAPI CryptEnumProvidersA (DWORD dwIndex, DWORD *pdwReserved, if(!CryptEnumProvidersW(dwIndex, pdwReserved, dwFlags, pdwProvType, NULL, &bufsize)) return FALSE; - if (pszProvName && !(str = CRYPT_Alloc(bufsize))) - CRYPT_ReturnLastError(ERROR_NOT_ENOUGH_MEMORY); + if ( pszProvName && !(str = CRYPT_Alloc(bufsize)) ) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return FALSE; + } ret = CryptEnumProvidersW(dwIndex, pdwReserved, dwFlags, pdwProvType, str, &bufsize); if (str) CRYPT_UnicodeToANSI(str, &pszProvName, *pcbProvName); - *pcbProvName = bufsize / sizeof(WCHAR); + *pcbProvName = bufsize / sizeof(WCHAR); /* FIXME: not correct */ if (str) { CRYPT_Free(str); @@ -1063,7 +1217,7 @@ BOOL WINAPI CryptEnumProvidersA (DWORD dwIndex, DWORD *pdwReserved, } /****************************************************************************** - * CryptEnumProviderTypesA (ADVAPI32i.@) + * CryptEnumProviderTypesW (ADVAPI32.@) * * Retrieves the next type of CSP supported. * @@ -1084,47 +1238,62 @@ BOOL WINAPI CryptEnumProvidersA (DWORD dwIndex, DWORD *pdwReserved, * If pszTypeName is NULL, CryptEnumProviderTypesA sets the size of the name * for memory allocation purposes. */ -BOOL WINAPI CryptEnumProviderTypesA (DWORD dwIndex, DWORD *pdwReserved, - DWORD dwFlags, DWORD *pdwProvType, LPSTR pszTypeName, DWORD *pcbTypeName) +BOOL WINAPI CryptEnumProviderTypesW (DWORD dwIndex, DWORD *pdwReserved, + DWORD dwFlags, DWORD *pdwProvType, LPWSTR pszTypeName, DWORD *pcbTypeName) { HKEY hKey, hSubkey; DWORD keylen, numkeys, dwType; - PSTR keyname, ch; + PWSTR keyname, ch; DWORD result; TRACE("(%ld, %p, %08ld, %p, %p, %p)\n", dwIndex, pdwReserved, dwFlags, pdwProvType, pszTypeName, pcbTypeName); if (pdwReserved || !pdwProvType || !pcbTypeName) - CRYPT_ReturnLastError(ERROR_INVALID_PARAMETER); + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } if (dwFlags) - CRYPT_ReturnLastError(NTE_BAD_FLAGS); + { + SetLastError(NTE_BAD_FLAGS); + return FALSE; + } - if (RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Cryptography\\Defaults\\Provider Types", &hKey)) + if (RegOpenKeyW(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Cryptography\\Defaults\\Provider Types", &hKey)) return FALSE; - RegQueryInfoKeyA(hKey, NULL, NULL, NULL, &numkeys, &keylen, NULL, NULL, NULL, NULL, NULL, NULL); + RegQueryInfoKeyW(hKey, NULL, NULL, NULL, &numkeys, &keylen, NULL, NULL, NULL, NULL, NULL, NULL); if (dwIndex >= numkeys) - CRYPT_ReturnLastError(ERROR_NO_MORE_ITEMS); + { + SetLastError(ERROR_NO_MORE_ITEMS); + return FALSE; + } keylen++; - if ( !(keyname = CRYPT_Alloc(keylen)) ) - CRYPT_ReturnLastError(ERROR_NOT_ENOUGH_MEMORY); - if ( RegEnumKeyA(hKey, dwIndex, keyname, keylen) ) + if ( !(keyname = CRYPT_Alloc(keylen*sizeof(WCHAR))) ) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return FALSE; + } + if ( RegEnumKeyW(hKey, dwIndex, keyname, keylen) ) { CRYPT_Free(keyname); return FALSE; } - RegOpenKeyA(hKey, keyname, &hSubkey); - ch = keyname + strlen(keyname); + RegOpenKeyW(hKey, keyname, &hSubkey); + ch = keyname + wcslen(keyname); /* Convert "Type 000" to 0, etc/ */ *pdwProvType = *(--ch) - '0'; *pdwProvType += (*(--ch) - '0') * 10; *pdwProvType += (*(--ch) - '0') * 100; CRYPT_Free(keyname); - result = RegQueryValueExA(hSubkey, "TypeName", NULL, &dwType, (LPBYTE)pszTypeName, pcbTypeName); + result = RegQueryValueExW(hSubkey, L"TypeName", NULL, &dwType, (LPBYTE)pszTypeName, pcbTypeName); if (result) - CRYPT_ReturnLastError(result); + { + SetLastError(result); + return FALSE; + } RegCloseKey(hSubkey); RegCloseKey(hKey); @@ -1132,29 +1301,40 @@ BOOL WINAPI CryptEnumProviderTypesA (DWORD dwIndex, DWORD *pdwReserved, } /****************************************************************************** - * CryptEnumProviderTypesW (ADVAPI32.@) + * CryptEnumProviderTypesA (ADVAPI32.@) * - * see CryptEnumProviderTypesA + * see CryptEnumProviderTypesW. */ -BOOL WINAPI CryptEnumProviderTypesW (DWORD dwIndex, DWORD *pdwReserved, - DWORD dwFlags, DWORD *pdwProvType, LPWSTR pszTypeName, DWORD *pcbTypeName) +BOOL WINAPI CryptEnumProviderTypesA (DWORD dwIndex, DWORD *pdwReserved, + DWORD dwFlags, DWORD *pdwProvType, LPSTR pszTypeName, DWORD *pcbTypeName) { - PSTR str = NULL; - DWORD strlen; + PWSTR str = NULL; + DWORD bufsize; BOOL ret; TRACE("(%ld, %p, %08ld, %p, %p, %p)\n", dwIndex, pdwReserved, dwFlags, pdwProvType, pszTypeName, pcbTypeName); - strlen = *pcbTypeName / sizeof(WCHAR); - if (pszTypeName && !(str = CRYPT_Alloc(strlen))) - CRYPT_ReturnLastError(ERROR_NOT_ENOUGH_MEMORY); - ret = CryptEnumProviderTypesA(dwIndex, pdwReserved, dwFlags, pdwProvType, str, &strlen); + + if(!CryptEnumProviderTypesW(dwIndex, pdwReserved, dwFlags, pdwProvType, NULL, &bufsize)) + return FALSE; + if ( pszTypeName && !(str = CRYPT_Alloc(bufsize)) ) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return FALSE; + } + ret = CryptEnumProviderTypesW(dwIndex, pdwReserved, dwFlags, pdwProvType, str, &bufsize); + if (str) + CRYPT_UnicodeToANSI(str, &pszTypeName, *pcbTypeName); + *pcbTypeName = bufsize / sizeof(WCHAR); if (str) { - CRYPT_ANSIToUnicode(str, &pszTypeName, *pcbTypeName); CRYPT_Free(str); + if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) + { + SetLastError(ERROR_MORE_DATA); + return FALSE; + } } - *pcbTypeName = strlen * sizeof(WCHAR); return ret; } @@ -1188,7 +1368,10 @@ BOOL WINAPI CryptExportKey (HCRYPTKEY hKey, HCRYPTKEY hExpKey, DWORD dwBlobType, TRACE("(0x%lx, 0x%lx, %ld, %08ld, %p, %p)\n", hKey, hExpKey, dwBlobType, dwFlags, pbData, pdwDataLen); if (!key || !pdwDataLen || !key->pProvider || key->pProvider->dwMagic != MAGIC_CRYPTPROV) - CRYPT_ReturnLastError(ERROR_INVALID_PARAMETER); + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } prov = key->pProvider; return prov->pFuncs->pCPExportKey(prov->hPrivate, key->hPrivate, expkey ? expkey->hPrivate : 0, @@ -1218,11 +1401,20 @@ BOOL WINAPI CryptGenKey (HCRYPTPROV hProv, ALG_ID Algid, DWORD dwFlags, HCRYPTKE TRACE("(0x%lx, %d, %08ld, %p)\n", hProv, Algid, dwFlags, phKey); if (!prov) - CRYPT_ReturnLastError(ERROR_INVALID_HANDLE); - if (!phKey || prov->dwMagic != MAGIC_CRYPTPROV) - CRYPT_ReturnLastError(ERROR_INVALID_PARAMETER); - if (!(key = CRYPT_Alloc(sizeof(CRYPTKEY)))) - CRYPT_ReturnLastError(ERROR_NOT_ENOUGH_MEMORY); + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + if (!phKey || !prov || prov->dwMagic != MAGIC_CRYPTPROV) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + if ( !(key = CRYPT_Alloc(sizeof(CRYPTKEY))) ) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return FALSE; + } key->pProvider = prov; @@ -1317,21 +1509,21 @@ BOOL WINAPI CryptGetDefaultProviderA (DWORD dwProvType, DWORD *pdwReserved, DWORD dwFlags, LPSTR pszProvName, DWORD *pcbProvName) { PWSTR str = NULL; - DWORD strlen; + DWORD bufsize; BOOL ret = FALSE; TRACE("(%d, %p, %08x, %p, %p)\n", dwProvType, pdwReserved, dwFlags, pszProvName, pcbProvName); - CryptGetDefaultProviderW(dwProvType, pdwReserved, dwFlags, NULL, &strlen); - if ( pszProvName && !(str = CRYPT_Alloc(strlen)) ) + CryptGetDefaultProviderW(dwProvType, pdwReserved, dwFlags, NULL, &bufsize); + if ( pszProvName && !(str = CRYPT_Alloc(bufsize)) ) { SetLastError(ERROR_NOT_ENOUGH_MEMORY); return FALSE; } - ret = CryptGetDefaultProviderW(dwProvType, pdwReserved, dwFlags, str, &strlen); + ret = CryptGetDefaultProviderW(dwProvType, pdwReserved, dwFlags, str, &bufsize); if (str) CRYPT_UnicodeToANSI(str, &pszProvName, *pcbProvName); - *pcbProvName = strlen / sizeof(WCHAR); + *pcbProvName = bufsize / sizeof(WCHAR); if (str) { CRYPT_Free(str); @@ -1372,7 +1564,10 @@ BOOL WINAPI CryptGetHashParam (HCRYPTHASH hHash, DWORD dwParam, BYTE *pbData, TRACE("(0x%lx, %ld, %p, %p, %08ld)\n", hHash, dwParam, pbData, pdwDataLen, dwFlags); if (!hash || !pdwDataLen || !hash->pProvider || hash->pProvider->dwMagic != MAGIC_CRYPTPROV) - CRYPT_ReturnLastError(ERROR_INVALID_PARAMETER); + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } prov = hash->pProvider; return prov->pFuncs->pCPGetHashParam(prov->hPrivate, hash->hPrivate, dwParam, @@ -1407,7 +1602,10 @@ BOOL WINAPI CryptGetKeyParam (HCRYPTKEY hKey, DWORD dwParam, BYTE *pbData, TRACE("(0x%lx, %ld, %p, %p, %08ld)\n", hKey, dwParam, pbData, pdwDataLen, dwFlags); if (!key || !pdwDataLen || !key->pProvider || key->pProvider->dwMagic != MAGIC_CRYPTPROV) - CRYPT_ReturnLastError(ERROR_INVALID_PARAMETER); + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } prov = key->pProvider; return prov->pFuncs->pCPGetKeyParam(prov->hPrivate, key->hPrivate, dwParam, @@ -1440,8 +1638,11 @@ BOOL WINAPI CryptGetProvParam (HCRYPTPROV hProv, DWORD dwParam, BYTE *pbData, TRACE("(0x%lx, %ld, %p, %p, %08ld)\n", hProv, dwParam, pbData, pdwDataLen, dwFlags); - if (!prov || prov->dwMagic != MAGIC_CRYPTPROV) - CRYPT_ReturnLastError(ERROR_INVALID_PARAMETER); + if (!prov || prov->dwMagic != MAGIC_CRYPTPROV) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } return prov->pFuncs->pCPGetProvParam(prov->hPrivate, dwParam, pbData, pdwDataLen, dwFlags); } @@ -1468,11 +1669,20 @@ BOOL WINAPI CryptGetUserKey (HCRYPTPROV hProv, DWORD dwKeySpec, HCRYPTKEY *phUse TRACE("(0x%lx, %ld, %p)\n", hProv, dwKeySpec, phUserKey); if (!prov) - CRYPT_ReturnLastError(ERROR_INVALID_HANDLE); + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } if (!phUserKey || prov->dwMagic != MAGIC_CRYPTPROV) - CRYPT_ReturnLastError(ERROR_INVALID_PARAMETER); - if (!(key = CRYPT_Alloc(sizeof(CRYPTKEY)))) - CRYPT_ReturnLastError(ERROR_NOT_ENOUGH_MEMORY); + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + if ( !(key = CRYPT_Alloc(sizeof(CRYPTKEY))) ) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return FALSE; + } key->pProvider = prov; @@ -1511,9 +1721,15 @@ BOOL WINAPI CryptHashData (HCRYPTHASH hHash, const BYTE *pbData, DWORD dwDataLen TRACE("(0x%lx, %p, %ld, %08ld)\n", hHash, pbData, dwDataLen, dwFlags); if (!hash) - CRYPT_ReturnLastError(ERROR_INVALID_HANDLE); + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } if (!hash->pProvider || hash->pProvider->dwMagic != MAGIC_CRYPTPROV) - CRYPT_ReturnLastError(ERROR_INVALID_PARAMETER); + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } prov = hash->pProvider; return prov->pFuncs->pCPHashData(prov->hPrivate, hash->hPrivate, pbData, dwDataLen, dwFlags); @@ -1540,9 +1756,16 @@ BOOL WINAPI CryptHashSessionKey (HCRYPTHASH hHash, HCRYPTKEY hKey, DWORD dwFlags TRACE("(0x%lx, 0x%lx, %08ld)\n", hHash, hKey, dwFlags); if (!hash || !key) - CRYPT_ReturnLastError(ERROR_INVALID_HANDLE); - if (!hash->pProvider || hash->pProvider->dwMagic != MAGIC_CRYPTPROV) - CRYPT_ReturnLastError(ERROR_INVALID_PARAMETER); + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + + if (!hash->pProvider || hash->pProvider->dwMagic != MAGIC_CRYPTPROV) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } prov = hash->pProvider; return prov->pFuncs->pCPHashSessionKey(prov->hPrivate, hash->hPrivate, key->hPrivate, dwFlags); @@ -1572,10 +1795,16 @@ BOOL WINAPI CryptImportKey (HCRYPTPROV hProv, CONST BYTE *pbData, DWORD dwDataLe TRACE("(0x%lx, %p, %ld, 0x%lx, %08ld, %p)\n", hProv, pbData, dwDataLen, hPubKey, dwFlags, phKey); if (!prov || !pbData || !dwDataLen || !phKey || prov->dwMagic != MAGIC_CRYPTPROV) - CRYPT_ReturnLastError(ERROR_INVALID_PARAMETER); + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } - if (!(importkey = CRYPT_Alloc(sizeof(CRYPTKEY)))) - CRYPT_ReturnLastError(ERROR_NOT_ENOUGH_MEMORY); + if (!(importkey = CRYPT_Alloc(sizeof(CRYPTKEY))) ) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return FALSE; + } importkey->pProvider = prov; if (prov->pFuncs->pCPImportKey(prov->hPrivate, pbData, dwDataLen, @@ -1635,9 +1864,15 @@ BOOL WINAPI CryptSignHashW (HCRYPTHASH hHash, DWORD dwKeySpec, LPCWSTR sDescript } if (!hash) - CRYPT_ReturnLastError(ERROR_INVALID_HANDLE); + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } if (!pdwSigLen || !hash->pProvider || hash->pProvider->dwMagic != MAGIC_CRYPTPROV) - CRYPT_ReturnLastError(ERROR_INVALID_PARAMETER); + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } prov = hash->pProvider; return prov->pFuncs->pCPSignHash(prov->hPrivate, hash->hPrivate, dwKeySpec, NULL, @@ -1668,7 +1903,10 @@ BOOL WINAPI CryptSetHashParam (HCRYPTHASH hHash, DWORD dwParam, CONST BYTE *pbDa TRACE("(0x%lx, %ld, %p, %08ld)\n", hHash, dwParam, pbData, dwFlags); if (!hash || !pbData || !hash->pProvider || hash->pProvider->dwMagic != MAGIC_CRYPTPROV) - CRYPT_ReturnLastError(ERROR_INVALID_PARAMETER); + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } prov = hash->pProvider; return prov->pFuncs->pCPSetHashParam(prov->hPrivate, hash->hPrivate, @@ -1698,7 +1936,10 @@ BOOL WINAPI CryptSetKeyParam (HCRYPTKEY hKey, DWORD dwParam, CONST BYTE *pbData, TRACE("(0x%lx, %ld, %p, %08ld)\n", hKey, dwParam, pbData, dwFlags); if (!key || !pbData || !key->pProvider || key->pProvider->dwMagic != MAGIC_CRYPTPROV) - CRYPT_ReturnLastError(ERROR_INVALID_PARAMETER); + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } prov = key->pProvider; return prov->pFuncs->pCPSetKeyParam(prov->hPrivate, key->hPrivate, @@ -1868,9 +2109,15 @@ BOOL WINAPI CryptSetProvParam (HCRYPTPROV hProv, DWORD dwParam, CONST BYTE *pbDa TRACE("(0x%lx, %ld, %p, %08ld)\n", hProv, dwParam, pbData, dwFlags); if (!prov) - CRYPT_ReturnLastError(ERROR_INVALID_HANDLE); - if (prov->dwMagic != MAGIC_CRYPTPROV) - CRYPT_ReturnLastError(ERROR_INVALID_PARAMETER); + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + if (prov->dwMagic != MAGIC_CRYPTPROV) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } if (dwFlags & PP_USE_HARDWARE_RNG) { FIXME("PP_USE_HARDWARE_RNG: What do I do with this?\n"); @@ -1930,13 +2177,8 @@ BOOL WINAPI CryptVerifySignatureA (HCRYPTHASH hHash, CONST BYTE *pbSignature, DW return CryptVerifySignatureW(hHash, pbSignature, dwSigLen, hPubKey, NULL, dwFlags); } -BOOL WINAPI -CryptVerifySignatureW (HCRYPTHASH hHash, - CONST BYTE *pbSignature, - DWORD dwSigLen, - HCRYPTKEY hPubKey, - LPCWSTR sDescription, - DWORD dwFlags) +BOOL WINAPI CryptVerifySignatureW (HCRYPTHASH hHash, CONST BYTE *pbSignature, DWORD dwSigLen, + HCRYPTKEY hPubKey, LPCWSTR sDescription, DWORD dwFlags) { PCRYPTHASH hash = (PCRYPTHASH)hHash; PCRYPTKEY key = (PCRYPTKEY)hPubKey; @@ -1945,17 +2187,14 @@ CryptVerifySignatureW (HCRYPTHASH hHash, TRACE("(0x%lx, %p, %d, 0x%lx, %s, %08x)\n", hHash, pbSignature, dwSigLen, hPubKey, debugstr_w(sDescription), dwFlags); - if (sDescription) + if (!hash || !key || + !hash->pProvider || hash->pProvider->dwMagic != MAGIC_CRYPTPROV || + !key->pProvider || key->pProvider->dwMagic != MAGIC_CRYPTPROV) { - WARN("The sDescription parameter is not supported (and no longer used). Ignoring.\n"); + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; } - if (!hash || !key || - !hash->pProvider || hash->pProvider->dwMagic != MAGIC_CRYPTPROV || - !key->pProvider || key->pProvider->dwMagic != MAGIC_CRYPTPROV) - CRYPT_ReturnLastError(ERROR_INVALID_PARAMETER); - - prov = hash->pProvider; return prov->pFuncs->pCPVerifySignature(prov->hPrivate, hash->hPrivate, pbSignature, dwSigLen, key->hPrivate, sDescription, dwFlags);