ReactOS  0.4.14-dev-608-gd495a4f
ordinal.c File Reference
#include <stdio.h>
#include "wine/test.h"
#include "winbase.h"
#include "winerror.h"
#include "winuser.h"
#include "ole2.h"
#include "oaidl.h"
#include "ocidl.h"
#include "mlang.h"
#include "shlwapi.h"
#include "docobj.h"
#include "shobjidl.h"
#include "shlobj.h"
Include dependency graph for ordinal.c:

Go to the source code of this file.

Classes

struct  SHELL_USER_SID
 
struct  SHELL_USER_PERMISSION
 
struct  call_entry_t
 
struct  call_trace_t
 
struct  shared_struct
 
struct  _disp
 
struct  _contain
 
struct  _cntptn
 
struct  _enum
 
struct  _enumpt
 
struct  _propbag
 
struct  IOleCommandTargetImpl
 
struct  IServiceProviderImpl
 
struct  IProfferServiceImpl< T >
 

Macros

#define COBJMACROS
 
#define CONST_VTABLE
 
#define ok_trace(a, b)   ok_trace_(a, b, __LINE__)
 
#define MY_INHERITANCE   0xBE /* invalid value to proof behavior */
 
#define UNICODE_LTR_MARK   0x200e
 
#define UNICODE_RTL_MARK   0x200f
 
#define verify_inifile(f, e)   r_verify_inifile(__LINE__, f, e)
 
#define MAKEFUNC(f, ord)   (p##f = (void*)GetProcAddress(hShlwapi, (LPSTR)(ord)))
 

Typedefs

typedef struct SHELL_USER_SID SHELL_USER_SID
 
typedef struct SHELL_USER_SIDPSHELL_USER_SID
 
typedef struct SHELL_USER_PERMISSION SHELL_USER_PERMISSION
 
typedef struct SHELL_USER_PERMISSIONPSHELL_USER_PERMISSION
 
typedef struct _disp Disp
 
typedef struct _contain Contain
 
typedef struct _cntptn ConPt
 
typedef struct _enum EnumCon
 
typedef struct _enumpt EnumPt
 
typedef struct _propbag PropBag
 

Enumerations

enum  _shellkey_flags {
  SHKEY_Root_HKCU = 0x1, SHKEY_Root_HKLM = 0x2, SHKEY_Key_Explorer = 0x00, SHKEY_Key_Shell = 0x10,
  SHKEY_Key_ShellNoRoam = 0x20, SHKEY_Key_Classes = 0x30, SHKEY_Subkey_Default = 0x0000, SHKEY_Subkey_ResourceName = 0x1000,
  SHKEY_Subkey_Handlers = 0x2000, SHKEY_Subkey_Associations = 0x3000, SHKEY_Subkey_Volatile = 0x4000, SHKEY_Subkey_MUICache = 0x5000,
  SHKEY_Subkey_FileExts = 0x6000
}
 

Functions

