ReactOS 0.4.15-dev-7788-g1ad9096
oleaut.c File Reference
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winerror.h"
#include "ole2.h"
#include "olectl.h"
#include "oleauto.h"
#include "initguid.h"
#include "typelib.h"
#include "oleaut32_oaidl.h"
#include "wine/debug.h"
Include dependency graph for oleaut.c:

Go to the source code of this file.

Classes

struct  bstr_t
 
struct  bstr_cache_entry_t
 
struct  tlibredirect_data
 

Macros

#define COBJMACROS
 
#define BUCKET_SIZE   16
 
#define BUCKET_BUFFER_SIZE   6
 
#define ARENA_INUSE_FILLER   0x55
 
#define ARENA_TAIL_FILLER   0xab
 
#define ARENA_FREE_FILLER   0xfeeefeee
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (ole)
 
 WINE_DECLARE_DEBUG_CHANNEL (heap)
 
static size_t bstr_alloc_size (size_t size)
 
static bstr_tbstr_from_str (BSTR str)
 
static bstr_cache_entry_tget_cache_entry_from_idx (unsigned cache_idx)
 
static bstr_cache_entry_tget_cache_entry (size_t size)
 
static bstr_cache_entry_tget_cache_entry_from_alloc_size (SIZE_T alloc_size)
 
static bstr_talloc_bstr (size_t size)
 
UINT WINAPI SysStringLen (BSTR str)
 
UINT WINAPI SysStringByteLen (BSTR str)
 
BSTR WINAPI SysAllocString (LPCOLESTR str)
 
static IMallocget_malloc (void)
 
void WINAPI DECLSPEC_HOTPATCH SysFreeString (BSTR str)
 
BSTR WINAPI SysAllocStringLen (const OLECHAR *str, unsigned int len)
 
int WINAPI SysReAllocStringLen (BSTR *old, const OLECHAR *str, unsigned int len)
 
BSTR WINAPI DECLSPEC_HOTPATCH SysAllocStringByteLen (LPCSTR str, UINT len)
 
INT WINAPI SysReAllocString (LPBSTR old, LPCOLESTR str)
 
void WINAPI SetOaNoCache (void)
 
HRESULT WINAPI DECLSPEC_HOTPATCH RegisterActiveObject (LPUNKNOWN punk, REFCLSID rcid, DWORD dwFlags, LPDWORD pdwRegister)
 
HRESULT WINAPI DECLSPEC_HOTPATCH RevokeActiveObject (DWORD xregister, LPVOID reserved)
 
HRESULT WINAPI DECLSPEC_HOTPATCH GetActiveObject (REFCLSID rcid, LPVOID preserved, LPUNKNOWN *ppunk)
 
ULONG WINAPI OaBuildVersion (void)
 
HRESULT WINAPI OleTranslateColor (OLE_COLOR clr, HPALETTE hpal, COLORREF *pColorRef)
 
HRESULT WINAPI OLEAUTPS_DllGetClassObject (REFCLSID, REFIID, LPVOID *)
 
static BOOL actctx_get_typelib_module (REFIID iid, WCHAR *module, DWORD len)
 
static HRESULT reg_get_typelib_module (REFIID iid, WCHAR *module, DWORD len)
 
static HRESULT get_typeinfo_for_iid (REFIID iid, ITypeInfo **typeinfo)
 
static HRESULT WINAPI dispatch_typelib_ps_QueryInterface (IPSFactoryBuffer *iface, REFIID iid, void **out)
 
static ULONG WINAPI dispatch_typelib_ps_AddRef (IPSFactoryBuffer *iface)
 
static ULONG WINAPI dispatch_typelib_ps_Release (IPSFactoryBuffer *iface)
 
static HRESULT dispatch_create_proxy (IUnknown *outer, IRpcProxyBuffer **proxy, void **out)
 
static HRESULT WINAPI dispatch_typelib_ps_CreateProxy (IPSFactoryBuffer *iface, IUnknown *outer, REFIID iid, IRpcProxyBuffer **proxy, void **out)
 
static HRESULT dispatch_create_stub (IUnknown *server, IRpcStubBuffer **stub)
 
static HRESULT WINAPI dispatch_typelib_ps_CreateStub (IPSFactoryBuffer *iface, REFIID iid, IUnknown *server, IRpcStubBuffer **stub)
 
void _get_STDFONT_CF (LPVOID *)
 
void _get_STDPIC_CF (LPVOID *)
 
HRESULT WINAPI DllGetClassObject (REFCLSID rclsid, REFIID iid, LPVOID *ppv)
 
HRESULT WINAPI DllCanUnloadNow (void)
 
BOOL WINAPI DllMain (HINSTANCE hInstDll, DWORD fdwReason, LPVOID lpvReserved)
 
HRESULT WINAPI DllRegisterServer (void)
 
HRESULT WINAPI DllUnregisterServer (void)
 
HCURSOR WINAPI OleIconToCursor (HINSTANCE hinstExe, HICON hIcon)
 
HRESULT WINAPI GetAltMonthNames (LCID lcid, LPOLESTR **str)
 

Variables

static BOOL bstr_cache_enabled
 
static CRITICAL_SECTION cs_bstr_cache = { &cs_bstr_cache_dbg, -1, 0, 0, 0, 0 }
 
static CRITICAL_SECTION_DEBUG cs_bstr_cache_dbg
 
static bstr_cache_entry_t bstr_cache [0x10000/BUCKET_SIZE]
 
static const WCHAR _delimiter [] = {'!',0}
 
static const WCHARpdelimiter = &_delimiter[0]
 
static const IPSFactoryBufferVtbl dispatch_typelib_ps_vtbl
 
static IPSFactoryBuffer dispatch_typelib_ps = { &dispatch_typelib_ps_vtbl }
 

Macro Definition Documentation

◆ ARENA_FREE_FILLER

#define ARENA_FREE_FILLER   0xfeeefeee

Definition at line 107 of file oleaut.c.

◆ ARENA_INUSE_FILLER

#define ARENA_INUSE_FILLER   0x55

Definition at line 105 of file oleaut.c.

◆ ARENA_TAIL_FILLER

#define ARENA_TAIL_FILLER   0xab

Definition at line 106 of file oleaut.c.

◆ BUCKET_BUFFER_SIZE

#define BUCKET_BUFFER_SIZE   6

Definition at line 97 of file oleaut.c.

◆ BUCKET_SIZE

#define BUCKET_SIZE   16

Definition at line 96 of file oleaut.c.

◆ COBJMACROS

#define COBJMACROS

Definition at line 26 of file oleaut.c.

Function Documentation

◆ _get_STDFONT_CF()

void _get_STDFONT_CF ( LPVOID ppv)

Definition at line 2285 of file olefont.c.

2285{ *ppv = &STDFONT_CF; }
static IClassFactoryImpl STDFONT_CF
Definition: olefont.c:2283
REFIID LPVOID * ppv
Definition: atlbase.h:39

Referenced by DllGetClassObject().

◆ _get_STDPIC_CF()

void _get_STDPIC_CF ( LPVOID ppv)

Definition at line 2618 of file olepicture.c.

2618{ *ppv = &STDPIC_CF; }
static IClassFactoryImpl STDPIC_CF
Definition: olepicture.c:2616

Referenced by DllGetClassObject().

◆ actctx_get_typelib_module()

static BOOL actctx_get_typelib_module ( REFIID  iid,
WCHAR module,
DWORD  len 
)
static

Definition at line 801 of file oleaut.c.

802{
803 struct ifacepsredirect_data *iface;
804 struct tlibredirect_data *tlib;
805 ACTCTX_SECTION_KEYED_DATA data;
806 WCHAR *ptrW;
807
808 data.cbSize = sizeof(data);
809 if (!FindActCtxSectionGuid(0, NULL, ACTIVATION_CONTEXT_SECTION_COM_INTERFACE_REDIRECTION,
810 iid, &data))
811 return FALSE;
812
813 iface = (struct ifacepsredirect_data *)data.lpData;
814 if (!FindActCtxSectionGuid(0, NULL, ACTIVATION_CONTEXT_SECTION_COM_TYPE_LIBRARY_REDIRECTION,
815 &iface->tlbid, &data))
816 return FALSE;
817
818 tlib = (struct tlibredirect_data *)data.lpData;
819 ptrW = (WCHAR *)((BYTE *)data.lpSectionBase + tlib->name_offset);
820
821 if (tlib->name_len/sizeof(WCHAR) >= len)
822 {
823 ERR("need larger module buffer, %u\n", tlib->name_len);
824 return FALSE;
825 }
826
827 memcpy(module, ptrW, tlib->name_len);
828 module[tlib->name_len/sizeof(WCHAR)] = 0;
829 return TRUE;
830}
#define ERR(fmt,...)
Definition: debug.h:110
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
BOOL WINAPI FindActCtxSectionGuid(DWORD dwFlags, const GUID *lpExtGuid, ULONG ulId, const GUID *lpSearchGuid, PACTCTX_SECTION_KEYED_DATA pInfo)
Definition: actctx.c:183
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLenum GLsizei len
Definition: glext.h:6722
if(dx< 0)
Definition: linetemp.h:194
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
ULONG name_offset
Definition: oleaut.c:792
ULONG name_len
Definition: oleaut.c:791
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned char BYTE
Definition: xxhash.c:193

Referenced by get_typeinfo_for_iid().

◆ alloc_bstr()

static bstr_t * alloc_bstr ( size_t  size)
static

Definition at line 140 of file oleaut.c.

141{
143 bstr_t *ret;
144
145 if(cache_entry) {
147
148 if(!cache_entry->cnt) {
150 if(cache_entry && !cache_entry->cnt)
152 }
153
154 if(cache_entry) {
155 ret = cache_entry->buf[cache_entry->head++];
157 cache_entry->cnt--;
158 }
159
161
162 if(cache_entry) {
163 if(WARN_ON(heap)) {
164 size_t fill_size = (FIELD_OFFSET(bstr_t, u.ptr[size])+2*sizeof(WCHAR)-1) & ~(sizeof(WCHAR)-1);
165 memset(ret, ARENA_INUSE_FILLER, fill_size);
166 memset((char *)ret+fill_size, ARENA_TAIL_FILLER, bstr_alloc_size(size)-fill_size);
167 }
168 ret->size = size;
169 return ret;
170 }
171 }
172
174 if(ret)
175 ret->size = size;
176 return ret;
177}
GLsizeiptr size
Definition: glext.h:5919
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 * u
Definition: glfuncs.h:240
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
#define WARN_ON(c)
Definition: module.h:257
static size_t bstr_alloc_size(size_t size)
Definition: oleaut.c:111
#define BUCKET_SIZE
Definition: oleaut.c:96
static bstr_cache_entry_t * get_cache_entry(size_t size)
Definition: oleaut.c:126
static CRITICAL_SECTION cs_bstr_cache
Definition: oleaut.c:75
#define ARENA_INUSE_FILLER
Definition: oleaut.c:105
#define ARENA_TAIL_FILLER
Definition: oleaut.c:106
#define BUCKET_BUFFER_SIZE
Definition: oleaut.c:97
static HANDLE heap
Definition: heap.c:65
#define memset(x, y, z)
Definition: compat.h:39
Definition: oleaut.c:99
Definition: oleaut.c:84
Definition: svc_auth_des.c:77
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
int ret
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)

Referenced by SysAllocStringByteLen(), and SysAllocStringLen().

◆ bstr_alloc_size()

static size_t bstr_alloc_size ( size_t  size)
inlinestatic

Definition at line 111 of file oleaut.c.

112{
113 return (FIELD_OFFSET(bstr_t, u.ptr[size]) + sizeof(WCHAR) + BUCKET_SIZE-1) & ~(BUCKET_SIZE-1);
114}

Referenced by alloc_bstr(), and SysReAllocStringLen().

◆ bstr_from_str()

static bstr_t * bstr_from_str ( BSTR  str)
inlinestatic

Definition at line 116 of file oleaut.c.

