ReactOS 0.4.17-dev-573-g8315b8c
oleaut.c File Reference
#include <assert.h>
#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 "rpcproxy.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  ifacepsredirect_data
 
struct  tlibredirect_data
 
struct  dispinterface_stub
 

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 *)
 
BOOL WINAPI OLEAUTPS_DllMain (HINSTANCE, DWORD, LPVOID)
 
HRESULT WINAPI OLEAUTPS_DllRegisterServer (void)
 
HRESULT WINAPI OLEAUTPS_DllUnregisterServer (void)
 
HRESULT WINAPI CreateProxyFromTypeInfo (ITypeInfo *typeinfo, IUnknown *outer, REFIID iid, IRpcProxyBuffer **proxy, void **obj)
 
HRESULT WINAPI CreateStubFromTypeInfo (ITypeInfo *typeinfo, REFIID iid, IUnknown *server, IRpcStubBuffer **stub)
 
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 struct dispinterface_stubimpl_from_IRpcStubBuffer (IRpcStubBuffer *iface)
 
static ULONG WINAPI dispinterface_stub_Release (IRpcStubBuffer *iface)
 
static const CInterfaceStubVtblfind_idispatch_stub_vtbl (void)
 
static HRESULT dispinterface_create_stub (IUnknown *server, const GUID *iid, 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)
 
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]
 
const ExtendedProxyFileInfo oleaut32_oaidl_ProxyFileInfo
 
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 109 of file oleaut.c.

◆ ARENA_INUSE_FILLER

#define ARENA_INUSE_FILLER   0x55

Definition at line 107 of file oleaut.c.

◆ ARENA_TAIL_FILLER

#define ARENA_TAIL_FILLER   0xab

Definition at line 108 of file oleaut.c.

◆ BUCKET_BUFFER_SIZE

#define BUCKET_BUFFER_SIZE   6

Definition at line 99 of file oleaut.c.

◆ BUCKET_SIZE

#define BUCKET_SIZE   16

Definition at line 98 of file oleaut.c.

◆ COBJMACROS

#define COBJMACROS

Definition at line 27 of file oleaut.c.

Function Documentation

◆ _get_STDFONT_CF()

void _get_STDFONT_CF ( LPVOID ppv)

Definition at line 2138 of file olefont.c.

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

Referenced by DllGetClassObject().

◆ _get_STDPIC_CF()

void _get_STDPIC_CF ( LPVOID ppv)

Definition at line 2594 of file olepicture.c.

2594{ *ppv = &STDPIC_CF; }
static IClassFactoryImpl STDPIC_CF
Definition: olepicture.c:2592

Referenced by DllGetClassObject().

◆ actctx_get_typelib_module()

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

Definition at line 799 of file oleaut.c.

800{
801 struct ifacepsredirect_data *iface;
802 struct tlibredirect_data *tlib;
803 ACTCTX_SECTION_KEYED_DATA data;
804 WCHAR *ptrW;
805
806 data.cbSize = sizeof(data);
807 if (!FindActCtxSectionGuid(0, NULL, ACTIVATION_CONTEXT_SECTION_COM_INTERFACE_REDIRECTION,
808 iid, &data))
809 return FALSE;
810
811 iface = (struct ifacepsredirect_data *)data.lpData;
812 if (!FindActCtxSectionGuid(0, NULL, ACTIVATION_CONTEXT_SECTION_COM_TYPE_LIBRARY_REDIRECTION,
813 &iface->tlbid, &data))
814 return FALSE;
815
816 tlib = (struct tlibredirect_data *)data.lpData;
817 ptrW = (WCHAR *)((BYTE *)data.lpSectionBase + tlib->name_offset);
818
819 if (tlib->name_len/sizeof(WCHAR) >= len)
820 {
821 ERR("need larger module buffer, %lu.\n", tlib->name_len);
822 return FALSE;
823 }
824
825 memcpy(module, ptrW, tlib->name_len);
826 module[tlib->name_len/sizeof(WCHAR)] = 0;
827 return TRUE;
828}
#define ERR(fmt,...)
Definition: precomp.h:57
#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:265
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
short WCHAR
Definition: pedump.c:58
ULONG name_offset
Definition: oleaut.c:790
ULONG name_len
Definition: oleaut.c:789
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 142 of file oleaut.c.

143{
145 bstr_t *ret;
146
147 if(cache_entry) {
149
150 if(!cache_entry->cnt) {
152 if(cache_entry && !cache_entry->cnt)
154 }
155
156 if(cache_entry) {
157 ret = cache_entry->buf[cache_entry->head++];
159 cache_entry->cnt--;
160 }
161
163
164 if(cache_entry) {
165 if(WARN_ON(heap)) {
166 size_t fill_size = (FIELD_OFFSET(bstr_t, u.ptr[size])+2*sizeof(WCHAR)-1) & ~(sizeof(WCHAR)-1);
167 memset(ret, ARENA_INUSE_FILLER, fill_size);
168 memset((char *)ret+fill_size, ARENA_TAIL_FILLER, bstr_alloc_size(size)-fill_size);
169 }
170 ret->size = size;
171 return ret;
172 }
173 }
174
176 if(ret)
177 ret->size = size;
178 return ret;
179}
void *WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: malloc.c:381
return ret
Definition: mutex.c:146
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
#define WARN_ON(c)
Definition: module.h:257
static size_t bstr_alloc_size(size_t size)
Definition: oleaut.c:113
#define BUCKET_SIZE
Definition: oleaut.c:98
static bstr_cache_entry_t * get_cache_entry(size_t size)
Definition: oleaut.c:128
static CRITICAL_SECTION cs_bstr_cache
Definition: oleaut.c:77
#define ARENA_INUSE_FILLER
Definition: oleaut.c:107
#define ARENA_TAIL_FILLER
Definition: oleaut.c:108
#define BUCKET_BUFFER_SIZE
Definition: oleaut.c:99
#define memset(x, y, z)
Definition: compat.h:39
Definition: oleaut.c:101
Definition: oleaut.c:86
Definition: svc_auth_des.c:77
Definition: heap.c:86
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
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 113 of file oleaut.c.

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

Referenced by alloc_bstr(), and SysReAllocStringLen().

◆ bstr_from_str()

static bstr_t * bstr_from_str ( BSTR  str)
inlinestatic

Definition at line 118 of file oleaut.c.

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

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

◆ CreateProxyFromTypeInfo()

HRESULT WINAPI CreateProxyFromTypeInfo ( ITypeInfo typeinfo,
IUnknown outer,
REFIID  iid,
IRpcProxyBuffer **  proxy,
void **  obj 
)

Definition at line 1556 of file ndr_typelib.c.

1558{
1559 struct typelib_proxy *proxy;
1560 WORD funcs, parentfuncs, i;
1561 ITypeInfo *real_typeinfo;
1562 GUID parentiid;
1563 HRESULT hr;
1564
1565 TRACE("typeinfo %p, outer %p, iid %s, proxy_buffer %p, out %p.\n",
1566 typeinfo, outer, debugstr_guid(iid), proxy_buffer, out);
1567
1568 hr = get_iface_info(typeinfo, &funcs, &parentfuncs, &parentiid, &real_typeinfo);
1569 if (FAILED(hr))
1570 return hr;
1571
1572 if (!(proxy = calloc(1, sizeof(*proxy))))
1573 {
1574 ERR("Failed to allocate proxy object.\n");
1575 ITypeInfo_Release(real_typeinfo);
1576 return E_OUTOFMEMORY;
1577 }
1578
1579 init_stub_desc(&proxy->stub_desc);
1580 proxy->proxy_info.pStubDesc = &proxy->stub_desc;
1581
1582 proxy->proxy_vtbl = calloc(1, sizeof(proxy->proxy_vtbl->header) + (funcs + parentfuncs) * sizeof(void *));
1583 if (!proxy->proxy_vtbl)
1584 {
1585 ERR("Failed to allocate proxy vtbl.\n");
1586 free(proxy);
1587 ITypeInfo_Release(real_typeinfo);
1588 return E_OUTOFMEMORY;
1589 }
1590 proxy->proxy_vtbl->header.pStublessProxyInfo = &proxy->proxy_info;
1591 proxy->iid = *iid;
1592 proxy->proxy_vtbl->header.piid = &proxy->iid;
1593 fill_delegated_proxy_table((IUnknownVtbl *)proxy->proxy_vtbl->Vtbl, parentfuncs);
1594 for (i = 0; i < funcs; i++)
1595 proxy->proxy_vtbl->Vtbl[parentfuncs + i] = (void *)-1;
1596
1597 hr = build_format_strings(real_typeinfo, funcs, parentfuncs, &proxy->stub_desc.pFormatTypes,
1598 &proxy->proxy_info.ProcFormatString, &proxy->offset_table);
1599 ITypeInfo_Release(real_typeinfo);
1600 if (FAILED(hr))
1601 {
1602 free(proxy->proxy_vtbl);
1603 free(proxy);
1604 return hr;
1605 }
1606 proxy->proxy_info.FormatStringOffset = &proxy->offset_table[-3];
1607
1608 hr = typelib_proxy_init(proxy, outer, funcs + parentfuncs, &parentiid, proxy_buffer, out);
1609 if (FAILED(hr))
1610 {
1611 free((void *)proxy->stub_desc.pFormatTypes);
1612 free((void *)proxy->proxy_info.ProcFormatString);
1613 free((void *)proxy->offset_table);
1614 free(proxy->proxy_vtbl);
1615 free(proxy);
1616 }
1617
1618 return hr;
1619}
BOOL fill_delegated_proxy_table(IUnknownVtbl *vtbl, DWORD num)
Definition: cstub.c:106
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define free
Definition: debug_ros.c:5
HRESULT hr
Definition: delayimp.cpp:582
unsigned short WORD
Definition: ntddk_ex.h:93
int proxy
Definition: main.c:67
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 FAILED(hr)
Definition: intsafe.h:51
#define debugstr_guid
Definition: kernel32.h:35
static IUnknown * outer
Definition: compobj.c:82
static HRESULT build_format_strings(ITypeInfo *typeinfo, WORD funcs, WORD parentfuncs, const unsigned char **type_ret, const unsigned char **proc_ret, unsigned short **offset_ret)
Definition: ndr_typelib.c:1355
static void init_stub_desc(MIDL_STUB_DESC *desc)
Definition: ndr_typelib.c:1476
static HRESULT get_iface_info(ITypeInfo *typeinfo, WORD *funcs, WORD *parentfuncs, GUID *parentiid, ITypeInfo **real_typeinfo)
Definition: ndr_typelib.c:1400
static HRESULT typelib_proxy_init(struct typelib_proxy *proxy, IUnknown *outer, ULONG count, const GUID *parentiid, IRpcProxyBuffer **proxy_buffer, void **out)
Definition: ndr_typelib.c:1528
#define calloc
Definition: rosglue.h:14
static struct __wine_debug_functions funcs
Definition: debug.c:48
#define TRACE(s)
Definition: solgame.cpp:4
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383