static int (WINAPI *pSHSearchMapInt)(const int *
 
static HRESULT (WINAPI *pGetAcceptLanguagesA)(LPSTR
 
static HANDLE (WINAPI *pSHAllocShared)(LPCVOID
 
static LPVOID (WINAPI *pSHLockShared)(HANDLE
 
static BOOL (WINAPI *pSHUnlockShared)(LPVOID)
 
static HRESULT (WINAPIV *pSHPackDispParams)(DISPPARAMS *
 
static LONG (WINAPI *pSHSetWindowBits)(HWND
 
static INT (WINAPI *pSHFormatDateTimeA)(const FILETIME UNALIGNED *
 
static DWORD (WINAPI *pSHGetObjectCompatFlags)(IUnknown *
 
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HWND (WINAPI *pSHCreateWorkerWindowA)(LONG
 
static HKEY (WINAPI *pSHGetShellKey)(DWORD
 
static SECURITY_DESCRIPTOR *WINAPIpGetShellSecurityDescriptor (const SHELL_USER_PERMISSION **, int)
 
static int strcmp_wa (LPCWSTR strw, const char *stra)
 
static void init_call_trace (call_trace_t *ctrace)
 
static void free_call_trace (const call_trace_t *ctrace)
 
static void add_call (call_trace_t *ctrace, int id, const void *arg0, const void *arg1, const void *arg2, const void *arg3, const void *arg4)
 
static void ok_trace_ (call_trace_t *texpected, call_trace_t *tgot, int line)
 
static void test_GetAcceptLanguagesA (void)
 
static void test_SHSearchMapInt (void)
 
static void test_alloc_shared (int argc, char **argv)
 
static void test_alloc_shared_remote (DWORD procid, HANDLE hmem)
 
static void test_fdsa (void)
 
static void test_GetShellSecurityDescriptor (void)
 
static void test_SHPackDispParams (void)
 
static Dispimpl_from_IDispatch (IDispatch *iface)
 
static Containimpl_from_IConnectionPointContainer (IConnectionPointContainer *iface)
 
static ConPtimpl_from_IConnectionPoint (IConnectionPoint *iface)
 
static EnumConimpl_from_IEnumConnections (IEnumConnections *iface)
 
static EnumPtimpl_from_IEnumConnectionPoints (IEnumConnectionPoints *iface)
 
static HRESULT WINAPI Disp_QueryInterface (IDispatch *This, REFIID riid, void **ppvObject)
 
static ULONG WINAPI Disp_AddRef (IDispatch *This)
 
static ULONG WINAPI Disp_Release (IDispatch *This)
 
static HRESULT WINAPI Disp_GetTypeInfoCount (IDispatch *This, UINT *pctinfo)
 
static HRESULT WINAPI Disp_GetTypeInfo (IDispatch *This, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI Disp_GetIDsOfNames (IDispatch *This, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI Disp_Invoke (IDispatch *This, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI Enum_QueryInterface (IEnumConnections *This, REFIID riid, void **ppvObject)
 
static ULONG WINAPI Enum_AddRef (IEnumConnections *This)
 
static ULONG WINAPI Enum_Release (IEnumConnections *This)
 
static HRESULT WINAPI Enum_Next (IEnumConnections *This, ULONG cConnections, LPCONNECTDATA rgcd, ULONG *pcFetched)
 
static HRESULT WINAPI Enum_Skip (IEnumConnections *This, ULONG cConnections)
 
static HRESULT WINAPI Enum_Reset (IEnumConnections *This)
 
static HRESULT WINAPI Enum_Clone (IEnumConnections *This, IEnumConnections **ppEnum)
 
static HRESULT WINAPI ConPt_QueryInterface (IConnectionPoint *This, REFIID riid, void **ppvObject)
 
static ULONG WINAPI ConPt_AddRef (IConnectionPoint *This)
 
static ULONG WINAPI ConPt_Release (IConnectionPoint *This)
 
static HRESULT WINAPI ConPt_GetConnectionInterface (IConnectionPoint *This, IID *pIID)
 
static HRESULT WINAPI ConPt_GetConnectionPointContainer (IConnectionPoint *This, IConnectionPointContainer **ppCPC)
 
static HRESULT WINAPI ConPt_Advise (IConnectionPoint *This, IUnknown *pUnkSink, DWORD *pdwCookie)
 
static HRESULT WINAPI ConPt_Unadvise (IConnectionPoint *This, DWORD dwCookie)
 
static HRESULT WINAPI ConPt_EnumConnections (IConnectionPoint *This, IEnumConnections **ppEnum)
 
static HRESULT WINAPI EnumPt_QueryInterface (IEnumConnectionPoints *This, REFIID riid, void **ppvObject)
 
static ULONG WINAPI EnumPt_AddRef (IEnumConnectionPoints *This)
 
static ULONG WINAPI EnumPt_Release (IEnumConnectionPoints *This)
 
static HRESULT WINAPI EnumPt_Next (IEnumConnectionPoints *This, ULONG cConnections, IConnectionPoint **rgcd, ULONG *pcFetched)
 
static HRESULT WINAPI EnumPt_Skip (IEnumConnectionPoints *This, ULONG cConnections)
 
static HRESULT WINAPI EnumPt_Reset (IEnumConnectionPoints *This)
 
static HRESULT WINAPI EnumPt_Clone (IEnumConnectionPoints *This, IEnumConnectionPoints **ppEnumPt)
 
static HRESULT WINAPI Contain_QueryInterface (IConnectionPointContainer *This, REFIID riid, void **ppvObject)
 
static ULONG WINAPI Contain_AddRef (IConnectionPointContainer *This)
 
static ULONG WINAPI Contain_Release (IConnectionPointContainer *This)
 
static HRESULT WINAPI Contain_EnumConnectionPoints (IConnectionPointContainer *This, IEnumConnectionPoints **ppEnum)
 
static HRESULT WINAPI Contain_FindConnectionPoint (IConnectionPointContainer *This, REFIID riid, IConnectionPoint **ppCP)
 
static void test_IConnectionPoint (void)
 
static PropBagimpl_from_IPropertyBag (IPropertyBag *iface)
 
static HRESULT WINAPI Prop_QueryInterface (IPropertyBag *This, REFIID riid, void **ppvObject)
 
static ULONG WINAPI Prop_AddRef (IPropertyBag *This)
 
static ULONG WINAPI Prop_Release (IPropertyBag *This)
 
static HRESULT WINAPI Prop_Read (IPropertyBag *This, LPCOLESTR pszPropName, VARIANT *pVar, IErrorLog *pErrorLog)
 
static HRESULT WINAPI Prop_Write (IPropertyBag *This, LPCOLESTR pszPropName, VARIANT *pVar)
 
static void test_SHPropertyBag_ReadLONG (void)
 
static void test_SHSetWindowBits (void)
 
static void test_SHFormatDateTimeA (void)
 
static void test_SHFormatDateTimeW (void)
 
static void test_SHGetObjectCompatFlags (void)
 
static IOleCommandTargetImplimpl_from_IOleCommandTarget (IOleCommandTarget *iface)
 
static IOleCommandTargetIOleCommandTargetImpl_Construct (void)
 
static HRESULT WINAPI IOleCommandTargetImpl_QueryInterface (IOleCommandTarget *iface, REFIID riid, void **ppvObj)
 
static ULONG WINAPI IOleCommandTargetImpl_AddRef (IOleCommandTarget *iface)
 
static ULONG WINAPI IOleCommandTargetImpl_Release (IOleCommandTarget *iface)
 
static HRESULT WINAPI IOleCommandTargetImpl_QueryStatus (IOleCommandTarget *iface, const GUID *group, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText)
 
static HRESULT WINAPI IOleCommandTargetImpl_Exec (IOleCommandTarget *iface, const GUID *CmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
 
static IServiceProviderImplimpl_from_IServiceProvider (IServiceProvider *iface)
 
static IProfferServiceImplimpl_from_IProfferService (IProfferService *iface)
 
static IServiceProviderIServiceProviderImpl_Construct (void)
 
static IProfferServiceIProfferServiceImpl_Construct (void)
 
static HRESULT WINAPI IServiceProviderImpl_QueryInterface (IServiceProvider *iface, REFIID riid, void **ppvObj)
 
static ULONG WINAPI IServiceProviderImpl_AddRef (IServiceProvider *iface)
 
static ULONG WINAPI IServiceProviderImpl_Release (IServiceProvider *iface)
 
static HRESULT WINAPI IServiceProviderImpl_QueryService (IServiceProvider *iface, REFGUID service, REFIID riid, void **ppv)
 
static void test_IUnknown_QueryServiceExec (void)
 
static HRESULT WINAPI IProfferServiceImpl_QueryInterface (IProfferService *iface, REFIID riid, void **ppvObj)
 
static ULONG WINAPI IProfferServiceImpl_AddRef (IProfferService *iface)
 
static ULONG WINAPI IProfferServiceImpl_Release (IProfferService *iface)
 
static HRESULT WINAPI IProfferServiceImpl_ProfferService (IProfferService *iface, REFGUID service, IServiceProvider *pService, DWORD *pCookie)
 
static HRESULT WINAPI IProfferServiceImpl_RevokeService (IProfferService *iface, DWORD cookie)
 
static void test_IUnknown_ProfferService (void)
 
static void test_SHCreateWorkerWindowA (void)
 
static HRESULT WINAPI SF_QueryInterface (IShellFolder *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI SF_AddRef (IShellFolder *iface)
 
static ULONG WINAPI SF_Release (IShellFolder *iface)
 
static HRESULT WINAPI SF_ParseDisplayName (IShellFolder *iface, HWND owner, LPBC reserved, LPOLESTR displayName, ULONG *eaten, LPITEMIDLIST *idl, ULONG *attr)
 
static HRESULT WINAPI SF_EnumObjects (IShellFolder *iface, HWND owner, SHCONTF flags, IEnumIDList **enm)
 
static HRESULT WINAPI SF_BindToObject (IShellFolder *iface, LPCITEMIDLIST idl, LPBC reserved, REFIID riid, void **obj)
 
static HRESULT WINAPI SF_BindToStorage (IShellFolder *iface, LPCITEMIDLIST idl, LPBC reserved, REFIID riid, void **obj)
 
static HRESULT WINAPI SF_CompareIDs (IShellFolder *iface, LPARAM lparam, LPCITEMIDLIST idl1, LPCITEMIDLIST idl2)
 
static HRESULT WINAPI SF_CreateViewObject (IShellFolder *iface, HWND owner, REFIID riid, void **out)
 
static HRESULT WINAPI SF_GetAttributesOf (IShellFolder *iface, UINT cidl, LPCITEMIDLIST *idl, SFGAOF *inOut)
 
static HRESULT WINAPI SF_GetUIObjectOf (IShellFolder *iface, HWND owner, UINT cidl, LPCITEMIDLIST *idls, REFIID riid, UINT *inOut, void **out)
 
static HRESULT WINAPI SF_GetDisplayNameOf (IShellFolder *iface, LPCITEMIDLIST idl, SHGDNF flags, STRRET *name)
 
static HRESULT WINAPI SF_SetNameOf (IShellFolder *iface, HWND hwnd, LPCITEMIDLIST idl, LPCOLESTR name, SHGDNF flags, LPITEMIDLIST *idlOut)
 
static void test_SHIShellFolder_EnumObjects (void)
 
static BOOL write_inifile (LPCWSTR filename)
 
static void r_verify_inifile (unsigned l, LPCWSTR filename, LPCSTR exp)
 
static void test_SHGetIniString (void)
 
static void test_SHSetIniString (void)
 
static void test_SHGetShellKey (void)
 
static void init_pointers (void)
 
static void test_SHSetParentHwnd (void)
 
static HRESULT WINAPI testpersist_QI (IPersist *iface, REFIID riid, void **obj)
 
static HRESULT WINAPI testpersist_QI2 (IPersist *iface, REFIID riid, void **obj)
 
static ULONG WINAPI testpersist_AddRef (IPersist *iface)
 
static ULONG WINAPI testpersist_Release (IPersist *iface)
 
static HRESULT WINAPI testpersist_GetClassID (IPersist *iface, CLSID *clsid)
 
static void test_IUnknown_GetClassID (void)
 
static void test_DllGetVersion (void)
 
 START_TEST (ordinal)
 

Variables

static HMODULE hShlwapi
 
static const int int
 
static LPDWORD
 
static DWORD
 
static VARIANTARG UINT
 
static VARIANTARG static DISPID
 
static REFIID
 
static BOOL
 
static IUnknown IConnectionPoint **static LPCWSTR
 
static IUnknown IConnectionPoint **static LPLONG
 
static INT
 
static DWORD LPSTR
 
static DWORD LPWSTR
 
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static REFGUID
 
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HWND
 
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
 
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static LONG_PTR
 
static SHCONTF
 
static const CHAR ie_international []
 
static const CHAR acceptlanguage []
 
static call_trace_t trace_got
 
static const IDispatchVtbl disp_vtbl
 
static const IEnumConnectionsVtbl enum_vtbl
 
static const IConnectionPointVtbl point_vtbl
 
static const IEnumConnectionPointsVtbl enumpt_vtbl
 
static const IConnectionPointContainerVtbl contain_vtbl
 
static const IPropertyBagVtbl prop_vtbl
 
static const IOleCommandTargetVtbl IOleCommandTargetImpl_Vtbl
 
static const IServiceProviderVtbl IServiceProviderImpl_Vtbl
 
static const IProfferServiceVtbl IProfferServiceImpl_Vtbl
 
static IShellFolderVtbl ShellFolderVtbl
 
static IShellFolder ShellFolder = { &ShellFolderVtbl }
 
static IPersistVtbl testpersistvtbl
 
static IPersistVtbl testpersist2vtbl
 
static IPersist testpersist = { &testpersistvtbl }
 
static IPersist testpersist2 = { &testpersist2vtbl }
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 22 of file ordinal.c.

◆ CONST_VTABLE

#define CONST_VTABLE

Definition at line 23 of file ordinal.c.

◆ MAKEFUNC

#define MAKEFUNC (   f,
  ord 
)    (p##f = (void*)GetProcAddress(hShlwapi, (LPSTR)(ord)))

◆ MY_INHERITANCE

#define MY_INHERITANCE   0xBE /* invalid value to proof behavior */

◆ ok_trace

#define ok_trace (   a,
  b 
)    ok_trace_(a, b, __LINE__)

Definition at line 174 of file ordinal.c.

◆ UNICODE_LTR_MARK

#define UNICODE_LTR_MARK   0x200e

◆ UNICODE_RTL_MARK

#define UNICODE_RTL_MARK   0x200f

◆ verify_inifile

#define verify_inifile (   f,
  e 
)    r_verify_inifile(__LINE__, f, e)

Definition at line 2693 of file ordinal.c.

Typedef Documentation

◆ ConPt

typedef struct _cntptn ConPt

◆ Contain

◆ Disp

typedef struct _disp Disp

◆ EnumCon

typedef struct _enum EnumCon

◆ EnumPt

◆ PropBag

◆ PSHELL_USER_PERMISSION

◆ PSHELL_USER_SID

◆ SHELL_USER_PERMISSION

◆ SHELL_USER_SID

Enumeration Type Documentation

◆ _shellkey_flags

Enumerator
SHKEY_Root_HKCU 
SHKEY_Root_HKLM 
SHKEY_Key_Explorer 
SHKEY_Key_Shell 
SHKEY_Key_ShellNoRoam 
SHKEY_Key_Classes 
SHKEY_Subkey_Default 
SHKEY_Subkey_ResourceName 
SHKEY_Subkey_Handlers 
SHKEY_Subkey_Associations 
SHKEY_Subkey_Volatile 
SHKEY_Subkey_MUICache 
SHKEY_Subkey_FileExts 

Definition at line 2799 of file ordinal.c.

Function Documentation

◆ add_call()

static void add_call ( call_trace_t ctrace,
int  id,
const void arg0,
const void arg1,
const void arg2,
const void arg3,
const void arg4 
)
static

Definition at line 128 of file ordinal.c.

130 {
131  call_entry_t call;
132 
133  call.id = id;
134  call.args[0] = arg0;
135  call.args[1] = arg1;
136  call.args[2] = arg2;
137  call.args[3] = arg3;
138  call.args[4] = arg4;
139 
140  if (ctrace->count == ctrace->alloc)
141  {
142  ctrace->alloc *= 2;
143  ctrace->calls = HeapReAlloc(GetProcessHeap(),0, ctrace->calls, ctrace->alloc*sizeof(call_entry_t));
144  }
145 
146  ctrace->calls[ctrace->count++] = call;
147 }
GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg2
Definition: glext.h:9514
GLuint GLuint GLuint GLuint arg1
Definition: glext.h:9513
Definition: ordinal.c:105
GLuint GLuint GLuint GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg3
Definition: glext.h:9515
#define GetProcessHeap()
Definition: compat.h:403
call_entry_t * calls
Definition: ordinal.c:111
int id
Definition: ordinal.c:106
#define HeapReAlloc
Definition: compat.h:401
GLenum GLuint id
Definition: glext.h:5579
const void * args[5]
Definition: ordinal.c:107

Referenced by IOleCommandTargetImpl_Exec(), IProfferServiceImpl_ProfferService(), IProfferServiceImpl_QueryInterface(), IProfferServiceImpl_RevokeService(), IServiceProviderImpl_QueryInterface(), IServiceProviderImpl_QueryService(), test_IUnknown_ProfferService(), and test_IUnknown_QueryServiceExec().

◆ BOOL()

static BOOL ( WINAPI pSHUnlockShared)
static

◆ ConPt_AddRef()

static ULONG WINAPI ConPt_AddRef ( IConnectionPoint This)
static

Definition at line 1127 of file ordinal.c.

1129 {
1131  return InterlockedIncrement(&iface->refCount);
1132 }
static ConPt * impl_from_IConnectionPoint(IConnectionPoint *iface)
Definition: ordinal.c:863
#define InterlockedIncrement
Definition: armddk.h:53
LONG refCount
Definition: ordinal.c:855

◆ ConPt_Advise()

static HRESULT WINAPI ConPt_Advise ( IConnectionPoint This,
IUnknown pUnkSink,
DWORD pdwCookie 
)
static

Definition at line 1184 of file ordinal.c.

1188 {
1190 
1191  if (iface->sinkCount == 0)
1192  iface->sink = HeapAlloc(GetProcessHeap(),0,sizeof(IUnknown*));
1193  else
1194  iface->sink = HeapReAlloc(GetProcessHeap(),0,iface->sink,sizeof(IUnknown*)*(iface->sinkCount+1));
1195  iface->sink[iface->sinkCount] = pUnkSink;
1196  IUnknown_AddRef(pUnkSink);
1197  iface->sinkCount++;
1198  *pdwCookie = iface->sinkCount;
1199  return S_OK;
1200 }
IUnknown ** sink
Definition: ordinal.c:860
static ConPt * impl_from_IConnectionPoint(IConnectionPoint *iface)
Definition: ordinal.c:863
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define S_OK
Definition: intsafe.h:59
UINT sinkCount
Definition: ordinal.c:859
#define HeapReAlloc
Definition: compat.h:401

◆ ConPt_EnumConnections()

static HRESULT WINAPI ConPt_EnumConnections ( IConnectionPoint This,
IEnumConnections **  ppEnum 
)
static

Definition at line 1218 of file ordinal.c.

1221 {
1222  EnumCon *ec;
1223 
1224  ec = HeapAlloc(GetProcessHeap(),0,sizeof(EnumCon));
1225  ec->IEnumConnections_iface.lpVtbl = &enum_vtbl;
1226  ec->refCount = 1;
1228  ec->idx = 0;
1229  *ppEnum = &ec->IEnumConnections_iface;
1230 
1231  return S_OK;
1232 }
LONG refCount
Definition: ordinal.c:871
IEnumConnections IEnumConnections_iface
Definition: ordinal.c:870
static ConPt * impl_from_IConnectionPoint(IConnectionPoint *iface)
Definition: ordinal.c:863
Definition: ordinal.c:868
ConPt * pt
Definition: ordinal.c:874
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
UINT idx
Definition: ordinal.c:873
#define S_OK
Definition: intsafe.h:59
static const IEnumConnectionsVtbl enum_vtbl
Definition: ordinal.c:1094

◆ ConPt_GetConnectionInterface()

static HRESULT WINAPI ConPt_GetConnectionInterface ( IConnectionPoint This,
IID pIID 
)
static

Definition at line 1158 of file ordinal.c.

1161 {
1162  static int i = 0;
1164  if (i==0)
1165  {
1166  i++;
1167  return E_FAIL;
1168  }
1169  else
1170  memcpy(pIID,&iface->id,sizeof(GUID));
1171  return S_OK;
1172 }
static ConPt * impl_from_IConnectionPoint(IConnectionPoint *iface)
Definition: ordinal.c:863
#define E_FAIL
Definition: ddrawi.h:102
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
GUID id
Definition: ordinal.c:858
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define S_OK
Definition: intsafe.h:59

◆ ConPt_GetConnectionPointContainer()

static HRESULT WINAPI ConPt_GetConnectionPointContainer ( IConnectionPoint This,
IConnectionPointContainer **  ppCPC 
)
static

Definition at line 1174 of file ordinal.c.

1177 {
1179 
1180  *ppCPC = &iface->container->IConnectionPointContainer_iface;
1181  return S_OK;
1182 }
IConnectionPointContainer IConnectionPointContainer_iface
Definition: ordinal.c:840
static ConPt * impl_from_IConnectionPoint(IConnectionPoint *iface)
Definition: ordinal.c:863
Contain * container
Definition: ordinal.c:857
#define S_OK
Definition: intsafe.h:59

◆ ConPt_QueryInterface()

static HRESULT WINAPI ConPt_QueryInterface ( IConnectionPoint This,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 1105 of file ordinal.c.

1109 {
1110  *ppvObject = NULL;
1111 
1113  {
1114  *ppvObject = This;
1115  }
1116 
1117  if (*ppvObject)
1118  {
1119  IConnectionPoint_AddRef(This);
1120  return S_OK;
1121  }
1122 
1123  trace("no interface\n");
1124  return E_NOINTERFACE;
1125 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
smooth NULL
Definition: ftsmooth.c:416
#define trace
Definition: atltest.h:70
const GUID IID_IUnknown
REFIID LPVOID * ppvObject
Definition: precomp.h:44
const GUID IID_IConnectionPoint
#define S_OK
Definition: intsafe.h:59
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ ConPt_Release()

static ULONG WINAPI ConPt_Release ( IConnectionPoint This)
static

Definition at line 1134 of file ordinal.c.

1136 {
1138  ULONG ret;
1139 
1140  ret = InterlockedDecrement(&iface->refCount);
1141  if (ret == 0)
1142  {
1143  if (iface->sinkCount > 0)
1144  {
1145  int i;
1146  for (i = 0; i < iface->sinkCount; i++)
1147  {
1148  if (iface->sink[i])
1149  IUnknown_Release(iface->sink[i]);
1150  }
1151  HeapFree(GetProcessHeap(),0,iface->sink);
1152  }
1154  }
1155  return ret;
1156 }
IUnknown ** sink
Definition: ordinal.c:860
static ConPt * impl_from_IConnectionPoint(IConnectionPoint *iface)
Definition: ordinal.c:863
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 GetProcessHeap()
Definition: compat.h:403
int ret
#define InterlockedDecrement
Definition: armddk.h:52
UINT sinkCount
Definition: ordinal.c:859
unsigned int ULONG
Definition: retypes.h:1
LONG refCount
Definition: ordinal.c:855
#define HeapFree(x, y, z)
Definition: compat.h:402

◆ ConPt_Unadvise()

static HRESULT WINAPI ConPt_Unadvise ( IConnectionPoint This,
DWORD  dwCookie 
)
static

Definition at line 1202 of file ordinal.c.

1205 {
1207 
1208  if (dwCookie > iface->sinkCount)
1209  return E_FAIL;
1210  else
1211  {
1212  IUnknown_Release(iface->sink[dwCookie-1]);
1213  iface->sink[dwCookie-1] = NULL;
1214  }
1215  return S_OK;
1216 }
IUnknown ** sink
Definition: ordinal.c:860
static ConPt * impl_from_IConnectionPoint(IConnectionPoint *iface)
Definition: ordinal.c:863
#define E_FAIL
Definition: ddrawi.h:102
smooth NULL
Definition: ftsmooth.c:416
#define S_OK
Definition: intsafe.h:59
UINT sinkCount
Definition: ordinal.c:859

◆ Contain_AddRef()

static ULONG WINAPI Contain_AddRef ( IConnectionPointContainer This)
static

Definition at line 1359 of file ordinal.c.

1361 {
1363  return InterlockedIncrement(&iface->refCount);
1364 }
static Contain * impl_from_IConnectionPointContainer(IConnectionPointContainer *iface)
Definition: ordinal.c:847
LONG refCount
Definition: ordinal.c:841
#define InterlockedIncrement
Definition: armddk.h:53

◆ Contain_EnumConnectionPoints()

static HRESULT WINAPI Contain_EnumConnectionPoints ( IConnectionPointContainer This,
IEnumConnectionPoints **  ppEnum 
)
static

Definition at line 1387 of file ordinal.c.

1390 {
1391  EnumPt *ec;
1392 
1393  ec = HeapAlloc(GetProcessHeap(),0,sizeof(EnumPt));
1395  ec->refCount = 1;
1396  ec->idx= 0;
1398  *ppEnum = &ec->IEnumConnectionPoints_iface;
1399 
1400  return S_OK;
1401 }
Contain * container
Definition: ordinal.c:888
static Contain * impl_from_IConnectionPointContainer(IConnectionPointContainer *iface)
Definition: ordinal.c:847
IEnumConnectionPoints IEnumConnectionPoints_iface
Definition: ordinal.c:884
static const IEnumConnectionPointsVtbl enumpt_vtbl
Definition: ordinal.c:1326
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define S_OK
Definition: intsafe.h:59
int idx
Definition: ordinal.c:887
LONG refCount
Definition: ordinal.c:885

◆ Contain_FindConnectionPoint()

static HRESULT WINAPI Contain_FindConnectionPoint ( IConnectionPointContainer This,
REFIID  riid,
IConnectionPoint **  ppCP 
)
static

Definition at line 1403 of file ordinal.c.

1407 {
1409  ConPt *pt;
1410 
1411  if (!IsEqualIID(riid, &IID_NULL) || iface->ptCount ==0)
1412  {
1413  pt = HeapAlloc(GetProcessHeap(),0,sizeof(ConPt));
1414  pt->IConnectionPoint_iface.lpVtbl = &point_vtbl;
1415  pt->refCount = 1;
1416  pt->sinkCount = 0;
1417  pt->sink = NULL;
1418  pt->container = iface;
1419  pt->id = IID_IDispatch;
1420 
1421  if (iface->ptCount == 0)
1422  iface->pt =HeapAlloc(GetProcessHeap(),0,sizeof(IUnknown*));
1423  else
1424  iface->pt = HeapReAlloc(GetProcessHeap(),0,iface->pt,sizeof(IUnknown*)*(iface->ptCount+1));
1425  iface->pt[iface->ptCount] = &pt->IConnectionPoint_iface;
1426  iface->ptCount++;
1427 
1428  *ppCP = &pt->IConnectionPoint_iface;
1429  }
1430  else
1431  {
1432  *ppCP = iface->pt[0];
1433  IUnknown_AddRef((IUnknown*)*ppCP);
1434  }
1435 
1436  return S_OK;
1437 }
static Contain * impl_from_IConnectionPointContainer(IConnectionPointContainer *iface)
Definition: ordinal.c:847
#define pt(x, y)
Definition: drawing.c:79
REFIID riid
Definition: precomp.h:44
static const IConnectionPointVtbl point_vtbl
Definition: ordinal.c:1234
smooth NULL
Definition: ftsmooth.c:416
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
IConnectionPoint ** pt
Definition: ordinal.c:844
const GUID IID_IDispatch
#define IID_NULL
Definition: guiddef.h:98
#define S_OK
Definition: intsafe.h:59
#define HeapReAlloc
Definition: compat.h:401
UINT ptCount
Definition: ordinal.c:843
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ Contain_QueryInterface()

static HRESULT WINAPI Contain_QueryInterface ( IConnectionPointContainer This,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 1337 of file ordinal.c.

1341 {
1342  *ppvObject = NULL;
1343 
1345  {
1346  *ppvObject = This;
1347  }
1348 
1349  if (*ppvObject)
1350  {
1351  IConnectionPointContainer_AddRef(This);
1352  return S_OK;
1353  }
1354 
1355  trace("no interface\n");
1356  return E_NOINTERFACE;
1357 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
const GUID IID_IConnectionPointContainer
smooth NULL
Definition: ftsmooth.c:416
#define trace
Definition: atltest.h:70
const GUID IID_IUnknown
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define S_OK
Definition: intsafe.h:59
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ Contain_Release()

static ULONG WINAPI Contain_Release ( IConnectionPointContainer This)
static

Definition at line 1366 of file ordinal.c.

1368 {
1370  ULONG ret;
1371 
1372  ret = InterlockedDecrement(&iface->refCount);
1373  if (ret == 0)
1374  {
1375  if (iface->ptCount > 0)
1376  {
1377  int i;
1378  for (i = 0; i < iface->ptCount; i++)
1379  IConnectionPoint_Release(iface->pt[i]);
1380  HeapFree(GetProcessHeap(),0,iface->pt);
1381  }
1383  }
1384  return ret;
1385 }
static Contain * impl_from_IConnectionPointContainer(IConnectionPointContainer *iface)
Definition: ordinal.c:847
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
LONG refCount
Definition: ordinal.c:841
#define GetProcessHeap()
Definition: compat.h:403
IConnectionPoint ** pt
Definition: ordinal.c:844
int ret
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1
UINT ptCount
Definition: ordinal.c:843
#define HeapFree(x, y, z)
Definition: compat.h:402

◆ Disp_AddRef()

static ULONG WINAPI Disp_AddRef ( IDispatch This)
static

Definition at line 919 of file ordinal.c.

920 {
921  Disp *iface = impl_from_IDispatch(This);
922  return InterlockedIncrement(&iface->refCount);
923 }
LONG refCount
Definition: ordinal.c:830
static Disp * impl_from_IDispatch(IDispatch *iface)
Definition: ordinal.c:833
#define InterlockedIncrement
Definition: armddk.h:53
Definition: ordinal.c:827

◆ Disp_GetIDsOfNames()

static HRESULT WINAPI Disp_GetIDsOfNames ( IDispatch This,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 952 of file ordinal.c.

959 {
960  return ERROR_SUCCESS;
961 }
#define ERROR_SUCCESS
Definition: deptool.c:10

◆ Disp_GetTypeInfo()

static HRESULT WINAPI Disp_GetTypeInfo ( IDispatch This,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 943 of file ordinal.c.

948 {
949  return ERROR_SUCCESS;
950 }
#define ERROR_SUCCESS
Definition: deptool.c:10

◆ Disp_GetTypeInfoCount()

static HRESULT WINAPI Disp_GetTypeInfoCount ( IDispatch This,
UINT pctinfo 
)
static

Definition at line 936 of file ordinal.c.

939 {
940  return ERROR_SUCCESS;
941 }
#define ERROR_SUCCESS
Definition: deptool.c:10

◆ Disp_Invoke()

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

Definition at line 963 of file ordinal.c.

973 {
974  trace("%p %x %s %x %x %p %p %p %p\n", This, dispIdMember, wine_dbgstr_guid(riid), lcid, wFlags,
975  pDispParams, pVarResult, pExcepInfo, puArgErr);
976 
977  ok(dispIdMember == 0xa0 || dispIdMember == 0xa1, "Unknown dispIdMember\n");
978  ok(pDispParams != NULL, "Invoked with NULL pDispParams\n");
979  ok(wFlags == DISPATCH_METHOD, "Wrong flags %x\n",wFlags);
980  ok(lcid == 0,"Wrong lcid %x\n",lcid);
981  if (dispIdMember == 0xa0)
982  {
983  ok(pDispParams->cArgs == 0, "params.cArgs = %d\n", pDispParams->cArgs);
984  ok(pDispParams->cNamedArgs == 0, "params.cNamedArgs = %d\n", pDispParams->cArgs);
985  ok(pDispParams->rgdispidNamedArgs == NULL, "params.rgdispidNamedArgs = %p\n", pDispParams->rgdispidNamedArgs);
986  ok(pDispParams->rgvarg == NULL, "params.rgvarg = %p\n", pDispParams->rgvarg);
987  }
988  else if (dispIdMember == 0xa1)
989  {
990  ok(pDispParams->cArgs == 2, "params.cArgs = %d\n", pDispParams->cArgs);
991  ok(pDispParams->cNamedArgs == 0, "params.cNamedArgs = %d\n", pDispParams->cArgs);
992  ok(pDispParams->rgdispidNamedArgs == NULL, "params.rgdispidNamedArgs = %p\n", pDispParams->rgdispidNamedArgs);
993  ok(V_VT(pDispParams->rgvarg) == VT_BSTR, "V_VT(var) = %d\n", V_VT(pDispParams->rgvarg));
994  ok(V_I4(pDispParams->rgvarg) == 0xdeadcafe , "failed %p\n", V_BSTR(pDispParams->rgvarg));
995  ok(V_VT(pDispParams->rgvarg+1) == VT_I4, "V_VT(var) = %d\n", V_VT(pDispParams->rgvarg+1));
996  ok(V_I4(pDispParams->rgvarg+1) == 0xdeadbeef, "failed %x\n", V_I4(pDispParams->rgvarg+1));
997  }
998 
999  return ERROR_SUCCESS;
1000 }
Definition: compat.h:1947
#define ERROR_SUCCESS
Definition: deptool.c:10
REFIID riid
Definition: precomp.h:44
const char * wine_dbgstr_guid(const GUID *guid)
#define V_I4(A)
Definition: oleauto.h:247
#define DISPATCH_METHOD
Definition: oleauto.h:1006
smooth NULL
Definition: ftsmooth.c:416
#define trace
Definition: atltest.h:70
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519
#define ok(value,...)
Definition: atltest.h:57

◆ Disp_QueryInterface()

static HRESULT WINAPI Disp_QueryInterface ( IDispatch This,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 897 of file ordinal.c.

901 {
902  *ppvObject = NULL;
903 
905  {
906  *ppvObject = This;
907  }
908 
909  if (*ppvObject)
910  {
911  IDispatch_AddRef(This);
912  return S_OK;
913  }
914 
915  trace("no interface\n");
916  return E_NOINTERFACE;
917 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
smooth NULL
Definition: ftsmooth.c:416
#define trace
Definition: atltest.h:70
const GUID IID_IUnknown
const GUID IID_IDispatch
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define S_OK
Definition: intsafe.h:59
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ Disp_Release()

static ULONG WINAPI Disp_Release ( IDispatch This)
static

Definition at line 925 of file ordinal.c.

926 {
927  Disp *iface = impl_from_IDispatch(This);
928  ULONG ret;
929 
930  ret = InterlockedDecrement(&iface->refCount);
931  if (ret == 0)
933  return ret;
934 }
LONG refCount
Definition: ordinal.c:830
static Disp * impl_from_IDispatch(IDispatch *iface)
Definition: ordinal.c:833
#define GetProcessHeap()
Definition: compat.h:403
int ret
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1
Definition: ordinal.c:827
#define HeapFree(x, y, z)
Definition: compat.h:402

◆ DWORD()

static DWORD ( WINAPI pSHGetObjectCompatFlags)
static

◆ Enum_AddRef()

static ULONG WINAPI Enum_AddRef ( IEnumConnections This)
static

Definition at line 1035 of file ordinal.c.

1036 {
1038  return InterlockedIncrement(&iface->refCount);
1039 }
LONG refCount
Definition: ordinal.c:871
Definition: ordinal.c:868
static EnumCon * impl_from_IEnumConnections(IEnumConnections *iface)
Definition: ordinal.c:877
#define InterlockedIncrement
Definition: armddk.h:53

◆ Enum_Clone()

static HRESULT WINAPI Enum_Clone ( IEnumConnections This,
IEnumConnections **  ppEnum 
)
static

Definition at line 1087 of file ordinal.c.

1090 {
1091  return E_FAIL;
1092 }
#define E_FAIL
Definition: ddrawi.h:102

◆ Enum_Next()

static HRESULT WINAPI Enum_Next ( IEnumConnections This,
ULONG  cConnections,
LPCONNECTDATA  rgcd,
ULONG pcFetched 
)
static

Definition at line 1052 of file ordinal.c.

1057 {
1059 
1060  if (cConnections > 0 && iface->idx < iface->pt->sinkCount)
1061  {
1062  rgcd->pUnk = iface->pt->sink[iface->idx];
1063  IUnknown_AddRef(iface->pt->sink[iface->idx]);
1064  rgcd->dwCookie=0xff;
1065  if (pcFetched)
1066  *pcFetched = 1;
1067  iface->idx++;
1068  return S_OK;
1069  }
1070 
1071  return E_FAIL;
1072 }
IUnknown ** sink
Definition: ordinal.c:860
Definition: ordinal.c:868
#define E_FAIL
Definition: ddrawi.h:102
static EnumCon * impl_from_IEnumConnections(IEnumConnections *iface)
Definition: ordinal.c:877
ConPt * pt
Definition: ordinal.c:874
UINT idx
Definition: ordinal.c:873
#define S_OK
Definition: intsafe.h:59
UINT sinkCount
Definition: ordinal.c:859

◆ Enum_QueryInterface()

static HRESULT WINAPI Enum_QueryInterface ( IEnumConnections This,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 1013 of file ordinal.c.

1017 {
1018  *ppvObject = NULL;
1019 
1021  {
1022  *ppvObject = This;
1023  }
1024 
1025  if (*ppvObject)
1026  {
1027  IEnumConnections_AddRef(This);
1028  return S_OK;
1029  }
1030 
1031  trace("no interface\n");
1032  return E_NOINTERFACE;
1033 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
const GUID IID_IEnumConnections
smooth NULL
Definition: ftsmooth.c:416
#define trace
Definition: atltest.h:70
const GUID IID_IUnknown
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define S_OK
Definition: intsafe.h:59
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ Enum_Release()

static ULONG WINAPI Enum_Release ( IEnumConnections This)
static

Definition at line 1041 of file ordinal.c.

1042 {
1044  ULONG ret;
1045 
1046  ret = InterlockedDecrement(&iface->refCount);
1047  if (ret == 0)
1049  return ret;
1050 }
LONG refCount
Definition: ordinal.c:871
Definition: ordinal.c:868
static EnumCon * impl_from_IEnumConnections(IEnumConnections *iface)
Definition: ordinal.c:877
#define GetProcessHeap()
Definition: compat.h:403
int ret
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1
#define HeapFree(x, y, z)
Definition: compat.h:402

◆ Enum_Reset()

static HRESULT WINAPI Enum_Reset ( IEnumConnections This)
static

Definition at line 1081 of file ordinal.c.

1083 {
1084  return E_FAIL;
1085 }
#define E_FAIL
Definition: ddrawi.h:102

◆ Enum_Skip()

static HRESULT WINAPI Enum_Skip ( IEnumConnections This,
ULONG  cConnections 
)
static

Definition at line 1074 of file ordinal.c.

1077 {
1078  return E_FAIL;
1079 }
#define E_FAIL
Definition: ddrawi.h:102

◆ EnumPt_AddRef()

static ULONG WINAPI EnumPt_AddRef ( IEnumConnectionPoints This)
static

Definition at line 1268 of file ordinal.c.

1269 {
1271  return InterlockedIncrement(&iface->refCount);
1272 }
static EnumPt * impl_from_IEnumConnectionPoints(IEnumConnectionPoints *iface)
Definition: ordinal.c:891
#define InterlockedIncrement
Definition: armddk.h:53
LONG refCount
Definition: ordinal.c:885

◆ EnumPt_Clone()

static HRESULT WINAPI EnumPt_Clone ( IEnumConnectionPoints This,
IEnumConnectionPoints **  ppEnumPt 
)
static

Definition at line 1319 of file ordinal.c.

1322 {
1323  return E_FAIL;
1324 }
#define E_FAIL
Definition: ddrawi.h:102

◆ EnumPt_Next()

static HRESULT WINAPI EnumPt_Next ( IEnumConnectionPoints This,
ULONG  cConnections,
IConnectionPoint **  rgcd,
ULONG pcFetched 
)
static

Definition at line 1285 of file ordinal.c.

1290 {
1292 
1293  if (cConnections > 0 && iface->idx < iface->container->ptCount)
1294  {
1295  *rgcd = iface->container->pt[iface->idx];
1296  IConnectionPoint_AddRef(iface->container->pt[iface->idx]);
1297  if (pcFetched)
1298  *pcFetched = 1;
1299  iface->idx++;
1300  return S_OK;
1301  }
1302 
1303  return E_FAIL;
1304 }
Contain * container
Definition: ordinal.c:888
#define E_FAIL
Definition: ddrawi.h:102
IConnectionPoint ** pt
Definition: ordinal.c:844
static EnumPt * impl_from_IEnumConnectionPoints(IEnumConnectionPoints *iface)
Definition: ordinal.c:891
#define S_OK
Definition: intsafe.h:59
int idx
Definition: ordinal.c:887
UINT ptCount
Definition: ordinal.c:843

◆ EnumPt_QueryInterface()

static HRESULT WINAPI EnumPt_QueryInterface ( IEnumConnectionPoints This,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 1246 of file ordinal.c.

1250 {
1251  *ppvObject = NULL;
1252 
1254  {
1255  *ppvObject = This;
1256  }
1257 
1258  if (*ppvObject)
1259  {
1260  IEnumConnectionPoints_AddRef(This);
1261  return S_OK;
1262  }
1263 
1264  trace("no interface\n");
1265  return E_NOINTERFACE;
1266 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
smooth NULL
Definition: ftsmooth.c:416
#define trace
Definition: atltest.h:70
const GUID IID_IUnknown
const GUID IID_IEnumConnectionPoints
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define S_OK
Definition: intsafe.h:59
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ EnumPt_Release()

static ULONG WINAPI EnumPt_Release ( IEnumConnectionPoints This)
static

Definition at line 1274 of file ordinal.c.

1275 {
1277  ULONG ret;
1278 
1279  ret = InterlockedDecrement(&iface->refCount);
1280  if (ret == 0)
1282  return ret;
1283 }
#define GetProcessHeap()
Definition: compat.h:403
static EnumPt * impl_from_IEnumConnectionPoints(IEnumConnectionPoints *iface)
Definition: ordinal.c:891
int ret
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1
LONG refCount
Definition: ordinal.c:885
#define HeapFree(x, y, z)
Definition: compat.h:402

◆ EnumPt_Reset()

static HRESULT WINAPI EnumPt_Reset ( IEnumConnectionPoints This)
static

Definition at line 1313 of file ordinal.c.

1315 {
1316  return E_FAIL;
1317 }
#define E_FAIL
Definition: ddrawi.h:102

◆ EnumPt_Skip()

static HRESULT WINAPI EnumPt_Skip ( IEnumConnectionPoints This,
ULONG  cConnections 
)
static

Definition at line 1306 of file ordinal.c.

1309 {
1310  return E_FAIL;
1311 }
#define E_FAIL
Definition: ddrawi.h:102

◆ free_call_trace()

static void free_call_trace ( const call_trace_t ctrace)
static

Definition at line 123 of file ordinal.c.

124 {
125  HeapFree(GetProcessHeap(), 0, ctrace->calls);
126 }
#define GetProcessHeap()
Definition: compat.h:403
call_entry_t * calls
Definition: ordinal.c:111
#define HeapFree(x, y, z)
Definition: compat.h:402

Referenced by test_IUnknown_ProfferService(), and test_IUnknown_QueryServiceExec().

◆ HANDLE()

static HANDLE ( WINAPI pSHAllocShared)
static

◆ HKEY()

static HKEY ( WINAPI pSHGetShellKey)
static

◆ HRESULT() [1/2]

static HRESULT ( WINAPI pGetAcceptLanguagesA)
static

◆ HRESULT() [2/2]

static HRESULT ( WINAPIV pSHPackDispParams)
static

◆ HWND()

static const CLSID* static CLSID* static const GUID VARIANT VARIANT* static IServiceProvider DWORD* static HWND ( WINAPI pSHCreateWorkerWindowA)
static

◆ impl_from_IConnectionPoint()

static ConPt* impl_from_IConnectionPoint ( IConnectionPoint iface)
inlinestatic

Definition at line 863 of file ordinal.c.

864 {
865  return CONTAINING_RECORD(iface, ConPt, IConnectionPoint_iface);
866 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by ConPt_AddRef(), ConPt_Advise(), ConPt_EnumConnections(), ConPt_GetConnectionInterface(), ConPt_GetConnectionPointContainer(), ConPt_Release(), and ConPt_Unadvise().

◆ impl_from_IConnectionPointContainer()

static Contain* impl_from_IConnectionPointContainer ( IConnectionPointContainer iface)
inlinestatic

Definition at line 847 of file ordinal.c.

848 {
849  return CONTAINING_RECORD(iface, Contain, IConnectionPointContainer_iface);
850 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by Contain_AddRef(), Contain_EnumConnectionPoints(), Contain_FindConnectionPoint(), and Contain_Release().

◆ impl_from_IDispatch()

static Disp* impl_from_IDispatch ( IDispatch iface)
inlinestatic

Definition at line 833 of file ordinal.c.

834 {
835  return CONTAINING_RECORD(iface, Disp, IDispatch_iface);
836 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
Definition: ordinal.c:827

Referenced by Disp_AddRef(), and Disp_Release().

◆ impl_from_IEnumConnectionPoints()

static EnumPt* impl_from_IEnumConnectionPoints ( IEnumConnectionPoints iface)
inlinestatic

Definition at line 891 of file ordinal.c.

892 {
893  return CONTAINING_RECORD(iface, EnumPt, IEnumConnectionPoints_iface);
894 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by EnumPt_AddRef(), EnumPt_Next(), and EnumPt_Release().

◆ impl_from_IEnumConnections()

static EnumCon* impl_from_IEnumConnections ( IEnumConnections iface)
inlinestatic

Definition at line 877 of file ordinal.c.

878 {
879  return CONTAINING_RECORD(iface, EnumCon, IEnumConnections_iface);
880 }
Definition: ordinal.c:868
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by Enum_AddRef(), Enum_Next(), and Enum_Release().

◆ impl_from_IOleCommandTarget()

static IOleCommandTargetImpl* impl_from_IOleCommandTarget ( IOleCommandTarget iface)
inlinestatic

Definition at line 2096 of file ordinal.c.

2097 {
2098  return CONTAINING_RECORD(iface, IOleCommandTargetImpl, IOleCommandTarget_iface);
2099 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by IOleCommandTargetImpl_AddRef(), IOleCommandTargetImpl_QueryInterface(), and IOleCommandTargetImpl_Release().

◆ impl_from_IProfferService()

static IProfferServiceImpl* impl_from_IProfferService ( IProfferService iface)
inlinestatic

Definition at line 2194 of file ordinal.c.

2195 {
2196  return CONTAINING_RECORD(iface, IProfferServiceImpl, IProfferService_iface);
2197 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by IProfferServiceImpl_AddRef(), IProfferServiceImpl_QueryInterface(), and IProfferServiceImpl_Release().

◆ impl_from_IPropertyBag()

static PropBag* impl_from_IPropertyBag ( IPropertyBag iface)
inlinestatic

Definition at line 1504 of file ordinal.c.

1505 {
1506  return CONTAINING_RECORD(iface, PropBag, IPropertyBag_iface);
1507 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by Prop_AddRef(), and Prop_Release().

◆ impl_from_IServiceProvider()

static IServiceProviderImpl* impl_from_IServiceProvider ( IServiceProvider iface)
inlinestatic

Definition at line 2184 of file ordinal.c.

2185 {
2186  return CONTAINING_RECORD(iface, IServiceProviderImpl, IServiceProvider_iface);
2187 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by IServiceProviderImpl_AddRef(), IServiceProviderImpl_QueryInterface(), and IServiceProviderImpl_Release().

◆ init_call_trace()

static void init_call_trace ( call_trace_t ctrace)
static

Definition at line 116 of file ordinal.c.

117 {
118  ctrace->alloc = 10;
119  ctrace->count = 0;
120  ctrace->calls = HeapAlloc(GetProcessHeap(), 0, sizeof(call_entry_t) * ctrace->alloc);
121 }
Definition: ordinal.c:105
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
call_entry_t * calls
Definition: ordinal.c:111

Referenced by test_IUnknown_ProfferService(), and test_IUnknown_QueryServiceExec().

◆ init_pointers()

static void init_pointers ( void  )
static

Definition at line 2905 of file ordinal.c.

2906 {
2907 #define MAKEFUNC(f, ord) (p##f = (void*)GetProcAddress(hShlwapi, (LPSTR)(ord)))
2908  MAKEFUNC(SHAllocShared, 7);
2909  MAKEFUNC(SHLockShared, 8);
2911  MAKEFUNC(SHFreeShared, 10);
2912  MAKEFUNC(SHMapHandle, 11);
2914  MAKEFUNC(SHSetWindowBits, 165);
2915  MAKEFUNC(SHSetParentHwnd, 167);
2918  MAKEFUNC(SHSearchMapInt, 198);
2920  MAKEFUNC(GUIDFromStringA, 269);
2921  MAKEFUNC(SHPackDispParams, 282);
2924  MAKEFUNC(SHGetIniStringW, 294);
2925  MAKEFUNC(SHSetIniStringW, 295);
2932  MAKEFUNC(SHGetShellKey, 491);
2935  MAKEFUNC(SKGetValueW, 516);
2936  MAKEFUNC(SKSetValueW, 517);
2937  MAKEFUNC(SKDeleteValueW, 518);
2938  MAKEFUNC(SKAllocValueW, 519);
2939 #undef MAKEFUNC
2940 
2941  pDllGetVersion = (void*)GetProcAddress(hShlwapi, "DllGetVersion");
2942 }
int WINAPI SHSearchMapInt(const int *lpKeys, const int *lpValues, int iLen, int iKey)
Definition: ordinal.c:2108
HWND WINAPI SHSetParentHwnd(HWND hWnd, HWND hWndParent)
Definition: ordinal.c:1105
static HMODULE hShlwapi
Definition: ordinal.c:38
HWND WINAPI SHCreateWorkerWindowA(WNDPROC wndProc, HWND hWndParent, DWORD dwExStyle, DWORD dwStyle, HMENU hMenu, LONG_PTR wnd_extra)
Definition: ordinal.c:2584
HRESULT WINAPI SHIShellFolder_EnumObjects(LPSHELLFOLDER lpFolder, HWND hwnd, SHCONTF flags, IEnumIDList **ppenum)
Definition: ordinal.c:3721
HRESULT WINAPI IUnknown_QueryServiceExec(IUnknown *lpUnknown, REFIID service, const GUID *group, DWORD cmdId, DWORD cmdOpt, VARIANT *pIn, VARIANT *pOut)
Definition: ordinal.c:1500
HRESULT WINAPI SKDeleteValueW(DWORD flags, LPCWSTR subkey, LPCWSTR value)
Definition: ordinal.c:4654
DWORD WINAPI SHGetObjectCompatFlags(IUnknown *pUnk, const CLSID *clsid)
Definition: ordinal.c:5326
#define MAKEFUNC(f, ord)
LONG WINAPI SHSetWindowBits(HWND hwnd, INT offset, UINT mask, UINT flags)
Definition: ordinal.c:1077
HRESULT WINAPI SKAllocValueW(DWORD flags, LPCWSTR subkey, LPCWSTR value, DWORD *type, LPVOID *data, DWORD *count)
Definition: ordinal.c:4617
HRESULT WINAPI GetAcceptLanguagesA(LPSTR langbuf, LPDWORD buflen)
Definition: ordinal.c:524
HRESULT WINAPI SKGetValueW(DWORD flags, LPCWSTR subkey, LPCWSTR value, DWORD *type, void *data, DWORD *count)
Definition: ordinal.c:4674
HRESULT WINAPI IUnknown_GetClassID(IUnknown *lpUnknown, CLSID *clsid)
Definition: ordinal.c:1404
HKEY WINAPI SHGetShellKey(DWORD flags, LPCWSTR sub_key, BOOL create)
Definition: ordinal.c:4414
HANDLE WINAPI SHMapHandle(HANDLE hShared, DWORD dwSrcProcId, DWORD dwDstProcId, DWORD dwAccess, DWORD dwOptions)
Definition: ordinal.c:91
HANDLE WINAPI SHAllocShared(LPCVOID lpvData, DWORD dwSize, DWORD dwProcId)
Definition: ordinal.c:162
HRESULT WINAPI IUnknown_ProfferService(IUnknown *lpUnknown, REFGUID service, IServiceProvider *pService, DWORD *pCookie)
Definition: ordinal.c:1539
BOOL WINAPI SHFreeShared(HANDLE hShared, DWORD dwProcId)
Definition: ordinal.c:262
HRESULT WINAPI SHPropertyBag_ReadLONG(IPropertyBag *ppb, LPCWSTR pszPropName, LPLONG pValue)
Definition: ordinal.c:5203
HRESULT WINAPI IConnectionPoint_InvokeWithCancel(IConnectionPoint *iCP, DISPID dispId, DISPPARAMS *dispParams, DWORD unknown1, DWORD unknown2)
Definition: ordinal.c:3048
HRESULT WINAPI IConnectionPoint_SimpleInvoke(IConnectionPoint *iCP, DISPID dispId, DISPPARAMS *dispParams)
Definition: ordinal.c:3072
HRESULT WINAPI ConnectToConnectionPoint(IUnknown *lpUnkSink, REFIID riid, BOOL fConnect, IUnknown *lpUnknown, LPDWORD lpCookie, IConnectionPoint **lppCP)
Definition: ordinal.c:1140
PSECURITY_DESCRIPTOR WINAPI GetShellSecurityDescriptor(const PSHELL_USER_PERMISSION *apUserPerm, int cUserPerm)
Definition: ordinal.c:4853
BOOL WINAPI SHSetIniStringW(LPCWSTR appName, LPCWSTR keyName, LPCWSTR str, LPCWSTR filename)
Definition: ordinal.c:3287
PVOID WINAPI SHLockShared(HANDLE hShared, DWORD dwProcId)
Definition: ordinal.c:210
HRESULT WINAPI SKSetValueW(DWORD flags, LPCWSTR subkey, LPCWSTR value, DWORD type, void *data, DWORD count)
Definition: ordinal.c:4696
BOOL WINAPI SHUnlockShared(LPVOID lpView)
Definition: ordinal.c:242
HRESULT WINAPIV SHPackDispParams(DISPPARAMS *params, VARIANTARG *args, UINT cnt,...)
Definition: ordinal.c:2991
#define GetProcAddress(x, y)
Definition: compat.h:418
INT WINAPI SHFormatDateTimeA(const FILETIME UNALIGNED *fileTime, DWORD *flags, LPSTR buf, UINT size)
Definition: ordinal.c:5103
BOOL WINAPI GUIDFromStringA(LPCSTR idstr, CLSID *id)
Definition: ordinal.c:2784
DWORD WINAPI SHGetIniStringW(LPCWSTR appName, LPCWSTR keyName, LPWSTR out, DWORD outLen, LPCWSTR filename)
Definition: ordinal.c:3242
INT WINAPI SHFormatDateTimeW(const FILETIME UNALIGNED *fileTime, DWORD *flags, LPWSTR buf, UINT size)
Definition: ordinal.c:5038

Referenced by START_TEST().

◆ int()

static int ( WINAPI pSHSearchMapInt) const
static

◆ INT()

static INT ( WINAPI pSHFormatDateTimeA) const
static

◆ IOleCommandTargetImpl_AddRef()

static ULONG WINAPI IOleCommandTargetImpl_AddRef ( IOleCommandTarget iface)
static

Definition at line 2133 of file ordinal.c.

2134 {
2136  return InterlockedIncrement(&This->ref);
2137 }
static IOleCommandTargetImpl * impl_from_IOleCommandTarget(IOleCommandTarget *iface)
Definition: ordinal.c:2096
#define InterlockedIncrement
Definition: armddk.h:53

◆ IOleCommandTargetImpl_Construct()

static IOleCommandTarget* IOleCommandTargetImpl_Construct ( void  )
static

Definition at line 2103 of file ordinal.c.

2104 {
2106 
2107  obj = HeapAlloc(GetProcessHeap(), 0, sizeof(*obj));
2108  obj->IOleCommandTarget_iface.lpVtbl = &IOleCommandTargetImpl_Vtbl;
2109  obj->ref = 1;
2110 
2111  return &obj->IOleCommandTarget_iface;
2112 }
GLsizei GLsizei GLuint * obj
Definition: glext.h:6042
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static const IOleCommandTargetVtbl IOleCommandTargetImpl_Vtbl
Definition: ordinal.c:2101

Referenced by IServiceProviderImpl_QueryService().

◆ IOleCommandTargetImpl_Exec()

static HRESULT WINAPI IOleCommandTargetImpl_Exec ( IOleCommandTarget iface,
const GUID CmdGroup,
DWORD  nCmdID,
DWORD  nCmdexecopt,
VARIANT pvaIn,
VARIANT pvaOut 
)
static

Definition at line 2158 of file ordinal.c.

2165 {
2166  add_call(&trace_got, 3, CmdGroup, (void*)(DWORD_PTR)nCmdID, (void*)(DWORD_PTR)nCmdexecopt, pvaIn, pvaOut);
2167  return S_OK;
2168 }
static call_trace_t trace_got
Definition: ordinal.c:177
static void add_call(call_trace_t *ctrace, int id, const void *arg0, const void *arg1, const void *arg2, const void *arg3, const void *arg4)
Definition: ordinal.c:128
uint32_t DWORD_PTR
Definition: typedefs.h:63
#define S_OK
Definition: intsafe.h:59

◆ IOleCommandTargetImpl_QueryInterface()

static HRESULT WINAPI IOleCommandTargetImpl_QueryInterface ( IOleCommandTarget iface,
REFIID  riid,
void **  ppvObj 
)
static

Definition at line 2114 of file ordinal.c.

2115 {
2117 
2118  if (IsEqualIID(riid, &IID_IUnknown) ||
2119  IsEqualIID(riid, &IID_IOleCommandTarget))
2120  {
2121  *ppvObj = This;
2122  }
2123 
2124  if(*ppvObj)
2125  {
2126  IOleCommandTarget_AddRef(iface);
2127  return S_OK;
2128  }
2129 
2130  return E_NOINTERFACE;
2131 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
static IOleCommandTargetImpl * impl_from_IOleCommandTarget(IOleCommandTarget *iface)
Definition: ordinal.c:2096
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:59
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ IOleCommandTargetImpl_QueryStatus()

static HRESULT WINAPI IOleCommandTargetImpl_QueryStatus ( IOleCommandTarget iface,
const GUID group,
ULONG  cCmds,
OLECMD  prgCmds[],
OLECMDTEXT *  pCmdText 
)
static

Definition at line 2152 of file ordinal.c.

2154 {
2155  return E_NOTIMPL;
2156 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ IOleCommandTargetImpl_Release()

static ULONG WINAPI IOleCommandTargetImpl_Release ( IOleCommandTarget iface)
static

Definition at line 2139 of file ordinal.c.

2140 {
2143 
2144  if (!ref)
2145  {
2146  HeapFree(GetProcessHeap(), 0, This);
2147  return 0;
2148  }
2149  return ref;
2150 }
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
static IOleCommandTargetImpl * impl_from_IOleCommandTarget(IOleCommandTarget *iface)
Definition: ordinal.c:2096
#define GetProcessHeap()
Definition: compat.h:403
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1
#define HeapFree(x, y, z)
Definition: compat.h:402

◆ IProfferServiceImpl_AddRef()

static ULONG WINAPI IProfferServiceImpl_AddRef ( IProfferService iface)
static

Definition at line 2358 of file ordinal.c.

2359 {
2361  return InterlockedIncrement(&This->ref);
2362 }
#define InterlockedIncrement
Definition: armddk.h:53
static IProfferServiceImpl * impl_from_IProfferService(IProfferService *iface)
Definition: ordinal.c:2194

◆ IProfferServiceImpl_Construct()

static IProfferService* IProfferServiceImpl_Construct ( void  )
static

Definition at line 2214 of file ordinal.c.

2215 {
2217 
2218  obj = HeapAlloc(GetProcessHeap(), 0, sizeof(*obj));
2219  obj->IProfferService_iface.lpVtbl = &IProfferServiceImpl_Vtbl;
2220  obj->ref = 1;
2221 
2222  return &obj->IProfferService_iface;
2223 }
GLsizei GLsizei GLuint * obj
Definition: glext.h:6042
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static const IProfferServiceVtbl IProfferServiceImpl_Vtbl
Definition: ordinal.c:2201

Referenced by IServiceProviderImpl_QueryService(), and test_IUnknown_ProfferService().

◆ IProfferServiceImpl_ProfferService()

static HRESULT WINAPI IProfferServiceImpl_ProfferService ( IProfferService iface,
REFGUID  service,
IServiceProvider pService,
DWORD pCookie 
)
static

Definition at line 2377 of file ordinal.c.

2379 {
2380  *pCookie = 0xdeadbeef;
2381  add_call(&trace_got, 3, service, pService, pCookie, 0, 0);
2382  return S_OK;
2383 }
static call_trace_t trace_got
Definition: ordinal.c:177
static void add_call(call_trace_t *ctrace, int id, const void *arg0, const void *arg1, const void *arg2, const void *arg3, const void *arg4)
Definition: ordinal.c:128
#define S_OK
Definition: intsafe.h:59

◆ IProfferServiceImpl_QueryInterface()

static HRESULT WINAPI IProfferServiceImpl_QueryInterface ( IProfferService iface,
REFIID  riid,
void **  ppvObj 
)
static

Definition at line 2333 of file ordinal.c.

2334 {
2336 
2337  if (IsEqualIID(riid, &IID_IUnknown) ||
2338  IsEqualIID(riid, &IID_IProfferService))
2339  {
2340  *ppvObj = This;
2341  }
2342  else if (IsEqualIID(riid, &IID_IServiceProvider))
2343  {
2344  *ppvObj = IServiceProviderImpl_Construct();
2345  add_call(&trace_got, 1, iface, &IID_IServiceProvider, 0, 0, 0);
2346  return S_OK;
2347  }
2348 
2349  if(*ppvObj)
2350  {
2351  IProfferService_AddRef(iface);
2352  return S_OK;
2353  }
2354 
2355  return E_NOINTERFACE;
2356 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
static IServiceProvider * IServiceProviderImpl_Construct(void)
Definition: ordinal.c:2203
static call_trace_t trace_got
Definition: ordinal.c:177
static void add_call(call_trace_t *ctrace, int id, const void *arg0, const void *arg1, const void *arg2, const void *arg3, const void *arg4)
Definition: ordinal.c:128
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:59
static IProfferServiceImpl * impl_from_IProfferService(IProfferService *iface)
Definition: ordinal.c:2194
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ IProfferServiceImpl_Release()

static ULONG WINAPI IProfferServiceImpl_Release ( IProfferService iface)
static

Definition at line 2364 of file ordinal.c.

2365 {
2368 
2369  if (!ref)
2370  {
2371  HeapFree(GetProcessHeap(), 0, This);
2372  return 0;
2373  }
2374  return ref;
2375 }
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
#define GetProcessHeap()
Definition: compat.h:403
#define InterlockedDecrement
Definition: armddk.h:52
static IProfferServiceImpl * impl_from_IProfferService(IProfferService *iface)
Definition: ordinal.c:2194
unsigned int ULONG
Definition: retypes.h:1
#define HeapFree(x, y, z)
Definition: compat.h:402

◆ IProfferServiceImpl_RevokeService()

static HRESULT WINAPI IProfferServiceImpl_RevokeService ( IProfferService iface,
DWORD  cookie 
)
static

Definition at line 2385 of file ordinal.c.

2386 {
2387  add_call(&trace_got, 4, (void*)(DWORD_PTR)cookie, 0, 0, 0, 0);
2388  return S_OK;
2389 }
static call_trace_t trace_got
Definition: ordinal.c:177
static void add_call(call_trace_t *ctrace, int id, const void *arg0, const void *arg1, const void *arg2, const void *arg3, const void *arg4)
Definition: ordinal.c:128
uint32_t DWORD_PTR
Definition: typedefs.h:63
#define S_OK
Definition: intsafe.h:59
Definition: cookie.c:33

◆ IServiceProviderImpl_AddRef()

static ULONG WINAPI IServiceProviderImpl_AddRef ( IServiceProvider iface)
static

Definition at line 2247 of file ordinal.c.

2248 {
2250  return InterlockedIncrement(&This->ref);
2251 }
static IServiceProviderImpl * impl_from_IServiceProvider(IServiceProvider *iface)
Definition: ordinal.c:2184
#define InterlockedIncrement
Definition: armddk.h:53

◆ IServiceProviderImpl_Construct()

static IServiceProvider* IServiceProviderImpl_Construct ( void  )
static

Definition at line 2203 of file ordinal.c.

2204 {
2206 
2207  obj = HeapAlloc(GetProcessHeap(), 0, sizeof(*obj));
2208  obj->IServiceProvider_iface.lpVtbl = &IServiceProviderImpl_Vtbl;
2209  obj->ref = 1;
2210 
2211  return &obj->IServiceProvider_iface;
2212 }
GLsizei GLsizei GLuint * obj
Definition: glext.h:6042
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static const IServiceProviderVtbl IServiceProviderImpl_Vtbl
Definition: ordinal.c:2200

Referenced by IProfferServiceImpl_QueryInterface(), test_IUnknown_ProfferService(), and test_IUnknown_QueryServiceExec().

◆ IServiceProviderImpl_QueryInterface()

static HRESULT WINAPI IServiceProviderImpl_QueryInterface ( IServiceProvider iface,
REFIID  riid,
void **  ppvObj 
)
static

Definition at line 2225 of file ordinal.c.

2226 {
2228 
2229  if (IsEqualIID(riid, &IID_IUnknown) ||
2230  IsEqualIID(riid, &IID_IServiceProvider))
2231  {
2232  *ppvObj = This;
2233  }
2234 
2235  if(*ppvObj)
2236  {
2237  IServiceProvider_AddRef(iface);
2238  /* native uses redefined IID_IServiceProvider symbol, so we can't compare pointers */
2239  if (IsEqualIID(riid, &IID_IServiceProvider))
2240  add_call(&trace_got, 1, iface, &IID_IServiceProvider, 0, 0, 0);
2241  return S_OK;
2242  }
2243 
2244  return E_NOINTERFACE;
2245 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
static call_trace_t trace_got
Definition: ordinal.c:177
static void add_call(call_trace_t *ctrace, int id, const void *arg0, const void *arg1, const void *arg2, const void *arg3, const void *arg4)
Definition: ordinal.c:128
const GUID IID_IUnknown
static IServiceProviderImpl * impl_from_IServiceProvider(IServiceProvider *iface)
Definition: ordinal.c:2184
#define S_OK
Definition: intsafe.h:59
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ IServiceProviderImpl_QueryService()

static HRESULT WINAPI IServiceProviderImpl_QueryService ( IServiceProvider iface,
REFGUID  service,
REFIID  riid,
void **  ppv 
)
static

Definition at line 2266 of file ordinal.c.

2268 {
2269  /* native uses redefined pointer for IID_IOleCommandTarget, not one from uuid.lib */
2270  if (IsEqualIID(riid, &IID_IOleCommandTarget))
2271  {
2272  add_call(&trace_got, 2, iface, service, &IID_IOleCommandTarget, 0, 0);
2274  }
2275  if (IsEqualIID(riid, &IID_IProfferService))
2276  {
2277  if (IsEqualIID(service, &IID_IProfferService))
2278  add_call(&trace_got, 2, &IID_IProfferService, &IID_IProfferService, 0, 0, 0);
2280  }
2281  return S_OK;
2282 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static IProfferService * IProfferServiceImpl_Construct(void)
Definition: ordinal.c:2214
static IOleCommandTarget * IOleCommandTargetImpl_Construct(void)
Definition: ordinal.c:2103
static call_trace_t trace_got
Definition: ordinal.c:177
static void add_call(call_trace_t *ctrace, int id, const void *arg0, const void *arg1, const void *arg2, const void *arg3, const void *arg4)
Definition: ordinal.c:128
#define S_OK
Definition: intsafe.h:59
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ IServiceProviderImpl_Release()

static ULONG WINAPI IServiceProviderImpl_Release ( IServiceProvider iface)
static

Definition at line 2253 of file ordinal.c.

2254 {
2257 
2258  if (!ref)
2259  {
2260  HeapFree(GetProcessHeap(), 0, This);
2261  return 0;
2262  }
2263  return ref;
2264 }
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
#define GetProcessHeap()
Definition: compat.h:403
#define InterlockedDecrement
Definition: armddk.h:52
static IServiceProviderImpl * impl_from_IServiceProvider(IServiceProvider *iface)
Definition: ordinal.c:2184
unsigned int ULONG
Definition: retypes.h:1
#define HeapFree(x, y, z)
Definition: compat.h:402

◆ LONG()

static LONG ( WINAPI pSHSetWindowBits)
static

◆ LPVOID()

static LPVOID ( WINAPI pSHLockShared)
static

Referenced by Prop_Read().

◆ ok_trace_()

static void ok_trace_ ( call_trace_t texpected,
call_trace_t tgot,
int  line 
)
static

Definition at line 149 of file ordinal.c.

150 {
151  if (texpected->count == tgot->count)
152  {
153  INT i;
154  /* compare */
155  for (i = 0; i < texpected->count; i++)
156  {
157  call_entry_t *expected = &texpected->calls[i];
158  call_entry_t *got = &tgot->calls[i];
159  INT j;
160 
161  ok_(__FILE__, line)(expected->id == got->id, "got different ids %d: %d, %d\n", i+1, expected->id, got->id);
162 
163  for (j = 0; j < 5; j++)
164  {
165  ok_(__FILE__, line)(expected->args[j] == got->args[j], "got different args[%d] for %d: %p, %p\n", j, i+1,
166  expected->args[j], got->args[j]);
167  }
168  }
169  }
170  else
171  ok_(__FILE__, line)(0, "traces length mismatch\n");
172 }
int32_t INT
Definition: typedefs.h:56
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
Definition: parser.c:48
Definition: ordinal.c:105
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 GLint GLint j
Definition: glfuncs.h:250
call_entry_t * calls
Definition: ordinal.c:111
int id
Definition: ordinal.c:106
const void * args[5]
Definition: ordinal.c:107
BOOL expected
Definition: store.c:2063
#define ok_(x1, x2)
Definition: atltest.h:61

◆ pGetShellSecurityDescriptor()

static SECURITY_DESCRIPTOR* WINAPI* pGetShellSecurityDescriptor ( const SHELL_USER_PERMISSION **  ,
int   
)
static

◆ Prop_AddRef()

static ULONG WINAPI Prop_AddRef ( IPropertyBag This)
static

Definition at line 1532 of file ordinal.c.

1534 {
1536  return InterlockedIncrement(&iface->refCount);
1537 }
LONG refCount
Definition: ordinal.c:1500
static PropBag * impl_from_IPropertyBag(IPropertyBag *iface)
Definition: ordinal.c:1504
#define InterlockedIncrement
Definition: armddk.h:53

◆ Prop_QueryInterface()

static HRESULT WINAPI Prop_QueryInterface ( IPropertyBag This,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 1510 of file ordinal.c.

1514 {
1515  *ppvObject = NULL;
1516 
1518  {
1519  *ppvObject = This;
1520  }
1521 
1522  if (*ppvObject)
1523  {
1524  IPropertyBag_AddRef(This);
1525  return S_OK;
1526  }
1527 
1528  trace("no interface\n");
1529  return E_NOINTERFACE;
1530 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
smooth NULL
Definition: ftsmooth.c:416
const GUID IID_IPropertyBag
#define trace
Definition: atltest.h:70
const GUID IID_IUnknown
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define S_OK
Definition: intsafe.h:59
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ Prop_Read()

static HRESULT WINAPI Prop_Read ( IPropertyBag This,
LPCOLESTR  pszPropName,
VARIANT pVar,
IErrorLog pErrorLog 
)
static

Definition at line 1551 of file ordinal.c.

1556 {
1557  V_VT(pVar) = VT_BLOB|VT_BYREF;
1558  V_BYREF(pVar) = (LPVOID)0xdeadcafe;
1559  return S_OK;
1560 }
static LPVOID(WINAPI *pSHLockShared)(HANDLE
#define V_BYREF(A)
Definition: oleauto.h:228
#define V_VT(A)
Definition: oleauto.h:211
#define S_OK
Definition: intsafe.h:59

◆ Prop_Release()

static ULONG WINAPI Prop_Release ( IPropertyBag This)
static

Definition at line 1539 of file ordinal.c.

1541 {
1543  ULONG ret;
1544 
1545  ret = InterlockedDecrement(&iface->refCount);
1546  if (ret == 0)
1548  return ret;
1549 }
#define GetProcessHeap()
Definition: compat.h:403
LONG refCount
Definition: ordinal.c:1500
static PropBag * impl_from_IPropertyBag(IPropertyBag *iface)
Definition: ordinal.c:1504
int ret
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1
#define HeapFree(x, y, z)
Definition: compat.h:402

◆ Prop_Write()

static HRESULT WINAPI Prop_Write ( IPropertyBag This,
LPCOLESTR  pszPropName,
VARIANT pVar 
)
static

Definition at line 1562 of file ordinal.c.

1566 {
1567  return S_OK;
1568 }
#define S_OK
Definition: intsafe.h:59

◆ r_verify_inifile()

static void r_verify_inifile ( unsigned  l,
LPCWSTR  filename,
LPCSTR  exp 
)
static

Definition at line 2694 of file ordinal.c.

2695 {
2696  HANDLE file;
2697  CHAR buf[1024];
2698  DWORD read;
2699 
2701 
2702  if(file == INVALID_HANDLE_VALUE)
2703  return;
2704 
2705  ReadFile(file, buf, sizeof(buf) * sizeof(CHAR), &read, NULL);
2706  buf[read] = '\0';
2707 
2708  CloseHandle(file);
2709 
2710  ok_(__FILE__,l)(!strcmp(buf, exp), "Expected:\n%s\nGot:\n%s\n", exp,
2711  buf);
2712 }
#define CloseHandle
Definition: compat.h:406
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
char CHAR
Definition: xmlstorage.h:175
#define INVALID_HANDLE_VALUE
Definition: compat.h:399
const char * filename
Definition: ioapi.h:135
smooth NULL
Definition: ftsmooth.c:416
#define OPEN_EXISTING
Definition: compat.h:434
r l[0]
Definition: byte_order.h:167
const char file[]
Definition: icontest.c:11
unsigned long DWORD
Definition: ntddk_ex.h:95
#define GENERIC_READ
Definition: compat.h:124
DWORD exp
Definition: msg.c:16038
#define CreateFileW
Definition: compat.h:408
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
BOOL WINAPI ReadFile(IN HANDLE hFile, IN LPVOID lpBuffer, IN DWORD nNumberOfBytesToRead, OUT LPDWORD lpNumberOfBytesRead OPTIONAL, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:123
_CRTIMP int __cdecl read(_In_ int _FileHandle, _Out_writes_bytes_(_MaxCharCount) void *_DstBuf, _In_ unsigned int _MaxCharCount)
#define ok_(x1, x2)
Definition: atltest.h:61
Definition: fci.c:126

◆ SF_AddRef()

static ULONG WINAPI SF_AddRef ( IShellFolder iface)
static

Definition at line 2525 of file ordinal.c.

2526 {
2527  return 2;
2528 }

◆ SF_BindToObject()

static HRESULT WINAPI SF_BindToObject ( IShellFolder iface,
LPCITEMIDLIST  idl,
LPBC  reserved,
REFIID  riid,
void **  obj 
)
static

Definition at line 2550 of file ordinal.c.

2552 {
2553  ok(0, "Didn't expect BindToObject\n");
2554  return E_NOTIMPL;
2555 }
#define ok(value,...)
Definition: atltest.h:57
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SF_BindToStorage()

static HRESULT WINAPI SF_BindToStorage ( IShellFolder iface,
LPCITEMIDLIST  idl,
LPBC  reserved,
REFIID  riid,
void **  obj 
)
static

Definition at line 2557 of file ordinal.c.

2559 {
2560  ok(0, "Didn't expect BindToStorage\n");
2561  return E_NOTIMPL;
2562 }
#define ok(value,...)
Definition: atltest.h:57
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SF_CompareIDs()

static HRESULT WINAPI SF_CompareIDs ( IShellFolder iface,
LPARAM  lparam,
LPCITEMIDLIST  idl1,
LPCITEMIDLIST  idl2 
)
static

Definition at line 2564 of file ordinal.c.

2566 {
2567  ok(0, "Didn't expect CompareIDs\n");
2568  return E_NOTIMPL;
2569 }
#define ok(value,...)
Definition: atltest.h:57
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SF_CreateViewObject()

static HRESULT WINAPI SF_CreateViewObject ( IShellFolder iface,
HWND  owner,
REFIID  riid,
void **  out 
)
static

Definition at line 2571 of file ordinal.c.

2573 {
2574  ok(0, "Didn't expect CreateViewObject\n");
2575  return E_NOTIMPL;
2576 }
#define ok(value,...)
Definition: atltest.h:57
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SF_EnumObjects()

static HRESULT WINAPI SF_EnumObjects ( IShellFolder iface,
HWND  owner,
SHCONTF  flags,
IEnumIDList **  enm 
)
static

Definition at line 2543 of file ordinal.c.

2545 {
2546  *enm = (IEnumIDList*)0xcafebabe;
2547  return S_OK;
2548 }
#define S_OK
Definition: intsafe.h:59

◆ SF_GetAttributesOf()

static HRESULT WINAPI SF_GetAttributesOf ( IShellFolder iface,
UINT  cidl,
LPCITEMIDLIST idl,
SFGAOF inOut 
)
static

Definition at line 2578 of file ordinal.c.

2584 {
2585  ok(0, "Didn't expect GetAttributesOf\n");
2586  return E_NOTIMPL;
2587 }
#define ok(value,...)
Definition: atltest.h:57
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SF_GetDisplayNameOf()

static HRESULT WINAPI SF_GetDisplayNameOf ( IShellFolder iface,
LPCITEMIDLIST  idl,
SHGDNF  flags,
STRRET name 
)
static

Definition at line 2601 of file ordinal.c.

2603 {
2604  ok(0, "Didn't expect GetDisplayNameOf\n");
2605  return E_NOTIMPL;
2606 }
#define ok(value,...)
Definition: atltest.h:57
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SF_GetUIObjectOf()

static HRESULT WINAPI SF_GetUIObjectOf ( IShellFolder iface,
HWND  owner,
UINT  cidl,
LPCITEMIDLIST idls,
REFIID  riid,
UINT inOut,
void **  out 
)
static

Definition at line 2589 of file ordinal.c.

2596 {
2597  ok(0, "Didn't expect GetUIObjectOf\n");
2598  return E_NOTIMPL;
2599 }
#define ok(value,...)
Definition: atltest.h:57
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SF_ParseDisplayName()

static HRESULT WINAPI SF_ParseDisplayName ( IShellFolder iface,
HWND  owner,
LPBC  reserved,
LPOLESTR  displayName,
ULONG eaten,
LPITEMIDLIST idl,
ULONG attr 
)
static

Definition at line 2535 of file ordinal.c.

2538 {
2539  ok(0, "Didn't expect ParseDisplayName\n");
2540  return E_NOTIMPL;
2541 }
#define ok(value,...)
Definition: atltest.h:57
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SF_QueryInterface()

static HRESULT WINAPI SF_QueryInterface ( IShellFolder iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 2516 of file ordinal.c.

2518 {
2519  /* SHIShellFolder_EnumObjects doesn't QI the object for IShellFolder */
2520  ok(!IsEqualGUID(&IID_IShellFolder, riid),
2521  "Unexpected QI for IShellFolder\n");
2522  return E_NOINTERFACE;
2523 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define ok(value,...)
Definition: atltest.h:57
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112

◆ SF_Release()

static ULONG WINAPI SF_Release ( IShellFolder iface)
static

Definition at line 2530 of file ordinal.c.

2531 {
2532  return 1;
2533 }

◆ SF_SetNameOf()

static HRESULT WINAPI SF_SetNameOf ( IShellFolder iface,
HWND  hwnd,
LPCITEMIDLIST  idl,
LPCOLESTR  name,
SHGDNF  flags,
LPITEMIDLIST idlOut 
)
static

Definition at line 2608 of file ordinal.c.

2611 {
2612  ok(0, "Didn't expect SetNameOf\n");
2613  return E_NOTIMPL;
2614 }
#define ok(value,...)
Definition: atltest.h:57
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ START_TEST()

START_TEST ( ordinal  )

Definition at line 3117 of file ordinal.c.

3118 {
3119  char **argv;
3120  int argc;
3121 
3122  hShlwapi = GetModuleHandleA("shlwapi.dll");
3123 
3124  init_pointers();
3125 
3127  if (argc >= 4)
3128  {
3129  DWORD procid;
3130  HANDLE hmem;
3131  sscanf(argv[2], "%d", &procid);
3132  sscanf(argv[3], "%p", &hmem);
3134  return;
3135  }
3136 
3140  test_fdsa();
3159 }
static void test_SHSetWindowBits(void)
Definition: ordinal.c:1606
static int argc
Definition: ServiceArgs.c:12
static void test_IUnknown_QueryServiceExec(void)
Definition: ordinal.c:2292
static void test_SHGetShellKey(void)
Definition: ordinal.c:2815
static HMODULE hShlwapi
Definition: ordinal.c:38
static void test_SHPropertyBag_ReadLONG(void)
Definition: ordinal.c:1580
static void test_alloc_shared(int argc, char **argv)
Definition: ordinal.c:458
static void test_SHPackDispParams(void)
Definition: ordinal.c:783
static void test_GetAcceptLanguagesA(void)
Definition: ordinal.c:179
static void test_IConnectionPoint(void)
Definition: ordinal.c:1448
static void test_fdsa(void)
Definition: ordinal.c:586
static void test_SHSearchMapInt(void)
Definition: ordinal.c:411
#define argv
Definition: mplay32.c:18
static void test_GetShellSecurityDescriptor(void)
Definition: ordinal.c:686
static void test_alloc_shared_remote(DWORD procid, HANDLE hmem)
Definition: ordinal.c:529
static void test_DllGetVersion(void)
Definition: ordinal.c:3109
_Check_return_ _CRTIMP int __cdecl sscanf(_In_z_ const char *_Src, _In_z_ _Scanf_format_string_ const char *_Format,...)
static void test_SHGetIniString(void)
Definition: ordinal.c:2714
static void test_SHFormatDateTimeW(void)
Definition: ordinal.c:1826
static void test_SHSetIniString(void)
Definition: ordinal.c:2765
unsigned long DWORD
Definition: ntddk_ex.h:95
int winetest_get_mainargs(char ***pargv)
static void test_SHCreateWorkerWindowA(void)
Definition: ordinal.c:2464
static const WCHAR procid[]
Definition: wbemdisp.c:289
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:821
static void test_IUnknown_ProfferService(void)
Definition: ordinal.c:2400
static void test_SHFormatDateTimeA(void)
Definition: ordinal.c:1674
static void test_SHGetObjectCompatFlags(void)
Definition: ordinal.c:2015
static void init_pointers(void)
Definition: ordinal.c:2905
static void test_IUnknown_GetClassID(void)
Definition: ordinal.c:3077
static void test_SHSetParentHwnd(void)
Definition: ordinal.c:2944
static void test_SHIShellFolder_EnumObjects(void)
Definition: ordinal.c:2634

◆ strcmp_wa()

static int strcmp_wa ( LPCWSTR  strw,
const char stra 
)
static

Definition at line 98 of file ordinal.c.

99 {
100  CHAR buf[512];
101  WideCharToMultiByte(CP_ACP, 0, strw, -1, buf, sizeof(buf), NULL, NULL);
102  return lstrcmpA(stra, buf);
103 }
#define WideCharToMultiByte
Definition: compat.h:101
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define CP_ACP
Definition: compat.h:99
char CHAR
Definition: xmlstorage.h:175
int WINAPI lstrcmpA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:18
smooth NULL
Definition: ftsmooth.c:416
static const char * strw(LPCWSTR x)
Definition: actctx.c:49

Referenced by test_SHGetIniString().

◆ test_alloc_shared()

static void test_alloc_shared ( int  argc,
char **  argv 
)
static

Definition at line 458 of file ordinal.c.

459 {
460  char cmdline[MAX_PATH];
462  STARTUPINFOA si = { 0 };
463  DWORD procid;
464  HANDLE hmem, hmem2 = 0;
465  struct shared_struct val, *p;
466  BOOL ret;
467 
469  hmem=pSHAllocShared(NULL,10,procid);
470  ok(hmem!=NULL,"SHAllocShared(NULL...) failed: %u\n", GetLastError());
471  ret = pSHFreeShared(hmem, procid);
472  ok( ret, "SHFreeShared failed: %u\n", GetLastError());
473 
474  val.value = 0x12345678;
475  val.handle = 0;
476  hmem = pSHAllocShared(&val, sizeof(val), procid);
477  ok(hmem!=NULL,"SHAllocShared(NULL...) failed: %u\n", GetLastError());
478 
479  p=pSHLockShared(hmem,procid);
480  ok(p!=NULL,"SHLockShared failed: %u\n", GetLastError());
481  if (p!=NULL)
482  ok(p->value == 0x12345678, "Wrong value in shared memory: %d instead of %d\n", p->value, 0x12345678);
483  ret = pSHUnlockShared(p);
484  ok( ret, "SHUnlockShared failed: %u\n", GetLastError());
485 
486  sprintf(cmdline, "%s %s %d %p", argv[0], argv[1], procid, hmem);
487  ret = CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
488  ok(ret, "could not create child process error: %u\n", GetLastError());
489  if (ret)
490  {
492  CloseHandle(pi.hThread);
493  CloseHandle(pi.hProcess);
494 
495  p = pSHLockShared(hmem, procid);
496  ok(p != NULL,"SHLockShared failed: %u\n", GetLastError());
497  if (p != NULL && p->value != 0x12345678)
498  {
499  ok(p->value == 0x12345679, "Wrong value in shared memory: %d instead of %d\n", p->value, 0x12345679);
500  hmem2 = p->handle;
501  ok(hmem2 != NULL, "Expected handle in shared memory\n");
502  }
503  ret = pSHUnlockShared(p);
504  ok(ret, "SHUnlockShared failed: %u\n", GetLastError());
505  }
506 
507  ret = pSHFreeShared(hmem, procid);
508  ok( ret, "SHFreeShared failed: %u\n", GetLastError());
509 
510  if (hmem2)
511  {
512  p = pSHLockShared(hmem2, procid);
513  ok(p != NULL,"SHLockShared failed: %u\n", GetLastError());
514  if (p != NULL)
515  ok(p->value == 0xDEADBEEF, "Wrong value in shared memory: %d instead of %d\n", p->value, 0xDEADBEEF);
516  ret = pSHUnlockShared(p);
517  ok(ret, "SHUnlockShared failed: %u\n", GetLastError());
518 
519  ret = pSHFreeShared(hmem2, procid);
520  ok(ret, "SHFreeShared failed: %u\n", GetLastError());
521  }
522 
523  SetLastError(0xdeadbeef);
524  ret = pSHFreeShared(NULL, procid);
525  ok(ret, "SHFreeShared failed: %u\n", GetLastError());
526  ok(GetLastError() == 0xdeadbeef, "last error should not have changed, got %u\n", GetLastError());
527 }
#define CloseHandle
Definition: compat.h:406
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
TCHAR * cmdline
Definition: stretchblt.cpp:32
#define argv
Definition: mplay32.c:18
#define sprintf(buf, format,...)
Definition: sprintf.c:55
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
GLuint GLfloat * val
Definition: glext.h:7180
static refpint_t pi[]
Definition: server.c:96
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA(LPCSTR lpApplicationName, LPSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCSTR lpCurrentDirectory, LPSTARTUPINFOA lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
Definition: proc.c:4742
#define MAX_PATH
Definition: compat.h:26
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetLastError(x)
Definition: compat.h:417
int ret
static const WCHAR procid[]
Definition: wbemdisp.c:289
void winetest_wait_child_process(HANDLE process)
#define ok(value,...)
Definition: atltest.h:57
GLfloat GLfloat p
Definition: glext.h:8902
DWORD WINAPI GetCurrentProcessId(VOID)
Definition: proc.c:1158

Referenced by START_TEST().

◆ test_alloc_shared_remote()

static void test_alloc_shared_remote ( DWORD  procid,
HANDLE  hmem 
)
static

Definition at line 529 of file ordinal.c.

530 {
531  struct shared_struct val, *p;
532  HANDLE hmem2;
533  BOOL ret;
534 
535  /* test directly accessing shared memory of a remote process */
536  p = pSHLockShared(hmem, procid);
537  ok(p != NULL || broken(p == NULL) /* Windows 7/8 */, "SHLockShared failed: %u\n", GetLastError());
538  if (p == NULL)
539  {
540  win_skip("Subprocess failed to modify shared memory, skipping test\n");
541  return;
542  }
543 
544  ok(p->value == 0x12345678, "Wrong value in shared memory: %d instead of %d\n", p->value, 0x12345678);
545  p->value++;
546 
547  val.value = 0xDEADBEEF;
548  val.handle = 0;
549  p->handle = pSHAllocShared(&val, sizeof(val), procid);
550  ok(p->handle != NULL, "SHAllocShared failed: %u\n", GetLastError());
551 
552  ret = pSHUnlockShared(p);
553  ok(ret, "SHUnlockShared failed: %u\n", GetLastError());
554 
555  /* test SHMapHandle */
556  SetLastError(0xdeadbeef);
557  hmem2 = pSHMapHandle(NULL, procid, GetCurrentProcessId(), 0, 0);
558  ok(hmem2 == NULL, "expected NULL, got new handle\n");
559  ok(GetLastError() == 0xdeadbeef, "last error should not have changed, got %u\n", GetLastError());
560 
561  hmem2 = pSHMapHandle(hmem, procid, GetCurrentProcessId(), 0, 0);
562 
563  /* It seems like Windows Vista/2008 uses a different internal implementation
564  * for shared memory, and calling SHMapHandle fails. */
565  ok(hmem2 != NULL || broken(hmem2 == NULL),
566  "SHMapHandle failed: %u\n", GetLastError());
567  if (hmem2 == NULL)
568  {
569  win_skip("Subprocess failed to map shared memory, skipping test\n");
570  return;
571  }
572 
573  p = pSHLockShared(hmem2, GetCurrentProcessId());
574  ok(p != NULL, "SHLockShared failed: %u\n", GetLastError());
575 
576  if (p != NULL)
577  ok(p->value == 0x12345679, "Wrong value in shared memory: %d instead of %d\n", p->value, 0x12345679);
578 
579  ret = pSHUnlockShared(p);
580  ok(ret, "SHUnlockShared failed: %u\n", GetLastError());
581 
582  ret = pSHFreeShared(hmem2, GetCurrentProcessId());
583  ok(ret, "SHFreeShared failed: %u\n", GetLastError());
584 }
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
GLuint GLfloat * val
Definition: glext.h:7180
#define SetLastError(x)
Definition: compat.h:417
int ret
static const WCHAR procid[]
Definition: wbemdisp.c:289
#define broken(x)
Definition: _sntprintf.h:21
#define ok(value,...)
Definition: atltest.h:57
GLfloat GLfloat p
Definition: glext.h:8902
#define win_skip
Definition: test.h:150
DWORD WINAPI GetCurrentProcessId(VOID)
Definition: proc.c:1158

Referenced by START_TEST().

◆ test_DllGetVersion()

static void test_DllGetVersion ( void  )
static

Definition at line 3109 of file ordinal.c.

3110 {
3111  HRESULT hr;
3112 
3113  hr = pDllGetVersion(NULL);
3114  ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
3115 }
HRESULT hr
Definition: shlfolder.c:183
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:77
#define ok(value,...)
Definition: atltest.h:57

Referenced by START_TEST().

◆ test_fdsa()

static void test_fdsa ( void  )
static

Definition at line 586 of file ordinal.c.

587 {
588  typedef struct
589  {
590  DWORD num_items; /* Number of elements inserted */
591  void *mem; /* Ptr to array */
592  DWORD blocks_alloced; /* Number of elements allocated */
593  BYTE inc; /* Number of elements to grow by when we need to expand */
594  BYTE block_size; /* Size in bytes of an element */
595  BYTE flags; /* Flags */
596  } FDSA_info;
597 
598  BOOL (WINAPI *pFDSA_Initialize)(DWORD block_size, DWORD inc, FDSA_info *info, void *mem,
599  DWORD init_blocks);
600  BOOL (WINAPI *pFDSA_Destroy)(FDSA_info *info);
601  DWORD (WINAPI *pFDSA_InsertItem)(FDSA_info *info, DWORD where, const void *block);
602  BOOL (WINAPI *pFDSA_DeleteItem)(FDSA_info *info, DWORD where);
603 
604  FDSA_info info;
605  int block_size = 10, init_blocks = 4, inc = 2;
606  DWORD ret;
607  char *mem;
608 
609  pFDSA_Initialize = (void *)GetProcAddress(hShlwapi, (LPSTR)208);
610  pFDSA_Destroy = (void *)GetProcAddress(hShlwapi, (LPSTR)209);
611  pFDSA_InsertItem = (void *)GetProcAddress(hShlwapi, (LPSTR)210);
612  pFDSA_DeleteItem = (void *)GetProcAddress(hShlwapi, (LPSTR)211);
613 
614  mem = HeapAlloc(GetProcessHeap(), 0, block_size * init_blocks);
615  memset(&info, 0, sizeof(info));
616 
617  ok(pFDSA_Initialize(block_size, inc, &info, mem, init_blocks), "FDSA_Initialize rets FALSE\n");
618  ok(info.num_items == 0, "num_items = %d\n", info.num_items);
619  ok(info.mem == mem, "mem = %p\n", info.mem);
620  ok(info.blocks_alloced == init_blocks, "blocks_alloced = %d\n", info.blocks_alloced);
621  ok(info.inc == inc, "inc = %d\n", info.inc);
622  ok(info.block_size == block_size, "block_size = %d\n", info.block_size);
623  ok(info.flags == 0, "flags = %d\n", info.flags);
624 
625  ret = pFDSA_InsertItem(&info, 1234, "1234567890");
626  ok(ret == 0, "ret = %d\n", ret);
627  ok(info.num_items == 1, "num_items = %d\n", info.num_items);
628  ok(info.mem == mem, "mem = %p\n", info.mem);
629  ok(info.blocks_alloced == init_blocks, "blocks_alloced = %d\n", info.blocks_alloced);
630  ok(info.inc == inc, "inc = %d\n", info.inc);
631  ok(info.block_size == block_size, "block_size = %d\n", info.block_size);
632  ok(info.flags == 0, "flags = %d\n", info.flags);
633 
634  ret = pFDSA_InsertItem(&info, 1234, "abcdefghij");
635  ok(ret == 1, "ret = %d\n", ret);
636 
637  ret = pFDSA_InsertItem(&info, 1, "klmnopqrst");
638  ok(ret == 1, "ret = %d\n", ret);
639 
640  ret = pFDSA_InsertItem(&info, 0, "uvwxyzABCD");
641  ok(ret == 0, "ret = %d\n", ret);
642  ok(info.mem == mem, "mem = %p\n", info.mem);
643  ok(info.flags == 0, "flags = %d\n", info.flags);
644 
645  /* This next InsertItem will cause shlwapi to allocate its own mem buffer */
646  ret = pFDSA_InsertItem(&info, 0, "EFGHIJKLMN");
647  ok(ret == 0, "ret = %d\n", ret);
648  ok(info.mem != mem, "mem = %p\n", info.mem);
649  ok(info.blocks_alloced == init_blocks + inc, "blocks_alloced = %d\n", info.blocks_alloced);
650  ok(info.flags == 0x1, "flags = %d\n", info.flags);
651 
652  ok(!memcmp(info.mem, "EFGHIJKLMNuvwxyzABCD1234567890klmnopqrstabcdefghij", 50), "mem %s\n", (char*)info.mem);
653 
654  ok(pFDSA_DeleteItem(&info, 2), "rets FALSE\n");
655  ok(info.mem != mem, "mem = %p\n", info.mem);
656  ok(info.blocks_alloced == init_blocks + inc, "blocks_alloced = %d\n", info.blocks_alloced);
657  ok(info.flags == 0x1, "flags = %d\n", info.flags);
658 
659  ok(!memcmp(info.mem, "EFGHIJKLMNuvwxyzABCDklmnopqrstabcdefghij", 40), "mem %s\n", (char*)info.mem);
660 
661  ok(pFDSA_DeleteItem(&info, 3), "rets FALSE\n");
662  ok(info.mem != mem, "mem = %p\n", info.mem);
663  ok(info.blocks_alloced == init_blocks + inc, "blocks_alloced = %d\n", info.blocks_alloced);
664  ok(info.flags == 0x1, "flags = %d\n", info.flags);
665 
666  ok(!memcmp(info.mem, "EFGHIJKLMNuvwxyzABCDklmnopqrst", 30), "mem %s\n", (char*)info.mem);
667 
668  ok(!pFDSA_DeleteItem(&info, 4), "does not ret FALSE\n");
669 
670  /* As shlwapi has allocated memory internally, Destroy will ret FALSE */
671  ok(!pFDSA_Destroy(&info), "FDSA_Destroy does not ret FALSE\n");
672 
673 
674  /* When Initialize is called with inc = 0, set it to 1 */
675  ok(pFDSA_Initialize(block_size, 0, &info, mem, init_blocks), "FDSA_Initialize rets FALSE\n");
676  ok(info.inc == 1, "inc = %d\n", info.inc);
677 
678  /* This time, because shlwapi hasn't had to allocate memory
679  internally, Destroy rets non-zero */
680  ok(pFDSA_Destroy(&info), "FDSA_Destroy rets FALSE\n");
681 
682 
683  HeapFree(GetProcessHeap(), 0, mem);
684 }
static unsigned int block
Definition: xmlmemory.c:118
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
static HMODULE hShlwapi
Definition: ordinal.c:38
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
Definition: winddi.h:3706
char * LPSTR
Definition: xmlstorage.h:182
static DWORD block_size(DWORD block)
Definition: jsutils.c:66
struct _test_info info[]
Definition: SetCursorPos.c:19
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static BOOL
Definition: ordinal.c:51
#define WINAPI
Definition: msvc.h:6
unsigned long DWORD
Definition: ntddk_ex.h:95
GLbitfield flags
Definition: glext.h:7161
int ret
unsigned char BYTE
Definition: mem.h:68
#define ok(value,...)
Definition: atltest.h:57
static DWORD
Definition: ordinal.c:43
Definition: mem.c:156
#define GetProcAddress(x, y)
Definition: compat.h:418
#define memset(x, y, z)
Definition: compat.h:39
#define HeapFree(x, y, z)
Definition: compat.h:402

Referenced by START_TEST().

◆ test_GetAcceptLanguagesA()

static void test_GetAcceptLanguagesA ( void  )
static

Definition at line 179 of file ordinal.c.

180 {
181  static LPCSTR table[] = {"de,en-gb;q=0.7,en;q=0.3",
182  "de,en;q=0.3,en-gb;q=0.7", /* sorting is ignored */
183  "winetest", /* content is ignored */
184  "de-de,de;q=0.5",
185  "de",
186  NULL};
187 
188  DWORD exactsize;
189  char original[512];
190  char language[32];
191  char buffer[64];
192  HKEY hroot = NULL;
193  LONG res_query = ERROR_SUCCESS;
194  LONG lres;
195  HRESULT hr;
196  DWORD maxlen = sizeof(buffer) - 2;
197  DWORD len;
198  LCID lcid;
199  LPCSTR entry;
200  INT i = 0;
201 
202  lcid = GetUserDefaultLCID();
203 
204  /* Get the original Value */
206  if (lres) {
207  skip("RegOpenKey(%s) failed: %d\n", ie_international, lres);
208  return;
209  }
210  len = sizeof(original);
211  original[0] = 0;
212  res_query = RegQueryValueExA(hroot, acceptlanguage, 0, NULL, (PBYTE)original, &len);
213 
215 
216  /* Some windows versions use "lang-COUNTRY" as default */
217  memset(language, 0, sizeof(language));
218  len = GetLocaleInfoA(lcid, LOCALE_SISO639LANGNAME, language, sizeof(language));
219 
220  if (len) {
221  lstrcatA(language, "-");
222  memset(buffer, 0, sizeof(buffer));
223  len = GetLocaleInfoA(lcid, LOCALE_SISO3166CTRYNAME, buffer, sizeof(buffer) - len - 1);
224  lstrcatA(language, buffer);
225  }
226  else
227  {
228  /* LOCALE_SNAME has additional parts in some languages. Try only as last chance */
229  memset(language, 0, sizeof(language));
230  len = GetLocaleInfoA(lcid, LOCALE_SNAME, language, sizeof(language));
231  }
232 
233  /* get the default value */
234  len = maxlen;
235  memset(buffer, '#', maxlen);
236  buffer[maxlen] = 0;
237  hr = pGetAcceptLanguagesA( buffer, &len);
238 
239  if (hr != S_OK) {
240  win_skip("GetAcceptLanguagesA failed with 0x%x\n", hr);
241  goto restore_original;
242  }
243 
244  if (lstrcmpA(buffer, language)) {
245  /* some windows versions use "lang" or "lang-country" as default */
246  language[0] = 0;
247  hr = LcidToRfc1766A(lcid, language, sizeof(language));
248  ok(hr == S_OK, "LcidToRfc1766A returned 0x%x and %s\n", hr, language);
249  }
250 
251  ok(!lstrcmpA(buffer, language),
252  "have '%s' (searching for '%s')\n", language, buffer);
253 
254  if (lstrcmpA(buffer, language)) {
255  win_skip("no more ideas, how to build the default language '%s'\n", buffer);
256  goto restore_original;
257  }
258 
259  trace("detected default: %s\n", language);
260  while ((entry = table[i])) {
261 
262  exactsize = lstrlenA(entry);
263 
264  lres = RegSetValueExA(hroot, acceptlanguage, 0, REG_SZ, (const BYTE *) entry, exactsize + 1);
265  ok(!lres, "got %d for RegSetValueExA: %s\n", lres, entry);
266 
267  /* len includes space for the terminating 0 before vista/w2k8 */
268  len = exactsize + 2;
269  memset(buffer, '#', maxlen);
270  buffer[maxlen] = 0;
271  hr = pGetAcceptLanguagesA( buffer, &len);
272  ok(((hr == E_INVALIDARG) && (len == 0)) ||
273  (SUCCEEDED(hr) &&
274  ((len == exactsize) || (len == exactsize+1)) &&
275  !lstrcmpA(buffer, entry)),
276  "+2_#%d: got 0x%x with %d and %s\n", i, hr, len, buffer);
277 
278  len = exactsize + 1;
279  memset(buffer, '#', maxlen);
280  buffer[maxlen] = 0;
281  hr = pGetAcceptLanguagesA( buffer, &len);
282  ok(((hr == E_INVALIDARG) && (len == 0)) ||
283  (SUCCEEDED(hr) &&
284  ((len == exactsize) || (len == exactsize+1)) &&
285  !lstrcmpA(buffer, entry)),
286  "+1_#%d: got 0x%x with %d and %s\n", i, hr, len, buffer);
287 
288  len = exactsize;
289  memset(buffer, '#', maxlen);
290  buffer[maxlen] = 0;
291  hr = pGetAcceptLanguagesA( buffer, &len);
292 
293  /* There is no space for the string in the registry.
294  When the buffer is large enough, the default language is returned
295 
296  When the buffer is too small for that fallback, win7_32 and w2k8_64
297  fail with E_NOT_SUFFICIENT_BUFFER, win8 fails with HRESULT_FROM_WIN32(ERROR_MORE_DATA),
298  other versions succeed and return a partial result while older os succeed
299  and overflow the buffer */
300 
301  ok(((hr == E_INVALIDARG) && (len == 0)) ||
302  (((hr == S_OK) && !lstrcmpA(buffer, language) && (len == lstrlenA(language))) ||
303  ((hr == S_OK) && !memcmp(buffer, language, len)) ||
304  ((hr == E_NOT_SUFFICIENT_BUFFER) && !len) ||
305  ((hr == __HRESULT_FROM_WIN32(ERROR_MORE_DATA)) && len == exactsize)),
306  "==_#%d: got 0x%x with %d and %s\n", i, hr, len, buffer);
307 
308  if (exactsize > 1) {
309  len = exactsize - 1;
310  memset(buffer, '#', maxlen);
311  buffer[maxlen] = 0;
312  hr = pGetAcceptLanguagesA( buffer, &len);
313  ok(((hr == E_INVALIDARG) && (len == 0)) ||
314  (((hr == S_OK) && !lstrcmpA(buffer, language) && (len == lstrlenA(language))) ||
315  ((hr == S_OK) && !memcmp(buffer, language, len)) ||
316  ((hr == E_NOT_SUFFICIENT_BUFFER) && !len) ||
317  ((hr == __HRESULT_FROM_WIN32(ERROR_MORE_DATA)) && len == exactsize - 1)),
318  "-1_#%d: got 0x%x with %d and %s\n", i, hr, len, buffer);
319  }
320 
321  len = 1;
322  memset(buffer, '#', maxlen);
323  buffer[maxlen] = 0;
324  hr = pGetAcceptLanguagesA( buffer, &len);
325  ok(((hr == E_INVALIDARG) && (len == 0)) ||
326  (((hr == S_OK) && !lstrcmpA(buffer, language) && (len == lstrlenA(language))) ||
327  ((hr == S_OK) && !memcmp(buffer, language, len)) ||
328  ((hr == E_NOT_SUFFICIENT_BUFFER) && !len) ||
329  ((hr == __HRESULT_FROM_WIN32(ERROR_MORE_DATA)) && len == 1)),
330  "=1_#%d: got 0x%x with %d and %s\n", i, hr, len, buffer);
331 
332  len = maxlen;
333  hr = pGetAcceptLanguagesA( NULL, &len);
334 
335  /* w2k3 and below: E_FAIL and untouched len,
336  since w2k8: S_OK and needed size (excluding 0), win8 S_OK and size including 0. */
337  ok( ((hr == S_OK) && ((len == exactsize) || (len == exactsize + 1))) ||
338  ((hr == E_FAIL) && (len == maxlen)),
339  "NULL,max #%d: got 0x%x with %d and %s\n", i, hr, len, buffer);
340 
341  i++;
342  }
343 
344  /* without a value in the registry, a default language is returned */
346 
347  len = maxlen;
348  memset(buffer, '#', maxlen);
349  buffer[maxlen] = 0;
350  hr = pGetAcceptLanguagesA( buffer, &len);
351  ok( ((hr == S_OK) && (len == lstrlenA(language))),
352  "max: got 0x%x with %d and %s (expected S_OK with %d and '%s'\n",
353  hr, len, buffer, lstrlenA(language), language);
354 
355  len = 2;
356  memset(buffer, '#', maxlen);
357  buffer[maxlen] = 0;
358  hr = pGetAcceptLanguagesA( buffer, &len);
359  ok( (((hr == S_OK) || (hr == E_INVALIDARG)) && !memcmp(buffer, language, len)) ||
360  ((hr == E_NOT_SUFFICIENT_BUFFER) && !len) ||
362  "=2: got 0x%x with %d and %s\n", hr, len, buffer);
363 
364  len = 1;
365  memset(buffer, '#', maxlen);
366  buffer[maxlen] = 0;
367  hr = pGetAcceptLanguagesA( buffer, &len);
368  /* When the buffer is too small, win7_32 and w2k8_64 and above fail with
369  E_NOT_SUFFICIENT_BUFFER, win8 ERROR_CANNOT_COPY,
370  other versions succeed and return a partial 0 terminated result while other versions
371  fail with E_INVALIDARG and return a partial unterminated result */
372  ok( (((hr == S_OK) || (hr == E_INVALIDARG)) && !memcmp(buffer, language, len)) ||
373  ((hr == E_NOT_SUFFICIENT_BUFFER) && !len) ||
375  "=1: got 0x%x with %d and %s\n", hr, len, buffer);
376 
377  len = 0;
378  memset(buffer, '#', maxlen);
379  buffer[maxlen] = 0;
380  hr = pGetAcceptLanguagesA( buffer, &len);
381  /* w2k3 and below: E_FAIL, since w2k8: E_INVALIDARG, win8 ERROR_CANNOT_COPY */
383  "got 0x%x\n", hr);
384 
385  memset(buffer, '#', maxlen);
386  buffer[maxlen] = 0;
387  hr = pGetAcceptLanguagesA( buffer, NULL);
388  /* w2k3 and below: E_FAIL, since w2k8: E_INVALIDARG */
389  ok((hr == E_FAIL) || (hr == E_INVALIDARG),
390  "got 0x%x (expected E_FAIL or E_INVALIDARG)\n", hr);
391 
392 
393  hr = pGetAcceptLanguagesA( NULL, NULL);
394  /* w2k3 and below: E_FAIL, since w2k8: E_INVALIDARG */
395  ok((hr == E_FAIL) || (hr == E_INVALIDARG),
396  "got 0x%x (expected E_FAIL or E_INVALIDARG)\n", hr);
397 
398 restore_original:
399  if (!res_query) {
400  len = lstrlenA(original);
401  lres = RegSetValueExA(hroot, acceptlanguage, 0, REG_SZ, (const BYTE *) original, len ? len + 1: 0);
402  ok(!lres, "RegSetValueEx(%s) failed: %d\n", original, lres);
403  }
404  else
405  {
407  }
408  RegCloseKey(hroot);
409 }
static LCIDTORFC1766A LcidToRfc1766A
Definition: win_iconv.c:708
LONG WINAPI RegOpenKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:3257
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
Definition: reg.c:4023
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
#define ERROR_SUCCESS
Definition: deptool.c:10
#define LOCALE_SISO639LANGNAME
Definition: winnls.h:127
HRESULT hr
Definition: shlfolder.c:183
INT WINAPI GetLocaleInfoA(LCID lcid, LCTYPE lctype, LPSTR buffer, INT len)
Definition: lang.c:1018
#define HKEY_CURRENT_USER
Definition: winreg.h:11
static const CHAR ie_international[]
Definition: ordinal.c:90
int WINAPI lstrcmpA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:18
GLuint buffer
Definition: glext.h:5915
DWORD LCID
Definition: nls.h:13
LCID WINAPI GetUserDefaultLCID(void)
Definition: lang.c:768
#define E_FAIL
Definition: ddrawi.h:102
int32_t INT
Definition: typedefs.h:56
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
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
long LONG
Definition: pedump.c:60
#define E_INVALIDARG
Definition: ddrawi.h:101
#define __HRESULT_FROM_WIN32(x)
Definition: winerror.h:85
smooth NULL
Definition: ftsmooth.c:416
const char * LPCSTR
Definition: xmlstorage.h:183
#define ERROR_CANNOT_COPY
Definition: winerror.h:294
LPSTR WINAPI lstrcatA(LPSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:123
#define trace
Definition: atltest.h:70
LONG HRESULT
Definition: typedefs.h:77
static const CHAR acceptlanguage[]
Definition: ordinal.c:95
#define LOCALE_SNAME
Definition: winnls.h:129
unsigned long DWORD
Definition: ntddk_ex.h:95
uint32_t entry
Definition: isohybrid.c:63
GLenum GLsizei len
Definition: glext.h:6722
unsigned char BYTE
Definition: mem.h:68
#define E_NOT_SUFFICIENT_BUFFER
Definition: winerror.h:2345
#define ERROR_MORE_DATA
Definition: dderror.h:13
#define S_OK
Definition: intsafe.h:59
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145
#define LOCALE_SISO3166CTRYNAME
Definition: winnls.h:128
#define ok(value,...)
Definition: atltest.h:57
LONG WINAPI RegDeleteValueA(HKEY hKey, LPCSTR lpValueName)
Definition: reg.c:2319
#define skip(...)
Definition: atltest.h:64
LONG WINAPI RegSetValueExA(HKEY hKey, LPCSTR lpValueName, DWORD Reserved, DWORD dwType, CONST BYTE *lpData, DWORD cbData)
Definition: reg.c:4812
#define memset(x, y, z)
Definition: compat.h:39
#define win_skip
Definition: test.h:150
BYTE * PBYTE
Definition: pedump.c:66
#define SUCCEEDED(hr)
Definition: intsafe.h:57
#define REG_SZ
Definition: layer.c:22

Referenced by START_TEST().

◆ test_GetShellSecurityDescriptor()

static void test_GetShellSecurityDescriptor ( void  )
static

Definition at line 686 of file ordinal.c.

687 {
688  static const SHELL_USER_PERMISSION supCurrentUserFull = {
689  { {SECURITY_NULL_SID_AUTHORITY}, 0, 0 },
691  GENERIC_ALL, 0, 0 };
692 #define MY_INHERITANCE 0xBE /* invalid value to proof behavior */
693  static const SHELL_USER_PERMISSION supEveryoneDenied = {
696  GENERIC_WRITE, MY_INHERITANCE | 0xDEADBA00, GENERIC_READ };
697  const SHELL_USER_PERMISSION* rgsup[2] = {
698  &supCurrentUserFull, &supEveryoneDenied,
699  };
700  SECURITY_DESCRIPTOR* psd;
701 
702  if(!pGetShellSecurityDescriptor) /* vista and later */
703  {
704  win_skip("GetShellSecurityDescriptor not available\n");
705  return;
706  }
707 
709  ok(psd==NULL, "GetShellSecurityDescriptor should fail\n");
710  psd = pGetShellSecurityDescriptor(rgsup, 0);
711  ok(psd==NULL, "GetShellSecurityDescriptor should fail, got %p\n", psd);
712 
713  SetLastError(0xdeadbeef);
714  psd = pGetShellSecurityDescriptor(rgsup, 2);
715  ok(psd!=NULL, "GetShellSecurityDescriptor failed\n");
716  if (psd!=NULL)
717  {
718  BOOL bHasDacl = FALSE, bDefaulted, ret;
719  PACL pAcl;
720  DWORD dwRev;
722 
723  ok(IsValidSecurityDescriptor(psd), "returned value is not valid SD\n");
724 
725  ret = GetSecurityDescriptorControl(psd, &control, &dwRev);
726  ok(ret, "GetSecurityDescriptorControl failed with error %u\n", GetLastError());
727  ok(0 == (control & SE_SELF_RELATIVE), "SD should be absolute\n");
728 
729  ret = GetSecurityDescriptorDacl(psd, &bHasDacl, &pAcl, &bDefaulted);
730  ok(ret, "GetSecurityDescriptorDacl failed with error %u\n", GetLastError());
731 
732  ok(bHasDacl, "SD has no DACL\n");
733  if (bHasDacl)
734  {
735  ok(!bDefaulted, "DACL should not be defaulted\n");
736 
737  ok(pAcl != NULL, "NULL DACL!\n");
738  if (pAcl != NULL)
739  {
740  ACL_SIZE_INFORMATION asiSize;
741 
742  ok(IsValidAcl(pAcl), "DACL is not valid\n");
743 
744  ret = GetAclInformation(pAcl, &asiSize, sizeof(asiSize), AclSizeInformation);
745  ok(ret, "GetAclInformation failed with error %u\n", GetLastError());
746 
747  ok(asiSize.AceCount == 3, "Incorrect number of ACEs: %d entries\n", asiSize.AceCount);
748  if (asiSize.AceCount == 3)
749  {
750  ACCESS_ALLOWED_ACE *paaa; /* will use for DENIED too */
751 
752  ret = GetAce(pAcl, 0, (LPVOID*)&paaa);
753  ok(ret, "GetAce failed with error %u\n", GetLastError());
755  "Invalid ACE type %d\n", paaa->Header.AceType);
756  ok(paaa->Header.AceFlags == 0, "Invalid ACE flags %x\n", paaa->Header.AceFlags);
757  ok(paaa->Mask == GENERIC_ALL, "Invalid ACE mask %x\n", paaa->Mask);
758 
759  ret = GetAce(pAcl, 1, (LPVOID*)&paaa);
760  ok(ret, "GetAce failed with error %u\n", GetLastError());
762  "Invalid ACE type %d\n", paaa->Header.AceType);
763  /* first one of two ACEs generated from inheritable entry - without inheritance */
764  ok(paaa->Header.AceFlags == 0, "Invalid ACE flags %x\n", paaa->Header.AceFlags);
765  ok(paaa->Mask == GENERIC_WRITE, "Invalid ACE mask %x\n", paaa->Mask);
766 
767  ret = GetAce(pAcl, 2, (LPVOID*)&paaa);
768  ok(ret, "GetAce failed with error %u\n", GetLastError());
770  "Invalid ACE type %d\n", paaa->Header.AceType);
771  /* second ACE - with inheritance */
772  ok(paaa->Header.AceFlags == MY_INHERITANCE,
773  "Invalid ACE flags %x\n", paaa->Header.AceFlags);
774  ok(paaa->Mask == GENERIC_READ, "Invalid ACE mask %x\n", paaa->Mask);
775  }
776  }
777  }
778 
779  LocalFree(psd);
780  }
781 }
#define GENERIC_ALL
Definition: nt_native.h:92
UCHAR AceFlags
Definition: ms-dtyp.idl:211
#define TRUE
Definition: types.h:120
#define SE_SELF_RELATIVE
Definition: setypes.h:780
BOOL WINAPI IsValidSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor)
Definition: sec.c:176
BOOL WINAPI GetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, LPBOOL lpbDaclPresent, PACL *pDacl, LPBOOL lpbDaclDefaulted)
Definition: sec.c:45
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
BOOL WINAPI IsValidAcl(PACL pAcl)
Definition: security.c:1088
static SECURITY_DESCRIPTOR *WINAPI * pGetShellSecurityDescriptor(const SHELL_USER_PERMISSION **, int)
#define SECURITY_NULL_SID_AUTHORITY
Definition: setypes.h:496
ACE_HEADER Header
Definition: ms-dtyp.idl:216
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL WINAPI GetSecurityDescriptorControl(PSECURITY_DESCRIPTOR pSecurityDescriptor, PSECURITY_DESCRIPTOR_CONTROL pControl, LPDWORD lpdwRevision)
Definition: sec.c:21
WORD SECURITY_DESCRIPTOR_CONTROL
Definition: lsa.idl:37
#define GENERIC_WRITE
Definition: nt_native.h:90
smooth NULL
Definition: ftsmooth.c:416
#define SECURITY_WORLD_SID_AUTHORITY
Definition: setypes.h:499
#define MY_INHERITANCE
unsigned long DWORD
Definition: ntddk_ex.h:95
#define ACCESS_ALLOWED_ACE_TYPE
Definition: setypes.h:685
#define SetLastError(x)
Definition: compat.h:417
#define SECURITY_WORLD_RID
Definition: setypes.h:513
#define ACCESS_DENIED_ACE_TYPE
Definition: setypes.h:686
int ret
UCHAR AceType
Definition: ms-dtyp.idl:210
#define GENERIC_READ
Definition: compat.h:124
ACCESS_MASK Mask
Definition: ms-dtyp.idl:217
BOOL WINAPI GetAce(PACL pAcl, DWORD dwAceIndex, LPVOID *pAce)
Definition: security.c:1065
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1577
#define ok(value,...)
Definition: atltest.h:57
BOOL WINAPI GetAclInformation(PACL pAcl, LPVOID pAclInformation, DWORD nAclInformationLength, ACL_INFORMATION_CLASS dwAclInformationClass)
Definition: security.c:1073
#define win_skip
Definition: test.h:150

Referenced by START_TEST().

◆ test_IConnectionPoint()

static void test_IConnectionPoint ( void  )
static

Definition at line 1448 of file ordinal.c.

1449 {
1450  HRESULT rc;
1451  ULONG ref;
1453  Contain *container;
1454  Disp *dispatch;
1455  DWORD cookie = 0xffffffff;
1457  VARIANT vars[10];
1458 
1459  container = HeapAlloc(GetProcessHeap(),0,sizeof(Contain));
1460  container->IConnectionPointContainer_iface.lpVtbl = &contain_vtbl;
1461  container->refCount = 1;
1462  container->ptCount = 0;
1463  container->pt = NULL;
1464 
1465  dispatch = HeapAlloc(GetProcessHeap(),0,sizeof(Disp));
1466  dispatch->IDispatch_iface.lpVtbl = &disp_vtbl;
1467  dispatch->refCount = 1;
1468 
1469  rc = pConnectToConnectionPoint((IUnknown*)dispatch, &IID_NULL, TRUE, (IUnknown*)container, &cookie, &point);
1470  ok(rc == S_OK, "pConnectToConnectionPoint failed with %x\n",rc);
1471  ok(point != NULL, "returned ConnectionPoint is NULL\n");
1472  ok(cookie != 0xffffffff, "invalid cookie returned\n");
1473 
1474  rc = pIConnectionPoint_SimpleInvoke(point,0xa0,NULL);
1475  ok(rc == S_OK, "pConnectToConnectionPoint failed with %x\n",rc);
1476 
1477  memset(&params, 0xc0, sizeof(params));
1478  memset(vars, 0xc0, sizeof(vars));
1479  rc = pSHPackDispParams(&params, vars, 2, VT_I4, 0xdeadbeef, VT_BSTR, 0xdeadcafe);
1480  ok(rc == S_OK, "SHPackDispParams failed: %08x\n", rc);
1481 
1482  rc = pIConnectionPoint_SimpleInvoke(point,0xa1,&params);
1483  ok(rc == S_OK, "pConnectToConnectionPoint failed with %x\n",rc);
1484 
1485  rc = pConnectToConnectionPoint(NULL, &IID_NULL, FALSE, (IUnknown*)container, &cookie, NULL);
1486  ok(rc == S_OK, "pConnectToConnectionPoint failed with %x\n",rc);
1487 
1488 /* MSDN says this should be required but it crashs on XP
1489  IUnknown_Release(point);
1490 */
1491  ref = IUnknown_Release((IUnknown*)container);
1492  ok(ref == 0, "leftover IConnectionPointContainer reference %i\n",ref);
1493  ref = IUnknown_Release((IUnknown*)dispatch);
1494  ok(ref == 0, "leftover IDispatch reference %i\n",ref);
1495 }
#define TRUE
Definition: types.h:120
Definition: compat.h:1947
static const IConnectionPointContainerVtbl contain_vtbl
Definition: ordinal.c:1439
Definition: send.c:47
POINTL point
Definition: edittest.c:50
struct container container
GLenum const GLfloat * params
Definition: glext.h:5645
static const IDispatchVtbl disp_vtbl
Definition: ordinal.c:1002
GLenum GLint ref
Definition: glext.h:6028
smooth NULL
Definition: ftsmooth.c:416
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG HRESULT
Definition: typedefs.h:77
unsigned long DWORD
Definition: ntddk_ex.h:95
#define IID_NULL
Definition: guiddef.h:98
void dispatch(HANDLE hStopEvent)
Definition: dispatch.c:66
#define S_OK
Definition: intsafe.h:59
#define ok(value,...)
Definition: atltest.h:57
Definition: cookie.c:33
struct stdole::DISPPARAMS DISPPARAMS
unsigned int ULONG
Definition: retypes.h:1
Definition: ordinal.c:827
#define memset(x, y, z)
Definition: compat.h:39

Referenced by START_TEST().

◆ test_IUnknown_GetClassID()

static void test_IUnknown_GetClassID ( void  )
static

Definition at line 3077 of file ordinal.c.

3078 {
3079  CLSID clsid, clsid2, clsid3;
3080  HRESULT hr;
3081 
3082  if (0) /* crashes on native systems */
3083  hr = pIUnknown_GetClassID(NULL, NULL);
3084 
3085  memset(&clsid, 0xcc, sizeof(clsid));
3086  memset(&clsid3, 0xcc, sizeof(clsid3));
3087  hr = pIUnknown_GetClassID(NULL, &clsid);
3088  ok(hr == E_FAIL, "got 0x%08x\n", hr);
3089  ok(IsEqualCLSID(&clsid, &CLSID_NULL) || broken(IsEqualCLSID(&clsid, &clsid3)) /* win2k, winxp, win2k3 */,
3090  "got wrong clsid %s\n", wine_dbgstr_guid(&clsid));
3091 
3092  memset(&clsid, 0xcc, sizeof(clsid));
3093  memset(&clsid2, 0xab, sizeof(clsid2));
3094  hr = pIUnknown_GetClassID((IUnknown*)&testpersist, &clsid);
3095  ok(hr == 0x8fff2222, "got 0x%08x\n", hr);
3096  ok(IsEqualCLSID(&clsid, &clsid2) || broken(IsEqualCLSID(&clsid, &clsid3)) /* win2k3 */,
3097  "got wrong clsid %s\n", wine_dbgstr_guid(&clsid));
3098 
3099  /* IPersistFolder is also supported */
3100  memset(&clsid, 0xcc, sizeof(clsid));
3101  memset(&clsid2, 0xab, sizeof(clsid2));
3102  memset(&clsid3, 0xcc, sizeof(clsid3));
3103  hr = pIUnknown_GetClassID((IUnknown*)&testpersist2, &clsid);
3104  ok(hr == 0x8fff2222, "got 0x%08x\n", hr);
3105  ok(IsEqualCLSID(&clsid, &clsid2) || broken(IsEqualCLSID(&clsid, &clsid3)) /* win2k3 */,
3106  "got wrong clsid %s\n", wine_dbgstr_guid(&clsid));
3107 }
HRESULT hr
Definition: shlfolder.c:183
const char * wine_dbgstr_guid(const GUID *guid)
static IPersist testpersist2
Definition: ordinal.c:3075
#define E_FAIL
Definition: ddrawi.h:102
static IPersist testpersist
Definition: ordinal.c:3074
smooth NULL
Definition: ftsmooth.c:416
#define CLSID_NULL
Definition: guiddef.h:99
LONG HRESULT
Definition: typedefs.h:77
REFCLSID clsid
Definition: msctf.c:82
#define broken(x)
Definition: _sntprintf.h:21
#define ok(value,...)
Definition: atltest.h:57
#define memset(x, y, z)
Definition: compat.h:39
#define IsEqualCLSID(rclsid1, rclsid2)
Definition: guiddef.h:96

Referenced by START_TEST().

◆ test_IUnknown_ProfferService()

static void test_IUnknown_ProfferService ( void  )
static

Definition at line 2400 of file ordinal.c.

2401 {
2402  IServiceProvider *provider;
2403  IProfferService *proff;
2404  static const GUID dummy_serviceid = { 0xdeadbeef };
2405  call_trace_t trace_expected;
2406  HRESULT hr;
2407  DWORD cookie;
2408 
2409  provider = IServiceProviderImpl_Construct();
2411 
2412  /* null source pointer */
2413  hr = pIUnknown_ProfferService(NULL, &dummy_serviceid, 0, 0);
2414  ok(hr == E_FAIL ||
2415  hr == E_NOTIMPL, /* win 8 */
2416  "got 0x%08x\n", hr);
2417 
2418  /* expected trace:
2419  IUnknown_ProfferService( ptr1, serviceid, arg1, arg2);
2420  -> IUnknown_QueryInterface( ptr1, &IID_IServiceProvider, &provider );
2421  -> IServiceProvider_QueryService( provider, &IID_IProfferService, &IID_IProfferService, &proffer );
2422 
2423  if (service pointer not null):
2424  -> IProfferService_ProfferService( proffer, serviceid, arg1, arg2 );
2425  else
2426  -> IProfferService_RevokeService( proffer, *arg2 );
2427  */
2428  init_call_trace(&trace_expected);
2429 
2430  add_call(&trace_expected, 1, proff, &IID_IServiceProvider, 0, 0, 0);
2431  add_call(&trace_expected, 2, &IID_IProfferService, &IID_IProfferService, 0, 0, 0);
2432  add_call(&trace_expected, 3, &dummy_serviceid, provider, &cookie, 0, 0);
2433 
2435  cookie = 0;
2436  hr = pIUnknown_ProfferService((IUnknown*)proff, &dummy_serviceid, provider, &cookie);
2437  ok(hr == S_OK, "got 0x%08x\n", hr);
2438  ok(cookie == 0xdeadbeef, "got %x\n", cookie);
2439 
2440  ok_trace(&trace_expected, &trace_got);
2442  free_call_trace(&trace_expected);
2443 
2444  /* same with ::Revoke path */
2445  init_call_trace(&trace_expected);
2446 
2447  add_call(&trace_expected, 1, proff, &IID_IServiceProvider, 0, 0, 0);
2448  add_call(&trace_expected, 2, &IID_IProfferService, &IID_IProfferService, 0, 0, 0);
2449  add_call(&trace_expected, 4, (void*)(DWORD_PTR)cookie, 0, 0, 0, 0);
2450 
2452  ok(cookie != 0, "got %x\n", cookie);
2453  hr = pIUnknown_ProfferService((IUnknown*)proff, &dummy_serviceid, 0, &cookie);
2454  ok(hr == S_OK, "got 0x%08x\n", hr);
2455  ok(cookie == 0, "got %x\n", cookie);
2456  ok_trace(&trace_expected, &trace_got);
2458  free_call_trace(&trace_expected);
2459 
2460  IServiceProvider_Release(provider);
2461  IProfferService_Release(proff);
2462 }
HRESULT hr
Definition: shlfolder.c:183
static IProfferService * IProfferServiceImpl_Construct(void)
Definition: ordinal.c:2214
#define E_FAIL
Definition: ddrawi.h:102
static IServiceProvider * IServiceProviderImpl_Construct(void)
Definition: ordinal.c:2203
static call_trace_t trace_got
Definition: ordinal.c:177
#define ok_trace(a, b)
Definition: ordinal.c:174
static void free_call_trace(const call_trace_t *ctrace)
Definition: ordinal.c:123
static void init_call_trace(call_trace_t *ctrace)
Definition: ordinal.c:116
smooth NULL
Definition: ftsmooth.c:416
static void add_call(call_trace_t *ctrace, int id, const void *arg0, const void *arg1, const void *arg2, const void *arg3, const void *arg4)
Definition: ordinal.c:128
LONG HRESULT
Definition: typedefs.h:77
unsigned long DWORD
Definition: ntddk_ex.h:95
uint32_t DWORD_PTR
Definition: typedefs.h:63
#define S_OK
Definition: intsafe.h:59
#define ok(value,...)
Definition: atltest.h:57
#define E_NOTIMPL
Definition: ddrawi.h:99
Definition: cookie.c:33

Referenced by START_TEST().

◆ test_IUnknown_QueryServiceExec()

static void test_IUnknown_QueryServiceExec ( void  )
static

Definition at line