117{
118 return CONTAINING_RECORD((void *)str, bstr_t, u.str);
119}
const WCHAR * str
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

Referenced by SysFreeString(), SysReAllocStringLen(), SysStringByteLen(), and SysStringLen().

◆ dispatch_create_proxy()

static HRESULT dispatch_create_proxy ( IUnknown outer,
IRpcProxyBuffer **  proxy,
void **  out 
)
static

Definition at line 953 of file oleaut.c.

954{
956 HRESULT hr;
957
958 hr = OLEAUTPS_DllGetClassObject(&CLSID_PSFactoryBuffer, &IID_IPSFactoryBuffer, (void **)&factory);
959 if (FAILED(hr)) return hr;
960
961 hr = IPSFactoryBuffer_CreateProxy(factory, outer, &IID_IDispatch, proxy, out);
962 IPSFactoryBuffer_Release(factory);
963 return hr;
964}
int proxy
Definition: main.c:67
#define FAILED(hr)
Definition: intsafe.h:51
HRESULT WINAPI OLEAUTPS_DllGetClassObject(REFCLSID, REFIID, LPVOID *)
Definition: oleaut.c:765
const GUID IID_IDispatch
static FILE * out
Definition: regtests2xml.c:44
HRESULT hr
Definition: shlfolder.c:183
Definition: main.c:439

Referenced by dispatch_typelib_ps_CreateProxy().

◆ dispatch_create_stub()

static HRESULT dispatch_create_stub ( IUnknown server,
IRpcStubBuffer **  stub 
)
static

Definition at line 999 of file oleaut.c.

1000{
1002 HRESULT hr;
1003
1004 hr = OLEAUTPS_DllGetClassObject(&CLSID_PSFactoryBuffer, &IID_IPSFactoryBuffer, (void **)&factory);
1005 if (FAILED(hr)) return hr;
1006
1007 hr = IPSFactoryBuffer_CreateStub(factory, &IID_IDispatch, server, stub);
1008 IPSFactoryBuffer_Release(factory);
1009 return hr;
1010}
Definition: stubgen.c:11
static rfbScreenInfoPtr server
Definition: vnc.c:74

Referenced by dispatch_typelib_ps_CreateStub().

◆ dispatch_typelib_ps_AddRef()

static ULONG WINAPI dispatch_typelib_ps_AddRef ( IPSFactoryBuffer iface)
static

Definition at line 943 of file oleaut.c.

944{
945 return 2;
946}

◆ dispatch_typelib_ps_CreateProxy()

static HRESULT WINAPI dispatch_typelib_ps_CreateProxy ( IPSFactoryBuffer iface,
IUnknown outer,
REFIID  iid,
IRpcProxyBuffer **  proxy,
void **  out 
)
static

Definition at line 966 of file oleaut.c.

968{
970 TYPEATTR *attr;
971 HRESULT hr;
972
973 if (IsEqualGUID(iid, &IID_IDispatch))
974 return dispatch_create_proxy(outer, proxy, out);
975
977 if (FAILED(hr)) return hr;
978
979 hr = ITypeInfo_GetTypeAttr(typeinfo, &attr);
980 if (FAILED(hr))
981 {
982 ITypeInfo_Release(typeinfo);
983 return hr;
984 }
985
986 if (attr->typekind == TKIND_INTERFACE || (attr->wTypeFlags & TYPEFLAG_FDUAL))
988 else
990
991 if (FAILED(hr))
992 ERR("Failed to create proxy, hr %#x.\n", hr);
993
994 ITypeInfo_ReleaseTypeAttr(typeinfo, attr);
995 ITypeInfo_Release(typeinfo);
996 return hr;
997}
HRESULT WINAPI CreateProxyFromTypeInfo(ITypeInfo *typeinfo, IUnknown *outer, REFIID iid, IRpcProxyBuffer **proxy_buffer, void **out)
Definition: ndr_typelib.c:1358
static HRESULT dispatch_create_proxy(IUnknown *outer, IRpcProxyBuffer **proxy, void **out)
Definition: oleaut.c:953
static HRESULT get_typeinfo_for_iid(REFIID iid, ITypeInfo **typeinfo)
Definition: oleaut.c:900
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
Definition: cookie.c:202
@ TKIND_INTERFACE
Definition: widltypes.h:222

◆ dispatch_typelib_ps_CreateStub()

static HRESULT WINAPI dispatch_typelib_ps_CreateStub ( IPSFactoryBuffer iface,
REFIID  iid,
IUnknown server,
IRpcStubBuffer **  stub 
)
static

Definition at line 1012 of file oleaut.c.

1014{
1016 TYPEATTR *attr;
1017 HRESULT hr;
1018
1019 if (IsEqualGUID(iid, &IID_IDispatch))
1021
1023 if (FAILED(hr)) return hr;
1024
1025 hr = ITypeInfo_GetTypeAttr(typeinfo, &attr);
1026 if (FAILED(hr))
1027 {
1028 ITypeInfo_Release(typeinfo);
1029 return hr;
1030 }
1031
1032 if (attr->typekind == TKIND_INTERFACE || (attr->wTypeFlags & TYPEFLAG_FDUAL))
1034 else
1036
1037 if (FAILED(hr))
1038 ERR("Failed to create proxy, hr %#x.\n", hr);
1039
1040 ITypeInfo_ReleaseTypeAttr(typeinfo, attr);
1041 ITypeInfo_Release(typeinfo);
1042 return hr;
1043}
HRESULT WINAPI CreateStubFromTypeInfo(ITypeInfo *typeinfo, REFIID iid, IUnknown *server, IRpcStubBuffer **stub_buffer)
Definition: ndr_typelib.c:1493
static HRESULT dispatch_create_stub(IUnknown *server, IRpcStubBuffer **stub)
Definition: oleaut.c:999

◆ dispatch_typelib_ps_QueryInterface()

static HRESULT WINAPI dispatch_typelib_ps_QueryInterface ( IPSFactoryBuffer iface,
REFIID  iid,
void **  out 
)
static

Definition at line 930 of file oleaut.c.

931{
932 if (IsEqualIID(iid, &IID_IPSFactoryBuffer) || IsEqualIID(iid, &IID_IUnknown))
933 {
934 *out = iface;
935 return S_OK;
936 }
937
938 FIXME("No interface for %s.\n", debugstr_guid(iid));
939 *out = NULL;
940 return E_NOINTERFACE;
941}
const GUID IID_IUnknown
#define FIXME(fmt,...)
Definition: debug.h:111
#define S_OK
Definition: intsafe.h:52
#define debugstr_guid
Definition: kernel32.h:35
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ dispatch_typelib_ps_Release()

static ULONG WINAPI dispatch_typelib_ps_Release ( IPSFactoryBuffer iface)
static

Definition at line 948 of file oleaut.c.

949{
950 return 1;
951}

◆ DllCanUnloadNow()

HRESULT WINAPI DllCanUnloadNow ( void  )

Definition at line 1104 of file oleaut.c.

1105{
1106 return S_FALSE;
1107}
#define S_FALSE
Definition: winerror.h:2357

◆ DllGetClassObject()

HRESULT WINAPI DllGetClassObject ( REFCLSID  rclsid,
REFIID  iid,
LPVOID ppv 
)

Definition at line 1062 of file oleaut.c.

1063{
1064 *ppv = NULL;
1065 if (IsEqualGUID(rclsid,&CLSID_StdFont)) {
1066 if (IsEqualGUID(iid,&IID_IClassFactory)) {
1068 IClassFactory_AddRef((IClassFactory*)*ppv);
1069 return S_OK;
1070 }
1071 }
1072 if (IsEqualGUID(rclsid,&CLSID_StdPicture)) {
1073 if (IsEqualGUID(iid,&IID_IClassFactory)) {
1075 IClassFactory_AddRef((IClassFactory*)*ppv);
1076 return S_OK;
1077 }
1078 }
1079
1080 if (IsEqualGUID(rclsid, &CLSID_PSDispatch) || IsEqualGUID(rclsid, &CLSID_PSOAInterface))
1081 return IPSFactoryBuffer_QueryInterface(&dispatch_typelib_ps, iid, ppv);
1082
1083 if (IsEqualCLSID(rclsid, &CLSID_PSTypeComp) ||
1084 IsEqualCLSID(rclsid, &CLSID_PSTypeInfo) ||
1085 IsEqualCLSID(rclsid, &CLSID_PSTypeLib) ||
1086 IsEqualCLSID(rclsid, &CLSID_PSDispatch) ||
1087 IsEqualCLSID(rclsid, &CLSID_PSEnumVariant))
1088 return OLEAUTPS_DllGetClassObject(&CLSID_PSFactoryBuffer, iid, ppv);
1089
1090 return OLEAUTPS_DllGetClassObject(rclsid, iid, ppv);
1091}
const GUID IID_IClassFactory
static const CLSID CLSID_StdFont
Definition: compobj.c:94
void _get_STDPIC_CF(LPVOID *)
Definition: olepicture.c:2618
void _get_STDFONT_CF(LPVOID *)
Definition: olefont.c:2285
static IPSFactoryBuffer dispatch_typelib_ps
Definition: oleaut.c:1054
const GUID CLSID_StdPicture
#define IsEqualCLSID(rclsid1, rclsid2)
Definition: guiddef.h:96

◆ DllMain()

BOOL WINAPI DllMain ( HINSTANCE  hInstDll,
DWORD  fdwReason,
LPVOID  lpvReserved 
)

Definition at line 1112 of file oleaut.c.

1113{
1114 static const WCHAR oanocacheW[] = {'o','a','n','o','c','a','c','h','e',0};
1115
1116 if(fdwReason == DLL_PROCESS_ATTACH)
1118
1119 return OLEAUTPS_DllMain( hInstDll, fdwReason, lpvReserved );
1120}
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define GetEnvironmentVariableW(x, y, z)
Definition: compat.h:755
static IN DWORD IN LPVOID lpvReserved
static BOOL bstr_cache_enabled
Definition: oleaut.c:73

◆ DllRegisterServer()

HRESULT WINAPI DllRegisterServer ( void  )

Definition at line 1125 of file oleaut.c.

1126{
1127 return OLEAUTPS_DllRegisterServer();
1128}

◆ DllUnregisterServer()

HRESULT WINAPI DllUnregisterServer ( void  )

Definition at line 1133 of file oleaut.c.

1134{
1135 return OLEAUTPS_DllUnregisterServer();
1136}

◆ get_cache_entry()

static bstr_cache_entry_t * get_cache_entry ( size_t  size)
inlinestatic

Definition at line 126 of file oleaut.c.

127{
128 unsigned cache_idx = FIELD_OFFSET(bstr_t, u.ptr[size+sizeof(WCHAR)-1])/BUCKET_SIZE;
129 return get_cache_entry_from_idx(cache_idx);
130}
static bstr_cache_entry_t * get_cache_entry_from_idx(unsigned cache_idx)
Definition: oleaut.c:121

Referenced by alloc_bstr().

◆ get_cache_entry_from_alloc_size()

static bstr_cache_entry_t * get_cache_entry_from_alloc_size ( SIZE_T  alloc_size)
inlinestatic

Definition at line 132 of file oleaut.c.

133{
134 unsigned cache_idx;
135 if (alloc_size < BUCKET_SIZE) return NULL;
136 cache_idx = (alloc_size - BUCKET_SIZE) / BUCKET_SIZE;
137 return get_cache_entry_from_idx(cache_idx);
138}

Referenced by SysFreeString().

◆ get_cache_entry_from_idx()

static bstr_cache_entry_t * get_cache_entry_from_idx ( unsigned  cache_idx)
inlinestatic

Definition at line 121 of file oleaut.c.

122{
123 return bstr_cache_enabled && cache_idx < ARRAY_SIZE(bstr_cache) ? bstr_cache + cache_idx : NULL;
124}
#define ARRAY_SIZE(A)
Definition: main.h:33
static bstr_cache_entry_t bstr_cache[0x10000/BUCKET_SIZE]
Definition: oleaut.c:109