Referenced by dispatch_typelib_ps_CreateProxy().

◆ CreateStubFromTypeInfo()

HRESULT WINAPI CreateStubFromTypeInfo ( ITypeInfo typeinfo,
REFIID  iid,
IUnknown server,
IRpcStubBuffer **  stub 
)

Definition at line 1693 of file ndr_typelib.c.

1695{
1696 WORD funcs, parentfuncs, i;
1697 struct typelib_stub *stub;
1698 ITypeInfo *real_typeinfo;
1699 GUID parentiid;
1700 HRESULT hr;
1701
1702 TRACE("typeinfo %p, iid %s, server %p, stub_buffer %p.\n",
1703 typeinfo, debugstr_guid(iid), server, stub_buffer);
1704
1705 hr = get_iface_info(typeinfo, &funcs, &parentfuncs, &parentiid, &real_typeinfo);
1706 if (FAILED(hr))
1707 return hr;
1708
1709 if (!(stub = calloc(1, sizeof(*stub))))
1710 {
1711 ERR("Failed to allocate stub object.\n");
1712 ITypeInfo_Release(real_typeinfo);
1713 return E_OUTOFMEMORY;
1714 }
1715
1716 init_stub_desc(&stub->stub_desc);
1717 stub->server_info.pStubDesc = &stub->stub_desc;
1718
1719 hr = build_format_strings(real_typeinfo, funcs, parentfuncs, &stub->stub_desc.pFormatTypes,
1720 &stub->server_info.ProcString, &stub->offset_table);
1721 ITypeInfo_Release(real_typeinfo);
1722 if (FAILED(hr))
1723 {
1724 free(stub);
1725 return hr;
1726 }
1727 stub->server_info.FmtStringOffset = &stub->offset_table[-3];
1728
1729 stub->iid = *iid;
1730 stub->stub_vtbl.header.piid = &stub->iid;
1731 stub->stub_vtbl.header.pServerInfo = &stub->server_info;
1732 stub->stub_vtbl.header.DispatchTableCount = funcs + parentfuncs;
1733
1734 if (!IsEqualGUID(&parentiid, &IID_IUnknown))
1735 {
1736 stub->dispatch_table = malloc((funcs + parentfuncs) * sizeof(void *));
1737 for (i = 3; i < parentfuncs; i++)
1738 stub->dispatch_table[i - 3] = NdrStubForwardingFunction;
1739 for (; i < funcs + parentfuncs; i++)
1740 stub->dispatch_table[i - 3] = (PRPC_STUB_FUNCTION)NdrStubCall2;
1741 stub->stub_vtbl.header.pDispatchTable = &stub->dispatch_table[-3];
1742 stub->stub_vtbl.Vtbl = CStdStubBuffer_Delegating_Vtbl;
1743 }
1744 else
1745 stub->stub_vtbl.Vtbl = CStdStubBuffer_Vtbl;
1746 stub->stub_vtbl.Vtbl.Release = typelib_stub_Release;
1747
1748 hr = typelib_stub_init(stub, server, &parentiid, stub_buffer);
1749 if (FAILED(hr))
1750 {
1751 free((void *)stub->stub_desc.pFormatTypes);
1752 free((void *)stub->server_info.ProcString);
1753 free(stub->offset_table);
1754 free(stub);
1755 }
1756
1757 return hr;
1758}
const GUID IID_IUnknown
const IRpcStubBufferVtbl CStdStubBuffer_Delegating_Vtbl
Definition: cstub.c:397
const IRpcStubBufferVtbl CStdStubBuffer_Vtbl
Definition: cstub.c:348
#define malloc
Definition: debug_ros.c:4
void __RPC_STUB NdrStubForwardingFunction(IRpcStubBuffer *iface, IRpcChannelBuffer *pChannel, PRPC_MESSAGE pMsg, DWORD *pdwStubPhase)
Definition: cstub.c:421
LONG WINAPI NdrStubCall2(struct IRpcStubBuffer *pThis, struct IRpcChannelBuffer *pChannel, PRPC_MESSAGE pRpcMsg, DWORD *pdwStubPhase)
static ULONG WINAPI typelib_stub_Release(IRpcStubBuffer *iface)
Definition: ndr_typelib.c:1632
static HRESULT typelib_stub_init(struct typelib_stub *stub, IUnknown *server, const GUID *parentiid, IRpcStubBuffer **stub_buffer)
Definition: ndr_typelib.c:1660
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
for(i=0;i< sizeof(testsuite)/sizeof(testsuite[0]);++i) ok(call_test(testsuite[i].func)
void(__RPC_STUB * PRPC_STUB_FUNCTION)(IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *pdwStubPhase)
Definition: rpcproxy.h:83
Definition: stubgen.c:11
struct _stub stub
static rfbScreenInfoPtr server
Definition: vnc.c:74

Referenced by dispatch_typelib_ps_CreateStub().

◆ dispatch_create_proxy()

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

Definition at line 951 of file oleaut.c.

952{
954 HRESULT hr;
955
956 hr = OLEAUTPS_DllGetClassObject(&CLSID_PSFactoryBuffer, &IID_IPSFactoryBuffer, (void **)&factory);
957 if (FAILED(hr)) return hr;
958
959 hr = IPSFactoryBuffer_CreateProxy(factory, outer, &IID_IDispatch, proxy, out);
960 IPSFactoryBuffer_Release(factory);
961 return hr;
962}
HRESULT WINAPI OLEAUTPS_DllGetClassObject(REFCLSID, REFIID, LPVOID *)
const GUID IID_IDispatch
Definition: main.c:439
GUID const CLSID_PSFactoryBuffer

Referenced by dispatch_typelib_ps_CreateProxy().

◆ dispatch_create_stub()

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

Definition at line 997 of file oleaut.c.

998{
1000 HRESULT hr;
1001
1002 hr = OLEAUTPS_DllGetClassObject(&CLSID_PSFactoryBuffer, &IID_IPSFactoryBuffer, (void **)&factory);
1003 if (FAILED(hr)) return hr;
1004
1005 hr = IPSFactoryBuffer_CreateStub(factory, &IID_IDispatch, server, stub);
1006 IPSFactoryBuffer_Release(factory);
1007 return hr;
1008}

Referenced by dispatch_typelib_ps_CreateStub().

◆ dispatch_typelib_ps_AddRef()

static ULONG WINAPI dispatch_typelib_ps_AddRef ( IPSFactoryBuffer iface)
static

Definition at line 941 of file oleaut.c.

942{
943 return 2;
944}

◆ 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 964 of file oleaut.c.

966{
968 TYPEATTR *attr;
969 HRESULT hr;
970
971 if (IsEqualGUID(iid, &IID_IDispatch))
973
975 if (FAILED(hr)) return hr;
976
977 hr = ITypeInfo_GetTypeAttr(typeinfo, &attr);
978 if (FAILED(hr))
979 {
980 ITypeInfo_Release(typeinfo);
981 return hr;
982 }
983
984 if (attr->typekind == TKIND_INTERFACE || (attr->wTypeFlags & TYPEFLAG_FDUAL))
986 else
988
989 if (FAILED(hr))
990 ERR("Failed to create proxy, hr %#lx.\n", hr);
991
992 ITypeInfo_ReleaseTypeAttr(typeinfo, attr);
993 ITypeInfo_Release(typeinfo);
994 return hr;
995}
static HRESULT dispatch_create_proxy(IUnknown *outer, IRpcProxyBuffer **proxy, void **out)
Definition: oleaut.c:951
static HRESULT get_typeinfo_for_iid(REFIID iid, ITypeInfo **typeinfo)
Definition: oleaut.c:898
HRESULT WINAPI CreateProxyFromTypeInfo(ITypeInfo *typeinfo, IUnknown *outer, REFIID iid, IRpcProxyBuffer **proxy, void **obj)
Definition: ndr_typelib.c:1556
Definition: cookie.c:202
@ TKIND_INTERFACE
Definition: widltypes.h:237

◆ dispatch_typelib_ps_CreateStub()

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

Definition at line 1118 of file oleaut.c.

1120{
1122 TYPEATTR *attr;
1123 HRESULT hr;
1124
1125 if (IsEqualGUID(iid, &IID_IDispatch))
1127
1129 if (FAILED(hr)) return hr;
1130
1131 hr = ITypeInfo_GetTypeAttr(typeinfo, &attr);
1132 if (FAILED(hr))
1133 {
1134 ITypeInfo_Release(typeinfo);
1135 return hr;
1136 }
1137
1138 if (attr->typekind == TKIND_INTERFACE || (attr->wTypeFlags & TYPEFLAG_FDUAL))
1140 else
1142
1143 if (FAILED(hr))
1144 ERR("Failed to create stub, hr %#lx.\n", hr);
1145
1146 ITypeInfo_ReleaseTypeAttr(typeinfo, attr);
1147 ITypeInfo_Release(typeinfo);
1148 return hr;
1149}
HRESULT WINAPI CreateStubFromTypeInfo(ITypeInfo *typeinfo, REFIID iid, IUnknown *server, IRpcStubBuffer **stub)
Definition: ndr_typelib.c:1693
static HRESULT dispatch_create_stub(IUnknown *server, IRpcStubBuffer **stub)
Definition: oleaut.c:997
static HRESULT dispinterface_create_stub(IUnknown *server, const GUID *iid, IRpcStubBuffer **stub)
Definition: oleaut.c:1072

◆ dispatch_typelib_ps_QueryInterface()

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

Definition at line 928 of file oleaut.c.

929{
930 if (IsEqualIID(iid, &IID_IPSFactoryBuffer) || IsEqualIID(iid, &IID_IUnknown))
931 {
932 *out = iface;
933 return S_OK;
934 }
935
936 FIXME("No interface for %s.\n", debugstr_guid(iid));
937 *out = NULL;
938 return E_NOINTERFACE;
939}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define S_OK
Definition: intsafe.h:52
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define E_NOINTERFACE
Definition: winerror.h:3479

◆ dispatch_typelib_ps_Release()

static ULONG WINAPI dispatch_typelib_ps_Release ( IPSFactoryBuffer iface)
static

Definition at line 946 of file oleaut.c.

947{
948 return 1;
949}

◆ dispinterface_create_stub()

static HRESULT dispinterface_create_stub ( IUnknown server,
const GUID iid,
IRpcStubBuffer **  stub 
)
static

Definition at line 1072 of file oleaut.c.

1073{
1074 const CInterfaceStubVtbl *stub_vtbl = find_idispatch_stub_vtbl();
1075 struct dispinterface_stub *object;
1076 void *dispatch;
1077 HRESULT hr;
1078
1079 if (!(object = calloc(1, sizeof(*object))))
1080 return E_OUTOFMEMORY;
1081
1082 /* It's possible we can just assume that "server" is already the
1083 * dispinterface type—we don't have tests for this—but since rpcrt4 queries
1084 * (which we do have tests for) it makes sense for us to match that
1085 * behaviour. */
1086 if (FAILED(hr = IUnknown_QueryInterface(server, iid, &dispatch)))
1087 {
1088 ERR("Object does not support interface %s.\n", debugstr_guid(iid));
1089 free(object);
1090 return hr;
1091 }
1092
1093 object->stub_vtbl.header = stub_vtbl->header;
1094 object->stub_vtbl.Vtbl.QueryInterface = CStdStubBuffer_QueryInterface;
1095 object->stub_vtbl.Vtbl.AddRef = CStdStubBuffer_AddRef;
1096 object->stub_vtbl.Vtbl.Release = dispinterface_stub_Release;
1097 object->stub_vtbl.Vtbl.Connect = CStdStubBuffer_Connect;
1098 object->stub_vtbl.Vtbl.Disconnect = CStdStubBuffer_Disconnect;
1099 object->stub_vtbl.Vtbl.Invoke = CStdStubBuffer_Invoke;
1100 object->stub_vtbl.Vtbl.IsIIDSupported = CStdStubBuffer_IsIIDSupported;
1101 object->stub_vtbl.Vtbl.CountRefs = CStdStubBuffer_CountRefs;
1102 object->stub_vtbl.Vtbl.DebugServerQueryInterface = CStdStubBuffer_DebugServerQueryInterface;
1103 object->stub_vtbl.Vtbl.DebugServerRelease = CStdStubBuffer_DebugServerRelease;
1104 object->stub_buffer.lpVtbl = &object->stub_vtbl.Vtbl;
1105 object->stub_buffer.RefCount = 1;
1106 object->stub_buffer.pvServerObject = dispatch;
1107 /* rpcrt4 will also fill pPSFactory, but it never uses it except in the
1108 * Release method (which we reimplement). It's only to keep a reference to
1109 * the module to implement NdrDllCanUnloadNow(). We use the default
1110 * DllCanUnloadNow() from winecrt0, which always returns S_FALSE, so don't
1111 * bother filling pPSFactory. */
1112
1113 TRACE("Created stub %p.\n", object);
1114 *stub = (IRpcStubBuffer *)&object->stub_buffer.lpVtbl;
1115 return S_OK;
1116}
void dispatch(HANDLE hStopEvent)
Definition: dispatch.c:70
ULONG WINAPI CStdStubBuffer_CountRefs(LPRPCSTUBBUFFER iface)
Definition: cstub.c:326
void WINAPI CStdStubBuffer_DebugServerRelease(LPRPCSTUBBUFFER iface, LPVOID pv)
Definition: cstub.c:341
HRESULT WINAPI CStdStubBuffer_QueryInterface(LPRPCSTUBBUFFER iface, REFIID riid, LPVOID *obj)
Definition: cstub.c:185
ULONG WINAPI CStdStubBuffer_AddRef(LPRPCSTUBBUFFER iface)
Definition: cstub.c:203
void WINAPI CStdStubBuffer_Disconnect(LPRPCSTUBBUFFER iface)
Definition: cstub.c:270
LPRPCSTUBBUFFER WINAPI CStdStubBuffer_IsIIDSupported(LPRPCSTUBBUFFER iface, REFIID riid)
Definition: cstub.c:314
HRESULT WINAPI CStdStubBuffer_Invoke(LPRPCSTUBBUFFER iface, PRPCOLEMESSAGE pMsg, LPRPCCHANNELBUFFER pChannel)
Definition: cstub.c:282
HRESULT WINAPI CStdStubBuffer_DebugServerQueryInterface(LPRPCSTUBBUFFER iface, LPVOID *ppv)
Definition: cstub.c:333
HRESULT WINAPI CStdStubBuffer_Connect(LPRPCSTUBBUFFER iface, LPUNKNOWN lpUnkServer)
Definition: cstub.c:254
ULONG AddRef()
static ULONG WINAPI dispinterface_stub_Release(IRpcStubBuffer *iface)
Definition: oleaut.c:1021
static const CInterfaceStubVtbl * find_idispatch_stub_vtbl(void)
Definition: oleaut.c:1041
CInterfaceStubVtbl stub_vtbl
Definition: oleaut.c:1012
CInterfaceStubHeader header
Definition: rpcproxy.h:99

Referenced by dispatch_typelib_ps_CreateStub().

◆ dispinterface_stub_Release()

static ULONG WINAPI dispinterface_stub_Release ( IRpcStubBuffer iface)
static

Definition at line 1021 of file oleaut.c.

1022{
1024 unsigned int refcount = InterlockedDecrement(&stub->stub_buffer.RefCount);
1025
1026 TRACE("%p decreasing refcount to %u.\n", stub, refcount);
1027
1028 if (!refcount)
1029 {
1030 /* Copied from NdrCStdStubBuffer_Release(), but supposedly incorrect
1031 * according to the comment there. */
1032 IRpcStubBuffer_Disconnect(iface);
1033
1034 free(stub);
1035 }
1036 return refcount;
1037}
#define InterlockedDecrement
Definition: armddk.h:52
static struct dispinterface_stub * impl_from_IRpcStubBuffer(IRpcStubBuffer *iface)
Definition: oleaut.c:1016

Referenced by dispinterface_create_stub().

◆ DllGetClassObject()

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

Definition at line 1168 of file oleaut.c.

1169{
1170 *ppv = NULL;
1171 if (IsEqualGUID(rclsid,&CLSID_StdFont)) {
1172 if (IsEqualGUID(iid,&IID_IClassFactory)) {
1174 IClassFactory_AddRef((IClassFactory*)*ppv);
1175 return S_OK;
1176 }
1177 }
1178 if (IsEqualGUID(rclsid,&CLSID_StdPicture)) {
1179 if (IsEqualGUID(iid,&IID_IClassFactory)) {
1181 IClassFactory_AddRef((IClassFactory*)*ppv);
1182 return S_OK;
1183 }
1184 }
1185
1186 if (IsEqualGUID(rclsid, &CLSID_PSDispatch) || IsEqualGUID(rclsid, &CLSID_PSOAInterface))
1187 return IPSFactoryBuffer_QueryInterface(&dispatch_typelib_ps, iid, ppv);
1188
1189 if (IsEqualCLSID(rclsid, &CLSID_PSTypeComp) ||
1190 IsEqualCLSID(rclsid, &CLSID_PSTypeInfo) ||
1191 IsEqualCLSID(rclsid, &CLSID_PSTypeLib) ||
1192 IsEqualCLSID(rclsid, &CLSID_PSDispatch) ||
1193 IsEqualCLSID(rclsid, &CLSID_PSEnumVariant))
1195
1196 return OLEAUTPS_DllGetClassObject(rclsid, iid, ppv);
1197}
const GUID IID_IClassFactory
static const CLSID CLSID_StdFont
Definition: compobj.c:92
void _get_STDPIC_CF(LPVOID *)
Definition: olepicture.c:2594
void _get_STDFONT_CF(LPVOID *)
Definition: olefont.c:2138
static IPSFactoryBuffer dispatch_typelib_ps
Definition: oleaut.c:1160
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 1202 of file oleaut.c.

1203{
1206
1207 return OLEAUTPS_DllMain( hInstDll, fdwReason, lpvReserved );
1208}
static DWORD const fdwReason
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define GetEnvironmentVariableW(x, y, z)
Definition: compat.h:755
#define L(x)
Definition: resources.c:13
static IN DWORD IN LPVOID lpvReserved
static BOOL bstr_cache_enabled
Definition: oleaut.c:75
BOOL WINAPI OLEAUTPS_DllMain(HINSTANCE, DWORD, LPVOID)

◆ DllRegisterServer()

HRESULT WINAPI DllRegisterServer ( void  )

Definition at line 1213 of file oleaut.c.

1214{
1216}
HRESULT WINAPI OLEAUTPS_DllRegisterServer(void)

◆ DllUnregisterServer()

HRESULT WINAPI DllUnregisterServer ( void  )

Definition at line 1221 of file oleaut.c.

1222{
1224}
HRESULT WINAPI OLEAUTPS_DllUnregisterServer(void)

◆ find_idispatch_stub_vtbl()

static const CInterfaceStubVtbl * find_idispatch_stub_vtbl ( void  )
static

Definition at line 1041 of file oleaut.c.

1042{
1043 CInterfaceStubVtbl *const *vtbl;
1044
1045 for (vtbl = oleaut32_oaidl_ProxyFileInfo.pStubVtblList; *vtbl; ++vtbl)
1046 {
1047 if (IsEqualGUID((*vtbl)->header.piid, &IID_IDispatch))
1048 return *vtbl;
1049 }
1050
1051 assert(0);
1052 return NULL;
1053}
#define assert(_expr)
Definition: assert.h:32
const ExtendedProxyFileInfo oleaut32_oaidl_ProxyFileInfo
const PCInterfaceStubVtblList * pStubVtblList
Definition: rpcproxy.h:48

Referenced by dispinterface_create_stub().

◆ get_cache_entry()

static bstr_cache_entry_t * get_cache_entry ( size_t  size)
inlinestatic

Definition at line 128 of file oleaut.c.

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

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 134 of file oleaut.c.

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

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 123 of file oleaut.c.

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

Referenced by get_cache_entry(), and get_cache_entry_from_alloc_size().

◆ get_malloc()

static IMalloc * get_malloc ( void  )
inlinestatic

Definition at line 248 of file oleaut.c.

249{
250 static IMalloc *malloc;
251
252 if (!malloc)
253 CoGetMalloc(1, &malloc);
254
255 return malloc;
256}
HRESULT WINAPI CoGetMalloc(DWORD context, IMalloc **imalloc)
Definition: malloc.c:365

Referenced by SysFreeString().

◆ get_typeinfo_for_iid()

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

Definition at line 898 of file oleaut.c.

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

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 591 of file oleaut.c.

592{
593 WCHAR guidbuf[80];
594 HRESULT ret;
595 LPRUNNINGOBJECTTABLE runobtable;
597
598 StringFromGUID2(rcid,guidbuf,39);
599 ret = CreateItemMoniker(L"!", guidbuf, &moniker);
600 if (FAILED(ret))
601 return ret;
602 ret = GetRunningObjectTable(0,&runobtable);
603 if (FAILED(ret)) {
604 IMoniker_Release(moniker);
605 return ret;
606 }
607 ret = IRunningObjectTable_GetObject(runobtable,moniker,ppunk);
608 IRunningObjectTable_Release(runobtable);
609 IMoniker_Release(moniker);
610 return ret;
611}
INT WINAPI StringFromGUID2(REFGUID guid, LPOLESTR str, INT cmax)
Definition: combase.c:1525
HRESULT WINAPI GetRunningObjectTable(DWORD reserved, IRunningObjectTable **ret)
Definition: moniker.c:729
HRESULT WINAPI CreateItemMoniker(const WCHAR *delimiter, const WCHAR *name, IMoniker **ret)
Definition: itemmoniker.c:932
interface IMoniker * LPMONIKER
Definition: objfwd.h:9
interface IRunningObjectTable * LPRUNNINGOBJECTTABLE
Definition: objfwd.h:17
Definition: main.c:40

Referenced by ITypeInfo_fnCreateInstance().

◆ GetAltMonthNames()

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

Definition at line 1239 of file oleaut.c.

1240{
1241 static const WCHAR *arabic_hijri[] =
1242 {
1243 L"\x0645\x062d\x0631\x0645",
1244 L"\x0635\x0641\x0631",
1245 L"\x0631\x0628\x064a\x0639 \x0627\x0644\x0627\x0648\x0644",
1246 L"\x0631\x0628\x064a\x0639 \x0627\x0644\x062b\x0627\x0646\x064a",
1247 L"\x062c\x0645\x0627\x062f\x0649 \x0627\x0644\x0627\x0648\x0644\x0649",
1248 L"\x062c\x0645\x0627\x062f\x0649 \x0627\x0644\x062b\x0627\x0646\x064a\x0629",
1249 L"\x0631\x062c\x0628",
1250 L"\x0634\x0639\x0628\x0627\x0646",
1251 L"\x0631\x0645\x0636\x0627\x0646",
1252 L"\x0634\x0648\x0627\x0643",
1253 L"\x0630\x0648 \x0627\x0644\x0642\x0639\x062f\x0629",
1254 L"\x0630\x0648 \x0627\x0644\x062d\x062c\x0629",
1255 NULL
1256 };
1257
1258 static const WCHAR *polish_genitive_names[] =
1259 {
1260 L"stycznia",
1261 L"lutego",
1262 L"marca",
1263 L"kwietnia",
1264 L"maja",
1265 L"czerwca",
1266 L"lipca",
1267 L"sierpnia",
1268 L"wrze\x015bnia",
1269 L"pa\x017a" "dziernika",
1270 L"listopada",
1271 L"grudnia",
1272 NULL
1273 };
1274
1275 static const WCHAR *russian_genitive_names[] =
1276 {
1277 L"\x044f\x043d\x0432\x0430\x0440\x044f",
1278 L"\x0444\x0435\x0432\x0440\x0430\x043b\x044f",
1279 L"\x043c\x0430\x0440\x0442\x0430",
1280 L"\x0430\x043f\x0440\x0435\x043b\x044f",
1281 L"\x043c\x0430\x044f",
1282 L"\x0438\x044e\x043d\x044f",
1283 L"\x0438\x044e\x043b\x044f",
1284 L"\x0430\x0432\x0433\x0443\x0441\x0442\x0430",
1285 L"\x0441\x0435\x043d\x0442\x044f\x0431\x0440\x044f",
1286 L"\x043e\x043a\x0442\x044f\x0431\x0440\x044f",
1287 L"\x043d\x043e\x044f\x0431\x0440\x044f",
1288 L"\x0434\x0435\x043a\x0430\x0431\x0440\x044f",
1289 NULL
1290 };
1291
1292 TRACE("%#lx, %p.\n", lcid, str);
1293
1295 *str = (LPOLESTR *)arabic_hijri;
1297 *str = (LPOLESTR *)polish_genitive_names;
1299 *str = (LPOLESTR *)russian_genitive_names;
1300 else
1301 *str = NULL;
1302
1303 return S_OK;
1304}
LCID lcid
Definition: locale.c:5660
#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

Referenced by test_GetAltMonthNames().

◆ impl_from_IRpcStubBuffer()

static struct dispinterface_stub * impl_from_IRpcStubBuffer ( IRpcStubBuffer iface)
static

Definition at line 1016 of file oleaut.c.

1017{
1018 return CONTAINING_RECORD(&iface->lpVtbl, struct dispinterface_stub, stub_buffer.lpVtbl);
1019}

Referenced by dispinterface_stub_Release().

◆ OaBuildVersion()

ULONG WINAPI OaBuildVersion ( void  )

Definition at line 643 of file oleaut.c.

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

◆ OLEAUTPS_DllGetClassObject()

HRESULT WINAPI OLEAUTPS_DllGetClassObject ( REFCLSID  ,
REFIID  ,
LPVOID  
)

◆ OLEAUTPS_DllMain()

BOOL WINAPI OLEAUTPS_DllMain ( HINSTANCE  ,
DWORD  ,
LPVOID   
)

Referenced by DllMain().

◆ OLEAUTPS_DllRegisterServer()

HRESULT WINAPI OLEAUTPS_DllRegisterServer ( void  )

Referenced by DllRegisterServer().

◆ OLEAUTPS_DllUnregisterServer()

HRESULT WINAPI OLEAUTPS_DllUnregisterServer ( void  )

Referenced by DllUnregisterServer().

◆ OleIconToCursor()

HCURSOR WINAPI OleIconToCursor ( HINSTANCE  hinstExe,
HICON  hIcon 
)

Definition at line 1229 of file oleaut.c.

1230{
1231 FIXME("(%p,%p), partially implemented.\n",hinstExe,hIcon);
1232 /* FIXME: make an extended conversation from HICON to HCURSOR */
1233 return CopyCursor(hIcon);
1234}
HICON hIcon
Definition: msconfig.c:44
#define CopyCursor(c)
Definition: winuser.h:4389

◆ OleTranslateColor()

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

Definition at line 690 of file oleaut.c.

694{
695 COLORREF colorref;
696 BYTE b = HIBYTE(HIWORD(clr));
697
698 TRACE("%#lx, %p, %p.\n", clr, hpal, pColorRef);
699
700 /*
701 * In case pColorRef is NULL, provide our own to simplify the code.
702 */
703 if (pColorRef == NULL)
704 pColorRef = &colorref;
705
706 switch (b)
707 {
708 case 0x00:
709 {
710 if (hpal != 0)
711 *pColorRef = PALETTERGB(GetRValue(clr),
712 GetGValue(clr),
713 GetBValue(clr));
714 else
715 *pColorRef = clr;
716
717 break;
718 }
719
720 case 0x01:
721 {
722 if (hpal != 0)
723 {
724 PALETTEENTRY pe;
725 /*
726 * Validate the palette index.
727 */
728 if (GetPaletteEntries(hpal, LOWORD(clr), 1, &pe) == 0)
729 return E_INVALIDARG;
730 }
731
732 *pColorRef = clr;
733
734 break;
735 }
736
737 case 0x02:
738 *pColorRef = clr;
739 break;
740
741 case 0x80:
742 {
743 int index = LOBYTE(LOWORD(clr));
744
745 /*
746 * Validate GetSysColor index.
747 */
748 if ((index < COLOR_SCROLLBAR) || (index > COLOR_MENUBAR))
749 return E_INVALIDARG;
750
751 *pColorRef = GetSysColor(index);
752
753 break;
754 }
755
756 default:
757 return E_INVALIDARG;
758 }
759
760 return S_OK;
761}
#define E_INVALIDARG
Definition: ddrawi.h:101
#define GetBValue(quad)
Definition: precomp.h:71
#define GetGValue(quad)
Definition: precomp.h:70
#define GetRValue(quad)
Definition: precomp.h:69
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:100
#define PALETTERGB(r, g, b)
Definition: wingdi.h:3388
DWORD WINAPI GetSysColor(_In_ int)
#define COLOR_SCROLLBAR
Definition: winuser.h:923

◆ reg_get_typelib_module()

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

Definition at line 830 of file oleaut.c.

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

527 {
528 WCHAR guidbuf[80];
529 HRESULT ret;
530 LPRUNNINGOBJECTTABLE runobtable;
532 DWORD rot_flags = ROTFLAGS_REGISTRATIONKEEPSALIVE; /* default registration is strong */
533
534 StringFromGUID2(rcid,guidbuf,39);
535 ret = CreateItemMoniker(L"!", guidbuf, &moniker);
536 if (FAILED(ret))
537 return ret;
538 ret = GetRunningObjectTable(0,&runobtable);
539 if (FAILED(ret)) {
540 IMoniker_Release(moniker);
541 return ret;
542 }
544 rot_flags = 0;
545 ret = IRunningObjectTable_Register(runobtable,rot_flags,punk,moniker,pdwRegister);
546 IRunningObjectTable_Release(runobtable);
547 IMoniker_Release(moniker);
548 return ret;
549}
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
Definition: netsh.h:141
#define ACTIVEOBJECT_WEAK
Definition: oleauto.h:182
_In_opt_ IUnknown * punk
Definition: shlwapi.h:158

◆ RevokeActiveObject()

HRESULT WINAPI DECLSPEC_HOTPATCH RevokeActiveObject ( DWORD  xregister,
LPVOID  reserved 
)

Definition at line 564 of file oleaut.c.

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

◆ SetOaNoCache()

void WINAPI SetOaNoCache ( void  )

Definition at line 504 of file oleaut.c.

505{
506 TRACE("\n");
508}

◆ SysAllocString()

BSTR WINAPI SysAllocString ( LPCOLESTR  str)

Definition at line 240 of file oleaut.c.

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

Referenced by _bstr_(), _get_disp_id(), _parse_htmlscript(), _parse_script(), _SHStrDupAToBSTR(), Accessible_get_accName(), add_bstr_property(), CTrayBandSite::AddBand(), ADsBuildVarArrayStr(), ADsOpenObject(), alloc_bstr_arg(), alloc_ns_context(), Arguments2_Item(), async_doc_navigate(), AtlAxCreateControlLicEx(), AtlLoadTypeLib(), ATL::AtlLoadTypeLib(), AutomationObject_Invoke(), base_hwnd_provider_GetPropertyValue(), BSCHttpNegotiate_OnResponse(), build_namespace(), build_qname(), build_relpath(), build_servername(), ATL::CComBSTR::CComBSTR(), ATL::CComVariant::CComVariant(), class_object_Next(), ClientSideProvider_GetPropertyValue(), combine_uri(), compiler_alloc_bstr(), CicBridge::ConfigureRegisterWord(), create_callback(), create_command(), create_filecoll(), create_folder(), create_foldercoll(), create_list(), create_textfont(), CreateFolderFromNameSpace(), CreateUri(), Database_OpenView(), declare_prefix(), delete_command(), determine_patch_sequence(), DEVENUM_IPropertyBag_Read(), disp_call_name(), disp_get_id(), disp_propput_name(), Dispatch_Invoke(), DispatchEx_GetMemberName(), dispex_value(), dns_resolve(), DocObjectService_FireBeforeNavigate2(), domattr_get_namespaceURI(), domcdata_substringData(), domcomment_substringData(), domdoc_get_parseError(), domdoc_getProperty(), domelem_get_dataType(), domtext_substringData(), drive_get_FileSystem(), drive_get_VolumeName(), edit_get_value(), elem_string_attr_getter(), enum_key(), enum_values(), errorinfo_GetDescription(), errorinfo_GetHelpFile(), errorinfo_GetSource(), exec_composesettings(), exec_fontname(), exec_query(), file_get_Name(), file_get_Path(), filesys_BuildPath(), filesys_GetAbsolutePathName(), filesys_GetExtensionName(), filesys_GetFileVersion(), fill_processor_information(), CFolderItems::Filter(), SEALED_::FireChannelReceivedData(), FM2_WriteFriendlyName(), fnIMultiLanguage3_GetRfc1766FromLcid(), folder_get_Name(), folder_get_Path(), FontEventsDisp_Invoke(), format_error_message_from_id(), 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_provider_description_string(), 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(), CZipFolder::GetDetailsEx(), CLBarItemButtonBase::GetText(), CLBarInatItem::GetText(), CLBarItemBase::GetTooltipString(), GetWmiVersionInfo(), Global_InvokeEx(), Global_LTrim(), handle_navigation_error(), handle_xml_load(), Host_get_FullName(), Host_get_Name(), Host_get_ScriptFullName(), Host_get_ScriptName(), Host_get_Version(), HTMLBodyElement_get_scroll(), HTMLCurrentStyle2_get_filter(), htmldoc2_get_URL(), 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(), httprequest_get_statusText(), httprequest_getAllResponseHeaders(), httprequest_getResponseHeader(), httprequest_setRequestHeader(), hwnd_host_provider_GetPropertyValue(), ICreateTypeInfo2_fnAddRefTypeInfo(), ie_navigate(), 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(), internal_getProperty(), interp_call_eval(), interp_string(), IPropertyBag_Read_Stub(), IRecordInfoImpl_GetFieldNames(), IRecordInfoImpl_GetName(), IRecordInfoImpl_RecordCopy(), ITypeInfo2_fnGetDocumentation2(), ITypeInfo_fnGetDllEntry(), ITypeInfo_fnGetDocumentation(), ITypeInfo_fnGetRefTypeInfo(), ITypeLib2_fnGetDocumentation(), ITypeLib2_fnGetDocumentation2(), libxmlFatalError(), load_manifest(), MakeVariantString(), Marshal_UnmarshalInterface(), Match2_get_Value(), MediaDet_get_Filename(), msaa_provider_GetPropertyValue(), MSI_ApplicablePatchXML(), MXAttributes_addAttribute(), MXAttributes_setLocalName(), MXAttributes_setQName(), MXAttributes_setURI(), MXAttributes_setValue(), MXWriter_create(), mxwriter_get_encoding(), mxwriter_put_version(), navigate_url(), node_get_base_name(), node_get_nodeName(), 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(), parse_path(), parse_procedure(), parse_script(), parse_script_e(), parse_script_wf(), parse_script_wr(), parseError_get_reason(), parseError_get_srcText(), path_GetElement(), path_Retrieve(), path_Set(), Pathname_create(), PB_Read(), PersistStream_Load(), PropertyBag_Read(), PropSysAllocString(), PropVariantCopy(), PropVariantToBSTR(), ProviderSimple_GetPropertyValue(), query_prop(), query_typelib_path(), QueryOperatingSystemInfo(), QueryProcessorInfo(), 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_encoded_tests(), run_script(), run_scripts(), SAXAttributes_populate(), SAXLocator_create(), saxreader_get_unescaped_value(), ScriptTypeInfo_GetDocumentation(), ScriptTypeInfo_GetNames(), 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(), SHELL_SysAllocString(), SHPropertyBag_OnIniFile(), SHPropertyBag_OnRegKey(), START_TEST(), status_code_GetErrorCodeText(), status_code_GetFacilityCodeText(), CTipbarAccItem::STDMETHOD_(), StrRetToBSTR(), summaryinfo_invoke(), SysReAllocString(), test_Add(), test_attr_collection(), test_automagic(), test_bstr_cache(), test_callbacks(), test_case_sens(), test_change_types(), 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_default_edit_accessible_object(), test_deferred_fill_in(), test_destructors(), test_directshow_filter(), test_disp(), test_dispatch(), test_DispCallFunc(), test_dmo(), test_domdoc(), test_domnode(), test_domobj_dispex(), test_DriveExists(), test_dynamic_properties(), test_eval(), test_exec_fontname(), test_FileCollection(), test_FolderCollection(), test_font_events_disp(), test_gc(), test_get_attributes(), 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_global_vars_ref(), test_hash_value(), test_IClientSecurity(), test_indent(), test_Installer_RegistryValue(), test_interfaces(), test_invokeex(), test_isexpression(), 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_members(), test_merging_text(), test_mxwriter_properties(), test_mxwriter_startendelement(), test_named_items(), test_namespace(), test_NetFwAuthorizedApplication(), test_notification_query_async(), test_obj_dispex(), test_OleLoadPicturePath(), test_parse_context(), test_ParseDisplayName(), test_ParseName(), test_Pathname(), test_persiststreaminit(), test_popup(), test_propputref(), test_PropVariantCompareEx(), test_PropVariantToString(), test_PropVariantToStringWithDefault(), test_PropVariantToVariant(), test_query_async(), test_query_semisync(), test_Read(), test_ReadAll(), test_realization(), test_recinfo(), test_RegExp_Replace(), test_registry(), test_removeNamedItem(), test_retval(), test_SafeArrayGetPutElement_BSTR(), test_save(), test_saxreader(), test_schema_refs(), test_script_dispatch(), test_script_run(), test_select(), test_service(), test_SetText(), test_ShellExecute(), test_start(), test_StdRegProv(), test_SummaryInfo(), test_SysAllocString(), test_SystemSecurity(), test_textstream(), test_typelibmarshal(), test_VarAbs(), test_VarAdd(), test_VarAnd(), test_VarBstrCat(), test_VarBstrCmp(), test_VarCat(), test_VarCmp(), test_VarDiv(), test_VarFormat(), test_VarFormatCurrency(), test_VarFormatFromTokens(), test_VarFormatNumber(), test_varianttoproperty(), test_VariantToPropVariant(), test_VariantToString(), test_VariantToStringWithDefault(), 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_XMLHTTP(), test_xmlTypes(), TextFont_GetName(), textfont_reset_to_default(), TLB_append_str(), to_safearray(), to_string(), typeinfo_getnames(), uia_com_event_callback(), uia_element_get_CachedName(), uia_element_get_CurrentName(), UiaGetUpdatedCache(), 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(), VariantToPropVariant(), VBScriptError_GetExceptionInfo(), WebBrowser_get_Name(), Widget_bstr(), Widget_DoSomething(), Widget_get_Name(), Widget_Map(), Widget_variant_array(), win_get_kbd_shortcut(), WshCollection_Item(), WshShell3_RegRead(), WshShortcut_Create(), WshShortcut_get_Arguments(), WshShortcut_get_IconLocation(), WshShortcut_get_WorkingDirectory(), xmldoc_encoding(), xslprocessor_addParameter(), xslprocessor_get_output(), and xslprocessor_set_parvalue().

◆ SysAllocStringByteLen()

BSTR WINAPI DECLSPEC_HOTPATCH SysAllocStringByteLen ( LPCSTR  str,
UINT  len 
)

Definition at line 430 of file oleaut.c.

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

Referenced by CRegPropertyBag::_ReadString(), BstrFromVector(), SEALED_::FireChannelReceivedData(), SEALED_::FireReceivedTSPublicKey(), fnTextSrv_TxGetText(), httprequest_get_responseText(), MSFT_ReadAllNames(), MSFT_ReadAllStrings(), SAFEARRAY_CopyData(), SafeArrayGetElement(), SafeArrayPutElement(), CCompartment::SetValue(), 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 341 of file oleaut.c.

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

Referenced by a2bstr(), add_response_header(), alloc_str_from_narrow(), CHString::AllocSysString(), ATL::ChTraitsCRT< char >::AllocSysString(), BSCHttpNegotiate_OnResponse(), bstr_from_str(), bstr_from_xmlChar(), bstr_from_xmlCharN(), build_path(), build_proplist(), build_qname(), build_query_string(), build_relpath(), build_resource_string(), Builtin_Invoke(), ATL::CComBSTR::CComBSTR(), 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(), DEVENUM_IPropertyBag_Read(), disp_delete_name(), Dispatch_Invoke(), domattr_get_namespaceURI(), domcdata_appendData(), domcdata_insertData(), domcdata_substringData(), domcomment_appendData(), domcomment_insertData(), domcomment_substringData(), domdoc_get_xml(), domtext_appendData(), domtext_insertData(), domtext_put_data(), domtext_substringData(), drive_get_DriveLetter(), encode_base64(), encode_binhex(), EnsureCorrectEOL(), 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_Split(), Global_String(), 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(), httprequest_get_responseText(), hyperlink_dlgproc(), ie_dialog_open_proc(), include_pac_utils(), CCicLibMenuItem::Init(), InitVariantFromGUIDAsString(), CFolderItemVerbs::Item(), ITextRange_fnGetText(), ITextSelection_fnGetText(), jsstr_to_bstr(), load_res(), ATL::CComBSTR::LoadString(), anonymous_namespace{activex.cpp}::LpszToBstr(), mlang_getcsetinfo(), mqr_GetMetadataByName(), MSFT_ReadValue(), mxwriter_get_output(), node_get_nodeName(), node_get_text(), node_get_xml(), node_transform_node_params(), node_transform_write_to_bstr(), 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(), path_GetElement(), path_Retrieve(), pre_process_uri(), prompt_dlgproc(), PropertyStorage_PropVariantCopy(), propertystorage_read_scalar(), query_prop(), read_file_to_bstr(), RegExp2_Replace(), return_bstrn(), return_nscstr(), run_from_res(), SAXAttributes_populate(), SAXLocator_create(), saxreader_get_cdata_chunk(), set_element_name(), set_firewall(), SEALED_::SetProperty(), SLTG_DoVars(), SLTG_ReadString(), string_replace(), StrTo(), SubMatches_get_Item(), SWbemProperty_create(), SysAllocString(), SysReAllocStringLen(), test_bstr_cache(), test_copy(), test_domdoc(), test_marshal_bstr(), test_mxwriter_characters(), test_ParseName(), test_PropVariantToBSTR(), 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(), uia_provider_get_special_prop_val(), Uri_GetPropertyBSTR(), VARIANT_Coerce(), variant_from_registry_value(), VarMonthName(), VarWeekdayName(), win_get_name(), 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 273 of file oleaut.c.

274{
276 bstr_t *bstr;
278 SIZE_T alloc_size;
279
280 if(!str)
281 return;
282
283 bstr = bstr_from_str(str);
284
285 alloc_size = IMalloc_GetSize(malloc, bstr);
286 if (alloc_size == ~0UL)
287 return;
288
290 if(cache_entry) {
291 unsigned i;
292
294
295 /* According to tests, freeing a string that's already in cache doesn't corrupt anything.
296 * For that to work we need to search the cache. */
297 for(i=0; i < cache_entry->cnt; i++) {
298 if(cache_entry->buf[(cache_entry->head+i) % BUCKET_BUFFER_SIZE] == bstr) {
299 WARN_(heap)("String already is in cache!\n");
301 return;
302 }
303 }
304
305 if(cache_entry->cnt < ARRAY_SIZE(cache_entry->buf)) {
306 cache_entry->buf[(cache_entry->head+cache_entry->cnt) % BUCKET_BUFFER_SIZE] = bstr;
307 cache_entry->cnt++;
308
309 if(WARN_ON(heap)) {
310 unsigned n = (alloc_size-FIELD_OFFSET(bstr_t, u.ptr))/sizeof(DWORD);
311 for(i=0; i<n; i++)
312 bstr->u.dwptr[i] = ARENA_FREE_FILLER;
313 }
314
316 return;
317 }
318
320 }
321
322 CoTaskMemFree(bstr);
323}
void WINAPI CoTaskMemFree(void *ptr)
Definition: malloc.c:389
GLdouble n
Definition: glext.h:7729
static bstr_t * bstr_from_str(BSTR str)
Definition: oleaut.c:118
#define ARENA_FREE_FILLER
Definition: oleaut.c:109
static bstr_cache_entry_t * get_cache_entry_from_alloc_size(SIZE_T alloc_size)
Definition: oleaut.c:134
static IMalloc * get_malloc(void)
Definition: oleaut.c:248
#define WARN_(ch,...)
Definition: debug.h:157
DWORD dwptr[1]
Definition: oleaut.c:94
#define UL
Definition: tui.h:164
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(), _parse_script(), _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_load_from_path(), _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(), ActiveScriptSite_OnScriptError(), CTrayBandSite::AddBand(), ADsBuildVarArrayStr(), ADsOpenObject(), AtlAxCreateControlLicEx(), AtlRegisterTypeLib(), ATL::CComBSTR::Attach(), AutomationObject_Invoke(), AVICompressorPropertyBag_Load(), before_async_open(), Binding_Release(), BindProtocol_Release(), BindProtocol_StartEx(), BindStatusCallback_Release(), BSCHttpNegotiate_BeginningTransaction(), BSCHttpNegotiate_OnResponse(), BSTR_UserFree(), BSTR_UserUnmarshal(), bstrcat_realloc(), build_canonical_path(), build_path(), build_proplist(), build_relpath(), ATL::CComBSTR::CComBSTR(), check_acc_vals_(), check_codebase(), 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(), create_uia_element_from_cache_req(), declare_prefix(), delete_command(), destroy_uri_obj(), determine_patch_sequence(), disp_call_name(), disp_delete_name(), disp_get_id(), disp_propput_name(), dispevent_Invoke(), doc_navigate_task_destr(), DocObjectService_FireBeforeNavigate2(), DocObjectService_FireDocumentComplete(), DocObjectService_FireNavigateComplete2(), dom_pi_get_attributes(), dom_pi_put_data(), dom_pi_put_nodeValue(), dom_pi_put_xml_decl(), domattr_get_namespaceURI(), domcdata_appendData(), domcdata_deleteData(), domcdata_get_length(), domcdata_insertData(), domcdata_splitText(), domcdata_substringData(), domcomment_appendData(), domcomment_deleteData(), domcomment_get_length(), domcomment_insertData(), domcomment_substringData(), domdoc_save(), domdoc_transformNodeToObject(), domelem_get_named_item(), domelem_put_nodeTypedValue(), domelem_remove_named_item(), domelem_setAttributeNode(), domtext_appendData(), domtext_deleteData(), domtext_get_length(), domtext_insertData(), domtext_put_data(), domtext_substringData(), DoSync(), double_to_string(), drive_Release(), EnsureCorrectEOL(), 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(), CFolderItems::Filter(), find_element_by_id(), find_element_uri(), SEALED_::FireChannelReceivedData(), flush_sequence(), FM2_WriteFriendlyName(), folder_Release(), foldercoll_enumvariant_Next(), foldercoll_Release(), format_error_message_from_id(), free_assembly(), free_attribute_values(), free_bstr_array(), free_bstr_pool(), free_bstrs(), free_ei(), free_element_entry(), free_ns_context(), free_request_headers(), free_response_headers(), 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_base_uri(), 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_node_provider_description_string(), get_object_text(), get_properties(), get_protocol_handler(), get_registered_task(), get_stringvalue(), get_uri_string(), get_zone_from_domains(), ATL::CWindow::GetWindowText(), GetWmiVersionInfo(), Global_Asc(), Global_DateAdd(), Global_InStr(), Global_InStrRev(), Global_InvokeEx(), Global_LCase(), Global_Left(), Global_Len(), Global_LTrim(), Global_Mid(), Global_MsgBox(), Global_Replace(), Global_Right(), Global_RTrim(), Global_Split(), Global_StrComp(), Global_Trim(), Global_TypeName(), Global_UCase(), GopherProtocol_open_request(), handle_dispatch_exception(), handle_extern_mime_navigation(), handle_navigation_error(), handle_xml_load(), SEALED_::HandleEvent(), Host_Echo(), HostObject_to_string(), 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(), httprequest_get_responseXML(), httprequest_open(), httprequest_release(), IDispatch_Invoke_Proxy(), ie_dialog_open_proc(), ie_navigate(), iewnd_OnNotify(), iframe_onreadystatechange(), init(), init_members(), init_warning_dialog(), install_file(), internal_parse(), interp_call_eval(), interp_forin(), IRecordInfoImpl_RecordClear(), IRecordInfoImpl_Release(), is_elem_id(), isaxlocator_getPublicId(), isaxlocator_getSystemId(), isaxlocator_Release(), ITypeComp_fnBind(), ITypeInfo_fnAddressOfMember(), ITypeInfo_fnGetRefTypeInfo(), ITypeInfo_fnReleaseFuncDesc(), ITypeLib2_fnGetDocumentation(), ITypeLib2_fnRelease(), libxml_cdatablock(), libxmlFatalError(), libxmlStartDocument(), 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(), msaa_acc_compare(), 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_get_nodeName(), 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_path(), parse_procedure(), parse_schema(), parse_script(), parse_script_e(), parse_script_wf(), parse_script_wr(), parse_site(), parse_url_from_path(), parseError_Release(), path_Release(), path_Set(), PersistHistory_SaveHistory(), PersistPropertyBag_Load(), PersistStream_Load(), PersistStreamInit_Save(), pooled_bstr_from_xmlChar(), pooled_bstr_from_xmlCharN(), property_Release(), PropertyBag_Read(), PropertyNotifySink_OnChanged(), PropSysFreeString(), PropVariantClear(), put_inner_html(), query_prop(), QueryOperatingSystemInfo(), QueryProcessorInfo(), RegExp2_Replace(), RegisterDefaultAcceptHeaders(), RegisterTypeLib(), RegistryPropertyBag_IPropertyBag_Read(), release_bytecode(), release_typelib(), release_vbscode(), SEALED_::ReplaceProperty(), report_data(), return_bstr(), run_benchmark(), run_bom_tests(), run_encoded_tests(), run_from_file(), run_from_res(), run_script(), run_scripts(), runtimestyle_test(), SAFEARRAY_CopyData(), SAFEARRAY_DestroyData(), SafeArrayPutElement(), SAXAttributes_populate(), SAXLocator_create(), saxreader_get_cdata_chunk(), saxxmlreader_Release(), schema_cache_add(), ScriptTypeInfo_GetDocumentation(), ScriptTypeInfo_GetNames(), 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(), subtest_InsertObject(), 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_case_sens(), 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_createProcessingInstruction(), test_CreateTextFile(), test_CreateTypeLib(), test_CreateUriWithFragment(), test_current_style(), test_default_arg_conv(), test_default_client_accessible_object(), test_default_edit_accessible_object(), test_default_selection(), test_defaults(), test_deferred_fill_in(), test_destructors(), test_disp(), test_DispCallFunc(), test_doc_elem(), 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_Element_cache_methods(), test_Element_GetPropertyValue(), test_elems(), test_error_reports(), test_eval(), test_exec_script(), test_FileCollection(), test_find_sa_results_(), 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_IClientSecurity(), test_iframe_connections(), test_iframe_elem(), test_imgload(), test_indent(), 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_members(), test_merging_text(), test_mxwriter_characters(), test_mxwriter_default_properties(), test_mxwriter_domdoc(), test_mxwriter_encoding(), test_mxwriter_properties(), test_mxwriter_startendelement(), test_named_items(), 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_node_from_focus_(), test_node_hwnd_provider_navigation_(), test_nodeTypedValue(), 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_Pathname(), test_persiststreaminit(), test_popup(), test_port(), test_preserve_charref(), test_propputref(), test_PropVariantCompareEx(), test_PropVariantToBSTR(), 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_RegExp_Replace(), 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_script_typeinfo(), 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_typeinfo(), test_TypeInfo(), test_typelib(), test_typelibmarshal(), test_UiaGetUpdatedCache(), test_UiaNavigate(), test_VarAbs(), test_VarAdd(), test_VarAnd(), test_VarBstrCat(), test_VarBstrCmp(), test_VarBstrFromI4(), test_VarBstrFromR4(), test_VarBstrFromR8(), test_VarCmp(), test_VarDiv(), test_VarFormat(), test_VarFormatCurrency(), test_VarFormatFromTokens(), test_VarFormatNumber(), test_varianttoproperty(), test_VariantToStringWithDefault(), 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(), uia_event_invoke(), uia_get_focused_element(), uia_tree_walker_navigate(), UiaFind(), 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(), verify_uri(), WebBrowserPriv2IE8_NavigateWithBindCtx2(), WebBrowserPriv2IE9_NavigateWithBindCtx2(), wineXmlOpenCallback(), winhttp_request_get_StatusText(), winhttp_request_GetAllResponseHeaders(), winhttp_request_GetResponseHeader(), WinMGMTS_ParseDisplayName(), WshShell3_ExpandEnvironmentStrings(), WshShell3_get_CurrentDirectory(), WshShortcut_put_IconLocation(), WshShortcut_Release(), wWinMain(), xmldoc_encoding(), xmlelem_getAttribute(), xslprocessor_addParameter(), xslprocessor_par_free(), xslprocessor_Release(), xslprocessor_transform(), xslt_doc_default_loader(), xslt_doc_get_uri(), CCicLibMenuItem::~CCicLibMenuItem(), ATL::CComBSTR::~CComBSTR(), CFolderItems::~CFolderItems(), CFunctionProviderBase::~CFunctionProviderBase(), and SEALED_::~RdpClient().

◆ SysReAllocString()

INT WINAPI SysReAllocString ( LPBSTR  old,
LPCOLESTR  str 
)

Definition at line 469 of file oleaut.c.

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

Referenced by httprequest_open(), httprequest_setRequestHeader(), mxwriter_put_encoding(), and test_SysReAllocString().

◆ SysReAllocStringLen()

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

Definition at line 385 of file oleaut.c.

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

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

◆ SysStringByteLen()

◆ SysStringLen()

UINT WINAPI SysStringLen ( BSTR  str)

Definition at line 198 of file oleaut.c.

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

Referenced by AVICompressorPropertyBag_Load(), base_hwnd_provider_GetPropertyValue(), BindStatusCallback_create(), BSCHttpNegotiate_BeginningTransaction(), bstrcat_realloc(), anonymous_namespace{activex.cpp}::BstrToLpsz(), build_canonical_path(), build_path(), build_qname(), build_relpath(), check_bstr_length(), _com_util::ConvertBSTRToString(), ATL::CComBSTR::Copy(), domcdata_appendData(), domcdata_get_length(), domcdata_insertData(), domcdata_substringData(), domcomment_appendData(), domcomment_get_length(), domcomment_insertData(), domcomment_substringData(), domtext_appendData(), domtext_get_length(), domtext_insertData(), domtext_put_data(), domtext_substringData(), dump_instr_arg(), EnsureCorrectEOL(), 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_Split(), Global_String(), Global_StrReverse(), Global_Trim(), handle_dispatch_exception(), handle_xml_load(), Host_Echo(), HTMLDocument3_getElementsByName(), HTMLLocation_get_protocol(), HTMLWindow2_alert(), httprequest_setRequestHeader(), SEALED_::IMsTscAx::CreateVirtualChannels(), InternetBindInfo_GetBindString(), interp_forin(), isaxattributes_getIndexFromName(), isaxattributes_getIndexFromQName(), isaxattributes_getLocalName(), isaxattributes_getName(), isaxattributes_getQName(), isaxattributes_getURI(), isaxattributes_getValue(), isaxlocator_getPublicId(), isaxlocator_getSystemId(), ivbsaxattributes_getIndexFromName(), ivbsaxattributes_getIndexFromQName(), ivbsaxattributes_getTypeFromName(), ivbsaxattributes_getTypeFromQName(), ivbsaxattributes_getValueFromName(), ivbsaxattributes_getValueFromQName(), libxmlComment(), libxmlEndElementNS(), libxmlStartElementNS(), MkProtocol_StartEx(), namespacemanager_getDeclaredPrefix(), namespacemanager_getPrefix(), namespacemanager_getURI(), navigate_fragment(), node_get_nodeName(), nsstyle_to_bstr(), nsURI_GetPrePath(), persist_stream_save(), PersistHistory_SaveHistory(), PersistStream_GetSizeMax(), PersistStreamInit_Save(), PropertyStorage_PropVariantCopy(), PropertyStorage_WritePropertyToStream(), PropVariantToGUID(), RegExp2_Execute(), RegExp2_put_Pattern(), RegExp2_Replace(), RegExp2_Test(), SAXAttributes_getIndexFromName(), SAXAttributes_getIndexFromQName(), SAXAttributes_getLocalName(), SAXAttributes_getName(), SAXAttributes_getQName(), SAXAttributes_getType(), SAXAttributes_getURI(), SAXAttributes_getValue(), saxreader_get_cdata_chunk(), saxreader_saxcharacters(), SEALED_::SetProperty(), string_replace(), stringify_object(), SWbemProperty_create(), test_bstr_cache(), test_copy(), 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_namespaces_as_attributes(), test_PropVariantToBSTR(), 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(), Uri_GetPropertyLength(), URLMoniker_GetDisplayName(), URLMoniker_GetSizeMax(), URLMoniker_Save(), VarBstrCat(), VarBstrCmp(), variant_from_dt(), 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(), Widget_no_in_out(), WMSFT_encode_variant(), xmldoc_get_doctype(), xmlelem_get_tagName(), and xslt_doc_default_loader().

◆ WINE_DECLARE_DEBUG_CHANNEL()

WINE_DECLARE_DEBUG_CHANNEL ( heap  )

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( ole  )

Variable Documentation

◆ bstr_cache

bstr_cache_entry_t bstr_cache[0x10000/BUCKET_SIZE]
static

Definition at line 111 of file oleaut.c.

Referenced by get_cache_entry_from_idx().

◆ bstr_cache_enabled

BOOL bstr_cache_enabled
static

Definition at line 75 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 77 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:78
#define DWORD_PTR
Definition: treelist.c:76

Definition at line 78 of file oleaut.c.

◆ dispatch_typelib_ps

IPSFactoryBuffer dispatch_typelib_ps = { &dispatch_typelib_ps_vtbl }
static

Definition at line 1160 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:941
static HRESULT WINAPI dispatch_typelib_ps_CreateProxy(IPSFactoryBuffer *iface, IUnknown *outer, REFIID iid, IRpcProxyBuffer **proxy, void **out)
Definition: oleaut.c:964
static ULONG WINAPI dispatch_typelib_ps_Release(IPSFactoryBuffer *iface)
Definition: oleaut.c:946
static HRESULT WINAPI dispatch_typelib_ps_QueryInterface(IPSFactoryBuffer *iface, REFIID iid, void **out)
Definition: oleaut.c:928
static HRESULT WINAPI dispatch_typelib_ps_CreateStub(IPSFactoryBuffer *iface, REFIID iid, IUnknown *server, IRpcStubBuffer **stub)
Definition: oleaut.c:1118

Definition at line 1151 of file oleaut.c.

◆ oleaut32_oaidl_ProxyFileInfo

const ExtendedProxyFileInfo oleaut32_oaidl_ProxyFileInfo
extern