ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
June 2017
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
20 participants
526 discussions
Start a n
N
ew thread
[mjansen] 75041: [APITEST] Move RedirectIat into it's own header so that it can be used from multiple tests.
by mjansen@svn.reactos.org
Author: mjansen Date: Wed Jun 14 15:25:04 2017 New Revision: 75041 URL:
http://svn.reactos.org/svn/reactos?rev=75041&view=rev
Log: [APITEST] Move RedirectIat into it's own header so that it can be used from multiple tests. Added: trunk/rostests/apitests/include/apitest_iathook.h (with props) Modified: trunk/rostests/apitests/apphelp/layerapi.c trunk/rostests/apitests/appshim/dispmode.c Modified: trunk/rostests/apitests/apphelp/layerapi.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/apphelp/layerapi…
============================================================================== --- trunk/rostests/apitests/apphelp/layerapi.c [iso-8859-1] (original) +++ trunk/rostests/apitests/apphelp/layerapi.c [iso-8859-1] Wed Jun 14 15:25:04 2017 @@ -30,7 +30,7 @@ #include <stdio.h> #include "wine/test.h" - +#include "apitest_iathook.h" #include "apphelp_apitest.h" #define GPLK_USER 1 @@ -612,73 +612,6 @@ return uRet; } - -static PIMAGE_IMPORT_DESCRIPTOR FindImportDescriptor(PBYTE DllBase, PCSTR DllName) -{ - ULONG Size; - PIMAGE_IMPORT_DESCRIPTOR ImportDescriptor = RtlImageDirectoryEntryToData((HMODULE)DllBase, TRUE, IMAGE_DIRECTORY_ENTRY_IMPORT, &Size); - while (ImportDescriptor->Name && ImportDescriptor->OriginalFirstThunk) - { - PCHAR Name = (PCHAR)(DllBase + ImportDescriptor->Name); - if (!lstrcmpiA(Name, DllName)) - { - return ImportDescriptor; - } - ImportDescriptor++; - } - return NULL; -} - -static BOOL RedirectIat(PCSTR TargetDllName, PCSTR DllName, PCSTR FunctionName, ULONG_PTR NewFunction, ULONG_PTR* OriginalFunction) -{ - PBYTE DllBase = (PBYTE)GetModuleHandleA(TargetDllName); - if (DllBase) - { - PIMAGE_IMPORT_DESCRIPTOR ImportDescriptor = FindImportDescriptor(DllBase, DllName); - if (ImportDescriptor) - { - // On loaded images, OriginalFirstThunk points to the name / ordinal of the function - PIMAGE_THUNK_DATA OriginalThunk = (PIMAGE_THUNK_DATA)(DllBase + ImportDescriptor->OriginalFirstThunk); - // FirstThunk points to the resolved address. - PIMAGE_THUNK_DATA FirstThunk = (PIMAGE_THUNK_DATA)(DllBase + ImportDescriptor->FirstThunk); - while (OriginalThunk->u1.AddressOfData && FirstThunk->u1.Function) - { - if (!IMAGE_SNAP_BY_ORDINAL32(OriginalThunk->u1.AddressOfData)) - { - PIMAGE_IMPORT_BY_NAME ImportName = (PIMAGE_IMPORT_BY_NAME)(DllBase + OriginalThunk->u1.AddressOfData); - if (!lstrcmpiA((PCSTR)ImportName->Name, FunctionName)) - { - DWORD dwOld; - VirtualProtect(&FirstThunk->u1.Function, sizeof(ULONG_PTR), PAGE_EXECUTE_READWRITE, &dwOld); - *OriginalFunction = FirstThunk->u1.Function; - FirstThunk->u1.Function = NewFunction; - VirtualProtect(&FirstThunk->u1.Function, sizeof(ULONG_PTR), dwOld, &dwOld); - return TRUE; - } - } - OriginalThunk++; - FirstThunk++; - } - skip("Unable to find the Import '%s' from '%s' in %s'\n", FunctionName, DllName, TargetDllName); - } - else - { - skip("Unable to find the ImportDescriptor for '%s' in '%s'\n", DllName, TargetDllName); - } - } - else - { - skip("Unable to find the loaded module '%s'\n", TargetDllName); - } - return FALSE; -} - -static BOOL RestoreIat(PCSTR target, PCSTR DllName, PCSTR FunctionName, ULONG_PTR OriginalFunction) -{ - ULONG_PTR old = 0; - return RedirectIat(target, DllName, FunctionName, OriginalFunction, &old); -} - static BOOL wrapSdbSetPermLayerKeys2(LPCSTR dir, LPCSTR name, PCSTR szLayers, BOOL bMachine) { char szPath[MAX_PATH]; @@ -759,7 +692,8 @@ ok(ret, "DefineDosDeviceA error: %d\n", GetLastError()); if(ret) { - ret = RedirectIat("apphelp.dll", "kernel32.dll", "GetDriveTypeW", (ULONG_PTR)mGetDriveTypeW, (ULONG_PTR*)&pGetDriveTypeW); + ret = RedirectIat(GetModuleHandleA("apphelp.dll"), "kernel32.dll", "GetDriveTypeW", + (ULONG_PTR)mGetDriveTypeW, (ULONG_PTR*)&pGetDriveTypeW); if (g_WinVersion < WINVER_WIN8) ok(ret, "Expected redirect_iat to succeed\n"); if(ret) @@ -862,7 +796,7 @@ ok(wrapSdbSetPermLayerKeys2(drive, "sub\\test.exe", "", 0), "Expected wrapSdbSetPermLayerKeys2 to succeed\n"); } - ret = RestoreIat("apphelp.dll", "kernel32.dll", "GetDriveTypeW", (ULONG_PTR)pGetDriveTypeW); + ret = RestoreIat(GetModuleHandleA("apphelp.dll"), "kernel32.dll", "GetDriveTypeW", (ULONG_PTR)pGetDriveTypeW); ok(ret, "Expected restore_iat to succeed\n"); ok(delete_file(subdir, "test.bbb"), "delete_file error: %d\n", GetLastError()); Modified: trunk/rostests/apitests/appshim/dispmode.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/appshim/dispmode…
============================================================================== --- trunk/rostests/apitests/appshim/dispmode.c [iso-8859-1] (original) +++ trunk/rostests/apitests/appshim/dispmode.c [iso-8859-1] Wed Jun 14 15:25:04 2017 @@ -27,6 +27,7 @@ #include <stdio.h> #include <strsafe.h> #include "wine/test.h" +#include "apitest_iathook.h" static DWORD g_Version; #define WINVER_ANY 0 @@ -311,58 +312,6 @@ } } -static PIMAGE_IMPORT_DESCRIPTOR FindImportDescriptor(PBYTE DllBase, PCSTR DllName) -{ - ULONG Size; - PIMAGE_IMPORT_DESCRIPTOR ImportDescriptor = RtlImageDirectoryEntryToData((HMODULE)DllBase, TRUE, IMAGE_DIRECTORY_ENTRY_IMPORT, &Size); - while (ImportDescriptor->Name && ImportDescriptor->OriginalFirstThunk) - { - PCHAR Name = (PCHAR)(DllBase + ImportDescriptor->Name); - if (!lstrcmpiA(Name, DllName)) - { - return ImportDescriptor; - } - ImportDescriptor++; - } - return NULL; -} - -static BOOL RedirectIat(HMODULE TargetDll, PCSTR DllName, PCSTR FunctionName, ULONG_PTR NewFunction, ULONG_PTR* OriginalFunction) -{ - PBYTE DllBase = (PBYTE)TargetDll; - PIMAGE_IMPORT_DESCRIPTOR ImportDescriptor = FindImportDescriptor(DllBase, DllName); - if (ImportDescriptor) - { - // On loaded images, OriginalFirstThunk points to the name / ordinal of the function - PIMAGE_THUNK_DATA OriginalThunk = (PIMAGE_THUNK_DATA)(DllBase + ImportDescriptor->OriginalFirstThunk); - // FirstThunk points to the resolved address. - PIMAGE_THUNK_DATA FirstThunk = (PIMAGE_THUNK_DATA)(DllBase + ImportDescriptor->FirstThunk); - while (OriginalThunk->u1.AddressOfData && FirstThunk->u1.Function) - { - if (!IMAGE_SNAP_BY_ORDINAL32(OriginalThunk->u1.AddressOfData)) - { - PIMAGE_IMPORT_BY_NAME ImportName = (PIMAGE_IMPORT_BY_NAME)(DllBase + OriginalThunk->u1.AddressOfData); - if (!lstrcmpiA((PCSTR)ImportName->Name, FunctionName)) - { - DWORD dwOld; - VirtualProtect(&FirstThunk->u1.Function, sizeof(ULONG_PTR), PAGE_EXECUTE_READWRITE, &dwOld); - *OriginalFunction = FirstThunk->u1.Function; - FirstThunk->u1.Function = NewFunction; - VirtualProtect(&FirstThunk->u1.Function, sizeof(ULONG_PTR), dwOld, &dwOld); - return TRUE; - } - } - OriginalThunk++; - FirstThunk++; - } - skip("Unable to find the Import %s!%s\n", DllName, FunctionName); - } - else - { - skip("Unable to find the ImportDescriptor for %s\n", DllName); - } - return FALSE; -} static BOOL hook_disp(HMODULE dll) { @@ -370,11 +319,21 @@ RedirectIat(dll, "user32.dll", "EnumDisplaySettingsA", (ULONG_PTR)mEnumDisplaySettingsA, (ULONG_PTR*)&pEnumDisplaySettingsA); } +static VOID unhook_disp(HMODULE dll) +{ + RestoreIat(dll, "user32.dll", "ChangeDisplaySettingsA", (ULONG_PTR)pChangeDisplaySettingsA); + RestoreIat(dll, "user32.dll", "EnumDisplaySettingsA", (ULONG_PTR)pEnumDisplaySettingsA); +} + static BOOL hook_theme(HMODULE dll) { return RedirectIat(dll, "uxtheme.dll", "SetThemeAppProperties", (ULONG_PTR)mSetThemeAppProperties, (ULONG_PTR*)&pSetThemeAppProperties); } +static VOID unhook_theme(HMODULE dll) +{ + RestoreIat(dll, "uxtheme.dll", "SetThemeAppProperties", (ULONG_PTR)pSetThemeAppProperties); +} static void test_one(LPCSTR shim, DWORD dwReason, void(*pre)(), void(*post)(), void(*second)(void)) { @@ -424,24 +383,25 @@ DWORD winver; DWORD reason; BOOL(*hook)(HMODULE); + void(*unhook)(HMODULE); void(*pre)(void); void(*post)(void); void(*second)(void); } tests[] = { /* Success */ - { "Force8BitColor", L"\\aclayers.dll", WINVER_ANY, 1, hook_disp, pre_8bit, post_8bit, post_8bit_no }, - { "Force8BitColor", L"\\aclayers.dll", _WIN32_WINNT_VISTA, 100, hook_disp, pre_8bit, post_8bit, post_8bit_no }, - { "Force640x480", L"\\aclayers.dll", WINVER_ANY, 1, hook_disp, pre_640, post_640, post_640_no }, - { "Force640x480", L"\\aclayers.dll", _WIN32_WINNT_VISTA, 100, hook_disp, pre_640, post_640, post_640_no }, - { "DisableThemes", L"\\acgenral.dll", WINVER_ANY, 1, hook_theme, pre_theme, post_theme, post_theme_no }, - { "DisableThemes", L"\\acgenral.dll", _WIN32_WINNT_VISTA, 100, hook_theme, pre_theme, post_theme, post_theme_no }, + { "Force8BitColor", L"\\aclayers.dll", WINVER_ANY, 1, hook_disp, unhook_disp, pre_8bit, post_8bit, post_8bit_no }, + { "Force8BitColor", L"\\aclayers.dll", _WIN32_WINNT_VISTA, 100, hook_disp, unhook_disp,pre_8bit, post_8bit, post_8bit_no }, + { "Force640x480", L"\\aclayers.dll", WINVER_ANY, 1, hook_disp, unhook_disp, pre_640, post_640, post_640_no }, + { "Force640x480", L"\\aclayers.dll", _WIN32_WINNT_VISTA, 100, hook_disp, unhook_disp, pre_640, post_640, post_640_no }, + { "DisableThemes", L"\\acgenral.dll", WINVER_ANY, 1, hook_theme, unhook_theme, pre_theme, post_theme, post_theme_no }, + { "DisableThemes", L"\\acgenral.dll", _WIN32_WINNT_VISTA, 100, hook_theme, unhook_theme, pre_theme, post_theme, post_theme_no }, /* No need to change anything */ - { "Force8BitColor", L"\\aclayers.dll", WINVER_ANY, 1, hook_disp, pre_8bit_2, post_8bit_2, post_8bit_2_no }, - { "Force8BitColor", L"\\aclayers.dll", _WIN32_WINNT_VISTA, 100, hook_disp, pre_8bit_2, post_8bit_2, post_8bit_2_no }, - { "Force640x480", L"\\aclayers.dll", WINVER_ANY, 1, hook_disp, pre_640_2, post_640_2, post_640_2_no }, - { "Force640x480", L"\\aclayers.dll", _WIN32_WINNT_VISTA, 100, hook_disp, pre_640_2, post_640_2, post_640_2_no }, + { "Force8BitColor", L"\\aclayers.dll", WINVER_ANY, 1, hook_disp, unhook_disp, pre_8bit_2, post_8bit_2, post_8bit_2_no }, + { "Force8BitColor", L"\\aclayers.dll", _WIN32_WINNT_VISTA, 100, hook_disp, unhook_disp, pre_8bit_2, post_8bit_2, post_8bit_2_no }, + { "Force640x480", L"\\aclayers.dll", WINVER_ANY, 1, hook_disp, unhook_disp, pre_640_2, post_640_2, post_640_2_no }, + { "Force640x480", L"\\aclayers.dll", _WIN32_WINNT_VISTA, 100, hook_disp, unhook_disp, pre_640_2, post_640_2, post_640_2_no }, }; Added: trunk/rostests/apitests/include/apitest_iathook.h URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/include/apitest_…
============================================================================== --- trunk/rostests/apitests/include/apitest_iathook.h (added) +++ trunk/rostests/apitests/include/apitest_iathook.h [iso-8859-1] Wed Jun 14 15:25:04 2017 @@ -0,0 +1,64 @@ +#ifndef _APITEST_IATHOOK_H +#define _APITEST_IATHOOK_H + +static PIMAGE_IMPORT_DESCRIPTOR FindImportDescriptor(PBYTE DllBase, PCSTR DllName) +{ + ULONG Size; + PIMAGE_IMPORT_DESCRIPTOR ImportDescriptor = RtlImageDirectoryEntryToData((HMODULE)DllBase, TRUE, IMAGE_DIRECTORY_ENTRY_IMPORT, &Size); + while (ImportDescriptor->Name && ImportDescriptor->OriginalFirstThunk) + { + PCHAR Name = (PCHAR)(DllBase + ImportDescriptor->Name); + if (!lstrcmpiA(Name, DllName)) + { + return ImportDescriptor; + } + ImportDescriptor++; + } + return NULL; +} + +static BOOL RedirectIat(HMODULE TargetDll, PCSTR DllName, PCSTR FunctionName, ULONG_PTR NewFunction, ULONG_PTR* OriginalFunction) +{ + PBYTE DllBase = (PBYTE)TargetDll; + PIMAGE_IMPORT_DESCRIPTOR ImportDescriptor = FindImportDescriptor(DllBase, DllName); + if (ImportDescriptor) + { + // On loaded images, OriginalFirstThunk points to the name / ordinal of the function + PIMAGE_THUNK_DATA OriginalThunk = (PIMAGE_THUNK_DATA)(DllBase + ImportDescriptor->OriginalFirstThunk); + // FirstThunk points to the resolved address. + PIMAGE_THUNK_DATA FirstThunk = (PIMAGE_THUNK_DATA)(DllBase + ImportDescriptor->FirstThunk); + while (OriginalThunk->u1.AddressOfData && FirstThunk->u1.Function) + { + if (!IMAGE_SNAP_BY_ORDINAL32(OriginalThunk->u1.AddressOfData)) + { + PIMAGE_IMPORT_BY_NAME ImportName = (PIMAGE_IMPORT_BY_NAME)(DllBase + OriginalThunk->u1.AddressOfData); + if (!lstrcmpiA((PCSTR)ImportName->Name, FunctionName)) + { + DWORD dwOld; + VirtualProtect(&FirstThunk->u1.Function, sizeof(ULONG_PTR), PAGE_EXECUTE_READWRITE, &dwOld); + *OriginalFunction = FirstThunk->u1.Function; + FirstThunk->u1.Function = NewFunction; + VirtualProtect(&FirstThunk->u1.Function, sizeof(ULONG_PTR), dwOld, &dwOld); + return TRUE; + } + } + OriginalThunk++; + FirstThunk++; + } + skip("Unable to find the Import %s!%s\n", DllName, FunctionName); + } + else + { + skip("Unable to find the ImportDescriptor for %s\n", DllName); + } + return FALSE; +} + +static BOOL RestoreIat(HMODULE TargetDll, PCSTR DllName, PCSTR FunctionName, ULONG_PTR OriginalFunction) +{ + ULONG_PTR old = 0; + return RedirectIat(TargetDll, DllName, FunctionName, OriginalFunction, &old); +} + + #endif // _APITEST_IATHOOK_H + Propchange: trunk/rostests/apitests/include/apitest_iathook.h ------------------------------------------------------------------------------ svn:eol-style = native
7 years, 6 months
1
0
0
0
[mjansen] 75040: [NOTEPAD] Fix default font settings. Patch by Katayama Hirofumi MZ. CORE-13037
by mjansen@svn.reactos.org
Author: mjansen Date: Wed Jun 14 14:22:32 2017 New Revision: 75040 URL:
http://svn.reactos.org/svn/reactos?rev=75040&view=rev
Log: [NOTEPAD] Fix default font settings. Patch by Katayama Hirofumi MZ. CORE-13037 Modified: trunk/reactos/base/applications/notepad/settings.c Modified: trunk/reactos/base/applications/notepad/settings.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
============================================================================== --- trunk/reactos/base/applications/notepad/settings.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/notepad/settings.c [iso-8859-1] Wed Jun 14 14:22:32 2017 @@ -170,18 +170,31 @@ else { /* If no settings are found in the registry, then use default values */ - Globals.lfFont.lfCharSet = 163; - Globals.lfFont.lfClipPrecision = 2; + Globals.bShowStatusBar = FALSE; + Globals.bWrapLongLines = FALSE; + SetRect(&Globals.lMargins, 750, 1000, 750, 1000); + + /* FIXME: Globals.fSaveWindowPositions = FALSE; */ + /* FIXME: Globals.fMLE_is_broken = FALSE; */ + + LoadString(Globals.hInstance, STRING_PAGESETUP_HEADERVALUE, Globals.szHeader, + ARRAY_SIZE(Globals.szHeader)); + LoadString(Globals.hInstance, STRING_PAGESETUP_FOOTERVALUE, Globals.szFooter, + ARRAY_SIZE(Globals.szFooter)); + + ZeroMemory(&Globals.lfFont, sizeof(Globals.lfFont)); + Globals.lfFont.lfCharSet = ANSI_CHARSET; + Globals.lfFont.lfClipPrecision = CLIP_STROKE_PRECIS; Globals.lfFont.lfEscapement = 0; _tcscpy(Globals.lfFont.lfFaceName, _T("Lucida Console")); - Globals.lfFont.lfItalic = 0; + Globals.lfFont.lfItalic = FALSE; Globals.lfFont.lfOrientation = 0; - Globals.lfFont.lfOutPrecision = 3; - Globals.lfFont.lfPitchAndFamily = 34; - Globals.lfFont.lfQuality = 1; - Globals.lfFont.lfStrikeOut = 0; - Globals.lfFont.lfUnderline = 0; - Globals.lfFont.lfWeight = 400; + Globals.lfFont.lfOutPrecision = OUT_STRING_PRECIS; + Globals.lfFont.lfPitchAndFamily = FIXED_PITCH | FF_MODERN; + Globals.lfFont.lfQuality = PROOF_QUALITY; + Globals.lfFont.lfStrikeOut = FALSE; + Globals.lfFont.lfUnderline = FALSE; + Globals.lfFont.lfWeight = FW_NORMAL; Globals.lfFont.lfHeight = HeightFromPointSize(100); }
7 years, 6 months
1
0
0
0
[ekohl] 75039: [NETAPI32] - Add I_BrowserQueryEmulatedDomains and I_BrowserSetNetlogonState to the new computer browser inferface file. - Get rid of the now obsolete browsr.c file.
by ekohl@svn.reactos.org
Author: ekohl Date: Wed Jun 14 13:44:11 2017 New Revision: 75039 URL:
http://svn.reactos.org/svn/reactos?rev=75039&view=rev
Log: [NETAPI32] - Add I_BrowserQueryEmulatedDomains and I_BrowserSetNetlogonState to the new computer browser inferface file. - Get rid of the now obsolete browsr.c file. Removed: trunk/reactos/dll/win32/netapi32/browsr.c Modified: trunk/reactos/dll/win32/netapi32/CMakeLists.txt trunk/reactos/dll/win32/netapi32/browser.c Modified: trunk/reactos/dll/win32/netapi32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/CMakeLi…
============================================================================== --- trunk/reactos/dll/win32/netapi32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/CMakeLists.txt [iso-8859-1] Wed Jun 14 13:44:11 2017 @@ -16,7 +16,6 @@ access.c apibuf.c browser.c - browsr.c ds.c dssetup.c group.c Modified: trunk/reactos/dll/win32/netapi32/browser.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/browser…
============================================================================== --- trunk/reactos/dll/win32/netapi32/browser.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/browser.c [iso-8859-1] Wed Jun 14 13:44:11 2017 @@ -11,6 +11,7 @@ #include "netapi32.h" #include <rpc.h> +#include <lmbrowsr.h> #include "browser_c.h" @@ -75,16 +76,46 @@ NET_API_STATUS WINAPI +I_BrowserQueryEmulatedDomains( + _In_opt_ LPWSTR ServerName, + _Out_ PBROWSER_EMULATED_DOMAIN *EmulatedDomains, + _Out_ LPDWORD EntriesRead) +{ + FIXME("I_BrowserQueryEmulatedDomains(%s %p %p)\n", + debugstr_w(ServerName), EmulatedDomains, EntriesRead); + + return ERROR_NOT_SUPPORTED; +} + + +NET_API_STATUS +WINAPI +I_BrowserSetNetlogonState( + _In_ LPWSTR ServerName, + _In_ LPWSTR DomainName, + _In_ LPWSTR EmulatedServerName, + _In_ DWORD Role) +{ + FIXME("I_BrowserSetNetlogonState(%s %s %s %lu)\n", + debugstr_w(ServerName), debugstr_w(ServerName), + debugstr_w(EmulatedServerName), Role); + + return ERROR_NOT_SUPPORTED; +} + + +NET_API_STATUS +WINAPI NetServerEnum( - LMCSTR servername, - DWORD level, - LPBYTE *bufptr, - DWORD prefmaxlen, - LPDWORD entriesread, - LPDWORD totalentries, - DWORD servertype, - LMCSTR domain, - LPDWORD resume_handle) + _In_opt_ LMCSTR servername, + _In_ DWORD level, + _Out_ LPBYTE *bufptr, + _In_ DWORD prefmaxlen, + _Out_ LPDWORD entriesread, + _Out_ LPDWORD totalentries, + _In_ DWORD servertype, + _In_opt_ LMCSTR domain, + _Inout_opt_ LPDWORD resume_handle) { FIXME("NetServerEnum(%s %lu %p %lu %p %p %lu %s %p)\n", debugstr_w(servername), level, bufptr, prefmaxlen, entriesread, @@ -97,15 +128,15 @@ NET_API_STATUS WINAPI NetServerEnumEx( - LMCSTR ServerName, - DWORD Level, - LPBYTE *Bufptr, - DWORD PrefMaxlen, - LPDWORD EntriesRead, - LPDWORD totalentries, - DWORD servertype, - LMCSTR domain, - LMCSTR FirstNameToReturn) + _In_opt_ LMCSTR ServerName, + _In_ DWORD Level, + _Out_ LPBYTE *Bufptr, + _In_ DWORD PrefMaxlen, + _Out_ LPDWORD EntriesRead, + _Out_ LPDWORD totalentries, + _In_ DWORD servertype, + _In_opt_ LMCSTR domain, + _In_opt_ LMCSTR FirstNameToReturn) { FIXME("NetServerEnumEx(%s %lu %p %lu %p %p %lu %s %s)\n", debugstr_w(ServerName), Level, Bufptr, PrefMaxlen, EntriesRead, totalentries, Removed: trunk/reactos/dll/win32/netapi32/browsr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/browsr.…
============================================================================== --- trunk/reactos/dll/win32/netapi32/browsr.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/browsr.c (removed) @@ -1,43 +0,0 @@ -/* - * Copyright 2002 Andriy Palamarchuk - * - * netapi32 browser functions - * - * 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 "netapi32.h" - -#include <lmbrowsr.h> - -/************************************************************ - * I_BrowserSetNetlogonState (NETAPI32.@) - */ -NET_API_STATUS WINAPI I_BrowserSetNetlogonState( - LPWSTR ServerName, LPWSTR DomainName, LPWSTR EmulatedServerName, - DWORD Role) -{ - return ERROR_NOT_SUPPORTED; -} - -/************************************************************ - * I_BrowserQueryEmulatedDomains (NETAPI32.@) - */ -NET_API_STATUS WINAPI I_BrowserQueryEmulatedDomains( - LPWSTR ServerName, PBROWSER_EMULATED_DOMAIN *EmulatedDomains, - LPDWORD EntriesRead) -{ - return ERROR_NOT_SUPPORTED; -}
7 years, 6 months
1
0
0
0
[ekohl] 75038: [NETAPI32] - Add the computer browser service client interface. - Add binding code for the computer browser service client interface.
by ekohl@svn.reactos.org
Author: ekohl Date: Wed Jun 14 13:10:36 2017 New Revision: 75038 URL:
http://svn.reactos.org/svn/reactos?rev=75038&view=rev
Log: [NETAPI32] - Add the computer browser service client interface. - Add binding code for the computer browser service client interface. Modified: trunk/reactos/dll/win32/netapi32/CMakeLists.txt trunk/reactos/dll/win32/netapi32/browser.c Modified: trunk/reactos/dll/win32/netapi32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/CMakeLi…
============================================================================== --- trunk/reactos/dll/win32/netapi32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/CMakeLists.txt [iso-8859-1] Wed Jun 14 13:10:36 2017 @@ -7,6 +7,7 @@ spec2def(netapi32.dll netapi32.spec ADD_IMPORTLIB) add_rpc_files(client ${REACTOS_SOURCE_DIR}/sdk/include/reactos/idl/atsvc.idl + ${REACTOS_SOURCE_DIR}/sdk/include/reactos/idl/browser.idl ${REACTOS_SOURCE_DIR}/sdk/include/reactos/idl/dssetup.idl ${REACTOS_SOURCE_DIR}/sdk/include/reactos/idl/srvsvc.idl ${REACTOS_SOURCE_DIR}/sdk/include/reactos/idl/wkssvc.idl) @@ -34,6 +35,7 @@ wksta_new.c netapi32.h ${CMAKE_CURRENT_BINARY_DIR}/atsvc_c.c + ${CMAKE_CURRENT_BINARY_DIR}/browser_c.c ${CMAKE_CURRENT_BINARY_DIR}/dssetup_c.c ${CMAKE_CURRENT_BINARY_DIR}/srvsvc_c.c ${CMAKE_CURRENT_BINARY_DIR}/wkssvc_c.c) Modified: trunk/reactos/dll/win32/netapi32/browser.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/browser…
============================================================================== --- trunk/reactos/dll/win32/netapi32/browser.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/browser.c [iso-8859-1] Wed Jun 14 13:10:36 2017 @@ -11,11 +11,67 @@ #include "netapi32.h" #include <rpc.h> +#include "browser_c.h" WINE_DEFAULT_DEBUG_CHANNEL(netapi32); /* FUNCTIONS *****************************************************************/ + +handle_t __RPC_USER +BROWSER_IDENTIFY_HANDLE_bind(BROWSER_IDENTIFY_HANDLE pszSystemName) +{ + handle_t hBinding = NULL; + LPWSTR pszStringBinding; + RPC_STATUS status; + + TRACE("BROWSER_IDENTIFY_HANDLE_bind() called\n"); + + status = RpcStringBindingComposeW(NULL, + L"ncacn_np", + pszSystemName, + L"\\pipe\\browser", + NULL, + &pszStringBinding); + if (status) + { + TRACE("RpcStringBindingCompose returned 0x%x\n", status); + return NULL; + } + + /* Set the binding handle that will be used to bind to the server. */ + status = RpcBindingFromStringBindingW(pszStringBinding, + &hBinding); + if (status) + { + TRACE("RpcBindingFromStringBinding returned 0x%x\n", status); + } + + status = RpcStringFreeW(&pszStringBinding); + if (status) + { +// TRACE("RpcStringFree returned 0x%x\n", status); + } + + return hBinding; +} + + +void __RPC_USER +BROWSER_IDENTIFY_HANDLE_unbind(BROWSER_IDENTIFY_HANDLE pszSystemName, + handle_t hBinding) +{ + RPC_STATUS status; + + TRACE("BROWSER_IDENTIFY_HANDLE_unbind() called\n"); + + status = RpcBindingFree(&hBinding); + if (status) + { + TRACE("RpcBindingFree returned 0x%x\n", status); + } +} + NET_API_STATUS WINAPI
7 years, 6 months
1
0
0
0
[ekohl] 75037: [NETAPI32] Implement NetEnumerateComputerNames. This function calls its counterpart in the workstation service.
by ekohl@svn.reactos.org
Author: ekohl Date: Wed Jun 14 13:06:41 2017 New Revision: 75037 URL:
http://svn.reactos.org/svn/reactos?rev=75037&view=rev
Log: [NETAPI32] Implement NetEnumerateComputerNames. This function calls its counterpart in the workstation service. Modified: trunk/reactos/dll/win32/netapi32/netapi32.spec trunk/reactos/dll/win32/netapi32/wksta_new.c Modified: trunk/reactos/dll/win32/netapi32/netapi32.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/netapi3…
============================================================================== --- trunk/reactos/dll/win32/netapi32/netapi32.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/netapi32.spec [iso-8859-1] Wed Jun 14 13:06:41 2017 @@ -139,7 +139,7 @@ @ stub NetDfsSetInfo @ stub NetDfsSetSecurity @ stub NetDfsSetStdContainerSecurity -@ stub NetEnumerateComputerNames +@ stdcall NetEnumerateComputerNames(wstr long long ptr ptr) @ stdcall NetEnumerateTrustedDomains(wstr ptr) @ stdcall NetErrorLogClear(wstr wstr ptr) @ stdcall NetErrorLogRead(wstr wstr ptr long ptr long long ptr long ptr ptr) Modified: trunk/reactos/dll/win32/netapi32/wksta_new.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/wksta_n…
============================================================================== --- trunk/reactos/dll/win32/netapi32/wksta_new.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/wksta_new.c [iso-8859-1] Wed Jun 14 13:06:41 2017 @@ -167,6 +167,44 @@ (PWSTR)DomainAccount, EncryptedPassword, Reserved); + } + RpcExcept(EXCEPTION_EXECUTE_HANDLER) + { + status = I_RpcMapWin32Status(RpcExceptionCode()); + } + RpcEndExcept; + + return status; +} + + +NET_API_STATUS +WINAPI +NetEnumerateComputerNames( + _In_opt_ LPCWSTR Server, + _In_ NET_COMPUTER_NAME_TYPE NameType, + _In_ ULONG Reserved, + _Out_ PDWORD EntryCount, + _Out_ LPWSTR **ComputerNames) +{ + PNET_COMPUTER_NAME_ARRAY ComputerNameArray = NULL; + NET_API_STATUS status; + + TRACE("NetEnumerateComputerNames(%s %lu %lu %p %p)\n", + debugstr_w(Server), NameType, Reserved, EntryCount, ComputerNames); + + RpcTryExcept + { + status = NetrEnumerateComputerNames((PWSTR)Server, + NameType, + Reserved, + &ComputerNameArray); + if (status == NERR_Success) + { + *EntryCount = ComputerNameArray->EntryCount; + /* FIXME */ + // *ComputerNames = + } } RpcExcept(EXCEPTION_EXECUTE_HANDLER) {
7 years, 6 months
1
0
0
0
[ssawant] 75036: [QCKLNCH] -Tested CISFband in FinalConstruct. -Performed Clean up on whitespace issues.
by ssawant@svn.reactos.org
Author: ssawant Date: Wed Jun 14 12:58:12 2017 New Revision: 75036 URL:
http://svn.reactos.org/svn/reactos?rev=75036&view=rev
Log: [QCKLNCH] -Tested CISFband in FinalConstruct. -Performed Clean up on whitespace issues. Modified: branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CQuickLaunchBand.cpp branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CQuickLaunchBand.h branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/precomp.h Modified: branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CQuickLaunchBand.cpp URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/shellext/reactos/dll/…
============================================================================== --- branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CQuickLaunchBand.cpp [iso-8859-1] (original) +++ branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CQuickLaunchBand.cpp [iso-8859-1] Wed Jun 14 12:58:12 2017 @@ -14,44 +14,42 @@ static const GUID CLSID_QuickLaunchBand = { 0x260cb95d, 0x4544, 0x44f6, { 0xa0, 0x79, 0x57, 0x5b, 0xaa, 0x60, 0xb7, 0x2f } }; //Componenet Category Registration -HRESULT RegisterComCat() -{ - ICatRegister *pcr; - HRESULT hr = CoCreateInstance(CLSID_StdComponentCategoriesMgr, NULL, CLSCTX_INPROC_SERVER, IID_ICatRegister, (void**)&pcr); - if (SUCCEEDED(hr)) - { - CATID catid = CATID_DeskBand; - hr = pcr->RegisterClassImplCategories(CLSID_QuickLaunchBand, 1, &catid); - pcr->Release(); - } - return hr; -} - -HRESULT UnregisterComCat() -{ - ICatRegister *pcr; - HRESULT hr = CoCreateInstance(CLSID_StdComponentCategoriesMgr, NULL, CLSCTX_INPROC_SERVER, IID_ICatRegister, (void**)&pcr); - if (SUCCEEDED(hr)) - { - CATID catid = CATID_DeskBand; - hr = pcr->UnRegisterClassImplCategories(CLSID_QuickLaunchBand, 1, &catid); - pcr->Release(); - } - return hr; -} + HRESULT RegisterComCat() + { + CComPtr<ICatRegister> pcr; + HRESULT hr = CoCreateInstance(CLSID_StdComponentCategoriesMgr, NULL, CLSCTX_INPROC_SERVER, IID_ICatRegister, (void**)&pcr); + if (SUCCEEDED(hr)) + { + CATID catid = CATID_DeskBand; + hr = pcr->RegisterClassImplCategories(CLSID_QuickLaunchBand, 1, &catid); + } + return hr; + } + + HRESULT UnregisterComCat() + { + CComPtr<ICatRegister> pcr; + HRESULT hr = CoCreateInstance(CLSID_StdComponentCategoriesMgr, NULL, CLSCTX_INPROC_SERVER, IID_ICatRegister, (void**)&pcr); + if (SUCCEEDED(hr)) + { + CATID catid = CATID_DeskBand; + hr = pcr->UnRegisterClassImplCategories(CLSID_QuickLaunchBand, 1, &catid); + } + return hr; + } //Subclassing Button LRESULT CALLBACK MyWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData) { - switch (uMsg) - { - case WM_COMMAND: - { - MessageBox(0, L"Button Clicked!!", L"Testing", MB_OK | MB_ICONINFORMATION); - } - } - return DefSubclassProc(hWnd, uMsg, wParam, lParam); + switch (uMsg) + { + case WM_COMMAND: + { + MessageBox(0, L"Button Clicked!!", L"Testing", MB_OK | MB_ICONINFORMATION); + } + } + return DefSubclassProc(hWnd, uMsg, wParam, lParam); } //CQuickLaunchBand @@ -60,17 +58,42 @@ m_hWnd(NULL), m_BandID(0) { - + } CQuickLaunchBand::~CQuickLaunchBand() { } /*****************************************************************************/ +//ATL Construct + + HRESULT CQuickLaunchBand::FinalConstruct() + { + HRESULT hr = CoCreateInstance(CLSID_ISFBand, NULL, CLSCTX_INPROC_SERVER, IID_IUnknown, (void**) &m_punkISFB); + if (SUCCEEDED(hr)) + { + CComPtr<IShellFolderBand> pISFB; + hr = m_punkISFB->QueryInterface(IID_IShellFolderBand, (void**) &pISFB); + if (SUCCEEDED(hr)) + { + MessageBox(0, L"CISFBand Init success!!", L"Testing", MB_OK | MB_ICONINFORMATION); + CComPtr<IShellFolder> pISF; + hr = SHGetDesktopFolder(&pISF); + if (SUCCEEDED(hr)) + { + pISFB->InitializeSFB(pISF, 0); + MessageBox(0, L"CISFBand Init success!!", L"Testing", MB_OK | MB_ICONINFORMATION); + } + } + } + + MessageBox(0, L"CISFBand Init success!!", L"Testing", MB_OK | MB_ICONINFORMATION); + return hr; + } //IObjectWithSite HRESULT STDMETHODCALLTYPE CQuickLaunchBand::SetSite(IUnknown *pUnkSite) { - MessageBox(0, L"CQuickLaunchBand::SetSite called!", L"Testing", MB_OK | MB_ICONINFORMATION); + MessageBox(0, L"CQuickLaunchBand::SetSite called!", L"Testing", MB_OK | MB_ICONINFORMATION); HRESULT hRet; HWND hwndParent; @@ -84,9 +107,7 @@ return hRet; } m_Site = pUnkSite; - m_hWnd = CreateWindowEx(0, L"BUTTON", L">>", WS_CHILD, CW_USEDEFAULT, CW_USEDEFAULT, 50, 50, hwndParent, 0, m_hInstance, 0); - SetWindowSubclass(hwndParent, MyWndProc, 0, 0); //when button is clicked, parent receives WM_COMMAND, and thus subclassed to show a test message box return S_OK; @@ -96,7 +117,7 @@ IN REFIID riid, OUT VOID **ppvSite) { - //MessageBox(0, L"GetSite called!", L"Test Caption", MB_OK | MB_ICONINFORMATION); + //MessageBox(0, L"GetSite called!", L"Test Caption", MB_OK | MB_ICONINFORMATION); TRACE("CQuickLaunchBand::GetSite(0x%p,0x%p)\n", riid, ppvSite); if (m_Site != NULL) @@ -113,7 +134,7 @@ //IDeskBand HRESULT STDMETHODCALLTYPE CQuickLaunchBand::GetWindow(OUT HWND *phwnd) { - //MessageBox(0, L"GetWindow called!", L"Test Caption", MB_OK | MB_ICONINFORMATION); + //MessageBox(0, L"GetWindow called!", L"Test Caption", MB_OK | MB_ICONINFORMATION); if (!m_hWnd) return E_FAIL; @@ -133,31 +154,31 @@ return E_NOTIMPL; } - HRESULT STDMETHODCALLTYPE CQuickLaunchBand::ShowDW( + HRESULT STDMETHODCALLTYPE CQuickLaunchBand::ShowDW( IN BOOL bShow) { - //MessageBox(0, L"ShowDW called!", L"Test Caption", MB_OK | MB_ICONINFORMATION); + //MessageBox(0, L"ShowDW called!", L"Test Caption", MB_OK | MB_ICONINFORMATION); if (m_hWnd) - { - ShowWindow(m_hWnd, bShow ? SW_SHOW : SW_HIDE); - } - + { + ShowWindow(m_hWnd, bShow ? SW_SHOW : SW_HIDE); + } + return S_OK; } HRESULT STDMETHODCALLTYPE CQuickLaunchBand::CloseDW( IN DWORD dwReserved) { - //MessageBox(0, L"CloseDW called!", L"Test Caption", MB_OK | MB_ICONINFORMATION); - - if (m_hWnd) - { - ShowWindow(m_hWnd, SW_HIDE); - DestroyWindow(m_hWnd); - m_hWnd = NULL; - } - + //MessageBox(0, L"CloseDW called!", L"Test Caption", MB_OK | MB_ICONINFORMATION); + + if (m_hWnd) + { + ShowWindow(m_hWnd, SW_HIDE); + DestroyWindow(m_hWnd); + m_hWnd = NULL; + } + return S_OK; } @@ -177,14 +198,14 @@ IN DWORD dwViewMode, IN OUT DESKBANDINFO *pdbi) { - //MessageBox(0, L"GetBandInfo called!", L"Test Caption", MB_OK | MB_ICONINFORMATION); - - TRACE("CTaskBand::GetBandInfo(0x%x,0x%x,0x%p) hWnd=0x%p\n", dwBandID, dwViewMode, pdbi, m_hWnd); - HRESULT hr = E_INVALIDARG; - - if (m_hWnd && pdbi) + //MessageBox(0, L"GetBandInfo called!", L"Test Caption", MB_OK | MB_ICONINFORMATION); + + TRACE("CTaskBand::GetBandInfo(0x%x,0x%x,0x%p) hWnd=0x%p\n", dwBandID, dwViewMode, pdbi, m_hWnd); + HRESULT hr = E_INVALIDARG; + + if (m_hWnd && pdbi) { - m_BandID = dwBandID; + m_BandID = dwBandID; pdbi->dwModeFlags = DBIMF_VARIABLEHEIGHT; if (dwViewMode & DBIF_VIEWMODE_VERTICAL) @@ -206,33 +227,33 @@ pdbi->ptMinSize.x = pdbi->ptIntegral.y; } - if (pdbi->dwMask & DBIM_MAXSIZE) - { - pdbi->ptMaxSize.y = -1; - } - - if (pdbi->dwMask & DBIM_ACTUAL) - { - pdbi->ptActual.x = 35; - pdbi->ptActual.y = 30; - } - - if (pdbi->dwMask & DBIM_TITLE) - { - // Don't show title by removing this flag. - pdbi->dwMask &= ~DBIM_TITLE; - } - - if (pdbi->dwMask & DBIM_MODEFLAGS) - { - pdbi->dwModeFlags = DBIMF_NORMAL | DBIMF_VARIABLEHEIGHT; - } - - if (pdbi->dwMask & DBIM_BKCOLOR) - { - // Use the default background color by removing this flag. - pdbi->dwMask &= ~DBIM_BKCOLOR; - } + if (pdbi->dwMask & DBIM_MAXSIZE) + { + pdbi->ptMaxSize.y = -1; + } + + if (pdbi->dwMask & DBIM_ACTUAL) + { + pdbi->ptActual.x = 35; + pdbi->ptActual.y = 30; + } + + if (pdbi->dwMask & DBIM_TITLE) + { + // Don't show title by removing this flag. + pdbi->dwMask &= ~DBIM_TITLE; + } + + if (pdbi->dwMask & DBIM_MODEFLAGS) + { + pdbi->dwModeFlags = DBIMF_NORMAL | DBIMF_VARIABLEHEIGHT; + } + + if (pdbi->dwMask & DBIM_BKCOLOR) + { + // Use the default background color by removing this flag. + pdbi->dwMask &= ~DBIM_BKCOLOR; + } TRACE("H: %d, Min: %d,%d, Integral.y: %d Actual: %d,%d\n", (dwViewMode & DBIF_VIEWMODE_VERTICAL) == 0, pdbi->ptMinSize.x, pdbi->ptMinSize.y, pdbi->ptIntegral.y, @@ -241,7 +262,7 @@ hr = S_OK; } - return hr; + return hr; } /*****************************************************************************/ @@ -280,7 +301,7 @@ HRESULT STDMETHODCALLTYPE CQuickLaunchBand::GetClassID( OUT CLSID *pClassID) { - //MessageBox(0, L"GetClassID called!", L"Test Caption", MB_OK | MB_ICONINFORMATION); + //MessageBox(0, L"GetClassID called!", L"Test Caption", MB_OK | MB_ICONINFORMATION); TRACE("CQuickLaunchBand::GetClassID(0x%p)\n", pClassID); /* We're going to return the (internal!) CLSID of the quick launch band */ *pClassID = CLSID_QuickLaunchBand; @@ -345,7 +366,7 @@ HRESULT STDMETHODCALLTYPE CQuickLaunchBand::ContainsWindow( IN HWND hWnd) { - //MessageBox(0, L"ContainsWindow called!", L"Test Caption", MB_OK | MB_ICONINFORMATION); + //MessageBox(0, L"ContainsWindow called!", L"Test Caption", MB_OK | MB_ICONINFORMATION); if (hWnd == m_hWnd || IsChild(m_hWnd, hWnd)) @@ -358,7 +379,7 @@ } HRESULT STDMETHODCALLTYPE CQuickLaunchBand::OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult) - { + { //MessageBox(0, L"OnWinEvent called!", L"Test Caption", MB_OK | MB_ICONINFORMATION); UNIMPLEMENTED; return E_NOTIMPL; @@ -366,7 +387,7 @@ HRESULT STDMETHODCALLTYPE CQuickLaunchBand::IsWindowOwner(HWND hWnd) { - //MessageBox(0, L"IsWindowOwner called!", L"Test Caption", MB_OK | MB_ICONINFORMATION); + //MessageBox(0, L"IsWindowOwner called!", L"Test Caption", MB_OK | MB_ICONINFORMATION); return (hWnd == m_hWnd) ? S_OK : S_FALSE; } Modified: branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CQuickLaunchBand.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/shellext/reactos/dll/…
============================================================================== --- branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CQuickLaunchBand.h [iso-8859-1] (original) +++ branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CQuickLaunchBand.h [iso-8859-1] Wed Jun 14 12:58:12 2017 @@ -24,16 +24,24 @@ public IWinEventHandler, public IOleCommandTarget { - CComPtr<IUnknown> m_Site; + CComPtr<IUnknown> m_Site; + CComPtr<IUnknown> m_punkISFB; + HINSTANCE m_hInstance; HWND m_hWnd; HWND m_hWndStartButton; DWORD m_BandID; + + public: CQuickLaunchBand(); - virtual ~CQuickLaunchBand(); + virtual ~CQuickLaunchBand(); + +//ATL construct + + HRESULT FinalConstruct(); //IObjectWithSite Modified: branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/precomp.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/shellext/reactos/dll/…
============================================================================== --- branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/precomp.h [iso-8859-1] (original) +++ branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/precomp.h [iso-8859-1] Wed Jun 14 12:58:12 2017 @@ -18,6 +18,7 @@ #include <ddeml.h> #include <shlguid_undoc.h> #include <shlwapi.h> +#include <shlguid.h> #include <shlobj.h> #include <shlobj_undoc.h> #include <shlwapi_undoc.h>
7 years, 6 months
1
0
0
0
[ekohl] 75035: [IDL] Add computer browser service interface definition files.
by ekohl@svn.reactos.org
Author: ekohl Date: Wed Jun 14 12:57:52 2017 New Revision: 75035 URL:
http://svn.reactos.org/svn/reactos?rev=75035&view=rev
Log: [IDL] Add computer browser service interface definition files. Added: trunk/reactos/sdk/include/reactos/idl/browser.acf (with props) trunk/reactos/sdk/include/reactos/idl/browser.idl (with props) Added: trunk/reactos/sdk/include/reactos/idl/browser.acf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/reactos/idl/br…
============================================================================== --- trunk/reactos/sdk/include/reactos/idl/browser.acf (added) +++ trunk/reactos/sdk/include/reactos/idl/browser.acf [iso-8859-1] Wed Jun 14 12:57:52 2017 @@ -0,0 +1,6 @@ +[ + explicit_handle +] +interface browser +{ +} Propchange: trunk/reactos/sdk/include/reactos/idl/browser.acf ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/sdk/include/reactos/idl/browser.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/reactos/idl/br…
============================================================================== --- trunk/reactos/sdk/include/reactos/idl/browser.idl (added) +++ trunk/reactos/sdk/include/reactos/idl/browser.idl [iso-8859-1] Wed Jun 14 12:57:52 2017 @@ -0,0 +1,108 @@ +/* + * Computer Browser service interface definition + */ + +#include <ms-dtyp.idl> + +typedef [handle] wchar_t *BROWSER_IDENTIFY_HANDLE; + +typedef struct _SERVER_INFO_100 +{ + DWORD sv100_platform_id; + LPWSTR sv100_name; +} SERVER_INFO_100, *PSERVER_INFO_100, *LPSERVER_INFO_100; + +typedef struct _SERVER_INFO_100_CONTAINER +{ + DWORD EntriesRead; + [size_is(EntriesRead)] LPSERVER_INFO_100 Buffer; +} SERVER_INFO_100_CONTAINER, *PSERVER_INFO_100_CONTAINER, *LPSERVER_INFO_100_CONTAINER; + +typedef struct _SERVER_ENUM_STRUCT +{ + DWORD Level; + [switch_is(Level)] union _SERVER_ENUM_UNION + { + [case(100)] LPSERVER_INFO_100_CONTAINER Level100; + [default] ; + } ServerInfo; +} SERVER_ENUM_STRUCT, *PSERVER_ENUM_STRUCT, *LPSERVER_ENUM_STRUCT; + + +[ + uuid(6BFFD098-A112-3610-9833-012892020162), + version(0.0), + pointer_default(unique), +#ifdef __midl + ms_union, +#endif + endpoint("ncacn_np:[\\pipe\\browser]") +#ifndef __midl + ,implicit_handle(handle_t hBinding) +#endif +] +interface browser +{ + /* Function 0 (BrowserrServerEnum) */ + NET_API_STATUS + __stdcall + BrowserOpnum0NotUsedOnWire(void); + + /* Function 1 (BrowserrDebugCall) */ + NET_API_STATUS + __stdcall + BrowserOpnum1NotUsedOnWire(void); + + /* Function 2 (BrowserrQueryOtherDomains) */ + NET_API_STATUS + __stdcall + I_BrowserrQueryOtherDomains( + [in, string, unique] BROWSER_IDENTIFY_HANDLE ServerName, + [in, out] LPSERVER_ENUM_STRUCT InfoStruct, + [out] LPDWORD TotalEntries); + + /* Function 3 (BrowserrResetNetlogonState) */ + NET_API_STATUS + __stdcall + BrowserOpnum3NotUsedOnWire(void); + + /* Function 4 (BrowserrDebugTrace) */ + NET_API_STATUS + __stdcall + BrowserOpnum4NotUsedOnWire(void); + + /* Function 5 (BrowserrQueryStatistics) */ + NET_API_STATUS + __stdcall + BrowserOpnum5NotUsedOnWire(void); + + /* Function 6 (BrowserrResetStatistics) */ + NET_API_STATUS + __stdcall + BrowserOpnum6NotUsedOnWire(void); + + /* Function 7 (NetrBrowserStatisticsClear) */ + NET_API_STATUS + __stdcall + BrowserOpnum7NotUsedOnWire(void); + + /* Function 8 (NetrBrowserStatisticsGet) */ + NET_API_STATUS + __stdcall + BrowserOpnum8NotUsedOnWire(void); + + /* Function 9 (BrowserrSetNetlogonState) */ + NET_API_STATUS + __stdcall + BrowserOpnum9NotUsedOnWire(void); + + /* Function 10 (BrowserrQueryEmulatedDomains) */ + NET_API_STATUS + __stdcall + BrowserOpnum10NotUsedOnWire(void); + + /* Function 11 (BrowserrServerEnumEx) */ + NET_API_STATUS + __stdcall + BrowserOpnum11NotUsedOnWire(void); +} Propchange: trunk/reactos/sdk/include/reactos/idl/browser.idl ------------------------------------------------------------------------------ svn:eol-style = native
7 years, 6 months
1
0
0
0
[ekohl] 75034: [NETAPI32] Move the stubs NetServerEnum and NetServerEnumEx into a new file for the computer browser service interface code.
by ekohl@svn.reactos.org
Author: ekohl Date: Wed Jun 14 12:17:08 2017 New Revision: 75034 URL:
http://svn.reactos.org/svn/reactos?rev=75034&view=rev
Log: [NETAPI32] Move the stubs NetServerEnum and NetServerEnumEx into a new file for the computer browser service interface code. Added: trunk/reactos/dll/win32/netapi32/browser.c (with props) Modified: trunk/reactos/dll/win32/netapi32/CMakeLists.txt trunk/reactos/dll/win32/netapi32/netapi32.c Modified: trunk/reactos/dll/win32/netapi32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/CMakeLi…
============================================================================== --- trunk/reactos/dll/win32/netapi32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/CMakeLists.txt [iso-8859-1] Wed Jun 14 12:17:08 2017 @@ -14,6 +14,7 @@ list(APPEND SOURCE access.c apibuf.c + browser.c browsr.c ds.c dssetup.c Added: trunk/reactos/dll/win32/netapi32/browser.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/browser…
============================================================================== --- trunk/reactos/dll/win32/netapi32/browser.c (added) +++ trunk/reactos/dll/win32/netapi32/browser.c [iso-8859-1] Wed Jun 14 12:17:08 2017 @@ -0,0 +1,61 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: NetAPI DLL + * FILE: dll/win32/netapi32/browser.c + * PURPOSE: Computer Browser service interface code + * PROGRAMMERS: Eric Kohl (eric.kohl(a)reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include "netapi32.h" + +#include <rpc.h> + + +WINE_DEFAULT_DEBUG_CHANNEL(netapi32); + +/* FUNCTIONS *****************************************************************/ + +NET_API_STATUS +WINAPI +NetServerEnum( + LMCSTR servername, + DWORD level, + LPBYTE *bufptr, + DWORD prefmaxlen, + LPDWORD entriesread, + LPDWORD totalentries, + DWORD servertype, + LMCSTR domain, + LPDWORD resume_handle) +{ + FIXME("NetServerEnum(%s %lu %p %lu %p %p %lu %s %p)\n", + debugstr_w(servername), level, bufptr, prefmaxlen, entriesread, + totalentries, servertype, debugstr_w(domain), resume_handle); + + return ERROR_NO_BROWSER_SERVERS_FOUND; +} + + +NET_API_STATUS +WINAPI +NetServerEnumEx( + LMCSTR ServerName, + DWORD Level, + LPBYTE *Bufptr, + DWORD PrefMaxlen, + LPDWORD EntriesRead, + LPDWORD totalentries, + DWORD servertype, + LMCSTR domain, + LMCSTR FirstNameToReturn) +{ + FIXME("NetServerEnumEx(%s %lu %p %lu %p %p %lu %s %s)\n", + debugstr_w(ServerName), Level, Bufptr, PrefMaxlen, EntriesRead, totalentries, + servertype, debugstr_w(domain), debugstr_w(FirstNameToReturn)); + + return ERROR_NO_BROWSER_SERVERS_FOUND; +} + +/* EOF */ Propchange: trunk/reactos/dll/win32/netapi32/browser.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/win32/netapi32/netapi32.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/netapi3…
============================================================================== --- trunk/reactos/dll/win32/netapi32/netapi32.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/netapi32.c [iso-8859-1] Wed Jun 14 12:17:08 2017 @@ -39,49 +39,6 @@ } return TRUE; -} - -/************************************************************ - * NetServerEnum (NETAPI32.@) - */ -NET_API_STATUS WINAPI NetServerEnum( - LMCSTR servername, - DWORD level, - LPBYTE* bufptr, - DWORD prefmaxlen, - LPDWORD entriesread, - LPDWORD totalentries, - DWORD servertype, - LMCSTR domain, - LPDWORD resume_handle -) -{ - FIXME("Stub (%s %d %p %d %p %p %d %s %p)\n", debugstr_w(servername), - level, bufptr, prefmaxlen, entriesread, totalentries, servertype, - debugstr_w(domain), resume_handle); - - return ERROR_NO_BROWSER_SERVERS_FOUND; -} - -/************************************************************ - * NetServerEnumEx (NETAPI32.@) - */ -NET_API_STATUS WINAPI NetServerEnumEx( - LMCSTR ServerName, - DWORD Level, - LPBYTE *Bufptr, - DWORD PrefMaxlen, - LPDWORD EntriesRead, - LPDWORD totalentries, - DWORD servertype, - LMCSTR domain, - LMCSTR FirstNameToReturn) -{ - FIXME("Stub (%s %d %p %d %p %p %d %s %s)\n", - debugstr_w(ServerName), Level, Bufptr, PrefMaxlen, EntriesRead, totalentries, - servertype, debugstr_w(domain), debugstr_w(FirstNameToReturn)); - - return ERROR_NO_BROWSER_SERVERS_FOUND; } /************************************************************
7 years, 6 months
1
0
0
0
[ekohl] 75033: [NETAPI32] Implement NetGetJoinableOUs and NetValidateName. These functions call their counterparts in the workstation service.
by ekohl@svn.reactos.org
Author: ekohl Date: Wed Jun 14 11:31:54 2017 New Revision: 75033 URL:
http://svn.reactos.org/svn/reactos?rev=75033&view=rev
Log: [NETAPI32] Implement NetGetJoinableOUs and NetValidateName. These functions call their counterparts in the workstation service. Modified: trunk/reactos/dll/win32/netapi32/netapi32.spec trunk/reactos/dll/win32/netapi32/wksta_new.c Modified: trunk/reactos/dll/win32/netapi32/netapi32.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/netapi3…
============================================================================== --- trunk/reactos/dll/win32/netapi32/netapi32.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/netapi32.spec [iso-8859-1] Wed Jun 14 11:31:54 2017 @@ -151,7 +151,7 @@ @ stdcall NetGetDCName(wstr wstr ptr) @ stub NetGetDisplayInformationIndex @ stdcall NetGetJoinInformation(wstr ptr ptr) -@ stub NetGetJoinableOUs +@ stdcall NetGetJoinableOUs(wstr wstr wstr wstr ptr ptr) @ stdcall NetGroupAdd(wstr long ptr ptr) @ stdcall NetGroupAddUser(wstr wstr wstr) @ stdcall NetGroupDel(wstr wstr) @@ -250,7 +250,7 @@ @ stdcall NetUserModalsSet(wstr long ptr ptr) @ stdcall NetUserSetGroups(wstr wstr long ptr long) @ stdcall NetUserSetInfo(wstr wstr long ptr ptr) -@ stub NetValidateName +@ stdcall NetValidateName(wstr wstr wstr wstr long) @ stub NetValidatePasswordPolicy @ stub NetValidatePasswordPolicyFree @ stdcall NetWkstaGetInfo(wstr long ptr) Modified: trunk/reactos/dll/win32/netapi32/wksta_new.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/wksta_n…
============================================================================== --- trunk/reactos/dll/win32/netapi32/wksta_new.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/wksta_new.c [iso-8859-1] Wed Jun 14 11:31:54 2017 @@ -209,6 +209,48 @@ return status; } #endif + + +NET_API_STATUS +WINAPI +NetGetJoinableOUs( + _In_ LPCWSTR lpServer, + _In_ LPCWSTR lpDomain, + _In_ LPCWSTR lpAccount, + _In_ LPCWSTR lpPassword, + _Out_ DWORD *OUCount, + _Out_ LPWSTR **OUs) +{ + PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword; + handle_t BindingHandle; + NET_API_STATUS status; + + TRACE("NetGetJoinableOUs(%s %s %s %s %p %p)\n", + debugstr_w(lpServer), debugstr_w(lpDomain), debugstr_w(lpAccount), + debugstr_w(lpPassword), OUCount, OUs); + + /* FIXME */ + BindingHandle = NULL; + EncryptedPassword = NULL; + + RpcTryExcept + { + status = NetrGetJoinableOUs2(BindingHandle, + (PWSTR)lpServer, + (PWSTR)lpDomain, + (PWSTR)lpAccount, + EncryptedPassword, + OUCount, + OUs); + } + RpcExcept(EXCEPTION_EXECUTE_HANDLER) + { + status = I_RpcMapWin32Status(RpcExceptionCode()); + } + RpcEndExcept; + + return status; +} NET_API_STATUS @@ -541,6 +583,46 @@ break; } } + } + RpcExcept(EXCEPTION_EXECUTE_HANDLER) + { + status = I_RpcMapWin32Status(RpcExceptionCode()); + } + RpcEndExcept; + + return status; +} + + +NET_API_STATUS +WINAPI +NetValidateName( + _In_ LPCWSTR lpServer, + _In_ LPCWSTR lpName, + _In_ LPCWSTR lpAccount, + _In_ LPCWSTR lpPassword, + _In_ NETSETUP_NAME_TYPE NameType) +{ + PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword; + handle_t BindingHandle; + NET_API_STATUS status; + + TRACE("NetValidateName(%s %s %s %s %u)\n", + debugstr_w(lpServer), debugstr_w(lpName), debugstr_w(lpAccount), + debugstr_w(lpPassword), NameType); + + /* FIXME */ + BindingHandle = NULL; + EncryptedPassword = NULL; + + RpcTryExcept + { + status = NetrValidateName2(BindingHandle, + (PWSTR)lpServer, + (PWSTR)lpName, + (PWSTR)lpAccount, + EncryptedPassword, + NameType); } RpcExcept(EXCEPTION_EXECUTE_HANDLER) {
7 years, 6 months
1
0
0
0
[ekohl] 75032: [NETAPI32] Implement NetAddAlternateComputerName, NetJoinDomain, NetRemoveAlternateComputerName, NetRenameMachineInDomain, NetSetPrimaryComputerName and NetUnjoinDomain. These functi...
by ekohl@svn.reactos.org
Author: ekohl Date: Wed Jun 14 09:50:54 2017 New Revision: 75032 URL:
http://svn.reactos.org/svn/reactos?rev=75032&view=rev
Log: [NETAPI32] Implement NetAddAlternateComputerName, NetJoinDomain, NetRemoveAlternateComputerName, NetRenameMachineInDomain, NetSetPrimaryComputerName and NetUnjoinDomain. These functions call their counterparts in the workstation service. Modified: trunk/reactos/dll/win32/netapi32/netapi32.spec trunk/reactos/dll/win32/netapi32/wksta_new.c Modified: trunk/reactos/dll/win32/netapi32/netapi32.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/netapi3…
============================================================================== --- trunk/reactos/dll/win32/netapi32/netapi32.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/netapi32.spec [iso-8859-1] Wed Jun 14 09:50:54 2017 @@ -99,7 +99,7 @@ @ stub I_NetlogonComputeClientDigest @ stub I_NetlogonComputeServerDigest @ stub I_NetlogonGetTrustRid -@ stub NetAddAlternateComputerName +@ stdcall NetAddAlternateComputerName(wstr wstr wstr wstr long) @ stdcall NetAlertRaise(wstr ptr long) @ stdcall NetAlertRaiseEx(wstr ptr long wstr) @ stdcall NetApiBufferAllocate(long ptr) @@ -161,7 +161,7 @@ @ stdcall NetGroupGetUsers(wstr wstr long ptr long ptr ptr ptr) @ stdcall NetGroupSetInfo(wstr wstr long ptr ptr) @ stdcall NetGroupSetUsers(wstr wstr long ptr long) -@ stub NetJoinDomain +@ stdcall NetJoinDomain(wstr wstr wstr wstr wstr long) @ stdcall NetLocalGroupAdd(wstr long ptr ptr) @ stdcall NetLocalGroupAddMember(wstr wstr ptr) @ stdcall NetLocalGroupAddMembers(wstr wstr long ptr long) @@ -184,8 +184,8 @@ @ stub NetRegisterDomainNameChangeNotification @ stub NetRemoteComputerSupports @ stdcall NetRemoteTOD(wstr ptr) -@ stub NetRemoveAlternateComputerName -@ stub NetRenameMachineInDomain +@ stdcall NetRemoveAlternateComputerName(wstr wstr wstr wstr long) +@ stdcall NetRenameMachineInDomain(wstr wstr wstr wstr long) @ stub NetReplExportDirAdd @ stub NetReplExportDirDel @ stub NetReplExportDirEnum @@ -223,7 +223,7 @@ @ stdcall NetSessionDel(wstr wstr wstr) @ stdcall NetSessionEnum(wstr wstr wstr long ptr long ptr ptr ptr) @ stdcall NetSessionGetInfo(wstr wstr wstr long ptr) -@ stub NetSetPrimaryComputerName +@ stdcall NetSetPrimaryComputerName(wstr wstr wstr wstr long) @ stdcall NetShareAdd(wstr long ptr ptr) @ stdcall NetShareCheck(wstr wstr ptr) @ stdcall NetShareDel(wstr wstr long) @@ -233,7 +233,7 @@ @ stdcall NetShareGetInfo(wstr wstr long ptr) @ stdcall NetShareSetInfo(wstr wstr long ptr ptr) @ stdcall NetStatisticsGet(wstr wstr long long ptr) -@ stub NetUnjoinDomain +@ stdcall NetUnjoinDomain(wstr wstr wstr long) @ stub NetUnregisterDomainNameChangeNotification @ stdcall NetUseAdd(wstr long ptr ptr) @ stdcall NetUseDel(wstr wstr long) Modified: trunk/reactos/dll/win32/netapi32/wksta_new.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/wksta_n…
============================================================================== --- trunk/reactos/dll/win32/netapi32/wksta_new.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/wksta_new.c [iso-8859-1] Wed Jun 14 09:50:54 2017 @@ -138,9 +138,49 @@ } +NET_API_STATUS +WINAPI +NetAddAlternateComputerName( + _In_opt_ LPCWSTR Server, + _In_ LPCWSTR AlternateName, + _In_opt_ LPCWSTR DomainAccount, + _In_opt_ LPCWSTR DomainAccountPassword, + _In_ ULONG Reserved) +{ + PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword; + handle_t BindingHandle; + NET_API_STATUS status; + + TRACE("NetAddAlternateComputerName(%s %s %s %s 0x%lx)\n", + debugstr_w(Server), debugstr_w(AlternateName), debugstr_w(DomainAccount), + debugstr_w(DomainAccountPassword), Reserved); + + /* FIXME */ + BindingHandle = NULL; + EncryptedPassword = NULL; + + RpcTryExcept + { + status = NetrAddAlternateComputerName(BindingHandle, + (PWSTR)Server, + (PWSTR)AlternateName, + (PWSTR)DomainAccount, + EncryptedPassword, + Reserved); + } + RpcExcept(EXCEPTION_EXECUTE_HANDLER) + { + status = I_RpcMapWin32Status(RpcExceptionCode()); + } + RpcEndExcept; + + return status; +} + + #if 0 NET_API_STATUS -NET_API_FUNCTION +WINAPI NetGetJoinInformation( LPCWSTR Server, LPWSTR *Name, @@ -169,6 +209,206 @@ return status; } #endif + + +NET_API_STATUS +WINAPI +NetJoinDomain( + _In_ LPCWSTR lpServer, + _In_ LPCWSTR lpDomain, + _In_ LPCWSTR lpAccountOU, + _In_ LPCWSTR lpAccount, + _In_ LPCWSTR lpPassword, + _In_ DWORD fJoinOptions) +{ + PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword; + handle_t BindingHandle; + NET_API_STATUS status; + + TRACE("NetJoinDomain(%s %s %s %s 0x%lx)\n", + debugstr_w(lpServer), debugstr_w(lpDomain), debugstr_w(lpAccountOU), + debugstr_w(lpAccount), debugstr_w(lpPassword), fJoinOptions); + + /* FIXME */ + BindingHandle = NULL; + EncryptedPassword = NULL; + + RpcTryExcept + { + status = NetrJoinDomain2(BindingHandle, + (PWSTR)lpServer, + (PWSTR)lpDomain, + (PWSTR)lpAccountOU, + (PWSTR)lpAccount, + EncryptedPassword, + fJoinOptions); + } + RpcExcept(EXCEPTION_EXECUTE_HANDLER) + { + status = I_RpcMapWin32Status(RpcExceptionCode()); + } + RpcEndExcept; + + return status; +} + + +NET_API_STATUS +WINAPI +NetRemoveAlternateComputerName( + _In_opt_ LPCWSTR Server, + _In_ LPCWSTR AlternateName, + _In_opt_ LPCWSTR DomainAccount, + _In_opt_ LPCWSTR DomainAccountPassword, + _In_ ULONG Reserved) +{ + PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword; + handle_t BindingHandle; + NET_API_STATUS status; + + TRACE("NetRemoveAlternateComputerName(%s %s %s %s 0x%lx)\n", + debugstr_w(Server), debugstr_w(AlternateName), debugstr_w(DomainAccount), + debugstr_w(DomainAccountPassword), Reserved); + + /* FIXME */ + BindingHandle = NULL; + EncryptedPassword = NULL; + + RpcTryExcept + { + status = NetrRemoveAlternateComputerName(BindingHandle, + (PWSTR)Server, + (PWSTR)AlternateName, + (PWSTR)DomainAccount, + EncryptedPassword, + Reserved); + } + RpcExcept(EXCEPTION_EXECUTE_HANDLER) + { + status = I_RpcMapWin32Status(RpcExceptionCode()); + } + RpcEndExcept; + + return status; +} + + +NET_API_STATUS +WINAPI +NetRenameMachineInDomain( + _In_ LPCWSTR lpServer, + _In_ LPCWSTR lpNewMachineName, + _In_ LPCWSTR lpAccount, + _In_ LPCWSTR lpPassword, + _In_ DWORD fRenameOptions) +{ + PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword; + handle_t BindingHandle; + NET_API_STATUS status; + + TRACE("NetRenameMachineInDomain(%s %s %s %s 0x%lx)\n", + debugstr_w(lpServer), debugstr_w(lpNewMachineName), debugstr_w(lpAccount), + debugstr_w(lpPassword), fRenameOptions); + + /* FIXME */ + BindingHandle = NULL; + EncryptedPassword = NULL; + + RpcTryExcept + { + status = NetrRenameMachineInDomain2(BindingHandle, + (PWSTR)lpServer, + (PWSTR)lpNewMachineName, + (PWSTR)lpAccount, + EncryptedPassword, + fRenameOptions); + } + RpcExcept(EXCEPTION_EXECUTE_HANDLER) + { + status = I_RpcMapWin32Status(RpcExceptionCode()); + } + RpcEndExcept; + + return status; +} + + +NET_API_STATUS +WINAPI +NetSetPrimaryComputerName( + _In_opt_ LPCWSTR Server, + _In_ LPCWSTR PrimaryName, + _In_opt_ LPCWSTR DomainAccount, + _In_opt_ LPCWSTR DomainAccountPassword, + _In_ ULONG Reserved) +{ + PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword; + handle_t BindingHandle; + NET_API_STATUS status; + + TRACE("NetSetPrimaryComputerName(%s %s %s %s %lu)\n", + debugstr_w(Server), debugstr_w(PrimaryName), debugstr_w(DomainAccount), + debugstr_w(DomainAccountPassword), Reserved); + + /* FIXME */ + BindingHandle = NULL; + EncryptedPassword = NULL; + + RpcTryExcept + { + status = NetrSetPrimaryComputerName(BindingHandle, + (PWSTR)Server, + (PWSTR)PrimaryName, + (PWSTR)DomainAccount, + EncryptedPassword, + Reserved); + } + RpcExcept(EXCEPTION_EXECUTE_HANDLER) + { + status = I_RpcMapWin32Status(RpcExceptionCode()); + } + RpcEndExcept; + + return status; +} + + +NET_API_STATUS +WINAPI +NetUnjoinDomain( + _In_ LPCWSTR lpServer, + _In_ LPCWSTR lpAccount, + _In_ LPCWSTR lpPassword, + _In_ DWORD fUnjoinOptions) +{ + PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword; + handle_t BindingHandle; + NET_API_STATUS status; + + TRACE("NetUnjoinDomain(%s %s %s %s 0x%lx)\n", + debugstr_w(lpServer), debugstr_w(lpAccount), + debugstr_w(lpPassword), fUnjoinOptions); + + /* FIXME */ + BindingHandle = NULL; + EncryptedPassword = NULL; + + RpcTryExcept + { + status = NetrUnjoinDomain2(BindingHandle, + (PWSTR)lpServer, + (PWSTR)lpAccount, + EncryptedPassword, + fUnjoinOptions); + } + RpcExcept(EXCEPTION_EXECUTE_HANDLER) + { + status = I_RpcMapWin32Status(RpcExceptionCode()); + } + RpcEndExcept; + + return status; +} NET_API_STATUS
7 years, 6 months
1
0
0
0
← Newer
1
...
19
20
21
22
23
24
25
...
53
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Results per page:
10
25
50
100
200