Referenced by get_cache_entry(), and get_cache_entry_from_alloc_size().

◆ get_malloc()

static IMalloc * get_malloc ( void  )
inlinestatic

Definition at line 246 of file oleaut.c.

247{
248 static IMalloc *malloc;
249
250 if (!malloc)
251 CoGetMalloc(1, &malloc);
252
253 return malloc;
254}
#define malloc
Definition: debug_ros.c:4
HRESULT WINAPI CoGetMalloc(DWORD context, IMalloc **imalloc)
Definition: ifs.c:403

Referenced by SysFreeString().

◆ get_typeinfo_for_iid()

static HRESULT get_typeinfo_for_iid ( REFIID  iid,
ITypeInfo **  typeinfo 
)
static

Definition at line 900 of file oleaut.c.

901{
904 HRESULT hr;
905
906 *typeinfo = NULL;
907
908 module[0] = 0;
910 {
912 if (FAILED(hr))
913 return hr;
914 }
915
917 if (hr != S_OK) {
918 ERR("Failed to load typelib for %s, but it should be there.\n", debugstr_guid(iid));
919 return hr;
920 }
921
922 hr = ITypeLib_GetTypeInfoOfGuid(typelib, iid, typeinfo);
923 ITypeLib_Release(typelib);
924 if (hr != S_OK)
925 ERR("typelib does not contain info for %s\n", debugstr_guid(iid));
926
927 return hr;
928}
static ITypeLib * typelib
Definition: apps.c:108
#define MAX_PATH
Definition: compat.h:34
HRESULT WINAPI LoadTypeLib(const OLECHAR *szFile, ITypeLib **pptLib)
Definition: typelib.c:458
static BOOL actctx_get_typelib_module(REFIID iid, WCHAR *module, DWORD len)
Definition: oleaut.c:801
static HRESULT reg_get_typelib_module(REFIID iid, WCHAR *module, DWORD len)
Definition: oleaut.c:832

Referenced by dispatch_typelib_ps_CreateProxy(), and dispatch_typelib_ps_CreateStub().

◆ GetActiveObject()

HRESULT WINAPI DECLSPEC_HOTPATCH GetActiveObject ( REFCLSID  rcid,
LPVOID  preserved,
LPUNKNOWN ppunk 
)

Definition at line 592 of file oleaut.c.

593{
594 WCHAR guidbuf[80];
595 HRESULT ret;
596 LPRUNNINGOBJECTTABLE runobtable;
598
599 StringFromGUID2(rcid,guidbuf,39);
601 if (FAILED(ret))
602 return ret;
603 ret = GetRunningObjectTable(0,&runobtable);
604 if (FAILED(ret)) {
605 IMoniker_Release(moniker);
606 return ret;
607 }
608 ret = IRunningObjectTable_GetObject(runobtable,moniker,ppunk);
609 IRunningObjectTable_Release(runobtable);
610 IMoniker_Release(moniker);
611 return ret;
612}
INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax)
Definition: compobj.c:2434
HRESULT WINAPI GetRunningObjectTable(DWORD reserved, LPRUNNINGOBJECTTABLE *pprot)
Definition: moniker.c:1035
HRESULT WINAPI CreateItemMoniker(LPCOLESTR lpszDelim, LPCOLESTR lpszItem, IMoniker **ppmk)
Definition: itemmoniker.c:935
interface IMoniker * LPMONIKER
Definition: objfwd.h:9
interface IRunningObjectTable * LPRUNNINGOBJECTTABLE
Definition: objfwd.h:17
static const WCHAR * pdelimiter
Definition: oleaut.c:509
Definition: main.c:40

Referenced by ITypeInfo_fnCreateInstance().

◆ GetAltMonthNames()

HRESULT WINAPI GetAltMonthNames ( LCID  lcid,
LPOLESTR **  str 
)

Definition at line 1151 of file oleaut.c.

1152{
1153 static const WCHAR ar_month1W[] = {0x645,0x62d,0x631,0x645,0};
1154 static const WCHAR ar_month2W[] = {0x635,0x641,0x631,0};
1155 static const WCHAR ar_month3W[] = {0x631,0x628,0x64a,0x639,' ',0x627,0x644,0x627,0x648,0x644,0};
1156 static const WCHAR ar_month4W[] = {0x631,0x628,0x64a,0x639,' ',0x627,0x644,0x62b,0x627,0x646,0x64a,0};
1157 static const WCHAR ar_month5W[] = {0x62c,0x645,0x627,0x62f,0x649,' ',0x627,0x644,0x627,0x648,0x644,0x649,0};
1158 static const WCHAR ar_month6W[] = {0x62c,0x645,0x627,0x62f,0x649,' ',0x627,0x644,0x62b,0x627,0x646,0x64a,0x629,0};
1159 static const WCHAR ar_month7W[] = {0x631,0x62c,0x628,0};
1160 static const WCHAR ar_month8W[] = {0x634,0x639,0x628,0x627,0x646,0};
1161 static const WCHAR ar_month9W[] = {0x631,0x645,0x636,0x627,0x646,0};
1162 static const WCHAR ar_month10W[] = {0x634,0x648,0x627,0x643,0};
1163 static const WCHAR ar_month11W[] = {0x630,0x648,' ',0x627,0x644,0x642,0x639,0x62f,0x629,0};
1164 static const WCHAR ar_month12W[] = {0x630,0x648,' ',0x627,0x644,0x62d,0x62c,0x629,0};
1165
1166 static const WCHAR *arabic_hijri[] =
1167 {
1168 ar_month1W,
1169 ar_month2W,
1170 ar_month3W,
1171 ar_month4W,
1172 ar_month5W,
1173 ar_month6W,
1174 ar_month7W,
1175 ar_month8W,
1176 ar_month9W,
1177 ar_month10W,
1178 ar_month11W,
1179 ar_month12W,
1180 NULL
1181 };
1182
1183 static const WCHAR pl_month1W[] = {'s','t','y','c','z','n','i','a',0};
1184 static const WCHAR pl_month2W[] = {'l','u','t','e','g','o',0};
1185 static const WCHAR pl_month3W[] = {'m','a','r','c','a',0};
1186 static const WCHAR pl_month4W[] = {'k','w','i','e','t','n','i','a',0};
1187 static const WCHAR pl_month5W[] = {'m','a','j','a',0};
1188 static const WCHAR pl_month6W[] = {'c','z','e','r','w','c','a',0};
1189 static const WCHAR pl_month7W[] = {'l','i','p','c','a',0};
1190 static const WCHAR pl_month8W[] = {'s','i','e','r','p','n','i','a',0};
1191 static const WCHAR pl_month9W[] = {'w','r','z','e',0x15b,'n','i','a',0};
1192 static const WCHAR pl_month10W[] = {'p','a',0x17a,'d','z','i','e','r','n','i','k','a',0};
1193 static const WCHAR pl_month11W[] = {'l','i','s','t','o','p','a','d','a',0};
1194 static const WCHAR pl_month12W[] = {'g','r','u','d','n','i','a',0};
1195
1196 static const WCHAR *polish_genitive_names[] =
1197 {
1198 pl_month1W,
1199 pl_month2W,
1200 pl_month3W,
1201 pl_month4W,
1202 pl_month5W,
1203 pl_month6W,
1204 pl_month7W,
1205 pl_month8W,
1206 pl_month9W,
1207 pl_month10W,
1208 pl_month11W,
1209 pl_month12W,
1210 NULL
1211 };
1212
1213 static const WCHAR ru_month1W[] = {0x44f,0x43d,0x432,0x430,0x440,0x44f,0};
1214 static const WCHAR ru_month2W[] = {0x444,0x435,0x432,0x440,0x430,0x43b,0x44f,0};
1215 static const WCHAR ru_month3W[] = {0x43c,0x430,0x440,0x442,0x430,0};
1216 static const WCHAR ru_month4W[] = {0x430,0x43f,0x440,0x435,0x43b,0x44f,0};
1217 static const WCHAR ru_month5W[] = {0x43c,0x430,0x44f,0};
1218 static const WCHAR ru_month6W[] = {0x438,0x44e,0x43d,0x44f,0};
1219 static const WCHAR ru_month7W[] = {0x438,0x44e,0x43b,0x44f,0};
1220 static const WCHAR ru_month8W[] = {0x430,0x432,0x433,0x443,0x441,0x442,0x430,0};
1221 static const WCHAR ru_month9W[] = {0x441,0x435,0x43d,0x442,0x44f,0x431,0x440,0x44f,0};
1222 static const WCHAR ru_month10W[] = {0x43e,0x43a,0x442,0x44f,0x431,0x440,0x44f,0};
1223 static const WCHAR ru_month11W[] = {0x43d,0x43e,0x44f,0x431,0x440,0x44f,0};
1224 static const WCHAR ru_month12W[] = {0x434,0x435,0x43a,0x430,0x431,0x440,0x44f,0};
1225
1226 static const WCHAR *russian_genitive_names[] =
1227 {
1228 ru_month1W,
1229 ru_month2W,
1230 ru_month3W,
1231 ru_month4W,
1232 ru_month5W,
1233 ru_month6W,
1234 ru_month7W,
1235 ru_month8W,
1236 ru_month9W,
1237 ru_month10W,
1238 ru_month11W,
1239 ru_month12W,
1240 NULL
1241 };
1242
1243 TRACE("%#x, %p\n", lcid, str);
1244
1246 *str = (LPOLESTR *)arabic_hijri;
1247 else if (PRIMARYLANGID(LANGIDFROMLCID(lcid)) == LANG_POLISH)
1248 *str = (LPOLESTR *)polish_genitive_names;
1249 else if (PRIMARYLANGID(LANGIDFROMLCID(lcid)) == LANG_RUSSIAN)
1250 *str = (LPOLESTR *)russian_genitive_names;
1251 else
1252 *str = NULL;
1253
1254 return S_OK;
1255}
static LPOLESTR
Definition: stg_prop.c:27
#define LANG_POLISH
Definition: nls.h:107
#define LANGIDFROMLCID(l)
Definition: nls.h:18
#define LANG_RUSSIAN
Definition: nls.h:113
#define LANG_ARABIC
Definition: nls.h:29
#define PRIMARYLANGID(l)
Definition: nls.h:16
#define TRACE(s)
Definition: solgame.cpp:4

Referenced by test_GetAltMonthNames().

◆ OaBuildVersion()

ULONG WINAPI OaBuildVersion ( void  )

Definition at line 644 of file oleaut.c.

645{
646 switch(GetVersion() & 0x8000ffff) /* mask off build number */
647 {
648 case 0x80000a03: /* WIN31 */
649 return MAKELONG(0xffff, 20);
650 case 0x00003303: /* NT351 */
651 return MAKELONG(0xffff, 30);
652 case 0x80000004: /* WIN95; I'd like to use the "standard" w95 minor
653 version here (30), but as we still use w95
654 as default winver (which is good IMHO), I better
655 play safe and use the latest value for w95 for now.
656 Change this as soon as default winver gets changed
657 to something more recent */
658 case 0x80000a04: /* WIN98 */
659 case 0x00000004: /* NT40 */
660 case 0x00000005: /* W2K */
661 return MAKELONG(0xffff, 40);
662 case 0x00000105: /* WinXP */
663#ifdef __REACTOS__
664 case 0x00000205: /* Win2K3 */
665#endif /* __REACTOS__ */
666 case 0x00000006: /* Vista */
667 case 0x00000106: /* Win7 */
668 return MAKELONG(0xffff, 50);
669 default:
670 FIXME("Version value not known yet. Please investigate it !\n");
671 return MAKELONG(0xffff, 40); /* for now return the same value as for w2k */
672 }
673}
DWORD WINAPI GetVersion()
Definition: redirtest.c:5
#define MAKELONG(a, b)
Definition: typedefs.h:249

◆ OLEAUTPS_DllGetClassObject()

HRESULT WINAPI OLEAUTPS_DllGetClassObject ( REFCLSID  ,
REFIID  ,
LPVOID  
)

