ReactOS 0.4.17-dev-804-g023d8af
atl.c File Reference
#include <stdarg.h>
#include <stdio.h>
#include <windef.h>
#include <winbase.h>
#include <winuser.h>
#include <exdisp.h>
#include <atlbase.h>
#include <mshtml.h>
#include <wine/test.h>
Include dependency graph for atl.c:

Go to the source code of this file.

Macros

#define COBJMACROS
 
#define CONST_VTABLE
 
#define CLSID_TEST_STR   "178fc163-0000-0000-0000-000000000046"
 
#define CATID_CATTEST1_STR   "178fc163-0000-0000-0000-000000000146"
 
#define CATID_CATTEST2_STR   "178fc163-0000-0000-0000-000000000246"
 
#define test_key_exists(a, b)   _test_key_exists(__LINE__,a,b)
 
#define test_key_not_exists(a, b)   _test_key_not_exists(__LINE__,a,b)
 

Functions

static BOOL is_token_admin (HANDLE token)
 
static BOOL is_process_limited (void)
 
static void test_winmodule (void)
 
static void _test_key_exists (unsigned line, HKEY root, const char *key_name)
 
static void _test_key_not_exists (unsigned line, HKEY root, const char *key_name)
 
static void test_regcat (void)
 
static void test_typelib (void)
 
