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
[tthompson] 75191: [NTFS] - Fix a mistake with AddFileName() from my last commit. Also, move CaseSensitive parameter before output parameters in the parameter list of several functions.
by tthompson@svn.reactos.org
Author: tthompson Date: Sun Jun 25 02:38:15 2017 New Revision: 75191 URL:
http://svn.reactos.org/svn/reactos?rev=75191&view=rev
Log: [NTFS] - Fix a mistake with AddFileName() from my last commit. Also, move CaseSensitive parameter before output parameters in the parameter list of several functions. Modified: branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/attrib.c branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/create.c branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/fcb.c branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/mft.c branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/ntfs.h Modified: branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/attrib.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2016/NTFS/drivers/filesyst…
============================================================================== --- branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/attrib.c [iso-8859-1] (original) +++ branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/attrib.c [iso-8859-1] Sun Jun 25 02:38:15 2017 @@ -112,12 +112,12 @@ * Pointer to the FILE_OBJECT which represents the new name. * This parameter is used to determine the filename and parent directory. * -* @param ParentMftIndex -* Pointer to a ULONGLONG which will receive the index of the parent directory. -* * @param CaseSensitive * Boolean indicating if the function should operate in case-sensitive mode. This will be TRUE * if an application opened the file with the FILE_FLAG_POSIX_SEMANTICS flag. +* +* @param ParentMftIndex +* Pointer to a ULONGLONG which will receive the index of the parent directory. * * @return * STATUS_SUCCESS on success. STATUS_NOT_IMPLEMENTED if target address isn't at the end @@ -136,8 +136,8 @@ PNTFS_ATTR_RECORD AttributeAddress, PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject, - PULONGLONG ParentMftIndex, - BOOLEAN CaseSensitive) + BOOLEAN CaseSensitive, + PULONGLONG ParentMftIndex) { ULONG ResidentHeaderLength = FIELD_OFFSET(NTFS_ATTR_RECORD, Resident.Reserved) + sizeof(UCHAR); PFILENAME_ATTRIBUTE FileNameAttribute; Modified: branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/create.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2016/NTFS/drivers/filesyst…
============================================================================== --- branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/create.c [iso-8859-1] (original) +++ branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/create.c [iso-8859-1] Sun Jun 25 02:38:15 2017 @@ -570,7 +570,10 @@ } // Create the file record on disk - Status = NtfsCreateFileRecord(DeviceExt, FileObject, BooleanFlagOn(IrpContext->Flags, IRPCONTEXT_CANWAIT)); + Status = NtfsCreateFileRecord(DeviceExt, + FileObject, + (Stack->Flags & SL_CASE_SENSITIVE), + BooleanFlagOn(IrpContext->Flags,IRPCONTEXT_CANWAIT)); if (!NT_SUCCESS(Status)) { DPRINT1("ERROR: Couldn't create file record!\n"); @@ -656,6 +659,7 @@ NTSTATUS NtfsCreateFileRecord(PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject, + BOOLEAN CaseSensitive, BOOLEAN CanWait) { NTSTATUS Status = STATUS_SUCCESS; @@ -665,7 +669,11 @@ ULONGLONG ParentMftIndex; ULONGLONG FileMftIndex; - DPRINT1("NtfsCreateFileRecord(%p, %p, %s)\n", DeviceExt, FileObject, CanWait ? "TRUE" : "FALSE"); + DPRINT1("NtfsCreateFileRecord(%p, %p, %s, %s)\n", + DeviceExt, + FileObject, + CaseSensitive ? "TRUE" : "FALSE", + CanWait ? "TRUE" : "FALSE"); // allocate memory for file record FileRecord = ExAllocatePoolWithTag(NonPagedPool, @@ -709,7 +717,7 @@ NextAttribute = (PNTFS_ATTR_RECORD)((ULONG_PTR)NextAttribute + (ULONG_PTR)NextAttribute->Length); // Add the $FILE_NAME attribute - AddFileName(FileRecord, NextAttribute, DeviceExt, FileObject, &ParentMftIndex); + AddFileName(FileRecord, NextAttribute, DeviceExt, FileObject, CaseSensitive, &ParentMftIndex); // save a pointer to the filename attribute FilenameAttribute = (PFILENAME_ATTRIBUTE)((ULONG_PTR)NextAttribute + NextAttribute->Resident.ValueOffset); Modified: branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/fcb.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2016/NTFS/drivers/filesyst…
============================================================================== --- branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/fcb.c [iso-8859-1] (original) +++ branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/fcb.c [iso-8859-1] Sun Jun 25 02:38:15 2017 @@ -557,7 +557,7 @@ DPRINT1("Will now look for file '%wZ' with stream '%S'\n", &File, Colon); } - Status = NtfsLookupFileAt(Vcb, &File, &FileRecord, &MFTIndex, CurrentDir, CaseSensitive); + Status = NtfsLookupFileAt(Vcb, &File, CaseSensitive, &FileRecord, &MFTIndex, CurrentDir); if (!NT_SUCCESS(Status)) { return Status; Modified: branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/mft.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2016/NTFS/drivers/filesyst…
============================================================================== --- branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/mft.c [iso-8859-1] (original) +++ branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/mft.c [iso-8859-1] Sun Jun 25 02:38:15 2017 @@ -2106,16 +2106,22 @@ NTSTATUS NtfsLookupFileAt(PDEVICE_EXTENSION Vcb, PUNICODE_STRING PathName, + BOOLEAN CaseSensitive, PFILE_RECORD_HEADER *FileRecord, PULONGLONG MFTIndex, - ULONGLONG CurrentMFTIndex, - BOOLEAN CaseSensitive) + ULONGLONG CurrentMFTIndex) { UNICODE_STRING Current, Remaining; NTSTATUS Status; ULONG FirstEntry = 0; - DPRINT("NtfsLookupFileAt(%p, %wZ, %p, %I64x)\n", Vcb, PathName, FileRecord, CurrentMFTIndex); + DPRINT("NtfsLookupFileAt(%p, %wZ, %s, %p, %p, %I64x)\n", + Vcb, + PathName, + CaseSensitive ? "TRUE" : "FALSE", + FileRecord, + MFTIndex, + CurrentMFTIndex); FsRtlDissectName(*PathName, &Current, &Remaining); @@ -2158,11 +2164,11 @@ NTSTATUS NtfsLookupFile(PDEVICE_EXTENSION Vcb, PUNICODE_STRING PathName, + BOOLEAN CaseSensitive, PFILE_RECORD_HEADER *FileRecord, - PULONGLONG MFTIndex, - BOOLEAN CaseSensitive) -{ - return NtfsLookupFileAt(Vcb, PathName, FileRecord, MFTIndex, NTFS_FILE_ROOT, CaseSensitive); + PULONGLONG MFTIndex) +{ + return NtfsLookupFileAt(Vcb, PathName, CaseSensitive, FileRecord, MFTIndex, NTFS_FILE_ROOT); } /** Modified: branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/ntfs.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2016/NTFS/drivers/filesyst…
============================================================================== --- branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] (original) +++ branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] Sun Jun 25 02:38:15 2017 @@ -536,6 +536,7 @@ PNTFS_ATTR_RECORD AttributeAddress, PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject, + BOOLEAN CaseSensitive, PULONGLONG ParentMftIndex); NTSTATUS @@ -668,6 +669,7 @@ NTSTATUS NtfsCreateFileRecord(PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject, + BOOLEAN CaseSensitive, BOOLEAN CanWait); /* devctl.c */ @@ -970,16 +972,17 @@ NTSTATUS NtfsLookupFile(PDEVICE_EXTENSION Vcb, PUNICODE_STRING PathName, + BOOLEAN CaseSensitive, PFILE_RECORD_HEADER *FileRecord, PULONGLONG MFTIndex); NTSTATUS NtfsLookupFileAt(PDEVICE_EXTENSION Vcb, PUNICODE_STRING PathName, + BOOLEAN CaseSensitive, PFILE_RECORD_HEADER *FileRecord, PULONGLONG MFTIndex, - ULONGLONG CurrentMFTIndex, - BOOLEAN CaseSensitive); + ULONGLONG CurrentMFTIndex); VOID NtfsDumpFileRecord(PDEVICE_EXTENSION Vcb,
7 years, 6 months
1
0
0
0
[ashaposhnikov] 75190: [RAPPS] * available.cpp: Replaced macros with inline functions. * gui.cpp: Fixed typo.
by ashaposhnikov@svn.reactos.org
Author: ashaposhnikov Date: Sun Jun 25 01:09:00 2017 New Revision: 75190 URL:
http://svn.reactos.org/svn/reactos?rev=75190&view=rev
Log: [RAPPS] * available.cpp: Replaced macros with inline functions. * gui.cpp: Fixed typo. Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/available.cpp branches/GSoC_2017/rapps/reactos/base/applications/rapps/gui.cpp Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/available.cpp URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
============================================================================== --- branches/GSoC_2017/rapps/reactos/base/applications/rapps/available.cpp [iso-8859-1] (original) +++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/available.cpp [iso-8859-1] Sun Jun 25 01:09:00 2017 @@ -9,37 +9,52 @@ #include "rapps.h" -#define ADD_TEXT(a, b, c, d) \ - if (b[0] != '\0') \ - { \ - LoadStringW(hInst, a, szText, _countof(szText)); \ - InsertRichEditText(szText, c); \ - InsertRichEditText(b, d); \ - } \ - -#define ADD_TEXT_NEWL(a, b) \ - LoadStringW(hInst, a, szText, _countof(szText)); \ - InsertRichEditText(L"\n", 0); \ - InsertRichEditText(szText, b); \ - InsertRichEditText(L"\n", 0); - -#define GET_STRING1(a, b) \ - if (!ParserGetString(a, b, _countof(b), FindFileData.cFileName)) \ - continue; - -#define GET_STRING2(a, b) \ - if (!ParserGetString(a, b, _countof(b), FindFileData.cFileName)) \ - b[0] = '\0'; + +template<typename T, size_t N, size_t N2> +inline void _AddText(T (&szText)[N], UINT a, T (&b)[N2], DWORD c, DWORD d) { + if (b[0] != '\0') + { + LoadStringW(hInst, a, szText, N); + InsertRichEditText(szText, c); + InsertRichEditText(b, d); + } +} + +template<typename T, size_t N> +inline void _AddTextNewl(T (&szText)[N], UINT a, DWORD b) { + LoadStringW(hInst, a, szText, N); + InsertRichEditText(L"\n", 0); + InsertRichEditText(szText, b); + InsertRichEditText(L"\n", 0); +} + +template<typename T, size_t N, size_t N2> +inline BOOL _GetString(LPCWSTR a, T(&b)[N], T (&cFileName)[N2]) { + return ParserGetString(a, b, N, cFileName); +} + +template<typename T, size_t N, size_t N2> +inline void _GetStringNullFailure(LPCWSTR a, T(&b)[N], T (&cFileName)[N2]) { + if (!_GetString(a, b, cFileName)) { + b[0] = '\0'; + } +} //App is "installed" if the RegName is in the registry -#define APP_INSTALL_CHECK_K(Info, key) \ - (*Info->szRegName && (IsInstalledApplicationEx(Info->szRegName, FALSE, key) \ - || IsInstalledApplicationEx(Info->szRegName, TRUE, key))) +inline bool _AppInstallCheckKey(PAPPLICATION_INFO Info, REGSAM key) { + return *Info->szRegName + && (IsInstalledApplicationEx(Info->szRegName, TRUE, key) + || IsInstalledApplicationEx(Info->szRegName, FALSE, key)); +} + //Check both registry keys in 64bit system //TODO: check system type beforehand to avoid double checks? -#define APP_INSTALL_CHECK(Info) \ - (APP_INSTALL_CHECK_K(Info, KEY_WOW64_32KEY) || APP_INSTALL_CHECK_K(Info, KEY_WOW64_64KEY)) +inline bool _AppInstallCheck(PAPPLICATION_INFO Info) { + return _AppInstallCheckKey(Info, KEY_WOW64_32KEY) + || _AppInstallCheckKey(Info, KEY_WOW64_64KEY); +} + LIST_ENTRY CachedEntriesHead = { &CachedEntriesHead, &CachedEntriesHead }; PLIST_ENTRY pCachedEntry = &CachedEntriesHead; @@ -53,20 +68,20 @@ if (!Info) return FALSE; NewRichEditText(Info->szName, CFE_BOLD); - if (APP_INSTALL_CHECK(Info)) - { - ADD_TEXT_NEWL(IDS_STATUS_INSTALLED, CFE_ITALIC); + if (_AppInstallCheck(Info)) + { + _AddTextNewl(szText, IDS_STATUS_INSTALLED, CFE_ITALIC); } else { - ADD_TEXT_NEWL(IDS_STATUS_NOTINSTALLED, CFE_ITALIC); - } - - ADD_TEXT(IDS_AINFO_VERSION, Info->szVersion, CFE_BOLD, 0); - ADD_TEXT(IDS_AINFO_LICENSE, Info->szLicense, CFE_BOLD, 0); - ADD_TEXT(IDS_AINFO_SIZE, Info->szSize, CFE_BOLD, 0); - ADD_TEXT(IDS_AINFO_URLSITE, Info->szUrlSite, CFE_BOLD, CFE_LINK); - ADD_TEXT(IDS_AINFO_DESCRIPTION, Info->szDesc, CFE_BOLD, 0); - ADD_TEXT(IDS_AINFO_URLDOWNLOAD, Info->szUrlDownload, CFE_BOLD, CFE_LINK); + _AddTextNewl(szText, IDS_STATUS_NOTINSTALLED, CFE_ITALIC); + } + + _AddText(szText, IDS_AINFO_VERSION, Info->szVersion, CFE_BOLD, 0); + _AddText(szText, IDS_AINFO_LICENSE, Info->szLicense, CFE_BOLD, 0); + _AddText(szText, IDS_AINFO_SIZE, Info->szSize, CFE_BOLD, 0); + _AddText(szText, IDS_AINFO_URLSITE, Info->szUrlSite, CFE_BOLD, CFE_LINK); + _AddText(szText, IDS_AINFO_DESCRIPTION, Info->szDesc, CFE_BOLD, 0); + _AddText(szText, IDS_AINFO_URLDOWNLOAD, Info->szUrlDownload, CFE_BOLD, CFE_LINK); return TRUE; } @@ -272,17 +287,20 @@ if (Info->szUrlDownload[0] == 0) { - GET_STRING1(L"Name", Info->szName); - GET_STRING1(L"URLDownload", Info->szUrlDownload); - - GET_STRING2(L"RegName", Info->szRegName); - GET_STRING2(L"Version", Info->szVersion); - GET_STRING2(L"License", Info->szLicense); - GET_STRING2(L"Description", Info->szDesc); - GET_STRING2(L"Size", Info->szSize); - GET_STRING2(L"URLSite", Info->szUrlSite); - GET_STRING2(L"CDPath", Info->szCDPath); - GET_STRING2(L"SHA1", Info->szSHA1); + if (!_GetString(L"Name", Info->szName, FindFileData.cFileName) + || !_GetString(L"URLDownload", Info->szUrlDownload, FindFileData.cFileName)) + { + continue; + } + + _GetStringNullFailure(L"RegName", Info->szRegName, FindFileData.cFileName); + _GetStringNullFailure(L"Version", Info->szVersion, FindFileData.cFileName); + _GetStringNullFailure(L"License", Info->szLicense, FindFileData.cFileName); + _GetStringNullFailure(L"Description", Info->szDesc, FindFileData.cFileName); + _GetStringNullFailure(L"Size", Info->szSize, FindFileData.cFileName); + _GetStringNullFailure(L"URLSite", Info->szUrlSite, FindFileData.cFileName); + _GetStringNullFailure(L"CDPath", Info->szCDPath, FindFileData.cFileName); + _GetStringNullFailure(L"SHA1", Info->szSHA1, FindFileData.cFileName); } if (!lpEnumProc(Info)) Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/gui.cpp URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
============================================================================== --- branches/GSoC_2017/rapps/reactos/base/applications/rapps/gui.cpp [iso-8859-1] (original) +++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/gui.cpp [iso-8859-1] Sun Jun 25 01:09:00 2017 @@ -1182,7 +1182,7 @@ hImageListView = ImageList_Create(LISTVIEW_ICON_SIZE, LISTVIEW_ICON_SIZE, GetSystemColorDepth() | ILC_MASK, - 0, 1000); + 0, 1); hImageListView = ListView_SetImageList(hListView, hImageListView, LVSIL_SMALL); if (hImageListView)
7 years, 6 months
1
0
0
0
[sgasiorek] 75189: - update EDD_DIRECTDRAW_LOCAL, EDD_SURFACE and EDD_DIRECTDRAW_GLOBAL structures - initial implementation of DxDdCreateD3DBuffer and DxDdCreateSurfaceObject CORE-4490
by sgasiorek@svn.reactos.org
Author: sgasiorek Date: Sat Jun 24 22:24:04 2017 New Revision: 75189 URL:
http://svn.reactos.org/svn/reactos?rev=75189&view=rev
Log: - update EDD_DIRECTDRAW_LOCAL, EDD_SURFACE and EDD_DIRECTDRAW_GLOBAL structures - initial implementation of DxDdCreateD3DBuffer and DxDdCreateSurfaceObject CORE-4490 Modified: trunk/reactos/sdk/include/reactos/drivers/directx/directxint.h trunk/reactos/win32ss/reactx/dxg/d3d.c trunk/reactos/win32ss/reactx/dxg/ddraw.c trunk/reactos/win32ss/reactx/dxg/dxg_driver.h trunk/reactos/win32ss/reactx/dxg/dxg_int.h trunk/reactos/win32ss/reactx/dxg/tags.h Modified: trunk/reactos/sdk/include/reactos/drivers/directx/directxint.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/reactos/driver…
============================================================================== --- trunk/reactos/sdk/include/reactos/drivers/directx/directxint.h [iso-8859-1] (original) +++ trunk/reactos/sdk/include/reactos/drivers/directx/directxint.h [iso-8859-1] Sat Jun 24 22:24:04 2017 @@ -15,9 +15,9 @@ // /* 0x00 */ DD_BASEOBJECT pobj; // verified to match Windows XP /* 0x10 */ struct _EDD_DIRECTDRAW_GLOBAL * peDirectDrawGlobal; // verified to match Windows XP -/* 0x14 */ struct _EDD_SURFACE * peSurface_DdList; -/* 0x18 */ ULONG unk_018; -/* 0x1C */ ULONG unk_01c; +/* 0x14 */ ULONG hRefCount; +/* 0x18 */ struct _EDD_SURFACE * peSurface_DdList; +/* 0x1C */ ULONG hSurface; /* 0x20 */ ULONG unk_020; /* 0x24 */ struct _EDD_DIRECTDRAW_GLOBAL * peDirectDrawGlobal2; // verified to match Windows XP /* 0x28 */ FLATPTR fpProcess; @@ -26,9 +26,9 @@ // points to the old DDLocal when new handle is created. /* 0x34 */ FLATPTR fpProcess2; // surface memory address returned by graphic driver /* 0x38 */ ULONG isMemoryMapped; // surface memory mapped? -/* 0x3C */ HANDLE UniqueProcess; +/* 0x3C */ HANDLE hCreatorProcess; /* 0x40 */ PEPROCESS Process; -/* 0x44 */ VOID *unk_044; +/* 0x44 */ VOID *heapList; /* 0x48 */ ULONG unk_048; /* 0x4C */ ULONG unk_04C; /* 0x50 */ ULONG unk_050; @@ -68,12 +68,8 @@ // Private Direct Draw Data // struct _EDD_DIRECTDRAW_GLOBAL* peDirectDrawGlobal; + struct _EDD_DIRECTDRAW_GLOBAL* peDirectDrawGlobalNext; struct _EDD_DIRECTDRAW_LOCAL* peDirectDrawLocal; - - // - // Flags - // - FLONG fl; // // Surface Attributes @@ -84,17 +80,23 @@ HANDLE hSecure; HANDLE hdc; HBITMAP hbmGdi; - - // - // Unknown - // - ULONG field_E8; + HANDLE hGdiSurface; // // Surface Lock // RECTL rclLock; - ULONG field_FC[2]; + ULONG field_FC; + ULONG field_100; + ULONG field_104; + ULONG field_108; + ULONG field_10C; + + ULONG ldev; + struct _EDD_DIRECTDRAW_GLOBAL* peDirectDrawGlobal3; + ULONG gdev; + ULONG wWidth; + ULONG wHeight; } EDD_SURFACE, *PEDD_SURFACE; @@ -118,7 +120,9 @@ /* 0x000 */ PVOID dhpdev; // 0x000 <-- verified to match Windows XP, dhpdev, the drv hPDev --> /* 0x004 */ DWORD dwReserved1; /* 0x008 */ DWORD dwReserved2; -/* 0x00C */ ULONG unk_000c[3]; +/* 0x00C */ LPDDVIDEOPORTCAPS lpDDVideoPortCaps; // 0x00C <-- verified to match Win2k3 +/* 0x010 */ ULONG unk_010; +/* 0x014 */ ULONG unk_014; /* 0x018 */ LONG cDriverReferences; /* 0x01C */ ULONG unk_01c; /* 0x020 */ DWORD dwCallbackFlags; /* 0x020 <-- verified to match Windows XP, dwCallbackFlags Modified: trunk/reactos/win32ss/reactx/dxg/d3d.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/reactx/dxg/d3d.c?r…
============================================================================== --- trunk/reactos/win32ss/reactx/dxg/d3d.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/reactx/dxg/d3d.c [iso-8859-1] Sat Jun 24 22:24:04 2017 @@ -37,3 +37,89 @@ return RetVal; } + +DWORD +FASTCALL +intDdCreateSurfaceOrBuffer(HANDLE hDirectDrawLocal, + PEDD_SURFACE pDdSurfList, DDSURFACEDESC2 *a3, + DD_SURFACE_GLOBAL *pDdSurfGlob, + DD_SURFACE_LOCAL *pDdSurfLoc, + DD_SURFACE_MORE *pDdSurfMore, + DD_CREATESURFACEDATA *pDdCreateSurfaceData, + PVOID Address) +{ + PEDD_DIRECTDRAW_LOCAL peDdL = NULL; + PEDD_DIRECTDRAW_GLOBAL peDdGl = NULL; + DD_SURFACE_LOCAL *pCurSurfLocal; + DD_SURFACE_GLOBAL *pCurSurfGlobal; + DD_SURFACE_MORE *pCurSurfMore; + PEDD_SURFACE pCurSurf; + + ULONG CurSurf; + + if (!pDdCreateSurfaceData) + return FALSE; + + if (!pDdCreateSurfaceData->dwSCnt) + { + pDdCreateSurfaceData->ddRVal = E_FAIL; + return FALSE; + } + + peDdL = (PEDD_DIRECTDRAW_LOCAL)DdHmgLock(hDirectDrawLocal, ObjType_DDLOCAL_TYPE, FALSE); + if (!peDdL) + return FALSE; + + peDdGl = peDdL->peDirectDrawGlobal2; + + if (!(pDdSurfLoc->ddsCaps.dwCaps & DDSCAPS_VISIBLE) && !(peDdGl->ddCallbacks.dwFlags & DDHAL_CB32_CREATESURFACE)) + { + pDdCreateSurfaceData->ddRVal = E_FAIL; + return FALSE; + } + + pDdSurfList = (PEDD_SURFACE)EngAllocMem(FL_ZERO_MEMORY, pDdCreateSurfaceData->dwSCnt * sizeof(EDD_SURFACE), TAG_GDDP); + pDdSurfGlob = (DD_SURFACE_GLOBAL *)EngAllocMem(FL_ZERO_MEMORY, pDdCreateSurfaceData->dwSCnt * sizeof(DD_SURFACE_GLOBAL), TAG_GDDP); + pDdSurfLoc = (DD_SURFACE_LOCAL *)EngAllocMem(FL_ZERO_MEMORY, pDdCreateSurfaceData->dwSCnt * sizeof(DD_SURFACE_LOCAL), TAG_GDDP); + pDdSurfMore = (DD_SURFACE_MORE *)EngAllocMem(FL_ZERO_MEMORY, pDdCreateSurfaceData->dwSCnt * sizeof(DD_SURFACE_MORE), TAG_GDDP); + + gpEngFuncs.DxEngLockShareSem(); + gpEngFuncs.DxEngLockHdev(peDdGl->hDev); + + // create all surface objects + for (CurSurf = 0; CurSurf < pDdCreateSurfaceData->dwSCnt; CurSurf++) + { + pCurSurf = &pDdSurfList[CurSurf]; + pCurSurfLocal = &pDdSurfLoc[CurSurf]; + pCurSurfGlobal = &pDdSurfGlob[CurSurf]; + pCurSurfMore = &pDdSurfMore[CurSurf]; + + pCurSurf = intDdCreateNewSurfaceObject( + peDdL, + pCurSurf, + pCurSurfGlobal, + pCurSurfLocal, + pCurSurfMore); + Address = pCurSurf; + } + + gpEngFuncs.DxEngUnlockHdev(peDdGl->hDev); + gpEngFuncs.DxEngUnlockShareSem(); + + return DDHAL_DRIVER_HANDLED; +} + +DWORD +NTAPI +DxDdCreateD3DBuffer( + HANDLE hDirectDrawLocal, + PEDD_SURFACE pDdSurfList, + DDSURFACEDESC2 *a3, + DD_SURFACE_GLOBAL *pDdSurfGlob, + DD_SURFACE_LOCAL *pDdSurfLoc, + DD_SURFACE_MORE *pDdSurfMore, + DD_CREATESURFACEDATA *pDdCreateSurfaceData, + PVOID Address) +{ + return intDdCreateSurfaceOrBuffer(hDirectDrawLocal, pDdSurfList, a3, pDdSurfGlob, pDdSurfLoc, pDdSurfMore, pDdCreateSurfaceData, Address); +} Modified: trunk/reactos/win32ss/reactx/dxg/ddraw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/reactx/dxg/ddraw.c…
============================================================================== --- trunk/reactos/win32ss/reactx/dxg/ddraw.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/reactx/dxg/ddraw.c [iso-8859-1] Sat Jun 24 22:24:04 2017 @@ -223,7 +223,7 @@ /* initialize DIRECTDRAW_LOCAL */ peDdL->peDirectDrawLocal_prev = peDdGl->peDirectDrawLocalList; - peDdL->UniqueProcess = PsGetCurrentThreadProcessId(); + peDdL->hCreatorProcess = PsGetCurrentThreadProcessId(); peDdL->Process = PsGetCurrentProcess(); // link DirectDrawGlobal and DirectDrawLocal @@ -233,7 +233,7 @@ gpEngFuncs.DxEngReferenceHdev(hDev); - InterlockedExchangeAdd((LONG*)&peDdL->pobj.cExclusiveLock, 0xFFFFFFFF); + InterlockedDecrement((VOID*)&peDdL->pobj.cExclusiveLock); return peDdL->pobj.hHmgr; } @@ -331,7 +331,7 @@ } if (InlineIsEqualGUID(&drvInfoData->guidInfo, &GUID_VideoPortCaps)) { - pInfo = (VOID*)peDdGl->unk_000c[0]; + pInfo = (VOID*)peDdGl->lpDDVideoPortCaps; dwInfoSize = 72 * peDdGl->ddHalInfo.ddCaps.dwMaxVideoPorts; } if (InlineIsEqualGUID(&drvInfoData->guidInfo, &GUID_D3DCallbacks3)) @@ -462,13 +462,13 @@ *(DWORD*)((ULONG)pCallBackFlags + 8) = peDdGl->ddPaletteCallbacks.dwFlags; } - if ( pd3dNtHalCallbacks ) + if (pd3dNtHalCallbacks) memcpy(pd3dNtHalCallbacks, &peDdGl->d3dNtHalCallbacks, sizeof(peDdGl->d3dNtHalCallbacks)); - if ( pd3dNtGlobalDriverData ) + if (pd3dNtGlobalDriverData) memcpy(pd3dNtGlobalDriverData, &peDdGl->d3dNtGlobalDriverData, sizeof(peDdGl->d3dNtGlobalDriverData)); - if ( pd3dBufCallbacks ) + if (pd3dBufCallbacks) memcpy(pd3dBufCallbacks, &peDdGl->d3dBufCallbacks, sizeof(peDdGl->d3dBufCallbacks)); if (pTextureFormats) @@ -581,3 +581,95 @@ return RetVal; } + +PEDD_SURFACE +NTAPI +intDdCreateNewSurfaceObject(PEDD_DIRECTDRAW_LOCAL peDdL, HANDLE hDirectDrawLocal, PDD_SURFACE_GLOBAL pDdSurfGlob, PDD_SURFACE_LOCAL pDdSurfLoc, PDD_SURFACE_MORE pDdSurfMore) +{ + PEDD_SURFACE pSurface = NULL; + + // first check if we can assign it from current ddHandle + if (hDirectDrawLocal) + { + pSurface = (PEDD_SURFACE)DdHmgLock(hDirectDrawLocal, ObjType_DDSURFACE_TYPE, FALSE); + // check if surface is locked and belongs to correct DirectDrawLocal + if ((pSurface)&&((pSurface->peDirectDrawLocal != peDdL)||(!pSurface->hSecure))) + { + InterlockedDecrement((VOID*)&peDdL->pobj.cExclusiveLock); + return NULL; + } + } + + // if surface not found from ddHandle or ddHandle not provided + if (!pSurface) + { + // create new surface object + pSurface = (PEDD_SURFACE)DdHmgAlloc(sizeof(EDD_SURFACE), ObjType_DDSURFACE_TYPE, TRUE); + if (pSurface) + { + pSurface->ddsSurfaceLocal.lpGbl = &pSurface->ddsSurfaceGlobal; + pSurface->ddsSurfaceLocal.lpSurfMore = &pSurface->ddsSurfaceMore; + pSurface->ddsSurfaceInt.lpLcl = &pSurface->ddsSurfaceLocal; + pSurface->peDirectDrawLocal = peDdL; + pSurface->peDirectDrawGlobalNext = peDdL->peDirectDrawGlobal2; + pSurface->ldev = gpEngFuncs.DxEngGetHdevData(pSurface->peDirectDrawGlobalNext->hDev, DxEGShDevData_ldev); + pSurface->gdev = gpEngFuncs.DxEngGetHdevData(pSurface->peDirectDrawGlobalNext->hDev, DxEGShDevData_GDev); + pSurface->hSecure = (VOID*)1; + } + } + + if (pSurface) + { + pSurface->ddsSurfaceGlobal.fpVidMem = pDdSurfGlob->fpVidMem; + pSurface->ddsSurfaceGlobal.lPitch = pDdSurfGlob->lPitch; + pSurface->ddsSurfaceGlobal.wWidth = pDdSurfGlob->wWidth; + pSurface->ddsSurfaceGlobal.wHeight = pDdSurfGlob->wHeight; + pSurface->wWidth = pDdSurfGlob->wWidth; + pSurface->wHeight = pDdSurfGlob->wHeight; + memcpy(&pSurface->ddsSurfaceGlobal.ddpfSurface, &pDdSurfGlob->ddpfSurface, sizeof(pSurface->ddsSurfaceGlobal.ddpfSurface)); + pSurface->ddsSurfaceLocal.ddsCaps.dwCaps = pDdSurfLoc->ddsCaps.dwCaps; + pSurface->ddsSurfaceMore.ddsCapsEx.dwCaps2 = pDdSurfMore->ddsCapsEx.dwCaps2; + pSurface->ddsSurfaceMore.ddsCapsEx.dwCaps3 = pDdSurfMore->ddsCapsEx.dwCaps3; + pSurface->ddsSurfaceMore.ddsCapsEx.dwCaps4 = pDdSurfMore->ddsCapsEx.dwCaps4; + pSurface->ddsSurfaceMore.dwSurfaceHandle = pDdSurfMore->dwSurfaceHandle; + pSurface->hSecure = (VOID*)1; + + peDdL->peSurface_DdList = pSurface; + peDdL->hSurface = (ULONG)pSurface->pobj.hHmgr; + } + + return pSurface; +} + +HANDLE +NTAPI +DxDdCreateSurfaceObject(HANDLE hDirectDrawLocal, + HANDLE hSurface, + PDD_SURFACE_LOCAL puSurfaceLocal, + PDD_SURFACE_MORE puSurfaceMore, + PDD_SURFACE_GLOBAL puSurfaceGlobal, + BOOL bComplete) +{ + HANDLE RetVal = FALSE; + PEDD_DIRECTDRAW_LOCAL peDdL = NULL; + PEDD_SURFACE pDdSurface = NULL; + + peDdL = (PEDD_DIRECTDRAW_LOCAL)DdHmgLock(hDirectDrawLocal, ObjType_DDLOCAL_TYPE, FALSE); + + if (!peDdL) + return RetVal; + + pDdSurface = intDdCreateNewSurfaceObject(peDdL, hSurface, puSurfaceGlobal, puSurfaceLocal, puSurfaceMore); + if (!pDdSurface) + { + InterlockedDecrement((VOID*)&peDdL->pobj.cExclusiveLock); + return RetVal; + } + + RetVal = pDdSurface->pobj.hHmgr; + + InterlockedDecrement((VOID*)&pDdSurface->pobj.cExclusiveLock); + InterlockedDecrement((VOID*)&peDdL->pobj.cExclusiveLock); + + return RetVal; +} Modified: trunk/reactos/win32ss/reactx/dxg/dxg_driver.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/reactx/dxg/dxg_dri…
============================================================================== --- trunk/reactos/win32ss/reactx/dxg/dxg_driver.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/reactx/dxg/dxg_driver.h [iso-8859-1] Sat Jun 24 22:24:04 2017 @@ -131,40 +131,10 @@ DWORD NTAPI -DxDdCreateD3DBuffer( - PVOID p1, - PVOID p2, - PVOID p3, - PVOID p4, - PVOID p5, - PVOID p6, - PVOID p7, - PVOID p8) -{ - TRACE(); - return 0; -} - -DWORD -NTAPI DxDdCreateMoComp( PVOID p1, PVOID p2) { - return 0; -} - -DWORD -NTAPI -DxDdCreateSurfaceObject( - PVOID p1, - PVOID p2, - PVOID p3, - PVOID p4, - PVOID p5, - PVOID p6) -{ - TRACE(); return 0; } Modified: trunk/reactos/win32ss/reactx/dxg/dxg_int.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/reactx/dxg/dxg_int…
============================================================================== --- trunk/reactos/win32ss/reactx/dxg/dxg_int.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/reactx/dxg/dxg_int.h [iso-8859-1] Sat Jun 24 22:24:04 2017 @@ -202,8 +202,11 @@ DWORD NTAPI DxDdReenableDirectDrawObject(HANDLE DdHandle, PVOID p2); DWORD NTAPI DxDdCanCreateSurface(HANDLE DdHandle, PDD_CANCREATESURFACEDATA SurfaceData); DWORD NTAPI DxDdCanCreateD3DBuffer(HANDLE DdHandle, PDD_CANCREATESURFACEDATA SurfaceData); +DWORD NTAPI DxDdCreateD3DBuffer(HANDLE hDirectDrawLocal, PEDD_SURFACE pDdSurfList, DDSURFACEDESC2 *a3, DD_SURFACE_GLOBAL *pDdSurfGlob, DD_SURFACE_LOCAL *pDdSurfLoc, + DD_SURFACE_MORE *pDdSurfMore, DD_CREATESURFACEDATA *pDdCreateSurfaceData, PVOID Address); DWORD NTAPI DxDdLock(HANDLE hSurface, PDD_LOCKDATA puLockData, HDC hdcClip); DWORD NTAPI DxDdUnlock(HANDLE hSurface, PDD_UNLOCKDATA puUnlockData); +HANDLE NTAPI DxDdCreateSurfaceObject(HANDLE hDirectDrawLocal, HANDLE hSurface, PDD_SURFACE_LOCAL puSurfaceLocal, PDD_SURFACE_MORE puSurfaceMore, PDD_SURFACE_GLOBAL puSurfaceGlobal, BOOL bComplete); /* Internal functions */ @@ -212,6 +215,7 @@ BOOL FASTCALL DdHmgDestroy(VOID); PVOID FASTCALL DdHmgLock(HANDLE DdHandle, UCHAR ObjectType, BOOLEAN LockOwned); HANDLE FASTCALL DdHmgAlloc(ULONG objSize, CHAR objType, BOOLEAN objLock); - +PEDD_SURFACE NTAPI intDdCreateNewSurfaceObject(PEDD_DIRECTDRAW_LOCAL peDdL, HANDLE hDirectDrawLocal, + PDD_SURFACE_GLOBAL pDdSurfGlob, PDD_SURFACE_LOCAL pDdSurfLoc, PDD_SURFACE_MORE pDdSurfMore); #endif /* _DXG_PCH_ */ Modified: trunk/reactos/win32ss/reactx/dxg/tags.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/reactx/dxg/tags.h?…
============================================================================== --- trunk/reactos/win32ss/reactx/dxg/tags.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/reactx/dxg/tags.h [iso-8859-1] Sat Jun 24 22:24:04 2017 @@ -2,4 +2,5 @@ #define TAG_GINI 'iniG' #define TAG_GDDV 'vddG' #define TAG_GDDF 'fddG' +#define TAG_GDDP 'pddG' #define TAG_DH_0 '0 hD'
7 years, 6 months
1
0
0
0
[dquintana] 75188: [NTOBJSHEX] Fix registration.
by dquintana@svn.reactos.org
Author: dquintana Date: Sat Jun 24 22:01:46 2017 New Revision: 75188 URL:
http://svn.reactos.org/svn/reactos?rev=75188&view=rev
Log: [NTOBJSHEX] Fix registration. Modified: trunk/reactos/dll/shellext/ntobjshex/foldercommon.h trunk/reactos/dll/shellext/ntobjshex/ntobjfolder.h trunk/reactos/dll/shellext/ntobjshex/regfolder.h Modified: trunk/reactos/dll/shellext/ntobjshex/foldercommon.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/ntobjshex/fol…
============================================================================== --- trunk/reactos/dll/shellext/ntobjshex/foldercommon.h [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/ntobjshex/foldercommon.h [iso-8859-1] Sat Jun 24 22:01:46 2017 @@ -706,8 +706,7 @@ } return E_NOTIMPL; } - - DECLARE_REGISTRY_RESOURCEID(IDR_REGISTRYFOLDER) + DECLARE_NOT_AGGREGATABLE(TSelf) DECLARE_PROTECT_FINAL_CONSTRUCT() Modified: trunk/reactos/dll/shellext/ntobjshex/ntobjfolder.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/ntobjshex/nto…
============================================================================== --- trunk/reactos/dll/shellext/ntobjshex/ntobjfolder.h [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/ntobjshex/ntobjfolder.h [iso-8859-1] Sat Jun 24 22:01:46 2017 @@ -52,6 +52,7 @@ public CCommonFolder<CNtObjectFolder, NtPidlEntry, CNtObjectFolderExtractIcon> { public: + DECLARE_REGISTRY_RESOURCEID(IDR_NTOBJECTFOLDER) CNtObjectFolder(); virtual ~CNtObjectFolder(); Modified: trunk/reactos/dll/shellext/ntobjshex/regfolder.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/ntobjshex/reg…
============================================================================== --- trunk/reactos/dll/shellext/ntobjshex/regfolder.h [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/ntobjshex/regfolder.h [iso-8859-1] Sat Jun 24 22:01:46 2017 @@ -53,6 +53,7 @@ HKEY m_hRoot; public: + DECLARE_REGISTRY_RESOURCEID(IDR_REGISTRYFOLDER) CRegistryFolder(); virtual ~CRegistryFolder();
7 years, 6 months
1
0
0
0
[ekohl] 75187: [NETAPI32] Implement NetBrowserStatisticsGet().
by ekohl@svn.reactos.org
Author: ekohl Date: Sat Jun 24 21:47:27 2017 New Revision: 75187 URL:
http://svn.reactos.org/svn/reactos?rev=75187&view=rev
Log: [NETAPI32] Implement NetBrowserStatisticsGet(). Modified: trunk/reactos/dll/win32/netapi32/browser.c trunk/reactos/dll/win32/netapi32/netapi32.spec trunk/reactos/sdk/include/psdk/lmbrowsr.h trunk/reactos/sdk/include/reactos/idl/browser.idl 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] Sat Jun 24 21:47:27 2017 @@ -246,6 +246,69 @@ DomainName, EmulatedServerName, Role); + } + RpcExcept(EXCEPTION_EXECUTE_HANDLER) + { + status = I_RpcMapWin32Status(RpcExceptionCode()); + } + RpcEndExcept; + + return status; +} + + +NET_API_STATUS +WINAPI +NetBrowserStatisticsGet( + _In_ LPWSTR ServerName, + _In_ DWORD Level, + _Out_ LPBYTE *Buffer) +{ + BROWSER_STATISTICS_STRUCT StatisticsStruct; + BROWSER_STATISTICS_100_CONTAINER Level100Container = {0, NULL}; + BROWSER_STATISTICS_101_CONTAINER Level101Container = {0, NULL}; + NET_API_STATUS status; + + TRACE("NetBrowserStatisticsGet(%s %lu %p)\n", + debugstr_w(ServerName), Level, Buffer); + + if (Level != 100 && Level != 101) + return ERROR_INVALID_LEVEL; + + StatisticsStruct.Level = Level; + switch (Level) + { + case 100: + StatisticsStruct.Statistics.Level100 = &Level100Container; + break; + + case 101: + StatisticsStruct.Statistics.Level101 = &Level101Container; + break; + } + + RpcTryExcept + { + status = NetrBrowserStatisticsGet(ServerName, + Level, + &StatisticsStruct); + + switch (Level) + { + case 100: + if (StatisticsStruct.Statistics.Level100->Buffer != NULL) + { + *Buffer = (LPBYTE)StatisticsStruct.Statistics.Level100->Buffer; + } + break; + + case 101: + if (StatisticsStruct.Statistics.Level101->Buffer != NULL) + { + *Buffer = (LPBYTE)StatisticsStruct.Statistics.Level101->Buffer; + } + break; + } } RpcExcept(EXCEPTION_EXECUTE_HANDLER) { @@ -270,11 +333,22 @@ _In_opt_ LMCSTR domain, _Inout_opt_ LPDWORD resume_handle) { - FIXME("NetServerEnum(%s %lu %p %lu %p %p %lu %s %p)\n", + TRACE("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; + if (resume_handle != NULL) + *resume_handle = 0; + + return NetServerEnumEx(servername, + level, + bufptr, + prefmaxlen, + entriesread, + totalentries, + servertype, + domain, + NULL); } 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] Sat Jun 24 21:47:27 2017 @@ -109,7 +109,7 @@ @ stdcall NetAuditClear(wstr wstr wstr) @ stdcall NetAuditRead(wstr wstr ptr long ptr long long ptr long ptr ptr) @ stdcall NetAuditWrite(long ptr long wstr ptr) -@ stub NetBrowserStatisticsGet +@ stdcall NetBrowserStatisticsGet(wstr long ptr) @ stdcall NetConfigGet(wstr wstr wstr ptr) @ stdcall NetConfigGetAll(wstr wstr ptr) @ stdcall NetConfigSet(wstr wstr wstr long long ptr long) Modified: trunk/reactos/sdk/include/psdk/lmbrowsr.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/psdk/lmbrowsr.…
============================================================================== --- trunk/reactos/sdk/include/psdk/lmbrowsr.h [iso-8859-1] (original) +++ trunk/reactos/sdk/include/psdk/lmbrowsr.h [iso-8859-1] Sat Jun 24 21:47:27 2017 @@ -72,6 +72,7 @@ NET_API_STATUS WINAPI I_BrowserQueryStatistics(LPCWSTR,LPBROWSER_STATISTICS*); NET_API_STATUS WINAPI I_BrowserResetStatistics(LPCWSTR); NET_API_STATUS WINAPI I_BrowserDebugTrace(PWCHAR,PCHAR); +NET_API_STATUS WINAPI NetBrowserStatisticsGet(PWSTR,DWORD,PBYTE*); #ifdef __cplusplus } #endif Modified: 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 [iso-8859-1] (original) +++ trunk/reactos/sdk/include/reactos/idl/browser.idl [iso-8859-1] Sat Jun 24 21:47:27 2017 @@ -122,7 +122,7 @@ [case(101)] PBROWSER_STATISTICS_101_CONTAINER Level101; [default] ; } Statistics; -}BROWSER_STATISTICS_STRUCT, *PBROWSER_STATISTICS_STRUCT, *LPBROWSER_STATISTICS_STRUCT; +} BROWSER_STATISTICS_STRUCT, *PBROWSER_STATISTICS_STRUCT, *LPBROWSER_STATISTICS_STRUCT; [ uuid(6BFFD098-A112-3610-9833-012892020162), @@ -188,7 +188,7 @@ /* Function 8 */ NET_API_STATUS __stdcall - I_BrowserrStatisticsGet( + NetrBrowserStatisticsGet( [in, string, unique] BROWSER_IDENTIFY_HANDLE ServerName, [in] DWORD Level, [in, out] LPBROWSER_STATISTICS_STRUCT StatisticsStruct);
7 years, 6 months
1
0
0
0
[ekohl] 75186: [NETAPI32] Move the functions NetGetDCName, NetGetAnyDCName and NetEnumerateTrustedDomains into a separate file for the Netlogon service interface code.
by ekohl@svn.reactos.org
Author: ekohl Date: Sat Jun 24 16:42:21 2017 New Revision: 75186 URL:
http://svn.reactos.org/svn/reactos?rev=75186&view=rev
Log: [NETAPI32] Move the functions NetGetDCName, NetGetAnyDCName and NetEnumerateTrustedDomains into a separate file for the Netlogon service interface code. Added: trunk/reactos/dll/win32/netapi32/netlogon.c (with props) Modified: trunk/reactos/dll/win32/netapi32/CMakeLists.txt trunk/reactos/dll/win32/netapi32/access.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] Sat Jun 24 16:42:21 2017 @@ -26,6 +26,7 @@ nbt.c netapi32.c netbios.c + netlogon.c obsolete.c schedule.c srvsvc.c Modified: trunk/reactos/dll/win32/netapi32/access.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/access.…
============================================================================== --- trunk/reactos/dll/win32/netapi32/access.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/access.c [iso-8859-1] Sat Jun 24 16:42:21 2017 @@ -246,45 +246,3 @@ } return NERR_Success; } - -/************************************************************ - * NetGetDCName (NETAPI32.@) - * - * Return the name of the primary domain controller (PDC) - */ - -NET_API_STATUS WINAPI -NetGetDCName(LPCWSTR servername, LPCWSTR domainname, LPBYTE *bufptr) -{ - FIXME("(%s, %s, %p) stub!\n", debugstr_w(servername), - debugstr_w(domainname), bufptr); - return NERR_DCNotFound; /* say we can't find a domain controller */ -} - -/************************************************************ - * NetGetAnyDCName (NETAPI32.@) - * - * Return the name of any domain controller (DC) - */ -NET_API_STATUS WINAPI -NetGetAnyDCName( - _In_ LPCWSTR servername, - _In_ LPCWSTR domainname, - _Out_ LPBYTE *bufptr) -{ - FIXME("NetGetAnyDCName(%s, %s, %p) stub!\n", debugstr_w(servername), - debugstr_w(domainname), bufptr); - return ERROR_NO_LOGON_SERVERS; -} - -/************************************************************ - * NetEnumerateTrustedDomains (NETAPI32.@) - * - * On success, *DomainNames is a multi-sz allocated using NetApiBufferAllocate - */ -NTSTATUS WINAPI -NetEnumerateTrustedDomains(LPWSTR ServerName, LPWSTR *DomainNames) -{ - FIXME("(%s, %p) stub!\n", debugstr_w(ServerName), DomainNames); - return STATUS_NOT_IMPLEMENTED; -} Added: trunk/reactos/dll/win32/netapi32/netlogon.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/netlogo…
============================================================================== --- trunk/reactos/dll/win32/netapi32/netlogon.c (added) +++ trunk/reactos/dll/win32/netapi32/netlogon.c [iso-8859-1] Sat Jun 24 16:42:21 2017 @@ -0,0 +1,57 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: NetAPI DLL + * FILE: dll/win32/netapi32/netlogon.c + * PURPOSE: Netlogon service interface code + * PROGRAMMERS: Eric Kohl (eric.kohl(a)reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include "netapi32.h" + +WINE_DEFAULT_DEBUG_CHANNEL(netapi32); + +/* FUNCTIONS *****************************************************************/ + +NTSTATUS +WINAPI +NetEnumerateTrustedDomains( + _In_ LPWSTR ServerName, + _Out_ LPWSTR *DomainNames) +{ + FIXME("NetEnumerateTrustedDomains(%s, %p)\n", + debugstr_w(ServerName), DomainNames); + + return STATUS_NOT_IMPLEMENTED; +} + + +NET_API_STATUS +WINAPI +NetGetAnyDCName( + _In_ LPCWSTR servername, + _In_ LPCWSTR domainname, + _Out_ LPBYTE *bufptr) +{ + FIXME("NetGetAnyDCName(%s, %s, %p)\n", + debugstr_w(servername), debugstr_w(domainname), bufptr); + + return ERROR_NO_LOGON_SERVERS; +} + + +NET_API_STATUS +WINAPI +NetGetDCName( + _In_ LPCWSTR servername, + _In_ LPCWSTR domainname, + _Out_ LPBYTE *bufptr) +{ + FIXME("NetGetDCName(%s, %s, %p)\n", + debugstr_w(servername), debugstr_w(domainname), bufptr); + + return NERR_DCNotFound; +} + +/* EOF */ Propchange: trunk/reactos/dll/win32/netapi32/netlogon.c ------------------------------------------------------------------------------ svn:eol-style = native
7 years, 6 months
1
0
0
0
[pschweitzer] 75185: [DXG] Fix GCC build
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sat Jun 24 16:22:24 2017 New Revision: 75185 URL:
http://svn.reactos.org/svn/reactos?rev=75185&view=rev
Log: [DXG] Fix GCC build Modified: trunk/reactos/win32ss/reactx/dxg/ddsurf.c Modified: trunk/reactos/win32ss/reactx/dxg/ddsurf.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/reactx/dxg/ddsurf.…
============================================================================== --- trunk/reactos/win32ss/reactx/dxg/ddsurf.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/reactx/dxg/ddsurf.c [iso-8859-1] Sat Jun 24 16:22:24 2017 @@ -5,6 +5,8 @@ * FILE: win32ss/reactx/dxg/ddsurf.c * PROGRAMER: Sebastian Gasiorek (sebastian.gasiorek(a)reactos.org) */ + +#include <dxg_int.h> /*++ * @name DxDdLock
7 years, 6 months
1
0
0
0
[ekohl] 75184: [NETAPI32] Implement I_BrowserQueryOtherDomains, I_BrowserQueryStatistics and I_BrowserResetNetlogonState. This functions calls their counterpart in the computer browser service.
by ekohl@svn.reactos.org
Author: ekohl Date: Sat Jun 24 14:59:14 2017 New Revision: 75184 URL:
http://svn.reactos.org/svn/reactos?rev=75184&view=rev
Log: [NETAPI32] Implement I_BrowserQueryOtherDomains, I_BrowserQueryStatistics and I_BrowserResetNetlogonState. This functions calls their counterpart in the computer browser service. Modified: trunk/reactos/dll/win32/netapi32/browser.c trunk/reactos/dll/win32/netapi32/netapi32.spec trunk/reactos/sdk/include/psdk/lmbrowsr.h trunk/reactos/sdk/include/reactos/idl/browser.idl 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] Sat Jun 24 14:59:14 2017 @@ -12,6 +12,7 @@ #include <rpc.h> #include <lmbrowsr.h> +#include <lmserver.h> #include "browser_c.h" @@ -113,6 +114,72 @@ NET_API_STATUS WINAPI +I_BrowserQueryOtherDomains( + _In_opt_ LPCWSTR ServerName, + _Out_ LPBYTE *BufPtr, + _Out_ LPDWORD EntriesRead, + _Out_ LPDWORD TotalEntries) +{ + SERVER_INFO_100_CONTAINER Level100Container = {0, NULL}; + SERVER_ENUM_STRUCT EnumStruct; + NET_API_STATUS status; + + TRACE("I_BrowserQueryOtherDomains(%s %p %p %p)\n", + debugstr_w(ServerName), BufPtr, EntriesRead, TotalEntries); + + EnumStruct.Level = 100; + EnumStruct.ServerInfo.Level100 = &Level100Container; + + RpcTryExcept + { + status = I_BrowserrQueryOtherDomains((PWSTR)ServerName, + &EnumStruct, + TotalEntries); + + if (status == NERR_Success || status == ERROR_MORE_DATA) + { + *BufPtr = (LPBYTE)EnumStruct.ServerInfo.Level100->Buffer; + *EntriesRead = EnumStruct.ServerInfo.Level100->EntriesRead; + } + } + RpcExcept(EXCEPTION_EXECUTE_HANDLER) + { + status = I_RpcMapWin32Status(RpcExceptionCode()); + } + RpcEndExcept; + + return status; +} + + +NET_API_STATUS +WINAPI +I_BrowserQueryStatistics( + _In_opt_ LPCWSTR ServerName, + _Inout_ LPBROWSER_STATISTICS *Statistics) +{ + NET_API_STATUS status; + + TRACE("I_BrowserQueryStatistics(%s %p)\n", + debugstr_w(ServerName), Statistics); + + RpcTryExcept + { + status = I_BrowserrQueryStatistics((PWSTR)ServerName, + Statistics); + } + RpcExcept(EXCEPTION_EXECUTE_HANDLER) + { + status = I_RpcMapWin32Status(RpcExceptionCode()); + } + RpcEndExcept; + + return status; +} + + +NET_API_STATUS +WINAPI I_BrowserResetStatistics( _In_opt_ LPCWSTR ServerName) { @@ -124,6 +191,30 @@ RpcTryExcept { status = I_BrowserrResetStatistics((PWSTR)ServerName); + } + RpcExcept(EXCEPTION_EXECUTE_HANDLER) + { + status = I_RpcMapWin32Status(RpcExceptionCode()); + } + RpcEndExcept; + + return status; +} + + +NET_API_STATUS +WINAPI +I_BrowserResetNetlogonState( + _In_ LPCWSTR ServerName) +{ + NET_API_STATUS status; + + TRACE("I_BrowserResetNetlogonState(%s)\n", + debugstr_w(ServerName)); + + RpcTryExcept + { + status = I_BrowserrResetNetlogonState((PWSTR)ServerName); } RpcExcept(EXCEPTION_EXECUTE_HANDLER) { 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] Sat Jun 24 14:59:14 2017 @@ -41,9 +41,9 @@ @ stub I_BrowserDebugCall @ stub I_BrowserDebugTrace @ stdcall I_BrowserQueryEmulatedDomains(wstr ptr ptr) -@ stub I_BrowserQueryOtherDomains -@ stub I_BrowserQueryStatistics -@ stub I_BrowserResetNetlogonState +@ stdcall I_BrowserQueryOtherDomains(wstr ptr ptr ptr) +@ stdcall I_BrowserQueryStatistics(wstr ptr) +@ stdcall I_BrowserResetNetlogonState(wstr) @ stdcall I_BrowserResetStatistics(wstr) @ stub I_BrowserServerEnum @ stdcall I_BrowserSetNetlogonState(wstr wstr wstr long) Modified: trunk/reactos/sdk/include/psdk/lmbrowsr.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/psdk/lmbrowsr.…
============================================================================== --- trunk/reactos/sdk/include/psdk/lmbrowsr.h [iso-8859-1] (original) +++ trunk/reactos/sdk/include/psdk/lmbrowsr.h [iso-8859-1] Sat Jun 24 14:59:14 2017 @@ -1,5 +1,5 @@ -#ifndef _LMBROWSR_ -#define _LMBROWSR_ +#ifndef _LMBROWSR_H +#define _LMBROWSR_H #if __GNUC__ >=3 #pragma GCC system_header #endif Modified: 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 [iso-8859-1] (original) +++ trunk/reactos/sdk/include/reactos/idl/browser.idl [iso-8859-1] Sat Jun 24 14:59:14 2017 @@ -6,7 +6,7 @@ typedef [handle] wchar_t *BROWSER_IDENTIFY_HANDLE; -cpp_quote("#ifndef _LMBROWSR_") +cpp_quote("#ifndef _LMBROWSR_H") typedef struct _BROWSER_EMULATED_DOMAIN { LPWSTR DomainName; @@ -21,11 +21,13 @@ [size_is(EntriesRead)] PBROWSER_EMULATED_DOMAIN Buffer; } BROWSER_EMULATED_DOMAIN_CONTAINER, *PBROWSER_EMULATED_DOMAIN_CONTAINER; +cpp_quote("#ifndef _LMSERVER_H") typedef struct _SERVER_INFO_100 { DWORD sv100_platform_id; LPWSTR sv100_name; } SERVER_INFO_100, *PSERVER_INFO_100, *LPSERVER_INFO_100; +cpp_quote("#endif") typedef struct _SERVER_INFO_100_CONTAINER { @@ -43,6 +45,84 @@ } ServerInfo; } SERVER_ENUM_STRUCT, *PSERVER_ENUM_STRUCT, *LPSERVER_ENUM_STRUCT; +cpp_quote("#ifndef _LMBROWSR_H") +typedef struct _BROWSER_STATISTICS +{ + LARGE_INTEGER StatisticsStartTime; + LARGE_INTEGER NumberOfServerAnnouncements; + LARGE_INTEGER NumberOfDomainAnnouncements; + ULONG NumberOfElectionPackets; + ULONG NumberOfMailslotWrites; + ULONG NumberOfGetBrowserServerListRequests; + ULONG NumberOfServerEnumerations; + ULONG NumberOfDomainEnumerations; + ULONG NumberOfOtherEnumerations; + ULONG NumberOfMissedServerAnnouncements; + ULONG NumberOfMissedMailslotDatagrams; + ULONG NumberOfMissedGetBrowserServerListRequests; + ULONG NumberOfFailedServerAnnounceAllocations; + ULONG NumberOfFailedMailslotAllocations; + ULONG NumberOfFailedMailslotReceives; + ULONG NumberOfFailedMailslotWrites; + ULONG NumberOfFailedMailslotOpens; + ULONG NumberOfDuplicateMasterAnnouncements; + LARGE_INTEGER NumberOfIllegalDatagrams; +} BROWSER_STATISTICS,*PBROWSER_STATISTICS,*LPBROWSER_STATISTICS; + +typedef struct _BROWSER_STATISTICS_100 +{ + LARGE_INTEGER StartTime; + LARGE_INTEGER NumberOfServerAnnouncements; + LARGE_INTEGER NumberOfDomainAnnouncements; + ULONG NumberOfElectionPackets; + ULONG NumberOfMailslotWrites; + ULONG NumberOfGetBrowserServerListRequests; + LARGE_INTEGER NumberOfIllegalDatagrams; +} BROWSER_STATISTICS_100,*PBROWSER_STATISTICS_100; + +typedef struct _BROWSER_STATISTICS_101 +{ + LARGE_INTEGER StartTime; + LARGE_INTEGER NumberOfServerAnnouncements; + LARGE_INTEGER NumberOfDomainAnnouncements; + ULONG NumberOfElectionPackets; + ULONG NumberOfMailslotWrites; + ULONG NumberOfGetBrowserServerListRequests; + LARGE_INTEGER NumberOfIllegalDatagrams; + ULONG NumberOfMissedServerAnnouncements; + ULONG NumberOfMissedMailslotDatagrams; + ULONG NumberOfMissedGetBrowserServerListRequests; + ULONG NumberOfFailedServerAnnounceAllocations; + ULONG NumberOfFailedMailslotAllocations; + ULONG NumberOfFailedMailslotReceives; + ULONG NumberOfFailedMailslotWrites; + ULONG NumberOfFailedMailslotOpens; + ULONG NumberOfDuplicateMasterAnnouncements; +} BROWSER_STATISTICS_101,*PBROWSER_STATISTICS_101; +cpp_quote("#endif") + +typedef struct _BROWSER_STATISTICS_100_CONTAINER +{ + DWORD EntriesRead; + [size_is(EntriesRead)] PBROWSER_STATISTICS_100 Buffer; +} BROWSER_STATISTICS_100_CONTAINER, *PBROWSER_STATISTICS_100_CONTAINER; + +typedef struct _BROWSER_STATISTICS_101_CONTAINER +{ + DWORD EntriesRead; + [size_is(EntriesRead)] PBROWSER_STATISTICS_101 Buffer; +} BROWSER_STATISTICS_101_CONTAINER, *PBROWSER_STATISTICS_101_CONTAINER; + +typedef struct _BROWSER_STATISTICS_STRUCT +{ + DWORD Level; + [switch_is(Level)] union _BROWSER_STATISTICS_UNION + { + [case(100)] PBROWSER_STATISTICS_100_CONTAINER Level100; + [case(101)] PBROWSER_STATISTICS_101_CONTAINER Level101; + [default] ; + } Statistics; +}BROWSER_STATISTICS_STRUCT, *PBROWSER_STATISTICS_STRUCT, *LPBROWSER_STATISTICS_STRUCT; [ uuid(6BFFD098-A112-3610-9833-012892020162), @@ -68,7 +148,7 @@ __stdcall BrowserOpnum1NotUsedOnWire(void); - /* Function 2 (BrowserrQueryOtherDomains) */ + /* Function 2 */ NET_API_STATUS __stdcall I_BrowserrQueryOtherDomains( @@ -76,20 +156,23 @@ [in, out] LPSERVER_ENUM_STRUCT InfoStruct, [out] LPDWORD TotalEntries); - /* Function 3 (BrowserrResetNetlogonState) */ - NET_API_STATUS - __stdcall - BrowserOpnum3NotUsedOnWire(void); + /* Function 3 */ + NET_API_STATUS + __stdcall + I_BrowserrResetNetlogonState( + [in, string, unique] BROWSER_IDENTIFY_HANDLE ServerName); /* Function 4 (BrowserrDebugTrace) */ NET_API_STATUS __stdcall BrowserOpnum4NotUsedOnWire(void); - /* Function 5 (BrowserrQueryStatistics) */ - NET_API_STATUS - __stdcall - BrowserOpnum5NotUsedOnWire(void); + /* Function 5 */ + NET_API_STATUS + __stdcall + I_BrowserrQueryStatistics( + [in, string, unique] BROWSER_IDENTIFY_HANDLE ServerName, + [out] LPBROWSER_STATISTICS *Statistics); /* Function 6 */ NET_API_STATUS @@ -102,10 +185,13 @@ __stdcall BrowserOpnum7NotUsedOnWire(void); - /* Function 8 (NetrBrowserStatisticsGet) */ - NET_API_STATUS - __stdcall - BrowserOpnum8NotUsedOnWire(void); + /* Function 8 */ + NET_API_STATUS + __stdcall + I_BrowserrStatisticsGet( + [in, string, unique] BROWSER_IDENTIFY_HANDLE ServerName, + [in] DWORD Level, + [in, out] LPBROWSER_STATISTICS_STRUCT StatisticsStruct); /* Function 9 */ NET_API_STATUS
7 years, 6 months
1
0
0
0
[sdever] 75183: [MMIXER] Cleanup mixer notifications opened by an application when it is closed. CORE-10735 #comment Please retest.
by sdever@svn.reactos.org
Author: sdever Date: Sat Jun 24 13:54:10 2017 New Revision: 75183 URL:
http://svn.reactos.org/svn/reactos?rev=75183&view=rev
Log: [MMIXER] Cleanup mixer notifications opened by an application when it is closed. CORE-10735 #comment Please retest. Modified: trunk/reactos/drivers/wdm/audio/legacy/wdmaud/control.c trunk/reactos/drivers/wdm/audio/legacy/wdmaud/mmixer.c trunk/reactos/drivers/wdm/audio/legacy/wdmaud/wdmaud.h trunk/reactos/sdk/lib/drivers/sound/mmixer/controls.c trunk/reactos/sdk/lib/drivers/sound/mmixer/mixer.c trunk/reactos/sdk/lib/drivers/sound/mmixer/mmixer.h trunk/reactos/sdk/lib/drivers/sound/mmixer/precomp.h Modified: trunk/reactos/drivers/wdm/audio/legacy/wdmaud/control.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/legacy/w…
============================================================================== --- trunk/reactos/drivers/wdm/audio/legacy/wdmaud/control.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/legacy/wdmaud/control.c [iso-8859-1] Sat Jun 24 13:54:10 2017 @@ -166,11 +166,8 @@ } else if (ClientInfo->hPins[Index].Handle == DeviceInfo->hDevice && ClientInfo->hPins[Index].Type == MIXER_DEVICE_TYPE) { - if (ClientInfo->hPins[Index].NotifyEvent) - { - ObDereferenceObject(ClientInfo->hPins[Index].NotifyEvent); - ClientInfo->hPins[Index].NotifyEvent = NULL; - } + DPRINT1("Closing mixer %p\n", DeviceInfo->hDevice); + return WdmAudControlCloseMixer(DeviceObject, Irp, DeviceInfo, ClientInfo, Index); } } Modified: trunk/reactos/drivers/wdm/audio/legacy/wdmaud/mmixer.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/legacy/w…
============================================================================== --- trunk/reactos/drivers/wdm/audio/legacy/wdmaud/mmixer.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/legacy/wdmaud/mmixer.c [iso-8859-1] Sat Jun 24 13:54:10 2017 @@ -472,6 +472,32 @@ } NTSTATUS +WdmAudControlCloseMixer( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp, + IN PWDMAUD_DEVICE_INFO DeviceInfo, + IN PWDMAUD_CLIENT ClientInfo, + IN ULONG Index) +{ + /* Remove event associated to this client */ + if (MMixerClose(&MixerContext, DeviceInfo->DeviceIndex, ClientInfo, EventCallback)) + { + DPRINT1("Failed to close mixer\n"); + return SetIrpIoStatus(Irp, STATUS_UNSUCCESSFUL, sizeof(WDMAUD_DEVICE_INFO)); + } + + /* Dereference event */ + if (ClientInfo->hPins[Index].NotifyEvent) + { + ObDereferenceObject(ClientInfo->hPins[Index].NotifyEvent); + ClientInfo->hPins[Index].NotifyEvent = NULL; + } + + /* FIXME: do we need to free ClientInfo->hPins ? */ + return SetIrpIoStatus(Irp, STATUS_SUCCESS, sizeof(WDMAUD_DEVICE_INFO)); +} + +NTSTATUS NTAPI WdmAudGetControlDetails( IN PDEVICE_OBJECT DeviceObject, Modified: trunk/reactos/drivers/wdm/audio/legacy/wdmaud/wdmaud.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/legacy/w…
============================================================================== --- trunk/reactos/drivers/wdm/audio/legacy/wdmaud/wdmaud.h [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/legacy/wdmaud/wdmaud.h [iso-8859-1] Sat Jun 24 13:54:10 2017 @@ -129,6 +129,14 @@ IN PWDMAUD_CLIENT ClientInfo); NTSTATUS +WdmAudControlCloseMixer( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp, + IN PWDMAUD_DEVICE_INFO DeviceInfo, + IN PWDMAUD_CLIENT ClientInfo, + IN ULONG Index); + +NTSTATUS WdmAudControlOpenWave( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, Modified: trunk/reactos/sdk/lib/drivers/sound/mmixer/controls.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/drivers/sound/mmix…
============================================================================== --- trunk/reactos/sdk/lib/drivers/sound/mmixer/controls.c [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/drivers/sound/mmixer/controls.c [iso-8859-1] Sat Jun 24 13:54:10 2017 @@ -1834,17 +1834,19 @@ IN PMIXER_EVENT MixerEventRoutine) { //KSE_NODE Property; - PEVENT_NOTIFICATION_ENTRY EventData; + //KSEVENTDATA EventData //ULONG BytesReturned; //MIXER_STATUS Status; - - EventData = (PEVENT_NOTIFICATION_ENTRY)MixerContext->AllocEventData(sizeof(EVENT_NOTIFICATION_ENTRY)); - if (!EventData) + PEVENT_NOTIFICATION_ENTRY EventNotification; + + EventNotification = (PEVENT_NOTIFICATION_ENTRY)MixerContext->Alloc(sizeof(EVENT_NOTIFICATION_ENTRY)); + if (!EventNotification) { /* not enough memory */ return MM_STATUS_NO_MEMORY; } + /* FIXME: what is it supposed to happen with KSEVENTDATA ? */ #if 0 /* setup request */ Property.Event.Set = KSEVENTSETID_AudioControlChange; @@ -1864,10 +1866,39 @@ #endif /* initialize notification entry */ - EventData->MixerEventContext = MixerEventContext; - EventData->MixerEventRoutine = MixerEventRoutine; + EventNotification->MixerEventContext = MixerEventContext; + EventNotification->MixerEventRoutine = MixerEventRoutine; /* store event */ - InsertTailList(&MixerInfo->EventList, &EventData->Entry); + InsertTailList(&MixerInfo->EventList, &EventNotification->Entry); return MM_STATUS_SUCCESS; } + +MIXER_STATUS +MMixerRemoveEvent( + IN PMIXER_CONTEXT MixerContext, + IN OUT LPMIXER_INFO MixerInfo, + IN PVOID MixerEventContext, + IN PMIXER_EVENT MixerEventRoutine) +{ + PLIST_ENTRY EventList; + PEVENT_NOTIFICATION_ENTRY NotificationEntry; + + /* Lookup through mixers */ + EventList = MixerInfo->EventList.Flink; + while(EventList != &MixerInfo->EventList) + { + NotificationEntry = CONTAINING_RECORD(EventList, EVENT_NOTIFICATION_ENTRY, Entry); + EventList = EventList->Flink; + /* TODO: find a better way to identify an event ? */ + if(NotificationEntry->MixerEventRoutine == MixerEventRoutine && + NotificationEntry->MixerEventContext == MixerEventContext) + { + DPRINT1("Freeing entry %p\n", NotificationEntry); + /* We found the event to remove */ + RemoveEntryList(&NotificationEntry->Entry); + MixerContext->Free(NotificationEntry); + } + } + return MM_STATUS_SUCCESS; +} Modified: trunk/reactos/sdk/lib/drivers/sound/mmixer/mixer.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/drivers/sound/mmix…
============================================================================== --- trunk/reactos/sdk/lib/drivers/sound/mmixer/mixer.c [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/drivers/sound/mmixer/mixer.c [iso-8859-1] Sat Jun 24 13:54:10 2017 @@ -110,6 +110,39 @@ /* store result */ *MixerHandle = (HANDLE)MixerInfo; return MM_STATUS_SUCCESS; +} + +MIXER_STATUS +MMixerClose( + IN PMIXER_CONTEXT MixerContext, + IN ULONG MixerId, + IN PVOID MixerEventContext, + IN PMIXER_EVENT MixerEventRoutine) +{ + MIXER_STATUS Status; + LPMIXER_INFO MixerInfo; + + /* verify mixer context */ + Status = MMixerVerifyContext(MixerContext); + + if (Status != MM_STATUS_SUCCESS) + { + /* invalid context passed */ + DPRINT1("invalid context\n"); + return Status; + } + + /* get mixer info */ + MixerInfo = MMixerGetMixerInfoByIndex(MixerContext, MixerId); + if (!MixerInfo) + { + /* invalid mixer id */ + DPRINT1("invalid mixer id %lu\n", MixerId); + return MM_STATUS_INVALID_PARAMETER; + } + + /* remove event from list */ + return MMixerRemoveEvent(MixerContext, MixerInfo, MixerEventContext, MixerEventRoutine); } MIXER_STATUS Modified: trunk/reactos/sdk/lib/drivers/sound/mmixer/mmixer.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/drivers/sound/mmix…
============================================================================== --- trunk/reactos/sdk/lib/drivers/sound/mmixer/mmixer.h [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/drivers/sound/mmixer/mmixer.h [iso-8859-1] Sat Jun 24 13:54:10 2017 @@ -147,6 +147,13 @@ OUT PHANDLE MixerHandle); MIXER_STATUS +MMixerClose( + IN PMIXER_CONTEXT MixerContext, + IN ULONG MixerId, + IN PVOID MixerEventContext, + IN PMIXER_EVENT MixerEventRoutine); + +MIXER_STATUS MMixerGetLineInfo( IN PMIXER_CONTEXT MixerContext, IN HANDLE MixerHandle, Modified: trunk/reactos/sdk/lib/drivers/sound/mmixer/precomp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/drivers/sound/mmix…
============================================================================== --- trunk/reactos/sdk/lib/drivers/sound/mmixer/precomp.h [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/drivers/sound/mmixer/precomp.h [iso-8859-1] Sat Jun 24 13:54:10 2017 @@ -354,6 +354,13 @@ IN PMIXER_EVENT MixerEventRoutine); MIXER_STATUS +MMixerRemoveEvent( + IN PMIXER_CONTEXT MixerContext, + IN OUT LPMIXER_INFO MixerInfo, + IN PVOID MixerEventContext, + IN PMIXER_EVENT MixerEventRoutine); + +MIXER_STATUS MMixerGetDeviceName( IN PMIXER_CONTEXT MixerContext, OUT LPWSTR DeviceName,
7 years, 6 months
1
0
0
0
[sgasiorek] 75182: [DXG] Initial implementation of DxDdLock and better stub for DxDdUnlock
by sgasiorek@svn.reactos.org
Author: sgasiorek Date: Sat Jun 24 13:53:22 2017 New Revision: 75182 URL:
http://svn.reactos.org/svn/reactos?rev=75182&view=rev
Log: [DXG] Initial implementation of DxDdLock and better stub for DxDdUnlock Added: trunk/reactos/win32ss/reactx/dxg/ddsurf.c (with props) Modified: trunk/reactos/sdk/include/reactos/drivers/directx/directxint.h trunk/reactos/win32ss/reactx/dxg/CMakeLists.txt trunk/reactos/win32ss/reactx/dxg/dxg_driver.h trunk/reactos/win32ss/reactx/dxg/dxg_int.h Modified: trunk/reactos/sdk/include/reactos/drivers/directx/directxint.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/reactos/driver…
============================================================================== --- trunk/reactos/sdk/include/reactos/drivers/directx/directxint.h [iso-8859-1] (original) +++ trunk/reactos/sdk/include/reactos/drivers/directx/directxint.h [iso-8859-1] Sat Jun 24 13:53:22 2017 @@ -24,8 +24,8 @@ /* 0x2C */ FLONG fl; /* 0x30 */ struct _EDD_DIRECTDRAW_LOCAL *peDirectDrawLocal_prev; // verified to match Windows XP, // points to the old DDLocal when new handle is created. -/* 0x34 */ ULONG unk_034; -/* 0x38 */ ULONG unk_038; +/* 0x34 */ FLATPTR fpProcess2; // surface memory address returned by graphic driver +/* 0x38 */ ULONG isMemoryMapped; // surface memory mapped? /* 0x3C */ HANDLE UniqueProcess; /* 0x40 */ PEPROCESS Process; /* 0x44 */ VOID *unk_044; Modified: trunk/reactos/win32ss/reactx/dxg/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/reactx/dxg/CMakeLi…
============================================================================== --- trunk/reactos/win32ss/reactx/dxg/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/win32ss/reactx/dxg/CMakeLists.txt [iso-8859-1] Sat Jun 24 13:53:22 2017 @@ -7,6 +7,7 @@ d3d.c dd.c ddraw.c + ddsurf.c eng.c historic.c dxg_int.h) Added: trunk/reactos/win32ss/reactx/dxg/ddsurf.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/reactx/dxg/ddsurf.…
============================================================================== --- trunk/reactos/win32ss/reactx/dxg/ddsurf.c (added) +++ trunk/reactos/win32ss/reactx/dxg/ddsurf.c [iso-8859-1] Sat Jun 24 13:53:22 2017 @@ -0,0 +1,100 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * PURPOSE: Native driver for dxg implementation + * FILE: win32ss/reactx/dxg/ddsurf.c + * PROGRAMER: Sebastian Gasiorek (sebastian.gasiorek(a)reactos.org) + */ + +/*++ +* @name DxDdLock +* @implemented +* +* The function DxDdLock locks the surface and calls +* MapMemory driver function to assign surface memory. +* Surface memory is returned in mapMemoryData.fpProcess variable +* +* @param HANDLE hSurface +* Handle to DirectDraw surface +* +* @param PDD_LOCKDATA puLockData +* Structure with lock details +* +* @param HDC hdcClip +* Reserved +* +* @return +* Returns DDHAL_DRIVER_HANDLED or DDHAL_DRIVER_NOTHANDLED. +* +* @remarks. +* Missing lock data and error handling. +*--*/ +DWORD +NTAPI +DxDdLock(HANDLE hSurface, + PDD_LOCKDATA puLockData, + HDC hdcClip) +{ + PEDD_SURFACE pSurface; + PEDD_DIRECTDRAW_LOCAL peDdL; + PEDD_DIRECTDRAW_GLOBAL peDdGl; + DD_MAPMEMORYDATA mapMemoryData; + + pSurface = (PEDD_SURFACE)DdHmgLock(hSurface, ObjType_DDSURFACE_TYPE, TRUE); + peDdL = pSurface->peDirectDrawLocal; + peDdGl = peDdL->peDirectDrawGlobal2; + + // Map memory if it's not already mapped and driver function is provided + if (!peDdL->isMemoryMapped && (peDdGl->ddCallbacks.dwFlags & DDHAL_CB32_MAPMEMORY)) + { + mapMemoryData.bMap = 1; + mapMemoryData.hProcess = (HANDLE)-1; + mapMemoryData.fpProcess = 0; + mapMemoryData.lpDD = (PDD_DIRECTDRAW_GLOBAL)peDdGl; + + peDdGl->ddCallbacks.MapMemory(&mapMemoryData); + + if (!mapMemoryData.ddRVal) + { + peDdL->isMemoryMapped = 1; + peDdL->fpProcess2 = mapMemoryData.fpProcess; + } + } + + if (pSurface) + { + InterlockedExchangeAdd((LONG*)&pSurface->pobj.cExclusiveLock, 0xFFFFFFFF); + } + + puLockData->ddRVal = DD_OK; + + return DDHAL_DRIVER_HANDLED; +} + +/*++ +* @name DxDdUnlock +* @unimplemented +* +* The function DxDdUnlock releases the lock from specified surface +* +* @param HANDLE hSurface +* Handle to DirectDraw surface +* +* @param PDD_UNLOCKDATA puUnlockData +* Structure with lock details +* +* @return +* Returns DDHAL_DRIVER_HANDLED or DDHAL_DRIVER_NOTHANDLED. +* +* @remarks. +* Stub +*--*/ +DWORD +NTAPI +DxDdUnlock(HANDLE hSurface, + PDD_UNLOCKDATA puUnlockData) +{ + puUnlockData->ddRVal = DD_OK; + + return DDHAL_DRIVER_HANDLED; +} Propchange: trunk/reactos/win32ss/reactx/dxg/ddsurf.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/win32ss/reactx/dxg/dxg_driver.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/reactx/dxg/dxg_dri…
============================================================================== --- trunk/reactos/win32ss/reactx/dxg/dxg_driver.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/reactx/dxg/dxg_driver.h [iso-8859-1] Sat Jun 24 13:53:22 2017 @@ -345,15 +345,6 @@ DWORD NTAPI -DxDdLock( - PVOID p1) -{ - TRACE(); - return 0; -} - -DWORD -NTAPI DxDdLockD3D( PVOID p1, PVOID p2) @@ -459,15 +450,6 @@ DxDdUnattachSurface( PVOID p1, PVOID p2) -{ - TRACE(); - return 0; -} - -DWORD -NTAPI -DxDdUnlock( - PVOID p1) { TRACE(); return 0; Modified: trunk/reactos/win32ss/reactx/dxg/dxg_int.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/reactx/dxg/dxg_int…
============================================================================== --- trunk/reactos/win32ss/reactx/dxg/dxg_int.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/reactx/dxg/dxg_int.h [iso-8859-1] Sat Jun 24 13:53:22 2017 @@ -202,6 +202,8 @@ DWORD NTAPI DxDdReenableDirectDrawObject(HANDLE DdHandle, PVOID p2); DWORD NTAPI DxDdCanCreateSurface(HANDLE DdHandle, PDD_CANCREATESURFACEDATA SurfaceData); DWORD NTAPI DxDdCanCreateD3DBuffer(HANDLE DdHandle, PDD_CANCREATESURFACEDATA SurfaceData); +DWORD NTAPI DxDdLock(HANDLE hSurface, PDD_LOCKDATA puLockData, HDC hdcClip); +DWORD NTAPI DxDdUnlock(HANDLE hSurface, PDD_UNLOCKDATA puUnlockData); /* Internal functions */
7 years, 6 months
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
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