Definition at line 765 of file oleaut.c.

776{
777 ULONG size;
778 DWORD mask;
779 GUID iid;
780 ULONG nummethods;
781 GUID tlbid;
782 GUID base;
783 ULONG name_len;
784 ULONG name_offset;
785};
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLint GLuint mask
Definition: glext.h:6028
uint32_t ULONG
Definition: typedefs.h:59

Referenced by dispatch_create_proxy(), dispatch_create_stub(), and DllGetClassObject().

◆ OleIconToCursor()

HCURSOR WINAPI OleIconToCursor ( HINSTANCE  hinstExe,
HICON  hIcon 
)

Definition at line 1141 of file oleaut.c.

1142{
1143 FIXME("(%p,%p), partially implemented.\n",hinstExe,hIcon);
1144 /* FIXME: make an extended conversation from HICON to HCURSOR */
1145 return CopyCursor(hIcon);
1146}
HICON hIcon
Definition: msconfig.c:44
#define CopyCursor(c)
Definition: winuser.h:4235

◆ OleTranslateColor()

HRESULT WINAPI OleTranslateColor ( OLE_COLOR  clr,
HPALETTE  hpal,
COLORREF pColorRef 
)

Definition at line 692 of file oleaut.c.

696{
697 COLORREF colorref;
698 BYTE b = HIBYTE(HIWORD(clr));
699
700 TRACE("(%08x, %p, %p)\n", clr, hpal, pColorRef);
701
702 /*
703 * In case pColorRef is NULL, provide our own to simplify the code.
704 */
705 if (pColorRef == NULL)
706 pColorRef = &colorref;
707
708 switch (b)
709 {
710 case 0x00:
711 {
712 if (hpal != 0)
713 *pColorRef = PALETTERGB(GetRValue(clr),
714 GetGValue(clr),
715 GetBValue(clr));
716 else
717 *pColorRef = clr;
718
719 break;
720 }
721
722 case 0x01:
723 {
724 if (hpal != 0)
725 {
726 PALETTEENTRY pe;
727 /*
728 * Validate the palette index.
729 */
730 if (GetPaletteEntries(hpal, LOWORD(clr), 1, &pe) == 0)
731 return E_INVALIDARG;
732 }
733
734 *pColorRef = clr;
735
736 break;
737 }
738
739 case 0x02:
740 *pColorRef = clr;
741 break;
742
743 case 0x80:
744 {
745 int index = LOBYTE(LOWORD(clr));
746
747 /*
748 * Validate GetSysColor index.
749 */
750 if ((index < COLOR_SCROLLBAR) || (index > COLOR_MENUBAR))
751 return E_INVALIDARG;
752
753 *pColorRef = GetSysColor(index);
754
755 break;
756 }
757
758 default:
759 return E_INVALIDARG;
760 }
761
762 return S_OK;
763}
#define E_INVALIDARG
Definition: ddrawi.h:101
#define GetBValue(quad)
Definition: precomp.h:66
#define GetGValue(quad)
Definition: precomp.h:65
#define GetRValue(quad)
Definition: precomp.h:64
GLuint index
Definition: glext.h:6031
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define LOBYTE(W)
Definition: jmemdos.c:487
#define HIBYTE(W)
Definition: jmemdos.c:486
#define LOWORD(l)
Definition: pedump.c:82
#define HIWORD(l)
Definition: typedefs.h:247
UINT WINAPI GetPaletteEntries(HPALETTE hpal, UINT iStartIndex, UINT cEntries, LPPALETTEENTRY ppe)
Definition: palette.c:64
DWORD COLORREF
Definition: windef.h:300
#define PALETTERGB(r, g, b)
Definition: wingdi.h:2942
DWORD WINAPI GetSysColor(_In_ int)
#define COLOR_SCROLLBAR
Definition: winuser.h:912

◆ reg_get_typelib_module()

static HRESULT reg_get_typelib_module ( REFIID  iid,
WCHAR module,
DWORD  len 
)
static

Definition at line 832 of file oleaut.c.

833{
834 REGSAM opposite = (sizeof(void*) == 8) ? KEY_WOW64_32KEY : KEY_WOW64_64KEY;
835 char tlguid[200], typelibkey[300], interfacekey[300], ver[100], tlfn[260];
836 DWORD tlguidlen, verlen, type;
837 LONG tlfnlen, err;
839 HKEY ikey;
840
841 sprintf( interfacekey, "Interface\\{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\\Typelib",
842 iid->Data1, iid->Data2, iid->Data3,
843 iid->Data4[0], iid->Data4[1], iid->Data4[2], iid->Data4[3],
844 iid->Data4[4], iid->Data4[5], iid->Data4[6], iid->Data4[7]
845 );
846
847 err = RegOpenKeyExA(HKEY_CLASSES_ROOT,interfacekey,0,KEY_READ,&ikey);
848 if (err && (opposite == KEY_WOW64_32KEY || (IsWow64Process(GetCurrentProcess(), &is_wow64)
849 && is_wow64)))
850 err = RegOpenKeyExA(HKEY_CLASSES_ROOT,interfacekey,0,KEY_READ|opposite,&ikey);
851
852 if (err)
853 {
854 ERR("No %s key found.\n", interfacekey);
855 return E_FAIL;
856 }
857
858 tlguidlen = sizeof(tlguid);
859 if (RegQueryValueExA(ikey, NULL, NULL, &type, (BYTE *)tlguid, &tlguidlen))
860 {
861 ERR("Getting typelib guid failed.\n");
862 RegCloseKey(ikey);
863 return E_FAIL;
864 }
865
866 verlen = sizeof(ver);
867 if (RegQueryValueExA(ikey, "Version", NULL, &type, (BYTE *)ver, &verlen))
868 {
869 ERR("Could not get version value?\n");
870 RegCloseKey(ikey);
871 return E_FAIL;
872 }
873
874 RegCloseKey(ikey);
875
876#ifndef __REACTOS__
877 sprintf(typelibkey, "Typelib\\%s\\%s\\0\\win%u", tlguid, ver, sizeof(void *) == 8 ? 64 : 32);
878#else
879 snprintf(typelibkey, sizeof(typelibkey), "Typelib\\%s\\%s\\0\\win%u", tlguid, ver, sizeof(void *) == 8 ? 64 : 32);
880#endif /* __REACTOS__ */
881 tlfnlen = sizeof(tlfn);
882 if (RegQueryValueA(HKEY_CLASSES_ROOT, typelibkey, tlfn, &tlfnlen))
883 {
884#ifdef _WIN64
885 sprintf(typelibkey, "Typelib\\%s\\%s\\0\\win32", tlguid, ver);
886 tlfnlen = sizeof(tlfn);
887 if (RegQueryValueA(HKEY_CLASSES_ROOT, typelibkey, tlfn, &tlfnlen))
888 {
889#endif
890 ERR("Could not get typelib fn?\n");
891 return E_FAIL;
892#ifdef _WIN64
893 }
894#endif
895 }
896 MultiByteToWideChar(CP_ACP, 0, tlfn, -1, module, len);
897 return S_OK;
898}
#define RegCloseKey(hKey)
Definition: registry.h:49
#define E_FAIL
Definition: ddrawi.h:102
LONG WINAPI RegOpenKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD ulOptions, _In_ REGSAM samDesired, _Out_ PHKEY phkResult)
Definition: reg.c:3327
LSTATUS WINAPI RegQueryValueA(HKEY hkey, LPCSTR name, LPSTR data, LPLONG count)
Definition: reg.c:4241
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:4038
#define CP_ACP
Definition: compat.h:109
#define GetCurrentProcess()
Definition: compat.h:759
#define IsWow64Process
Definition: compat.h:760
#define MultiByteToWideChar
Definition: compat.h:110
BOOL is_wow64
Definition: msi.c:54
unsigned int BOOL
Definition: ntddk_ex.h:94
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define sprintf(buf, format,...)
Definition: sprintf.c:55
#define KEY_READ
Definition: nt_native.h:1023
long LONG
Definition: pedump.c:60
#define err(...)
ACCESS_MASK REGSAM
Definition: winreg.h:69
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
#define snprintf
Definition: wintirpc.h:48
#define KEY_WOW64_32KEY
Definition: cmtypes.h:45
#define KEY_WOW64_64KEY
Definition: cmtypes.h:46

Referenced by get_typeinfo_for_iid().

◆ RegisterActiveObject()

HRESULT WINAPI DECLSPEC_HOTPATCH RegisterActiveObject ( LPUNKNOWN  punk,
REFCLSID  rcid,
DWORD  dwFlags,
LPDWORD  pdwRegister 
)

Definition at line 526 of file oleaut.c.

528 {
529 WCHAR guidbuf[80];
530 HRESULT ret;
531 LPRUNNINGOBJECTTABLE runobtable;
533 DWORD rot_flags = ROTFLAGS_REGISTRATIONKEEPSALIVE; /* default registration is strong */
534
535 StringFromGUID2(rcid,guidbuf,39);
537 if (FAILED(ret))
538 return ret;
539 ret = GetRunningObjectTable(0,&runobtable);
540 if (FAILED(ret)) {
541 IMoniker_Release(moniker);
542 return ret;
543 }
545 rot_flags = 0;
546 ret = IRunningObjectTable_Register(runobtable,rot_flags,punk,moniker,pdwRegister);
547 IRunningObjectTable_Release(runobtable);
548 IMoniker_Release(moniker);
549 return ret;
550}
#define ACTIVEOBJECT_WEAK
Definition: oleauto.h:182
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176

◆ RevokeActiveObject()

HRESULT WINAPI DECLSPEC_HOTPATCH RevokeActiveObject ( DWORD  xregister,
LPVOID  reserved 
)

Definition at line 565 of file oleaut.c.

566{
567 LPRUNNINGOBJECTTABLE runobtable;
568 HRESULT ret;
569
570 ret = GetRunningObjectTable(0,&runobtable);
571 if (FAILED(ret)) return ret;
572 ret = IRunningObjectTable_Revoke(runobtable,xregister);
573 if (SUCCEEDED(ret)) ret = S_OK;
574 IRunningObjectTable_Release(runobtable);
575 return ret;
576}
#define SUCCEEDED(hr)
Definition: intsafe.h:50

◆ SetOaNoCache()

void WINAPI SetOaNoCache ( void  )

Definition at line 502 of file oleaut.c.

503{
504 TRACE("\n");
506}

◆ SysAllocString()

BSTR WINAPI SysAllocString ( LPCOLESTR  str)

Definition at line 238 of file oleaut.c.

239{
240 if (!str) return 0;
241
242 /* Delegate this to the SysAllocStringLen32 method. */
244}
#define lstrlenW
Definition: compat.h:750
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:339