static HRESULT WINAPI ConnectionPoint_QueryInterface (IConnectionPoint *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI ConnectionPoint_AddRef (IConnectionPoint *iface)
 
static ULONG WINAPI ConnectionPoint_Release (IConnectionPoint *iface)
 
static HRESULT WINAPI ConnectionPoint_GetConnectionInterface (IConnectionPoint *iface, IID *pIID)
 
static HRESULT WINAPI ConnectionPoint_GetConnectionPointContainer (IConnectionPoint *iface, IConnectionPointContainer **ppCPC)
 
static HRESULT WINAPI ConnectionPoint_Advise (IConnectionPoint *iface, IUnknown *pUnkSink, DWORD *pdwCookie)
 
static HRESULT WINAPI ConnectionPoint_Unadvise (IConnectionPoint *iface, DWORD dwCookie)
 
static HRESULT WINAPI ConnectionPoint_EnumConnections (IConnectionPoint *iface, IEnumConnections **ppEnum)
 
static HRESULT WINAPI ConnectionPointContainer_QueryInterface (IConnectionPointContainer *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI ConnectionPointContainer_AddRef (IConnectionPointContainer *iface)
 
static ULONG WINAPI ConnectionPointContainer_Release (IConnectionPointContainer *iface)
 
static HRESULT WINAPI ConnectionPointContainer_EnumConnectionPoints (IConnectionPointContainer *iface, IEnumConnectionPoints **ppEnum)
 
static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint (IConnectionPointContainer *iface, REFIID riid, IConnectionPoint **ppCP)
 
static void test_cp (void)
 
static HRESULT WINAPI Persist_QueryInterface (IPersist *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI Persist_AddRef (IPersist *iface)
 
static ULONG WINAPI Persist_Release (IPersist *iface)
 
static HRESULT WINAPI Persist_GetClassID (IPersist *iface, CLSID *pClassID)
 
static HRESULT WINAPI ProvideClassInfo2_QueryInterface (IProvideClassInfo2 *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI ProvideClassInfo2_AddRef (IProvideClassInfo2 *iface)
 
static ULONG WINAPI ProvideClassInfo2_Release (IProvideClassInfo2 *iface)
 
static HRESULT WINAPI ProvideClassInfo2_GetClassInfo (IProvideClassInfo2 *iface, ITypeInfo **ppTI)
 
static HRESULT WINAPI ProvideClassInfo2_GetGUID (IProvideClassInfo2 *iface, DWORD dwGuidKind, GUID *pGUID)
 
static HRESULT WINAPI Dispatch_QueryInterface (IDispatch *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI Dispatch_AddRef (IDispatch *iface)
 
static ULONG WINAPI Dispatch_Release (IDispatch *iface)
 
static HRESULT WINAPI Dispatch_GetTypeInfoCount (IDispatch *iface, UINT *pctinfo)
 
static HRESULT WINAPI Dispatch_GetTypeInfo (IDispatch *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI Dispatch_GetIDsOfNames (IDispatch *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI Dispatch_Invoke (IDispatch *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static void test_source_iface (void)
 
static void test_ax_win (void)
 
static ATOM register_class (void)
 
static HWND create_container_window (void)
 
static void test_AtlAxAttachControl (void)
 
static void test_AtlAxCreateControl (void)
 
static void test_AtlComModuleGetClassObject (void)
 
static void test_AtlComModuleRegisterClassObjects (void)
 
static void test_AtlComModuleRevokeClassObjects (void)
 
 START_TEST (atl)
 

Variables

static const GUID CLSID_Test
 
static const GUID CATID_CatTest1
 
static const GUID CATID_CatTest2
 
static const WCHAR progid1W [] = L"Shell.Explorer.2"
 
static const WCHAR clsid1W [] = L"{8856f961-340a-11d0-a96b-00c04fd705a2}"
 
static const WCHAR url1W [] = L"http://test.winehq.org/tests/winehq_snapshot/"
 
static const WCHAR mshtml1W [] = L"mshtml:<html><body>test</body></html>"
 
static const WCHAR mshtml2W [] = L"MSHTML:<html><body>test</body></html>"
 
static const WCHAR mshtml3W [] = L"<html><body>test</body></html>"
 
static const char html_str [] = "<html><body>test</body><html>"
 
static int advise_cnt
 
static const IConnectionPointVtbl ConnectionPointVtbl
 
static IConnectionPoint ConnectionPoint = { &ConnectionPointVtbl }
 
static const IConnectionPointContainerVtbl ConnectionPointContainerVtbl
 
static IConnectionPointContainer ConnectionPointContainer = { &ConnectionPointContainerVtbl }
 
static CLSID persist_clsid
 
static const IPersistVtbl PersistVtbl
 
static IPersist Persist = { &PersistVtbl }
 
static const IProvideClassInfo2Vtbl ProvideClassInfo2Vtbl
 
static IProvideClassInfo2 ProvideClassInfo2 = { &ProvideClassInfo2Vtbl }
 
static BOOL support_classinfo2
 
static const IDispatchVtbl DispatchVtbl
 
static IDispatch Dispatch = { &DispatchVtbl }
 

Macro Definition Documentation

◆ CATID_CATTEST1_STR

#define CATID_CATTEST1_STR   "178fc163-0000-0000-0000-000000000146"

Definition at line 41 of file atl.c.

◆ CATID_CATTEST2_STR

#define CATID_CATTEST2_STR   "178fc163-0000-0000-0000-000000000246"

Definition at line 45 of file atl.c.

◆ CLSID_TEST_STR

#define CLSID_TEST_STR   "178fc163-0000-0000-0000-000000000046"

Definition at line 37 of file atl.c.

◆ COBJMACROS

#define COBJMACROS

Definition at line 22 of file atl.c.

◆ CONST_VTABLE

#define CONST_VTABLE

Definition at line 23 of file atl.c.

◆ test_key_exists

#define test_key_exists (   a,
  b 
)    _test_key_exists(__LINE__,a,b)

Definition at line 207 of file atl.c.

◆ test_key_not_exists

#define test_key_not_exists (   a,
  b 
)    _test_key_not_exists(__LINE__,a,b)

Definition at line 219 of file atl.c.

Function Documentation

◆ _test_key_exists()

static void _test_key_exists ( unsigned  line,
HKEY  root,
const char key_name 
)
static

Definition at line 208 of file atl.c.

209{
210 HKEY key;
211 DWORD res;
212
214 ok_(__FILE__,line)(res == ERROR_SUCCESS, "Could not open key %s\n", key_name);
215 if(res == ERROR_SUCCESS)
217}
#define ok_(x1, x2)
Definition: atltest.h:61
#define RegCloseKey(hKey)
Definition: registry.h:49
#define ERROR_SUCCESS
Definition: deptool.c:10
LONG WINAPI RegOpenKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:3234
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint res
Definition: glext.h:9613
Definition: copy.c:22
Definition: parser.c:49

◆ _test_key_not_exists()

static void _test_key_not_exists ( unsigned  line,
HKEY  root,
const char key_name 
)
static

Definition at line 220 of file atl.c.

221{
222 HKEY key;
223 DWORD res;
224
226 ok_(__FILE__,line)(res == ERROR_FILE_NOT_FOUND, "Attempting to open %s returned %lu\n", key_name, res);
227 if(res == ERROR_SUCCESS)
229}
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79

◆ ConnectionPoint_AddRef()

static ULONG WINAPI ConnectionPoint_AddRef ( IConnectionPoint iface)
static

Definition at line 327 of file atl.c.

328{
329 return 2;
330}

◆ ConnectionPoint_Advise()

static HRESULT WINAPI ConnectionPoint_Advise ( IConnectionPoint iface,
IUnknown pUnkSink,
DWORD pdwCookie 
)
static

Definition at line 352 of file atl.c.

354{
355 ok(pUnkSink == (IUnknown*)0xdead0000, "pUnkSink = %p\n", pUnkSink);
356 *pdwCookie = 0xdeadbeef;
357 advise_cnt++;
358 return S_OK;
359}
#define ok(value,...)
Definition: atltest.h:57
#define S_OK
Definition: intsafe.h:52
static int advise_cnt
Definition: atl.c:350

◆ ConnectionPoint_EnumConnections()

static HRESULT WINAPI ConnectionPoint_EnumConnections ( IConnectionPoint iface,
IEnumConnections **  ppEnum 
)
static

Definition at line 368 of file atl.c.

370{
371 ok(0, "unexpected call\n");
372 return E_NOTIMPL;
373}
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ ConnectionPoint_GetConnectionInterface()

static HRESULT WINAPI ConnectionPoint_GetConnectionInterface ( IConnectionPoint iface,
IID pIID 
)
static

Definition at line 337 of file atl.c.

338{
339 ok(0, "unexpected call\n");
340 return E_NOTIMPL;
341}

◆ ConnectionPoint_GetConnectionPointContainer()

static HRESULT WINAPI ConnectionPoint_GetConnectionPointContainer ( IConnectionPoint iface,
IConnectionPointContainer **  ppCPC 
)
static

Definition at line 343 of file atl.c.

345{
346 ok(0, "unexpected call\n");
347 return E_NOTIMPL;
348}

◆ ConnectionPoint_QueryInterface()

static HRESULT WINAPI ConnectionPoint_QueryInterface ( IConnectionPoint iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 316 of file atl.c.

317{
319 *ppv = iface;
320 return S_OK;
321 }
322
323 ok(0, "unexpected call\n");
324 return E_NOINTERFACE;
325}
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
const GUID IID_IConnectionPoint
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define E_NOINTERFACE
Definition: winerror.h:3479

◆ ConnectionPoint_Release()

static ULONG WINAPI ConnectionPoint_Release ( IConnectionPoint iface)
static

Definition at line 332 of file atl.c.

333{
334 return 1;
335}

◆ ConnectionPoint_Unadvise()

static HRESULT WINAPI ConnectionPoint_Unadvise ( IConnectionPoint iface,
DWORD  dwCookie 
)
static

Definition at line 361 of file atl.c.

362{
363 ok(dwCookie == 0xdeadbeef, "dwCookie = %lx\n", dwCookie);
364 advise_cnt--;
365 return S_OK;
366}

◆ ConnectionPointContainer_AddRef()

static ULONG WINAPI ConnectionPointContainer_AddRef ( IConnectionPointContainer iface)
static

Definition at line 401 of file atl.c.

402{
403 return 2;
404}

◆ ConnectionPointContainer_EnumConnectionPoints()

static HRESULT WINAPI ConnectionPointContainer_EnumConnectionPoints ( IConnectionPointContainer iface,
IEnumConnectionPoints **  ppEnum 
)
static

Definition at line 411 of file atl.c.

413{
414 ok(0, "unexpected call\n");
415 return E_NOTIMPL;
416}

◆ ConnectionPointContainer_FindConnectionPoint()

static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint ( IConnectionPointContainer iface,
REFIID  riid,
IConnectionPoint **  ppCP 
)
static

Definition at line 418 of file atl.c.

420{
421 ok(IsEqualGUID(riid, &CLSID_Test), "unexpected riid\n");
422 *ppCP = &ConnectionPoint;
423 return S_OK;
424}
static const GUID CLSID_Test
Definition: atl.c:35
static IConnectionPoint ConnectionPoint
Definition: atl.c:387

◆ ConnectionPointContainer_QueryInterface()

static HRESULT WINAPI ConnectionPointContainer_QueryInterface ( IConnectionPointContainer iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 389 of file atl.c.

391{
393 *ppv = iface;
394 return S_OK;
395 }
396
397 ok(0, "unexpected call\n");
398 return E_NOTIMPL;
399}
const GUID IID_IConnectionPointContainer

◆ ConnectionPointContainer_Release()

static ULONG WINAPI ConnectionPointContainer_Release ( IConnectionPointContainer iface)
static

Definition at line 406 of file atl.c.

407{
408 return 1;
409}

◆ create_container_window()

static HWND create_container_window ( void  )
static

Definition at line 820 of file atl.c.

821{
822 return CreateWindowA("WineAtlTestClass", "Wine ATL Test Window", 0,
825}
#define NULL
Definition: types.h:112
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4469
#define CW_USEDEFAULT
Definition: winuser.h:225

Referenced by test_AtlAxAttachControl(), and test_AtlAxCreateControl().

◆ Dispatch_AddRef()

static ULONG WINAPI Dispatch_AddRef ( IDispatch iface)
static

Definition at line 555 of file atl.c.

556{
557 return 2;
558}

◆ Dispatch_GetIDsOfNames()

static HRESULT WINAPI Dispatch_GetIDsOfNames ( IDispatch iface,
REFIID  riid,
LPOLESTR *  rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 590 of file atl.c.

592{
593 ok(0, "unexpected call\n");
594 return E_NOTIMPL;
595}

◆ Dispatch_GetTypeInfo()

static HRESULT WINAPI Dispatch_GetTypeInfo ( IDispatch iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 571 of file atl.c.

573{
576
577 ok(!iTInfo, "iTInfo = %d\n", iTInfo);
578 ok(!lcid, "lcid = %lx\n", lcid);
579
580 hres = LoadTypeLib(L"mshtml.tlb", &typelib);
581 ok(hres == S_OK, "LoadTypeLib failed: %08lx\n", hres);
582
583 hres = ITypeLib_GetTypeInfoOfGuid(typelib, &IID_IHTMLElement, ppTInfo);
584 ok(hres == S_OK, "GetTypeInfoOfGuid failed: %08lx\n", hres);
585
586 ITypeLib_Release(typelib);
587 return S_OK;
588}
LCID lcid
Definition: locale.c:5660
HRESULT WINAPI LoadTypeLib(const OLECHAR *szFile, ITypeLib **pptLib)
Definition: typelib.c:434
#define L(x)
Definition: resources.c:13
HRESULT hres
Definition: protocol.c:465

◆ Dispatch_GetTypeInfoCount()

static HRESULT WINAPI Dispatch_GetTypeInfoCount ( IDispatch iface,
UINT pctinfo 
)
static

Definition at line 565 of file atl.c.

566{
567 ok(0, "unexpected call\n");
568 return E_NOTIMPL;
569}

◆ Dispatch_Invoke()

static HRESULT WINAPI Dispatch_Invoke ( IDispatch iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 597 of file atl.c.

600{
601 ok(0, "unexpected call\n");
602 return E_NOTIMPL;
603}

◆ Dispatch_QueryInterface()

static HRESULT WINAPI Dispatch_QueryInterface ( IDispatch iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 530 of file atl.c.

531{
532 *ppv = NULL;
533
535 *ppv = iface;
536 return S_OK;
537 }
538
541 return E_NOINTERFACE;
543 return S_OK;
544 }
545
547 *ppv = &Persist;
548 return S_OK;
549 }
550
551 ok(0, "unexpected riid: %s\n", wine_dbgstr_guid(riid));
552 return E_NOINTERFACE;
553}
const GUID IID_IUnknown
static BOOL support_classinfo2
Definition: atl.c:528
static IPersist Persist
Definition: atl.c:488
static IProvideClassInfo2 ProvideClassInfo2
Definition: atl.c:527
const GUID IID_IProvideClassInfo2
const GUID IID_IDispatch
const GUID IID_IPersist
Definition: proxy.cpp:14
static __inline const char * wine_dbgstr_guid(const GUID *id)
Definition: debug.h:171

◆ Dispatch_Release()

static ULONG WINAPI Dispatch_Release ( IDispatch iface)
static

Definition at line 560 of file atl.c.

561{
562 return 1;
563}

◆ is_process_limited()

static BOOL is_process_limited ( void  )
static

Definition at line 101 of file atl.c.

102{
103 static BOOL (WINAPI *pOpenProcessToken)(HANDLE, DWORD, PHANDLE) = NULL;
106
107 if (!pOpenProcessToken)
108 {
109 HMODULE hadvapi32 = GetModuleHandleA("advapi32.dll");
110 pOpenProcessToken = (void*)GetProcAddress(hadvapi32, "OpenProcessToken");
111 if (!pOpenProcessToken)
112 return FALSE;
113 }
114
115 if (pOpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token))
116 {
117 BOOL ret;
119 DWORD size;
120
122 if (ret)
123 {
125 /* UAC is disabled, check for administrators group */
127 else if (type == TokenElevationTypeFull)
128 result = FALSE;
130 result = TRUE;
131 }
133 }
134 return result;
135}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
BOOL WINAPI GetTokenInformation(HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, LPVOID TokenInformation, DWORD TokenInformationLength, PDWORD ReturnLength)
Definition: security.c:411
#define CloseHandle
Definition: compat.h:739
#define GetProcAddress(x, y)
Definition: compat.h:753
#define GetCurrentProcess()
Definition: compat.h:759
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:812
return ret
Definition: mutex.c:147
unsigned int BOOL
Definition: ntddk_ex.h:94
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLsizeiptr size
Definition: glext.h:5919
GLuint64EXT * result
Definition: glext.h:11304
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat token
Definition: glfuncs.h:210
static BOOL is_token_admin(HANDLE token)
Definition: atl.c:54
#define BOOL
Definition: nt_native.h:43
#define DWORD
Definition: nt_native.h:44
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:455
PVOID HANDLE
Definition: typedefs.h:73
#define WINAPI
Definition: msvc.h:6
enum _TOKEN_ELEVATION_TYPE TOKEN_ELEVATION_TYPE
@ TokenElevationTypeLimited
Definition: winnt_old.h:2719
@ TokenElevationTypeDefault
Definition: winnt_old.h:2717
@ TokenElevationTypeFull
Definition: winnt_old.h:2718
#define TOKEN_QUERY
Definition: setypes.h:940
@ TokenElevationType
Definition: setypes.h:995

Referenced by test_regcat().

◆ is_token_admin()

static BOOL is_token_admin ( HANDLE  token)
static

Definition at line 54 of file atl.c.

55{
56 PSID administrators = NULL;
58 DWORD groups_size;
60 DWORD group_index;
61
62 /* Create a well-known SID for the Administrators group. */
64 DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0,
65 &administrators))
66 return FALSE;
67
68 /* Get the group info from the token */
69 groups_size = 0;
70 GetTokenInformation(token, TokenGroups, NULL, 0, &groups_size);
71 groups = HeapAlloc(GetProcessHeap(), 0, groups_size);
72 if (groups == NULL)
73 {
74 FreeSid(administrators);
75 return FALSE;
76 }
77 if (! GetTokenInformation(token, TokenGroups, groups, groups_size, &groups_size))
78 {
80 FreeSid(administrators);
81 return FALSE;
82 }
83
84 /* Now check if the token groups include the Administrators group */
85 for (group_index = 0; group_index < groups->GroupCount; group_index++)
86 {
87 if (EqualSid(groups->Groups[group_index].Sid, administrators))
88 {
90 FreeSid(administrators);
91 return TRUE;
92 }
93 }
94
95 /* If we end up here we didn't find the Administrators group */
97 FreeSid(administrators);
98 return FALSE;
99}
BOOL WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, BYTE nSubAuthorityCount, DWORD nSubAuthority0, DWORD nSubAuthority1, DWORD nSubAuthority2, DWORD nSubAuthority3, DWORD nSubAuthority4, DWORD nSubAuthority5, DWORD nSubAuthority6, DWORD nSubAuthority7, PSID *pSid)
Definition: security.c:674
PVOID WINAPI FreeSid(PSID pSid)
Definition: security.c:698
BOOL WINAPI EqualSid(PSID pSid1, PSID pSid2)
Definition: security.c:829
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
GLsizei GLuint * groups
Definition: glext.h:11113
#define SECURITY_BUILTIN_DOMAIN_RID
Definition: setypes.h:581
#define SECURITY_NT_AUTHORITY
Definition: setypes.h:554
@ TokenGroups
Definition: setypes.h:979
#define DOMAIN_ALIAS_RID_ADMINS
Definition: setypes.h:652

Referenced by is_process_limited().

◆ Persist_AddRef()

static ULONG WINAPI Persist_AddRef ( IPersist iface)
static

Definition at line 465 of file atl.c.

466{
467 return 2;
468}

◆ Persist_GetClassID()

static HRESULT WINAPI Persist_GetClassID ( IPersist iface,
CLSID pClassID 
)
static

Definition at line 475 of file atl.c.

476{
477 *pClassID = persist_clsid;
478 return S_OK;
479}
static CLSID persist_clsid
Definition: atl.c:457

◆ Persist_QueryInterface()

static HRESULT WINAPI Persist_QueryInterface ( IPersist iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 459 of file atl.c.

460{
461 ok(0, "unexpected call\n");
462 return E_NOINTERFACE;
463}

◆ Persist_Release()

static ULONG WINAPI Persist_Release ( IPersist iface)
static

Definition at line 470 of file atl.c.

471{
472 return 1;
473}

◆ ProvideClassInfo2_AddRef()

static ULONG WINAPI ProvideClassInfo2_AddRef ( IProvideClassInfo2 iface)
static

Definition at line 496 of file atl.c.

497{
498 return 2;
499}

◆ ProvideClassInfo2_GetClassInfo()

static HRESULT WINAPI ProvideClassInfo2_GetClassInfo ( IProvideClassInfo2 iface,
ITypeInfo **  ppTI 
)
static

Definition at line 506 of file atl.c.

507{
508 ok(0, "unexpected call\n");
509 return E_NOTIMPL;
510}

◆ ProvideClassInfo2_GetGUID()

static HRESULT WINAPI ProvideClassInfo2_GetGUID ( IProvideClassInfo2 iface,
DWORD  dwGuidKind,
GUID pGUID 
)
static

Definition at line 512 of file atl.c.

513{
514 ok(dwGuidKind == GUIDKIND_DEFAULT_SOURCE_DISP_IID, "unexpected dwGuidKind %lx\n", dwGuidKind);
515 *pGUID = DIID_DispHTMLBody;
516 return S_OK;
517}

◆ ProvideClassInfo2_QueryInterface()

static HRESULT WINAPI ProvideClassInfo2_QueryInterface ( IProvideClassInfo2 iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 490 of file atl.c.

491{
492 ok(0, "unexpected call\n");
493 return E_NOINTERFACE;
494}

◆ ProvideClassInfo2_Release()

static ULONG WINAPI ProvideClassInfo2_Release ( IProvideClassInfo2 iface)
static

Definition at line 501 of file atl.c.

502{
503 return 1;
504}

◆ register_class()

static ATOM register_class ( void  )
static

Definition at line 802 of file atl.c.

803{
804 WNDCLASSA wndclassA;
805
806 wndclassA.style = 0;
807 wndclassA.lpfnWndProc = DefWindowProcA;
808 wndclassA.cbClsExtra = 0;
809 wndclassA.cbWndExtra = 0;
810 wndclassA.hInstance = GetModuleHandleA(NULL);
811 wndclassA.hIcon = NULL;
812 wndclassA.hCursor = LoadCursorA(NULL, (LPSTR)IDC_ARROW);
813 wndclassA.hbrBackground = (HBRUSH)(COLOR_BTNFACE+1);
814 wndclassA.lpszMenuName = NULL;
815 wndclassA.lpszClassName = "WineAtlTestClass";
816
817 return RegisterClassA(&wndclassA);
818}
HBRUSH hbrBackground
Definition: winuser.h:3278
HICON hIcon
Definition: winuser.h:3276
HINSTANCE hInstance
Definition: winuser.h:3275
HCURSOR hCursor
Definition: winuser.h:3277
int cbWndExtra
Definition: winuser.h:3274
UINT style
Definition: winuser.h:3271
LPCSTR lpszMenuName
Definition: winuser.h:3279
LPCSTR lpszClassName
Definition: winuser.h:3280
WNDPROC lpfnWndProc
Definition: winuser.h:3272
int cbClsExtra
Definition: winuser.h:3273
char * LPSTR
Definition: typedefs.h:51
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define IDC_ARROW
Definition: winuser.h:695
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
Definition: cursoricon.c:2459
#define COLOR_BTNFACE
Definition: winuser.h:939

Referenced by START_TEST().

◆ START_TEST()

START_TEST ( atl  )

Definition at line 1143 of file atl.c.

1144{
1145 if (!register_class())
1146 return;
1147
1149
1151 test_regcat();
1152 test_typelib();
1153 test_cp();
1155 test_ax_win();
1161
1163}
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: combase.c:2842
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:531
static ATOM register_class(void)
Definition: atl.c:802
static void test_regcat(void)
Definition: atl.c:231
static void test_AtlComModuleRegisterClassObjects(void)
Definition: atl.c:1091
static void test_AtlAxAttachControl(void)
Definition: atl.c:827
static void test_AtlComModuleGetClassObject(void)
Definition: atl.c:1065
static void test_AtlComModuleRevokeClassObjects(void)
Definition: atl.c:1118
static void test_ax_win(void)
Definition: atl.c:652
static void test_winmodule(void)
Definition: atl.c:137
static void test_AtlAxCreateControl(void)
Definition: atl.c:896
static void test_typelib(void)
Definition: atl.c:275
static void test_cp(void)
Definition: atl.c:436
static void test_source_iface(void)
Definition: atl.c:617

◆ test_AtlAxAttachControl()

static void test_AtlAxAttachControl ( void  )
static

Definition at line 827 of file atl.c.

828{
829 HWND hwnd;
830 HRESULT hr;
832 LONG val;
833
835 ok(hr == E_INVALIDARG, "Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08lx\n", hr);
836
837 container = (IUnknown *)0xdeadbeef;
839 ok(hr == E_INVALIDARG, "Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08lx\n", hr);
840 ok(container == (IUnknown *)0xdeadbeef,
841 "Expected the output container pointer to be untouched, got %p\n", container);
842
845 ok(hr == E_INVALIDARG, "Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08lx\n", hr);
847
849 container = (IUnknown *)0xdeadbeef;
851 ok(hr == E_INVALIDARG, "Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08lx\n", hr);
852 ok(container == (IUnknown *)0xdeadbeef, "returned %p\n", container);
854
855 hr = CoCreateInstance(&CLSID_WebBrowser, NULL, CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER,
856 &IID_IOleObject, (void **)&control);
857 ok(hr == S_OK, "Expected CoCreateInstance to return S_OK, got 0x%08lx\n", hr);
858
859 if (FAILED(hr))
860 {
861 skip("Couldn't obtain a test IOleObject instance\n");
862 return;
863 }
864
866 ok(hr == S_FALSE, "Expected AtlAxAttachControl to return S_FALSE, got 0x%08lx\n", hr);
867
868 container = NULL;
870 ok(hr == S_FALSE, "Expected AtlAxAttachControl to return S_FALSE, got 0x%08lx\n", hr);
871 ok(container != NULL, "got %p\n", container);
872 IUnknown_Release(container);
873
875 SetWindowLongW(hwnd, GWLP_USERDATA, 0xdeadbeef);
877 ok(hr == S_OK, "Expected AtlAxAttachControl to return S_OK, got 0x%08lx\n", hr);
879 ok(val == 0xdeadbeef, "returned %08lx\n", val);
881
883 SetWindowLongW(hwnd, GWLP_USERDATA, 0xdeadbeef);
884 container = NULL;
886 ok(hr == S_OK, "Expected AtlAxAttachControl to return S_OK, got 0x%08lx\n", hr);
887 ok(container != NULL, "Expected not NULL!\n");
888 IUnknown_Release(container);
890 ok(val == 0xdeadbeef, "Expected unchanged, returned %08lx\n", val);
892
893 IUnknown_Release(control);
894}
#define skip(...)
Definition: atltest.h:64
#define E_INVALIDARG
Definition: ddrawi.h:101
HRESULT hr
Definition: delayimp.cpp:582
HRESULT WINAPI AtlAxAttachControl(IUnknown *control, HWND hWnd, IUnknown **container)
Definition: atl_ax.c:1142
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
Definition: combase.c:1685
GLuint GLfloat * val
Definition: glext.h:7180
#define FAILED(hr)
Definition: intsafe.h:51
static HWND create_container_window(void)
Definition: atl.c:820
const GUID IID_IOleObject
long LONG
Definition: pedump.c:60
Definition: dialog.c:52
#define GWLP_USERDATA
Definition: treelist.c:63
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
#define S_FALSE
Definition: winerror.h:3451
LONG WINAPI SetWindowLongW(_In_ HWND, _In_ int, _In_ LONG)
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
BOOL WINAPI DestroyWindow(_In_ HWND)

Referenced by START_TEST().

◆ test_AtlAxCreateControl()

static void test_AtlAxCreateControl ( void  )
static

Definition at line 896 of file atl.c.

897{
898 HWND hwnd;
900 HRESULT hr;
902 HANDLE hfile;
903 WCHAR file_uri1W[MAX_PATH], pathW[MAX_PATH];
904
905 container = NULL;
906 control = (IUnknown *)0xdeadbeef;
908 todo_wine ok(hr == S_FALSE, "got 0x%08lx\n", hr);
909 todo_wine ok(container != NULL, "returned %p\n", container);
910 ok(!control, "returned %p\n", control);
911
912 container = NULL;
913 control = (IUnknown *)0xdeadbeef;
915 ok(hwnd != NULL, "create window failed!\n");
917 ok(hr == S_OK, "got 0x%08lx\n", hr);
918 todo_wine ok(container != NULL, "returned %p!\n", container);
919 ok(!control, "returned %p\n", control);
921
922 container = NULL;
923 control = (IUnknown *)0xdeadbeef;
925 ok(hwnd != NULL, "create window failed!\n");
927 ok(hr == S_OK, "got 0x%08lx\n", hr);
928 todo_wine ok(container != NULL, "returned %p!\n", container);
929 ok(!control, "returned %p\n", control);
931
932 container = (IUnknown *)0xdeadbeef;
933 control = (IUnknown *)0xdeadbeef;
935 ok(hwnd != NULL, "create window failed!\n");
937 ok(hr == CO_E_CLASSSTRING, "got 0x%08lx\n", hr);
938 ok(!container, "returned %p!\n", container);
939 ok(!control, "returned %p\n", control);
941
942 container = NULL;
943 control = NULL;
945 ok(hwnd != NULL, "create window failed!\n");
947 ok(hr == S_OK, "got 0x%08lx\n", hr);
948 ok(container != NULL, "returned %p!\n", container);
949 ok(control != NULL, "returned %p\n", control);
950 IUnknown_Release(container);
951 IUnknown_Release(control);
953
954 container = NULL;
955 control = NULL;
957 ok(hwnd != NULL, "create window failed!\n");
959 ok(hr == S_OK, "got 0x%08lx\n", hr);
960 ok(container != NULL, "returned %p!\n", container);
961 ok(control != NULL, "returned %p\n", control);
962 IUnknown_Release(container);
963 IUnknown_Release(control);
965
966 container = NULL;
967 control = NULL;
969 ok(hwnd != NULL, "create window failed!\n");
971 ok(hr == S_OK, "got 0x%08lx\n", hr);
972 ok(container != NULL, "returned %p!\n", container);
973 ok(control != NULL, "returned %p\n", control);
974 IUnknown_Release(container);
975 IUnknown_Release(control);
977
978 container = NULL;
979 control = NULL;
981 ok(hwnd != NULL, "create window failed!\n");
983 ok(hr == S_OK, "got 0x%08lx\n", hr);
984 ok(container != NULL, "returned %p!\n", container);
985 ok(control != NULL, "returned %p\n", control);
986 IUnknown_Release(container);
987 IUnknown_Release(control);
989
990 container = NULL;
991 control = NULL;
993 ok(hwnd != NULL, "create window failed!\n");
995 ok(hr == S_OK, "got 0x%08lx\n", hr);
996 ok(container != NULL, "returned %p!\n", container);
997 ok(control != NULL, "returned %p\n", control);
998 IUnknown_Release(container);
999 IUnknown_Release(control);
1001
1002 container = (IUnknown *)0xdeadbeef;
1003 control = (IUnknown *)0xdeadbeef;
1005 ok(hwnd != NULL, "create window failed!\n");
1007 ok(hr == CO_E_CLASSSTRING, "got 0x%08lx\n", hr);
1008 ok(!container, "returned %p!\n", container);
1009 ok(!control, "returned %p\n", control);
1011
1013 ok(ret, "GetTempPath failed!\n");
1014 lstrcatW(pathW, L"test.html");
1015 hfile = CreateFileW(pathW, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, 0);
1016 ok(hfile != INVALID_HANDLE_VALUE, "failed to create file\n");
1017 ret = WriteFile(hfile, html_str, sizeof(html_str), &ret_size, NULL);
1018 ok(ret, "WriteFile failed\n");
1019 CloseHandle(hfile);
1020
1021 /* test C:// scheme */
1022 container = NULL;
1023 control = NULL;
1025 ok(hwnd != NULL, "create window failed!\n");
1027 ok(hr == S_OK, "got 0x%08lx\n", hr);
1028 ok(container != NULL, "returned %p!\n", container);
1029 ok(control != NULL, "returned %p\n", control);
1030 IUnknown_Release(container);
1031 IUnknown_Release(control);
1033
1034 /* test file:// scheme */
1035 lstrcpyW(file_uri1W, L"file:///");
1036 lstrcatW(file_uri1W, pathW);
1037 container = NULL;
1038 control = NULL;
1040 ok(hwnd != NULL, "create window failed!\n");
1042 ok(hr == S_OK, "got 0x%08lx\n", hr);
1043 ok(container != NULL, "returned %p!\n", container);
1044 ok(control != NULL, "returned %p\n", control);
1045 IUnknown_Release(container);
1046 IUnknown_Release(control);
1048
1049 /* test file:// scheme on non-existent file. */
1051 ok(ret, "DeleteFile failed (gle=%lu)\n", GetLastError());
1052 container = NULL;
1053 control = NULL;
1055 ok(hwnd != NULL, "create window failed!\n");
1057 ok(hr == S_OK, "got 0x%08lx\n", hr);
1058 ok(container != NULL, "returned %p!\n", container);
1059 ok(control != NULL, "returned %p\n", control);
1060 IUnknown_Release(container);
1061 IUnknown_Release(control);
1063}
HRESULT WINAPI AtlAxCreateControlEx(const WCHAR *lpTricsData, HWND hwnd, IStream *stream, IUnknown **container, IUnknown **control, REFIID iidSink, IUnknown *punkSink)
Definition: atl_ax.c:1468
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define MAX_PATH
Definition: compat.h:34
#define CreateFileW
Definition: compat.h:741
#define lstrcpyW
Definition: compat.h:749
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
Definition: delete.c:39
BOOL WINAPI WriteFile(_In_ HANDLE hFile, _In_reads_bytes_opt_(nNumberOfBytesToWrite) LPCVOID lpBuffer, _In_ DWORD nNumberOfBytesToWrite, _Out_opt_ LPDWORD lpNumberOfBytesWritten, _Inout_opt_ LPOVERLAPPED lpOverlapped)
Definition: rw.c:25
DWORD WINAPI GetTempPathW(IN DWORD count, OUT LPWSTR path)
Definition: path.c:1999
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
#define todo_wine
Definition: minitest.h:80
#define CREATE_NEW
Definition: disk.h:69
static const char html_str[]
Definition: atl.c:52
static const WCHAR mshtml2W[]
Definition: atl.c:50
static const WCHAR progid1W[]
Definition: atl.c:46
static const WCHAR url1W[]
Definition: atl.c:48
static const WCHAR mshtml1W[]
Definition: atl.c:49
static const WCHAR mshtml3W[]
Definition: atl.c:51
static const WCHAR clsid1W[]
Definition: atl.c:47
static const WCHAR pathW[]
Definition: path.c:2368
static void ULONG ULONG * ret_size
Definition: time.c:40
#define GENERIC_WRITE
Definition: nt_native.h:90
short WCHAR
Definition: pedump.c:58
#define IID_NULL
Definition: guiddef.h:98
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define CO_E_CLASSSTRING
Definition: winerror.h:3919

Referenced by START_TEST().

◆ test_AtlComModuleGetClassObject()

static void test_AtlComModuleGetClassObject ( void  )
static

Definition at line 1065 of file atl.c.

1066{
1067 _ATL_OBJMAP_ENTRY *null_entry = NULL;
1069 HRESULT hr;
1070 void *ret;
1071
1072 /* Test NULL module */
1074 ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
1075
1076 /* Test NULL m_ppAutoObjMapFirst and m_ppAutoObjMapLast */
1077 module.cbSize = sizeof(module);
1078 module.m_ppAutoObjMapFirst = NULL;
1079 module.m_ppAutoObjMapLast = NULL;
1081 ok(hr == CLASS_E_CLASSNOTAVAILABLE, "Unexpected hr %#lx.\n", hr);
1082
1083 /* Test m_ppAutoObjMapFirst and m_ppAutoObjMapLast both pointing to a NULL entry */
1084 module.cbSize = sizeof(module);
1085 module.m_ppAutoObjMapFirst = &null_entry;
1086 module.m_ppAutoObjMapLast = &null_entry;
1088 ok(hr == CLASS_E_CLASSNOTAVAILABLE, "Unexpected hr %#lx.\n", hr);
1089}
HRESULT WINAPI AtlComModuleGetClassObject(_ATL_COM_MODULE *, REFCLSID, REFIID, void **)
#define GUID_NULL
Definition: ks.h:106
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:3772

Referenced by START_TEST().

◆ test_AtlComModuleRegisterClassObjects()

static void test_AtlComModuleRegisterClassObjects ( void  )
static

Definition at line 1091 of file atl.c.

1092{
1093 _ATL_OBJMAP_ENTRY *null_entry = NULL;
1095 HRESULT hr;
1096
1097 /* Test NULL module */
1099 ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
1100
1101 /* Test NULL m_ppAutoObjMapFirst and m_ppAutoObjMapLast */
1102 module.cbSize = sizeof(module);
1103 module.m_ppAutoObjMapFirst = NULL;
1104 module.m_ppAutoObjMapLast = NULL;
1106 todo_wine_if(hr == S_OK)
1107 ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
1108
1109 /* Test m_ppAutoObjMapFirst and m_ppAutoObjMapLast both pointing to a NULL entry */
1110 module.cbSize = sizeof(module);
1111 module.m_ppAutoObjMapFirst = &null_entry;
1112 module.m_ppAutoObjMapLast = &null_entry;
1114 todo_wine_if(hr == S_OK)
1115 ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
1116}
HRESULT WINAPI AtlComModuleRegisterClassObjects(_ATL_COM_MODULE *, DWORD, DWORD)
#define todo_wine_if(is_todo)
Definition: minitest.h:81
@ REGCLS_MULTIPLEUSE
Definition: objbase.h:398

Referenced by START_TEST().

◆ test_AtlComModuleRevokeClassObjects()

static void test_AtlComModuleRevokeClassObjects ( void  )
static

Definition at line 1118 of file atl.c.

1119{
1120 _ATL_OBJMAP_ENTRY *null_entry = NULL;
1122 HRESULT hr;
1123
1124 /* Test NULL module */
1126 ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
1127
1128 /* Test NULL m_ppAutoObjMapFirst and m_ppAutoObjMapLast */
1129 module.cbSize = sizeof(module);
1130 module.m_ppAutoObjMapFirst = NULL;
1131 module.m_ppAutoObjMapLast = NULL;
1133 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1134
1135 /* Test m_ppAutoObjMapFirst and m_ppAutoObjMapLast both pointing to a NULL entry */
1136 module.cbSize = sizeof(module);
1137 module.m_ppAutoObjMapFirst = &null_entry;
1138 module.m_ppAutoObjMapLast = &null_entry;
1140 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1141}
HRESULT WINAPI AtlComModuleRevokeClassObjects(_ATL_COM_MODULE *)

Referenced by START_TEST().

◆ test_ax_win()

static void test_ax_win ( void  )
static

Definition at line 652 of file atl.c.

653{
655 HRESULT res;
656 HWND hwnd;
657 HANDLE hfile;
659 WNDPROC wndproc[2] = {NULL, NULL};
660 WCHAR file_uri1W[MAX_PATH], pathW[MAX_PATH];
661 WNDCLASSEXW wcex;
662 static HMODULE hinstance = 0;
663 static const WCHAR cls_names[][16] =
664 {
665 L"AtlAxWin100",
666 L"AtlAxWinLic100"
667 };
668
669 ret = AtlAxWinInit();
670 ok(ret, "AtlAxWinInit failed\n");
671
672 hinstance = GetModuleHandleA(NULL);
673
674 for (i = 0; i < 2; i++)
675 {
676 memset(&wcex, 0, sizeof(wcex));
677 wcex.cbSize = sizeof(wcex);
678 ret = GetClassInfoExW(hinstance, cls_names[i], &wcex);
679 ok(ret, "%s has not registered\n", wine_dbgstr_w(cls_names[i]));
680 ok(wcex.style == (CS_GLOBALCLASS | CS_DBLCLKS), "wcex.style %08x\n", wcex.style);
681 wndproc[i] = wcex.lpfnWndProc;
682
683 hwnd = CreateWindowW(cls_names[i], NULL, 0, 100, 100, 100, 100, NULL, NULL, NULL, NULL);
684 ok(hwnd != NULL, "CreateWindow failed!\n");
685 control = (IUnknown *)0xdeadbeef;
687 ok(res == E_FAIL, "Expected E_FAIL, returned %08lx\n", res);
688 ok(!control, "returned %p\n", control);
689 if (control) IUnknown_Release(control);
691
692 hwnd = CreateWindowW(cls_names[i], L"", 0, 100, 100, 100, 100, NULL, NULL, NULL, NULL);
693 ok(hwnd != NULL, "CreateWindow failed!\n");
694 control = (IUnknown *)0xdeadbeef;
696 ok(res == E_FAIL, "Expected E_FAIL, returned %08lx\n", res);
697 ok(!control, "returned %p\n", control);
698 if (control) IUnknown_Release(control);
700
701 hwnd = CreateWindowW(cls_names[i], L"random", 0, 100, 100, 100, 100, NULL, NULL, NULL, NULL);
702 todo_wine ok(!hwnd, "returned %p\n", hwnd);
704
705 hwnd = CreateWindowW(cls_names[i], progid1W, 0, 100, 100, 100, 100, NULL, NULL, NULL, NULL);
706 ok(hwnd != NULL, "CreateWindow failed!\n");
707 control = NULL;
709 ok(res == S_OK, "AtlAxGetControl failed with res %08lx\n", res);
710 ok(control != NULL, "AtlAxGetControl failed!\n");
711 IUnknown_Release(control);
713
714 hwnd = CreateWindowW(cls_names[i], clsid1W, 0, 100, 100, 100, 100, NULL, NULL, NULL, NULL);
715 ok(hwnd != NULL, "CreateWindow failed!\n");
716 control = NULL;
718 ok(res == S_OK, "AtlAxGetControl failed with res %08lx\n", res);
719 ok(control != NULL, "AtlAxGetControl failed!\n");
720 IUnknown_Release(control);
722
723 hwnd = CreateWindowW(cls_names[i], url1W, 0, 100, 100, 100, 100, NULL, NULL, NULL, NULL);
724 ok(hwnd != NULL, "CreateWindow failed!\n");
725 control = NULL;
727 ok(res == S_OK, "AtlAxGetControl failed with res %08lx\n", res);
728 ok(control != NULL, "AtlAxGetControl failed!\n");
729 IUnknown_Release(control);
731
732 /* test html stream with "MSHTML:" prefix */
733 hwnd = CreateWindowW(cls_names[i], mshtml1W, 0, 100, 100, 100, 100, NULL, NULL, NULL, NULL);
734 ok(hwnd != NULL, "CreateWindow failed!\n");
735 control = NULL;
737 ok(res == S_OK, "AtlAxGetControl failed with res %08lx\n", res);
738 ok(control != NULL, "AtlAxGetControl failed!\n");
739 IUnknown_Release(control);
741
742 hwnd = CreateWindowW(cls_names[i], mshtml2W, 0, 100, 100, 100, 100, NULL, NULL, NULL, NULL);
743 ok(hwnd != NULL, "CreateWindow failed!\n");
744 control = NULL;
746 ok(res == S_OK, "AtlAxGetControl failed with res %08lx\n", res);
747 ok(control != NULL, "AtlAxGetControl failed!\n");
748 IUnknown_Release(control);
750
751 /* test html stream without "MSHTML:" prefix */
752 hwnd = CreateWindowW(cls_names[i], mshtml3W, 0, 100, 100, 100, 100, NULL, NULL, NULL, NULL);
753 todo_wine ok(!hwnd, "returned %p\n", hwnd);
755
757 ok(ret, "GetTempPath failed!\n");
758 lstrcatW(pathW, L"test.html");
759 hfile = CreateFileW(pathW, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, 0);
760 ok(hfile != INVALID_HANDLE_VALUE, "failed to create file\n");
761 ret = WriteFile(hfile, html_str, sizeof(html_str), &ret_size, NULL);
762 ok(ret, "WriteFile failed\n");
763 CloseHandle(hfile);
764
765 /* test C:// scheme */
766 hwnd = CreateWindowW(cls_names[i], pathW, 0, 100, 100, 100, 100, NULL, NULL, NULL, NULL);
767 ok(hwnd != NULL, "CreateWindow failed!\n");
768 control = NULL;
770 ok(res == S_OK, "AtlAxGetControl failed with res %08lx\n", res);
771 ok(control != NULL, "AtlAxGetControl failed!\n");
772 IUnknown_Release(control);
774
775 /* test file:// scheme */
776 lstrcpyW(file_uri1W, L"file:///");
777 lstrcatW(file_uri1W, pathW);
778 hwnd = CreateWindowW(cls_names[i], file_uri1W, 0, 100, 100, 100, 100, NULL, NULL, NULL, NULL);
779 ok(hwnd != NULL, "CreateWindow failed!\n");
780 control = NULL;
782 ok(res == S_OK, "AtlAxGetControl failed with res %08lx\n", res);
783 ok(control != NULL, "AtlAxGetControl failed!\n");
784 IUnknown_Release(control);
786
787 /* test file:// scheme on non-existent file */
789 ok(ret, "DeleteFile failed (gle=%lu)\n", GetLastError());
790 hwnd = CreateWindowW(cls_names[i], file_uri1W, 0, 100, 100, 100, 100, NULL, NULL, NULL, NULL);
791 ok(hwnd != NULL, "CreateWindow failed!\n");
792 control = NULL;
794 ok(res == S_OK, "AtlAxGetControl failed with res %08lx\n", res);
795 ok(control != NULL, "AtlAxGetControl failed!\n");
796 IUnknown_Release(control);
798 }
799 todo_wine ok(wndproc[0] != wndproc[1], "expected different proc!\n");
800}
#define E_FAIL
Definition: ddrawi.h:102
HRESULT WINAPI AtlAxGetControl(HWND hWnd, IUnknown **pUnk)
Definition: atl_ax.c:1385
BOOL WINAPI AtlAxWinInit(void)
Definition: atl_ax.c:86
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define wine_dbgstr_w
Definition: kernel32.h:34
#define memset(x, y, z)
Definition: compat.h:39
WNDPROC lpfnWndProc
Definition: winuser.h:3326
UINT cbSize
Definition: winuser.h:3324
UINT style
Definition: winuser.h:3325
#define CS_DBLCLKS
Definition: winuser.h:659
BOOL WINAPI GetClassInfoExW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _Out_ LPWNDCLASSEXW)
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4470
#define CS_GLOBALCLASS
Definition: winuser.h:660
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:3014

Referenced by START_TEST().

◆ test_cp()

static void test_cp ( void  )
static

Definition at line 436 of file atl.c.

437{
438 DWORD cookie = 0;
440
441 hres = AtlAdvise(NULL, (IUnknown*)0xdeed0000, &CLSID_Test, &cookie);
442 ok(hres == E_INVALIDARG, "expect E_INVALIDARG, returned %08lx\n", hres);
443
444 hres = AtlUnadvise(NULL, &CLSID_Test, 0xdeadbeef);
445 ok(hres == E_INVALIDARG, "expect E_INVALIDARG, returned %08lx\n", hres);
446
448 ok(hres == S_OK, "AtlAdvise failed: %08lx\n", hres);
449 ok(cookie == 0xdeadbeef, "cookie = %lx\n", cookie);
450 ok(advise_cnt == 1, "advise_cnt = %d\n", advise_cnt);
451
453 ok(hres == S_OK, "AtlUnadvise failed: %08lx\n", hres);
454 ok(!advise_cnt, "advise_cnt = %d\n", advise_cnt);
455}
HRESULT WINAPI AtlAdvise(IUnknown *pUnkCP, IUnknown *pUnk, const IID *iid, DWORD *pdw)
Definition: atl.c:42
HRESULT WINAPI AtlUnadvise(IUnknown *pUnkCP, const IID *iid, DWORD dw)
Definition: atl.c:70
Definition: cookie.c:34

Referenced by START_TEST().

◆ test_regcat()

static void test_regcat ( void  )
static

Definition at line 231 of file atl.c.

232{
233 unsigned char b;
235
236 const struct _ATL_CATMAP_ENTRY catmap[] = {
240 };
241
242 if (is_process_limited())
243 {
244 skip("process is limited\n");
245 return;
246 }
247
249 ok(hres == S_OK, "AtlRegisterClassCategoriesHelper failed: %08lx\n", hres);
250
252 test_key_exists(HKEY_CLASSES_ROOT, "CLSID\\{" CLSID_TEST_STR "}\\Implemented Categories\\{" CATID_CATTEST1_STR "}");
253 test_key_exists(HKEY_CLASSES_ROOT, "CLSID\\{" CLSID_TEST_STR "}\\Required Categories\\{" CATID_CATTEST2_STR "}");
254
256 ok(hres == S_OK, "AtlRegisterClassCategoriesHelper failed: %08lx\n", hres);
257
258 test_key_not_exists(HKEY_CLASSES_ROOT, "CLSID\\{" CLSID_TEST_STR "}\\Implemented Categories");
259 test_key_not_exists(HKEY_CLASSES_ROOT, "CLSID\\{" CLSID_TEST_STR "}\\Required Categories");
261
262 ok(RegDeleteKeyA(HKEY_CLASSES_ROOT, "CLSID\\{" CLSID_TEST_STR "}") == ERROR_SUCCESS, "Could not delete key\n");
263
265 ok(hres == S_OK, "AtlRegisterClassCategoriesHelper failed: %08lx\n", hres);
266
268
269 b = 10;
271 ok(hres == S_OK, "AtlGetPerUserRegistration failed: %08lx\n", hres);
272 ok(!b, "AtlGetPerUserRegistration returned %x\n", b);
273}
LONG WINAPI RegDeleteKeyA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey)
Definition: reg.c:1224
HRESULT WINAPI AtlRegisterClassCategoriesHelper(REFCLSID clsid, const struct _ATL_CATMAP_ENTRY *catmap, BOOL reg)
Definition: atl.c:747
HRESULT WINAPI AtlGetPerUserRegistration(cpp_bool *pbEnabled)
Definition: atl.c:956
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define _ATL_CATMAP_ENTRY_END
Definition: atlbase.h:253
#define _ATL_CATMAP_ENTRY_REQUIRED
Definition: atlbase.h:255
#define _ATL_CATMAP_ENTRY_IMPLEMENTED
Definition: atlbase.h:254
#define b
Definition: ke_i.h:79
#define CATID_CATTEST2_STR
Definition: atl.c:45
static const GUID CATID_CatTest1
Definition: atl.c:39
#define CATID_CATTEST1_STR
Definition: atl.c:41
#define test_key_exists(a, b)
Definition: atl.c:207
static BOOL is_process_limited(void)
Definition: atl.c:101
static const GUID CATID_CatTest2
Definition: atl.c:43
#define test_key_not_exists(a, b)
Definition: atl.c:219
#define CLSID_TEST_STR
Definition: atl.c:37
Definition: atlbase.h:248
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10

Referenced by START_TEST().

◆ test_source_iface()

static void test_source_iface ( void  )
static

Definition at line 617 of file atl.c.

618{
619 unsigned short maj_ver, min_ver;
620 IID libid, iid;
622
624
625 maj_ver = min_ver = 0xdead;
626 hres = AtlGetObjectSourceInterface((IUnknown*)&Dispatch, &libid, &iid, &maj_ver, &min_ver);
627 ok(hres == S_OK, "AtlGetObjectSourceInterface failed: %08lx\n", hres);
628 ok(IsEqualGUID(&libid, &LIBID_MSHTML), "libid = %s\n", wine_dbgstr_guid(&libid));
629 ok(IsEqualGUID(&iid, &DIID_DispHTMLBody), "iid = %s\n", wine_dbgstr_guid(&iid));
630 ok(maj_ver == 4 && min_ver == 0, "ver = %d.%d\n", maj_ver, min_ver);
631
633 persist_clsid = CLSID_HTMLDocument;
634
635 maj_ver = min_ver = 0xdead;
636 hres = AtlGetObjectSourceInterface((IUnknown*)&Dispatch, &libid, &iid, &maj_ver, &min_ver);
637 ok(hres == S_OK, "AtlGetObjectSourceInterface failed: %08lx\n", hres);
638 ok(IsEqualGUID(&libid, &LIBID_MSHTML), "libid = %s\n", wine_dbgstr_guid(&libid));
639 ok(IsEqualGUID(&iid, &DIID_HTMLDocumentEvents), "iid = %s\n", wine_dbgstr_guid(&iid));
640 ok(maj_ver == 4 && min_ver == 0, "ver = %d.%d\n", maj_ver, min_ver);
641
642 persist_clsid = CLSID_HTMLStyle;
643
644 maj_ver = min_ver = 0xdead;
645 hres = AtlGetObjectSourceInterface((IUnknown*)&Dispatch, &libid, &iid, &maj_ver, &min_ver);
646 ok(hres == S_OK, "AtlGetObjectSourceInterface failed: %08lx\n", hres);
647 ok(IsEqualGUID(&libid, &LIBID_MSHTML), "libid = %s\n", wine_dbgstr_guid(&libid));
648 ok(IsEqualGUID(&iid, &IID_NULL), "iid = %s\n", wine_dbgstr_guid(&iid));
649 ok(maj_ver == 4 && min_ver == 0, "ver = %d.%d\n", maj_ver, min_ver);
650}
HRESULT WINAPI AtlGetObjectSourceInterface(IUnknown *unk, GUID *libid, IID *iid, unsigned short *major, unsigned short *minor)
Definition: atl.c:883
DWORD min_ver
Definition: apphelp.c:214
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH * Dispatch
Definition: wsk.h:188

Referenced by START_TEST().

◆ test_typelib()

static void test_typelib ( void  )
static

Definition at line 275 of file atl.c.

276{
278 HINSTANCE inst;
279 size_t len;
280 BSTR path;
282
283 inst = LoadLibraryA("scrrun.dll");
284 ok(inst != NULL, "Could not load scrrun.dll\n");
285
286 typelib = NULL;
287 hres = AtlLoadTypeLib(inst, NULL, &path, &typelib);
288 ok(hres == S_OK, "AtlLoadTypeLib failed: %08lx\n", hres);
289 FreeLibrary(inst);
290
292 ok(len > ARRAY_SIZE(L"\\scrrun.dll")
293 && lstrcmpiW(path+len-ARRAY_SIZE(L"\\scrrun.dll"), L"\\scrrun.dll"),
294 "unexpected path %s\n", wine_dbgstr_w(path));
296 ok(typelib != NULL, "typelib == NULL\n");
297 ITypeLib_Release(typelib);
298
299 inst = LoadLibraryA("mshtml.dll");
300 ok(inst != NULL, "Could not load mshtml.dll\n");
301
302 typelib = NULL;
303 hres = AtlLoadTypeLib(inst, NULL, &path, &typelib);
304 ok(hres == S_OK, "AtlLoadTypeLib failed: %08lx\n", hres);
305 FreeLibrary(inst);
306
308 ok(len > ARRAY_SIZE(L"\\mshtml.tlb")
309 && lstrcmpiW(path+len-ARRAY_SIZE(L"\\mshtml.tlb"), L"\\mshtml.tlb"),
310 "unexpected path %s\n", wine_dbgstr_w(path));
312 ok(typelib != NULL, "typelib == NULL\n");
313 ITypeLib_Release(typelib);
314}
#define ARRAY_SIZE(A)
Definition: main.h:20
HRESULT WINAPI AtlLoadTypeLib(HINSTANCE inst, LPCOLESTR lpszIndex, BSTR *pbstrPath, ITypeLib **ppTypeLib)
Definition: atl.c:337
#define FreeLibrary(x)
Definition: compat.h:748
OLECHAR * BSTR
Definition: compat.h:2293
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4171
GLenum GLsizei len
Definition: glext.h:6722
UINT WINAPI SysStringLen(BSTR str)
Definition: oleaut.c:198
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:273

Referenced by START_TEST().

◆ test_winmodule()

static void test_winmodule ( void  )
static

Definition at line 137 of file atl.c.

138{
139 _AtlCreateWndData create_data[3];
140 _ATL_WIN_MODULE winmod;
141 void *p;
143
144 winmod.cbSize = 0xdeadbeef;
145 hres = AtlWinModuleInit(&winmod);
146 ok(hres == E_INVALIDARG, "AtlWinModuleInit failed: %08lx\n", hres);
147
148 winmod.cbSize = sizeof(winmod);
149 winmod.m_pCreateWndList = (void*)0xdeadbeef;
150 winmod.m_csWindowCreate.LockCount = 0xdeadbeef;
151 winmod.m_rgWindowClassAtoms.m_aT = (void*)0xdeadbeef;
152 winmod.m_rgWindowClassAtoms.m_nSize = 0xdeadbeef;
153 winmod.m_rgWindowClassAtoms.m_nAllocSize = 0xdeadbeef;
154 hres = AtlWinModuleInit(&winmod);
155 ok(hres == S_OK, "AtlWinModuleInit failed: %08lx\n", hres);
156 ok(!winmod.m_pCreateWndList, "winmod.m_pCreateWndList = %p\n", winmod.m_pCreateWndList);
157 ok(winmod.m_csWindowCreate.LockCount == -1, "winmod.m_csWindowCreate.LockCount = %ld\n",
159 ok(winmod.m_rgWindowClassAtoms.m_aT == (void*)0xdeadbeef, "winmod.m_rgWindowClassAtoms.m_aT = %p\n",
161 ok(winmod.m_rgWindowClassAtoms.m_nSize == 0xdeadbeef, "winmod.m_rgWindowClassAtoms.m_nSize = %d\n",
163 ok(winmod.m_rgWindowClassAtoms.m_nAllocSize == 0xdeadbeef, "winmod.m_rgWindowClassAtoms.m_nAllocSize = %d\n",
165
167
168 AtlWinModuleAddCreateWndData(&winmod, create_data, (void*)0xdead0001);
169 ok(winmod.m_pCreateWndList == create_data, "winmod.m_pCreateWndList != create_data\n");
170 ok(create_data[0].m_pThis == (void*)0xdead0001, "unexpected create_data[0].m_pThis %p\n", create_data[0].m_pThis);
171 ok(create_data[0].m_dwThreadID == GetCurrentThreadId(), "unexpected create_data[0].m_dwThreadID %lx\n",
172 create_data[0].m_dwThreadID);
173 ok(!create_data[0].m_pNext, "unexpected create_data[0].m_pNext %p\n", create_data[0].m_pNext);
174
175 AtlWinModuleAddCreateWndData(&winmod, create_data+1, (void*)0xdead0002);
176 ok(winmod.m_pCreateWndList == create_data+1, "winmod.m_pCreateWndList != create_data\n");
177 ok(create_data[1].m_pThis == (void*)0xdead0002, "unexpected create_data[1].m_pThis %p\n", create_data[1].m_pThis);
178 ok(create_data[1].m_dwThreadID == GetCurrentThreadId(), "unexpected create_data[1].m_dwThreadID %lx\n",
179 create_data[1].m_dwThreadID);
180 ok(create_data[1].m_pNext == create_data, "unexpected create_data[1].m_pNext %p\n", create_data[1].m_pNext);
181
182 AtlWinModuleAddCreateWndData(&winmod, create_data+2, (void*)0xdead0003);
183 ok(winmod.m_pCreateWndList == create_data+2, "winmod.m_pCreateWndList != create_data\n");
184 ok(create_data[2].m_pThis == (void*)0xdead0003, "unexpected create_data[2].m_pThis %p\n", create_data[2].m_pThis);
185 ok(create_data[2].m_dwThreadID == GetCurrentThreadId(), "unexpected create_data[2].m_dwThreadID %lx\n",
186 create_data[2].m_dwThreadID);
187 ok(create_data[2].m_pNext == create_data+1, "unexpected create_data[2].m_pNext %p\n", create_data[2].m_pNext);
188
190 ok(p == (void*)0xdead0003, "unexpected AtlWinModuleExtractCreateWndData result %p\n", p);
191 ok(winmod.m_pCreateWndList == create_data+1, "winmod.m_pCreateWndList != create_data\n");
192 ok(create_data[2].m_pNext == create_data+1, "unexpected create_data[2].m_pNext %p\n", create_data[2].m_pNext);
193
194 create_data[1].m_dwThreadID = 0xdeadbeef;
195
197 ok(p == (void*)0xdead0001, "unexpected AtlWinModuleExtractCreateWndData result %p\n", p);
198 ok(winmod.m_pCreateWndList == create_data+1, "winmod.m_pCreateWndList != create_data\n");
199 ok(!create_data[0].m_pNext, "unexpected create_data[0].m_pNext %p\n", create_data[0].m_pNext);
200 ok(!create_data[1].m_pNext, "unexpected create_data[1].m_pNext %p\n", create_data[1].m_pNext);
201
203 ok(!p, "unexpected AtlWinModuleExtractCreateWndData result %p\n", p);
204 ok(winmod.m_pCreateWndList == create_data+1, "winmod.m_pCreateWndList != create_data\n");
205}
GLfloat GLfloat p
Definition: glext.h:8902
HRESULT WINAPI AtlWinModuleInit(_ATL_WIN_MODULE *)
void WINAPI AtlWinModuleAddCreateWndData(_ATL_WIN_MODULE *, _AtlCreateWndData *, void *)
void *WINAPI AtlWinModuleExtractCreateWndData(_ATL_WIN_MODULE *)
void * m_aT
Definition: atlbase.h:185
int m_nSize
Definition: atlbase.h:186
int m_nAllocSize
Definition: atlbase.h:187
CSimpleArray m_rgWindowClassAtoms
Definition: atlbase.h:203
CComCriticalSection m_csWindowCreate
Definition: atlbase.h:201
_AtlCreateWndData * m_pCreateWndList
Definition: atlbase.h:202
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:687
DWORD WINAPI GetCurrentThreadId(void)
Definition: thread.c:459

Referenced by START_TEST().

Variable Documentation

◆ advise_cnt

int advise_cnt
static

Definition at line 350 of file atl.c.

Referenced by ConnectionPoint_Advise(), ConnectionPoint_Unadvise(), and test_cp().

◆ CATID_CatTest1

const GUID CATID_CatTest1
static
Initial value:
=
{0x178fc163,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x46}}

Definition at line 39 of file atl.c.

Referenced by test_regcat().

◆ CATID_CatTest2

const GUID CATID_CatTest2
static
Initial value:
=
{0x178fc163,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x46}}

Definition at line 43 of file atl.c.

Referenced by test_regcat().

◆ clsid1W

const WCHAR clsid1W[] = L"{8856f961-340a-11d0-a96b-00c04fd705a2}"
static

Definition at line 47 of file atl.c.

Referenced by test_AtlAxCreateControl(), and test_ax_win().

◆ CLSID_Test

const GUID CLSID_Test
static
Initial value:
=
{0x178fc163,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x46}}

Definition at line 35 of file atl.c.

Referenced by ConnectionPointContainer_FindConnectionPoint(), run_registry_test(), run_test(), test_cp(), test_regcat(), and test_SxsLookupClrGuid().

◆ ConnectionPoint

◆ ConnectionPointContainer

◆ ConnectionPointContainerVtbl

const IConnectionPointContainerVtbl ConnectionPointContainerVtbl
static
Initial value:
= {
}
static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint(IConnectionPointContainer *iface, REFIID riid, IConnectionPoint **ppCP)
Definition: atl.c:418
static HRESULT WINAPI ConnectionPointContainer_QueryInterface(IConnectionPointContainer *iface, REFIID riid, void **ppv)
Definition: atl.c:389
static HRESULT WINAPI ConnectionPointContainer_EnumConnectionPoints(IConnectionPointContainer *iface, IEnumConnectionPoints **ppEnum)
Definition: atl.c:411
static ULONG WINAPI ConnectionPointContainer_AddRef(IConnectionPointContainer *iface)
Definition: atl.c:401
static ULONG WINAPI ConnectionPointContainer_Release(IConnectionPointContainer *iface)
Definition: atl.c:406

Definition at line 426 of file atl.c.

◆ ConnectionPointVtbl

const IConnectionPointVtbl ConnectionPointVtbl
static
Initial value:
=
{
}
static HRESULT WINAPI ConnectionPoint_Advise(IConnectionPoint *iface, IUnknown *pUnkSink, DWORD *pdwCookie)
Definition: atl.c:352
static HRESULT WINAPI ConnectionPoint_QueryInterface(IConnectionPoint *iface, REFIID riid, void **ppv)
Definition: atl.c:316
static HRESULT WINAPI ConnectionPoint_GetConnectionInterface(IConnectionPoint *iface, IID *pIID)
Definition: atl.c:337
static HRESULT WINAPI ConnectionPoint_Unadvise(IConnectionPoint *iface, DWORD dwCookie)
Definition: atl.c:361
static HRESULT WINAPI ConnectionPoint_GetConnectionPointContainer(IConnectionPoint *iface, IConnectionPointContainer **ppCPC)
Definition: atl.c:343
static HRESULT WINAPI ConnectionPoint_EnumConnections(IConnectionPoint *iface, IEnumConnections **ppEnum)
Definition: atl.c:368
static ULONG WINAPI ConnectionPoint_AddRef(IConnectionPoint *iface)
Definition: atl.c:327
static ULONG WINAPI ConnectionPoint_Release(IConnectionPoint *iface)
Definition: atl.c:332

Definition at line 375 of file atl.c.

◆ Dispatch

Definition at line 615 of file atl.c.

◆ DispatchVtbl

const IDispatchVtbl DispatchVtbl
static
Initial value:
= {
}
static HRESULT WINAPI Dispatch_GetTypeInfoCount(IDispatch *iface, UINT *pctinfo)
Definition: atl.c:565
static ULONG WINAPI Dispatch_Release(IDispatch *iface)
Definition: atl.c:560
static HRESULT WINAPI Dispatch_Invoke(IDispatch *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: atl.c:597
static HRESULT WINAPI Dispatch_GetTypeInfo(IDispatch *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: atl.c:571
static ULONG WINAPI Dispatch_AddRef(IDispatch *iface)
Definition: atl.c:555
static HRESULT WINAPI Dispatch_QueryInterface(IDispatch *iface, REFIID riid, void **ppv)
Definition: atl.c:530
static HRESULT WINAPI Dispatch_GetIDsOfNames(IDispatch *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: atl.c:590

Definition at line 605 of file atl.c.

◆ html_str

◆ mshtml1W

const WCHAR mshtml1W[] = L"mshtml:<html><body>test</body></html>"
static

Definition at line 49 of file atl.c.

Referenced by test_AtlAxCreateControl(), and test_ax_win().

◆ mshtml2W

const WCHAR mshtml2W[] = L"MSHTML:<html><body>test</body></html>"
static

Definition at line 50 of file atl.c.

Referenced by test_AtlAxCreateControl(), and test_ax_win().

◆ mshtml3W

const WCHAR mshtml3W[] = L"<html><body>test</body></html>"
static

Definition at line 51 of file atl.c.

Referenced by test_AtlAxCreateControl(), and test_ax_win().

◆ Persist

IPersist Persist = { &PersistVtbl }
static

Definition at line 488 of file atl.c.

Referenced by cmdUse(), Dispatch_QueryInterface(), test_domain_password(), and test_generic().

◆ persist_clsid

CLSID persist_clsid
static

Definition at line 457 of file atl.c.

Referenced by Persist_GetClassID(), and test_source_iface().

◆ PersistVtbl

const IPersistVtbl PersistVtbl
static
Initial value:
= {
}
static HRESULT WINAPI Persist_GetClassID(IPersist *iface, CLSID *pClassID)
Definition: atl.c:475
static HRESULT WINAPI Persist_QueryInterface(IPersist *iface, REFIID riid, void **ppv)
Definition: atl.c:459
static ULONG WINAPI Persist_AddRef(IPersist *iface)
Definition: atl.c:465
static ULONG WINAPI Persist_Release(IPersist *iface)
Definition: atl.c:470

Definition at line 481 of file atl.c.

◆ progid1W

const WCHAR progid1W[] = L"Shell.Explorer.2"
static

Definition at line 46 of file atl.c.

Referenced by test_AtlAxCreateControl(), and test_ax_win().

◆ ProvideClassInfo2

IProvideClassInfo2 ProvideClassInfo2 = { &ProvideClassInfo2Vtbl }
static

Definition at line 527 of file atl.c.

Referenced by Dispatch_QueryInterface().

◆ ProvideClassInfo2Vtbl

const IProvideClassInfo2Vtbl ProvideClassInfo2Vtbl
static
Initial value:
= {
}
static ULONG WINAPI ProvideClassInfo2_AddRef(IProvideClassInfo2 *iface)
Definition: atl.c:496
static HRESULT WINAPI ProvideClassInfo2_GetGUID(IProvideClassInfo2 *iface, DWORD dwGuidKind, GUID *pGUID)
Definition: atl.c:512
static HRESULT WINAPI ProvideClassInfo2_QueryInterface(IProvideClassInfo2 *iface, REFIID riid, void **ppv)
Definition: atl.c:490
static HRESULT WINAPI ProvideClassInfo2_GetClassInfo(IProvideClassInfo2 *iface, ITypeInfo **ppTI)
Definition: atl.c:506
static ULONG WINAPI ProvideClassInfo2_Release(IProvideClassInfo2 *iface)
Definition: atl.c:501

Definition at line 519 of file atl.c.

◆ support_classinfo2

BOOL support_classinfo2
static

Definition at line 528 of file atl.c.

Referenced by Dispatch_QueryInterface(), and test_source_iface().

◆ url1W

const WCHAR url1W[] = L"http://test.winehq.org/tests/winehq_snapshot/"
static

Definition at line 48 of file atl.c.

Referenced by test_AtlAxCreateControl(), and test_ax_win().