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
January 2012
----- 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
19 participants
559 discussions
Start a n
N
ew thread
[tfaber] 55127: [FASTFAT] - Fix an if condition in VfatCreateFile causing opening a volume to always return access denied - Fix some DPRINT issues - Powered by VS11
by tfaber@svn.reactos.org
Author: tfaber Date: Mon Jan 23 19:36:59 2012 New Revision: 55127 URL:
http://svn.reactos.org/svn/reactos?rev=55127&view=rev
Log: [FASTFAT] - Fix an if condition in VfatCreateFile causing opening a volume to always return access denied - Fix some DPRINT issues - Powered by VS11 Modified: trunk/reactos/drivers/filesystems/fastfat/create.c trunk/reactos/drivers/filesystems/fastfat/fsctl.c trunk/reactos/drivers/filesystems/fastfat/rw.c Modified: trunk/reactos/drivers/filesystems/fastfat/create.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat/create.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat/create.c [iso-8859-1] Mon Jan 23 19:36:59 2012 @@ -453,7 +453,7 @@ if (FileObject->FileName.Length == 0 && (FileObject->RelatedFileObject == NULL || FileObject->RelatedFileObject->FsContext2 != NULL)) { - if (RequestedDisposition != FILE_OPEN || + if (RequestedDisposition != FILE_OPEN && RequestedDisposition != FILE_OPEN_IF) { return(STATUS_ACCESS_DENIED); Modified: trunk/reactos/drivers/filesystems/fastfat/fsctl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat/fsctl.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat/fsctl.c [iso-8859-1] Mon Jan 23 19:36:59 2012 @@ -85,8 +85,8 @@ } PartitionInfoIsValid = TRUE; DPRINT("Partition Information:\n"); - DPRINT("StartingOffset %u\n", PartitionInfo.StartingOffset.QuadPart / 512); - DPRINT("PartitionLength %u\n", PartitionInfo.PartitionLength.QuadPart / 512); + DPRINT("StartingOffset %I64u\n", PartitionInfo.StartingOffset.QuadPart / 512); + DPRINT("PartitionLength %I64u\n", PartitionInfo.PartitionLength.QuadPart / 512); DPRINT("HiddenSectors %u\n", PartitionInfo.HiddenSectors); DPRINT("PartitionNumber %u\n", PartitionInfo.PartitionNumber); DPRINT("PartitionType %u\n", PartitionInfo.PartitionType); Modified: trunk/reactos/drivers/filesystems/fastfat/rw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat/rw.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat/rw.c [iso-8859-1] Mon Jan 23 19:36:59 2012 @@ -355,7 +355,7 @@ DPRINT("VfatWriteFileData(DeviceExt %p, FileObject %p, " "Length %d, WriteOffset 0x%I64x), '%wZ'\n", DeviceExt, - IrpContext->FileObject, Length, WriteOffset, + IrpContext->FileObject, Length, WriteOffset.QuadPart, &Fcb->PathNameU); ASSERT(WriteOffset.QuadPart + Length <= Fcb->RFCB.AllocationSize.QuadPart);
12 years, 11 months
1
0
0
0
[akhaldi] 55126: [PSDK] * Update winsock2.h annotations.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon Jan 23 19:12:00 2012 New Revision: 55126 URL:
http://svn.reactos.org/svn/reactos?rev=55126&view=rev
Log: [PSDK] * Update winsock2.h annotations. Modified: trunk/reactos/include/psdk/winsock2.h Modified: trunk/reactos/include/psdk/winsock2.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winsock2.h?re…
============================================================================== --- trunk/reactos/include/psdk/winsock2.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/winsock2.h [iso-8859-1] Mon Jan 23 19:12:00 2012 @@ -774,7 +774,11 @@ typedef struct _BLOB { ULONG cbSize; - BYTE *pBlobData; +#ifdef MIDL_PASS + [size_is(cbSize)] BYTE *pBlobData; +#else + _Field_size_bytes_(cbSize) BYTE *pBlobData ; +#endif } BLOB,*PBLOB,*LPBLOB; #endif /* _tagBLOB_DEFINED */ @@ -806,16 +810,17 @@ LPGUID lpNSProviderId; LPSTR lpszContext; DWORD dwNumberOfProtocols; - LPAFPROTOCOLS lpafpProtocols; + _Field_size_(dwNumberOfProtocols) LPAFPROTOCOLS lpafpProtocols; LPSTR lpszQueryString; DWORD dwNumberOfCsAddrs; - LPCSADDR_INFO lpcsaBuffer; + _Field_size_(dwNumberOfCsAddrs) LPCSADDR_INFO lpcsaBuffer; DWORD dwOutputFlags; LPBLOB lpBlob; } WSAQUERYSETA, *PWSAQUERYSETA, *LPWSAQUERYSETA; +_Struct_size_bytes_(dwSize) typedef struct _WSAQuerySetW { - DWORD dwSize; + _Field_range_(>=,sizeof(struct _WSAQuerySetW)) DWORD dwSize; LPWSTR lpszServiceInstanceName; LPGUID lpServiceClassId; LPWSAVERSION lpVersion; @@ -824,10 +829,10 @@ LPGUID lpNSProviderId; LPWSTR lpszContext; DWORD dwNumberOfProtocols; - LPAFPROTOCOLS lpafpProtocols; + _Field_size_(dwNumberOfProtocols) LPAFPROTOCOLS lpafpProtocols; LPWSTR lpszQueryString; DWORD dwNumberOfCsAddrs; - LPCSADDR_INFO lpcsaBuffer; + _Field_size_(dwNumberOfCsAddrs) LPCSADDR_INFO lpcsaBuffer; DWORD dwOutputFlags; LPBLOB lpBlob; } WSAQUERYSETW, *PWSAQUERYSETW, *LPWSAQUERYSETW; @@ -858,10 +863,10 @@ LPGUID lpNSProviderId; LPWSTR lpszContext; DWORD dwNumberOfProtocols; - LPAFPROTOCOLS lpafpProtocols; + _Field_size_(dwNumberOfProtocols) LPAFPROTOCOLS lpafpProtocols; LPWSTR lpszQueryString; DWORD dwNumberOfCsAddrs; - LPCSADDR_INFO lpcsaBuffer; + _Field_size_(dwNumberOfCsAddrs) LPCSADDR_INFO lpcsaBuffer; DWORD dwOutputFlags; LPBLOB lpBlob; } WSAQUERYSET2W, *PWSAQUERYSET2W, *LPWSAQUERYSET2W; @@ -1013,186 +1018,189 @@ #if INCL_WINSOCK_API_TYPEDEFS +_Must_inspect_result_ typedef SOCKET (WSAAPI *LPFN_ACCEPT)( - IN SOCKET s, - OUT struct sockaddr FAR *addr OPTIONAL, - IN OUT int FAR *addrlen OPTIONAL); + _In_ SOCKET s, + _Out_writes_bytes_opt_(*addrlen) struct sockaddr FAR *addr, + _Inout_opt_ int FAR *addrlen); typedef int (WSAAPI *LPFN_BIND)( - IN SOCKET s, - IN const struct sockaddr FAR *name, - IN int namelen); + _In_ SOCKET s, + _In_reads_bytes_(namelen) const struct sockaddr FAR *name, + _In_ int namelen); typedef int (WSAAPI *LPFN_CLOSESOCKET)( - IN SOCKET s); + _In_ SOCKET s); typedef int (WSAAPI *LPFN_CONNECT)( - IN SOCKET s, - IN const struct sockaddr FAR *name, - IN int namelen); + _In_ SOCKET s, + _In_reads_bytes_(namelen) const struct sockaddr FAR *name, + _In_ int namelen); typedef int (WSAAPI *LPFN_IOCTLSOCKET)( - IN SOCKET s, - IN long cmd, - IN OUT u_long FAR *argp); + _In_ SOCKET s, + _In_ long cmd, + _Inout_ u_long FAR *argp); typedef int (WSAAPI *LPFN_GETPEERNAME)( - IN SOCKET s, - OUT struct sockaddr FAR *name, - IN OUT int FAR *namelen); + _In_ SOCKET s, + _Out_writes_bytes_to_(*namelen,*namelen) struct sockaddr FAR *name, + _Inout_ int FAR *namelen); typedef int (WSAAPI *LPFN_GETSOCKNAME)( - IN SOCKET s, - OUT struct sockaddr FAR *name, - IN OUT int FAR *namelen); + _In_ SOCKET s, + _Out_writes_bytes_to_(*namelen,*namelen) struct sockaddr FAR *name, + _Inout_ int FAR *namelen); typedef int (WSAAPI *LPFN_GETSOCKOPT)( - IN SOCKET s, - IN int level, - IN int optname, - OUT char FAR *optval, - IN OUT int FAR *optlen); + _In_ SOCKET s, + _In_ int level, + _In_ int optname, + _Out_writes_bytes_(*optlen) char FAR *optval, + _Inout_ int FAR *optlen); typedef u_long (WSAAPI *LPFN_HTONL)( - IN u_long hostlong); + _In_ u_long hostlong); typedef u_short (WSAAPI *LPFN_HTONS)( - IN u_short hostshort); + _In_ u_short hostshort); typedef unsigned long (WSAAPI *LPFN_INET_ADDR)( - IN const char FAR *cp); + _In_ const char FAR *cp); typedef char FAR * (WSAAPI *LPFN_INET_NTOA)( - IN struct in_addr in); + _In_ struct in_addr in); typedef int (WSAAPI *LPFN_LISTEN)( - IN SOCKET s, - IN int backlog); + _In_ SOCKET s, + _In_ int backlog); typedef u_long (WSAAPI *LPFN_NTOHL)( - IN u_long netlong); + _In_ u_long netlong); typedef u_short (WSAAPI *LPFN_NTOHS)( - IN u_short netshort); + _In_ u_short netshort); typedef int (WSAAPI *LPFN_RECV)( - IN SOCKET s, - OUT char FAR *buf, - IN int len, - IN int flags); + _In_ SOCKET s, + _Out_writes_bytes_to_(len, return) char FAR *buf, + _In_ int len, + _In_ int flags); typedef int (WSAAPI *LPFN_RECVFROM)( - IN SOCKET s, - OUT char FAR *buf, - IN int len, - IN int flags, - OUT struct sockaddr FAR *from OPTIONAL, - IN OUT int FAR * fromlen OPTIONAL); + _In_ SOCKET s, + _Out_writes_bytes_to_(len, return) char FAR *buf, + _In_ int len, + _In_ int flags, + _Out_writes_bytes_to_opt_(*fromlen, *fromlen) struct sockaddr FAR *from, + _Inout_opt_ int FAR * fromlen); typedef int (WSAAPI *LPFN_SELECT)( - IN int nfds, - IN OUT fd_set FAR *readfds OPTIONAL, - IN OUT fd_set FAR *writefds OPTIONAL, - IN OUT fd_set FAR *exceptfds OPTIONAL, - IN const struct timeval FAR *timeout OPTIONAL); + _In_ int nfds, + _Inout_opt_ fd_set FAR *readfds, + _Inout_opt_ fd_set FAR *writefds, + _Inout_opt_ fd_set FAR *exceptfds, + _In_opt_ const struct timeval FAR *timeout); typedef int (WSAAPI *LPFN_SEND)( - IN SOCKET s, - IN const char FAR *buf, - IN int len, - IN int flags); + _In_ SOCKET s, + _In_reads_bytes_(len) const char FAR *buf, + _In_ int len, + _In_ int flags); typedef int (WSAAPI *LPFN_SENDTO)( - IN SOCKET s, - IN const char FAR *buf, - IN int len, - IN int flags, - IN const struct sockaddr FAR *to OPTIONAL, - IN int tolen); + _In_ SOCKET s, + _In_reads_bytes_(len) const char FAR *buf, + _In_ int len, + _In_ int flags, + _In_reads_bytes_(tolen) const struct sockaddr FAR *to, + _In_ int tolen); typedef int (WSAAPI *LPFN_SETSOCKOPT)( - IN SOCKET s, - IN int level, - IN int optname, - IN const char FAR *optval OPTIONAL, - IN int optlen); + _In_ SOCKET s, + _In_ int level, + _In_ int optname, + _In_reads_bytes_(optlen) const char FAR *optval, + _In_ int optlen); typedef int (WSAAPI *LPFN_SHUTDOWN)( - IN SOCKET s, - IN int how); - + _In_ SOCKET s, + _In_ int how); + +_Must_inspect_result_ typedef SOCKET (WSAAPI *LPFN_SOCKET)( - IN int af, - IN int type, - IN int protocol); + _In_ int af, + _In_ int type, + _In_ int protocol); typedef struct hostent FAR * (WSAAPI *LPFN_GETHOSTBYADDR)( - IN const char FAR *addr, - IN int len, - IN int type); + _In_reads_bytes_(len) const char FAR *addr, + _In_ int len, + _In_ int type); typedef struct hostent FAR * (WSAAPI *LPFN_GETHOSTBYNAME)( - IN const char FAR *name); + _In_ const char FAR *name); typedef int (WSAAPI *LPFN_GETHOSTNAME)( - OUT char FAR *name, - IN int namelen); + _Out_writes_bytes_(namelen) char FAR *name, + _In_ int namelen); typedef struct servent FAR * (WSAAPI *LPFN_GETSERVBYPORT)( - IN int port, - IN const char FAR *proto); + _In_ int port, + _In_opt_z_ const char FAR *proto); typedef struct servent FAR * (WSAAPI *LPFN_GETSERVBYNAME)( - IN const char FAR *name, - IN const char FAR *proto); + _In_z_ const char FAR *name, + _In_opt_z_ const char FAR *proto); typedef struct protoent FAR * (WSAAPI *LPFN_GETPROTOBYNUMBER)( - IN int number); + _In_ int number); typedef struct protoent FAR * (WSAAPI *LPFN_GETPROTOBYNAME)( - IN const char FAR *name); - + _In_z_ const char FAR *name); + +_Must_inspect_result_ typedef int (WSAAPI *LPFN_WSASTARTUP)( - IN WORD wVersionRequired, - OUT LPWSADATA lpWSAData); + _In_ WORD wVersionRequired, + _Out_ LPWSADATA lpWSAData); typedef int (WSAAPI *LPFN_WSACLEANUP)(void); typedef void (WSAAPI *LPFN_WSASETLASTERROR)( - IN int iError); + _In_ int iError); typedef int (WSAAPI *LPFN_WSAGETLASTERROR)(void); @@ -1205,110 +1213,111 @@ typedef FARPROC (WSAAPI *LPFN_WSASETBLOCKINGHOOK)( - IN FARPROC lpBlockFunc); + _In_ FARPROC lpBlockFunc); typedef int (WSAAPI *LPFN_WSACANCELBLOCKINGCALL)(void); typedef HANDLE (WSAAPI *LPFN_WSAASYNCGETSERVBYNAME)( - IN HWND hWnd, - IN u_int wMsg, - IN const char FAR *name, - IN const char FAR *proto, - OUT char FAR *buf, - IN int buflen); + _In_ HWND hWnd, + _In_ u_int wMsg, + _In_z_ const char FAR *name, + _In_z_ const char FAR *proto, + _Out_writes_bytes_(buflen) char FAR *buf, + _In_ int buflen); typedef HANDLE (WSAAPI *LPFN_WSAASYNCGETSERVBYPORT)( - IN HWND hWnd, - IN u_int wMsg, - IN int port, - IN const char FAR *proto, - OUT char FAR *buf, - IN int buflen); + _In_ HWND hWnd, + _In_ u_int wMsg, + _In_ int port, + _In_ const char FAR *proto, + _Out_writes_bytes_(buflen) char FAR *buf, + _In_ int buflen); typedef HANDLE (WSAAPI *LPFN_WSAASYNCGETPROTOBYNAME)( - IN HWND hWnd, - IN u_int wMsg, - IN const char FAR *name, - OUT char FAR *buf, - IN int buflen); + _In_ HWND hWnd, + _In_ u_int wMsg, + _In_z_ const char FAR *name, + _Out_writes_bytes_(buflen) char FAR *buf, + _In_ int buflen); typedef HANDLE (WSAAPI *LPFN_WSAASYNCGETPROTOBYNUMBER)( - IN HWND hWnd, - IN u_int wMsg, - IN int number, - OUT char FAR *buf, - IN int buflen); + _In_ HWND hWnd, + _In_ u_int wMsg, + _In_ int number, + _Out_writes_bytes_(buflen) char FAR *buf, + _In_ int buflen); typedef HANDLE (WSAAPI *LPFN_WSAASYNCGETHOSTBYNAME)( - IN HWND hWnd, - IN u_int wMsg, - IN const char FAR *name, - OUT char FAR *buf, - IN int buflen); + _In_ HWND hWnd, + _In_ u_int wMsg, + _In_z_ const char FAR *name, + _Out_writes_bytes_(buflen) char FAR *buf, + _In_ int buflen); typedef HANDLE (WSAAPI *LPFN_WSAASYNCGETHOSTBYADDR)( - IN HWND hWnd, - IN u_int wMsg, - IN const char FAR *addr, - IN int len, - IN int type, - OUT char FAR *buf, - IN int buflen); + _In_ HWND hWnd, + _In_ u_int wMsg, + _In_reads_bytes_(len) const char FAR *addr, + _In_ int len, + _In_ int type, + _Out_writes_bytes_(buflen) char FAR *buf, + _In_ int buflen); typedef int (WSAAPI *LPFN_WSACANCELASYNCREQUEST)( - IN HANDLE hAsyncTaskHandle); + _In_ HANDLE hAsyncTaskHandle); typedef int (WSAAPI *LPFN_WSAASYNCSELECT)( - IN SOCKET s, - IN HWND hWnd, - IN u_int wMsg, - IN long lEvent); - + _In_ SOCKET s, + _In_ HWND hWnd, + _In_ u_int wMsg, + _In_ long lEvent); + +_Must_inspect_result_ typedef SOCKET (WSAAPI *LPFN_WSAACCEPT)( - IN SOCKET s, - OUT struct sockaddr FAR *addr OPTIONAL, - IN OUT LPINT addrlen OPTIONAL, - IN LPCONDITIONPROC lpfnCondition OPTIONAL, - IN DWORD_PTR dwCallbackData OPTIONAL); + _In_ SOCKET s, + _Out_writes_bytes_to_opt_(*addrlen,*addrlen) struct sockaddr FAR *addr, + _Inout_opt_ LPINT addrlen, + _In_opt_ LPCONDITIONPROC lpfnCondition, + _In_opt_ DWORD_PTR dwCallbackData); typedef BOOL (WSAAPI *LPFN_WSACLOSEEVENT)( - IN WSAEVENT hEvent); + _In_ WSAEVENT hEvent); typedef int (WSAAPI *LPFN_WSACONNECT)( - IN SOCKET s, - IN const struct sockaddr FAR *name, - IN int namelen, - IN LPWSABUF lpCallerData OPTIONAL, - OUT LPWSABUF lpCalleeData OPTIONAL, - IN LPQOS lpSQOS OPTIONAL, - IN LPQOS lpGQOS OPTIONAL); + _In_ SOCKET s, + _In_reads_bytes_(namelen) const struct sockaddr FAR *name, + _In_ int namelen, + _In_opt_ LPWSABUF lpCallerData, + _Out_opt_ LPWSABUF lpCalleeData, + _In_opt_ LPQOS lpSQOS, + _In_opt_ LPQOS lpGQOS); typedef WSAEVENT (WSAAPI *LPFN_WSACREATEEVENT)(void); typedef int (WSAAPI *LPFN_WSADUPLICATESOCKETA)( - IN SOCKET s, - IN DWORD dwProcessId, - OUT LPWSAPROTOCOL_INFOA lpProtocolInfo); + _In_ SOCKET s, + _In_ DWORD dwProcessId, + _Out_ LPWSAPROTOCOL_INFOA lpProtocolInfo); typedef int (WSAAPI *LPFN_WSADUPLICATESOCKETW)( - IN SOCKET s, - IN DWORD dwProcessId, - OUT LPWSAPROTOCOL_INFOW lpProtocolInfo); + _In_ SOCKET s, + _In_ DWORD dwProcessId, + _Out_ LPWSAPROTOCOL_INFOW lpProtocolInfo); #ifdef UNICODE #define LPFN_WSADUPLICATESOCKET LPFN_WSADUPLICATESOCKETW @@ -1318,21 +1327,21 @@ typedef int (WSAAPI *LPFN_WSAENUMNETWORKEVENTS)( - IN SOCKET s, - IN WSAEVENT hEventObject, - OUT LPWSANETWORKEVENTS lpNetworkEvents); + _In_ SOCKET s, + _In_ WSAEVENT hEventObject, + _Out_ LPWSANETWORKEVENTS lpNetworkEvents); typedef int (WSAAPI *LPFN_WSAENUMPROTOCOLSA)( - IN LPINT lpiProtocols OPTIONAL, - OUT LPWSAPROTOCOL_INFOA lpProtocolBuffer OPTIONAL, - IN OUT LPDWORD lpdwBufferLength); + _In_opt_ LPINT lpiProtocols, + _Out_writes_bytes_to_opt_(*lpdwBufferLength,*lpdwBufferLength) LPWSAPROTOCOL_INFOA lpProtocolBuffer, + _Inout_ LPDWORD lpdwBufferLength); typedef int (WSAAPI *LPFN_WSAENUMPROTOCOLSW)( - IN LPINT lpiProtocols OPTIONAL, - OUT LPWSAPROTOCOL_INFOW lpProtocolBuffer OPTIONAL, - IN OUT LPDWORD lpdwBufferLength); + _In_opt_ LPINT lpiProtocols, + _Out_writes_bytes_to_opt_(*lpdwBufferLength,*lpdwBufferLength) LPWSAPROTOCOL_INFOW lpProtocolBuffer, + _Inout_ LPDWORD lpdwBufferLength); #ifdef UNICODE #define LPFN_WSAENUMPROTOCOLS LPFN_WSAENUMPROTOCOLSW @@ -1342,17 +1351,17 @@ typedef int (WSAAPI *LPFN_WSAEVENTSELECT)( - IN SOCKET s, - IN WSAEVENT hEventObject, - IN long lNetworkEvents); + _In_ SOCKET s, + _In_opt_ WSAEVENT hEventObject, + _In_ long lNetworkEvents); typedef BOOL (WSAAPI *LPFN_WSAGETOVERLAPPEDRESULT)( - IN SOCKET s, - IN LPWSAOVERLAPPED lpOverlapped, - OUT LPDWORD lpcbTransfer, - IN BOOL fWait, - OUT LPDWORD lpdwFlags); + _In_ SOCKET s, + _In_ LPWSAOVERLAPPED lpOverlapped, + _Out_ LPDWORD lpcbTransfer, + _In_ BOOL fWait, + _Out_ LPDWORD lpdwFlags); typedef BOOL (WSAAPI *LPFN_WSAGETQOSBYNAME)( @@ -1362,130 +1371,132 @@ typedef int (WSAAPI *LPFN_WSAHTONL)( - IN SOCKET s, - IN u_long hostlong, - OUT u_long FAR *lpnetlong); + _In_ SOCKET s, + _In_ u_long hostlong, + _Out_ u_long FAR *lpnetlong); typedef int (WSAAPI *LPFN_WSAHTONS)( - IN SOCKET s, - IN u_short hostshort, - OUT u_short FAR *lpnetshort); + _In_ SOCKET s, + _In_ u_short hostshort, + _Out_ u_short FAR *lpnetshort); typedef int (WSAAPI *LPFN_WSAIOCTL)( - IN SOCKET s, - IN DWORD dwIoControlCode, - IN LPVOID lpvInBuffer OPTIONAL, - IN DWORD cbInBuffer, - OUT LPVOID lpvOutBuffer OPTIONAL, - IN DWORD cbOutBuffer, - OUT LPDWORD lpcbBytesReturned, - IN OUT LPWSAOVERLAPPED lpOverlapped OPTIONAL, - IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine OPTIONAL); + _In_ SOCKET s, + _In_ DWORD dwIoControlCode, + _In_reads_bytes_opt_(cbInBuffer) LPVOID lpvInBuffer, + _In_ DWORD cbInBuffer, + _Out_writes_bytes_to_opt_(cbOutBuffer, *lpcbBytesReturned) LPVOID lpvOutBuffer, + _In_ DWORD cbOutBuffer, + _Out_ LPDWORD lpcbBytesReturned, + _Inout_opt_ LPWSAOVERLAPPED lpOverlapped, + _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine); typedef SOCKET (WSAAPI *LPFN_WSAJOINLEAF)( - IN SOCKET s, - IN const struct sockaddr FAR *name, - IN int namelen, - IN LPWSABUF lpCallerData OPTIONAL, - OUT LPWSABUF lpCalleeData OPTIONAL, - IN LPQOS lpSQOS OPTIONAL, - IN LPQOS lpGQOS OPTIONAL, - IN DWORD dwFlags); + _In_ SOCKET s, + _In_reads_bytes_(namelen) const struct sockaddr FAR *name, + _In_ int namelen, + _In_opt_ LPWSABUF lpCallerData, + _Out_opt_ LPWSABUF lpCalleeData, + _In_opt_ LPQOS lpSQOS, + _In_opt_ LPQOS lpGQOS, + _In_ DWORD dwFlags); typedef int (WSAAPI *LPFN_WSANTOHL)( - IN SOCKET s, - IN u_long netlong, - OUT u_long FAR *lphostlong); + _In_ SOCKET s, + _In_ u_long netlong, + _Out_ u_long FAR *lphostlong); typedef int (WSAAPI *LPFN_WSANTOHS)( - IN SOCKET s, - IN u_short netshort, - OUT u_short FAR *lphostshort); + _In_ SOCKET s, + _In_ u_short netshort, + _Out_ u_short FAR *lphostshort); typedef int (WSAAPI *LPFN_WSARECV)( - IN SOCKET s, - IN LPWSABUF lpBuffers, - IN DWORD dwBufferCount, - OUT LPDWORD lpNumberOfBytesRecvd OPTIONAL, - IN OUT LPDWORD lpFlags, - IN OUT LPWSAOVERLAPPED lpOverlapped OPTIONAL, - IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine OPTIONAL); + _In_ SOCKET s, + _In_reads_(dwBufferCount) LPWSABUF lpBuffers, + _In_ DWORD dwBufferCount, + _Out_opt_ LPDWORD lpNumberOfBytesRecvd, + _Inout_ LPDWORD lpFlags, + _Inout_opt_ LPWSAOVERLAPPED lpOverlapped, + _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine); typedef int (WSAAPI *LPFN_WSARECVDISCONNECT)( - IN SOCKET s, - OUT LPWSABUF lpInboundDisconnectData); + _In_ SOCKET s, + __out_data_source(NETWORK) LPWSABUF lpInboundDisconnectData); typedef int (WSAAPI *LPFN_WSARECVFROM)( - IN SOCKET s, - IN LPWSABUF lpBuffers, - IN DWORD dwBufferCount, - OUT LPDWORD lpNumberOfBytesRecvd OPTIONAL, - IN OUT LPDWORD lpFlags, - OUT struct sockaddr FAR *lpFrom OPTIONAL, - IN OUT LPINT lpFromlen OPTIONAL, - IN OUT LPWSAOVERLAPPED lpOverlapped OPTIONAL, - IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine OPTIONAL); + _In_ SOCKET s, + _In_reads_(dwBufferCount) LPWSABUF lpBuffers, + _In_ DWORD dwBufferCount, + _Out_opt_ LPDWORD lpNumberOfBytesRecvd, + _Inout_ LPDWORD lpFlags, + _Out_writes_bytes_to_opt_(*lpFromlen,*lpFromlen) struct sockaddr FAR *lpFrom, + _Inout_opt_ LPINT lpFromlen, + _Inout_opt_ LPWSAOVERLAPPED lpOverlapped, + _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine); typedef BOOL (WSAAPI *LPFN_WSARESETEVENT)( - IN WSAEVENT hEvent); + _In_ WSAEVENT hEvent); typedef int (WSAAPI *LPFN_WSASEND)( - IN SOCKET s, - IN LPWSABUF lpBuffers, - IN DWORD dwBufferCount, - OUT LPDWORD lpNumberOfBytesSent OPTIONAL, - IN DWORD dwFlags, - IN OUT LPWSAOVERLAPPED lpOverlapped OPTIONAL, - IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine OPTIONAL); + _In_ SOCKET s, + _In_reads_(dwBufferCount) LPWSABUF lpBuffers, + _In_ DWORD dwBufferCount, + _Out_opt_ LPDWORD lpNumberOfBytesSent, + _In_ DWORD dwFlags, + _Inout_opt_ LPWSAOVERLAPPED lpOverlapped, + _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine); typedef int (WSAAPI *LPFN_WSASENDDISCONNECT)( - IN SOCKET s, - IN LPWSABUF lpOutboundDisconnectData OPTIONAL); + _In_ SOCKET s, + _In_opt_ LPWSABUF lpOutboundDisconnectData); typedef int (WSAAPI *LPFN_WSASENDTO)( - IN SOCKET s, - IN LPWSABUF lpBuffers, - IN DWORD dwBufferCount, - OUT LPDWORD lpNumberOfBytesSent OPTIONAL, - IN DWORD dwFlags, - IN const struct sockaddr FAR *lpTo, - IN int iTolen, - IN OUT LPWSAOVERLAPPED lpOverlapped OPTIONAL, - IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine OPTIONAL); + _In_ SOCKET s, + _In_reads_(dwBufferCount) LPWSABUF lpBuffers, + _In_ DWORD dwBufferCount, + _Out_opt_ LPDWORD lpNumberOfBytesSent, + _In_ DWORD dwFlags, + _In_reads_bytes_opt_(iTolen) const struct sockaddr FAR *lpTo, + _In_ int iTolen, + _Inout_opt_ LPWSAOVERLAPPED lpOverlapped, + _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine); typedef BOOL (WSAAPI *LPFN_WSASETEVENT)( - IN WSAEVENT hEvent); - + _In_ WSAEVENT hEvent); + +_Must_inspect_result_ typedef SOCKET (WSAAPI *LPFN_WSASOCKETA)( - IN int af, - IN int type, - IN int protocol, - IN LPWSAPROTOCOL_INFOA lpProtocolInfo OPTIONAL, - IN GROUP g, - IN DWORD dwFlags); - + _In_ int af, + _In_ int type, + _In_ int protocol, + _In_opt_ LPWSAPROTOCOL_INFOA lpProtocolInfo, + _In_ GROUP g, + _In_ DWORD dwFlags); + +_Must_inspect_result_ typedef SOCKET (WSAAPI *LPFN_WSASOCKETW)( - IN int af, - IN int type, - IN int protocol, - IN LPWSAPROTOCOL_INFOW lpProtocolInfo OPTIONAL, - IN GROUP g, - IN DWORD dwFlags); + _In_ int af, + _In_ int type, + _In_ int protocol, + _In_opt_ LPWSAPROTOCOL_INFOW lpProtocolInfo, + _In_ GROUP g, + _In_ DWORD dwFlags); #ifdef UNICODE #define LPFN_WSASOCKET LPFN_WSASOCKETW @@ -1495,27 +1506,27 @@ typedef DWORD (WSAAPI *LPFN_WSAWAITFORMULTIPLEEVENTS)( - IN DWORD cEvents, - IN const WSAEVENT FAR *lphEvents, - IN BOOL fWaitAll, - IN DWORD dwTimeout, - IN BOOL fAlertable); + _In_ DWORD cEvents, + _In_reads_(cEvents) const WSAEVENT FAR *lphEvents, + _In_ BOOL fWaitAll, + _In_ DWORD dwTimeout, + _In_ BOOL fAlertable); typedef INT (WSAAPI *LPFN_WSAADDRESSTOSTRINGA)( - IN LPSOCKADDR lpsaAddress, - IN DWORD dwAddressLength, - IN LPWSAPROTOCOL_INFOA lpProtocolInfo OPTIONAL, - OUT LPSTR lpszAddressString, - IN OUT LPDWORD lpdwAddressStringLength); + _In_reads_bytes_(dwAddressLength) LPSOCKADDR lpsaAddress, + _In_ DWORD dwAddressLength, + _In_opt_ LPWSAPROTOCOL_INFOA lpProtocolInfo, + _Out_writes_to_(*lpdwAddressStringLength,*lpdwAddressStringLength) LPSTR lpszAddressString, + _Inout_ LPDWORD lpdwAddressStringLength); typedef INT (WSAAPI *LPFN_WSAADDRESSTOSTRINGW)( - IN LPSOCKADDR lpsaAddress, - IN DWORD dwAddressLength, - IN LPWSAPROTOCOL_INFOW lpProtocolInfo OPTIONAL, - OUT LPWSTR lpszAddressString, - IN OUT LPDWORD lpdwAddressStringLength); + _In_reads_bytes_(dwAddressLength) LPSOCKADDR lpsaAddress, + _In_ DWORD dwAddressLength, + _In_opt_ LPWSAPROTOCOL_INFOW lpProtocolInfo, + _Out_writes_to_(*lpdwAddressStringLength,*lpdwAddressStringLength) LPWSTR lpszAddressString, + _Inout_ LPDWORD lpdwAddressStringLength); #ifdef UNICODE #define LPFN_WSAADDRESSTOSTRING LPFN_WSAADDRESSTOSTRINGW @@ -1525,19 +1536,19 @@ typedef INT (WSAAPI *LPFN_WSASTRINGTOADDRESSA)( - IN LPSTR AddressString, - IN INT AddressFamily, - IN LPWSAPROTOCOL_INFOA lpProtocolInfo OPTIONAL, - OUT LPSOCKADDR lpAddress, - IN OUT LPINT lpAddressLength); + _In_ LPSTR AddressString, + _In_ INT AddressFamily, + _In_opt_ LPWSAPROTOCOL_INFOA lpProtocolInfo, + _Out_writes_bytes_to_(*lpAddressLength,*lpAddressLength) LPSOCKADDR lpAddress, + _Inout_ LPINT lpAddressLength); typedef INT (WSAAPI *LPFN_WSASTRINGTOADDRESSW)( - IN LPWSTR AddressString, - IN INT AddressFamily, - IN LPWSAPROTOCOL_INFOW lpProtocolInfo OPTIONAL, - OUT LPSOCKADDR lpAddress, - IN OUT LPINT lpAddressLength); + _In_ LPWSTR AddressString, + _In_ INT AddressFamily, + _In_opt_ LPWSAPROTOCOL_INFOW lpProtocolInfo, + _Out_writes_bytes_to_(*lpAddressLength,*lpAddressLength) LPSOCKADDR lpAddress, + _Inout_ LPINT lpAddressLength); #ifdef UNICODE #define LPFN_WSASTRINGTOADDRESS LPFN_WSASTRINGTOADDRESSW @@ -1547,15 +1558,15 @@ typedef INT (WSAAPI *LPFN_WSALOOKUPSERVICEBEGINA)( - IN LPWSAQUERYSETA lpqsRestrictions, - IN DWORD dwControlFlags, - OUT LPHANDLE lphLookup); + _In_ LPWSAQUERYSETA lpqsRestrictions, + _In_ DWORD dwControlFlags, + _Out_ LPHANDLE lphLookup); typedef INT (WSAAPI *LPFN_WSALOOKUPSERVICEBEGINW)( - IN LPWSAQUERYSETW lpqsRestrictions, - IN DWORD dwControlFlags, - OUT LPHANDLE lphLookup); + _In_ LPWSAQUERYSETW lpqsRestrictions, + _In_ DWORD dwControlFlags, + _Out_ LPHANDLE lphLookup); #ifdef UNICODE #define LPFN_WSALOOKUPSERVICEBEGIN LPFN_WSALOOKUPSERVICEBEGINW @@ -1565,17 +1576,17 @@ typedef INT (WSAAPI *LPFN_WSALOOKUPSERVICENEXTA)( - IN HANDLE hLookup, - IN DWORD dwControlFlags, - IN OUT LPDWORD lpdwBufferLength, - OUT LPWSAQUERYSETA lpqsResults); + _In_ HANDLE hLookup, + _In_ DWORD dwControlFlags, + _Inout_ LPDWORD lpdwBufferLength, + _Out_writes_bytes_to_(*lpdwBufferLength,*lpdwBufferLength) LPWSAQUERYSETA lpqsResults); typedef INT (WSAAPI *LPFN_WSALOOKUPSERVICENEXTW)( - IN HANDLE hLookup, - IN DWORD dwControlFlags, - IN OUT LPDWORD lpdwBufferLength, - OUT LPWSAQUERYSETW lpqsResults OPTIONAL); + _In_ HANDLE hLookup, + _In_ DWORD dwControlFlags, + _Inout_ LPDWORD lpdwBufferLength, + _Out_writes_bytes_to_opt_(*lpdwBufferLength,*lpdwBufferLength) LPWSAQUERYSETW lpqsResults); #ifdef UNICODE #define LPFN_WSALOOKUPSERVICENEXT LPFN_WSALOOKUPSERVICENEXTW @@ -1585,15 +1596,15 @@ typedef INT (WSAAPI *LPFN_WSALOOKUPSERVICEEND)( - IN HANDLE hLookup); + _In_ HANDLE hLookup); typedef INT (WSAAPI *LPFN_WSAINSTALLSERVICECLASSA)( - IN LPWSASERVICECLASSINFOA lpServiceClassInfo); + _In_ LPWSASERVICECLASSINFOA lpServiceClassInfo); typedef INT (WSAAPI *LPFN_WSAINSTALLSERVICECLASSW)( - IN LPWSASERVICECLASSINFOW lpServiceClassInfo); + _In_ LPWSASERVICECLASSINFOW lpServiceClassInfo); #ifdef UNICODE #define LPFN_WSAINSTALLSERVICECLASS LPFN_WSAINSTALLSERVICECLASSW @@ -1603,21 +1614,21 @@ typedef INT (WSAAPI *LPFN_WSAREMOVESERVICECLASS)( - IN LPGUID lpServiceClassId); + _In_ LPGUID lpServiceClassId); typedef INT (WSAAPI *LPFN_WSAGETSERVICECLASSINFOA)( - IN LPGUID lpProviderId, - IN LPGUID lpServiceClassId, - IN OUT LPDWORD lpdwBufSize, - OUT LPWSASERVICECLASSINFOA lpServiceClassInfo); + _In_ LPGUID lpProviderId, + _In_ LPGUID lpServiceClassId, + _Inout_ LPDWORD lpdwBufSize, + _Out_writes_bytes_to_(*lpdwBufSize,*lpdwBufSize) LPWSASERVICECLASSINFOA lpServiceClassInfo); typedef INT (WSAAPI *LPFN_WSAGETSERVICECLASSINFOW)( - IN LPGUID lpProviderId, - IN LPGUID lpServiceClassId, - IN OUT LPDWORD lpdwBufSize, - OUT LPWSASERVICECLASSINFOW lpServiceClassInfo); + _In_ LPGUID lpProviderId, + _In_ LPGUID lpServiceClassId, + _Inout_ LPDWORD lpdwBufSize, + _Out_writes_bytes_to_(*lpdwBufSize,*lpdwBufSize) LPWSASERVICECLASSINFOW lpServiceClassInfo); #ifdef UNICODE #define LPFN_WSAGETSERVICECLASSINFO LPFN_WSAGETSERVICECLASSINFOW @@ -1627,13 +1638,13 @@ typedef INT (WSAAPI *LPFN_WSAENUMNAMESPACEPROVIDERSA)( - IN OUT LPDWORD lpdwBufferLength, - OUT LPWSANAMESPACE_INFOA lpnspBuffer); + _Inout_ LPDWORD lpdwBufferLength, + _Out_writes_bytes_to_(*lpdwBufferLength,*lpdwBufferLength) LPWSANAMESPACE_INFOA lpnspBuffer); typedef INT (WSAAPI *LPFN_WSAENUMNAMESPACEPROVIDERSW)( - IN OUT LPDWORD lpdwBufferLength, - OUT LPWSANAMESPACE_INFOW lpnspBuffer); + _Inout_ LPDWORD lpdwBufferLength, + _Out_writes_bytes_to_(*lpdwBufferLength,*lpdwBufferLength) LPWSANAMESPACE_INFOW lpnspBuffer); #ifdef UNICODE #define LPFN_WSAENUMNAMESPACEPROVIDERS LPFN_WSAENUMNAMESPACEPROVIDERSW @@ -1643,15 +1654,15 @@ typedef INT (WSAAPI *LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDA)( - IN LPGUID lpServiceClassId, - OUT LPSTR lpszServiceClassName, - IN OUT LPDWORD lpdwBufferLength); + _In_ LPGUID lpServiceClassId, + _Out_writes_bytes_to_(*lpdwBufferLength,*lpdwBufferLength) LPSTR lpszServiceClassName, + _Inout_ LPDWORD lpdwBufferLength); typedef INT (WSAAPI *LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDW)( - IN LPGUID lpServiceClassId, - OUT LPWSTR lpszServiceClassName, - IN OUT LPDWORD lpdwBufferLength); + _In_ LPGUID lpServiceClassId, + _Out_writes_bytes_to_(*lpdwBufferLength,*lpdwBufferLength) LPWSTR lpszServiceClassName, + _Inout_ LPDWORD lpdwBufferLength); #ifdef UNICODE #define LPFN_WSAGETSERVICECLASSNAMEBYCLASSID LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDW @@ -1661,15 +1672,15 @@ typedef INT (WSAAPI *LPFN_WSASETSERVICEA)( - IN LPWSAQUERYSETA lpqsRegInfo, - IN WSAESETSERVICEOP essoperation, - IN DWORD dwControlFlags); + _In_ LPWSAQUERYSETA lpqsRegInfo, + _In_ WSAESETSERVICEOP essoperation, + _In_ DWORD dwControlFlags); typedef INT (WSAAPI *LPFN_WSASETSERVICEW)( - IN LPWSAQUERYSETW lpqsRegInfo, - IN WSAESETSERVICEOP essoperation, - IN DWORD dwControlFlags); + _In_ LPWSAQUERYSETW lpqsRegInfo, + _In_ WSAESETSERVICEOP essoperation, + _In_ DWORD dwControlFlags); #ifdef UNICODE #define LPFN_WSASETSERVICE LPFN_WSASETSERVICEW @@ -1679,34 +1690,34 @@ typedef INT (WSAAPI *LPFN_WSAPROVIDERCONFIGCHANGE)( - IN OUT LPHANDLE lpNotificationHandle OPTIONAL, - IN OUT LPWSAOVERLAPPED lpOverlapped OPTIONAL, - IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine OPTIONAL); + _Inout_ LPHANDLE lpNotificationHandle, + _Inout_opt_ LPWSAOVERLAPPED lpOverlapped, + _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine); #if(_WIN32_WINNT >= 0x0501) typedef INT (WSAAPI *LPFN_WSANSPIOCTL)( - IN HANDLE hLookup, - IN DWORD dwControlCode, - IN LPVOID lpvInBuffer OPTIONAL, - IN DWORD cbInBuffer, - OUT LPVOID lpvOutBuffer OPTIONAL, - IN DWORD cbOutBuffer, - OUT LPDWORD lpcbBytesReturned, - IN LPWSACOMPLETION lpCompletion OPTIONAL); + _In_ HANDLE hLookup, + _In_ DWORD dwControlCode, + _In_reads_bytes_opt_(cbInBuffer) LPVOID lpvInBuffer, + _In_ DWORD cbInBuffer, + _Out_writes_bytes_to_opt_(cbOutBuffer, *lpcbBytesReturned) LPVOID lpvOutBuffer, + _In_ DWORD cbOutBuffer, + _Out_ LPDWORD lpcbBytesReturned, + _In_opt_ LPWSACOMPLETION lpCompletion); #endif /* (_WIN32_WINNT >= 0x0501) */ #if (_WIN32_WINNT >= 0x0600) typedef INT (WSAAPI *LPFN_WSAENUMNAMESPACEPROVIDERSEXA)( - IN OUT LPDWORD lpdwBufferLength, - OUT LPWSANAMESPACE_INFOEXA lpnspBuffer); + _Inout_ LPDWORD lpdwBufferLength, + _Out_writes_bytes_to_(*lpdwBufferLength,*lpdwBufferLength) LPWSANAMESPACE_INFOEXA lpnspBuffer); typedef INT (WSAAPI *LPFN_WSAENUMNAMESPACEPROVIDERSEXW)( - IN OUT LPDWORD lpdwBufferLength, - OUT LPWSANAMESPACE_INFOEXW lpnspBuffer); + _Inout_ LPDWORD lpdwBufferLength, + _Out_writes_bytes_to_(*lpdwBufferLength,*lpdwBufferLength) LPWSANAMESPACE_INFOEXW lpnspBuffer); #ifdef UNICODE #define LPFN_WSAENUMNAMESPACEPROVIDERSEX LPFN_WSAENUMNAMESPACEPROVIDERSEXW @@ -1720,69 +1731,70 @@ #if INCL_WINSOCK_API_PROTOTYPES +_Must_inspect_result_ WINSOCK_API_LINKAGE SOCKET WSAAPI accept( - IN SOCKET s, - OUT struct sockaddr FAR *addr OPTIONAL, - IN OUT int FAR *addrlen OPTIONAL); + _In_ SOCKET s, + _Out_writes_bytes_opt_(*addrlen) struct sockaddr FAR *addr, + _Inout_opt_ int FAR *addrlen); WINSOCK_API_LINKAGE int WSAAPI bind( - IN SOCKET s, - IN const struct sockaddr FAR *addr, - IN int namelen); + _In_ SOCKET s, + _In_reads_bytes_(namelen) const struct sockaddr FAR *addr, + _In_ int namelen); WINSOCK_API_LINKAGE int WSAAPI closesocket( - IN SOCKET s); + _In_ SOCKET s); WINSOCK_API_LINKAGE int WSAAPI connect( - IN SOCKET s, - IN const struct sockaddr FAR *name, - IN int namelen); + _In_ SOCKET s, + _In_reads_bytes_(namelen) const struct sockaddr FAR *name, + _In_ int namelen); WINSOCK_API_LINKAGE int WSAAPI ioctlsocket( - IN SOCKET s, - IN long cmd, - IN OUT u_long FAR *argp); + _In_ SOCKET s, + _In_ long cmd, + _Inout_ u_long FAR *argp); WINSOCK_API_LINKAGE int WSAAPI getpeername( - IN SOCKET s, - OUT struct sockaddr FAR *name, - IN OUT int FAR *namelen); + _In_ SOCKET s, + _Out_writes_bytes_to_(*namelen,*namelen) struct sockaddr FAR *name, + _Inout_ int FAR *namelen); WINSOCK_API_LINKAGE int WSAAPI getsockname( - IN SOCKET s, - OUT struct sockaddr FAR *name, - IN OUT int FAR *namelen); + _In_ SOCKET s, + _Out_writes_bytes_to_(*namelen,*namelen) struct sockaddr FAR *name, + _Inout_ int FAR *namelen); WINSOCK_API_LINKAGE int WSAAPI getsockopt( - IN SOCKET s, - IN int level, - IN int optname, - OUT char FAR *optval, - IN OUT int FAR *optlen); + _In_ SOCKET s, + _In_ int level, + _In_ int optname, + _Out_writes_bytes_(*optlen) char FAR *optval, + _Inout_ int FAR *optlen); WINSOCK_API_LINKAGE u_long @@ -1794,167 +1806,169 @@ u_short WSAAPI htons( - IN u_short hostshort); + _In_ u_short hostshort); WINSOCK_API_LINKAGE unsigned long WSAAPI inet_addr( - IN const char FAR *cp); + _In_z_ const char FAR *cp); WINSOCK_API_LINKAGE char FAR * WSAAPI inet_ntoa( - IN struct in_addr in); + _In_ struct in_addr in); WINSOCK_API_LINKAGE int WSAAPI listen( - IN SOCKET s, - IN int backlog); + _In_ SOCKET s, + _In_ int backlog); WINSOCK_API_LINKAGE u_long WSAAPI ntohl( - IN u_long netlong); + _In_ u_long netlong); WINSOCK_API_LINKAGE u_short WSAAPI ntohs( - IN u_short netshort); + _In_ u_short netshort); WINSOCK_API_LINKAGE int WSAAPI recv( - IN SOCKET s, - OUT char FAR *buf, - IN int len, - IN int flags); + _In_ SOCKET s, + _Out_writes_bytes_to_(len, return) __out_data_source(NETWORK) char FAR *buf, + _In_ int len, + _In_ int flags); WINSOCK_API_LINKAGE int WSAAPI recvfrom( - IN SOCKET s, - OUT char FAR *buf, - IN int len, - IN int flags, - OUT struct sockaddr FAR *from OPTIONAL, - IN OUT int FAR *fromlen OPTIONAL); + _In_ SOCKET s, + _Out_writes_bytes_to_(len, return) __out_data_source(NETWORK) char FAR *buf, + _In_ int len, + _In_ int flags, + _Out_writes_bytes_to_opt_(*fromlen, *fromlen) struct sockaddr FAR *from, + _Inout_opt_ int FAR *fromlen); WINSOCK_API_LINKAGE int WSAAPI select( - IN int nfds, - IN OUT fd_set FAR *readfds OPTIONAL, - IN OUT fd_set FAR *writefds OPTIONAL, - IN OUT fd_set FAR *exceptfds OPTIONAL, - IN const struct timeval FAR *timeout OPTIONAL); + _In_ int nfds, + _Inout_opt_ fd_set FAR *readfds, + _Inout_opt_ fd_set FAR *writefds, + _Inout_opt_ fd_set FAR *exceptfds, + _In_opt_ const struct timeval FAR *timeout); WINSOCK_API_LINKAGE int WSAAPI send( - IN SOCKET s, - IN const char FAR *buf, - IN int len, - IN int flags); + _In_ SOCKET s, + _In_reads_bytes_(len) const char FAR *buf, + _In_ int len, + _In_ int flags); WINSOCK_API_LINKAGE int WSAAPI sendto( - IN SOCKET s, - IN const char FAR *buf, - IN int len, - IN int flags, - IN const struct sockaddr FAR *to OPTIONAL, - IN int tolen); + _In_ SOCKET s, + _In_reads_bytes_(len) const char FAR *buf, + _In_ int len, + _In_ int flags, + _In_reads_bytes_(tolen) const struct sockaddr FAR *to, + _In_ int tolen); WINSOCK_API_LINKAGE int WSAAPI setsockopt( - IN SOCKET s, - IN int level, - IN int optname, - IN const char FAR *optval OPTIONAL, - IN int optlen); + _In_ SOCKET s, + _In_ int level, + _In_ int optname, + _In_reads_bytes_opt_(optlen) const char FAR *optval, + _In_ int optlen); WINSOCK_API_LINKAGE int WSAAPI shutdown( - IN SOCKET s, - IN int how); - + _In_ SOCKET s, + _In_ int how); + +_Must_inspect_result_ WINSOCK_API_LINKAGE SOCKET WSAAPI socket( - IN int af, - IN int type, - IN int protocol); + _In_ int af, + _In_ int type, + _In_ int protocol); WINSOCK_API_LINKAGE struct hostent FAR * WSAAPI gethostbyaddr( - IN const char FAR *addr, - IN int len, - IN int type); + _In_reads_bytes_(len) const char FAR *addr, + _In_ int len, + _In_ int type); WINSOCK_API_LINKAGE struct hostent FAR * WSAAPI gethostbyname( - IN const char FAR *name); + _In_z_ const char FAR *name); WINSOCK_API_LINKAGE int WSAAPI gethostname( - OUT char FAR *name, - IN int namelen); + _Out_writes_bytes_(namelen) char FAR *name, + _In_ int namelen); WINSOCK_API_LINKAGE struct servent FAR * WSAAPI getservbyport( - IN int port, - IN const char FAR *proto); + _In_ int port, + _In_opt_z_ const char FAR *proto); WINSOCK_API_LINKAGE struct servent FAR * WSAAPI getservbyname( - IN const char FAR *name, - IN const char FAR *proto); + _In_z_ const char FAR *name, + _In_opt_z_ const char FAR *proto); WINSOCK_API_LINKAGE struct protoent FAR * WSAAPI getprotobynumber( - IN int number); + _In_ int number); WINSOCK_API_LINKAGE struct protoent FAR * WSAAPI getprotobyname( - IN const char FAR *name); - + _In_z_ const char FAR *name); + +_Must_inspect_result_ WINSOCK_API_LINKAGE int WSAAPI WSAStartup( - IN WORD wVersionRequired, - OUT LPWSADATA lpWSAData); + _In_ WORD wVersionRequired, + _Out_ LPWSADATA lpWSAData); WINSOCK_API_LINKAGE int @@ -1965,7 +1979,7 @@ void WSAAPI WSASetLastError( - IN int iError); + _In_ int iError); WINSOCK_API_LINKAGE int @@ -1986,7 +2000,7 @@ FARPROC WSAAPI WSASetBlockingHook( - IN FARPROC lpBlockFunc); + _In_ FARPROC lpBlockFunc); WINSOCK_API_LINKAGE int @@ -1997,108 +2011,109 @@ HANDLE WSAAPI WSAAsyncGetServByName( - IN HWND hWnd, - IN u_int wMsg, - IN const char FAR *name, - IN const char FAR *proto, - OUT char FAR *buf, - IN int buflen); + _In_ HWND hWnd, + _In_ u_int wMsg, + _In_z_ const char FAR *name, + _In_z_ const char FAR *proto, + _Out_writes_bytes_(buflen) char FAR *buf, + _In_ int buflen); WINSOCK_API_LINKAGE HANDLE WSAAPI WSAAsyncGetServByPort( - IN HWND hWnd, - IN u_int wMsg, - IN int port, - IN const char FAR *proto, - OUT char FAR *buf, - IN int buflen); + _In_ HWND hWnd, + _In_ u_int wMsg, + _In_ int port, + _In_ const char FAR *proto, + _Out_writes_bytes_(buflen) char FAR *buf, + _In_ int buflen); WINSOCK_API_LINKAGE HANDLE WSAAPI WSAAsyncGetProtoByName( - IN HWND hWnd, - IN u_int wMsg, - IN const char FAR *name, - OUT char FAR *buf, - IN int buflen); + _In_ HWND hWnd, + _In_ u_int wMsg, + _In_z_ const char FAR *name, + _Out_writes_bytes_(buflen) char FAR *buf, + _In_ int buflen); WINSOCK_API_LINKAGE HANDLE WSAAPI WSAAsyncGetProtoByNumber( - IN HWND hWnd, - IN u_int wMsg, - IN int number, - OUT char FAR *buf, - IN int buflen); + _In_ HWND hWnd, + _In_ u_int wMsg, + _In_ int number, + _Out_writes_bytes_(buflen) char FAR *buf, + _In_ int buflen); WINSOCK_API_LINKAGE HANDLE WSAAPI WSAAsyncGetHostByName( - IN HWND hWnd, - IN u_int wMsg, - IN const char FAR *name, - OUT char FAR *buf, - IN int buflen); + _In_ HWND hWnd, + _In_ u_int wMsg, + _In_z_ const char FAR *name, + _Out_writes_bytes_(buflen) char FAR *buf, + _In_ int buflen); WINSOCK_API_LINKAGE HANDLE WSAAPI WSAAsyncGetHostByAddr( - IN HWND hWnd, - IN u_int wMsg, - IN const char FAR *addr, - IN int len, - IN int type, - OUT char FAR *buf, - IN int buflen); + _In_ HWND hWnd, + _In_ u_int wMsg, + _In_reads_bytes_(len) const char FAR *addr, + _In_ int len, + _In_ int type, + _Out_writes_bytes_(buflen) char FAR *buf, + _In_ int buflen); WINSOCK_API_LINKAGE int WSAAPI WSACancelAsyncRequest( - IN HANDLE hAsyncTaskHandle); + _In_ HANDLE hAsyncTaskHandle); WINSOCK_API_LINKAGE int WSAAPI WSAAsyncSelect( - IN SOCKET s, - IN HWND hWnd, - IN u_int wMsg, - IN long lEvent); - + _In_ SOCKET s, + _In_ HWND hWnd, + _In_ u_int wMsg, + _In_ long lEvent); + +_Must_inspect_result_ WINSOCK_API_LINKAGE SOCKET WSAAPI WSAAccept( - IN SOCKET s, - OUT struct sockaddr FAR *addr OPTIONAL, - IN OUT LPINT addrlen OPTIONAL, - IN LPCONDITIONPROC lpfnCondition OPTIONAL, - IN DWORD_PTR dwCallbackData OPTIONAL); + _In_ SOCKET s, + _Out_writes_bytes_to_opt_(*addrlen,*addrlen) struct sockaddr FAR *addr, + _Inout_opt_ LPINT addrlen, + _In_opt_ LPCONDITIONPROC lpfnCondition, + _In_opt_ DWORD_PTR dwCallbackData); WINSOCK_API_LINKAGE BOOL WSAAPI WSACloseEvent( - IN WSAEVENT hEvent); + _In_ WSAEVENT hEvent); WINSOCK_API_LINKAGE int WSAAPI WSAConnect( - IN SOCKET s, - IN const struct sockaddr FAR *name, - IN int namelen, - IN LPWSABUF lpCallerData OPTIONAL, - OUT LPWSABUF lpCalleeData OPTIONAL, - IN LPQOS lpSQOS OPTIONAL, - IN LPQOS lpGQOS OPTIONAL); + _In_ SOCKET s, + _In_reads_bytes_(namelen) const struct sockaddr FAR *name, + _In_ int namelen, + _In_opt_ LPWSABUF lpCallerData, + _Out_opt_ LPWSABUF lpCalleeData, + _In_opt_ LPQOS lpSQOS, + _In_opt_ LPQOS lpGQOS); #ifdef UNICODE #define WSAConnectByName WSAConnectByNameW @@ -2109,40 +2124,40 @@ BOOL PASCAL WSAConnectByNameW( - IN SOCKET s, - IN LPWSTR nodename, - IN LPWSTR servicename, - IN OUT LPDWORD LocalAddressLength, - OUT LPSOCKADDR LocalAddress, - IN OUT LPDWORD RemoteAddressLength, - OUT LPSOCKADDR RemoteAddress, - IN const struct timeval *timeout, - IN LPWSAOVERLAPPED Reserved OPTIONAL); + _In_ SOCKET s, + _In_ LPWSTR nodename, + _In_ LPWSTR servicename, + _Inout_opt_ LPDWORD LocalAddressLength, + _Out_writes_bytes_to_opt_(*LocalAddressLength,*LocalAddressLength) LPSOCKADDR LocalAddress, + _Inout_opt_ LPDWORD RemoteAddressLength, + _Out_writes_bytes_to_opt_(*RemoteAddressLength,*RemoteAddressLength) LPSOCKADDR RemoteAddress, + _In_opt_ const struct timeval *timeout, + _Reserved_ LPWSAOVERLAPPED Reserved); BOOL PASCAL WSAConnectByNameA( - IN SOCKET s, - IN LPCSTR nodename, - IN LPCSTR servicename, - IN OUT LPDWORD LocalAddressLength, - OUT LPSOCKADDR LocalAddress, - IN OUT LPDWORD RemoteAddressLength, - OUT LPSOCKADDR RemoteAddress, - IN const struct timeval *timeout, - IN LPWSAOVERLAPPED Reserved OPTIONAL); + _In_ SOCKET s, + _In_ LPCSTR nodename, + _In_ LPCSTR servicename, + _Inout_opt_ LPDWORD LocalAddressLength, + _Out_writes_bytes_to_opt_(*LocalAddressLength,*LocalAddressLength) LPSOCKADDR LocalAddress, + _Inout_opt_ LPDWORD RemoteAddressLength, + _Out_writes_bytes_to_opt_(*RemoteAddressLength,*RemoteAddressLength) LPSOCKADDR RemoteAddress, + _In_opt_ const struct timeval *timeout, + _Reserved_ LPWSAOVERLAPPED Reserved); BOOL PASCAL WSAConnectByList( - IN SOCKET s, - IN PSOCKET_ADDRESS_LIST SocketAddress, - IN OUT LPDWORD LocalAddressLength, - OUT LPSOCKADDR LocalAddress, - IN OUT LPDWORD RemoteAddressLength, - OUT LPSOCKADDR RemoteAddress, - IN const struct timeval *timeout, - IN LPWSAOVERLAPPED Reserved OPTIONAL); + _In_ SOCKET s, + _In_ PSOCKET_ADDRESS_LIST SocketAddress, + _Inout_opt_ LPDWORD LocalAddressLength, + _Out_writes_bytes_to_opt_(*LocalAddressLength,*LocalAddressLength) LPSOCKADDR LocalAddress, + _Inout_opt_ LPDWORD RemoteAddressLength, + _Out_writes_bytes_to_opt_(*RemoteAddressLength,*RemoteAddressLength) LPSOCKADDR RemoteAddress, + _In_opt_ const struct timeval *timeout, + _Reserved_ LPWSAOVERLAPPED Reserved); WINSOCK_API_LINKAGE WSAEVENT @@ -2153,17 +2168,17 @@ int WSAAPI WSADuplicateSocketA( - IN SOCKET s, - IN DWORD dwProcessId, - OUT LPWSAPROTOCOL_INFOA lpProtocolInfo); + _In_ SOCKET s, + _In_ DWORD dwProcessId, + _Out_ LPWSAPROTOCOL_INFOA lpProtocolInfo); WINSOCK_API_LINKAGE int WSAAPI WSADuplicateSocketW( - IN SOCKET s, - IN DWORD dwProcessId, - OUT LPWSAPROTOCOL_INFOW lpProtocolInfo); + _In_ SOCKET s, + _In_ DWORD dwProcessId, + _Out_ LPWSAPROTOCOL_INFOW lpProtocolInfo); #ifdef UNICODE #define WSADuplicateSocket WSADuplicateSocketW @@ -2175,25 +2190,25 @@ int WSAAPI WSAEnumNetworkEvents( - IN SOCKET s, - IN WSAEVENT hEventObject, - OUT LPWSANETWORKEVENTS lpNetworkEvents); + _In_ SOCKET s, + _In_ WSAEVENT hEventObject, + _Out_ LPWSANETWORKEVENTS lpNetworkEvents); WINSOCK_API_LINKAGE int WSAAPI WSAEnumProtocolsA( - IN LPINT lpiProtocols OPTIONAL, - OUT LPWSAPROTOCOL_INFOA lpProtocolBuffer OPTIONAL, - IN OUT LPDWORD lpdwBufferLength); + _In_opt_ LPINT lpiProtocols, + _Out_writes_bytes_to_opt_(*lpdwBufferLength,*lpdwBufferLength) LPWSAPROTOCOL_INFOA lpProtocolBuffer, + _Inout_ LPDWORD lpdwBufferLength); WINSOCK_API_LINKAGE int WSAAPI WSAEnumProtocolsW( - IN LPINT lpiProtocols OPTIONAL, - OUT LPWSAPROTOCOL_INFOW lpProtocolBuffer OPTIONAL, - IN OUT LPDWORD lpdwBufferLength); + _In_opt_ LPINT lpiProtocols, + _Out_writes_bytes_to_opt_(*lpdwBufferLength,*lpdwBufferLength) LPWSAPROTOCOL_INFOW lpProtocolBuffer, + _Inout_ LPDWORD lpdwBufferLength); #ifdef UNICODE #define WSAEnumProtocols WSAEnumProtocolsW @@ -2205,186 +2220,188 @@ int WSAAPI WSAEventSelect( - IN SOCKET s, - IN WSAEVENT hEventObject, - IN long lNetworkEvents); + _In_ SOCKET s, + _In_opt_ WSAEVENT hEventObject, + _In_ long lNetworkEvents); WINSOCK_API_LINKAGE BOOL WSAAPI WSAGetOverlappedResult( - IN SOCKET s, - IN LPWSAOVERLAPPED lpOverlapped, - OUT LPDWORD lpcbTransfer, - IN BOOL fWait, - OUT LPDWORD lpdwFlags); + _In_ SOCKET s, + _In_ LPWSAOVERLAPPED lpOverlapped, + _Out_ LPDWORD lpcbTransfer, + _In_ BOOL fWait, + _Out_ LPDWORD lpdwFlags); WINSOCK_API_LINKAGE BOOL WSAAPI WSAGetQOSByName( - IN SOCKET s, - IN LPWSABUF lpQOSName, - OUT LPQOS lpQOS); + _In_ SOCKET s, + _In_ LPWSABUF lpQOSName, + _Out_ LPQOS lpQOS); WINSOCK_API_LINKAGE int WSAAPI WSAHtonl( - IN SOCKET s, - IN u_long hostlong, - OUT u_long FAR *lpnetlong); + _In_ SOCKET s, + _In_ u_long hostlong, + _Out_ u_long FAR *lpnetlong); WINSOCK_API_LINKAGE int WSAAPI WSAHtons( - IN SOCKET s, - IN u_short hostshort, - OUT u_short FAR *lpnetshort); + _In_ SOCKET s, + _In_ u_short hostshort, + _Out_ u_short FAR *lpnetshort); WINSOCK_API_LINKAGE int WSAAPI WSAIoctl( - IN SOCKET s, - IN DWORD dwIoControlCode, - IN LPVOID lpvInBuffer OPTIONAL, - IN DWORD cbInBuffer, - OUT LPVOID lpvOutBuffer OPTIONAL, - IN DWORD cbOutBuffer, - OUT LPDWORD lpcbBytesReturned, - IN OUT LPWSAOVERLAPPED lpOverlapped OPTIONAL, - IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine OPTIONAL); + _In_ SOCKET s, + _In_ DWORD dwIoControlCode, + _In_reads_bytes_opt_(cbInBuffer) LPVOID lpvInBuffer, + _In_ DWORD cbInBuffer, + _Out_writes_bytes_to_opt_(cbOutBuffer, *lpcbBytesReturned) LPVOID lpvOutBuffer, + _In_ DWORD cbOutBuffer, + _Out_ LPDWORD lpcbBytesReturned, + _Inout_opt_ LPWSAOVERLAPPED lpOverlapped, + _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine); WINSOCK_API_LINKAGE SOCKET WSAAPI WSAJoinLeaf( - IN SOCKET s, - IN const struct sockaddr FAR *name, - IN int namelen, - IN LPWSABUF lpCallerData OPTIONAL, - OUT LPWSABUF lpCalleeData OPTIONAL, - IN LPQOS lpSQOS OPTIONAL, - IN LPQOS lpGQOS OPTIONAL, - IN DWORD dwFlags); + _In_ SOCKET s, + _In_reads_bytes_(namelen) const struct sockaddr FAR *name, + _In_ int namelen, + _In_opt_ LPWSABUF lpCallerData, + _Out_opt_ LPWSABUF lpCalleeData, + _In_opt_ LPQOS lpSQOS, + _In_opt_ LPQOS lpGQOS, + _In_ DWORD dwFlags); WINSOCK_API_LINKAGE int WSAAPI WSANtohl( - IN SOCKET s, - IN u_long netlong, - OUT u_long FAR *lphostlong); + _In_ SOCKET s, + _In_ u_long netlong, + _Out_ u_long FAR *lphostlong); WINSOCK_API_LINKAGE int WSAAPI WSANtohs( - IN SOCKET s, - IN u_short netshort, - OUT u_short FAR *lphostshort); + _In_ SOCKET s, + _In_ u_short netshort, + _Out_ u_short FAR *lphostshort); WINSOCK_API_LINKAGE int WSAAPI WSARecv( - IN SOCKET s, - IN LPWSABUF lpBuffers, - IN DWORD dwBufferCount, - OUT LPDWORD lpNumberOfBytesRecvd OPTIONAL, - IN OUT LPDWORD lpFlags, - IN OUT LPWSAOVERLAPPED lpOverlapped OPTIONAL, - IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine OPTIONAL); + _In_ SOCKET s, + _In_reads_(dwBufferCount) __out_data_source(NETWORK) LPWSABUF lpBuffers, + _In_ DWORD dwBufferCount, + _Out_opt_ LPDWORD lpNumberOfBytesRecvd, + _Inout_ LPDWORD lpFlags, + _Inout_opt_ LPWSAOVERLAPPED lpOverlapped, + _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine); WINSOCK_API_LINKAGE int WSAAPI WSARecvDisconnect( - IN SOCKET s, - IN LPWSABUF lpInboundDisconnectData OPTIONAL); + _In_ SOCKET s, + _In_opt_ __out_data_source(NETWORK) LPWSABUF lpInboundDisconnectData); WINSOCK_API_LINKAGE int WSAAPI WSARecvFrom( - IN SOCKET s, - IN OUT LPWSABUF lpBuffers, - IN DWORD dwBufferCount, - OUT LPDWORD lpNumberOfBytesRecvd OPTIONAL, - IN OUT LPDWORD lpFlags, - OUT struct sockaddr FAR *lpFrom, - IN OUT LPINT lpFromlen OPTIONAL, - IN OUT LPWSAOVERLAPPED lpOverlapped OPTIONAL, - IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine OPTIONAL); + _In_ SOCKET s, + _In_reads_(dwBufferCount) __out_data_source(NETWORK) LPWSABUF lpBuffers, + _In_ DWORD dwBufferCount, + _Out_opt_ LPDWORD lpNumberOfBytesRecvd, + _Inout_ LPDWORD lpFlags, + _Out_writes_bytes_to_opt_(*lpFromlen,*lpFromlen) struct sockaddr FAR *lpFrom, + _Inout_opt_ LPINT lpFromlen, + _Inout_opt_ LPWSAOVERLAPPED lpOverlapped, + _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine); WINSOCK_API_LINKAGE BOOL WSAAPI WSAResetEvent( - IN WSAEVENT hEvent); + _In_ WSAEVENT hEvent); WINSOCK_API_LINKAGE int WSAAPI WSASendDisconnect( - IN SOCKET s, - IN LPWSABUF lpOutboundDisconnectData OPTIONAL); + _In_ SOCKET s, + _In_opt_ LPWSABUF lpOutboundDisconnectData); WINSOCK_API_LINKAGE int WSAAPI WSASend( - IN SOCKET s, - IN LPWSABUF lpBuffers, - IN DWORD dwBufferCount, - OUT LPDWORD lpNumberOfBytesSent OPTIONAL, - IN DWORD dwFlags, - IN OUT LPWSAOVERLAPPED lpOverlapped OPTIONAL, - IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine OPTIONAL); + _In_ SOCKET s, + _In_reads_(dwBufferCount) LPWSABUF lpBuffers, + _In_ DWORD dwBufferCount, + _Out_opt_ LPDWORD lpNumberOfBytesSent, + _In_ DWORD dwFlags, + _Inout_opt_ LPWSAOVERLAPPED lpOverlapped, + _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine); WINSOCK_API_LINKAGE int WSAAPI WSASendTo( - IN SOCKET s, - IN LPWSABUF lpBuffers, - IN DWORD dwBufferCount, - OUT LPDWORD lpNumberOfBytesSent OPTIONAL, - IN DWORD dwFlags, - IN const struct sockaddr FAR *lpTo OPTIONAL, - IN int iTolen, - IN OUT LPWSAOVERLAPPED lpOverlapped OPTIONAL, - IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine OPTIONAL); + _In_ SOCKET s, + _In_reads_(dwBufferCount) LPWSABUF lpBuffers, + _In_ DWORD dwBufferCount, + _Out_opt_ LPDWORD lpNumberOfBytesSent, + _In_ DWORD dwFlags, + _In_reads_bytes_opt_(iTolen) const struct sockaddr FAR *lpTo, + _In_ int iTolen, + _Inout_opt_ LPWSAOVERLAPPED lpOverlapped, + _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine); WINSOCK_API_LINKAGE BOOL WSAAPI WSASetEvent( - IN WSAEVENT hEvent); - + _In_ WSAEVENT hEvent); + +_Must_inspect_result_ WINSOCK_API_LINKAGE SOCKET WSAAPI WSASocketA( - IN int af, - IN int type, - IN int protocol, - IN LPWSAPROTOCOL_INFOA lpProtocolInfo OPTIONAL, - IN GROUP g, - IN DWORD dwFlags); - + _In_ int af, + _In_ int type, + _In_ int protocol, + _In_opt_ LPWSAPROTOCOL_INFOA lpProtocolInfo, + _In_ GROUP g, + _In_ DWORD dwFlags); + +_Must_inspect_result_ WINSOCK_API_LINKAGE SOCKET WSAAPI WSASocketW( - IN int af, - IN int type, - IN int protocol, - IN LPWSAPROTOCOL_INFOW lpProtocolInfo OPTIONAL, - IN GROUP g, - IN DWORD dwFlags); + _In_ int af, + _In_ int type, + _In_ int protocol, + _In_opt_ LPWSAPROTOCOL_INFOW lpProtocolInfo, + _In_ GROUP g, + _In_ DWORD dwFlags); #ifdef UNICODE #define WSASocket WSASocketW @@ -2396,31 +2413,31 @@ DWORD WSAAPI WSAWaitForMultipleEvents( - IN DWORD cEvents, - IN const WSAEVENT FAR *lphEvents, - IN BOOL fWaitAll, - IN DWORD dwTimeout, - IN BOOL fAlertable); + _In_ DWORD cEvents, + _In_reads_(cEvents) const WSAEVENT FAR *lphEvents, + _In_ BOOL fWaitAll, + _In_ DWORD dwTimeout, + _In_ BOOL fAlertable); WINSOCK_API_LINKAGE INT WSAAPI WSAAddressToStringA( - IN LPSOCKADDR lpsaAddress, - IN DWORD dwAddressLength, - IN LPWSAPROTOCOL_INFOA lpProtocolInfo OPTIONAL, - OUT LPSTR lpszAddressString, - IN OUT LPDWORD lpdwAddressStringLength); + _In_reads_bytes_(dwAddressLength) LPSOCKADDR lpsaAddress, + _In_ DWORD dwAddressLength, + _In_opt_ LPWSAPROTOCOL_INFOA lpProtocolInfo, + _Out_writes_to_(*lpdwAddressStringLength,*lpdwAddressStringLength) LPSTR lpszAddressString, + _Inout_ LPDWORD lpdwAddressStringLength); WINSOCK_API_LINKAGE INT WSAAPI WSAAddressToStringW( - IN LPSOCKADDR lpsaAddress, - IN DWORD dwAddressLength, - IN LPWSAPROTOCOL_INFOW lpProtocolInfo OPTIONAL, - OUT LPWSTR lpszAddressString, - IN OUT LPDWORD lpdwAddressStringLength); + _In_reads_bytes_(dwAddressLength) LPSOCKADDR lpsaAddress, + _In_ DWORD dwAddressLength, + _In_opt_ LPWSAPROTOCOL_INFOW lpProtocolInfo, + _Out_writes_to_(*lpdwAddressStringLength,*lpdwAddressStringLength) LPWSTR lpszAddressString, + _Inout_ LPDWORD lpdwAddressStringLength); #ifdef UNICODE #define WSAAddressToString WSAAddressToStringW @@ -2432,21 +2449,21 @@ INT WSAAPI WSAStringToAddressA( - IN LPSTR AddressString, - IN INT AddressFamily, - IN LPWSAPROTOCOL_INFOA lpProtocolInfo OPTIONAL, - OUT LPSOCKADDR lpAddress, - IN OUT LPINT lpAddressLength); + _In_ LPSTR AddressString, + _In_ INT AddressFamily, + _In_opt_ LPWSAPROTOCOL_INFOA lpProtocolInfo, + _Out_writes_bytes_to_(*lpAddressLength,*lpAddressLength) LPSOCKADDR lpAddress, + _Inout_ LPINT lpAddressLength); WINSOCK_API_LINKAGE INT WSAAPI WSAStringToAddressW( - IN LPWSTR AddressString, - IN INT AddressFamily, - IN LPWSAPROTOCOL_INFOW lpProtocolInfo OPTIONAL, - OUT LPSOCKADDR lpAddress, - IN OUT LPINT lpAddressLength); + _In_ LPWSTR AddressString, + _In_ INT AddressFamily, + _In_opt_ LPWSAPROTOCOL_INFOW lpProtocolInfo, + _Out_writes_bytes_to_(*lpAddressLength,*lpAddressLength) LPSOCKADDR lpAddress, + _Inout_ LPINT lpAddressLength); #ifdef UNICODE #define WSAStringToAddress WSAStringToAddressW @@ -2458,17 +2475,17 @@ INT WSAAPI WSALookupServiceBeginA( - IN LPWSAQUERYSETA lpqsRestrictions, - IN DWORD dwControlFlags, - OUT LPHANDLE lphLookup); + _In_ LPWSAQUERYSETA lpqsRestrictions, + _In_ DWORD dwControlFlags, + _Out_ LPHANDLE lphLookup); WINSOCK_API_LINKAGE INT WSAAPI WSALookupServiceBeginW( - IN LPWSAQUERYSETW lpqsRestrictions, - IN DWORD dwControlFlags, - OUT LPHANDLE lphLookup); + _In_ LPWSAQUERYSETW lpqsRestrictions, + _In_ DWORD dwControlFlags, + _Out_ LPHANDLE lphLookup); #ifdef UNICODE #define WSALookupServiceBegin WSALookupServiceBeginW @@ -2480,19 +2497,19 @@ INT WSAAPI WSALookupServiceNextA( - IN HANDLE hLookup, - IN DWORD dwControlFlags, - IN OUT LPDWORD lpdwBufferLength, - OUT LPWSAQUERYSETA lpqsResults); + _In_ HANDLE hLookup, + _In_ DWORD dwControlFlags, + _Inout_ LPDWORD lpdwBufferLength, + _Out_writes_bytes_to_(*lpdwBufferLength,*lpdwBufferLength) LPWSAQUERYSETA lpqsResults); WINSOCK_API_LINKAGE INT WSAAPI WSALookupServiceNextW( - IN HANDLE hLookup, - IN DWORD dwControlFlags, - IN OUT LPDWORD lpdwBufferLength, - OUT LPWSAQUERYSETW lpqsResults OPTIONAL); + _In_ HANDLE hLookup, + _In_ DWORD dwControlFlags, + _Inout_ LPDWORD lpdwBufferLength, + _Out_writes_bytes_to_opt_(*lpdwBufferLength,*lpdwBufferLength) LPWSAQUERYSETW lpqsResults); #ifdef UNICODE #define WSALookupServiceNext WSALookupServiceNextW @@ -2504,19 +2521,19 @@ INT WSAAPI WSALookupServiceEnd( - IN HANDLE hLookup); + _In_ HANDLE hLookup); WINSOCK_API_LINKAGE INT WSAAPI WSAInstallServiceClassA( - IN LPWSASERVICECLASSINFOA lpServiceClassInfo); + _In_ LPWSASERVICECLASSINFOA lpServiceClassInfo); WINSOCK_API_LINKAGE INT WSAAPI WSAInstallServiceClassW( - IN LPWSASERVICECLASSINFOW lpServiceClassInfo); + _In_ LPWSASERVICECLASSINFOW lpServiceClassInfo); #ifdef UNICODE #define WSAInstallServiceClass WSAInstallServiceClassW @@ -2528,25 +2545,25 @@ INT WSAAPI WSARemoveServiceClass( - IN LPGUID lpServiceClassId); + _In_ LPGUID lpServiceClassId); WINSOCK_API_LINKAGE INT WSAAPI WSAGetServiceClassInfoA( - IN LPGUID lpProviderId, - IN LPGUID lpServiceClassId, - IN OUT LPDWORD lpdwBufSize, - OUT LPWSASERVICECLASSINFOA lpServiceClassInfo); + _In_ LPGUID lpProviderId, + _In_ LPGUID lpServiceClassId, + _Inout_ LPDWORD lpdwBufSize, + _Out_writes_bytes_to_(*lpdwBufSize,*lpdwBufSize) LPWSASERVICECLASSINFOA lpServiceClassInfo); WINSOCK_API_LINKAGE INT WSAAPI WSAGetServiceClassInfoW( - IN LPGUID lpProviderId, - IN LPGUID lpServiceClassId, - IN OUT LPDWORD lpdwBufSize, - OUT LPWSASERVICECLASSINFOW lpServiceClassInfo); + _In_ LPGUID lpProviderId, + _In_ LPGUID lpServiceClassId, + _Inout_ LPDWORD lpdwBufSize, + _Out_writes_bytes_to_(*lpdwBufSize,*lpdwBufSize) LPWSASERVICECLASSINFOW lpServiceClassInfo); #ifdef UNICODE #define WSAGetServiceClassInfo WSAGetServiceClassInfoW @@ -2558,15 +2575,15 @@ INT WSAAPI WSAEnumNameSpaceProvidersA( - IN OUT LPDWORD lpdwBufferLength, - OUT LPWSANAMESPACE_INFOA lpnspBuffer); + _Inout_ LPDWORD lpdwBufferLength, + _Out_writes_bytes_to_(*lpdwBufferLength,*lpdwBufferLength) LPWSANAMESPACE_INFOA lpnspBuffer); WINSOCK_API_LINKAGE INT WSAAPI WSAEnumNameSpaceProvidersW( - IN OUT LPDWORD lpdwBufferLength, - OUT LPWSANAMESPACE_INFOW lpnspBuffer); + _Inout_ LPDWORD lpdwBufferLength, + _Out_writes_bytes_to_(*lpdwBufferLength,*lpdwBufferLength) LPWSANAMESPACE_INFOW lpnspBuffer); #ifdef UNICODE #define WSAEnumNameSpaceProviders WSAEnumNameSpaceProvidersW @@ -2574,21 +2591,23 @@ #define WSAEnumNameSpaceProviders WSAEnumNameSpaceProvidersA #endif +_Success_(return == 0) WINSOCK_API_LINKAGE INT WSAAPI WSAGetServiceClassNameByClassIdA( - IN LPGUID lpServiceClassId, - OUT LPSTR lpszServiceClassName, - IN OUT LPDWORD lpdwBufferLength); - + _In_ LPGUID lpServiceClassId, + _Out_writes_bytes_to_(*lpdwBufferLength,*lpdwBufferLength) LPSTR lpszServiceClassName, + _Inout_ LPDWORD lpdwBufferLength); + +_Success_(return == 0) WINSOCK_API_LINKAGE INT WSAAPI WSAGetServiceClassNameByClassIdW( - IN LPGUID lpServiceClassId, - OUT LPWSTR lpszServiceClassName, - IN OUT LPDWORD lpdwBufferLength); + _In_ LPGUID lpServiceClassId, + _Out_writes_bytes_to_(*lpdwBufferLength,*lpdwBufferLength) LPWSTR lpszServiceClassName, + _Inout_ LPDWORD lpdwBufferLength); #ifdef UNICODE #define WSAGetServiceClassNameByClassId WSAGetServiceClassNameByClassIdW @@ -2600,17 +2619,17 @@ INT WSAAPI WSASetServiceA( - IN LPWSAQUERYSETA lpqsRegInfo, - IN WSAESETSERVICEOP essoperation, - IN DWORD dwControlFlags); + _In_ LPWSAQUERYSETA lpqsRegInfo, + _In_ WSAESETSERVICEOP essoperation, + _In_ DWORD dwControlFlags); WINSOCK_API_LINKAGE INT WSAAPI WSASetServiceW( - IN LPWSAQUERYSETW lpqsRegInfo, - IN WSAESETSERVICEOP essoperation, - IN DWORD dwControlFlags); + _In_ LPWSAQUERYSETW lpqsRegInfo, + _In_ WSAESETSERVICEOP essoperation, + _In_ DWORD dwControlFlags); #ifdef UNICODE #define WSASetService WSASetServiceW @@ -2622,23 +2641,23 @@ INT WSAAPI WSAProviderConfigChange( - IN OUT LPHANDLE lpNotificationHandle OPTIONAL, - IN OUT LPWSAOVERLAPPED lpOverlapped OPTIONAL, - IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine OPTIONAL); + _Inout_ LPHANDLE lpNotificationHandle, + _Inout_opt_ LPWSAOVERLAPPED lpOverlapped, + _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine); #if(_WIN32_WINNT >= 0x0501) WINSOCK_API_LINKAGE INT WSAAPI WSANSPIoctl( - IN HANDLE hLookup, - IN DWORD dwControlCode, - IN LPVOID lpvInBuffer OPTIONAL, - IN DWORD cbInBuffer, - OUT LPVOID lpvOutBuffer OPTIONAL, - IN DWORD cbOutBuffer, - OUT LPDWORD lpcbBytesReturned, - IN LPWSACOMPLETION lpCompletion OPTIONAL); + _In_ HANDLE hLookup, + _In_ DWORD dwControlCode, + _In_reads_bytes_opt_(cbInBuffer) LPVOID lpvInBuffer, + _In_ DWORD cbInBuffer, + _Out_writes_bytes_to_opt_(cbOutBuffer, *lpcbBytesReturned) LPVOID lpvOutBuffer, + _In_ DWORD cbOutBuffer, + _Out_ LPDWORD lpcbBytesReturned, + _In_opt_ LPWSACOMPLETION lpCompletion); #endif /* (_WIN32_WINNT >= 0x0501) */ #if(_WIN32_WINNT >= 0x0600) @@ -2647,26 +2666,26 @@ int WSAAPI WSASendMsg( - IN SOCKET Handle, - IN LPWSAMSG lpMsg, - IN DWORD dwFlags, - OUT LPDWORD lpNumberOfBytesSent OPTIONAL, - IN OUT LPWSAOVERLAPPED lpOverlapped OPTIONAL, - IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine OPTIONAL); + _In_ SOCKET Handle, + _In_ LPWSAMSG lpMsg, + _In_ DWORD dwFlags, + _Out_opt_ LPDWORD lpNumberOfBytesSent, + _Inout_opt_ LPWSAOVERLAPPED lpOverlapped, + _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine); WINSOCK_API_LINKAGE INT WSAAPI WSAEnumNameSpaceProvidersExA( - IN OUT LPDWORD lpdwBufferLength, - OUT LPWSANAMESPACE_INFOEXA lpnspBuffer); + _Inout_ LPDWORD lpdwBufferLength, + _Out_writes_bytes_to_(*lpdwBufferLength,*lpdwBufferLength) LPWSANAMESPACE_INFOEXA lpnspBuffer); WINSOCK_API_LINKAGE INT WSAAPI WSAEnumNameSpaceProvidersExW( - IN OUT LPDWORD lpdwBufferLength, - OUT LPWSANAMESPACE_INFOEXW lpnspBuffer); + _Inout_ LPDWORD lpdwBufferLength, + _Out_writes_bytes_to_(*lpdwBufferLength,*lpdwBufferLength) LPWSANAMESPACE_INFOEXW lpnspBuffer); #ifdef UNICODE #define WSAEnumNameSpaceProvidersEx WSAEnumNameSpaceProvidersExW @@ -2678,9 +2697,9 @@ int WSAAPI WSAPoll( - IN OUT LPWSAPOLLFD fdArray, - IN ULONG fds, - IN INT timeout); + _Inout_ LPWSAPOLLFD fdArray, + _In_ ULONG fds, + _In_ INT timeout); #endif /* (_WIN32_WINNT >= 0x0600) */
12 years, 11 months
1
0
0
0
[akhaldi] 55125: [DDK] * Update hidclass.h and hubbusif.h annotations.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon Jan 23 19:07:50 2012 New Revision: 55125 URL:
http://svn.reactos.org/svn/reactos?rev=55125&view=rev
Log: [DDK] * Update hidclass.h and hubbusif.h annotations. Modified: trunk/reactos/include/ddk/hidclass.h trunk/reactos/include/ddk/hubbusif.h Modified: trunk/reactos/include/ddk/hidclass.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/hidclass.h?rev…
============================================================================== --- trunk/reactos/include/ddk/hidclass.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/hidclass.h [iso-8859-1] Mon Jan 23 19:07:50 2012 @@ -98,13 +98,16 @@ DeviceObjectRemoved }; -typedef VOID (NTAPI *PHID_STATUS_CHANGE)( - PVOID Context, - enum DeviceObjectState State); +typedef VOID +(NTAPI *PHID_STATUS_CHANGE)( + _In_ PVOID Context, + _In_ enum DeviceObjectState State); -typedef NTSTATUS (NTAPI *PHIDP_GETCAPS)( - IN PHIDP_PREPARSED_DATA PreparsedData, - OUT PHIDP_CAPS Capabilities); +_Must_inspect_result_ +typedef NTSTATUS +(NTAPI *PHIDP_GETCAPS)( + _In_ PHIDP_PREPARSED_DATA PreparsedData, + _Out_ PHIDP_CAPS Capabilities); typedef struct _HID_COLLECTION_INFORMATION { ULONG DescriptorSize; Modified: trunk/reactos/include/ddk/hubbusif.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/hubbusif.h?rev…
============================================================================== --- trunk/reactos/include/ddk/hubbusif.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/hubbusif.h [iso-8859-1] Mon Jan 23 19:07:50 2012 @@ -32,15 +32,15 @@ #define USB_IDLE_NOT_READY 0 #define USB_IDLE_READY 1 -typedef -NTSTATUS +_Function_class_(USB_BUSIFFN_CREATE_USB_DEVICE) +typedef NTSTATUS USB_BUSIFFN USB_BUSIFFN_CREATE_USB_DEVICE ( - IN PVOID BusContext, - OUT PUSB_DEVICE_HANDLE *NewDeviceHandle, - IN PUSB_DEVICE_HANDLE HubDeviceHandle, - IN USHORT PortStatus, - IN USHORT PortNumber); + _In_ PVOID BusContext, + _Outptr_ PUSB_DEVICE_HANDLE *NewDeviceHandle, + _In_ PUSB_DEVICE_HANDLE HubDeviceHandle, + _In_ USHORT PortStatus, + _In_ USHORT PortNumber); typedef USB_BUSIFFN_CREATE_USB_DEVICE *PUSB_BUSIFFN_CREATE_USB_DEVICE; typedef enum _USBPORT_CREATEDEV_ERROR { @@ -63,17 +63,17 @@ UCHAR XtraInfo[64]; } USB_CD_ERROR_INFORMATION, *PUSB_CD_ERROR_INFORMATION; -typedef -NTSTATUS +_Function_class_(USB_BUSIFFN_CREATE_USB_DEVICE_EX) +typedef NTSTATUS USB_BUSIFFN USB_BUSIFFN_CREATE_USB_DEVICE_EX ( - IN PVOID BusContext, - OUT PUSB_DEVICE_HANDLE *NewDeviceHandle, - IN PUSB_DEVICE_HANDLE HsHubDeviceHandle, - IN USHORT PortStatus, - IN USHORT PortNumber, - OUT PUSB_CD_ERROR_INFORMATION CdErrorInfo, - IN USHORT TtPortNumber); + _In_ PVOID BusContext, + _Outptr_ PUSB_DEVICE_HANDLE *NewDeviceHandle, + _In_ PUSB_DEVICE_HANDLE HsHubDeviceHandle, + _In_ USHORT PortStatus, + _In_ USHORT PortNumber, + _Out_ PUSB_CD_ERROR_INFORMATION CdErrorInfo, + _In_ USHORT TtPortNumber); typedef USB_BUSIFFN_CREATE_USB_DEVICE_EX *PUSB_BUSIFFN_CREATE_USB_DEVICE_EX; typedef struct _USB_PORT_PATH { @@ -81,19 +81,19 @@ ULONG PortPath[6]; } USB_PORT_PATH, *PUSB_PORT_PATH; -typedef -NTSTATUS +_Function_class_(USB_BUSIFFN_CREATE_USB_DEVICE_V7) +typedef NTSTATUS USB_BUSIFFN USB_BUSIFFN_CREATE_USB_DEVICE_V7 ( - IN PVOID BusContext, - OUT PUSB_DEVICE_HANDLE *NewDeviceHandle, - IN PUSB_DEVICE_HANDLE HsHubDeviceHandle, - IN USHORT PortStatus, - IN PUSB_PORT_PATH PortPath, - OUT PUSB_CD_ERROR_INFORMATION CdErrorInfo, - IN USHORT TtPortNumber, - IN PDEVICE_OBJECT PdoDeviceObject, - IN PUNICODE_STRING PhysicalDeviceObjectName); + _In_ PVOID BusContext, + _Outptr_ PUSB_DEVICE_HANDLE *NewDeviceHandle, + _In_ PUSB_DEVICE_HANDLE HsHubDeviceHandle, + _In_ USHORT PortStatus, + _In_ PUSB_PORT_PATH PortPath, + _Out_ PUSB_CD_ERROR_INFORMATION CdErrorInfo, + _In_ USHORT TtPortNumber, + _In_ PDEVICE_OBJECT PdoDeviceObject, + _In_ PUNICODE_STRING PhysicalDeviceObjectName); typedef USB_BUSIFFN_CREATE_USB_DEVICE_V7 *PUSB_BUSIFFN_CREATE_USB_DEVICE_V7; typedef enum _USBPORT_INITDEV_ERROR { @@ -113,300 +113,306 @@ UCHAR XtraInfo[64]; } USB_ID_ERROR_INFORMATION, *PUSB_ID_ERROR_INFORMATION; -typedef -NTSTATUS -USB_BUSIFFN -USB_BUSIFFN_INITIALIZE_USB_DEVICE ( - IN PVOID BusContext, - IN OUT PUSB_DEVICE_HANDLE DeviceHandle); +_Function_class_(USB_BUSIFFN_INITIALIZE_USB_DEVICE) +typedef NTSTATUS +USB_BUSIFFN +USB_BUSIFFN_INITIALIZE_USB_DEVICE( + _In_ PVOID BusContext, + _Inout_ PUSB_DEVICE_HANDLE DeviceHandle); typedef USB_BUSIFFN_INITIALIZE_USB_DEVICE *PUSB_BUSIFFN_INITIALIZE_USB_DEVICE; -typedef -NTSTATUS -USB_BUSIFFN -USB_BUSIFFN_INITIALIZE_USB_DEVICE_EX ( - IN PVOID BusContext, - IN OUT PUSB_DEVICE_HANDLE DeviceHandle, - OUT PUSB_ID_ERROR_INFORMATION IdErrInfo); +_Function_class_(USB_BUSIFFN_INITIALIZE_USB_DEVICE_EX) +typedef NTSTATUS +USB_BUSIFFN +USB_BUSIFFN_INITIALIZE_USB_DEVICE_EX( + _In_ PVOID BusContext, + _Inout_ PUSB_DEVICE_HANDLE DeviceHandle, + _Out_ PUSB_ID_ERROR_INFORMATION IdErrInfo); typedef USB_BUSIFFN_INITIALIZE_USB_DEVICE_EX *PUSB_BUSIFFN_INITIALIZE_USB_DEVICE_EX; -typedef -NTSTATUS -USB_BUSIFFN -USB_BUSIFFN_REMOVE_USB_DEVICE ( - IN PVOID BusContext, - IN OUT PUSB_DEVICE_HANDLE DeviceHandle, - IN ULONG Flags); +_Function_class_(USB_BUSIFFN_REMOVE_USB_DEVICE) +typedef NTSTATUS +USB_BUSIFFN +USB_BUSIFFN_REMOVE_USB_DEVICE( + _In_ PVOID BusContext, + _Inout_ PUSB_DEVICE_HANDLE DeviceHandle, + _In_ ULONG Flags); typedef USB_BUSIFFN_REMOVE_USB_DEVICE *PUSB_BUSIFFN_REMOVE_USB_DEVICE; -typedef -NTSTATUS -USB_BUSIFFN -USB_BUSIFFN_GET_USB_DESCRIPTORS ( - IN PVOID BusContext, - IN OUT PUSB_DEVICE_HANDLE DeviceHandle, - OUT PUCHAR DeviceDescriptorBuffer, - IN OUT PULONG DeviceDescriptorBufferLength, - OUT PUCHAR ConfigDescriptorBuffer, - IN OUT PULONG ConfigDescriptorBufferLength); +_Function_class_(USB_BUSIFFN_GET_USB_DESCRIPTORS) +typedef NTSTATUS +USB_BUSIFFN +USB_BUSIFFN_GET_USB_DESCRIPTORS( + _In_ PVOID BusContext, + _Inout_ PUSB_DEVICE_HANDLE DeviceHandle, + _Out_writes_bytes_to_(*DeviceDescriptorBufferLength,*DeviceDescriptorBufferLength) + PUCHAR DeviceDescriptorBuffer, + _Inout_ PULONG DeviceDescriptorBufferLength, + _Out_writes_bytes_to_(*ConfigDescriptorBufferLength, *ConfigDescriptorBufferLength) + PUCHAR ConfigDescriptorBuffer, + _Inout_ PULONG ConfigDescriptorBufferLength); typedef USB_BUSIFFN_GET_USB_DESCRIPTORS *PUSB_BUSIFFN_GET_USB_DESCRIPTORS; -typedef -NTSTATUS -USB_BUSIFFN -USB_BUSIFFN_RESTORE_DEVICE ( - IN PVOID BusContext, - IN OUT PUSB_DEVICE_HANDLE OldDeviceHandle, - IN OUT PUSB_DEVICE_HANDLE NewDeviceHandle); +_Function_class_(USB_BUSIFFN_RESTORE_DEVICE) +typedef NTSTATUS +USB_BUSIFFN +USB_BUSIFFN_RESTORE_DEVICE( + _In_ PVOID BusContext, + _Inout_ PUSB_DEVICE_HANDLE OldDeviceHandle, + _Inout_ PUSB_DEVICE_HANDLE NewDeviceHandle); typedef USB_BUSIFFN_RESTORE_DEVICE *PUSB_BUSIFFN_RESTORE_DEVICE; -typedef -NTSTATUS -USB_BUSIFFN -USB_BUSIFFN_GET_POTRTHACK_FLAGS ( - IN PVOID BusContext, - IN OUT PULONG Flags); +_Function_class_(USB_BUSIFFN_GET_POTRTHACK_FLAGS) +typedef NTSTATUS +USB_BUSIFFN +USB_BUSIFFN_GET_POTRTHACK_FLAGS( + _In_ PVOID BusContext, + _Inout_ PULONG Flags); typedef USB_BUSIFFN_GET_POTRTHACK_FLAGS *PUSB_BUSIFFN_GET_POTRTHACK_FLAGS; -typedef -NTSTATUS -USB_BUSIFFN -USB_BUSIFFN_GET_DEVICE_INFORMATION ( - IN PVOID BusContext, - IN PUSB_DEVICE_HANDLE DeviceHandle, - OUT PVOID DeviceInformationBuffer, - IN ULONG DeviceInformationBufferLength, - IN OUT PULONG LengthOfDataCopied); +_Function_class_(USB_BUSIFFN_GET_DEVICE_INFORMATION) +typedef NTSTATUS +USB_BUSIFFN +USB_BUSIFFN_GET_DEVICE_INFORMATION( + _In_ PVOID BusContext, + _In_ PUSB_DEVICE_HANDLE DeviceHandle, + _Out_writes_bytes_to_(DeviceInformationBufferLength,*LengthOfDataCopied) + PVOID DeviceInformationBuffer, + _In_ ULONG DeviceInformationBufferLength, + _Inout_ PULONG LengthOfDataCopied); typedef USB_BUSIFFN_GET_DEVICE_INFORMATION *PUSB_BUSIFFN_GET_DEVICE_INFORMATION; -typedef -NTSTATUS -USB_BUSIFFN -USB_BUSIFFN_GET_CONTROLLER_INFORMATION ( - IN PVOID BusContext, - IN OUT PVOID ControllerInformationBuffer, - IN ULONG ControllerInformationBufferLength, - IN OUT PULONG LengthOfDataCopied); +_Function_class_(USB_BUSIFFN_GET_CONTROLLER_INFORMATION) +typedef NTSTATUS +USB_BUSIFFN +USB_BUSIFFN_GET_CONTROLLER_INFORMATION( + _In_ PVOID BusContext, + _Inout_updates_bytes_to_(ControllerInformationBufferLength, *LengthOfDataCopied) + PVOID ControllerInformationBuffer, + _In_ ULONG ControllerInformationBufferLength, + _Inout_ PULONG LengthOfDataCopied); typedef USB_BUSIFFN_GET_CONTROLLER_INFORMATION *PUSB_BUSIFFN_GET_CONTROLLER_INFORMATION; -typedef -NTSTATUS -USB_BUSIFFN -USB_BUSIFFN_CONTROLLER_SELECTIVE_SUSPEND ( - IN PVOID BusContext, - IN BOOLEAN Enable); +_Function_class_(USB_BUSIFFN_CONTROLLER_SELECTIVE_SUSPEND) +typedef NTSTATUS +USB_BUSIFFN +USB_BUSIFFN_CONTROLLER_SELECTIVE_SUSPEND( + _In_ PVOID BusContext, + _In_ BOOLEAN Enable); typedef USB_BUSIFFN_CONTROLLER_SELECTIVE_SUSPEND *PUSB_BUSIFFN_CONTROLLER_SELECTIVE_SUSPEND; -typedef -NTSTATUS -USB_BUSIFFN -USB_BUSIFFN_GET_EXTENDED_HUB_INFO ( - IN PVOID BusContext, - IN PDEVICE_OBJECT HubPhysicalDeviceObject, - IN PVOID HubInformationBuffer, - IN ULONG HubInformationBufferLength, - OUT PULONG LengthOfDataCopied); +_Function_class_(USB_BUSIFFN_GET_EXTENDED_HUB_INFO) +typedef NTSTATUS +USB_BUSIFFN +USB_BUSIFFN_GET_EXTENDED_HUB_INFO( + _In_ PVOID BusContext, + _In_ PDEVICE_OBJECT HubPhysicalDeviceObject, + _Inout_updates_bytes_to_(HubInformationBufferLength, *LengthOfDataCopied) + PVOID HubInformationBuffer, + _In_ ULONG HubInformationBufferLength, + _Out_ PULONG LengthOfDataCopied); typedef USB_BUSIFFN_GET_EXTENDED_HUB_INFO *PUSB_BUSIFFN_GET_EXTENDED_HUB_INFO; -typedef -NTSTATUS -USB_BUSIFFN -USB_BUSIFFN_GET_ROOTHUB_SYM_NAME ( - IN PVOID BusContext, - IN PVOID HubSymNameBuffer, - IN ULONG HubSymNameBufferLength, - OUT PULONG HubSymNameActualLength); +_Function_class_(USB_BUSIFFN_GET_ROOTHUB_SYM_NAME) +typedef NTSTATUS +USB_BUSIFFN +USB_BUSIFFN_GET_ROOTHUB_SYM_NAME( + _In_ PVOID BusContext, + _Inout_updates_bytes_to_(HubSymNameBufferLength, *HubSymNameActualLength) PVOID HubSymNameBuffer, + _In_ ULONG HubSymNameBufferLength, + _Out_ PULONG HubSymNameActualLength); typedef USB_BUSIFFN_GET_ROOTHUB_SYM_NAME *PUSB_BUSIFFN_GET_ROOTHUB_SYM_NAME; -typedef -PVOID -USB_BUSIFFN -USB_BUSIFFN_GET_DEVICE_BUSCONTEXT ( - IN PVOID HubBusContext, - IN PVOID DeviceHandle); +_Function_class_(USB_BUSIFFN_GET_DEVICE_BUSCONTEXT) +typedef PVOID +USB_BUSIFFN +USB_BUSIFFN_GET_DEVICE_BUSCONTEXT( + _In_ PVOID HubBusContext, + _In_ PVOID DeviceHandle); typedef USB_BUSIFFN_GET_DEVICE_BUSCONTEXT *PUSB_BUSIFFN_GET_DEVICE_BUSCONTEXT; -typedef -NTSTATUS -USB_BUSIFFN -USB_BUSIFFN_INITIALIZE_20HUB ( - IN PVOID BusContext, - IN PUSB_DEVICE_HANDLE HubDeviceHandle, - IN ULONG TtCount); +_Function_class_(USB_BUSIFFN_INITIALIZE_20HUB) +typedef NTSTATUS +USB_BUSIFFN +USB_BUSIFFN_INITIALIZE_20HUB( + _In_ PVOID BusContext, + _In_ PUSB_DEVICE_HANDLE HubDeviceHandle, + _In_ ULONG TtCount); typedef USB_BUSIFFN_INITIALIZE_20HUB *PUSB_BUSIFFN_INITIALIZE_20HUB; -typedef -BOOLEAN -USB_BUSIFFN -USB_BUSIFFN_IS_ROOT ( - IN PVOID BusContext, - IN PVOID DeviceObject); +_Function_class_(USB_BUSIFFN_IS_ROOT) +typedef BOOLEAN +USB_BUSIFFN +USB_BUSIFFN_IS_ROOT( + _In_ PVOID BusContext, + _In_ PVOID DeviceObject); typedef USB_BUSIFFN_IS_ROOT *PUSB_BUSIFFN_IS_ROOT; -typedef -VOID -USB_BUSIFFN -USB_BUSIFFN_ACQUIRE_SEMAPHORE ( - IN PVOID BusContext); +_Function_class_(USB_BUSIFFN_ACQUIRE_SEMAPHORE) +typedef VOID +USB_BUSIFFN +USB_BUSIFFN_ACQUIRE_SEMAPHORE( + _In_ PVOID BusContext); typedef USB_BUSIFFN_ACQUIRE_SEMAPHORE *PUSB_BUSIFFN_ACQUIRE_SEMAPHORE; -typedef -VOID -USB_BUSIFFN -USB_BUSIFFN_RELEASE_SEMAPHORE ( - IN PVOID BusContext); +_Function_class_(USB_BUSIFFN_RELEASE_SEMAPHORE) +typedef VOID +USB_BUSIFFN +USB_BUSIFFN_RELEASE_SEMAPHORE( + _In_ PVOID BusContext); typedef USB_BUSIFFN_RELEASE_SEMAPHORE *PUSB_BUSIFFN_RELEASE_SEMAPHORE; -typedef -VOID +_Function_class_(RH_INIT_CALLBACK) +typedef VOID __stdcall -RH_INIT_CALLBACK ( - IN PVOID CallBackContext); +RH_INIT_CALLBACK( + _In_ PVOID CallBackContext); typedef RH_INIT_CALLBACK *PRH_INIT_CALLBACK; -typedef -NTSTATUS -USB_BUSIFFN -USB_BUSIFFN_ROOTHUB_INIT_NOTIFY ( - IN PVOID BusContext, - IN PVOID CallbackContext, - IN PRH_INIT_CALLBACK CallbackRoutine); +_Function_class_(USB_BUSIFFN_ROOTHUB_INIT_NOTIFY) +typedef NTSTATUS +USB_BUSIFFN +USB_BUSIFFN_ROOTHUB_INIT_NOTIFY( + _In_ PVOID BusContext, + _In_ PVOID CallbackContext, + _In_ PRH_INIT_CALLBACK CallbackRoutine); typedef USB_BUSIFFN_ROOTHUB_INIT_NOTIFY *PUSB_BUSIFFN_ROOTHUB_INIT_NOTIFY; -typedef -VOID -USB_BUSIFFN -USB_BUSIFFN_FLUSH_TRANSFERS ( - IN PVOID BusContext, - IN PVOID DeviceHandle); +_Function_class_(USB_BUSIFFN_FLUSH_TRANSFERS) +typedef VOID +USB_BUSIFFN +USB_BUSIFFN_FLUSH_TRANSFERS( + _In_ PVOID BusContext, + _In_ PVOID DeviceHandle); typedef USB_BUSIFFN_FLUSH_TRANSFERS *PUSB_BUSIFFN_FLUSH_TRANSFERS; -typedef -ULONG -USB_BUSIFFN -USB_BUSIFFN_CALC_PIPE_BANDWIDTH ( - IN PVOID BusContext, - IN PUSBD_PIPE_INFORMATION PipeInfo, - IN USB_DEVICE_SPEED DeviceSpeed); +_Function_class_(USB_BUSIFFN_CALC_PIPE_BANDWIDTH) +typedef ULONG +USB_BUSIFFN +USB_BUSIFFN_CALC_PIPE_BANDWIDTH( + _In_ PVOID BusContext, + _In_ PUSBD_PIPE_INFORMATION PipeInfo, + _In_ USB_DEVICE_SPEED DeviceSpeed); typedef USB_BUSIFFN_CALC_PIPE_BANDWIDTH *PUSB_BUSIFFN_CALC_PIPE_BANDWIDTH; -typedef -VOID -USB_BUSIFFN -USB_BUSIFFN_SET_BUS_WAKE_MODE ( - IN PVOID BusContext, - IN ULONG Mode); +_Function_class_(USB_BUSIFFN_SET_BUS_WAKE_MODE) +typedef VOID +USB_BUSIFFN +USB_BUSIFFN_SET_BUS_WAKE_MODE( + _In_ PVOID BusContext, + _In_ ULONG Mode); typedef USB_BUSIFFN_SET_BUS_WAKE_MODE *PUSB_BUSIFFN_SET_BUS_WAKE_MODE; -typedef -VOID -USB_BUSIFFN -USB_BUSIFFN_SET_DEVICE_FLAG ( - IN PVOID BusContext, - IN GUID *DeviceFlagGuid, - IN PVOID ValueData, - IN ULONG ValueLength); +_Function_class_(USB_BUSIFFN_SET_DEVICE_FLAG) +typedef VOID +USB_BUSIFFN +USB_BUSIFFN_SET_DEVICE_FLAG( + _In_ PVOID BusContext, + _In_ GUID *DeviceFlagGuid, + _In_ PVOID ValueData, + _In_ ULONG ValueLength); typedef USB_BUSIFFN_SET_DEVICE_FLAG *PUSB_BUSIFFN_SET_DEVICE_FLAG; -typedef -VOID -USB_BUSIFFN -USB_BUSIFFN_SET_DEVHANDLE_DATA ( - IN PVOID BusContext, - IN PVOID DeviceHandle, - IN PDEVICE_OBJECT UsbDevicePdo); +_Function_class_(USB_BUSIFFN_SET_DEVHANDLE_DATA) +typedef VOID +USB_BUSIFFN +USB_BUSIFFN_SET_DEVHANDLE_DATA( + _In_ PVOID BusContext, + _In_ PVOID DeviceHandle, + _In_ PDEVICE_OBJECT UsbDevicePdo); typedef USB_BUSIFFN_SET_DEVHANDLE_DATA *PUSB_BUSIFFN_SET_DEVHANDLE_DATA; -typedef -NTSTATUS -USB_BUSIFFN -USB_BUSIFFN_TEST_POINT ( - IN PVOID BusContext, - IN PVOID DeviceHandle, - IN ULONG Opcode, - IN PVOID TestData); +_Function_class_(USB_BUSIFFN_TEST_POINT) +typedef NTSTATUS +USB_BUSIFFN +USB_BUSIFFN_TEST_POINT( + _In_ PVOID BusContext, + _In_ PVOID DeviceHandle, + _In_ ULONG Opcode, + _In_ PVOID TestData); typedef USB_BUSIFFN_TEST_POINT *PUSB_BUSIFFN_TEST_POINT; -typedef -NTSTATUS -USB_BUSIFFN -USB_BUSIFFN_GET_DEVICE_PERFORMANCE_INFO ( - IN PVOID BusContext, - IN PUSB_DEVICE_HANDLE DeviceHandle, - OUT PVOID DeviceInformationBuffer, - IN ULONG DeviceInformationBufferLength, - IN OUT PULONG LengthOfDataCopied); +_Function_class_(USB_BUSIFFN_GET_DEVICE_PERFORMANCE_INFO) +typedef NTSTATUS +USB_BUSIFFN +USB_BUSIFFN_GET_DEVICE_PERFORMANCE_INFO( + _In_ PVOID BusContext, + _In_ PUSB_DEVICE_HANDLE DeviceHandle, + _Out_writes_bytes_to_(DeviceInformationBufferLength,*LengthOfDataCopied) + PVOID DeviceInformationBuffer, + _In_ ULONG DeviceInformationBufferLength, + _Inout_ PULONG LengthOfDataCopied); typedef USB_BUSIFFN_GET_DEVICE_PERFORMANCE_INFO *PUSB_BUSIFFN_GET_DEVICE_PERFORMANCE_INFO; -typedef -NTSTATUS -USB_BUSIFFN -USB_BUSIFFN_WAIT_ASYNC_POWERUP ( - IN PVOID BusContext); +_Function_class_(USB_BUSIFFN_WAIT_ASYNC_POWERUP) +typedef NTSTATUS +USB_BUSIFFN +USB_BUSIFFN_WAIT_ASYNC_POWERUP( + _In_ PVOID BusContext); typedef USB_BUSIFFN_WAIT_ASYNC_POWERUP *PUSB_BUSIFFN_WAIT_ASYNC_POWERUP; -typedef -NTSTATUS -USB_BUSIFFN -USB_BUSIFFN_GET_DEVICE_ADDRESS ( - IN PVOID BusContext, - IN PUSB_DEVICE_HANDLE DeviceHandle, - OUT PUSHORT DeviceAddress); +_Function_class_(USB_BUSIFFN_GET_DEVICE_ADDRESS) +typedef NTSTATUS +USB_BUSIFFN +USB_BUSIFFN_GET_DEVICE_ADDRESS( + _In_ PVOID BusContext, + _In_ PUSB_DEVICE_HANDLE DeviceHandle, + _Out_ PUSHORT DeviceAddress); typedef USB_BUSIFFN_GET_DEVICE_ADDRESS *PUSB_BUSIFFN_GET_DEVICE_ADDRESS; -typedef -VOID -USB_BUSIFFN -USB_BUSIFFN_DEREF_DEVICE_HANDLE ( - IN PVOID BusContext, - IN PUSB_DEVICE_HANDLE DeviceHandle, - IN PVOID Object, - IN ULONG Tag); +_Function_class_(USB_BUSIFFN_DEREF_DEVICE_HANDLE) +typedef VOID +USB_BUSIFFN +USB_BUSIFFN_DEREF_DEVICE_HANDLE( + _In_ PVOID BusContext, + _In_ PUSB_DEVICE_HANDLE DeviceHandle, + _In_ PVOID Object, + _In_ ULONG Tag); typedef USB_BUSIFFN_DEREF_DEVICE_HANDLE *PUSB_BUSIFFN_DEREF_DEVICE_HANDLE; -typedef -NTSTATUS -USB_BUSIFFN -USB_BUSIFFN_REF_DEVICE_HANDLE ( - IN PVOID BusContext, - IN PUSB_DEVICE_HANDLE DeviceHandle, - IN PVOID Object, - IN ULONG Tag); +_Function_class_(USB_BUSIFFN_REF_DEVICE_HANDLE) +typedef NTSTATUS +USB_BUSIFFN +USB_BUSIFFN_REF_DEVICE_HANDLE( + _In_ PVOID BusContext, + _In_ PUSB_DEVICE_HANDLE DeviceHandle, + _In_ PVOID Object, + _In_ ULONG Tag); typedef USB_BUSIFFN_REF_DEVICE_HANDLE *PUSB_BUSIFFN_REF_DEVICE_HANDLE; -typedef -ULONG -USB_BUSIFFN -USB_BUSIFFN_SET_DEVICE_HANDLE_IDLE_READY_STATE ( - IN PVOID BusContext, - IN PUSB_DEVICE_HANDLE DeviceHandle, - IN ULONG NewIdleReadyState); +_Function_class_(USB_BUSIFFN_SET_DEVICE_HANDLE_IDLE_READY_STATE) +typedef ULONG +USB_BUSIFFN +USB_BUSIFFN_SET_DEVICE_HANDLE_IDLE_READY_STATE( + _In_ PVOID BusContext, + _In_ PUSB_DEVICE_HANDLE DeviceHandle, + _In_ ULONG NewIdleReadyState); typedef USB_BUSIFFN_SET_DEVICE_HANDLE_IDLE_READY_STATE *PUSB_BUSIFFN_SET_DEVICE_HANDLE_IDLE_READY_STATE; -typedef -NTSTATUS -USB_BUSIFFN -USB_BUSIFFN_GET_CONTAINER_ID_FOR_PORT ( - IN PVOID BusContext, - IN USHORT PortNumber, - OUT LPGUID ContainerId); +_Function_class_(USB_BUSIFFN_GET_CONTAINER_ID_FOR_PORT) +typedef NTSTATUS +USB_BUSIFFN +USB_BUSIFFN_GET_CONTAINER_ID_FOR_PORT( + _In_ PVOID BusContext, + _In_ USHORT PortNumber, + _Out_ LPGUID ContainerId); typedef USB_BUSIFFN_GET_CONTAINER_ID_FOR_PORT *PUSB_BUSIFFN_GET_CONTAINER_ID_FOR_PORT; -typedef -VOID -USB_BUSIFFN -USB_BUSIFFN_SET_CONTAINER_ID_FOR_PORT ( - IN PVOID BusContext, - IN USHORT PortNumber, - IN LPGUID ContainerId); +_Function_class_(USB_BUSIFFN_SET_CONTAINER_ID_FOR_PORT) +typedef VOID +USB_BUSIFFN +USB_BUSIFFN_SET_CONTAINER_ID_FOR_PORT( + _In_ PVOID BusContext, + _In_ USHORT PortNumber, + _In_ LPGUID ContainerId); typedef USB_BUSIFFN_SET_CONTAINER_ID_FOR_PORT *PUSB_BUSIFFN_SET_CONTAINER_ID_FOR_PORT; -typedef -NTSTATUS -USB_BUSIFFN -USB_BUSIFFN_ABORT_ALL_DEVICE_PIPES ( - IN PVOID BusContext, - IN PUSB_DEVICE_HANDLE DeviceHandle); +_Function_class_(USB_BUSIFFN_ABORT_ALL_DEVICE_PIPES) +typedef NTSTATUS +USB_BUSIFFN +USB_BUSIFFN_ABORT_ALL_DEVICE_PIPES( + _In_ PVOID BusContext, + _In_ PUSB_DEVICE_HANDLE DeviceHandle); typedef USB_BUSIFFN_ABORT_ALL_DEVICE_PIPES *PUSB_BUSIFFN_ABORT_ALL_DEVICE_PIPES; #define ERRATA_FLAG_RESET_TT_ON_CANCEL 1 @@ -425,13 +431,13 @@ #define USB_BUSIF_HUB_SS_VERSION_0 0x0000 -typedef -VOID -USB_BUSIFFN -USB_BUSIFFN_SET_DEVICE_ERRATA_FLAG ( - IN PVOID BusContext, - IN PUSB_DEVICE_HANDLE DeviceHandle, - IN ULONG DeviceErrataFlag); +_Function_class_(USB_BUSIFFN_SET_DEVICE_ERRATA_FLAG) +typedef VOID +USB_BUSIFFN +USB_BUSIFFN_SET_DEVICE_ERRATA_FLAG( + _In_ PVOID BusContext, + _In_ PUSB_DEVICE_HANDLE DeviceHandle, + _In_ ULONG DeviceErrataFlag); typedef USB_BUSIFFN_SET_DEVICE_ERRATA_FLAG *PUSB_BUSIFFN_SET_DEVICE_ERRATA_FLAG; DEFINE_GUID(USB_BUS_INTERFACE_HUB_GUID,
12 years, 11 months
1
0
0
0
[akhaldi] 55124: [SMSS2] * Fix build.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon Jan 23 17:02:51 2012 New Revision: 55124 URL:
http://svn.reactos.org/svn/reactos?rev=55124&view=rev
Log: [SMSS2] * Fix build. Modified: trunk/reactos/base/system/smss2/smss.h Modified: trunk/reactos/base/system/smss2/smss.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss2/smss.h?r…
============================================================================== --- trunk/reactos/base/system/smss2/smss.h [iso-8859-1] (original) +++ trunk/reactos/base/system/smss2/smss.h [iso-8859-1] Mon Jan 23 17:02:51 2012 @@ -1,7 +1,4 @@ -#pragma once - #define WIN32_NO_STATUS #include <windows.h> #define NTOS_MODE_USER #include <ndk/ntndk.h> -
12 years, 11 months
1
0
0
0
[ion] 55123: [SMSS]: Add a new SMSS2 with the goal of having a Windows-compatible LPC API that will work with the new CSRSS that's already in the tree. So far, it launches the old SMSS and quits.
by ion@svn.reactos.org
Author: ion Date: Mon Jan 23 16:49:52 2012 New Revision: 55123 URL:
http://svn.reactos.org/svn/reactos?rev=55123&view=rev
Log: [SMSS]: Add a new SMSS2 with the goal of having a Windows-compatible LPC API that will work with the new CSRSS that's already in the tree. So far, it launches the old SMSS and quits. Added: trunk/reactos/base/system/smss2/ trunk/reactos/base/system/smss2/CMakeLists.txt (with props) trunk/reactos/base/system/smss2/smss.c (with props) trunk/reactos/base/system/smss2/smss.h (with props) trunk/reactos/base/system/smss2/smss.rc (with props) trunk/reactos/base/system/smss2/smss2.rbuild (with props) Modified: trunk/reactos/base/system/CMakeLists.txt trunk/reactos/base/system/system.rbuild trunk/reactos/boot/bootdata/packages/reactos.dff trunk/reactos/boot/bootdata/txtsetup.sif trunk/reactos/ntoskrnl/ex/init.c Modified: trunk/reactos/base/system/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/CMakeLists.txt…
============================================================================== --- trunk/reactos/base/system/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/base/system/CMakeLists.txt [iso-8859-1] Mon Jan 23 16:49:52 2012 @@ -13,6 +13,7 @@ add_subdirectory(runonce) add_subdirectory(services) add_subdirectory(smss) +add_subdirectory(smss2) add_subdirectory(subst) add_subdirectory(userinit) add_subdirectory(winlogon) Added: trunk/reactos/base/system/smss2/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss2/CMakeLis…
============================================================================== --- trunk/reactos/base/system/smss2/CMakeLists.txt (added) +++ trunk/reactos/base/system/smss2/CMakeLists.txt [iso-8859-1] Mon Jan 23 16:49:52 2012 @@ -1,0 +1,16 @@ + +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/subsys) + +list(APPEND SOURCE + smss.c + smss.rc) + +add_executable(smss2 WIN32 ${SOURCE}) + +target_link_libraries(smss2 nt) + +add_pch(smss2 smss.h) + +set_module_type(smss2 nativecui) +add_importlibs(smss2 ntdll) +add_cd_file(TARGET smss2 DESTINATION reactos/system32 NO_CAB FOR all) Propchange: trunk/reactos/base/system/smss2/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/base/system/smss2/smss.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss2/smss.c?r…
============================================================================== --- trunk/reactos/base/system/smss2/smss.c (added) +++ trunk/reactos/base/system/smss2/smss.c [iso-8859-1] Mon Jan 23 16:49:52 2012 @@ -1,0 +1,327 @@ +/* + * PROJECT: ReactOS Windows-Compatible Session Manager + * LICENSE: BSD 2-Clause License + * FILE: base/system/smss/smss.c + * PURPOSE: Main SMSS Code + * PROGRAMMERS: Alex Ionescu + */ + +/* INCLUDES *******************************************************************/ + +#include "smss.h" +#define NDEBUG +#include "debug.h" + +/* GLOBALS ********************************************************************/ + +typedef struct _INIT_BUFFER +{ + WCHAR DebugBuffer[256]; + RTL_USER_PROCESS_INFORMATION ProcessInfo; +} INIT_BUFFER, *PINIT_BUFFER; + +/* NT Initial User Application */ +WCHAR NtInitialUserProcessBuffer[128] = L"\\SystemRoot\\System32\\smss.exe"; +ULONG NtInitialUserProcessBufferLength = sizeof(NtInitialUserProcessBuffer) - + sizeof(WCHAR); +ULONG NtInitialUserProcessBufferType = REG_SZ; + +UNICODE_STRING NtSystemRoot; + +/* FUNCTIONS ******************************************************************/ + +NTSTATUS +NTAPI +ExpLoadInitialProcess(IN PINIT_BUFFER InitBuffer, + OUT PRTL_USER_PROCESS_PARAMETERS *ProcessParameters, + OUT PCHAR *ProcessEnvironment) +{ + NTSTATUS Status; + SIZE_T Size; + PWSTR p; + UNICODE_STRING NullString = RTL_CONSTANT_STRING(L""); + UNICODE_STRING SmssName, Environment, SystemDriveString, DebugString; + PVOID EnvironmentPtr = NULL; + PRTL_USER_PROCESS_INFORMATION ProcessInformation; + PRTL_USER_PROCESS_PARAMETERS ProcessParams = NULL; + + NullString.Length = sizeof(WCHAR); + + /* Use the initial buffer, after the strings */ + ProcessInformation = &InitBuffer->ProcessInfo; + + /* Allocate memory for the process parameters */ + Size = sizeof(*ProcessParams) + ((MAX_PATH * 6) * sizeof(WCHAR)); + Status = ZwAllocateVirtualMemory(NtCurrentProcess(), + (PVOID*)&ProcessParams, + 0, + &Size, + MEM_COMMIT, + PAGE_READWRITE); + if (!NT_SUCCESS(Status)) + { + /* Failed, display error */ + p = InitBuffer->DebugBuffer; + _snwprintf(p, + 256 * sizeof(WCHAR), + L"INIT: Unable to allocate Process Parameters. 0x%lx", + Status); + RtlInitUnicodeString(&DebugString, p); + ZwDisplayString(&DebugString); + + /* Bugcheck the system */ + return Status; + } + + /* Setup the basic header, and give the process the low 1MB to itself */ + ProcessParams->Length = (ULONG)Size; + ProcessParams->MaximumLength = (ULONG)Size; + ProcessParams->Flags = RTL_USER_PROCESS_PARAMETERS_NORMALIZED | + RTL_USER_PROCESS_PARAMETERS_RESERVE_1MB; + + /* Allocate a page for the environment */ + Size = PAGE_SIZE; + Status = ZwAllocateVirtualMemory(NtCurrentProcess(), + &EnvironmentPtr, + 0, + &Size, + MEM_COMMIT, + PAGE_READWRITE); + if (!NT_SUCCESS(Status)) + { + /* Failed, display error */ + p = InitBuffer->DebugBuffer; + _snwprintf(p, + 256 * sizeof(WCHAR), + L"INIT: Unable to allocate Process Environment. 0x%lx", + Status); + RtlInitUnicodeString(&DebugString, p); + ZwDisplayString(&DebugString); + + /* Bugcheck the system */ + return Status; + } + + /* Write the pointer */ + ProcessParams->Environment = EnvironmentPtr; + + /* Make a buffer for the DOS path */ + p = (PWSTR)(ProcessParams + 1); + ProcessParams->CurrentDirectory.DosPath.Buffer = p; + ProcessParams->CurrentDirectory.DosPath.MaximumLength = MAX_PATH * + sizeof(WCHAR); + + /* Copy the DOS path */ + RtlCopyUnicodeString(&ProcessParams->CurrentDirectory.DosPath, + &NtSystemRoot); + + /* Make a buffer for the DLL Path */ + p = (PWSTR)((PCHAR)ProcessParams->CurrentDirectory.DosPath.Buffer + + ProcessParams->CurrentDirectory.DosPath.MaximumLength); + ProcessParams->DllPath.Buffer = p; + ProcessParams->DllPath.MaximumLength = MAX_PATH * sizeof(WCHAR); + + /* Copy the DLL path and append the system32 directory */ + RtlCopyUnicodeString(&ProcessParams->DllPath, + &ProcessParams->CurrentDirectory.DosPath); + RtlAppendUnicodeToString(&ProcessParams->DllPath, L"\\System32"); + + /* Make a buffer for the image name */ + p = (PWSTR)((PCHAR)ProcessParams->DllPath.Buffer + + ProcessParams->DllPath.MaximumLength); + ProcessParams->ImagePathName.Buffer = p; + ProcessParams->ImagePathName.MaximumLength = MAX_PATH * sizeof(WCHAR); + + /* Make sure the buffer is a valid string which within the given length */ + if ((NtInitialUserProcessBufferType != REG_SZ) || + ((NtInitialUserProcessBufferLength != MAXULONG) && + ((NtInitialUserProcessBufferLength < sizeof(WCHAR)) || + (NtInitialUserProcessBufferLength > + sizeof(NtInitialUserProcessBuffer) - sizeof(WCHAR))))) + { + /* Invalid initial process string, bugcheck */ + return STATUS_INVALID_PARAMETER; + } + + /* Cut out anything after a space */ + p = NtInitialUserProcessBuffer; + while ((*p) && (*p != L' ')) p++; + + /* Set the image path length */ + ProcessParams->ImagePathName.Length = + (USHORT)((PCHAR)p - (PCHAR)NtInitialUserProcessBuffer); + + /* Copy the actual buffer */ + RtlCopyMemory(ProcessParams->ImagePathName.Buffer, + NtInitialUserProcessBuffer, + ProcessParams->ImagePathName.Length); + + /* Null-terminate it */ + ProcessParams->ImagePathName.Buffer[ProcessParams->ImagePathName.Length / + sizeof(WCHAR)] = UNICODE_NULL; + + /* Make a buffer for the command line */ + p = (PWSTR)((PCHAR)ProcessParams->ImagePathName.Buffer + + ProcessParams->ImagePathName.MaximumLength); + ProcessParams->CommandLine.Buffer = p; + ProcessParams->CommandLine.MaximumLength = MAX_PATH * sizeof(WCHAR); + + /* Add the image name to the command line */ + RtlAppendUnicodeToString(&ProcessParams->CommandLine, + NtInitialUserProcessBuffer); + + /* Create the environment string */ + RtlInitEmptyUnicodeString(&Environment, + ProcessParams->Environment, + (USHORT)Size); + + /* Append the DLL path to it */ + RtlAppendUnicodeToString(&Environment, L"Path=" ); + RtlAppendUnicodeStringToString(&Environment, &ProcessParams->DllPath); + RtlAppendUnicodeStringToString(&Environment, &NullString); + + /* Create the system drive string */ + SystemDriveString = NtSystemRoot; + SystemDriveString.Length = 2 * sizeof(WCHAR); + + /* Append it to the environment */ + RtlAppendUnicodeToString(&Environment, L"SystemDrive="); + RtlAppendUnicodeStringToString(&Environment, &SystemDriveString); + RtlAppendUnicodeStringToString(&Environment, &NullString); + + /* Append the system root to the environment */ + RtlAppendUnicodeToString(&Environment, L"SystemRoot="); + RtlAppendUnicodeStringToString(&Environment, &NtSystemRoot); + RtlAppendUnicodeStringToString(&Environment, &NullString); + + /* Create SMSS process */ + SmssName = ProcessParams->ImagePathName; + Status = RtlCreateUserProcess(&SmssName, + OBJ_CASE_INSENSITIVE, + RtlDeNormalizeProcessParams(ProcessParams), + NULL, + NULL, + NULL, + FALSE, + NULL, + NULL, + ProcessInformation); + if (!NT_SUCCESS(Status)) + { + /* Failed, display error */ + p = InitBuffer->DebugBuffer; + _snwprintf(p, + 256 * sizeof(WCHAR), + L"INIT: Unable to create Session Manager. 0x%lx", + Status); + RtlInitUnicodeString(&DebugString, p); + ZwDisplayString(&DebugString); + + /* Bugcheck the system */ + return Status; + } + + /* Resume the thread */ + Status = ZwResumeThread(ProcessInformation->ThreadHandle, NULL); + if (!NT_SUCCESS(Status)) + { + /* Failed, display error */ + p = InitBuffer->DebugBuffer; + _snwprintf(p, + 256 * sizeof(WCHAR), + L"INIT: Unable to resume Session Manager. 0x%lx", + Status); + RtlInitUnicodeString(&DebugString, p); + ZwDisplayString(&DebugString); + + /* Bugcheck the system */ + return Status; + } + + /* Return success */ + *ProcessParameters = ProcessParams; + *ProcessEnvironment = EnvironmentPtr; + return STATUS_SUCCESS; +} + +NTSTATUS +NTAPI +LaunchOldSmss(VOID) +{ + PINIT_BUFFER InitBuffer; + PRTL_USER_PROCESS_PARAMETERS ProcessParameters = NULL; + PRTL_USER_PROCESS_INFORMATION ProcessInfo; + LARGE_INTEGER Timeout; + NTSTATUS Status; + PCHAR Environment; + SIZE_T Size; + + /* Setup system root */ + RtlInitUnicodeString(&NtSystemRoot, SharedUserData->NtSystemRoot); + + /* Allocate the initialization buffer */ + InitBuffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, sizeof(INIT_BUFFER)); + if (!InitBuffer) + { + /* Bugcheck */ + return STATUS_NO_MEMORY; + } + + /* Launch initial process */ + ProcessInfo = &InitBuffer->ProcessInfo; + Status = ExpLoadInitialProcess(InitBuffer, &ProcessParameters, &Environment); + if (!NT_SUCCESS(Status)) + { + /* Failed, display error */ + DPRINT1("INIT: Session Manager failed to load.\n"); + return Status; + } + + /* Wait 5 seconds for initial process to initialize */ + Timeout.QuadPart = Int32x32To64(5, -10000000); + Status = ZwWaitForSingleObject(ProcessInfo->ProcessHandle, FALSE, &Timeout); + if (Status == STATUS_SUCCESS) + { + /* Failed, display error */ + DPRINT1("INIT: Session Manager terminated.\n"); + return STATUS_UNSUCCESSFUL; + } + + /* Close process handles */ + ZwClose(ProcessInfo->ThreadHandle); + ZwClose(ProcessInfo->ProcessHandle); + + /* Free the initial process environment */ + Size = 0; + ZwFreeVirtualMemory(NtCurrentProcess(), + (PVOID*)&Environment, + &Size, + MEM_RELEASE); + + /* Free the initial process parameters */ + Size = 0; + ZwFreeVirtualMemory(NtCurrentProcess(), + (PVOID*)&ProcessParameters, + &Size, + MEM_RELEASE); + return STATUS_SUCCESS; +} + +NTSTATUS +__cdecl +_main(IN INT argc, + IN PCHAR argv[], + IN PCHAR envp[], + IN ULONG DebugFlag) +{ + NTSTATUS Status; + + /* Launch the original SMSS */ + DPRINT1("SMSS-2 Loaded... Launching original SMSS\n"); + Status = LaunchOldSmss(); + + /* Terminate this SMSS for now, later we'll have an LPC thread running */ + return NtTerminateThread(NtCurrentThread(), Status); +} + +/* EOF */ Propchange: trunk/reactos/base/system/smss2/smss.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/base/system/smss2/smss.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss2/smss.h?r…
============================================================================== --- trunk/reactos/base/system/smss2/smss.h (added) +++ trunk/reactos/base/system/smss2/smss.h [iso-8859-1] Mon Jan 23 16:49:52 2012 @@ -1,0 +1,7 @@ +#pragma once + +#define WIN32_NO_STATUS +#include <windows.h> +#define NTOS_MODE_USER +#include <ndk/ntndk.h> + Propchange: trunk/reactos/base/system/smss2/smss.h ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/base/system/smss2/smss.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss2/smss.rc?…
============================================================================== --- trunk/reactos/base/system/smss2/smss.rc (added) +++ trunk/reactos/base/system/smss2/smss.rc [iso-8859-1] Mon Jan 23 16:49:52 2012 @@ -1,0 +1,4 @@ +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Session Manager\0" +#define REACTOS_STR_INTERNAL_NAME "smss\0" +#define REACTOS_STR_ORIGINAL_FILENAME "smss.exe\0" +#include <reactos/version.rc> Propchange: trunk/reactos/base/system/smss2/smss.rc ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/base/system/smss2/smss2.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss2/smss2.rb…
============================================================================== --- trunk/reactos/base/system/smss2/smss2.rbuild (added) +++ trunk/reactos/base/system/smss2/smss2.rbuild [iso-8859-1] Mon Jan 23 16:49:52 2012 @@ -1,0 +1,14 @@ +<?xml version="1.0"?> +<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> +<module name="smss2" type="nativecui" installbase="system32" installname="smss2.exe"> + <bootstrap installbase="$(CDOUTPUT)/system32" /> + <include base="smss2">.</include> + <include base="ReactOS">include/reactos/subsys</include> + <library>nt</library> + <library>ntdll</library> + <pch>smss.h</pch> + <compilationunit name="unit.c"> + <file>smss.c</file> + </compilationunit> + <file>smss.rc</file> +</module> Propchange: trunk/reactos/base/system/smss2/smss2.rbuild ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/base/system/system.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/system.rbuild?…
============================================================================== --- trunk/reactos/base/system/system.rbuild [iso-8859-1] (original) +++ trunk/reactos/base/system/system.rbuild [iso-8859-1] Mon Jan 23 16:49:52 2012 @@ -40,6 +40,9 @@ <directory name="smss"> <xi:include href="smss/smss.rbuild" /> </directory> + <directory name="smss2"> + <xi:include href="smss2/smss2.rbuild" /> + </directory> <directory name="userinit"> <xi:include href="userinit/userinit.rbuild" /> </directory> Modified: trunk/reactos/boot/bootdata/packages/reactos.dff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/packages/rea…
============================================================================== --- trunk/reactos/boot/bootdata/packages/reactos.dff [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/packages/reactos.dff [iso-8859-1] Mon Jan 23 16:49:52 2012 @@ -128,6 +128,7 @@ base\system\runonce\runonce.exe 1 base\system\services\services.exe 1 base\system\smss\smss.exe 1 +base\system\smss2\smss2.exe 1 base\system\userinit\userinit.exe 1 base\system\winlogon\winlogon.exe 1 Modified: trunk/reactos/boot/bootdata/txtsetup.sif URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/txtsetup.sif…
============================================================================== --- trunk/reactos/boot/bootdata/txtsetup.sif [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/txtsetup.sif [iso-8859-1] Mon Jan 23 16:49:52 2012 @@ -48,6 +48,7 @@ pcmcia.sys=,,,,,,,,,,,,4 swenum.sys=,,,,,,,,,,,,4 ntdll.dll=,,,,,,,,,,,,2 +smss2.exe=,,,,,,,,,,,,2 [HardwareIdsDatabase] ;*PNP0A00 = isapnp Modified: trunk/reactos/ntoskrnl/ex/init.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/init.c?rev=551…
============================================================================== --- trunk/reactos/ntoskrnl/ex/init.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/init.c [iso-8859-1] Mon Jan 23 16:49:52 2012 @@ -66,7 +66,7 @@ UNICODE_STRING NtSystemRoot; /* NT Initial User Application */ -WCHAR NtInitialUserProcessBuffer[128] = L"\\SystemRoot\\System32\\smss.exe"; +WCHAR NtInitialUserProcessBuffer[128] = L"\\SystemRoot\\System32\\smss2.exe"; ULONG NtInitialUserProcessBufferLength = sizeof(NtInitialUserProcessBuffer) - sizeof(WCHAR); ULONG NtInitialUserProcessBufferType = REG_SZ;
12 years, 11 months
1
0
0
0
[janderwald] 55122: [USBOHCI] - Fix warning - Remove assert [USBEHCI] - Remove assert
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Jan 23 16:47:19 2012 New Revision: 55122 URL:
http://svn.reactos.org/svn/reactos?rev=55122&view=rev
Log: [USBOHCI] - Fix warning - Remove assert [USBEHCI] - Remove assert Modified: branches/usb-bringup-trunk/drivers/usb/usbehci_new/hcd_controller.cpp branches/usb-bringup-trunk/drivers/usb/usbohci/hcd_controller.cpp branches/usb-bringup-trunk/drivers/usb/usbohci/usb_request.cpp Modified: branches/usb-bringup-trunk/drivers/usb/usbehci_new/hcd_controller.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbehci_new/hcd_controller.cpp [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbehci_new/hcd_controller.cpp [iso-8859-1] Mon Jan 23 16:47:19 2012 @@ -502,7 +502,6 @@ // // not supported // - PC_ASSERT(0); Status = STATUS_NOT_SUPPORTED; } break; Modified: branches/usb-bringup-trunk/drivers/usb/usbohci/hcd_controller.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbohci/hcd_controller.cpp [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbohci/hcd_controller.cpp [iso-8859-1] Mon Jan 23 16:47:19 2012 @@ -502,7 +502,6 @@ // // not supported // - PC_ASSERT(0); Status = STATUS_NOT_SUPPORTED; } break; Modified: branches/usb-bringup-trunk/drivers/usb/usbohci/usb_request.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbohci/usb_request.cpp [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbohci/usb_request.cpp [iso-8859-1] Mon Jan 23 16:47:19 2012 @@ -654,7 +654,7 @@ CUSBRequest::BuildIsochronousEndpoint( POHCI_ENDPOINT_DESCRIPTOR * OutEndpointDescriptor) { - POHCI_ISO_TD FirstDescriptor, PreviousDescriptor = NULL, CurrentDescriptor; + POHCI_ISO_TD FirstDescriptor = NULL, PreviousDescriptor = NULL, CurrentDescriptor = NULL; POHCI_ENDPOINT_DESCRIPTOR EndpointDescriptor; ULONG Index = 0, SubIndex, NumberOfPackets, PageOffset, Page; NTSTATUS Status;
12 years, 11 months
1
0
0
0
[cgutman] 55121: [USBEHCI] - Remove unused variable
by cgutman@svn.reactos.org
Author: cgutman Date: Mon Jan 23 16:29:43 2012 New Revision: 55121 URL:
http://svn.reactos.org/svn/reactos?rev=55121&view=rev
Log: [USBEHCI] - Remove unused variable Modified: branches/usb-bringup-trunk/drivers/usb/usbehci_new/usb_queue.cpp Modified: branches/usb-bringup-trunk/drivers/usb/usbehci_new/usb_queue.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbehci_new/usb_queue.cpp [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbehci_new/usb_queue.cpp [iso-8859-1] Mon Jan 23 16:29:43 2012 @@ -575,8 +575,6 @@ PQUEUE_HEAD CurrentQH, NTSTATUS Status) { - KIRQL OldLevel; - // // now unlink the queue head // FIXME: implement chained queue heads
12 years, 11 months
1
0
0
0
[janderwald] 55120: [USBHUB] - Silent traces
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Jan 23 16:25:43 2012 New Revision: 55120 URL:
http://svn.reactos.org/svn/reactos?rev=55120&view=rev
Log: [USBHUB] - Silent traces Modified: branches/usb-bringup-trunk/drivers/usb/usbhub_new/usbhub.h Modified: branches/usb-bringup-trunk/drivers/usb/usbhub_new/usbhub.h URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbhub_new/usbhub.h [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbhub_new/usbhub.h [iso-8859-1] Mon Jan 23 16:25:43 2012 @@ -1,5 +1,6 @@ #pragma once +#define NDEBUG #include <ntifs.h> #include <ntddk.h> #include <wdmguid.h>
12 years, 11 months
1
0
0
0
[cgutman] 55119: [USB-BRINGUP-TRUNK] - Allow surprise removal of HID devices - Don't assemble useless empty resource lists
by cgutman@svn.reactos.org
Author: cgutman Date: Mon Jan 23 16:22:43 2012 New Revision: 55119 URL:
http://svn.reactos.org/svn/reactos?rev=55119&view=rev
Log: [USB-BRINGUP-TRUNK] - Allow surprise removal of HID devices - Don't assemble useless empty resource lists Modified: branches/usb-bringup-trunk/drivers/hid/hidusb/hidusb.c branches/usb-bringup-trunk/drivers/usb/usbhub_new/pdo.c Modified: branches/usb-bringup-trunk/drivers/hid/hidusb/hidusb.c URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/hid/h…
============================================================================== --- branches/usb-bringup-trunk/drivers/hid/hidusb/hidusb.c [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/hid/hidusb/hidusb.c [iso-8859-1] Mon Jan 23 16:22:43 2012 @@ -1504,6 +1504,11 @@ // IoStack->Parameters.DeviceCapabilities.Capabilities->DeviceD1 = TRUE; IoStack->Parameters.DeviceCapabilities.Capabilities->DeviceD2 = TRUE; + + // + // don't need to safely remove + // + IoStack->Parameters.DeviceCapabilities.Capabilities->SurpriseRemovalOK = TRUE; } // Modified: branches/usb-bringup-trunk/drivers/usb/usbhub_new/pdo.c URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbhub_new/pdo.c [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbhub_new/pdo.c [iso-8859-1] Mon Jan 23 16:22:43 2012 @@ -517,44 +517,18 @@ } case IRP_MN_QUERY_RESOURCES: { - PCM_RESOURCE_LIST ResourceList; - DPRINT1("IRP_MJ_PNP / IRP_MN_QUERY_RESOURCES\n"); - ResourceList = ExAllocatePool(PagedPool, sizeof(CM_RESOURCE_LIST)); - if (!ResourceList) - { - DPRINT1("ExAllocatePool() failed\n"); - Status = STATUS_INSUFFICIENT_RESOURCES; - } - else - { - ResourceList->Count = 0; - Information = (ULONG_PTR)ResourceList; - Status = STATUS_SUCCESS; - } + + Information = Irp->IoStatus.Information; + Status = Irp->IoStatus.Status; break; } case IRP_MN_QUERY_RESOURCE_REQUIREMENTS: { - PIO_RESOURCE_REQUIREMENTS_LIST ResourceList; DPRINT1("IRP_MJ_PNP / IRP_MN_QUERY_RESOURCE_REQUIREMENTS\n"); - ResourceList = ExAllocatePool(PagedPool, sizeof(IO_RESOURCE_REQUIREMENTS_LIST)); - if (!ResourceList) - { - DPRINT1("ExAllocatePool() failed\n"); - Status = STATUS_INSUFFICIENT_RESOURCES; - } - else - { - RtlZeroMemory(ResourceList, sizeof(IO_RESOURCE_REQUIREMENTS_LIST)); - ResourceList->ListSize = sizeof(IO_RESOURCE_REQUIREMENTS_LIST); - ResourceList->AlternativeLists = 1; - ResourceList->List->Version = 1; - ResourceList->List->Revision = 1; - ResourceList->List->Count = 0; - Information = (ULONG_PTR)ResourceList; - Status = STATUS_SUCCESS; - } + + Information = Irp->IoStatus.Information; + Status = Irp->IoStatus.Status; break; } case IRP_MN_QUERY_DEVICE_TEXT:
12 years, 11 months
1
0
0
0
[janderwald] 55118: [USBSTOR] - Silent traces
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Jan 23 16:22:33 2012 New Revision: 55118 URL:
http://svn.reactos.org/svn/reactos?rev=55118&view=rev
Log: [USBSTOR] - Silent traces Modified: branches/usb-bringup-trunk/drivers/usb/usbstor/usbstor.h Modified: branches/usb-bringup-trunk/drivers/usb/usbstor/usbstor.h URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbstor/usbstor.h [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbstor/usbstor.h [iso-8859-1] Mon Jan 23 16:22:33 2012 @@ -2,7 +2,7 @@ #pragma once #include <ntddk.h> -//#define NDEBUG +#define NDEBUG #include <debug.h> #include <usbdi.h> #include <hubbusif.h>
12 years, 11 months
1
0
0
0
← Newer
1
...
21
22
23
24
25
26
27
...
56
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Results per page:
10
25
50
100
200