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
September 2016
----- 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
18 participants
342 discussions
Start a n
N
ew thread
[akhaldi] 72750: [WS2_32] The current ws2_32 served us well, but it's time for ws2_32_new to shine. It took slightly more than 7 years since Ged brought-in Alex' impressive work on this module, and...
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Sep 20 16:51:28 2016 New Revision: 72750 URL:
http://svn.reactos.org/svn/reactos?rev=72750&view=rev
Log: [WS2_32] The current ws2_32 served us well, but it's time for ws2_32_new to shine. It took slightly more than 7 years since Ged brought-in Alex' impressive work on this module, and thanks to the great follow-up work by Peter Hater, Andreas Maier, Thomas Faber and everyone else involved in the effort, we now have a chance to retire ws2_32 in favor of ws2_32_new. The test results speak for the excellent achievements, and this serves as a platform to continue inspecting and fixing the remaining test failures. Thank you all for a job well done! Please see CORE-10440 for a summary of the changes performed in this commit. Added: trunk/reactos/dll/win32/ws2_32/ - copied from r72749, trunk/reactos/dll/win32/ws2_32_new/ Removed: trunk/reactos/dll/win32/ws2_32_new/ Modified: trunk/reactos/dll/win32/CMakeLists.txt trunk/reactos/dll/win32/ws2_32/CMakeLists.txt trunk/reactos/dll/win32/ws2_32/inc/ws2_32p.h trunk/reactos/dll/win32/ws2_32/src/addrconv.c trunk/reactos/dll/win32/ws2_32/src/addrinfo.c trunk/reactos/dll/win32/ws2_32/src/dcatalog.c trunk/reactos/dll/win32/ws2_32/src/dcatitem.c trunk/reactos/dll/win32/ws2_32/src/dprovide.c trunk/reactos/dll/win32/ws2_32/src/enumprot.c trunk/reactos/dll/win32/ws2_32/src/getproto.c trunk/reactos/dll/win32/ws2_32/src/getxbyxx.c trunk/reactos/dll/win32/ws2_32/src/nscatalo.c trunk/reactos/dll/win32/ws2_32/src/nscatent.c trunk/reactos/dll/win32/ws2_32/src/nsquery.c trunk/reactos/dll/win32/ws2_32/src/rnr.c trunk/reactos/dll/win32/ws2_32/src/send.c trunk/reactos/dll/win32/ws2_32/src/sockctrl.c trunk/reactos/dll/win32/ws2_32/src/socklife.c trunk/reactos/dll/win32/ws2_32/src/startup.c Modified: trunk/reactos/dll/win32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/CMakeLists.txt?r…
============================================================================== --- trunk/reactos/dll/win32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/CMakeLists.txt [iso-8859-1] Tue Sep 20 16:51:28 2016 @@ -247,7 +247,6 @@ add_subdirectory(wmiutils) add_subdirectory(wmvcore) add_subdirectory(ws2_32) -add_subdirectory(ws2_32_new) add_subdirectory(ws2help) add_subdirectory(wshirda) add_subdirectory(wshom.ocx) Modified: trunk/reactos/dll/win32/ws2_32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2_32/CMakeList…
============================================================================== --- trunk/reactos/dll/win32/ws2_32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ws2_32/CMakeLists.txt [iso-8859-1] Tue Sep 20 16:51:28 2016 @@ -1,6 +1,6 @@ add_definitions(-DLE) -spec2def(ws2_32_new.dll ws2_32.spec) +spec2def(ws2_32.dll ws2_32.spec ADD_IMPORTLIB) include_directories( inc @@ -45,13 +45,13 @@ src/wsautil.c inc/ws2_32.h) -add_library(ws2_32_new SHARED +add_library(ws2_32 SHARED ${SOURCE} ws2_32.rc - ${CMAKE_CURRENT_BINARY_DIR}/ws2_32_new.def) + ${CMAKE_CURRENT_BINARY_DIR}/ws2_32.def) -set_module_type(ws2_32_new win32dll) -target_link_libraries(ws2_32_new ${PSEH_LIB}) -add_importlibs(ws2_32_new user32 advapi32 ws2help msvcrt kernel32 ntdll) -add_pch(ws2_32_new inc/ws2_32.h SOURCE) -add_cd_file(TARGET ws2_32_new DESTINATION reactos/system32 FOR all) +set_module_type(ws2_32 win32dll) +target_link_libraries(ws2_32 ${PSEH_LIB}) +add_importlibs(ws2_32 user32 advapi32 ws2help msvcrt kernel32 ntdll) +add_pch(ws2_32 inc/ws2_32.h SOURCE) +add_cd_file(TARGET ws2_32 DESTINATION reactos/system32 FOR all) Modified: trunk/reactos/dll/win32/ws2_32/inc/ws2_32p.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2_32/inc/ws2_3…
============================================================================== --- trunk/reactos/dll/win32/ws2_32/inc/ws2_32p.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ws2_32/inc/ws2_32p.h [iso-8859-1] Tue Sep 20 16:51:28 2016 @@ -79,6 +79,7 @@ LONG RefCount; WSPPROC_TABLE Service; HINSTANCE DllHandle; + WSPUPCALLTABLE UpcallTable; } TPROVIDER, *PTPROVIDER; typedef struct _TCATALOG_ENTRY @@ -210,6 +211,17 @@ PNSCATALOG Catalog; } ENUM_CONTEXT, *PENUM_CONTEXT; +typedef struct _NSPROVIDER_ENUM_CONTEXT +{ + LPINT Protocols; + LPVOID ProtocolBuffer; + DWORD BufferLength; + DWORD BufferUsed; + DWORD Count; + BOOLEAN Unicode; + INT ErrorCode; +} NSPROVIDER_ENUM_CONTEXT, *PNSPROVIDER_ENUM_CONTEXT; + typedef struct _PROTOCOL_ENUM_CONTEXT { LPINT Protocols; Modified: trunk/reactos/dll/win32/ws2_32/src/addrconv.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2_32/src/addrc…
============================================================================== --- trunk/reactos/dll/win32/ws2_32/src/addrconv.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ws2_32/src/addrconv.c [iso-8859-1] Tue Sep 20 16:51:28 2016 @@ -73,6 +73,8 @@ register u_long val, base, n; register unsigned char c; u_long parts[4], *pp = parts; + if (!cp) return INADDR_ANY; + if (!isdigit(*cp)) return INADDR_NONE; again: /* @@ -144,7 +146,7 @@ break; default: - return (-1); + return (INADDR_NONE); } val = htonl(val); return (val); Modified: trunk/reactos/dll/win32/ws2_32/src/addrinfo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2_32/src/addri…
============================================================================== --- trunk/reactos/dll/win32/ws2_32/src/addrinfo.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ws2_32/src/addrinfo.c [iso-8859-1] Tue Sep 20 16:51:28 2016 @@ -90,17 +90,76 @@ ParseV4Address(IN PCWSTR AddressString, OUT PDWORD pAddress) { - IN_ADDR Address; - PCWSTR Terminator; - NTSTATUS Status; - - *pAddress = 0; - Status = RtlIpv4StringToAddressW(AddressString, FALSE, &Terminator, &Address); - - if (!NT_SUCCESS(Status)) + CHAR AnsiAddressString[MAX_HOSTNAME_LEN]; + CHAR * cp = AnsiAddressString; + DWORD val, base; + unsigned char c; + DWORD parts[4], *pp = parts; + if (!AddressString) return FALSE; - - *pAddress = Address.S_un.S_addr; + WideCharToMultiByte(CP_ACP, + 0, + AddressString, + -1, + AnsiAddressString, + sizeof(AnsiAddressString), + NULL, + 0); + if (!isdigit(*cp)) return FALSE; + +again: + /* + * Collect number up to ``.''. + * Values are specified as for C: + * 0x=hex, 0=octal, other=decimal. + */ + val = 0; base = 10; + if (*cp == '0') { + if (*++cp == 'x' || *cp == 'X') + base = 16, cp++; + else + base = 8; + } + while ((c = *cp)) { + if (isdigit(c)) { + val = (val * base) + (c - '0'); + cp++; + continue; + } + if (base == 16 && isxdigit(c)) { + val = (val << 4) + (c + 10 - (islower(c) ? 'a' : 'A')); + cp++; + continue; + } + break; + } + if (*cp == '.') { + /* + * Internet format: + * a.b.c.d + */ + if (pp >= parts + 4) return FALSE; + *pp++ = val; + cp++; + goto again; + } + /* + * Check for trailing characters. + */ + if (*cp) return FALSE; + + *pp++ = val; + /* + * Concoct the address according to + * the number of parts specified. + */ + if ((DWORD)(pp - parts) != 4) return FALSE; + if (parts[0] > 0xff || parts[1] > 0xff || parts[2] > 0xff || parts[3] > 0xff) return FALSE; + val = (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8) | parts[3]; + + if (pAddress) + *pAddress = htonl(val); + return TRUE; } @@ -530,7 +589,7 @@ pszServiceName, -1, AnsiServiceName, - 256, + sizeof(AnsiServiceName), NULL, 0); @@ -543,6 +602,7 @@ /* Get the port directly */ wPort = wTcpPort = wUdpPort = htons(wPort); +#if 0 /* Check if this is both TCP and UDP */ if (iSocketType == 0) { @@ -550,9 +610,11 @@ bClone = TRUE; iSocketType = SOCK_STREAM; } +#endif } else { + wPort = 0; /* The port name was a string. Check if this is a UDP socket */ if ((iSocketType == 0) || (iSocketType == SOCK_DGRAM)) { @@ -576,15 +638,18 @@ /* If we got 0, then fail */ if (wPort == 0) { - return iSocketType ? EAI_SERVICE : EAI_NONAME; + return EAI_SERVICE; } /* Check if this was for both */ if (iSocketType == 0) { /* Do the TCP case right now */ - iSocketType = (wTcpPort) ? SOCK_STREAM : SOCK_DGRAM; - bClone = (wTcpPort && wUdpPort); + if (wTcpPort && !wUdpPort) + iSocketType = SOCK_STREAM; + if (!wTcpPort && wUdpPort) + iSocketType = SOCK_DGRAM; + //bClone = (wTcpPort && wUdpPort); } } } @@ -612,7 +677,7 @@ /* Set AI_NUMERICHOST since this is a numeric string */ (*pptResult)->ai_flags |= AI_NUMERICHOST; - /* Check if the canonical name was requestd */ + /* Check if the canonical name was requested */ if (iFlags & AI_CANONNAME) { /* Get the canonical name */ @@ -657,7 +722,7 @@ pszNodeName, -1, AnsiNodeName, - 256, + sizeof(AnsiNodeName), NULL, 0); @@ -736,23 +801,23 @@ struct addrinfo FAR * FAR *res) { INT ErrorCode; - LPWSTR UnicodeNodeName; + LPWSTR UnicodeNodeName = NULL; LPWSTR UnicodeServName = NULL; DPRINT("getaddrinfo: %s, %s, %p, %p\n", nodename, servname, hints, res); /* Check for WSAStartup */ if ((ErrorCode = WsQuickProlog()) != ERROR_SUCCESS) return ErrorCode; - /* Assume NULL */ - *res = NULL; - /* Convert the node name */ - UnicodeNodeName = UnicodeDupFromAnsi((LPSTR)nodename); - if (!UnicodeNodeName) - { - /* Prepare to fail */ - ErrorCode = GetLastError(); - goto Quickie; + if (nodename) + { + UnicodeNodeName = UnicodeDupFromAnsi((LPSTR)nodename); + if (!UnicodeNodeName) + { + /* Prepare to fail */ + ErrorCode = GetLastError(); + goto Quickie; + } } /* Convert the servname too, if we have one */ @@ -937,7 +1002,7 @@ { /* Setup the data for it */ ServiceString = ServiceBuffer; - ServLength = sizeof(ServiceBuffer) / sizeof(WCHAR); + ServLength = sizeof(ServiceBuffer) - 1; } /* Now call the unicode function */ Modified: trunk/reactos/dll/win32/ws2_32/src/dcatalog.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2_32/src/dcata…
============================================================================== --- trunk/reactos/dll/win32/ws2_32/src/dcatalog.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ws2_32/src/dcatalog.c [iso-8859-1] Tue Sep 20 16:51:28 2016 @@ -10,9 +10,10 @@ #include <ws2_32.h> +#define NDEBUG +#include <debug.h> + /* DATA **********************************************************************/ - -#define TCCATALOG_NAME "Protocol_Catalog9" #define WsTcLock() EnterCriticalSection((LPCRITICAL_SECTION)&Catalog->Lock); #define WsTcUnlock() LeaveCriticalSection((LPCRITICAL_SECTION)&Catalog->Lock); @@ -45,14 +46,33 @@ DWORD RegSize = sizeof(DWORD); DWORD UniqueId = 0; DWORD NewData = 0; + CHAR* CatalogKeyName; /* Initialize the catalog lock and namespace list */ InitializeCriticalSection((LPCRITICAL_SECTION)&Catalog->Lock); InitializeListHead(&Catalog->ProtocolList); + /* Read the catalog name */ + ErrorCode = RegQueryValueEx(ParentKey, + "Current_Protocol_Catalog", + 0, + &RegType, + NULL, + &RegSize); + + CatalogKeyName = HeapAlloc(WsSockHeap, 0, RegSize); + + /* Read the catalog name */ + ErrorCode = RegQueryValueEx(ParentKey, + "Current_Protocol_Catalog", + 0, + &RegType, + (LPBYTE)CatalogKeyName, + &RegSize); + /* Open the Catalog Key */ ErrorCode = RegOpenKeyEx(ParentKey, - TCCATALOG_NAME, + CatalogKeyName, 0, MAXIMUM_ALLOWED, &CatalogKey); @@ -67,7 +87,7 @@ { /* Create the Catalog Name */ ErrorCode = RegCreateKeyEx(ParentKey, - TCCATALOG_NAME, + CatalogKeyName, 0, NULL, REG_OPTION_NON_VOLATILE, @@ -76,6 +96,10 @@ &CatalogKey, &CreateDisposition); } + + HeapFree(WsSockHeap, 0, CatalogKeyName); + RegType = REG_DWORD; + RegSize = sizeof(DWORD); /* Fail if that didn't work */ if (ErrorCode != ERROR_SUCCESS) return FALSE; @@ -149,6 +173,7 @@ } else { + RegSize = sizeof(DWORD); /* Read the serial number */ ErrorCode = RegQueryValueEx(CatalogKey, "Serial_Access_Num", @@ -409,6 +434,7 @@ IN DWORD CatalogEntryId, IN PTCATALOG_ENTRY *CatalogEntry) { + INT ErrorCode = WSAEINVAL; PLIST_ENTRY NextEntry = Catalog->ProtocolList.Flink; PTCATALOG_ENTRY Entry; @@ -435,6 +461,7 @@ /* Reference the entry and return it */ InterlockedIncrement(&Entry->RefCount); *CatalogEntry = Entry; + ErrorCode = ERROR_SUCCESS; break; } } @@ -443,7 +470,7 @@ WsTcUnlock(); /* Return */ - return ERROR_SUCCESS; + return ErrorCode; } DWORD @@ -458,6 +485,7 @@ INT ErrorCode = WSAEINVAL; PLIST_ENTRY NextEntry = Catalog->ProtocolList.Flink; PTCATALOG_ENTRY Entry; + DPRINT("WsTcGetEntryFromTriplet: %lx, %lx, %lx, %lx\n", af, type, protocol, StartId); /* Assume failure */ *CatalogEntry = NULL; @@ -494,9 +522,9 @@ if ((Entry->ProtocolInfo.iSocketType == type) || (type == 0)) { /* Check if Protocol is In Range or if it's wildcard */ - if (((Entry->ProtocolInfo.iProtocol >= protocol) && + if (((Entry->ProtocolInfo.iProtocol <= protocol) && ((Entry->ProtocolInfo.iProtocol + - Entry->ProtocolInfo.iProtocolMaxOffset) <= protocol)) || + Entry->ProtocolInfo.iProtocolMaxOffset) >= protocol)) || (protocol == 0)) { /* Check if it doesn't already have a provider */ @@ -580,6 +608,7 @@ { INT ErrorCode = ERROR_SUCCESS; PTPROVIDER Provider; + DPRINT("WsTcLoadProvider: %p, %p\n", Catalog, CatalogEntry); /* Lock the catalog */ WsTcLock(); Modified: trunk/reactos/dll/win32/ws2_32/src/dcatitem.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2_32/src/dcati…
============================================================================== --- trunk/reactos/dll/win32/ws2_32/src/dcatitem.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ws2_32/src/dcatitem.c [iso-8859-1] Tue Sep 20 16:51:28 2016 @@ -67,6 +67,8 @@ DWORD RegType = REG_BINARY; HKEY EntryKey; DWORD Return; + LPBYTE Buf; + DWORD index; /* Convert to a 00000xxx string */ sprintf(CatalogEntryName, "%0""12""lu", UniqueId); @@ -79,20 +81,33 @@ &EntryKey); /* Get Size of Catalog Entry Structure */ - Return = RegQueryValueExW(EntryKey, - L"PackedCatalogItem", + Return = RegQueryValueEx(EntryKey, + "PackedCatalogItem", 0, NULL, NULL, &RegSize); + if(!(Buf = HeapAlloc(WsSockHeap, HEAP_ZERO_MEMORY, RegSize))) + return ERROR_NOT_ENOUGH_MEMORY; + /* Read the Whole Catalog Entry Structure */ - Return = RegQueryValueExW(EntryKey, - L"PackedCatalogItem", + Return = RegQueryValueEx(EntryKey, + "PackedCatalogItem", 0, &RegType, - (LPBYTE)&CatalogEntry->DllPath, + Buf, &RegSize); + + + memcpy(CatalogEntry->DllPath, (LPCSTR)Buf, sizeof(CatalogEntry->DllPath)); + index = sizeof(CatalogEntry->DllPath); + if(index < RegSize) + { + memcpy(&CatalogEntry->ProtocolInfo, &Buf[index], sizeof(WSAPROTOCOL_INFOW)); + index += sizeof(WSAPROTOCOL_INFOW); + } + HeapFree(WsSockHeap, 0, Buf); /* Done */ RegCloseKey(EntryKey); Modified: trunk/reactos/dll/win32/ws2_32/src/dprovide.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2_32/src/dprov…
============================================================================== --- trunk/reactos/dll/win32/ws2_32/src/dprovide.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ws2_32/src/dprovide.c [iso-8859-1] Tue Sep 20 16:51:28 2016 @@ -10,6 +10,9 @@ #include <ws2_32.h> +#define NDEBUG +#include <debug.h> + /* FUNCTIONS *****************************************************************/ PTPROVIDER @@ -18,6 +21,7 @@ { PTPROVIDER Provider; + DPRINT("WsTpAllocate: WsSockHeap %d\n", WsSockHeap); /* Allocate the object */ Provider = HeapAlloc(WsSockHeap, HEAP_ZERO_MEMORY, sizeof(*Provider)); @@ -35,31 +39,32 @@ IN LPWSAPROTOCOL_INFOW ProtocolInfo) { WORD VersionRequested = MAKEWORD(2,2); - WSPUPCALLTABLE UpcallTable; LPWSPSTARTUP WSPStartupProc; WSPDATA WspData; CHAR ExpandedDllPath[MAX_PATH]; + DWORD ErrorCode; + DPRINT("WsTpInitialize: %p, %p, %p\n", Provider, DllName, ProtocolInfo); /* Clear the tables */ - RtlZeroMemory(&UpcallTable, sizeof(UpcallTable)); + RtlZeroMemory(&Provider->UpcallTable, sizeof(WSPUPCALLTABLE)); RtlZeroMemory(&Provider->Service.lpWSPAccept, sizeof(WSPPROC_TABLE)); /* Set up the Upcall Table */ - UpcallTable.lpWPUCloseEvent = WPUCloseEvent; - UpcallTable.lpWPUCloseSocketHandle = WPUCloseSocketHandle; - UpcallTable.lpWPUCreateEvent = WPUCreateEvent; - UpcallTable.lpWPUCreateSocketHandle = WPUCreateSocketHandle; - UpcallTable.lpWPUFDIsSet = WPUFDIsSet; - UpcallTable.lpWPUGetProviderPath = WPUGetProviderPath; - UpcallTable.lpWPUModifyIFSHandle = WPUModifyIFSHandle; - UpcallTable.lpWPUPostMessage = WPUPostMessage; - UpcallTable.lpWPUQueryBlockingCallback = WPUQueryBlockingCallback; - UpcallTable.lpWPUQuerySocketHandleContext = WPUQuerySocketHandleContext; - UpcallTable.lpWPUQueueApc = WPUQueueApc; - UpcallTable.lpWPUResetEvent = WPUResetEvent; - UpcallTable.lpWPUSetEvent = WPUSetEvent; - UpcallTable.lpWPUOpenCurrentThread = WPUOpenCurrentThread; - UpcallTable.lpWPUCloseThread = WPUCloseThread; + Provider->UpcallTable.lpWPUCloseEvent = WPUCloseEvent; + Provider->UpcallTable.lpWPUCloseSocketHandle = WPUCloseSocketHandle; + Provider->UpcallTable.lpWPUCreateEvent = WPUCreateEvent; + Provider->UpcallTable.lpWPUCreateSocketHandle = WPUCreateSocketHandle; + Provider->UpcallTable.lpWPUFDIsSet = WPUFDIsSet; + Provider->UpcallTable.lpWPUGetProviderPath = WPUGetProviderPath; + Provider->UpcallTable.lpWPUModifyIFSHandle = WPUModifyIFSHandle; + Provider->UpcallTable.lpWPUPostMessage = WPUPostMessage; + Provider->UpcallTable.lpWPUQueryBlockingCallback = WPUQueryBlockingCallback; + Provider->UpcallTable.lpWPUQuerySocketHandleContext = WPUQuerySocketHandleContext; + Provider->UpcallTable.lpWPUQueueApc = WPUQueueApc; + Provider->UpcallTable.lpWPUResetEvent = WPUResetEvent; + Provider->UpcallTable.lpWPUSetEvent = WPUSetEvent; + Provider->UpcallTable.lpWPUOpenCurrentThread = WPUOpenCurrentThread; + Provider->UpcallTable.lpWPUCloseThread = WPUCloseThread; /* Expand the DLL Path */ ExpandEnvironmentStrings(DllName, ExpandedDllPath, MAX_PATH); @@ -67,18 +72,26 @@ /* Load the DLL */ Provider->DllHandle = LoadLibrary(ExpandedDllPath); + if(!Provider->DllHandle) + { + return SOCKET_ERROR; + } /* Get the pointer to WSPStartup */ WSPStartupProc = (LPWSPSTARTUP)GetProcAddress(Provider->DllHandle, "WSPStartup"); + if(!WSPStartupProc) + { + return SOCKET_ERROR; + } /* Call it */ - (*WSPStartupProc)(VersionRequested, + ErrorCode = (*WSPStartupProc)(VersionRequested, &WspData, ProtocolInfo, - UpcallTable, + Provider->UpcallTable, (LPWSPPROC_TABLE)&Provider->Service.lpWSPAccept); /* Return */ - return ERROR_SUCCESS; + return ErrorCode; } DWORD Modified: trunk/reactos/dll/win32/ws2_32/src/enumprot.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2_32/src/enump…
============================================================================== --- trunk/reactos/dll/win32/ws2_32/src/enumprot.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ws2_32/src/enumprot.c [iso-8859-1] Tue Sep 20 16:51:28 2016 @@ -31,7 +31,7 @@ ProtocolId = ProtocolSet[i]; /* Loop the list */ - while (ProtocolId != 0) + while (ProtocolId != 0 && ProtocolInfo->iProtocol != 0) { /* Check if it's within ranges */ if ((ProtocolId >= ProtocolInfo->iProtocol) && @@ -188,7 +188,7 @@ } /* - * @unimplemented + * @implemented */ INT WSAAPI @@ -196,14 +196,46 @@ OUT LPWSAPROTOCOL_INFOA lpProtocolBuffer, IN OUT LPDWORD lpdwBufferLength) { - DPRINT("WSAEnumProtocolsA: %p\n", lpiProtocols); - UNIMPLEMENTED; - SetLastError(WSAEINVAL); - return SOCKET_ERROR; -} - -/* - * @unimplemented + INT error, i, count; + LPWSAPROTOCOL_INFOW protocolInfoW; + DWORD size; + DPRINT("WSAEnumProtocolsA: %p %p %p\n", lpiProtocols, lpProtocolBuffer, lpdwBufferLength); + if (!lpdwBufferLength) + { + SetLastError(WSAENOBUFS); + return SOCKET_ERROR; + } + count = WSCEnumProtocols(lpiProtocols, NULL, &size, &error); + if (!lpProtocolBuffer || *lpdwBufferLength < (size/sizeof(WSAPROTOCOL_INFOW))*sizeof(WSAPROTOCOL_INFOA)) + { + *lpdwBufferLength = (size/sizeof(WSAPROTOCOL_INFOW))*sizeof(WSAPROTOCOL_INFOA); + SetLastError(WSAENOBUFS); + return SOCKET_ERROR; + } + protocolInfoW = HeapAlloc(WsSockHeap, 0, size); + count = WSCEnumProtocols(lpiProtocols, protocolInfoW, &size, &error); + if (SOCKET_ERROR == count) + { + HeapFree(WsSockHeap, 0, protocolInfoW); + SetLastError(error); + return SOCKET_ERROR; + } + *lpdwBufferLength = 0; + for (i = 0; i < count; i++) + { + /* Copy the data */ + RtlMoveMemory(&lpProtocolBuffer[i], + &protocolInfoW[i], + sizeof(lpProtocolBuffer[0])-sizeof(lpProtocolBuffer[0].szProtocol)); + wcstombs(lpProtocolBuffer[i].szProtocol, protocolInfoW[i].szProtocol, sizeof(lpProtocolBuffer[0].szProtocol)); + *lpdwBufferLength += sizeof(WSAPROTOCOL_INFOA); + } + HeapFree(WsSockHeap, 0, protocolInfoW); + return i; +} + +/* + * @implemented */ INT WSAAPI @@ -211,14 +243,20 @@ OUT LPWSAPROTOCOL_INFOW lpProtocolBuffer, IN OUT LPDWORD lpdwBufferLength) { - DPRINT("WSAEnumProtocolsW: %p\n", lpiProtocols); - UNIMPLEMENTED; - SetLastError(WSAEINVAL); - return SOCKET_ERROR; -} - -/* - * @unimplemented + INT error, count; + DPRINT("WSAEnumProtocolsW: %p %p %p\n", lpiProtocols, lpProtocolBuffer, lpdwBufferLength); + count = WSCEnumProtocols(lpiProtocols, lpProtocolBuffer, lpdwBufferLength, &error); + if (SOCKET_ERROR == count) + { + SetLastError(error); + return SOCKET_ERROR; + } + return count; +} + + +/* + * @implemented */ INT WSPAPI @@ -227,13 +265,11 @@ IN OUT LPINT lpProviderDllPathLen, OUT LPINT lpErrno) { - DPRINT("WPUGetProviderPath: %p\n", lpProviderId); - UNIMPLEMENTED; - return 0; -} - -/* - * @unimplemented + return WSCGetProviderPath(lpProviderId, lpszProviderDllPath, lpProviderDllPathLen, lpErrno); +} + +/* + * @implemented */ INT WSAAPI @@ -257,7 +293,7 @@ IN OUT LPINT lpProviderDllPathLen, OUT LPINT lpErrno) { - DPRINT("WSCGetProviderPath: %p\n", lpProviderId); + DPRINT("WSCGetProviderPath: %p %p %p %p\n", lpProviderId, lpszProviderDllPath, lpProviderDllPathLen, lpErrno); UNIMPLEMENTED; SetLastError(WSAEINVAL); return SOCKET_ERROR; Modified: trunk/reactos/dll/win32/ws2_32/src/getproto.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2_32/src/getpr…
============================================================================== --- trunk/reactos/dll/win32/ws2_32/src/getproto.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ws2_32/src/getproto.c [iso-8859-1] Tue Sep 20 16:51:28 2016 @@ -19,12 +19,17 @@ WSAAPI GetProtoOpenNetworkDatabase(PCHAR Name) { - CHAR ExpandedPath[MAX_PATH]; - CHAR DatabasePath[MAX_PATH]; + PCHAR ExpandedPath; + PCHAR DatabasePath; INT ErrorCode; HKEY DatabaseKey; DWORD RegType; - DWORD RegSize = sizeof(DatabasePath); + DWORD RegSize = 0; + HANDLE ret; + + ExpandedPath = HeapAlloc(WsSockHeap, 0, MAX_PATH); + if (!ExpandedPath) + return INVALID_HANDLE_VALUE; /* Open the database path key */ ErrorCode = RegOpenKeyEx(HKEY_LOCAL_MACHINE, @@ -39,40 +44,66 @@ "DatabasePath", NULL, &RegType, + NULL, + &RegSize); + + DatabasePath = HeapAlloc(WsSockHeap, 0, RegSize); + if (!DatabasePath) + { + HeapFree(WsSockHeap, 0, ExpandedPath); + return INVALID_HANDLE_VALUE; + } + + /* Read the actual path */ + ErrorCode = RegQueryValueEx(DatabaseKey, + "DatabasePath", + NULL, + &RegType, (LPBYTE)DatabasePath, &RegSize); + /* Close the key */ RegCloseKey(DatabaseKey); /* Expand the name */ ExpandEnvironmentStrings(DatabasePath, ExpandedPath, MAX_PATH); + + HeapFree(WsSockHeap, 0, DatabasePath); } else { /* Use defalt path */ GetSystemDirectory(ExpandedPath, MAX_PATH); - strcat(ExpandedPath, "DRIVERS\\ETC\\"); + if (ExpandedPath[strlen(ExpandedPath) - 1] != '\\') + { + /* It isn't, so add it ourselves */ + strncat(ExpandedPath, "\\", MAX_PATH); + } + strncat(ExpandedPath, "DRIVERS\\ETC\\", MAX_PATH); } /* Make sure that the path is backslash-terminated */ if (ExpandedPath[strlen(ExpandedPath) - 1] != '\\') { /* It isn't, so add it ourselves */ - strcat(ExpandedPath, "\\"); + strncat(ExpandedPath, "\\", MAX_PATH); } /* Add the database name */ - strcat(ExpandedPath, Name); + strncat(ExpandedPath, Name, MAX_PATH); /* Return a handle to the file */ - return CreateFile(ExpandedPath, + ret = CreateFile(ExpandedPath, FILE_READ_ACCESS, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + + HeapFree(WsSockHeap, 0, ExpandedPath); + return ret; } PCHAR @@ -118,9 +149,6 @@ &Read, NULL)) return NULL; - /* Null terminate LineBuffer */ - Buffer->LineBuffer[Read] = ANSI_NULL; - /* Find out where the line ends */ p1 = Buffer->LineBuffer; p = strchr(Buffer->LineBuffer, '\n'); @@ -215,7 +243,7 @@ PWSTHREAD Thread; INT ErrorCode; PPROTOENT Protoent; - PVOID GetProtoBuffer; + PVOID GetProtoBuffer; HANDLE DbHandle; DPRINT("getprotobynumber: %lx\n", number); @@ -279,7 +307,7 @@ PWSTHREAD Thread; INT ErrorCode; PPROTOENT Protoent; - PVOID GetProtoBuffer; + PVOID GetProtoBuffer; HANDLE DbHandle; DPRINT("getprotobyname: %s\n", name); Modified: trunk/reactos/dll/win32/ws2_32/src/getxbyxx.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2_32/src/getxb…
============================================================================== --- trunk/reactos/dll/win32/ws2_32/src/getxbyxx.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ws2_32/src/getxbyxx.c [iso-8859-1] Tue Sep 20 16:51:28 2016 @@ -108,9 +108,11 @@ { PWSAQUERYSETA WsaQuery = (PWSAQUERYSETA)*Results; INT ErrorCode; + DWORD NewLength = Length; HANDLE RnRHandle; LPBLOB Blob = NULL; - PVOID NewResults; + PVOID NewResults = NULL; + DWORD dwControlFlags = LUP_RETURN_NAME; /* Assume empty return name */ if (NewName) *NewName = NULL; @@ -121,12 +123,15 @@ WsaQuery->lpszServiceInstanceName = Name; WsaQuery->lpServiceClassId = (LPGUID)Type; WsaQuery->dwNameSpace = NS_ALL; - WsaQuery->dwNumberOfProtocols = 2; - WsaQuery->lpafpProtocols = &afp[0]; + WsaQuery->dwNumberOfProtocols = sizeof(afp)/sizeof(afp[0]); + WsaQuery->lpafpProtocols = afp; + + if(!IsEqualGUID(Type, &HostnameGuid)) + dwControlFlags |= LUP_RETURN_BLOB; /* Send the Query Request to find a Service */ ErrorCode = WSALookupServiceBeginA(WsaQuery, - LUP_RETURN_BLOB | LUP_RETURN_NAME, + dwControlFlags, &RnRHandle); if(ErrorCode == ERROR_SUCCESS) @@ -136,7 +141,7 @@ /* Service was found, send the real query */ ErrorCode = WSALookupServiceNextA(RnRHandle, 0, - &Length, + &NewLength, WsaQuery); /* Return the information requested */ @@ -152,7 +157,7 @@ else { /* Check if this was a Hostname lookup */ - if (Type == &HostnameGuid) + if (IsEqualGUID(Type, &HostnameGuid)) { /* Return the name anyways */ if(NewName) *NewName = WsaQuery->lpszServiceInstanceName; @@ -368,7 +373,7 @@ else { /* We failed, so zero it out */ - Hostent = 0; + Hostent = NULL; /* Normalize the error message */ if(GetLastError() == WSASERVICE_NOT_FOUND) @@ -390,18 +395,25 @@ INT WSAAPI gethostname(OUT char FAR * name, - IN int namelen) -{ - PCHAR Name; + IN INT namelen) +{ + PCHAR Name = NULL; CHAR ResultsBuffer[RNR_BUFFER_SIZE]; PCHAR Results = ResultsBuffer; DPRINT("gethostname: %p\n", name); + if (!name || namelen < 1) + { + SetLastError(WSAEFAULT); + return SOCKET_ERROR; + } /* Get the Hostname in a String */ - if(getxyDataEnt(&Results, RNR_BUFFER_SIZE, NULL, &HostnameGuid, &Name)) + /* getxyDataEnt does not return blob for HostnameGuid */ + getxyDataEnt(&Results, RNR_BUFFER_SIZE, NULL, &HostnameGuid, &Name); + if(Name) { /* Copy it */ - strcpy((LPSTR)name, Name); + strncpy((LPSTR)name, Name, namelen-1); } /* Check if we received a newly allocated buffer; free it. */ @@ -450,7 +462,7 @@ } /* Put it into the right syntax */ - sprintf(PortName, "%d/%s", (port & 0xffff), proto); + sprintf(PortName, "%d/%s", (ntohs(port) & 0xffff), proto); /* Get the Service in a Blob */ Blob = getxyDataEnt(&Results, RNR_BUFFER_SIZE, PortName, &IANAGuid, 0); @@ -471,9 +483,6 @@ { /* We failed, so zero it out */ Servent = 0; - - /* Normalize the error message */ - if(GetLastError() == WSATYPE_NOT_FOUND) SetLastError(WSANO_DATA); } /* Check if we received a newly allocated buffer; free it. */ @@ -543,9 +552,6 @@ { /* We failed, so zero it out */ Servent = 0; - - /* Normalize the error message */ - if(GetLastError() == WSATYPE_NOT_FOUND) SetLastError(WSANO_DATA); } /* Check if we received a newly allocated buffer; free it. */ Modified: trunk/reactos/dll/win32/ws2_32/src/nscatalo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2_32/src/nscat…
============================================================================== --- trunk/reactos/dll/win32/ws2_32/src/nscatalo.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ws2_32/src/nscatalo.c [iso-8859-1] Tue Sep 20 16:51:28 2016 @@ -10,9 +10,11 @@ #include <ws2_32.h> +#define NDEBUG +#include <debug.h> + /* DATA **********************************************************************/ -#define NSCATALOG_NAME "NameSpace_Catalog5" #define WsNcLock() EnterCriticalSection((LPCRITICAL_SECTION)&Catalog->Lock); #define WsNcUnlock() LeaveCriticalSection((LPCRITICAL_SECTION)&Catalog->Lock); @@ -39,19 +41,37 @@ LONG ErrorCode; DWORD CreateDisposition; HKEY CatalogKey, NewKey; - //DWORD CatalogEntries = 0; DWORD RegType = REG_DWORD; DWORD RegSize = sizeof(DWORD); DWORD UniqueId = 0; DWORD NewData = 0; + CHAR* CatalogKeyName; /* Initialize the catalog lock and namespace list */ InitializeCriticalSection((LPCRITICAL_SECTION)&Catalog->Lock); InitializeListHead(&Catalog->CatalogList); + /* Read the catalog name */ + ErrorCode = RegQueryValueEx(ParentKey, + "Current_NameSpace_Catalog", + 0, + &RegType, + NULL, + &RegSize); + + CatalogKeyName = HeapAlloc(WsSockHeap, 0, RegSize); + + /* Read the catalog name */ + ErrorCode = RegQueryValueEx(ParentKey, + "Current_NameSpace_Catalog", + 0, + &RegType, + (LPBYTE)CatalogKeyName, + &RegSize); + /* Open the Catalog Key */ ErrorCode = RegOpenKeyEx(ParentKey, - NSCATALOG_NAME, + CatalogKeyName, 0, MAXIMUM_ALLOWED, &CatalogKey); @@ -66,7 +86,7 @@ { /* Create the Catalog Name */ ErrorCode = RegCreateKeyEx(ParentKey, - NSCATALOG_NAME, + CatalogKeyName, 0, NULL, REG_OPTION_NON_VOLATILE, @@ -75,6 +95,10 @@ &CatalogKey, &CreateDisposition); } + + HeapFree(WsSockHeap, 0, CatalogKeyName); + RegType = REG_DWORD; + RegSize = sizeof(DWORD); /* Fail if that didn't work */ if (ErrorCode != ERROR_SUCCESS) return FALSE; @@ -133,6 +157,7 @@ } else { + RegSize = sizeof(UniqueId); /* Read the serial number */ ErrorCode = RegQueryValueEx(CatalogKey, "Serial_Access_Num", Modified: trunk/reactos/dll/win32/ws2_32/src/nscatent.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2_32/src/nscat…
============================================================================== --- trunk/reactos/dll/win32/ws2_32/src/nscatent.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ws2_32/src/nscatent.c [iso-8859-1] Tue Sep 20 16:51:28 2016 @@ -64,103 +64,108 @@ IN HKEY ParentKey, IN ULONG UniqueId) { + INT ErrorCode; CHAR CatalogEntryName[13]; HKEY EntryKey; ULONG RegType = REG_SZ; ULONG RegSize = MAX_PATH; + ULONG RegValue; /* Convert to a 00000xxx string */ sprintf(CatalogEntryName, "%0""12""i", (int)UniqueId); /* Open the Entry */ - RegOpenKeyEx(ParentKey, - CatalogEntryName, - 0, - KEY_READ, - &EntryKey); - + ErrorCode = RegOpenKeyEx(ParentKey, + CatalogEntryName, + 0, + KEY_READ, + &EntryKey); + if (ErrorCode != ERROR_SUCCESS) return ErrorCode; /* Read the Library Path */ - RegQueryValueExW(EntryKey, - L"LibraryPath", - 0, - &RegType, - (LPBYTE)&CatalogEntry->DllPath, - &RegSize); - + ErrorCode = RegQueryValueExW(EntryKey, + L"LibraryPath", + 0, + &RegType, + (LPBYTE)&CatalogEntry->DllPath, + &RegSize); + if (ErrorCode != ERROR_SUCCESS) goto out; /* Query Display String Size*/ - RegQueryValueExW(EntryKey, - L"DisplayString", - 0, - NULL, - NULL, - &RegSize); - + ErrorCode = RegQueryValueExW(EntryKey, + L"DisplayString", + 0, + NULL, + NULL, + &RegSize); + if (ErrorCode != ERROR_SUCCESS) goto out; /* Allocate it */ CatalogEntry->ProviderName = (LPWSTR)HeapAlloc(WsSockHeap, 0, RegSize); /* Read it */ - RegQueryValueExW(EntryKey, - L"DisplayString", - 0, - &RegType, - (LPBYTE)CatalogEntry->ProviderName, - &RegSize); - + ErrorCode = RegQueryValueExW(EntryKey, + L"DisplayString", + 0, + &RegType, + (LPBYTE)CatalogEntry->ProviderName, + &RegSize); + if (ErrorCode != ERROR_SUCCESS) goto out; /* Read the Provider Id */ RegType = REG_BINARY; RegSize = sizeof(GUID); - RegQueryValueEx(EntryKey, - "ProviderId", - 0, - &RegType, - (LPBYTE)&CatalogEntry->ProviderId, - &RegSize); - + ErrorCode = RegQueryValueEx(EntryKey, + "ProviderId", + 0, + &RegType, + (LPBYTE)&CatalogEntry->ProviderId, + &RegSize); + if (ErrorCode != ERROR_SUCCESS) goto out; /* Read the Address Family */ RegType = REG_DWORD; RegSize = sizeof(DWORD); - RegQueryValueEx(EntryKey, - "AddressFamily", - 0, - &RegType, - (LPBYTE)&CatalogEntry->AddressFamily, - &RegSize); - + ErrorCode = RegQueryValueEx(EntryKey, + "AddressFamily", + 0, + &RegType, + (LPBYTE)&CatalogEntry->AddressFamily, + &RegSize); + if (ErrorCode != ERROR_SUCCESS) goto out; /* Read the Namespace Id */ - RegQueryValueEx(EntryKey, - "SupportedNamespace", - 0, - &RegType, - (LPBYTE)&CatalogEntry->NamespaceId, - &RegSize); - + ErrorCode = RegQueryValueEx(EntryKey, + "SupportedNamespace", + 0, + &RegType, + (LPBYTE)&CatalogEntry->NamespaceId, + &RegSize); + if (ErrorCode != ERROR_SUCCESS) goto out; /* Read the Enabled Flag */ - RegQueryValueEx(EntryKey, - "Enabled", - 0, - &RegType, - (LPBYTE)&CatalogEntry->Enabled, - &RegSize); + ErrorCode = RegQueryValueEx(EntryKey, + "Enabled", + 0, + &RegType, + (LPBYTE)&RegValue, + &RegSize); + if (ErrorCode != ERROR_SUCCESS) goto out; + CatalogEntry->Enabled = RegValue != 0; /* Read the Version */ - RegQueryValueEx(EntryKey, - "Version", - 0, - &RegType, - (LPBYTE)&CatalogEntry->Version, - &RegSize); - + ErrorCode = RegQueryValueEx(EntryKey, + "Version", + 0, + &RegType, + (LPBYTE)&CatalogEntry->Version, + &RegSize); + if (ErrorCode != ERROR_SUCCESS) goto out; /* Read the Support Service Class Info Flag */ - RegQueryValueEx(EntryKey, - "Version", - 0, - &RegType, - (LPBYTE)&CatalogEntry->StoresServiceClassInfo, - &RegSize); - + ErrorCode = RegQueryValueEx(EntryKey, + "StoresServiceClassInfo", + 0, + &RegType, + (LPBYTE)&RegValue, + &RegSize); + CatalogEntry->StoresServiceClassInfo = RegValue != 0; +out: /* Done */ RegCloseKey(EntryKey); - return ERROR_SUCCESS; + return ErrorCode; } VOID Modified: trunk/reactos/dll/win32/ws2_32/src/nsquery.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2_32/src/nsque…
============================================================================== --- trunk/reactos/dll/win32/ws2_32/src/nsquery.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ws2_32/src/nsquery.c [iso-8859-1] Tue Sep 20 16:51:28 2016 @@ -360,7 +360,7 @@ { WSASERVICECLASSINFOW ClassInfo; PNSQUERY_PROVIDER Provider; - LPWSASERVICECLASSINFOW pClassInfo = NULL; + LPWSASERVICECLASSINFOW pClassInfo = &ClassInfo; PNSQUERY_PROVIDER NextProvider; PLIST_ENTRY Entry; INT ErrorCode; @@ -438,7 +438,7 @@ /* Get the class information */ ClassInfo.lpServiceClassId = Restrictions->lpServiceClassId; - ErrorCode = WsNcGetServiceClassInfo(Catalog, &ClassInfoSize, &ClassInfo); + ErrorCode = WsNcGetServiceClassInfo(Catalog, &ClassInfoSize, pClassInfo); /* Check if more buffer space is needed */ if ((ErrorCode == SOCKET_ERROR) && (GetLastError() == WSAEFAULT)) Modified: trunk/reactos/dll/win32/ws2_32/src/rnr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2_32/src/rnr.c…
============================================================================== --- trunk/reactos/dll/win32/ws2_32/src/rnr.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ws2_32/src/rnr.c [iso-8859-1] Tue Sep 20 16:51:28 2016 @@ -214,7 +214,7 @@ } /* Check for a valid handle, then validate and reference it */ - if (!(Query) || !(WsNqValidateAndReference(Query))) + if (IsBadReadPtr(Query, sizeof(*Query)) || !WsNqValidateAndReference(Query)) { /* Fail */ SetLastError(WSA_INVALID_HANDLE); @@ -249,7 +249,8 @@ DPRINT("WSALookupServiceBeginA: %p\n", lpqsRestrictions); /* Verifiy pointer */ - if (IsBadReadPtr(lpqsRestrictions, sizeof(*lpqsRestrictions))) + if (IsBadReadPtr(lpqsRestrictions, sizeof(*lpqsRestrictions)) || + IsBadReadPtr(lpqsRestrictions->lpServiceClassId, sizeof(*lpqsRestrictions->lpServiceClassId))) { /* Invalid */ SetLastError(WSAEFAULT); @@ -334,7 +335,8 @@ /* Verify pointers */ if (IsBadWritePtr(lphLookup, sizeof(*lphLookup)) || - IsBadReadPtr(lpqsRestrictions, sizeof(*lpqsRestrictions))) + IsBadReadPtr(lpqsRestrictions, sizeof(*lpqsRestrictions)) || + IsBadReadPtr(lpqsRestrictions->lpServiceClassId, sizeof(*lpqsRestrictions->lpServiceClassId))) { /* They are invalid; fail */ SetLastError(WSAEFAULT); @@ -401,8 +403,16 @@ return SOCKET_ERROR; } + /* Verify pointer */ + if (IsBadWritePtr(lpqsResults, sizeof(*lpqsResults))) + { + /* It is invalid; fail */ + SetLastError(WSAEFAULT); + return SOCKET_ERROR; + } + /* Check for a valid handle, then validate and reference it */ - if (!(Query) || !(WsNqValidateAndReference(Query))) + if (IsBadReadPtr(Query, sizeof(*Query)) || !WsNqValidateAndReference(Query)) { /* Fail */ SetLastError(WSA_INVALID_HANDLE); @@ -611,7 +621,167 @@ } /* - * @unimplemented +* @unimplemented +*/ +INT +WSAAPI +WSAInstallServiceClassW(IN LPWSASERVICECLASSINFOW lpServiceClassInfo) +{ + DPRINT("WSAInstallServiceClassW: %lx\n", lpServiceClassInfo); + SetLastError(WSAEINVAL); + return SOCKET_ERROR; +} + +VOID +WSAAPI +NSProviderInfoFromContext(IN PNSCATALOG_ENTRY Entry, + IN PNSPROVIDER_ENUM_CONTEXT Context) +{ + INT size = Context->Unicode ? sizeof(WSANAMESPACE_INFOW) : sizeof(WSANAMESPACE_INFOA); + /* Calculate ProviderName string size */ + INT size1 = Entry->ProviderName ? wcslen(Entry->ProviderName) + 1 : 0; + INT size2 = Context->Unicode ? size1 * sizeof(WCHAR) : size1 * sizeof(CHAR); + WSANAMESPACE_INFOW infoW; + /* Fill NS Provider data */ + infoW.dwNameSpace = Entry->NamespaceId; + infoW.dwVersion = Entry->Version; + infoW.fActive = Entry->Enabled; + RtlMoveMemory(&infoW.NSProviderId, + &Entry->ProviderId, + sizeof(infoW.NSProviderId)); + if (size2) + { + /* Calculate ProviderName string pointer */ + infoW.lpszIdentifier = (LPWSTR)((ULONG_PTR)Context->ProtocolBuffer + + Context->BufferUsed + size); + } + else + { + infoW.lpszIdentifier = NULL; + } + + /* Check if we'll have space */ + if ((Context->BufferUsed + size + size2) <= + (Context->BufferLength)) + { + /* Copy the data */ + RtlMoveMemory((PVOID)((ULONG_PTR)Context->ProtocolBuffer + + Context->BufferUsed), + &infoW, + size); + if (size2) + { + /* Entry->ProviderName is LPWSTR */ + if (Context->Unicode) + { + RtlMoveMemory((PVOID)((ULONG_PTR)Context->ProtocolBuffer + + Context->BufferUsed + size), + Entry->ProviderName, + size2); + } + else + { + /* Call the conversion function */ + WideCharToMultiByte(CP_ACP, + 0, + Entry->ProviderName, + -1, + (LPSTR)((ULONG_PTR)Context->ProtocolBuffer + + Context->BufferUsed + size), + size2, + NULL, + NULL); + + } + } + + /* Increase the count */ + Context->Count++; + } +} + +BOOL +WSAAPI +NSProvidersEnumerationProc(PVOID EnumContext, + PNSCATALOG_ENTRY Entry) +{ + PNSPROVIDER_ENUM_CONTEXT Context = (PNSPROVIDER_ENUM_CONTEXT)EnumContext; + + /* Calculate ProviderName string size */ + INT size1 = Entry->ProviderName ? wcslen(Entry->ProviderName) + 1 : 0; + INT size2 = Context->Unicode ? size1 * sizeof(WCHAR) : size1 * sizeof(CHAR); + + /* Copy the information */ + NSProviderInfoFromContext(Entry, Context); + Context->BufferUsed += Context->Unicode ? (sizeof(WSANAMESPACE_INFOW)+size2) : (sizeof(WSANAMESPACE_INFOA)+size2); + + /* Continue enumeration */ + return TRUE; +} + +INT +WSAAPI +WSAEnumNameSpaceProvidersInternal(IN OUT LPDWORD lpdwBufferLength, + OUT LPWSANAMESPACE_INFOA lpnspBuffer, BOOLEAN Unicode) +{ + INT Status; + PWSPROCESS WsProcess; + PNSCATALOG Catalog; + NSPROVIDER_ENUM_CONTEXT Context; + DPRINT("WSAEnumNameSpaceProvidersInternal: %lx\n", lpnspBuffer); + + if (!lpdwBufferLength) + { + WSASetLastError(WSAEFAULT); + return SOCKET_ERROR; + } + WsProcess = WsGetProcess(); + /* Create a catalog object from the current one */ + Catalog = WsProcGetNsCatalog(WsProcess); + if (!Catalog) + { + /* Fail if we couldn't */ + WSASetLastError(WSA_NOT_ENOUGH_MEMORY); + return SOCKET_ERROR; + } + + Context.ProtocolBuffer = lpnspBuffer; + Context.BufferLength = lpnspBuffer ? *lpdwBufferLength : 0; + Context.BufferUsed = 0; + Context.Count = 0; + Context.Unicode = Unicode; + Context.ErrorCode = ERROR_SUCCESS; + + WsNcEnumerateCatalogItems(Catalog, NSProvidersEnumerationProc, &Context); + + /* Get status */ + Status = Context.Count; + + /* Check the error code */ + if (Context.ErrorCode == ERROR_SUCCESS) + { + /* Check if enough space was available */ + if (Context.BufferLength < Context.BufferUsed) + { + /* Fail and tell them how much we need */ + *lpdwBufferLength = Context.BufferUsed; + WSASetLastError(WSAEFAULT); + Status = SOCKET_ERROR; + } + } + else + { + /* Failure, normalize error */ + Status = SOCKET_ERROR; + WSASetLastError(Context.ErrorCode); + } + + /* Return */ + return Status; +} + +/* + * @implemented */ INT WSAAPI @@ -619,12 +789,11 @@ OUT LPWSANAMESPACE_INFOA lpnspBuffer) { DPRINT("WSAEnumNameSpaceProvidersA: %lx\n", lpnspBuffer); - SetLastError(WSAEINVAL); - return SOCKET_ERROR; -} - -/* - * @unimplemented + return WSAEnumNameSpaceProvidersInternal(lpdwBufferLength, (LPWSANAMESPACE_INFOA)lpnspBuffer, FALSE); +} + +/* + * @implemented */ INT WSAAPI @@ -632,20 +801,7 @@ OUT LPWSANAMESPACE_INFOW lpnspBuffer) { DPRINT("WSAEnumNameSpaceProvidersW: %lx\n", lpnspBuffer); - SetLastError(WSAEINVAL); - return SOCKET_ERROR; -} - -/* - * @unimplemented - */ -INT -WSAAPI -WSAInstallServiceClassW(IN LPWSASERVICECLASSINFOW lpServiceClassInfo) -{ - DPRINT("WSAInstallServiceClassW: %lx\n", lpServiceClassInfo); - SetLastError(WSAEINVAL); - return SOCKET_ERROR; + return WSAEnumNameSpaceProvidersInternal(lpdwBufferLength, (LPWSANAMESPACE_INFOA)lpnspBuffer, TRUE); } /* Modified: trunk/reactos/dll/win32/ws2_32/src/send.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2_32/src/send.…
============================================================================== --- trunk/reactos/dll/win32/ws2_32/src/send.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ws2_32/src/send.c [iso-8859-1] Tue Sep 20 16:51:28 2016 @@ -31,7 +31,7 @@ LPWSATHREADID ThreadId; WSABUF Buffers; DWORD BytesSent; - DPRINT("send: %lx, %lx, %lx, %p\n", s, flags, len, buf); + DPRINT("sendto: %lx, %lx, %lx, %p\n", s, flags, len, buf); /* Check for WSAStartup */ if ((ErrorCode = WsQuickPrologTid(&ThreadId)) == ERROR_SUCCESS) Modified: trunk/reactos/dll/win32/ws2_32/src/sockctrl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2_32/src/sockc…
============================================================================== --- trunk/reactos/dll/win32/ws2_32/src/sockctrl.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ws2_32/src/sockctrl.c [iso-8859-1] Tue Sep 20 16:51:28 2016 @@ -441,6 +441,11 @@ return Status; } + if (!optval && optlen > 0) + { + SetLastError(WSAEFAULT); + return SOCKET_ERROR; + } /* Get the Socket Context */ if ((Socket = WsSockGetSocket(s))) Modified: trunk/reactos/dll/win32/ws2_32/src/socklife.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2_32/src/sockl…
============================================================================== --- trunk/reactos/dll/win32/ws2_32/src/socklife.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ws2_32/src/socklife.c [iso-8859-1] Tue Sep 20 16:51:28 2016 @@ -567,6 +567,20 @@ } /* Check if we got a valid socket */ + if (Status == WSAEINVAL) + { + Status = INVALID_SOCKET; + ErrorCode = WSAEINVAL; + } + + /* Check if we got a valid socket */ + if (Status == WSAEINVAL) + { + Status = INVALID_SOCKET; + ErrorCode = WSAEINVAL; + } + + /* Check if we got a valid socket */ if (Status != INVALID_SOCKET) { /* Add an API reference and return */ Modified: trunk/reactos/dll/win32/ws2_32/src/startup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2_32/src/start…
============================================================================== --- trunk/reactos/dll/win32/ws2_32/src/startup.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ws2_32/src/startup.c [iso-8859-1] Tue Sep 20 16:51:28 2016 @@ -83,11 +83,16 @@ WsAsyncTerminateThread(); } + DPRINT("WSACleanup RefCount = %ld\n", RefCount); /* Return success */ ErrorCode = ERROR_SUCCESS; + + /* Clear last error */ + SetLastError(ERROR_SUCCESS); } else { + DPRINT("WSACleanup unintialized\n"); /* Weren't initialized */ SetLastError(ErrorCode); ErrorCode = SOCKET_ERROR; @@ -111,7 +116,7 @@ WORD VersionReturned = 0; DWORD ErrorCode = ERROR_SUCCESS; PWSPROCESS CurrentProcess; - DPRINT("WSAStartup: %wx\n", wVersionRequested); + DPRINT("WSAStartup: %wx %d.%d\n", wVersionRequested, LOBYTE(wVersionRequested), HIBYTE(wVersionRequested)); /* Make sure that we went through DLL Init */ if (!WsDllHandle) return WSASYSNOTREADY; @@ -123,14 +128,15 @@ /* We don't support this unknown version */ ErrorCode = WSAVERNOTSUPPORTED; + VersionReturned = MAKEWORD(2, 2); break; case 1: /* We support only 1.0 and 1.1 */ - if (HIBYTE(wVersionRequested) == 0) + if (HIBYTE(wVersionRequested) <= 1) { /* Caller wants 1.0, return it */ - VersionReturned = wVersionRequested; + VersionReturned = MAKEWORD(1, HIBYTE(wVersionRequested)); } else { @@ -158,6 +164,12 @@ /* Return 2.2 */ VersionReturned = MAKEWORD(2, 2); break; + } + + if (lpWSAData == NULL) + { + SetLastError(WSANOTINITIALISED); + return ErrorCode == ERROR_SUCCESS ? WSAEFAULT : ErrorCode; } /* Return the Version Requested, unless error */ @@ -181,6 +193,13 @@ { lpWSAData->iMaxSockets = 0; lpWSAData->iMaxUdpDg = 0; + } + + /* Requested invalid version (0) */ + if (ErrorCode != ERROR_SUCCESS) + { + SetLastError(WSANOTINITIALISED); + return ErrorCode; } /* Enter the startup synchronization lock */ @@ -223,6 +242,14 @@ /* Increase the reference count */ InterlockedIncrement(&CurrentProcess->RefCount); + DPRINT("WSAStartup RefCount = %ld\n", CurrentProcess->RefCount); + + /* Clear last error */ + SetLastError(ERROR_SUCCESS); + } + else + { + SetLastError(WSANOTINITIALISED); } /* Leave the startup lock */
8 years, 3 months
1
0
0
0
[akhaldi] 72749: [MSAFD] Don't assume SOL_SOCKET is the only socket level. By Peter Hater. CORE-10440 CORE-12008
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Sep 20 16:31:53 2016 New Revision: 72749 URL:
http://svn.reactos.org/svn/reactos?rev=72749&view=rev
Log: [MSAFD] Don't assume SOL_SOCKET is the only socket level. By Peter Hater. CORE-10440 CORE-12008 Modified: trunk/reactos/dll/win32/msafd/misc/dllmain.c Modified: trunk/reactos/dll/win32/msafd/misc/dllmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msafd/misc/dllma…
============================================================================== --- trunk/reactos/dll/win32/msafd/misc/dllmain.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msafd/misc/dllmain.c [iso-8859-1] Tue Sep 20 16:31:53 2016 @@ -2266,12 +2266,7 @@ /* FIXME: We should handle some more cases here */ - if (level != SOL_SOCKET) - { - *lpErrno = WSAEINVAL; - return SOCKET_ERROR; - } - else + if (level == SOL_SOCKET) { switch (optname) {
8 years, 3 months
1
0
0
0
[akhaldi] 72748: [ETC/SERVICES] Update services file as expected by the tests. By Peter Hater. CORE-10440
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Sep 20 09:45:02 2016 New Revision: 72748 URL:
http://svn.reactos.org/svn/reactos?rev=72748&view=rev
Log: [ETC/SERVICES] Update services file as expected by the tests. By Peter Hater. CORE-10440 Modified: trunk/reactos/media/drivers/etc/services Modified: trunk/reactos/media/drivers/etc/services URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/drivers/etc/services…
============================================================================== --- trunk/reactos/media/drivers/etc/services [iso-8859-1] (original) +++ trunk/reactos/media/drivers/etc/services [iso-8859-1] Tue Sep 20 09:45:02 2016 @@ -20,18 +20,18 @@ rje 5/udp #Remote Job Entry echo 7/tcp #Echo echo 7/udp #Echo -discard 9/tcp #Discard -discard 9/udp #Discard +discard 9/tcp sink null #Discard +discard 9/udp sink null #Discard systat 11/tcp #Active Users systat 11/udp #Active Users daytime 13/tcp #Daytime (RFC 867) daytime 13/udp #Daytime (RFC 867) -qotd 17/tcp #Quote of the Day -qotd 17/udp #Quote of the Day +qotd 17/tcp quote #Quote of the Day +qotd 17/udp quote #Quote of the Day msp 18/tcp #Message Send Protocol msp 18/udp #Message Send Protocol -chargen 19/tcp #Character Generator -chargen 19/udp #Character Generator +chargen 19/tcp ttytst source #Character Generator +chargen 19/udp ttytst source #Character Generator ftp-data 20/tcp #File Transfer [Default Data] ftp-data 20/udp #File Transfer [Default Data] ftp 21/tcp #File Transfer [Control] @@ -40,10 +40,10 @@ ssh 22/udp #SSH Remote Login Protocol telnet 23/tcp #Telnet telnet 23/udp #Telnet -smtp 25/tcp #Simple Mail Transfer -smtp 25/udp #Simple Mail Transfer -mail 25/tcp #Simple Mail Transfer -mail 25/udp #Simple Mail Transfer +smtp 25/tcp mail #Simple Mail Transfer +#smtp 25/udp mail #Simple Mail Transfer +mail 25/tcp smtp #Simple Mail Transfer +#mail 25/udp smtp #Simple Mail Transfer nsw-fe 27/tcp #NSW User System FE nsw-fe 27/udp #NSW User System FE msg-icp 29/tcp #MSG ICP @@ -52,19 +52,19 @@ msg-auth 31/udp #MSG Authentication dsp 33/tcp #Display Support Protocol dsp 33/udp #Display Support Protocol -time 37/tcp #Time -time 37/udp #Time +time 37/tcp timserver #Time +time 37/udp timserver #Time rap 38/tcp #Route Access Protocol rap 38/udp #Route Access Protocol -rlp 39/tcp #Resource Location Protocol -rlp 39/udp #Resource Location Protocol +rlp 39/tcp resource #Resource Location Protocol +rlp 39/udp resource #Resource Location Protocol graphics 41/tcp #Graphics graphics 41/udp #Graphics name 42/tcp #Host Name Server name 42/udp #Host Name Server -nameserver 42/tcp #Host Name Server -nameserver 42/udp #Host Name Server -nicname 43/tcp #Who Is +nameserver 42/tcp name #Host Name Server +nameserver 42/udp name #Host Name Server +nicname 43/tcp whois #Who Is nicname 43/udp #Who Is mpm-flags 44/tcp #MPM FLAGS Protocol mpm-flags 44/udp #MPM FLAGS Protocol @@ -107,9 +107,9 @@ sql*net 66/tcp #Oracle SQL*NET sql*net 66/udp #Oracle SQL*NET bootps 67/tcp #Bootstrap Protocol Server -bootps 67/udp #Bootstrap Protocol Server +bootps 67/udp dhcps #Bootstrap Protocol Server bootpc 68/tcp #Bootstrap Protocol Client -bootpc 68/udp #Bootstrap Protocol Client +bootpc 68/udp dhcpc #Bootstrap Protocol Client tftp 69/tcp #Trivial File Transfer tftp 69/udp #Trivial File Transfer gopher 70/tcp #Gopher @@ -128,12 +128,12 @@ vettcp 78/udp #vettcp finger 79/tcp #Finger finger 79/udp #Finger -http 80/tcp #World Wide Web HTTP -http 80/udp #World Wide Web HTTP +http 80/tcp www www-http #World Wide Web HTTP +#http 80/udp #World Wide Web HTTP www 80/tcp #World Wide Web HTTP -www 80/udp #World Wide Web HTTP +#www 80/udp #World Wide Web HTTP www-http 80/tcp #World Wide Web HTTP -www-http 80/udp #World Wide Web HTTP +#www-http 80/udp #World Wide Web HTTP hosts2-ns 81/tcp #HOSTS2 Name Server hosts2-ns 81/udp #HOSTS2 Name Server xfer 82/tcp #XFER Utility @@ -146,8 +146,8 @@ mit-ml-dev 85/udp #MIT ML Device mfcobol 86/tcp #Micro Focus Cobol mfcobol 86/udp #Micro Focus Cobol -kerberos 88/tcp #Kerberos -kerberos 88/udp #Kerberos +kerberos 88/tcp krb5 kerberos-sec #Kerberos +kerberos 88/udp krb5 kerberos-sec #Kerberos su-mit-tg 89/tcp #SU/MIT Telnet Gateway su-mit-tg 89/udp #SU/MIT Telnet Gateway dnsix 90/tcp #DNSIX Securit Attribute Token Map @@ -171,7 +171,7 @@ metagram 99/tcp #Metagram Relay metagram 99/udp #Metagram Relay newacct 100/tcp #[unauthorized use] -hostname 101/tcp #NIC Host Name Server +hostname 101/tcp hostnames #NIC Host Name Server hostname 101/udp #NIC Host Name Server iso-tsap 102/tcp #ISO-TSAP Class 0 iso-tsap 102/udp #ISO-TSAP Class 0 @@ -189,15 +189,15 @@ rtelnet 107/udp #Remote Telnet Service snagas 108/tcp #SNA Gateway Access Server snagas 108/udp #SNA Gateway Access Server -pop2 109/tcp #Post Office Protocol - Version 2 +pop2 109/tcp postoffice #Post Office Protocol - Version 2 pop2 109/udp #Post Office Protocol - Version 2 pop3 110/tcp #Post Office Protocol - Version 3 pop3 110/udp #Post Office Protocol - Version 3 -sunrpc 111/tcp #SUN Remote Procedure Call -sunrpc 111/udp #SUN Remote Procedure Call +sunrpc 111/tcp rpcbind portmap #SUN Remote Procedure Call +sunrpc 111/udp rpcbind portmap #SUN Remote Procedure Call mcidas 112/tcp #McIDAS Data Transmission Protocol mcidas 112/udp #McIDAS Data Transmission Protocol -ident 113/tcp +ident 113/tcp ident tap auth 113/tcp #Authentication Service auth 113/udp #Authentication Service sftp 115/tcp #Simple File Transfer Protocol @@ -208,7 +208,7 @@ uucp-path 117/udp #UUCP Path Service sqlserv 118/tcp #SQL Services sqlserv 118/udp #SQL Services -nntp 119/tcp #Network News Transfer Protocol +nntp 119/tcp usenet #Network News Transfer Protocol nntp 119/udp #Network News Transfer Protocol cfdptkt 120/tcp #CFDPTKT cfdptkt 120/udp #CFDPTKT @@ -240,15 +240,15 @@ statsrv 133/udp #Statistics Service ingres-net 134/tcp #INGRES-NET Service ingres-net 134/udp #INGRES-NET Service -epmap 135/tcp #DCE endpoint resolution -epmap 135/udp #DCE endpoint resolution +epmap 135/tcp loc-srv #DCE endpoint resolution +epmap 135/udp loc-srv #DCE endpoint resolution profile 136/tcp #PROFILE Naming System profile 136/udp #PROFILE Naming System -netbios-ns 137/tcp #NETBIOS Name Service -netbios-ns 137/udp #NETBIOS Name Service +netbios-ns 137/tcp nbname #NETBIOS Name Service +netbios-ns 137/udp nbname #NETBIOS Name Service netbios-dgm 138/tcp #NETBIOS Datagram Service -netbios-dgm 138/udp #NETBIOS Datagram Service -netbios-ssn 139/tcp #NETBIOS Session Service +netbios-dgm 138/udp nbdatagram #NETBIOS Datagram Service +netbios-ssn 139/tcp nbsession #NETBIOS Session Service netbios-ssn 139/udp #NETBIOS Session Service emfis-data 140/tcp #EMFIS Data Service emfis-data 140/udp #EMFIS Data Service @@ -256,7 +256,7 @@ emfis-cntl 141/udp #EMFIS Control Service bl-idm 142/tcp #Britton-Lee IDM bl-idm 142/udp #Britton-Lee IDM -imap 143/tcp #Internet Message Access Protocol +imap 143/tcp imap4 #Internet Message Access Protocol imap 143/udp #Internet Message Access Protocol uma 144/tcp #Universal Management Architecture uma 144/udp #Universal Management Architecture @@ -295,7 +295,7 @@ snmp 161/tcp #SNMP snmp 161/udp #SNMP snmptrap 162/tcp #SNMPTRAP -snmptrap 162/udp #SNMPTRAP +snmptrap 162/udp snmp-trap #SNMPTRAP cmip-man 163/tcp #CMIP/TCP Manager cmip-man 163/udp #CMIP/TCP Manager cmip-agent 164/tcp #CMIP/TCP Agent @@ -696,14 +696,14 @@ dsfgw 438/udp #dsfgw dasp 439/tcp #dasp Thomas Obermair dasp 439/udp #dasp tommy(a)inlab.m.eunet.de -sgcp 440/tcp #sgcp -sgcp 440/udp #sgcp +sgcp 440/tcp #sgcp +sgcp 440/udp #sgcp decvms-sysmgt 441/tcp #decvms-sysmgt decvms-sysmgt 441/udp #decvms-sysmgt cvc_hostd 442/tcp #cvc_hostd cvc_hostd 442/udp #cvc_hostd -https 443/tcp #http protocol over TLS/SSL -https 443/udp #http protocol over TLS/SSL +https 443/tcp MCom #http protocol over TLS/SSL +https 443/udp MCom #http protocol over TLS/SSL snpp 444/tcp #Simple Network Paging Protocol snpp 444/udp #Simple Network Paging Protocol microsoft-ds 445/tcp #Microsoft-DS @@ -817,7 +817,7 @@ iso-ill 499/tcp #ISO ILL Protocol iso-ill 499/udp #ISO ILL Protocol isakmp 500/tcp #isakmp -isakmp 500/udp #isakmp +isakmp 500/udp ike #isakmp stmf 501/tcp #STMF stmf 501/udp #STMF asa-appl-proto 502/tcp #asa-appl-proto @@ -841,11 +841,13 @@ passgo 511/tcp #PassGo passgo 511/udp #PassGo exec 512/tcp #remote process execution; -biff 512/udp #used by mail system to notify users +biff 512/udp comsat #used by mail system to notify users login 513/tcp #remote login a la telnet; -who 513/udp #maintains data bases showing who's +who 513/udp whod #maintains data bases showing who's +cmd 514/tcp shell shell 514/tcp #cmd -printer 515/tcp #spooler +syslog 514/udp +printer 515/tcp spooler #spooler printer 515/udp #spooler videotex 516/tcp #videotex videotex 516/udp #videotex @@ -854,18 +856,18 @@ utime 519/tcp #unixtime utime 519/udp #unixtime efs 520/tcp #extended file name server -router 520/udp #local routing process (on site); +router 520/udp route routed #local routing process (on site); ripng 521/tcp #ripng ripng 521/udp #ripng -ulp 522/tcp #ULP -ulp 522/udp #ULP +ulp 522/tcp #ULP +ulp 522/udp #ULP ibm-db2 523/tcp #IBM-DB2 ibm-db2 523/udp #IBM-DB2 ncp 524/tcp #NCP ncp 524/udp #NCP timed 525/tcp #timeserver -timed 525/udp #timeserver -tempo 526/tcp #newdate +timed 525/udp timeserver #timeserver +tempo 526/tcp newdate #newdate tempo 526/udp #newdate stx 527/tcp #Stock IXChange stx 527/udp #Stock IXChange @@ -873,11 +875,11 @@ custix 528/udp #Customer IXChange irc-serv 529/tcp #IRC-SERV irc-serv 529/udp #IRC-SERV -courier 530/tcp #rpc +courier 530/tcp rpc #rpc courier 530/udp #rpc -conference 531/tcp #chat +conference 531/tcp chat #chat conference 531/udp #chat -netnews 532/tcp #readnews +netnews 532/tcp readnews #readnews netnews 532/udp #readnews netwall 533/tcp #for emergency broadcasts netwall 533/udp #for emergency broadcasts @@ -893,13 +895,13 @@ gdomap 538/udp #gdomap apertus-ldp 539/tcp #Apertus Technologies Load Determination apertus-ldp 539/udp #Apertus Technologies Load Determination -uucp 540/tcp #uucpd -uucp 540/udp #uucpd +uucp 540/tcp uucpd #uucpd +uucp 540/udp #uucpd uucp-rlogin 541/tcp #uucp-rlogin uucp-rlogin 541/udp #uucp-rlogin commerce 542/tcp #commerce commerce 542/udp #commerce -kshell 544/tcp #krcmd +kshell 544/tcp krcmd #krcmd kshell 544/udp #krcmd appleqtcsrvr 545/tcp #appleqtcsrvr appleqtcsrvr 545/udp #appleqtcsrvr @@ -911,7 +913,7 @@ afpovertcp 548/udp #AFP over TCP idfp 549/tcp #IDFP idfp 549/udp #IDFP -new-rwho 550/tcp #new-who +new-rwho 550/tcp new-who #new-who new-rwho 550/udp #new-who cybercash 551/tcp #cybercash cybercash 551/udp #cybercash @@ -921,7 +923,7 @@ pirp 553/udp #pirp rtsp 554/tcp #Real Time Stream Control Protocol rtsp 554/udp #Real Time Stream Control Protocol -remotefs 556/tcp #rfs server +remotefs 556/tcp rfs rfs_server #rfs server remotefs 556/udp #rfs server openvms-sysipc 557/tcp #openvms-sysipc openvms-sysipc 557/udp #openvms-sysipc @@ -930,11 +932,11 @@ teedtap 559/tcp #TEEDTAP teedtap 559/udp #TEEDTAP rmonitor 560/tcp #rmonitord -rmonitor 560/udp #rmonitord +rmonitor 560/udp rmonitord #rmonitord chshell 562/tcp #chcmd chshell 562/udp #chcmd -nntps 563/tcp #nntp protocol over TLS/SSL (was snntp) -nntps 563/udp #nntp protocol over TLS/SSL (was snntp) +nntps 563/tcp snntp #nntp protocol over TLS/SSL (was snntp) +nntps 563/udp snntp #nntp protocol over TLS/SSL (was snntp) 9pfs 564/tcp #plan 9 file service 9pfs 564/udp #plan 9 file service whoami 565/tcp #whoami @@ -1079,7 +1081,7 @@ ginad 634/udp #ginad rlzdbase 635/tcp #RLZ DBase rlzdbase 635/udp #RLZ DBase -ldaps 636/tcp #ldap protocol over TLS/SSL (was sldap) +ldaps 636/tcp sldap #ldap protocol over TLS/SSL (was sldap) ldaps 636/udp #ldap protocol over TLS/SSL (was sldap) lanserver 637/tcp #lanserver lanserver 637/udp #lanserver @@ -1301,8 +1303,8 @@ imaps 993/udp #imap4 protocol over TLS/SSL ircs 994/tcp #irc protocol over TLS/SSL ircs 994/udp #irc protocol over TLS/SSL -pop3s 995/tcp #pop3 protocol over TLS/SSL (was spop3) -pop3s 995/udp #pop3 protocol over TLS/SSL (was spop3) +pop3s 995/tcp spop3 #pop3 protocol over TLS/SSL (was spop3) +pop3s 995/udp spop3 #pop3 protocol over TLS/SSL (was spop3) vsinet 996/tcp #vsinet vsinet 996/udp #vsinet applix 999/udp #Applix ac @@ -2148,7 +2150,7 @@ ricardo-lm 1522/udp #Ricardo North America License Manager cichild-lm 1523/tcp #cichild cichild-lm 1523/udp #cichild -ingreslock 1524/tcp #ingres +ingreslock 1524/tcp ingres #ingres ingreslock 1524/udp #ingres orasrv 1525/tcp #oracle orasrv 1525/udp #oracle @@ -3111,6 +3113,7 @@ isis-bcast 2043/udp #isis-bcast nfs 2049/tcp #Network File System - Sun Microsystems nfs 2049/udp #Network File System - Sun Microsystems +nfsd 2049/udp nfs #Network File System - Sun Microsystems av-emb-config 2050/tcp #Avaya EMB Config Port av-emb-config 2050/udp #Avaya EMB Config Port epnsdp 2051/tcp #EPNSDP
8 years, 3 months
1
0
0
0
[akhaldi] 72747: [IPHLPAPI] Don't (de)initialize ws2 on dll process (attach/detach), do it on IcmpCreateFile/IcmpCloseHandle instead, due to the circular dependency ws2_32 -> mswsock -> dnsapi(adns...
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Sep 20 09:42:51 2016 New Revision: 72747 URL:
http://svn.reactos.org/svn/reactos?rev=72747&view=rev
Log: [IPHLPAPI] Don't (de)initialize ws2 on dll process (attach/detach), do it on IcmpCreateFile/IcmpCloseHandle instead, due to the circular dependency ws2_32 -> mswsock -> dnsapi(adns lib) -> iphlpapi -> ws2_32. This creates 2 references to ws2_32 and ws2_32 can't cleanup on WSACleanup. By Peter Hater. CORE-10440 Modified: trunk/reactos/dll/win32/iphlpapi/icmp.c trunk/reactos/dll/win32/iphlpapi/iphlpapi_main.c Modified: trunk/reactos/dll/win32/iphlpapi/icmp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/iphlpapi/icmp.c?…
============================================================================== --- trunk/reactos/dll/win32/iphlpapi/icmp.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/iphlpapi/icmp.c [iso-8859-1] Tue Sep 20 09:42:51 2016 @@ -114,8 +114,18 @@ HANDLE WINAPI Icmp6CreateFile(VOID) { icmp_t* icp; - - int sid=socket(AF_INET6,SOCK_RAW,IPPROTO_ICMPV6); + int sid; +#ifdef __REACTOS__ + WSADATA wsaData; + + if (WSAStartup(MAKEWORD(2, 2), &wsaData) != ERROR_SUCCESS) + { + ERR_(winediag)("Failed to use ICMPV6 (network ping), this requires special permissions.\n"); + return INVALID_HANDLE_VALUE; + } +#endif + + sid=socket(AF_INET6,SOCK_RAW,IPPROTO_ICMPV6); #ifndef __REACTOS__ if (sid < 0) { @@ -133,6 +143,7 @@ if (icp==NULL) { #ifdef __REACTOS__ closesocket(sid); + WSACleanup(); #else close(sid); #endif @@ -180,8 +191,17 @@ static int once; #endif icmp_t* icp; - - int sid=socket(AF_INET,SOCK_RAW,IPPROTO_ICMP); + int sid; +#ifdef __REACTOS__ + WSADATA wsaData; + + if (WSAStartup(MAKEWORD(2, 2), &wsaData) != ERROR_SUCCESS) + { + ERR_(winediag)("Failed to use ICMPV6 (network ping), this requires special permissions.\n"); + return INVALID_HANDLE_VALUE; + } +#endif + sid=socket(AF_INET,SOCK_RAW,IPPROTO_ICMP); #ifdef __REACTOS__ if (sid < 0) { ERR_(winediag)("Failed to use ICMP (network ping), this requires special permissions.\n"); @@ -204,6 +224,7 @@ if (icp==NULL) { #ifdef __REACTOS__ closesocket(sid); + WSACleanup(); #else if (sid >= 0) close(sid); #endif @@ -235,6 +256,9 @@ if (icp->sid >= 0) close(icp->sid); #endif HeapFree(GetProcessHeap (), 0, icp); +#ifdef __REACTOS__ + WSACleanup(); +#endif return TRUE; } Modified: trunk/reactos/dll/win32/iphlpapi/iphlpapi_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/iphlpapi/iphlpap…
============================================================================== --- trunk/reactos/dll/win32/iphlpapi/iphlpapi_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/iphlpapi/iphlpapi_main.c [iso-8859-1] Tue Sep 20 09:42:51 2016 @@ -35,17 +35,13 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { - WSADATA wsaData; - switch (fdwReason) { case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls( hinstDLL ); interfaceMapInit(); - WSAStartup(MAKEWORD(2, 2), &wsaData); break; case DLL_PROCESS_DETACH: - WSACleanup(); interfaceMapFree(); break; }
8 years, 3 months
1
0
0
0
[akhaldi] 72746: [MSAFD] Move WSAAddressToStringA/W and WSAStringToAddressA/W in msafd protocol provider from ws2_32. Other small fixes for return codes. By Peter Hater. CORE-10440
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Sep 20 08:12:44 2016 New Revision: 72746 URL:
http://svn.reactos.org/svn/reactos?rev=72746&view=rev
Log: [MSAFD] Move WSAAddressToStringA/W and WSAStringToAddressA/W in msafd protocol provider from ws2_32. Other small fixes for return codes. By Peter Hater. CORE-10440 Modified: trunk/reactos/dll/win32/msafd/CMakeLists.txt trunk/reactos/dll/win32/msafd/misc/dllmain.c trunk/reactos/dll/win32/msafd/misc/stubs.c Modified: trunk/reactos/dll/win32/msafd/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msafd/CMakeLists…
============================================================================== --- trunk/reactos/dll/win32/msafd/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msafd/CMakeLists.txt [iso-8859-1] Tue Sep 20 08:12:44 2016 @@ -19,6 +19,6 @@ set_module_type(msafd win32dll UNICODE) target_link_libraries(msafd wine) -add_importlibs(msafd advapi32 msvcrt kernel32 ntdll) +add_importlibs(msafd advapi32 ws2_32 msvcrt kernel32 ntdll) add_pch(msafd msafd.h SOURCE) add_cd_file(TARGET msafd DESTINATION reactos/system32 FOR all) Modified: trunk/reactos/dll/win32/msafd/misc/dllmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msafd/misc/dllma…
============================================================================== --- trunk/reactos/dll/win32/msafd/misc/dllmain.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msafd/misc/dllmain.c [iso-8859-1] Tue Sep 20 08:12:44 2016 @@ -13,12 +13,14 @@ #include <msafd.h> #include <winuser.h> +#include <wchar.h> #include <wine/debug.h> WINE_DEFAULT_DEBUG_CHANNEL(msafd); HANDLE GlobalHeap; WSPUPCALLTABLE Upcalls; +DWORD CatalogEntryId; /* CatalogEntryId for upcalls */ LPWPUCOMPLETEOVERLAPPEDREQUEST lpWPUCompleteOverlappedRequest; PSOCKET_INFORMATION SocketListHead = NULL; CRITICAL_SECTION SocketListLock; @@ -71,6 +73,25 @@ TRACE("Creating Socket, getting TDI Name - AddressFamily (%d) SocketType (%d) Protocol (%d).\n", AddressFamily, SocketType, Protocol); + + if (AddressFamily == AF_UNSPEC && SocketType == 0 && Protocol == 0) + return WSAEINVAL; + + /* Set the defaults */ + if (AddressFamily == AF_UNSPEC) + AddressFamily = AF_INET; + + if (SocketType == 0) + SocketType = SOCK_STREAM; + + if (Protocol == 0) + { + if (SocketType == SOCK_STREAM) + Protocol = IPPROTO_TCP; + + if (SocketType == SOCK_DGRAM) + Protocol = IPPROTO_UDP; + } /* Get Helper Data and Transport */ Status = SockGetTdiName (&AddressFamily, @@ -2207,7 +2228,8 @@ return 0; default: - break; + *lpErrno = WSAEINVAL; + return SOCKET_ERROR; } SendToHelper: @@ -2244,7 +2266,12 @@ /* FIXME: We should handle some more cases here */ - if (level == SOL_SOCKET) + if (level != SOL_SOCKET) + { + *lpErrno = WSAEINVAL; + return SOCKET_ERROR; + } + else { switch (optname) { @@ -2376,8 +2403,15 @@ { NTSTATUS Status; - ERR("wVersionRequested (0x%X) \n", wVersionRequested); - Status = NO_ERROR; + if (((LOBYTE(wVersionRequested) == 2) && (HIBYTE(wVersionRequested) < 2)) || + (LOBYTE(wVersionRequested) < 2)) + { + ERR("WSPStartup NOT SUPPORTED for version 0x%X\n", wVersionRequested); + return WSAVERNOTSUPPORTED; + } + else + Status = NO_ERROR; + /* FIXME: Enable all cases of WSPStartup status */ Upcalls = UpcallTable; if (Status == NO_ERROR) @@ -2414,12 +2448,163 @@ lpProcTable->lpWSPStringToAddress = WSPStringToAddress; lpWSPData->wVersion = MAKEWORD(2, 2); lpWSPData->wHighVersion = MAKEWORD(2, 2); + /* Save CatalogEntryId for all upcalls */ + CatalogEntryId = lpProtocolInfo->dwCatalogEntryId; } TRACE("Status (%d).\n", Status); return Status; } + +INT +WSPAPI +WSPAddressToString(IN LPSOCKADDR lpsaAddress, + IN DWORD dwAddressLength, + IN LPWSAPROTOCOL_INFOW lpProtocolInfo, + OUT LPWSTR lpszAddressString, + IN OUT LPDWORD lpdwAddressStringLength, + OUT LPINT lpErrno) +{ + DWORD size; + WCHAR buffer[54]; /* 32 digits + 7':' + '[' + '%" + 5 digits + ']:' + 5 digits + '\0' */ + WCHAR *p; + + if (!lpsaAddress || !lpszAddressString || !lpdwAddressStringLength) + { + *lpErrno = WSAEFAULT; + return SOCKET_ERROR; + } + + switch (lpsaAddress->sa_family) + { + case AF_INET: + if (dwAddressLength < sizeof(SOCKADDR_IN)) + { + *lpErrno = WSAEINVAL; + return SOCKET_ERROR; + } + swprintf(buffer, + L"%u.%u.%u.%u:%u", + (unsigned int)(ntohl(((SOCKADDR_IN *)lpsaAddress)->sin_addr.s_addr) >> 24 & 0xff), + (unsigned int)(ntohl(((SOCKADDR_IN *)lpsaAddress)->sin_addr.s_addr) >> 16 & 0xff), + (unsigned int)(ntohl(((SOCKADDR_IN *)lpsaAddress)->sin_addr.s_addr) >> 8 & 0xff), + (unsigned int)(ntohl(((SOCKADDR_IN *)lpsaAddress)->sin_addr.s_addr) & 0xff), + ntohs(((SOCKADDR_IN *)lpsaAddress)->sin_port)); + + p = wcschr(buffer, L':'); + if (!((SOCKADDR_IN *)lpsaAddress)->sin_port) + { + *p = 0; + } + break; + default: + *lpErrno = WSAEINVAL; + return SOCKET_ERROR; + } + + size = wcslen(buffer) + 1; + + if (*lpdwAddressStringLength < size) + { + *lpdwAddressStringLength = size; + *lpErrno = WSAENOBUFS; + return SOCKET_ERROR; + } + + *lpdwAddressStringLength = size; + wcscpy(lpszAddressString, buffer); + return 0; +} + +INT +WSPAPI +WSPStringToAddress(IN LPWSTR AddressString, + IN INT AddressFamily, + IN LPWSAPROTOCOL_INFOW lpProtocolInfo, + OUT LPSOCKADDR lpAddress, + IN OUT LPINT lpAddressLength, + OUT LPINT lpErrno) +{ + int pos = 0; + LONG inetaddr = 0; + LPWSTR *bp = NULL; + SOCKADDR_IN *sockaddr; + + if (!lpAddressLength || !lpAddress || !AddressString) + { + *lpErrno = WSAEINVAL; + return SOCKET_ERROR; + } + + sockaddr = (SOCKADDR_IN *)lpAddress; + + /* Set right address family */ + if (lpProtocolInfo != NULL) + { + sockaddr->sin_family = lpProtocolInfo->iAddressFamily; + } + else + { + sockaddr->sin_family = AddressFamily; + } + + /* Report size */ + if (AddressFamily == AF_INET) + { + if (*lpAddressLength < (INT)sizeof(SOCKADDR_IN)) + { + *lpAddressLength = sizeof(SOCKADDR_IN); + *lpErrno = WSAEFAULT; + } + else + { + // translate ip string to ip + + /* rest sockaddr.sin_addr.s_addr + for we need to be sure it is zero when we come to while */ + memset(lpAddress, 0, sizeof(SOCKADDR_IN)); + + /* Set right adress family */ + sockaddr->sin_family = AF_INET; + + /* Get port number */ + pos = wcscspn(AddressString, L":") + 1; + + if (pos < (int)wcslen(AddressString)) + { + sockaddr->sin_port = wcstol(&AddressString[pos], bp, 10); + } + else + { + sockaddr->sin_port = 0; + } + + /* Get ip number */ + pos = 0; + inetaddr = 0; + + while (pos < (int)wcslen(AddressString)) + { + inetaddr = (inetaddr << 8) + + ((UCHAR)wcstol(&AddressString[pos], bp, 10)); + + pos += wcscspn(&AddressString[pos], L".") + 1; + } + + *lpErrno = 0; + sockaddr->sin_addr.s_addr = inetaddr; + + } + } + + if (!*lpErrno) + { + return 0; + } + + return SOCKET_ERROR; +} /* * FUNCTION: Cleans up service provider for a client Modified: trunk/reactos/dll/win32/msafd/misc/stubs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msafd/misc/stubs…
============================================================================== --- trunk/reactos/dll/win32/msafd/misc/stubs.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msafd/misc/stubs.c [iso-8859-1] Tue Sep 20 08:12:44 2016 @@ -12,22 +12,6 @@ #include <wine/debug.h> WINE_DEFAULT_DEBUG_CHANNEL(msafd); - -INT -WSPAPI -WSPAddressToString( - IN LPSOCKADDR lpsaAddress, - IN DWORD dwAddressLength, - IN LPWSAPROTOCOL_INFOW lpProtocolInfo, - OUT LPWSTR lpszAddressString, - IN OUT LPDWORD lpdwAddressStringLength, - OUT LPINT lpErrno) -{ - UNIMPLEMENTED; - - return SOCKET_ERROR; -} - INT WSPAPI @@ -102,19 +86,4 @@ return (SOCKET)0; } -INT -WSPAPI -WSPStringToAddress( - IN LPWSTR AddressString, - IN INT AddressFamily, - IN LPWSAPROTOCOL_INFOW lpProtocolInfo, - OUT LPSOCKADDR lpAddress, - IN OUT LPINT lpAddressLength, - OUT LPINT lpErrno) -{ - UNIMPLEMENTED; - - return SOCKET_ERROR; -} - /* EOF */
8 years, 3 months
1
0
0
0
[jimtabor] 72745: [NtUser] - Use send message only and fix return for WM_NC/ACTIVATE. See CORE-11979 and CORE-11324.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Tue Sep 20 02:00:18 2016 New Revision: 72745 URL:
http://svn.reactos.org/svn/reactos?rev=72745&view=rev
Log: [NtUser] - Use send message only and fix return for WM_NC/ACTIVATE. See CORE-11979 and CORE-11324. Modified: trunk/reactos/win32ss/user/ntuser/focus.c trunk/reactos/win32ss/user/ntuser/nonclient.c trunk/reactos/win32ss/user/ntuser/winpos.c Modified: trunk/reactos/win32ss/user/ntuser/focus.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/focus.…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/focus.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/focus.c [iso-8859-1] Tue Sep 20 02:00:18 2016 @@ -54,14 +54,15 @@ USER_REFERENCE_ENTRY RefPrev; PWND WndPrev; BOOL Ret = TRUE; + LPARAM lParam = hWnd ? (LPARAM)hWnd : 0; if (hWndPrev && (WndPrev = ValidateHwndNoErr(hWndPrev))) { UserRefObjectCo(WndPrev, &RefPrev); - if (co_IntSendMessageNoWait(hWndPrev, WM_NCACTIVATE, FALSE, 0)) //(LPARAM)hWnd)) - { - co_IntSendMessageNoWait(hWndPrev, WM_ACTIVATE, + if (co_IntSendMessage(hWndPrev, WM_NCACTIVATE, FALSE, lParam)) + { + co_IntSendMessage(hWndPrev, WM_ACTIVATE, MAKEWPARAM(WA_INACTIVE, (WndPrev->style & WS_MINIMIZE) != 0), (LPARAM)hWnd); @@ -241,7 +242,7 @@ co_IntMakeWindowActive(Window); - co_IntSendMessageNoWait( UserHMGetHandle(Window), + co_IntSendMessage( UserHMGetHandle(Window), WM_NCACTIVATE, (WPARAM)(Window == (gpqForeground ? gpqForeground->spwndActive : NULL)), 0); //(LPARAM)hWndPrev); Modified: trunk/reactos/win32ss/user/ntuser/nonclient.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/noncli…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/nonclient.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/nonclient.c [iso-8859-1] Tue Sep 20 02:00:18 2016 @@ -1378,7 +1378,7 @@ } if ((Wnd->state & WNDS_NONCPAINT) || !(Wnd->style & WS_VISIBLE)) - return 0; + return TRUE; /* This isn't documented but is reproducible in at least XP SP2 and * Outlook 2007 depends on it Modified: trunk/reactos/win32ss/user/ntuser/winpos.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/winpos…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/winpos.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/winpos.c [iso-8859-1] Tue Sep 20 02:00:18 2016 @@ -2612,7 +2612,7 @@ { co_UserSetFocus(Wnd); // Fix wine Win test_SetFocus todo #3, - if (!(style & WS_CHILD)) co_IntSendMessageNoWait(UserHMGetHandle(Wnd), WM_ACTIVATE, WA_ACTIVE, 0); + if (!(style & WS_CHILD)) co_IntSendMessage(UserHMGetHandle(Wnd), WM_ACTIVATE, WA_ACTIVE, 0); } //ERR("co_WinPosShowWindow EXIT\n"); return WasVisible;
8 years, 3 months
1
0
0
0
[janderwald] 72744: [USBAUDIO] - fix minor bugs - start implementing filter context
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Sep 19 18:40:44 2016 New Revision: 72744 URL:
http://svn.reactos.org/svn/reactos?rev=72744&view=rev
Log: [USBAUDIO] - fix minor bugs - start implementing filter context Modified: trunk/reactos/drivers/usb/usbaudio/filter.c trunk/reactos/drivers/usb/usbaudio/usbaudio.c trunk/reactos/drivers/usb/usbaudio/usbaudio.h Modified: trunk/reactos/drivers/usb/usbaudio/filter.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbaudio/filte…
============================================================================== --- trunk/reactos/drivers/usb/usbaudio/filter.c [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbaudio/filter.c [iso-8859-1] Mon Sep 19 18:40:44 2016 @@ -15,6 +15,53 @@ { UNIMPLEMENTED return STATUS_NOT_IMPLEMENTED; +} + +VOID +CountTerminalUnits( + IN PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor, + OUT PULONG NonStreamingTerminalDescriptorCount, + OUT PULONG TotalTerminalDescriptorCount) +{ + PUSB_INTERFACE_DESCRIPTOR Descriptor; + PUSB_AUDIO_CONTROL_INTERFACE_HEADER_DESCRIPTOR InterfaceHeaderDescriptor; + PUSB_COMMON_DESCRIPTOR CommonDescriptor; + PUSB_AUDIO_CONTROL_INPUT_TERMINAL_DESCRIPTOR InputTerminalDescriptor; + ULONG NonStreamingTerminalCount = 0; + ULONG TotalTerminalCount = 0; + + for(Descriptor = USBD_ParseConfigurationDescriptorEx(ConfigurationDescriptor, ConfigurationDescriptor, -1, -1, USB_DEVICE_CLASS_AUDIO, -1, -1); + Descriptor != NULL; + Descriptor = USBD_ParseConfigurationDescriptorEx(ConfigurationDescriptor, (PVOID)((ULONG_PTR)Descriptor + Descriptor->bLength), -1, -1, USB_DEVICE_CLASS_AUDIO, -1, -1)) + { + if (Descriptor->bInterfaceSubClass == 0x01) /* AUDIO_CONTROL */ + { + InterfaceHeaderDescriptor = USBD_ParseDescriptors(ConfigurationDescriptor, ConfigurationDescriptor->wTotalLength, Descriptor, USB_AUDIO_CONTROL_TERMINAL_DESCRIPTOR_TYPE); + if (InterfaceHeaderDescriptor != NULL) + { + CommonDescriptor = USBD_ParseDescriptors(InterfaceHeaderDescriptor, InterfaceHeaderDescriptor->wTotalLength, (PVOID)((ULONG_PTR)InterfaceHeaderDescriptor + InterfaceHeaderDescriptor->bLength), USB_AUDIO_CONTROL_TERMINAL_DESCRIPTOR_TYPE); + while (CommonDescriptor) + { + InputTerminalDescriptor = (PUSB_AUDIO_CONTROL_INPUT_TERMINAL_DESCRIPTOR)CommonDescriptor; + if (InputTerminalDescriptor->bDescriptorSubtype == 0x02 /* INPUT TERMINAL*/ || InputTerminalDescriptor->bDescriptorSubtype == 0x03 /* OUTPUT_TERMINAL*/) + { + if (InputTerminalDescriptor->wTerminalType != USB_AUDIO_STREAMING_TERMINAL_TYPE) + { + NonStreamingTerminalCount++; + } + TotalTerminalCount++; + } + } + } + } + else if (Descriptor->bInterfaceSubClass == 0x03) /* MIDI_STREAMING */ + { + UNIMPLEMENTED + } + } + *NonStreamingTerminalDescriptorCount = NonStreamingTerminalCount; + *TotalTerminalDescriptorCount = TotalTerminalCount; + } NTSTATUS @@ -41,6 +88,7 @@ INIT_USBAUDIO_MID(&ComponentId->Manufacturer, DeviceExtension->DeviceDescriptor->idVendor); INIT_USBAUDIO_PID(&ComponentId->Product, DeviceExtension->DeviceDescriptor->idProduct); + UNIMPLEMENTED return STATUS_NOT_IMPLEMENTED; } @@ -66,14 +114,14 @@ if (!ComponentId) { /* no memory */ - return USBD_STATUS_INSUFFICIENT_RESOURCES; + return STATUS_INSUFFICIENT_RESOURCES; } Status = USBAudioInitComponentId(Device, ComponentId); if (!NT_SUCCESS(Status)) { /* failed*/ - FreeFunction(ComponentId); - return Status; + //FreeFunction(ComponentId); + //return Status; } FilterDescriptor.ComponentId = ComponentId; Modified: trunk/reactos/drivers/usb/usbaudio/usbaudio.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbaudio/usbau…
============================================================================== --- trunk/reactos/drivers/usb/usbaudio/usbaudio.c [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbaudio/usbaudio.c [iso-8859-1] Mon Sep 19 18:40:44 2016 @@ -246,7 +246,7 @@ } /* build descriptor request */ - UsbBuildGetDescriptorRequest(Urb, sizeof(struct _URB_CONTROL_DESCRIPTOR_REQUEST), USB_DEVICE_DESCRIPTOR_TYPE, 0, 0, ConfigurationDescriptor, NULL, sizeof(USB_CONFIGURATION_DESCRIPTOR), NULL); + UsbBuildGetDescriptorRequest(Urb, sizeof(struct _URB_CONTROL_DESCRIPTOR_REQUEST), USB_CONFIGURATION_DESCRIPTOR_TYPE, 0, 0, ConfigurationDescriptor, NULL, sizeof(USB_CONFIGURATION_DESCRIPTOR), NULL); /* submit urb */ Status = SubmitUrbSync(Device, Urb); @@ -276,7 +276,7 @@ } /* build descriptor request */ - UsbBuildGetDescriptorRequest(Urb, sizeof(struct _URB_CONTROL_DESCRIPTOR_REQUEST), USB_DEVICE_DESCRIPTOR_TYPE, 0, 0, ConfigurationDescriptor, NULL, Length, NULL); + UsbBuildGetDescriptorRequest(Urb, sizeof(struct _URB_CONTROL_DESCRIPTOR_REQUEST), USB_CONFIGURATION_DESCRIPTOR_TYPE, 0, 0, ConfigurationDescriptor, NULL, Length, NULL); /* submit urb */ Status = SubmitUrbSync(Device, Urb); @@ -349,7 +349,7 @@ if (NT_SUCCESS(Status)) { /* TODO build filter topology and pin descriptors and retrieve interface */ - UNIMPLEMENTED + Status = USBAudioCreateFilterContext(Device); } } Modified: trunk/reactos/drivers/usb/usbaudio/usbaudio.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbaudio/usbau…
============================================================================== --- trunk/reactos/drivers/usb/usbaudio/usbaudio.h [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbaudio/usbaudio.h [iso-8859-1] Mon Sep 19 18:40:44 2016 @@ -11,6 +11,68 @@ #include <debug.h> #define USBAUDIO_TAG 'AbsU' +#define USB_AUDIO_CONTROL_TERMINAL_DESCRIPTOR_TYPE (0x24) + +/* Universal Serial Bus Device Class Definition for Terminal Types Section 2.2 */ +#define USB_AUDIO_STREAMING_TERMINAL_TYPE (0x0101) + +#define USB_AUDIO_MICROPHONE_TERMINAL_TYPE (0x0201) +#define USB_AUDIO_DESKTOP_MICROPHONE_TERMINAL_TYPE (0x0202) +#define USB_AUDIO_PERSONAL_MICROPHONE_TERMINAL_TYPE (0x0203) +#define USB_AUDIO_OMMNI_MICROPHONE_TERMINAL_TYPE (0x0204) +#define USB_AUDIO_ARRAY_MICROPHONE_TERMINAL_TYPE (0x0205) +#define USB_AUDIO_ARRAY_PROCESSING_MICROPHONE_TERMINAL_TYPE (0x0206) + +#define USB_AUDIO_SPEAKER_TERMINAL_TYPE (0x0301) +#define USB_HEADPHONES_SPEAKER_TERMINAL_TYPE (0x0302) +#define USB_AUDIO_HMDA_TERMINAL_TYPE (0x0303) +#define USB_AUDIO_DESKTOP_SPEAKER_TERMINAL_TYPE (0x0304) +#define USB_AUDIO_ROOM_SPEAKER_TERMINAL_TYPE (0x0305) +#define USB_AUDIO_COMMUNICATION_SPEAKER_TERMINAL_TYPE (0x0306) +#define USB_AUDIO_SUBWOOFER_TERMINAL_TYPE (0x0307) +#define USB_AUDIO_UNDEFINED_TERMINAL_TYPE (0xFFFF) + + +#include <pshpack1.h> + +typedef struct +{ + UCHAR bLength; + UCHAR bDescriptorType; + UCHAR bDescriptorSubtype; + USHORT bcdADC; + USHORT wTotalLength; + UCHAR bInCollection; + UCHAR baInterfaceNr; +}USB_AUDIO_CONTROL_INTERFACE_HEADER_DESCRIPTOR, *PUSB_AUDIO_CONTROL_INTERFACE_HEADER_DESCRIPTOR; + +typedef struct +{ + UCHAR bLength; + UCHAR bDescriptorType; + UCHAR bDescriptorSubtype; + UCHAR bTerminalID; + USHORT wTerminalType; + UCHAR bAssocTerminal; + UCHAR bSourceID; + UCHAR iTerminal; +}USB_AUDIO_CONTROL_OUTPUT_TERMINAL_DESCRIPTOR, *PUSB_AUDIO_CONTROL_OUTPUT_TERMINAL_DESCRIPTOR; + + +typedef struct +{ + UCHAR bLength; + UCHAR bDescriptorType; + UCHAR bDescriptorSubtype; + UCHAR bTerminalID; + USHORT wTerminalType; + UCHAR bAssocTerminal; + UCHAR bNrChannels; + USHORT wChannelConfig; + UCHAR iChannelNames; + UCHAR iTerminal; +}USB_AUDIO_CONTROL_INPUT_TERMINAL_DESCRIPTOR, *PUSB_AUDIO_CONTROL_INPUT_TERMINAL_DESCRIPTOR; +#include <poppack.h> typedef struct __DEVICE_EXTENSION__ { @@ -21,6 +83,13 @@ USBD_CONFIGURATION_HANDLE ConfigurationHandle; /* configuration handle */ }DEVICE_EXTENSION, *PDEVICE_EXTENSION; + +/* filter.c */ + +NTSTATUS +NTAPI +USBAudioCreateFilterContext( + PKSDEVICE Device); /* pool.c */ PVOID
8 years, 3 months
1
0
0
0
[akhaldi] 72743: [PSDK] Apply our headers style to winwlx.h. Supersedes and fixes the "fix whitespace" part of r72741.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon Sep 19 17:04:27 2016 New Revision: 72743 URL:
http://svn.reactos.org/svn/reactos?rev=72743&view=rev
Log: [PSDK] Apply our headers style to winwlx.h. Supersedes and fixes the "fix whitespace" part of r72741. Modified: trunk/reactos/sdk/include/psdk/winwlx.h Modified: trunk/reactos/sdk/include/psdk/winwlx.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/psdk/winwlx.h?…
============================================================================== --- trunk/reactos/sdk/include/psdk/winwlx.h [iso-8859-1] (original) +++ trunk/reactos/sdk/include/psdk/winwlx.h [iso-8859-1] Mon Sep 19 17:04:27 2016 @@ -25,31 +25,30 @@ extern "C" { #endif - -#define WLX_VERSION_1_0 0x00010000 -#define WLX_VERSION_1_1 0x00010001 -#define WLX_VERSION_1_2 0x00010002 -#define WLX_VERSION_1_3 0x00010003 -#define WLX_VERSION_1_4 0x00010004 -#define WLX_CURRENT_VERSION (WLX_VERSION_1_4) - -#define WLX_SAS_TYPE_TIMEOUT 0x0000 -#define WLX_SAS_TYPE_CTRL_ALT_DEL 0x0001 -#define WLX_SAS_TYPE_SCRNSVR_TIMEOUT 0x0002 -#define WLX_SAS_TYPE_SCRNSVR_ACTIVITY 0x0003 -#define WLX_SAS_TYPE_USER_LOGOFF 0x0004 -#define WLX_SAS_TYPE_SC_INSERT 0x0005 -#define WLX_SAS_TYPE_SC_REMOVE 0x0006 -#define WLX_SAS_TYPE_AUTHENTICATED 0x0007 -#define WLX_SAS_TYPE_SC_FIRST_READER_ARRIVED 0x0008 -#define WLX_SAS_TYPE_SC_LAST_READER_REMOVED 0x0009 -#define WLX_SAS_TYPE_SWITCHUSER 0x000A -#define WLX_SAS_TYPE_MAX_MSFT_VALUE 0x007F - -#define WLX_LOGON_OPT_NO_PROFILE 0x0001 - -#define WLX_PROFILE_TYPE_V1_0 0x0001 -#define WLX_PROFILE_TYPE_V2_0 0x0002 /* Default */ +#define WLX_VERSION_1_0 0x00010000 +#define WLX_VERSION_1_1 0x00010001 +#define WLX_VERSION_1_2 0x00010002 +#define WLX_VERSION_1_3 0x00010003 +#define WLX_VERSION_1_4 0x00010004 +#define WLX_CURRENT_VERSION (WLX_VERSION_1_4) + +#define WLX_SAS_TYPE_TIMEOUT 0x0000 +#define WLX_SAS_TYPE_CTRL_ALT_DEL 0x0001 +#define WLX_SAS_TYPE_SCRNSVR_TIMEOUT 0x0002 +#define WLX_SAS_TYPE_SCRNSVR_ACTIVITY 0x0003 +#define WLX_SAS_TYPE_USER_LOGOFF 0x0004 +#define WLX_SAS_TYPE_SC_INSERT 0x0005 +#define WLX_SAS_TYPE_SC_REMOVE 0x0006 +#define WLX_SAS_TYPE_AUTHENTICATED 0x0007 +#define WLX_SAS_TYPE_SC_FIRST_READER_ARRIVED 0x0008 +#define WLX_SAS_TYPE_SC_LAST_READER_REMOVED 0x0009 +#define WLX_SAS_TYPE_SWITCHUSER 0x000A +#define WLX_SAS_TYPE_MAX_MSFT_VALUE 0x007F + +#define WLX_LOGON_OPT_NO_PROFILE 0x0001 + +#define WLX_PROFILE_TYPE_V1_0 0x0001 +#define WLX_PROFILE_TYPE_V2_0 0x0002 /* Default */ #define WLX_SAS_ACTION_LOGON 0x0001 #define WLX_SAS_ACTION_NONE 0x0002 @@ -69,610 +68,569 @@ #define WLX_SAS_ACTION_DELAYED_FORCE_LOGOFF 0x0010 #define WLX_SAS_ACTION_SWITCH_CONSOLE 0x0011 -#define WLX_WM_SAS (WM_USER + 0x0259) - -#define WLX_DLG_SAS 0x0065 -#define WLX_DLG_INPUT_TIMEOUT 0x0066 /* Input (keys, ...) timed out */ -#define WLX_DLG_SCREEN_SAVER_TIMEOUT 0x0067 /* Screen saver activated */ -#define WLX_DLG_USER_LOGOFF 0x0068 /* User logged off */ - -#define WLX_DIRECTORY_LENGTH 0x0100 - -#define WLX_CREDENTIAL_TYPE_V1_0 0x0001 -#define WLX_CREDENTIAL_TYPE_V2_0 0x0002 - -#define WLX_CONSOLESWITCHCREDENTIAL_TYPE_V1_0 0x0001 - -#define STATUSMSG_OPTION_NOANIMATION 0x0001 -#define STATUSMSG_OPTION_SETFOREGROUND 0x0002 - - -typedef -struct _WLX_CLIENT_CREDENTIALS_INFO -{ - DWORD dwType; - PWSTR pszUserName; - PWSTR pszDomain; - PWSTR pszPassword; - BOOL fPromptForPassword; +#define WLX_WM_SAS (WM_USER + 0x0259) + +#define WLX_DLG_SAS 0x0065 +#define WLX_DLG_INPUT_TIMEOUT 0x0066 /* Input (keys, ...) timed out */ +#define WLX_DLG_SCREEN_SAVER_TIMEOUT 0x0067 /* Screen saver activated */ +#define WLX_DLG_USER_LOGOFF 0x0068 /* User logged off */ + +#define WLX_DIRECTORY_LENGTH 0x0100 + +#define WLX_CREDENTIAL_TYPE_V1_0 0x0001 +#define WLX_CREDENTIAL_TYPE_V2_0 0x0002 + +#define WLX_CONSOLESWITCHCREDENTIAL_TYPE_V1_0 0x0001 + +#define STATUSMSG_OPTION_NOANIMATION 0x0001 +#define STATUSMSG_OPTION_SETFOREGROUND 0x0002 + +typedef struct _WLX_CLIENT_CREDENTIALS_INFO { + DWORD dwType; + PWSTR pszUserName; + PWSTR pszDomain; + PWSTR pszPassword; + BOOL fPromptForPassword; } WLX_CLIENT_CREDENTIALS_INFO_V1_0, *PWLX_CLIENT_CREDENTIALS_INFO_V1_0; -typedef -struct _WLX_CLIENT_CREDENTIALS_INFO_2_0 -{ - DWORD dwType; - PWSTR pszUserName; - PWSTR pszDomain; - PWSTR pszPassword; - BOOL fPromptForPassword; - BOOL fDisconnectOnLogonFailure; +typedef struct _WLX_CLIENT_CREDENTIALS_INFO_2_0 { + DWORD dwType; + PWSTR pszUserName; + PWSTR pszDomain; + PWSTR pszPassword; + BOOL fPromptForPassword; + BOOL fDisconnectOnLogonFailure; } WLX_CLIENT_CREDENTIALS_INFO_V2_0, *PWLX_CLIENT_CREDENTIALS_INFO_V2_0; -typedef -struct _WLX_CONSOLESWITCH_CREDENTIALS_INFO -{ - DWORD dwType; - HANDLE UserToken; - LUID LogonId; - QUOTA_LIMITS Quotas; - PWSTR UserName; - PWSTR Domain; - LARGE_INTEGER LogonTime; - BOOL SmartCardLogon; - ULONG ProfileLength; - DWORD MessageType; - USHORT LogonCount; - USHORT BadPasswordCount; - LARGE_INTEGER ProfileLogonTime; - LARGE_INTEGER LogoffTime; - LARGE_INTEGER KickOffTime; - LARGE_INTEGER PasswordLastSet; - LARGE_INTEGER PasswordCanChange; - LARGE_INTEGER PasswordMustChange; - PWSTR LogonScript; - PWSTR HomeDirectory; - PWSTR FullName; - PWSTR ProfilePath; - PWSTR HomeDirectoryDrive; - PWSTR LogonServer; - ULONG UserFlags; - ULONG PrivateDataLen; - PBYTE PrivateData; +typedef struct _WLX_CONSOLESWITCH_CREDENTIALS_INFO { + DWORD dwType; + HANDLE UserToken; + LUID LogonId; + QUOTA_LIMITS Quotas; + PWSTR UserName; + PWSTR Domain; + LARGE_INTEGER LogonTime; + BOOL SmartCardLogon; + ULONG ProfileLength; + DWORD MessageType; + USHORT LogonCount; + USHORT BadPasswordCount; + LARGE_INTEGER ProfileLogonTime; + LARGE_INTEGER LogoffTime; + LARGE_INTEGER KickOffTime; + LARGE_INTEGER PasswordLastSet; + LARGE_INTEGER PasswordCanChange; + LARGE_INTEGER PasswordMustChange; + PWSTR LogonScript; + PWSTR HomeDirectory; + PWSTR FullName; + PWSTR ProfilePath; + PWSTR HomeDirectoryDrive; + PWSTR LogonServer; + ULONG UserFlags; + ULONG PrivateDataLen; + PBYTE PrivateData; } WLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0, *PWLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0; -typedef -struct _WLX_MPR_NOTIFY_INFO -{ - PWSTR pszUserName; - PWSTR pszDomain; - PWSTR pszPassword; - PWSTR pszOldPassword; +typedef struct _WLX_MPR_NOTIFY_INFO { + PWSTR pszUserName; + PWSTR pszDomain; + PWSTR pszPassword; + PWSTR pszOldPassword; } WLX_MPR_NOTIFY_INFO, *PWLX_MPR_NOTIFY_INFO; -typedef -struct _WLX_PROFILE_V1_0 -{ - DWORD dwType; - PWSTR pszProfile; +typedef struct _WLX_PROFILE_V1_0 { + DWORD dwType; + PWSTR pszProfile; } WLX_PROFILE_V1_0, *PWLX_PROFILE_V1_0; -typedef -struct _WLX_PROFILE_V2_0 -{ - DWORD dwType; - PWSTR pszProfile; - PWSTR pszPolicy; - PWSTR pszNetworkDefaultUserProfile; - PWSTR pszServerName; - PWSTR pszEnvironment; +typedef struct _WLX_PROFILE_V2_0 { + DWORD dwType; + PWSTR pszProfile; + PWSTR pszPolicy; + PWSTR pszNetworkDefaultUserProfile; + PWSTR pszServerName; + PWSTR pszEnvironment; } WLX_PROFILE_V2_0, *PWLX_PROFILE_V2_0; -typedef -struct _WLX_SC_NOTIFICATION_INFO -{ - PWSTR pszCard; - PWSTR pszReader; - PWSTR pszContainer; - PWSTR pszCryptoProvider; +typedef struct _WLX_SC_NOTIFICATION_INFO { + PWSTR pszCard; + PWSTR pszReader; + PWSTR pszContainer; + PWSTR pszCryptoProvider; } WLX_SC_NOTIFICATION_INFO, *PWLX_SC_NOTIFICATION_INFO; -typedef -struct _WLX_TERMINAL_SERVICES_DATA -{ - WCHAR ProfilePath[WLX_DIRECTORY_LENGTH + 1]; - WCHAR HomeDir[WLX_DIRECTORY_LENGTH + 1]; - WCHAR HomeDirDrive[4]; +typedef struct _WLX_TERMINAL_SERVICES_DATA { + WCHAR ProfilePath[WLX_DIRECTORY_LENGTH + 1]; + WCHAR HomeDir[WLX_DIRECTORY_LENGTH + 1]; + WCHAR HomeDirDrive[4]; } WLX_TERMINAL_SERVICES_DATA, *PWLX_TERMINAL_SERVICES_DATA; - /* GINA Version 1.0 */ BOOL WINAPI WlxActivateUserShell( - _In_ PVOID pWlxContext, - _In_ PWSTR pszDesktopName, - _In_ PWSTR pszMprLogonScript, - _In_ PVOID pEnvironment); + _In_ PVOID pWlxContext, + _In_ PWSTR pszDesktopName, + _In_ PWSTR pszMprLogonScript, + _In_ PVOID pEnvironment); VOID WINAPI WlxDisplayLockedNotice( - _In_ PVOID pWlxContext); + _In_ PVOID pWlxContext); VOID WINAPI WlxDisplaySASNotice( - _In_ PVOID pWlxContext); + _In_ PVOID pWlxContext); BOOL WINAPI WlxInitialize( - _In_ LPWSTR lpWinsta, - _In_ HANDLE hWlx, - _In_ PVOID pvReserved, - _In_ PVOID pWinlogonFunctions, - _Out_ PVOID *pWlxContext); + _In_ LPWSTR lpWinsta, + _In_ HANDLE hWlx, + _In_ PVOID pvReserved, + _In_ PVOID pWinlogonFunctions, + _Out_ PVOID *pWlxContext); BOOL WINAPI WlxIsLockOk( - _In_ PVOID pWlxContext); + _In_ PVOID pWlxContext); BOOL WINAPI WlxIsLogoffOk( - _In_ PVOID pWlxContext); + _In_ PVOID pWlxContext); INT WINAPI WlxLoggedOnSAS( - _In_ PVOID pWlxContext, - _In_ DWORD dwSasType, - _In_ PVOID pReserved); + _In_ PVOID pWlxContext, + _In_ DWORD dwSasType, + _In_ PVOID pReserved); INT WINAPI WlxLoggedOutSAS( - _In_ PVOID pWlxContext, - _In_ DWORD dwSasType, - _Out_ PLUID pAuthenticationId, - _Inout_ PSID pLogonSid, - _Out_ PDWORD pdwOptions, - _Out_ PHANDLE phToken, - _Out_ PWLX_MPR_NOTIFY_INFO pNprNotifyInfo, - _Out_ PVOID *pProfile); + _In_ PVOID pWlxContext, + _In_ DWORD dwSasType, + _Out_ PLUID pAuthenticationId, + _Inout_ PSID pLogonSid, + _Out_ PDWORD pdwOptions, + _Out_ PHANDLE phToken, + _Out_ PWLX_MPR_NOTIFY_INFO pNprNotifyInfo, + _Out_ PVOID *pProfile); VOID WINAPI WlxLogoff( - _In_ PVOID pWlxContext); + _In_ PVOID pWlxContext); BOOL WINAPI WlxNegotiate( - _In_ DWORD dwWinlogonVersion, - _Out_ PDWORD pdwDllVersion); + _In_ DWORD dwWinlogonVersion, + _Out_ PDWORD pdwDllVersion); VOID WINAPI WlxShutdown( - _In_ PVOID pWlxContext, - _In_ DWORD ShutdownType); + _In_ PVOID pWlxContext, + _In_ DWORD ShutdownType); INT WINAPI WlxWkstaLockedSAS( - _In_ PVOID pWlxContext, - _In_ DWORD dwSasType); - + _In_ PVOID pWlxContext, + _In_ DWORD dwSasType); /* GINA Version 1.1 */ BOOL WINAPI WlxScreenSaverNotify( - _In_ PVOID pWlxContext, - _Inout_ BOOL *pSecure); + _In_ PVOID pWlxContext, + _Inout_ BOOL *pSecure); BOOL WINAPI WlxStartApplication( - _In_ PVOID pWlxContext, - _In_ PWSTR pszDesktopName, - _In_ PVOID pEnvironment, - _In_ PWSTR pszCmdLine); - + _In_ PVOID pWlxContext, + _In_ PWSTR pszDesktopName, + _In_ PVOID pEnvironment, + _In_ PWSTR pszCmdLine); /* GINA Version 1.3 */ BOOL WINAPI WlxDisplayStatusMessage( - _In_ PVOID pWlxContext, - _In_ HDESK hDesktop, - _In_ DWORD dwOptions, - _In_ PWSTR pTitle, - _In_ PWSTR pMessage); + _In_ PVOID pWlxContext, + _In_ HDESK hDesktop, + _In_ DWORD dwOptions, + _In_ PWSTR pTitle, + _In_ PWSTR pMessage); BOOL WINAPI WlxGetStatusMessage( - _In_ PVOID pWlxContext, - _Out_ DWORD *pdwOptions, - _Out_ PWSTR pMessage, - _In_ DWORD dwBufferSize); + _In_ PVOID pWlxContext, + _Out_ DWORD *pdwOptions, + _Out_ PWSTR pMessage, + _In_ DWORD dwBufferSize); BOOL WINAPI WlxNetworkProviderLoad( - _In_ PVOID pWlxContext, - _Out_ PWLX_MPR_NOTIFY_INFO pNprNotifyInfo); + _In_ PVOID pWlxContext, + _Out_ PWLX_MPR_NOTIFY_INFO pNprNotifyInfo); BOOL WINAPI WlxRemoveStatusMessage( - _In_ PVOID pWlxContext); - + _In_ PVOID pWlxContext); /* GINA Version 1.4 */ VOID WINAPI WlxDisconnectNotify( - _In_ PVOID pWlxContext); + _In_ PVOID pWlxContext); BOOL WINAPI WlxGetConsoleSwitchCredentials( - _In_ PVOID pWlxContext, - _Out_ PVOID pCredInfo); + _In_ PVOID pWlxContext, + _Out_ PVOID pCredInfo); VOID WINAPI WlxReconnectNotify( - _In_ PVOID pWlxContext); - + _In_ PVOID pWlxContext); /* Services that Winlogon provides */ -#define WLX_DESKTOP_NAME 0x0001 /* Name present */ -#define WLX_DESKTOP_HANDLE 0x0002 /* Handle present */ - -#define WLX_CREATE_INSTANCE_ONLY 0x0001 -#define WLX_CREATE_USER 0x0002 - -#define WLX_OPTION_USE_CTRL_ALT_DEL 0x0001 -#define WLX_OPTION_CONTEXT_POINTER 0x0002 -#define WLX_OPTION_USE_SMART_CARD 0x0003 -#define WLX_OPTION_FORCE_LOGOFF_TIME 0x0004 -#define WLX_OPTION_IGNORE_AUTO_LOGON 0x0008 -#define WLX_OPTION_NO_SWITCH_ON_SAS 0x0009 - -#define WLX_OPTION_SMART_CARD_PRESENT 0x00010001 -#define WLX_OPTION_SMART_CARD_INFO 0x00010002 -#define WLX_OPTION_DISPATCH_TABLE_SIZE 0x00010003 - -typedef -struct _WLX_DESKTOP -{ - DWORD Size; - DWORD Flags; - HDESK hDesktop; - PWSTR pszDesktopName; +#define WLX_DESKTOP_NAME 0x0001 /* Name present */ +#define WLX_DESKTOP_HANDLE 0x0002 /* Handle present */ + +#define WLX_CREATE_INSTANCE_ONLY 0x0001 +#define WLX_CREATE_USER 0x0002 + +#define WLX_OPTION_USE_CTRL_ALT_DEL 0x0001 +#define WLX_OPTION_CONTEXT_POINTER 0x0002 +#define WLX_OPTION_USE_SMART_CARD 0x0003 +#define WLX_OPTION_FORCE_LOGOFF_TIME 0x0004 +#define WLX_OPTION_IGNORE_AUTO_LOGON 0x0008 +#define WLX_OPTION_NO_SWITCH_ON_SAS 0x0009 + +#define WLX_OPTION_SMART_CARD_PRESENT 0x00010001 +#define WLX_OPTION_SMART_CARD_INFO 0x00010002 +#define WLX_OPTION_DISPATCH_TABLE_SIZE 0x00010003 + +typedef struct _WLX_DESKTOP { + DWORD Size; + DWORD Flags; + HDESK hDesktop; + PWSTR pszDesktopName; } WLX_DESKTOP, *PWLX_DESKTOP; -typedef -INT (WINAPI *PWLX_ASSIGN_SHELL_PROTECTION)( - _In_ HANDLE hWlx, - _In_ HANDLE hToken, - _In_ HANDLE hProcess, - _In_ HANDLE hThread); - -typedef -INT (WINAPI *PWLX_CHANGE_PASSWORD_NOTIFY)( - _In_ HANDLE hWlx, - _In_ PWLX_MPR_NOTIFY_INFO pMprInfo, - _In_ DWORD dwChangeInfo); - -typedef -INT (WINAPI *PWLX_CHANGE_PASSWORD_NOTIFY_EX)( - _In_ HANDLE hWlx, - _In_ PWLX_MPR_NOTIFY_INFO pMprInfo, - _In_ DWORD dwChangeInfo, - _In_ PWSTR ProviderName, - _In_ PVOID Reserved); - -typedef -BOOL (WINAPI *PWLX_CLOSE_USER_DESKTOP)( - _In_ HANDLE hWlx, - _In_ PWLX_DESKTOP pDesktop, - _In_ HANDLE hToken); - -typedef -BOOL (WINAPI *PWLX_CREATE_USER_DESKTOP)( - _In_ HANDLE hWlx, - _In_ HANDLE hToken, - _In_ DWORD Flags, - _In_ PWSTR pszDesktopName, - _Out_ PWLX_DESKTOP *ppDesktop); - -typedef -INT (WINAPI *PWLX_DIALOG_BOX)( - _In_ HANDLE hWlx, - _In_ HANDLE hInst, - _In_ LPWSTR lpszTemplate, - _In_ HWND hwndOwner, - _In_ DLGPROC dlgprc); - -typedef -INT (WINAPI *PWLX_DIALOG_BOX_INDIRECT)( - _In_ HANDLE hWlx, - _In_ HANDLE hInst, - _In_ LPCDLGTEMPLATE hDialogTemplate, - _In_ HWND hwndOwner, - _In_ DLGPROC dlgprc); - -typedef -INT (WINAPI *PWLX_DIALOG_BOX_INDIRECT_PARAM)( - _In_ HANDLE hWlx, - _In_ HANDLE hInst, - _In_ LPCDLGTEMPLATE hDialogTemplate, - _In_ HWND hwndOwner, - _In_ DLGPROC dlgprc, - _In_ LPARAM dwInitParam); - -typedef -INT (WINAPI *PWLX_DIALOG_BOX_PARAM)( - _In_ HANDLE hWlx, - _In_ HANDLE hInst, - _In_ LPWSTR lpszTemplate, - _In_ HWND hwndOwner, - _In_ DLGPROC dlgprc, - _In_ LPARAM dwInitParam); - -typedef -BOOL (WINAPI *PWLX_DISCONNECT)(VOID); - -typedef -BOOL (WINAPI *PWLX_GET_OPTION)( - _In_ HANDLE hWlx, - _In_ DWORD Option, - _Out_ ULONG_PTR *Value); - -typedef -BOOL (WINAPI *PWLX_GET_SOURCE_DESKTOP)( - _In_ HANDLE hWlx, - _Out_ PWLX_DESKTOP *ppDesktop); - -typedef -INT (WINAPI *PWLX_MESSAGE_BOX)( - _In_ HANDLE hWlx, - _In_ HWND hwndOwner, - _In_ LPWSTR lpszText, - _In_ LPWSTR lpszTitle, - _In_ UINT fuStyle); - -typedef -BOOL (WINAPI *PWLX_QUERY_CLIENT_CREDENTIALS)( - _Out_ PWLX_CLIENT_CREDENTIALS_INFO_V1_0 pCred); - -typedef -DWORD (WINAPI *PWLX_QUERY_CONSOLESWITCH_CREDENTIALS)( - _Out_ PWLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0 pCred); - -typedef -BOOL (WINAPI *PWLX_QUERY_IC_CREDENTIALS)( - _Out_ PWLX_CLIENT_CREDENTIALS_INFO_V1_0 pCred); - -typedef -DWORD (WINAPI *PWLX_QUERY_TERMINAL_SERVICES_DATA)( - _In_ HANDLE hWlx, - _Out_ PWLX_TERMINAL_SERVICES_DATA pTSData, - _In_ WCHAR *UserName, - _In_ WCHAR *Domain); - -typedef -BOOL (WINAPI *PWLX_QUERY_TS_LOGON_CREDENTIALS)( - _Out_ PWLX_CLIENT_CREDENTIALS_INFO_V2_0 pCred); - -typedef -VOID (WINAPI *PWLX_SAS_NOTIFY)( - _In_ HANDLE hWlx, - _In_ DWORD dwSasType); - -typedef -VOID (WINAPI *PWLX_SET_CONTEXT_POINTER)( - _In_ HANDLE hWlx, - _In_ PVOID pWlxContext); - -typedef -BOOL (WINAPI *PWLX_SET_OPTION)( - _In_ HANDLE hWlx, - _In_ DWORD Option, - _In_ ULONG_PTR Value, - _Out_ ULONG_PTR *OldValue); - -typedef -BOOL (WINAPI *PWLX_SET_RETURN_DESKTOP)( - _In_ HANDLE hWlx, - _In_ PWLX_DESKTOP pDesktop); - -typedef -BOOL (WINAPI *PWLX_SET_TIMEOUT)( - _In_ HANDLE hWlx, - _In_ DWORD Timeout); - -typedef -INT (WINAPI *PWLX_SWITCH_DESKTOP_TO_USER)( - _In_ HANDLE hWlx); - -typedef -INT (WINAPI *PWLX_SWITCH_DESKTOP_TO_WINLOGON)( - _In_ HANDLE hWlx); - -typedef -VOID (WINAPI *PWLX_USE_CTRL_ALT_DEL)( - _In_ HANDLE hWlx); - -typedef -VOID (WINAPI *PWLX_WIN31_MIGRATE)( - _In_ HANDLE hWlx); - +typedef INT +(WINAPI *PWLX_ASSIGN_SHELL_PROTECTION)( + _In_ HANDLE hWlx, + _In_ HANDLE hToken, + _In_ HANDLE hProcess, + _In_ HANDLE hThread); + +typedef INT +(WINAPI *PWLX_CHANGE_PASSWORD_NOTIFY)( + _In_ HANDLE hWlx, + _In_ PWLX_MPR_NOTIFY_INFO pMprInfo, + _In_ DWORD dwChangeInfo); + +typedef INT +(WINAPI *PWLX_CHANGE_PASSWORD_NOTIFY_EX)( + _In_ HANDLE hWlx, + _In_ PWLX_MPR_NOTIFY_INFO pMprInfo, + _In_ DWORD dwChangeInfo, + _In_ PWSTR ProviderName, + _In_ PVOID Reserved); + +typedef BOOL +(WINAPI *PWLX_CLOSE_USER_DESKTOP)( + _In_ HANDLE hWlx, + _In_ PWLX_DESKTOP pDesktop, + _In_ HANDLE hToken); + +typedef BOOL +(WINAPI *PWLX_CREATE_USER_DESKTOP)( + _In_ HANDLE hWlx, + _In_ HANDLE hToken, + _In_ DWORD Flags, + _In_ PWSTR pszDesktopName, + _Out_ PWLX_DESKTOP *ppDesktop); + +typedef INT +(WINAPI *PWLX_DIALOG_BOX)( + _In_ HANDLE hWlx, + _In_ HANDLE hInst, + _In_ LPWSTR lpszTemplate, + _In_ HWND hwndOwner, + _In_ DLGPROC dlgprc); + +typedef INT +(WINAPI *PWLX_DIALOG_BOX_INDIRECT)( + _In_ HANDLE hWlx, + _In_ HANDLE hInst, + _In_ LPCDLGTEMPLATE hDialogTemplate, + _In_ HWND hwndOwner, + _In_ DLGPROC dlgprc); + +typedef INT +(WINAPI *PWLX_DIALOG_BOX_INDIRECT_PARAM)( + _In_ HANDLE hWlx, + _In_ HANDLE hInst, + _In_ LPCDLGTEMPLATE hDialogTemplate, + _In_ HWND hwndOwner, + _In_ DLGPROC dlgprc, + _In_ LPARAM dwInitParam); + +typedef INT +(WINAPI *PWLX_DIALOG_BOX_PARAM)( + _In_ HANDLE hWlx, + _In_ HANDLE hInst, + _In_ LPWSTR lpszTemplate, + _In_ HWND hwndOwner, + _In_ DLGPROC dlgprc, + _In_ LPARAM dwInitParam); + +typedef BOOL +(WINAPI *PWLX_DISCONNECT)(VOID); + +typedef BOOL +(WINAPI *PWLX_GET_OPTION)( + _In_ HANDLE hWlx, + _In_ DWORD Option, + _Out_ ULONG_PTR *Value); + +typedef BOOL +(WINAPI *PWLX_GET_SOURCE_DESKTOP)( + _In_ HANDLE hWlx, + _Out_ PWLX_DESKTOP *ppDesktop); + +typedef INT +(WINAPI *PWLX_MESSAGE_BOX)( + _In_ HANDLE hWlx, + _In_ HWND hwndOwner, + _In_ LPWSTR lpszText, + _In_ LPWSTR lpszTitle, + _In_ UINT fuStyle); + +typedef BOOL +(WINAPI *PWLX_QUERY_CLIENT_CREDENTIALS)( + _Out_ PWLX_CLIENT_CREDENTIALS_INFO_V1_0 pCred); + +typedef DWORD +(WINAPI *PWLX_QUERY_CONSOLESWITCH_CREDENTIALS)( + _Out_ PWLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0 pCred); + +typedef BOOL +(WINAPI *PWLX_QUERY_IC_CREDENTIALS)( + _Out_ PWLX_CLIENT_CREDENTIALS_INFO_V1_0 pCred); + +typedef DWORD +(WINAPI *PWLX_QUERY_TERMINAL_SERVICES_DATA)( + _In_ HANDLE hWlx, + _Out_ PWLX_TERMINAL_SERVICES_DATA pTSData, + _In_ WCHAR *UserName, + _In_ WCHAR *Domain); + +typedef BOOL +(WINAPI *PWLX_QUERY_TS_LOGON_CREDENTIALS)( + _Out_ PWLX_CLIENT_CREDENTIALS_INFO_V2_0 pCred); + +typedef VOID +(WINAPI *PWLX_SAS_NOTIFY)( + _In_ HANDLE hWlx, + _In_ DWORD dwSasType); + +typedef VOID +(WINAPI *PWLX_SET_CONTEXT_POINTER)( + _In_ HANDLE hWlx, + _In_ PVOID pWlxContext); + +typedef BOOL +(WINAPI *PWLX_SET_OPTION)( + _In_ HANDLE hWlx, + _In_ DWORD Option, + _In_ ULONG_PTR Value, + _Out_ ULONG_PTR *OldValue); + +typedef BOOL +(WINAPI *PWLX_SET_RETURN_DESKTOP)( + _In_ HANDLE hWlx, + _In_ PWLX_DESKTOP pDesktop); + +typedef BOOL +(WINAPI *PWLX_SET_TIMEOUT)( + _In_ HANDLE hWlx, + _In_ DWORD Timeout); + +typedef INT +(WINAPI *PWLX_SWITCH_DESKTOP_TO_USER)( + _In_ HANDLE hWlx); + +typedef INT +(WINAPI *PWLX_SWITCH_DESKTOP_TO_WINLOGON)( + _In_ HANDLE hWlx); + +typedef VOID +(WINAPI *PWLX_USE_CTRL_ALT_DEL)( + _In_ HANDLE hWlx); + +typedef VOID +(WINAPI *PWLX_WIN31_MIGRATE)( + _In_ HANDLE hWlx); /* Function dispatch tables */ -typedef -struct _WLX_DISPATCH_VERSION_1_0 -{ - PWLX_USE_CTRL_ALT_DEL WlxUseCtrlAltDel; - PWLX_SET_CONTEXT_POINTER WlxSetContextPointer; - PWLX_SAS_NOTIFY WlxSasNotify; - PWLX_SET_TIMEOUT WlxSetTimeout; - PWLX_ASSIGN_SHELL_PROTECTION WlxAssignShellProtection; - PWLX_MESSAGE_BOX WlxMessageBox; - PWLX_DIALOG_BOX WlxDialogBox; - PWLX_DIALOG_BOX_PARAM WlxDialogBoxParam; - PWLX_DIALOG_BOX_INDIRECT WlxDialogBoxIndirect; - PWLX_DIALOG_BOX_INDIRECT_PARAM WlxDialogBoxIndirectParam; - PWLX_SWITCH_DESKTOP_TO_USER WlxSwitchDesktopToUser; - PWLX_SWITCH_DESKTOP_TO_WINLOGON WlxSwitchDesktopToWinlogon; - PWLX_CHANGE_PASSWORD_NOTIFY WlxChangePasswordNotify; +typedef struct _WLX_DISPATCH_VERSION_1_0 { + PWLX_USE_CTRL_ALT_DEL WlxUseCtrlAltDel; + PWLX_SET_CONTEXT_POINTER WlxSetContextPointer; + PWLX_SAS_NOTIFY WlxSasNotify; + PWLX_SET_TIMEOUT WlxSetTimeout; + PWLX_ASSIGN_SHELL_PROTECTION WlxAssignShellProtection; + PWLX_MESSAGE_BOX WlxMessageBox; + PWLX_DIALOG_BOX WlxDialogBox; + PWLX_DIALOG_BOX_PARAM WlxDialogBoxParam; + PWLX_DIALOG_BOX_INDIRECT WlxDialogBoxIndirect; + PWLX_DIALOG_BOX_INDIRECT_PARAM WlxDialogBoxIndirectParam; + PWLX_SWITCH_DESKTOP_TO_USER WlxSwitchDesktopToUser; + PWLX_SWITCH_DESKTOP_TO_WINLOGON WlxSwitchDesktopToWinlogon; + PWLX_CHANGE_PASSWORD_NOTIFY WlxChangePasswordNotify; } WLX_DISPATCH_VERSION_1_0, *PWLX_DISPATCH_VERSION_1_0; -typedef -struct _WLX_DISPATCH_VERSION_1_1 -{ - PWLX_USE_CTRL_ALT_DEL WlxUseCtrlAltDel; - PWLX_SET_CONTEXT_POINTER WlxSetContextPointer; - PWLX_SAS_NOTIFY WlxSasNotify; - PWLX_SET_TIMEOUT WlxSetTimeout; - PWLX_ASSIGN_SHELL_PROTECTION WlxAssignShellProtection; - PWLX_MESSAGE_BOX WlxMessageBox; - PWLX_DIALOG_BOX WlxDialogBox; - PWLX_DIALOG_BOX_PARAM WlxDialogBoxParam; - PWLX_DIALOG_BOX_INDIRECT WlxDialogBoxIndirect; - PWLX_DIALOG_BOX_INDIRECT_PARAM WlxDialogBoxIndirectParam; - PWLX_SWITCH_DESKTOP_TO_USER WlxSwitchDesktopToUser; - PWLX_SWITCH_DESKTOP_TO_WINLOGON WlxSwitchDesktopToWinlogon; - PWLX_CHANGE_PASSWORD_NOTIFY WlxChangePasswordNotify; - PWLX_GET_SOURCE_DESKTOP WlxGetSourceDesktop; - PWLX_SET_RETURN_DESKTOP WlxSetReturnDesktop; - PWLX_CREATE_USER_DESKTOP WlxCreateUserDesktop; - PWLX_CHANGE_PASSWORD_NOTIFY_EX WlxChangePasswordNotifyEx; +typedef struct _WLX_DISPATCH_VERSION_1_1 { + PWLX_USE_CTRL_ALT_DEL WlxUseCtrlAltDel; + PWLX_SET_CONTEXT_POINTER WlxSetContextPointer; + PWLX_SAS_NOTIFY WlxSasNotify; + PWLX_SET_TIMEOUT WlxSetTimeout; + PWLX_ASSIGN_SHELL_PROTECTION WlxAssignShellProtection; + PWLX_MESSAGE_BOX WlxMessageBox; + PWLX_DIALOG_BOX WlxDialogBox; + PWLX_DIALOG_BOX_PARAM WlxDialogBoxParam; + PWLX_DIALOG_BOX_INDIRECT WlxDialogBoxIndirect; + PWLX_DIALOG_BOX_INDIRECT_PARAM WlxDialogBoxIndirectParam; + PWLX_SWITCH_DESKTOP_TO_USER WlxSwitchDesktopToUser; + PWLX_SWITCH_DESKTOP_TO_WINLOGON WlxSwitchDesktopToWinlogon; + PWLX_CHANGE_PASSWORD_NOTIFY WlxChangePasswordNotify; + PWLX_GET_SOURCE_DESKTOP WlxGetSourceDesktop; + PWLX_SET_RETURN_DESKTOP WlxSetReturnDesktop; + PWLX_CREATE_USER_DESKTOP WlxCreateUserDesktop; + PWLX_CHANGE_PASSWORD_NOTIFY_EX WlxChangePasswordNotifyEx; } WLX_DISPATCH_VERSION_1_1, *PWLX_DISPATCH_VERSION_1_1; -typedef -struct _WLX_DISPATCH_VERSION_1_2 -{ - PWLX_USE_CTRL_ALT_DEL WlxUseCtrlAltDel; - PWLX_SET_CONTEXT_POINTER WlxSetContextPointer; - PWLX_SAS_NOTIFY WlxSasNotify; - PWLX_SET_TIMEOUT WlxSetTimeout; - PWLX_ASSIGN_SHELL_PROTECTION WlxAssignShellProtection; - PWLX_MESSAGE_BOX WlxMessageBox; - PWLX_DIALOG_BOX WlxDialogBox; - PWLX_DIALOG_BOX_PARAM WlxDialogBoxParam; - PWLX_DIALOG_BOX_INDIRECT WlxDialogBoxIndirect; - PWLX_DIALOG_BOX_INDIRECT_PARAM WlxDialogBoxIndirectParam; - PWLX_SWITCH_DESKTOP_TO_USER WlxSwitchDesktopToUser; - PWLX_SWITCH_DESKTOP_TO_WINLOGON WlxSwitchDesktopToWinlogon; - PWLX_CHANGE_PASSWORD_NOTIFY WlxChangePasswordNotify; - PWLX_GET_SOURCE_DESKTOP WlxGetSourceDesktop; - PWLX_SET_RETURN_DESKTOP WlxSetReturnDesktop; - PWLX_CREATE_USER_DESKTOP WlxCreateUserDesktop; - PWLX_CHANGE_PASSWORD_NOTIFY_EX WlxChangePasswordNotifyEx; - PWLX_CLOSE_USER_DESKTOP WlxCloseUserDesktop; +typedef struct _WLX_DISPATCH_VERSION_1_2 { + PWLX_USE_CTRL_ALT_DEL WlxUseCtrlAltDel; + PWLX_SET_CONTEXT_POINTER WlxSetContextPointer; + PWLX_SAS_NOTIFY WlxSasNotify; + PWLX_SET_TIMEOUT WlxSetTimeout; + PWLX_ASSIGN_SHELL_PROTECTION WlxAssignShellProtection; + PWLX_MESSAGE_BOX WlxMessageBox; + PWLX_DIALOG_BOX WlxDialogBox; + PWLX_DIALOG_BOX_PARAM WlxDialogBoxParam; + PWLX_DIALOG_BOX_INDIRECT WlxDialogBoxIndirect; + PWLX_DIALOG_BOX_INDIRECT_PARAM WlxDialogBoxIndirectParam; + PWLX_SWITCH_DESKTOP_TO_USER WlxSwitchDesktopToUser; + PWLX_SWITCH_DESKTOP_TO_WINLOGON WlxSwitchDesktopToWinlogon; + PWLX_CHANGE_PASSWORD_NOTIFY WlxChangePasswordNotify; + PWLX_GET_SOURCE_DESKTOP WlxGetSourceDesktop; + PWLX_SET_RETURN_DESKTOP WlxSetReturnDesktop; + PWLX_CREATE_USER_DESKTOP WlxCreateUserDesktop; + PWLX_CHANGE_PASSWORD_NOTIFY_EX WlxChangePasswordNotifyEx; + PWLX_CLOSE_USER_DESKTOP WlxCloseUserDesktop; } WLX_DISPATCH_VERSION_1_2, *PWLX_DISPATCH_VERSION_1_2; -typedef -struct _WLX_DISPATCH_VERSION_1_3 -{ - PWLX_USE_CTRL_ALT_DEL WlxUseCtrlAltDel; - PWLX_SET_CONTEXT_POINTER WlxSetContextPointer; - PWLX_SAS_NOTIFY WlxSasNotify; - PWLX_SET_TIMEOUT WlxSetTimeout; - PWLX_ASSIGN_SHELL_PROTECTION WlxAssignShellProtection; - PWLX_MESSAGE_BOX WlxMessageBox; - PWLX_DIALOG_BOX WlxDialogBox; - PWLX_DIALOG_BOX_PARAM WlxDialogBoxParam; - PWLX_DIALOG_BOX_INDIRECT WlxDialogBoxIndirect; - PWLX_DIALOG_BOX_INDIRECT_PARAM WlxDialogBoxIndirectParam; - PWLX_SWITCH_DESKTOP_TO_USER WlxSwitchDesktopToUser; - PWLX_SWITCH_DESKTOP_TO_WINLOGON WlxSwitchDesktopToWinlogon; - PWLX_CHANGE_PASSWORD_NOTIFY WlxChangePasswordNotify; - PWLX_GET_SOURCE_DESKTOP WlxGetSourceDesktop; - PWLX_SET_RETURN_DESKTOP WlxSetReturnDesktop; - PWLX_CREATE_USER_DESKTOP WlxCreateUserDesktop; - PWLX_CHANGE_PASSWORD_NOTIFY_EX WlxChangePasswordNotifyEx; - PWLX_CLOSE_USER_DESKTOP WlxCloseUserDesktop; - PWLX_SET_OPTION WlxSetOption; - PWLX_GET_OPTION WlxGetOption; - PWLX_WIN31_MIGRATE WlxWin31Migrate; - PWLX_QUERY_CLIENT_CREDENTIALS WlxQueryClientCredentials; - PWLX_QUERY_IC_CREDENTIALS WlxQueryInetConnectorCredentials; - PWLX_DISCONNECT WlxDisconnect; - PWLX_QUERY_TERMINAL_SERVICES_DATA WlxQueryTerminalServicesData; +typedef struct _WLX_DISPATCH_VERSION_1_3 { + PWLX_USE_CTRL_ALT_DEL WlxUseCtrlAltDel; + PWLX_SET_CONTEXT_POINTER WlxSetContextPointer; + PWLX_SAS_NOTIFY WlxSasNotify; + PWLX_SET_TIMEOUT WlxSetTimeout; + PWLX_ASSIGN_SHELL_PROTECTION WlxAssignShellProtection; + PWLX_MESSAGE_BOX WlxMessageBox; + PWLX_DIALOG_BOX WlxDialogBox; + PWLX_DIALOG_BOX_PARAM WlxDialogBoxParam; + PWLX_DIALOG_BOX_INDIRECT WlxDialogBoxIndirect; + PWLX_DIALOG_BOX_INDIRECT_PARAM WlxDialogBoxIndirectParam; + PWLX_SWITCH_DESKTOP_TO_USER WlxSwitchDesktopToUser; + PWLX_SWITCH_DESKTOP_TO_WINLOGON WlxSwitchDesktopToWinlogon; + PWLX_CHANGE_PASSWORD_NOTIFY WlxChangePasswordNotify; + PWLX_GET_SOURCE_DESKTOP WlxGetSourceDesktop; + PWLX_SET_RETURN_DESKTOP WlxSetReturnDesktop; + PWLX_CREATE_USER_DESKTOP WlxCreateUserDesktop; + PWLX_CHANGE_PASSWORD_NOTIFY_EX WlxChangePasswordNotifyEx; + PWLX_CLOSE_USER_DESKTOP WlxCloseUserDesktop; + PWLX_SET_OPTION WlxSetOption; + PWLX_GET_OPTION WlxGetOption; + PWLX_WIN31_MIGRATE WlxWin31Migrate; + PWLX_QUERY_CLIENT_CREDENTIALS WlxQueryClientCredentials; + PWLX_QUERY_IC_CREDENTIALS WlxQueryInetConnectorCredentials; + PWLX_DISCONNECT WlxDisconnect; + PWLX_QUERY_TERMINAL_SERVICES_DATA WlxQueryTerminalServicesData; } WLX_DISPATCH_VERSION_1_3, *PWLX_DISPATCH_VERSION_1_3; -typedef -struct _WLX_DISPATCH_VERSION_1_4 -{ - PWLX_USE_CTRL_ALT_DEL WlxUseCtrlAltDel; - PWLX_SET_CONTEXT_POINTER WlxSetContextPointer; - PWLX_SAS_NOTIFY WlxSasNotify; - PWLX_SET_TIMEOUT WlxSetTimeout; - PWLX_ASSIGN_SHELL_PROTECTION WlxAssignShellProtection; - PWLX_MESSAGE_BOX WlxMessageBox; - PWLX_DIALOG_BOX WlxDialogBox; - PWLX_DIALOG_BOX_PARAM WlxDialogBoxParam; - PWLX_DIALOG_BOX_INDIRECT WlxDialogBoxIndirect; - PWLX_DIALOG_BOX_INDIRECT_PARAM WlxDialogBoxIndirectParam; - PWLX_SWITCH_DESKTOP_TO_USER WlxSwitchDesktopToUser; - PWLX_SWITCH_DESKTOP_TO_WINLOGON WlxSwitchDesktopToWinlogon; - PWLX_CHANGE_PASSWORD_NOTIFY WlxChangePasswordNotify; - PWLX_GET_SOURCE_DESKTOP WlxGetSourceDesktop; - PWLX_SET_RETURN_DESKTOP WlxSetReturnDesktop; - PWLX_CREATE_USER_DESKTOP WlxCreateUserDesktop; - PWLX_CHANGE_PASSWORD_NOTIFY_EX WlxChangePasswordNotifyEx; - PWLX_CLOSE_USER_DESKTOP WlxCloseUserDesktop; - PWLX_SET_OPTION WlxSetOption; - PWLX_GET_OPTION WlxGetOption; - PWLX_WIN31_MIGRATE WlxWin31Migrate; - PWLX_QUERY_CLIENT_CREDENTIALS WlxQueryClientCredentials; - PWLX_QUERY_IC_CREDENTIALS WlxQueryInetConnectorCredentials; - PWLX_DISCONNECT WlxDisconnect; - PWLX_QUERY_TERMINAL_SERVICES_DATA WlxQueryTerminalServicesData; - PWLX_QUERY_CONSOLESWITCH_CREDENTIALS WlxQueryConsoleSwitchCredentials; - PWLX_QUERY_TS_LOGON_CREDENTIALS WlxQueryTsLogonCredentials; +typedef struct _WLX_DISPATCH_VERSION_1_4 { + PWLX_USE_CTRL_ALT_DEL WlxUseCtrlAltDel; + PWLX_SET_CONTEXT_POINTER WlxSetContextPointer; + PWLX_SAS_NOTIFY WlxSasNotify; + PWLX_SET_TIMEOUT WlxSetTimeout; + PWLX_ASSIGN_SHELL_PROTECTION WlxAssignShellProtection; + PWLX_MESSAGE_BOX WlxMessageBox; + PWLX_DIALOG_BOX WlxDialogBox; + PWLX_DIALOG_BOX_PARAM WlxDialogBoxParam; + PWLX_DIALOG_BOX_INDIRECT WlxDialogBoxIndirect; + PWLX_DIALOG_BOX_INDIRECT_PARAM WlxDialogBoxIndirectParam; + PWLX_SWITCH_DESKTOP_TO_USER WlxSwitchDesktopToUser; + PWLX_SWITCH_DESKTOP_TO_WINLOGON WlxSwitchDesktopToWinlogon; + PWLX_CHANGE_PASSWORD_NOTIFY WlxChangePasswordNotify; + PWLX_GET_SOURCE_DESKTOP WlxGetSourceDesktop; + PWLX_SET_RETURN_DESKTOP WlxSetReturnDesktop; + PWLX_CREATE_USER_DESKTOP WlxCreateUserDesktop; + PWLX_CHANGE_PASSWORD_NOTIFY_EX WlxChangePasswordNotifyEx; + PWLX_CLOSE_USER_DESKTOP WlxCloseUserDesktop; + PWLX_SET_OPTION WlxSetOption; + PWLX_GET_OPTION WlxGetOption; + PWLX_WIN31_MIGRATE WlxWin31Migrate; + PWLX_QUERY_CLIENT_CREDENTIALS WlxQueryClientCredentials; + PWLX_QUERY_IC_CREDENTIALS WlxQueryInetConnectorCredentials; + PWLX_DISCONNECT WlxDisconnect; + PWLX_QUERY_TERMINAL_SERVICES_DATA WlxQueryTerminalServicesData; + PWLX_QUERY_CONSOLESWITCH_CREDENTIALS WlxQueryConsoleSwitchCredentials; + PWLX_QUERY_TS_LOGON_CREDENTIALS WlxQueryTsLogonCredentials; } WLX_DISPATCH_VERSION_1_4, *PWLX_DISPATCH_VERSION_1_4; - /* Non-GINA notification DLLs */ -typedef -DWORD (CALLBACK *PFNMSGECALLBACK)( - _In_ BOOL bVerbose, - _In_ LPWSTR lpMessage); - -typedef -struct _WLX_NOTIFICATION_INFO -{ - ULONG Size; - ULONG Flags; - PWSTR UserName; - PWSTR Domain; - PWSTR WindowStation; - HANDLE hToken; - HDESK hDesktop; - PFNMSGECALLBACK pStatusCallback; +typedef DWORD +(CALLBACK *PFNMSGECALLBACK)( + _In_ BOOL bVerbose, + _In_ LPWSTR lpMessage); + +typedef struct _WLX_NOTIFICATION_INFO { + ULONG Size; + ULONG Flags; + PWSTR UserName; + PWSTR Domain; + PWSTR WindowStation; + HANDLE hToken; + HDESK hDesktop; + PFNMSGECALLBACK pStatusCallback; } WLX_NOTIFICATION_INFO, *PWLX_NOTIFICATION_INFO; - #ifdef __cplusplus } #endif #endif /*__WINWLX_H */ - -/* EOF */
8 years, 3 months
1
0
0
0
[hbelusca] 72742: Revert 2 small changes that I didn't want to do.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Mon Sep 19 15:51:13 2016 New Revision: 72742 URL:
http://svn.reactos.org/svn/reactos?rev=72742&view=rev
Log: Revert 2 small changes that I didn't want to do. Modified: trunk/reactos/sdk/include/psdk/winwlx.h Modified: trunk/reactos/sdk/include/psdk/winwlx.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/psdk/winwlx.h?…
============================================================================== --- trunk/reactos/sdk/include/psdk/winwlx.h [iso-8859-1] (original) +++ trunk/reactos/sdk/include/psdk/winwlx.h [iso-8859-1] Mon Sep 19 15:51:13 2016 @@ -31,7 +31,7 @@ #define WLX_VERSION_1_2 0x00010002 #define WLX_VERSION_1_3 0x00010003 #define WLX_VERSION_1_4 0x00010004 -#define WLX_CURRENT_VERSION WLX_VERSION_1_4 +#define WLX_CURRENT_VERSION (WLX_VERSION_1_4) #define WLX_SAS_TYPE_TIMEOUT 0x0000 #define WLX_SAS_TYPE_CTRL_ALT_DEL 0x0001 @@ -72,7 +72,7 @@ #define WLX_WM_SAS (WM_USER + 0x0259) #define WLX_DLG_SAS 0x0065 -#define WLX_DLG_INPUT_TIMEOUT 0x0066 /* (Input keys, ...) timed out */ +#define WLX_DLG_INPUT_TIMEOUT 0x0066 /* Input (keys, ...) timed out */ #define WLX_DLG_SCREEN_SAVER_TIMEOUT 0x0067 /* Screen saver activated */ #define WLX_DLG_USER_LOGOFF 0x0068 /* User logged off */
8 years, 3 months
1
0
0
0
[hbelusca] 72741: [PSDK]: Add annotations & fix whitespace.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Mon Sep 19 15:49:45 2016 New Revision: 72741 URL:
http://svn.reactos.org/svn/reactos?rev=72741&view=rev
Log: [PSDK]: Add annotations & fix whitespace. Modified: trunk/reactos/sdk/include/psdk/winwlx.h Modified: trunk/reactos/sdk/include/psdk/winwlx.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/psdk/winwlx.h?…
============================================================================== --- trunk/reactos/sdk/include/psdk/winwlx.h [iso-8859-1] (original) +++ trunk/reactos/sdk/include/psdk/winwlx.h [iso-8859-1] Mon Sep 19 15:49:45 2016 @@ -26,626 +26,646 @@ #endif -#define WLX_VERSION_1_0 (0x00010000) -#define WLX_VERSION_1_1 (0x00010001) -#define WLX_VERSION_1_2 (0x00010002) -#define WLX_VERSION_1_3 (0x00010003) -#define WLX_VERSION_1_4 (0x00010004) -#define WLX_CURRENT_VERSION (WLX_VERSION_1_4) - -#define WLX_SAS_TYPE_TIMEOUT (0x0000) -#define WLX_SAS_TYPE_CTRL_ALT_DEL (0x0001) -#define WLX_SAS_TYPE_SCRNSVR_TIMEOUT (0x0002) -#define WLX_SAS_TYPE_SCRNSVR_ACTIVITY (0x0003) -#define WLX_SAS_TYPE_USER_LOGOFF (0x0004) -#define WLX_SAS_TYPE_SC_INSERT (0x0005) -#define WLX_SAS_TYPE_SC_REMOVE (0x0006) -#define WLX_SAS_TYPE_AUTHENTICATED (0x0007) -#define WLX_SAS_TYPE_SC_FIRST_READER_ARRIVED (0x0008) -#define WLX_SAS_TYPE_SC_LAST_READER_REMOVED (0x0009) -#define WLX_SAS_TYPE_SWITCHUSER (0x000A) -#define WLX_SAS_TYPE_MAX_MSFT_VALUE (0x007F) - -#define WLX_LOGON_OPT_NO_PROFILE (0x0001) - -#define WLX_PROFILE_TYPE_V1_0 (0x0001) -#define WLX_PROFILE_TYPE_V2_0 (0x0002) /* default */ - -#define WLX_SAS_ACTION_LOGON (0x0001) -#define WLX_SAS_ACTION_NONE (0x0002) -#define WLX_SAS_ACTION_LOCK_WKSTA (0x0003) -#define WLX_SAS_ACTION_LOGOFF (0x0004) -#define WLX_SAS_ACTION_SHUTDOWN (0x0005) -#define WLX_SAS_ACTION_PWD_CHANGED (0x0006) -#define WLX_SAS_ACTION_TASKLIST (0x0007) -#define WLX_SAS_ACTION_UNLOCK_WKSTA (0x0008) -#define WLX_SAS_ACTION_FORCE_LOGOFF (0x0009) -#define WLX_SAS_ACTION_SHUTDOWN_POWER_OFF (0x000A) -#define WLX_SAS_ACTION_SHUTDOWN_REBOOT (0x000B) -#define WLX_SAS_ACTION_SHUTDOWN_SLEEP (0x000C) -#define WLX_SAS_ACTION_SHUTDOWN_SLEEP2 (0x000D) -#define WLX_SAS_ACTION_SHUTDOWN_HIBERNATE (0x000E) -#define WLX_SAS_ACTION_RECONNECTED (0x000F) -#define WLX_SAS_ACTION_DELAYED_FORCE_LOGOFF (0x0010) -#define WLX_SAS_ACTION_SWITCH_CONSOLE (0x0011) - -#define WLX_WM_SAS (WM_USER + 0x0259) - -#define WLX_DLG_SAS (0x0065) -#define WLX_DLG_INPUT_TIMEOUT (0x0066) /* Input (keys, ...) timed out */ -#define WLX_DLG_SCREEN_SAVER_TIMEOUT (0x0067) /* Screen saver activated */ -#define WLX_DLG_USER_LOGOFF (0x0068) /* User logged off */ - -#define WLX_DIRECTORY_LENGTH (0x0100) - -#define WLX_CREDENTIAL_TYPE_V1_0 (0x0001) -#define WLX_CREDENTIAL_TYPE_V2_0 (0x0002) - -#define WLX_CONSOLESWITCHCREDENTIAL_TYPE_V1_0 (0x0001) - -#define STATUSMSG_OPTION_NOANIMATION (0x0001) -#define STATUSMSG_OPTION_SETFOREGROUND (0x0002) +#define WLX_VERSION_1_0 0x00010000 +#define WLX_VERSION_1_1 0x00010001 +#define WLX_VERSION_1_2 0x00010002 +#define WLX_VERSION_1_3 0x00010003 +#define WLX_VERSION_1_4 0x00010004 +#define WLX_CURRENT_VERSION WLX_VERSION_1_4 + +#define WLX_SAS_TYPE_TIMEOUT 0x0000 +#define WLX_SAS_TYPE_CTRL_ALT_DEL 0x0001 +#define WLX_SAS_TYPE_SCRNSVR_TIMEOUT 0x0002 +#define WLX_SAS_TYPE_SCRNSVR_ACTIVITY 0x0003 +#define WLX_SAS_TYPE_USER_LOGOFF 0x0004 +#define WLX_SAS_TYPE_SC_INSERT 0x0005 +#define WLX_SAS_TYPE_SC_REMOVE 0x0006 +#define WLX_SAS_TYPE_AUTHENTICATED 0x0007 +#define WLX_SAS_TYPE_SC_FIRST_READER_ARRIVED 0x0008 +#define WLX_SAS_TYPE_SC_LAST_READER_REMOVED 0x0009 +#define WLX_SAS_TYPE_SWITCHUSER 0x000A +#define WLX_SAS_TYPE_MAX_MSFT_VALUE 0x007F + +#define WLX_LOGON_OPT_NO_PROFILE 0x0001 + +#define WLX_PROFILE_TYPE_V1_0 0x0001 +#define WLX_PROFILE_TYPE_V2_0 0x0002 /* Default */ + +#define WLX_SAS_ACTION_LOGON 0x0001 +#define WLX_SAS_ACTION_NONE 0x0002 +#define WLX_SAS_ACTION_LOCK_WKSTA 0x0003 +#define WLX_SAS_ACTION_LOGOFF 0x0004 +#define WLX_SAS_ACTION_SHUTDOWN 0x0005 +#define WLX_SAS_ACTION_PWD_CHANGED 0x0006 +#define WLX_SAS_ACTION_TASKLIST 0x0007 +#define WLX_SAS_ACTION_UNLOCK_WKSTA 0x0008 +#define WLX_SAS_ACTION_FORCE_LOGOFF 0x0009 +#define WLX_SAS_ACTION_SHUTDOWN_POWER_OFF 0x000A +#define WLX_SAS_ACTION_SHUTDOWN_REBOOT 0x000B +#define WLX_SAS_ACTION_SHUTDOWN_SLEEP 0x000C +#define WLX_SAS_ACTION_SHUTDOWN_SLEEP2 0x000D +#define WLX_SAS_ACTION_SHUTDOWN_HIBERNATE 0x000E +#define WLX_SAS_ACTION_RECONNECTED 0x000F +#define WLX_SAS_ACTION_DELAYED_FORCE_LOGOFF 0x0010 +#define WLX_SAS_ACTION_SWITCH_CONSOLE 0x0011 + +#define WLX_WM_SAS (WM_USER + 0x0259) + +#define WLX_DLG_SAS 0x0065 +#define WLX_DLG_INPUT_TIMEOUT 0x0066 /* (Input keys, ...) timed out */ +#define WLX_DLG_SCREEN_SAVER_TIMEOUT 0x0067 /* Screen saver activated */ +#define WLX_DLG_USER_LOGOFF 0x0068 /* User logged off */ + +#define WLX_DIRECTORY_LENGTH 0x0100 + +#define WLX_CREDENTIAL_TYPE_V1_0 0x0001 +#define WLX_CREDENTIAL_TYPE_V2_0 0x0002 + +#define WLX_CONSOLESWITCHCREDENTIAL_TYPE_V1_0 0x0001 + +#define STATUSMSG_OPTION_NOANIMATION 0x0001 +#define STATUSMSG_OPTION_SETFOREGROUND 0x0002 typedef struct _WLX_CLIENT_CREDENTIALS_INFO { - DWORD dwType; - PWSTR pszUserName; - PWSTR pszDomain; - PWSTR pszPassword; - BOOL fPromptForPassword; + DWORD dwType; + PWSTR pszUserName; + PWSTR pszDomain; + PWSTR pszPassword; + BOOL fPromptForPassword; } WLX_CLIENT_CREDENTIALS_INFO_V1_0, *PWLX_CLIENT_CREDENTIALS_INFO_V1_0; typedef struct _WLX_CLIENT_CREDENTIALS_INFO_2_0 { - DWORD dwType; - PWSTR pszUserName; - PWSTR pszDomain; - PWSTR pszPassword; - BOOL fPromptForPassword; - BOOL fDisconnectOnLogonFailure; + DWORD dwType; + PWSTR pszUserName; + PWSTR pszDomain; + PWSTR pszPassword; + BOOL fPromptForPassword; + BOOL fDisconnectOnLogonFailure; } WLX_CLIENT_CREDENTIALS_INFO_V2_0, *PWLX_CLIENT_CREDENTIALS_INFO_V2_0; typedef struct _WLX_CONSOLESWITCH_CREDENTIALS_INFO { - DWORD dwType; - HANDLE UserToken; - LUID LogonId; - QUOTA_LIMITS Quotas; - PWSTR UserName; - PWSTR Domain; - LARGE_INTEGER LogonTime; - BOOL SmartCardLogon; - ULONG ProfileLength; - DWORD MessageType; - USHORT LogonCount; - USHORT BadPasswordCount; - LARGE_INTEGER ProfileLogonTime; - LARGE_INTEGER LogoffTime; - LARGE_INTEGER KickOffTime; - LARGE_INTEGER PasswordLastSet; - LARGE_INTEGER PasswordCanChange; - LARGE_INTEGER PasswordMustChange; - PWSTR LogonScript; - PWSTR HomeDirectory; - PWSTR FullName; - PWSTR ProfilePath; - PWSTR HomeDirectoryDrive; - PWSTR LogonServer; - ULONG UserFlags; - ULONG PrivateDataLen; - PBYTE PrivateData; + DWORD dwType; + HANDLE UserToken; + LUID LogonId; + QUOTA_LIMITS Quotas; + PWSTR UserName; + PWSTR Domain; + LARGE_INTEGER LogonTime; + BOOL SmartCardLogon; + ULONG ProfileLength; + DWORD MessageType; + USHORT LogonCount; + USHORT BadPasswordCount; + LARGE_INTEGER ProfileLogonTime; + LARGE_INTEGER LogoffTime; + LARGE_INTEGER KickOffTime; + LARGE_INTEGER PasswordLastSet; + LARGE_INTEGER PasswordCanChange; + LARGE_INTEGER PasswordMustChange; + PWSTR LogonScript; + PWSTR HomeDirectory; + PWSTR FullName; + PWSTR ProfilePath; + PWSTR HomeDirectoryDrive; + PWSTR LogonServer; + ULONG UserFlags; + ULONG PrivateDataLen; + PBYTE PrivateData; } WLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0, *PWLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0; typedef struct _WLX_MPR_NOTIFY_INFO { - PWSTR pszUserName; - PWSTR pszDomain; - PWSTR pszPassword; - PWSTR pszOldPassword; + PWSTR pszUserName; + PWSTR pszDomain; + PWSTR pszPassword; + PWSTR pszOldPassword; } WLX_MPR_NOTIFY_INFO, *PWLX_MPR_NOTIFY_INFO; typedef struct _WLX_PROFILE_V1_0 { - DWORD dwType; - PWSTR pszProfile; + DWORD dwType; + PWSTR pszProfile; } WLX_PROFILE_V1_0, *PWLX_PROFILE_V1_0; typedef struct _WLX_PROFILE_V2_0 { - DWORD dwType; - PWSTR pszProfile; - PWSTR pszPolicy; - PWSTR pszNetworkDefaultUserProfile; - PWSTR pszServerName; - PWSTR pszEnvironment; + DWORD dwType; + PWSTR pszProfile; + PWSTR pszPolicy; + PWSTR pszNetworkDefaultUserProfile; + PWSTR pszServerName; + PWSTR pszEnvironment; } WLX_PROFILE_V2_0, *PWLX_PROFILE_V2_0; typedef struct _WLX_SC_NOTIFICATION_INFO { - PWSTR pszCard; - PWSTR pszReader; - PWSTR pszContainer; - PWSTR pszCryptoProvider; + PWSTR pszCard; + PWSTR pszReader; + PWSTR pszContainer; + PWSTR pszCryptoProvider; } WLX_SC_NOTIFICATION_INFO, *PWLX_SC_NOTIFICATION_INFO; typedef struct _WLX_TERMINAL_SERVICES_DATA { - WCHAR ProfilePath[WLX_DIRECTORY_LENGTH + 1]; - WCHAR HomeDir[WLX_DIRECTORY_LENGTH + 1]; - WCHAR HomeDirDrive[4]; + WCHAR ProfilePath[WLX_DIRECTORY_LENGTH + 1]; + WCHAR HomeDir[WLX_DIRECTORY_LENGTH + 1]; + WCHAR HomeDirDrive[4]; } WLX_TERMINAL_SERVICES_DATA, *PWLX_TERMINAL_SERVICES_DATA; /* GINA Version 1.0 */ -BOOL WINAPI +BOOL +WINAPI WlxActivateUserShell( - PVOID pWlxContext, - PWSTR pszDesktopName, - PWSTR pszMprLogonScript, - PVOID pEnvironment); - -VOID WINAPI + _In_ PVOID pWlxContext, + _In_ PWSTR pszDesktopName, + _In_ PWSTR pszMprLogonScript, + _In_ PVOID pEnvironment); + +VOID +WINAPI WlxDisplayLockedNotice( - PVOID pWlxContext); - -VOID WINAPI + _In_ PVOID pWlxContext); + +VOID +WINAPI WlxDisplaySASNotice( - PVOID pWlxContext); - -BOOL WINAPI + _In_ PVOID pWlxContext); + +BOOL +WINAPI WlxInitialize( - LPWSTR lpWinsta, - HANDLE hWlx, - PVOID pvReserved, - PVOID pWinlogonFunctions, - PVOID *pWlxContext); - -BOOL WINAPI + _In_ LPWSTR lpWinsta, + _In_ HANDLE hWlx, + _In_ PVOID pvReserved, + _In_ PVOID pWinlogonFunctions, + _Out_ PVOID *pWlxContext); + +BOOL +WINAPI WlxIsLockOk( - PVOID pWlxContext); - -BOOL WINAPI + _In_ PVOID pWlxContext); + +BOOL +WINAPI WlxIsLogoffOk( - PVOID pWlxContext); - -int WINAPI + _In_ PVOID pWlxContext); + +INT +WINAPI WlxLoggedOnSAS( - PVOID pWlxContext, - DWORD dwSasType, - PVOID pReserved); - -int WINAPI + _In_ PVOID pWlxContext, + _In_ DWORD dwSasType, + _In_ PVOID pReserved); + +INT +WINAPI WlxLoggedOutSAS( - PVOID pWlxContext, - DWORD dwSasType, - PLUID pAuthenticationId, - PSID pLogonSid, - PDWORD pdwOptions, - PHANDLE phToken, - PWLX_MPR_NOTIFY_INFO pNprNotifyInfo, - PVOID *pProfile); - -VOID WINAPI + _In_ PVOID pWlxContext, + _In_ DWORD dwSasType, + _Out_ PLUID pAuthenticationId, + _Inout_ PSID pLogonSid, + _Out_ PDWORD pdwOptions, + _Out_ PHANDLE phToken, + _Out_ PWLX_MPR_NOTIFY_INFO pNprNotifyInfo, + _Out_ PVOID *pProfile); + +VOID +WINAPI WlxLogoff( - PVOID pWlxContext); - -BOOL WINAPI + _In_ PVOID pWlxContext); + +BOOL +WINAPI WlxNegotiate( - DWORD dwWinlogonVersion, - PDWORD pdwDllVersion); - -VOID WINAPI + _In_ DWORD dwWinlogonVersion, + _Out_ PDWORD pdwDllVersion); + +VOID +WINAPI WlxShutdown( - PVOID pWlxContext, - DWORD ShutdownType); - -int WINAPI + _In_ PVOID pWlxContext, + _In_ DWORD ShutdownType); + +INT +WINAPI WlxWkstaLockedSAS( - PVOID pWlxContext, - DWORD dwSasType); + _In_ PVOID pWlxContext, + _In_ DWORD dwSasType); /* GINA Version 1.1 */ -BOOL WINAPI +BOOL +WINAPI WlxScreenSaverNotify( - PVOID pWlxContext, - BOOL *pSecure); - -BOOL WINAPI + _In_ PVOID pWlxContext, + _Inout_ BOOL *pSecure); + +BOOL +WINAPI WlxStartApplication( - PVOID pWlxContext, - PWSTR pszDesktopName, - PVOID pEnvironment, - PWSTR pszCmdLine); + _In_ PVOID pWlxContext, + _In_ PWSTR pszDesktopName, + _In_ PVOID pEnvironment, + _In_ PWSTR pszCmdLine); /* GINA Version 1.3 */ -BOOL WINAPI +BOOL +WINAPI WlxDisplayStatusMessage( - PVOID pWlxContext, - HDESK hDesktop, - DWORD dwOptions, - PWSTR pTitle, - PWSTR pMessage); - -BOOL WINAPI + _In_ PVOID pWlxContext, + _In_ HDESK hDesktop, + _In_ DWORD dwOptions, + _In_ PWSTR pTitle, + _In_ PWSTR pMessage); + +BOOL +WINAPI WlxGetStatusMessage( - PVOID pWlxContext, - DWORD *pdwOptions, - PWSTR pMessage, - DWORD dwBufferSize); + _In_ PVOID pWlxContext, + _Out_ DWORD *pdwOptions, + _Out_ PWSTR pMessage, + _In_ DWORD dwBufferSize); BOOL WINAPI WlxNetworkProviderLoad( - PVOID pWlxContext, - PWLX_MPR_NOTIFY_INFO pNprNotifyInfo); - -BOOL WINAPI + _In_ PVOID pWlxContext, + _Out_ PWLX_MPR_NOTIFY_INFO pNprNotifyInfo); + +BOOL +WINAPI WlxRemoveStatusMessage( - PVOID pWlxContext); + _In_ PVOID pWlxContext); /* GINA Version 1.4 */ -VOID WINAPI +VOID +WINAPI WlxDisconnectNotify( - PVOID pWlxContext); - -BOOL WINAPI + _In_ PVOID pWlxContext); + +BOOL +WINAPI WlxGetConsoleSwitchCredentials( - PVOID pWlxContext, - PVOID pCredInfo); - -VOID WINAPI + _In_ PVOID pWlxContext, + _Out_ PVOID pCredInfo); + +VOID +WINAPI WlxReconnectNotify( - PVOID pWlxContext); + _In_ PVOID pWlxContext); /* Services that Winlogon provides */ -#define WLX_DESKTOP_NAME (0x0001) /* Name present */ -#define WLX_DESKTOP_HANDLE (0x0002) /* Handle present */ - -#define WLX_CREATE_INSTANCE_ONLY (0x0001) -#define WLX_CREATE_USER (0x0002) - -#define WLX_OPTION_USE_CTRL_ALT_DEL (0x0001) -#define WLX_OPTION_CONTEXT_POINTER (0x0002) -#define WLX_OPTION_USE_SMART_CARD (0x0003) -#define WLX_OPTION_FORCE_LOGOFF_TIME (0x0004) -#define WLX_OPTION_IGNORE_AUTO_LOGON (0x0008) -#define WLX_OPTION_NO_SWITCH_ON_SAS (0x0009) - -#define WLX_OPTION_SMART_CARD_PRESENT (0x00010001) -#define WLX_OPTION_SMART_CARD_INFO (0x00010002) -#define WLX_OPTION_DISPATCH_TABLE_SIZE (0x00010003) +#define WLX_DESKTOP_NAME 0x0001 /* Name present */ +#define WLX_DESKTOP_HANDLE 0x0002 /* Handle present */ + +#define WLX_CREATE_INSTANCE_ONLY 0x0001 +#define WLX_CREATE_USER 0x0002 + +#define WLX_OPTION_USE_CTRL_ALT_DEL 0x0001 +#define WLX_OPTION_CONTEXT_POINTER 0x0002 +#define WLX_OPTION_USE_SMART_CARD 0x0003 +#define WLX_OPTION_FORCE_LOGOFF_TIME 0x0004 +#define WLX_OPTION_IGNORE_AUTO_LOGON 0x0008 +#define WLX_OPTION_NO_SWITCH_ON_SAS 0x0009 + +#define WLX_OPTION_SMART_CARD_PRESENT 0x00010001 +#define WLX_OPTION_SMART_CARD_INFO 0x00010002 +#define WLX_OPTION_DISPATCH_TABLE_SIZE 0x00010003 typedef struct _WLX_DESKTOP { - DWORD Size; - DWORD Flags; - HDESK hDesktop; - PWSTR pszDesktopName; + DWORD Size; + DWORD Flags; + HDESK hDesktop; + PWSTR pszDesktopName; } WLX_DESKTOP, *PWLX_DESKTOP; typedef -int (WINAPI *PWLX_ASSIGN_SHELL_PROTECTION)( - HANDLE hWlx, - HANDLE hToken, - HANDLE hProcess, - HANDLE hThread); +INT (WINAPI *PWLX_ASSIGN_SHELL_PROTECTION)( + _In_ HANDLE hWlx, + _In_ HANDLE hToken, + _In_ HANDLE hProcess, + _In_ HANDLE hThread); + +typedef +INT (WINAPI *PWLX_CHANGE_PASSWORD_NOTIFY)( + _In_ HANDLE hWlx, + _In_ PWLX_MPR_NOTIFY_INFO pMprInfo, + _In_ DWORD dwChangeInfo); + +typedef +INT (WINAPI *PWLX_CHANGE_PASSWORD_NOTIFY_EX)( + _In_ HANDLE hWlx, + _In_ PWLX_MPR_NOTIFY_INFO pMprInfo, + _In_ DWORD dwChangeInfo, + _In_ PWSTR ProviderName, + _In_ PVOID Reserved); typedef BOOL (WINAPI *PWLX_CLOSE_USER_DESKTOP)( - HANDLE hWlx, - PWLX_DESKTOP pDesktop, - HANDLE hToken); - -typedef -int (WINAPI *PWLX_CHANGE_PASSWORD_NOTIFY)( - HANDLE hWlx, - PWLX_MPR_NOTIFY_INFO pMprInfo, - DWORD dwChangeInfo); - -typedef -int (WINAPI *PWLX_CHANGE_PASSWORD_NOTIFY_EX)( - HANDLE hWlx, - PWLX_MPR_NOTIFY_INFO pMprInfo, - DWORD dwChangeInfo, - PWSTR ProviderName, - PVOID Reserved); + _In_ HANDLE hWlx, + _In_ PWLX_DESKTOP pDesktop, + _In_ HANDLE hToken); typedef BOOL (WINAPI *PWLX_CREATE_USER_DESKTOP)( - HANDLE hWlx, - HANDLE hToken, - DWORD Flags, - PWSTR pszDesktopName, - PWLX_DESKTOP *ppDesktop); - -typedef -int (WINAPI *PWLX_DIALOG_BOX)( - HANDLE hWlx, - HANDLE hInst, - LPWSTR lpszTemplate, - HWND hwndOwner, - DLGPROC dlgprc); - -typedef -int (WINAPI *PWLX_DIALOG_BOX_INDIRECT)( - HANDLE hWlx, - HANDLE hInst, - LPCDLGTEMPLATE hDialogTemplate, - HWND hwndOwner, - DLGPROC dlgprc); - -typedef -int (WINAPI *PWLX_DIALOG_BOX_INDIRECT_PARAM)( - HANDLE hWlx, - HANDLE hInst, - LPCDLGTEMPLATE hDialogTemplate, - HWND hwndOwner, - DLGPROC dlgprc, - LPARAM dwInitParam); - -typedef -int (WINAPI *PWLX_DIALOG_BOX_PARAM)( - HANDLE hWlx, - HANDLE hInst, - LPWSTR lpszTemplate, - HWND hwndOwner, - DLGPROC dlgprc, - LPARAM dwInitParam); - -typedef -BOOL (WINAPI *PWLX_DISCONNECT)(); + _In_ HANDLE hWlx, + _In_ HANDLE hToken, + _In_ DWORD Flags, + _In_ PWSTR pszDesktopName, + _Out_ PWLX_DESKTOP *ppDesktop); + +typedef +INT (WINAPI *PWLX_DIALOG_BOX)( + _In_ HANDLE hWlx, + _In_ HANDLE hInst, + _In_ LPWSTR lpszTemplate, + _In_ HWND hwndOwner, + _In_ DLGPROC dlgprc); + +typedef +INT (WINAPI *PWLX_DIALOG_BOX_INDIRECT)( + _In_ HANDLE hWlx, + _In_ HANDLE hInst, + _In_ LPCDLGTEMPLATE hDialogTemplate, + _In_ HWND hwndOwner, + _In_ DLGPROC dlgprc); + +typedef +INT (WINAPI *PWLX_DIALOG_BOX_INDIRECT_PARAM)( + _In_ HANDLE hWlx, + _In_ HANDLE hInst, + _In_ LPCDLGTEMPLATE hDialogTemplate, + _In_ HWND hwndOwner, + _In_ DLGPROC dlgprc, + _In_ LPARAM dwInitParam); + +typedef +INT (WINAPI *PWLX_DIALOG_BOX_PARAM)( + _In_ HANDLE hWlx, + _In_ HANDLE hInst, + _In_ LPWSTR lpszTemplate, + _In_ HWND hwndOwner, + _In_ DLGPROC dlgprc, + _In_ LPARAM dwInitParam); + +typedef +BOOL (WINAPI *PWLX_DISCONNECT)(VOID); typedef BOOL (WINAPI *PWLX_GET_OPTION)( - HANDLE hWlx, - DWORD Option, - ULONG_PTR *Value); + _In_ HANDLE hWlx, + _In_ DWORD Option, + _Out_ ULONG_PTR *Value); typedef BOOL (WINAPI *PWLX_GET_SOURCE_DESKTOP)( - HANDLE hWlx, - PWLX_DESKTOP *ppDesktop); - -typedef -int (WINAPI *PWLX_MESSAGE_BOX)( - HANDLE hWlx, - HWND hwndOwner, - LPWSTR lpszText, - LPWSTR lpszTitle, - UINT fuStyle); + _In_ HANDLE hWlx, + _Out_ PWLX_DESKTOP *ppDesktop); + +typedef +INT (WINAPI *PWLX_MESSAGE_BOX)( + _In_ HANDLE hWlx, + _In_ HWND hwndOwner, + _In_ LPWSTR lpszText, + _In_ LPWSTR lpszTitle, + _In_ UINT fuStyle); typedef BOOL (WINAPI *PWLX_QUERY_CLIENT_CREDENTIALS)( - PWLX_CLIENT_CREDENTIALS_INFO_V1_0 pCred); + _Out_ PWLX_CLIENT_CREDENTIALS_INFO_V1_0 pCred); typedef DWORD (WINAPI *PWLX_QUERY_CONSOLESWITCH_CREDENTIALS)( - PWLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0 pCred); + _Out_ PWLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0 pCred); typedef BOOL (WINAPI *PWLX_QUERY_IC_CREDENTIALS)( - PWLX_CLIENT_CREDENTIALS_INFO_V1_0 pCred); + _Out_ PWLX_CLIENT_CREDENTIALS_INFO_V1_0 pCred); typedef DWORD (WINAPI *PWLX_QUERY_TERMINAL_SERVICES_DATA)( - HANDLE hWlx, - PWLX_TERMINAL_SERVICES_DATA pTSData, - WCHAR *UserName, - WCHAR *Domain); + _In_ HANDLE hWlx, + _Out_ PWLX_TERMINAL_SERVICES_DATA pTSData, + _In_ WCHAR *UserName, + _In_ WCHAR *Domain); typedef BOOL (WINAPI *PWLX_QUERY_TS_LOGON_CREDENTIALS)( - PWLX_CLIENT_CREDENTIALS_INFO_V2_0 pCred); + _Out_ PWLX_CLIENT_CREDENTIALS_INFO_V2_0 pCred); typedef VOID (WINAPI *PWLX_SAS_NOTIFY)( - HANDLE hWlx, - DWORD dwSasType); + _In_ HANDLE hWlx, + _In_ DWORD dwSasType); typedef VOID (WINAPI *PWLX_SET_CONTEXT_POINTER)( - HANDLE hWlx, - PVOID pWlxContext); + _In_ HANDLE hWlx, + _In_ PVOID pWlxContext); + +typedef +BOOL (WINAPI *PWLX_SET_OPTION)( + _In_ HANDLE hWlx, + _In_ DWORD Option, + _In_ ULONG_PTR Value, + _Out_ ULONG_PTR *OldValue); typedef BOOL (WINAPI *PWLX_SET_RETURN_DESKTOP)( - HANDLE hWlx, - PWLX_DESKTOP pDesktop); - -typedef -BOOL (WINAPI *PWLX_SET_OPTION)( - HANDLE hWlx, - DWORD Option, - ULONG_PTR Value, - ULONG_PTR *OldValue); + _In_ HANDLE hWlx, + _In_ PWLX_DESKTOP pDesktop); typedef BOOL (WINAPI *PWLX_SET_TIMEOUT)( - HANDLE hWlx, - DWORD Timeout); - -typedef -int (WINAPI *PWLX_SWITCH_DESKTOP_TO_USER)( - HANDLE hWlx); - -typedef -int (WINAPI *PWLX_SWITCH_DESKTOP_TO_WINLOGON)( - HANDLE hWlx); + _In_ HANDLE hWlx, + _In_ DWORD Timeout); + +typedef +INT (WINAPI *PWLX_SWITCH_DESKTOP_TO_USER)( + _In_ HANDLE hWlx); + +typedef +INT (WINAPI *PWLX_SWITCH_DESKTOP_TO_WINLOGON)( + _In_ HANDLE hWlx); typedef VOID (WINAPI *PWLX_USE_CTRL_ALT_DEL)( - HANDLE hWlx); + _In_ HANDLE hWlx); typedef VOID (WINAPI *PWLX_WIN31_MIGRATE)( - HANDLE hWlx); - - -/* function dispatch tables */ + _In_ HANDLE hWlx); + + +/* Function dispatch tables */ typedef struct _WLX_DISPATCH_VERSION_1_0 { - PWLX_USE_CTRL_ALT_DEL WlxUseCtrlAltDel; - PWLX_SET_CONTEXT_POINTER WlxSetContextPointer; - PWLX_SAS_NOTIFY WlxSasNotify; - PWLX_SET_TIMEOUT WlxSetTimeout; - PWLX_ASSIGN_SHELL_PROTECTION WlxAssignShellProtection; - PWLX_MESSAGE_BOX WlxMessageBox; - PWLX_DIALOG_BOX WlxDialogBox; - PWLX_DIALOG_BOX_PARAM WlxDialogBoxParam; - PWLX_DIALOG_BOX_INDIRECT WlxDialogBoxIndirect; - PWLX_DIALOG_BOX_INDIRECT_PARAM WlxDialogBoxIndirectParam; - PWLX_SWITCH_DESKTOP_TO_USER WlxSwitchDesktopToUser; - PWLX_SWITCH_DESKTOP_TO_WINLOGON WlxSwitchDesktopToWinlogon; - PWLX_CHANGE_PASSWORD_NOTIFY WlxChangePasswordNotify; + PWLX_USE_CTRL_ALT_DEL WlxUseCtrlAltDel; + PWLX_SET_CONTEXT_POINTER WlxSetContextPointer; + PWLX_SAS_NOTIFY WlxSasNotify; + PWLX_SET_TIMEOUT WlxSetTimeout; + PWLX_ASSIGN_SHELL_PROTECTION WlxAssignShellProtection; + PWLX_MESSAGE_BOX WlxMessageBox; + PWLX_DIALOG_BOX WlxDialogBox; + PWLX_DIALOG_BOX_PARAM WlxDialogBoxParam; + PWLX_DIALOG_BOX_INDIRECT WlxDialogBoxIndirect; + PWLX_DIALOG_BOX_INDIRECT_PARAM WlxDialogBoxIndirectParam; + PWLX_SWITCH_DESKTOP_TO_USER WlxSwitchDesktopToUser; + PWLX_SWITCH_DESKTOP_TO_WINLOGON WlxSwitchDesktopToWinlogon; + PWLX_CHANGE_PASSWORD_NOTIFY WlxChangePasswordNotify; } WLX_DISPATCH_VERSION_1_0, *PWLX_DISPATCH_VERSION_1_0; typedef struct _WLX_DISPATCH_VERSION_1_1 { - PWLX_USE_CTRL_ALT_DEL WlxUseCtrlAltDel; - PWLX_SET_CONTEXT_POINTER WlxSetContextPointer; - PWLX_SAS_NOTIFY WlxSasNotify; - PWLX_SET_TIMEOUT WlxSetTimeout; - PWLX_ASSIGN_SHELL_PROTECTION WlxAssignShellProtection; - PWLX_MESSAGE_BOX WlxMessageBox; - PWLX_DIALOG_BOX WlxDialogBox; - PWLX_DIALOG_BOX_PARAM WlxDialogBoxParam; - PWLX_DIALOG_BOX_INDIRECT WlxDialogBoxIndirect; - PWLX_DIALOG_BOX_INDIRECT_PARAM WlxDialogBoxIndirectParam; - PWLX_SWITCH_DESKTOP_TO_USER WlxSwitchDesktopToUser; - PWLX_SWITCH_DESKTOP_TO_WINLOGON WlxSwitchDesktopToWinlogon; - PWLX_CHANGE_PASSWORD_NOTIFY WlxChangePasswordNotify; - PWLX_GET_SOURCE_DESKTOP WlxGetSourceDesktop; - PWLX_SET_RETURN_DESKTOP WlxSetReturnDesktop; - PWLX_CREATE_USER_DESKTOP WlxCreateUserDesktop; - PWLX_CHANGE_PASSWORD_NOTIFY_EX WlxChangePasswordNotifyEx; + PWLX_USE_CTRL_ALT_DEL WlxUseCtrlAltDel; + PWLX_SET_CONTEXT_POINTER WlxSetContextPointer; + PWLX_SAS_NOTIFY WlxSasNotify; + PWLX_SET_TIMEOUT WlxSetTimeout; + PWLX_ASSIGN_SHELL_PROTECTION WlxAssignShellProtection; + PWLX_MESSAGE_BOX WlxMessageBox; + PWLX_DIALOG_BOX WlxDialogBox; + PWLX_DIALOG_BOX_PARAM WlxDialogBoxParam; + PWLX_DIALOG_BOX_INDIRECT WlxDialogBoxIndirect; + PWLX_DIALOG_BOX_INDIRECT_PARAM WlxDialogBoxIndirectParam; + PWLX_SWITCH_DESKTOP_TO_USER WlxSwitchDesktopToUser; + PWLX_SWITCH_DESKTOP_TO_WINLOGON WlxSwitchDesktopToWinlogon; + PWLX_CHANGE_PASSWORD_NOTIFY WlxChangePasswordNotify; + PWLX_GET_SOURCE_DESKTOP WlxGetSourceDesktop; + PWLX_SET_RETURN_DESKTOP WlxSetReturnDesktop; + PWLX_CREATE_USER_DESKTOP WlxCreateUserDesktop; + PWLX_CHANGE_PASSWORD_NOTIFY_EX WlxChangePasswordNotifyEx; } WLX_DISPATCH_VERSION_1_1, *PWLX_DISPATCH_VERSION_1_1; typedef struct _WLX_DISPATCH_VERSION_1_2 { - PWLX_USE_CTRL_ALT_DEL WlxUseCtrlAltDel; - PWLX_SET_CONTEXT_POINTER WlxSetContextPointer; - PWLX_SAS_NOTIFY WlxSasNotify; - PWLX_SET_TIMEOUT WlxSetTimeout; - PWLX_ASSIGN_SHELL_PROTECTION WlxAssignShellProtection; - PWLX_MESSAGE_BOX WlxMessageBox; - PWLX_DIALOG_BOX WlxDialogBox; - PWLX_DIALOG_BOX_PARAM WlxDialogBoxParam; - PWLX_DIALOG_BOX_INDIRECT WlxDialogBoxIndirect; - PWLX_DIALOG_BOX_INDIRECT_PARAM WlxDialogBoxIndirectParam; - PWLX_SWITCH_DESKTOP_TO_USER WlxSwitchDesktopToUser; - PWLX_SWITCH_DESKTOP_TO_WINLOGON WlxSwitchDesktopToWinlogon; - PWLX_CHANGE_PASSWORD_NOTIFY WlxChangePasswordNotify; - PWLX_GET_SOURCE_DESKTOP WlxGetSourceDesktop; - PWLX_SET_RETURN_DESKTOP WlxSetReturnDesktop; - PWLX_CREATE_USER_DESKTOP WlxCreateUserDesktop; - PWLX_CHANGE_PASSWORD_NOTIFY_EX WlxChangePasswordNotifyEx; - PWLX_CLOSE_USER_DESKTOP WlxCloseUserDesktop ; + PWLX_USE_CTRL_ALT_DEL WlxUseCtrlAltDel; + PWLX_SET_CONTEXT_POINTER WlxSetContextPointer; + PWLX_SAS_NOTIFY WlxSasNotify; + PWLX_SET_TIMEOUT WlxSetTimeout; + PWLX_ASSIGN_SHELL_PROTECTION WlxAssignShellProtection; + PWLX_MESSAGE_BOX WlxMessageBox; + PWLX_DIALOG_BOX WlxDialogBox; + PWLX_DIALOG_BOX_PARAM WlxDialogBoxParam; + PWLX_DIALOG_BOX_INDIRECT WlxDialogBoxIndirect; + PWLX_DIALOG_BOX_INDIRECT_PARAM WlxDialogBoxIndirectParam; + PWLX_SWITCH_DESKTOP_TO_USER WlxSwitchDesktopToUser; + PWLX_SWITCH_DESKTOP_TO_WINLOGON WlxSwitchDesktopToWinlogon; + PWLX_CHANGE_PASSWORD_NOTIFY WlxChangePasswordNotify; + PWLX_GET_SOURCE_DESKTOP WlxGetSourceDesktop; + PWLX_SET_RETURN_DESKTOP WlxSetReturnDesktop; + PWLX_CREATE_USER_DESKTOP WlxCreateUserDesktop; + PWLX_CHANGE_PASSWORD_NOTIFY_EX WlxChangePasswordNotifyEx; + PWLX_CLOSE_USER_DESKTOP WlxCloseUserDesktop; } WLX_DISPATCH_VERSION_1_2, *PWLX_DISPATCH_VERSION_1_2; typedef struct _WLX_DISPATCH_VERSION_1_3 { - PWLX_USE_CTRL_ALT_DEL WlxUseCtrlAltDel; - PWLX_SET_CONTEXT_POINTER WlxSetContextPointer; - PWLX_SAS_NOTIFY WlxSasNotify; - PWLX_SET_TIMEOUT WlxSetTimeout; - PWLX_ASSIGN_SHELL_PROTECTION WlxAssignShellProtection; - PWLX_MESSAGE_BOX WlxMessageBox; - PWLX_DIALOG_BOX WlxDialogBox; - PWLX_DIALOG_BOX_PARAM WlxDialogBoxParam; - PWLX_DIALOG_BOX_INDIRECT WlxDialogBoxIndirect; - PWLX_DIALOG_BOX_INDIRECT_PARAM WlxDialogBoxIndirectParam; - PWLX_SWITCH_DESKTOP_TO_USER WlxSwitchDesktopToUser; - PWLX_SWITCH_DESKTOP_TO_WINLOGON WlxSwitchDesktopToWinlogon; - PWLX_CHANGE_PASSWORD_NOTIFY WlxChangePasswordNotify; - PWLX_GET_SOURCE_DESKTOP WlxGetSourceDesktop; - PWLX_SET_RETURN_DESKTOP WlxSetReturnDesktop; - PWLX_CREATE_USER_DESKTOP WlxCreateUserDesktop; - PWLX_CHANGE_PASSWORD_NOTIFY_EX WlxChangePasswordNotifyEx; - PWLX_CLOSE_USER_DESKTOP WlxCloseUserDesktop ; - PWLX_SET_OPTION WlxSetOption; - PWLX_GET_OPTION WlxGetOption; - PWLX_WIN31_MIGRATE WlxWin31Migrate; - PWLX_QUERY_CLIENT_CREDENTIALS WlxQueryClientCredentials; - PWLX_QUERY_IC_CREDENTIALS WlxQueryInetConnectorCredentials; - PWLX_DISCONNECT WlxDisconnect; - PWLX_QUERY_TERMINAL_SERVICES_DATA WlxQueryTerminalServicesData; + PWLX_USE_CTRL_ALT_DEL WlxUseCtrlAltDel; + PWLX_SET_CONTEXT_POINTER WlxSetContextPointer; + PWLX_SAS_NOTIFY WlxSasNotify; + PWLX_SET_TIMEOUT WlxSetTimeout; + PWLX_ASSIGN_SHELL_PROTECTION WlxAssignShellProtection; + PWLX_MESSAGE_BOX WlxMessageBox; + PWLX_DIALOG_BOX WlxDialogBox; + PWLX_DIALOG_BOX_PARAM WlxDialogBoxParam; + PWLX_DIALOG_BOX_INDIRECT WlxDialogBoxIndirect; + PWLX_DIALOG_BOX_INDIRECT_PARAM WlxDialogBoxIndirectParam; + PWLX_SWITCH_DESKTOP_TO_USER WlxSwitchDesktopToUser; + PWLX_SWITCH_DESKTOP_TO_WINLOGON WlxSwitchDesktopToWinlogon; + PWLX_CHANGE_PASSWORD_NOTIFY WlxChangePasswordNotify; + PWLX_GET_SOURCE_DESKTOP WlxGetSourceDesktop; + PWLX_SET_RETURN_DESKTOP WlxSetReturnDesktop; + PWLX_CREATE_USER_DESKTOP WlxCreateUserDesktop; + PWLX_CHANGE_PASSWORD_NOTIFY_EX WlxChangePasswordNotifyEx; + PWLX_CLOSE_USER_DESKTOP WlxCloseUserDesktop; + PWLX_SET_OPTION WlxSetOption; + PWLX_GET_OPTION WlxGetOption; + PWLX_WIN31_MIGRATE WlxWin31Migrate; + PWLX_QUERY_CLIENT_CREDENTIALS WlxQueryClientCredentials; + PWLX_QUERY_IC_CREDENTIALS WlxQueryInetConnectorCredentials; + PWLX_DISCONNECT WlxDisconnect; + PWLX_QUERY_TERMINAL_SERVICES_DATA WlxQueryTerminalServicesData; } WLX_DISPATCH_VERSION_1_3, *PWLX_DISPATCH_VERSION_1_3; typedef struct _WLX_DISPATCH_VERSION_1_4 { - PWLX_USE_CTRL_ALT_DEL WlxUseCtrlAltDel; - PWLX_SET_CONTEXT_POINTER WlxSetContextPointer; - PWLX_SAS_NOTIFY WlxSasNotify; - PWLX_SET_TIMEOUT WlxSetTimeout; - PWLX_ASSIGN_SHELL_PROTECTION WlxAssignShellProtection; - PWLX_MESSAGE_BOX WlxMessageBox; - PWLX_DIALOG_BOX WlxDialogBox; - PWLX_DIALOG_BOX_PARAM WlxDialogBoxParam; - PWLX_DIALOG_BOX_INDIRECT WlxDialogBoxIndirect; - PWLX_DIALOG_BOX_INDIRECT_PARAM WlxDialogBoxIndirectParam; - PWLX_SWITCH_DESKTOP_TO_USER WlxSwitchDesktopToUser; - PWLX_SWITCH_DESKTOP_TO_WINLOGON WlxSwitchDesktopToWinlogon; - PWLX_CHANGE_PASSWORD_NOTIFY WlxChangePasswordNotify; - PWLX_GET_SOURCE_DESKTOP WlxGetSourceDesktop; - PWLX_SET_RETURN_DESKTOP WlxSetReturnDesktop; - PWLX_CREATE_USER_DESKTOP WlxCreateUserDesktop; - PWLX_CHANGE_PASSWORD_NOTIFY_EX WlxChangePasswordNotifyEx; - PWLX_CLOSE_USER_DESKTOP WlxCloseUserDesktop ; - PWLX_SET_OPTION WlxSetOption; - PWLX_GET_OPTION WlxGetOption; - PWLX_WIN31_MIGRATE WlxWin31Migrate; - PWLX_QUERY_CLIENT_CREDENTIALS WlxQueryClientCredentials; - PWLX_QUERY_IC_CREDENTIALS WlxQueryInetConnectorCredentials; - PWLX_DISCONNECT WlxDisconnect; - PWLX_QUERY_TERMINAL_SERVICES_DATA WlxQueryTerminalServicesData; - PWLX_QUERY_CONSOLESWITCH_CREDENTIALS WlxQueryConsoleSwitchCredentials; - PWLX_QUERY_TS_LOGON_CREDENTIALS WlxQueryTsLogonCredentials; + PWLX_USE_CTRL_ALT_DEL WlxUseCtrlAltDel; + PWLX_SET_CONTEXT_POINTER WlxSetContextPointer; + PWLX_SAS_NOTIFY WlxSasNotify; + PWLX_SET_TIMEOUT WlxSetTimeout; + PWLX_ASSIGN_SHELL_PROTECTION WlxAssignShellProtection; + PWLX_MESSAGE_BOX WlxMessageBox; + PWLX_DIALOG_BOX WlxDialogBox; + PWLX_DIALOG_BOX_PARAM WlxDialogBoxParam; + PWLX_DIALOG_BOX_INDIRECT WlxDialogBoxIndirect; + PWLX_DIALOG_BOX_INDIRECT_PARAM WlxDialogBoxIndirectParam; + PWLX_SWITCH_DESKTOP_TO_USER WlxSwitchDesktopToUser; + PWLX_SWITCH_DESKTOP_TO_WINLOGON WlxSwitchDesktopToWinlogon; + PWLX_CHANGE_PASSWORD_NOTIFY WlxChangePasswordNotify; + PWLX_GET_SOURCE_DESKTOP WlxGetSourceDesktop; + PWLX_SET_RETURN_DESKTOP WlxSetReturnDesktop; + PWLX_CREATE_USER_DESKTOP WlxCreateUserDesktop; + PWLX_CHANGE_PASSWORD_NOTIFY_EX WlxChangePasswordNotifyEx; + PWLX_CLOSE_USER_DESKTOP WlxCloseUserDesktop; + PWLX_SET_OPTION WlxSetOption; + PWLX_GET_OPTION WlxGetOption; + PWLX_WIN31_MIGRATE WlxWin31Migrate; + PWLX_QUERY_CLIENT_CREDENTIALS WlxQueryClientCredentials; + PWLX_QUERY_IC_CREDENTIALS WlxQueryInetConnectorCredentials; + PWLX_DISCONNECT WlxDisconnect; + PWLX_QUERY_TERMINAL_SERVICES_DATA WlxQueryTerminalServicesData; + PWLX_QUERY_CONSOLESWITCH_CREDENTIALS WlxQueryConsoleSwitchCredentials; + PWLX_QUERY_TS_LOGON_CREDENTIALS WlxQueryTsLogonCredentials; } WLX_DISPATCH_VERSION_1_4, *PWLX_DISPATCH_VERSION_1_4; -/* non-GINA notification DLLs*/ +/* Non-GINA notification DLLs */ typedef DWORD (CALLBACK *PFNMSGECALLBACK)( - BOOL bVerbose, - LPWSTR lpMessage); + _In_ BOOL bVerbose, + _In_ LPWSTR lpMessage); typedef struct _WLX_NOTIFICATION_INFO { - ULONG Size; - ULONG Flags; - PWSTR UserName; - PWSTR Domain; - PWSTR WindowStation; - HANDLE hToken; - HDESK hDesktop; - PFNMSGECALLBACK pStatusCallback; + ULONG Size; + ULONG Flags; + PWSTR UserName; + PWSTR Domain; + PWSTR WindowStation; + HANDLE hToken; + HDESK hDesktop; + PFNMSGECALLBACK pStatusCallback; } WLX_NOTIFICATION_INFO, *PWLX_NOTIFICATION_INFO;
8 years, 3 months
1
0
0
0
← Newer
1
...
10
11
12
13
14
15
16
...
35
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
Results per page:
10
25
50
100
200