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
December 2017
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
26 participants
355 discussions
Start a n
N
ew thread
[reactos] 01/01: [SERVMAN] InitDialog => InitProgressDialog. #179
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d9a18277b8c0192f7d205…
commit d9a18277b8c0192f7d2056a936e056ed24fab80d Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Dec 23 14:00:08 2017 +0100 [SERVMAN] InitDialog => InitProgressDialog. #179 --- base/applications/mscutils/servman/progress.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/base/applications/mscutils/servman/progress.c b/base/applications/mscutils/servman/progress.c index 239c598edc..cf5fe78430 100644 --- a/base/applications/mscutils/servman/progress.c +++ b/base/applications/mscutils/servman/progress.c @@ -190,10 +190,10 @@ unsigned int __stdcall ActionThread(void* Param) } static BOOL -InitDialog(HWND hDlg, - UINT Message, - WPARAM wParam, - LPARAM lParam) +InitProgressDialog(HWND hDlg, + UINT Message, + WPARAM wParam, + LPARAM lParam) { PPROGRESS_DATA ProgressData = (PPROGRESS_DATA)lParam; HANDLE hThread; @@ -237,10 +237,7 @@ ProgressDialogProc(HWND hDlg, { case WM_INITDIALOG: { - return InitDialog(hDlg, - Message, - wParam, - lParam); + return InitProgressDialog(hDlg, Message, wParam, lParam); } case WM_COMMAND:
7 years
1
0
0
0
[reactos] 01/01: [DXDIAG] Rename WIDTH, HEIGHT, InitListViewColumns and SetDeviceDetails. Zap WindowProc. #179
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e3e46b2bcd2d5f97b1289…
commit e3e46b2bcd2d5f97b128986261bdb390e71faef3 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Dec 23 13:57:01 2017 +0100 [DXDIAG] Rename WIDTH, HEIGHT, InitListViewColumns and SetDeviceDetails. Zap WindowProc. #179 --- base/applications/dxdiag/ddtest.c | 36 +++++++++++++++--------------------- base/applications/dxdiag/display.c | 4 ++-- base/applications/dxdiag/input.c | 4 ++-- 3 files changed, 19 insertions(+), 25 deletions(-) diff --git a/base/applications/dxdiag/ddtest.c b/base/applications/dxdiag/ddtest.c index df93758483..ea112a78d9 100644 --- a/base/applications/dxdiag/ddtest.c +++ b/base/applications/dxdiag/ddtest.c @@ -13,11 +13,10 @@ BOOL DDPrimarySurfaceTest(HWND hWnd); BOOL DDOffscreenBufferTest(HWND hWnd, BOOL Fullscreen); VOID DDRedrawFrame(LPDIRECTDRAWSURFACE lpDDSurface); VOID DDUpdateFrame(LPDIRECTDRAWSURFACE lpDDPrimarySurface ,LPDIRECTDRAWSURFACE lpDDBackBuffer, BOOL Fullscreen, INT *posX, INT *posY, INT *gainX, INT *gainY, RECT *rectDD); -static LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); #define TEST_DURATION 10000 -#define WIDTH 640 -#define HEIGHT 480 +#define DD_TEST_WIDTH 640 +#define DD_TEST_HEIGHT 480 #define DD_TEST_STEP 5 #define DD_SQUARE_SIZE 100 #define DD_SQUARE_STEP 2 @@ -79,7 +78,7 @@ VOID DDTests() winClass.cbSize = sizeof(WNDCLASSEX); winClass.style = CS_DBLCLKS | CS_OWNDC | CS_HREDRAW | CS_VREDRAW; - winClass.lpfnWndProc = WindowProc; + winClass.lpfnWndProc = DefWindowProc; winClass.cbClsExtra = 0; winClass.cbWndExtra = 0; winClass.hInstance = hInstance; @@ -94,9 +93,9 @@ VOID DDTests() return; hWnd = CreateWindowEx(0, winClass.lpszClassName, NULL,WS_POPUP, - (GetSystemMetrics(SM_CXSCREEN) - WIDTH)/2, - (GetSystemMetrics(SM_CYSCREEN) - HEIGHT)/2, - WIDTH, HEIGHT, NULL, NULL, hInstance, NULL); + (GetSystemMetrics(SM_CXSCREEN) - DD_TEST_WIDTH)/2, + (GetSystemMetrics(SM_CYSCREEN) - DD_TEST_HEIGHT)/2, + DD_TEST_WIDTH, DD_TEST_HEIGHT, NULL, NULL, hInstance, NULL); if (!hWnd){ return; @@ -176,10 +175,10 @@ VOID DDRedrawFrame(LPDIRECTDRAWSURFACE lpDDSurface) HBRUSH BlackBrush, WhiteBrush; BOOL Colour = FALSE; - rct.left = (GetSystemMetrics(SM_CXSCREEN) - WIDTH)/2; - rct.right = (GetSystemMetrics(SM_CXSCREEN) - WIDTH)/2 + WIDTH; - rct.top = (GetSystemMetrics(SM_CYSCREEN) - HEIGHT)/2; - rct.bottom = (GetSystemMetrics(SM_CYSCREEN) - HEIGHT)/2 + HEIGHT; + rct.left = (GetSystemMetrics(SM_CXSCREEN) - DD_TEST_WIDTH)/2; + rct.right = (GetSystemMetrics(SM_CXSCREEN) - DD_TEST_WIDTH)/2 + DD_TEST_WIDTH; + rct.top = (GetSystemMetrics(SM_CYSCREEN) - DD_TEST_HEIGHT)/2; + rct.bottom = (GetSystemMetrics(SM_CYSCREEN) - DD_TEST_HEIGHT)/2 + DD_TEST_HEIGHT; BlackBrush = CreateSolidBrush(RGB(0,0,0)); WhiteBrush = CreateSolidBrush(RGB(255,255,255)); @@ -225,7 +224,7 @@ BOOL DDOffscreenBufferTest(HWND hWnd, BOOL Fullscreen){ lpDD->lpVtbl->Release(lpDD); return FALSE; } - if(lpDD->lpVtbl->SetDisplayMode(lpDD, WIDTH, HEIGHT, 32) != DD_OK) + if(lpDD->lpVtbl->SetDisplayMode(lpDD, DD_TEST_WIDTH, DD_TEST_HEIGHT, 32) != DD_OK) { lpDD->lpVtbl->Release(lpDD); return FALSE; @@ -268,8 +267,8 @@ BOOL DDOffscreenBufferTest(HWND hWnd, BOOL Fullscreen){ ZeroMemory(&DDBBSurfaceDesc,sizeof(DDBBSurfaceDesc)); DDBBSurfaceDesc.dwSize = sizeof(DDBBSurfaceDesc); DDBBSurfaceDesc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT; - DDBBSurfaceDesc.dwHeight = HEIGHT; - DDBBSurfaceDesc.dwWidth = WIDTH; + DDBBSurfaceDesc.dwHeight = DD_TEST_HEIGHT; + DDBBSurfaceDesc.dwWidth = DD_TEST_WIDTH; DDBBSurfaceDesc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; if(lpDD->lpVtbl->CreateSurface(lpDD, &DDBBSurfaceDesc, &lpDDBackBuffer, NULL) != DD_OK) @@ -345,8 +344,8 @@ VOID DDUpdateFrame(LPDIRECTDRAWSURFACE lpDDPrimarySurface ,LPDIRECTDRAWSURFACE l WhiteBrush = CreateSolidBrush(RGB(255,255,255)); FillRect(hdc, &rct, WhiteBrush); - if(*posX >= (WIDTH - DD_SQUARE_SIZE)) *gainX = -(*gainX); - if(*posY >= (HEIGHT - DD_SQUARE_SIZE)) *gainY = -(*gainY); + if(*posX >= (DD_TEST_WIDTH - DD_SQUARE_SIZE)) *gainX = -(*gainX); + if(*posY >= (DD_TEST_HEIGHT - DD_SQUARE_SIZE)) *gainY = -(*gainY); if(*posX < 0) *gainX = -1*(*gainX); if(*posY < 0) *gainY = -1*(*gainY); @@ -365,8 +364,3 @@ VOID DDUpdateFrame(LPDIRECTDRAWSURFACE lpDDPrimarySurface ,LPDIRECTDRAWSURFACE l } } } - -static LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - return DefWindowProc(hWnd, msg, wParam, lParam); -} diff --git a/base/applications/dxdiag/display.c b/base/applications/dxdiag/display.c index 73469df9be..779772f405 100644 --- a/base/applications/dxdiag/display.c +++ b/base/applications/dxdiag/display.c @@ -160,7 +160,7 @@ EnumerateDrivers(PVOID Context, HDEVINFO hList, PSP_DEVINFO_DATA pInfoData) static void -SetDeviceDetails(HWND * hDlgCtrls, LPCGUID classGUID, LPGUID * deviceGUID) +DisplayPageSetDeviceDetails(HWND * hDlgCtrls, LPCGUID classGUID, LPGUID * deviceGUID) { HDEVINFO hInfo; DWORD dwIndex = 0; @@ -305,7 +305,7 @@ InitializeDialog(HWND hwndDlg, PDISPLAY_DEVICEW pDispDevice) hDlgCtrls[3] = GetDlgItem(hwndDlg, IDC_STATIC_ADAPTER_VERSION); hDlgCtrls[4] = GetDlgItem(hwndDlg, IDC_STATIC_ADAPTER_DATE); - SetDeviceDetails(hDlgCtrls, &GUID_DEVCLASS_DISPLAY, NULL); + DisplayPageSetDeviceDetails(hDlgCtrls, &GUID_DEVCLASS_DISPLAY, NULL); return TRUE; } diff --git a/base/applications/dxdiag/input.c b/base/applications/dxdiag/input.c index c2472a0fb3..2e8ebf371d 100644 --- a/base/applications/dxdiag/input.c +++ b/base/applications/dxdiag/input.c @@ -151,7 +151,7 @@ BOOL CALLBACK DirectInputEnumDevCb( } VOID -InitListViewColumns(PINPUT_DIALOG_CONTEXT pContext) +InputPageInitListViewColumns(PINPUT_DIALOG_CONTEXT pContext) { WCHAR szText[256]; LVCOLUMNW lvcolumn; @@ -195,7 +195,7 @@ InitializeDirectInputDialog(HWND hwndDlg) ZeroMemory(&Context, sizeof(Context)); Context.pObj = pObj; Context.hwndDlg = hwndDlg; - InitListViewColumns(&Context); + InputPageInitListViewColumns(&Context); pObj->lpVtbl->EnumDevices(pObj, DI8DEVCLASS_ALL, DirectInputEnumDevCb, (PVOID)&Context, DIEDFL_ALLDEVICES); pObj->lpVtbl->Release(pObj);
7 years
1
0
0
0
[reactos] 01/01: [CHARMAP] Rename OnCreate functions. #179
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1963e2d130d0c7451b332…
commit 1963e2d130d0c7451b332ab58fd53090b9fced09 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Dec 23 13:46:14 2017 +0100 [CHARMAP] Rename OnCreate functions. #179 --- base/applications/charmap/charmap.c | 5 +++-- base/applications/charmap/map.c | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/base/applications/charmap/charmap.c b/base/applications/charmap/charmap.c index f233863236..5cd864e182 100644 --- a/base/applications/charmap/charmap.c +++ b/base/applications/charmap/charmap.c @@ -439,8 +439,9 @@ AdvancedDlgProc(HWND hDlg, return FALSE; } #endif + static int -OnCreate(HWND hWnd, WPARAM wParam, LPARAM lParam) +PanelOnCreate(HWND hWnd, WPARAM wParam, LPARAM lParam) { HMENU hSysMenu; WCHAR lpAboutText[256]; @@ -488,7 +489,7 @@ PanelWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) { case WM_CREATE: - return OnCreate(hWnd, wParam, lParam); + return PanelOnCreate(hWnd, wParam, lParam); case WM_CLOSE: DestroyWindow(hWnd); diff --git a/base/applications/charmap/map.c b/base/applications/charmap/map.c index 3ce259f4f8..a8a9c8a282 100644 --- a/base/applications/charmap/map.c +++ b/base/applications/charmap/map.c @@ -376,9 +376,9 @@ OnClick(PMAP infoPtr, static BOOL -OnCreate(PMAP infoPtr, - HWND hwnd, - HWND hParent) +MapOnCreate(PMAP infoPtr, + HWND hwnd, + HWND hParent) { RECT rc; BOOL Ret = FALSE; @@ -558,9 +558,9 @@ MapWndProc(HWND hwnd, { case WM_CREATE: { - if (!OnCreate(infoPtr, - hwnd, - ((LPCREATESTRUCTW)lParam)->hwndParent)) + if (!MapOnCreate(infoPtr, + hwnd, + ((LPCREATESTRUCTW)lParam)->hwndParent)) { return (LRESULT)-1; }
7 years
1
0
0
0
[reactos] 01/01: [VFD] Add support for installing driver from System32\drivers.
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fc921423f35f442d41924…
commit fc921423f35f442d419246b1dbbaf1e3f651f978 Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Sat Dec 23 09:34:34 2017 +0100 [VFD] Add support for installing driver from System32\drivers. Patch by Doug Lyons. CORE-14090 --- modules/rosapps/lib/vfdlib/vfdctl.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/modules/rosapps/lib/vfdlib/vfdctl.c b/modules/rosapps/lib/vfdlib/vfdctl.c index eb09da84d3..21672b9662 100644 --- a/modules/rosapps/lib/vfdlib/vfdctl.c +++ b/modules/rosapps/lib/vfdlib/vfdctl.c @@ -255,6 +255,10 @@ DWORD WINAPI VfdInstallDriver( DWORD len; DWORD ret = ERROR_SUCCESS; +#ifdef __REACTOS__ + CHAR full_file_path[MAX_PATH]; +#endif + // get SystemRoot directory path // len = GetEnvironmentVariable( @@ -270,6 +274,12 @@ DWORD WINAPI VfdInstallDriver( inst_path = &system_dir[len]; +#ifdef __REACTOS__ + strcpy(full_file_path, system_dir); + strcat(full_file_path, VFD_INSTALL_DIRECTORY); + strcat(full_file_path, VFD_DRIVER_FILENAME); +#endif + #ifdef VFD_EMBED_DRIVER // // use embedded driver file @@ -342,6 +352,14 @@ DWORD WINAPI VfdInstallDriver( } } +#ifdef __REACTOS__ + // Check install directory & file exist or use full_file_path + + if (GetFileAttributesA(file_path) == INVALID_FILE_ATTRIBUTES) { + strcpy(file_path, full_file_path); + } +#endif + // Check if the file is a valid Virtual Floppy driver ret = VfdCheckDriverFile(file_path, NULL);
7 years
1
0
0
0
[reactos] 02/02: [ATL_APITEST] Show that CComObject's COM_MAP continues enumeration after a failing blind function.
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f941c78f50cb138840c68…
commit f941c78f50cb138840c68c2756a583e8d8ceb105 Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Wed Dec 20 22:06:44 2017 +0100 [ATL_APITEST] Show that CComObject's COM_MAP continues enumeration after a failing blind function. --- modules/rostests/apitests/atl/CComObject.cpp | 149 +++++++++++++++++++++ modules/rostests/apitests/atl/CMakeLists.txt | 1 + modules/rostests/apitests/atl/devenv/ATLTest.sln | 10 ++ .../devenv/{CImage.vcxproj => CComObject.vcxproj} | 9 +- .../rostests/apitests/atl/devenv/CImage.vcxproj | 2 +- modules/rostests/apitests/atl/testlist.c | 2 + 6 files changed, 166 insertions(+), 7 deletions(-) diff --git a/modules/rostests/apitests/atl/CComObject.cpp b/modules/rostests/apitests/atl/CComObject.cpp new file mode 100644 index 0000000000..f7d16e1e69 --- /dev/null +++ b/modules/rostests/apitests/atl/CComObject.cpp @@ -0,0 +1,149 @@ +/* + * PROJECT: ReactOS api tests + * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) + * PURPOSE: Test for CComObject + * COPYRIGHT: Copyright 2017 Mark Jansen (mark.jansen(a)reactos.org) + */ + + +#include <atlbase.h> +#include <atlcom.h> + +#ifdef __REACTOS__ + #include <apitest.h> +#else + #include <stdlib.h> + #include <stdio.h> + #include <stdarg.h> + int g_tests_executed = 0; + int g_tests_failed = 0; + void ok_func(const char *file, int line, BOOL value, const char *fmt, ...) + { + va_list va; + va_start(va, fmt); + if (!value) + { + printf("%s (%d): ", file, line); + vprintf(fmt, va); + g_tests_failed++; + } + g_tests_executed++; + va_end(va); + } + #undef ok + #define ok(value, ...) ok_func(__FILE__, __LINE__, value, __VA_ARGS__) + #define START_TEST(x) int main(void) +#endif + + +static LONG g_CTOR = 0; +static LONG g_DTOR = 0; +static LONG g_BLIND = 0; + +class CTestObject : + public CComObjectRootEx<CComMultiThreadModelNoCS>, + public IPersist, + public IStdMarshalInfo +{ +public: + CTestObject() + { + InterlockedIncrement(&g_CTOR); + } + ~CTestObject() + { + InterlockedIncrement(&g_DTOR); + } + + // *** IPersist methods *** + virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID) + { + return E_NOTIMPL; + } + + // *** IStdMarshalInfo methods *** + virtual HRESULT STDMETHODCALLTYPE GetClassForHandler(DWORD dwDestContext, void *pvDestContext, CLSID *pClsid) + { + return E_NOTIMPL; + } + + static HRESULT WINAPI FuncBlind(void* pv, REFIID riid, LPVOID* ppv, DWORD dw) + { + InterlockedIncrement(&g_BLIND); + return E_FAIL; + } + + DECLARE_NOT_AGGREGATABLE(CTestObject) + DECLARE_PROTECT_FINAL_CONSTRUCT() + + BEGIN_COM_MAP(CTestObject) + COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist) /* First entry has to be a simple entry, otherwise ATL asserts */ + COM_INTERFACE_ENTRY_FUNC_BLIND(0, FuncBlind) /* Showing that even after a Blind func, entryies can be found */ + COM_INTERFACE_ENTRY_IID(IID_IStdMarshalInfo, IStdMarshalInfo) + END_COM_MAP() +}; + + +class CDumExe: public CAtlExeModuleT<CDumExe> +{ + +}; +CDumExe dum; + + +START_TEST(CComObject) +{ + g_CTOR = g_DTOR = g_BLIND = 0; + + CComObject<CTestObject>* pTest; + HRESULT hr = CComObject<CTestObject>::CreateInstance(&pTest); + + ok(hr == S_OK, "Expected S_OK, got 0x%lx\n", hr); + + ok(g_CTOR == 1, "Expected 1, got %lu\n", g_CTOR); + ok(g_DTOR == 0, "Expected 0, got %lu\n", g_DTOR); + ok(g_BLIND == 0, "Expected 0, got %lu\n", g_BLIND); + + if (hr == S_OK) + { + ULONG ref = pTest->AddRef(); + ok(ref == 1, "Expected 1, got %lu\n", ref); + + { + CComPtr<IUnknown> ppv; + hr = pTest->QueryInterface(IID_IUnknown, (void **) &ppv); + ok(hr == S_OK, "Expected S_OK, got 0x%lx\n", hr); + ok(g_CTOR == 1, "Expected 1, got %lu\n", g_CTOR); + ok(g_DTOR == 0, "Expected 0, got %lu\n", g_DTOR); + ok(g_BLIND == 0, "Expected 0, got %lu\n", g_BLIND); + + CComPtr<IPersist> ppersist; + hr = pTest->QueryInterface(IID_IPersist, (void **)&ppersist); + ok(hr == S_OK, "Expected S_OK, got 0x%lx\n", hr); + ok(g_CTOR == 1, "Expected 1, got %lu\n", g_CTOR); + ok(g_DTOR == 0, "Expected 0, got %lu\n", g_DTOR); + ok(g_BLIND == 0, "Expected 0, got %lu\n", g_BLIND); + + } + + { + CComPtr<IStdMarshalInfo> pstd; + hr = pTest->QueryInterface(IID_IStdMarshalInfo, (void **)&pstd); + ok(hr == S_OK, "Expected S_OK, got 0x%lx\n", hr); + ok(g_CTOR == 1, "Expected 1, got %lu\n", g_CTOR); + ok(g_DTOR == 0, "Expected 0, got %lu\n", g_DTOR); + ok(g_BLIND == 1, "Expected 1, got %lu\n", g_BLIND); + } + + ref = pTest->Release(); + ok(ref == 0, "Expected 0, got %lu\n", ref); + ok(g_CTOR == 1, "Expected 1, got %lu\n", g_CTOR); + ok(g_DTOR == 1, "Expected 1, got %lu\n", g_DTOR); + ok(g_BLIND == 1, "Expected 1, got %lu\n", g_BLIND); + } + +#ifndef __REACTOS__ + printf("CImage: %i tests executed (0 marked as todo, %i failures), 0 skipped.\n", g_tests_executed, g_tests_failed); + return g_tests_failed; +#endif +} diff --git a/modules/rostests/apitests/atl/CMakeLists.txt b/modules/rostests/apitests/atl/CMakeLists.txt index 9c9ed6ddec..fbc1420dec 100644 --- a/modules/rostests/apitests/atl/CMakeLists.txt +++ b/modules/rostests/apitests/atl/CMakeLists.txt @@ -8,6 +8,7 @@ list(APPEND SOURCE atltypes.cpp CComBSTR.cpp CComHeapPtr.cpp + CComObject.cpp CImage.cpp CRegKey.cpp CSimpleArray.cpp diff --git a/modules/rostests/apitests/atl/devenv/ATLTest.sln b/modules/rostests/apitests/atl/devenv/ATLTest.sln index 1384c080a6..d9d18dddb6 100644 --- a/modules/rostests/apitests/atl/devenv/ATLTest.sln +++ b/modules/rostests/apitests/atl/devenv/ATLTest.sln @@ -11,6 +11,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CSimpleMap", "CSimpleMap.vc EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CString", "CString.vcxproj", "{FBA6DAE7-7996-4DE1-BD03-9E44F7DB4ABD}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CComObject", "CComObject.vcxproj", "{408AEF87-D169-4A2F-A9E3-FF3DD1D59E65}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -51,6 +53,14 @@ Global {FBA6DAE7-7996-4DE1-BD03-9E44F7DB4ABD}.Release|x64.Build.0 = Release|x64 {FBA6DAE7-7996-4DE1-BD03-9E44F7DB4ABD}.Release|x86.ActiveCfg = Release|Win32 {FBA6DAE7-7996-4DE1-BD03-9E44F7DB4ABD}.Release|x86.Build.0 = Release|Win32 + {408AEF87-D169-4A2F-A9E3-FF3DD1D59E65}.Debug|x64.ActiveCfg = Debug|x64 + {408AEF87-D169-4A2F-A9E3-FF3DD1D59E65}.Debug|x64.Build.0 = Debug|x64 + {408AEF87-D169-4A2F-A9E3-FF3DD1D59E65}.Debug|x86.ActiveCfg = Debug|Win32 + {408AEF87-D169-4A2F-A9E3-FF3DD1D59E65}.Debug|x86.Build.0 = Debug|Win32 + {408AEF87-D169-4A2F-A9E3-FF3DD1D59E65}.Release|x64.ActiveCfg = Release|x64 + {408AEF87-D169-4A2F-A9E3-FF3DD1D59E65}.Release|x64.Build.0 = Release|x64 + {408AEF87-D169-4A2F-A9E3-FF3DD1D59E65}.Release|x86.ActiveCfg = Release|Win32 + {408AEF87-D169-4A2F-A9E3-FF3DD1D59E65}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/modules/rostests/apitests/atl/devenv/CImage.vcxproj b/modules/rostests/apitests/atl/devenv/CComObject.vcxproj similarity index 97% copy from modules/rostests/apitests/atl/devenv/CImage.vcxproj copy to modules/rostests/apitests/atl/devenv/CComObject.vcxproj index 427a8a371c..ac525e52d9 100644 --- a/modules/rostests/apitests/atl/devenv/CImage.vcxproj +++ b/modules/rostests/apitests/atl/devenv/CComObject.vcxproj @@ -19,7 +19,7 @@ </ProjectConfiguration> </ItemGroup> <PropertyGroup Label="Globals"> - <ProjectGuid>{AE520E17-2DAE-40FF-B082-F32A7A935FB2}</ProjectGuid> + <ProjectGuid>{408AEF87-D169-4A2F-A9E3-FF3DD1D59E65}</ProjectGuid> <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> <Keyword>AtlProj</Keyword> </PropertyGroup> @@ -98,7 +98,7 @@ <Link> <SubSystem>Console</SubSystem> <GenerateDebugInformation>true</GenerateDebugInformation> - <RegisterOutput>true</RegisterOutput> + <RegisterOutput>false</RegisterOutput> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> @@ -163,7 +163,7 @@ </Link> </ItemDefinitionGroup> <ItemGroup> - <ClCompile Include="../CImage.cpp"> + <ClCompile Include="../CComObject.cpp"> <RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MultiThreaded</RuntimeLibrary> <RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MultiThreaded</RuntimeLibrary> <RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MultiThreadedDebug</RuntimeLibrary> @@ -174,9 +174,6 @@ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader> </ClCompile> </ItemGroup> - <ItemGroup> - <ResourceCompile Include="../atl_apitest.rc" /> - </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> diff --git a/modules/rostests/apitests/atl/devenv/CImage.vcxproj b/modules/rostests/apitests/atl/devenv/CImage.vcxproj index 427a8a371c..5c77112862 100644 --- a/modules/rostests/apitests/atl/devenv/CImage.vcxproj +++ b/modules/rostests/apitests/atl/devenv/CImage.vcxproj @@ -98,7 +98,7 @@ <Link> <SubSystem>Console</SubSystem> <GenerateDebugInformation>true</GenerateDebugInformation> - <RegisterOutput>true</RegisterOutput> + <RegisterOutput>false</RegisterOutput> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> diff --git a/modules/rostests/apitests/atl/testlist.c b/modules/rostests/apitests/atl/testlist.c index f154b0d06c..0c40c3b140 100644 --- a/modules/rostests/apitests/atl/testlist.c +++ b/modules/rostests/apitests/atl/testlist.c @@ -4,6 +4,7 @@ extern void func_atltypes(void); extern void func_CComBSTR(void); extern void func_CComHeapPtr(void); +extern void func_CComObject(void); extern void func_CComVariant(void); extern void func_CImage(void); extern void func_CRegKey(void); @@ -16,6 +17,7 @@ const struct test winetest_testlist[] = { "atltypes", func_atltypes }, { "CComBSTR", func_CComBSTR }, { "CComHeapPtr", func_CComHeapPtr }, + { "CComObject", func_CComObject }, { "CComVariant", func_CComVariant }, { "CImage", func_CImage }, { "CRegKey", func_CRegKey },
7 years
1
0
0
0
[reactos] 01/02: [ATL] Continue enumeration after a failing COM_INTERFACE_ENTRY_FUNC_BLIND
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a730e3fce14b76daf7e1b…
commit a730e3fce14b76daf7e1ba25698a07d6ea6ed4a5 Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Mon Dec 18 23:15:46 2017 +0100 [ATL] Continue enumeration after a failing COM_INTERFACE_ENTRY_FUNC_BLIND --- sdk/lib/atl/atlbase.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sdk/lib/atl/atlbase.h b/sdk/lib/atl/atlbase.h index 5d6c874bb6..d327aadf4d 100644 --- a/sdk/lib/atl/atlbase.h +++ b/sdk/lib/atl/atlbase.h @@ -1545,10 +1545,11 @@ inline HRESULT __stdcall AtlInternalQueryInterface(void *pThis, const _ATL_INTMA else { hResult = pEntries[i].pFunc(pThis, iid, ppvObject, 0); - if (hResult == S_OK || (FAILED(hResult) && pEntries[i].piid != NULL)) + if (hResult == S_OK) return hResult; + if (FAILED(hResult) && pEntries[i].piid != NULL) + break; } - break; } i++; }
7 years
1
0
0
0
[reactos] 01/01: [WINDOWSCODECS_WINETEST] Add a PCH.
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7ce46d59b48290591f395…
commit 7ce46d59b48290591f39536acbfc7108ea265366 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Thu Dec 21 13:57:22 2017 +0100 [WINDOWSCODECS_WINETEST] Add a PCH. --- .../winetests/windowscodecs/CMakeLists.txt | 11 ++++++++--- modules/rostests/winetests/windowscodecs/bitmap.c | 19 +------------------ .../rostests/winetests/windowscodecs/bmpformat.c | 17 +---------------- .../rostests/winetests/windowscodecs/converter.c | 18 +----------------- .../rostests/winetests/windowscodecs/gifformat.c | 15 +-------------- modules/rostests/winetests/windowscodecs/guid.c | 12 ++++++++++++ .../rostests/winetests/windowscodecs/icoformat.c | 15 +-------------- modules/rostests/winetests/windowscodecs/info.c | 17 +---------------- .../rostests/winetests/windowscodecs/metadata.c | 18 +----------------- modules/rostests/winetests/windowscodecs/palette.c | 15 +-------------- .../rostests/winetests/windowscodecs/pngformat.c | 17 ++--------------- modules/rostests/winetests/windowscodecs/precomp.h | 22 ++++++++++++++++++++++ .../rostests/winetests/windowscodecs/propertybag.c | 17 +---------------- modules/rostests/winetests/windowscodecs/stream.c | 10 +--------- .../rostests/winetests/windowscodecs/tiffformat.c | 15 +-------------- 15 files changed, 55 insertions(+), 183 deletions(-) diff --git a/modules/rostests/winetests/windowscodecs/CMakeLists.txt b/modules/rostests/winetests/windowscodecs/CMakeLists.txt index c9a8518334..293a437853 100644 --- a/modules/rostests/winetests/windowscodecs/CMakeLists.txt +++ b/modules/rostests/winetests/windowscodecs/CMakeLists.txt @@ -13,10 +13,14 @@ list(APPEND SOURCE pngformat.c propertybag.c stream.c - testlist.c - tiffformat.c) + tiffformat.c + precomp.h) + +add_executable(windowscodecs_winetest + ${SOURCE} + guid.c + testlist.c) -add_executable(windowscodecs_winetest ${SOURCE}) set_module_type(windowscodecs_winetest win32cui) add_importlibs(windowscodecs_winetest windowscodecs oleaut32 ole32 propsys user32 gdi32 shlwapi msvcrt kernel32) @@ -24,4 +28,5 @@ if(MSVC) add_importlibs(windowscodecs_winetest ntdll) endif() +add_pch(windowscodecs_winetest precomp.h SOURCE) add_rostests_file(TARGET windowscodecs_winetest) diff --git a/modules/rostests/winetests/windowscodecs/bitmap.c b/modules/rostests/winetests/windowscodecs/bitmap.c index a6655a6877..b35c07fbf1 100644 --- a/modules/rostests/winetests/windowscodecs/bitmap.c +++ b/modules/rostests/winetests/windowscodecs/bitmap.c @@ -17,24 +17,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -//#include <stdarg.h> -#include <stdio.h> -#include <assert.h> -//#include <math.h> - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS -#define CONST_VTABLE - -#include <windef.h> -#include <winbase.h> -#include <wingdi.h> -#include <objbase.h> -#include <wincodec.h> -#include <wine/test.h> +#include "precomp.h" static IWICImagingFactory *factory; diff --git a/modules/rostests/winetests/windowscodecs/bmpformat.c b/modules/rostests/winetests/windowscodecs/bmpformat.c index f7565e0da7..afa2bd92b8 100644 --- a/modules/rostests/winetests/windowscodecs/bmpformat.c +++ b/modules/rostests/winetests/windowscodecs/bmpformat.c @@ -16,22 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdarg.h> -#include <math.h> - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS - -#include <windef.h> -#include <winbase.h> -#include <initguid.h> -#include <ole2.h> -//#include "wincodec.h" -#include <wincodecsdk.h> -#include <wine/test.h> +#include "precomp.h" static const char testbmp_24bpp[] = { /* BITMAPFILEHEADER */ diff --git a/modules/rostests/winetests/windowscodecs/converter.c b/modules/rostests/winetests/windowscodecs/converter.c index 1f44513262..baa7a9d3c4 100644 --- a/modules/rostests/winetests/windowscodecs/converter.c +++ b/modules/rostests/winetests/windowscodecs/converter.c @@ -17,23 +17,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdarg.h> -#include <stdio.h> -#include <math.h> - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS -#define CONST_VTABLE - -#include <windef.h> -#include <winbase.h> -#include <wingdi.h> -#include <ole2.h> -#include <wincodecsdk.h> -#include <wine/test.h> +#include "precomp.h" static IWICImagingFactory *factory; diff --git a/modules/rostests/winetests/windowscodecs/gifformat.c b/modules/rostests/winetests/windowscodecs/gifformat.c index 4b75d06470..3af0a80707 100644 --- a/modules/rostests/winetests/windowscodecs/gifformat.c +++ b/modules/rostests/winetests/windowscodecs/gifformat.c @@ -16,20 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdarg.h> -#include <stdio.h> - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS - -#include <windef.h> -#include <winbase.h> -#include <ole2.h> -#include <wincodec.h> -#include <wine/test.h> +#include "precomp.h" HRESULT WINAPI WICCreateImagingFactory_Proxy(UINT, IWICImagingFactory**); diff --git a/modules/rostests/winetests/windowscodecs/guid.c b/modules/rostests/winetests/windowscodecs/guid.c new file mode 100644 index 0000000000..18f2768265 --- /dev/null +++ b/modules/rostests/winetests/windowscodecs/guid.c @@ -0,0 +1,12 @@ +/* DO NOT USE THE PRECOMPILED HEADER FOR THIS FILE! */ + +#define WIN32_NO_STATUS +#define _INC_WINDOWS + +#include <windef.h> +#include <winbase.h> +#include <initguid.h> +#include <objbase.h> +#include <wincodecsdk.h> + +/* NO CODE HERE, THIS IS JUST REQUIRED FOR THE GUID DEFINITIONS */ diff --git a/modules/rostests/winetests/windowscodecs/icoformat.c b/modules/rostests/winetests/windowscodecs/icoformat.c index 9bbedc03fb..c614898131 100644 --- a/modules/rostests/winetests/windowscodecs/icoformat.c +++ b/modules/rostests/winetests/windowscodecs/icoformat.c @@ -16,20 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdarg.h> -//#include <math.h> - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS - -#include <windef.h> -#include <winbase.h> -#include <objbase.h> -#include <wincodec.h> -#include <wine/test.h> +#include "precomp.h" static unsigned char testico_bad_icondirentry_size[] = { /* ICONDIR */ diff --git a/modules/rostests/winetests/windowscodecs/info.c b/modules/rostests/winetests/windowscodecs/info.c index e1a3a5980b..83b729adaf 100644 --- a/modules/rostests/winetests/windowscodecs/info.c +++ b/modules/rostests/winetests/windowscodecs/info.c @@ -16,22 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdio.h> -//#include <stdarg.h> -//#include <math.h> - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS - -#include <windef.h> -#include <winbase.h> -#include <objbase.h> -//#include "wincodec.h" -#include <wincodecsdk.h> -#include <wine/test.h> +#include "precomp.h" #include <initguid.h> DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); diff --git a/modules/rostests/winetests/windowscodecs/metadata.c b/modules/rostests/winetests/windowscodecs/metadata.c index f47036185e..9de1c4d31e 100644 --- a/modules/rostests/winetests/windowscodecs/metadata.c +++ b/modules/rostests/winetests/windowscodecs/metadata.c @@ -17,26 +17,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdio.h> -//#include <stdarg.h> -//#include <math.h> -#include <assert.h> +#include "precomp.h" -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS - -#include <windef.h> -#include <winbase.h> #include <winnls.h> -#include <winreg.h> -#include <ole2.h> -//#include "wincodec.h" -#include <wincodecsdk.h> #include <propvarutil.h> -#include <wine/test.h> #include <initguid.h> DEFINE_GUID(IID_MdbrUnknown, 0x00240e6f,0x3f23,0x4432,0xb0,0xcc,0x48,0xd5,0xbb,0xff,0x6c,0x36); diff --git a/modules/rostests/winetests/windowscodecs/palette.c b/modules/rostests/winetests/windowscodecs/palette.c index 7302d72582..46d3bc8343 100644 --- a/modules/rostests/winetests/windowscodecs/palette.c +++ b/modules/rostests/winetests/windowscodecs/palette.c @@ -17,20 +17,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdarg.h> -#include <assert.h> - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS - -#include <windef.h> -#include <winbase.h> -#include <objbase.h> -#include <wincodec.h> -#include <wine/test.h> +#include "precomp.h" static IWICImagingFactory *factory; diff --git a/modules/rostests/winetests/windowscodecs/pngformat.c b/modules/rostests/winetests/windowscodecs/pngformat.c index 4fd8489896..95ead41324 100644 --- a/modules/rostests/winetests/windowscodecs/pngformat.c +++ b/modules/rostests/winetests/windowscodecs/pngformat.c @@ -1,5 +1,5 @@ /* - * Copyright 2012,2016 Dmitry Timoshkov + * Copyright 2012, 2016 Dmitry Timoshkov * Copyright 2012 Hans Leidekker for CodeWeavers * * This library is free software; you can redistribute it and/or @@ -17,21 +17,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -//#include <stdarg.h> -#include <stdio.h> +#include "precomp.h" -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS - -#include <windef.h> -#include <winbase.h> -#include <ole2.h> -#include <wincodec.h> -#include <wine/test.h> -#include <winreg.h> #include <shlwapi.h> /* 1x1 pixel PNG image */ diff --git a/modules/rostests/winetests/windowscodecs/precomp.h b/modules/rostests/winetests/windowscodecs/precomp.h new file mode 100644 index 0000000000..59d037ab1f --- /dev/null +++ b/modules/rostests/winetests/windowscodecs/precomp.h @@ -0,0 +1,22 @@ +#ifndef _WINDOWSCODECS_WINETEST_PRECOMP_H_ +#define _WINDOWSCODECS_WINETEST_PRECOMP_H_ + +#include <assert.h> +#include <math.h> +#include <stdio.h> + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H + +#define COBJMACROS +#define CONST_VTABLE + +#include <wine/test.h> + +#include <wingdi.h> +#include <winreg.h> +#include <ole2.h> +#include <wincodecsdk.h> + +#endif /* _WINDOWSCODECS_WINETEST_PRECOMP_H_ */ diff --git a/modules/rostests/winetests/windowscodecs/propertybag.c b/modules/rostests/winetests/windowscodecs/propertybag.c index 1caee57259..b0a3bd3415 100644 --- a/modules/rostests/winetests/windowscodecs/propertybag.c +++ b/modules/rostests/winetests/windowscodecs/propertybag.c @@ -16,22 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdarg.h> -//#include <math.h> - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS -#define CONST_VTABLE - -#include <windef.h> -#include <winbase.h> -#include <ole2.h> -//#include "wincodec.h" -#include <wincodecsdk.h> -#include <wine/test.h> +#include "precomp.h" static const WCHAR wszTestProperty1[] = {'P','r','o','p','e','r','t','y','1',0}; static const WCHAR wszTestProperty2[] = {'P','r','o','p','e','r','t','y','2',0}; diff --git a/modules/rostests/winetests/windowscodecs/stream.c b/modules/rostests/winetests/windowscodecs/stream.c index 8b013c16cb..70807aab64 100644 --- a/modules/rostests/winetests/windowscodecs/stream.c +++ b/modules/rostests/winetests/windowscodecs/stream.c @@ -16,15 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <wine/test.h> - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS -#include <ole2.h> -#include <wincodec.h> +#include "precomp.h" static void test_StreamOnMemory(void) { diff --git a/modules/rostests/winetests/windowscodecs/tiffformat.c b/modules/rostests/winetests/windowscodecs/tiffformat.c index bc78182fc2..81bd6409e0 100644 --- a/modules/rostests/winetests/windowscodecs/tiffformat.c +++ b/modules/rostests/winetests/windowscodecs/tiffformat.c @@ -16,20 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -//#include <stdarg.h> -#include <stdio.h> - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS - -#include <windef.h> -#include <winbase.h> -#include <ole2.h> -#include <wincodec.h> -#include <wine/test.h> +#include "precomp.h" #define IFD_BYTE 1 #define IFD_ASCII 2
7 years
1
0
0
0
[reactos] 01/01: [MSXML3_WINETEST] Add a PCH.
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d3626819e6a301eb2a7b7…
commit d3626819e6a301eb2a7b7fe20bbc0bc518d52667 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Thu Dec 21 13:55:57 2017 +0100 [MSXML3_WINETEST] Add a PCH. --- modules/rostests/winetests/msxml3/CMakeLists.txt | 7 ++++--- modules/rostests/winetests/msxml3/domdoc.c | 23 +-------------------- modules/rostests/winetests/msxml3/httpreq.c | 25 +---------------------- modules/rostests/winetests/msxml3/precomp.h | 26 ++++++++++++++++++++++++ modules/rostests/winetests/msxml3/saxreader.c | 21 +++---------------- modules/rostests/winetests/msxml3/schema.c | 20 +----------------- modules/rostests/winetests/msxml3/xmldoc.c | 16 +-------------- modules/rostests/winetests/msxml3/xmlparser.c | 16 +-------------- modules/rostests/winetests/msxml3/xmlview.c | 23 +++------------------ 9 files changed, 41 insertions(+), 136 deletions(-) diff --git a/modules/rostests/winetests/msxml3/CMakeLists.txt b/modules/rostests/winetests/msxml3/CMakeLists.txt index 7fee075ca8..2d824189bd 100644 --- a/modules/rostests/winetests/msxml3/CMakeLists.txt +++ b/modules/rostests/winetests/msxml3/CMakeLists.txt @@ -8,12 +8,12 @@ list(APPEND SOURCE httpreq.c saxreader.c schema.c - testlist.c xmldoc.c xmlparser.c - xmlview.c) + xmlview.c + precomp.h) -add_executable(msxml3_winetest ${SOURCE} rsrc.rc) +add_executable(msxml3_winetest ${SOURCE} testlist.c rsrc.rc) add_idl_headers(xmlparser_idlheader_test xmlparser.idl) add_dependencies(msxml3_winetest xmlparser_idlheader_test) set_module_type(msxml3_winetest win32cui) @@ -23,4 +23,5 @@ if(MSVC) add_importlibs(msxml3_winetest ntdll) endif() +add_pch(msxml3_winetest precomp.h SOURCE) add_rostests_file(TARGET msxml3_winetest) diff --git a/modules/rostests/winetests/msxml3/domdoc.c b/modules/rostests/winetests/msxml3/domdoc.c index 3e88e3315c..cf0869f263 100644 --- a/modules/rostests/winetests/msxml3/domdoc.c +++ b/modules/rostests/winetests/msxml3/domdoc.c @@ -21,29 +21,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "precomp.h" -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS -#define CONST_VTABLE - -#include <stdio.h> -#include <assert.h> - -//#include "windows.h" - -#include <wine/test.h> - -#include <winnls.h> -#include <ole2.h> -#include <msxml.h> -#include <msxml2.h> -#include <msxml2did.h> -#include <dispex.h> -#include <objsafe.h> -#include <initguid.h> #include <asptlb.h> /* undef the #define in msxml2 so that we can access all versions */ diff --git a/modules/rostests/winetests/msxml3/httpreq.c b/modules/rostests/winetests/msxml3/httpreq.c index a17e627bcf..8d97a48cd7 100644 --- a/modules/rostests/winetests/msxml3/httpreq.c +++ b/modules/rostests/winetests/msxml3/httpreq.c @@ -18,30 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS -#define CONST_VTABLE - -#include <stdio.h> -#include <assert.h> - -//#include "windows.h" - -#include <wine/test.h> - -#include <winnls.h> -#include <wingdi.h> -#include <ole2.h> -//#include "msxml2.h" -//#include "msxml2did.h" -//#include "dispex.h" -#include <initguid.h> -#include <objsafe.h> -#include <mshtml.h> - +#include "precomp.h" #define EXPECT_HR(hr,hr_exp) \ ok(hr == hr_exp, "got 0x%08x, expected 0x%08x\n", hr, hr_exp) diff --git a/modules/rostests/winetests/msxml3/precomp.h b/modules/rostests/winetests/msxml3/precomp.h new file mode 100644 index 0000000000..888b1e625e --- /dev/null +++ b/modules/rostests/winetests/msxml3/precomp.h @@ -0,0 +1,26 @@ +#ifndef _MSXML3_WINETEST_PRECOMP_H_ +#define _MSXML3_WINETEST_PRECOMP_H_ + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H + +#define COBJMACROS +#define CONST_VTABLE + +#include <stdio.h> +#include <assert.h> + +#include <wine/test.h> + +#include <winnls.h> +#include <wingdi.h> +#include <initguid.h> +#include <ole2.h> +#include <msxml2.h> +#include <msxml2did.h> +#include <objsafe.h> +#include <mshtml.h> +#include <xmlparser.h> + +#endif /* !_MSXML3_WINETEST_PRECOMP_H_ */ diff --git a/modules/rostests/winetests/msxml3/saxreader.c b/modules/rostests/winetests/msxml3/saxreader.c index 28e278d706..ed0eedeae1 100644 --- a/modules/rostests/winetests/msxml3/saxreader.c +++ b/modules/rostests/winetests/msxml3/saxreader.c @@ -20,24 +20,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS -#define CONST_VTABLE - -#include <stdio.h> -#include <assert.h> - -#include <wine/test.h> -//#include "windows.h" -#include <winnls.h> -#include <ole2.h> -#include <msxml2.h> -#include <msxml2did.h> -//#include "ocidl.h" -#include <dispex.h> +#include "precomp.h" + +DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); static const WCHAR emptyW[] = {0}; diff --git a/modules/rostests/winetests/msxml3/schema.c b/modules/rostests/winetests/msxml3/schema.c index 9c785fd05d..e082b00f4c 100644 --- a/modules/rostests/winetests/msxml3/schema.c +++ b/modules/rostests/winetests/msxml3/schema.c @@ -19,25 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -//#include <stdio.h> -#include <assert.h> -#define COBJMACROS - -#include <wine/test.h> - -#include <initguid.h> -//#include "windows.h" -#include <winnls.h> -#include <ole2.h> -#include <msxml2.h> -#undef CLSID_DOMDocument -#include <msxml2did.h> -#include <dispex.h> - +#include "precomp.h" DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); diff --git a/modules/rostests/winetests/msxml3/xmldoc.c b/modules/rostests/winetests/msxml3/xmldoc.c index f0fc66da52..ee031bc36e 100644 --- a/modules/rostests/winetests/msxml3/xmldoc.c +++ b/modules/rostests/winetests/msxml3/xmldoc.c @@ -18,21 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS - -#include <wine/test.h> - -//#include <stdio.h> -//#include "windows.h" -#include <winnls.h> -#include <ole2.h> -#include <msxml2.h> -#include <msxml2did.h> -#include <ocidl.h> +#include "precomp.h" #define EXPECT_HR(hr,hr_exp) \ ok(hr == hr_exp, "got 0x%08x, expected 0x%08x\n", hr, hr_exp) diff --git a/modules/rostests/winetests/msxml3/xmlparser.c b/modules/rostests/winetests/msxml3/xmlparser.c index 8e93b420df..0bb2ecb0a9 100644 --- a/modules/rostests/winetests/msxml3/xmlparser.c +++ b/modules/rostests/winetests/msxml3/xmlparser.c @@ -18,21 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS -#define CONST_VTABLE - -//#include <stdio.h> -//#include <assert.h> - -#include <wine/test.h> - -//#include "windows.h" -#include <ole2.h> -#include <xmlparser.h> +#include "precomp.h" static HRESULT WINAPI nodefact_QueryInterface(IXMLNodeFactory *iface, REFIID riid, void **ppvObject) diff --git a/modules/rostests/winetests/msxml3/xmlview.c b/modules/rostests/winetests/msxml3/xmlview.c index 12959a5edc..d3a0903e04 100644 --- a/modules/rostests/winetests/msxml3/xmlview.c +++ b/modules/rostests/winetests/msxml3/xmlview.c @@ -16,29 +16,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H +#include "precomp.h" -#define COBJMACROS -#define CONST_VTABLE - -//#include <stdio.h> -//#include <assert.h> - -#include <wine/test.h> - -//#include "windows.h" -#include <winnls.h> -#include <wingdi.h> -#include <ole2.h> -#include <mshtml.h> -#include <mshtmdid.h> -#include <initguid.h> #include <perhist.h> #include <docobj.h> -//#include "urlmon.h" -#include <xmlparser.h> + +#define DISPID_HTMLDOCUMENTEVENTS2_ONREADYSTATECHANGE DISPID_READYSTATECHANGE HRESULT (WINAPI *pCreateURLMoniker)(IMoniker*, LPCWSTR, IMoniker**);
7 years
1
0
0
0
[reactos] 01/01: [DSOUND_WINETEST] Add a PCH.
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ffd9617271deb9cf782d7…
commit ffd9617271deb9cf782d78192a2d963dea585119 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Thu Dec 21 13:53:36 2017 +0100 [DSOUND_WINETEST] Add a PCH. --- modules/rostests/winetests/dsound/CMakeLists.txt | 5 +++-- modules/rostests/winetests/dsound/capture.c | 16 +-------------- modules/rostests/winetests/dsound/ds3d.c | 15 -------------- modules/rostests/winetests/dsound/ds3d8.c | 14 ------------- modules/rostests/winetests/dsound/dsound.c | 15 -------------- modules/rostests/winetests/dsound/dsound8.c | 25 +++--------------------- modules/rostests/winetests/dsound/dsound_test.h | 18 +++++++++++++++++ modules/rostests/winetests/dsound/duplex.c | 14 ------------- modules/rostests/winetests/dsound/propset.c | 16 ++------------- 9 files changed, 27 insertions(+), 111 deletions(-) diff --git a/modules/rostests/winetests/dsound/CMakeLists.txt b/modules/rostests/winetests/dsound/CMakeLists.txt index 7c51bef761..2edf6f2376 100644 --- a/modules/rostests/winetests/dsound/CMakeLists.txt +++ b/modules/rostests/winetests/dsound/CMakeLists.txt @@ -7,10 +7,11 @@ list(APPEND SOURCE dsound.c duplex.c propset.c - testlist.c) + dsound_test.h) -add_executable(dsound_winetest ${SOURCE}) +add_executable(dsound_winetest ${SOURCE} testlist.c) target_link_libraries(dsound_winetest uuid dxguid) set_module_type(dsound_winetest win32cui) add_importlibs(dsound_winetest ole32 user32 msvcrt kernel32) +add_pch(dsound_winetest dsound_test.h SOURCE) add_rostests_file(TARGET dsound_winetest) diff --git a/modules/rostests/winetests/dsound/capture.c b/modules/rostests/winetests/dsound/capture.c index 752da7ab67..141778a415 100644 --- a/modules/rostests/winetests/dsound/capture.c +++ b/modules/rostests/winetests/dsound/capture.c @@ -19,23 +19,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H -#define COBJMACROS - -#include <wine/test.h> +#include "dsound_test.h" #include <stdio.h> -//#include "initguid.h" -//#include "windows.h" -#include <wingdi.h> -#include <mmsystem.h> -#include <dsound.h> -#include <mmreg.h> -#include <dsconf.h> - -#include "dsound_test.h" #define NOTIFICATIONS 5 diff --git a/modules/rostests/winetests/dsound/ds3d.c b/modules/rostests/winetests/dsound/ds3d.c index f9c4f8dab5..f315de5a89 100644 --- a/modules/rostests/winetests/dsound/ds3d.c +++ b/modules/rostests/winetests/dsound/ds3d.c @@ -23,21 +23,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#include <wine/test.h> - -//#include <windows.h> - -#include <math.h> -#include <wingdi.h> -#include <mmsystem.h> -#include <dsound.h> -#include <mmreg.h> -#include "ks.h" -#include "ksmedia.h" #include "dsound_test.h" #define PI 3.14159265358979323846 diff --git a/modules/rostests/winetests/dsound/ds3d8.c b/modules/rostests/winetests/dsound/ds3d8.c index f18b362e07..521fffc38d 100644 --- a/modules/rostests/winetests/dsound/ds3d8.c +++ b/modules/rostests/winetests/dsound/ds3d8.c @@ -23,20 +23,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -//#include <windows.h> - -#include <math.h> - -#include <wine/test.h> -#include <wingdi.h> -#include <mmreg.h> -#include <dsound.h> -#include <ks.h> -#include <ksmedia.h> #include "dsound_test.h" static HRESULT (WINAPI *pDirectSoundEnumerateA)(LPDSENUMCALLBACKA,LPVOID)=NULL; diff --git a/modules/rostests/winetests/dsound/dsound.c b/modules/rostests/winetests/dsound/dsound.c index 12f865a6cf..8a097012f1 100644 --- a/modules/rostests/winetests/dsound/dsound.c +++ b/modules/rostests/winetests/dsound/dsound.c @@ -26,21 +26,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -//#include <windows.h> - -#include <wine/test.h> -#include <wingdi.h> -#include <mmreg.h> -#include <dsound.h> -#include <dsconf.h> -//#include "initguid.h" -#include <ks.h> -#include <ksmedia.h> - #include "dsound_test.h" DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); diff --git a/modules/rostests/winetests/dsound/dsound8.c b/modules/rostests/winetests/dsound/dsound8.c index fd88441aac..8f473bd0f1 100644 --- a/modules/rostests/winetests/dsound/dsound8.c +++ b/modules/rostests/winetests/dsound/dsound8.c @@ -25,29 +25,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS -#define NONAMELESSUNION -//#include <windows.h> -//#include <stdio.h> - -#include <wine/test.h> -#include <wingdi.h> -#include <mmreg.h> -#include <dsound.h> -#include <dsconf.h> -#include <ks.h> -#include <ksmedia.h> +#include "dsound_test.h" + #include <initguid.h> #include <mmdeviceapi.h> -//#include "audioclient.h" -//#include "propkey.h" -//#include "devpkey.h" - -#include "dsound_test.h" static HRESULT (WINAPI *pDirectSoundEnumerateA)(LPDSENUMCALLBACKA,LPVOID)=NULL; static HRESULT (WINAPI *pDirectSoundCreate8)(LPCGUID,LPDIRECTSOUND8*,LPUNKNOWN)=NULL; @@ -1112,7 +1093,7 @@ static void test_first_device(void) hr = IPropertyStore_GetValue(ps, &PKEY_AudioEndpoint_GUID, &pv); ok(hr == S_OK, "GetValue failed: %08x\n", hr); - CLSIDFromString(pv.u.pwszVal, &default_info.guid); + CLSIDFromString(pv.pwszVal, &default_info.guid); PropVariantClear(&pv); IPropertyStore_Release(ps); diff --git a/modules/rostests/winetests/dsound/dsound_test.h b/modules/rostests/winetests/dsound/dsound_test.h index 97aca5bd51..d7cca491ad 100644 --- a/modules/rostests/winetests/dsound/dsound_test.h +++ b/modules/rostests/winetests/dsound/dsound_test.h @@ -18,9 +18,25 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#ifndef _DSOUND_TEST_H_ +#define _DSOUND_TEST_H_ + +#include <math.h> + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H +#define COBJMACROS + +#include <wine/test.h> + #include <wingdi.h> #include <mmreg.h> #include <mmsystem.h> +#include <dsound.h> +#include <dsconf.h> +#include <ks.h> +#include <ksmedia.h> static const unsigned int formats[][4]={ { 8000, 8, 1, 0 }, @@ -93,3 +109,5 @@ extern void test_buffer8(LPDIRECTSOUND8,LPDIRECTSOUNDBUFFER*, extern const char * getDSBCAPS(DWORD xmask); extern int align(int length, int align); extern const char * format_string(const WAVEFORMATEX* wfx); + +#endif /* !_DSOUND_TEST_H_ */ diff --git a/modules/rostests/winetests/dsound/duplex.c b/modules/rostests/winetests/dsound/duplex.c index 8f16bfc5e6..0690d442cb 100644 --- a/modules/rostests/winetests/dsound/duplex.c +++ b/modules/rostests/winetests/dsound/duplex.c @@ -18,20 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS -//#include <windows.h> -//#include <stdio.h> - -#include <wine/test.h> -#include <wingdi.h> -#include <mmreg.h> -#include <dsound.h> -#include <dsconf.h> - #include "dsound_test.h" static HRESULT (WINAPI *pDirectSoundFullDuplexCreate)(LPCGUID, LPCGUID, diff --git a/modules/rostests/winetests/dsound/propset.c b/modules/rostests/winetests/dsound/propset.c index df0dfd29a3..c8e49332cb 100644 --- a/modules/rostests/winetests/dsound/propset.c +++ b/modules/rostests/winetests/dsound/propset.c @@ -19,28 +19,16 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS -//#include <windows.h> +#include "dsound_test.h" -#include <wine/test.h> -#include <wingdi.h> #include <winnls.h> -#include <mmreg.h> -#include <dsound.h> -#include <dsconf.h> - -#include "dsound_test.h" #ifndef DSBCAPS_CTRLDEFAULT #define DSBCAPS_CTRLDEFAULT \ DSBCAPS_CTRLFREQUENCY|DSBCAPS_CTRLPAN|DSBCAPS_CTRLVOLUME #endif -#include "initguid.h" +#include <initguid.h> DEFINE_GUID(DSPROPSETID_VoiceManager, 0x62A69BAE,0xDF9D,0x11D1,0x99,0xA6,0x00,0xC0,0x4F,0xC9,0x9D,0x46);
7 years
1
0
0
0
[reactos] 01/01: [DINPUT_WINETEST] Add a PCH.
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0b21a561cda2909364d7d…
commit 0b21a561cda2909364d7d066aa5e83ca5a754001 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Thu Dec 21 13:45:22 2017 +0100 [DINPUT_WINETEST] Add a PCH. --- modules/rostests/winetests/dinput/CMakeLists.txt | 6 ++++-- modules/rostests/winetests/dinput/device.c | 13 +------------ modules/rostests/winetests/dinput/dinput.c | 13 +------------ modules/rostests/winetests/dinput/joystick.c | 16 +--------------- modules/rostests/winetests/dinput/keyboard.c | 18 +----------------- modules/rostests/winetests/dinput/mouse.c | 17 +---------------- modules/rostests/winetests/dinput/precomp.h | 17 +++++++++++++++++ 7 files changed, 26 insertions(+), 74 deletions(-) diff --git a/modules/rostests/winetests/dinput/CMakeLists.txt b/modules/rostests/winetests/dinput/CMakeLists.txt index 72cc31fb0d..58bec04925 100644 --- a/modules/rostests/winetests/dinput/CMakeLists.txt +++ b/modules/rostests/winetests/dinput/CMakeLists.txt @@ -1,15 +1,17 @@ add_definitions(-DUSE_WINE_TODOS) -add_executable(dinput_winetest +list(APPEND SOURCE device.c dinput.c joystick.c keyboard.c mouse.c - testlist.c) + precomp.h) +add_executable(dinput_winetest ${SOURCE} testlist.c) target_link_libraries(dinput_winetest dinput_data_formats) set_module_type(dinput_winetest win32cui) add_importlibs(dinput_winetest dinput ole32 user32 msvcrt kernel32) +add_pch(dinput_winetest precomp.h SOURCE) add_rostests_file(TARGET dinput_winetest) diff --git a/modules/rostests/winetests/dinput/device.c b/modules/rostests/winetests/dinput/device.c index 20d211d4e6..605b091480 100644 --- a/modules/rostests/winetests/dinput/device.c +++ b/modules/rostests/winetests/dinput/device.c @@ -16,18 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define DIRECTINPUT_VERSION 0x0700 - -#define COBJMACROS -//#include <windows.h> - -#include <wine/test.h> -//#include "windef.h" -#include <dinput.h> +#include "precomp.h" static const DIOBJECTDATAFORMAT obj_data_format[] = { { &GUID_YAxis, 16, DIDFT_OPTIONAL|DIDFT_AXIS |DIDFT_MAKEINSTANCE(1), 0}, diff --git a/modules/rostests/winetests/dinput/dinput.c b/modules/rostests/winetests/dinput/dinput.c index 54de5d0b73..b4f36402d2 100644 --- a/modules/rostests/winetests/dinput/dinput.c +++ b/modules/rostests/winetests/dinput/dinput.c @@ -16,19 +16,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H +#include "precomp.h" -#define DIRECTINPUT_VERSION 0x0700 - -#define COBJMACROS - -#include <wine/test.h> - -#include <initguid.h> -//#include <windows.h> -#include <dinput.h> #include <dinputd.h> HINSTANCE hInstance; diff --git a/modules/rostests/winetests/dinput/joystick.c b/modules/rostests/winetests/dinput/joystick.c index 28b70bccd7..6649023056 100644 --- a/modules/rostests/winetests/dinput/joystick.c +++ b/modules/rostests/winetests/dinput/joystick.c @@ -16,24 +16,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H +#include "precomp.h" -#define DIRECTINPUT_VERSION 0x0700 - -#define COBJMACROS -//#include <windows.h> - -//#include <math.h> #include <stdio.h> -//#include <stdlib.h> - -#include <wine/test.h> -//#include "windef.h" -//#include "wingdi.h" #include <winnls.h> -#include <dinput.h> #define numObjects(x) (sizeof(x) / sizeof(x[0])) diff --git a/modules/rostests/winetests/dinput/keyboard.c b/modules/rostests/winetests/dinput/keyboard.c index 18e1f0702d..6df1028a32 100644 --- a/modules/rostests/winetests/dinput/keyboard.c +++ b/modules/rostests/winetests/dinput/keyboard.c @@ -16,23 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define DIRECTINPUT_VERSION 0x0700 - -#define COBJMACROS -//#include <windows.h> - -//#include <math.h> -//#include <stdio.h> -//#include <stdlib.h> - -#include <wine/test.h> -//#include "windef.h" -//#include "wingdi.h" -#include <dinput.h> +#include "precomp.h" static void acquire_tests(IDirectInputA *pDI, HWND hwnd) { diff --git a/modules/rostests/winetests/dinput/mouse.c b/modules/rostests/winetests/dinput/mouse.c index 8463c169cb..5c7209ccab 100644 --- a/modules/rostests/winetests/dinput/mouse.c +++ b/modules/rostests/winetests/dinput/mouse.c @@ -17,22 +17,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define DIRECTINPUT_VERSION 0x0700 - -#define COBJMACROS -//#include <windows.h> - -//#include <math.h> -//#include <stdlib.h> - -#include <wine/test.h> -//#include "windef.h" -//#include "wingdi.h" -#include <dinput.h> +#include "precomp.h" static const HRESULT SetCoop_null_window[16] = { E_INVALIDARG, E_INVALIDARG, E_INVALIDARG, E_INVALIDARG, diff --git a/modules/rostests/winetests/dinput/precomp.h b/modules/rostests/winetests/dinput/precomp.h new file mode 100644 index 0000000000..131fdabfe8 --- /dev/null +++ b/modules/rostests/winetests/dinput/precomp.h @@ -0,0 +1,17 @@ +#ifndef _DINPUT_WINETEST_PRECOMP_H_ +#define _DINPUT_WINETEST_PRECOMP_H_ + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H + +#define DIRECTINPUT_VERSION 0x0700 + +#define COBJMACROS + +#include <wine/test.h> + +#include <initguid.h> +#include <dinput.h> + +#endif /* !_DINPUT_WINETEST_PRECOMP_H_ */
7 years
1
0
0
0
← Newer
1
...
8
9
10
11
12
13
14
...
36
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Results per page:
10
25
50
100
200