Referenced by _SHStrDupAToBSTR(), add_bstr_property(), CTrayBandSite::AddBand(), alloc_bstr_arg(), alloc_ns_context(), Arguments2_Item(), async_doc_navigate(), AtlAxCreateControlLicEx(), AtlLoadTypeLib(), ATL::AtlLoadTypeLib(), AutomationObject_Invoke(), build_namespace(), build_relpath(), build_servername(), ATL::CComBSTR::CComBSTR(), ATL::CComVariant::CComVariant(), class_object_Next(), Client_get_accKeyboardShortcut(), combine_uri(), compiler_alloc_bstr(), CicBridge::ConfigureRegisterWord(), create_callback(), create_command(), create_filecoll(), create_folder(), create_foldercoll(), create_list(), create_textfont(), CreateUri(), Database_OpenView(), declare_prefix(), delete_command(), determine_patch_sequence(), DEVENUM_IPropertyBag_Read(), disp_get_id(), Dispatch_Invoke(), DispatchEx_GetMemberName(), dispex_value(), dns_resolve(), DocObjectService_FireBeforeNavigate2(), drive_get_FileSystem(), drive_get_VolumeName(), elem_string_attr_getter(), enum_key(), enum_values(), exec_composesettings(), exec_fontname(), exec_query(), file_get_Name(), file_get_Path(), filesys_BuildPath(), filesys_GetAbsolutePathName(), filesys_GetExtensionName(), filesys_GetFileVersion(), fill_processor_information(), SEALED_::FireChannelReceivedData(), FM2_WriteFriendlyName(), fnIMultiLanguage3_GetRfc1766FromLcid(), folder_get_Name(), folder_get_Path(), FontEventsDisp_Invoke(), function_invoke(), fw_app_get_ProcessImageFileName(), fw_app_put_ProcessImageFileName(), fw_port_put_Name(), get_attribute_value(), get_document_charset(), get_elem_attr_value_by_dispid(), get_full_path(), get_location_url(), get_method_name(), CFolderItemVerb::get_Name(), get_node_text(), get_properties(), get_propval(), get_readystate_string(), get_registered_task(), get_system_propval(), get_textfont_prop_for_pos(), CFolder::get_Title(), get_value_bstr(), get_vbscript_string(), CFunctionProviderBase::GetDescription(), CLBarItemButtonBase::GetText(), CLBarInatItem::GetText(), CLBarItemBase::GetTooltipString(), Global_InvokeEx(), Global_LTrim(), handle_navigation_error(), Host_get_FullName(), Host_get_Name(), Host_get_ScriptFullName(), Host_get_ScriptName(), Host_get_Version(), HTMLBodyElement_get_scroll(), HTMLCurrentStyle2_get_filter(), HTMLDocument_get_designMode(), HTMLDocument_get_title(), HTMLDocument_get_URL(), HTMLDocument_toString(), HTMLDOMAttribute_get_nodeName(), HTMLDOMNode_get_nodeValue(), HTMLElement2_get_readyState(), HTMLElement_get_outerHTML(), HTMLElement_get_tagName(), HTMLElement_get_title(), HTMLElement_populate_props(), HTMLElement_put_title(), HTMLEventObj_get_type(), HTMLFrameBase_get_scrolling(), HTMLImgElement_get_src(), HTMLLocation_get_port(), HTMLObjectElement_get_height(), HTMLObjectElement_get_width(), HTMLPrivateWindow_GetAddressBarUrl(), HTMLSelectionObject_get_type(), HTMLStyle_get_backgroundPositionY(), HTMLStyle_get_cssText(), HTMLStyle_get_filter(), HTMLTextAreaElement_get_type(), HTMLTxtRange_get_htmlText(), HTMLTxtRange_get_text(), HTMLWindow2_toString(), ICreateTypeInfo2_fnAddRefTypeInfo(), ie_navigate(), IErrorInfoImpl_GetDescription(), IErrorInfoImpl_GetHelpFile(), IErrorInfoImpl_GetSource(), iewnd_OnNotify(), SEALED_::IMsTscAx::get_Version(), CFunctionProviderBase::Init(), InitPropertyBag_IPropertyBag_Read(), Installer_InstallProduct(), Installer_OpenDatabase(), Installer_OpenPackage(), Installer_ProductInfo(), Installer_ProductState(), Installer_RegistryValue(), Installer_RegistryValueW(), Installer_RelatedProducts(), Installer_SummaryInformation(), InstallerImpl_ProductInfo(), InstallerImpl_RegistryValue(), InstallerImpl_Version(), interp_string(), IPropertyBag_Read_Stub(), IRecordInfoImpl_GetFieldNames(), IRecordInfoImpl_GetName(), IRecordInfoImpl_RecordCopy(), ITypeInfo2_fnGetDocumentation2(), ITypeInfo_fnGetDllEntry(), ITypeInfo_fnGetDocumentation(), ITypeInfo_fnGetNames(), ITypeInfo_fnGetRefTypeInfo(), ITypeLib2_fnGetDocumentation(), ITypeLib2_fnGetDocumentation2(), load_manifest(), MakeVariantString(), Marshal_UnmarshalInterface(), Match2_get_Value(), MediaDet_get_Filename(), MSI_ApplicablePatchXML(), MXAttributes_addAttribute(), MXAttributes_setLocalName(), MXAttributes_setQName(), MXAttributes_setURI(), MXAttributes_setValue(), MXWriter_create(), mxwriter_get_encoding(), mxwriter_put_version(), navigate_url(), NonOleAutomation_BstrRet(), notif_complete(), nsPromptService_Alert(), nsstr_to_truncated_bstr(), nsstyle_to_bstr(), nsuri_to_url(), OLEFont_SendNotify(), OLEFontImpl_get_Name(), OmNavigator_get_appCodeName(), OmNavigator_get_appMinorVersion(), OmNavigator_get_appName(), OmNavigator_get_cpuClass(), OmNavigator_get_platform(), OmNavigator_toString(), on_before_navigate2(), parse_assembly(), parse_files(), parseError_get_reason(), parseError_get_srcText(), PB_Read(), PersistStream_Load(), PropertyBag_Read(), PropSysAllocString(), query_prop(), query_typelib_path(), CIniPropertyBag::Read(), CDummyPropertyBag::Read(), record_get_value(), record_invoke(), Record_StringDataPut(), RegExp2_get_Pattern(), register_codec(), register_dsound_devices(), register_vfw_codecs(), RegisterDefaultAcceptHeaders(), RegisterTypeLib(), RegistryPropertyBag_IPropertyBag_Read(), return_bstr(), return_nscolor(), return_nsstr(), return_string(), run_bom_tests(), run_script(), services_InstancesOf(), Session_DoAction(), Session_EvaluateCondition(), Session_FeatureCurrentState(), Session_FeatureRequestStateGet(), Session_FeatureRequestStatePut(), session_invoke(), Session_PropertyGet(), Session_PropertyPut(), set_current_mon(), set_element_name(), set_event_handler(), set_firewall(), set_status_text(), set_textfont_prop(), SHPropertyBag_OnIniFile(), SHPropertyBag_OnRegKey(), START_TEST(), status_code_GetErrorCodeText(), status_code_GetFacilityCodeText(), CTipbarAccItem::STDMETHOD_(), StrRetToBSTR(), summaryinfo_invoke(), SysReAllocString(), test_Add(), test_attr_collection(), test_bstr_cache(), test_callbacks(), test_ChangeType_keep_dst(), test_child_col_disp(), test_codec(), test_copy(), test_copyassignment(), test_CopyFolder(), test_create(), test_CreateDispTypeInfo(), test_createfolder(), test_CreateTextFile(), test_CreateTypeLib(), test_directshow_filter(), test_dispatch(), test_DispCallFunc(), test_dmo(), test_domdoc(), test_domnode(), test_domobj_dispex(), test_DriveExists(), test_dynamic_properties(), test_exec_fontname(), test_FileCollection(), test_FolderCollection(), test_font_events_disp(), test_get_text(), test_GetAbsolutePathName(), test_getAttributeNode(), test_GetBaseName(), test_GetDrive(), test_GetDriveName(), test_getElementsByTagName(), test_GetExtensionName(), test_GetFile(), test_GetFileName(), test_GetFileVersion(), test_GetFolder(), test_GetNames(), test_GetParentFolderName(), test_hash_value(), test_IClientSecurity(), test_Installer_RegistryValue(), test_interfaces(), test_items(), test_ITextDocument_Open(), test_IWbemLocator(), test_IWinHttpRequest(), test_IWinHttpRequest_Invoke(), test_IXMLDOMDocument2(), test_locator(), test_marshal_array(), test_marshal_bstr(), test_marshal_BSTR(), test_marshal_LPSAFEARRAY(), test_marshal_struct(), test_marshal_variant(), test_marshal_VARIANT(), test_mediadet(), test_merging_text(), test_mxwriter_properties(), test_namespace(), test_NetFwAuthorizedApplication(), test_notification_query_async(), test_obj_dispex(), test_OleLoadPicturePath(), test_ParseDisplayName(), test_ParseName(), test_persiststreaminit(), test_popup(), test_PropVariantCompare(), test_PropVariantToString(), test_PropVariantToStringWithDefault(), test_query_async(), test_query_semisync(), test_Read(), test_ReadAll(), test_realization(), test_recinfo(), test_registry(), test_removeNamedItem(), test_SafeArrayGetPutElement_BSTR(), test_saxreader(), test_schema_refs(), test_script_run(), test_select(), test_service(), test_SetText(), test_ShellExecute(), test_StdRegProv(), test_SummaryInfo(), test_SysAllocString(), test_SystemSecurity(), test_textstream(), test_typelibmarshal(), test_VarAdd(), test_VarAnd(), test_VarBstrCat(), test_VarBstrCmp(), test_VarCat(), test_VarCmp(), test_VarDiv(), test_VarFormat(), test_VarFormatFromTokens(), test_VarFormatNumber(), test_varianttoproperty(), test_VarIdiv(), test_VarImp(), test_VarMod(), test_VarMul(), test_VarOr(), test_VarPow(), test_VarSub(), test_VarXor(), test_Verbs(), test_Win32_Baseboard(), test_Win32_Bios(), test_Win32_ComputerSystem(), test_Win32_ComputerSystemProduct(), test_Win32_DisplayControllerConfiguration(), test_Win32_IP4RouteTable(), test_Win32_OperatingSystem(), test_Win32_PhysicalMemory(), test_Win32_PnPEntity(), test_Win32_Printer(), test_Win32_Process(), test_Win32_Processor(), test_Win32_QuickFixEngineering(), test_Win32_Service(), test_Win32_SystemEnclosure(), test_Win32_VideoController(), test_Win32_WinSAT(), test_WriteLine(), test_wshshell(), test_xmlelem(), test_xmlelem_collection(), test_xmlTypes(), TextFont_GetName(), textfont_reset_to_default(), TLB_append_str(), to_safearray(), to_string(), update_title(), Uri_GetPropertyBSTR(), validate_regex_document(), VarBstrFromBool(), VarBstrFromCy(), VarBstrFromDate(), VarBstrFromDec(), VarDateFromStr(), VarFormatCurrency(), VarFormatNumber(), VarFormatPercent(), VARIANT_BstrFromReal(), VARIANT_BstrReplaceDecimal(), VARIANT_FormatDate(), VARIANT_FormatNumber(), VARIANT_FormatString(), variant_from_registry_value(), VBScriptError_GetExceptionInfo(), WebBrowser_get_Name(), Widget_bstr(), Widget_DoSomething(), Widget_get_Name(), Widget_Map(), Widget_variant_array(), WshCollection_Item(), WshShell3_RegRead(), WshShortcut_Create(), WshShortcut_get_Arguments(), WshShortcut_get_IconLocation(), WshShortcut_get_WorkingDirectory(), xslprocessor_addParameter(), xslprocessor_get_output(), and xslprocessor_set_parvalue().

◆ SysAllocStringByteLen()

BSTR WINAPI DECLSPEC_HOTPATCH SysAllocStringByteLen ( LPCSTR  str,
UINT  len 
)

Definition at line 428 of file oleaut.c.

429{
430 bstr_t *bstr;
431
432 /* Detect integer overflow. */
433 if (len >= (UINT_MAX-sizeof(WCHAR)-sizeof(DWORD)))
434 return NULL;
435
436 bstr = alloc_bstr(len);
437 if(!bstr)
438 return NULL;
439
440 if(str) {
441 memcpy(bstr->u.ptr, str, len);
442 bstr->u.ptr[len] = 0;
443 }else {
444 memset(bstr->u.ptr, 0, len+1);
445 }
446 bstr->u.str[(len+sizeof(WCHAR)-1)/sizeof(WCHAR)] = 0;
447
448 return bstr->u.str;
449}
#define UINT_MAX
Definition: limits.h:41
static bstr_t * alloc_bstr(size_t size)
Definition: oleaut.c:140
char ptr[1]
Definition: oleaut.c:90
WCHAR str[1]
Definition: oleaut.c:91
union bstr_t::@527 u

