Author: akhaldi
Date: Sat Apr 26 18:52:15 2014
New Revision: 63010
URL:
http://svn.reactos.org/svn/reactos?rev=63010&view=rev
Log:
[ATL100_WINETEST]
* Sync with Wine 1.7.17.
CORE-8080
Modified:
trunk/rostests/winetests/atl100/CMakeLists.txt
trunk/rostests/winetests/atl100/atl.c
Modified: trunk/rostests/winetests/atl100/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/atl100/CMakeLis…
==============================================================================
--- trunk/rostests/winetests/atl100/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/rostests/winetests/atl100/CMakeLists.txt [iso-8859-1] Sat Apr 26 18:52:15 2014
@@ -2,7 +2,7 @@
add_definitions(-D_ATL_VER=_ATL_VER_100)
list(APPEND SOURCE atl.c testlist.c)
add_executable(atl100_winetest ${SOURCE})
-target_link_libraries(atl100_winetest wine uuid)
+target_link_libraries(atl100_winetest uuid)
set_module_type(atl100_winetest win32cui)
-add_importlibs(atl100_winetest atl100 oleaut32 ole32 advapi32 user32 msvcrt kernel32
ntdll)
+add_importlibs(atl100_winetest atl100 oleaut32 ole32 advapi32 user32 msvcrt kernel32)
add_cd_file(TARGET atl100_winetest DESTINATION reactos/bin FOR all)
Modified: trunk/rostests/winetests/atl100/atl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/atl100/atl.c?re…
==============================================================================
--- trunk/rostests/winetests/atl100/atl.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/atl100/atl.c [iso-8859-1] Sat Apr 26 18:52:15 2014
@@ -51,19 +51,30 @@
{0x178fc163,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x46}};
#define CATID_CATTEST2_STR "178fc163-0000-0000-0000-000000000246"
-static const char *debugstr_guid(REFIID riid)
-{
- static char buf[50];
-
- if(!riid)
- return "(null)";
-
- sprintf(buf, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
- riid->Data1, riid->Data2, riid->Data3, riid->Data4[0],
- riid->Data4[1], riid->Data4[2], riid->Data4[3], riid->Data4[4],
- riid->Data4[5], riid->Data4[6], riid->Data4[7]);
-
- return buf;
+static BOOL is_process_limited(void)
+{
+ static BOOL (WINAPI *pOpenProcessToken)(HANDLE, DWORD, PHANDLE) = NULL;
+ HANDLE token;
+
+ if (!pOpenProcessToken)
+ {
+ HMODULE hadvapi32 = GetModuleHandleA("advapi32.dll");
+ pOpenProcessToken = (void*)GetProcAddress(hadvapi32,
"OpenProcessToken");
+ if (!pOpenProcessToken)
+ return FALSE;
+ }
+
+ if (pOpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token))
+ {
+ BOOL ret;
+ TOKEN_ELEVATION_TYPE type = TokenElevationTypeDefault;
+ DWORD size;
+
+ ret = GetTokenInformation(token, TokenElevationType, &type, sizeof(type),
&size);
+ CloseHandle(token);
+ return (ret && type == TokenElevationTypeLimited);
+ }
+ return FALSE;
}
static void test_winmodule(void)
@@ -171,6 +182,12 @@
{_ATL_CATMAP_ENTRY_END}
};
+ if (is_process_limited())
+ {
+ skip("process is limited\n");
+ return;
+ }
+
hres = AtlRegisterClassCategoriesHelper(&CLSID_Test, catmap, TRUE);
ok(hres == S_OK, "AtlRegisterClassCategoriesHelper failed: %08x\n", hres);
@@ -477,7 +494,7 @@
return S_OK;
}
- ok(0, "unexpected riid: %s\n", debugstr_guid(riid));
+ ok(0, "unexpected riid: %s\n", wine_dbgstr_guid(riid));
return E_NOINTERFACE;
}
@@ -556,8 +573,8 @@
maj_ver = min_ver = 0xdead;
hres = AtlGetObjectSourceInterface((IUnknown*)&Dispatch, &libid, &iid,
&maj_ver, &min_ver);
ok(hres == S_OK, "AtlGetObjectSourceInterface failed: %08x\n", hres);
- ok(IsEqualGUID(&libid, &LIBID_MSHTML), "libid = %s\n",
debugstr_guid(&libid));
- ok(IsEqualGUID(&iid, &DIID_DispHTMLBody), "iid = %s\n",
debugstr_guid(&iid));
+ ok(IsEqualGUID(&libid, &LIBID_MSHTML), "libid = %s\n",
wine_dbgstr_guid(&libid));
+ ok(IsEqualGUID(&iid, &DIID_DispHTMLBody), "iid = %s\n",
wine_dbgstr_guid(&iid));
ok(maj_ver == 4 && min_ver == 0, "ver = %d.%d\n", maj_ver,
min_ver);
support_classinfo2 = FALSE;
@@ -566,8 +583,8 @@
maj_ver = min_ver = 0xdead;
hres = AtlGetObjectSourceInterface((IUnknown*)&Dispatch, &libid, &iid,
&maj_ver, &min_ver);
ok(hres == S_OK, "AtlGetObjectSourceInterface failed: %08x\n", hres);
- ok(IsEqualGUID(&libid, &LIBID_MSHTML), "libid = %s\n",
debugstr_guid(&libid));
- ok(IsEqualGUID(&iid, &DIID_HTMLDocumentEvents), "iid = %s\n",
debugstr_guid(&iid));
+ ok(IsEqualGUID(&libid, &LIBID_MSHTML), "libid = %s\n",
wine_dbgstr_guid(&libid));
+ ok(IsEqualGUID(&iid, &DIID_HTMLDocumentEvents), "iid = %s\n",
wine_dbgstr_guid(&iid));
ok(maj_ver == 4 && min_ver == 0, "ver = %d.%d\n", maj_ver,
min_ver);
persist_clsid = CLSID_HTMLStyle;
@@ -575,8 +592,8 @@
maj_ver = min_ver = 0xdead;
hres = AtlGetObjectSourceInterface((IUnknown*)&Dispatch, &libid, &iid,
&maj_ver, &min_ver);
ok(hres == S_OK, "AtlGetObjectSourceInterface failed: %08x\n", hres);
- ok(IsEqualGUID(&libid, &LIBID_MSHTML), "libid = %s\n",
debugstr_guid(&libid));
- ok(IsEqualGUID(&iid, &IID_NULL), "iid = %s\n",
debugstr_guid(&iid));
+ ok(IsEqualGUID(&libid, &LIBID_MSHTML), "libid = %s\n",
wine_dbgstr_guid(&libid));
+ ok(IsEqualGUID(&iid, &IID_NULL), "iid = %s\n",
wine_dbgstr_guid(&iid));
ok(maj_ver == 4 && min_ver == 0, "ver = %d.%d\n", maj_ver,
min_ver);
}