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
August 2013
----- 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
10 participants
327 discussions
Start a n
N
ew thread
[akhaldi] 59762: [PSDK] * Annotate wincon.h.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Aug 17 17:20:57 2013 New Revision: 59762 URL:
http://svn.reactos.org/svn/reactos?rev=59762&view=rev
Log: [PSDK] * Annotate wincon.h. Modified: trunk/reactos/include/psdk/wincon.h Modified: trunk/reactos/include/psdk/wincon.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/wincon.h?rev=…
============================================================================== --- trunk/reactos/include/psdk/wincon.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/wincon.h [iso-8859-1] Sat Aug 17 17:20:57 2013 @@ -340,18 +340,55 @@ DWORD WINAPI GetConsoleAliasExesLengthW(VOID); #endif -HANDLE WINAPI CreateConsoleScreenBuffer(_In_ DWORD, _In_ DWORD, _In_opt_ CONST SECURITY_ATTRIBUTES*, _In_ DWORD, _Reserved_ LPVOID); -BOOL WINAPI FillConsoleOutputAttribute(_In_ HANDLE, _In_ WORD, _In_ DWORD, _In_ COORD, _Out_ PDWORD); -BOOL WINAPI FillConsoleOutputCharacterA(_In_ HANDLE, _In_ CHAR, _In_ DWORD, _In_ COORD, _Out_ PDWORD); -BOOL WINAPI FillConsoleOutputCharacterW(_In_ HANDLE, _In_ WCHAR, _In_ DWORD, _In_ COORD, _Out_ PDWORD); +HANDLE +WINAPI +CreateConsoleScreenBuffer( + _In_ DWORD, + _In_ DWORD, + _In_opt_ CONST SECURITY_ATTRIBUTES*, + _In_ DWORD, + _Reserved_ LPVOID); + +BOOL +WINAPI +FillConsoleOutputAttribute( + _In_ HANDLE, + _In_ WORD, + _In_ DWORD, + _In_ COORD, + _Out_ PDWORD); + +BOOL +WINAPI +FillConsoleOutputCharacterA( + _In_ HANDLE, + _In_ CHAR, + _In_ DWORD, + _In_ COORD, + _Out_ PDWORD); + +BOOL +WINAPI +FillConsoleOutputCharacterW( + _In_ HANDLE, + _In_ WCHAR, + _In_ DWORD, + _In_ COORD, + _Out_ PDWORD); + BOOL WINAPI FlushConsoleInputBuffer(_In_ HANDLE); BOOL WINAPI FreeConsole(VOID); BOOL WINAPI GenerateConsoleCtrlEvent(_In_ DWORD, _In_ DWORD); UINT WINAPI GetConsoleCP(VOID); BOOL WINAPI GetConsoleCursorInfo(_In_ HANDLE, _Out_ PCONSOLE_CURSOR_INFO); -BOOL WINAPI GetConsoleMode(HANDLE,PDWORD); +BOOL WINAPI GetConsoleMode(_In_ HANDLE, _Out_ PDWORD); UINT WINAPI GetConsoleOutputCP(VOID); -BOOL WINAPI GetConsoleScreenBufferInfo(_In_ HANDLE, _Out_ PCONSOLE_SCREEN_BUFFER_INFO); + +BOOL +WINAPI +GetConsoleScreenBufferInfo( + _In_ HANDLE, + _Out_ PCONSOLE_SCREEN_BUFFER_INFO); /* Undocumented, see
http://blog.airesoft.co.uk/2012/10/things-ms-can-do-that-they-dont-tell-you…
*/ BOOL WINAPI InvalidateConsoleDIBits(_In_ HANDLE, _In_ PSMALL_RECT); @@ -382,15 +419,29 @@ _Out_ PCONSOLE_FONT_INFO lpConsoleCurrentFont); #if (_WIN32_WINNT >= 0x0500) + HWND WINAPI GetConsoleWindow(VOID); BOOL APIENTRY GetConsoleDisplayMode(_Out_ LPDWORD lpModeFlags); -BOOL APIENTRY SetConsoleDisplayMode(_In_ HANDLE hConsoleOutput, _In_ DWORD dwFlags, _Out_opt_ PCOORD lpNewScreenBufferDimensions); -#endif + +BOOL +APIENTRY +SetConsoleDisplayMode( + _In_ HANDLE hConsoleOutput, + _In_ DWORD dwFlags, + _Out_opt_ PCOORD lpNewScreenBufferDimensions); + +#endif + COORD WINAPI GetLargestConsoleWindowSize(_In_ HANDLE); -BOOL WINAPI GetNumberOfConsoleInputEvents(HANDLE,PDWORD); +BOOL WINAPI GetNumberOfConsoleInputEvents(_In_ HANDLE, _Out_ PDWORD); BOOL WINAPI GetNumberOfConsoleMouseButtons(_Out_ PDWORD); -BOOL WINAPI PeekConsoleInputA(HANDLE,PINPUT_RECORD,DWORD,PDWORD); +BOOL +WINAPI PeekConsoleInputA( + _In_ HANDLE hConsoleInput, + _Out_writes_(nLength) PINPUT_RECORD lpBuffer, + _In_ DWORD nLength, + _Out_ LPDWORD lpNumberOfEventsRead); BOOL WINAPI @@ -400,10 +451,43 @@ _In_ DWORD nLength, _Out_ LPDWORD lpNumberOfEventsRead); -BOOL WINAPI ReadConsoleA(HANDLE,PVOID,DWORD,PDWORD,PCONSOLE_READCONSOLE_CONTROL); -BOOL WINAPI ReadConsoleW(HANDLE,PVOID,DWORD,PDWORD,PCONSOLE_READCONSOLE_CONTROL); -BOOL WINAPI ReadConsoleInputA(HANDLE,PINPUT_RECORD,DWORD,PDWORD); -BOOL WINAPI ReadConsoleInputW(HANDLE,PINPUT_RECORD,DWORD,PDWORD); +_Success_(return != 0) +BOOL +WINAPI +ReadConsoleA( + _In_ HANDLE hConsoleInput, + _Out_writes_bytes_to_(nNumberOfCharsToRead * sizeof(CHAR), *lpNumberOfCharsRead * sizeof(CHAR)) LPVOID lpBuffer, + _In_ DWORD nNumberOfCharsToRead, + _Out_ _Deref_out_range_(<= , nNumberOfCharsToRead) LPDWORD lpNumberOfCharsRead, + _In_opt_ PCONSOLE_READCONSOLE_CONTROL pInputControl); + +_Success_(return != 0) +BOOL +WINAPI +ReadConsoleW( + _In_ HANDLE hConsoleInput, + _Out_writes_bytes_to_(nNumberOfCharsToRead * sizeof(WCHAR), *lpNumberOfCharsRead * sizeof(WCHAR)) LPVOID lpBuffer, + _In_ DWORD nNumberOfCharsToRead, + _Out_ _Deref_out_range_(<= , nNumberOfCharsToRead) LPDWORD lpNumberOfCharsRead, + _In_opt_ PCONSOLE_READCONSOLE_CONTROL pInputControl); + +_Success_(return != 0) +BOOL +WINAPI +ReadConsoleInputA( + _In_ HANDLE hConsoleInput, + _Out_writes_to_(nLength, *lpNumberOfEventsRead) PINPUT_RECORD lpBuffer, + _In_ DWORD nLength, + _Out_ _Deref_out_range_(<= , nLength) LPDWORD lpNumberOfEventsRead); + +_Success_(return != 0) +BOOL +WINAPI +ReadConsoleInputW( + _In_ HANDLE hConsoleInput, + _Out_writes_to_(nLength, *lpNumberOfEventsRead) PINPUT_RECORD lpBuffer, + _In_ DWORD nLength, + _Out_ _Deref_out_range_(<= , nLength) LPDWORD lpNumberOfEventsRead); BOOL WINAPI @@ -450,20 +534,42 @@ _In_ COORD dwBufferCoord, _Inout_ PSMALL_RECT lpReadRegion); -BOOL WINAPI ScrollConsoleScreenBufferA(_In_ HANDLE, _In_ const SMALL_RECT*, _In_opt_ const SMALL_RECT*, _In_ COORD, _In_ const CHAR_INFO*); -BOOL WINAPI ScrollConsoleScreenBufferW(_In_ HANDLE, _In_ const SMALL_RECT*, _In_opt_ const SMALL_RECT*, _In_ COORD, _In_ const CHAR_INFO*); +BOOL +WINAPI +ScrollConsoleScreenBufferA( + _In_ HANDLE, + _In_ const SMALL_RECT*, + _In_opt_ const SMALL_RECT*, + _In_ COORD, + _In_ const CHAR_INFO*); + +BOOL +WINAPI +ScrollConsoleScreenBufferW( + _In_ HANDLE, + _In_ const SMALL_RECT*, + _In_opt_ const SMALL_RECT*, + _In_ COORD, + _In_ const CHAR_INFO*); + BOOL WINAPI SetConsoleActiveScreenBuffer(_In_ HANDLE); BOOL WINAPI SetConsoleCP(_In_ UINT); -BOOL WINAPI SetConsoleCtrlHandler(PHANDLER_ROUTINE,BOOL); +BOOL WINAPI SetConsoleCtrlHandler(_In_opt_ PHANDLER_ROUTINE, _In_ BOOL); BOOL WINAPI SetConsoleCursorInfo(_In_ HANDLE, _In_ const CONSOLE_CURSOR_INFO*); BOOL WINAPI SetConsoleCursorPosition(_In_ HANDLE, _In_ COORD); -BOOL WINAPI SetConsoleMode(HANDLE,DWORD); +BOOL WINAPI SetConsoleMode(_In_ HANDLE, _In_ DWORD); BOOL WINAPI SetConsoleOutputCP(_In_ UINT); BOOL WINAPI SetConsoleScreenBufferSize(_In_ HANDLE, _In_ COORD); BOOL WINAPI SetConsoleTextAttribute(_In_ HANDLE, _In_ WORD); BOOL WINAPI SetConsoleTitleA(_In_ LPCSTR); BOOL WINAPI SetConsoleTitleW(_In_ LPCWSTR); -BOOL WINAPI SetConsoleWindowInfo(_In_ HANDLE, _In_ BOOL, _In_ const SMALL_RECT*); + +BOOL +WINAPI +SetConsoleWindowInfo( + _In_ HANDLE, + _In_ BOOL, + _In_ const SMALL_RECT*); /* Undocumented, see
http://undoc.airesoft.co.uk/kernel32.dll/ConsoleMenuControl.php
*/ HMENU WINAPI ConsoleMenuControl(_In_ HANDLE, _In_ DWORD, _In_ DWORD); @@ -476,8 +582,23 @@ /* Undocumented, see
http://comments.gmane.org/gmane.comp.lang.harbour.devel/27844
*/ BOOL WINAPI SetConsolePalette(_In_ HANDLE, _In_ HPALETTE, _In_ UINT); -BOOL WINAPI WriteConsoleA(HANDLE,CONST VOID*,DWORD,LPDWORD,LPVOID); -BOOL WINAPI WriteConsoleW(HANDLE,CONST VOID*,DWORD,LPDWORD,LPVOID); +BOOL +WINAPI +WriteConsoleA( + _In_ HANDLE hConsoleOutput, + _In_reads_(nNumberOfCharsToWrite) CONST VOID *lpBuffer, + _In_ DWORD nNumberOfCharsToWrite, + _Out_opt_ LPDWORD lpNumberOfCharsWritten, + _Reserved_ LPVOID lpReserved); + +BOOL +WINAPI +WriteConsoleW( + _In_ HANDLE hConsoleOutput, + _In_reads_(nNumberOfCharsToWrite) CONST VOID *lpBuffer, + _In_ DWORD nNumberOfCharsToWrite, + _Out_opt_ LPDWORD lpNumberOfCharsWritten, + _Reserved_ LPVOID lpReserved); BOOL WINAPI @@ -590,4 +711,5 @@ #ifdef __cplusplus } #endif -#endif + +#endif /* _WINCON_H */
11 years, 4 months
1
0
0
0
[akhaldi] 59761: [PSDK] * Annotate oleauto.h.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Aug 17 15:39:59 2013 New Revision: 59761 URL:
http://svn.reactos.org/svn/reactos?rev=59761&view=rev
Log: [PSDK] * Annotate oleauto.h. Modified: trunk/reactos/include/psdk/oleauto.h Modified: trunk/reactos/include/psdk/oleauto.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/oleauto.h?rev…
============================================================================== --- trunk/reactos/include/psdk/oleauto.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/oleauto.h [iso-8859-1] Sat Aug 17 15:39:59 2013 @@ -38,60 +38,158 @@ ULONG WINAPI OaBuildVersion(void); /* BSTR functions */ -BSTR WINAPI SysAllocString(const OLECHAR*); -BSTR WINAPI SysAllocStringByteLen(LPCSTR,UINT); -BSTR WINAPI SysAllocStringLen(const OLECHAR*,UINT); -void WINAPI SysFreeString(BSTR); -INT WINAPI SysReAllocString(LPBSTR,const OLECHAR*); -int WINAPI SysReAllocStringLen(BSTR*,const OLECHAR*,UINT); -UINT WINAPI SysStringByteLen(BSTR); -UINT WINAPI SysStringLen(BSTR); +BSTR WINAPI SysAllocString(_In_opt_z_ const OLECHAR*); +BSTR WINAPI SysAllocStringByteLen(_In_opt_z_ LPCSTR, _In_ UINT); + +_Ret_writes_maybenull_z_(ui + 1) +BSTR +WINAPI +SysAllocStringLen( + _In_reads_opt_(ui) const OLECHAR*, + UINT ui); + +void WINAPI SysFreeString(_In_opt_ BSTR); + +INT +WINAPI +SysReAllocString( + _Inout_ _At_(*pbstr, _Pre_z_ _Post_z_ _Post_readable_size_(_String_length_(psz) + 1)) LPBSTR pbstr, + _In_opt_z_ const OLECHAR *psz); + +_Check_return_ +int +WINAPI +SysReAllocStringLen( + _Inout_ _At_(*pbstr, _Pre_z_ _Post_z_ _Post_readable_size_(len + 1)) BSTR *pbstr, + _In_opt_z_ const OLECHAR*, + _In_ UINT len); + +_Post_equal_to_(_String_length_(bstr) * sizeof(OLECHAR)) +UINT +WINAPI +SysStringByteLen( + _In_opt_ BSTR bstr); + +_Post_equal_to_(pbstr == NULL ? 0 : _String_length_(pbstr)) +UINT +WINAPI +SysStringLen( + _In_opt_ BSTR pbstr); /* IErrorInfo helpers */ -HRESULT WINAPI SetErrorInfo(ULONG,IErrorInfo*); -HRESULT WINAPI GetErrorInfo(ULONG,IErrorInfo**); -HRESULT WINAPI CreateErrorInfo(ICreateErrorInfo**); +HRESULT WINAPI SetErrorInfo(_In_ ULONG, _In_opt_ IErrorInfo*); +_Check_return_ HRESULT WINAPI GetErrorInfo(_In_ ULONG, _Outptr_ IErrorInfo**); +_Check_return_ HRESULT WINAPI CreateErrorInfo(_Outptr_ ICreateErrorInfo**); /* SafeArray functions */ -SAFEARRAY* WINAPI SafeArrayCreate(VARTYPE,UINT,SAFEARRAYBOUND*); -SAFEARRAY* WINAPI SafeArrayCreateEx(VARTYPE,UINT,SAFEARRAYBOUND*,LPVOID); -SAFEARRAY* WINAPI SafeArrayCreateVector(VARTYPE,LONG,ULONG); -SAFEARRAY* WINAPI SafeArrayCreateVectorEx(VARTYPE,LONG,ULONG,LPVOID); - -HRESULT WINAPI SafeArrayAllocDescriptor(UINT,SAFEARRAY**); -HRESULT WINAPI SafeArrayAllocDescriptorEx(VARTYPE,UINT,SAFEARRAY**); -HRESULT WINAPI SafeArrayAllocData(SAFEARRAY*); -HRESULT WINAPI SafeArrayDestroyDescriptor(SAFEARRAY*); -HRESULT WINAPI SafeArrayPutElement(SAFEARRAY*,LONG*,void*); -HRESULT WINAPI SafeArrayGetElement(SAFEARRAY*,LONG*,void*); -HRESULT WINAPI SafeArrayLock(SAFEARRAY*); -HRESULT WINAPI SafeArrayUnlock(SAFEARRAY*); -HRESULT WINAPI SafeArrayGetUBound(SAFEARRAY*,UINT,LONG*); -HRESULT WINAPI SafeArrayGetLBound(SAFEARRAY*,UINT,LONG*); -UINT WINAPI SafeArrayGetDim(SAFEARRAY*); -UINT WINAPI SafeArrayGetElemsize(SAFEARRAY*); -HRESULT WINAPI SafeArrayGetVartype(SAFEARRAY*,VARTYPE*); -HRESULT WINAPI SafeArrayAccessData(SAFEARRAY*,void**); -HRESULT WINAPI SafeArrayUnaccessData(SAFEARRAY*); -HRESULT WINAPI SafeArrayPtrOfIndex(SAFEARRAY*,LONG*,void **); -HRESULT WINAPI SafeArrayCopyData(SAFEARRAY*,SAFEARRAY*); -HRESULT WINAPI SafeArrayDestroyData(SAFEARRAY*); -HRESULT WINAPI SafeArrayDestroy(SAFEARRAY*); -HRESULT WINAPI SafeArrayCopy(SAFEARRAY*,SAFEARRAY**); -HRESULT WINAPI SafeArrayRedim(SAFEARRAY*,SAFEARRAYBOUND*); -HRESULT WINAPI SafeArraySetRecordInfo(SAFEARRAY*,IRecordInfo*); -HRESULT WINAPI SafeArrayGetRecordInfo(SAFEARRAY*,IRecordInfo**); -HRESULT WINAPI SafeArraySetIID(SAFEARRAY*,REFGUID); -HRESULT WINAPI SafeArrayGetIID(SAFEARRAY*,GUID*); - -HRESULT WINAPI VectorFromBstr(BSTR,SAFEARRAY**); -HRESULT WINAPI BstrFromVector(SAFEARRAY*,BSTR*); + +SAFEARRAY* +WINAPI +SafeArrayCreate( + _In_ VARTYPE, + _In_ UINT, + _In_ SAFEARRAYBOUND*); + +SAFEARRAY* +WINAPI +SafeArrayCreateEx( + _In_ VARTYPE, + _In_ UINT, + _In_ SAFEARRAYBOUND*, + _In_ LPVOID); + +SAFEARRAY* +WINAPI +SafeArrayCreateVector( + _In_ VARTYPE, + _In_ LONG, + _In_ ULONG); + +SAFEARRAY* +WINAPI +SafeArrayCreateVectorEx( + _In_ VARTYPE, + _In_ LONG, + _In_ ULONG, + _In_ LPVOID); + +HRESULT WINAPI SafeArrayAllocDescriptor(_In_ UINT, _Outptr_ SAFEARRAY**); + +HRESULT +WINAPI +SafeArrayAllocDescriptorEx( + _In_ VARTYPE, + _In_ UINT, + _Outptr_ SAFEARRAY**); + +HRESULT WINAPI SafeArrayAllocData(_In_ SAFEARRAY*); +HRESULT WINAPI SafeArrayDestroyDescriptor(_In_ SAFEARRAY*); + +_Check_return_ +HRESULT +WINAPI +SafeArrayPutElement( + _In_ SAFEARRAY*, + LONG*, + _In_ void*); + +HRESULT WINAPI SafeArrayGetElement(_In_ SAFEARRAY*, LONG*, _Out_ void*); +HRESULT WINAPI SafeArrayLock(_In_ SAFEARRAY*); +HRESULT WINAPI SafeArrayUnlock(_In_ SAFEARRAY*); +HRESULT WINAPI SafeArrayGetUBound(_In_ SAFEARRAY*, _In_ UINT, _Out_ LONG*); +HRESULT WINAPI SafeArrayGetLBound(_In_ SAFEARRAY*, _In_ UINT, _Out_ LONG*); +UINT WINAPI SafeArrayGetDim(_In_ SAFEARRAY*); +UINT WINAPI SafeArrayGetElemsize(_In_ SAFEARRAY*); +HRESULT WINAPI SafeArrayGetVartype(_In_ SAFEARRAY*, _Out_ VARTYPE*); +HRESULT WINAPI SafeArrayAccessData(_In_ SAFEARRAY*, void**); +HRESULT WINAPI SafeArrayUnaccessData(_In_ SAFEARRAY*); + +HRESULT +WINAPI +SafeArrayPtrOfIndex( + _In_ SAFEARRAY *psa, + _In_reads_(psa->cDims) LONG*, + _Outptr_result_bytebuffer_(psa->cbElements) void **); + +_Check_return_ +HRESULT +WINAPI +SafeArrayCopyData( + _In_ SAFEARRAY*, + _In_ SAFEARRAY*); + +HRESULT WINAPI SafeArrayDestroyData(_In_ SAFEARRAY*); +HRESULT WINAPI SafeArrayDestroy(_In_ SAFEARRAY*); + +_Check_return_ +HRESULT +WINAPI +SafeArrayCopy( + _In_ SAFEARRAY*, + _Outptr_ SAFEARRAY**); + +HRESULT WINAPI SafeArrayRedim(_Inout_ SAFEARRAY*, _In_ SAFEARRAYBOUND*); +HRESULT WINAPI SafeArraySetRecordInfo(_In_ SAFEARRAY*, _In_ IRecordInfo*); +HRESULT WINAPI SafeArrayGetRecordInfo(_In_ SAFEARRAY*, _Outptr_ IRecordInfo**); +HRESULT WINAPI SafeArraySetIID(_In_ SAFEARRAY*, _In_ REFGUID); +HRESULT WINAPI SafeArrayGetIID(_In_ SAFEARRAY*, _Out_ GUID*); + +_Check_return_ HRESULT WINAPI VectorFromBstr(_In_ BSTR, _Outptr_ SAFEARRAY**); +_Check_return_ HRESULT WINAPI BstrFromVector(_In_ SAFEARRAY*, _Out_ BSTR*); /* Object registration helpers */ #define ACTIVEOBJECT_STRONG 0 #define ACTIVEOBJECT_WEAK 1 -HRESULT WINAPI RegisterActiveObject(LPUNKNOWN,REFCLSID,DWORD,LPDWORD); +_Check_return_ +HRESULT +WINAPI +RegisterActiveObject( + LPUNKNOWN, + REFCLSID, + DWORD, + LPDWORD); + HRESULT WINAPI RevokeActiveObject(DWORD,LPVOID); HRESULT WINAPI GetActiveObject(REFCLSID,LPVOID,LPUNKNOWN*); @@ -180,12 +278,29 @@ #define V_UNKNOWNREF(A) V_UNION(A,ppunkVal) #define V_VARIANTREF(A) V_UNION(A,pvarVal) -void WINAPI VariantInit(VARIANT*); -HRESULT WINAPI VariantClear(VARIANT*); -HRESULT WINAPI VariantCopy(VARIANT*,VARIANT*); -HRESULT WINAPI VariantCopyInd(VARIANT*,VARIANT*); -HRESULT WINAPI VariantChangeType(VARIANT*,VARIANT*,USHORT,VARTYPE); -HRESULT WINAPI VariantChangeTypeEx(VARIANT*,VARIANT*,LCID,USHORT,VARTYPE); +void WINAPI VariantInit(_Out_ VARIANT*); +HRESULT WINAPI VariantClear(_Inout_ VARIANT*); +_Check_return_ HRESULT WINAPI VariantCopy(_Inout_ VARIANT*, _In_ VARIANT*); +_Check_return_ HRESULT WINAPI VariantCopyInd(_Inout_ VARIANT*, _In_ VARIANT*); + +_Check_return_ +HRESULT +WINAPI +VariantChangeType( + _Inout_ VARIANT*, + _In_ VARIANT*, + _In_ USHORT, + _In_ VARTYPE); + +_Check_return_ +HRESULT +WINAPI +VariantChangeTypeEx( + _Inout_ VARIANT*, + _In_ VARIANT*, + _In_ LCID, + _In_ USHORT, + _In_ VARTYPE); /* VariantChangeType/VariantChangeTypeEx flags */ #define VARIANT_NOVALUEPROP 0x01 /* Don't get the default value property from IDispatch */ @@ -222,247 +337,247 @@ #define VTDATEGRE_MIN -657434 /* Minimum possible Gregorian date: 1/1/100 */ #define VTDATEGRE_MAX 2958465 /* Maximum possible Gregorian date: 31/12/9999 */ -HRESULT WINAPI VarUI1FromI2(SHORT,BYTE*); -HRESULT WINAPI VarUI1FromI4(LONG,BYTE*); -HRESULT WINAPI VarUI1FromI8(LONG64,BYTE*); -HRESULT WINAPI VarUI1FromR4(FLOAT,BYTE*); -HRESULT WINAPI VarUI1FromR8(DOUBLE,BYTE*); -HRESULT WINAPI VarUI1FromDate(DATE,BYTE*); -HRESULT WINAPI VarUI1FromBool(VARIANT_BOOL,BYTE*); -HRESULT WINAPI VarUI1FromI1(signed char,BYTE*); -HRESULT WINAPI VarUI1FromUI2(USHORT,BYTE*); -HRESULT WINAPI VarUI1FromUI4(ULONG,BYTE*); -HRESULT WINAPI VarUI1FromUI8(ULONG64,BYTE*); -HRESULT WINAPI VarUI1FromStr(OLECHAR*,LCID,ULONG,BYTE*); -HRESULT WINAPI VarUI1FromCy(CY,BYTE*); -HRESULT WINAPI VarUI1FromDec(DECIMAL*,BYTE*); -HRESULT WINAPI VarUI1FromDisp(IDispatch*,LCID,BYTE*); - -HRESULT WINAPI VarI2FromUI1(BYTE,SHORT*); -HRESULT WINAPI VarI2FromI4(LONG,SHORT*); -HRESULT WINAPI VarI2FromI8(LONG64,SHORT*); -HRESULT WINAPI VarI2FromR4(FLOAT,SHORT*); -HRESULT WINAPI VarI2FromR8(DOUBLE,SHORT*); -HRESULT WINAPI VarI2FromDate(DATE,SHORT*); -HRESULT WINAPI VarI2FromBool(VARIANT_BOOL,SHORT*); -HRESULT WINAPI VarI2FromI1(signed char,SHORT*); -HRESULT WINAPI VarI2FromUI2(USHORT,SHORT*); -HRESULT WINAPI VarI2FromUI4(ULONG,SHORT*); -HRESULT WINAPI VarI2FromUI8(ULONG64,SHORT*); -HRESULT WINAPI VarI2FromStr(OLECHAR*,LCID,ULONG,SHORT*); +HRESULT WINAPI VarUI1FromI2(SHORT, _Out_ BYTE*); +HRESULT WINAPI VarUI1FromI4(LONG, _Out_ BYTE*); +HRESULT WINAPI VarUI1FromI8(LONG64, _Out_ BYTE*); +HRESULT WINAPI VarUI1FromR4(FLOAT, _Out_ BYTE*); +HRESULT WINAPI VarUI1FromR8(DOUBLE, _Out_ BYTE*); +HRESULT WINAPI VarUI1FromDate(DATE, _Out_ BYTE*); +HRESULT WINAPI VarUI1FromBool(VARIANT_BOOL, _Out_ BYTE*); +HRESULT WINAPI VarUI1FromI1(signed char, _Out_ BYTE*); +HRESULT WINAPI VarUI1FromUI2(USHORT, _Out_ BYTE*); +HRESULT WINAPI VarUI1FromUI4(ULONG, _Out_ BYTE*); +HRESULT WINAPI VarUI1FromUI8(ULONG64, _Out_ BYTE*); +HRESULT WINAPI VarUI1FromStr(_In_ OLECHAR*, LCID, ULONG, _Out_ BYTE*); +HRESULT WINAPI VarUI1FromCy(CY, _Out_ BYTE*); +HRESULT WINAPI VarUI1FromDec(_In_ DECIMAL*, _Out_ BYTE*); +HRESULT WINAPI VarUI1FromDisp(IDispatch*, LCID, _Out_ BYTE*); + +HRESULT WINAPI VarI2FromUI1(BYTE, _Out_ SHORT*); +HRESULT WINAPI VarI2FromI4(LONG, _Out_ SHORT*); +HRESULT WINAPI VarI2FromI8(LONG64, _Out_ SHORT*); +HRESULT WINAPI VarI2FromR4(FLOAT, _Out_ SHORT*); +HRESULT WINAPI VarI2FromR8(DOUBLE, _Out_ SHORT*); +HRESULT WINAPI VarI2FromDate(DATE, _Out_ SHORT*); +HRESULT WINAPI VarI2FromBool(VARIANT_BOOL, _Out_ SHORT*); +HRESULT WINAPI VarI2FromI1(signed char, _Out_ SHORT*); +HRESULT WINAPI VarI2FromUI2(USHORT, _Out_ SHORT*); +HRESULT WINAPI VarI2FromUI4(ULONG, _Out_ SHORT*); +HRESULT WINAPI VarI2FromUI8(ULONG64, _Out_ SHORT*); +HRESULT WINAPI VarI2FromStr(_In_ OLECHAR*, LCID, ULONG, _Out_ SHORT*); HRESULT WINAPI VarI2FromCy(CY,SHORT*); -HRESULT WINAPI VarI2FromDec(DECIMAL*,SHORT*); -HRESULT WINAPI VarI2FromDisp(IDispatch*,LCID,SHORT*); - -HRESULT WINAPI VarI4FromUI1(BYTE,LONG*); -HRESULT WINAPI VarI4FromI2(SHORT,LONG*); -HRESULT WINAPI VarI4FromI8(LONG64,LONG*); -HRESULT WINAPI VarI4FromR4(FLOAT,LONG*); -HRESULT WINAPI VarI4FromR8(DOUBLE,LONG*); -HRESULT WINAPI VarI4FromDate(DATE,LONG*); -HRESULT WINAPI VarI4FromBool(VARIANT_BOOL,LONG*); -HRESULT WINAPI VarI4FromI1(signed char,LONG*); -HRESULT WINAPI VarI4FromUI2(USHORT,LONG*); -HRESULT WINAPI VarI4FromUI4(ULONG,LONG*); -HRESULT WINAPI VarI4FromUI8(ULONG64,LONG*); -HRESULT WINAPI VarI4FromStr(OLECHAR*,LCID,ULONG,LONG*); -HRESULT WINAPI VarI4FromCy(CY,LONG*); -HRESULT WINAPI VarI4FromDec(DECIMAL*,LONG*); -HRESULT WINAPI VarI4FromDisp(IDispatch*,LCID,LONG*); - -HRESULT WINAPI VarI8FromUI1(BYTE,LONG64*); -HRESULT WINAPI VarI8FromI2(SHORT,LONG64*); +HRESULT WINAPI VarI2FromDec(_In_ DECIMAL*, _Out_ SHORT*); +HRESULT WINAPI VarI2FromDisp(IDispatch*, LCID, _Out_ SHORT*); + +HRESULT WINAPI VarI4FromUI1(BYTE, _Out_ LONG*); +HRESULT WINAPI VarI4FromI2(SHORT, _Out_ LONG*); +HRESULT WINAPI VarI4FromI8(LONG64, _Out_ LONG*); +HRESULT WINAPI VarI4FromR4(FLOAT, _Out_ LONG*); +HRESULT WINAPI VarI4FromR8(DOUBLE, _Out_ LONG*); +HRESULT WINAPI VarI4FromDate(DATE, _Out_ LONG*); +HRESULT WINAPI VarI4FromBool(VARIANT_BOOL, _Out_ LONG*); +HRESULT WINAPI VarI4FromI1(signed char, _Out_ LONG*); +HRESULT WINAPI VarI4FromUI2(USHORT, _Out_ LONG*); +HRESULT WINAPI VarI4FromUI4(ULONG, _Out_ LONG*); +HRESULT WINAPI VarI4FromUI8(ULONG64, _Out_ LONG*); +HRESULT WINAPI VarI4FromStr(_In_ OLECHAR*, LCID, ULONG, _Out_ LONG*); +HRESULT WINAPI VarI4FromCy(CY, _Out_ LONG*); +HRESULT WINAPI VarI4FromDec(_In_ DECIMAL*, _Out_ LONG*); +HRESULT WINAPI VarI4FromDisp(IDispatch*, _In_ LCID, _Out_ LONG*); + +HRESULT WINAPI VarI8FromUI1(BYTE, _Out_ LONG64*); +HRESULT WINAPI VarI8FromI2(SHORT, _Out_ LONG64*); HRESULT WINAPI VarI8FromI4(LONG,LONG64*); -HRESULT WINAPI VarI8FromR4(FLOAT,LONG64*); -HRESULT WINAPI VarI8FromR8(DOUBLE,LONG64*); -HRESULT WINAPI VarI8FromDate(DATE,LONG64*); -HRESULT WINAPI VarI8FromStr(OLECHAR*,LCID,ULONG,LONG64*); -HRESULT WINAPI VarI8FromBool(VARIANT_BOOL,LONG64*); -HRESULT WINAPI VarI8FromI1(signed char,LONG64*); -HRESULT WINAPI VarI8FromUI2(USHORT,LONG64*); -HRESULT WINAPI VarI8FromUI4(ULONG,LONG64*); -HRESULT WINAPI VarI8FromUI8(ULONG64,LONG64*); -HRESULT WINAPI VarI8FromDec(DECIMAL *pdecIn,LONG64*); +HRESULT WINAPI VarI8FromR4(FLOAT, _Out_ LONG64*); +HRESULT WINAPI VarI8FromR8(DOUBLE, _Out_ LONG64*); +HRESULT WINAPI VarI8FromDate(DATE, _Out_ LONG64*); +HRESULT WINAPI VarI8FromStr(_In_ OLECHAR*, _In_ LCID, _In_ ULONG, _Out_ LONG64*); +HRESULT WINAPI VarI8FromBool(VARIANT_BOOL, _Out_ LONG64*); +HRESULT WINAPI VarI8FromI1(signed char, _Out_ LONG64*); +HRESULT WINAPI VarI8FromUI2(USHORT, _Out_ LONG64*); +HRESULT WINAPI VarI8FromUI4(ULONG, _Out_ LONG64*); +HRESULT WINAPI VarI8FromUI8(ULONG64, _Out_ LONG64*); +HRESULT WINAPI VarI8FromDec(_In_ DECIMAL *pdecIn, _Out_ LONG64*); HRESULT WINAPI VarI8FromInt(INT intIn,LONG64*); -HRESULT WINAPI VarI8FromCy(CY,LONG64*); -HRESULT WINAPI VarI8FromDisp(IDispatch*,LCID,LONG64*); - -HRESULT WINAPI VarR4FromUI1(BYTE,FLOAT*); -HRESULT WINAPI VarR4FromI2(SHORT,FLOAT*); -HRESULT WINAPI VarR4FromI4(LONG,FLOAT*); -HRESULT WINAPI VarR4FromI8(LONG64,FLOAT*); -HRESULT WINAPI VarR4FromR8(DOUBLE,FLOAT*); -HRESULT WINAPI VarR4FromDate(DATE,FLOAT*); -HRESULT WINAPI VarR4FromBool(VARIANT_BOOL,FLOAT*); -HRESULT WINAPI VarR4FromI1(signed char,FLOAT*); -HRESULT WINAPI VarR4FromUI2(USHORT,FLOAT*); -HRESULT WINAPI VarR4FromUI4(ULONG,FLOAT*); -HRESULT WINAPI VarR4FromUI8(ULONG64,FLOAT*); -HRESULT WINAPI VarR4FromStr(OLECHAR*,LCID,ULONG,FLOAT*); +HRESULT WINAPI VarI8FromCy(_In_ CY, _Out_ LONG64*); +HRESULT WINAPI VarI8FromDisp(IDispatch*, _In_ LCID, _Out_ LONG64*); + +HRESULT WINAPI VarR4FromUI1(BYTE, _Out_ FLOAT*); +HRESULT WINAPI VarR4FromI2(SHORT, _Out_ FLOAT*); +HRESULT WINAPI VarR4FromI4(LONG, _Out_ FLOAT*); +HRESULT WINAPI VarR4FromI8(LONG64, _Out_ FLOAT*); +HRESULT WINAPI VarR4FromR8(DOUBLE, _Out_ FLOAT*); +HRESULT WINAPI VarR4FromDate(DATE, _Out_ FLOAT*); +HRESULT WINAPI VarR4FromBool(VARIANT_BOOL, _Out_ FLOAT*); +HRESULT WINAPI VarR4FromI1(signed char, _Out_ FLOAT*); +HRESULT WINAPI VarR4FromUI2(USHORT, _Out_ FLOAT*); +HRESULT WINAPI VarR4FromUI4(ULONG, _Out_ FLOAT*); +HRESULT WINAPI VarR4FromUI8(ULONG64, _Out_ FLOAT*); +HRESULT WINAPI VarR4FromStr(_In_ OLECHAR*, LCID, ULONG, _Out_ FLOAT*); HRESULT WINAPI VarR4FromCy(CY,FLOAT*); -HRESULT WINAPI VarR4FromDec(DECIMAL*,FLOAT*); -HRESULT WINAPI VarR4FromDisp(IDispatch*,LCID,FLOAT*); - -HRESULT WINAPI VarR8FromUI1(BYTE,double*); -HRESULT WINAPI VarR8FromI2(SHORT,double*); -HRESULT WINAPI VarR8FromI4(LONG,double*); -HRESULT WINAPI VarR8FromI8(LONG64,double*); -HRESULT WINAPI VarR8FromR4(FLOAT,double*); -HRESULT WINAPI VarR8FromDate(DATE,double*); -HRESULT WINAPI VarR8FromBool(VARIANT_BOOL,double*); +HRESULT WINAPI VarR4FromDec(_In_ DECIMAL*, _Out_ FLOAT*); +HRESULT WINAPI VarR4FromDisp(IDispatch*, LCID, _Out_ FLOAT*); + +HRESULT WINAPI VarR8FromUI1(BYTE, _Out_ double*); +HRESULT WINAPI VarR8FromI2(SHORT, _Out_ double*); +HRESULT WINAPI VarR8FromI4(LONG, _Out_ double*); +HRESULT WINAPI VarR8FromI8(LONG64, _Out_ double*); +HRESULT WINAPI VarR8FromR4(FLOAT, _Out_ double*); +HRESULT WINAPI VarR8FromDate(DATE, _Out_ double*); +HRESULT WINAPI VarR8FromBool(VARIANT_BOOL, _Out_ double*); HRESULT WINAPI VarR8FromI1(signed char,double*); -HRESULT WINAPI VarR8FromUI2(USHORT,double*); -HRESULT WINAPI VarR8FromUI4(ULONG,double*); -HRESULT WINAPI VarR8FromUI8(ULONG64,double*); -HRESULT WINAPI VarR8FromStr(OLECHAR*,LCID,ULONG,double*); +HRESULT WINAPI VarR8FromUI2(USHORT, _Out_ double*); +HRESULT WINAPI VarR8FromUI4(ULONG, _Out_ double*); +HRESULT WINAPI VarR8FromUI8(ULONG64, _Out_ double*); +HRESULT WINAPI VarR8FromStr(_In_ OLECHAR*, LCID, ULONG, _Out_ double*); HRESULT WINAPI VarR8FromCy(CY,double*); -HRESULT WINAPI VarR8FromDec(const DECIMAL*,double*); -HRESULT WINAPI VarR8FromDisp(IDispatch*,LCID,double*); - -HRESULT WINAPI VarDateFromUI1(BYTE,DATE*); -HRESULT WINAPI VarDateFromI2(SHORT,DATE*); -HRESULT WINAPI VarDateFromI4(LONG,DATE*); -HRESULT WINAPI VarDateFromI8(LONG64,DATE*); -HRESULT WINAPI VarDateFromR4(FLOAT,DATE*); -HRESULT WINAPI VarDateFromR8(DOUBLE,DATE*); -HRESULT WINAPI VarDateFromStr(OLECHAR*,LCID,ULONG,DATE*); -HRESULT WINAPI VarDateFromI1(signed char,DATE*); -HRESULT WINAPI VarDateFromUI2(USHORT,DATE*); -HRESULT WINAPI VarDateFromUI4(ULONG,DATE*); -HRESULT WINAPI VarDateFromUI8(ULONG64,DATE*); -HRESULT WINAPI VarDateFromBool(VARIANT_BOOL,DATE*); -HRESULT WINAPI VarDateFromCy(CY,DATE*); -HRESULT WINAPI VarDateFromDec(DECIMAL*,DATE*); -HRESULT WINAPI VarDateFromDisp(IDispatch*,LCID,DATE*); - -HRESULT WINAPI VarCyFromUI1(BYTE,CY*); -HRESULT WINAPI VarCyFromI2(SHORT sIn,CY*); -HRESULT WINAPI VarCyFromI4(LONG,CY*); -HRESULT WINAPI VarCyFromI8(LONG64,CY*); -HRESULT WINAPI VarCyFromR4(FLOAT,CY*); -HRESULT WINAPI VarCyFromR8(DOUBLE,CY*); -HRESULT WINAPI VarCyFromDate(DATE,CY*); -HRESULT WINAPI VarCyFromStr(OLECHAR*,LCID,ULONG,CY*); -HRESULT WINAPI VarCyFromBool(VARIANT_BOOL,CY*); -HRESULT WINAPI VarCyFromI1(signed char,CY*); -HRESULT WINAPI VarCyFromUI2(USHORT,CY*); -HRESULT WINAPI VarCyFromUI4(ULONG,CY*); -HRESULT WINAPI VarCyFromUI8(ULONG64,CY*); -HRESULT WINAPI VarCyFromDec(DECIMAL*,CY*); -HRESULT WINAPI VarCyFromDisp(IDispatch*,LCID,CY*); - -HRESULT WINAPI VarBstrFromUI1(BYTE,LCID,ULONG,BSTR*); +HRESULT WINAPI VarR8FromDec(_In_ const DECIMAL*, _Out_ double*); +HRESULT WINAPI VarR8FromDisp(IDispatch*, LCID, _Out_ double*); + +HRESULT WINAPI VarDateFromUI1(BYTE, _Out_ DATE*); +HRESULT WINAPI VarDateFromI2(SHORT, _Out_ DATE*); +HRESULT WINAPI VarDateFromI4(LONG, _Out_ DATE*); +HRESULT WINAPI VarDateFromI8(LONG64, _Out_ DATE*); +HRESULT WINAPI VarDateFromR4(FLOAT, _Out_ DATE*); +HRESULT WINAPI VarDateFromR8(DOUBLE, _Out_ DATE*); +HRESULT WINAPI VarDateFromStr(_In_ OLECHAR*, _In_ LCID, _In_ ULONG, _Out_ DATE*); +HRESULT WINAPI VarDateFromI1(signed char, _Out_ DATE*); +HRESULT WINAPI VarDateFromUI2(USHORT, _Out_ DATE*); +HRESULT WINAPI VarDateFromUI4(ULONG, _Out_ DATE*); +HRESULT WINAPI VarDateFromUI8(ULONG64, _Out_ DATE*); +HRESULT WINAPI VarDateFromBool(VARIANT_BOOL, _Out_ DATE*); +HRESULT WINAPI VarDateFromCy(CY, _Out_ DATE*); +HRESULT WINAPI VarDateFromDec(_In_ DECIMAL*, _Out_ DATE*); +HRESULT WINAPI VarDateFromDisp(IDispatch*, LCID, _Out_ DATE*); + +HRESULT WINAPI VarCyFromUI1(BYTE, _Out_ CY*); +HRESULT WINAPI VarCyFromI2(SHORT sIn, _Out_ CY*); +HRESULT WINAPI VarCyFromI4(LONG, _Out_ CY*); +HRESULT WINAPI VarCyFromI8(LONG64, _Out_ CY*); +HRESULT WINAPI VarCyFromR4(FLOAT, _Out_ CY*); +HRESULT WINAPI VarCyFromR8(DOUBLE, _Out_ CY*); +HRESULT WINAPI VarCyFromDate(DATE, _Out_ CY*); +HRESULT WINAPI VarCyFromStr(_In_ OLECHAR*, _In_ LCID, _In_ ULONG, _Out_ CY*); +HRESULT WINAPI VarCyFromBool(VARIANT_BOOL, _Out_ CY*); +HRESULT WINAPI VarCyFromI1(signed char, _Out_ CY*); +HRESULT WINAPI VarCyFromUI2(USHORT, _Out_ CY*); +HRESULT WINAPI VarCyFromUI4(ULONG, _Out_ CY*); +HRESULT WINAPI VarCyFromUI8(ULONG64, _Out_ CY*); +HRESULT WINAPI VarCyFromDec(_In_ DECIMAL*, _Out_ CY*); +HRESULT WINAPI VarCyFromDisp(_In_ IDispatch*, LCID, _Out_ CY*); + +HRESULT WINAPI VarBstrFromUI1(BYTE, LCID, ULONG, _Out_ BSTR*); HRESULT WINAPI VarBstrFromI2(SHORT,LCID,ULONG,BSTR*); -HRESULT WINAPI VarBstrFromI4(LONG,LCID,ULONG,BSTR*); -HRESULT WINAPI VarBstrFromI8(LONG64,LCID,ULONG,BSTR*); -HRESULT WINAPI VarBstrFromR4(FLOAT,LCID,ULONG,BSTR*); -HRESULT WINAPI VarBstrFromR8(DOUBLE,LCID,ULONG,BSTR*); -HRESULT WINAPI VarBstrFromDate(DATE,LCID,ULONG,BSTR*); -HRESULT WINAPI VarBstrFromBool(VARIANT_BOOL,LCID,ULONG,BSTR*); -HRESULT WINAPI VarBstrFromI1(signed char,LCID,ULONG,BSTR*); -HRESULT WINAPI VarBstrFromUI2(USHORT,LCID,ULONG,BSTR*); -HRESULT WINAPI VarBstrFromUI8(ULONG64,LCID,ULONG,BSTR*); -HRESULT WINAPI VarBstrFromUI4(ULONG,LCID,ULONG,BSTR*); -HRESULT WINAPI VarBstrFromCy(CY,LCID,ULONG,BSTR*); -HRESULT WINAPI VarBstrFromDec(DECIMAL*,LCID,ULONG,BSTR*); -HRESULT WINAPI VarBstrFromDisp(IDispatch*,LCID,ULONG,BSTR*); - -HRESULT WINAPI VarBoolFromUI1(BYTE,VARIANT_BOOL*); -HRESULT WINAPI VarBoolFromI2(SHORT,VARIANT_BOOL*); -HRESULT WINAPI VarBoolFromI4(LONG,VARIANT_BOOL*); -HRESULT WINAPI VarBoolFromI8(LONG64,VARIANT_BOOL*); -HRESULT WINAPI VarBoolFromR4(FLOAT,VARIANT_BOOL*); -HRESULT WINAPI VarBoolFromR8(DOUBLE,VARIANT_BOOL*); -HRESULT WINAPI VarBoolFromDate(DATE,VARIANT_BOOL*); -HRESULT WINAPI VarBoolFromStr(OLECHAR*,LCID,ULONG,VARIANT_BOOL*); -HRESULT WINAPI VarBoolFromI1(signed char,VARIANT_BOOL*); -HRESULT WINAPI VarBoolFromUI2(USHORT,VARIANT_BOOL*); -HRESULT WINAPI VarBoolFromUI4(ULONG,VARIANT_BOOL*); -HRESULT WINAPI VarBoolFromUI8(ULONG64,VARIANT_BOOL*); -HRESULT WINAPI VarBoolFromCy(CY,VARIANT_BOOL*); -HRESULT WINAPI VarBoolFromDec(DECIMAL*,VARIANT_BOOL*); -HRESULT WINAPI VarBoolFromDisp(IDispatch*,LCID,VARIANT_BOOL*); - -HRESULT WINAPI VarI1FromUI1(BYTE,signed char*); -HRESULT WINAPI VarI1FromI2(SHORT,signed char*); -HRESULT WINAPI VarI1FromI4(LONG,signed char*); -HRESULT WINAPI VarI1FromI8(LONG64,signed char*); -HRESULT WINAPI VarI1FromR4(FLOAT,signed char*); -HRESULT WINAPI VarI1FromR8(DOUBLE,signed char*); -HRESULT WINAPI VarI1FromDate(DATE,signed char*); -HRESULT WINAPI VarI1FromStr(OLECHAR*,LCID,ULONG,signed char*); -HRESULT WINAPI VarI1FromBool(VARIANT_BOOL,signed char*); -HRESULT WINAPI VarI1FromUI2(USHORT,signed char*); -HRESULT WINAPI VarI1FromUI4(ULONG,signed char*); -HRESULT WINAPI VarI1FromUI8(ULONG64,signed char*); -HRESULT WINAPI VarI1FromCy(CY,signed char*); -HRESULT WINAPI VarI1FromDec(DECIMAL*,signed char*); -HRESULT WINAPI VarI1FromDisp(IDispatch*,LCID,signed char*); - -HRESULT WINAPI VarUI2FromUI1(BYTE,USHORT*); -HRESULT WINAPI VarUI2FromI2(SHORT,USHORT*); -HRESULT WINAPI VarUI2FromI4(LONG,USHORT*); -HRESULT WINAPI VarUI2FromI8(LONG64,USHORT*); -HRESULT WINAPI VarUI2FromR4(FLOAT,USHORT*); +HRESULT WINAPI VarBstrFromI4(LONG, LCID, ULONG, _Out_ BSTR*); +HRESULT WINAPI VarBstrFromI8(LONG64, LCID, ULONG, _Out_ BSTR*); +HRESULT WINAPI VarBstrFromR4(FLOAT, LCID, ULONG, _Out_ BSTR*); +HRESULT WINAPI VarBstrFromR8(DOUBLE, LCID, ULONG, _Out_ BSTR*); +HRESULT WINAPI VarBstrFromDate(_In_ DATE, _In_ LCID, _In_ ULONG, _Out_ BSTR*); +HRESULT WINAPI VarBstrFromBool(VARIANT_BOOL, LCID, ULONG, _Out_ BSTR*); +HRESULT WINAPI VarBstrFromI1(signed char, LCID, ULONG, _Out_ BSTR*); +HRESULT WINAPI VarBstrFromUI2(USHORT, LCID, ULONG, _Out_ BSTR*); +HRESULT WINAPI VarBstrFromUI8(ULONG64, LCID, ULONG, _Out_ BSTR*); +HRESULT WINAPI VarBstrFromUI4(ULONG, LCID, ULONG, _Out_ BSTR*); +HRESULT WINAPI VarBstrFromCy(CY, LCID, ULONG, _Out_ BSTR*); +HRESULT WINAPI VarBstrFromDec(_In_ DECIMAL*, _In_ LCID, _In_ ULONG, _Out_ BSTR*); +HRESULT WINAPI VarBstrFromDisp(IDispatch*, LCID, ULONG, _Out_ BSTR*); + +HRESULT WINAPI VarBoolFromUI1(BYTE, _Out_ VARIANT_BOOL*); +_Check_return_ HRESULT WINAPI VarBoolFromI2(_In_ SHORT, _Out_ VARIANT_BOOL*); +HRESULT WINAPI VarBoolFromI4(LONG, _Out_ VARIANT_BOOL*); +HRESULT WINAPI VarBoolFromI8(LONG64, _Out_ VARIANT_BOOL*); +HRESULT WINAPI VarBoolFromR4(FLOAT, _Out_ VARIANT_BOOL*); +HRESULT WINAPI VarBoolFromR8(DOUBLE, _Out_ VARIANT_BOOL*); +HRESULT WINAPI VarBoolFromDate(DATE, _Out_ VARIANT_BOOL*); +HRESULT WINAPI VarBoolFromStr(_In_ OLECHAR*, LCID, ULONG, _Out_ VARIANT_BOOL*); +HRESULT WINAPI VarBoolFromI1(signed char, _Out_ VARIANT_BOOL*); +HRESULT WINAPI VarBoolFromUI2(USHORT, _Out_ VARIANT_BOOL*); +HRESULT WINAPI VarBoolFromUI4(ULONG, _Out_ VARIANT_BOOL*); +HRESULT WINAPI VarBoolFromUI8(ULONG64, _Out_ VARIANT_BOOL*); +HRESULT WINAPI VarBoolFromCy(CY, _Out_ VARIANT_BOOL*); +HRESULT WINAPI VarBoolFromDec(_In_ DECIMAL*, _Out_ VARIANT_BOOL*); +HRESULT WINAPI VarBoolFromDisp(IDispatch*, LCID, _Out_ VARIANT_BOOL*); + +HRESULT WINAPI VarI1FromUI1(_In_ BYTE, _Out_ signed char*); +HRESULT WINAPI VarI1FromI2(_In_ SHORT, _Out_ signed char*); +HRESULT WINAPI VarI1FromI4(_In_ LONG, _Out_ signed char*); +HRESULT WINAPI VarI1FromI8(_In_ LONG64, _Out_ signed char*); +HRESULT WINAPI VarI1FromR4(_In_ FLOAT, _Out_ signed char*); +HRESULT WINAPI VarI1FromR8(_In_ DOUBLE, _Out_ signed char*); +HRESULT WINAPI VarI1FromDate(_In_ DATE, _Out_ signed char*); +HRESULT WINAPI VarI1FromStr(_In_ OLECHAR*, _In_ LCID, _In_ ULONG, _Out_ signed char*); +HRESULT WINAPI VarI1FromBool(_In_ VARIANT_BOOL, _Out_ signed char*); +HRESULT WINAPI VarI1FromUI2(_In_ USHORT, _Out_ signed char*); +HRESULT WINAPI VarI1FromUI4(_In_ ULONG, _Out_ signed char*); +HRESULT WINAPI VarI1FromUI8(_In_ ULONG64, _Out_ signed char*); +HRESULT WINAPI VarI1FromCy(_In_ CY, _Out_ signed char*); +HRESULT WINAPI VarI1FromDec(_In_ DECIMAL*, _Out_ signed char*); +HRESULT WINAPI VarI1FromDisp(_In_ IDispatch*, _In_ LCID, _Out_ signed char*); + +HRESULT WINAPI VarUI2FromUI1(BYTE, _Out_ USHORT*); +HRESULT WINAPI VarUI2FromI2(SHORT, _Out_ USHORT*); +HRESULT WINAPI VarUI2FromI4(LONG, _Out_ USHORT*); +HRESULT WINAPI VarUI2FromI8(LONG64, _Out_ USHORT*); +HRESULT WINAPI VarUI2FromR4(FLOAT, _Out_ USHORT*); HRESULT WINAPI VarUI2FromR8(DOUBLE,USHORT*); -HRESULT WINAPI VarUI2FromDate(DATE,USHORT*); -HRESULT WINAPI VarUI2FromStr(OLECHAR*,LCID,ULONG,USHORT*); -HRESULT WINAPI VarUI2FromBool(VARIANT_BOOL,USHORT*); -HRESULT WINAPI VarUI2FromI1(signed char,USHORT*); -HRESULT WINAPI VarUI2FromUI4(ULONG,USHORT*); -HRESULT WINAPI VarUI2FromUI8(ULONG64,USHORT*); -HRESULT WINAPI VarUI2FromCy(CY,USHORT*); -HRESULT WINAPI VarUI2FromDec(DECIMAL*,USHORT*); -HRESULT WINAPI VarUI2FromDisp(IDispatch*,LCID,USHORT*); - -HRESULT WINAPI VarUI4FromStr(OLECHAR*,LCID,ULONG,ULONG*); -HRESULT WINAPI VarUI4FromUI1(BYTE,ULONG*); -HRESULT WINAPI VarUI4FromI2(SHORT,ULONG*); -HRESULT WINAPI VarUI4FromI4(LONG,ULONG*); -HRESULT WINAPI VarUI4FromI8(LONG64,ULONG*); -HRESULT WINAPI VarUI4FromR4(FLOAT,ULONG*); -HRESULT WINAPI VarUI4FromR8(DOUBLE,ULONG*); -HRESULT WINAPI VarUI4FromDate(DATE,ULONG*); -HRESULT WINAPI VarUI4FromBool(VARIANT_BOOL,ULONG*); -HRESULT WINAPI VarUI4FromI1(signed char,ULONG*); -HRESULT WINAPI VarUI4FromUI2(USHORT,ULONG*); -HRESULT WINAPI VarUI4FromUI8(ULONG64,ULONG*); -HRESULT WINAPI VarUI4FromCy(CY,ULONG*); -HRESULT WINAPI VarUI4FromDec(DECIMAL*,ULONG*); -HRESULT WINAPI VarUI4FromDisp(IDispatch*,LCID,ULONG*); - -HRESULT WINAPI VarUI8FromUI1(BYTE,ULONG64*); -HRESULT WINAPI VarUI8FromI2(SHORT,ULONG64*); -HRESULT WINAPI VarUI8FromI4(LONG,ULONG64*); -HRESULT WINAPI VarUI8FromI8(LONG64,ULONG64*); -HRESULT WINAPI VarUI8FromR4(FLOAT,ULONG64*); -HRESULT WINAPI VarUI8FromR8(DOUBLE,ULONG64*); -HRESULT WINAPI VarUI8FromDate(DATE,ULONG64*); -HRESULT WINAPI VarUI8FromStr(OLECHAR*,LCID,ULONG,ULONG64*); -HRESULT WINAPI VarUI8FromBool(VARIANT_BOOL,ULONG64*); -HRESULT WINAPI VarUI8FromI1(signed char,ULONG64*); -HRESULT WINAPI VarUI8FromUI2(USHORT,ULONG64*); -HRESULT WINAPI VarUI8FromUI4(ULONG,ULONG64*); -HRESULT WINAPI VarUI8FromDec(DECIMAL*,ULONG64*); +HRESULT WINAPI VarUI2FromDate(DATE, _Out_ USHORT*); +HRESULT WINAPI VarUI2FromStr(_In_ OLECHAR*, _In_ LCID, _In_ ULONG, _Out_ USHORT*); +HRESULT WINAPI VarUI2FromBool(VARIANT_BOOL, _Out_ USHORT*); +HRESULT WINAPI VarUI2FromI1(signed char, _Out_ USHORT*); +HRESULT WINAPI VarUI2FromUI4(ULONG, _Out_ USHORT*); +HRESULT WINAPI VarUI2FromUI8(ULONG64, _Out_ USHORT*); +HRESULT WINAPI VarUI2FromCy(CY, _Out_ USHORT*); +HRESULT WINAPI VarUI2FromDec(_In_ DECIMAL*, _Out_ USHORT*); +HRESULT WINAPI VarUI2FromDisp(_In_ IDispatch*, LCID, _Out_ USHORT*); + +HRESULT WINAPI VarUI4FromStr(_In_ OLECHAR*, _In_ LCID, _In_ ULONG, _Out_ ULONG*); +HRESULT WINAPI VarUI4FromUI1(BYTE, _Out_ ULONG*); +HRESULT WINAPI VarUI4FromI2(_In_ SHORT, _Out_ ULONG*); +HRESULT WINAPI VarUI4FromI4(LONG, _Out_ ULONG*); +HRESULT WINAPI VarUI4FromI8(LONG64, _Out_ ULONG*); +HRESULT WINAPI VarUI4FromR4(FLOAT, _Out_ ULONG*); +HRESULT WINAPI VarUI4FromR8(DOUBLE, _Out_ ULONG*); +HRESULT WINAPI VarUI4FromDate(DATE, _Out_ ULONG*); +HRESULT WINAPI VarUI4FromBool(VARIANT_BOOL, _Out_ ULONG*); +HRESULT WINAPI VarUI4FromI1(signed char, _Out_ ULONG*); +HRESULT WINAPI VarUI4FromUI2(USHORT, _Out_ ULONG*); +HRESULT WINAPI VarUI4FromUI8(ULONG64, _Out_ ULONG*); +HRESULT WINAPI VarUI4FromCy(CY, _Out_ ULONG*); +HRESULT WINAPI VarUI4FromDec(_In_ DECIMAL*, _Out_ ULONG*); +HRESULT WINAPI VarUI4FromDisp(_In_ IDispatch*, LCID, _Out_ ULONG*); + +HRESULT WINAPI VarUI8FromUI1(BYTE, _Out_ ULONG64*); +HRESULT WINAPI VarUI8FromI2(SHORT, _Out_ ULONG64*); +HRESULT WINAPI VarUI8FromI4(LONG, _Out_ ULONG64*); +HRESULT WINAPI VarUI8FromI8(LONG64, _Out_ ULONG64*); +HRESULT WINAPI VarUI8FromR4(FLOAT, _Out_ ULONG64*); +HRESULT WINAPI VarUI8FromR8(DOUBLE, _Out_ ULONG64*); +HRESULT WINAPI VarUI8FromDate(DATE, _Out_ ULONG64*); +HRESULT WINAPI VarUI8FromStr(_In_ OLECHAR*, _In_ LCID, _In_ ULONG, _Out_ ULONG64*); +HRESULT WINAPI VarUI8FromBool(VARIANT_BOOL, _Out_ ULONG64*); +HRESULT WINAPI VarUI8FromI1(signed char, _Out_ ULONG64*); +HRESULT WINAPI VarUI8FromUI2(USHORT, _Out_ ULONG64*); +HRESULT WINAPI VarUI8FromUI4(ULONG, _Out_ ULONG64*); +HRESULT WINAPI VarUI8FromDec(_In_ DECIMAL*, _Out_ ULONG64*); HRESULT WINAPI VarUI8FromInt(INT,ULONG64*); -HRESULT WINAPI VarUI8FromCy(CY,ULONG64*); -HRESULT WINAPI VarUI8FromDisp(IDispatch*,LCID,ULONG64*); - -HRESULT WINAPI VarDecFromUI1(BYTE,DECIMAL*); -HRESULT WINAPI VarDecFromI2(SHORT,DECIMAL*); -HRESULT WINAPI VarDecFromI4(LONG,DECIMAL*); -HRESULT WINAPI VarDecFromI8(LONG64,DECIMAL*); -HRESULT WINAPI VarDecFromR4(FLOAT,DECIMAL*); -HRESULT WINAPI VarDecFromR8(DOUBLE,DECIMAL*); -HRESULT WINAPI VarDecFromDate(DATE,DECIMAL*); -HRESULT WINAPI VarDecFromStr(OLECHAR*,LCID,ULONG,DECIMAL*); -HRESULT WINAPI VarDecFromBool(VARIANT_BOOL,DECIMAL*); -HRESULT WINAPI VarDecFromI1(signed char,DECIMAL*); -HRESULT WINAPI VarDecFromUI2(USHORT,DECIMAL*); -HRESULT WINAPI VarDecFromUI4(ULONG,DECIMAL*); -HRESULT WINAPI VarDecFromUI8(ULONG64,DECIMAL*); -HRESULT WINAPI VarDecFromCy(CY,DECIMAL*); -HRESULT WINAPI VarDecFromDisp(IDispatch*,LCID,DECIMAL*); +HRESULT WINAPI VarUI8FromCy(CY, _Out_ ULONG64*); +HRESULT WINAPI VarUI8FromDisp(_In_ IDispatch*, LCID, _Out_ ULONG64*); + +HRESULT WINAPI VarDecFromUI1(_In_ BYTE, _Out_ DECIMAL*); +HRESULT WINAPI VarDecFromI2(_In_ SHORT, _Out_ DECIMAL*); +HRESULT WINAPI VarDecFromI4(_In_ LONG, _Out_ DECIMAL*); +HRESULT WINAPI VarDecFromI8(LONG64, _Out_ DECIMAL*); +HRESULT WINAPI VarDecFromR4(_In_ FLOAT, _Out_ DECIMAL*); +HRESULT WINAPI VarDecFromR8(_In_ DOUBLE, _Out_ DECIMAL*); +HRESULT WINAPI VarDecFromDate(_In_ DATE, _Out_ DECIMAL*); +HRESULT WINAPI VarDecFromStr(_In_ OLECHAR*, _In_ LCID, _In_ ULONG, _Out_ DECIMAL*); +HRESULT WINAPI VarDecFromBool(_In_ VARIANT_BOOL, _Out_ DECIMAL*); +HRESULT WINAPI VarDecFromI1(_In_ signed char, _Out_ DECIMAL*); +HRESULT WINAPI VarDecFromUI2(_In_ USHORT, _Out_ DECIMAL*); +HRESULT WINAPI VarDecFromUI4(_In_ ULONG, _Out_ DECIMAL*); +HRESULT WINAPI VarDecFromUI8(ULONG64, _Out_ DECIMAL*); +HRESULT WINAPI VarDecFromCy(_In_ CY, _Out_ DECIMAL*); +HRESULT WINAPI VarDecFromDisp(_In_ IDispatch*, _In_ LCID, _Out_ DECIMAL*); #define VarUI4FromUI4( in,pOut ) ( *(pOut) = (in) ) #define VarI4FromI4( in,pOut ) ( *(pOut) = (in) ) @@ -540,62 +655,62 @@ #define VARCMP_GT 2 #define VARCMP_NULL 3 -HRESULT WINAPI VarR4CmpR8(float,double); - -HRESULT WINAPI VarR8Pow(double,double,double*); -HRESULT WINAPI VarR8Round(double,int,double*); - -HRESULT WINAPI VarDecAbs(const DECIMAL*,DECIMAL*); -HRESULT WINAPI VarDecAdd(const DECIMAL*,const DECIMAL*,DECIMAL*); -HRESULT WINAPI VarDecCmp(const DECIMAL*,const DECIMAL*); -HRESULT WINAPI VarDecCmpR8(const DECIMAL*,DOUBLE); -HRESULT WINAPI VarDecDiv(const DECIMAL*,const DECIMAL*,DECIMAL*); -HRESULT WINAPI VarDecFix(const DECIMAL*,DECIMAL*); -HRESULT WINAPI VarDecInt(const DECIMAL*,DECIMAL*); -HRESULT WINAPI VarDecMul(const DECIMAL*,const DECIMAL*,DECIMAL*); -HRESULT WINAPI VarDecNeg(const DECIMAL*,DECIMAL*); -HRESULT WINAPI VarDecRound(const DECIMAL*,int,DECIMAL*); -HRESULT WINAPI VarDecSub(const DECIMAL*,const DECIMAL*,DECIMAL*); - -HRESULT WINAPI VarCyAbs(const CY,CY*); -HRESULT WINAPI VarCyAdd(const CY,const CY,CY*); -HRESULT WINAPI VarCyCmp(const CY,const CY); -HRESULT WINAPI VarCyCmpR8(const CY,DOUBLE); -HRESULT WINAPI VarCyFix(const CY,CY*); -HRESULT WINAPI VarCyInt(const CY,CY*); -HRESULT WINAPI VarCyMul(const CY,CY,CY*); -HRESULT WINAPI VarCyMulI4(const CY,LONG,CY*); -HRESULT WINAPI VarCyMulI8(const CY,LONG64,CY*); -HRESULT WINAPI VarCyNeg(const CY,CY*); -HRESULT WINAPI VarCyRound(const CY,INT,CY*); -HRESULT WINAPI VarCySub(const CY,const CY,CY*); - -HRESULT WINAPI VarAdd(LPVARIANT,LPVARIANT,LPVARIANT); -HRESULT WINAPI VarAnd(LPVARIANT,LPVARIANT,LPVARIANT); -HRESULT WINAPI VarCat(LPVARIANT,LPVARIANT,LPVARIANT); -HRESULT WINAPI VarDiv(LPVARIANT,LPVARIANT,LPVARIANT); -HRESULT WINAPI VarEqv(LPVARIANT,LPVARIANT,LPVARIANT); -HRESULT WINAPI VarIdiv(LPVARIANT,LPVARIANT,LPVARIANT); -HRESULT WINAPI VarImp(LPVARIANT,LPVARIANT,LPVARIANT); -HRESULT WINAPI VarMod(LPVARIANT,LPVARIANT,LPVARIANT); -HRESULT WINAPI VarMul(LPVARIANT,LPVARIANT,LPVARIANT); -HRESULT WINAPI VarOr(LPVARIANT,LPVARIANT,LPVARIANT); -HRESULT WINAPI VarPow(LPVARIANT,LPVARIANT,LPVARIANT); -HRESULT WINAPI VarSub(LPVARIANT,LPVARIANT,LPVARIANT); -HRESULT WINAPI VarXor(LPVARIANT,LPVARIANT,LPVARIANT); - -HRESULT WINAPI VarAbs(LPVARIANT,LPVARIANT); -HRESULT WINAPI VarFix(LPVARIANT,LPVARIANT); -HRESULT WINAPI VarInt(LPVARIANT,LPVARIANT); -HRESULT WINAPI VarNeg(LPVARIANT,LPVARIANT); -HRESULT WINAPI VarNot(LPVARIANT,LPVARIANT); - -HRESULT WINAPI VarRound(LPVARIANT,int,LPVARIANT); - -HRESULT WINAPI VarCmp(LPVARIANT,LPVARIANT,LCID,ULONG); - -HRESULT WINAPI VarBstrCmp(BSTR,BSTR,LCID,ULONG); -HRESULT WINAPI VarBstrCat(BSTR,BSTR,BSTR*); +HRESULT WINAPI VarR4CmpR8(_In_ float, _In_ double); + +HRESULT WINAPI VarR8Pow(_In_ double, _In_ double, _Out_ double*); +HRESULT WINAPI VarR8Round(_In_ double, _In_ int, _Out_ double*); + +HRESULT WINAPI VarDecAbs(_In_ const DECIMAL*, _Out_ DECIMAL*); +HRESULT WINAPI VarDecAdd(_In_ const DECIMAL*, _In_ const DECIMAL*, _Out_ DECIMAL*); +HRESULT WINAPI VarDecCmp(_In_ const DECIMAL*, _In_ const DECIMAL*); +HRESULT WINAPI VarDecCmpR8(_In_ const DECIMAL*, _In_ DOUBLE); +HRESULT WINAPI VarDecDiv(_In_ const DECIMAL*, _In_ const DECIMAL*, _Out_ DECIMAL*); +HRESULT WINAPI VarDecFix(_In_ const DECIMAL*, _Out_ DECIMAL*); +HRESULT WINAPI VarDecInt(_In_ const DECIMAL*, _Out_ DECIMAL*); +HRESULT WINAPI VarDecMul(_In_ const DECIMAL*, _In_ const DECIMAL*, _Out_ DECIMAL*); +HRESULT WINAPI VarDecNeg(_In_ const DECIMAL*, _Out_ DECIMAL*); +HRESULT WINAPI VarDecRound(_In_ const DECIMAL*, int, _Out_ DECIMAL*); +HRESULT WINAPI VarDecSub(_In_ const DECIMAL*, _In_ const DECIMAL*, _Out_ DECIMAL*); + +HRESULT WINAPI VarCyAbs(_In_ const CY, _Out_ CY*); +HRESULT WINAPI VarCyAdd(_In_ const CY, _In_ const CY, _Out_ CY*); +HRESULT WINAPI VarCyCmp(_In_ const CY, _In_ const CY); +HRESULT WINAPI VarCyCmpR8(_In_ const CY, _In_ DOUBLE); +HRESULT WINAPI VarCyFix(_In_ const CY, _Out_ CY*); +HRESULT WINAPI VarCyInt(_In_ const CY, _Out_ CY*); +HRESULT WINAPI VarCyMul(_In_ const CY, _In_ CY, _Out_ CY*); +HRESULT WINAPI VarCyMulI4(_In_ const CY, _In_ LONG, _Out_ CY*); +HRESULT WINAPI VarCyMulI8(_In_ const CY, _In_ LONG64, _Out_ CY*); +HRESULT WINAPI VarCyNeg(_In_ const CY, _Out_ CY*); +HRESULT WINAPI VarCyRound(_In_ const CY, _In_ INT, _Out_ CY*); +HRESULT WINAPI VarCySub(_In_ const CY, _In_ const CY, _Out_ CY*); + +HRESULT WINAPI VarAdd(_In_ LPVARIANT, _In_ LPVARIANT, _Out_ LPVARIANT); +HRESULT WINAPI VarAnd(_In_ LPVARIANT, _In_ LPVARIANT, _Out_ LPVARIANT); +HRESULT WINAPI VarCat(_In_ LPVARIANT, _In_ LPVARIANT, _Out_ LPVARIANT); +HRESULT WINAPI VarDiv(_In_ LPVARIANT, _In_ LPVARIANT, _Out_ LPVARIANT); +HRESULT WINAPI VarEqv(_In_ LPVARIANT, _In_ LPVARIANT, _Out_ LPVARIANT); +HRESULT WINAPI VarIdiv(_In_ LPVARIANT, _In_ LPVARIANT, _Out_ LPVARIANT); +HRESULT WINAPI VarImp(_In_ LPVARIANT, _In_ LPVARIANT, _Out_ LPVARIANT); +HRESULT WINAPI VarMod(_In_ LPVARIANT, _In_ LPVARIANT, _Out_ LPVARIANT); +HRESULT WINAPI VarMul(_In_ LPVARIANT, _In_ LPVARIANT, _Out_ LPVARIANT); +HRESULT WINAPI VarOr(_In_ LPVARIANT, _In_ LPVARIANT, _Out_ LPVARIANT); +HRESULT WINAPI VarPow(_In_ LPVARIANT, _In_ LPVARIANT, _Out_ LPVARIANT); +HRESULT WINAPI VarSub(_In_ LPVARIANT, _In_ LPVARIANT, _Out_ LPVARIANT); +HRESULT WINAPI VarXor(_In_ LPVARIANT, _In_ LPVARIANT, _Out_ LPVARIANT); + +HRESULT WINAPI VarAbs(_In_ LPVARIANT, _Out_ LPVARIANT); +HRESULT WINAPI VarFix(_In_ LPVARIANT, _Out_ LPVARIANT); +HRESULT WINAPI VarInt(_In_ LPVARIANT, _Out_ LPVARIANT); +HRESULT WINAPI VarNeg(_In_ LPVARIANT, _Out_ LPVARIANT); +HRESULT WINAPI VarNot(_In_ LPVARIANT, _Out_ LPVARIANT); + +HRESULT WINAPI VarRound(_In_ LPVARIANT, _In_ int, _Out_ LPVARIANT); + +HRESULT WINAPI VarCmp(_In_ LPVARIANT, _In_ LPVARIANT, _In_ LCID, _In_ ULONG); + +HRESULT WINAPI VarBstrCmp(_In_ BSTR, _In_ BSTR, _In_ LCID, _In_ ULONG); +HRESULT WINAPI VarBstrCat(_In_ BSTR, _In_ BSTR, _Out_ BSTR*); typedef struct { @@ -643,32 +758,131 @@ #define VTBIT_CY (1 << VT_CY) #define VTBIT_DECIMAL (1 << VT_DECIMAL) -HRESULT WINAPI VarParseNumFromStr(OLECHAR*,LCID,ULONG,NUMPARSE*,BYTE*); -HRESULT WINAPI VarNumFromParseNum(NUMPARSE*,BYTE*,ULONG,VARIANT*); - -INT WINAPI DosDateTimeToVariantTime(USHORT,USHORT,double*); -INT WINAPI VariantTimeToDosDateTime(double,USHORT*,USHORT*); - -INT WINAPI VariantTimeToSystemTime(DOUBLE,LPSYSTEMTIME); -INT WINAPI SystemTimeToVariantTime(LPSYSTEMTIME,double*); - -HRESULT WINAPI VarDateFromUdate(UDATE*,ULONG,DATE*); -HRESULT WINAPI VarDateFromUdateEx(UDATE*,LCID,ULONG,DATE*); -HRESULT WINAPI VarUdateFromDate(DATE,ULONG,UDATE*); +_Check_return_ +HRESULT +WINAPI +VarParseNumFromStr( + _In_ OLECHAR*, + _In_ LCID, + _In_ ULONG, + _Out_ NUMPARSE*, + _Out_ BYTE*); + +_Check_return_ +HRESULT +WINAPI +VarNumFromParseNum( + _In_ NUMPARSE*, + _In_ BYTE*, + _In_ ULONG, + _Out_ VARIANT*); + +INT WINAPI DosDateTimeToVariantTime(_In_ USHORT, _In_ USHORT, _Out_ double*); +INT WINAPI VariantTimeToDosDateTime(_In_ double, _Out_ USHORT*, _Out_ USHORT*); + +INT WINAPI VariantTimeToSystemTime(_In_ DOUBLE, _Out_ LPSYSTEMTIME); +INT WINAPI SystemTimeToVariantTime(_In_ LPSYSTEMTIME, _Out_ double*); + +_Check_return_ +HRESULT +WINAPI +VarDateFromUdate( + _In_ UDATE*, + _In_ ULONG, + _Out_ DATE*); + +HRESULT +WINAPI +VarDateFromUdateEx( + _In_ UDATE*, + _In_ LCID, + _In_ ULONG, + _Out_ DATE*); + +_Check_return_ +HRESULT +WINAPI +VarUdateFromDate( + _In_ DATE, + _In_ ULONG, + _Out_ UDATE*); /* Variant formatting */ -HRESULT WINAPI VarWeekdayName(int,int,int,ULONG,BSTR*); -HRESULT WINAPI VarMonthName(int,int,ULONG,BSTR*); -HRESULT WINAPI GetAltMonthNames(LCID,LPOLESTR**); - -HRESULT WINAPI VarFormat(LPVARIANT,LPOLESTR,int,int,ULONG,BSTR*); -HRESULT WINAPI VarFormatCurrency(LPVARIANT,int,int,int,int,ULONG,BSTR*); -HRESULT WINAPI VarFormatDateTime(LPVARIANT,int,ULONG,BSTR*); -HRESULT WINAPI VarFormatNumber(LPVARIANT,int,int,int,int,ULONG,BSTR*); -HRESULT WINAPI VarFormatPercent(LPVARIANT,int,int,int,int,ULONG,BSTR*); - -HRESULT WINAPI VarFormatFromTokens(LPVARIANT,LPOLESTR,LPBYTE,ULONG,BSTR*,LCID); -HRESULT WINAPI VarTokenizeFormatString(LPOLESTR,LPBYTE,int,int,int,LCID,int*); +HRESULT WINAPI VarWeekdayName(int, int, int, ULONG, _Out_ BSTR*); +HRESULT WINAPI VarMonthName(int, int, ULONG, _Out_ BSTR*); + +_Check_return_ +HRESULT +WINAPI +GetAltMonthNames( + LCID, + _Outptr_result_buffer_maybenull_(13) LPOLESTR**); + +HRESULT +WINAPI +VarFormat( + _In_ LPVARIANT, + _In_opt_ LPOLESTR, + int, + int, + ULONG, + _Out_ BSTR*); + +HRESULT +WINAPI +VarFormatCurrency( + _In_ LPVARIANT, + int, + int, + int, + int, + ULONG, + _Out_ BSTR*); + +HRESULT WINAPI VarFormatDateTime(_In_ LPVARIANT, int, ULONG, _Out_ BSTR*); + +HRESULT +WINAPI +VarFormatNumber( + _In_ LPVARIANT, + int, + int, + int, + int, + ULONG, + _Out_ BSTR*); + +HRESULT +WINAPI +VarFormatPercent( + _In_ LPVARIANT, + int, + int, + int, + int, + ULONG, + _Out_ BSTR*); + +HRESULT +WINAPI +VarFormatFromTokens( + _In_ LPVARIANT, + _In_opt_ LPOLESTR, + LPBYTE, + ULONG, + _Out_ BSTR*, + LCID); + +HRESULT +WINAPI +VarTokenizeFormatString( + _In_opt_ LPOLESTR, + _Inout_ LPBYTE, + int, + int, + int, + LCID, + _In_opt_ int*); /* @@ -709,14 +923,66 @@ REGKIND_NONE } REGKIND; -HRESULT WINAPI DispGetParam(DISPPARAMS*,UINT,VARTYPE,VARIANT*,UINT*); -HRESULT WINAPI DispGetIDsOfNames(ITypeInfo*,OLECHAR**,UINT,DISPID*); -HRESULT WINAPI DispInvoke(void*,ITypeInfo*,DISPID,WORD,DISPPARAMS*,VARIANT*, - EXCEPINFO*,UINT*); -HRESULT WINAPI CreateDispTypeInfo(INTERFACEDATA*,LCID,ITypeInfo**); -HRESULT WINAPI CreateStdDispatch(IUnknown*,void*,ITypeInfo*,IUnknown**); -HRESULT WINAPI DispCallFunc(void*,ULONG_PTR,CALLCONV,VARTYPE,UINT,VARTYPE*, - VARIANTARG**,VARIANT*); +_Check_return_ +HRESULT +WINAPI +DispGetParam( + _In_ DISPPARAMS*, + UINT, + VARTYPE, + _Out_ VARIANT*, + _Out_opt_ UINT*); + +_Check_return_ +HRESULT +WINAPI +DispGetIDsOfNames( + ITypeInfo*, + _In_reads_(cNames) OLECHAR**, + UINT cNames, + _Out_writes_(cNames) DISPID*); + +_Check_return_ +HRESULT +WINAPI +DispInvoke( + void*, + ITypeInfo*, + DISPID, + WORD, + DISPPARAMS*, + VARIANT*, + EXCEPINFO*, + UINT*); + +_Check_return_ +HRESULT +WINAPI +CreateDispTypeInfo( + INTERFACEDATA*, + LCID, + ITypeInfo**); + +_Check_return_ +HRESULT +WINAPI +CreateStdDispatch( + IUnknown*, + void*, + ITypeInfo*, + IUnknown**); + +HRESULT +WINAPI +DispCallFunc( + void*, + ULONG_PTR, + CALLCONV, + VARTYPE, + UINT, + VARTYPE*, + VARIANTARG**, + VARIANT*); /* @@ -742,15 +1008,61 @@ #define LOAD_TLB_AS_64BIT 0x40 #define MASK_TO_RESET_TLB_BITS ~(LOAD_TLB_AS_32BIT|LOAD_TLB_AS_64BIT) -HRESULT WINAPI CreateTypeLib(SYSKIND,const OLECHAR*,ICreateTypeLib**); -HRESULT WINAPI CreateTypeLib2(SYSKIND,LPCOLESTR,ICreateTypeLib2**); -HRESULT WINAPI LoadRegTypeLib(REFGUID,WORD,WORD,LCID,ITypeLib**); -HRESULT WINAPI LoadTypeLib(const OLECHAR*,ITypeLib**); -HRESULT WINAPI LoadTypeLibEx(LPCOLESTR,REGKIND,ITypeLib**); +_Check_return_ +HRESULT +WINAPI +CreateTypeLib( + SYSKIND, + const OLECHAR*, + ICreateTypeLib**); + +_Check_return_ +HRESULT +WINAPI +CreateTypeLib2( + SYSKIND, + LPCOLESTR, + ICreateTypeLib2**); + +_Check_return_ +HRESULT +WINAPI +LoadRegTypeLib( + REFGUID, + WORD, + WORD, + LCID, + ITypeLib**); + +HRESULT WINAPI LoadTypeLib(_In_z_ const OLECHAR*, ITypeLib**); +_Check_return_ HRESULT WINAPI LoadTypeLibEx(LPCOLESTR, REGKIND, ITypeLib**); HRESULT WINAPI QueryPathOfRegTypeLib(REFGUID,WORD,WORD,LCID,LPBSTR); -HRESULT WINAPI RegisterTypeLib(ITypeLib*,OLECHAR*,OLECHAR*); -HRESULT WINAPI UnRegisterTypeLib(REFGUID,WORD,WORD,LCID,SYSKIND); -HRESULT WINAPI RegisterTypeLibForUser(ITypeLib*,OLECHAR*,OLECHAR*); + +_Check_return_ +HRESULT +WINAPI +RegisterTypeLib( + ITypeLib*, + _In_ OLECHAR*, + _In_opt_ OLECHAR*); + +_Check_return_ +HRESULT +WINAPI +UnRegisterTypeLib( + REFGUID, + WORD, + WORD, + LCID, + SYSKIND); + +HRESULT +WINAPI +RegisterTypeLibForUser( + ITypeLib*, + _In_ OLECHAR*, + _In_opt_ OLECHAR*); + HRESULT WINAPI UnRegisterTypeLibForUser(REFGUID,WORD,WORD,LCID,SYSKIND); VOID WINAPI ClearCustData(LPCUSTDATA);
11 years, 4 months
1
0
0
0
[aandrejevic] 59760: [SOFT386] Implement Soft386ReadMemory, Soft386WriteMemory, Soft386StackPush and Soft386StackPop.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Sat Aug 17 15:20:47 2013 New Revision: 59760 URL:
http://svn.reactos.org/svn/reactos?rev=59760&view=rev
Log: [SOFT386] Implement Soft386ReadMemory, Soft386WriteMemory, Soft386StackPush and Soft386StackPop. Added: branches/ntvdm/lib/soft386/common.c (with props) branches/ntvdm/lib/soft386/common.h (with props) Modified: branches/ntvdm/lib/soft386/CMakeLists.txt branches/ntvdm/lib/soft386/soft386.c Modified: branches/ntvdm/lib/soft386/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/soft386/CMakeLists.tx…
============================================================================== --- branches/ntvdm/lib/soft386/CMakeLists.txt [iso-8859-1] (original) +++ branches/ntvdm/lib/soft386/CMakeLists.txt [iso-8859-1] Sat Aug 17 15:20:47 2013 @@ -1,6 +1,7 @@ include_directories(${REACTOS_SOURCE_DIR}/include/reactos/libs/soft386) list(APPEND SOURCE - soft386.c) + soft386.c + common.c) add_library(soft386 ${SOURCE}) Added: branches/ntvdm/lib/soft386/common.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/soft386/common.c?rev=…
============================================================================== --- branches/ntvdm/lib/soft386/common.c (added) +++ branches/ntvdm/lib/soft386/common.c [iso-8859-1] Sat Aug 17 15:20:47 2013 @@ -0,0 +1,302 @@ +/* + * COPYRIGHT: GPL - See COPYING in the top level directory + * PROJECT: 386/486 CPU Emulation Library + * FILE: common.c + * PURPOSE: Common functions used internally by Soft386. + * PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org> + */ + +/* INCLUDES *******************************************************************/ + +#include "common.h" + +/* PUBLIC FUNCTIONS ***********************************************************/ + +inline +BOOLEAN +Soft386ReadMemory(PSOFT386_STATE State, + INT SegmentReg, + ULONG Offset, + BOOLEAN InstFetch, + PVOID Buffer, + ULONG Size) +{ + ULONG LinearAddress; + PSOFT386_SEG_REG CachedDescriptor; + + ASSERT(SegmentReg < SOFT386_NUM_SEG_REGS); + + /* Get the cached descriptor */ + CachedDescriptor = &State->SegmentRegs[SegmentReg]; + + if ((Offset + Size) >= CachedDescriptor->Limit) + { + /* Read beyond limit */ + // TODO: Generate exception #GP + + return FALSE; + } + + /* Check for protected mode */ + if (State->ControlRegisters[0] & SOFT386_CR0_PE) + { + /* Privilege checks */ + + if (!CachedDescriptor->Present) + { + // TODO: Generate exception #NP + return FALSE; + } + + if (GET_SEGMENT_DPL(CachedDescriptor->Selector) > CachedDescriptor->Dpl) + { + // TODO: Generate exception #GP + return FALSE; + } + + if (InstFetch) + { + if (!CachedDescriptor->Executable) + { + /* Data segment not executable */ + + // TODO: Generate exception #GP + return FALSE; + } + } + else + { + if (CachedDescriptor->Executable && (!CachedDescriptor->ReadWrite)) + { + /* Code segment not readable */ + + // TODO: Generate exception #GP + return FALSE; + } + } + } + + /* Find the linear address */ + LinearAddress = CachedDescriptor->Base + Offset; + + // TODO: Paging support! + + /* Did the host provide a memory hook? */ + if (State->MemReadCallback) + { + /* Yes, call the host */ + State->MemReadCallback(State, LinearAddress, Buffer, Size); + } + else + { + /* Read the memory directly */ + RtlMoveMemory(Buffer, (LPVOID)LinearAddress, Size); + } + + return TRUE; +} + +inline +BOOLEAN +Soft386WriteMemory(PSOFT386_STATE State, + INT SegmentReg, + ULONG Offset, + PVOID Buffer, + ULONG Size) +{ + ULONG LinearAddress; + PSOFT386_SEG_REG CachedDescriptor; + + ASSERT(SegmentReg < SOFT386_NUM_SEG_REGS); + + /* Get the cached descriptor */ + CachedDescriptor = &State->SegmentRegs[SegmentReg]; + + if ((Offset + Size) >= CachedDescriptor->Limit) + { + /* Write beyond limit */ + // TODO: Generate exception #GP + + return FALSE; + } + + /* Check for protected mode */ + if (State->ControlRegisters[0] & SOFT386_CR0_PE) + { + /* Privilege checks */ + + if (!CachedDescriptor->Present) + { + // TODO: Generate exception #NP + return FALSE; + } + + if (GET_SEGMENT_DPL(CachedDescriptor->Selector) > CachedDescriptor->Dpl) + { + // TODO: Generate exception #GP + return FALSE; + } + + if (CachedDescriptor->Executable) + { + /* Code segment not writable */ + + // TODO: Generate exception #GP + return FALSE; + } + else if (!CachedDescriptor->ReadWrite) + { + /* Data segment not writeable */ + + // TODO: Generate exception #GP + return FALSE; + } + } + + /* Find the linear address */ + LinearAddress = CachedDescriptor->Base + Offset; + + // TODO: Paging support! + + /* Did the host provide a memory hook? */ + if (State->MemWriteCallback) + { + /* Yes, call the host */ + State->MemWriteCallback(State, LinearAddress, Buffer, Size); + } + else + { + /* Write the memory directly */ + RtlMoveMemory((LPVOID)LinearAddress, Buffer, Size); + } + + return TRUE; +} + +inline +BOOLEAN +Soft386StackPush(PSOFT386_STATE State, ULONG Value) +{ + BOOLEAN Size = State->SegmentRegs[SOFT386_REG_SS].Size; + + // TODO: Handle OPSIZE prefix. + + if (Size) + { + /* 32-bit size */ + + /* Check if ESP is between 1 and 3 */ + if (State->GeneralRegs[SOFT386_REG_ESP].Long >= 1 + && State->GeneralRegs[SOFT386_REG_ESP].Long <= 3) + { + // TODO: Exception #SS + return FALSE; + } + + /* Subtract ESP by 4 */ + State->GeneralRegs[SOFT386_REG_ESP].Long -= 4; + + /* Store the value in SS:ESP */ + return Soft386WriteMemory(State, + SOFT386_REG_SS, + State->GeneralRegs[SOFT386_REG_ESP].Long, + &Value, + sizeof(ULONG)); + } + else + { + /* 16-bit size */ + USHORT ShortValue = LOWORD(Value); + + /* Check if SP is 1 */ + if (State->GeneralRegs[SOFT386_REG_ESP].Long == 1) + { + // TODO: Exception #SS + return FALSE; + } + + /* Subtract SP by 2 */ + State->GeneralRegs[SOFT386_REG_ESP].LowWord -= 2; + + /* Store the value in SS:SP */ + return Soft386WriteMemory(State, + SOFT386_REG_SS, + State->GeneralRegs[SOFT386_REG_ESP].LowWord, + &ShortValue, + sizeof(USHORT)); + } +} + +inline +BOOLEAN +Soft386StackPop(PSOFT386_STATE State, PULONG Value) +{ + ULONG LongValue; + USHORT ShortValue; + BOOLEAN Size = State->SegmentRegs[SOFT386_REG_SS].Size; + + // TODO: Handle OPSIZE prefix. + + if (Size) + { + /* 32-bit size */ + + /* Check if ESP is 0xFFFFFFFF */ + if (State->GeneralRegs[SOFT386_REG_ESP].Long == 0xFFFFFFFF) + { + // TODO: Exception #SS + return FALSE; + } + + /* Read the value from SS:ESP */ + if (!Soft386ReadMemory(State, + SOFT386_REG_SS, + State->GeneralRegs[SOFT386_REG_ESP].Long, + FALSE, + &LongValue, + sizeof(LongValue))) + { + /* An exception occurred */ + return FALSE; + } + + /* Increment ESP by 4 */ + State->GeneralRegs[SOFT386_REG_ESP].Long += 4; + + /* Store the value in the result */ + *Value = LongValue; + } + else + { + /* 16-bit size */ + + /* Check if SP is 0xFFFF */ + if (State->GeneralRegs[SOFT386_REG_ESP].LowWord == 0xFFFF) + { + // TODO: Exception #SS + return FALSE; + } + + /* Read the value from SS:SP */ + if (!Soft386ReadMemory(State, + SOFT386_REG_SS, + State->GeneralRegs[SOFT386_REG_ESP].LowWord, + FALSE, + &ShortValue, + sizeof(ShortValue))) + { + /* An exception occurred */ + return FALSE; + } + + /* Increment SP by 2 */ + State->GeneralRegs[SOFT386_REG_ESP].Long += 2; + + /* Store the value in the result */ + *Value = ShortValue; + } + + return TRUE; +} + +/* EOF */ Propchange: branches/ntvdm/lib/soft386/common.c ------------------------------------------------------------------------------ svn:eol-style = native Added: branches/ntvdm/lib/soft386/common.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/soft386/common.h?rev=…
============================================================================== --- branches/ntvdm/lib/soft386/common.h (added) +++ branches/ntvdm/lib/soft386/common.h [iso-8859-1] Sat Aug 17 15:20:47 2013 @@ -0,0 +1,63 @@ +/* + * COPYRIGHT: GPL - See COPYING in the top level directory + * PROJECT: 386/486 CPU Emulation Library + * FILE: common.h + * PURPOSE: Common functions used internally by Soft386 (header file). + * PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org> + */ + +#ifndef _COMMON_H_ +#define _COMMON_H_ + +/* INCLUDES *******************************************************************/ + +#include <soft386.h> + +/* DEFINES ********************************************************************/ + +#define GET_SEGMENT_DPL(s) ((s) & 3) + +/* FUNCTIONS ******************************************************************/ + +inline +BOOLEAN +Soft386ReadMemory +( + PSOFT386_STATE State, + INT SegmentReg, + ULONG Offset, + BOOLEAN InstFetch, + PVOID Buffer, + ULONG Size +); + +inline +BOOLEAN +Soft386WriteMemory +( + PSOFT386_STATE State, + INT SegmentReg, + ULONG Offset, + PVOID Buffer, + ULONG Size +); + +inline +BOOLEAN +Soft386StackPush +( + PSOFT386_STATE State, + ULONG Value +); + +inline +BOOLEAN +Soft386StackPop +( + PSOFT386_STATE State, + PULONG Value +); + +#endif // _COMMON_H_ + +/* EOF */ Propchange: branches/ntvdm/lib/soft386/common.h ------------------------------------------------------------------------------ svn:eol-style = native Modified: branches/ntvdm/lib/soft386/soft386.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/soft386/soft386.c?rev…
============================================================================== --- branches/ntvdm/lib/soft386/soft386.c [iso-8859-1] (original) +++ branches/ntvdm/lib/soft386/soft386.c [iso-8859-1] Sat Aug 17 15:20:47 2013 @@ -8,7 +8,7 @@ /* INCLUDES *******************************************************************/ -#include "soft386.h" +#include "common.h" /* DEFINES ********************************************************************/ @@ -23,6 +23,7 @@ /* PRIVATE FUNCTIONS **********************************************************/ static +inline VOID NTAPI Soft386ExecutionControl(PSOFT386_STATE State, INT Command) @@ -210,3 +211,5 @@ // TODO: NOT IMPLEMENTED!!! UNIMPLEMENTED; } + +/* EOF */
11 years, 4 months
1
0
0
0
[ekohl] 59759: [NETAPI32] - NetUserAdd: Open the accounts domain with DOMAIN_READ_PASSWORD_PARAMETERS access. This is needed in order to check whether the password matches the password requirements...
by ekohl@svn.reactos.org
Author: ekohl Date: Sat Aug 17 13:18:02 2013 New Revision: 59759 URL:
http://svn.reactos.org/svn/reactos?rev=59759&view=rev
Log: [NETAPI32] - NetUserAdd: Open the accounts domain with DOMAIN_READ_PASSWORD_PARAMETERS access. This is needed in order to check whether the password matches the password requirements of the domain. - Start implementing NetUserGetGroups. Modified: trunk/reactos/dll/win32/netapi32/user.c Modified: trunk/reactos/dll/win32/netapi32/user.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/user.c?…
============================================================================== --- trunk/reactos/dll/win32/netapi32/user.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/user.c [iso-8859-1] Sat Aug 17 13:18:02 2013 @@ -20,7 +20,7 @@ /* * TODO: - * Implement NetUserGetGroups + * Implement NetUserGetGroups (WIP) * Implement NetUserSetGroups * NetUserGetLocalGroups does not support LG_INCLUDE_INDIRECT yet. * Add missing information levels. @@ -2056,7 +2056,7 @@ /* Open the Account Domain */ Status = OpenAccountDomain(ServerHandle, (servername != NULL) ? &ServerName : NULL, - DOMAIN_CREATE_USER | DOMAIN_LOOKUP, + DOMAIN_CREATE_USER | DOMAIN_LOOKUP | DOMAIN_READ_PASSWORD_PARAMETERS, &DomainHandle); if (!NT_SUCCESS(Status)) { @@ -2621,15 +2621,160 @@ LPDWORD entriesread, LPDWORD totalentries) { - FIXME("%s %s %d %p %d %p %p stub\n", debugstr_w(servername), + UNICODE_STRING ServerName; + UNICODE_STRING UserName; + SAM_HANDLE ServerHandle = NULL; + SAM_HANDLE AccountDomainHandle = NULL; + SAM_HANDLE UserHandle = NULL; + PSID AccountDomainSid = NULL; + PULONG RelativeIds = NULL; + PSID_NAME_USE Use = NULL; + PGROUP_MEMBERSHIP GroupMembership = NULL; + ULONG GroupCount; + + NET_API_STATUS ApiStatus = NERR_Success; + NTSTATUS Status = STATUS_SUCCESS; + + TRACE("%s %s %d %p %d %p %p stub\n", debugstr_w(servername), debugstr_w(username), level, bufptr, prefixmaxlen, entriesread, totalentries); + if (servername != NULL) + RtlInitUnicodeString(&ServerName, servername); + + RtlInitUnicodeString(&UserName, username); + + /* Connect to the SAM Server */ + Status = SamConnect((servername != NULL) ? &ServerName : NULL, + &ServerHandle, + SAM_SERVER_CONNECT | SAM_SERVER_LOOKUP_DOMAIN, + NULL); + if (!NT_SUCCESS(Status)) + { + ERR("SamConnect failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + /* Get the Account Domain SID */ + Status = GetAccountDomainSid((servername != NULL) ? &ServerName : NULL, + &AccountDomainSid); + if (!NT_SUCCESS(Status)) + { + ERR("GetAccountDomainSid failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + /* Open the Account Domain */ + Status = SamOpenDomain(ServerHandle, + DOMAIN_LOOKUP | DOMAIN_GET_ALIAS_MEMBERSHIP, + AccountDomainSid, + &AccountDomainHandle); + if (!NT_SUCCESS(Status)) + { + ERR("OpenAccountDomain failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + /* Get the RID for the given user name */ + Status = SamLookupNamesInDomain(AccountDomainHandle, + 1, + &UserName, + &RelativeIds, + &Use); + if (!NT_SUCCESS(Status)) + { + ERR("SamLookupNamesInDomain failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + /* Fail, if it is not a user account */ + if (Use[0] != SidTypeUser) + { + ERR("Account is not a User!\n"); + ApiStatus = NERR_UserNotFound; + goto done; + } + + /* Open the user object */ + Status = SamOpenUser(AccountDomainHandle, + USER_LIST_GROUPS, + RelativeIds[0], + &UserHandle); + if (!NT_SUCCESS(Status)) + { + ERR("SamOpenUser failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + /* Get the group memberships of this user */ + Status = SamGetGroupsForUser(UserHandle, + &GroupMembership, + &GroupCount); + if (!NT_SUCCESS(Status)) + { + ERR("SamGetGroupsForUser failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + /* If there is no group membership, we're done */ + if (GroupCount == 0) + { + ApiStatus = NERR_Success; + goto done; + } + + +done: + + if (GroupMembership != NULL) + SamFreeMemory(GroupMembership); + + if (UserHandle != NULL) + SamCloseHandle(UserHandle); + + if (RelativeIds != NULL) + SamFreeMemory(RelativeIds); + + if (Use != NULL) + SamFreeMemory(Use); + + if (AccountDomainSid != NULL) + RtlFreeHeap(RtlGetProcessHeap(), 0, AccountDomainSid); + + if (AccountDomainHandle != NULL) + SamCloseHandle(AccountDomainHandle); + + if (ServerHandle != NULL) + SamCloseHandle(ServerHandle); + + if (ApiStatus != NERR_Success && ApiStatus != ERROR_MORE_DATA) + { + *entriesread = 0; + *totalentries = 0; + } + else + { +// *entriesread = Count; +// *totalentries = Count; + } + +// *bufptr = (LPBYTE)Buffer; + + return ApiStatus; + +#if 0 *bufptr = NULL; *entriesread = 0; *totalentries = 0; return ERROR_INVALID_LEVEL; +#endif }
11 years, 4 months
1
0
0
0
[akhaldi] 59758: [PSDK] * Annotate dbghelp.h.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Aug 17 11:20:05 2013 New Revision: 59758 URL:
http://svn.reactos.org/svn/reactos?rev=59758&view=rev
Log: [PSDK] * Annotate dbghelp.h. Modified: trunk/reactos/include/psdk/dbghelp.h Modified: trunk/reactos/include/psdk/dbghelp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/dbghelp.h?rev…
============================================================================== --- trunk/reactos/include/psdk/dbghelp.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/dbghelp.h [iso-8859-1] Sat Aug 17 11:20:05 2013 @@ -668,7 +668,11 @@ } DUMMYUNIONNAME; } MINIDUMP_CALLBACK_OUTPUT, *PMINIDUMP_CALLBACK_OUTPUT; -typedef BOOL (WINAPI* MINIDUMP_CALLBACK_ROUTINE)(PVOID, const PMINIDUMP_CALLBACK_INPUT, PMINIDUMP_CALLBACK_OUTPUT); +typedef BOOL +(WINAPI* MINIDUMP_CALLBACK_ROUTINE)( + _Inout_ PVOID, + _In_ const PMINIDUMP_CALLBACK_INPUT, + _Inout_ PMINIDUMP_CALLBACK_OUTPUT); typedef struct _MINIDUMP_CALLBACK_INFORMATION { @@ -887,12 +891,25 @@ LastReservedStream = 0xffff } MINIDUMP_STREAM_TYPE; -BOOL WINAPI MiniDumpWriteDump(HANDLE, DWORD, HANDLE, MINIDUMP_TYPE, - const PMINIDUMP_EXCEPTION_INFORMATION, - const PMINIDUMP_USER_STREAM_INFORMATION, - const PMINIDUMP_CALLBACK_INFORMATION); -BOOL WINAPI MiniDumpReadDumpStream(PVOID, ULONG, PMINIDUMP_DIRECTORY*, PVOID*, - ULONG*); +BOOL +WINAPI +MiniDumpWriteDump( + _In_ HANDLE, + _In_ DWORD, + _In_ HANDLE, + _In_ MINIDUMP_TYPE, + _In_opt_ const PMINIDUMP_EXCEPTION_INFORMATION, + _In_opt_ const PMINIDUMP_USER_STREAM_INFORMATION, + _In_opt_ const PMINIDUMP_CALLBACK_INFORMATION); + +BOOL +WINAPI +MiniDumpReadDumpStream( + _In_ PVOID, + _In_ ULONG, + _Outptr_result_maybenull_ PMINIDUMP_DIRECTORY*, + _Outptr_result_maybenull_ PVOID*, + _Out_opt_ ULONG*); #include <poppack.h> @@ -904,23 +921,111 @@ #define SLMFLAG_VIRTUAL 0x1 #define SLMFLAG_NO_SYMBOLS 0x4 -typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK64)(PCSTR, DWORD64, ULONG, PVOID); -BOOL WINAPI EnumerateLoadedModules64(HANDLE, PENUMLOADED_MODULES_CALLBACK64, PVOID); -typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACKW64)(PCWSTR, DWORD64, ULONG, PVOID); -BOOL WINAPI EnumerateLoadedModulesW64(HANDLE, PENUMLOADED_MODULES_CALLBACKW64, PVOID); -typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK64)(PCSTR, DWORD64, PVOID); -BOOL WINAPI SymEnumerateModules64(HANDLE, PSYM_ENUMMODULES_CALLBACK64, PVOID); -typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACKW64)(PCWSTR, DWORD64, PVOID); -BOOL WINAPI SymEnumerateModulesW64(HANDLE, PSYM_ENUMMODULES_CALLBACKW64, PVOID); -BOOL WINAPI SymGetModuleInfo64(HANDLE, DWORD64, PIMAGEHLP_MODULE64); -BOOL WINAPI SymGetModuleInfoW64(HANDLE, DWORD64, PIMAGEHLP_MODULEW64); -DWORD64 WINAPI SymGetModuleBase64(HANDLE, DWORD64); -DWORD64 WINAPI SymLoadModule64(HANDLE, HANDLE, PCSTR, PCSTR, DWORD64, DWORD); -DWORD64 WINAPI SymLoadModuleEx(HANDLE, HANDLE, PCSTR, PCSTR, DWORD64, DWORD, - PMODLOAD_DATA, DWORD); -DWORD64 WINAPI SymLoadModuleExW(HANDLE, HANDLE, PCWSTR, PCWSTR, DWORD64, DWORD, - PMODLOAD_DATA, DWORD); -BOOL WINAPI SymUnloadModule64(HANDLE, DWORD64); +typedef BOOL +(CALLBACK *PENUMLOADED_MODULES_CALLBACK64)( + _In_ PCSTR, + _In_ DWORD64, + _In_ ULONG, + _In_opt_ PVOID); + +BOOL +WINAPI +EnumerateLoadedModules64( + _In_ HANDLE, + _In_ PENUMLOADED_MODULES_CALLBACK64, + _In_opt_ PVOID); + +typedef BOOL +(CALLBACK *PENUMLOADED_MODULES_CALLBACKW64)( + _In_ PCWSTR, + _In_ DWORD64, + _In_ ULONG, + _In_opt_ PVOID); + +BOOL +WINAPI +EnumerateLoadedModulesW64( + _In_ HANDLE, + _In_ PENUMLOADED_MODULES_CALLBACKW64, + _In_opt_ PVOID); + +typedef BOOL +(CALLBACK *PSYM_ENUMMODULES_CALLBACK64)( + _In_ PCSTR, + _In_ DWORD64, + _In_opt_ PVOID); + +BOOL +WINAPI +SymEnumerateModules64( + _In_ HANDLE, + _In_ PSYM_ENUMMODULES_CALLBACK64, + _In_opt_ PVOID); + +typedef BOOL +(CALLBACK *PSYM_ENUMMODULES_CALLBACKW64)( + _In_ PCWSTR, + _In_ DWORD64, + _In_opt_ PVOID); + +BOOL +WINAPI +SymEnumerateModulesW64( + _In_ HANDLE, + _In_ PSYM_ENUMMODULES_CALLBACKW64, + _In_opt_ PVOID); + +BOOL +WINAPI +SymGetModuleInfo64( + _In_ HANDLE, + _In_ DWORD64, + _Out_ PIMAGEHLP_MODULE64); + +BOOL +WINAPI +SymGetModuleInfoW64( + _In_ HANDLE, + _In_ DWORD64, + _Out_ PIMAGEHLP_MODULEW64); + +DWORD64 WINAPI SymGetModuleBase64(_In_ HANDLE, _In_ DWORD64); + +DWORD64 +WINAPI +SymLoadModule64( + _In_ HANDLE, + _In_opt_ HANDLE, + _In_opt_ PCSTR, + _In_opt_ PCSTR, + _In_ DWORD64, + _In_ DWORD); + +DWORD64 +WINAPI +SymLoadModuleEx( + _In_ HANDLE, + _In_opt_ HANDLE, + _In_opt_ PCSTR, + _In_opt_ PCSTR, + _In_ DWORD64, + _In_ DWORD, + _In_opt_ PMODLOAD_DATA, + _In_opt_ DWORD); + +DWORD64 +WINAPI +SymLoadModuleExW( + _In_ HANDLE, + _In_opt_ HANDLE, + _In_opt_ PCWSTR, + _In_opt_ PCWSTR, + _In_ DWORD64, + _In_ DWORD, + _In_opt_ PMODLOAD_DATA, + _In_opt_ DWORD); + +BOOL WINAPI SymUnloadModule64(_In_ HANDLE, _In_ DWORD64); /************************* * Symbol Handling * @@ -1086,83 +1191,494 @@ #define SYMSEARCH_RECURSE 0x02 #define SYMSEARCH_GLOBALSONLY 0x04 -BOOL WINAPI SymGetTypeInfo(HANDLE, DWORD64, ULONG, IMAGEHLP_SYMBOL_TYPE_INFO, PVOID); -BOOL WINAPI SymGetTypeInfoEx(HANDLE, DWORD64, PIMAGEHLP_GET_TYPE_INFO_PARAMS); -typedef BOOL (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACK)(PSYMBOL_INFO, ULONG, PVOID); -typedef BOOL (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACKW)(PSYMBOL_INFOW, ULONG, PVOID); -BOOL WINAPI SymEnumTypes(HANDLE, ULONG64, PSYM_ENUMERATESYMBOLS_CALLBACK, PVOID); -BOOL WINAPI SymEnumTypesW(HANDLE, ULONG64, PSYM_ENUMERATESYMBOLS_CALLBACKW, PVOID); -BOOL WINAPI SymFromAddr(HANDLE, DWORD64, DWORD64*, SYMBOL_INFO*); -BOOL WINAPI SymFromAddrW(HANDLE, DWORD64, DWORD64*, SYMBOL_INFOW*); -BOOL WINAPI SymFromToken(HANDLE, DWORD64, DWORD, PSYMBOL_INFO); -BOOL WINAPI SymFromTokenW(HANDLE, DWORD64, DWORD, PSYMBOL_INFOW); -BOOL WINAPI SymFromName(HANDLE, PCSTR, PSYMBOL_INFO); -BOOL WINAPI SymFromNameW(HANDLE, PCWSTR, PSYMBOL_INFOW); -BOOL WINAPI SymGetSymFromAddr64(HANDLE, DWORD64, PDWORD64, PIMAGEHLP_SYMBOL64); -BOOL WINAPI SymGetSymFromName64(HANDLE, PCSTR, PIMAGEHLP_SYMBOL64); -BOOL WINAPI SymGetTypeFromName(HANDLE, ULONG64, PCSTR, PSYMBOL_INFO); -BOOL WINAPI SymGetTypeFromNameW(HANDLE, ULONG64, PCWSTR, PSYMBOL_INFOW); -BOOL WINAPI SymGetSymNext64(HANDLE, PIMAGEHLP_SYMBOL64); -BOOL WINAPI SymGetSymNextW64(HANDLE, PIMAGEHLP_SYMBOLW64); -BOOL WINAPI SymGetSymPrev64(HANDLE, PIMAGEHLP_SYMBOL64); -BOOL WINAPI SymGetSymPrevW64(HANDLE, PIMAGEHLP_SYMBOLW64); -BOOL WINAPI SymEnumSym(HANDLE,ULONG64,PSYM_ENUMERATESYMBOLS_CALLBACK,PVOID); -BOOL WINAPI SymEnumSymbols(HANDLE, ULONG64, PCSTR, PSYM_ENUMERATESYMBOLS_CALLBACK, - PVOID); -BOOL WINAPI SymEnumSymbolsW(HANDLE, ULONG64, PCWSTR, PSYM_ENUMERATESYMBOLS_CALLBACKW, - PVOID); -typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64)(PCSTR, DWORD64, ULONG, PVOID); -typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64W)(PCWSTR, DWORD64, ULONG, PVOID); -BOOL WINAPI SymEnumerateSymbols64(HANDLE, ULONG64, PSYM_ENUMSYMBOLS_CALLBACK64, PVOID); -BOOL WINAPI SymEnumerateSymbolsW64(HANDLE, ULONG64, PSYM_ENUMSYMBOLS_CALLBACK64W, PVOID); -BOOL WINAPI SymEnumSymbolsForAddr(HANDLE, DWORD64, PSYM_ENUMERATESYMBOLS_CALLBACK, PVOID); -BOOL WINAPI SymEnumSymbolsForAddrW(HANDLE, DWORD64, PSYM_ENUMERATESYMBOLS_CALLBACKW, PVOID); -typedef BOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK64)(HANDLE, ULONG, ULONG64, ULONG64); -BOOL WINAPI SymRegisterCallback64(HANDLE, PSYMBOL_REGISTERED_CALLBACK64, ULONG64); -BOOL WINAPI SymRegisterCallbackW64(HANDLE, PSYMBOL_REGISTERED_CALLBACK64, ULONG64); -BOOL WINAPI SymUnDName64(PIMAGEHLP_SYMBOL64, PSTR, DWORD); -BOOL WINAPI SymMatchString(PCSTR, PCSTR, BOOL); -BOOL WINAPI SymMatchStringA(PCSTR, PCSTR, BOOL); -BOOL WINAPI SymMatchStringW(PCWSTR, PCWSTR, BOOL); -BOOL WINAPI SymSearch(HANDLE, ULONG64, DWORD, DWORD, PCSTR, DWORD64, PSYM_ENUMERATESYMBOLS_CALLBACK, PVOID, DWORD); -BOOL WINAPI SymSearchW(HANDLE, ULONG64, DWORD, DWORD, PCWSTR, DWORD64, PSYM_ENUMERATESYMBOLS_CALLBACKW, PVOID, DWORD); -DWORD WINAPI UnDecorateSymbolName(PCSTR, PSTR, DWORD, DWORD); -DWORD WINAPI UnDecorateSymbolNameW(PCWSTR, PWSTR, DWORD, DWORD); -BOOL WINAPI SymGetScope(HANDLE, ULONG64, DWORD, PSYMBOL_INFO); -BOOL WINAPI SymGetScopeW(HANDLE, ULONG64, DWORD, PSYMBOL_INFOW); -BOOL WINAPI SymFromIndex(HANDLE, ULONG64, DWORD, PSYMBOL_INFO); -BOOL WINAPI SymFromIndexW(HANDLE, ULONG64, DWORD, PSYMBOL_INFOW); -BOOL WINAPI SymAddSymbol(HANDLE, ULONG64, PCSTR, DWORD64, DWORD, DWORD); -BOOL WINAPI SymAddSymbolW(HANDLE, ULONG64, PCWSTR, DWORD64, DWORD, DWORD); -BOOL WINAPI SymDeleteSymbol(HANDLE, ULONG64, PCSTR, DWORD64, DWORD); -BOOL WINAPI SymDeleteSymbolW(HANDLE, ULONG64, PCWSTR, DWORD64, DWORD); +BOOL +WINAPI +SymGetTypeInfo( + _In_ HANDLE, + _In_ DWORD64, + _In_ ULONG, + _In_ IMAGEHLP_SYMBOL_TYPE_INFO, + _Out_ PVOID); + +BOOL +WINAPI +SymGetTypeInfoEx( + _In_ HANDLE, + _In_ DWORD64, + _Inout_ PIMAGEHLP_GET_TYPE_INFO_PARAMS); + +typedef BOOL +(CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACK)( + _In_ PSYMBOL_INFO, + _In_ ULONG, + _In_opt_ PVOID); + +typedef BOOL +(CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACKW)( + _In_ PSYMBOL_INFOW, + _In_ ULONG, + _In_opt_ PVOID); + +BOOL +WINAPI +SymEnumTypes( + _In_ HANDLE, + _In_ ULONG64, + _In_ PSYM_ENUMERATESYMBOLS_CALLBACK, + _In_opt_ PVOID); + +BOOL +WINAPI +SymEnumTypesW( + _In_ HANDLE, + _In_ ULONG64, + _In_ PSYM_ENUMERATESYMBOLS_CALLBACKW, + _In_opt_ PVOID); + +BOOL +WINAPI +SymFromAddr( + _In_ HANDLE, + _In_ DWORD64, + _Out_opt_ DWORD64*, + _Inout_ SYMBOL_INFO*); + +BOOL +WINAPI +SymFromAddrW( + _In_ HANDLE, + _In_ DWORD64, + _Out_opt_ DWORD64*, + _Inout_ SYMBOL_INFOW*); + +BOOL +WINAPI +SymFromToken( + _In_ HANDLE, + _In_ DWORD64, + _In_ DWORD, + _Inout_ PSYMBOL_INFO); + +BOOL +WINAPI +SymFromTokenW( + _In_ HANDLE, + _In_ DWORD64, + _In_ DWORD, + _Inout_ PSYMBOL_INFOW); + +BOOL WINAPI SymFromName(_In_ HANDLE, _In_ PCSTR, _Inout_ PSYMBOL_INFO); +BOOL WINAPI SymFromNameW(_In_ HANDLE, _In_ PCWSTR, _Inout_ PSYMBOL_INFOW); + +BOOL +WINAPI +SymGetSymFromAddr64( + _In_ HANDLE, + _In_ DWORD64, + _Out_opt_ PDWORD64, + _Inout_ PIMAGEHLP_SYMBOL64); + +BOOL +WINAPI +SymGetSymFromName64( + _In_ HANDLE, + _In_ PCSTR, + _Inout_ PIMAGEHLP_SYMBOL64); + +BOOL +WINAPI +SymGetTypeFromName( + _In_ HANDLE, + _In_ ULONG64, + _In_ PCSTR, + _Inout_ PSYMBOL_INFO); + +BOOL +WINAPI +SymGetTypeFromNameW( + _In_ HANDLE, + _In_ ULONG64, + _In_ PCWSTR, + _Inout_ PSYMBOL_INFOW); + +BOOL WINAPI SymGetSymNext64(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOL64); +BOOL WINAPI SymGetSymNextW64(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOLW64); +BOOL WINAPI SymGetSymPrev64(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOL64); +BOOL WINAPI SymGetSymPrevW64(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOLW64); + +BOOL +WINAPI +SymEnumSym( + _In_ HANDLE, + _In_ ULONG64, + _In_ PSYM_ENUMERATESYMBOLS_CALLBACK, + _In_opt_ PVOID); + +BOOL +WINAPI +SymEnumSymbols( + _In_ HANDLE, + _In_ ULONG64, + _In_opt_ PCSTR, + _In_ PSYM_ENUMERATESYMBOLS_CALLBACK, + _In_opt_ PVOID); + +BOOL +WINAPI +SymEnumSymbolsW( + _In_ HANDLE, + _In_ ULONG64, + _In_opt_ PCWSTR, + _In_ PSYM_ENUMERATESYMBOLS_CALLBACKW, + _In_opt_ PVOID); + +typedef BOOL +(CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64)( + _In_ PCSTR, + _In_ DWORD64, + _In_ ULONG, + _In_opt_ PVOID); + +typedef BOOL +(CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64W)( + _In_ PCWSTR, + _In_ DWORD64, + _In_ ULONG, + _In_opt_ PVOID); + +BOOL +WINAPI +SymEnumerateSymbols64( + _In_ HANDLE, + _In_ ULONG64, + _In_ PSYM_ENUMSYMBOLS_CALLBACK64, + _In_opt_ PVOID); + +BOOL +WINAPI +SymEnumerateSymbolsW64( + _In_ HANDLE, + _In_ ULONG64, + _In_ PSYM_ENUMSYMBOLS_CALLBACK64W, + _In_opt_ PVOID); + +BOOL +WINAPI +SymEnumSymbolsForAddr( + _In_ HANDLE, + _In_ DWORD64, + _In_ PSYM_ENUMERATESYMBOLS_CALLBACK, + _In_opt_ PVOID); + +BOOL +WINAPI +SymEnumSymbolsForAddrW( + _In_ HANDLE, + _In_ DWORD64, + _In_ PSYM_ENUMERATESYMBOLS_CALLBACKW, + _In_opt_ PVOID); + +typedef BOOL +(CALLBACK *PSYMBOL_REGISTERED_CALLBACK64)( + _In_ HANDLE, + _In_ ULONG, + _In_opt_ ULONG64, + _In_opt_ ULONG64); + +BOOL +WINAPI +SymRegisterCallback64( + _In_ HANDLE, + _In_ PSYMBOL_REGISTERED_CALLBACK64, + _In_ ULONG64); + +BOOL +WINAPI +SymRegisterCallbackW64( + _In_ HANDLE, + _In_ PSYMBOL_REGISTERED_CALLBACK64, + _In_ ULONG64); + +BOOL +WINAPI +SymUnDName64( + _In_ PIMAGEHLP_SYMBOL64, + _Out_writes_(UnDecNameLength) PSTR, + _In_ DWORD UnDecNameLength); + +BOOL WINAPI SymMatchString(_In_ PCSTR, _In_ PCSTR, _In_ BOOL); +BOOL WINAPI SymMatchStringA(_In_ PCSTR, _In_ PCSTR, _In_ BOOL); +BOOL WINAPI SymMatchStringW(_In_ PCWSTR, _In_ PCWSTR, _In_ BOOL); + +BOOL +WINAPI +SymSearch( + _In_ HANDLE, + _In_ ULONG64, + _In_opt_ DWORD, + _In_opt_ DWORD, + _In_opt_ PCSTR, + _In_opt_ DWORD64, + _In_ PSYM_ENUMERATESYMBOLS_CALLBACK, + _In_opt_ PVOID, + _In_ DWORD); + +BOOL +WINAPI +SymSearchW( + _In_ HANDLE, + _In_ ULONG64, + _In_opt_ DWORD, + _In_opt_ DWORD, + _In_opt_ PCWSTR, + _In_opt_ DWORD64, + _In_ PSYM_ENUMERATESYMBOLS_CALLBACKW, + _In_opt_ PVOID, + _In_ DWORD); + +DWORD +WINAPI +UnDecorateSymbolName( + _In_ PCSTR, + _Out_writes_(maxStringLength) PSTR, + _In_ DWORD maxStringLength, + _In_ DWORD); + +DWORD +WINAPI +UnDecorateSymbolNameW( + _In_ PCWSTR, + _Out_writes_(maxStringLength) PWSTR, + _In_ DWORD maxStringLength, + _In_ DWORD); + +BOOL +WINAPI +SymGetScope( + _In_ HANDLE, + _In_ ULONG64, + _In_ DWORD, + _Inout_ PSYMBOL_INFO); + +BOOL +WINAPI +SymGetScopeW( + _In_ HANDLE, + _In_ ULONG64, + _In_ DWORD, + _Inout_ PSYMBOL_INFOW); + +BOOL +WINAPI +SymFromIndex( + _In_ HANDLE, + _In_ ULONG64, + _In_ DWORD, + _Inout_ PSYMBOL_INFO); + +BOOL +WINAPI +SymFromIndexW( + _In_ HANDLE, + _In_ ULONG64, + _In_ DWORD, + _Inout_ PSYMBOL_INFOW); + +BOOL +WINAPI +SymAddSymbol( + _In_ HANDLE, + _In_ ULONG64, + _In_ PCSTR, + _In_ DWORD64, + _In_ DWORD, + _In_ DWORD); + +BOOL +WINAPI +SymAddSymbolW( + _In_ HANDLE, + _In_ ULONG64, + _In_ PCWSTR, + _In_ DWORD64, + _In_ DWORD, + _In_ DWORD); + +BOOL +WINAPI +SymDeleteSymbol( + _In_ HANDLE, + _In_ ULONG64, + _In_opt_ PCSTR, + _In_ DWORD64, + _In_ DWORD); + +BOOL +WINAPI +SymDeleteSymbolW( + _In_ HANDLE, + _In_ ULONG64, + _In_opt_ PCWSTR, + _In_ DWORD64, + _In_ DWORD); /************************* * Source Files * *************************/ -typedef BOOL (CALLBACK *PSYM_ENUMSOURCEFILES_CALLBACK)(PSOURCEFILE, PVOID); -typedef BOOL (CALLBACK *PSYM_ENUMSOURCEFILES_CALLBACKW)(PSOURCEFILEW, PVOID); - -BOOL WINAPI SymEnumSourceFiles(HANDLE, ULONG64, PCSTR, PSYM_ENUMSOURCEFILES_CALLBACK, - PVOID); -BOOL WINAPI SymEnumSourceFilesW(HANDLE, ULONG64, PCWSTR, PSYM_ENUMSOURCEFILES_CALLBACKW, PVOID); -BOOL WINAPI SymGetLineFromAddr64(HANDLE, DWORD64, PDWORD, PIMAGEHLP_LINE64); -BOOL WINAPI SymGetLineFromAddrW64(HANDLE, DWORD64, PDWORD, PIMAGEHLP_LINEW64); -BOOL WINAPI SymGetLinePrev64(HANDLE, PIMAGEHLP_LINE64); -BOOL WINAPI SymGetLinePrevW64(HANDLE, PIMAGEHLP_LINEW64); -BOOL WINAPI SymGetLineNext64(HANDLE, PIMAGEHLP_LINE64); -BOOL WINAPI SymGetLineNextW64(HANDLE, PIMAGEHLP_LINEW64); -BOOL WINAPI SymGetLineFromName64(HANDLE, PCSTR, PCSTR, DWORD, PLONG, PIMAGEHLP_LINE64); -BOOL WINAPI SymGetLineFromNameW64(HANDLE, PCWSTR, PCWSTR, DWORD, PLONG, PIMAGEHLP_LINEW64); -ULONG WINAPI SymGetFileLineOffsets64(HANDLE, PCSTR, PCSTR, PDWORD64, ULONG); -BOOL WINAPI SymGetSourceFile(HANDLE, ULONG64, PCSTR, PCSTR, PSTR, DWORD); -BOOL WINAPI SymGetSourceFileW(HANDLE, ULONG64, PCWSTR, PCWSTR, PWSTR, DWORD); -BOOL WINAPI SymGetSourceFileToken(HANDLE, ULONG64, PCSTR, PVOID*, DWORD*); -BOOL WINAPI SymGetSourceFileTokenW(HANDLE, ULONG64, PCWSTR, PVOID*, DWORD*); -BOOL WINAPI SymGetSourceFileFromToken(HANDLE, PVOID, PCSTR, PSTR, DWORD); -BOOL WINAPI SymGetSourceFileFromTokenW(HANDLE, PVOID, PCWSTR, PWSTR, DWORD); -BOOL WINAPI SymGetSourceVarFromToken(HANDLE, PVOID, PCSTR, PCSTR, PSTR, DWORD); -BOOL WINAPI SymGetSourceVarFromTokenW(HANDLE, PVOID, PCWSTR, PCWSTR, PWSTR, DWORD); + +typedef BOOL +(CALLBACK *PSYM_ENUMSOURCEFILES_CALLBACK)( + _In_ PSOURCEFILE, + _In_opt_ PVOID); + +typedef BOOL +(CALLBACK *PSYM_ENUMSOURCEFILES_CALLBACKW)( + _In_ PSOURCEFILEW, + _In_opt_ PVOID); + +BOOL +WINAPI +SymEnumSourceFiles( + _In_ HANDLE, + _In_ ULONG64, + _In_opt_ PCSTR, + _In_ PSYM_ENUMSOURCEFILES_CALLBACK, + _In_opt_ PVOID); + +BOOL +WINAPI +SymEnumSourceFilesW( + _In_ HANDLE, + _In_ ULONG64, + _In_opt_ PCWSTR, + _In_ PSYM_ENUMSOURCEFILES_CALLBACKW, + _In_opt_ PVOID); + +BOOL +WINAPI +SymGetLineFromAddr64( + _In_ HANDLE, + _In_ DWORD64, + _Out_ PDWORD, + _Out_ PIMAGEHLP_LINE64); + +BOOL +WINAPI +SymGetLineFromAddrW64( + _In_ HANDLE, + _In_ DWORD64, + _Out_ PDWORD, + _Out_ PIMAGEHLP_LINEW64); + +BOOL WINAPI SymGetLinePrev64(_In_ HANDLE, _Inout_ PIMAGEHLP_LINE64); +BOOL WINAPI SymGetLinePrevW64(_In_ HANDLE, _Inout_ PIMAGEHLP_LINEW64); +BOOL WINAPI SymGetLineNext64(_In_ HANDLE, _Inout_ PIMAGEHLP_LINE64); +BOOL WINAPI SymGetLineNextW64(_In_ HANDLE, _Inout_ PIMAGEHLP_LINEW64); + +BOOL +WINAPI +SymGetLineFromName64( + _In_ HANDLE, + _In_opt_ PCSTR, + _In_opt_ PCSTR, + _In_ DWORD, + _Out_ PLONG, + _Inout_ PIMAGEHLP_LINE64); + +BOOL +WINAPI +SymGetLineFromNameW64( + _In_ HANDLE, + _In_opt_ PCWSTR, + _In_opt_ PCWSTR, + _In_ DWORD, + _Out_ PLONG, + _Inout_ PIMAGEHLP_LINEW64); + +ULONG +WINAPI +SymGetFileLineOffsets64( + _In_ HANDLE, + _In_opt_ PCSTR, + _In_ PCSTR, + _Out_writes_(BufferLines) PDWORD64, + _In_ ULONG BufferLines); + +BOOL +WINAPI +SymGetSourceFile( + _In_ HANDLE, + _In_ ULONG64, + _In_opt_ PCSTR, + _In_ PCSTR, + _Out_writes_(Size) PSTR, + _In_ DWORD Size); + +BOOL +WINAPI +SymGetSourceFileW( + _In_ HANDLE, + _In_ ULONG64, + _In_opt_ PCWSTR, + _In_ PCWSTR, + _Out_writes_(Size) PWSTR, + _In_ DWORD Size); + +BOOL +WINAPI +SymGetSourceFileToken( + _In_ HANDLE, + _In_ ULONG64, + _In_ PCSTR, + _Outptr_ PVOID*, + _Out_ DWORD*); + +BOOL +WINAPI +SymGetSourceFileTokenW( + _In_ HANDLE, + _In_ ULONG64, + _In_ PCWSTR, + _Outptr_ PVOID*, + _Out_ DWORD*); + +BOOL +WINAPI +SymGetSourceFileFromToken( + _In_ HANDLE, + _In_ PVOID, + _In_opt_ PCSTR, + _Out_writes_(Size) PSTR, + _In_ DWORD Size); + +BOOL +WINAPI +SymGetSourceFileFromTokenW( + _In_ HANDLE, + _In_ PVOID, + _In_opt_ PCWSTR, + _Out_writes_(Size) PWSTR, + _In_ DWORD Size); + +BOOL +WINAPI +SymGetSourceVarFromToken( + _In_ HANDLE, + _In_ PVOID, + _In_opt_ PCSTR, + _In_ PCSTR, + _Out_writes_(Size) PSTR, + _In_ DWORD Size); + +BOOL +WINAPI +SymGetSourceVarFromTokenW( + _In_ HANDLE, + _In_ PVOID, + _In_opt_ PCWSTR, + _In_ PCWSTR, + _Out_writes_(Size) PWSTR, + _In_ DWORD Size); typedef struct _SRCCODEINFO { @@ -1186,66 +1702,349 @@ DWORD64 Address; } SRCCODEINFOW, *PSRCCODEINFOW; -typedef BOOL (CALLBACK* PSYM_ENUMLINES_CALLBACK)(PSRCCODEINFO, PVOID); -typedef BOOL (CALLBACK* PSYM_ENUMLINES_CALLBACKW)(PSRCCODEINFOW, PVOID); -BOOL WINAPI SymEnumLines(HANDLE, ULONG64, PCSTR, PCSTR, PSYM_ENUMLINES_CALLBACK, PVOID); -BOOL WINAPI SymEnumLinesW(HANDLE, ULONG64, PCWSTR, PCWSTR, PSYM_ENUMLINES_CALLBACKW, PVOID); -BOOL WINAPI SymEnumSourceLines(HANDLE, ULONG64, PCSTR, PCSTR, DWORD, DWORD, PSYM_ENUMLINES_CALLBACK, PVOID); -BOOL WINAPI SymEnumSourceLinesW(HANDLE, ULONG64, PCWSTR, PCWSTR, DWORD, DWORD, PSYM_ENUMLINES_CALLBACKW, PVOID); +typedef BOOL +(CALLBACK* PSYM_ENUMLINES_CALLBACK)( + _In_ PSRCCODEINFO, + _In_opt_ PVOID); + +typedef BOOL +(CALLBACK* PSYM_ENUMLINES_CALLBACKW)( + _In_ PSRCCODEINFOW, + _In_opt_ PVOID); + +BOOL +WINAPI +SymEnumLines( + _In_ HANDLE, + _In_ ULONG64, + _In_opt_ PCSTR, + _In_opt_ PCSTR, + _In_ PSYM_ENUMLINES_CALLBACK, + _In_opt_ PVOID); + +BOOL +WINAPI +SymEnumLinesW( + _In_ HANDLE, + _In_ ULONG64, + _In_opt_ PCWSTR, + _In_opt_ PCWSTR, + _In_ PSYM_ENUMLINES_CALLBACKW, + _In_opt_ PVOID); + +BOOL +WINAPI +SymEnumSourceLines( + _In_ HANDLE, + _In_ ULONG64, + _In_opt_ PCSTR, + _In_opt_ PCSTR, + _In_opt_ DWORD, + _In_ DWORD, + _In_ PSYM_ENUMLINES_CALLBACK, + _In_opt_ PVOID); + +BOOL +WINAPI +SymEnumSourceLinesW( + _In_ HANDLE, + _In_ ULONG64, + _In_opt_ PCWSTR, + _In_opt_ PCWSTR, + _In_opt_ DWORD, + _In_ DWORD, + _In_ PSYM_ENUMLINES_CALLBACKW, + _In_opt_ PVOID); /************************* * File & image handling * *************************/ -BOOL WINAPI SymInitialize(HANDLE, PCSTR, BOOL); -BOOL WINAPI SymInitializeW(HANDLE, PCWSTR, BOOL); -BOOL WINAPI SymCleanup(HANDLE); - -HANDLE WINAPI FindDebugInfoFile(PCSTR, PCSTR, PSTR); -typedef BOOL (CALLBACK *PFIND_DEBUG_FILE_CALLBACK)(HANDLE, PCSTR, PVOID); -typedef BOOL (CALLBACK *PFIND_DEBUG_FILE_CALLBACKW)(HANDLE, PCWSTR, PVOID); -HANDLE WINAPI FindDebugInfoFileEx(PCSTR, PCSTR, PSTR, PFIND_DEBUG_FILE_CALLBACK, PVOID); -HANDLE WINAPI FindDebugInfoFileExW(PCWSTR, PCWSTR, PWSTR, PFIND_DEBUG_FILE_CALLBACKW, PVOID); -HANDLE WINAPI SymFindDebugInfoFile(HANDLE, PCSTR, PSTR, PFIND_DEBUG_FILE_CALLBACK, PVOID); -HANDLE WINAPI SymFindDebugInfoFileW(HANDLE, PCWSTR, PWSTR, PFIND_DEBUG_FILE_CALLBACKW, PVOID); -typedef BOOL (CALLBACK *PFINDFILEINPATHCALLBACK)(PCSTR, PVOID); -typedef BOOL (CALLBACK *PFINDFILEINPATHCALLBACKW)(PCWSTR, PVOID); + +BOOL WINAPI SymInitialize(_In_ HANDLE, _In_opt_ PCSTR, _In_ BOOL); +BOOL WINAPI SymInitializeW(_In_ HANDLE, _In_opt_ PCWSTR, _In_ BOOL); +BOOL WINAPI SymCleanup(_In_ HANDLE); + +HANDLE +WINAPI +FindDebugInfoFile( + _In_ PCSTR, + _In_ PCSTR, + _Out_writes_(MAX_PATH + 1) PSTR); + +typedef BOOL +(CALLBACK *PFIND_DEBUG_FILE_CALLBACK)( + _In_ HANDLE, + _In_ PCSTR, + _In_ PVOID); + +typedef BOOL +(CALLBACK *PFIND_DEBUG_FILE_CALLBACKW)( + _In_ HANDLE, + _In_ PCWSTR, + _In_ PVOID); + +HANDLE +WINAPI +FindDebugInfoFileEx( + _In_ PCSTR, + _In_ PCSTR, + _Out_writes_(MAX_PATH + 1) PSTR, + _In_opt_ PFIND_DEBUG_FILE_CALLBACK, + _In_opt_ PVOID); + +HANDLE +WINAPI +FindDebugInfoFileExW( + _In_ PCWSTR, + _In_ PCWSTR, + _Out_writes_(MAX_PATH + 1) PWSTR, + _In_opt_ PFIND_DEBUG_FILE_CALLBACKW, + _In_opt_ PVOID); + +HANDLE +WINAPI +SymFindDebugInfoFile( + _In_ HANDLE, + _In_ PCSTR, + _Out_writes_(MAX_PATH + 1) PSTR, + _In_opt_ PFIND_DEBUG_FILE_CALLBACK, + _In_opt_ PVOID); + +HANDLE +WINAPI +SymFindDebugInfoFileW( + _In_ HANDLE, + _In_ PCWSTR, + _Out_writes_(MAX_PATH + 1) PWSTR, + _In_opt_ PFIND_DEBUG_FILE_CALLBACKW, + _In_opt_ PVOID); + +typedef BOOL +(CALLBACK *PFINDFILEINPATHCALLBACK)( + _In_ PCSTR, + _In_ PVOID); + +typedef BOOL +(CALLBACK *PFINDFILEINPATHCALLBACKW)( + _In_ PCWSTR, + _In_ PVOID); + BOOL WINAPI FindFileInPath(HANDLE, PCSTR, PCSTR, PVOID, DWORD, DWORD, DWORD, PSTR, PFINDFILEINPATHCALLBACK, PVOID); -BOOL WINAPI SymFindFileInPath(HANDLE, PCSTR, PCSTR, PVOID, DWORD, DWORD, DWORD, - PSTR, PFINDFILEINPATHCALLBACK, PVOID); -BOOL WINAPI SymFindFileInPathW(HANDLE, PCWSTR, PCWSTR, PVOID, DWORD, DWORD, DWORD, - PWSTR, PFINDFILEINPATHCALLBACKW, PVOID); -HANDLE WINAPI FindExecutableImage(PCSTR, PCSTR, PSTR); -typedef BOOL (CALLBACK *PFIND_EXE_FILE_CALLBACK)(HANDLE, PCSTR, PVOID); -typedef BOOL (CALLBACK *PFIND_EXE_FILE_CALLBACKW)(HANDLE, PCWSTR, PVOID); -HANDLE WINAPI FindExecutableImageEx(PCSTR, PCSTR, PSTR, PFIND_EXE_FILE_CALLBACK, PVOID); -HANDLE WINAPI FindExecutableImageExW(PCWSTR, PCWSTR, PWSTR, PFIND_EXE_FILE_CALLBACKW, PVOID); -HANDLE WINAPI SymFindExecutableImage(HANDLE, PCSTR, PSTR, PFIND_EXE_FILE_CALLBACK, PVOID); -HANDLE WINAPI SymFindExecutableImageW(HANDLE, PCWSTR, PWSTR, PFIND_EXE_FILE_CALLBACKW, PVOID); -PIMAGE_NT_HEADERS WINAPI ImageNtHeader(PVOID); -PVOID WINAPI ImageDirectoryEntryToDataEx(PVOID, BOOLEAN, USHORT, PULONG, - PIMAGE_SECTION_HEADER *); -PVOID WINAPI ImageDirectoryEntryToData(PVOID, BOOLEAN, USHORT, PULONG); -PIMAGE_SECTION_HEADER WINAPI ImageRvaToSection(PIMAGE_NT_HEADERS, PVOID, ULONG); -PVOID WINAPI ImageRvaToVa(PIMAGE_NT_HEADERS, PVOID, ULONG, PIMAGE_SECTION_HEADER*); -BOOL WINAPI SymGetSearchPath(HANDLE, PSTR, DWORD); -BOOL WINAPI SymGetSearchPathW(HANDLE, PWSTR, DWORD); -BOOL WINAPI SymSetSearchPath(HANDLE, PCSTR); -BOOL WINAPI SymSetSearchPathW(HANDLE, PCWSTR); -DWORD WINAPI GetTimestampForLoadedLibrary(HMODULE); -BOOL WINAPI MakeSureDirectoryPathExists(PCSTR); -BOOL WINAPI SearchTreeForFile(PCSTR, PCSTR, PSTR); -BOOL WINAPI SearchTreeForFileW(PCWSTR, PCWSTR, PWSTR); -typedef BOOL (CALLBACK *PENUMDIRTREE_CALLBACK)(PCSTR, PVOID); -typedef BOOL (CALLBACK *PENUMDIRTREE_CALLBACKW)(PCWSTR, PVOID); -BOOL WINAPI EnumDirTree(HANDLE, PCSTR, PCSTR, PSTR, PENUMDIRTREE_CALLBACK, PVOID); -BOOL WINAPI EnumDirTreeW(HANDLE, PCWSTR, PCWSTR, PWSTR, PENUMDIRTREE_CALLBACKW, PVOID); -BOOL WINAPI SymMatchFileName(PCSTR, PCSTR, PSTR*, PSTR*); -BOOL WINAPI SymMatchFileNameW(PCWSTR, PCWSTR, PWSTR*, PWSTR*); -PCHAR WINAPI SymSetHomeDirectory(HANDLE, PCSTR); -PWSTR WINAPI SymSetHomeDirectoryW(HANDLE, PCWSTR); -PCHAR WINAPI SymGetHomeDirectory(DWORD, PSTR, size_t); -PWSTR WINAPI SymGetHomeDirectoryW(DWORD, PWSTR, size_t); + +BOOL +WINAPI +SymFindFileInPath( + _In_ HANDLE, + _In_opt_ PCSTR, + _In_ PCSTR, + _In_opt_ PVOID, + _In_ DWORD, + _In_ DWORD, + _In_ DWORD, + _Out_writes_(MAX_PATH + 1) PSTR, + _In_opt_ PFINDFILEINPATHCALLBACK, + _In_opt_ PVOID); + +BOOL +WINAPI +SymFindFileInPathW( + _In_ HANDLE, + _In_opt_ PCWSTR, + _In_ PCWSTR, + _In_opt_ PVOID, + _In_ DWORD, + _In_ DWORD, + _In_ DWORD, + _Out_writes_(MAX_PATH + 1) PWSTR, + _In_opt_ PFINDFILEINPATHCALLBACKW, + _In_opt_ PVOID); + +HANDLE +WINAPI +FindExecutableImage( + _In_ PCSTR, + _In_ PCSTR, + _Out_writes_(MAX_PATH + 1) PSTR); + +typedef BOOL +(CALLBACK *PFIND_EXE_FILE_CALLBACK)( + _In_ HANDLE, + _In_ PCSTR, + _In_opt_ PVOID); + +typedef BOOL +(CALLBACK *PFIND_EXE_FILE_CALLBACKW)( + _In_ HANDLE, + _In_ PCWSTR, + _In_opt_ PVOID); + +HANDLE +WINAPI +FindExecutableImageEx( + _In_ PCSTR, + _In_ PCSTR, + _Out_writes_(MAX_PATH + 1) PSTR, + _In_opt_ PFIND_EXE_FILE_CALLBACK, + _In_opt_ PVOID); + +HANDLE +WINAPI +FindExecutableImageExW( + _In_ PCWSTR, + _In_ PCWSTR, + _Out_writes_(MAX_PATH + 1) PWSTR, + _In_opt_ PFIND_EXE_FILE_CALLBACKW, + _In_opt_ PVOID); + +HANDLE +WINAPI +SymFindExecutableImage( + _In_ HANDLE, + _In_ PCSTR, + _Out_writes_(MAX_PATH + 1) PSTR, + _In_ PFIND_EXE_FILE_CALLBACK, + _In_ PVOID); + +HANDLE +WINAPI +SymFindExecutableImageW( + _In_ HANDLE, + _In_ PCWSTR, + _Out_writes_(MAX_PATH + 1) PWSTR, + _In_ PFIND_EXE_FILE_CALLBACKW, + _In_ PVOID); + +PIMAGE_NT_HEADERS WINAPI ImageNtHeader(_In_ PVOID); + +PVOID +WINAPI +ImageDirectoryEntryToDataEx( + _In_ PVOID, + _In_ BOOLEAN, + _In_ USHORT, + _Out_ PULONG, + _Out_opt_ PIMAGE_SECTION_HEADER *); + +PVOID +WINAPI +ImageDirectoryEntryToData( + _In_ PVOID, + _In_ BOOLEAN, + _In_ USHORT, + _Out_ PULONG); + +PIMAGE_SECTION_HEADER +WINAPI +ImageRvaToSection( + _In_ PIMAGE_NT_HEADERS, + _In_ PVOID, + _In_ ULONG); + +PVOID +WINAPI +ImageRvaToVa( + _In_ PIMAGE_NT_HEADERS, + _In_ PVOID, + _In_ ULONG, + _In_opt_ PIMAGE_SECTION_HEADER*); + +BOOL +WINAPI +SymGetSearchPath( + _In_ HANDLE, + _Out_writes_(SearchPathLength) PSTR, + _In_ DWORD SearchPathLength); + +BOOL +WINAPI +SymGetSearchPathW( + _In_ HANDLE, + _Out_writes_(SearchPathLength) PWSTR, + _In_ DWORD SearchPathLength); + +BOOL WINAPI SymSetSearchPath(_In_ HANDLE, _In_opt_ PCSTR); +BOOL WINAPI SymSetSearchPathW(_In_ HANDLE, _In_opt_ PCWSTR); +DWORD WINAPI GetTimestampForLoadedLibrary(_In_ HMODULE); +BOOL WINAPI MakeSureDirectoryPathExists(_In_ PCSTR); + +BOOL +WINAPI +SearchTreeForFile( + _In_ PCSTR, + _In_ PCSTR, + _Out_writes_(MAX_PATH + 1) PSTR); + +BOOL +WINAPI +SearchTreeForFileW( + _In_ PCWSTR, + _In_ PCWSTR, + _Out_writes_(MAX_PATH + 1) PWSTR); + +typedef BOOL +(CALLBACK *PENUMDIRTREE_CALLBACK)( + _In_ PCSTR, + _In_opt_ PVOID); + +typedef BOOL +(CALLBACK *PENUMDIRTREE_CALLBACKW)( + _In_ PCWSTR, + _In_opt_ PVOID); + +BOOL +WINAPI +EnumDirTree( + _In_opt_ HANDLE, + _In_ PCSTR, + _In_ PCSTR, + _Out_writes_opt_(MAX_PATH + 1) PSTR, + _In_opt_ PENUMDIRTREE_CALLBACK, + _In_opt_ PVOID); + +BOOL +WINAPI +EnumDirTreeW( + _In_opt_ HANDLE, + _In_ PCWSTR, + _In_ PCWSTR, + _Out_writes_opt_(MAX_PATH + 1) PWSTR, + _In_opt_ PENUMDIRTREE_CALLBACKW, + _In_opt_ PVOID); + +BOOL +WINAPI +SymMatchFileName( + _In_ PCSTR, + _In_ PCSTR, + _Outptr_opt_ PSTR*, + _Outptr_opt_ PSTR*); + +BOOL +WINAPI +SymMatchFileNameW( + _In_ PCWSTR, + _In_ PCWSTR, + _Outptr_opt_ PWSTR*, + _Outptr_opt_ PWSTR*); + +PCHAR WINAPI SymSetHomeDirectory(_In_opt_ HANDLE, _In_opt_ PCSTR); +PWSTR WINAPI SymSetHomeDirectoryW(_In_opt_ HANDLE, _In_opt_ PCWSTR); + +PCHAR +WINAPI +SymGetHomeDirectory( + _In_ DWORD, + _Out_writes_(size) PSTR, + _In_ size_t size); + +PWSTR +WINAPI +SymGetHomeDirectoryW( + _In_ DWORD, + _Out_writes_(size) PWSTR, + _In_ size_t size); + #define hdBase 0 #define hdSym 1 #define hdSrc 2 @@ -1254,7 +2053,13 @@ /************************* * Context management * *************************/ -BOOL WINAPI SymSetContext(HANDLE, PIMAGEHLP_STACK_FRAME, PIMAGEHLP_CONTEXT); + +BOOL +WINAPI +SymSetContext( + _In_ HANDLE, + _In_ PIMAGEHLP_STACK_FRAME, + _In_opt_ PIMAGEHLP_CONTEXT); /************************* @@ -1325,22 +2130,57 @@ KDHELP64 KdHelp; } STACKFRAME64, *LPSTACKFRAME64; -typedef BOOL (CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE64) - (HANDLE, DWORD64, PVOID, DWORD, PDWORD); -typedef PVOID (CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE64)(HANDLE, DWORD64); -typedef DWORD64 (CALLBACK *PGET_MODULE_BASE_ROUTINE64)(HANDLE, DWORD64); -typedef DWORD64 (CALLBACK *PTRANSLATE_ADDRESS_ROUTINE64)(HANDLE, HANDLE, LPADDRESS64); -BOOL WINAPI StackWalk64(DWORD, HANDLE, HANDLE, LPSTACKFRAME64, PVOID, - PREAD_PROCESS_MEMORY_ROUTINE64, - PFUNCTION_TABLE_ACCESS_ROUTINE64, - PGET_MODULE_BASE_ROUTINE64, - PTRANSLATE_ADDRESS_ROUTINE64); - -PVOID WINAPI SymFunctionTableAccess64(HANDLE, DWORD64); - -typedef PVOID (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK64)(HANDLE, ULONG64, ULONG64); - -BOOL WINAPI SymRegisterFunctionEntryCallback64(HANDLE, PSYMBOL_FUNCENTRY_CALLBACK64, ULONG64); +typedef BOOL +(CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE64)( + _In_ HANDLE, + _In_ DWORD64, + _Out_writes_bytes_(nSize) PVOID, + _In_ DWORD nSize, + _Out_ PDWORD); + +typedef PVOID +(CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE64)( + _In_ HANDLE, + _In_ DWORD64); + +typedef DWORD64 +(CALLBACK *PGET_MODULE_BASE_ROUTINE64)( + _In_ HANDLE, + _In_ DWORD64); + +typedef DWORD64 +(CALLBACK *PTRANSLATE_ADDRESS_ROUTINE64)( + _In_ HANDLE, + _In_ HANDLE, + _In_ LPADDRESS64); + +BOOL +WINAPI +StackWalk64( + _In_ DWORD, + _In_ HANDLE, + _In_ HANDLE, + _Inout_ LPSTACKFRAME64, + _Inout_ PVOID, + _In_opt_ PREAD_PROCESS_MEMORY_ROUTINE64, + _In_opt_ PFUNCTION_TABLE_ACCESS_ROUTINE64, + _In_opt_ PGET_MODULE_BASE_ROUTINE64, + _In_opt_ PTRANSLATE_ADDRESS_ROUTINE64); + +PVOID WINAPI SymFunctionTableAccess64(_In_ HANDLE, _In_ DWORD64); + +typedef PVOID +(CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK64)( + _In_ HANDLE, + _In_ ULONG64, + _In_ ULONG64); + +BOOL +WINAPI +SymRegisterFunctionEntryCallback64( + _In_ HANDLE, + _In_ PSYMBOL_FUNCENTRY_CALLBACK64, + _In_ ULONG64); /************************* * Version, global stuff * @@ -1357,7 +2197,7 @@ } API_VERSION, *LPAPI_VERSION; LPAPI_VERSION WINAPI ImagehlpApiVersion(void); -LPAPI_VERSION WINAPI ImagehlpApiVersionEx(LPAPI_VERSION); +LPAPI_VERSION WINAPI ImagehlpApiVersionEx(_In_ LPAPI_VERSION); typedef struct _IMAGE_DEBUG_INFORMATION { @@ -1395,14 +2235,20 @@ } IMAGE_DEBUG_INFORMATION, *PIMAGE_DEBUG_INFORMATION; -PIMAGE_DEBUG_INFORMATION WINAPI MapDebugInformation(HANDLE, PCSTR, PCSTR, ULONG); - -BOOL WINAPI UnmapDebugInformation(PIMAGE_DEBUG_INFORMATION); - -DWORD WINAPI SymGetOptions(void); -DWORD WINAPI SymSetOptions(DWORD); - -BOOL WINAPI SymSetParentWindow(HWND); +PIMAGE_DEBUG_INFORMATION +WINAPI +MapDebugInformation( + _In_opt_ HANDLE, + _In_ PCSTR, + _In_opt_ PCSTR, + _In_ ULONG); + +BOOL WINAPI UnmapDebugInformation(_Out_ PIMAGE_DEBUG_INFORMATION); + +DWORD WINAPI SymGetOptions(void); +DWORD WINAPI SymSetOptions(_In_ DWORD); + +BOOL WINAPI SymSetParentWindow(_In_ HWND); /************************* * Version, global stuff * @@ -1485,45 +2331,215 @@ #else -typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK)(PCSTR, ULONG, ULONG, PVOID); -typedef PVOID (CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE)(HANDLE, DWORD); -typedef DWORD (CALLBACK *PGET_MODULE_BASE_ROUTINE)(HANDLE, DWORD); -typedef BOOL (CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE)(HANDLE, DWORD, PVOID, DWORD, PDWORD); -typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK)(PCSTR, ULONG, PVOID); -typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK)(PCSTR, ULONG, ULONG, PVOID); -typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACKW)(PCWSTR, ULONG, ULONG, PVOID); -typedef BOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK)(HANDLE, ULONG, PVOID, PVOID); -typedef PVOID (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK)(HANDLE, DWORD, PVOID); -typedef DWORD (CALLBACK *PTRANSLATE_ADDRESS_ROUTINE)(HANDLE, HANDLE, LPADDRESS); - -BOOL WINAPI EnumerateLoadedModules(HANDLE, PENUMLOADED_MODULES_CALLBACK, PVOID); -BOOL WINAPI StackWalk(DWORD, HANDLE, HANDLE, LPSTACKFRAME, PVOID, PREAD_PROCESS_MEMORY_ROUTINE, PFUNCTION_TABLE_ACCESS_ROUTINE, PGET_MODULE_BASE_ROUTINE, PTRANSLATE_ADDRESS_ROUTINE); -BOOL WINAPI SymEnumerateModules(HANDLE, PSYM_ENUMMODULES_CALLBACK, PVOID); -BOOL WINAPI SymEnumerateSymbols(HANDLE, ULONG, PSYM_ENUMSYMBOLS_CALLBACK, PVOID); -BOOL WINAPI SymEnumerateSymbolsW(HANDLE, ULONG, PSYM_ENUMSYMBOLS_CALLBACKW, PVOID); -PVOID WINAPI SymFunctionTableAccess(HANDLE, DWORD); -BOOL WINAPI SymGetLineFromAddr(HANDLE, DWORD, PDWORD, PIMAGEHLP_LINE); -BOOL WINAPI SymGetLineFromAddrW(HANDLE, DWORD, PDWORD, PIMAGEHLP_LINEW); -BOOL WINAPI SymGetLineFromName(HANDLE, PCSTR, PCSTR, DWORD, PLONG, PIMAGEHLP_LINE); -BOOL WINAPI SymGetLineNext(HANDLE, PIMAGEHLP_LINE); -BOOL WINAPI SymGetLineNextW(HANDLE, PIMAGEHLP_LINEW); -BOOL WINAPI SymGetLinePrev(HANDLE, PIMAGEHLP_LINE); -BOOL WINAPI SymGetLinePrevW(HANDLE, PIMAGEHLP_LINEW); -DWORD WINAPI SymGetModuleBase(HANDLE, DWORD); -BOOL WINAPI SymGetModuleInfo(HANDLE, DWORD, PIMAGEHLP_MODULE); -BOOL WINAPI SymGetModuleInfoW(HANDLE, DWORD, PIMAGEHLP_MODULEW); -BOOL WINAPI SymGetSymFromAddr(HANDLE, DWORD, PDWORD, PIMAGEHLP_SYMBOL); -BOOL WINAPI SymGetSymFromName(HANDLE, PCSTR, PIMAGEHLP_SYMBOL); -BOOL WINAPI SymGetSymNext(HANDLE, PIMAGEHLP_SYMBOL); -BOOL WINAPI SymGetSymNextW(HANDLE, PIMAGEHLP_SYMBOLW); -BOOL WINAPI SymGetSymPrev(HANDLE, PIMAGEHLP_SYMBOL); -BOOL WINAPI SymGetSymPrevW(HANDLE, PIMAGEHLP_SYMBOLW); -DWORD WINAPI SymLoadModule(HANDLE, HANDLE, PCSTR, PCSTR, DWORD, DWORD); -BOOL WINAPI SymRegisterCallback(HANDLE, PSYMBOL_REGISTERED_CALLBACK, PVOID); -BOOL WINAPI SymRegisterFunctionEntryCallback(HANDLE, PSYMBOL_FUNCENTRY_CALLBACK, PVOID); -BOOL WINAPI SymRefreshModuleList(HANDLE); -BOOL WINAPI SymUnDName(PIMAGEHLP_SYMBOL, PSTR, DWORD); -BOOL WINAPI SymUnloadModule(HANDLE, DWORD); +typedef BOOL +(CALLBACK *PENUMLOADED_MODULES_CALLBACK)( + _In_ PCSTR, + _In_ ULONG, + _In_ ULONG, + _In_opt_ PVOID); + +typedef PVOID +(CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE)( + _In_ HANDLE, + _In_ DWORD); + +typedef DWORD +(CALLBACK *PGET_MODULE_BASE_ROUTINE)( + _In_ HANDLE, + _In_ DWORD); + +typedef BOOL +(CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE)( + _In_ HANDLE, + _In_ DWORD, + _Out_writes_bytes_(nSize) PVOID, + _In_ DWORD nSize, + _Out_ PDWORD); + +typedef BOOL +(CALLBACK *PSYM_ENUMMODULES_CALLBACK)( + _In_ PCSTR, + _In_ ULONG, + _In_opt_ PVOID); + +typedef BOOL +(CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK)( + _In_ PCSTR, + _In_ ULONG, + _In_ ULONG, + _In_opt_ PVOID); + +typedef BOOL +(CALLBACK *PSYM_ENUMSYMBOLS_CALLBACKW)( + _In_ PCWSTR, + _In_ ULONG, + _In_ ULONG, + _In_opt_ PVOID); + +typedef BOOL +(CALLBACK *PSYMBOL_REGISTERED_CALLBACK)( + _In_ HANDLE, + _In_ ULONG, + _In_opt_ PVOID, + _In_opt_ PVOID); + +typedef PVOID +(CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK)( + _In_ HANDLE, + _In_ DWORD, + _In_opt_ PVOID); + +typedef DWORD +(CALLBACK *PTRANSLATE_ADDRESS_ROUTINE)( + _In_ HANDLE, + _In_ HANDLE, + _Out_ LPADDRESS); + +BOOL +WINAPI +EnumerateLoadedModules( + _In_ HANDLE, + _In_ PENUMLOADED_MODULES_CALLBACK, + _In_opt_ PVOID); + +BOOL +WINAPI +StackWalk( + _In_ DWORD, + _In_ HANDLE, + _In_ HANDLE, + _Inout_ LPSTACKFRAME, + _Inout_ PVOID, + _In_opt_ PREAD_PROCESS_MEMORY_ROUTINE, + _In_opt_ PFUNCTION_TABLE_ACCESS_ROUTINE, + _In_opt_ PGET_MODULE_BASE_ROUTINE, + _In_opt_ PTRANSLATE_ADDRESS_ROUTINE); + +BOOL +WINAPI +SymEnumerateModules( + _In_ HANDLE, + _In_ PSYM_ENUMMODULES_CALLBACK, + _In_opt_ PVOID); + +BOOL +WINAPI +SymEnumerateSymbols( + _In_ HANDLE, + _In_ ULONG, + _In_ PSYM_ENUMSYMBOLS_CALLBACK, + _In_opt_ PVOID); + +BOOL +WINAPI +SymEnumerateSymbolsW( + _In_ HANDLE, + _In_ ULONG, + _In_ PSYM_ENUMSYMBOLS_CALLBACKW, + _In_opt_ PVOID); + +PVOID WINAPI SymFunctionTableAccess(_In_ HANDLE, _In_ DWORD); + +BOOL +WINAPI +SymGetLineFromAddr( + _In_ HANDLE, + _In_ DWORD, + _Out_ PDWORD, + _Out_ PIMAGEHLP_LINE); + +BOOL +WINAPI +SymGetLineFromAddrW( + _In_ HANDLE, + _In_ DWORD, + _Out_ PDWORD, + _Out_ PIMAGEHLP_LINEW); + +BOOL +WINAPI +SymGetLineFromName( + _In_ HANDLE, + _In_opt_ PCSTR, + _In_opt_ PCSTR, + _In_ DWORD, + _Out_ PLONG, + _Inout_ PIMAGEHLP_LINE); + +BOOL WINAPI SymGetLineNext(_In_ HANDLE, _Inout_ PIMAGEHLP_LINE); +BOOL WINAPI SymGetLineNextW(_In_ HANDLE, _Inout_ PIMAGEHLP_LINEW); +BOOL WINAPI SymGetLinePrev(_In_ HANDLE, _Inout_ PIMAGEHLP_LINE); +BOOL WINAPI SymGetLinePrevW(_In_ HANDLE, _Inout_ PIMAGEHLP_LINEW); +DWORD WINAPI SymGetModuleBase(_In_ HANDLE, _In_ DWORD); + +BOOL +WINAPI +SymGetModuleInfo( + _In_ HANDLE, + _In_ DWORD, + _Out_ PIMAGEHLP_MODULE); + +BOOL +WINAPI +SymGetModuleInfoW( + _In_ HANDLE, + _In_ DWORD, + _Out_ PIMAGEHLP_MODULEW); + +BOOL +WINAPI +SymGetSymFromAddr( + _In_ HANDLE, + _In_ DWORD, + _Out_opt_ PDWORD, + _Inout_ PIMAGEHLP_SYMBOL); + +BOOL +WINAPI +SymGetSymFromName( + _In_ HANDLE, + _In_ PCSTR, + _Inout_ PIMAGEHLP_SYMBOL); + +BOOL WINAPI SymGetSymNext(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOL); +BOOL WINAPI SymGetSymNextW(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOLW); +BOOL WINAPI SymGetSymPrev(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOL); +BOOL WINAPI SymGetSymPrevW(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOLW); + +DWORD +WINAPI +SymLoadModule( + _In_ HANDLE, + _In_opt_ HANDLE, + _In_opt_ PCSTR, + _In_opt_ PCSTR, + _In_ DWORD, + _In_ DWORD); + +BOOL +WINAPI +SymRegisterCallback( + _In_ HANDLE, + _In_ PSYMBOL_REGISTERED_CALLBACK, + _In_opt_ PVOID); + +BOOL +WINAPI +SymRegisterFunctionEntryCallback( + _In_ HANDLE, + _In_ PSYMBOL_FUNCENTRY_CALLBACK, + _In_opt_ PVOID); + +BOOL WINAPI SymRefreshModuleList(_In_ HANDLE); + +BOOL +WINAPI +SymUnDName( + _In_ PIMAGEHLP_SYMBOL, + _Out_writes_(UnDecNameLength) PSTR, + _In_ DWORD UnDecNameLength); + +BOOL WINAPI SymUnloadModule(_In_ HANDLE, _In_ DWORD); #endif
11 years, 4 months
1
0
0
0
[aandrejevic] 59757: [SOFT386] Add definition for Soft386Interrupt. Implement Soft386DumpState.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Sat Aug 17 01:41:22 2013 New Revision: 59757 URL:
http://svn.reactos.org/svn/reactos?rev=59757&view=rev
Log: [SOFT386] Add definition for Soft386Interrupt. Implement Soft386DumpState. Modified: branches/ntvdm/include/reactos/libs/soft386/soft386.h branches/ntvdm/lib/soft386/soft386.c Modified: branches/ntvdm/include/reactos/libs/soft386/soft386.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/include/reactos/libs/soft…
============================================================================== --- branches/ntvdm/include/reactos/libs/soft386/soft386.h [iso-8859-1] (original) +++ branches/ntvdm/include/reactos/libs/soft386/soft386.h [iso-8859-1] Sat Aug 17 01:41:22 2013 @@ -289,6 +289,10 @@ NTAPI Soft386Reset(PSOFT386_STATE State); +VOID +NTAPI +Soft386Interrupt(PSOFT386_STATE State, UCHAR Number); + #endif // _SOFT386_H_ /* EOF */ Modified: branches/ntvdm/lib/soft386/soft386.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/soft386/soft386.c?rev…
============================================================================== --- branches/ntvdm/lib/soft386/soft386.c [iso-8859-1] (original) +++ branches/ntvdm/lib/soft386/soft386.c [iso-8859-1] Sat Aug 17 01:41:22 2013 @@ -69,8 +69,94 @@ NTAPI Soft386DumpState(PSOFT386_STATE State) { - // TODO: NOT IMPLEMENTED!!! - UNIMPLEMENTED; + DPRINT1("\nCPU currently executing in %s mode at %04X:%08X\n" + "Time Stamp Counter = %016X\n", + (State->ControlRegisters[0] & SOFT386_CR0_PE) ? "protected" : "real", + State->SegmentRegs[SOFT386_REG_CS].Selector, + State->InstPtr.Long, + State->TimeStampCounter); + DPRINT1("\nGeneral purpose registers:\n" + "EAX = %08X\tECX = %08X\tEDX = %08X\tEBX = %08X\n" + "ESP = %08X\tEBP = %08X\tESI = %08X\tEDI = %08X\n", + State->GeneralRegs[SOFT386_REG_EAX].Long, + State->GeneralRegs[SOFT386_REG_ECX].Long, + State->GeneralRegs[SOFT386_REG_EDX].Long, + State->GeneralRegs[SOFT386_REG_EBX].Long, + State->GeneralRegs[SOFT386_REG_ESP].Long, + State->GeneralRegs[SOFT386_REG_EBP].Long, + State->GeneralRegs[SOFT386_REG_ESI].Long, + State->GeneralRegs[SOFT386_REG_EDI].Long); + DPRINT1("\nSegment registers:\n" + "ES = %04X (Base: %08X, Limit: %08X, Dpl: %u)\n" + "CS = %04X (Base: %08X, Limit: %08X, Dpl: %u)\n" + "SS = %04X (Base: %08X, Limit: %08X, Dpl: %u)\n" + "DS = %04X (Base: %08X, Limit: %08X, Dpl: %u)\n" + "FS = %04X (Base: %08X, Limit: %08X, Dpl: %u)\n" + "GS = %04X (Base: %08X, Limit: %08X, Dpl: %u)\n", + State->SegmentRegs[SOFT386_REG_ES].Selector, + State->SegmentRegs[SOFT386_REG_ES].Base, + State->SegmentRegs[SOFT386_REG_ES].Limit, + State->SegmentRegs[SOFT386_REG_ES].Dpl, + State->SegmentRegs[SOFT386_REG_CS].Selector, + State->SegmentRegs[SOFT386_REG_CS].Base, + State->SegmentRegs[SOFT386_REG_CS].Limit, + State->SegmentRegs[SOFT386_REG_CS].Dpl, + State->SegmentRegs[SOFT386_REG_SS].Selector, + State->SegmentRegs[SOFT386_REG_SS].Base, + State->SegmentRegs[SOFT386_REG_SS].Limit, + State->SegmentRegs[SOFT386_REG_SS].Dpl, + State->SegmentRegs[SOFT386_REG_DS].Selector, + State->SegmentRegs[SOFT386_REG_DS].Base, + State->SegmentRegs[SOFT386_REG_DS].Limit, + State->SegmentRegs[SOFT386_REG_DS].Dpl, + State->SegmentRegs[SOFT386_REG_FS].Selector, + State->SegmentRegs[SOFT386_REG_FS].Base, + State->SegmentRegs[SOFT386_REG_FS].Limit, + State->SegmentRegs[SOFT386_REG_FS].Dpl, + State->SegmentRegs[SOFT386_REG_GS].Selector, + State->SegmentRegs[SOFT386_REG_GS].Base, + State->SegmentRegs[SOFT386_REG_GS].Limit, + State->SegmentRegs[SOFT386_REG_GS].Dpl); + DPRINT1("\nFlags: %08X (%s %s %s %s %s %s %s %s %s %s %s %s %s %s %s) Iopl: %u\n", + State->Flags.Long, + State->Flags.Cf ? "CF" : "cf", + State->Flags.Pf ? "PF" : "pf", + State->Flags.Af ? "AF" : "af", + State->Flags.Zf ? "ZF" : "zf", + State->Flags.Sf ? "SF" : "sf", + State->Flags.Tf ? "TF" : "tf", + State->Flags.If ? "IF" : "if", + State->Flags.Df ? "DF" : "df", + State->Flags.Of ? "OF" : "of", + State->Flags.Nt ? "NT" : "nt", + State->Flags.Rf ? "RF" : "rf", + State->Flags.Vm ? "VM" : "vm", + State->Flags.Ac ? "AC" : "ac", + State->Flags.Vif ? "VIF" : "vif", + State->Flags.Vip ? "VIP" : "vip", + State->Flags.Iopl); + DPRINT1("\nControl Registers:\n" + "CR0 = %08X\tCR1 = %08X\tCR2 = %08X\tCR3 = %08X\n" + "CR4 = %08X\tCR5 = %08X\tCR6 = %08X\tCR7 = %08X\n", + State->ControlRegisters[SOFT386_REG_CR0], + State->ControlRegisters[SOFT386_REG_CR1], + State->ControlRegisters[SOFT386_REG_CR2], + State->ControlRegisters[SOFT386_REG_CR3], + State->ControlRegisters[SOFT386_REG_CR4], + State->ControlRegisters[SOFT386_REG_CR5], + State->ControlRegisters[SOFT386_REG_CR6], + State->ControlRegisters[SOFT386_REG_CR7]); + DPRINT1("\nDebug Registers:\n" + "DR0 = %08X\tDR1 = %08X\tDR2 = %08X\tDR3 = %08X\n" + "DR4 = %08X\tDR5 = %08X\tDR6 = %08X\tDR7 = %08X\n", + State->DebugRegisters[SOFT386_REG_DR0], + State->DebugRegisters[SOFT386_REG_DR1], + State->DebugRegisters[SOFT386_REG_DR2], + State->DebugRegisters[SOFT386_REG_DR3], + State->DebugRegisters[SOFT386_REG_DR4], + State->DebugRegisters[SOFT386_REG_DR5], + State->DebugRegisters[SOFT386_REG_DR6], + State->DebugRegisters[SOFT386_REG_DR7]); } VOID @@ -108,7 +194,7 @@ State->Idtr.Address = 0; /* Initialize CR0 */ - State->ControlRegisters[0] |= SOFT386_CR0_ET; + State->ControlRegisters[SOFT386_REG_CR0] |= SOFT386_CR0_ET; /* Restore the callbacks */ State->MemReadCallback = MemReadCallback; @@ -116,3 +202,11 @@ State->IoReadCallback = IoReadCallback; State->IoWriteCallback = IoWriteCallback; } + +VOID +NTAPI +Soft386Interrupt(PSOFT386_STATE State, UCHAR Number) +{ + // TODO: NOT IMPLEMENTED!!! + UNIMPLEMENTED; +}
11 years, 4 months
1
0
0
0
[akhaldi] 59756: [PSDK] * Annotate objbase.h.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Aug 16 22:05:23 2013 New Revision: 59756 URL:
http://svn.reactos.org/svn/reactos?rev=59756&view=rev
Log: [PSDK] * Annotate objbase.h. Modified: trunk/reactos/include/psdk/objbase.h Modified: trunk/reactos/include/psdk/objbase.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/objbase.h?rev…
============================================================================== --- trunk/reactos/include/psdk/objbase.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/objbase.h [iso-8859-1] Fri Aug 16 22:05:23 2013 @@ -322,37 +322,108 @@ COINIT_SPEED_OVER_MEMORY = 0x8 /* Trade memory for speed */ } COINIT; -HRESULT WINAPI CoInitialize(LPVOID lpReserved); -HRESULT WINAPI CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit); +_Check_return_ HRESULT WINAPI CoInitialize(_In_opt_ LPVOID lpReserved); + +_Check_return_ +HRESULT +WINAPI +CoInitializeEx( + _In_opt_ LPVOID lpReserved, + _In_ DWORD dwCoInit); + void WINAPI CoUninitialize(void); DWORD WINAPI CoGetCurrentProcess(void); -HINSTANCE WINAPI CoLoadLibrary(LPOLESTR lpszLibName, BOOL bAutoFree); +HINSTANCE WINAPI CoLoadLibrary(_In_ LPOLESTR lpszLibName, _In_ BOOL bAutoFree); void WINAPI CoFreeAllLibraries(void); -void WINAPI CoFreeLibrary(HINSTANCE hLibrary); +void WINAPI CoFreeLibrary(_In_ HINSTANCE hLibrary); void WINAPI CoFreeUnusedLibraries(void); -void WINAPI CoFreeUnusedLibrariesEx(DWORD dwUnloadDelay, DWORD dwReserved); - -HRESULT WINAPI CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv); -HRESULT WINAPI CoCreateInstanceEx(REFCLSID rclsid, - LPUNKNOWN pUnkOuter, - DWORD dwClsContext, - COSERVERINFO* pServerInfo, - ULONG cmq, - MULTI_QI* pResults); - -HRESULT WINAPI CoGetInstanceFromFile(COSERVERINFO* pServerInfo, CLSID* pClsid, IUnknown* punkOuter, DWORD dwClsCtx, DWORD grfMode, OLECHAR* pwszName, DWORD dwCount, MULTI_QI* pResults); -HRESULT WINAPI CoGetInstanceFromIStorage(COSERVERINFO* pServerInfo, CLSID* pClsid, IUnknown* punkOuter, DWORD dwClsCtx, IStorage* pstg, DWORD dwCount, MULTI_QI* pResults); - -HRESULT WINAPI CoGetMalloc(DWORD dwMemContext, LPMALLOC* lpMalloc); -LPVOID WINAPI CoTaskMemAlloc(ULONG size) __WINE_ALLOC_SIZE(1); -void WINAPI CoTaskMemFree(LPVOID ptr); -LPVOID WINAPI CoTaskMemRealloc(LPVOID ptr, ULONG size); - -HRESULT WINAPI CoRegisterMallocSpy(LPMALLOCSPY pMallocSpy); + +void +WINAPI +CoFreeUnusedLibrariesEx( + _In_ DWORD dwUnloadDelay, + _In_ DWORD dwReserved); + +_Check_return_ +HRESULT +WINAPI +CoCreateInstance( + _In_ REFCLSID rclsid, + _In_opt_ LPUNKNOWN pUnkOuter, + _In_ DWORD dwClsContext, + _In_ REFIID iid, + _Outptr_ _At_(*ppv, _Post_readable_size_(_Inexpressible_(varies))) LPVOID *ppv); + +_Check_return_ +HRESULT +WINAPI +CoCreateInstanceEx( + _In_ REFCLSID rclsid, + _In_opt_ LPUNKNOWN pUnkOuter, + _In_ DWORD dwClsContext, + _In_opt_ COSERVERINFO *pServerInfo, + _In_ ULONG cmq, + _Inout_updates_(cmq) MULTI_QI *pResults); + +_Check_return_ +HRESULT +WINAPI +CoGetInstanceFromFile( + _In_opt_ COSERVERINFO *pServerInfo, + _In_opt_ CLSID *pClsid, + _In_opt_ IUnknown *punkOuter, + _In_ DWORD dwClsCtx, + _In_ DWORD grfMode, + _In_ _Null_terminated_ OLECHAR *pwszName, + _In_ DWORD dwCount, + _Inout_updates_(dwCount) MULTI_QI *pResults); + +_Check_return_ +HRESULT +WINAPI +CoGetInstanceFromIStorage( + _In_opt_ COSERVERINFO *pServerInfo, + _In_opt_ CLSID *pClsid, + _In_opt_ IUnknown *punkOuter, + _In_ DWORD dwClsCtx, + _In_ IStorage *pstg, + _In_ DWORD dwCount, + _Inout_updates_(dwCount) MULTI_QI *pResults); + +_Check_return_ +HRESULT +WINAPI +CoGetMalloc( + _In_ DWORD dwMemContext, + _Outptr_ LPMALLOC *lpMalloc); + +_Ret_opt_ +_Post_writable_byte_size_(size) +__drv_allocatesMem(Mem) +_Check_return_ +LPVOID +WINAPI +CoTaskMemAlloc(_In_ ULONG size) __WINE_ALLOC_SIZE(1); + +void +WINAPI +CoTaskMemFree( + _In_opt_ __drv_freesMem(Mem) _Post_invalid_ LPVOID ptr); + +_Ret_opt_ +_Post_writable_byte_size_(size) +_When_(size > 0, __drv_allocatesMem(Mem) _Check_return_) +LPVOID +WINAPI +CoTaskMemRealloc( + _In_opt_ __drv_freesMem(Mem) _Post_invalid_ LPVOID ptr, + _In_ ULONG size); + +HRESULT WINAPI CoRegisterMallocSpy(_In_ LPMALLOCSPY pMallocSpy); HRESULT WINAPI CoRevokeMallocSpy(void); -HRESULT WINAPI CoGetContextToken( ULONG_PTR *token ); +_Check_return_ HRESULT WINAPI CoGetContextToken(_Out_ ULONG_PTR *token); /* class registration flags; passed to CoRegisterClassObject */ typedef enum tagREGCLS @@ -364,60 +435,286 @@ REGCLS_SURROGATE = 8 } REGCLS; -HRESULT WINAPI CoGetClassObject(REFCLSID rclsid, DWORD dwClsContext, COSERVERINFO *pServerInfo, REFIID iid, LPVOID *ppv); -HRESULT WINAPI CoRegisterClassObject(REFCLSID rclsid,LPUNKNOWN pUnk,DWORD dwClsContext,DWORD flags,LPDWORD lpdwRegister); -HRESULT WINAPI CoRevokeClassObject(DWORD dwRegister); -HRESULT WINAPI CoGetPSClsid(REFIID riid,CLSID *pclsid); -HRESULT WINAPI CoRegisterPSClsid(REFIID riid, REFCLSID rclsid); -HRESULT WINAPI CoRegisterSurrogate(LPSURROGATE pSurrogate); -HRESULT WINAPI CoSuspendClassObjects(void); -HRESULT WINAPI CoResumeClassObjects(void); +_Check_return_ +HRESULT +WINAPI +CoGetClassObject( + _In_ REFCLSID rclsid, + _In_ DWORD dwClsContext, + _In_opt_ COSERVERINFO *pServerInfo, + _In_ REFIID iid, + _Outptr_ LPVOID *ppv); + +_Check_return_ +HRESULT +WINAPI +CoRegisterClassObject( + _In_ REFCLSID rclsid, + _In_ LPUNKNOWN pUnk, + _In_ DWORD dwClsContext, + _In_ DWORD flags, + _Out_ LPDWORD lpdwRegister); + +_Check_return_ +HRESULT +WINAPI +CoRevokeClassObject( + _In_ DWORD dwRegister); + +_Check_return_ +HRESULT +WINAPI +CoGetPSClsid( + _In_ REFIID riid, + _Out_ CLSID *pclsid); + +_Check_return_ +HRESULT +WINAPI +CoRegisterPSClsid( + _In_ REFIID riid, + _In_ REFCLSID rclsid); + +_Check_return_ HRESULT WINAPI CoRegisterSurrogate(_In_ LPSURROGATE pSurrogate); +_Check_return_ HRESULT WINAPI CoSuspendClassObjects(void); +_Check_return_ HRESULT WINAPI CoResumeClassObjects(void); ULONG WINAPI CoAddRefServerProcess(void); ULONG WINAPI CoReleaseServerProcess(void); /* marshalling */ -HRESULT WINAPI CoCreateFreeThreadedMarshaler(LPUNKNOWN punkOuter, LPUNKNOWN* ppunkMarshal); -HRESULT WINAPI CoGetInterfaceAndReleaseStream(LPSTREAM pStm, REFIID iid, LPVOID* ppv); -HRESULT WINAPI CoGetMarshalSizeMax(ULONG* pulSize, REFIID riid, LPUNKNOWN pUnk, DWORD dwDestContext, LPVOID pvDestContext, DWORD mshlflags); -HRESULT WINAPI CoGetStandardMarshal(REFIID riid, LPUNKNOWN pUnk, DWORD dwDestContext, LPVOID pvDestContext, DWORD mshlflags, LPMARSHAL* ppMarshal); -HRESULT WINAPI CoMarshalHresult(LPSTREAM pstm, HRESULT hresult); -HRESULT WINAPI CoMarshalInterface(LPSTREAM pStm, REFIID riid, LPUNKNOWN pUnk, DWORD dwDestContext, LPVOID pvDestContext, DWORD mshlflags); -HRESULT WINAPI CoMarshalInterThreadInterfaceInStream(REFIID riid, LPUNKNOWN pUnk, LPSTREAM* ppStm); -HRESULT WINAPI CoReleaseMarshalData(LPSTREAM pStm); -HRESULT WINAPI CoDisconnectObject(LPUNKNOWN lpUnk, DWORD reserved); -HRESULT WINAPI CoUnmarshalHresult(LPSTREAM pstm, HRESULT* phresult); -HRESULT WINAPI CoUnmarshalInterface(LPSTREAM pStm, REFIID riid, LPVOID* ppv); -HRESULT WINAPI CoLockObjectExternal(LPUNKNOWN pUnk, BOOL fLock, BOOL fLastUnlockReleases); -BOOL WINAPI CoIsHandlerConnected(LPUNKNOWN pUnk); + +_Check_return_ +HRESULT +WINAPI +CoCreateFreeThreadedMarshaler( + _In_opt_ LPUNKNOWN punkOuter, + _Outptr_ LPUNKNOWN *ppunkMarshal); + +_Check_return_ +HRESULT +WINAPI +CoGetInterfaceAndReleaseStream( + _In_ LPSTREAM pStm, + _In_ REFIID iid, + _Outptr_ LPVOID *ppv); + +_Check_return_ +HRESULT +WINAPI +CoGetMarshalSizeMax( + _Out_ ULONG *pulSize, + _In_ REFIID riid, + _In_ LPUNKNOWN pUnk, + _In_ DWORD dwDestContext, + _In_opt_ LPVOID pvDestContext, + _In_ DWORD mshlflags); + +_Check_return_ +HRESULT +WINAPI +CoGetStandardMarshal( + _In_ REFIID riid, + _In_ LPUNKNOWN pUnk, + _In_ DWORD dwDestContext, + _In_opt_ LPVOID pvDestContext, + _In_ DWORD mshlflags, + _Outptr_ LPMARSHAL *ppMarshal); + +HRESULT WINAPI CoMarshalHresult(_In_ LPSTREAM pstm, _In_ HRESULT hresult); + +_Check_return_ +HRESULT +WINAPI +CoMarshalInterface( + _In_ LPSTREAM pStm, + _In_ REFIID riid, + _In_ LPUNKNOWN pUnk, + _In_ DWORD dwDestContext, + _In_opt_ LPVOID pvDestContext, + _In_ DWORD mshlflags); + +_Check_return_ +HRESULT +WINAPI +CoMarshalInterThreadInterfaceInStream( + _In_ REFIID riid, + _In_ LPUNKNOWN pUnk, + _Outptr_ LPSTREAM *ppStm); + +_Check_return_ HRESULT WINAPI CoReleaseMarshalData(_In_ LPSTREAM pStm); + +_Check_return_ +HRESULT +WINAPI +CoDisconnectObject( + _In_ LPUNKNOWN lpUnk, + _In_ DWORD reserved); + +HRESULT WINAPI CoUnmarshalHresult(_In_ LPSTREAM pstm, _Out_ HRESULT *phresult); + +_Check_return_ +HRESULT +WINAPI +CoUnmarshalInterface( + _In_ LPSTREAM pStm, + _In_ REFIID riid, + _Outptr_ LPVOID *ppv); + +_Check_return_ +HRESULT +WINAPI +CoLockObjectExternal( + _In_ LPUNKNOWN pUnk, + _In_ BOOL fLock, + _In_ BOOL fLastUnlockReleases); + +BOOL WINAPI CoIsHandlerConnected(_In_ LPUNKNOWN pUnk); /* security */ -HRESULT WINAPI CoInitializeSecurity(PSECURITY_DESCRIPTOR pSecDesc, LONG cAuthSvc, SOLE_AUTHENTICATION_SERVICE* asAuthSvc, void* pReserved1, DWORD dwAuthnLevel, DWORD dwImpLevel, void* pReserved2, DWORD dwCapabilities, void* pReserved3); -HRESULT WINAPI CoGetCallContext(REFIID riid, void** ppInterface); -HRESULT WINAPI CoSwitchCallContext(IUnknown *pContext, IUnknown **ppOldContext); -HRESULT WINAPI CoQueryAuthenticationServices(DWORD* pcAuthSvc, SOLE_AUTHENTICATION_SERVICE** asAuthSvc); - -HRESULT WINAPI CoQueryProxyBlanket(IUnknown* pProxy, DWORD* pwAuthnSvc, DWORD* pAuthzSvc, OLECHAR** pServerPrincName, DWORD* pAuthnLevel, DWORD* pImpLevel, RPC_AUTH_IDENTITY_HANDLE* pAuthInfo, DWORD* pCapabilities); -HRESULT WINAPI CoSetProxyBlanket(IUnknown* pProxy, DWORD dwAuthnSvc, DWORD dwAuthzSvc, OLECHAR* pServerPrincName, DWORD dwAuthnLevel, DWORD dwImpLevel, RPC_AUTH_IDENTITY_HANDLE pAuthInfo, DWORD dwCapabilities); -HRESULT WINAPI CoCopyProxy(IUnknown* pProxy, IUnknown** ppCopy); - -HRESULT WINAPI CoImpersonateClient(void); -HRESULT WINAPI CoQueryClientBlanket(DWORD* pAuthnSvc, DWORD* pAuthzSvc, OLECHAR** pServerPrincName, DWORD* pAuthnLevel, DWORD* pImpLevel, RPC_AUTHZ_HANDLE* pPrivs, DWORD* pCapabilities); -HRESULT WINAPI CoRevertToSelf(void); + +_Check_return_ +HRESULT +WINAPI +CoInitializeSecurity( + _In_opt_ PSECURITY_DESCRIPTOR pSecDesc, + _In_ LONG cAuthSvc, + _In_reads_opt_(cAuthSvc) SOLE_AUTHENTICATION_SERVICE *asAuthSvc, + _In_opt_ void *pReserved1, + _In_ DWORD dwAuthnLevel, + _In_ DWORD dwImpLevel, + _In_opt_ void *pReserved2, + _In_ DWORD dwCapabilities, + _In_opt_ void *pReserved3); + +_Check_return_ +HRESULT +WINAPI +CoGetCallContext( + _In_ REFIID riid, + _Outptr_ void **ppInterface); + +_Check_return_ +HRESULT +WINAPI +CoSwitchCallContext( + _In_opt_ IUnknown *pContext, + _Outptr_ IUnknown **ppOldContext); + +_Check_return_ +HRESULT +WINAPI +CoQueryAuthenticationServices( + _Out_ DWORD *pcAuthSvc, + _Outptr_result_buffer_(*pcAuthSvc) SOLE_AUTHENTICATION_SERVICE **asAuthSvc); + +_Check_return_ +HRESULT +WINAPI +CoQueryProxyBlanket( + _In_ IUnknown *pProxy, + _Out_opt_ DWORD *pwAuthnSvc, + _Out_opt_ DWORD *pAuthzSvc, + _Outptr_opt_ OLECHAR **pServerPrincName, + _Out_opt_ DWORD *pAuthnLevel, + _Out_opt_ DWORD *pImpLevel, + _Out_opt_ RPC_AUTH_IDENTITY_HANDLE *pAuthInfo, + _Out_opt_ DWORD *pCapabilities); + +_Check_return_ +HRESULT +WINAPI +CoSetProxyBlanket( + _In_ IUnknown *pProxy, + _In_ DWORD dwAuthnSvc, + _In_ DWORD dwAuthzSvc, + _In_opt_ OLECHAR *pServerPrincName, + _In_ DWORD dwAuthnLevel, + _In_ DWORD dwImpLevel, + _In_opt_ RPC_AUTH_IDENTITY_HANDLE pAuthInfo, + _In_ DWORD dwCapabilities); + +_Check_return_ +HRESULT +WINAPI CoCopyProxy( + _In_ IUnknown *pProxy, + _Outptr_ IUnknown **ppCopy); + +_Check_return_ HRESULT WINAPI CoImpersonateClient(void); + +_Check_return_ +HRESULT +WINAPI +CoQueryClientBlanket( + _Out_opt_ DWORD *pAuthnSvc, + _Out_opt_ DWORD *pAuthzSvc, + _Outptr_opt_ OLECHAR **pServerPrincName, + _Out_opt_ DWORD *pAuthnLevel, + _Out_opt_ DWORD *pImpLevel, + _Outptr_opt_ RPC_AUTHZ_HANDLE *pPrivs, + _Inout_opt_ DWORD *pCapabilities); + +_Check_return_ HRESULT WINAPI CoRevertToSelf(void); /* misc */ -HRESULT WINAPI CoGetTreatAsClass(REFCLSID clsidOld, LPCLSID pClsidNew); -HRESULT WINAPI CoTreatAsClass(REFCLSID clsidOld, REFCLSID clsidNew); -HRESULT WINAPI CoAllowSetForegroundWindow(IUnknown *pUnk, LPVOID lpvReserved); -HRESULT WINAPI CoGetObjectContext(REFIID riid, LPVOID *ppv); - -HRESULT WINAPI CoCreateGuid(GUID* pguid); -BOOL WINAPI CoIsOle1Class(REFCLSID rclsid); - -BOOL WINAPI CoDosDateTimeToFileTime(WORD nDosDate, WORD nDosTime, FILETIME* lpFileTime); -BOOL WINAPI CoFileTimeToDosDateTime(FILETIME* lpFileTime, WORD* lpDosDate, WORD* lpDosTime); -HRESULT WINAPI CoFileTimeNow(FILETIME* lpFileTime); -HRESULT WINAPI CoRegisterMessageFilter(LPMESSAGEFILTER lpMessageFilter,LPMESSAGEFILTER *lplpMessageFilter); -HRESULT WINAPI CoRegisterChannelHook(REFGUID ExtensionGuid, IChannelHook *pChannelHook); + +_Check_return_ +HRESULT +WINAPI +CoGetTreatAsClass( + _In_ REFCLSID clsidOld, + _Out_ LPCLSID pClsidNew); + +_Check_return_ +HRESULT +WINAPI +CoTreatAsClass( + _In_ REFCLSID clsidOld, + _In_ REFCLSID clsidNew); + +HRESULT +WINAPI +CoAllowSetForegroundWindow( + _In_ IUnknown *pUnk, + _In_opt_ LPVOID lpvReserved); + +_Check_return_ +HRESULT +WINAPI +CoGetObjectContext( + _In_ REFIID riid, + _Outptr_ LPVOID *ppv); + +_Check_return_ HRESULT WINAPI CoCreateGuid(_Out_ GUID *pguid); +BOOL WINAPI CoIsOle1Class(_In_ REFCLSID rclsid); + +BOOL +WINAPI +CoDosDateTimeToFileTime( + _In_ WORD nDosDate, + _In_ WORD nDosTime, + _Out_ FILETIME *lpFileTime); + +BOOL +WINAPI +CoFileTimeToDosDateTime( + _In_ FILETIME *lpFileTime, + _Out_ WORD *lpDosDate, + _Out_ WORD *lpDosTime); + +HRESULT WINAPI CoFileTimeNow(_Out_ FILETIME *lpFileTime); + +_Check_return_ +HRESULT +WINAPI +CoRegisterMessageFilter( + _In_opt_ LPMESSAGEFILTER lpMessageFilter, + _Outptr_opt_result_maybenull_ LPMESSAGEFILTER *lplpMessageFilter); + +HRESULT +WINAPI +CoRegisterChannelHook( + _In_ REFGUID ExtensionGuid, + _In_ IChannelHook *pChannelHook); typedef enum tagCOWAIT_FLAGS { @@ -425,22 +722,68 @@ COWAIT_ALERTABLE = 0x00000002 } COWAIT_FLAGS; -HRESULT WINAPI CoWaitForMultipleHandles(DWORD dwFlags,DWORD dwTimeout,ULONG cHandles,LPHANDLE pHandles,LPDWORD lpdwindex); +_Check_return_ +HRESULT +WINAPI +CoWaitForMultipleHandles( + _In_ DWORD dwFlags, + _In_ DWORD dwTimeout, + _In_ ULONG cHandles, + _In_reads_(cHandles) LPHANDLE pHandles, + _Out_ LPDWORD lpdwindex); /***************************************************************************** * GUID API */ -HRESULT WINAPI StringFromCLSID(REFCLSID id, LPOLESTR*); -HRESULT WINAPI CLSIDFromString(LPCOLESTR, LPCLSID); -HRESULT WINAPI CLSIDFromProgID(LPCOLESTR progid, LPCLSID riid); -HRESULT WINAPI ProgIDFromCLSID(REFCLSID clsid, LPOLESTR *lplpszProgID); - -INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax); + +_Check_return_ +HRESULT +WINAPI +StringFromCLSID( + _In_ REFCLSID id, + _Outptr_ LPOLESTR*); + +_Check_return_ +HRESULT +WINAPI +CLSIDFromString( + _In_ LPCOLESTR, + _Out_ LPCLSID); + +_Check_return_ +HRESULT +WINAPI +CLSIDFromProgID( + _In_ LPCOLESTR progid, + _Out_ LPCLSID riid); + +_Check_return_ +HRESULT +WINAPI +ProgIDFromCLSID( + _In_ REFCLSID clsid, + _Outptr_ LPOLESTR *lplpszProgID); + +_Check_return_ +INT +WINAPI +StringFromGUID2( + _In_ REFGUID id, + _Out_writes_to_(cmax, return) LPOLESTR str, + _In_ INT cmax); /***************************************************************************** * COM Server dll - exports */ -HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID * ppv) DECLSPEC_HIDDEN; + +_Check_return_ +HRESULT +WINAPI +DllGetClassObject( + _In_ REFCLSID rclsid, + _In_ REFIID riid, + _Outptr_ LPVOID *ppv) DECLSPEC_HIDDEN; + HRESULT WINAPI DllCanUnloadNow(void) DECLSPEC_HIDDEN; /* shouldn't be here, but is nice for type checking */ @@ -453,27 +796,134 @@ /***************************************************************************** * Data Object */ -HRESULT WINAPI CreateDataAdviseHolder(LPDATAADVISEHOLDER* ppDAHolder); -HRESULT WINAPI CreateDataCache(LPUNKNOWN pUnkOuter, REFCLSID rclsid, REFIID iid, LPVOID* ppv); + +HRESULT +WINAPI +CreateDataAdviseHolder( + _Outptr_ LPDATAADVISEHOLDER *ppDAHolder); + +HRESULT +WINAPI +CreateDataCache( + _In_opt_ LPUNKNOWN pUnkOuter, + _In_ REFCLSID rclsid, + _In_ REFIID iid, + _Out_ LPVOID *ppv); /***************************************************************************** * Moniker API */ -HRESULT WINAPI BindMoniker(LPMONIKER pmk, DWORD grfOpt, REFIID iidResult, LPVOID* ppvResult); -HRESULT WINAPI CoGetObject(LPCWSTR pszName, BIND_OPTS *pBindOptions, REFIID riid, void **ppv); -HRESULT WINAPI CreateAntiMoniker(LPMONIKER * ppmk); -HRESULT WINAPI CreateBindCtx(DWORD reserved, LPBC* ppbc); -HRESULT WINAPI CreateClassMoniker(REFCLSID rclsid, LPMONIKER* ppmk); -HRESULT WINAPI CreateFileMoniker(LPCOLESTR lpszPathName, LPMONIKER* ppmk); -HRESULT WINAPI CreateGenericComposite(LPMONIKER pmkFirst, LPMONIKER pmkRest, LPMONIKER* ppmkComposite); -HRESULT WINAPI CreateItemMoniker(LPCOLESTR lpszDelim, LPCOLESTR lpszItem, LPMONIKER* ppmk); -HRESULT WINAPI CreateObjrefMoniker(LPUNKNOWN punk, LPMONIKER * ppmk); -HRESULT WINAPI CreatePointerMoniker(LPUNKNOWN punk, LPMONIKER * ppmk); -HRESULT WINAPI GetClassFile(LPCOLESTR filePathName,CLSID *pclsid); -HRESULT WINAPI GetRunningObjectTable(DWORD reserved, LPRUNNINGOBJECTTABLE *pprot); -HRESULT WINAPI MkParseDisplayName(LPBC pbc, LPCOLESTR szUserName, ULONG * pchEaten, LPMONIKER * ppmk); -HRESULT WINAPI MonikerCommonPrefixWith(IMoniker* pmkThis,IMoniker* pmkOther,IMoniker** ppmkCommon); -HRESULT WINAPI MonikerRelativePathTo(LPMONIKER pmkSrc, LPMONIKER pmkDest, LPMONIKER * ppmkRelPath, BOOL dwReserved); + +_Check_return_ +HRESULT +WINAPI +BindMoniker( + _In_ LPMONIKER pmk, + _In_ DWORD grfOpt, + _In_ REFIID iidResult, + _Outptr_ LPVOID *ppvResult); + +_Check_return_ +HRESULT +WINAPI +CoGetObject( + _In_ LPCWSTR pszName, + _In_opt_ BIND_OPTS *pBindOptions, + _In_ REFIID riid, + _Outptr_ void **ppv); + +_Check_return_ HRESULT WINAPI CreateAntiMoniker(_Outptr_ LPMONIKER *ppmk); + +_Check_return_ +HRESULT +WINAPI +CreateBindCtx( + _In_ DWORD reserved, + _Outptr_ LPBC *ppbc); + +_Check_return_ +HRESULT +WINAPI +CreateClassMoniker( + _In_ REFCLSID rclsid, + _Outptr_ LPMONIKER *ppmk); + +_Check_return_ +HRESULT +WINAPI +CreateFileMoniker( + _In_ LPCOLESTR lpszPathName, + _Outptr_ LPMONIKER *ppmk); + +_Check_return_ +HRESULT +WINAPI +CreateGenericComposite( + _In_opt_ LPMONIKER pmkFirst, + _In_opt_ LPMONIKER pmkRest, + _Outptr_ LPMONIKER *ppmkComposite); + +_Check_return_ +HRESULT +WINAPI +CreateItemMoniker( + _In_ LPCOLESTR lpszDelim, + _In_ LPCOLESTR lpszItem, + _Outptr_ LPMONIKER *ppmk); + +_Check_return_ +HRESULT +WINAPI +CreateObjrefMoniker( + _In_opt_ LPUNKNOWN punk, + _Outptr_ LPMONIKER *ppmk); + +_Check_return_ +HRESULT +WINAPI +CreatePointerMoniker( + _In_opt_ LPUNKNOWN punk, + _Outptr_ LPMONIKER *ppmk); + +_Check_return_ +HRESULT +WINAPI +GetClassFile( + _In_ LPCOLESTR filePathName, + _Out_ CLSID *pclsid); + +_Check_return_ +HRESULT +WINAPI +GetRunningObjectTable( + _In_ DWORD reserved, + _Outptr_ LPRUNNINGOBJECTTABLE *pprot); + +_Check_return_ +HRESULT +WINAPI +MkParseDisplayName( + _In_ LPBC pbc, + _In_ LPCOLESTR szUserName, + _Out_ ULONG *pchEaten, + _Outptr_ LPMONIKER *ppmk); + +_Check_return_ +HRESULT +WINAPI +MonikerCommonPrefixWith( + _In_ IMoniker *pmkThis, + _In_ IMoniker *pmkOther, + _Outptr_ IMoniker **ppmkCommon); + +_Check_return_ +HRESULT +WINAPI +MonikerRelativePathTo( + _In_ LPMONIKER pmkSrc, + _In_ LPMONIKER pmkDest, + _Outptr_ LPMONIKER *ppmkRelPath, + _In_ BOOL dwReserved); /***************************************************************************** * Storage API @@ -510,17 +960,99 @@ const WCHAR* pwcsTemplateFile; } STGOPTIONS; -HRESULT WINAPI StringFromIID(REFIID rclsid, LPOLESTR *lplpsz); -HRESULT WINAPI StgCreateDocfile(LPCOLESTR pwcsName,DWORD grfMode,DWORD reserved,IStorage **ppstgOpen); -HRESULT WINAPI StgCreateStorageEx(const WCHAR*,DWORD,DWORD,DWORD,STGOPTIONS*,void*,REFIID,void**); -HRESULT WINAPI StgIsStorageFile(LPCOLESTR fn); -HRESULT WINAPI StgIsStorageILockBytes(ILockBytes *plkbyt); -HRESULT WINAPI StgOpenStorage(const OLECHAR* pwcsName,IStorage* pstgPriority,DWORD grfMode,SNB snbExclude,DWORD reserved,IStorage**ppstgOpen); -HRESULT WINAPI StgOpenStorageEx(const WCHAR* pwcwName,DWORD grfMode,DWORD stgfmt,DWORD grfAttrs,STGOPTIONS *pStgOptions, void *reserved, REFIID riid, void **ppObjectOpen); - -HRESULT WINAPI StgCreateDocfileOnILockBytes(ILockBytes *plkbyt,DWORD grfMode, DWORD reserved, IStorage** ppstgOpen); -HRESULT WINAPI StgOpenStorageOnILockBytes(ILockBytes *plkbyt, IStorage *pstgPriority, DWORD grfMode, SNB snbExclude, DWORD reserved, IStorage **ppstgOpen); -HRESULT WINAPI StgSetTimes( OLECHAR const *lpszName, FILETIME const *pctime, FILETIME const *patime, FILETIME const *pmtime); +_Check_return_ +HRESULT +WINAPI +StringFromIID( + _In_ REFIID rclsid, + _Outptr_ LPOLESTR *lplpsz); + +_Check_return_ +HRESULT +WINAPI +StgCreateDocfile( + _In_opt_ _Null_terminated_ LPCOLESTR pwcsName, + _In_ DWORD grfMode, + _Reserved_ DWORD reserved, + _Outptr_ IStorage **ppstgOpen); + +_Check_return_ +HRESULT +WINAPI +StgCreateStorageEx( + _In_opt_ _Null_terminated_ const WCHAR*, + _In_ DWORD, + _In_ DWORD, + _In_ DWORD, + _Inout_opt_ STGOPTIONS*, + _In_opt_ void*, + _In_ REFIID, + _Outptr_ void**); + +_Check_return_ +HRESULT +WINAPI +StgIsStorageFile( + _In_ _Null_terminated_ LPCOLESTR fn); + +_Check_return_ +HRESULT +WINAPI +StgIsStorageILockBytes( + _In_ ILockBytes *plkbyt); + +_Check_return_ +HRESULT +WINAPI +StgOpenStorage( + _In_opt_ _Null_terminated_ const OLECHAR *pwcsName, + _In_opt_ IStorage *pstgPriority, + _In_ DWORD grfMode, + _In_opt_z_ SNB snbExclude, + _In_ DWORD reserved, + _Outptr_ IStorage **ppstgOpen); + +_Check_return_ +HRESULT +WINAPI +StgOpenStorageEx( + _In_ _Null_terminated_ const WCHAR *pwcwName, + _In_ DWORD grfMode, + _In_ DWORD stgfmt, + _In_ DWORD grfAttrs, + _Inout_opt_ STGOPTIONS *pStgOptions, + _In_opt_ void *reserved, + _In_ REFIID riid, + _Outptr_ void **ppObjectOpen); + +_Check_return_ +HRESULT +WINAPI +StgCreateDocfileOnILockBytes( + _In_ ILockBytes *plkbyt, + _In_ DWORD grfMode, + _In_ DWORD reserved, + _Outptr_ IStorage **ppstgOpen); + +_Check_return_ +HRESULT +WINAPI +StgOpenStorageOnILockBytes( + _In_ ILockBytes *plkbyt, + _In_opt_ IStorage *pstgPriority, + _In_ DWORD grfMode, + _In_opt_z_ SNB snbExclude, + _Reserved_ DWORD reserved, + _Outptr_ IStorage **ppstgOpen); + +_Check_return_ +HRESULT +WINAPI +StgSetTimes( + _In_ _Null_terminated_ OLECHAR const *lpszName, + _In_opt_ FILETIME const *pctime, + _In_opt_ FILETIME const *patime, + _In_opt_ FILETIME const *pmtime); #ifdef __cplusplus }
11 years, 4 months
1
0
0
0
[akhaldi] 59755: [CRT] * Annotate mbstring_s.h. * Update _mbsnbcpy_s() annotation in mbstring.h.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Aug 16 21:13:36 2013 New Revision: 59755 URL:
http://svn.reactos.org/svn/reactos?rev=59755&view=rev
Log: [CRT] * Annotate mbstring_s.h. * Update _mbsnbcpy_s() annotation in mbstring.h. Modified: trunk/reactos/include/crt/mbstring.h trunk/reactos/include/crt/sec_api/mbstring_s.h Modified: trunk/reactos/include/crt/mbstring.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/mbstring.h?rev…
============================================================================== --- trunk/reactos/include/crt/mbstring.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/mbstring.h [iso-8859-1] Fri Aug 16 21:13:36 2013 @@ -3,6 +3,7 @@ * This file is part of the w64 mingw-runtime package. * No warranty is given; refer to the file DISCLAIMER within this package. */ + #ifndef _INC_MBSTRING #define _INC_MBSTRING @@ -390,13 +391,13 @@ _In_ size_t _Count); _CRTIMP - int + errno_t __cdecl _mbsnbcpy_s( - _Out_writes_z_(size) unsigned char* dst, - _In_ size_t size, - _In_z_ const unsigned char* src, - _In_ size_t n); + _Out_writes_z_(_DstSizeInBytes) unsigned char *_Dst, + _In_ size_t _DstSizeInBytes, + _In_z_ const unsigned char *_Src, + _In_ size_t _MaxCount); _CRTIMP unsigned char* Modified: trunk/reactos/include/crt/sec_api/mbstring_s.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/sec_api/mbstri…
============================================================================== --- trunk/reactos/include/crt/sec_api/mbstring_s.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/sec_api/mbstring_s.h [iso-8859-1] Fri Aug 16 21:13:36 2013 @@ -3,6 +3,7 @@ * This file is part of the w64 mingw-runtime package. * No warranty is given; refer to the file DISCLAIMER within this package. */ + #ifndef _INC_MBSTRING_S #define _INC_MBSTRING_S @@ -16,37 +17,246 @@ #ifndef _MBSTRING_S_DEFINED #define _MBSTRING_S_DEFINED - _CRTIMP errno_t __cdecl _mbscat_s(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src); - _CRTIMP errno_t __cdecl _mbscat_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,_locale_t _Locale); - _CRTIMP errno_t __cdecl _mbscpy_s(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src); - _CRTIMP errno_t __cdecl _mbscpy_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,_locale_t _Locale); - _CRTIMP errno_t __cdecl _mbslwr_s(unsigned char *_Str,size_t _SizeInBytes); - _CRTIMP errno_t __cdecl _mbslwr_s_l(unsigned char *_Str,size_t _SizeInBytes,_locale_t _Locale); - _CRTIMP errno_t __cdecl _mbsnbcat_s(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount); - _CRTIMP errno_t __cdecl _mbsnbcat_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount,_locale_t _Locale); - _CRTIMP errno_t __cdecl _mbsnbcpy_s(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount); - _CRTIMP errno_t __cdecl _mbsnbcpy_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount,_locale_t _Locale); - _CRTIMP errno_t __cdecl _mbsnbset_s(unsigned char *_Dst,size_t _DstSizeInBytes,unsigned int _Ch,size_t _MaxCount); - _CRTIMP errno_t __cdecl _mbsnbset_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,unsigned int _Ch,size_t _MaxCount,_locale_t _Locale); - _CRTIMP errno_t __cdecl _mbsncat_s(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount); - _CRTIMP errno_t __cdecl _mbsncat_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount,_locale_t _Locale); - _CRTIMP errno_t __cdecl _mbsncpy_s(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount); - _CRTIMP errno_t __cdecl _mbsncpy_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount,_locale_t _Locale); - _CRTIMP errno_t __cdecl _mbsnset_s(unsigned char *_Dst,size_t _DstSizeInBytes,unsigned int _Val,size_t _MaxCount); - _CRTIMP errno_t __cdecl _mbsnset_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,unsigned int _Val,size_t _MaxCount,_locale_t _Locale); - _CRTIMP errno_t __cdecl _mbsset_s(unsigned char *_Dst,size_t _DstSizeInBytes,unsigned int _Val); - _CRTIMP errno_t __cdecl _mbsset_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,unsigned int _Val,_locale_t _Locale); - _CRTIMP unsigned char *__cdecl _mbstok_s(unsigned char *_Str,const unsigned char *_Delim,unsigned char **_Context); - _CRTIMP unsigned char *__cdecl _mbstok_s_l(unsigned char *_Str,const unsigned char *_Delim,unsigned char **_Context,_locale_t _Locale); - _CRTIMP errno_t __cdecl _mbsupr_s(unsigned char *_Str,size_t _SizeInBytes); - _CRTIMP errno_t __cdecl _mbsupr_s_l(unsigned char *_Str,size_t _SizeInBytes,_locale_t _Locale); - _CRTIMP errno_t __cdecl _mbccpy_s(unsigned char *_Dst,size_t _DstSizeInBytes,int *_PCopied,const unsigned char *_Src); - _CRTIMP errno_t __cdecl _mbccpy_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,int *_PCopied,const unsigned char *_Src,_locale_t _Locale); -#endif + + _CRTIMP + errno_t + __cdecl + _mbscat_s( + _Inout_updates_z_(_DstSizeInBytes) unsigned char *_Dst, + _In_ size_t _DstSizeInBytes, + _In_z_ const unsigned char *_Src); + + _CRTIMP + errno_t + __cdecl + _mbscat_s_l( + _Inout_updates_z_(_DstSizeInBytes) unsigned char *_Dst, + _In_ size_t _DstSizeInBytes, + _In_z_ const unsigned char *_Src, + _In_opt_ _locale_t _Locale); + + _CRTIMP + errno_t + __cdecl + _mbscpy_s( + _Out_writes_z_(_DstSizeInBytes) unsigned char *_Dst, + _In_ size_t _DstSizeInBytes, + _In_z_ const unsigned char *_Src); + + _CRTIMP + errno_t + __cdecl + _mbscpy_s_l( + _Out_writes_z_(_DstSizeInBytes) unsigned char *_Dst, + _In_ size_t _DstSizeInBytes, + _In_z_ const unsigned char *_Src, + _In_opt_ _locale_t _Locale); + + _CRTIMP + errno_t + __cdecl + _mbslwr_s( + _Inout_updates_opt_z_(_SizeInBytes) unsigned char *_Str, + _In_ size_t _SizeInBytes); + + _CRTIMP + errno_t + __cdecl + _mbslwr_s_l( + _Inout_updates_opt_z_(_SizeInBytes) unsigned char *_Str, + _In_ size_t _SizeInBytes, + _In_opt_ _locale_t _Locale); + + _CRTIMP + errno_t + __cdecl + _mbsnbcat_s( + _Inout_updates_z_(_DstSizeInBytes) unsigned char *_Dst, + _In_ size_t _DstSizeInBytes, + _In_z_ const unsigned char *_Src, + _In_ size_t _MaxCount); + + _CRTIMP + errno_t + __cdecl + _mbsnbcat_s_l( + _Inout_updates_z_(_DstSizeInBytes) unsigned char *_Dst, + _In_ size_t _DstSizeInBytes, + _In_z_ const unsigned char *_Src, + _In_ size_t _MaxCount, + _In_opt_ _locale_t _Locale); + + _CRTIMP + errno_t + __cdecl + _mbsnbcpy_s( + _Out_writes_z_(_DstSizeInBytes) unsigned char *_Dst, + _In_ size_t _DstSizeInBytes, + _In_z_ const unsigned char *_Src, + _In_ size_t _MaxCount); + + _CRTIMP + errno_t + __cdecl + _mbsnbcpy_s_l( + _Out_writes_z_(_DstSizeInBytes) unsigned char *_Dst, + _In_ size_t _DstSizeInBytes, + _In_z_ const unsigned char *_Src, + _In_ size_t _MaxCount, + _In_opt_ _locale_t _Locale); + + _CRTIMP + errno_t + __cdecl + _mbsnbset_s( + _Inout_updates_z_(_DstSizeInBytes) unsigned char *_Dst, + _In_ size_t _DstSizeInBytes, + _In_ unsigned int _Ch, + _In_ size_t _MaxCount); + + _CRTIMP + errno_t + __cdecl + _mbsnbset_s_l( + _Inout_updates_z_(_DstSizeInBytes) unsigned char *_Dst, + _In_ size_t _DstSizeInBytes, + _In_ unsigned int _Ch, + _In_ size_t _MaxCount, + _In_opt_ _locale_t _Locale); + + _CRTIMP + errno_t + __cdecl + _mbsncat_s( + _Inout_updates_z_(_DstSizeInBytes) unsigned char *_Dst, + _In_ size_t _DstSizeInBytes, + _In_z_ const unsigned char *_Src, + _In_ size_t _MaxCount); + + _CRTIMP + errno_t + __cdecl + _mbsncat_s_l( + _Inout_updates_z_(_DstSizeInBytes) unsigned char *_Dst, + _In_ size_t _DstSizeInBytes, + _In_z_ const unsigned char *_Src, + _In_ size_t _MaxCount, + _In_opt_ _locale_t _Locale); + + _CRTIMP + errno_t + __cdecl + _mbsncpy_s( + _Out_writes_z_(_DstSizeInBytes) unsigned char *_Dst, + _In_ size_t _DstSizeInBytes, + _In_z_ const unsigned char *_Src, + _In_ size_t _MaxCount); + + _CRTIMP + errno_t + __cdecl + _mbsncpy_s_l( + _Out_writes_z_(_DstSizeInBytes) unsigned char *_Dst, + _In_ size_t _DstSizeInBytes, + _In_z_ const unsigned char *_Src, + _In_ size_t _MaxCount, + _In_opt_ _locale_t _Locale); + + _CRTIMP + errno_t + __cdecl + _mbsnset_s( + _Inout_updates_z_(_DstSizeInBytes) unsigned char *_Dst, + _In_ size_t _DstSizeInBytes, + _In_ unsigned int _Val, + _In_ size_t _MaxCount); + + _CRTIMP + errno_t + __cdecl + _mbsnset_s_l( + _Inout_updates_z_(_DstSizeInBytes) unsigned char *_Dst, + _In_ size_t _DstSizeInBytes, + _In_ unsigned int _Val, + _In_ size_t _MaxCount, + _In_opt_ _locale_t _Locale); + + _CRTIMP + errno_t + __cdecl + _mbsset_s( + _Inout_updates_z_(_DstSizeInBytes) unsigned char *_Dst, + _In_ size_t _DstSizeInBytes, + _In_ unsigned int _Val); + + _CRTIMP + errno_t + __cdecl + _mbsset_s_l( + _Inout_updates_z_(_DstSizeInBytes) unsigned char *_Dst, + _In_ size_t _DstSizeInBytes, + _In_ unsigned int _Val, + _In_opt_ _locale_t _Locale); + + _Check_return_ + _CRTIMP + unsigned char * + __cdecl + _mbstok_s( + _Inout_opt_z_ unsigned char *_Str, + _In_z_ const unsigned char *_Delim, + _Inout_ _Deref_prepost_opt_z_ unsigned char **_Context); + + _Check_return_ + _CRTIMP + unsigned char * + __cdecl + _mbstok_s_l( + _Inout_opt_z_ unsigned char *_Str, + _In_z_ const unsigned char *_Delim, + _Inout_ _Deref_prepost_opt_z_ unsigned char **_Context, + _In_opt_ _locale_t _Locale); + + _CRTIMP + errno_t + __cdecl + _mbsupr_s( + _Inout_updates_z_(_SizeInBytes) unsigned char *_Str, + _In_ size_t _SizeInBytes); + + _CRTIMP + errno_t + __cdecl + _mbsupr_s_l( + _Inout_updates_z_(_SizeInBytes) unsigned char *_Str, + _In_ size_t _SizeInBytes, + _In_opt_ _locale_t _Locale); + + _CRTIMP + errno_t + __cdecl + _mbccpy_s( + _Out_writes_z_(_DstSizeInBytes) unsigned char *_Dst, + _In_ size_t _DstSizeInBytes, + _Out_opt_ int *_PCopied, + _In_z_ const unsigned char *_Src); + + _CRTIMP + errno_t + __cdecl + _mbccpy_s_l( + _Out_writes_z_(_DstSizeInBytes) unsigned char *_Dst, + _In_ size_t _DstSizeInBytes, + _Out_opt_ int *_PCopied, + _In_z_ const unsigned char *_Src, + _In_opt_ _locale_t _Locale); + +#endif /* _MBSTRING_S_DEFINED */ #ifdef __cplusplus } #endif -#endif -#endif +#endif /* MINGW_HAS_SECURE_API */ + +#endif /* _INC_MBSTRING_S */
11 years, 4 months
1
0
0
0
[aandrejevic] 59754: [NTVDM] Fix the INT 12h handler to call the correct function (DosOpenFile not DosCreateFile).
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Fri Aug 16 19:40:02 2013 New Revision: 59754 URL:
http://svn.reactos.org/svn/reactos?rev=59754&view=rev
Log: [NTVDM] Fix the INT 12h handler to call the correct function (DosOpenFile not DosCreateFile). Modified: branches/ntvdm/subsystems/ntvdm/dos.c Modified: branches/ntvdm/subsystems/ntvdm/dos.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/dos.c?re…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/dos.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/dos.c [iso-8859-1] Fri Aug 16 19:40:02 2013 @@ -1665,10 +1665,10 @@ case 0x3D: { WORD FileHandle; - WORD ErrorCode = DosCreateFile(&FileHandle, - (LPCSTR)(ULONG_PTR)BaseAddress - + TO_LINEAR(DataSegment, LOWORD(Edx)), - LOBYTE(Eax)); + WORD ErrorCode = DosOpenFile(&FileHandle, + (LPCSTR)(ULONG_PTR)BaseAddress + + TO_LINEAR(DataSegment, LOWORD(Edx)), + LOBYTE(Eax)); if (ErrorCode == 0) {
11 years, 4 months
1
0
0
0
[aandrejevic] 59753: [NTVDM] Remove the "new emulator" started in emulator.c in favor of Soft386.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Fri Aug 16 19:33:04 2013 New Revision: 59753 URL:
http://svn.reactos.org/svn/reactos?rev=59753&view=rev
Log: [NTVDM] Remove the "new emulator" started in emulator.c in favor of Soft386. Modified: branches/ntvdm/subsystems/ntvdm/emulator.c branches/ntvdm/subsystems/ntvdm/emulator.h branches/ntvdm/subsystems/ntvdm/registers.c Modified: branches/ntvdm/subsystems/ntvdm/emulator.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/emulator…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/emulator.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/emulator.c [iso-8859-1] Fri Aug 16 19:33:04 2013 @@ -24,7 +24,7 @@ softx86_ctx EmulatorContext; softx87_ctx FpuEmulatorContext; #else -EMULATOR_CONTEXT EmulatorContext; +SOFT386_STATE EmulatorContext; #endif static BOOLEAN A20Line = FALSE; @@ -241,8 +241,8 @@ StackSegment = EmulatorContext.state->segment_reg[SX86_SREG_SS].val; StackPointer = EmulatorContext.state->general_reg[SX86_REG_SP].val; #else - StackSegment = EmulatorContext.Registers[EMULATOR_REG_SS].LowWord; - StackPointer = EmulatorContext.Registers[EMULATOR_REG_SP].LowWord; + StackSegment = EmulatorContext.SegmentRegs[SOFT386_REG_SS].LowWord; + StackPointer = EmulatorContext.SegmentRegs[SOFT386_REG_SP].LowWord; #endif /* Get the stack */ @@ -475,7 +475,14 @@ return EmulatorContext.state->segment_reg[Register - EMULATOR_REG_ES].val; } #else - return EmulatorContext.Registers[Register].Long; + if (Register < EMULATOR_REG_ES) + { + return EmulatorContext.GeneralRegs[Register].Long; + } + else + { + return EmulatorContext.SegmentRegs[Register - EMULATOR_REG_ES].Selector; + } #endif } @@ -484,7 +491,7 @@ #ifndef NEW_EMULATOR return EmulatorContext.state->reg_ip; #else - return EmulatorContext.InstructionPointer.Long; + return EmulatorContext.InstPtr.Long; #endif } Modified: branches/ntvdm/subsystems/ntvdm/emulator.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/emulator…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/emulator.h [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/emulator.h [iso-8859-1] Fri Aug 16 19:33:04 2013 @@ -14,8 +14,10 @@ #include "ntvdm.h" #ifndef NEW_EMULATOR -#include <softx86/softx86.h> -#include <softx86/softx87.h> +#include <softx86.h> +#include <softx87.h> +#else +#include <soft386.h> #endif /* DEFINES ********************************************************************/ @@ -38,38 +40,7 @@ #define EMULATOR_FLAG_VIP (1 << 20) #define EMULATOR_FLAG_ID (1 << 21) -/* CR0 */ -#define EMULATOR_CR0_PE (1 << 0) -#define EMULATOR_CR0_MP (1 << 1) -#define EMULATOR_CR0_EM (1 << 2) -#define EMULATOR_CR0_TS (1 << 3) -#define EMULATOR_CR0_ET (1 << 4) -#define EMULATOR_CR0_NE (1 << 5) -#define EMULATOR_CR0_WP (1 << 16) -#define EMULATOR_CR0_AM (1 << 18) -#define EMULATOR_CR0_NW (1 << 29) -#define EMULATOR_CR0_CD (1 << 30) -#define EMULATOR_CR0_PG (1 << 31) - -/* GDT Access byte */ -#define GDT_SEG_ACCESSED (1 << 0) -#define GDT_DATA_WRITEABLE (1 << 1) -#define GDT_CODE_READABLE (1 << 1) -#define GDT_CONFORMING (1 << 2) -#define GDT_DIRECTION (1 << 2) -#define GDT_CODE_SEGMENT (1 << 3) -#define GDT_PRESENT (1 << 7) - -/* GDT flags */ -#define GDT_32BIT_SEGMENT (1 << 2) -#define GDT_PAGE_GRANULARITY (1 << 3) - /* Common definitions */ -#define EMULATOR_NUM_GENERAL_REGS 8 -#define EMULATOR_NUM_SEGMENT_REGS 6 -#define EMULATOR_NUM_CONTROL_REGS 8 -#define EMULATOR_NUM_DEBUG_REGS 8 -#define MAX_GDT_ENTRIES 8192 #define EMULATOR_BOP 0xC4C4 #define EMULATOR_INT_BOP 0xBEEF #define STACK_INT_NUM 0 @@ -114,65 +85,11 @@ EMULATOR_REG_GS }; -typedef union -{ - struct - { - BYTE LowByte; - BYTE HighByte; - }; - WORD LowWord; - DWORD Long; -} EMULATOR_REGISTER, *PEMULATOR_REGISTER; - -typedef struct -{ - ULONG Limit : 16; - ULONG Base : 24; - ULONG AccessByte : 8; - ULONG LimitHigh : 4; - ULONG Flags : 4; - ULONG BaseHigh : 8; -} EMULATOR_GDT_ENTRY; - -typedef struct -{ - ULONG Offset : 16; - ULONG Selector : 16; - ULONG Zero : 8; - ULONG TypeAndAttributes : 8; - ULONG OffsetHigh : 16; -} EMULATOR_IDT_ENTRY; - -typedef struct -{ - WORD Size; - DWORD Address; -} EMULATOR_TABLE_REGISTER; - -typedef struct -{ - EMULATOR_REGISTER Registers[EMULATOR_NUM_GENERAL_REGS - + EMULATOR_NUM_SEGMENT_REGS]; - EMULATOR_REGISTER Flags; - EMULATOR_REGISTER InstructionPointer; - EMULATOR_REGISTER ControlRegisters[EMULATOR_NUM_CONTROL_REGS]; - EMULATOR_REGISTER DebugRegisters[EMULATOR_NUM_DEBUG_REGS]; - ULONGLONG TimeStampCounter; - BOOLEAN OperandSizeOverload; - BOOLEAN AddressSizeOverload; - EMULATOR_TABLE_REGISTER Gdtr, Idtr; - EMULATOR_GDT_ENTRY CachedDescriptors[EMULATOR_NUM_SEGMENT_REGS]; - UINT ExceptionCount; -} EMULATOR_CONTEXT, *PEMULATOR_CONTEXT; - -typedef VOID (*EMULATOR_OPCODE_HANDLER)(PEMULATOR_CONTEXT Context, BYTE Opcode); - #ifndef NEW_EMULATOR extern softx86_ctx EmulatorContext; extern softx87_ctx FpuEmulatorContext; #else -extern EMULATOR_CONTEXT EmulatorContext; +extern SOFT386_STATE EmulatorContext; #endif /* FUNCTIONS ******************************************************************/ Modified: branches/ntvdm/subsystems/ntvdm/registers.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/register…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/registers.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/registers.c [iso-8859-1] Fri Aug 16 19:33:04 2013 @@ -21,7 +21,7 @@ #ifndef NEW_EMULATOR return EmulatorContext.state->general_reg[EMULATOR_REG_AX].val; #else - return EmulatorContext.Registers[EMULATOR_REG_AX].Long; + return EmulatorContext.GeneralRegs[EMULATOR_REG_AX].Long; #endif } @@ -32,7 +32,7 @@ #ifndef NEW_EMULATOR EmulatorContext.state->general_reg[EMULATOR_REG_AX].val = Value; #else - EmulatorContext.Registers[EMULATOR_REG_AX].Long = Value; + EmulatorContext.GeneralRegs[EMULATOR_REG_AX].Long = Value; #endif } @@ -43,7 +43,7 @@ #ifndef NEW_EMULATOR return EmulatorContext.state->general_reg[EMULATOR_REG_AX].w.lo; #else - return EmulatorContext.Registers[EMULATOR_REG_AX].LowWord; + return EmulatorContext.GeneralRegs[EMULATOR_REG_AX].LowWord; #endif } @@ -54,7 +54,7 @@ #ifndef NEW_EMULATOR EmulatorContext.state->general_reg[EMULATOR_REG_AX].w.lo = Value; #else - EmulatorContext.Registers[EMULATOR_REG_AX].LowWord = Value; + EmulatorContext.GeneralRegs[EMULATOR_REG_AX].LowWord = Value; #endif } @@ -65,7 +65,7 @@ #ifndef NEW_EMULATOR return EmulatorContext.state->general_reg[EMULATOR_REG_AX].b.hi; #else - return EmulatorContext.Registers[EMULATOR_REG_AX].HighByte; + return EmulatorContext.GeneralRegs[EMULATOR_REG_AX].HighByte; #endif } @@ -76,7 +76,7 @@ #ifndef NEW_EMULATOR EmulatorContext.state->general_reg[EMULATOR_REG_AX].b.hi = Value; #else - EmulatorContext.Registers[EMULATOR_REG_AX].HighByte = Value; + EmulatorContext.GeneralRegs[EMULATOR_REG_AX].HighByte = Value; #endif } @@ -87,7 +87,7 @@ #ifndef NEW_EMULATOR return EmulatorContext.state->general_reg[EMULATOR_REG_AX].b.lo; #else - return EmulatorContext.Registers[EMULATOR_REG_AX].LowByte; + return EmulatorContext.GeneralRegs[EMULATOR_REG_AX].LowByte; #endif } @@ -98,7 +98,7 @@ #ifndef NEW_EMULATOR EmulatorContext.state->general_reg[EMULATOR_REG_AX].b.lo = Value; #else - EmulatorContext.Registers[EMULATOR_REG_AX].LowByte = Value; + EmulatorContext.GeneralRegs[EMULATOR_REG_AX].LowByte = Value; #endif } @@ -109,7 +109,7 @@ #ifndef NEW_EMULATOR return EmulatorContext.state->general_reg[EMULATOR_REG_BX].val; #else - return EmulatorContext.Registers[EMULATOR_REG_BX].Long; + return EmulatorContext.GeneralRegs[EMULATOR_REG_BX].Long; #endif } @@ -120,7 +120,7 @@ #ifndef NEW_EMULATOR EmulatorContext.state->general_reg[EMULATOR_REG_BX].val = Value; #else - EmulatorContext.Registers[EMULATOR_REG_BX].Long = Value; + EmulatorContext.GeneralRegs[EMULATOR_REG_BX].Long = Value; #endif } @@ -131,7 +131,7 @@ #ifndef NEW_EMULATOR return EmulatorContext.state->general_reg[EMULATOR_REG_BX].w.lo; #else - return EmulatorContext.Registers[EMULATOR_REG_BX].LowWord; + return EmulatorContext.GeneralRegs[EMULATOR_REG_BX].LowWord; #endif } @@ -142,7 +142,7 @@ #ifndef NEW_EMULATOR EmulatorContext.state->general_reg[EMULATOR_REG_BX].w.lo = Value; #else - EmulatorContext.Registers[EMULATOR_REG_BX].LowWord = Value; + EmulatorContext.GeneralRegs[EMULATOR_REG_BX].LowWord = Value; #endif } @@ -153,7 +153,7 @@ #ifndef NEW_EMULATOR return EmulatorContext.state->general_reg[EMULATOR_REG_BX].b.hi; #else - return EmulatorContext.Registers[EMULATOR_REG_BX].HighByte; + return EmulatorContext.GeneralRegs[EMULATOR_REG_BX].HighByte; #endif } @@ -164,7 +164,7 @@ #ifndef NEW_EMULATOR EmulatorContext.state->general_reg[EMULATOR_REG_BX].b.hi = Value; #else - EmulatorContext.Registers[EMULATOR_REG_BX].HighByte = Value; + EmulatorContext.GeneralRegs[EMULATOR_REG_BX].HighByte = Value; #endif } @@ -175,7 +175,7 @@ #ifndef NEW_EMULATOR return EmulatorContext.state->general_reg[EMULATOR_REG_BX].b.lo; #else - return EmulatorContext.Registers[EMULATOR_REG_BX].LowByte; + return EmulatorContext.GeneralRegs[EMULATOR_REG_BX].LowByte; #endif } @@ -186,7 +186,7 @@ #ifndef NEW_EMULATOR EmulatorContext.state->general_reg[EMULATOR_REG_BX].b.lo = Value; #else - EmulatorContext.Registers[EMULATOR_REG_BX].LowByte = Value; + EmulatorContext.GeneralRegs[EMULATOR_REG_BX].LowByte = Value; #endif } @@ -199,7 +199,7 @@ #ifndef NEW_EMULATOR return EmulatorContext.state->general_reg[EMULATOR_REG_CX].val; #else - return EmulatorContext.Registers[EMULATOR_REG_CX].Long; + return EmulatorContext.GeneralRegs[EMULATOR_REG_CX].Long; #endif } @@ -210,7 +210,7 @@ #ifndef NEW_EMULATOR EmulatorContext.state->general_reg[EMULATOR_REG_CX].val = Value; #else - EmulatorContext.Registers[EMULATOR_REG_CX].Long = Value; + EmulatorContext.GeneralRegs[EMULATOR_REG_CX].Long = Value; #endif } @@ -221,7 +221,7 @@ #ifndef NEW_EMULATOR return EmulatorContext.state->general_reg[EMULATOR_REG_CX].w.lo; #else - return EmulatorContext.Registers[EMULATOR_REG_CX].LowWord; + return EmulatorContext.GeneralRegs[EMULATOR_REG_CX].LowWord; #endif } @@ -232,7 +232,7 @@ #ifndef NEW_EMULATOR EmulatorContext.state->general_reg[EMULATOR_REG_CX].w.lo = Value; #else - EmulatorContext.Registers[EMULATOR_REG_CX].LowWord = Value; + EmulatorContext.GeneralRegs[EMULATOR_REG_CX].LowWord = Value; #endif } @@ -243,7 +243,7 @@ #ifndef NEW_EMULATOR return EmulatorContext.state->general_reg[EMULATOR_REG_CX].b.hi; #else - return EmulatorContext.Registers[EMULATOR_REG_CX].HighByte; + return EmulatorContext.GeneralRegs[EMULATOR_REG_CX].HighByte; #endif } @@ -254,7 +254,7 @@ #ifndef NEW_EMULATOR EmulatorContext.state->general_reg[EMULATOR_REG_CX].b.hi = Value; #else - EmulatorContext.Registers[EMULATOR_REG_CX].HighByte = Value; + EmulatorContext.GeneralRegs[EMULATOR_REG_CX].HighByte = Value; #endif } @@ -265,7 +265,7 @@ #ifndef NEW_EMULATOR return EmulatorContext.state->general_reg[EMULATOR_REG_CX].b.lo; #else - return EmulatorContext.Registers[EMULATOR_REG_CX].LowByte; + return EmulatorContext.GeneralRegs[EMULATOR_REG_CX].LowByte; #endif } @@ -276,7 +276,7 @@ #ifndef NEW_EMULATOR EmulatorContext.state->general_reg[EMULATOR_REG_CX].b.lo = Value; #else - EmulatorContext.Registers[EMULATOR_REG_CX].LowByte = Value; + EmulatorContext.GeneralRegs[EMULATOR_REG_CX].LowByte = Value; #endif } @@ -289,7 +289,7 @@ #ifndef NEW_EMULATOR return EmulatorContext.state->general_reg[EMULATOR_REG_DX].val; #else - return EmulatorContext.Registers[EMULATOR_REG_DX].Long; + return EmulatorContext.GeneralRegs[EMULATOR_REG_DX].Long; #endif } @@ -300,7 +300,7 @@ #ifndef NEW_EMULATOR EmulatorContext.state->general_reg[EMULATOR_REG_DX].val = Value; #else - EmulatorContext.Registers[EMULATOR_REG_DX].Long = Value; + EmulatorContext.GeneralRegs[EMULATOR_REG_DX].Long = Value; #endif } @@ -311,7 +311,7 @@ #ifndef NEW_EMULATOR return EmulatorContext.state->general_reg[EMULATOR_REG_DX].w.lo; #else - return EmulatorContext.Registers[EMULATOR_REG_DX].LowWord; + return EmulatorContext.GeneralRegs[EMULATOR_REG_DX].LowWord; #endif } @@ -322,7 +322,7 @@ #ifndef NEW_EMULATOR EmulatorContext.state->general_reg[EMULATOR_REG_DX].w.lo = Value; #else - EmulatorContext.Registers[EMULATOR_REG_DX].LowWord = Value; + EmulatorContext.GeneralRegs[EMULATOR_REG_DX].LowWord = Value; #endif } @@ -333,7 +333,7 @@ #ifndef NEW_EMULATOR return EmulatorContext.state->general_reg[EMULATOR_REG_DX].b.hi; #else - return EmulatorContext.Registers[EMULATOR_REG_DX].HighByte; + return EmulatorContext.GeneralRegs[EMULATOR_REG_DX].HighByte; #endif } @@ -344,7 +344,7 @@ #ifndef NEW_EMULATOR EmulatorContext.state->general_reg[EMULATOR_REG_DX].b.hi = Value; #else - EmulatorContext.Registers[EMULATOR_REG_DX].HighByte = Value; + EmulatorContext.GeneralRegs[EMULATOR_REG_DX].HighByte = Value; #endif } @@ -355,7 +355,7 @@ #ifndef NEW_EMULATOR return EmulatorContext.state->general_reg[EMULATOR_REG_DX].b.lo; #else - return EmulatorContext.Registers[EMULATOR_REG_DX].LowByte; + return EmulatorContext.GeneralRegs[EMULATOR_REG_DX].LowByte; #endif } @@ -366,7 +366,7 @@ #ifndef NEW_EMULATOR EmulatorContext.state->general_reg[EMULATOR_REG_DX].b.lo = Value; #else - EmulatorContext.Registers[EMULATOR_REG_DX].LowByte = Value; + EmulatorContext.GeneralRegs[EMULATOR_REG_DX].LowByte = Value; #endif } @@ -409,7 +409,7 @@ #ifndef NEW_EMULATOR return EmulatorContext.state->general_reg[EMULATOR_REG_BP].val; #else - return EmulatorContext.Registers[EMULATOR_REG_BP].Long; + return EmulatorContext.GeneralRegs[EMULATOR_REG_BP].Long; #endif } @@ -420,7 +420,7 @@ #ifndef NEW_EMULATOR EmulatorContext.state->general_reg[EMULATOR_REG_BP].val = Value; #else - EmulatorContext.Registers[EMULATOR_REG_BP].Long = Value; + EmulatorContext.GeneralRegs[EMULATOR_REG_BP].Long = Value; #endif } @@ -431,7 +431,7 @@ #ifndef NEW_EMULATOR return EmulatorContext.state->general_reg[EMULATOR_REG_BP].w.lo; #else - return EmulatorContext.Registers[EMULATOR_REG_BP].LowWord; + return EmulatorContext.GeneralRegs[EMULATOR_REG_BP].LowWord; #endif } @@ -442,7 +442,7 @@ #ifndef NEW_EMULATOR EmulatorContext.state->general_reg[EMULATOR_REG_BP].w.lo = Value; #else - EmulatorContext.Registers[EMULATOR_REG_BP].LowWord = Value; + EmulatorContext.GeneralRegs[EMULATOR_REG_BP].LowWord = Value; #endif } @@ -455,7 +455,7 @@ #ifndef NEW_EMULATOR return EmulatorContext.state->general_reg[EMULATOR_REG_SI].val; #else - return EmulatorContext.Registers[EMULATOR_REG_SI].Long; + return EmulatorContext.GeneralRegs[EMULATOR_REG_SI].Long; #endif } @@ -466,7 +466,7 @@ #ifndef NEW_EMULATOR EmulatorContext.state->general_reg[EMULATOR_REG_SI].val = Value; #else - EmulatorContext.Registers[EMULATOR_REG_SI].Long = Value; + EmulatorContext.GeneralRegs[EMULATOR_REG_SI].Long = Value; #endif } @@ -477,7 +477,7 @@ #ifndef NEW_EMULATOR return EmulatorContext.state->general_reg[EMULATOR_REG_SI].w.lo; #else - return EmulatorContext.Registers[EMULATOR_REG_SI].LowWord; + return EmulatorContext.GeneralRegs[EMULATOR_REG_SI].LowWord; #endif } @@ -488,7 +488,7 @@ #ifndef NEW_EMULATOR EmulatorContext.state->general_reg[EMULATOR_REG_SI].w.lo = Value; #else - EmulatorContext.Registers[EMULATOR_REG_SI].LowWord = Value; + EmulatorContext.GeneralRegs[EMULATOR_REG_SI].LowWord = Value; #endif } @@ -501,7 +501,7 @@ #ifndef NEW_EMULATOR return EmulatorContext.state->general_reg[EMULATOR_REG_DI].val; #else - return EmulatorContext.Registers[EMULATOR_REG_DI].Long; + return EmulatorContext.GeneralRegs[EMULATOR_REG_DI].Long; #endif } @@ -512,7 +512,7 @@ #ifndef NEW_EMULATOR EmulatorContext.state->general_reg[EMULATOR_REG_DI].val = Value; #else - EmulatorContext.Registers[EMULATOR_REG_DI].Long = Value; + EmulatorContext.GeneralRegs[EMULATOR_REG_DI].Long = Value; #endif } @@ -523,7 +523,7 @@ #ifndef NEW_EMULATOR return EmulatorContext.state->general_reg[EMULATOR_REG_DI].w.lo; #else - return EmulatorContext.Registers[EMULATOR_REG_DI].LowWord; + return EmulatorContext.GeneralRegs[EMULATOR_REG_DI].LowWord; #endif } @@ -534,7 +534,7 @@ #ifndef NEW_EMULATOR EmulatorContext.state->general_reg[EMULATOR_REG_DI].w.lo = Value; #else - EmulatorContext.Registers[EMULATOR_REG_DI].LowWord = Value; + EmulatorContext.GeneralRegs[EMULATOR_REG_DI].LowWord = Value; #endif }
11 years, 4 months
1
0
0
0
← Newer
1
...
15
16
17
18
19
20
21
...
33
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
Results per page:
10
25
50
100
200