Referenced by CRegPropertyBag::_ReadString(), BstrFromVector(), Compartment_SetValue(), SEALED_::FireChannelReceivedData(), SEALED_::FireReceivedTSPublicKey(), fnTextSrv_TxGetText(), MSFT_ReadAllNames(), MSFT_ReadAllStrings(), SAFEARRAY_CopyData(), SafeArrayGetElement(), SafeArrayPutElement(), test_BstrCopy(), test_copyassignment(), test_domdoc(), test_marshal_BSTR(), test_SysAllocStringByteLen(), test_VarBstrCat(), test_VarBstrCmp(), TLB_AllocAndInitFuncDesc(), TLB_AllocAndInitVarDesc(), VarBstrCat(), variant_from_registry_value(), VARIANT_MakeBstr(), VariantCopy(), and VariantCopyInd().

◆ SysAllocStringLen()

BSTR WINAPI SysAllocStringLen ( const OLECHAR str,
unsigned int  len 
)

Definition at line 339 of file oleaut.c.

340{
341 bstr_t *bstr;
342 DWORD size;
343
344 /* Detect integer overflow. */
345 if (len >= ((UINT_MAX-sizeof(WCHAR)-sizeof(DWORD))/sizeof(WCHAR)))
346 return NULL;
347
348 TRACE("%s\n", debugstr_wn(str, len));
349
350 size = len*sizeof(WCHAR);
351 bstr = alloc_bstr(size);
352 if(!bstr)
353 return NULL;
354
355 if(str) {
356 memcpy(bstr->u.str, str, size);
357 bstr->u.str[len] = 0;
358 }else {
359 memset(bstr->u.str, 0, size+sizeof(WCHAR));
360 }
361
362 return bstr->u.str;
363}
#define debugstr_wn
Definition: kernel32.h:33

Referenced by a2bstr(), alloc_str_from_narrow(), CHString::AllocSysString(), ATL::ChTraitsCRT< char >::AllocSysString(), bstr_from_str(), build_path(), build_proplist(), build_query_string(), build_relpath(), build_resource_string(), Builtin_Invoke(), ATL::CComBSTR::CComBSTR(), Client_get_accName(), combine_uri(), compiler_alloc_bstr_len(), contentHandler_characters(), contentHandler_endElement(), contentHandler_endPrefixMapping(), contentHandler_ignorableWhitespace(), contentHandler_processingInstruction(), contentHandler_skippedEntity(), contentHandler_startElement(), contentHandler_startPrefixMapping(), _com_util::ConvertStringToBSTR(), ConvertUTF8StringToBSTR(), create_drive(), create_ie_window(), decode_string(), DEVENUM_IPropertyBag_Read(), disp_delete_name(), Dispatch_Invoke(), drive_get_DriveLetter(), filesys_BuildPath(), filesys_GetBaseName(), filesys_GetDriveName(), filesys_GetFileName(), filesys_GetParentFolderName(), filesys_GetTempName(), function_value(), generate_uri(), get_body_text(), get_language_string(), get_location_url(), get_object_text(), get_owner(), get_script_from_file(), get_script_str(), get_stringvalue(), get_token(), get_value_bstr(), SEALED_::GetProperty(), Global_Chr(), Global_Left(), Global_Mid(), Global_Right(), Global_RTrim(), Global_Space(), Global_Trim(), SEALED_::HandleEvent(), Host_get_Path(), html_window_navigate(), HTMLDocument_get_cookie(), HTMLDOMAttribute2_get_value(), HTMLFrameBase_get_marginHeight(), HTMLFrameBase_get_marginWidth(), HTMLLocation_get_host(), HTMLLocation_get_href(), HTMLLocation_get_pathname(), HTMLLocation_get_port(), HTMLLocation_get_protocol(), HTMLStyle_get_backgroundPositionX(), HTMLStyle_put_borderStyle(), hyperlink_dlgproc(), ie_dialog_open_proc(), include_pac_utils(), CCicLibMenuItem::Init(), InitVariantFromGUIDAsString(), CFolderItemVerbs::Item(), ITextRange_fnGetText(), ITextSelection_fnGetText(), jsval_to_variant(), load_res(), ATL::CComBSTR::LoadString(), anonymous_namespace{activex.cpp}::LpszToBstr(), mlang_getcsetinfo(), mqr_GetMetadataByName(), MSFT_ReadValue(), mxwriter_get_output(), nscolor_to_str(), nsIOService_NewURI(), nsstr_to_truncated_bstr(), nsstyle_to_bstr(), Object_hasOwnProperty(), OmNavigator_get_appVersion(), OmNavigator_get_userAgent(), open_dde_url(), parse_path(), pre_process_uri(), prompt_dlgproc(), PropertyStorage_ReadProperty(), query_prop(), read_file_to_bstr(), return_bstrn(), return_nscstr(), run_from_res(), set_element_name(), set_firewall(), SEALED_::SetProperty(), SLTG_DoVars(), SLTG_ReadString(), SubMatches_get_Item(), SWbemProperty_create(), SysAllocString(), SysReAllocStringLen(), test_bstr_cache(), test_domdoc(), test_marshal_bstr(), test_mxwriter_characters(), test_ParseName(), test_safearray(), test_SetText(), test_SysAllocStringLen(), test_SysReAllocString(), test_SysReAllocStringLen(), test_TransformWithLoadingLocalFile(), test_VarBstrCat(), test_VarBstrCmp(), test_VarCat(), test_VarWeekdayName(), test_Win32_Process(), test_xmlTypes(), TextFont_GetName(), textstream_read(), TLB_MultiByteToBSTR(), Uri_GetPropertyBSTR(), variant_change_type(), VARIANT_Coerce(), variant_from_registry_value(), VarMonthName(), VarWeekdayName(), winhttp_request_get_ResponseText(), winhttp_request_get_StatusText(), winhttp_request_GetAllResponseHeaders(), winhttp_request_GetResponseHeader(), WshEnvironment_get_Item(), WshShell3_ExpandEnvironmentStrings(), WshShell3_get_CurrentDirectory(), and WshShortcut_put_IconLocation().

◆ SysFreeString()

void WINAPI DECLSPEC_HOTPATCH SysFreeString ( BSTR  str)

Definition at line 271 of file oleaut.c.

272{
274 bstr_t *bstr;
276 SIZE_T alloc_size;
277
278 if(!str)
279 return;
280
281 bstr = bstr_from_str(str);
282
283 alloc_size = IMalloc_GetSize(malloc, bstr);
284 if (alloc_size == ~0UL)
285 return;
286
288 if(cache_entry) {
289 unsigned i;
290
292
293 /* According to tests, freeing a string that's already in cache doesn't corrupt anything.
294 * For that to work we need to search the cache. */
295 for(i=0; i < cache_entry->cnt; i++) {
296 if(cache_entry->buf[(cache_entry->head+i) % BUCKET_BUFFER_SIZE] == bstr) {
297 WARN_(heap)("String already is in cache!\n");
299 return;
300 }
301 }
302
303 if(cache_entry->cnt < ARRAY_SIZE(cache_entry->buf)) {
304 cache_entry->buf[(cache_entry->head+cache_entry->cnt) % BUCKET_BUFFER_SIZE] = bstr;
305 cache_entry->cnt++;
306
307 if(WARN_ON(heap)) {
308 unsigned n = (alloc_size-FIELD_OFFSET(bstr_t, u.ptr))/sizeof(DWORD);
309 for(i=0; i<n; i++)
310 bstr->u.dwptr[i] = ARENA_FREE_FILLER;
311 }
312
314 return;
315 }
316
318 }
319
320 CoTaskMemFree(bstr);
321}
GLdouble n
Definition: glext.h:7729
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
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
static bstr_t * bstr_from_str(BSTR str)
Definition: oleaut.c:116
#define ARENA_FREE_FILLER
Definition: oleaut.c:107
static bstr_cache_entry_t * get_cache_entry_from_alloc_size(SIZE_T alloc_size)
Definition: oleaut.c:132
static IMalloc * get_malloc(void)
Definition: oleaut.c:246
#define WARN_(ch,...)
Definition: debug.h:157
DWORD dwptr[1]
Definition: oleaut.c:92
#define UL
Definition: tui.h:165
ULONG_PTR SIZE_T
Definition: typedefs.h:80

