diff --git a/2.x/trunk/phlib/basesup.c b/2.x/trunk/phlib/basesup.c index 0f912305a..cef94c721 100644 --- a/2.x/trunk/phlib/basesup.c +++ b/2.x/trunk/phlib/basesup.c @@ -3083,8 +3083,8 @@ PPH_HASHTABLE PhCreateSimpleHashtable( PVOID PhAddItemSimpleHashtable( __inout PPH_HASHTABLE SimpleHashtable, - __in PVOID Key, - __in PVOID Value + __in_opt PVOID Key, + __in_opt PVOID Value ) { PH_KEY_VALUE_PAIR entry; @@ -3100,7 +3100,7 @@ PVOID PhAddItemSimpleHashtable( PPVOID PhFindItemSimpleHashtable( __in PPH_HASHTABLE SimpleHashtable, - __in PVOID Key + __in_opt PVOID Key ) { PH_KEY_VALUE_PAIR lookupEntry; @@ -3117,7 +3117,7 @@ PPVOID PhFindItemSimpleHashtable( BOOLEAN PhRemoveItemSimpleHashtable( __inout PPH_HASHTABLE SimpleHashtable, - __in PVOID Key + __in_opt PVOID Key ) { PH_KEY_VALUE_PAIR lookupEntry; diff --git a/2.x/trunk/phlib/handle.c b/2.x/trunk/phlib/handle.c index 6588818e8..2e9931eae 100644 --- a/2.x/trunk/phlib/handle.c +++ b/2.x/trunk/phlib/handle.c @@ -420,6 +420,8 @@ NTSTATUS PhQueryInformationHandleTable( break; default: status = STATUS_INVALID_INFO_CLASS; + returnLength = 0; + break; } if (ReturnLength) @@ -892,6 +894,9 @@ PPH_HANDLE_TABLE_ENTRY PhpLookupHandleTableEntry( entry = &table0[PH_HANDLE_VALUE_LEVEL0(HandleValue)]; } break; + default: + assert(FALSE); + break; } return entry; diff --git a/2.x/trunk/phlib/include/ph.h b/2.x/trunk/phlib/include/ph.h index 3ec520649..46771107d 100644 --- a/2.x/trunk/phlib/include/ph.h +++ b/2.x/trunk/phlib/include/ph.h @@ -2466,7 +2466,7 @@ PHLIBAPI VOID PhShellExecute( __in HWND hWnd, __in PWSTR FileName, - __in PWSTR Parameters + __in_opt PWSTR Parameters ); #define PH_SHELL_EXECUTE_ADMIN 0x1 @@ -2476,7 +2476,7 @@ PHLIBAPI BOOLEAN PhShellExecuteEx( __in HWND hWnd, __in PWSTR FileName, - __in PWSTR Parameters, + __in_opt PWSTR Parameters, __in ULONG ShowWindowType, __in ULONG Flags, __in_opt ULONG Timeout, diff --git a/2.x/trunk/phlib/include/phbase.h b/2.x/trunk/phlib/include/phbase.h index a91d51f68..1239a82ef 100644 --- a/2.x/trunk/phlib/include/phbase.h +++ b/2.x/trunk/phlib/include/phbase.h @@ -2167,8 +2167,8 @@ PVOID NTAPI PhAddItemSimpleHashtable( __inout PPH_HASHTABLE SimpleHashtable, - __in PVOID Key, - __in PVOID Value + __in_opt PVOID Key, + __in_opt PVOID Value ); PHLIBAPI @@ -2176,7 +2176,7 @@ PPVOID NTAPI PhFindItemSimpleHashtable( __in PPH_HASHTABLE SimpleHashtable, - __in PVOID Key + __in_opt PVOID Key ); PHLIBAPI @@ -2184,7 +2184,7 @@ BOOLEAN NTAPI PhRemoveItemSimpleHashtable( __inout PPH_HASHTABLE SimpleHashtable, - __in PVOID Key + __in_opt PVOID Key ); // free list diff --git a/2.x/trunk/phlib/include/phgui.h b/2.x/trunk/phlib/include/phgui.h index ef6fc228d..12ae12a76 100644 --- a/2.x/trunk/phlib/include/phgui.h +++ b/2.x/trunk/phlib/include/phgui.h @@ -631,9 +631,9 @@ FORCEINLINE ULONG PhFromListViewColumnAlign( __in ULONG Format ) { - if (Format & LVCFMT_LEFT) + if (Format == LVCFMT_LEFT) return PH_ALIGN_LEFT; - else if (Format & LVCFMT_RIGHT) + else if (Format == LVCFMT_RIGHT) return PH_ALIGN_RIGHT; else return PH_ALIGN_CENTER; diff --git a/2.x/trunk/phlib/include/phsup.h b/2.x/trunk/phlib/include/phsup.h index 57c211aa4..2d4fb9677 100644 --- a/2.x/trunk/phlib/include/phsup.h +++ b/2.x/trunk/phlib/include/phsup.h @@ -330,10 +330,10 @@ FORCEINLINE PLARGE_INTEGER PhTimeoutFromMilliseconds( #ifdef _M_IX86 -FORCEINLINE PVOID _InterlockedCompareExchangePointer( - __inout PVOID volatile *Destination, - __in PVOID Exchange, - __in PVOID Comparand +FORCEINLINE void *_InterlockedCompareExchangePointer( + void *volatile *Destination, + void *Exchange, + void *Comparand ) { return (PVOID)_InterlockedCompareExchange( @@ -343,9 +343,9 @@ FORCEINLINE PVOID _InterlockedCompareExchangePointer( ); } -FORCEINLINE PVOID _InterlockedExchangePointer( - __inout PVOID volatile *Destination, - __in PVOID Exchange +FORCEINLINE void *_InterlockedExchangePointer( + void *volatile *Destination, + void *Exchange ) { return (PVOID)_InterlockedExchange( diff --git a/2.x/trunk/phlib/support.c b/2.x/trunk/phlib/support.c index 007f91d6e..49e41296a 100644 --- a/2.x/trunk/phlib/support.c +++ b/2.x/trunk/phlib/support.c @@ -1896,7 +1896,7 @@ NTSTATUS PhCreateProcessWin32Ex( VOID PhShellExecute( __in HWND hWnd, __in PWSTR FileName, - __in PWSTR Parameters + __in_opt PWSTR Parameters ) { SHELLEXECUTEINFO info = { sizeof(info) }; @@ -1916,7 +1916,7 @@ VOID PhShellExecute( BOOLEAN PhShellExecuteEx( __in HWND hWnd, __in PWSTR FileName, - __in PWSTR Parameters, + __in_opt PWSTR Parameters, __in ULONG ShowWindowType, __in ULONG Flags, __in_opt ULONG Timeout,