mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Need to remove existing files before doing vendor import
svn path=/trunk/; revision=12578
This commit is contained in:
parent
c270c6db34
commit
eaf65abccd
49 changed files with 0 additions and 51910 deletions
|
@ -1,44 +0,0 @@
|
|||
EXTRADEFS = -D_OLEAUT32_ -DCOM_NO_WINDOWS_H
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ../..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = oleaut32.dll
|
||||
IMPORTS = ole32 rpcrt4 user32 gdi32 advapi32 kernel32 ntdll
|
||||
DELAYIMPORTS = comctl32
|
||||
EXTRALIBS = $(LIBUNICODE) -luuid
|
||||
|
||||
C_SRCS = \
|
||||
connpt.c \
|
||||
dispatch.c \
|
||||
hash.c \
|
||||
oaidl_p.c \
|
||||
oleaut.c \
|
||||
olefont.c \
|
||||
olepicture.c \
|
||||
regsvr.c \
|
||||
safearray.c \
|
||||
stubs.c \
|
||||
tmarshal.c \
|
||||
typelib.c \
|
||||
typelib2.c \
|
||||
usrmarshal.c \
|
||||
varformat.c \
|
||||
variant.c \
|
||||
vartype.c
|
||||
|
||||
C_SRCS16 = \
|
||||
ole2disp.c \
|
||||
typelib16.c
|
||||
|
||||
SPEC_SRCS16 = \
|
||||
ole2disp.spec \
|
||||
typelib.spec
|
||||
|
||||
RC_SRCS = oleaut32.rc
|
||||
|
||||
SUBDIRS = tests
|
||||
|
||||
@MAKE_DLL_RULES@
|
||||
|
||||
### Dependencies:
|
|
@ -1,21 +0,0 @@
|
|||
# $Id: Makefile.ros-template,v 1.7 2004/12/12 18:01:23 navaraf Exp $
|
||||
|
||||
TARGET_NAME = oleaut32
|
||||
|
||||
TARGET_OBJECTS = @C_SRCS@
|
||||
|
||||
TARGET_CFLAGS = @EXTRADEFS@ -D__REACTOS__
|
||||
|
||||
TARGET_SDKLIBS = @IMPORTS@ winmm.a wine.a wine_uuid.a wine_unicode.a ntdll.a
|
||||
|
||||
TARGET_BASE = $(TARGET_BASE_LIB_OLEAUT32)
|
||||
|
||||
TARGET_RC_SRCS = @RC_SRCS@
|
||||
TARGET_RC_BINSRC = @RC_BINSRC@
|
||||
TARGET_RC_BINARIES = @RC_BINARIES@
|
||||
|
||||
default: all
|
||||
|
||||
DEP_OBJECTS = $(TARGET_OBJECTS)
|
||||
|
||||
include $(TOOLS_PATH)/depend.mk
|
|
@ -1,632 +0,0 @@
|
|||
/*
|
||||
* Implementation of a generic ConnectionPoint object.
|
||||
*
|
||||
* Copyright 2000 Huw D M Davies for CodeWeavers
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* NOTES:
|
||||
* See one exported function here is CreateConnectionPoint, see
|
||||
* comments just above that function for information.
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
#include "winerror.h"
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "ole2.h"
|
||||
#include "olectl.h"
|
||||
#include "connpt.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
||||
|
||||
#define MAXSINKS 10
|
||||
|
||||
/************************************************************************
|
||||
* Implementation of IConnectionPoint
|
||||
*/
|
||||
typedef struct ConnectionPointImpl {
|
||||
|
||||
IConnectionPointVtbl *lpvtbl;
|
||||
|
||||
/* IUnknown of our main object*/
|
||||
IUnknown *Obj;
|
||||
|
||||
/* Reference count */
|
||||
DWORD ref;
|
||||
|
||||
/* IID of sink interface */
|
||||
IID iid;
|
||||
|
||||
/* Array of sink IUnknowns */
|
||||
IUnknown **sinks;
|
||||
DWORD maxSinks;
|
||||
|
||||
DWORD nSinks;
|
||||
} ConnectionPointImpl;
|
||||
|
||||
static IConnectionPointVtbl ConnectionPointImpl_VTable;
|
||||
|
||||
|
||||
/************************************************************************
|
||||
* Implementation of IEnumConnections
|
||||
*/
|
||||
typedef struct EnumConnectionsImpl {
|
||||
|
||||
IEnumConnectionsVtbl *lpvtbl;
|
||||
|
||||
DWORD ref;
|
||||
|
||||
/* IUnknown of ConnectionPoint, used for ref counting */
|
||||
IUnknown *pUnk;
|
||||
|
||||
/* Connection Data */
|
||||
CONNECTDATA *pCD;
|
||||
DWORD nConns;
|
||||
|
||||
/* Next connection to enumerate from */
|
||||
DWORD nCur;
|
||||
|
||||
} EnumConnectionsImpl;
|
||||
|
||||
static EnumConnectionsImpl *EnumConnectionsImpl_Construct(IUnknown *pUnk,
|
||||
DWORD nSinks,
|
||||
CONNECTDATA *pCD);
|
||||
|
||||
|
||||
/************************************************************************
|
||||
* ConnectionPointImpl_Construct
|
||||
*/
|
||||
static ConnectionPointImpl *ConnectionPointImpl_Construct(IUnknown *pUnk,
|
||||
REFIID riid)
|
||||
{
|
||||
ConnectionPointImpl *Obj;
|
||||
|
||||
Obj = HeapAlloc(GetProcessHeap(), 0, sizeof(*Obj));
|
||||
Obj->lpvtbl = &ConnectionPointImpl_VTable;
|
||||
Obj->Obj = pUnk;
|
||||
Obj->ref = 1;
|
||||
Obj->iid = *riid;
|
||||
Obj->maxSinks = MAXSINKS;
|
||||
Obj->sinks = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
||||
sizeof(IUnknown*) * MAXSINKS);
|
||||
Obj->nSinks = 0;
|
||||
return Obj;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* ConnectionPointImpl_Destroy
|
||||
*/
|
||||
static void ConnectionPointImpl_Destroy(ConnectionPointImpl *Obj)
|
||||
{
|
||||
DWORD i;
|
||||
for(i = 0; i < Obj->maxSinks; i++) {
|
||||
if(Obj->sinks[i]) {
|
||||
IUnknown_Release(Obj->sinks[i]);
|
||||
Obj->sinks[i] = NULL;
|
||||
}
|
||||
}
|
||||
HeapFree(GetProcessHeap(), 0, Obj->sinks);
|
||||
HeapFree(GetProcessHeap(), 0, Obj);
|
||||
return;
|
||||
}
|
||||
|
||||
static ULONG WINAPI ConnectionPointImpl_AddRef(IConnectionPoint* iface);
|
||||
/************************************************************************
|
||||
* ConnectionPointImpl_QueryInterface (IUnknown)
|
||||
*
|
||||
* See Windows documentation for more details on IUnknown methods.
|
||||
*/
|
||||
static HRESULT WINAPI ConnectionPointImpl_QueryInterface(
|
||||
IConnectionPoint* iface,
|
||||
REFIID riid,
|
||||
void** ppvObject)
|
||||
{
|
||||
ConnectionPointImpl *This = (ConnectionPointImpl *)iface;
|
||||
TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppvObject);
|
||||
|
||||
/*
|
||||
* Perform a sanity check on the parameters.
|
||||
*/
|
||||
if ( (This==0) || (ppvObject==0) )
|
||||
return E_INVALIDARG;
|
||||
|
||||
/*
|
||||
* Initialize the return parameter.
|
||||
*/
|
||||
*ppvObject = 0;
|
||||
|
||||
/*
|
||||
* Compare the riid with the interface IDs implemented by this object.
|
||||
*/
|
||||
if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0)
|
||||
{
|
||||
*ppvObject = (IConnectionPoint*)This;
|
||||
}
|
||||
else if (memcmp(&IID_IConnectionPoint, riid, sizeof(IID_IConnectionPoint)) == 0)
|
||||
{
|
||||
*ppvObject = (IConnectionPoint*)This;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check that we obtained an interface.
|
||||
*/
|
||||
if ((*ppvObject)==0)
|
||||
{
|
||||
FIXME("() : asking for un supported interface %s\n",debugstr_guid(riid));
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Query Interface always increases the reference count by one when it is
|
||||
* successful
|
||||
*/
|
||||
ConnectionPointImpl_AddRef((IConnectionPoint*)This);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************
|
||||
* ConnectionPointImpl_AddRef (IUnknown)
|
||||
*
|
||||
* See Windows documentation for more details on IUnknown methods.
|
||||
*/
|
||||
static ULONG WINAPI ConnectionPointImpl_AddRef(IConnectionPoint* iface)
|
||||
{
|
||||
ConnectionPointImpl *This = (ConnectionPointImpl *)iface;
|
||||
TRACE("(%p)->(ref=%ld)\n", This, This->ref);
|
||||
return InterlockedIncrement(&This->ref);
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* ConnectionPointImpl_Release (IUnknown)
|
||||
*
|
||||
* See Windows documentation for more details on IUnknown methods.
|
||||
*/
|
||||
static ULONG WINAPI ConnectionPointImpl_Release(
|
||||
IConnectionPoint* iface)
|
||||
{
|
||||
ConnectionPointImpl *This = (ConnectionPointImpl *)iface;
|
||||
ULONG ref;
|
||||
TRACE("(%p)->(ref=%ld)\n", This, This->ref);
|
||||
|
||||
/*
|
||||
* Decrease the reference count on this object.
|
||||
*/
|
||||
ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
/*
|
||||
* If the reference count goes down to 0, perform suicide.
|
||||
*/
|
||||
if (ref == 0) ConnectionPointImpl_Destroy(This);
|
||||
|
||||
return ref;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* ConnectionPointImpl_GetConnectionInterface (IConnectionPoint)
|
||||
*
|
||||
*/
|
||||
static HRESULT WINAPI ConnectionPointImpl_GetConnectionInterface(
|
||||
IConnectionPoint *iface,
|
||||
IID *piid)
|
||||
{
|
||||
ConnectionPointImpl *This = (ConnectionPointImpl *)iface;
|
||||
TRACE("(%p)->(%p) returning %s\n", This, piid, debugstr_guid(&(This->iid)));
|
||||
*piid = This->iid;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* ConnectionPointImpl_GetConnectionPointContainer (IConnectionPoint)
|
||||
*
|
||||
*/
|
||||
static HRESULT WINAPI ConnectionPointImpl_GetConnectionPointContainer(
|
||||
IConnectionPoint *iface,
|
||||
IConnectionPointContainer **ppCPC)
|
||||
{
|
||||
ConnectionPointImpl *This = (ConnectionPointImpl *)iface;
|
||||
TRACE("(%p)->(%p)\n", This, ppCPC);
|
||||
|
||||
return IUnknown_QueryInterface(This->Obj,
|
||||
&IID_IConnectionPointContainer,
|
||||
(LPVOID)ppCPC);
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* ConnectionPointImpl_Advise (IConnectionPoint)
|
||||
*
|
||||
*/
|
||||
static HRESULT WINAPI ConnectionPointImpl_Advise(IConnectionPoint *iface,
|
||||
IUnknown *lpUnk,
|
||||
DWORD *pdwCookie)
|
||||
{
|
||||
DWORD i;
|
||||
ConnectionPointImpl *This = (ConnectionPointImpl *)iface;
|
||||
IUnknown *lpSink;
|
||||
TRACE("(%p)->(%p, %p)\n", This, lpUnk, pdwCookie);
|
||||
|
||||
*pdwCookie = 0;
|
||||
if(FAILED(IUnknown_QueryInterface(lpUnk, &This->iid, (LPVOID)&lpSink)))
|
||||
return CONNECT_E_CANNOTCONNECT;
|
||||
|
||||
for(i = 0; i < This->maxSinks; i++) {
|
||||
if(This->sinks[i] == NULL)
|
||||
break;
|
||||
}
|
||||
if(i == This->maxSinks) {
|
||||
This->maxSinks += MAXSINKS;
|
||||
This->sinks = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, This->sinks,
|
||||
This->maxSinks * sizeof(IUnknown *));
|
||||
}
|
||||
This->sinks[i] = lpSink;
|
||||
This->nSinks++;
|
||||
*pdwCookie = i + 1;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************
|
||||
* ConnectionPointImpl_Unadvise (IConnectionPoint)
|
||||
*
|
||||
*/
|
||||
static HRESULT WINAPI ConnectionPointImpl_Unadvise(IConnectionPoint *iface,
|
||||
DWORD dwCookie)
|
||||
{
|
||||
ConnectionPointImpl *This = (ConnectionPointImpl *)iface;
|
||||
TRACE("(%p)->(%ld)\n", This, dwCookie);
|
||||
|
||||
if(dwCookie == 0 || dwCookie > This->maxSinks) return E_INVALIDARG;
|
||||
|
||||
if(This->sinks[dwCookie-1] == NULL) return CONNECT_E_NOCONNECTION;
|
||||
|
||||
IUnknown_Release(This->sinks[dwCookie-1]);
|
||||
This->sinks[dwCookie-1] = NULL;
|
||||
This->nSinks--;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* ConnectionPointImpl_EnumConnections (IConnectionPoint)
|
||||
*
|
||||
*/
|
||||
static HRESULT WINAPI ConnectionPointImpl_EnumConnections(
|
||||
IConnectionPoint *iface,
|
||||
LPENUMCONNECTIONS *ppEnum)
|
||||
{
|
||||
ConnectionPointImpl *This = (ConnectionPointImpl *)iface;
|
||||
CONNECTDATA *pCD;
|
||||
DWORD i, nextslot;
|
||||
EnumConnectionsImpl *EnumObj;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, ppEnum);
|
||||
|
||||
*ppEnum = NULL;
|
||||
|
||||
if(This->nSinks == 0) return OLE_E_NOCONNECTION;
|
||||
|
||||
pCD = HeapAlloc(GetProcessHeap(), 0, sizeof(CONNECTDATA) * This->nSinks);
|
||||
|
||||
for(i = 0, nextslot = 0; i < This->maxSinks; i++) {
|
||||
if(This->sinks[i] != NULL) {
|
||||
pCD[nextslot].pUnk = This->sinks[i];
|
||||
pCD[nextslot].dwCookie = i + 1;
|
||||
nextslot++;
|
||||
}
|
||||
}
|
||||
assert(nextslot == This->nSinks);
|
||||
|
||||
/* Bump the ref count of this object up by one. It gets Released in
|
||||
IEnumConnections_Release */
|
||||
IUnknown_AddRef((IUnknown*)This);
|
||||
|
||||
EnumObj = EnumConnectionsImpl_Construct((IUnknown*)This, This->nSinks, pCD);
|
||||
hr = IEnumConnections_QueryInterface((IEnumConnections*)EnumObj,
|
||||
&IID_IEnumConnections, (LPVOID)ppEnum);
|
||||
IEnumConnections_Release((IEnumConnections*)EnumObj);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, pCD);
|
||||
return hr;
|
||||
}
|
||||
|
||||
static IConnectionPointVtbl ConnectionPointImpl_VTable =
|
||||
{
|
||||
ConnectionPointImpl_QueryInterface,
|
||||
ConnectionPointImpl_AddRef,
|
||||
ConnectionPointImpl_Release,
|
||||
ConnectionPointImpl_GetConnectionInterface,
|
||||
ConnectionPointImpl_GetConnectionPointContainer,
|
||||
ConnectionPointImpl_Advise,
|
||||
ConnectionPointImpl_Unadvise,
|
||||
ConnectionPointImpl_EnumConnections
|
||||
};
|
||||
|
||||
|
||||
static IEnumConnectionsVtbl EnumConnectionsImpl_VTable;
|
||||
static ULONG WINAPI EnumConnectionsImpl_AddRef(IEnumConnections* iface);
|
||||
|
||||
/************************************************************************
|
||||
* EnumConnectionsImpl_Construct
|
||||
*/
|
||||
static EnumConnectionsImpl *EnumConnectionsImpl_Construct(IUnknown *pUnk,
|
||||
DWORD nSinks,
|
||||
CONNECTDATA *pCD)
|
||||
{
|
||||
EnumConnectionsImpl *Obj = HeapAlloc(GetProcessHeap(), 0, sizeof(*Obj));
|
||||
DWORD i;
|
||||
|
||||
Obj->lpvtbl = &EnumConnectionsImpl_VTable;
|
||||
Obj->ref = 1;
|
||||
Obj->pUnk = pUnk;
|
||||
Obj->pCD = HeapAlloc(GetProcessHeap(), 0, nSinks * sizeof(CONNECTDATA));
|
||||
Obj->nConns = nSinks;
|
||||
Obj->nCur = 0;
|
||||
|
||||
for(i = 0; i < nSinks; i++) {
|
||||
Obj->pCD[i] = pCD[i];
|
||||
IUnknown_AddRef(Obj->pCD[i].pUnk);
|
||||
}
|
||||
return Obj;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* EnumConnectionsImpl_Destroy
|
||||
*/
|
||||
static void EnumConnectionsImpl_Destroy(EnumConnectionsImpl *Obj)
|
||||
{
|
||||
DWORD i;
|
||||
|
||||
for(i = 0; i < Obj->nConns; i++)
|
||||
IUnknown_Release(Obj->pCD[i].pUnk);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, Obj->pCD);
|
||||
HeapFree(GetProcessHeap(), 0, Obj);
|
||||
return;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* EnumConnectionsImpl_QueryInterface (IUnknown)
|
||||
*
|
||||
* See Windows documentation for more details on IUnknown methods.
|
||||
*/
|
||||
static HRESULT WINAPI EnumConnectionsImpl_QueryInterface(
|
||||
IEnumConnections* iface,
|
||||
REFIID riid,
|
||||
void** ppvObject)
|
||||
{
|
||||
ConnectionPointImpl *This = (ConnectionPointImpl *)iface;
|
||||
TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppvObject);
|
||||
|
||||
/*
|
||||
* Perform a sanity check on the parameters.
|
||||
*/
|
||||
if ( (This==0) || (ppvObject==0) )
|
||||
return E_INVALIDARG;
|
||||
|
||||
/*
|
||||
* Initialize the return parameter.
|
||||
*/
|
||||
*ppvObject = 0;
|
||||
|
||||
/*
|
||||
* Compare the riid with the interface IDs implemented by this object.
|
||||
*/
|
||||
if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0)
|
||||
{
|
||||
*ppvObject = (IEnumConnections*)This;
|
||||
}
|
||||
else if (memcmp(&IID_IEnumConnections, riid, sizeof(IID_IEnumConnections)) == 0)
|
||||
{
|
||||
*ppvObject = (IEnumConnections*)This;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check that we obtained an interface.
|
||||
*/
|
||||
if ((*ppvObject)==0)
|
||||
{
|
||||
FIXME("() : asking for un supported interface %s\n",debugstr_guid(riid));
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Query Interface always increases the reference count by one when it is
|
||||
* successful
|
||||
*/
|
||||
EnumConnectionsImpl_AddRef((IEnumConnections*)This);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************
|
||||
* EnumConnectionsImpl_AddRef (IUnknown)
|
||||
*
|
||||
* See Windows documentation for more details on IUnknown methods.
|
||||
*/
|
||||
static ULONG WINAPI EnumConnectionsImpl_AddRef(IEnumConnections* iface)
|
||||
{
|
||||
EnumConnectionsImpl *This = (EnumConnectionsImpl *)iface;
|
||||
ULONG ref;
|
||||
TRACE("(%p)->(ref=%ld)\n", This, This->ref);
|
||||
ref = InterlockedIncrement(&This->ref);
|
||||
IUnknown_AddRef(This->pUnk);
|
||||
return ref;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* EnumConnectionsImpl_Release (IUnknown)
|
||||
*
|
||||
* See Windows documentation for more details on IUnknown methods.
|
||||
*/
|
||||
static ULONG WINAPI EnumConnectionsImpl_Release(IEnumConnections* iface)
|
||||
{
|
||||
EnumConnectionsImpl *This = (EnumConnectionsImpl *)iface;
|
||||
ULONG ref;
|
||||
TRACE("(%p)->(ref=%ld)\n", This, This->ref);
|
||||
|
||||
IUnknown_Release(This->pUnk);
|
||||
|
||||
/*
|
||||
* Decrease the reference count on this object.
|
||||
*/
|
||||
ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
/*
|
||||
* If the reference count goes down to 0, perform suicide.
|
||||
*/
|
||||
if (ref == 0) EnumConnectionsImpl_Destroy(This);
|
||||
|
||||
return ref;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* EnumConnectionsImpl_Next (IEnumConnections)
|
||||
*
|
||||
*/
|
||||
static HRESULT WINAPI EnumConnectionsImpl_Next(IEnumConnections* iface,
|
||||
ULONG cConn, LPCONNECTDATA pCD,
|
||||
ULONG *pEnum)
|
||||
{
|
||||
EnumConnectionsImpl *This = (EnumConnectionsImpl *)iface;
|
||||
DWORD nRet = 0;
|
||||
TRACE("(%p)->(%ld, %p, %p)\n", This, cConn, pCD, pEnum);
|
||||
|
||||
if(pEnum == NULL) {
|
||||
if(cConn != 1)
|
||||
return E_POINTER;
|
||||
} else
|
||||
*pEnum = 0;
|
||||
|
||||
if(This->nCur >= This->nConns)
|
||||
return S_FALSE;
|
||||
|
||||
while(This->nCur < This->nConns && cConn) {
|
||||
*pCD++ = This->pCD[This->nCur];
|
||||
IUnknown_AddRef(This->pCD[This->nCur].pUnk);
|
||||
This->nCur++;
|
||||
cConn--;
|
||||
nRet++;
|
||||
}
|
||||
|
||||
if(pEnum)
|
||||
*pEnum = nRet;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************
|
||||
* EnumConnectionsImpl_Skip (IEnumConnections)
|
||||
*
|
||||
*/
|
||||
static HRESULT WINAPI EnumConnectionsImpl_Skip(IEnumConnections* iface,
|
||||
ULONG cSkip)
|
||||
{
|
||||
EnumConnectionsImpl *This = (EnumConnectionsImpl *)iface;
|
||||
TRACE("(%p)->(%ld)\n", This, cSkip);
|
||||
|
||||
if(This->nCur + cSkip >= This->nConns)
|
||||
return S_FALSE;
|
||||
|
||||
This->nCur += cSkip;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************
|
||||
* EnumConnectionsImpl_Reset (IEnumConnections)
|
||||
*
|
||||
*/
|
||||
static HRESULT WINAPI EnumConnectionsImpl_Reset(IEnumConnections* iface)
|
||||
{
|
||||
EnumConnectionsImpl *This = (EnumConnectionsImpl *)iface;
|
||||
TRACE("(%p)\n", This);
|
||||
|
||||
This->nCur = 0;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************
|
||||
* EnumConnectionsImpl_Clone (IEnumConnections)
|
||||
*
|
||||
*/
|
||||
static HRESULT WINAPI EnumConnectionsImpl_Clone(IEnumConnections* iface,
|
||||
LPENUMCONNECTIONS *ppEnum)
|
||||
{
|
||||
EnumConnectionsImpl *This = (EnumConnectionsImpl *)iface;
|
||||
EnumConnectionsImpl *newObj;
|
||||
TRACE("(%p)->(%p)\n", This, ppEnum);
|
||||
|
||||
newObj = EnumConnectionsImpl_Construct(This->pUnk, This->nConns, This->pCD);
|
||||
newObj->nCur = This->nCur;
|
||||
*ppEnum = (LPENUMCONNECTIONS)newObj;
|
||||
IUnknown_AddRef(This->pUnk);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static IEnumConnectionsVtbl EnumConnectionsImpl_VTable =
|
||||
{
|
||||
EnumConnectionsImpl_QueryInterface,
|
||||
EnumConnectionsImpl_AddRef,
|
||||
EnumConnectionsImpl_Release,
|
||||
EnumConnectionsImpl_Next,
|
||||
EnumConnectionsImpl_Skip,
|
||||
EnumConnectionsImpl_Reset,
|
||||
EnumConnectionsImpl_Clone
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
*
|
||||
* The exported function to create the connection point.
|
||||
* NB not a windows API
|
||||
*
|
||||
* PARAMS
|
||||
* pUnk [in] IUnknown of object to which the ConnectionPoint is associated.
|
||||
* Needed to access IConnectionPointContainer.
|
||||
*
|
||||
* riid [in] IID of sink interface that this ConnectionPoint manages
|
||||
*
|
||||
* pCP [out] returns IConnectionPoint
|
||||
*
|
||||
*/
|
||||
HRESULT CreateConnectionPoint(IUnknown *pUnk, REFIID riid,
|
||||
IConnectionPoint **pCP)
|
||||
{
|
||||
ConnectionPointImpl *Obj;
|
||||
HRESULT hr;
|
||||
|
||||
Obj = ConnectionPointImpl_Construct(pUnk, riid);
|
||||
if(!Obj) return E_OUTOFMEMORY;
|
||||
|
||||
hr = IConnectionPoint_QueryInterface((IConnectionPoint *)Obj,
|
||||
&IID_IConnectionPoint, (LPVOID)pCP);
|
||||
IConnectionPoint_Release((IConnectionPoint *)Obj);
|
||||
return hr;
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
/*
|
||||
* Copyright 2000 Huw D M Davies for CodeWeavers
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _CONNPT_H
|
||||
#define _CONNPT_H
|
||||
|
||||
HRESULT CreateConnectionPoint(IUnknown *pUnk, REFIID riid, IConnectionPoint **pCP);
|
||||
|
||||
#endif /* _CONNPT_H */
|
|
@ -1,89 +0,0 @@
|
|||
/*
|
||||
* Cursor and icon definitions
|
||||
*
|
||||
* Copyright 1995 Alexandre Julliard
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef __WINE_CURSORICON_H
|
||||
#define __WINE_CURSORICON_H
|
||||
|
||||
#include <windef.h>
|
||||
|
||||
#include <pshpack1.h>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
BYTE bWidth;
|
||||
BYTE bHeight;
|
||||
BYTE bColorCount;
|
||||
BYTE bReserved;
|
||||
} ICONRESDIR;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
WORD wWidth;
|
||||
WORD wHeight;
|
||||
} CURSORDIR;
|
||||
|
||||
typedef struct
|
||||
{ union
|
||||
{ ICONRESDIR icon;
|
||||
CURSORDIR cursor;
|
||||
} ResInfo;
|
||||
WORD wPlanes;
|
||||
WORD wBitCount;
|
||||
DWORD dwBytesInRes;
|
||||
WORD wResId;
|
||||
} CURSORICONDIRENTRY;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
WORD idReserved;
|
||||
WORD idType;
|
||||
WORD idCount;
|
||||
CURSORICONDIRENTRY idEntries[1];
|
||||
} CURSORICONDIR;
|
||||
|
||||
typedef struct {
|
||||
BYTE bWidth;
|
||||
BYTE bHeight;
|
||||
BYTE bColorCount;
|
||||
BYTE bReserved;
|
||||
WORD xHotspot;
|
||||
WORD yHotspot;
|
||||
DWORD dwDIBSize;
|
||||
DWORD dwDIBOffset;
|
||||
} CURSORICONFILEDIRENTRY;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
WORD idReserved;
|
||||
WORD idType;
|
||||
WORD idCount;
|
||||
CURSORICONFILEDIRENTRY idEntries[1];
|
||||
} CURSORICONFILEDIR;
|
||||
|
||||
|
||||
#include <poppack.h>
|
||||
|
||||
#define CID_RESOURCE 0x0001
|
||||
#define CID_WIN32 0x0004
|
||||
#define CID_NONSHARED 0x0008
|
||||
|
||||
extern void CURSORICON_FreeModuleIcons( HMODULE16 hModule );
|
||||
|
||||
#endif /* __WINE_CURSORICON_H */
|
|
@ -1,456 +0,0 @@
|
|||
/**
|
||||
* Dispatch API functions
|
||||
*
|
||||
* Copyright 2000 Francois Jacques, Macadamian Technologies Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* TODO: Type coercion is implemented in variant.c but not called yet.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "objbase.h"
|
||||
#include "oleauto.h"
|
||||
#include "winerror.h"
|
||||
#include "winreg.h"
|
||||
#include "winnls.h" /* for PRIMARYLANGID */
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
||||
WINE_DECLARE_DEBUG_CHANNEL(typelib);
|
||||
|
||||
static IDispatch * WINAPI StdDispatch_Construct(IUnknown * punkOuter, void * pvThis, ITypeInfo * pTypeInfo);
|
||||
|
||||
/******************************************************************************
|
||||
* DispInvoke (OLEAUT32.30)
|
||||
*
|
||||
* Call an object method using the information from its type library.
|
||||
*
|
||||
* RETURNS
|
||||
* Success: S_OK.
|
||||
* Failure: Returns DISP_E_EXCEPTION and updates pexcepinfo if an exception occurs.
|
||||
* DISP_E_BADPARAMCOUNT if the number of parameters is incorrect.
|
||||
* DISP_E_MEMBERNOTFOUND if the method does not exist.
|
||||
* puArgErr is updated if a parameter error (see notes) occurs.
|
||||
* Otherwise, returns the result of calling ITypeInfo_Invoke().
|
||||
*
|
||||
* NOTES
|
||||
* Parameter errors include the following:
|
||||
*| DISP_E_BADVARTYPE
|
||||
*| E_INVALIDARG An argument was invalid
|
||||
*| DISP_E_TYPEMISMATCH,
|
||||
*| DISP_E_OVERFLOW An argument was valid but could not be coerced
|
||||
*| DISP_E_PARAMNOTOPTIONAL A non optional parameter was not passed
|
||||
*| DISP_E_PARAMNOTFOUND A parameter was passed that was not expected by the method
|
||||
* This call defers to ITypeInfo_Invoke().
|
||||
*/
|
||||
HRESULT WINAPI DispInvoke(
|
||||
VOID *_this, /* [in] Object to call method on */
|
||||
ITypeInfo *ptinfo, /* [in] Object type info */
|
||||
DISPID dispidMember, /* [in] DISPID of the member (e.g. from GetIDsOfNames()) */
|
||||
USHORT wFlags, /* [in] Kind of method call (DISPATCH_ flags from "oaidl.h") */
|
||||
DISPPARAMS *pparams, /* [in] Array of method arguments */
|
||||
VARIANT *pvarResult, /* [out] Destination for the result of the call */
|
||||
EXCEPINFO *pexcepinfo, /* [out] Destination for exception information */
|
||||
UINT *puArgErr) /* [out] Destination for bad argument */
|
||||
{
|
||||
/**
|
||||
* TODO:
|
||||
* For each param, call DispGetParam to perform type coercion
|
||||
*/
|
||||
FIXME("Coercion of arguments not implemented\n");
|
||||
|
||||
return ITypeInfo_Invoke(ptinfo, _this, dispidMember, wFlags,
|
||||
pparams, pvarResult, pexcepinfo, puArgErr);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* DispGetIDsOfNames (OLEAUT32.29)
|
||||
*
|
||||
* Convert a set of parameter names to DISPID's for DispInvoke().
|
||||
*
|
||||
* RETURNS
|
||||
* Success: S_OK.
|
||||
* Failure: An HRESULT error code.
|
||||
*
|
||||
* NOTES
|
||||
* This call defers to ITypeInfo_GetIDsOfNames(). The ITypeInfo interface passed
|
||||
* as ptinfo contains the information to map names to DISPID's.
|
||||
*/
|
||||
HRESULT WINAPI DispGetIDsOfNames(
|
||||
ITypeInfo *ptinfo, /* [in] Object's type info */
|
||||
OLECHAR **rgszNames, /* [in] Array of names to get DISPID's for */
|
||||
UINT cNames, /* [in] Number of names in rgszNames */
|
||||
DISPID *rgdispid) /* [out] Destination for converted DISPID's */
|
||||
{
|
||||
return ITypeInfo_GetIDsOfNames(ptinfo, rgszNames, cNames, rgdispid);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* DispGetParam (OLEAUT32.28)
|
||||
*
|
||||
* Retrive a parameter from a DISPPARAMS structure and coerce it to the
|
||||
* specified variant type.
|
||||
*
|
||||
* NOTES
|
||||
* Coercion is done using system (0) locale.
|
||||
*
|
||||
* RETURNS
|
||||
* Success: S_OK.
|
||||
* Failure: DISP_E_PARAMNOTFOUND, if position is invalid. or
|
||||
* DISP_E_TYPEMISMATCH, if the coercion failed. puArgErr is
|
||||
* set to the index of the argument in pdispparams.
|
||||
*/
|
||||
HRESULT WINAPI DispGetParam(
|
||||
DISPPARAMS *pdispparams, /* [in] Parameter list */
|
||||
UINT position, /* [in] Position of parameter to coerce in pdispparams */
|
||||
VARTYPE vtTarg, /* [in] Type of value to coerce to */
|
||||
VARIANT *pvarResult, /* [out] Destination for resulting variant */
|
||||
UINT *puArgErr) /* [out] Destination for error code */
|
||||
{
|
||||
/* position is counted backwards */
|
||||
UINT pos;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("position=%d, cArgs=%d, cNamedArgs=%d\n",
|
||||
position, pdispparams->cArgs, pdispparams->cNamedArgs);
|
||||
if (position < pdispparams->cArgs) {
|
||||
/* positional arg? */
|
||||
pos = pdispparams->cArgs - position - 1;
|
||||
} else {
|
||||
/* FIXME: is this how to handle named args? */
|
||||
for (pos=0; pos<pdispparams->cNamedArgs; pos++)
|
||||
if (pdispparams->rgdispidNamedArgs[pos] == position) break;
|
||||
|
||||
if (pos==pdispparams->cNamedArgs)
|
||||
return DISP_E_PARAMNOTFOUND;
|
||||
}
|
||||
hr = VariantChangeType(pvarResult,
|
||||
&pdispparams->rgvarg[pos],
|
||||
0, vtTarg);
|
||||
if (hr == DISP_E_TYPEMISMATCH) *puArgErr = pos;
|
||||
return hr;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CreateStdDispatch [OLEAUT32.32]
|
||||
*
|
||||
* Create and return a standard IDispatch object.
|
||||
*
|
||||
* RETURNS
|
||||
* Success: S_OK. ppunkStdDisp contains the new object.
|
||||
* Failure: An HRESULT error code.
|
||||
*
|
||||
* NOTES
|
||||
* Outer unknown appears to be completely ignored.
|
||||
*/
|
||||
HRESULT WINAPI CreateStdDispatch(
|
||||
IUnknown* punkOuter,
|
||||
void* pvThis,
|
||||
ITypeInfo* ptinfo,
|
||||
IUnknown** ppunkStdDisp)
|
||||
{
|
||||
TRACE("(%p, %p, %p, %p)\n", punkOuter, pvThis, ptinfo, ppunkStdDisp);
|
||||
|
||||
*ppunkStdDisp = (LPUNKNOWN)StdDispatch_Construct(punkOuter, pvThis, ptinfo);
|
||||
if (!*ppunkStdDisp)
|
||||
return E_OUTOFMEMORY;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* IDispatch {OLEAUT32}
|
||||
*
|
||||
* NOTES
|
||||
* The IDispatch interface provides a single interface to dispatch method calls,
|
||||
* regardless of whether the object to be called is in or out of process,
|
||||
* local or remote (e.g. being called over a network). This interface is late-bound
|
||||
* (linked at run-time), as opposed to early-bound (linked at compile time).
|
||||
*
|
||||
* The interface is used by objects that wish to called by scripting
|
||||
* languages such as VBA, in order to minimise the amount of COM and C/C++
|
||||
* knowledge required, or by objects that wish to live out of process from code
|
||||
* that will call their methods.
|
||||
*
|
||||
* Method, property and parameter names can be localised. The details required to
|
||||
* map names to methods and parameters are collected in a type library, usually
|
||||
* output by an IDL compiler using the objects IDL description. This information is
|
||||
* accessible programatically through the ITypeLib interface (for a type library),
|
||||
* and the ITypeInfo interface (for an object within the type library). Type information
|
||||
* can also be created at run-time using CreateDispTypeInfo().
|
||||
*
|
||||
* WRAPPERS
|
||||
* Instead of using IDispatch directly, there are several wrapper functions available
|
||||
* to simplify the process of calling an objects methods through IDispatch.
|
||||
*
|
||||
* A standard implementation of an IDispatch object is created by calling
|
||||
* CreateStdDispatch(). Numeric Id values for the parameters and methods (DISPID's)
|
||||
* of an object of interest are retrieved by calling DispGetIDsOfNames(). DispGetParam()
|
||||
* retrieves information about a particular parameter. Finally the DispInvoke()
|
||||
* function is responsable for actually calling methods on an object.
|
||||
*
|
||||
* METHODS
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
IDispatchVtbl *lpVtbl;
|
||||
void * pvThis;
|
||||
ITypeInfo * pTypeInfo;
|
||||
ULONG ref;
|
||||
} StdDispatch;
|
||||
|
||||
/******************************************************************************
|
||||
* IDispatch_QueryInterface {OLEAUT32}
|
||||
*
|
||||
* See IUnknown_QueryInterface.
|
||||
*/
|
||||
static HRESULT WINAPI StdDispatch_QueryInterface(
|
||||
LPDISPATCH iface,
|
||||
REFIID riid,
|
||||
void** ppvObject)
|
||||
{
|
||||
StdDispatch *This = (StdDispatch *)iface;
|
||||
TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ppvObject);
|
||||
|
||||
if (IsEqualIID(riid, &IID_IDispatch) ||
|
||||
IsEqualIID(riid, &IID_IUnknown))
|
||||
{
|
||||
*ppvObject = (LPVOID)This;
|
||||
IUnknown_AddRef((LPUNKNOWN)*ppvObject);
|
||||
return S_OK;
|
||||
}
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* IDispatch_AddRef {OLEAUT32}
|
||||
*
|
||||
* See IUnknown_AddRef.
|
||||
*/
|
||||
static ULONG WINAPI StdDispatch_AddRef(LPDISPATCH iface)
|
||||
{
|
||||
StdDispatch *This = (StdDispatch *)iface;
|
||||
TRACE("()\n");
|
||||
|
||||
return InterlockedIncrement(&This->ref);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* IDispatch_Release {OLEAUT32}
|
||||
*
|
||||
* See IUnknown_Release.
|
||||
*/
|
||||
static ULONG WINAPI StdDispatch_Release(LPDISPATCH iface)
|
||||
{
|
||||
StdDispatch *This = (StdDispatch *)iface;
|
||||
ULONG ref;
|
||||
TRACE("(%p)->()\n", This);
|
||||
|
||||
ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
if (ref == 0)
|
||||
{
|
||||
ITypeInfo_Release(This->pTypeInfo);
|
||||
CoTaskMemFree(This);
|
||||
}
|
||||
|
||||
return ref;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* IDispatch_GetTypeInfoCount {OLEAUT32}
|
||||
*
|
||||
* Get the count of type information in an IDispatch interface.
|
||||
*
|
||||
* PARAMS
|
||||
* iface [I] IDispatch interface
|
||||
* pctinfo [O] Destination for the count
|
||||
*
|
||||
* RETURNS
|
||||
* Success: S_OK. pctinfo is updated with the count. This is always 1 if
|
||||
* the object provides type information, and 0 if it does not.
|
||||
* Failure: E_NOTIMPL. The object does not provide type information.
|
||||
*
|
||||
* NOTES
|
||||
* See IDispatch() and IDispatch_GetTypeInfo().
|
||||
*/
|
||||
static HRESULT WINAPI StdDispatch_GetTypeInfoCount(LPDISPATCH iface, UINT * pctinfo)
|
||||
{
|
||||
StdDispatch *This = (StdDispatch *)iface;
|
||||
TRACE("(%p)\n", pctinfo);
|
||||
|
||||
*pctinfo = This->pTypeInfo ? 1 : 0;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* IDispatch_GetTypeInfo {OLEAUT32}
|
||||
*
|
||||
* Get type information from an IDispatch interface.
|
||||
*
|
||||
* PARAMS
|
||||
* iface [I] IDispatch interface
|
||||
* iTInfo [I] Index of type information.
|
||||
* lcid [I] Locale of the type information to get
|
||||
* ppTInfo [O] Destination for the ITypeInfo object
|
||||
*
|
||||
* RETURNS
|
||||
* Success: S_OK. ppTInfo is updated with the objects type information
|
||||
* Failure: DISP_E_BADINDEX, if iTInfo is any value other than 0.
|
||||
*
|
||||
* NOTES
|
||||
* See IDispatch.
|
||||
*/
|
||||
static HRESULT WINAPI StdDispatch_GetTypeInfo(LPDISPATCH iface, UINT iTInfo, LCID lcid, ITypeInfo** ppTInfo)
|
||||
{
|
||||
StdDispatch *This = (StdDispatch *)iface;
|
||||
TRACE("(%d, %lx, %p)\n", iTInfo, lcid, ppTInfo);
|
||||
|
||||
*ppTInfo = NULL;
|
||||
if (iTInfo != 0)
|
||||
return DISP_E_BADINDEX;
|
||||
|
||||
if (This->pTypeInfo)
|
||||
{
|
||||
*ppTInfo = This->pTypeInfo;
|
||||
ITypeInfo_AddRef(*ppTInfo);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* IDispatch_GetIDsOfNames {OLEAUT32}
|
||||
*
|
||||
* Convert a methods name and an optional set of parameter names into DISPID's
|
||||
* for passing to IDispatch_Invoke().
|
||||
*
|
||||
* PARAMS
|
||||
* iface [I] IDispatch interface
|
||||
* riid [I] Reserved, set to IID_NULL
|
||||
* rgszNames [I] Name to convert
|
||||
* cNames [I] Number of names in rgszNames
|
||||
* lcid [I] Locale of the type information to convert from
|
||||
* rgDispId [O] Destination for converted DISPID's.
|
||||
*
|
||||
* RETURNS
|
||||
* Success: S_OK.
|
||||
* Failure: DISP_E_UNKNOWNNAME, if any of the names is invalid.
|
||||
* DISP_E_UNKNOWNLCID if lcid is invalid.
|
||||
* Otherwise, an An HRESULT error code.
|
||||
*
|
||||
* NOTES
|
||||
* This call defers to ITypeInfo_GetIDsOfNames(), using the ITypeInfo object
|
||||
* contained within the IDispatch object.
|
||||
* The first member of the names list must be a method name. The names following
|
||||
* the method name are the parameters for that method.
|
||||
*/
|
||||
static HRESULT WINAPI StdDispatch_GetIDsOfNames(LPDISPATCH iface, REFIID riid, LPOLESTR * rgszNames, UINT cNames, LCID lcid, DISPID * rgDispId)
|
||||
{
|
||||
StdDispatch *This = (StdDispatch *)iface;
|
||||
TRACE("(%s, %p, %d, 0x%lx, %p)\n", debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
|
||||
|
||||
if (!IsEqualGUID(riid, &IID_NULL))
|
||||
{
|
||||
FIXME(" expected riid == IID_NULL\n");
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
return DispGetIDsOfNames(This->pTypeInfo, rgszNames, cNames, rgDispId);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* IDispatch_Invoke {OLEAUT32}
|
||||
*
|
||||
* Call an object method.
|
||||
*
|
||||
* PARAMS
|
||||
* iface [I] IDispatch interface
|
||||
* dispIdMember [I] DISPID of the method (from GetIDsOfNames())
|
||||
* riid [I] Reserved, set to IID_NULL
|
||||
* lcid [I] Locale of the type information to convert parameters with
|
||||
* wFlags, [I] Kind of method call (DISPATCH_ flags from "oaidl.h")
|
||||
* pDispParams [I] Array of method arguments
|
||||
* pVarResult [O] Destination for the result of the call
|
||||
* pExcepInfo [O] Destination for exception information
|
||||
* puArgErr [O] Destination for bad argument
|
||||
*
|
||||
* RETURNS
|
||||
* Success: S_OK.
|
||||
* Failure: See DispInvoke() for failure cases.
|
||||
*
|
||||
* NOTES
|
||||
* See DispInvoke() and IDispatch().
|
||||
*/
|
||||
static HRESULT WINAPI StdDispatch_Invoke(LPDISPATCH iface, DISPID dispIdMember, REFIID riid, LCID lcid,
|
||||
WORD wFlags, DISPPARAMS * pDispParams, VARIANT * pVarResult,
|
||||
EXCEPINFO * pExcepInfo, UINT * puArgErr)
|
||||
{
|
||||
StdDispatch *This = (StdDispatch *)iface;
|
||||
TRACE("(%ld, %s, 0x%lx, 0x%x, %p, %p, %p, %p)\n", dispIdMember, debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
||||
|
||||
if (!IsEqualGUID(riid, &IID_NULL))
|
||||
{
|
||||
FIXME(" expected riid == IID_NULL\n");
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
return DispInvoke(This->pvThis, This->pTypeInfo, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
||||
}
|
||||
|
||||
static IDispatchVtbl StdDispatch_VTable =
|
||||
{
|
||||
StdDispatch_QueryInterface,
|
||||
StdDispatch_AddRef,
|
||||
StdDispatch_Release,
|
||||
StdDispatch_GetTypeInfoCount,
|
||||
StdDispatch_GetTypeInfo,
|
||||
StdDispatch_GetIDsOfNames,
|
||||
StdDispatch_Invoke
|
||||
};
|
||||
|
||||
static IDispatch * WINAPI StdDispatch_Construct(
|
||||
IUnknown * punkOuter,
|
||||
void * pvThis,
|
||||
ITypeInfo * pTypeInfo)
|
||||
{
|
||||
StdDispatch * pStdDispatch;
|
||||
|
||||
pStdDispatch = CoTaskMemAlloc(sizeof(StdDispatch));
|
||||
if (!pStdDispatch)
|
||||
return (IDispatch *)pStdDispatch;
|
||||
|
||||
pStdDispatch->lpVtbl = &StdDispatch_VTable;
|
||||
pStdDispatch->pvThis = pvThis;
|
||||
pStdDispatch->pTypeInfo = pTypeInfo;
|
||||
pStdDispatch->ref = 1;
|
||||
|
||||
/* we keep a reference to the type info so prevent it from
|
||||
* being destroyed until we are done with it */
|
||||
ITypeInfo_AddRef(pTypeInfo);
|
||||
|
||||
return (IDispatch *)pStdDispatch;
|
||||
}
|
|
@ -1,644 +0,0 @@
|
|||
/*
|
||||
* Oleaut32 hash functions
|
||||
*
|
||||
* Copyright 1999 Corel Corporation
|
||||
* Copyright 2001-2003 Jon Griffiths
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winnls.h"
|
||||
#include "objbase.h"
|
||||
#include "oaidl.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
||||
|
||||
static const unsigned char Lookup_16[128 * 3] = {
|
||||
/* Common */
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C,
|
||||
0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,
|
||||
0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26,
|
||||
0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x00, 0x30, 0x31, 0x32, 0x33,
|
||||
0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40,
|
||||
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D,
|
||||
0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x56, 0x58, 0x55, 0x5A,
|
||||
0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
|
||||
0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54,
|
||||
0x55, 0x56, 0x56, 0x58, 0x55, 0x5A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F,
|
||||
|
||||
/* Windows */
|
||||
0x7F, 0x7F, 0x82, 0x46, 0x84, 0x85, 0x86, 0x87, 0x7F, 0x89, 0x53, 0x8B, 0x8C,
|
||||
0x7F, 0x7F, 0x7F, 0x7F, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x96, 0x98, 0x99,
|
||||
0x53, 0x9B, 0x8C, 0x7F, 0x7F, 0x55, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6,
|
||||
0xA7, 0xA8, 0xA9, 0x41, 0xAB, 0xAC, 0x96, 0xAE, 0xAF, 0xB0, 0xB1, 0x32, 0x33,
|
||||
0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0x31, 0x4F, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0x41,
|
||||
0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, 0x45, 0x45, 0x45, 0x45, 0x49, 0x49,
|
||||
0x49, 0x49, 0x44, 0x4E, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0xD7, 0x4F, 0x55, 0x55,
|
||||
0x55, 0x55, 0x55, 0xDE, 0xDF, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43,
|
||||
0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, 0x44, 0x4E, 0x4F, 0x4F, 0x4F,
|
||||
0x4F, 0x4F, 0xF7, 0x4F, 0x55, 0x55, 0x55, 0x55, 0x55, 0xDE, 0x55,
|
||||
|
||||
/* Mac */
|
||||
0x41, 0x41, 0x43, 0x45, 0x4E, 0x4F, 0x55, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
|
||||
0x43, 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, 0x4E, 0x4F, 0x4F, 0x4F,
|
||||
0x4F, 0x4F, 0x55, 0x55, 0x55, 0x55, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6,
|
||||
0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0x41, 0x4F, 0xB0, 0xB1, 0xB2, 0xB3,
|
||||
0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0x41, 0x4F, 0xBD, 0x41, 0x4F, 0xC0,
|
||||
0xC1, 0xC2, 0xC3, 0x46, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0x41, 0x41, 0x4F,
|
||||
0xCE, 0xCE, 0xD0, 0xD0, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0x55, 0x55, 0xDA,
|
||||
0xDB, 0xDC, 0xDD, 0x3F, 0x3F, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0x41, 0x45, 0x41,
|
||||
0x45, 0x45, 0x49, 0x49, 0x49, 0x49, 0x4F, 0x4F, 0x3F, 0x4F, 0x55, 0x55, 0x55,
|
||||
0x49, 0x7F, 0xF7, 0x7F, 0xF9, 0xFA, 0xFB, 0x3F, 0xFD, 0xFE, 0x7F
|
||||
};
|
||||
|
||||
static const unsigned char Lookup_32[128 * 3] = {
|
||||
/* Common */
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C,
|
||||
0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,
|
||||
0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26,
|
||||
0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x00, 0x30, 0x31, 0x32, 0x33,
|
||||
0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40,
|
||||
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D,
|
||||
0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A,
|
||||
0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
|
||||
0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54,
|
||||
0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F,
|
||||
|
||||
/* Windows */
|
||||
0x7F, 0x7F, 0x82, 0x7F, 0x84, 0x85, 0x86, 0x87, 0x7F, 0x89, 0x53, 0x8B, 0x53,
|
||||
0x54, 0x5A, 0x5A, 0x7F, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x96, 0x7F, 0x99,
|
||||
0x53, 0x9B, 0x53, 0x54, 0x5A, 0x5A, 0xA0, 0x7F, 0xA2, 0x4C, 0xA4, 0x41, 0xA6,
|
||||
0xA7, 0xA8, 0xA9, 0x53, 0xAB, 0xAC, 0x96, 0xAE, 0x5A, 0xB0, 0xB1, 0xB2, 0x4C,
|
||||
0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0x41, 0x53, 0xBB, 0x4C, 0xBD, 0x4C, 0x5A, 0x52,
|
||||
0x41, 0x41, 0x41, 0x41, 0x4C, 0x43, 0x43, 0x43, 0x45, 0x45, 0x45, 0x45, 0x49,
|
||||
0x49, 0x44, 0xD0, 0x4E, 0x4E, 0x4F, 0x4F, 0x4F, 0x4F, 0xD7, 0x52, 0x55, 0x55,
|
||||
0x55, 0x55, 0x59, 0x54, 0xDF, 0x52, 0x41, 0x41, 0x41, 0x41, 0x4C, 0x43, 0x43,
|
||||
0x43, 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x44, 0xD0, 0x4E, 0x4E, 0x4F, 0x4F,
|
||||
0x4F, 0x4F, 0xF7, 0x52, 0x55, 0x55, 0x55, 0x55, 0x59, 0x54, 0xFF,
|
||||
|
||||
/* Mac */
|
||||
0x41, 0x41, 0x41, 0x45, 0x41, 0x4F, 0x55, 0x41, 0x41, 0x43, 0x41, 0x43, 0x43,
|
||||
0x43, 0x45, 0x5A, 0x5A, 0x44, 0x49, 0x44, 0x45, 0x45, 0x45, 0x4F, 0x45, 0x4F,
|
||||
0x4F, 0x4F, 0x55, 0x45, 0x45, 0x55, 0xA0, 0xA1, 0x45, 0xA3, 0xA4, 0xA5, 0xA6,
|
||||
0xA7, 0xA8, 0xA9, 0xAA, 0x45, 0xAC, 0xAD, 0x47, 0x49, 0x49, 0x49, 0xB2, 0xB3,
|
||||
0x49, 0x4B, 0xB6, 0xB7, 0x4C, 0x4C, 0x4C, 0x4C, 0x4C, 0x4C, 0x4C, 0x4E, 0x4E,
|
||||
0x4E, 0xC2, 0xC3, 0x4E, 0x4E, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0x4E, 0x4F, 0x4F,
|
||||
0x4F, 0x4F, 0xD0, 0xD0, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0x4F, 0x52, 0x52,
|
||||
0x52, 0xDC, 0xDD, 0x52, 0x52, 0x52, 0x53, 0xE2, 0xE3, 0x53, 0x53, 0x53, 0x41,
|
||||
0x54, 0x54, 0x49, 0x5A, 0x5A, 0x55, 0x4F, 0x4F, 0x55, 0x55, 0x55, 0x55, 0x55,
|
||||
0x55, 0x55, 0x55, 0x59, 0x59, 0x4B, 0x5A, 0x4C, 0x4C, 0x47, 0xFF
|
||||
};
|
||||
|
||||
static const unsigned char Lookup_48[128 * 3] = {
|
||||
/* Common */
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C,
|
||||
0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,
|
||||
0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26,
|
||||
0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x00, 0x30, 0x31, 0x32, 0x33,
|
||||
0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40,
|
||||
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D,
|
||||
0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A,
|
||||
0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
|
||||
0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54,
|
||||
0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F,
|
||||
|
||||
/* Windows */
|
||||
0x7F, 0x7F, 0x82, 0x46, 0x84, 0x85, 0x86, 0x87, 0x7F, 0x89, 0x53, 0x8B, 0x8C,
|
||||
0x7F, 0x7F, 0x7F, 0x7F, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x96, 0x98, 0x99,
|
||||
0x53, 0x9B, 0x8C, 0x7F, 0x7F, 0x59, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6,
|
||||
0xA7, 0xA8, 0xA9, 0x41, 0xAB, 0xAC, 0x96, 0xAE, 0xAF, 0xB0, 0xB1, 0x32, 0x33,
|
||||
0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0x31, 0x4F, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0x41,
|
||||
0x41, 0x41, 0x41, 0x41, 0x41, 0xC6, 0x43, 0x45, 0x45, 0x45, 0x45, 0x49, 0x49,
|
||||
0x49, 0x49, 0xD0, 0x4E, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0xD7, 0x4F, 0x55, 0x55,
|
||||
0x55, 0x55, 0x59, 0xDE, 0xDF, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0xC6, 0x43,
|
||||
0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, 0xD0, 0x4E, 0x4F, 0x4F, 0x4F,
|
||||
0x4F, 0x4F, 0xF7, 0x4F, 0x55, 0x55, 0x55, 0x55, 0x59, 0xDE, 0x59,
|
||||
|
||||
/* Mac */
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C,
|
||||
0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99,
|
||||
0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6,
|
||||
0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAB, 0xAD, 0xAE, 0xAE, 0xB0, 0xB1, 0xB2, 0xB3,
|
||||
0xA7, 0xB5, 0xB6, 0xB7, 0xB8, 0xB8, 0xBA, 0xBA, 0xBC, 0xBC, 0xBE, 0xBE, 0xB7,
|
||||
0xC1, 0xC2, 0xC3, 0x46, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCB, 0xCD,
|
||||
0xCD, 0xC1, 0xD0, 0xD0, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD8, 0xDA,
|
||||
0xDA, 0xDC, 0xDD, 0xDD, 0x9F, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
|
||||
0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94,
|
||||
0x95, 0x96, 0x97, 0x98, 0x99, 0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F
|
||||
};
|
||||
|
||||
static const unsigned char Lookup_64[128 * 3] = {
|
||||
/* Common */
|
||||
0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,
|
||||
0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26,
|
||||
0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x00, 0x30, 0x31, 0x32, 0x33,
|
||||
0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40,
|
||||
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D,
|
||||
0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x56, 0x58, 0x55, 0x5A,
|
||||
0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
|
||||
0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54,
|
||||
0x55, 0x56, 0x56, 0x58, 0x55, 0x5A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F,
|
||||
|
||||
/* Windows */
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6,
|
||||
0xA7, 0xA8, 0xA9, 0x41, 0xAB, 0xAC, 0x96, 0xAE, 0xAF, 0xB0, 0xB1, 0x32, 0x33,
|
||||
0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0x31, 0x4F, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0x41,
|
||||
0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, 0x45, 0x45, 0x45, 0x45, 0x49, 0x49,
|
||||
0x49, 0x49, 0x44, 0x4E, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0xD7, 0x4F, 0x55, 0x55,
|
||||
0x55, 0x55, 0x55, 0xDE, 0xDF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
||||
/* Mac */
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6,
|
||||
0xA7, 0xA8, 0xA9, 0x41, 0xAB, 0xAC, 0x96, 0xAE, 0xAF, 0xB0, 0xB1, 0x32, 0x33,
|
||||
0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0x31, 0x4F, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0x41,
|
||||
0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, 0x45, 0x45, 0x45, 0x45, 0x49, 0x49,
|
||||
0x49, 0x49, 0x44, 0x4E, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0xD7, 0x4F, 0x55, 0x55,
|
||||
0x55, 0x55, 0x55, 0xDE, 0xDF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
static const unsigned char Lookup_80[128 * 3] = {
|
||||
/* Common */
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C,
|
||||
0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,
|
||||
0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26,
|
||||
0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x00, 0x30, 0x31, 0x32, 0x33,
|
||||
0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40,
|
||||
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D,
|
||||
0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x56, 0x58, 0x55, 0x5A,
|
||||
0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
|
||||
0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54,
|
||||
0x55, 0x56, 0x56, 0x58, 0x55, 0x5A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F,
|
||||
|
||||
/* Windows */
|
||||
0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55,
|
||||
|
||||
/* Mac */
|
||||
0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55,
|
||||
};
|
||||
|
||||
static const unsigned char Lookup_112[128 * 3] = {
|
||||
/* Common */
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C,
|
||||
0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,
|
||||
0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26,
|
||||
0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x00, 0x30, 0x31, 0x32, 0x33,
|
||||
0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40,
|
||||
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D,
|
||||
0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x56, 0x58, 0x55, 0x5A,
|
||||
0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
|
||||
0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54,
|
||||
0x55, 0x56, 0x56, 0x58, 0x55, 0x5A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F,
|
||||
|
||||
/* Windows */
|
||||
0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55,
|
||||
|
||||
/* Mac */
|
||||
0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55,
|
||||
};
|
||||
|
||||
static const unsigned char Lookup_128[128 * 3] = {
|
||||
/* Common */
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C,
|
||||
0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,
|
||||
0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26,
|
||||
0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33,
|
||||
0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40,
|
||||
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D,
|
||||
0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A,
|
||||
0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
|
||||
0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54,
|
||||
0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x7B, 0x7C, 0x7D, 0x7E, 0x00,
|
||||
|
||||
/* Windows */
|
||||
0x00, 0x00, 0x82, 0x46, 0x84, 0x85, 0x86, 0x87, 0x00, 0x89, 0x00, 0x8B, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x91, 0x92, 0x93, 0x94, 0x95, 0x2D, 0x2D, 0x00, 0x99,
|
||||
0x00, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x09, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6,
|
||||
0xA7, 0xA8, 0xA9, 0x00, 0xAB, 0xAC, 0x2D, 0xAE, 0x2D, 0xB0, 0xB1, 0x32, 0x33,
|
||||
0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0xBA,
|
||||
0xA2, 0xC2, 0xC3, 0xC4, 0xB8, 0xC6, 0xB9, 0xC8, 0xBA, 0xCA, 0xCB, 0xCC, 0xCD,
|
||||
0xCE, 0xBC, 0xD0, 0xD1, 0x00, 0xD3, 0xD4, 0xBE, 0xD6, 0xD7, 0xD8, 0xBF, 0xBA,
|
||||
0xBE, 0xA2, 0xB8, 0xB9, 0xBA, 0xBE, 0xA2, 0xC2, 0xC3, 0xC4, 0xB8, 0xC6, 0xB9,
|
||||
0xC8, 0xBA, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xBC, 0xD0, 0xD1, 0xD3, 0xD3, 0xD4,
|
||||
0xBE, 0xD6, 0xD7, 0xD8, 0xBF, 0xBA, 0xBE, 0xBC, 0xBE, 0xBF, 0x00,
|
||||
|
||||
/* Mac */
|
||||
0x41, 0x31, 0x32, 0x45, 0x33, 0x4F, 0x55, 0x87, 0x41, 0x41, 0x41, 0x00, 0x8C,
|
||||
0x43, 0x45, 0x45, 0x45, 0x45, 0x92, 0x93, 0x49, 0x49, 0x96, 0x97, 0x98, 0x4F,
|
||||
0x4F, 0x9B, 0x3F, 0x55, 0x55, 0x55, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6,
|
||||
0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3,
|
||||
0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xAB, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0xB0,
|
||||
0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0x09, 0xBD, 0xCC, 0xB0,
|
||||
0xB6, 0xCF, 0x2D, 0x2D, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xB8, 0xAB, 0xC3, 0xBD,
|
||||
0xB6, 0xB8, 0xAB, 0xC3, 0xBF, 0xBD, 0xB0, 0xB5, 0xBE, 0xA2, 0xB6, 0xBC, 0xA1,
|
||||
0xB8, 0xAB, 0xA5, 0xBA, 0xA4, 0xBB, 0xC1, 0xC3, 0xA6, 0xBF, 0xC4, 0xAA, 0xC6,
|
||||
0xA3, 0xBF, 0xAA, 0xCC, 0xBD, 0xB7, 0xAB, 0xBD, 0xAB, 0xBD, 0x3F,
|
||||
};
|
||||
|
||||
static const unsigned char Lookup_144[128 * 3] = {
|
||||
/* Common */
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C,
|
||||
0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,
|
||||
0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26,
|
||||
0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33,
|
||||
0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40,
|
||||
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D,
|
||||
0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A,
|
||||
0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
|
||||
0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54,
|
||||
0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x7B, 0x7C, 0x7D, 0x7E, 0x00,
|
||||
|
||||
/* Windows */
|
||||
0x00, 0x00, 0x82, 0x46, 0x84, 0x85, 0x86, 0x87, 0x00, 0x89, 0x53, 0x8B, 0x8C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x91, 0x92, 0x93, 0x94, 0x95, 0x2D, 0x2D, 0x98, 0x99,
|
||||
0x53, 0x9B, 0x8C, 0x00, 0x00, 0x59, 0x09, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6,
|
||||
0xA7, 0xA8, 0xA9, 0x41, 0xAB, 0xAC, 0x2D, 0xAE, 0xAF, 0xB0, 0xB1, 0x32, 0x33,
|
||||
0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0x31, 0x4F, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0x41,
|
||||
0xC1, 0x41, 0x41, 0x41, 0x41, 0xC6, 0x43, 0x45, 0xC9, 0x45, 0x45, 0x49, 0xCD,
|
||||
0x49, 0x49, 0xD0, 0x4E, 0x4F, 0xD3, 0x4F, 0x4F, 0xD6, 0xD7, 0xD6, 0x55, 0xDA,
|
||||
0x55, 0x55, 0xDD, 0xDE, 0xDF, 0x41, 0xC1, 0x41, 0x41, 0x41, 0x41, 0xC6, 0x43,
|
||||
0x45, 0xC9, 0x45, 0x45, 0x49, 0xCD, 0x49, 0x49, 0xD0, 0x4E, 0x4F, 0xD3, 0x4F,
|
||||
0x4F, 0xD6, 0xF7, 0xD6, 0x55, 0xDA, 0x55, 0x55, 0xDD, 0xDE, 0x59,
|
||||
|
||||
/* Mac */
|
||||
0x00, 0x00, 0x82, 0x46, 0x84, 0x85, 0x86, 0x87, 0x00, 0x89, 0x53, 0x8B, 0x8C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x91, 0x92, 0x93, 0x94, 0x95, 0x2D, 0x2D, 0x98, 0x99,
|
||||
0x53, 0x9B, 0x8C, 0x00, 0x00, 0x59, 0x09, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6,
|
||||
0xA7, 0xA8, 0xA9, 0x41, 0xAB, 0xAC, 0x2D, 0xAE, 0xAF, 0xB0, 0xB1, 0x32, 0x33,
|
||||
0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0x31, 0x4F, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0x41,
|
||||
0xC1, 0x41, 0x41, 0x41, 0x41, 0xC6, 0x43, 0x45, 0xC9, 0x45, 0x45, 0x49, 0xCD,
|
||||
0x49, 0x49, 0xD0, 0x4E, 0x4F, 0xD3, 0x4F, 0x4F, 0xD6, 0xD7, 0xD6, 0x55, 0xDA,
|
||||
0x55, 0x55, 0xDD, 0xDE, 0xDF, 0x41, 0xC1, 0x41, 0x41, 0x41, 0x41, 0xC6, 0x43,
|
||||
0x45, 0xC9, 0x45, 0x45, 0x49, 0xCD, 0x49, 0x49, 0xD0, 0x4E, 0x4F, 0xD3, 0x4F,
|
||||
0x4F, 0xD6, 0xF7, 0xD6, 0x55, 0xDA, 0x55, 0x55, 0xDD, 0xDE, 0x59,
|
||||
};
|
||||
|
||||
static const unsigned char Lookup_160[128 * 3] = {
|
||||
/* Common */
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C,
|
||||
0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,
|
||||
0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26,
|
||||
0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33,
|
||||
0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40,
|
||||
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D,
|
||||
0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A,
|
||||
0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
|
||||
0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54,
|
||||
0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x7B, 0x7C, 0x7D, 0x7E, 0x00,
|
||||
|
||||
/* Windows */
|
||||
0x00, 0x00, 0x82, 0x46, 0x84, 0x85, 0x86, 0x87, 0x00, 0x89, 0x53, 0x8B, 0x8C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x91, 0x92, 0x93, 0x94, 0x95, 0x2D, 0x2D, 0x98, 0x99,
|
||||
0x53, 0x9B, 0x8C, 0x00, 0x00, 0x59, 0x09, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6,
|
||||
0xA7, 0xA8, 0xA9, 0x41, 0xAB, 0xAC, 0x2D, 0xAE, 0xAF, 0xB0, 0xB1, 0x32, 0x33,
|
||||
0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0x31, 0x4F, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0x41,
|
||||
0x41, 0x41, 0x41, 0x41, 0x41, 0xC6, 0xC7, 0x45, 0x45, 0x45, 0x45, 0x49, 0x49,
|
||||
0x49, 0x49, 0xD0, 0x4E, 0x4F, 0x4F, 0x4F, 0x4F, 0xD6, 0xD7, 0x4F, 0x55, 0x55,
|
||||
0x55, 0xDC, 0xDD, 0xDE, 0xDF, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0xC6, 0xC7,
|
||||
0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, 0xD0, 0x4E, 0x4F, 0x4F, 0x4F,
|
||||
0x4F, 0xD6, 0xF7, 0x4F, 0x55, 0x55, 0x55, 0xDC, 0xDD, 0xDE, 0x59,
|
||||
|
||||
/* Mac */
|
||||
0x00, 0x00, 0x82, 0x46, 0x84, 0x85, 0x86, 0x87, 0x00, 0x89, 0x53, 0x8B, 0x8C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x91, 0x92, 0x93, 0x94, 0x95, 0x2D, 0x2D, 0x98, 0x99,
|
||||
0x53, 0x9B, 0x8C, 0x00, 0x00, 0x59, 0x09, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6,
|
||||
0xA7, 0xA8, 0xA9, 0x41, 0xAB, 0xAC, 0x2D, 0xAE, 0xAF, 0xB0, 0xB1, 0x32, 0x33,
|
||||
0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0x31, 0x4F, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0x41,
|
||||
0x41, 0x41, 0x41, 0x41, 0x41, 0xC6, 0xC7, 0x45, 0x45, 0x45, 0x45, 0x49, 0x49,
|
||||
0x49, 0x49, 0xD0, 0x4E, 0x4F, 0x4F, 0x4F, 0x4F, 0xD6, 0xD7, 0x4F, 0x55, 0x55,
|
||||
0x55, 0xDC, 0xDD, 0xDE, 0xDF, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0xC6, 0xC7,
|
||||
0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, 0xD0, 0x4E, 0x4F, 0x4F, 0x4F,
|
||||
0x4F, 0xD6, 0xF7, 0x4F, 0x55, 0x55, 0x55, 0xDC, 0xDD, 0xDE, 0x59,
|
||||
};
|
||||
|
||||
static const unsigned char Lookup_176[128 * 3] = {
|
||||
/* Common */
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C,
|
||||
0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,
|
||||
0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26,
|
||||
0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33,
|
||||
0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40,
|
||||
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D,
|
||||
0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A,
|
||||
0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
|
||||
0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54,
|
||||
0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x7B, 0x7C, 0x7D, 0x7E, 0x00,
|
||||
|
||||
/* Windows */
|
||||
0x00, 0x00, 0x82, 0x46, 0x84, 0x85, 0x86, 0x87, 0x00, 0x89, 0x53, 0x8B, 0x8C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x91, 0x92, 0x93, 0x94, 0x95, 0x2D, 0x2D, 0x98, 0x99,
|
||||
0x53, 0x9B, 0x8C, 0x00, 0x00, 0x59, 0x09, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6,
|
||||
0xA7, 0xA8, 0xA9, 0x41, 0xAB, 0xAC, 0x2D, 0xAE, 0xAF, 0xB0, 0xB1, 0x32, 0x33,
|
||||
0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0x31, 0x4F, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0x41,
|
||||
0x41, 0x41, 0x41, 0xC4, 0xC5, 0xC4, 0x43, 0x45, 0x45, 0x45, 0x45, 0x49, 0x49,
|
||||
0x49, 0x49, 0x44, 0x4E, 0x4F, 0x4F, 0x4F, 0x4F, 0xD6, 0xD7, 0xD6, 0x55, 0x55,
|
||||
0x55, 0x59, 0x59, 0xDE, 0xDF, 0x41, 0x41, 0x41, 0x41, 0xC4, 0xC5, 0xC4, 0x43,
|
||||
0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, 0x44, 0x4E, 0x4F, 0x4F, 0x4F,
|
||||
0x4F, 0xD6, 0xF7, 0xD6, 0x55, 0x55, 0x55, 0x59, 0x59, 0xDE, 0x59,
|
||||
|
||||
/* Mac */
|
||||
0x80, 0x81, 0x43, 0x45, 0x4E, 0x85, 0x59, 0x41, 0x41, 0x41, 0x80, 0x41, 0x81,
|
||||
0x43, 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, 0x4E, 0x4F, 0x4F, 0x4F,
|
||||
0x85, 0x4F, 0x55, 0x55, 0x55, 0x59, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6,
|
||||
0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0x80, 0x85, 0xB0, 0xB1, 0xB2, 0xB3,
|
||||
0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0x41, 0x4F, 0xBD, 0x80, 0x85, 0xC0,
|
||||
0xC1, 0xC2, 0xC3, 0x46, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0x09, 0x41, 0x41, 0x4F,
|
||||
0xCE, 0xCE, 0x2D, 0x2D, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0x59, 0x59, 0xDA,
|
||||
0xDB, 0xDC, 0xDD, 0x3F, 0x3F, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0x41, 0x45, 0x41,
|
||||
0x45, 0x45, 0x49, 0x49, 0x49, 0x49, 0x4F, 0x4F, 0x3F, 0x4F, 0x55, 0x55, 0x55,
|
||||
0x49, 0x00, 0xF7, 0x00, 0xF9, 0xFA, 0xFB, 0x3F, 0xFD, 0xFE, 0x00
|
||||
};
|
||||
|
||||
static const unsigned char Lookup_208[128 * 3] = {
|
||||
/* Common */
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C,
|
||||
0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,
|
||||
0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26,
|
||||
0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33,
|
||||
0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40,
|
||||
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D,
|
||||
0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A,
|
||||
0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
|
||||
0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54,
|
||||
0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F,
|
||||
|
||||
/* Windows */
|
||||
0x80, 0x81, 0x82, 0x46, 0x84, 0x85, 0x86, 0x87, 0x5E, 0x89, 0x8A, 0x8B, 0x8C,
|
||||
0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99,
|
||||
0x9A, 0x9B, 0x8C, 0x9D, 0x00, 0x9F, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6,
|
||||
0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0x32, 0x33,
|
||||
0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0x31, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0xC0,
|
||||
0xC1, 0xC2, 0xC1, 0xC1, 0xC1, 0xC1, 0xC7, 0xC8, 0xC9, 0xC9, 0xCB, 0xCC, 0xCD,
|
||||
0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA,
|
||||
0xDB, 0x00, 0xDD, 0xDE, 0xDF, 0x41, 0xE1, 0x41, 0xE3, 0xE4, 0xE5, 0xE6, 0x43,
|
||||
0x45, 0x45, 0x45, 0x45, 0xEC, 0xEC, 0x49, 0x49, 0xF0, 0xF1, 0xF2, 0xF3, 0x4F,
|
||||
0xF5, 0xF6, 0xF7, 0xF8, 0x55, 0xFA, 0x55, 0x55, 0x00, 0x00, 0xFF,
|
||||
|
||||
/* Mac */
|
||||
0x41, 0x81, 0x43, 0x45, 0x4E, 0x4F, 0x55, 0x41, 0x41, 0x41, 0x41, 0x8B, 0x8C,
|
||||
0x43, 0x45, 0x45, 0x45, 0x45, 0x49, 0x93, 0x49, 0x49, 0x4E, 0x4F, 0x98, 0x4F,
|
||||
0x4F, 0x9B, 0x55, 0x55, 0x55, 0x55, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6,
|
||||
0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3,
|
||||
0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0xC0,
|
||||
0xC1, 0xC2, 0xC1, 0xC1, 0xC1, 0xC1, 0xC7, 0xC8, 0xC9, 0xC9, 0xCB, 0xCC, 0xCD,
|
||||
0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA,
|
||||
0xDB, 0xDC, 0xDD, 0xDE, 0xDF, 0x00, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,
|
||||
0xE8, 0xE9, 0xE9, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0xF1, 0xF2, 0xF3, 0xF4,
|
||||
0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF,
|
||||
};
|
||||
|
||||
static const unsigned char Lookup_224[128 * 3] = {
|
||||
/* Common */
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C,
|
||||
0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,
|
||||
0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26,
|
||||
0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33,
|
||||
0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40,
|
||||
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D,
|
||||
0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A,
|
||||
0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
|
||||
0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54,
|
||||
0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F,
|
||||
|
||||
/* Windows */
|
||||
0x80, 0x81, 0x82, 0x46, 0x84, 0x85, 0x86, 0x87, 0x5E, 0x89, 0x8A, 0x8B, 0x8C,
|
||||
0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99,
|
||||
0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6,
|
||||
0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0x32, 0x33,
|
||||
0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0x31, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0xC0,
|
||||
0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD,
|
||||
0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA,
|
||||
0xDB, 0xDC, 0xDD, 0xDE, 0xDF, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,
|
||||
0xE8, 0xE9, 0xEA, 0xEA, 0xEC, 0xED, 0xED, 0xEF, 0xEF, 0xF1, 0xF2, 0xF3, 0xF3,
|
||||
0xF5, 0xF5, 0xF7, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0x00, 0x00, 0xFF,
|
||||
|
||||
/* Mac */
|
||||
0x41, 0x41, 0x43, 0x45, 0x4E, 0x4F, 0x55, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
|
||||
0x43, 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, 0x4E, 0x4F, 0x4F, 0x4F,
|
||||
0x4F, 0x4F, 0x55, 0x55, 0x55, 0x55, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6,
|
||||
0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3,
|
||||
0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0xC0,
|
||||
0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD,
|
||||
0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA,
|
||||
0xDB, 0xDC, 0xDD, 0xDE, 0xDF, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,
|
||||
0xE8, 0xE9, 0xEA, 0xEA, 0xEC, 0xED, 0xED, 0xEF, 0xEF, 0xF1, 0xF2, 0xF3, 0xF3,
|
||||
0xF5, 0xF5, 0xF7, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF,
|
||||
};
|
||||
|
||||
/***********************************************************************
|
||||
* LHashValOfNameSysA (OLEAUT32.166)
|
||||
*
|
||||
* Produce a string hash value.
|
||||
*
|
||||
* PARAMS
|
||||
* skind [I] Type of the system.
|
||||
* lcid [I] Locale id for the hash.
|
||||
* lpStr [I] String to hash.
|
||||
*
|
||||
* RETURNS
|
||||
* Success: The hash value of the string.
|
||||
* Failure: 0, if lpStr is NULL.
|
||||
*
|
||||
* NOTES
|
||||
* This function produces a two part hash: The high word is based on
|
||||
* skind and lcid, while the low word is based on a repeated string
|
||||
* hash of skind/str.
|
||||
*/
|
||||
ULONG WINAPI LHashValOfNameSysA( SYSKIND skind, LCID lcid, LPCSTR lpStr)
|
||||
{
|
||||
ULONG nOffset, nMask = skind == SYS_MAC ? 1 : 0;
|
||||
ULONG nHiWord, nLoWord = 0x0deadbee;
|
||||
const unsigned char *str = (const unsigned char *)lpStr, *pnLookup = NULL;
|
||||
|
||||
if (!str)
|
||||
return 0;
|
||||
|
||||
lcid = ConvertDefaultLocale(lcid);
|
||||
|
||||
switch (PRIMARYLANGID(LANGIDFROMLCID(lcid)))
|
||||
{
|
||||
default:
|
||||
ERR("Unknown lcid %lx, treating as latin-based, please report\n", lcid);
|
||||
/* .. Fall Through .. */
|
||||
case LANG_AFRIKAANS: case LANG_ALBANIAN: case LANG_ARMENIAN:
|
||||
case LANG_ASSAMESE: case LANG_AZERI: case LANG_BASQUE:
|
||||
case LANG_BELARUSIAN: case LANG_BENGALI: case LANG_BULGARIAN:
|
||||
case LANG_CATALAN: case LANG_DANISH: case LANG_DIVEHI:
|
||||
case LANG_DUTCH: case LANG_ENGLISH: case LANG_ESTONIAN:
|
||||
case LANG_FAEROESE: case LANG_FINNISH: case LANG_FRENCH:
|
||||
case LANG_GALICIAN: case LANG_GEORGIAN: case LANG_GERMAN:
|
||||
case LANG_GUJARATI: case LANG_HINDI: case LANG_INDONESIAN:
|
||||
case LANG_ITALIAN: case LANG_KANNADA: case LANG_KASHMIRI:
|
||||
case LANG_KAZAK: case LANG_KONKANI: case LANG_KYRGYZ:
|
||||
case LANG_LATVIAN: case LANG_LITHUANIAN: case LANG_MACEDONIAN:
|
||||
case LANG_MALAY: case LANG_MALAYALAM: case LANG_MANIPURI:
|
||||
case LANG_MARATHI: case LANG_MONGOLIAN: case LANG_NEPALI:
|
||||
case LANG_ORIYA: case LANG_PORTUGUESE: case LANG_PUNJABI:
|
||||
case LANG_ROMANIAN: case LANG_SANSKRIT: case LANG_SERBIAN:
|
||||
case LANG_SINDHI: case LANG_SLOVENIAN: case LANG_SWAHILI:
|
||||
case LANG_SWEDISH: case LANG_SYRIAC: case LANG_TAMIL:
|
||||
case LANG_TATAR: case LANG_TELUGU: case LANG_THAI:
|
||||
case LANG_UKRAINIAN: case LANG_URDU: case LANG_UZBEK:
|
||||
case LANG_VIETNAMESE: case LANG_GAELIC: case LANG_MALTESE:
|
||||
case LANG_MAORI: case LANG_RHAETO_ROMANCE:
|
||||
case LANG_SAAMI: case LANG_SORBIAN: case LANG_SUTU:
|
||||
case LANG_TSONGA: case LANG_TSWANA: case LANG_VENDA:
|
||||
case LANG_XHOSA: case LANG_ZULU: case LANG_ESPERANTO:
|
||||
case LANG_WALON: case LANG_CORNISH: case LANG_WELSH:
|
||||
case LANG_BRETON:
|
||||
nOffset = 16;
|
||||
pnLookup = Lookup_16;
|
||||
break;
|
||||
case LANG_CZECH: case LANG_HUNGARIAN: case LANG_POLISH:
|
||||
case LANG_SLOVAK: case LANG_SPANISH:
|
||||
nOffset = 32;
|
||||
pnLookup = Lookup_32;
|
||||
break;
|
||||
case LANG_HEBREW:
|
||||
nOffset = 48;
|
||||
pnLookup = Lookup_48;
|
||||
break;
|
||||
case LANG_JAPANESE:
|
||||
nOffset = 64;
|
||||
pnLookup = Lookup_64;
|
||||
break;
|
||||
case LANG_KOREAN:
|
||||
nOffset = 80;
|
||||
pnLookup = Lookup_80;
|
||||
break;
|
||||
case LANG_CHINESE:
|
||||
nOffset = 112;
|
||||
pnLookup = Lookup_112;
|
||||
break;
|
||||
case LANG_GREEK:
|
||||
nOffset = 128;
|
||||
pnLookup = Lookup_128;
|
||||
break;
|
||||
case LANG_ICELANDIC:
|
||||
nOffset = 144;
|
||||
pnLookup = Lookup_144;
|
||||
break;
|
||||
case LANG_TURKISH:
|
||||
nOffset = 160;
|
||||
pnLookup = Lookup_160;
|
||||
break;
|
||||
case LANG_NORWEGIAN:
|
||||
if (SUBLANGID(LANGIDFROMLCID(lcid)) == SUBLANG_NORWEGIAN_NYNORSK)
|
||||
{
|
||||
nOffset = 176;
|
||||
pnLookup = Lookup_176;
|
||||
}
|
||||
else
|
||||
{
|
||||
nOffset = 16;
|
||||
pnLookup = Lookup_16;
|
||||
}
|
||||
break;
|
||||
case LANG_ARABIC:
|
||||
case LANG_FARSI:
|
||||
nOffset = 208;
|
||||
pnLookup = Lookup_208;
|
||||
break;
|
||||
case LANG_RUSSIAN:
|
||||
nOffset = 224;
|
||||
pnLookup = Lookup_224;
|
||||
break;
|
||||
}
|
||||
|
||||
nHiWord = (nOffset | nMask) << 16;
|
||||
|
||||
while (*str)
|
||||
{
|
||||
ULONG newLoWord = 0, i;
|
||||
|
||||
/* Cumulative prime multiplication (*37) with modulo 2^32 wrap-around */
|
||||
for (i = 0; i < 37; i++)
|
||||
newLoWord += nLoWord;
|
||||
|
||||
nLoWord = newLoWord + pnLookup[*str > 0x7f && nMask ? *str + 0x80 : *str];
|
||||
str++;
|
||||
}
|
||||
/* Constrain to a prime modulo and sizeof(WORD) */
|
||||
nLoWord = (nLoWord % 65599) & 0xffff;
|
||||
|
||||
return nHiWord | nLoWord;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* LHashValOfNameSys (OLEAUT32.165)
|
||||
*
|
||||
* See LHashValOfNameSysA.
|
||||
*/
|
||||
ULONG WINAPI LHashValOfNameSys(SYSKIND skind, LCID lcid, LPCOLESTR str)
|
||||
{
|
||||
LPSTR strA;
|
||||
ULONG res;
|
||||
INT len;
|
||||
|
||||
if (!str) return 0;
|
||||
len = WideCharToMultiByte( CP_ACP, 0, str, -1, NULL, 0, NULL, NULL );
|
||||
strA = HeapAlloc( GetProcessHeap(), 0, len );
|
||||
WideCharToMultiByte( CP_ACP, 0, str, -1, strA, len, NULL, NULL );
|
||||
res = LHashValOfNameSysA(skind, lcid, strA);
|
||||
HeapFree(GetProcessHeap(), 0, strA);
|
||||
return res;
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
# $Id: makefile,v 1.5 2004/02/07 18:53:58 mf Exp $
|
||||
|
||||
PATH_TO_TOP = ../..
|
||||
|
||||
TARGET_TYPE = winedll
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
File diff suppressed because it is too large
Load diff
|
@ -1,250 +0,0 @@
|
|||
/*
|
||||
* OLE2DISP library
|
||||
*
|
||||
* Copyright 1995 Martin von Loewis
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "wine/windef16.h"
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "ole2.h"
|
||||
#include "oleauto.h"
|
||||
#include "winerror.h"
|
||||
|
||||
#include "ole2disp.h"
|
||||
#include "olectl.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
||||
|
||||
/* This implementation of the BSTR API is 16-bit only. It
|
||||
represents BSTR as a 16:16 far pointer, and the strings
|
||||
as ISO-8859 */
|
||||
|
||||
/******************************************************************************
|
||||
* BSTR_AllocBytes [Internal]
|
||||
*/
|
||||
static BSTR16 BSTR_AllocBytes(int n)
|
||||
{
|
||||
void *ptr = HeapAlloc( GetProcessHeap(), 0, n );
|
||||
return (BSTR16)MapLS(ptr);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* BSTR_Free [INTERNAL]
|
||||
*/
|
||||
static void BSTR_Free(BSTR16 in)
|
||||
{
|
||||
void *ptr = MapSL( (SEGPTR)in );
|
||||
UnMapLS( (SEGPTR)in );
|
||||
HeapFree( GetProcessHeap(), 0, ptr );
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* BSTR_GetAddr [INTERNAL]
|
||||
*/
|
||||
static void* BSTR_GetAddr(BSTR16 in)
|
||||
{
|
||||
return in ? MapSL((SEGPTR)in) : 0;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* SysAllocString [OLE2DISP.2]
|
||||
*
|
||||
* Create a BSTR16 from an OLESTR16 (16 Bit).
|
||||
*
|
||||
* PARAMS
|
||||
* oleStr [I] Source to create BSTR16 from
|
||||
*
|
||||
* RETURNS
|
||||
* Success: A BSTR16 allocated with SysAllocStringLen16().
|
||||
* Failure: NULL, if oleStr is NULL.
|
||||
*/
|
||||
BSTR16 WINAPI SysAllocString16(LPCOLESTR16 oleStr)
|
||||
{
|
||||
BSTR16 out;
|
||||
|
||||
if (!oleStr) return 0;
|
||||
|
||||
out = BSTR_AllocBytes(strlen(oleStr)+1);
|
||||
if (!out) return 0;
|
||||
strcpy(BSTR_GetAddr(out),oleStr);
|
||||
return out;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* SysReallocString [OLE2DISP.3]
|
||||
*
|
||||
* Change the length of a previously created BSTR16 (16 Bit).
|
||||
*
|
||||
* PARAMS
|
||||
* pbstr [I] BSTR16 to change the length of
|
||||
* oleStr [I] New source for pbstr
|
||||
*
|
||||
* RETURNS
|
||||
* Success: 1
|
||||
* Failure: 0.
|
||||
*
|
||||
* NOTES
|
||||
* SysAllocStringStringLen16().
|
||||
*/
|
||||
INT16 WINAPI SysReAllocString16(LPBSTR16 pbstr,LPCOLESTR16 oleStr)
|
||||
{
|
||||
BSTR16 new=SysAllocString16(oleStr);
|
||||
BSTR_Free(*pbstr);
|
||||
*pbstr=new;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* SysAllocStringLen [OLE2DISP.4]
|
||||
*
|
||||
* Create a BSTR16 from an OLESTR16 of a given character length (16 Bit).
|
||||
*
|
||||
* PARAMS
|
||||
* oleStr [I] Source to create BSTR16 from
|
||||
* len [I] Length of oleStr in wide characters
|
||||
*
|
||||
* RETURNS
|
||||
* Success: A newly allocated BSTR16 from SysAllocStringByteLen16()
|
||||
* Failure: NULL, if len is >= 0x80000000, or memory allocation fails.
|
||||
*
|
||||
* NOTES
|
||||
* See SysAllocStringByteLen16().
|
||||
*/
|
||||
BSTR16 WINAPI SysAllocStringLen16(const char *oleStr, int len)
|
||||
{
|
||||
BSTR16 out=BSTR_AllocBytes(len+1);
|
||||
|
||||
if (!out)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Copy the information in the buffer.
|
||||
* Since it is valid to pass a NULL pointer here, we'll initialize the
|
||||
* buffer to nul if it is the case.
|
||||
*/
|
||||
if (oleStr != 0)
|
||||
strcpy(BSTR_GetAddr(out),oleStr);
|
||||
else
|
||||
memset(BSTR_GetAddr(out), 0, len+1);
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* SysReAllocStringLen [OLE2DISP.5]
|
||||
*
|
||||
* Change the length of a previously created BSTR16 (16 Bit).
|
||||
*
|
||||
* PARAMS
|
||||
* pbstr [I] BSTR16 to change the length of
|
||||
* oleStr [I] New source for pbstr
|
||||
* len [I] Length of oleStr in characters
|
||||
*
|
||||
* RETURNS
|
||||
* Success: 1. The size of pbstr is updated.
|
||||
* Failure: 0, if len >= 0x8000 or memory allocation fails.
|
||||
*
|
||||
* NOTES
|
||||
* See SysAllocStringByteLen16().
|
||||
* *pbstr may be changed by this function.
|
||||
*/
|
||||
int WINAPI SysReAllocStringLen16(BSTR16 *old,const char *in,int len)
|
||||
{
|
||||
/* FIXME: Check input length */
|
||||
BSTR16 new=SysAllocStringLen16(in,len);
|
||||
BSTR_Free(*old);
|
||||
*old=new;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* SysFreeString [OLE2DISP.6]
|
||||
*
|
||||
* Free a BSTR16 (16 Bit).
|
||||
*
|
||||
* PARAMS
|
||||
* str [I] String to free.
|
||||
*
|
||||
* RETURNS
|
||||
* Nothing.
|
||||
*/
|
||||
void WINAPI SysFreeString16(BSTR16 str)
|
||||
{
|
||||
BSTR_Free(str);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* SysStringLen [OLE2DISP.7]
|
||||
*
|
||||
* Get the allocated length of a BSTR16 in characters (16 Bit).
|
||||
*
|
||||
* PARAMS
|
||||
* str [I] BSTR16 to find the length of
|
||||
*
|
||||
* RETURNS
|
||||
* The allocated length of str, or 0 if str is NULL.
|
||||
*/
|
||||
int WINAPI SysStringLen16(BSTR16 str)
|
||||
{
|
||||
return strlen(BSTR_GetAddr(str));
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CreateDispTypeInfo [OLE2DISP.31]
|
||||
*/
|
||||
HRESULT WINAPI CreateDispTypeInfo16(
|
||||
INTERFACEDATA *pidata,
|
||||
LCID lcid,
|
||||
ITypeInfo **pptinfo)
|
||||
{
|
||||
FIXME("(%p,%ld,%p),stub\n",pidata,lcid,pptinfo);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CreateStdDispatch [OLE2DISP.32]
|
||||
*/
|
||||
HRESULT WINAPI CreateStdDispatch16(
|
||||
IUnknown* punkOuter,
|
||||
void* pvThis,
|
||||
ITypeInfo* ptinfo,
|
||||
IUnknown** ppunkStdDisp)
|
||||
{
|
||||
FIXME("(%p,%p,%p,%p),stub\n",punkOuter, pvThis, ptinfo,
|
||||
ppunkStdDisp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* RegisterActiveObject [OLE2DISP.35]
|
||||
*/
|
||||
HRESULT WINAPI RegisterActiveObject16(
|
||||
IUnknown *punk, REFCLSID rclsid, DWORD dwFlags, unsigned long *pdwRegister
|
||||
) {
|
||||
FIXME("(%p,%s,0x%08lx,%p):stub\n",punk,debugstr_guid(rclsid),dwFlags,pdwRegister);
|
||||
return E_NOTIMPL;
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
/*
|
||||
* Copyright 1995 Martin von Loewis
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef __WINE_OLEAUT32_OLE2DISP_H
|
||||
#define __WINE_OLEAUT32_OLE2DISP_H
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wtypes.h"
|
||||
#include "wine/windef16.h"
|
||||
|
||||
typedef CHAR OLECHAR16;
|
||||
typedef LPSTR LPOLESTR16;
|
||||
typedef LPCSTR LPCOLESTR16;
|
||||
typedef OLECHAR16 *BSTR16;
|
||||
typedef BSTR16 *LPBSTR16;
|
||||
|
||||
BSTR16 WINAPI SysAllocString16(LPCOLESTR16);
|
||||
BSTR16 WINAPI SysAllocStringLen16(const char*, int);
|
||||
VOID WINAPI SysFreeString16(BSTR16);
|
||||
INT16 WINAPI SysReAllocString16(LPBSTR16,LPCOLESTR16);
|
||||
int WINAPI SysReAllocStringLen16(BSTR16*, const char*, int);
|
||||
int WINAPI SysStringLen16(BSTR16);
|
||||
|
||||
#endif /* !defined(__WINE_OLEAUT32_OLE2DISP_H) */
|
|
@ -1,135 +0,0 @@
|
|||
1 stub DLLGETCLASSOBJECT
|
||||
2 pascal SysAllocString(str) SysAllocString16
|
||||
3 pascal SysReallocString(ptr str) SysReAllocString16
|
||||
4 pascal SysAllocStringLen(str word) SysAllocStringLen16
|
||||
5 pascal SysReAllocStringLen(ptr str word) SysReAllocStringLen16
|
||||
6 pascal SysFreeString(segstr) SysFreeString16
|
||||
7 pascal SysStringLen(segstr) SysStringLen16
|
||||
8 stub VARIANTINIT
|
||||
9 stub VARIANTCLEAR
|
||||
10 stub VARIANTCOPY
|
||||
11 stub VARIANTCOPYIND
|
||||
12 stub VARIANTCHANGETYPE
|
||||
13 stub VARIANTTIMETODOSDATETIME
|
||||
14 stub DOSDATETIMETOVARIANTTIME
|
||||
15 stub SAFEARRAYCREATE
|
||||
16 stub SAFEARRAYDESTROY
|
||||
17 stub SAFEARRAYGETDIM
|
||||
18 stub SAFEARRAYGETELEMSIZE
|
||||
19 stub SAFEARRAYGETUBOUND
|
||||
20 stub SAFEARRAYGETLBOUND
|
||||
21 stub SAFEARRAYLOCK
|
||||
22 stub SAFEARRAYUNLOCK
|
||||
23 stub SAFEARRAYACCESSDATA
|
||||
24 stub SAFEARRAYUNACCESSDATA
|
||||
25 stub SAFEARRAYGETELEMENT
|
||||
26 stub SAFEARRAYPUTELEMENT
|
||||
27 stub SAFEARRAYCOPY
|
||||
28 stub DISPGETPARAM
|
||||
29 stub DISPGETIDSOFNAMES
|
||||
30 stub DISPINVOKE
|
||||
31 pascal CreateDispTypeInfo(ptr long ptr) CreateDispTypeInfo16
|
||||
32 pascal CreateStdDispatch(ptr ptr ptr ptr) CreateStdDispatch16
|
||||
33 stub _IID_IDISPATCH
|
||||
34 stub _IID_IENUMVARIANT
|
||||
35 pascal RegisterActiveObject(ptr ptr long ptr) RegisterActiveObject16
|
||||
36 stub REVOKEACTIVEOBJECT
|
||||
37 stub GETACTIVEOBJECT
|
||||
38 stub SAFEARRAYALLOCDESCRIPTOR
|
||||
39 stub SAFEARRAYALLOCDATA
|
||||
40 stub SAFEARRAYDESTROYDESCRIPTOR
|
||||
41 stub SAFEARRAYDESTROYDATA
|
||||
42 stub SAFEARRAYREDIM
|
||||
43 stub VARI2FROMI4
|
||||
44 stub VARI2FROMR4
|
||||
45 stub VARI2FROMR8
|
||||
46 stub VARI2FROMCY
|
||||
47 stub VARI2FROMDATE
|
||||
48 stub VARI2FROMSTR
|
||||
49 stub VARI2FROMDISP
|
||||
50 stub VARI2FROMBOOL
|
||||
51 stub VARI4FROMI2
|
||||
52 stub VARI4FROMR4
|
||||
53 stub VARI4FROMR8
|
||||
54 stub VARI4FROMCY
|
||||
55 stub VARI4FROMDATE
|
||||
56 stub VARI4FROMSTR
|
||||
57 stub VARI4FROMDISP
|
||||
58 stub VARI4FROMBOOL
|
||||
59 stub VARR4FROMI2
|
||||
60 stub VARR4FROMI4
|
||||
61 stub VARR4FROMR8
|
||||
62 stub VARR4FROMCY
|
||||
63 stub VARR4FROMDATE
|
||||
64 stub VARR4FROMSTR
|
||||
65 stub VARR4FROMDISP
|
||||
66 stub VARR4FROMBOOL
|
||||
67 stub VARR8FROMI2
|
||||
68 stub VARR8FROMI4
|
||||
69 stub VARR8FROMR4
|
||||
70 stub VARR8FROMCY
|
||||
71 stub VARR8FROMDATE
|
||||
72 stub VARR8FROMSTR
|
||||
73 stub VARR8FROMDISP
|
||||
74 stub VARR8FROMBOOL
|
||||
75 stub VARDATEFROMI2
|
||||
76 stub VARDATEFROMI4
|
||||
77 stub VARDATEFROMR4
|
||||
78 stub VARDATEFROMR8
|
||||
79 stub VARDATEFROMCY
|
||||
80 stub VARDATEFROMSTR
|
||||
81 stub VARDATEFROMDISP
|
||||
82 stub VARDATEFROMBOOL
|
||||
83 stub VARCYFROMI2
|
||||
84 stub VARCYFROMI4
|
||||
85 stub VARCYFROMR4
|
||||
86 stub VARCYFROMR8
|
||||
87 stub VARCYFROMDATE
|
||||
88 stub VARCYFROMSTR
|
||||
89 stub VARCYFROMDISP
|
||||
90 stub VARCYFROMBOOL
|
||||
91 stub VARBSTRFROMI2
|
||||
92 stub VARBSTRFROMI4
|
||||
93 stub VARBSTRFROMR4
|
||||
94 stub VARBSTRFROMR8
|
||||
95 stub VARBSTRFROMCY
|
||||
96 stub VARBSTRFROMDATE
|
||||
97 stub VARBSTRFROMDISP
|
||||
98 stub VARBSTRFROMBOOL
|
||||
99 stub VARBOOLFROMI2
|
||||
100 stub VARBOOLFROMI4
|
||||
101 stub VARBOOLFROMR4
|
||||
102 stub VARBOOLFROMR8
|
||||
103 stub VARBOOLFROMDATE
|
||||
104 stub VARBOOLFROMCY
|
||||
105 stub VARBOOLFROMSTR
|
||||
106 stub VARBOOLFROMDISP
|
||||
107 stub DOINVOKEMETHOD
|
||||
108 stub VARIANTCHANGETYPEEX
|
||||
109 stub SAFEARRAYPTROFINDEX
|
||||
110 stub SETERRORINFO
|
||||
111 stub GETERRORINFO
|
||||
112 stub CREATEERRORINFO
|
||||
113 stub _IID_IERRORINFO
|
||||
114 stub _IID_ICREATEERRORINFO
|
||||
115 stub _IID_ISUPPORTERRORINFO
|
||||
116 stub VARUI1FROMI2
|
||||
117 stub VARUI1FROMI4
|
||||
118 stub VARUI1FROMR4
|
||||
119 stub VARUI1FROMR8
|
||||
120 stub VARUI1FROMCY
|
||||
121 stub VARUI1FROMDATE
|
||||
122 stub VARUI1FROMSTR
|
||||
123 stub VARUI1FROMDISP
|
||||
124 stub VARUI1FROMBOOL
|
||||
125 stub VARI2FROMUI1
|
||||
126 stub VARI4FROMUI1
|
||||
127 stub VARR4FROMUI1
|
||||
128 stub VARR8FROMUI1
|
||||
129 stub VARDATEFROMUI1
|
||||
130 stub VARCYFROMUI1
|
||||
131 stub VARBSTRFROMUI1
|
||||
132 stub VARBOOLFROMUI1
|
||||
133 stub DLLCANUNLOADNOW
|
||||
#134 stub WEP
|
||||
#135 stub ___EXPORTEDSTUB
|
|
@ -1,755 +0,0 @@
|
|||
/*
|
||||
* OLEAUT32
|
||||
*
|
||||
* Copyright 1999, 2000 Marcus Meissner
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
#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 "tmarshal.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
||||
|
||||
/* The OLE Automation ProxyStub Interface Class (aka Typelib Marshaler) */
|
||||
extern const GUID CLSID_PSOAInterface;
|
||||
|
||||
/* IDispatch marshaler */
|
||||
extern const GUID CLSID_PSDispatch;
|
||||
|
||||
static BOOL BSTR_bCache = TRUE; /* Cache allocations to minimise alloc calls? */
|
||||
|
||||
HMODULE OLEAUT32_hModule = NULL;
|
||||
|
||||
/******************************************************************************
|
||||
* BSTR {OLEAUT32}
|
||||
*
|
||||
* NOTES
|
||||
* BSTR is a simple typedef for a wide-character string used as the principle
|
||||
* string type in ole automation. When encapsulated in a Variant type they are
|
||||
* automatically copied and destroyed as the variant is processed.
|
||||
*
|
||||
* The low level BSTR Api allows manipulation of these strings and is used by
|
||||
* higher level Api calls to manage the strings transparently to the caller.
|
||||
*
|
||||
* Internally the BSTR type is allocated with space for a DWORD byte count before
|
||||
* the string data begins. This is undocumented and non-system code should not
|
||||
* access the count directly. Use SysStringLen() or SysStringByteLen()
|
||||
* instead. Note that the byte count does not include the terminating NUL.
|
||||
*
|
||||
* To create a new BSTR, use SysAllocString(), SysAllocStringLen() or
|
||||
* SysAllocStringByteLen(). To change the size of an existing BSTR, use SysReAllocString()
|
||||
* or SysReAllocStringLen(). Finally to destroy a string use SysFreeString().
|
||||
*
|
||||
* BSTR's are cached by Ole Automation by default. To override this behaviour
|
||||
* either set the environment variable 'OANOCACHE', or call SetOaNoCache().
|
||||
*
|
||||
* SEE ALSO
|
||||
* 'Inside OLE, second edition' by Kraig Brockshmidt.
|
||||
*/
|
||||
|
||||
/******************************************************************************
|
||||
* SysStringLen [OLEAUT32.7]
|
||||
*
|
||||
* Get the allocated length of a BSTR in wide characters.
|
||||
*
|
||||
* PARAMS
|
||||
* str [I] BSTR to find the length of
|
||||
*
|
||||
* RETURNS
|
||||
* The allocated length of str, or 0 if str is NULL.
|
||||
*
|
||||
* NOTES
|
||||
* See BSTR.
|
||||
* The returned length may be different from the length of the string as
|
||||
* calculated by lstrlenW(), since it returns the length that was used to
|
||||
* allocate the string by SysAllocStringLen().
|
||||
*/
|
||||
UINT WINAPI SysStringLen(BSTR str)
|
||||
{
|
||||
DWORD* bufferPointer;
|
||||
|
||||
if (!str) return 0;
|
||||
/*
|
||||
* The length of the string (in bytes) is contained in a DWORD placed
|
||||
* just before the BSTR pointer
|
||||
*/
|
||||
bufferPointer = (DWORD*)str;
|
||||
|
||||
bufferPointer--;
|
||||
|
||||
return (int)(*bufferPointer/sizeof(WCHAR));
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* SysStringByteLen [OLEAUT32.149]
|
||||
*
|
||||
* Get the allocated length of a BSTR in bytes.
|
||||
*
|
||||
* PARAMS
|
||||
* str [I] BSTR to find the length of
|
||||
*
|
||||
* RETURNS
|
||||
* The allocated length of str, or 0 if str is NULL.
|
||||
*
|
||||
* NOTES
|
||||
* See SysStringLen(), BSTR().
|
||||
*/
|
||||
UINT WINAPI SysStringByteLen(BSTR str)
|
||||
{
|
||||
DWORD* bufferPointer;
|
||||
|
||||
if (!str) return 0;
|
||||
/*
|
||||
* The length of the string (in bytes) is contained in a DWORD placed
|
||||
* just before the BSTR pointer
|
||||
*/
|
||||
bufferPointer = (DWORD*)str;
|
||||
|
||||
bufferPointer--;
|
||||
|
||||
return (int)(*bufferPointer);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* SysAllocString [OLEAUT32.2]
|
||||
*
|
||||
* Create a BSTR from an OLESTR.
|
||||
*
|
||||
* PARAMS
|
||||
* str [I] Source to create BSTR from
|
||||
*
|
||||
* RETURNS
|
||||
* Success: A BSTR allocated with SysAllocStringLen().
|
||||
* Failure: NULL, if oleStr is NULL.
|
||||
*
|
||||
* NOTES
|
||||
* See BSTR.
|
||||
* MSDN (October 2001) incorrectly states that NULL is returned if oleStr has
|
||||
* a length of 0. Native Win32 and this implementation both return a valid
|
||||
* empty BSTR in this case.
|
||||
*/
|
||||
BSTR WINAPI SysAllocString(LPCOLESTR str)
|
||||
{
|
||||
if (!str) return 0;
|
||||
|
||||
/* Delegate this to the SysAllocStringLen32 method. */
|
||||
return SysAllocStringLen(str, lstrlenW(str));
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* SysFreeString [OLEAUT32.6]
|
||||
*
|
||||
* Free a BSTR.
|
||||
*
|
||||
* PARAMS
|
||||
* str [I] BSTR to free.
|
||||
*
|
||||
* RETURNS
|
||||
* Nothing.
|
||||
*
|
||||
* NOTES
|
||||
* See BSTR.
|
||||
* str may be NULL, in which case this function does nothing.
|
||||
*/
|
||||
void WINAPI SysFreeString(BSTR str)
|
||||
{
|
||||
DWORD* bufferPointer;
|
||||
|
||||
/* NULL is a valid parameter */
|
||||
if(!str) return;
|
||||
|
||||
/*
|
||||
* We have to be careful when we free a BSTR pointer, it points to
|
||||
* the beginning of the string but it skips the byte count contained
|
||||
* before the string.
|
||||
*/
|
||||
bufferPointer = (DWORD*)str;
|
||||
|
||||
bufferPointer--;
|
||||
|
||||
/*
|
||||
* Free the memory from its "real" origin.
|
||||
*/
|
||||
HeapFree(GetProcessHeap(), 0, bufferPointer);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* SysAllocStringLen [OLEAUT32.4]
|
||||
*
|
||||
* Create a BSTR from an OLESTR of a given wide character length.
|
||||
*
|
||||
* PARAMS
|
||||
* str [I] Source to create BSTR from
|
||||
* len [I] Length of oleStr in wide characters
|
||||
*
|
||||
* RETURNS
|
||||
* Success: A newly allocated BSTR from SysAllocStringByteLen()
|
||||
* Failure: NULL, if len is >= 0x80000000, or memory allocation fails.
|
||||
*
|
||||
* NOTES
|
||||
* See BSTR(), SysAllocStringByteLen().
|
||||
*/
|
||||
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
|
||||
{
|
||||
DWORD bufferSize;
|
||||
DWORD* newBuffer;
|
||||
WCHAR* stringBuffer;
|
||||
|
||||
/*
|
||||
* Find the length of the buffer passed-in in bytes.
|
||||
*/
|
||||
bufferSize = len * sizeof (WCHAR);
|
||||
|
||||
/*
|
||||
* Allocate a new buffer to hold the string.
|
||||
* don't forget to keep an empty spot at the beginning of the
|
||||
* buffer for the character count and an extra character at the
|
||||
* end for the NULL.
|
||||
*/
|
||||
newBuffer = (DWORD*)HeapAlloc(GetProcessHeap(),
|
||||
0,
|
||||
bufferSize + sizeof(WCHAR) + sizeof(DWORD));
|
||||
|
||||
/*
|
||||
* If the memory allocation failed, return a null pointer.
|
||||
*/
|
||||
if (newBuffer==0)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Copy the length of the string in the placeholder.
|
||||
*/
|
||||
*newBuffer = bufferSize;
|
||||
|
||||
/*
|
||||
* Skip the byte count.
|
||||
*/
|
||||
newBuffer++;
|
||||
|
||||
/*
|
||||
* Copy the information in the buffer.
|
||||
* Since it is valid to pass a NULL pointer here, we'll initialize the
|
||||
* buffer to nul if it is the case.
|
||||
*/
|
||||
if (str != 0)
|
||||
memcpy(newBuffer, str, bufferSize);
|
||||
else
|
||||
memset(newBuffer, 0, bufferSize);
|
||||
|
||||
/*
|
||||
* Make sure that there is a nul character at the end of the
|
||||
* string.
|
||||
*/
|
||||
stringBuffer = (WCHAR*)newBuffer;
|
||||
stringBuffer[len] = L'\0';
|
||||
|
||||
return (LPWSTR)stringBuffer;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* SysReAllocStringLen [OLEAUT32.5]
|
||||
*
|
||||
* Change the length of a previously created BSTR.
|
||||
*
|
||||
* PARAMS
|
||||
* old [O] BSTR to change the length of
|
||||
* str [I] New source for pbstr
|
||||
* len [I] Length of oleStr in wide characters
|
||||
*
|
||||
* RETURNS
|
||||
* Success: 1. The size of pbstr is updated.
|
||||
* Failure: 0, if len >= 0x80000000 or memory allocation fails.
|
||||
*
|
||||
* NOTES
|
||||
* See BSTR(), SysAllocStringByteLen().
|
||||
* *pbstr may be changed by this function.
|
||||
*/
|
||||
int WINAPI SysReAllocStringLen(BSTR* old, const OLECHAR* str, unsigned int len)
|
||||
{
|
||||
if (*old!=NULL) {
|
||||
DWORD newbytelen = len*sizeof(WCHAR);
|
||||
DWORD *ptr = HeapReAlloc(GetProcessHeap(),0,((DWORD*)*old)-1,newbytelen+sizeof(WCHAR)+sizeof(DWORD));
|
||||
*old = (BSTR)(ptr+1);
|
||||
*ptr = newbytelen;
|
||||
if (str) {
|
||||
memcpy(*old, str, newbytelen);
|
||||
(*old)[len] = 0;
|
||||
} else {
|
||||
/* Subtle hidden feature: The old string data is still there
|
||||
* when 'in' is NULL!
|
||||
* Some Microsoft program needs it.
|
||||
*/
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* Allocate the new string
|
||||
*/
|
||||
*old = SysAllocStringLen(str, len);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* SysAllocStringByteLen [OLEAUT32.150]
|
||||
*
|
||||
* Create a BSTR from an OLESTR of a given byte length.
|
||||
*
|
||||
* PARAMS
|
||||
* str [I] Source to create BSTR from
|
||||
* len [I] Length of oleStr in bytes
|
||||
*
|
||||
* RETURNS
|
||||
* Success: A newly allocated BSTR
|
||||
* Failure: NULL, if len is >= 0x80000000, or memory allocation fails.
|
||||
*
|
||||
* NOTES
|
||||
* -If len is 0 or oleStr is NULL the resulting string is empty ("").
|
||||
* -This function always NUL terminates the resulting BSTR.
|
||||
* -oleStr may be either an LPCSTR or LPCOLESTR, since it is copied
|
||||
* without checking for a terminating NUL.
|
||||
* See BSTR.
|
||||
*/
|
||||
BSTR WINAPI SysAllocStringByteLen(LPCSTR str, UINT len)
|
||||
{
|
||||
DWORD* newBuffer;
|
||||
char* stringBuffer;
|
||||
|
||||
/*
|
||||
* Allocate a new buffer to hold the string.
|
||||
* don't forget to keep an empty spot at the beginning of the
|
||||
* buffer for the character count and an extra character at the
|
||||
* end for the NULL.
|
||||
*/
|
||||
newBuffer = (DWORD*)HeapAlloc(GetProcessHeap(),
|
||||
0,
|
||||
len + sizeof(WCHAR) + sizeof(DWORD));
|
||||
|
||||
/*
|
||||
* If the memory allocation failed, return a null pointer.
|
||||
*/
|
||||
if (newBuffer==0)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Copy the length of the string in the placeholder.
|
||||
*/
|
||||
*newBuffer = len;
|
||||
|
||||
/*
|
||||
* Skip the byte count.
|
||||
*/
|
||||
newBuffer++;
|
||||
|
||||
/*
|
||||
* Copy the information in the buffer.
|
||||
* Since it is valid to pass a NULL pointer here, we'll initialize the
|
||||
* buffer to nul if it is the case.
|
||||
*/
|
||||
if (str != 0)
|
||||
memcpy(newBuffer, str, len);
|
||||
|
||||
/*
|
||||
* Make sure that there is a nul character at the end of the
|
||||
* string.
|
||||
*/
|
||||
stringBuffer = (char *)newBuffer;
|
||||
stringBuffer[len] = 0;
|
||||
stringBuffer[len+1] = 0;
|
||||
|
||||
return (LPWSTR)stringBuffer;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* SysReAllocString [OLEAUT32.3]
|
||||
*
|
||||
* Change the length of a previously created BSTR.
|
||||
*
|
||||
* PARAMS
|
||||
* old [I/O] BSTR to change the length of
|
||||
* str [I] New source for pbstr
|
||||
*
|
||||
* RETURNS
|
||||
* Success: 1
|
||||
* Failure: 0.
|
||||
*
|
||||
* NOTES
|
||||
* See BSTR(), SysAllocStringStringLen().
|
||||
*/
|
||||
INT WINAPI SysReAllocString(LPBSTR old,LPCOLESTR str)
|
||||
{
|
||||
/*
|
||||
* Sanity check
|
||||
*/
|
||||
if (old==NULL)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Make sure we free the old string.
|
||||
*/
|
||||
if (*old!=NULL)
|
||||
SysFreeString(*old);
|
||||
|
||||
/*
|
||||
* Allocate the new string
|
||||
*/
|
||||
*old = SysAllocString(str);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* SetOaNoCache (OLEAUT32.327)
|
||||
*
|
||||
* Instruct Ole Automation not to cache BSTR allocations.
|
||||
*
|
||||
* PARAMS
|
||||
* None.
|
||||
*
|
||||
* RETURNS
|
||||
* Nothing.
|
||||
*
|
||||
* NOTES
|
||||
* See BSTR.
|
||||
*/
|
||||
void WINAPI SetOaNoCache(void)
|
||||
{
|
||||
BSTR_bCache = FALSE;
|
||||
}
|
||||
|
||||
static WCHAR _delimiter[2] = {'!',0}; /* default delimiter apparently */
|
||||
static WCHAR *pdelimiter = &_delimiter[0];
|
||||
|
||||
/***********************************************************************
|
||||
* RegisterActiveObject (OLEAUT32.33)
|
||||
*/
|
||||
HRESULT WINAPI RegisterActiveObject(
|
||||
LPUNKNOWN punk,REFCLSID rcid,DWORD dwFlags,LPDWORD pdwRegister
|
||||
) {
|
||||
WCHAR guidbuf[80];
|
||||
HRESULT ret;
|
||||
LPRUNNINGOBJECTTABLE runobtable;
|
||||
LPMONIKER moniker;
|
||||
|
||||
StringFromGUID2(rcid,guidbuf,39);
|
||||
ret = CreateItemMoniker(pdelimiter,guidbuf,&moniker);
|
||||
if (FAILED(ret))
|
||||
return ret;
|
||||
ret = GetRunningObjectTable(0,&runobtable);
|
||||
if (FAILED(ret)) {
|
||||
IMoniker_Release(moniker);
|
||||
return ret;
|
||||
}
|
||||
ret = IRunningObjectTable_Register(runobtable,dwFlags,punk,moniker,pdwRegister);
|
||||
IRunningObjectTable_Release(runobtable);
|
||||
IMoniker_Release(moniker);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* RevokeActiveObject (OLEAUT32.34)
|
||||
*/
|
||||
HRESULT WINAPI RevokeActiveObject(DWORD xregister,LPVOID reserved)
|
||||
{
|
||||
LPRUNNINGOBJECTTABLE runobtable;
|
||||
HRESULT ret;
|
||||
|
||||
ret = GetRunningObjectTable(0,&runobtable);
|
||||
if (FAILED(ret)) return ret;
|
||||
ret = IRunningObjectTable_Revoke(runobtable,xregister);
|
||||
if (SUCCEEDED(ret)) ret = S_OK;
|
||||
IRunningObjectTable_Release(runobtable);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetActiveObject (OLEAUT32.35)
|
||||
*/
|
||||
HRESULT WINAPI GetActiveObject(REFCLSID rcid,LPVOID preserved,LPUNKNOWN *ppunk)
|
||||
{
|
||||
WCHAR guidbuf[80];
|
||||
HRESULT ret;
|
||||
LPRUNNINGOBJECTTABLE runobtable;
|
||||
LPMONIKER moniker;
|
||||
|
||||
StringFromGUID2(rcid,guidbuf,39);
|
||||
ret = CreateItemMoniker(pdelimiter,guidbuf,&moniker);
|
||||
if (FAILED(ret))
|
||||
return ret;
|
||||
ret = GetRunningObjectTable(0,&runobtable);
|
||||
if (FAILED(ret)) {
|
||||
IMoniker_Release(moniker);
|
||||
return ret;
|
||||
}
|
||||
ret = IRunningObjectTable_GetObject(runobtable,moniker,ppunk);
|
||||
IRunningObjectTable_Release(runobtable);
|
||||
IMoniker_Release(moniker);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* OaBuildVersion [OLEAUT32.170]
|
||||
*
|
||||
* Get the Ole Automation build version.
|
||||
*
|
||||
* PARAMS
|
||||
* None
|
||||
*
|
||||
* RETURNS
|
||||
* The build version.
|
||||
*
|
||||
* NOTES
|
||||
* Known oleaut32.dll versions:
|
||||
*| OLE Ver. Comments Date Build Ver.
|
||||
*| -------- ------------------------- ---- ---------
|
||||
*| OLE 2.1 NT 1993-95 10 3023
|
||||
*| OLE 2.1 10 3027
|
||||
*| Win32s Ver 1.1e 20 4049
|
||||
*| OLE 2.20 W95/NT 1993-96 20 4112
|
||||
*| OLE 2.20 W95/NT 1993-96 20 4118
|
||||
*| OLE 2.20 W95/NT 1993-96 20 4122
|
||||
*| OLE 2.30 W95/NT 1993-98 30 4265
|
||||
*| OLE 2.40 NT?? 1993-98 40 4267
|
||||
*| OLE 2.40 W98 SE orig. file 1993-98 40 4275
|
||||
*| OLE 2.40 W2K orig. file 1993-XX 40 4514
|
||||
*
|
||||
* Currently the versions returned are 2.20 for Win3.1, 2.30 for Win95 & NT 3.51,
|
||||
* and 2.40 for all later versions. The build number is maximum, i.e. 0xffff.
|
||||
*/
|
||||
ULONG WINAPI OaBuildVersion()
|
||||
{
|
||||
switch(GetVersion() & 0x8000ffff) /* mask off build number */
|
||||
{
|
||||
case 0x80000a03: /* WIN31 */
|
||||
return MAKELONG(0xffff, 20);
|
||||
case 0x00003303: /* NT351 */
|
||||
return MAKELONG(0xffff, 30);
|
||||
case 0x80000004: /* WIN95; I'd like to use the "standard" w95 minor
|
||||
version here (30), but as we still use w95
|
||||
as default winver (which is good IMHO), I better
|
||||
play safe and use the latest value for w95 for now.
|
||||
Change this as soon as default winver gets changed
|
||||
to something more recent */
|
||||
case 0x80000a04: /* WIN98 */
|
||||
case 0x00000004: /* NT40 */
|
||||
case 0x00000005: /* W2K */
|
||||
return MAKELONG(0xffff, 40);
|
||||
default:
|
||||
ERR("Version value not known yet. Please investigate it !\n");
|
||||
return 0x0;
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* GetRecordInfoFromGuids [OLEAUT32.322]
|
||||
*
|
||||
* RETURNS
|
||||
* Success: S_OK
|
||||
* Failure: E_INVALIDARG, if any argument is invalid.
|
||||
*
|
||||
* BUGS
|
||||
* Unimplemented
|
||||
*/
|
||||
HRESULT WINAPI GetRecordInfoFromGuids(
|
||||
REFGUID rGuidTypeLib,
|
||||
ULONG uVerMajor,
|
||||
ULONG uVerMinor,
|
||||
LCID lcid,
|
||||
REFGUID rGuidTypeInfo,
|
||||
IRecordInfo** ppRecInfo)
|
||||
{
|
||||
FIXME("(%p,%ld,%ld,%ld,%p,%p),stub!\n",rGuidTypeLib, uVerMajor, uVerMinor, lcid, rGuidTypeInfo, ppRecInfo);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* OleTranslateColor [OLEAUT32.421]
|
||||
*
|
||||
* Convert an OLE_COLOR to a COLORREF.
|
||||
*
|
||||
* PARAMS
|
||||
* clr [I] Color to convert
|
||||
* hpal [I] Handle to a palette for the conversion
|
||||
* pColorRef [O] Destination for converted color, or NULL to test if the conversion is ok
|
||||
*
|
||||
* RETURNS
|
||||
* Success: S_OK. The conversion is ok, and pColorRef contains the converted color if non-NULL.
|
||||
* Failure: E_INVALIDARG, if any argument is invalid.
|
||||
*
|
||||
* FIXME
|
||||
* Document the conversion rules.
|
||||
*/
|
||||
HRESULT WINAPI OleTranslateColor(
|
||||
OLE_COLOR clr,
|
||||
HPALETTE hpal,
|
||||
COLORREF* pColorRef)
|
||||
{
|
||||
COLORREF colorref;
|
||||
BYTE b = HIBYTE(HIWORD(clr));
|
||||
|
||||
TRACE("(%08lx, %p, %p):stub\n", clr, hpal, pColorRef);
|
||||
|
||||
/*
|
||||
* In case pColorRef is NULL, provide our own to simplify the code.
|
||||
*/
|
||||
if (pColorRef == NULL)
|
||||
pColorRef = &colorref;
|
||||
|
||||
switch (b)
|
||||
{
|
||||
case 0x00:
|
||||
{
|
||||
if (hpal != 0)
|
||||
*pColorRef = PALETTERGB(GetRValue(clr),
|
||||
GetGValue(clr),
|
||||
GetBValue(clr));
|
||||
else
|
||||
*pColorRef = clr;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x01:
|
||||
{
|
||||
if (hpal != 0)
|
||||
{
|
||||
PALETTEENTRY pe;
|
||||
/*
|
||||
* Validate the palette index.
|
||||
*/
|
||||
if (GetPaletteEntries(hpal, LOWORD(clr), 1, &pe) == 0)
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
*pColorRef = clr;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x02:
|
||||
*pColorRef = clr;
|
||||
break;
|
||||
|
||||
case 0x80:
|
||||
{
|
||||
int index = LOBYTE(LOWORD(clr));
|
||||
|
||||
/*
|
||||
* Validate GetSysColor index.
|
||||
*/
|
||||
if ((index < COLOR_SCROLLBAR) || (index > COLOR_MENUBAR))
|
||||
return E_INVALIDARG;
|
||||
|
||||
*pColorRef = GetSysColor(index);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
extern HRESULT OLEAUTPS_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv);
|
||||
|
||||
extern void _get_STDFONT_CF(LPVOID);
|
||||
extern void _get_STDPIC_CF(LPVOID);
|
||||
|
||||
/***********************************************************************
|
||||
* DllGetClassObject (OLEAUT32.1)
|
||||
*/
|
||||
HRESULT WINAPI OLEAUT32_DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
|
||||
{
|
||||
*ppv = NULL;
|
||||
if (IsEqualGUID(rclsid,&CLSID_StdFont)) {
|
||||
if (IsEqualGUID(iid,&IID_IClassFactory)) {
|
||||
_get_STDFONT_CF(ppv);
|
||||
IClassFactory_AddRef((IClassFactory*)*ppv);
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
if (IsEqualGUID(rclsid,&CLSID_StdPicture)) {
|
||||
if (IsEqualGUID(iid,&IID_IClassFactory)) {
|
||||
_get_STDPIC_CF(ppv);
|
||||
IClassFactory_AddRef((IClassFactory*)*ppv);
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
if (IsEqualGUID(rclsid,&CLSID_PSDispatch)) {
|
||||
return OLEAUTPS_DllGetClassObject(rclsid,iid,ppv);
|
||||
}
|
||||
if (IsEqualGUID(rclsid,&CLSID_PSOAInterface)) {
|
||||
if (S_OK==TypeLibFac_DllGetClassObject(rclsid,iid,ppv))
|
||||
return S_OK;
|
||||
/*FALLTHROUGH*/
|
||||
}
|
||||
FIXME("\n\tCLSID:\t%s,\n\tIID:\t%s\n",debugstr_guid(rclsid),debugstr_guid(iid));
|
||||
return CLASS_E_CLASSNOTAVAILABLE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllCanUnloadNow (OLEAUT32.410)
|
||||
*
|
||||
* Determine if this dll can be unloaded from the callers address space.
|
||||
*
|
||||
* PARAMS
|
||||
* None.
|
||||
*
|
||||
* RETURNS
|
||||
* Always returns S_FALSE. This dll cannot be unloaded.
|
||||
*/
|
||||
HRESULT WINAPI OLEAUT32_DllCanUnloadNow(void)
|
||||
{
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* DllMain [OLEAUT32.@]
|
||||
*/
|
||||
BOOL WINAPI DllMain(HINSTANCE hInstDll, DWORD fdwReason, LPVOID lpvReserved)
|
||||
{
|
||||
TRACE("(%p,%lu,%p)\n", hInstDll, fdwReason, lpvReserved);
|
||||
|
||||
switch (fdwReason) {
|
||||
case DLL_PROCESS_ATTACH:
|
||||
DisableThreadLibraryCalls(hInstDll);
|
||||
OLEAUT32_hModule = (HMODULE)hInstDll;
|
||||
break;
|
||||
case DLL_PROCESS_DETACH:
|
||||
break;
|
||||
};
|
||||
|
||||
return TRUE;
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
/*
|
||||
* Top level resource file for oleaut32
|
||||
*
|
||||
* Copyright 2003 Jon Griffiths
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "resource.h"
|
||||
|
||||
#include "version.rc"
|
||||
|
||||
#include "oleaut32_De.rc"
|
||||
#include "oleaut32_Dk.rc"
|
||||
#include "oleaut32_En.rc"
|
||||
#include "oleaut32_Es.rc"
|
||||
#include "oleaut32_Cz.rc"
|
||||
#include "oleaut32_Fr.rc"
|
||||
#include "oleaut32_Hu.rc"
|
||||
#include "oleaut32_It.rc"
|
||||
#include "oleaut32_Nl.rc"
|
||||
#include "oleaut32_No.rc"
|
||||
#include "oleaut32_Pl.rc"
|
||||
#include "oleaut32_Pt.rc"
|
||||
#include "oleaut32_Sv.rc"
|
||||
#include "oleaut32_Th.rc"
|
||||
|
||||
/*
|
||||
* FIXME:
|
||||
* Finnish, Greek, Hebrew, Japanese, Korean, Portuguese,
|
||||
* Russian, Turkish, Slovenian (at least) are localised in XP Home.
|
||||
* I expect Chinese etc are localised in Asian Editions also.
|
||||
*/
|
|
@ -1,416 +0,0 @@
|
|||
1 stdcall -private DllGetClassObject(ptr ptr ptr) OLEAUT32_DllGetClassObject
|
||||
2 stdcall SysAllocString(wstr)
|
||||
3 stdcall SysReAllocString(ptr wstr)
|
||||
4 stdcall SysAllocStringLen(wstr long)
|
||||
5 stdcall SysReAllocStringLen(ptr ptr long)
|
||||
6 stdcall SysFreeString(wstr)
|
||||
7 stdcall SysStringLen(wstr)
|
||||
8 stdcall VariantInit(ptr)
|
||||
9 stdcall VariantClear(ptr)
|
||||
10 stdcall VariantCopy(ptr ptr)
|
||||
11 stdcall VariantCopyInd(ptr ptr)
|
||||
12 stdcall VariantChangeType(ptr ptr long long)
|
||||
13 stdcall VariantTimeToDosDateTime(double ptr ptr)
|
||||
14 stdcall DosDateTimeToVariantTime(long long ptr)
|
||||
15 stdcall SafeArrayCreate(long long ptr)
|
||||
16 stdcall SafeArrayDestroy(ptr)
|
||||
17 stdcall SafeArrayGetDim(ptr)
|
||||
18 stdcall SafeArrayGetElemsize(ptr)
|
||||
19 stdcall SafeArrayGetUBound(ptr long long)
|
||||
20 stdcall SafeArrayGetLBound(ptr long long)
|
||||
21 stdcall SafeArrayLock(ptr)
|
||||
22 stdcall SafeArrayUnlock(ptr)
|
||||
23 stdcall SafeArrayAccessData(ptr ptr)
|
||||
24 stdcall SafeArrayUnaccessData(ptr)
|
||||
25 stdcall SafeArrayGetElement(ptr ptr ptr)
|
||||
26 stdcall SafeArrayPutElement(ptr ptr ptr)
|
||||
27 stdcall SafeArrayCopy(ptr ptr)
|
||||
28 stdcall DispGetParam(ptr long long ptr ptr)
|
||||
29 stdcall DispGetIDsOfNames(ptr ptr long ptr)
|
||||
30 stdcall DispInvoke(ptr ptr long long ptr ptr ptr ptr)
|
||||
31 stdcall CreateDispTypeInfo(ptr long ptr)
|
||||
32 stdcall CreateStdDispatch(ptr ptr ptr ptr)
|
||||
33 stdcall RegisterActiveObject(ptr ptr long ptr)
|
||||
34 stdcall RevokeActiveObject(long ptr)
|
||||
35 stdcall GetActiveObject(ptr ptr ptr)
|
||||
36 stdcall SafeArrayAllocDescriptor(long ptr)
|
||||
37 stdcall SafeArrayAllocData(ptr)
|
||||
38 stdcall SafeArrayDestroyDescriptor(ptr)
|
||||
39 stdcall SafeArrayDestroyData(ptr)
|
||||
40 stdcall SafeArrayRedim(ptr ptr)
|
||||
41 stdcall SafeArrayAllocDescriptorEx(long long ptr)
|
||||
42 stdcall SafeArrayCreateEx(long long ptr ptr)
|
||||
43 stdcall SafeArrayCreateVectorEx(long long long ptr)
|
||||
44 stdcall SafeArraySetRecordInfo(ptr ptr)
|
||||
45 stdcall SafeArrayGetRecordInfo(ptr ptr)
|
||||
46 stdcall VarParseNumFromStr(wstr long long ptr ptr)
|
||||
47 stdcall VarNumFromParseNum(ptr ptr long ptr)
|
||||
48 stdcall VarI2FromUI1(long ptr)
|
||||
49 stdcall VarI2FromI4(long ptr)
|
||||
50 stdcall VarI2FromR4(long ptr)
|
||||
51 stdcall VarI2FromR8(double ptr)
|
||||
52 stdcall VarI2FromCy(long long ptr)
|
||||
53 stdcall VarI2FromDate(double ptr)
|
||||
54 stdcall VarI2FromStr(wstr long long ptr)
|
||||
55 stdcall VarI2FromDisp(ptr long ptr)
|
||||
56 stdcall VarI2FromBool(long ptr)
|
||||
57 stdcall SafeArraySetIID(ptr ptr)
|
||||
58 stdcall VarI4FromUI1(long ptr)
|
||||
59 stdcall VarI4FromI2(long ptr)
|
||||
60 stdcall VarI4FromR4(long ptr)
|
||||
61 stdcall VarI4FromR8(double ptr)
|
||||
62 stdcall VarI4FromCy(long long ptr)
|
||||
63 stdcall VarI4FromDate(double ptr)
|
||||
64 stdcall VarI4FromStr(wstr long long ptr)
|
||||
65 stdcall VarI4FromDisp(ptr long ptr)
|
||||
66 stdcall VarI4FromBool(long ptr)
|
||||
67 stdcall SafeArrayGetIID(ptr ptr)
|
||||
68 stdcall VarR4FromUI1(long ptr)
|
||||
69 stdcall VarR4FromI2(long ptr)
|
||||
70 stdcall VarR4FromI4(long ptr)
|
||||
71 stdcall VarR4FromR8(double ptr)
|
||||
72 stdcall VarR4FromCy(long long ptr)
|
||||
73 stdcall VarR4FromDate(double ptr)
|
||||
74 stdcall VarR4FromStr(wstr long long ptr)
|
||||
75 stdcall VarR4FromDisp(ptr long ptr)
|
||||
76 stdcall VarR4FromBool(long ptr)
|
||||
77 stdcall SafeArrayGetVartype(ptr ptr)
|
||||
78 stdcall VarR8FromUI1(long ptr)
|
||||
79 stdcall VarR8FromI2(long ptr)
|
||||
80 stdcall VarR8FromI4(long ptr)
|
||||
81 stdcall VarR8FromR4(long ptr)
|
||||
82 stdcall VarR8FromCy(long long ptr)
|
||||
83 stdcall VarR8FromDate(double ptr)
|
||||
84 stdcall VarR8FromStr(wstr long long ptr)
|
||||
85 stdcall VarR8FromDisp(ptr long ptr)
|
||||
86 stdcall VarR8FromBool(long ptr)
|
||||
87 stdcall VarFormat(ptr ptr long long long ptr)
|
||||
88 stdcall VarDateFromUI1(long ptr)
|
||||
89 stdcall VarDateFromI2(long ptr)
|
||||
90 stdcall VarDateFromI4(long ptr)
|
||||
91 stdcall VarDateFromR4(long ptr)
|
||||
92 stdcall VarDateFromR8(double ptr)
|
||||
93 stdcall VarDateFromCy(long long ptr)
|
||||
94 stdcall VarDateFromStr(wstr long long ptr)
|
||||
95 stdcall VarDateFromDisp(ptr long ptr)
|
||||
96 stdcall VarDateFromBool(long ptr)
|
||||
97 stdcall VarFormatDateTime(ptr long long ptr)
|
||||
98 stdcall VarCyFromUI1(long ptr)
|
||||
99 stdcall VarCyFromI2(long ptr)
|
||||
100 stdcall VarCyFromI4(long ptr)
|
||||
101 stdcall VarCyFromR4(long ptr)
|
||||
102 stdcall VarCyFromR8(double ptr)
|
||||
103 stdcall VarCyFromDate(double ptr)
|
||||
104 stdcall VarCyFromStr(wstr long long ptr)
|
||||
105 stdcall VarCyFromDisp(ptr long ptr)
|
||||
106 stdcall VarCyFromBool(long ptr)
|
||||
107 stdcall VarFormatNumber(ptr long long long long long ptr)
|
||||
108 stdcall VarBstrFromUI1(long long long ptr)
|
||||
109 stdcall VarBstrFromI2(long long long ptr)
|
||||
110 stdcall VarBstrFromI4(long long long ptr)
|
||||
111 stdcall VarBstrFromR4(long long long ptr)
|
||||
112 stdcall VarBstrFromR8(double long long ptr)
|
||||
113 stdcall VarBstrFromCy(long long long long ptr)
|
||||
114 stdcall VarBstrFromDate(double long long ptr)
|
||||
115 stub VarBstrFromDisp
|
||||
116 stdcall VarBstrFromBool(long long long ptr)
|
||||
117 stdcall VarFormatPercent(ptr long long long long long ptr)
|
||||
118 stdcall VarBoolFromUI1(long ptr)
|
||||
119 stdcall VarBoolFromI2(long ptr)
|
||||
120 stdcall VarBoolFromI4(long ptr)
|
||||
121 stdcall VarBoolFromR4(long ptr)
|
||||
122 stdcall VarBoolFromR8(double ptr)
|
||||
123 stdcall VarBoolFromDate(double ptr)
|
||||
124 stdcall VarBoolFromCy(long long ptr)
|
||||
125 stdcall VarBoolFromStr(wstr long long ptr)
|
||||
126 stdcall VarBoolFromDisp(ptr long ptr)
|
||||
127 stdcall VarFormatCurrency(ptr long long long long long ptr)
|
||||
128 stub VarWeekdayName # stdcall (long long long long ptr)
|
||||
129 stub VarMonthName # stdcall (long long long ptr)
|
||||
130 stdcall VarUI1FromI2(long ptr)
|
||||
131 stdcall VarUI1FromI4(long ptr)
|
||||
132 stdcall VarUI1FromR4(long ptr)
|
||||
133 stdcall VarUI1FromR8(double ptr)
|
||||
134 stdcall VarUI1FromCy(long long ptr)
|
||||
135 stdcall VarUI1FromDate(double ptr)
|
||||
136 stdcall VarUI1FromStr(wstr long long ptr)
|
||||
137 stdcall VarUI1FromDisp(ptr long ptr)
|
||||
138 stdcall VarUI1FromBool(long ptr)
|
||||
139 stdcall VarFormatFromTokens (ptr ptr ptr long ptr long)
|
||||
140 stdcall VarTokenizeFormatString (ptr ptr long long long long ptr)
|
||||
141 stdcall VarAdd(ptr ptr ptr)
|
||||
142 stdcall VarAnd(ptr ptr ptr)
|
||||
143 stdcall VarDiv(ptr ptr ptr)
|
||||
144 stub OACreateTypeLib2
|
||||
146 stdcall DispCallFunc(ptr long long long long ptr ptr ptr)
|
||||
147 stdcall VariantChangeTypeEx(ptr ptr long long long)
|
||||
148 stdcall SafeArrayPtrOfIndex(ptr ptr ptr)
|
||||
149 stdcall SysStringByteLen(ptr)
|
||||
150 stdcall SysAllocStringByteLen(ptr long)
|
||||
152 stdcall VarEqv(ptr ptr ptr)
|
||||
153 stub VarIdiv # stdcall (ptr ptr ptr)
|
||||
154 stub VarImp # stdcall (ptr ptr ptr)
|
||||
155 stdcall VarMod(ptr ptr ptr)
|
||||
156 stdcall VarMul(ptr ptr ptr)
|
||||
157 stdcall VarOr(ptr ptr ptr)
|
||||
158 stdcall VarPow(ptr ptr ptr)
|
||||
159 stdcall VarSub(ptr ptr ptr)
|
||||
160 stdcall CreateTypeLib(long wstr ptr)
|
||||
161 stdcall LoadTypeLib (wstr ptr)
|
||||
162 stdcall LoadRegTypeLib (ptr long long long ptr)
|
||||
163 stdcall RegisterTypeLib(ptr wstr wstr)
|
||||
164 stdcall QueryPathOfRegTypeLib(ptr long long long ptr)
|
||||
165 stdcall LHashValOfNameSys(long long wstr)
|
||||
166 stdcall LHashValOfNameSysA(long long str)
|
||||
167 stdcall VarXor(ptr ptr ptr)
|
||||
168 stdcall VarAbs(ptr ptr)
|
||||
169 stdcall VarFix(ptr ptr)
|
||||
170 stdcall OaBuildVersion()
|
||||
171 stdcall ClearCustData(ptr)
|
||||
172 stdcall VarInt(ptr ptr)
|
||||
173 stdcall VarNeg(ptr ptr)
|
||||
174 stdcall VarNot(ptr ptr)
|
||||
175 stdcall VarRound(ptr long ptr)
|
||||
176 stdcall VarCmp(ptr ptr long long)
|
||||
177 stdcall VarDecAdd(ptr ptr ptr)
|
||||
178 stdcall VarDecDiv(ptr ptr ptr)
|
||||
179 stdcall VarDecMul(ptr ptr ptr)
|
||||
180 stdcall CreateTypeLib2(long wstr ptr)
|
||||
181 stdcall VarDecSub(ptr ptr ptr)
|
||||
182 stdcall VarDecAbs(ptr ptr)
|
||||
183 stdcall LoadTypeLibEx (wstr long ptr)
|
||||
184 stdcall SystemTimeToVariantTime(ptr ptr)
|
||||
185 stdcall VariantTimeToSystemTime(double ptr)
|
||||
186 stdcall UnRegisterTypeLib (ptr long long long long)
|
||||
187 stdcall VarDecFix(ptr ptr)
|
||||
188 stdcall VarDecInt(ptr ptr)
|
||||
189 stdcall VarDecNeg(ptr ptr)
|
||||
190 stdcall VarDecFromUI1(long ptr)
|
||||
191 stdcall VarDecFromI2(long ptr)
|
||||
192 stdcall VarDecFromI4(long ptr)
|
||||
193 stdcall VarDecFromR4(long ptr)
|
||||
194 stdcall VarDecFromR8(double ptr)
|
||||
195 stdcall VarDecFromDate(double ptr)
|
||||
196 stdcall VarDecFromCy(long long ptr)
|
||||
197 stdcall VarDecFromStr(wstr long long ptr)
|
||||
198 stdcall VarDecFromDisp(ptr long ptr)
|
||||
199 stdcall VarDecFromBool(long ptr)
|
||||
200 stdcall GetErrorInfo(long ptr) ole32.GetErrorInfo
|
||||
201 stdcall SetErrorInfo(long ptr) ole32.SetErrorInfo
|
||||
202 stdcall CreateErrorInfo(ptr) ole32.CreateErrorInfo
|
||||
203 stdcall VarDecRound(ptr long ptr)
|
||||
204 stdcall VarDecCmp(ptr ptr)
|
||||
205 stdcall VarI2FromI1(long ptr)
|
||||
206 stdcall VarI2FromUI2(long ptr)
|
||||
207 stdcall VarI2FromUI4(long ptr)
|
||||
208 stdcall VarI2FromDec(ptr ptr)
|
||||
209 stdcall VarI4FromI1(long ptr)
|
||||
210 stdcall VarI4FromUI2(long ptr)
|
||||
211 stdcall VarI4FromUI4(long ptr)
|
||||
212 stdcall VarI4FromDec(ptr ptr)
|
||||
213 stdcall VarR4FromI1(long ptr)
|
||||
214 stdcall VarR4FromUI2(long ptr)
|
||||
215 stdcall VarR4FromUI4(long ptr)
|
||||
216 stdcall VarR4FromDec(ptr ptr)
|
||||
217 stdcall VarR8FromI1(long ptr)
|
||||
218 stdcall VarR8FromUI2(long ptr)
|
||||
219 stdcall VarR8FromUI4(long ptr)
|
||||
220 stdcall VarR8FromDec(ptr ptr)
|
||||
221 stdcall VarDateFromI1(long ptr)
|
||||
222 stdcall VarDateFromUI2(long ptr)
|
||||
223 stdcall VarDateFromUI4(long ptr)
|
||||
224 stdcall VarDateFromDec(ptr ptr)
|
||||
225 stdcall VarCyFromI1(long ptr)
|
||||
226 stdcall VarCyFromUI2(long ptr)
|
||||
227 stdcall VarCyFromUI4(long ptr)
|
||||
228 stdcall VarCyFromDec(ptr ptr)
|
||||
229 stdcall VarBstrFromI1(long long long ptr)
|
||||
230 stdcall VarBstrFromUI2(long long long ptr)
|
||||
231 stdcall VarBstrFromUI4(long long long ptr)
|
||||
232 stdcall VarBstrFromDec(ptr long long ptr)
|
||||
233 stdcall VarBoolFromI1(long ptr)
|
||||
234 stdcall VarBoolFromUI2(long ptr)
|
||||
235 stdcall VarBoolFromUI4(long ptr)
|
||||
236 stdcall VarBoolFromDec(ptr ptr)
|
||||
237 stdcall VarUI1FromI1(long ptr)
|
||||
238 stdcall VarUI1FromUI2(long ptr)
|
||||
239 stdcall VarUI1FromUI4(long ptr)
|
||||
240 stdcall VarUI1FromDec(ptr ptr)
|
||||
241 stdcall VarDecFromI1(long ptr)
|
||||
242 stdcall VarDecFromUI2(long ptr)
|
||||
243 stdcall VarDecFromUI4(long ptr)
|
||||
244 stdcall VarI1FromUI1(long ptr)
|
||||
245 stdcall VarI1FromI2(long ptr)
|
||||
246 stdcall VarI1FromI4(long ptr)
|
||||
247 stdcall VarI1FromR4(long ptr)
|
||||
248 stdcall VarI1FromR8(double ptr)
|
||||
249 stdcall VarI1FromDate(double ptr)
|
||||
250 stdcall VarI1FromCy(long long ptr)
|
||||
251 stdcall VarI1FromStr(wstr long long ptr)
|
||||
252 stdcall VarI1FromDisp(ptr long ptr)
|
||||
253 stdcall VarI1FromBool(long ptr)
|
||||
254 stdcall VarI1FromUI2(long ptr)
|
||||
255 stdcall VarI1FromUI4(long ptr)
|
||||
256 stdcall VarI1FromDec(ptr ptr)
|
||||
257 stdcall VarUI2FromUI1(long ptr)
|
||||
258 stdcall VarUI2FromI2(long ptr)
|
||||
259 stdcall VarUI2FromI4(long ptr)
|
||||
260 stdcall VarUI2FromR4(long ptr)
|
||||
261 stdcall VarUI2FromR8(double ptr)
|
||||
262 stdcall VarUI2FromDate(double ptr)
|
||||
263 stdcall VarUI2FromCy(long long ptr)
|
||||
264 stdcall VarUI2FromStr(wstr long long ptr)
|
||||
265 stdcall VarUI2FromDisp(ptr long ptr)
|
||||
266 stdcall VarUI2FromBool(long ptr)
|
||||
267 stdcall VarUI2FromI1(long ptr)
|
||||
268 stdcall VarUI2FromUI4(long ptr)
|
||||
269 stdcall VarUI2FromDec(ptr ptr)
|
||||
270 stdcall VarUI4FromUI1(long ptr)
|
||||
271 stdcall VarUI4FromI2(long ptr)
|
||||
272 stdcall VarUI4FromI4(long ptr)
|
||||
273 stdcall VarUI4FromR4(long ptr)
|
||||
274 stdcall VarUI4FromR8(double ptr)
|
||||
275 stdcall VarUI4FromDate(double ptr)
|
||||
276 stdcall VarUI4FromCy(long long ptr)
|
||||
277 stdcall VarUI4FromStr(wstr long long ptr)
|
||||
278 stdcall VarUI4FromDisp(ptr long ptr)
|
||||
279 stdcall VarUI4FromBool(long ptr)
|
||||
280 stdcall VarUI4FromI1(long ptr)
|
||||
281 stdcall VarUI4FromUI2(long ptr)
|
||||
282 stdcall VarUI4FromDec(ptr ptr)
|
||||
283 stdcall BSTR_UserSize(ptr long ptr)
|
||||
284 stdcall BSTR_UserMarshal(ptr ptr ptr)
|
||||
285 stdcall BSTR_UserUnmarshal(ptr ptr ptr)
|
||||
286 stdcall BSTR_UserFree(ptr ptr)
|
||||
287 stdcall VARIANT_UserSize(ptr long ptr)
|
||||
288 stdcall VARIANT_UserMarshal(ptr ptr ptr)
|
||||
289 stdcall VARIANT_UserUnmarshal(ptr ptr ptr)
|
||||
290 stdcall VARIANT_UserFree(ptr ptr)
|
||||
291 stub LPSAFEARRAY_UserSize
|
||||
292 stub LPSAFEARRAY_UserMarshal
|
||||
293 stub LPSAFEARRAY_UserUnmarshal
|
||||
294 stub LPSAFEARRAY_UserFree
|
||||
295 stub LPSAFEARRAY_Size
|
||||
296 stub LPSAFEARRAY_Marshal
|
||||
297 stub LPSAFEARRAY_Unmarshal
|
||||
298 stdcall VarDecCmpR8(ptr double)
|
||||
299 stdcall VarCyAdd(long long long long ptr)
|
||||
303 stdcall VarCyMul(long long long long ptr)
|
||||
304 stdcall VarCyMulI4(long long long ptr)
|
||||
305 stdcall VarCySub(long long long long ptr)
|
||||
306 stdcall VarCyAbs(long long ptr)
|
||||
307 stdcall VarCyFix(long long ptr)
|
||||
308 stdcall VarCyInt(long long ptr)
|
||||
309 stdcall VarCyNeg(long long ptr)
|
||||
310 stdcall VarCyRound(long long long ptr)
|
||||
311 stdcall VarCyCmp(long long long long)
|
||||
312 stdcall VarCyCmpR8(long long double)
|
||||
313 stdcall VarBstrCat(wstr wstr ptr)
|
||||
314 stdcall VarBstrCmp(wstr wstr long long)
|
||||
315 stdcall VarR8Pow(double double ptr)
|
||||
316 stdcall VarR4CmpR8(long double)
|
||||
317 stdcall VarR8Round(double long ptr)
|
||||
318 stdcall VarCat(ptr ptr ptr)
|
||||
319 stdcall VarDateFromUdateEx(ptr long long ptr)
|
||||
320 stdcall -private DllRegisterServer() OLEAUT32_DllRegisterServer
|
||||
321 stdcall -private DllUnregisterServer() OLEAUT32_DllUnregisterServer
|
||||
322 stdcall GetRecordInfoFromGuids(ptr long long long ptr ptr)
|
||||
323 stub GetRecordInfoFromTypeInfo # stdcall (ptr ptr)
|
||||
325 stub SetVarConversionLocaleSetting
|
||||
326 stub GetVarConversionLocaleSetting
|
||||
327 stdcall SetOaNoCache()
|
||||
329 stdcall VarCyMulI8(long long long long ptr)
|
||||
330 stdcall VarDateFromUdate(ptr long ptr)
|
||||
331 stdcall VarUdateFromDate(double long ptr)
|
||||
332 stub GetAltMonthNames
|
||||
333 stdcall VarI8FromUI1(long long)
|
||||
334 stdcall VarI8FromI2(long long)
|
||||
335 stdcall VarI8FromR4(long long)
|
||||
336 stdcall VarI8FromR8(double long)
|
||||
337 stdcall VarI8FromCy(long long ptr)
|
||||
338 stdcall VarI8FromDate(double long)
|
||||
339 stdcall VarI8FromStr(wstr long long ptr)
|
||||
340 stdcall VarI8FromDisp(ptr long ptr)
|
||||
341 stdcall VarI8FromBool(long long)
|
||||
342 stdcall VarI8FromI1(long long)
|
||||
343 stdcall VarI8FromUI2(long long)
|
||||
344 stdcall VarI8FromUI4(long long)
|
||||
345 stdcall VarI8FromDec(ptr ptr)
|
||||
346 stdcall VarI2FromI8(long long ptr)
|
||||
347 stdcall VarI2FromUI8(long long ptr)
|
||||
348 stdcall VarI4FromI8(long long ptr)
|
||||
349 stdcall VarI4FromUI8(long long ptr)
|
||||
360 stdcall VarR4FromI8(long long ptr)
|
||||
361 stdcall VarR4FromUI8(long long ptr)
|
||||
362 stdcall VarR8FromI8(long long ptr)
|
||||
363 stdcall VarR8FromUI8(long long ptr)
|
||||
364 stdcall VarDateFromI8(long long ptr)
|
||||
365 stdcall VarDateFromUI8(long long ptr)
|
||||
366 stdcall VarCyFromI8(long long ptr)
|
||||
367 stdcall VarCyFromUI8(long long ptr)
|
||||
368 stdcall VarBstrFromI8(long long long long ptr)
|
||||
369 stdcall VarBstrFromUI8(long long long long ptr)
|
||||
370 stdcall VarBoolFromI8(long long ptr)
|
||||
371 stdcall VarBoolFromUI8(long long ptr)
|
||||
372 stdcall VarUI1FromI8(long long ptr)
|
||||
373 stdcall VarUI1FromUI8(long long ptr)
|
||||
374 stdcall VarDecFromI8(long long ptr)
|
||||
375 stdcall VarDecFromUI8(long long ptr)
|
||||
376 stdcall VarI1FromI8(long long ptr)
|
||||
377 stdcall VarI1FromUI8(long long ptr)
|
||||
378 stdcall VarUI2FromI8(long long ptr)
|
||||
379 stdcall VarUI2FromUI8(long long ptr)
|
||||
380 stub UserHWND_from_local
|
||||
381 stub UserHWND_to_local
|
||||
382 stub UserHWND_free_inst
|
||||
383 stub UserHWND_free_local
|
||||
384 stub UserBSTR_from_local
|
||||
385 stub UserBSTR_to_local
|
||||
386 stub UserBSTR_free_inst
|
||||
387 stub UserBSTR_free_local
|
||||
388 stub UserVARIANT_from_local
|
||||
389 stub UserVARIANT_to_local
|
||||
390 stub UserVARIANT_free_inst
|
||||
391 stub UserVARIANT_free_local
|
||||
392 stub UserEXCEPINFO_from_local
|
||||
393 stub UserEXCEPINFO_to_local
|
||||
394 stub UserEXCEPINFO_free_inst
|
||||
395 stub UserEXCEPINFO_free_local
|
||||
396 stub UserMSG_from_local
|
||||
397 stub UserMSG_to_local
|
||||
398 stub UserMSG_free_inst
|
||||
399 stub UserMSG_free_local
|
||||
401 stdcall OleLoadPictureEx(ptr long long long long long long ptr)
|
||||
402 stub OleLoadPictureFileEx
|
||||
410 stdcall -private DllCanUnloadNow() OLEAUT32_DllCanUnloadNow
|
||||
411 stdcall SafeArrayCreateVector(long long long)
|
||||
412 stdcall SafeArrayCopyData(ptr ptr)
|
||||
413 stdcall VectorFromBstr(ptr ptr)
|
||||
414 stdcall BstrFromVector(ptr ptr)
|
||||
415 stdcall OleIconToCursor(long long)
|
||||
416 stdcall OleCreatePropertyFrameIndirect(ptr)
|
||||
417 stdcall OleCreatePropertyFrame(ptr long long ptr long ptr long ptr ptr long ptr)
|
||||
418 stdcall OleLoadPicture(ptr long long ptr ptr)
|
||||
419 stdcall OleCreatePictureIndirect(ptr ptr long ptr)
|
||||
420 stdcall OleCreateFontIndirect(ptr ptr ptr)
|
||||
421 stdcall OleTranslateColor(long long long)
|
||||
422 stub OleLoadPictureFile
|
||||
423 stub OleSavePictureFile
|
||||
424 stub OleLoadPicturePath
|
||||
425 stdcall VarUI4FromI8(long long ptr)
|
||||
426 stdcall VarUI4FromUI8(long long ptr)
|
||||
427 stdcall VarI8FromUI8(long long ptr)
|
||||
428 stdcall VarUI8FromI8(long long ptr)
|
||||
429 stdcall VarUI8FromUI1(long ptr)
|
||||
430 stdcall VarUI8FromI2(long ptr)
|
||||
431 stdcall VarUI8FromR4(long ptr)
|
||||
432 stdcall VarUI8FromR8(double ptr)
|
||||
433 stdcall VarUI8FromCy(long long ptr)
|
||||
434 stdcall VarUI8FromDate(double ptr)
|
||||
435 stdcall VarUI8FromStr(wstr long long ptr)
|
||||
436 stdcall VarUI8FromDisp(ptr long ptr)
|
||||
437 stdcall VarUI8FromBool(long ptr)
|
||||
438 stdcall VarUI8FromI1(long ptr)
|
||||
439 stdcall VarUI8FromUI2(long ptr)
|
||||
440 stdcall VarUI8FromUI4(long ptr)
|
||||
441 stdcall VarUI8FromDec(long ptr)
|
|
@ -1,31 +0,0 @@
|
|||
/*
|
||||
* Czech resources for oleaut32
|
||||
*
|
||||
* Copyright 2003 Jon Griffiths
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_TRUE "Pravda"
|
||||
IDS_FALSE "Nepravda"
|
||||
IDS_YES "Ano"
|
||||
IDS_NO "Ne"
|
||||
IDS_ON "Zapnuto"
|
||||
IDS_OFF "Vypnuto"
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
/*
|
||||
* German resources for oleaut32
|
||||
*
|
||||
* Copyright 2003 Jon Griffiths
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_GERMAN, SUBLANG_DEFAULT
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_TRUE "Wahr"
|
||||
IDS_FALSE "Falsch"
|
||||
IDS_YES "Ja"
|
||||
IDS_NO "Nein"
|
||||
IDS_ON "Ein"
|
||||
IDS_OFF "Aus"
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
/*
|
||||
* Danish resources for oleaut32
|
||||
*
|
||||
* Copyright 2003 Jon Griffiths
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_DANISH, SUBLANG_DEFAULT
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_TRUE "Sand"
|
||||
IDS_FALSE "Falsk"
|
||||
IDS_YES "Ja"
|
||||
IDS_NO "Nej"
|
||||
IDS_ON "Til"
|
||||
IDS_OFF "Fra"
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
/*
|
||||
* English resources for oleaut32
|
||||
*
|
||||
* Copyright 2003 Jon Griffiths
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_TRUE "True"
|
||||
IDS_FALSE "False"
|
||||
IDS_YES "Yes"
|
||||
IDS_NO "No"
|
||||
IDS_ON "On"
|
||||
IDS_OFF "Off"
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
/*
|
||||
* Spanish resources for oleaut32
|
||||
*
|
||||
* Copyright 2003 Jon Griffiths
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_SPANISH, SUBLANG_DEFAULT
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_TRUE "Verdadero"
|
||||
IDS_FALSE "Falso"
|
||||
IDS_YES "Sí"
|
||||
IDS_NO "No"
|
||||
IDS_ON "Activado"
|
||||
IDS_OFF "Desactivado"
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
/*
|
||||
* French resources for oleaut32
|
||||
*
|
||||
* Copyright 2003 Jon Griffiths
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_FRENCH, SUBLANG_DEFAULT
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_TRUE "Vrai"
|
||||
IDS_FALSE "Faux"
|
||||
IDS_YES "Oui"
|
||||
IDS_NO "Non"
|
||||
IDS_ON "Actif"
|
||||
IDS_OFF "Inactif"
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
/*
|
||||
* Hungarian resources for oleaut32
|
||||
*
|
||||
* Copyright 2003 Jon Griffiths
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_TRUE "Igaz"
|
||||
IDS_FALSE "Hamis"
|
||||
IDS_YES "Igen"
|
||||
IDS_NO "Nem"
|
||||
IDS_ON "Be"
|
||||
IDS_OFF "Ki"
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
/*
|
||||
* Italian resources for oleaut32
|
||||
*
|
||||
* Copyright 2003 Jon Griffiths
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_ITALIAN, SUBLANG_DEFAULT
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_TRUE "Vero"
|
||||
IDS_FALSE "Falso"
|
||||
IDS_YES "Si"
|
||||
IDS_NO "No"
|
||||
IDS_ON "On"
|
||||
IDS_OFF "Off"
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
/*
|
||||
* Dutch resources for oleaut32
|
||||
*
|
||||
* Copyright 2003 Jon Griffiths
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_DUTCH, SUBLANG_DEFAULT
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_TRUE "Waar"
|
||||
IDS_FALSE "Onwaar"
|
||||
IDS_YES "Ja"
|
||||
IDS_NO "Nee"
|
||||
IDS_ON "Aan"
|
||||
IDS_OFF "Uit"
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
/*
|
||||
* Norwegian resources for oleaut32
|
||||
*
|
||||
* Copyright 2003 Jon Griffiths
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_NORWEGIAN, SUBLANG_DEFAULT
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_TRUE "Sann"
|
||||
IDS_FALSE "Usann"
|
||||
IDS_YES "Ja"
|
||||
IDS_NO "Nei"
|
||||
IDS_ON "PÕ"
|
||||
IDS_OFF "Av"
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
/*
|
||||
* Polish resources for oleaut32
|
||||
*
|
||||
* Copyright 2003 Jon Griffiths
|
||||
* Copyright 2004 Jacek Caban
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_TRUE "Prawda"
|
||||
IDS_FALSE "Fa³sz"
|
||||
IDS_YES "Tak"
|
||||
IDS_NO "Nie"
|
||||
IDS_ON "W³¹czone"
|
||||
IDS_OFF "Wy³¹czone"
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
/*
|
||||
* Portuguese resources for oleaut32
|
||||
*
|
||||
* Copyright 2003 Marcelo Duarte
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_PORTUGUESE, SUBLANG_DEFAULT
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_TRUE "Verdadeiro"
|
||||
IDS_FALSE "Falso"
|
||||
IDS_YES "Sim"
|
||||
IDS_NO "Não"
|
||||
IDS_ON "Ligado"
|
||||
IDS_OFF "Desligado"
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
/*
|
||||
* Swedish resources for oleaut32
|
||||
*
|
||||
* Copyright 2003 Jon Griffiths
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_SWEDISH, SUBLANG_DEFAULT
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_TRUE "Sant"
|
||||
IDS_FALSE "Falskt"
|
||||
IDS_YES "Ja"
|
||||
IDS_NO "Nej"
|
||||
IDS_ON "PÕ"
|
||||
IDS_OFF "Av"
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
/*
|
||||
* Thai resources for oleaut32
|
||||
*
|
||||
* Copyright 2003 Jon Griffiths
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_THAI, SUBLANG_DEFAULT
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_TRUE "¨ÃÔ§"
|
||||
IDS_FALSE "äÁè¨ÃÔ§"
|
||||
IDS_YES "ãªè"
|
||||
IDS_NO "äÁèãªè"
|
||||
IDS_ON "à»Ô´"
|
||||
IDS_OFF "»Ô´"
|
||||
}
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,580 +0,0 @@
|
|||
/*
|
||||
* self-registerable dll functions for oleaut32.dll
|
||||
*
|
||||
* Copyright (C) 2003 John K. Hohm
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winuser.h"
|
||||
#include "winreg.h"
|
||||
#include "winerror.h"
|
||||
|
||||
#include "ole2.h"
|
||||
#include "olectl.h"
|
||||
#include "oleauto.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
||||
|
||||
/*
|
||||
* Near the bottom of this file are the exported DllRegisterServer and
|
||||
* DllUnregisterServer, which make all this worthwhile.
|
||||
*/
|
||||
|
||||
/***********************************************************************
|
||||
* interface for self-registering
|
||||
*/
|
||||
struct regsvr_interface
|
||||
{
|
||||
IID const *iid; /* NULL for end of list */
|
||||
LPCSTR name; /* can be NULL to omit */
|
||||
IID const *base_iid; /* can be NULL to omit */
|
||||
int num_methods; /* can be <0 to omit */
|
||||
CLSID const *ps_clsid; /* can be NULL to omit */
|
||||
CLSID const *ps_clsid32; /* can be NULL to omit */
|
||||
};
|
||||
|
||||
static HRESULT register_interfaces(struct regsvr_interface const *list);
|
||||
static HRESULT unregister_interfaces(struct regsvr_interface const *list);
|
||||
|
||||
struct regsvr_coclass
|
||||
{
|
||||
CLSID const *clsid; /* NULL for end of list */
|
||||
LPCSTR name; /* can be NULL to omit */
|
||||
LPCSTR ips; /* can be NULL to omit */
|
||||
LPCSTR ips32; /* can be NULL to omit */
|
||||
LPCSTR ips32_tmodel; /* can be NULL to omit */
|
||||
LPCSTR clsid_str; /* can be NULL to omit */
|
||||
LPCSTR progid; /* can be NULL to omit */
|
||||
};
|
||||
|
||||
static HRESULT register_coclasses(struct regsvr_coclass const *list);
|
||||
static HRESULT unregister_coclasses(struct regsvr_coclass const *list);
|
||||
|
||||
/***********************************************************************
|
||||
* static string constants
|
||||
*/
|
||||
static WCHAR const interface_keyname[10] = {
|
||||
'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', 'e', 0 };
|
||||
static WCHAR const base_ifa_keyname[14] = {
|
||||
'B', 'a', 's', 'e', 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c',
|
||||
'e', 0 };
|
||||
static WCHAR const num_methods_keyname[11] = {
|
||||
'N', 'u', 'm', 'M', 'e', 't', 'h', 'o', 'd', 's', 0 };
|
||||
static WCHAR const ps_clsid_keyname[15] = {
|
||||
'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's',
|
||||
'i', 'd', 0 };
|
||||
static WCHAR const ps_clsid32_keyname[17] = {
|
||||
'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's',
|
||||
'i', 'd', '3', '2', 0 };
|
||||
static WCHAR const clsid_keyname[6] = {
|
||||
'C', 'L', 'S', 'I', 'D', 0 };
|
||||
static WCHAR const ips_keyname[13] = {
|
||||
'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r',
|
||||
0 };
|
||||
static WCHAR const ips32_keyname[15] = {
|
||||
'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r',
|
||||
'3', '2', 0 };
|
||||
static WCHAR const progid_keyname[7] = {
|
||||
'P', 'r', 'o', 'g', 'I', 'D', 0 };
|
||||
static char const tmodel_valuename[] = "ThreadingModel";
|
||||
|
||||
/***********************************************************************
|
||||
* static helper functions
|
||||
*/
|
||||
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid);
|
||||
static LONG register_key_defvalueW(HKEY base, WCHAR const *name,
|
||||
WCHAR const *value);
|
||||
static LONG register_key_defvalueA(HKEY base, WCHAR const *name,
|
||||
char const *value);
|
||||
static LONG recursive_delete_key(HKEY key);
|
||||
static LONG recursive_delete_keyA(HKEY base, char const *name);
|
||||
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name);
|
||||
|
||||
/***********************************************************************
|
||||
* register_interfaces
|
||||
*/
|
||||
static HRESULT register_interfaces(struct regsvr_interface const *list)
|
||||
{
|
||||
LONG res = ERROR_SUCCESS;
|
||||
HKEY interface_key;
|
||||
|
||||
res = RegCreateKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0, NULL, 0,
|
||||
KEY_READ | KEY_WRITE, NULL, &interface_key, NULL);
|
||||
if (res != ERROR_SUCCESS) goto error_return;
|
||||
|
||||
for (; res == ERROR_SUCCESS && list->iid; ++list) {
|
||||
WCHAR buf[39];
|
||||
HKEY iid_key;
|
||||
|
||||
StringFromGUID2(list->iid, buf, 39);
|
||||
res = RegCreateKeyExW(interface_key, buf, 0, NULL, 0,
|
||||
KEY_READ | KEY_WRITE, NULL, &iid_key, NULL);
|
||||
if (res != ERROR_SUCCESS) goto error_close_interface_key;
|
||||
|
||||
if (list->name) {
|
||||
res = RegSetValueExA(iid_key, NULL, 0, REG_SZ,
|
||||
(CONST BYTE*)(list->name),
|
||||
strlen(list->name) + 1);
|
||||
if (res != ERROR_SUCCESS) goto error_close_iid_key;
|
||||
}
|
||||
|
||||
if (list->base_iid) {
|
||||
register_key_guid(iid_key, base_ifa_keyname, list->base_iid);
|
||||
if (res != ERROR_SUCCESS) goto error_close_iid_key;
|
||||
}
|
||||
|
||||
if (0 <= list->num_methods) {
|
||||
static WCHAR const fmt[3] = { '%', 'd', 0 };
|
||||
HKEY key;
|
||||
|
||||
res = RegCreateKeyExW(iid_key, num_methods_keyname, 0, NULL, 0,
|
||||
KEY_READ | KEY_WRITE, NULL, &key, NULL);
|
||||
if (res != ERROR_SUCCESS) goto error_close_iid_key;
|
||||
|
||||
wsprintfW(buf, fmt, list->num_methods);
|
||||
res = RegSetValueExW(key, NULL, 0, REG_SZ,
|
||||
(CONST BYTE*)buf,
|
||||
(lstrlenW(buf) + 1) * sizeof(WCHAR));
|
||||
RegCloseKey(key);
|
||||
|
||||
if (res != ERROR_SUCCESS) goto error_close_iid_key;
|
||||
}
|
||||
|
||||
if (list->ps_clsid) {
|
||||
register_key_guid(iid_key, ps_clsid_keyname, list->ps_clsid);
|
||||
if (res != ERROR_SUCCESS) goto error_close_iid_key;
|
||||
}
|
||||
|
||||
if (list->ps_clsid32) {
|
||||
register_key_guid(iid_key, ps_clsid32_keyname, list->ps_clsid32);
|
||||
if (res != ERROR_SUCCESS) goto error_close_iid_key;
|
||||
}
|
||||
|
||||
error_close_iid_key:
|
||||
RegCloseKey(iid_key);
|
||||
}
|
||||
|
||||
error_close_interface_key:
|
||||
RegCloseKey(interface_key);
|
||||
error_return:
|
||||
return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* unregister_interfaces
|
||||
*/
|
||||
static HRESULT unregister_interfaces(struct regsvr_interface const *list)
|
||||
{
|
||||
LONG res = ERROR_SUCCESS;
|
||||
HKEY interface_key;
|
||||
|
||||
res = RegOpenKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0,
|
||||
KEY_READ | KEY_WRITE, &interface_key);
|
||||
if (res == ERROR_FILE_NOT_FOUND) return S_OK;
|
||||
if (res != ERROR_SUCCESS) goto error_return;
|
||||
|
||||
for (; res == ERROR_SUCCESS && list->iid; ++list) {
|
||||
WCHAR buf[39];
|
||||
|
||||
StringFromGUID2(list->iid, buf, 39);
|
||||
res = recursive_delete_keyW(interface_key, buf);
|
||||
}
|
||||
|
||||
RegCloseKey(interface_key);
|
||||
error_return:
|
||||
return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* register_coclasses
|
||||
*/
|
||||
static HRESULT register_coclasses(struct regsvr_coclass const *list)
|
||||
{
|
||||
LONG res = ERROR_SUCCESS;
|
||||
HKEY coclass_key;
|
||||
|
||||
res = RegCreateKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, NULL, 0,
|
||||
KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL);
|
||||
if (res != ERROR_SUCCESS) goto error_return;
|
||||
|
||||
for (; res == ERROR_SUCCESS && list->clsid; ++list) {
|
||||
WCHAR buf[39];
|
||||
HKEY clsid_key;
|
||||
|
||||
StringFromGUID2(list->clsid, buf, 39);
|
||||
res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
|
||||
KEY_READ | KEY_WRITE, NULL, &clsid_key, NULL);
|
||||
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
|
||||
|
||||
if (list->name) {
|
||||
res = RegSetValueExA(clsid_key, NULL, 0, REG_SZ,
|
||||
(CONST BYTE*)(list->name),
|
||||
strlen(list->name) + 1);
|
||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||
}
|
||||
|
||||
if (list->ips) {
|
||||
res = register_key_defvalueA(clsid_key, ips_keyname, list->ips);
|
||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||
}
|
||||
|
||||
if (list->ips32) {
|
||||
HKEY ips32_key;
|
||||
|
||||
res = RegCreateKeyExW(clsid_key, ips32_keyname, 0, NULL, 0,
|
||||
KEY_READ | KEY_WRITE, NULL,
|
||||
&ips32_key, NULL);
|
||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||
|
||||
res = RegSetValueExA(ips32_key, NULL, 0, REG_SZ,
|
||||
(CONST BYTE*)list->ips32,
|
||||
lstrlenA(list->ips32) + 1);
|
||||
if (res == ERROR_SUCCESS && list->ips32_tmodel)
|
||||
res = RegSetValueExA(ips32_key, tmodel_valuename, 0, REG_SZ,
|
||||
(CONST BYTE*)list->ips32_tmodel,
|
||||
strlen(list->ips32_tmodel) + 1);
|
||||
RegCloseKey(ips32_key);
|
||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||
}
|
||||
|
||||
if (list->clsid_str) {
|
||||
res = register_key_defvalueA(clsid_key, clsid_keyname,
|
||||
list->clsid_str);
|
||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||
}
|
||||
|
||||
if (list->progid) {
|
||||
HKEY progid_key;
|
||||
|
||||
res = register_key_defvalueA(clsid_key, progid_keyname,
|
||||
list->progid);
|
||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||
|
||||
res = RegCreateKeyExA(HKEY_CLASSES_ROOT, list->progid, 0,
|
||||
NULL, 0, KEY_READ | KEY_WRITE, NULL,
|
||||
&progid_key, NULL);
|
||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||
|
||||
res = register_key_defvalueW(progid_key, clsid_keyname, buf);
|
||||
RegCloseKey(progid_key);
|
||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||
}
|
||||
|
||||
error_close_clsid_key:
|
||||
RegCloseKey(clsid_key);
|
||||
}
|
||||
|
||||
error_close_coclass_key:
|
||||
RegCloseKey(coclass_key);
|
||||
error_return:
|
||||
return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* unregister_coclasses
|
||||
*/
|
||||
static HRESULT unregister_coclasses(struct regsvr_coclass const *list)
|
||||
{
|
||||
LONG res = ERROR_SUCCESS;
|
||||
HKEY coclass_key;
|
||||
|
||||
res = RegOpenKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0,
|
||||
KEY_READ | KEY_WRITE, &coclass_key);
|
||||
if (res == ERROR_FILE_NOT_FOUND) return S_OK;
|
||||
if (res != ERROR_SUCCESS) goto error_return;
|
||||
|
||||
for (; res == ERROR_SUCCESS && list->clsid; ++list) {
|
||||
WCHAR buf[39];
|
||||
|
||||
StringFromGUID2(list->clsid, buf, 39);
|
||||
res = recursive_delete_keyW(coclass_key, buf);
|
||||
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
|
||||
|
||||
if (list->progid) {
|
||||
res = recursive_delete_keyA(HKEY_CLASSES_ROOT, list->progid);
|
||||
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
|
||||
}
|
||||
}
|
||||
|
||||
error_close_coclass_key:
|
||||
RegCloseKey(coclass_key);
|
||||
error_return:
|
||||
return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* regsvr_key_guid
|
||||
*/
|
||||
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid)
|
||||
{
|
||||
WCHAR buf[39];
|
||||
|
||||
StringFromGUID2(guid, buf, 39);
|
||||
return register_key_defvalueW(base, name, buf);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* regsvr_key_defvalueW
|
||||
*/
|
||||
static LONG register_key_defvalueW(
|
||||
HKEY base,
|
||||
WCHAR const *name,
|
||||
WCHAR const *value)
|
||||
{
|
||||
LONG res;
|
||||
HKEY key;
|
||||
|
||||
res = RegCreateKeyExW(base, name, 0, NULL, 0,
|
||||
KEY_READ | KEY_WRITE, NULL, &key, NULL);
|
||||
if (res != ERROR_SUCCESS) return res;
|
||||
res = RegSetValueExW(key, NULL, 0, REG_SZ, (CONST BYTE*)value,
|
||||
(lstrlenW(value) + 1) * sizeof(WCHAR));
|
||||
RegCloseKey(key);
|
||||
return res;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* regsvr_key_defvalueA
|
||||
*/
|
||||
static LONG register_key_defvalueA(
|
||||
HKEY base,
|
||||
WCHAR const *name,
|
||||
char const *value)
|
||||
{
|
||||
LONG res;
|
||||
HKEY key;
|
||||
|
||||
res = RegCreateKeyExW(base, name, 0, NULL, 0,
|
||||
KEY_READ | KEY_WRITE, NULL, &key, NULL);
|
||||
if (res != ERROR_SUCCESS) return res;
|
||||
res = RegSetValueExA(key, NULL, 0, REG_SZ, (CONST BYTE*)value,
|
||||
lstrlenA(value) + 1);
|
||||
RegCloseKey(key);
|
||||
return res;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* recursive_delete_key
|
||||
*/
|
||||
static LONG recursive_delete_key(HKEY key)
|
||||
{
|
||||
LONG res;
|
||||
WCHAR subkey_name[MAX_PATH];
|
||||
DWORD cName;
|
||||
HKEY subkey;
|
||||
|
||||
for (;;) {
|
||||
cName = sizeof(subkey_name) / sizeof(WCHAR);
|
||||
res = RegEnumKeyExW(key, 0, subkey_name, &cName,
|
||||
NULL, NULL, NULL, NULL);
|
||||
if (res != ERROR_SUCCESS && res != ERROR_MORE_DATA) {
|
||||
res = ERROR_SUCCESS; /* presumably we're done enumerating */
|
||||
break;
|
||||
}
|
||||
res = RegOpenKeyExW(key, subkey_name, 0,
|
||||
KEY_READ | KEY_WRITE, &subkey);
|
||||
if (res == ERROR_FILE_NOT_FOUND) continue;
|
||||
if (res != ERROR_SUCCESS) break;
|
||||
|
||||
res = recursive_delete_key(subkey);
|
||||
RegCloseKey(subkey);
|
||||
if (res != ERROR_SUCCESS) break;
|
||||
}
|
||||
|
||||
if (res == ERROR_SUCCESS) res = RegDeleteKeyW(key, 0);
|
||||
return res;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* recursive_delete_keyA
|
||||
*/
|
||||
static LONG recursive_delete_keyA(HKEY base, char const *name)
|
||||
{
|
||||
LONG res;
|
||||
HKEY key;
|
||||
|
||||
res = RegOpenKeyExA(base, name, 0, KEY_READ | KEY_WRITE, &key);
|
||||
if (res == ERROR_FILE_NOT_FOUND) return ERROR_SUCCESS;
|
||||
if (res != ERROR_SUCCESS) return res;
|
||||
res = recursive_delete_key(key);
|
||||
RegCloseKey(key);
|
||||
return res;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* recursive_delete_keyW
|
||||
*/
|
||||
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name)
|
||||
{
|
||||
LONG res;
|
||||
HKEY key;
|
||||
|
||||
res = RegOpenKeyExW(base, name, 0, KEY_READ | KEY_WRITE, &key);
|
||||
if (res == ERROR_FILE_NOT_FOUND) return ERROR_SUCCESS;
|
||||
if (res != ERROR_SUCCESS) return res;
|
||||
res = recursive_delete_key(key);
|
||||
RegCloseKey(key);
|
||||
return res;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* coclass list
|
||||
*/
|
||||
static GUID const CLSID_RecordInfo = {
|
||||
0x0000002F, 0x0000, 0x0000, {0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46} };
|
||||
|
||||
extern GUID const CLSID_PSDispatch;
|
||||
|
||||
static GUID const CLSID_PSEnumVariant = {
|
||||
0x00020421, 0x0000, 0x0000, {0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46} };
|
||||
|
||||
static GUID const CLSID_PSTypeInfo = {
|
||||
0x00020422, 0x0000, 0x0000, {0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46} };
|
||||
|
||||
static GUID const CLSID_PSTypeLib = {
|
||||
0x00020423, 0x0000, 0x0000, {0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46} };
|
||||
|
||||
extern GUID const CLSID_PSOAInterface;
|
||||
|
||||
static GUID const CLSID_PSTypeComp = {
|
||||
0x00020425, 0x0000, 0x0000, {0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46} };
|
||||
|
||||
static GUID const CLSID_OldFont = {
|
||||
0x46763EE0, 0xCAB2, 0x11CE, {0x8C,0x20,0x00,0xAA,0x00,0x51,0xE5,0xD4} };
|
||||
|
||||
static GUID const CLSID_PSFactoryBuffer = {
|
||||
0xB196B286, 0xBAB4, 0x101A, {0xB6,0x9C,0x00,0xAA,0x00,0x34,0x1D,0x07} };
|
||||
|
||||
static struct regsvr_coclass const coclass_list[] = {
|
||||
{ &CLSID_RecordInfo,
|
||||
"CLSID_RecordInfo",
|
||||
NULL,
|
||||
"oleaut32.dll",
|
||||
"Both"
|
||||
},
|
||||
{ &CLSID_PSDispatch,
|
||||
"PSDispatch",
|
||||
"ole2disp.dll",
|
||||
"oleaut32.dll",
|
||||
"Both"
|
||||
},
|
||||
{ &CLSID_StdFont,
|
||||
"CLSID_StdFont",
|
||||
NULL,
|
||||
"oleaut32.dll",
|
||||
"Both",
|
||||
"Standard Font",
|
||||
"StdFont"
|
||||
},
|
||||
{ &CLSID_StdPicture,
|
||||
"CLSID_StdPict",
|
||||
NULL,
|
||||
"oleaut32.dll",
|
||||
"Apartment",
|
||||
"Standard Picture",
|
||||
"StdPicture"
|
||||
},
|
||||
{ &CLSID_PSEnumVariant,
|
||||
"PSEnumVariant",
|
||||
"ole2disp.dll",
|
||||
"oleaut32.dll",
|
||||
"Both"
|
||||
},
|
||||
{ &CLSID_PSTypeInfo,
|
||||
"PSTypeInfo",
|
||||
"ole2disp.dll",
|
||||
"oleaut32.dll",
|
||||
"Both"
|
||||
},
|
||||
{ &CLSID_PSTypeLib,
|
||||
"PSTypeLib",
|
||||
"ole2disp.dll",
|
||||
"oleaut32.dll",
|
||||
"Both"
|
||||
},
|
||||
{ &CLSID_PSOAInterface,
|
||||
"PSOAInterface",
|
||||
"ole2disp.dll",
|
||||
"oleaut32.dll",
|
||||
"Both"
|
||||
},
|
||||
{ &CLSID_PSTypeComp,
|
||||
"PSTypeComp",
|
||||
"ole2disp.dll",
|
||||
"oleaut32.dll",
|
||||
"Both"
|
||||
},
|
||||
{ &CLSID_OldFont,
|
||||
"Obsolete Font",
|
||||
NULL,
|
||||
"oleaut32.dll",
|
||||
NULL,
|
||||
"Obsolete Font",
|
||||
"OldFont"
|
||||
},
|
||||
{ &CLSID_PSFactoryBuffer,
|
||||
"PSFactoryBuffer",
|
||||
NULL,
|
||||
"oleaut32.dll",
|
||||
"Both"
|
||||
},
|
||||
{ NULL } /* list terminator */
|
||||
};
|
||||
|
||||
/***********************************************************************
|
||||
* interface list
|
||||
*/
|
||||
|
||||
static struct regsvr_interface const interface_list[] = {
|
||||
{ NULL } /* list terminator */
|
||||
};
|
||||
|
||||
/***********************************************************************
|
||||
* DllRegisterServer (OLEAUT32.320)
|
||||
*/
|
||||
HRESULT WINAPI OLEAUT32_DllRegisterServer()
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("\n");
|
||||
|
||||
hr = register_coclasses(coclass_list);
|
||||
if (SUCCEEDED(hr))
|
||||
hr = register_interfaces(interface_list);
|
||||
return hr;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllUnregisterServer (OLEAUT32.321)
|
||||
*/
|
||||
HRESULT WINAPI OLEAUT32_DllUnregisterServer()
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("\n");
|
||||
|
||||
hr = unregister_coclasses(coclass_list);
|
||||
if (SUCCEEDED(hr))
|
||||
hr = unregister_interfaces(interface_list);
|
||||
return hr;
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
/*
|
||||
* Resource defines for oleaut32
|
||||
*
|
||||
* Copyright 2003 Jon Griffiths
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#ifndef WINE_OLEAUT32_RESOURCE_H
|
||||
#define WINE_OLEAUT32_RESOURCE_H
|
||||
|
||||
/* Localised boolean text */
|
||||
#define IDS_TRUE 100
|
||||
#define IDS_FALSE 101
|
||||
#define IDS_YES 102
|
||||
#define IDS_NO 103
|
||||
#define IDS_ON 104
|
||||
#define IDS_OFF 105
|
||||
/* Alternative month names. Note in XP these are localised only for Russian,
|
||||
* Polish and Arabic.
|
||||
*/
|
||||
#define IDS_MTH_1 106
|
||||
#define IDS_MTH_2 107
|
||||
#define IDS_MTH_3 108
|
||||
#define IDS_MTH_4 109
|
||||
#define IDS_MTH_5 110
|
||||
#define IDS_MTH_6 111
|
||||
#define IDS_MTH_7 112
|
||||
#define IDS_MTH_8 113
|
||||
#define IDS_MTH_9 114
|
||||
#define IDS_MTH_10 115
|
||||
#define IDS_MTH_11 116
|
||||
#define IDS_MTH_12 117
|
||||
|
||||
#endif /* WINE_OLEAUT32_RESOURCE_H */
|
File diff suppressed because it is too large
Load diff
|
@ -1,66 +0,0 @@
|
|||
/*
|
||||
* OlePro32 Stubs
|
||||
*
|
||||
* Copyright 1999 Corel Corporation
|
||||
*
|
||||
* Sean Langley
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "wine/debug.h"
|
||||
#include "ole2.h"
|
||||
#include "olectl.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
||||
|
||||
/***********************************************************************
|
||||
* OleIconToCursor (OLEAUT32.415)
|
||||
*/
|
||||
HCURSOR WINAPI OleIconToCursor( HINSTANCE hinstExe, HICON hicon)
|
||||
{
|
||||
FIXME("(%p,%p), not implemented (olepro32.dll)\n",hinstExe,hicon);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* OleCreatePropertyFrameIndirect (OLEAUT32.416)
|
||||
*/
|
||||
HRESULT WINAPI OleCreatePropertyFrameIndirect( LPOCPFIPARAMS lpParams)
|
||||
{
|
||||
FIXME("(%p), not implemented (olepro32.dll)\n",lpParams);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* OleCreatePropertyFrame (OLEAUT32.417)
|
||||
*/
|
||||
HRESULT WINAPI OleCreatePropertyFrame(
|
||||
HWND hwndOwner, UINT x, UINT y, LPCOLESTR lpszCaption,ULONG cObjects,
|
||||
LPUNKNOWN* ppUnk, ULONG cPages, LPCLSID pPageClsID, LCID lcid,
|
||||
DWORD dwReserved, LPVOID pvReserved )
|
||||
{
|
||||
FIXME("(%p,%d,%d,%s,%ld,%p,%ld,%p,%x,%ld,%p), not implemented (olepro32.dll)\n",
|
||||
hwndOwner,x,y,debugstr_w(lpszCaption),cObjects,ppUnk,cPages,
|
||||
pPageClsID, (int)lcid,dwReserved,pvReserved);
|
||||
return S_OK;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -1,24 +0,0 @@
|
|||
/*
|
||||
* Copyright 2002 Marcus Meissner
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef TMARSHAL_H
|
||||
#define TMARSHAL_H
|
||||
HRESULT WINAPI
|
||||
TypeLibFac_DllGetClassObject(REFCLSID rclsid, REFIID iid,LPVOID *ppv);
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load diff
|
@ -1,600 +0,0 @@
|
|||
/*
|
||||
* typelib.h internal wine data structures
|
||||
* used to decode typelib's
|
||||
*
|
||||
* Copyright 1999 Rein KLazes
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#ifndef _WINE_TYPELIB_H
|
||||
#define _WINE_TYPELIB_H
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "oleauto.h"
|
||||
#include "wine/windef16.h"
|
||||
|
||||
#define HELPDLLFLAG (0x0100)
|
||||
#define DO_NOT_SEEK (-1)
|
||||
|
||||
#define MSFT_HREFTYPE_INTHISFILE(href) (!((href) & 3))
|
||||
#define MSFT_HREFTYPE_INDEX(href) ((href) /sizeof(MSFT_TypeInfoBase))
|
||||
|
||||
/*-------------------------FILE STRUCTURES-----------------------------------*/
|
||||
|
||||
/* There are two known file formats, those created with ICreateTypeLib
|
||||
* have the signature "SLTG" as their first four bytes, while those created
|
||||
* with ICreateTypeLib2 have "MSFT".
|
||||
*/
|
||||
|
||||
/*****************************************************
|
||||
* MSFT typelibs
|
||||
*
|
||||
* These are TypeLibs created with ICreateTypeLib2
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* structure of the typelib type2 header
|
||||
* it is at the beginning of a type lib file
|
||||
*
|
||||
*/
|
||||
typedef struct tagMSFT_Header {
|
||||
/*0x00*/INT magic1; /* 0x5446534D "MSFT" */
|
||||
INT magic2; /* 0x00010002 version nr? */
|
||||
INT posguid; /* position of libid in guid table */
|
||||
/* (should be, else -1) */
|
||||
INT lcid; /* locale id */
|
||||
/*0x10*/INT lcid2;
|
||||
INT varflags; /* (largely) unknown flags ,seems to be always 41 */
|
||||
/* becomes 0x51 with a helpfile defined */
|
||||
/* if help dll defined it's 0x151 */
|
||||
/* update : the lower nibble is syskind */
|
||||
INT version; /* set with SetVersion() */
|
||||
INT flags; /* set with SetFlags() */
|
||||
/*0x20*/INT nrtypeinfos; /* number of typeinfo's (till so far) */
|
||||
INT helpstring; /* position of help string in stringtable */
|
||||
INT helpstringcontext;
|
||||
INT helpcontext;
|
||||
/*0x30*/INT nametablecount; /* number of names in name table */
|
||||
INT nametablechars; /* nr of characters in name table */
|
||||
INT NameOffset; /* offset of name in name table */
|
||||
INT helpfile; /* position of helpfile in stringtable */
|
||||
/*0x40*/INT CustomDataOffset; /* if -1 no custom data, else it is offset */
|
||||
/* in customer data/guid offset table */
|
||||
INT res44; /* unknown always: 0x20 (guid hash size?) */
|
||||
INT res48; /* unknown always: 0x80 (name hash size?) */
|
||||
INT dispatchpos; /* HREFTYPE to IDispatch, or -1 if no IDispatch */
|
||||
/*0x50*/INT res50; /* is zero becomes one when an interface is derived */
|
||||
} MSFT_Header;
|
||||
|
||||
/* segments in the type lib file have a structure like this: */
|
||||
typedef struct tagMSFT_pSeg {
|
||||
INT offset; /* absolute offset in file */
|
||||
INT length; /* length of segment */
|
||||
INT res08; /* unknown always -1 */
|
||||
INT res0c; /* unknown always 0x0f in the header */
|
||||
/* 0x03 in the typeinfo_data */
|
||||
} MSFT_pSeg;
|
||||
|
||||
/* layout of the main segment directory */
|
||||
typedef struct tagMSFT_SegDir {
|
||||
/*1*/MSFT_pSeg pTypeInfoTab; /* each type info get an entry of 0x64 bytes */
|
||||
/* (25 ints) */
|
||||
/*2*/MSFT_pSeg pImpInfo; /* table with info for imported types */
|
||||
/*3*/MSFT_pSeg pImpFiles; /* import libaries */
|
||||
/*4*/MSFT_pSeg pRefTab; /* References table */
|
||||
/*5*/MSFT_pSeg pLibtab; /* always exists, alway same size (0x80) */
|
||||
/* hash table w offsets to guid????? */
|
||||
/*6*/MSFT_pSeg pGuidTab; /* all guids are stored here together with */
|
||||
/* offset in some table???? */
|
||||
/*7*/MSFT_pSeg res07; /* always created, alway same size (0x200) */
|
||||
/* purpose largely unknown */
|
||||
/*8*/MSFT_pSeg pNametab; /* name tables */
|
||||
/*9*/MSFT_pSeg pStringtab; /* string table */
|
||||
/*A*/MSFT_pSeg pTypdescTab; /* table with type descriptors */
|
||||
/*B*/MSFT_pSeg pArrayDescriptions;
|
||||
/*C*/MSFT_pSeg pCustData; /* data table, used for custom data and default */
|
||||
/* parameter values */
|
||||
/*D*/MSFT_pSeg pCDGuids; /* table with offsets for the guids and into */
|
||||
/* the customer data table */
|
||||
/*E*/MSFT_pSeg res0e; /* unknown */
|
||||
/*F*/MSFT_pSeg res0f; /* unknown */
|
||||
} MSFT_SegDir;
|
||||
|
||||
|
||||
/* base type info data */
|
||||
typedef struct tagMSFT_TypeInfoBase {
|
||||
/*000*/ INT typekind; /* it is the TKIND_xxx */
|
||||
/* some byte alignment stuf */
|
||||
INT memoffset; /* points past the file, if no elements */
|
||||
INT res2; /* zero if no element, N*0x40 */
|
||||
INT res3; /* -1 if no lement, (N-1)*0x38 */
|
||||
/*010*/ INT res4; /* always? 3 */
|
||||
INT res5; /* always? zero */
|
||||
INT cElement; /* counts elements, HI=cVars, LO=cFuncs */
|
||||
INT res7; /* always? zero */
|
||||
/*020*/ INT res8; /* always? zero */
|
||||
INT res9; /* always? zero */
|
||||
INT resA; /* always? zero */
|
||||
INT posguid; /* position in guid table */
|
||||
/*030*/ INT flags; /* Typeflags */
|
||||
INT NameOffset; /* offset in name table */
|
||||
INT version; /* element version */
|
||||
INT docstringoffs; /* offset of docstring in string tab */
|
||||
/*040*/ INT helpstringcontext; /* */
|
||||
INT helpcontext; /* */
|
||||
INT oCustData; /* offset in customer data table */
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
INT16 cbSizeVft; /* virtual table size, not including inherits */
|
||||
INT16 cImplTypes; /* nr of implemented interfaces */
|
||||
#else
|
||||
INT16 cImplTypes; /* nr of implemented interfaces */
|
||||
INT16 cbSizeVft; /* virtual table size, not including inherits */
|
||||
#endif
|
||||
/*050*/ INT size; /* size in bytes, at least for structures */
|
||||
/* FIXME: name of this field */
|
||||
INT datatype1; /* position in type description table */
|
||||
/* or in base intefaces */
|
||||
/* if coclass: offset in reftable */
|
||||
/* if interface: reference to inherited if */
|
||||
INT datatype2; /* if 0x8000, entry above is valid */
|
||||
/* actually dunno */
|
||||
/* else it is zero? */
|
||||
INT res18; /* always? 0 */
|
||||
/*060*/ INT res19; /* always? -1 */
|
||||
} MSFT_TypeInfoBase;
|
||||
|
||||
/* layout of an entry with information on imported types */
|
||||
typedef struct tagMSFT_ImpInfo {
|
||||
INT res0; /* unknown */
|
||||
INT oImpFile; /* offset inthe Import File table */
|
||||
INT oGuid; /* offset in Guid table */
|
||||
} MSFT_ImpInfo;
|
||||
|
||||
/* function description data */
|
||||
typedef struct {
|
||||
/* INT recsize; record size including some xtra stuff */
|
||||
INT DataType; /* data type of the memeber, eg return of function */
|
||||
INT Flags; /* something to do with attribute flags (LOWORD) */
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
INT16 funcdescsize; /* size of reconstituted FUNCDESC and related structs */
|
||||
INT16 VtableOffset; /* offset in vtable */
|
||||
#else
|
||||
INT16 VtableOffset; /* offset in vtable */
|
||||
INT16 funcdescsize; /* size of reconstituted FUNCDESC and related structs */
|
||||
#endif
|
||||
INT FKCCIC; /* bit string with the following */
|
||||
/* meaning (bit 0 is the msb): */
|
||||
/* bit 2 indicates that oEntry is numeric */
|
||||
/* bit 3 that parameter has default values */
|
||||
/* calling convention (bits 4-7 ) */
|
||||
/* bit 8 indicates that custom data is present */
|
||||
/* Invokation kind (bits 9-12 ) */
|
||||
/* function kind (eg virtual), bits 13-15 */
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
INT16 nroargs; /* nr of optional arguments */
|
||||
INT16 nrargs; /* number of arguments (including optional ????) */
|
||||
#else
|
||||
INT16 nrargs; /* number of arguments (including optional ????) */
|
||||
INT16 nroargs; /* nr of optional arguments */
|
||||
#endif
|
||||
/* optional attribute fields, the number of them is variable */
|
||||
INT OptAttr[1];
|
||||
/*
|
||||
0* INT helpcontext;
|
||||
1* INT oHelpString;
|
||||
2* INT oEntry; // either offset in string table or numeric as it is //
|
||||
3* INT res9; // unknown (-1) //
|
||||
4* INT resA; // unknown (-1) //
|
||||
5* INT HelpStringContext;
|
||||
// these are controlled by a bit set in the FKCCIC field //
|
||||
6* INT oCustData; // custom data for function //
|
||||
7* INT oArgCustData[1]; // custom data per argument //
|
||||
*/
|
||||
} MSFT_FuncRecord;
|
||||
|
||||
/* after this may follow an array with default value pointers if the
|
||||
* appropriate bit in the FKCCIC field has been set:
|
||||
* INT oDefautlValue[nrargs];
|
||||
*/
|
||||
|
||||
/* Parameter info one per argument*/
|
||||
typedef struct {
|
||||
INT DataType;
|
||||
INT oName;
|
||||
INT Flags;
|
||||
} MSFT_ParameterInfo;
|
||||
|
||||
/* Variable description data */
|
||||
typedef struct {
|
||||
/* INT recsize; // record size including some xtra stuff */
|
||||
INT DataType; /* data type of the variable */
|
||||
INT Flags; /* VarFlags (LOWORD) */
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
INT16 vardescsize; /* size of reconstituted VARDESC and related structs */
|
||||
INT16 VarKind; /* VarKind */
|
||||
#else
|
||||
INT16 VarKind; /* VarKind */
|
||||
INT16 vardescsize; /* size of reconstituted VARDESC and related structs */
|
||||
#endif
|
||||
INT OffsValue; /* value of the variable or the offset */
|
||||
/* in the data structure */
|
||||
/* optional attribute fields, the number of them is variable */
|
||||
/* controlled by record length */
|
||||
INT HelpContext;
|
||||
INT oHelpString;
|
||||
INT res9; /* unknown (-1) */
|
||||
INT oCustData; /* custom data for variable */
|
||||
INT HelpStringContext;
|
||||
|
||||
} MSFT_VarRecord;
|
||||
|
||||
/* Structure of the reference data */
|
||||
typedef struct {
|
||||
INT reftype; /* either offset in type info table, then it's */
|
||||
/* a multiple of 64 */
|
||||
/* or offset in the external reference table */
|
||||
/* with an offset of 1 */
|
||||
INT flags;
|
||||
INT oCustData; /* custom data */
|
||||
INT onext; /* next offset, -1 if last */
|
||||
} MSFT_RefRecord;
|
||||
|
||||
/* this is how a guid is stored */
|
||||
typedef struct {
|
||||
GUID guid;
|
||||
INT hreftype; /* -2 for the typelib guid, typeinfo offset
|
||||
for typeinfo guid, low two bits are 01 if
|
||||
this is an imported typeinfo, low two bits
|
||||
are 10 if this is an imported typelib (used
|
||||
by imported typeinfos) */
|
||||
INT next_hash; /* offset to next guid in the hash bucket */
|
||||
} MSFT_GuidEntry;
|
||||
/* some data preceding entries in the name table */
|
||||
typedef struct {
|
||||
INT hreftype; /* is -1 if name is for neither a typeinfo,
|
||||
a variable, or a function (that is, name
|
||||
is for a typelib or a function parameter).
|
||||
otherwise is the offset of the first
|
||||
typeinfo that this name refers to (either
|
||||
to the typeinfo itself or to a member of
|
||||
the typeinfo */
|
||||
INT next_hash; /* offset to next name in the hash bucket */
|
||||
INT namelen; /* only lower 8 bits are valid,
|
||||
lower-middle 8 bits are unknown (flags?),
|
||||
upper 16 bits are hash code */
|
||||
} MSFT_NameIntro;
|
||||
/* the custom data table directory has enties like this */
|
||||
typedef struct {
|
||||
INT GuidOffset;
|
||||
INT DataOffset;
|
||||
INT next; /* next offset in the table, -1 if it's the last */
|
||||
} MSFT_CDGuid;
|
||||
|
||||
|
||||
/***********************************************************
|
||||
*
|
||||
* SLTG typelibs.
|
||||
*
|
||||
* These are created with ICreateTypeLib
|
||||
*
|
||||
*/
|
||||
|
||||
#include "pshpack1.h"
|
||||
|
||||
typedef struct {
|
||||
/*00*/ DWORD SLTG_magic; /* 0x47544c53 == "SLTG" */
|
||||
/*04*/ WORD nrOfFileBlks; /* no of SLTG_BlkEntry's + 1 */
|
||||
/*06*/ WORD res06; /* ?? always 9 */
|
||||
/*08*/ WORD res08; /* some kind of len/offset ?? */
|
||||
/*0a*/ WORD first_blk; /* 1 based index into blk entries that
|
||||
corresponds to first block in file */
|
||||
/*0c*/ DWORD res0c; /* always 0x000204ff */
|
||||
/*10*/ DWORD res10; /* always 0x00000000 */
|
||||
/*14*/ DWORD res14; /* always 0x000000c0 */
|
||||
/*18*/ DWORD res18; /* always 0x46000000 */
|
||||
/*1c*/ DWORD res1c; /* always 0x00000044 */
|
||||
/*20*/ DWORD res20; /* always 0xffff0000 */
|
||||
} SLTG_Header;
|
||||
|
||||
/* This gets followed by a list of block entries */
|
||||
typedef struct {
|
||||
/*00*/ DWORD len;
|
||||
/*04*/ WORD index_string; /* offs from start of SLTG_Magic to index string */
|
||||
/*06*/ WORD next;
|
||||
} SLTG_BlkEntry;
|
||||
|
||||
/* The order of the blocks in the file is given by starting at Block
|
||||
entry firt_blk and stepping through using the next pointer */
|
||||
|
||||
/* These then get followed by this magic */
|
||||
typedef struct {
|
||||
/*00*/ BYTE res00; /* always 0x01 */
|
||||
/*01*/ CHAR CompObj_magic[8]; /* always "CompObj" */
|
||||
/*09*/ CHAR dir_magic[4]; /* always "dir" */
|
||||
} SLTG_Magic;
|
||||
|
||||
#define SLTG_COMPOBJ_MAGIC "CompObj"
|
||||
#define SLTG_DIR_MAGIC "dir"
|
||||
|
||||
/* Next we have SLTG_Header.nrOfFileBlks - 2 of Index strings. These
|
||||
are presumably unique to within the file and look something like
|
||||
"AAAAAAAAAA" with the first character incremented from 'A' to ensure
|
||||
uniqueness. I guess successive chars increment when we need to wrap
|
||||
the first one. */
|
||||
|
||||
typedef struct {
|
||||
/*00*/ CHAR string[11];
|
||||
} SLTG_Index;
|
||||
|
||||
|
||||
/* This is followed by SLTG_pad9 */
|
||||
typedef struct {
|
||||
/*00*/ CHAR pad[9]; /* 9 '\0's */
|
||||
} SLTG_Pad9;
|
||||
|
||||
|
||||
/* Now we have the noOfFileBlks - 1 worth of blocks. The length of
|
||||
each block is given by its entry in SLTG_BlkEntry. */
|
||||
|
||||
/* type SLTG_NAME in rather like a BSTR except that the length in
|
||||
bytes is given by the first WORD and the string contains 8bit chars */
|
||||
|
||||
typedef WORD SLTG_Name;
|
||||
|
||||
/* The main library block looks like this. This one seems to come last */
|
||||
|
||||
typedef struct {
|
||||
/*00*/ WORD magic; /* 0x51cc */
|
||||
/*02*/ WORD res02; /* 0x0003, 0x0004 */
|
||||
/*04*/ WORD name; /* offset to name in name table */
|
||||
/*06*/ SLTG_Name res06; /* maybe this is just WORD == 0xffff */
|
||||
SLTG_Name helpstring;
|
||||
SLTG_Name helpfile;
|
||||
DWORD helpcontext;
|
||||
WORD syskind; /* == 1 for win32, 0 for win16 */
|
||||
WORD lcid; /* == 0x409, 0x809 etc */
|
||||
DWORD res12; /* == 0 */
|
||||
WORD libflags; /* LIBFLAG_* */
|
||||
WORD maj_vers;
|
||||
WORD min_vers;
|
||||
GUID uuid;
|
||||
} SLTG_LibBlk;
|
||||
|
||||
#define SLTG_LIBBLK_MAGIC 0x51cc
|
||||
|
||||
/* we then get 0x40 bytes worth of 0xffff or small numbers followed by
|
||||
nrOfFileBlks - 2 of these */
|
||||
typedef struct {
|
||||
WORD small_no;
|
||||
SLTG_Name index_name; /* This refers to a name in the directory */
|
||||
SLTG_Name other_name; /* Another one of these weird names */
|
||||
WORD res1a; /* 0xffff */
|
||||
WORD name_offs; /* offset to name in name table */
|
||||
WORD more_bytes; /* if this is non-zero we get this many
|
||||
bytes before the next element, which seem
|
||||
to reference the docstring of the type ? */
|
||||
WORD res20; /* 0xffff */
|
||||
DWORD helpcontext;
|
||||
WORD res26; /* 0xffff */
|
||||
GUID uuid;
|
||||
} SLTG_OtherTypeInfo;
|
||||
|
||||
/* Next we get WORD 0x0003 followed by a DWORD which if we add to
|
||||
0x216 gives the offset to the name table from the start of the LibBlk
|
||||
struct */
|
||||
|
||||
typedef struct {
|
||||
/*00*/ WORD magic; /* 0x0501 */
|
||||
/*02*/ DWORD href_table; /* if not 0xffffffff, then byte offset from
|
||||
beginning of struct to href table */
|
||||
/*06*/ DWORD res06; /* 0xffffffff */
|
||||
/*0a*/ DWORD elem_table; /* offset to members */
|
||||
/*0e*/ DWORD res0e; /* 0xffffffff */
|
||||
/*12*/ WORD major_version; /* major version number */
|
||||
/*14*/ WORD minor_version; /* minor version number */
|
||||
/*16*/ DWORD res16; /* 0xfffe0000 */
|
||||
/*1a*/ BYTE typeflags1;/* 0x02 | top 5 bits hold l5sbs of TYPEFLAGS */
|
||||
/*1b*/ BYTE typeflags2;/* TYPEFLAGS >> 5 */
|
||||
/*1c*/ BYTE typeflags3;/* 0x02*/
|
||||
/*1d*/ BYTE typekind; /* 0x03 == TKIND_INTERFACE etc. */
|
||||
/*1e*/ DWORD res1e; /* 0x00000000 or 0xffffffff */
|
||||
} SLTG_TypeInfoHeader;
|
||||
|
||||
#define SLTG_TIHEADER_MAGIC 0x0501
|
||||
|
||||
typedef struct {
|
||||
/*00*/ WORD cFuncs;
|
||||
/*02*/ WORD cVars;
|
||||
/*04*/ WORD cImplTypes;
|
||||
/*06*/ WORD res06;
|
||||
/*08*/ WORD res08;
|
||||
/*0a*/ WORD res0a;
|
||||
/*0c*/ WORD res0c;
|
||||
/*0e*/ WORD res0e;
|
||||
/*10*/ WORD res10;
|
||||
/*12*/ WORD res12;
|
||||
/*14*/ WORD tdescalias_vt; /* for TKIND_ALIAS */
|
||||
/*16*/ WORD res16;
|
||||
/*18*/ WORD res18;
|
||||
/*1a*/ WORD res1a;
|
||||
/*1c*/ WORD res1c;
|
||||
/*1e*/ WORD res1e;
|
||||
/*20*/ WORD cbSizeInstance;
|
||||
/*22*/ WORD cbAlignment;
|
||||
/*24*/ WORD res24;
|
||||
/*26*/ WORD res26;
|
||||
/*28*/ WORD cbSizeVft;
|
||||
/*2a*/ WORD res2a;
|
||||
/*2c*/ WORD res2c;
|
||||
/*2e*/ WORD res2e;
|
||||
/*30*/ WORD res30;
|
||||
/*32*/ WORD res32;
|
||||
/*34*/ WORD res34;
|
||||
} SLTG_TypeInfoTail;
|
||||
|
||||
typedef struct {
|
||||
/*00*/ WORD res00; /* 0x0001 sometimes 0x0003 ?? */
|
||||
/*02*/ WORD res02; /* 0xffff */
|
||||
/*04*/ BYTE res04; /* 0x01 */
|
||||
/*05*/ DWORD cbExtra; /* No of bytes that follow */
|
||||
} SLTG_MemberHeader;
|
||||
|
||||
typedef struct {
|
||||
/*00*/ WORD magic; /* 0x120a */
|
||||
/*02*/ WORD next; /* offset in bytes to next block from start of block
|
||||
group, 0xffff if last item */
|
||||
/*04*/ WORD name; /* offset to name within name table */
|
||||
/*06*/ WORD value; /* offset to value from start of block group */
|
||||
/*08*/ WORD res08; /* 0x56 */
|
||||
/*0a*/ DWORD memid; /* memid */
|
||||
/*0e*/ WORD helpcontext;/* 0xfffe == no context, 0x0001 == stored in EnumInfo struct, else offset
|
||||
to value from start of block group */
|
||||
/*10*/ WORD helpstring;/* offset from start of block group to string offset */
|
||||
} SLTG_EnumItem;
|
||||
|
||||
#define SLTG_ENUMITEM_MAGIC 0x120a
|
||||
|
||||
typedef struct {
|
||||
/*00*/ WORD vt; /* vartype, 0xffff marks end. */
|
||||
/*02*/ WORD res02; /* ?, 0xffff marks end */
|
||||
} SLTG_AliasItem;
|
||||
|
||||
#define SLTG_ALIASITEM_MAGIC 0x001d
|
||||
|
||||
|
||||
typedef struct {
|
||||
BYTE magic; /* 0x4c or 0x6c */
|
||||
BYTE inv; /* high nibble is INVOKE_KIND, low nibble = 2 */
|
||||
WORD next; /* byte offset from beginning of group to next fn */
|
||||
WORD name; /* Offset within name table to name */
|
||||
DWORD dispid; /* dispid */
|
||||
WORD helpcontext; /* helpcontext (again 1 is special) */
|
||||
WORD helpstring;/* helpstring offset to offset */
|
||||
WORD arg_off; /* offset to args from start of block */
|
||||
BYTE nacc; /* lowest 3bits are CALLCONV, rest are no of args */
|
||||
BYTE retnextopt;/* if 0x80 bit set ret type follows else next WORD
|
||||
is offset to ret type. No of optional args is
|
||||
middle 6 bits */
|
||||
WORD rettype; /* return type VT_?? or offset to ret type */
|
||||
WORD vtblpos; /* position in vtbl? */
|
||||
WORD funcflags; /* present if magic == 0x6c */
|
||||
/* Param list starts, repeat next two as required */
|
||||
#if 0
|
||||
WORD name; /* offset to 2nd letter of name */
|
||||
WORD+ type; /* VT_ of param */
|
||||
#endif
|
||||
} SLTG_Function;
|
||||
|
||||
#define SLTG_FUNCTION_MAGIC 0x4c
|
||||
#define SLTG_FUNCTION_WITH_FLAGS_MAGIC 0x6c
|
||||
|
||||
typedef struct {
|
||||
/*00*/ BYTE magic; /* 0xdf */
|
||||
/*01*/ BYTE res01; /* 0x00 */
|
||||
/*02*/ DWORD res02; /* 0xffffffff */
|
||||
/*06*/ DWORD res06; /* 0xffffffff */
|
||||
/*0a*/ DWORD res0a; /* 0xffffffff */
|
||||
/*0e*/ DWORD res0e; /* 0xffffffff */
|
||||
/*12*/ DWORD res12; /* 0xffffffff */
|
||||
/*16*/ DWORD res16; /* 0xffffffff */
|
||||
/*1a*/ DWORD res1a; /* 0xffffffff */
|
||||
/*1e*/ DWORD res1e; /* 0xffffffff */
|
||||
/*22*/ DWORD res22; /* 0xffffffff */
|
||||
/*26*/ DWORD res26; /* 0xffffffff */
|
||||
/*2a*/ DWORD res2a; /* 0xffffffff */
|
||||
/*2e*/ DWORD res2e; /* 0xffffffff */
|
||||
/*32*/ DWORD res32; /* 0xffffffff */
|
||||
/*36*/ DWORD res36; /* 0xffffffff */
|
||||
/*3a*/ DWORD res3a; /* 0xffffffff */
|
||||
/*3e*/ DWORD res3e; /* 0xffffffff */
|
||||
/*42*/ WORD res42; /* 0xffff */
|
||||
/*44*/ DWORD number; /* this is 8 times the number of refs */
|
||||
/*48*/ /* Now we have number bytes (8 for each ref) of SLTG_UnknownRefInfo */
|
||||
|
||||
/*50*/ WORD res50; /* 0xffff */
|
||||
/*52*/ BYTE res52; /* 0x01 */
|
||||
/*53*/ DWORD res53; /* 0x00000000 */
|
||||
/*57*/ SLTG_Name names[1];
|
||||
/* Now we have number/8 SLTG_Names (first WORD is no of bytes in the ascii
|
||||
* string). Strings look like "*\Rxxxx*#n". If xxxx == ffff then the
|
||||
* ref refers to the nth type listed in this library (0 based). Else
|
||||
* the xxxx (which maybe fewer than 4 digits) is the offset into the name
|
||||
* table to a string "*\G{<guid>}#1.0#0#C:\WINNT\System32\stdole32.tlb#"
|
||||
* The guid is the typelib guid; the ref again refers to the nth type of
|
||||
* the imported typelib.
|
||||
*/
|
||||
|
||||
/*xx*/ BYTE resxx; /* 0xdf */
|
||||
|
||||
} SLTG_RefInfo;
|
||||
|
||||
#define SLTG_REF_MAGIC 0xdf
|
||||
|
||||
typedef struct {
|
||||
WORD res00; /* 0x0001 */
|
||||
BYTE res02; /* 0x02 */
|
||||
BYTE res03; /* 0x40 if internal ref, 0x00 if external ? */
|
||||
WORD res04; /* 0xffff */
|
||||
WORD res06; /* 0x0000, 0x0013 or 0xffff ?? */
|
||||
} SLTG_UnknownRefInfo;
|
||||
|
||||
typedef struct {
|
||||
WORD res00; /* 0x004a */
|
||||
WORD next; /* byte offs to next interface */
|
||||
WORD res04; /* 0xffff */
|
||||
BYTE impltypeflags; /* IMPLTYPEFLAG_* */
|
||||
BYTE res07; /* 0x80 */
|
||||
WORD res08; /* 0x0012, 0x0028 ?? */
|
||||
WORD ref; /* number in ref table ? */
|
||||
WORD res0c; /* 0x4000 */
|
||||
WORD res0e; /* 0xfffe */
|
||||
WORD res10; /* 0xffff */
|
||||
WORD res12; /* 0x001d */
|
||||
WORD pos_in_table; /* 0x0, 0x4, ? */
|
||||
} SLTG_ImplInfo;
|
||||
|
||||
#define SLTG_IMPL_MAGIC 0x004a
|
||||
|
||||
typedef struct {
|
||||
BYTE magic; /* 0x0a */
|
||||
BYTE typepos;
|
||||
WORD next;
|
||||
WORD name;
|
||||
WORD byte_offs; /* pos in struct */
|
||||
WORD type; /* if typepos == 0x02 this is the type, else offset to type */
|
||||
DWORD memid;
|
||||
WORD helpcontext; /* ?? */
|
||||
WORD helpstring; /* ?? */
|
||||
} SLTG_RecordItem;
|
||||
|
||||
#define SLTG_RECORD_MAGIC 0x0a
|
||||
|
||||
|
||||
/* CARRAYs look like this
|
||||
WORD type == VT_CARRAY
|
||||
WORD offset from start of block to SAFEARRAY
|
||||
WORD typeofarray
|
||||
*/
|
||||
|
||||
extern DWORD _invoke(FARPROC func,CALLCONV callconv, int nrargs, DWORD *args);
|
||||
extern void dump_Variant(VARIANT * pvar);
|
||||
#include "poppack.h"
|
||||
|
||||
/*---------------------------END--------------------------------------------*/
|
||||
#endif
|
|
@ -1,12 +0,0 @@
|
|||
2 stub CREATETYPELIB
|
||||
3 pascal LoadTypeLib(ptr ptr) LoadTypeLib16
|
||||
4 stub LHASHVALOFNAMESYS
|
||||
5 stub _IID_ICREATETYPEINFO
|
||||
6 stub _IID_ICREATETYPELIB
|
||||
7 stub _IID_ITYPECOMP
|
||||
8 stub _IID_ITYPEINFO
|
||||
9 stub _IID_ITYPELIB
|
||||
10 stub REGISTERTYPELIB
|
||||
11 stub LOADREGTYPELIB
|
||||
14 pascal QueryPathOfRegTypeLib(ptr word word word ptr) QueryPathOfRegTypeLib16
|
||||
15 pascal OaBuildVersion() OaBuildVersion16
|
|
@ -1,180 +0,0 @@
|
|||
/*
|
||||
* TYPELIB 16bit part.
|
||||
*
|
||||
* Copyright 1997 Marcus Meissner
|
||||
* Copyright 1999 Rein Klazes
|
||||
* Copyright 2000 Francois Jacques
|
||||
* Copyright 2001 Huw D M Davies for CodeWeavers
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "winerror.h"
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winnls.h"
|
||||
#include "winreg.h"
|
||||
#include "winuser.h"
|
||||
|
||||
#include "objbase.h"
|
||||
#include "ole2disp.h"
|
||||
#include "typelib.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
||||
|
||||
/*************************************************************************
|
||||
* TYPELIB {TYPELIB}
|
||||
*
|
||||
* This dll is the 16 bit version of the Typelib API, part the original
|
||||
* implementation of Ole automation. It and its companion ole2disp.dll were
|
||||
* superseded by oleaut32.dll which provides 32 bit implementations of these
|
||||
* functions and greatly extends the Ole Api.
|
||||
*
|
||||
* Winelib developers cannot use these functions directly, they are implemented
|
||||
* solely for backwards compatibility with existing legacy applications.
|
||||
*
|
||||
* SEE ALSO
|
||||
* oleaut32(), ole2disp().
|
||||
*/
|
||||
|
||||
/****************************************************************************
|
||||
* QueryPathOfRegTypeLib [TYPELIB.14]
|
||||
*
|
||||
* Get the registry key of a registered type library.
|
||||
*
|
||||
* RETURNS
|
||||
* Success: S_OK. path is updated with the key name
|
||||
* Failure: E_FAIL, if guid was not found in the registry
|
||||
*
|
||||
* NOTES
|
||||
* The key takes the form "Classes\Typelib\<guid>\<major>.<minor>\<lcid>\win16\"
|
||||
*/
|
||||
HRESULT WINAPI
|
||||
QueryPathOfRegTypeLib16(
|
||||
REFGUID guid, /* [in] Guid to get the key name for */
|
||||
WORD wMaj, /* [in] Major version */
|
||||
WORD wMin, /* [in] Minor version */
|
||||
LCID lcid, /* [in] Locale Id */
|
||||
LPBSTR16 path) /* [out] Destination for the registry key name */
|
||||
{
|
||||
char xguid[80];
|
||||
char typelibkey[100],pathname[260];
|
||||
DWORD plen;
|
||||
|
||||
TRACE("\n");
|
||||
|
||||
if (HIWORD(guid)) {
|
||||
sprintf( typelibkey, "SOFTWARE\\Classes\\Typelib\\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\\%d.%d\\%lx\\win16",
|
||||
guid->Data1, guid->Data2, guid->Data3,
|
||||
guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3],
|
||||
guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7],
|
||||
wMaj,wMin,lcid);
|
||||
} else {
|
||||
sprintf(xguid,"<guid 0x%08lx>",(DWORD)guid);
|
||||
FIXME("(%s,%d,%d,0x%04lx,%p),can't handle non-string guids.\n",xguid,wMaj,wMin,(DWORD)lcid,path);
|
||||
return E_FAIL;
|
||||
}
|
||||
plen = sizeof(pathname);
|
||||
if (RegQueryValueA(HKEY_LOCAL_MACHINE,typelibkey,pathname,&plen)) {
|
||||
/* try again without lang specific id */
|
||||
if (SUBLANGID(lcid))
|
||||
return QueryPathOfRegTypeLib16(guid,wMaj,wMin,PRIMARYLANGID(lcid),path);
|
||||
FIXME("key %s not found\n",typelibkey);
|
||||
return E_FAIL;
|
||||
}
|
||||
*path = SysAllocString16(pathname);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* LoadTypeLib [TYPELIB.3]
|
||||
*
|
||||
* Load and register a type library.
|
||||
*
|
||||
* RETURNS
|
||||
* Success: S_OK. pptLib contains the type libraries ITypeLib interface.
|
||||
* Failure: An HRESULT error code.
|
||||
*
|
||||
* NOTES
|
||||
* Both parameters are FAR pointers.
|
||||
*/
|
||||
HRESULT WINAPI LoadTypeLib16(
|
||||
LPOLESTR szFile, /* [in] Name of file to load from */
|
||||
ITypeLib** pptLib) /* [out] Destination for loaded ITypeLib interface */
|
||||
{
|
||||
FIXME("(%s,%p): stub\n",debugstr_w((LPWSTR)szFile),pptLib);
|
||||
|
||||
if (pptLib!=0)
|
||||
*pptLib=0;
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* OaBuildVersion (TYPELIB.15)
|
||||
*
|
||||
* Get the Ole Automation build version.
|
||||
*
|
||||
* PARAMS
|
||||
* None
|
||||
*
|
||||
* RETURNS
|
||||
* The build version.
|
||||
*
|
||||
* NOTES
|
||||
* Known typelib.dll versions:
|
||||
*| OLE Ver. Comments Date Build Ver.
|
||||
*| -------- ------------------------- ---- ---------
|
||||
*| OLE 2.01 Call not available 1993 N/A
|
||||
*| OLE 2.02 1993-94 02 3002
|
||||
*| OLE 2.03 23 730
|
||||
*| OLE 2.03 03 3025
|
||||
*| OLE 2.03 W98 SE orig. file !! 1993-95 10 3024
|
||||
*| OLE 2.1 NT 1993-95 ?? ???
|
||||
*| OLE 2.3.1 W95 23 700
|
||||
*| OLE2 4.0 NT4SP6 1993-98 40 4277
|
||||
*/
|
||||
DWORD WINAPI OaBuildVersion16(void)
|
||||
{
|
||||
/* FIXME: I'd like to return the highest currently known version value
|
||||
* in case the user didn't force a --winver, but I don't know how
|
||||
* to retrieve the "versionForced" info from misc/version.c :(
|
||||
* (this would be useful in other places, too) */
|
||||
FIXME("If you get version error messages, please report them\n");
|
||||
switch(GetVersion() & 0x8000ffff) /* mask off build number */
|
||||
{
|
||||
case 0x80000a03: /* WIN31 */
|
||||
return MAKELONG(3027, 3); /* WfW 3.11 */
|
||||
case 0x80000004: /* WIN95 */
|
||||
return MAKELONG(700, 23); /* Win95A */
|
||||
case 0x80000a04: /* WIN98 */
|
||||
return MAKELONG(3024, 10); /* W98 SE */
|
||||
case 0x00000004: /* NT4 */
|
||||
return MAKELONG(4277, 40); /* NT4 SP6 */
|
||||
default:
|
||||
FIXME("Version value not known yet. Please investigate it!\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,435 +0,0 @@
|
|||
/*
|
||||
* Variant Inlines
|
||||
*
|
||||
* Copyright 2003 Jon Griffiths
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#define NONAMELESSUNION
|
||||
#define NONAMELESSSTRUCT
|
||||
#include "windef.h"
|
||||
#include "winerror.h"
|
||||
#include "objbase.h"
|
||||
#include "oleauto.h"
|
||||
#include <math.h>
|
||||
|
||||
/* Get just the type from a variant pointer */
|
||||
#define V_TYPE(v) (V_VT((v)) & VT_TYPEMASK)
|
||||
|
||||
/* Flags set in V_VT, other than the actual type value */
|
||||
#define VT_EXTRA_TYPE (VT_VECTOR|VT_ARRAY|VT_BYREF|VT_RESERVED)
|
||||
|
||||
/* Get the extra flags from a variant pointer */
|
||||
#define V_EXTRA_TYPE(v) (V_VT((v)) & VT_EXTRA_TYPE)
|
||||
|
||||
extern const char* wine_vtypes[];
|
||||
#define debugstr_vt(v) (((v)&VT_TYPEMASK) <= VT_CLSID ? wine_vtypes[((v)&VT_TYPEMASK)] : \
|
||||
((v)&VT_TYPEMASK) == VT_BSTR_BLOB ? "VT_BSTR_BLOB": "Invalid")
|
||||
#define debugstr_VT(v) (!(v) ? "(null)" : debugstr_vt(V_TYPE((v))))
|
||||
|
||||
extern const char* wine_vflags[];
|
||||
#define debugstr_vf(v) (wine_vflags[((v)&VT_EXTRA_TYPE)>>12])
|
||||
#define debugstr_VF(v) (!(v) ? "(null)" : debugstr_vf(V_EXTRA_TYPE(v)))
|
||||
|
||||
/* Size constraints */
|
||||
#define I1_MAX 0x7f
|
||||
#define I1_MIN ((-I1_MAX)-1)
|
||||
#define UI1_MAX 0xff
|
||||
#define UI1_MIN 0
|
||||
#define I2_MAX 0x7fff
|
||||
#define I2_MIN ((-I2_MAX)-1)
|
||||
#define UI2_MAX 0xffff
|
||||
#define UI2_MIN 0
|
||||
#define I4_MAX 0x7fffffff
|
||||
#define I4_MIN ((-I4_MAX)-1)
|
||||
#define UI4_MAX 0xffffffff
|
||||
#define UI4_MIN 0
|
||||
#define I8_MAX (((LONGLONG)I4_MAX << 32) | UI4_MAX)
|
||||
#define I8_MIN ((-I8_MAX)-1)
|
||||
#define UI8_MAX (((ULONGLONG)UI4_MAX << 32) | UI4_MAX)
|
||||
#define UI8_MIN 0
|
||||
#define DATE_MAX 2958465
|
||||
#define DATE_MIN -657434
|
||||
#define R4_MAX 3.402823567797336e38
|
||||
#define R4_MIN 1.40129846432481707e-45
|
||||
#define R8_MAX 1.79769313486231470e+308
|
||||
#define R8_MIN 4.94065645841246544e-324
|
||||
|
||||
/* Value of sign for a positive decimal number */
|
||||
#define DECIMAL_POS 0
|
||||
|
||||
/* Native headers don't change the union ordering for DECIMAL sign/scale (duh).
|
||||
* This means that the signscale member is only useful for setting both members to 0.
|
||||
* SIGNSCALE creates endian-correct values so that we can properly set both at once
|
||||
* to values other than 0.
|
||||
*/
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#define SIGNSCALE(sign,scale) (((scale) << 8) | sign)
|
||||
#else
|
||||
#define SIGNSCALE(sign,scale) (((sign) << 8) | scale)
|
||||
#endif
|
||||
|
||||
/* Macros for getting at a DECIMAL's parts */
|
||||
#define DEC_SIGN(d) ((d)->sign)
|
||||
#define DEC_SCALE(d) ((d)->scale)
|
||||
#define DEC_SIGNSCALE(d) ((d)->signscale)
|
||||
#define DEC_HI32(d) ((d)->Hi32)
|
||||
#define DEC_MID32(d) ((d)->Mid32)
|
||||
#define DEC_LO32(d) ((d)->Lo32)
|
||||
#define DEC_LO64(d) ((d)->Lo64)
|
||||
|
||||
#define DEC_MAX_SCALE 28 /* Maximum scale for a decimal */
|
||||
|
||||
/* Inline return type */
|
||||
#define RETTYP inline static HRESULT
|
||||
|
||||
/* Simple compiler cast from one type to another */
|
||||
#define SIMPLE(dest, src, func) RETTYP _##func(src in, dest* out) { \
|
||||
*out = in; return S_OK; }
|
||||
|
||||
/* Compiler cast where input cannot be negative */
|
||||
#define NEGTST(dest, src, func) RETTYP _##func(src in, dest* out) { \
|
||||
if (in < (src)0) return DISP_E_OVERFLOW; *out = in; return S_OK; }
|
||||
|
||||
/* Compiler cast where input cannot be > some number */
|
||||
#define POSTST(dest, src, func, tst) RETTYP _##func(src in, dest* out) { \
|
||||
if (in > (dest)tst) return DISP_E_OVERFLOW; *out = in; return S_OK; }
|
||||
|
||||
/* Compiler cast where input cannot be < some number or >= some other number */
|
||||
#define BOTHTST(dest, src, func, lo, hi) RETTYP _##func(src in, dest* out) { \
|
||||
if (in < (dest)lo || in > hi) return DISP_E_OVERFLOW; *out = in; return S_OK; }
|
||||
|
||||
/* Conversions from IDispatch use the same code */
|
||||
HRESULT VARIANT_FromDisp(IDispatch*,LCID,void*,VARTYPE);
|
||||
/* As do conversions from BSTR to numeric types */
|
||||
HRESULT VARIANT_NumberFromBstr(OLECHAR*,LCID,ULONG,void*,VARTYPE);
|
||||
|
||||
#define CY_MULTIPLIER 10000 /* 4 dp of precision */
|
||||
#define CY_MULTIPLIER_F 10000.0
|
||||
#define CY_HALF (CY_MULTIPLIER/2) /* 0.5 */
|
||||
#define CY_HALF_F (CY_MULTIPLIER_F/2.0)
|
||||
|
||||
/* I1 */
|
||||
POSTST(signed char, BYTE, VarI1FromUI1, I1_MAX);
|
||||
BOTHTST(signed char, SHORT, VarI1FromI2, I1_MIN, I1_MAX);
|
||||
BOTHTST(signed char, LONG, VarI1FromI4, I1_MIN, I1_MAX);
|
||||
#define _VarI1FromR4(flt,out) VarI1FromR8((double)flt,out)
|
||||
#define _VarI1FromR8 VarI1FromR8
|
||||
#define _VarI1FromCy VarI1FromCy
|
||||
#define _VarI1FromDate(dt,out) VarI1FromR8((double)dt,out)
|
||||
#define _VarI1FromStr(str,lcid,flags,out) VARIANT_NumberFromBstr(str,lcid,flags,(BYTE*)out,VT_I1)
|
||||
#define _VarI1FromDisp(disp,lcid,out) VARIANT_FromDisp(disp, lcid, (BYTE*)out, VT_I1)
|
||||
SIMPLE(signed char, VARIANT_BOOL, VarI1FromBool);
|
||||
POSTST(signed char, USHORT, VarI1FromUI2, I1_MAX);
|
||||
POSTST(signed char, ULONG, VarI1FromUI4, I1_MAX);
|
||||
#define _VarI1FromDec VarI1FromDec
|
||||
BOTHTST(signed char, LONG64, VarI1FromI8, I1_MIN, I1_MAX);
|
||||
POSTST(signed char, ULONG64, VarI1FromUI8, I1_MAX);
|
||||
|
||||
/* UI1 */
|
||||
BOTHTST(BYTE, SHORT, VarUI1FromI2, UI1_MIN, UI1_MAX);
|
||||
#define _VarUI1FromR4(flt,out) VarUI1FromR8((double)flt,out)
|
||||
#define _VarUI1FromR8 VarUI1FromR8
|
||||
#define _VarUI1FromCy VarUI1FromCy
|
||||
#define _VarUI1FromDate(dt,out) VarUI1FromR8((double)dt,out)
|
||||
#define _VarUI1FromStr(str,lcid,flags,out) VARIANT_NumberFromBstr(str,lcid,flags,(BYTE*)out,VT_UI1)
|
||||
#define _VarUI1FromDisp(disp,lcid,out) VARIANT_FromDisp(disp, lcid, out, VT_UI1)
|
||||
SIMPLE(BYTE, VARIANT_BOOL, VarUI1FromBool);
|
||||
NEGTST(BYTE, signed char, VarUI1FromI1);
|
||||
POSTST(BYTE, USHORT, VarUI1FromUI2, UI1_MAX);
|
||||
BOTHTST(BYTE, LONG, VarUI1FromI4, UI1_MIN, UI1_MAX);
|
||||
POSTST(BYTE, ULONG, VarUI1FromUI4, UI1_MAX);
|
||||
#define _VarUI1FromDec VarUI1FromDec
|
||||
BOTHTST(BYTE, LONG64, VarUI1FromI8, UI1_MIN, UI1_MAX);
|
||||
POSTST(BYTE, ULONG64, VarUI1FromUI8, UI1_MAX);
|
||||
|
||||
/* I2 */
|
||||
SIMPLE(SHORT, BYTE, VarI2FromUI1);
|
||||
BOTHTST(SHORT, LONG, VarI2FromI4, I2_MIN, I2_MAX);
|
||||
#define _VarI2FromR4(flt,out) VarI2FromR8((double)flt,out)
|
||||
#define _VarI2FromR8 VarI2FromR8
|
||||
#define _VarI2FromCy VarI2FromCy
|
||||
#define _VarI2FromDate(dt,out) VarI2FromR8((double)dt,out)
|
||||
#define _VarI2FromStr(str,lcid,flags,out) VARIANT_NumberFromBstr(str,lcid,flags,(BYTE*)out,VT_I2)
|
||||
#define _VarI2FromDisp(disp,lcid,out) VARIANT_FromDisp(disp, lcid, (BYTE*)out, VT_I2)
|
||||
SIMPLE(SHORT, VARIANT_BOOL, VarI2FromBool);
|
||||
SIMPLE(SHORT, signed char, VarI2FromI1);
|
||||
POSTST(SHORT, USHORT, VarI2FromUI2, I2_MAX);
|
||||
POSTST(SHORT, ULONG, VarI2FromUI4, I2_MAX);
|
||||
#define _VarI2FromDec VarI2FromDec
|
||||
BOTHTST(SHORT, LONG64, VarI2FromI8, I2_MIN, I2_MAX);
|
||||
POSTST(SHORT, ULONG64, VarI2FromUI8, I2_MAX);
|
||||
|
||||
/* UI2 */
|
||||
SIMPLE(USHORT, BYTE, VarUI2FromUI1);
|
||||
NEGTST(USHORT, SHORT, VarUI2FromI2);
|
||||
BOTHTST(USHORT, LONG, VarUI2FromI4, UI2_MIN, UI2_MAX);
|
||||
#define _VarUI2FromR4(flt,out) VarUI2FromR8((double)flt,out)
|
||||
#define _VarUI2FromR8 VarUI2FromR8
|
||||
#define _VarUI2FromCy VarUI2FromCy
|
||||
#define _VarUI2FromDate(dt,out) VarUI2FromR8((double)dt,out)
|
||||
#define _VarUI2FromStr(str,lcid,flags,out) VARIANT_NumberFromBstr(str,lcid,flags,(BYTE*)out,VT_UI2)
|
||||
#define _VarUI2FromDisp(disp,lcid,out) VARIANT_FromDisp(disp, lcid, out, VT_UI2)
|
||||
SIMPLE(USHORT, VARIANT_BOOL, VarUI2FromBool);
|
||||
NEGTST(USHORT, signed char, VarUI2FromI1);
|
||||
POSTST(USHORT, ULONG, VarUI2FromUI4, UI2_MAX);
|
||||
#define _VarUI2FromDec VarUI2FromDec
|
||||
BOTHTST(USHORT, LONG64, VarUI2FromI8, UI2_MIN, UI2_MAX);
|
||||
POSTST(USHORT, ULONG64, VarUI2FromUI8, UI2_MAX);
|
||||
|
||||
/* I4 */
|
||||
SIMPLE(LONG, BYTE, VarI4FromUI1);
|
||||
SIMPLE(LONG, SHORT, VarI4FromI2);
|
||||
#define _VarI4FromR4(flt,out) VarI4FromR8((double)flt,out)
|
||||
#define _VarI4FromR8 VarI4FromR8
|
||||
#define _VarI4FromCy VarI4FromCy
|
||||
#define _VarI4FromDate(dt,out) VarI4FromR8((double)dt,out)
|
||||
#define _VarI4FromStr(str,lcid,flags,out) VARIANT_NumberFromBstr(str,lcid,flags,(BYTE*)out,VT_I4)
|
||||
#define _VarI4FromDisp(disp,lcid,out) VARIANT_FromDisp(disp, lcid, (BYTE*)out, VT_I4)
|
||||
SIMPLE(LONG, VARIANT_BOOL, VarI4FromBool);
|
||||
SIMPLE(LONG, signed char, VarI4FromI1);
|
||||
SIMPLE(LONG, USHORT, VarI4FromUI2);
|
||||
POSTST(LONG, ULONG, VarI4FromUI4, I4_MAX);
|
||||
#define _VarI4FromDec VarI4FromDec
|
||||
BOTHTST(LONG, LONG64, VarI4FromI8, I4_MIN, I4_MAX);
|
||||
POSTST(LONG, ULONG64, VarI4FromUI8, I4_MAX);
|
||||
|
||||
/* UI4 */
|
||||
SIMPLE(ULONG, BYTE, VarUI4FromUI1);
|
||||
NEGTST(ULONG, SHORT, VarUI4FromI2);
|
||||
NEGTST(ULONG, LONG, VarUI4FromI4);
|
||||
#define _VarUI4FromR4(flt,out) VarUI4FromR8((double)flt,out)
|
||||
#define _VarUI4FromR8 VarUI4FromR8
|
||||
#define _VarUI4FromCy VarUI4FromCy
|
||||
#define _VarUI4FromDate(dt,out) VarUI4FromR8((double)dt,out)
|
||||
#define _VarUI4FromStr(str,lcid,flags,out) VARIANT_NumberFromBstr(str,lcid,flags,(BYTE*)out,VT_UI4)
|
||||
#define _VarUI4FromDisp(disp,lcid,out) VARIANT_FromDisp(disp, lcid, out, VT_UI4)
|
||||
SIMPLE(ULONG, VARIANT_BOOL, VarUI4FromBool);
|
||||
NEGTST(ULONG, signed char, VarUI4FromI1);
|
||||
SIMPLE(ULONG, USHORT, VarUI4FromUI2);
|
||||
#define _VarUI4FromDec VarUI4FromDec
|
||||
BOTHTST(ULONG, LONG64, VarUI4FromI8, UI4_MIN, UI4_MAX);
|
||||
POSTST(ULONG, ULONG64, VarUI4FromUI8, UI4_MAX);
|
||||
|
||||
/* I8 */
|
||||
SIMPLE(LONG64, BYTE, VarI8FromUI1);
|
||||
SIMPLE(LONG64, SHORT, VarI8FromI2);
|
||||
#define _VarI8FromR4 VarI8FromR8
|
||||
#define _VarI8FromR8 VarI8FromR8
|
||||
#define _VarI8FromCy VarI8FromCy
|
||||
#define _VarI8FromDate(dt,out) VarI8FromR8((double)dt,out)
|
||||
#define _VarI8FromStr(str,lcid,flags,out) VARIANT_NumberFromBstr(str,lcid,flags,(BYTE*)out,VT_I8)
|
||||
#define _VarI8FromDisp(disp,lcid,out) VARIANT_FromDisp(disp, lcid, out, VT_I8)
|
||||
#define _VarI8FromBool _VarI8FromI2
|
||||
SIMPLE(LONG64, signed char, VarI8FromI1);
|
||||
SIMPLE(LONG64, USHORT, VarI8FromUI2);
|
||||
SIMPLE(LONG64, LONG, VarI8FromI4);
|
||||
SIMPLE(LONG64, ULONG, VarI8FromUI4);
|
||||
#define _VarI8FromDec VarI8FromDec
|
||||
POSTST(LONG64, ULONG64, VarI8FromUI8, I8_MAX);
|
||||
|
||||
/* UI8 */
|
||||
SIMPLE(ULONG64, BYTE, VarUI8FromUI1);
|
||||
NEGTST(ULONG64, SHORT, VarUI8FromI2);
|
||||
#define _VarUI8FromR4 VarUI8FromR8
|
||||
#define _VarUI8FromR8 VarUI8FromR8
|
||||
#define _VarUI8FromCy VarUI8FromCy
|
||||
#define _VarUI8FromDate(dt,out) VarUI8FromR8((double)dt,out)
|
||||
#define _VarUI8FromStr(str,lcid,flags,out) VARIANT_NumberFromBstr(str,lcid,flags,(BYTE*)out,VT_UI8)
|
||||
#define _VarUI8FromDisp(disp,lcid,out) VARIANT_FromDisp(disp, lcid, out, VT_UI8)
|
||||
#define _VarUI8FromBool _VarI8FromI2
|
||||
NEGTST(ULONG64, signed char, VarUI8FromI1);
|
||||
SIMPLE(ULONG64, USHORT, VarUI8FromUI2);
|
||||
NEGTST(ULONG64, LONG, VarUI8FromI4);
|
||||
SIMPLE(ULONG64, ULONG, VarUI8FromUI4);
|
||||
#define _VarUI8FromDec VarUI8FromDec
|
||||
NEGTST(ULONG64, LONG64, VarUI8FromI8);
|
||||
|
||||
/* R4 (float) */
|
||||
SIMPLE(float, BYTE, VarR4FromUI1);
|
||||
SIMPLE(float, SHORT, VarR4FromI2);
|
||||
RETTYP _VarR4FromR8(double i, float* o) {
|
||||
double d = i < 0.0 ? -i : i;
|
||||
if (d > R4_MAX) return DISP_E_OVERFLOW;
|
||||
*o = i;
|
||||
return S_OK;
|
||||
}
|
||||
RETTYP _VarR4FromCy(CY i, float* o) { *o = (double)i.int64 / CY_MULTIPLIER_F; return S_OK; }
|
||||
#define _VarR4FromDate(dt,out) _VarR4FromR8((double)dt,out)
|
||||
#define _VarR4FromStr(str,lcid,flags,out) VARIANT_NumberFromBstr(str,lcid,flags,(BYTE*)out,VT_R4)
|
||||
#define _VarR4FromDisp(disp,lcid,out) VARIANT_FromDisp(disp, lcid, out, VT_R4)
|
||||
#define _VarR4FromBool _VarR4FromI2
|
||||
SIMPLE(float, signed char, VarR4FromI1);
|
||||
SIMPLE(float, USHORT, VarR4FromUI2);
|
||||
SIMPLE(float, LONG, VarR4FromI4);
|
||||
SIMPLE(float, ULONG, VarR4FromUI4);
|
||||
#define _VarR4FromDec VarR4FromDec
|
||||
SIMPLE(float, LONG64, VarR4FromI8);
|
||||
SIMPLE(float, ULONG64, VarR4FromUI8);
|
||||
|
||||
/* R8 (double) */
|
||||
SIMPLE(double, BYTE, VarR8FromUI1);
|
||||
SIMPLE(double, SHORT, VarR8FromI2);
|
||||
SIMPLE(double, float, VarR8FromR4);
|
||||
RETTYP _VarR8FromCy(CY i, double* o) { *o = (double)i.int64 / CY_MULTIPLIER_F; return S_OK; }
|
||||
SIMPLE(double, DATE, VarR8FromDate);
|
||||
#define _VarR8FromStr(str,lcid,flags,out) VARIANT_NumberFromBstr(str,lcid,flags,(BYTE*)out,VT_R8)
|
||||
#define _VarR8FromDisp(disp,lcid,out) VARIANT_FromDisp(disp, lcid, out, VT_R8)
|
||||
#define _VarR8FromBool _VarR8FromI2
|
||||
SIMPLE(double, signed char, VarR8FromI1);
|
||||
SIMPLE(double, USHORT, VarR8FromUI2);
|
||||
SIMPLE(double, LONG, VarR8FromI4);
|
||||
SIMPLE(double, ULONG, VarR8FromUI4);
|
||||
#define _VarR8FromDec VarR8FromDec
|
||||
SIMPLE(double, LONG64, VarR8FromI8);
|
||||
SIMPLE(double, ULONG64, VarR8FromUI8);
|
||||
|
||||
/* BOOL */
|
||||
#define BOOLFUNC(src, func) RETTYP _##func(src in, VARIANT_BOOL* out) { \
|
||||
*out = in ? VARIANT_TRUE : VARIANT_FALSE; return S_OK; }
|
||||
|
||||
BOOLFUNC(signed char,VarBoolFromI1);
|
||||
BOOLFUNC(BYTE,VarBoolFromUI1);
|
||||
BOOLFUNC(SHORT,VarBoolFromI2);
|
||||
BOOLFUNC(USHORT,VarBoolFromUI2);
|
||||
BOOLFUNC(LONG,VarBoolFromI4);
|
||||
BOOLFUNC(ULONG,VarBoolFromUI4);
|
||||
BOOLFUNC(LONG64,VarBoolFromI8);
|
||||
BOOLFUNC(ULONG64,VarBoolFromUI8);
|
||||
#define _VarBoolFromR4(flt,out) _VarBoolFromR8((double)flt,out)
|
||||
BOOLFUNC(double,VarBoolFromR8);
|
||||
#define _VarBoolFromCy(i,o) _VarBoolFromI8(i.int64,o)
|
||||
#define _VarBoolFromDate(dt,out) _VarBoolFromR8((double)dt,out)
|
||||
#define _VarBoolFromStr VarBoolFromStr
|
||||
#define _VarBoolFromDisp(disp,lcid,out) VARIANT_FromDisp(disp, lcid, (BYTE*)out, VT_BOOL)
|
||||
#define _VarBoolFromDec VarBoolFromDec
|
||||
|
||||
/* Internal flags for low level conversion functions */
|
||||
#define VAR_BOOLONOFF 0x0400 /* Convert bool to "On"/"Off" */
|
||||
#define VAR_BOOLYESNO 0x0800 /* Convert bool to "Yes"/"No" */
|
||||
#define VAR_NEGATIVE 0x1000 /* Number is negative */
|
||||
|
||||
/* DECIMAL */
|
||||
#define _VarDecFromUI1 VarDecFromUI4
|
||||
#define _VarDecFromI2 VarDecFromI4
|
||||
#define _VarDecFromR4 VarDecFromR4
|
||||
#define _VarDecFromR8 VarDecFromR8
|
||||
#define _VarDecFromCy VarDecFromCy
|
||||
#define _VarDecFromDate(dt,out) VarDecFromR8((double)dt,out)
|
||||
#define _VarDecFromStr(str,lcid,flags,out) VARIANT_NumberFromBstr(str,lcid,flags,(BYTE*)out,VT_DECIMAL)
|
||||
#define _VarDecFromDisp(disp,lcid,out) VARIANT_FromDisp(disp, lcid, out, VT_DECIMAL)
|
||||
#define _VarDecFromBool VarDecFromBool
|
||||
#define _VarDecFromI1 VarDecFromI4
|
||||
#define _VarDecFromUI2 VarDecFromUI4
|
||||
#define _VarDecFromI4 VarDecFromI4
|
||||
#define _VarDecFromUI4 VarDecFromUI4
|
||||
#define _VarDecFromI8 VarDecFromI8
|
||||
#define _VarDecFromUI8 VarDecFromUI8
|
||||
|
||||
/* CY (Currency) */
|
||||
#define _VarCyFromUI1 VarCyFromR8
|
||||
#define _VarCyFromI2 VarCyFromR8
|
||||
#define _VarCyFromR4 VarCyFromR8
|
||||
#define _VarCyFromR8 VarCyFromR8
|
||||
#define _VarCyFromDate VarCyFromR8
|
||||
#define _VarCyFromStr(str,lcid,flags,out) VARIANT_NumberFromBstr(str,lcid,flags,(BYTE*)out,VT_CY)
|
||||
#define _VarCyFromDisp(disp,lcid,out) VARIANT_FromDisp(disp, lcid, out, VT_CY)
|
||||
#define _VarCyFromBool VarCyFromR8
|
||||
#define _VarCyFromI1 VarCyFromR8
|
||||
#define _VarCyFromUI2 VarCyFromR8
|
||||
#define _VarCyFromI4 VarCyFromR8
|
||||
#define _VarCyFromUI4 VarCyFromR8
|
||||
#define _VarCyFromDec VarCyFromDec
|
||||
RETTYP _VarCyFromI8(LONG64 i, CY* o) {
|
||||
if (i <= (I8_MIN/CY_MULTIPLIER) || i >= (I8_MAX/CY_MULTIPLIER)) return DISP_E_OVERFLOW;
|
||||
o->int64 = i * CY_MULTIPLIER;
|
||||
return S_OK;
|
||||
}
|
||||
#define _VarCyFromUI8 VarCyFromR8
|
||||
|
||||
/* DATE */
|
||||
#define _VarDateFromUI1 _VarR8FromUI1
|
||||
#define _VarDateFromI2 _VarR8FromI2
|
||||
#define _VarDateFromR4 _VarDateFromR8
|
||||
RETTYP _VarDateFromR8(double i, DATE* o) {
|
||||
if (i <= (DATE_MIN - 1.0) || i >= (DATE_MAX + 1.0)) return DISP_E_OVERFLOW;
|
||||
*o = (DATE)i;
|
||||
return S_OK;
|
||||
}
|
||||
#define _VarDateFromCy _VarR8FromCy
|
||||
#define _VarDateFromStr VarDateFromStr
|
||||
#define _VarDateFromDisp(disp,lcid,out) VARIANT_FromDisp(disp, lcid, out, VT_DATE)
|
||||
#define _VarDateFromBool _VarR8FromBool
|
||||
#define _VarDateFromI1 _VarR8FromI1
|
||||
#define _VarDateFromUI2 _VarR8FromUI2
|
||||
#define _VarDateFromI4 _VarDateFromR8
|
||||
#define _VarDateFromUI4 _VarDateFromR8
|
||||
#define _VarDateFromDec _VarR8FromDec
|
||||
RETTYP _VarDateFromI8(LONG64 i, DATE* o) {
|
||||
if (i < DATE_MIN || i > DATE_MAX) return DISP_E_OVERFLOW;
|
||||
*o = (DATE)i;
|
||||
return S_OK;
|
||||
}
|
||||
RETTYP _VarDateFromUI8(ULONG64 i, DATE* o) {
|
||||
if (i > DATE_MAX) return DISP_E_OVERFLOW;
|
||||
*o = (DATE)i;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/* BSTR */
|
||||
#define _VarBstrFromUI1 VarBstrFromUI4
|
||||
#define _VarBstrFromI2 VarBstrFromI4
|
||||
#define _VarBstrFromR4 VarBstrFromR8
|
||||
#define _VarBstrFromR8 VarBstrFromR8
|
||||
#define _VarBstrFromCy VarBstrFromCy
|
||||
#define _VarBstrFromDate VarBstrFromDate
|
||||
#define _VarBstrFromDisp(disp,lcid,out) VARIANT_FromDisp(disp, lcid, out, VT_BSTR)
|
||||
#define _VarBstrFromBool VarBstrFromBool
|
||||
#define _VarBstrFromI1 VarBstrFromI4
|
||||
#define _VarBstrFromUI2 VarBstrFromUI4
|
||||
#define _VarBstrFromI4 VarBstrFromI4
|
||||
#define _VarBstrFromUI4 VarBstrFromUI4
|
||||
#define _VarBstrFromDec VarBstrFromDec
|
||||
#define _VarBstrFromI8 VarBstrFromI8
|
||||
#define _VarBstrFromUI8 VarBstrFromUI8
|
||||
|
||||
/* Macro to inline conversion from a float or double to any integer type,
|
||||
* rounding according to the 'dutch' convention.
|
||||
*/
|
||||
#define OLEAUT32_DutchRound(typ, value, res) do { \
|
||||
double whole = (double)value < 0 ? ceil((double)value) : floor((double)value); \
|
||||
double fract = (double)value - whole; \
|
||||
if (fract > 0.5) res = (typ)whole + (typ)1; \
|
||||
else if (fract == 0.5) { typ is_odd = (typ)whole & 1; res = whole + is_odd; } \
|
||||
else if (fract >= 0.0) res = (typ)whole; \
|
||||
else if (fract == -0.5) { typ is_odd = (typ)whole & 1; res = whole - is_odd; } \
|
||||
else if (fract > -0.5) res = (typ)whole; \
|
||||
else res = (typ)whole - (typ)1; \
|
||||
} while(0);
|
||||
|
||||
/* The localised characters that make up a valid number */
|
||||
typedef struct tagVARIANT_NUMBER_CHARS
|
||||
{
|
||||
WCHAR cNegativeSymbol;
|
||||
WCHAR cPositiveSymbol;
|
||||
WCHAR cDecimalPoint;
|
||||
WCHAR cDigitSeperator;
|
||||
WCHAR cCurrencyLocal;
|
||||
WCHAR cCurrencyLocal2;
|
||||
WCHAR cCurrencyDecimalPoint;
|
||||
WCHAR cCurrencyDigitSeperator;
|
||||
} VARIANT_NUMBER_CHARS;
|
||||
|
||||
void VARIANT_GetLocalisedNumberChars(VARIANT_NUMBER_CHARS*,LCID,DWORD);
|
File diff suppressed because it is too large
Load diff
|
@ -1,23 +0,0 @@
|
|||
/*
|
||||
* Copyright 2001 Dmitry Timoshkov
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#define WINE_OLESELFREGISTER
|
||||
#define WINE_FILEDESCRIPTION_STR "Wine OLE dll"
|
||||
#define WINE_FILENAME_STR "oleaut32.dll"
|
||||
|
||||
#include "wine/wine_common_ver.rc"
|
|
@ -1,33 +0,0 @@
|
|||
--- variant.c Thu Dec 2 19:30:53 2004
|
||||
+++ variant.c Thu Dec 2 19:38:26 2004
|
||||
@@ -2390,7 +2390,7 @@
|
||||
ULONG64 tmp;
|
||||
DECIMAL* pDec = &V_DECIMAL(pVarDst);
|
||||
|
||||
- DECIMAL_SETZERO(pDec);
|
||||
+ DECIMAL_SETZERO(*pDec);
|
||||
DEC_LO32(pDec) = 0;
|
||||
|
||||
if (pNumprs->dwOutFlags & NUMPRS_NEG)
|
||||
--- variant.h Mon Aug 23 07:35:19 2004
|
||||
+++ variant.h Thu Dec 2 19:43:06 2004
|
||||
@@ -82,13 +82,13 @@
|
||||
#endif
|
||||
|
||||
/* Macros for getting at a DECIMAL's parts */
|
||||
-#define DEC_SIGN(d) ((d)->u.s.sign)
|
||||
-#define DEC_SCALE(d) ((d)->u.s.scale)
|
||||
-#define DEC_SIGNSCALE(d) ((d)->u.signscale)
|
||||
+#define DEC_SIGN(d) ((d)->sign)
|
||||
+#define DEC_SCALE(d) ((d)->scale)
|
||||
+#define DEC_SIGNSCALE(d) ((d)->signscale)
|
||||
#define DEC_HI32(d) ((d)->Hi32)
|
||||
-#define DEC_MID32(d) ((d)->u1.s1.Mid32)
|
||||
-#define DEC_LO32(d) ((d)->u1.s1.Lo32)
|
||||
-#define DEC_LO64(d) ((d)->u1.Lo64)
|
||||
+#define DEC_MID32(d) ((d)->Mid32)
|
||||
+#define DEC_LO32(d) ((d)->Lo32)
|
||||
+#define DEC_LO64(d) ((d)->Lo64)
|
||||
|
||||
#define DEC_MAX_SCALE 28 /* Maximum scale for a decimal */
|
||||
|
Loading…
Reference in a new issue