Referenced by _BSTR_CY(), _BSTR_DATE(), _BSTR_DEC(), _doc_attach_event(), _doc_detach_event(), _doc_get_elems_by_name(), _elem_attach_event(), _elem_detach_event(), _elem_fire_event(), _get_disp_id(), _get_elem_attr_node(), _get_elem_id(), _insert_adjacent_elem(), _link_put_href(), _link_put_rel(), _link_put_rev(), _link_put_type(), _parse_htmlscript_a(), _parse_script_a(), _set_body_scroll(), _set_button_name(), _set_dispex_value(), _set_elem_dir(), _set_elem_language(), _set_meta_charset(), _set_object_name(), _set_style_filter(), _set_stylesheet_csstext(), _set_text_data(), _set_text_decoration(), _set_window_name(), _set_window_status(), _test_anchor_get_target(), _test_anchor_hash(), _test_anchor_hostname(), _test_anchor_href(), _test_anchor_name(), _test_anchor_put_href(), _test_anchor_put_name(), _test_anchor_put_rel(), _test_anchor_put_search(), _test_anchor_put_target(), _test_anchor_rel(), _test_anchor_search(), _test_attr_node_name(), _test_attr_value(), _test_body_scroll(), _test_button_name(), _test_comment_attrs(), _test_comment_text(), _test_create_elem(), _test_create_text(), _test_current_style_filter(), _test_current_url(), _test_display_uri(), _test_doc_set_title(), _test_doc_title(), _test_elem_attr(), _test_elem_class(), _test_elem_dir(), _test_elem_getelembytag(), _test_elem_id(), _test_elem_innerhtml(), _test_elem_innertext(), _test_elem_language(), _test_elem_outerhtml(), _test_elem_put_id(), _test_elem_set_class(), _test_elem_set_innerhtml(), _test_elem_set_innertext(), _test_elem_set_outerhtml(), _test_elem_set_title(), _test_elem_tag(), _test_elem_title(), _test_form_action(), _test_form_encoding(), _test_form_method(), _test_form_name(), _test_form_put_action(), _test_form_put_encoding(), _test_form_put_method(), _test_form_put_name(), _test_framebase_name(), _test_framebase_put_name(), _test_framebase_src(), _test_GetCurMoniker(), _test_img_align(), _test_img_alt(), _test_img_name(), _test_img_set_alt(), _test_img_set_src(), _test_img_src(), _test_input_defaultValue(), _test_input_name(), _test_input_put_defaultValue(), _test_input_put_value(), _test_input_set_name(), _test_input_set_src(), _test_input_src(), _test_input_type(), _test_input_value(), _test_link_media(), _test_meta_charset(), _test_meta_content(), _test_meta_httpequiv(), _test_meta_name(), _test_node_name(), _test_object_name(), _test_option_put_text(), _test_option_put_value(), _test_option_text(), _test_option_value(), _test_range_paste_html(), _test_range_put_text(), _test_range_set_end_point(), _test_range_text(), _test_readyState(), _test_script_text(), _test_select_name(), _test_select_set_name(), _test_select_set_value(), _test_select_type(), _test_select_value(), _test_style_csstext(), _test_style_filter(), _test_style_media(), _test_style_put_media(), _test_style_put_type(), _test_style_remove_attribute(), _test_style_set_csstext(), _test_style_type(), _test_stylesheet_csstext(), _test_text_data(), _test_text_decoration(), _test_textarea_defaultvalue(), _test_textarea_put_defaultvalue(), _test_textarea_put_value(), _test_textarea_type(), _test_textarea_value(), _test_window_name(), _test_window_status(), _text_append_data(), CTrayBandSite::AddBand(), AtlAxCreateControlLicEx(), AtlRegisterTypeLib(), ATL::CComBSTR::Attach(), AutomationObject_Invoke(), AVICompressorPropertyBag_Load(), before_async_open(), Binding_Release(), BindProtocol_Release(), BindProtocol_StartEx(), BindStatusCallback_Release(), BSTR_UserFree(), BSTR_UserUnmarshal(), build_canonical_path(), build_path(), build_proplist(), build_relpath(), ATL::CComBSTR::CComBSTR(), check_codebase(), check_jscript(), class_object_Next(), class_object_NextMethod(), clear_ei(), CoInternetGetSecurityUrlEx(), combine_uri(), CicBridge::ConfigureRegisterWord(), _com_util::ConvertStringToBSTR(), ConvertUTF8StringToBSTR(), create_command(), create_doc_from_url(), create_ie_window(), declare_prefix(), decode_string(), delete_command(), destroy_uri_obj(), determine_patch_sequence(), disp_delete_name(), disp_get_id(), dispevent_Invoke(), doc_navigate_task_destr(), DocObjectService_FireBeforeNavigate2(), DocObjectService_FireDocumentComplete(), DocObjectService_FireNavigateComplete2(), DoSync(), double_to_string(), drive_Release(), enum_key(), enum_values(), Err_Raise(), err_string_prop(), EventDispatch_Invoke(), anonymous_namespace{mstscax.cpp}::CoClass::ExcepInfoToString(), exec_composesettings(), exec_hyperlink(), exec_query(), filecoll_enumvariant_Next(), filecoll_Release(), FileProtocol_StartEx(), fill_processor_information(), find_element_by_id(), SEALED_::FireChannelReceivedData(), flush_sequence(), FM2_WriteFriendlyName(), folder_Release(), foldercoll_enumvariant_Next(), foldercoll_Release(), free_assembly(), free_bstr_array(), free_bstrs(), free_ei(), free_ns_context(), anonymous_namespace{mstscax.cpp}::CoClass::FreeExcepInfo(), FtpProtocol_open_request(), fw_app_put_ProcessImageFileName(), fw_app_Release(), fw_port_put_Name(), fw_port_Release(), generate_security_id(), get_antecedent_table(), get_attribute_value(), get_body_text(), get_doc_elem_by_id(), get_document_charset(), get_elem_by_id(), get_element_by_id(), get_frame_by_name(), get_language_string(), get_object_text(), get_properties(), get_protocol_handler(), get_registered_task(), get_stringvalue(), get_uri_string(), get_zone_from_domains(), ATL::CWindow::GetWindowText(), Global_Asc(), Global_InStrRev(), Global_InvokeEx(), Global_LCase(), Global_Left(), Global_Len(), Global_LTrim(), Global_MsgBox(), Global_Right(), Global_RTrim(), Global_StrComp(), Global_Trim(), Global_UCase(), GopherProtocol_open_request(), handle_extern_mime_navigation(), handle_navigation_error(), SEALED_::HandleEvent(), Host_Echo(), html_window_navigate(), HTMLBodyElement_get_scroll(), HTMLDOMAttribute_get_specified(), HTMLElement_populate_props(), HTMLEvents_Invoke(), HTMLLocation_get_hash(), HTMLLocation_get_hostname(), HTMLLocation_get_protocol(), HTMLLocation_get_search(), HTMLStyle_put_borderStyle(), HTMLWindow2_open(), HttpProtocol_open_request(), IDispatch_Invoke_Proxy(), ie_dialog_open_proc(), ie_navigate(), iewnd_OnNotify(), iframe_onreadystatechange(), init(), init_members(), init_warning_dialog(), install_file(), interp_forin(), invoke_procedure(), IRecordInfoImpl_RecordClear(), IRecordInfoImpl_Release(), is_elem_id(), ITypeComp_fnBind(), ITypeInfo_fnAddressOfMember(), ITypeInfo_fnGetRefTypeInfo(), ITypeInfo_fnReleaseFuncDesc(), ITypeLib2_fnGetDocumentation(), ITypeLib2_fnRelease(), load_manifest(), load_uri(), LoadRegTypeLib(), ATL::CComBSTR::LoadString(), locator_ConnectServer(), anonymous_namespace{activex.cpp}::LpszToBstr(), map_security_uri_to_zone(), MkProtocol_StartEx(), mlang_getcsetinfo(), mqr_GetMetadataByName(), MSI_ApplicablePatchXML(), MsiActiveScriptSite_OnScriptError(), MXAttributes_clear(), MXAttributes_Release(), MXAttributes_setLocalName(), MXAttributes_setQName(), MXAttributes_setURI(), MXAttributes_setValue(), MXWriter_create(), mxwriter_put_version(), mxwriter_Release(), navigate_fragment(), navigate_javascript_proc(), navigate_uri(), navigate_url(), node_to_string(), notif_complete(), nsChannel_AsyncOpen(), nsIOService_NewURI(), nsPromptService_Alert(), nsstyle_to_bstr(), nsURI_GetHostPort(), nsURI_GetPrePath(), nsURI_GetUserPass(), nsURI_Resolve(), nsURI_SchemeIs(), nsURL_GetDirectory(), nsURL_GetFileBaseName(), nsURL_GetFileName(), nsURL_GetQuery(), nsURL_GetRef(), Object_hasOwnProperty(), object_Release(), on_before_navigate2(), ATL::CComBSTR::operator=(), parse_anchor(), parse_assembly(), parse_domain(), parse_files(), parse_friendly(), parse_htmlscript(), parse_htmlscript_a(), parse_path(), parse_procedure(), parse_procedure_a(), parse_schema(), parse_script(), parse_script_ae(), parse_script_af(), parse_script_ar(), parse_script_expr(), parse_script_with_error_a(), parse_site(), parse_url_from_path(), parseError_Release(), PersistHistory_SaveHistory(), PersistPropertyBag_Load(), PersistStream_Load(), property_Release(), PropertyBag_Read(), PropertyNotifySink_OnChanged(), PropSysFreeString(), ProtocolSinkHandler_ReportData(), put_inner_html(), query_prop(), RegisterDefaultAcceptHeaders(), RegisterTypeLib(), RegistryPropertyBag_IPropertyBag_Read(), release_bytecode(), release_typelib(), release_vbscode(), SEALED_::ReplaceProperty(), return_bstr(), run_benchmark(), run_bom_tests(), run_encoded_tests(), run_from_file(), run_from_res(), run_script(), runtimestyle_test(), SAFEARRAY_CopyData(), SAFEARRAY_DestroyData(), SafeArrayPutElement(), SecManagerImpl_MapUrlToZoneEx2(), services_InstancesOf(), set_current_uri(), set_element_name(), set_firewall(), set_textfont_prop(), SEALED_::SetProperty(), SHPropertyBag_ReadTest(), SLTG_ReadName(), SLTG_ReadString(), START_TEST(), STDMETHODIMP_(), stringify_object(), strstr_wa(), submit_form(), super_navigate(), SysReAllocString(), test_Add(), test_async_xhr(), test_async_xhr_abort(), test_attr_collection(), test_attr_collection_disp(), test_automagic(), test_body_style(), test_bstr_cache(), test_BuildPath(), test_callbacks(), test_ChangeType_keep_dst(), test_child_col_disp(), test_CoInternetCombineIUri(), test_CoInternetCombineIUri_Pluggable(), test_CoInternetCombineUrlEx(), test_CoInternetCombineUrlEx_Pluggable(), test_collection_content(), test_contenteditable(), test_cookies(), test_CopyFolder(), test_create(), test_create_attribute(), test_create_elems(), test_CreateDispTypeInfo(), test_createfolder(), test_createNode(), test_CreateTextFile(), test_CreateTypeLib(), test_CreateUriWithFragment(), test_current_style(), test_default_arg_conv(), test_default_client_accessible_object(), test_default_selection(), test_defaults(), test_disp(), test_DispCallFunc(), test_doc_elem(), test_doc_load_from_path(), test_dom_implementation(), test_domdoc(), test_domnode(), test_domobj_dispex(), test_doscroll(), test_DriveCollection(), test_DriveExists(), test_dump_typelib(), test_dynamic_properties(), test_editing_mode(), test_elem_col_item(), test_elem_dispex(), test_elems(), test_eval(), test_exec_script(), test_FileCollection(), test_FolderCollection(), test_font_events_disp(), test_form_target(), test_FormattingXML(), test_framebase(), test_func(), test_gc(), test_get_attributes(), test_get_childNodes(), test_get_doctype(), test_get_firstChild(), test_get_lastChild(), test_get_namespaces(), test_get_nodeTypeString(), test_get_prefix(), test_get_set_attr(), test_get_tagName(), test_get_text(), test_get_xml(), test_GetAbsolutePathName(), test_getAttributeNode(), test_GetBaseName(), test_GetDrive(), test_GetDriveName(), test_getElementsByTagName(), test_GetExtensionName(), test_GetFile(), test_GetFileName(), test_GetFileVersion(), test_GetFolder(), test_GetNames(), test_GetParentFolderName(), test_GetRfc1766FromLcid(), test_GetSpecialFolder(), test_GetText(), test_global_id(), test_global_vars_ref(), test_hash(), test_header(), test_host(), test_hostname(), test_href(), test_IActiveScriptError(), test_IClientSecurity(), test_iframe_connections(), test_iframe_elem(), test_imgload(), test_insertBefore(), test_interfaces(), test_InternetGetSecurityUrlEx(), test_InternetGetSecurityUrlEx_Pluggable(), test_invokeex(), test_IPersistStream(), test_isexpression(), test_items(), test_ITextFont(), test_IUri_GetPropertyBSTR(), test_IUri_GetStrProperties(), test_IUriBuilder_CreateUri(), test_IUriBuilder_CreateUriSimple(), test_IUriBuilder_CreateUriWithFlags(), test_IUriBuilder_GetFragment(), test_IUriBuilder_GetHost(), test_IUriBuilder_GetPassword(), test_IUriBuilder_GetPath(), test_IUriBuilder_GetQuery(), test_IUriBuilder_GetSchemeName(), test_IUriBuilder_GetUserName(), test_IUriBuilder_RemoveProperties(), test_IWbemLocator(), test_IWinHttpRequest(), test_IWinHttpRequest_Invoke(), test_label_elem(), test_load(), test_Load(), test_LoadRegTypeLib(), test_location(), test_locator(), test_marshal_bstr(), test_marshal_BSTR(), test_marshal_LPSAFEARRAY(), test_marshal_VARIANT(), test_mediadet(), test_merging_text(), test_mxwriter_characters(), test_mxwriter_default_properties(), test_mxwriter_encoding(), test_mxwriter_properties(), test_namedmap_newenum(), test_namespace(), test_namespaces_as_attributes(), test_namespaces_basic(), test_namespaces_change(), test_navigator(), test_NetFwAuthorizedApplication(), test_newline_normalization(), test_nextdispid(), test_notification_query_async(), test_obj_dispex(), test_object_elem(), test_onreadystatechange(), test_open_window(), test_parse_context(), test_ParseDisplayName(), test_ParseName(), test_pathname(), test_persiststreaminit(), test_popup(), test_port(), test_preserve_charref(), test_PropVariantCompare(), test_PropVariantToString(), test_PropVariantToStringWithDefault(), test_protocol(), test_put_data(), test_put_hash(), test_put_href(), test_put_nodeTypedValue(), test_query_async(), test_query_semisync(), test_QueryPathOfRegTypeLib(), test_Read(), test_ReadAll(), test_realization(), test_registry(), test_removeNamedItem(), test_retval(), test_rfc1766(), test_SafeArrayGetPutElement_BSTR(), test_save(), test_saxreader(), test_schema_refs(), test_script_dispatch(), test_script_run(), test_search(), test_select(), test_selection(), test_SerialNumber(), test_server_xhr(), test_service(), test_setAttributeNode(), test_SetDocString(), test_SetText(), test_ShellExecute(), test_start(), test_StdRegProv(), test_StrRetToBSTR(), test_style2(), test_style3(), test_style6(), test_stylesheet(), test_sync_xhr(), test_SysAllocString(), test_SysAllocStringByteLen(), test_SysAllocStringLen(), test_SysReAllocString(), test_SysReAllocStringLen(), test_SystemSecurity(), test_table_elem(), test_td_elem(), test_testTransforms(), test_textfont_global_defaults(), test_textstream(), test_tr_elem(), test_TransformWithLoadingLocalFile(), test_TxGetText(), test_TxSetText(), test_type_info(), test_typelib(), test_typelibmarshal(), test_VarAdd(), test_VarAnd(), test_VarBstrCat(), test_VarBstrCmp(), test_VarBstrFromI4(), test_VarBstrFromR4(), test_VarCmp(), test_VarDiv(), test_VarFormat(), test_VarFormatFromTokens(), test_VarFormatNumber(), test_varianttoproperty(), test_VarIdiv(), test_VarImp(), test_VarMod(), test_VarMul(), test_VarOr(), test_VarPow(), test_VarSub(), test_VarWeekdayName(), test_VarXor(), test_Verbs(), test_Win32_Baseboard(), test_Win32_Bios(), test_Win32_ComputerSystem(), test_Win32_ComputerSystemProduct(), test_Win32_DisplayControllerConfiguration(), test_Win32_IP4RouteTable(), test_Win32_OperatingSystem(), test_Win32_PhysicalMemory(), test_Win32_PnPEntity(), test_Win32_Printer(), test_Win32_Process(), test_Win32_Processor(), test_Win32_QuickFixEngineering(), test_Win32_Service(), test_Win32_SystemEnclosure(), test_Win32_VideoController(), test_Win32_WinSAT(), test_window(), test_WriteLine(), test_wshshell(), test_XDR_datatypes(), test_XDR_schemas(), test_xmldoc(), test_xmlelem(), test_xmlelem_collection(), test_XMLHTTP(), test_xmlns_attribute(), test_xmlTypes(), test_XPath(), test_xsltemplate(), test_xsltext(), TextFont_Release(), textfont_reset_to_default(), textrange_set_font(), TLB_AllocAndInitFuncDesc(), TLB_AllocAndInitVarDesc(), TLB_FreeVarDesc(), to_array(), to_safearray(), translate_uri(), translate_url(), UnRegisterTypeLib(), update_title(), URLMoniker_Load(), URLMoniker_Release(), validate_regex_document(), var2str(), VarCat(), VarDateFromStr(), VarFormatCurrency(), VarFormatNumber(), VarFormatPercent(), VARIANT_ClearInd(), VARIANT_FormatDate(), VARIANT_FormatNumber(), VariantClear(), VarMonthName(), VarWeekdayName(), VBSAXContentHandler_startElement(), WebBrowserPriv2IE8_NavigateWithBindCtx2(), WebBrowserPriv2IE9_NavigateWithBindCtx2(), winhttp_request_get_StatusText(), winhttp_request_GetAllResponseHeaders(), winhttp_request_GetResponseHeader(), WinMGMTS_ParseDisplayName(), WshShell3_ExpandEnvironmentStrings(), WshShell3_get_CurrentDirectory(), WshShortcut_put_IconLocation(), WshShortcut_Release(), xslprocessor_addParameter(), xslprocessor_par_free(), xslprocessor_Release(), xslprocessor_transform(), CCicLibMenuItem::~CCicLibMenuItem(), ATL::CComBSTR::~CComBSTR(), CFunctionProviderBase::~CFunctionProviderBase(), and SEALED_::~RdpClient().

◆ SysReAllocString()

INT WINAPI SysReAllocString ( LPBSTR  old,
LPCOLESTR  str 
)

Definition at line 467 of file oleaut.c.

468{
469 /*
470 * Sanity check
471 */
472 if (old==NULL)
473 return 0;
474
475 /*
476 * Make sure we free the old string.
477 */
478 SysFreeString(*old);
479
480 /*
481 * Allocate the new string
482 */
483 *old = SysAllocString(str);
484
485 return 1;
486}
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271

Referenced by mxwriter_put_encoding(), and test_SysReAllocString().

◆ SysReAllocStringLen()

int WINAPI SysReAllocStringLen ( BSTR old,
const OLECHAR str,
unsigned int  len 
)

Definition at line 383 of file oleaut.c.

384{
385 /* Detect integer overflow. */
386 if (len >= ((UINT_MAX-sizeof(WCHAR)-sizeof(DWORD))/sizeof(WCHAR)))
387 return FALSE;
388
389 if (*old!=NULL) {
390 DWORD newbytelen = len*sizeof(WCHAR);
391 bstr_t *old_bstr = bstr_from_str(*old);
392 bstr_t *bstr = CoTaskMemRealloc(old_bstr, bstr_alloc_size(newbytelen));
393
394 if (!bstr) return FALSE;
395
396 *old = bstr->u.str;
397 bstr->size = newbytelen;
398 /* The old string data is still there when str is NULL */
399 if (str && old_bstr->u.str != str) memmove(bstr->u.str, str, newbytelen);
400 bstr->u.str[len] = 0;
401 } else {
402 *old = SysAllocStringLen(str, len);
403 }
404
405 return TRUE;
406}
LPVOID WINAPI CoTaskMemRealloc(LPVOID pvOld, SIZE_T size)
Definition: ifs.c:460
#define memmove(s1, s2, n)
Definition: mkisofs.h:881
DWORD size
Definition: oleaut.c:88

Referenced by BSTR_UserUnmarshal(), ATL::CWindow::GetWindowText(), and test_SysReAllocStringLen().

◆ SysStringByteLen()

◆ SysStringLen()

UINT WINAPI SysStringLen ( BSTR  str)

Definition at line 196 of file oleaut.c.

197{
198 return str ? bstr_from_str(str)->size/sizeof(WCHAR) : 0;
199}

Referenced by AVICompressorPropertyBag_Load(), anonymous_namespace{activex.cpp}::BstrToLpsz(), build_canonical_path(), build_path(), build_relpath(), check_bstr_length(), _com_util::ConvertBSTRToString(), ATL::CComBSTR::Copy(), dump_instr_arg(), anonymous_namespace{mstscax.cpp}::CoClass::ExcepInfoToString(), filesys_BuildPath(), filesys_CopyFile(), filesys_CopyFolder(), filesys_DeleteFile(), filesys_DeleteFolder(), filesys_DriveExists(), filesys_GetDrive(), filesys_GetExtensionName(), filesys_GetParentFolderName(), function_value(), get_body_text(), get_full_path(), get_protocol_handler(), get_uri_path(), get_zone_from_domains(), SEALED_::GetProperty(), CTipbarThread::GetTextSize(), Global_Asc(), Global_InStr(), Global_InStrRev(), Global_Left(), Global_Len(), Global_Mid(), Global_Right(), Global_RTrim(), Global_StrReverse(), Global_Trim(), Host_Echo(), HTMLDocument3_getElementsByName(), HTMLLocation_get_protocol(), HTMLWindow2_alert(), SEALED_::IMsTscAx::CreateVirtualChannels(), InternetBindInfo_GetBindString(), interp_forin(), MkProtocol_StartEx(), namespacemanager_getDeclaredPrefix(), namespacemanager_getPrefix(), namespacemanager_getURI(), navigate_fragment(), nsstyle_to_bstr(), nsURI_GetPrePath(), persist_stream_save(), PersistHistory_SaveHistory(), PersistStream_GetSizeMax(), PropVariantToGUID(), RegExp2_Execute(), RegExp2_put_Pattern(), RegExp2_Test(), SAXAttributes_getIndexFromName(), SAXAttributes_getIndexFromQName(), SAXAttributes_getLocalName(), SAXAttributes_getName(), SAXAttributes_getQName(), SAXAttributes_getType(), SAXAttributes_getURI(), SAXAttributes_getValue(), SEALED_::SetProperty(), stringify_object(), SWbemProperty_create(), test_bstr_cache(), test_create(), test_domdoc(), test_DriveCollection(), test_InitPropVariantFromGUIDAsString(), test_IUri_GetPropertyBSTR(), test_IWinHttpRequest(), test_marshal_bstr(), test_marshal_BSTR(), test_mxwriter_characters(), test_mxwriter_flush(), test_Read(), test_ReadAll(), test_registry(), test_SafeArrayGetPutElement_BSTR(), test_saxstr(), test_SysReAllocStringLen(), test_SysStringLen(), test_TxSetText(), test_typelib(), test_VarBstrCat(), test_VarCat(), textstream_writestr(), TLB_SanitizeBSTR(), Uri_GetPropertyLength(), URLMoniker_GetDisplayName(), URLMoniker_GetSizeMax(), URLMoniker_Save(), VarBstrCat(), VarBstrCmp(), variant_to_jsval(), VariantToGUID(), anonymous_namespace{mstscax.cpp}::VariantToString(), VBSAXAttributes_getIndexFromName(), VBSAXAttributes_getIndexFromQName(), VBSAXAttributes_getTypeFromName(), VBSAXAttributes_getTypeFromQName(), VBSAXAttributes_getValueFromName(), VBSAXAttributes_getValueFromQName(), VBSAXContentHandler_characters(), VBSAXContentHandler_endElement(), VBSAXContentHandler_startElement(), Widget_bstr(), and WMSFT_encode_variant().

◆ WINE_DECLARE_DEBUG_CHANNEL()

WINE_DECLARE_DEBUG_CHANNEL ( heap  )

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( ole  )

Variable Documentation

◆ _delimiter

const WCHAR _delimiter[] = {'!',0}
static

Definition at line 508 of file oleaut.c.

◆ bstr_cache

bstr_cache_entry_t bstr_cache[0x10000/BUCKET_SIZE]
static

Definition at line 109 of file oleaut.c.

Referenced by get_cache_entry_from_idx().

◆ bstr_cache_enabled

BOOL bstr_cache_enabled
static

Definition at line 73 of file oleaut.c.

Referenced by DllMain(), get_cache_entry_from_idx(), and SetOaNoCache().

◆ cs_bstr_cache

static CRITICAL_SECTION cs_bstr_cache = { &cs_bstr_cache_dbg, -1, 0, 0, 0, 0 }
static

Definition at line 75 of file oleaut.c.

Referenced by alloc_bstr(), and SysFreeString().

◆ cs_bstr_cache_dbg

CRITICAL_SECTION_DEBUG cs_bstr_cache_dbg
static
Initial value:
=
{
0, 0, &cs_bstr_cache,
0, 0, { (DWORD_PTR)(__FILE__ ": bstr_cache") }
}
static CRITICAL_SECTION_DEBUG cs_bstr_cache_dbg
Definition: oleaut.c:76
LIST_ENTRY ProcessLocksList
Definition: winbase.h:883
#define DWORD_PTR
Definition: treelist.c:76

Definition at line 76 of file oleaut.c.

◆ dispatch_typelib_ps

IPSFactoryBuffer dispatch_typelib_ps = { &dispatch_typelib_ps_vtbl }
static

Definition at line 1054 of file oleaut.c.

Referenced by DllGetClassObject().

◆ dispatch_typelib_ps_vtbl

const IPSFactoryBufferVtbl dispatch_typelib_ps_vtbl
static
Initial value:
=
{
}
static ULONG WINAPI dispatch_typelib_ps_AddRef(IPSFactoryBuffer *iface)
Definition: oleaut.c:943
static HRESULT WINAPI dispatch_typelib_ps_CreateProxy(IPSFactoryBuffer *iface, IUnknown *outer, REFIID iid, IRpcProxyBuffer **proxy, void **out)
Definition: oleaut.c:966
static ULONG WINAPI dispatch_typelib_ps_Release(IPSFactoryBuffer *iface)
Definition: oleaut.c:948
static HRESULT WINAPI dispatch_typelib_ps_QueryInterface(IPSFactoryBuffer *iface, REFIID iid, void **out)
Definition: oleaut.c:930
static HRESULT WINAPI dispatch_typelib_ps_CreateStub(IPSFactoryBuffer *iface, REFIID iid, IUnknown *server, IRpcStubBuffer **stub)
Definition: oleaut.c:1012

Definition at line 1045 of file oleaut.c.

◆ pdelimiter

const WCHAR* pdelimiter = &_delimiter[0]
static

Definition at line 509 of file oleaut.c.

Referenced by GetActiveObject(), and RegisterActiveObject().