mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 10:01:43 +00:00
- Autosyncing with Wine HEAD.
- Add I_RpcExceptionFilter to rpcrt4 from recent wine and export it. This allows to not do a full rpcrt4 sync right now, but still sync everything else. svn path=/trunk/; revision=34403
This commit is contained in:
parent
ffd2740ec2
commit
65e234891c
71 changed files with 1003 additions and 650 deletions
|
@ -46,7 +46,7 @@
|
|||
* name. Although it allows sessions to be created with '*' as the calling
|
||||
* name, doing so results in timeouts for all receives, because the
|
||||
* application never gets them.
|
||||
* So, a well-behaved Netbios application will typically want to register a
|
||||
* So, a well-behaved NetBIOS application will typically want to register a
|
||||
* name. I should probably support a do-nothing name list that allows
|
||||
* NCBADDNAME to add to it, but doesn't actually register the name, or does
|
||||
* attempt to register it without being able to defend it.
|
||||
|
|
|
@ -215,7 +215,7 @@ AntiMonikerImpl_GetSizeMax(IMoniker* iface, ULARGE_INTEGER* pcbSize)
|
|||
if (!pcbSize)
|
||||
return E_POINTER;
|
||||
|
||||
/* for more details see AntiMonikerImpl_Save coments */
|
||||
/* for more details see AntiMonikerImpl_Save comments */
|
||||
|
||||
/*
|
||||
* Normally the sizemax must be sizeof DWORD, but
|
||||
|
@ -532,7 +532,7 @@ static ULONG WINAPI AntiMonikerROTDataImpl_Release(IROTData* iface)
|
|||
}
|
||||
|
||||
/******************************************************************************
|
||||
* AntiMonikerIROTData_GetComparaisonData
|
||||
* AntiMonikerIROTData_GetComparisonData
|
||||
******************************************************************************/
|
||||
static HRESULT WINAPI
|
||||
AntiMonikerROTDataImpl_GetComparisonData(IROTData* iface, BYTE* pbData,
|
||||
|
@ -600,7 +600,7 @@ static HRESULT AntiMonikerImpl_Construct(AntiMonikerImpl* This)
|
|||
|
||||
TRACE("(%p)\n",This);
|
||||
|
||||
/* Initialize the virtual fgunction table. */
|
||||
/* Initialize the virtual function table. */
|
||||
This->lpvtbl1 = &VT_AntiMonikerImpl;
|
||||
This->lpvtbl2 = &VT_ROTDataImpl;
|
||||
This->ref = 0;
|
||||
|
|
|
@ -46,7 +46,7 @@ typedef struct BindCtxObject{
|
|||
|
||||
} BindCtxObject;
|
||||
|
||||
/* BindCtx data strucrture */
|
||||
/* BindCtx data structure */
|
||||
typedef struct BindCtxImpl{
|
||||
|
||||
const IBindCtxVtbl *lpVtbl; /* VTable relative to the IBindCtx interface.*/
|
||||
|
@ -611,6 +611,9 @@ HRESULT WINAPI BindMoniker(LPMONIKER pmk, DWORD grfOpt, REFIID riid, LPVOID * pp
|
|||
|
||||
res = CreateBindCtx(grfOpt, &pbc);
|
||||
if (SUCCEEDED(res))
|
||||
{
|
||||
res = IMoniker_BindToObject(pmk, pbc, NULL, riid, ppvResult);
|
||||
IBindCtx_Release(pbc);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
|
|
@ -627,9 +627,9 @@ static ULONG WINAPI ClassMonikerROTData_Release(IROTData* iface)
|
|||
}
|
||||
|
||||
/******************************************************************************
|
||||
* ClassMonikerIROTData_GetComparaisonData
|
||||
* ClassMonikerIROTData_GetComparisonData
|
||||
******************************************************************************/
|
||||
static HRESULT WINAPI ClassMonikerROTData_GetComparaisonData(IROTData* iface,
|
||||
static HRESULT WINAPI ClassMonikerROTData_GetComparisonData(IROTData* iface,
|
||||
BYTE* pbData,
|
||||
ULONG cbMax,
|
||||
ULONG* pcbData)
|
||||
|
@ -687,7 +687,7 @@ static const IROTDataVtbl ROTDataVtbl =
|
|||
ClassMonikerROTData_QueryInterface,
|
||||
ClassMonikerROTData_AddRef,
|
||||
ClassMonikerROTData_Release,
|
||||
ClassMonikerROTData_GetComparaisonData
|
||||
ClassMonikerROTData_GetComparisonData
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
|
|
|
@ -1312,42 +1312,21 @@ static HRESULT WINAPI OLEClipbrd_IDataObject_QueryGetData(
|
|||
IDataObject* iface,
|
||||
LPFORMATETC pformatetc)
|
||||
{
|
||||
/*
|
||||
* Declare "This" pointer
|
||||
*/
|
||||
OLEClipbrd *This = (OLEClipbrd *)iface;
|
||||
|
||||
TRACE("(%p, %p)\n", iface, pformatetc);
|
||||
|
||||
/*
|
||||
* If we have a data source placed on the clipboard (via OleSetClipboard)
|
||||
* simply delegate to the source object's QueryGetData
|
||||
*/
|
||||
if ( This->pIDataObjectSrc )
|
||||
{
|
||||
return IDataObject_QueryGetData(This->pIDataObjectSrc, pformatetc);
|
||||
}
|
||||
|
||||
if (!pformatetc)
|
||||
return E_INVALIDARG;
|
||||
/*
|
||||
if ( pformatetc->dwAspect != DVASPECT_CONTENT )
|
||||
return DV_E_DVASPECT;
|
||||
*/
|
||||
if ( pformatetc->lindex != -1 )
|
||||
return DV_E_LINDEX;
|
||||
|
||||
/* TODO: Handle TYMED_IStorage media which were put on the clipboard
|
||||
* by copying the storage into global memory. We must convert this
|
||||
* TYMED_HGLOBAL back to TYMED_IStorage.
|
||||
*/
|
||||
if ( pformatetc->tymed != TYMED_HGLOBAL )
|
||||
return DV_E_TYMED;
|
||||
if ( pformatetc->dwAspect != DVASPECT_CONTENT )
|
||||
return DV_E_FORMATETC;
|
||||
|
||||
if ( pformatetc->lindex != -1 )
|
||||
return DV_E_FORMATETC;
|
||||
|
||||
/*
|
||||
* Delegate to the Windows clipboard function IsClipboardFormatAvailable
|
||||
*/
|
||||
return (IsClipboardFormatAvailable(pformatetc->cfFormat)) ? S_OK : DV_E_FORMATETC;
|
||||
return (IsClipboardFormatAvailable(pformatetc->cfFormat)) ? S_OK : DV_E_CLIPFORMAT;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
|
@ -1365,7 +1344,7 @@ static HRESULT WINAPI OLEClipbrd_IDataObject_GetCanonicalFormatEtc(
|
|||
if ( !pformatectIn || !pformatetcOut )
|
||||
return E_INVALIDARG;
|
||||
|
||||
memcpy(pformatetcOut, pformatectIn, sizeof(FORMATETC));
|
||||
*pformatetcOut = *pformatectIn;
|
||||
return DATA_S_SAMEFORMATETC;
|
||||
}
|
||||
|
||||
|
|
|
@ -206,7 +206,7 @@ static void COMPOBJ_InitProcess( void )
|
|||
/* Dispatching to the correct thread in an apartment is done through
|
||||
* window messages rather than RPC transports. When an interface is
|
||||
* marshalled into another apartment in the same process, a window of the
|
||||
* following class is created. The *caller* of CoMarshalInterface (ie the
|
||||
* following class is created. The *caller* of CoMarshalInterface (i.e., the
|
||||
* application) is responsible for pumping the message loop in that thread.
|
||||
* The WM_USER messages which point to the RPCs are then dispatched to
|
||||
* COM_AptWndProc by the user's code from the apartment in which the interface
|
||||
|
@ -591,9 +591,9 @@ static DWORD CALLBACK apartment_hostobject_thread(LPVOID p)
|
|||
{
|
||||
if (!msg.hwnd && (msg.message == DM_HOSTOBJECT))
|
||||
{
|
||||
struct host_object_params *params = (struct host_object_params *)msg.lParam;
|
||||
params->hr = apartment_hostobject(apt, params);
|
||||
SetEvent(params->event);
|
||||
struct host_object_params *obj_params = (struct host_object_params *)msg.lParam;
|
||||
obj_params->hr = apartment_hostobject(apt, obj_params);
|
||||
SetEvent(obj_params->event);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -724,7 +724,7 @@ HRESULT apartment_createwindowifneeded(struct apartment *apt)
|
|||
{
|
||||
HWND hwnd = CreateWindowW(wszAptWinClass, NULL, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, OLE32_hInstance, NULL);
|
||||
HWND_MESSAGE, 0, OLE32_hInstance, NULL);
|
||||
if (!hwnd)
|
||||
{
|
||||
ERR("CreateWindow failed with error %d\n", GetLastError());
|
||||
|
@ -1231,7 +1231,9 @@ HRESULT WINAPI CoDisconnectObject( LPUNKNOWN lpUnk, DWORD reserved )
|
|||
*/
|
||||
HRESULT WINAPI CoCreateGuid(GUID *pguid)
|
||||
{
|
||||
return UuidCreate(pguid);
|
||||
DWORD status = UuidCreate(pguid);
|
||||
if (status == RPC_S_OK || status == RPC_S_UUID_LOCAL_ONLY) return S_OK;
|
||||
return HRESULT_FROM_WIN32( status );
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -1690,8 +1692,8 @@ HRESULT WINAPI CoGetPSClsid(REFIID riid, CLSID *pclsid)
|
|||
}
|
||||
RegCloseKey(hkey);
|
||||
|
||||
/* We have the CLSid we want back from the registry as a string, so
|
||||
lets convert it into a CLSID structure */
|
||||
/* We have the CLSID we want back from the registry as a string, so
|
||||
let's convert it into a CLSID structure */
|
||||
if (CLSIDFromString(value, pclsid) != NOERROR)
|
||||
return REGDB_E_IIDNOTREG;
|
||||
|
||||
|
@ -1780,11 +1782,6 @@ static HRESULT COM_GetRegisteredClassObject(const struct apartment *apt, REFCLSI
|
|||
HRESULT hr = S_FALSE;
|
||||
RegisteredClass *curClass;
|
||||
|
||||
/*
|
||||
* Sanity check
|
||||
*/
|
||||
assert(ppUnk!=0);
|
||||
|
||||
EnterCriticalSection( &csRegisteredClassList );
|
||||
|
||||
LIST_FOR_EACH_ENTRY(curClass, &RegisteredClassList, RegisteredClass, entry)
|
||||
|
@ -2657,9 +2654,9 @@ HRESULT WINAPI CoLockObjectExternal(
|
|||
if (stubmgr)
|
||||
{
|
||||
if (fLock)
|
||||
stub_manager_ext_addref(stubmgr, 1);
|
||||
stub_manager_ext_addref(stubmgr, 1, FALSE);
|
||||
else
|
||||
stub_manager_ext_release(stubmgr, 1, fLastUnlockReleases);
|
||||
stub_manager_ext_release(stubmgr, 1, FALSE, fLastUnlockReleases);
|
||||
|
||||
stub_manager_int_release(stubmgr);
|
||||
|
||||
|
@ -2671,7 +2668,7 @@ HRESULT WINAPI CoLockObjectExternal(
|
|||
|
||||
if (stubmgr)
|
||||
{
|
||||
stub_manager_ext_addref(stubmgr, 1);
|
||||
stub_manager_ext_addref(stubmgr, 1, FALSE);
|
||||
stub_manager_int_release(stubmgr);
|
||||
}
|
||||
|
||||
|
@ -2860,7 +2857,7 @@ HRESULT WINAPI CoGetTreatAsClass(REFCLSID clsidOld, LPCLSID clsidNew)
|
|||
LONG len = sizeof(szClsidNew);
|
||||
|
||||
FIXME("(%s,%p)\n", debugstr_guid(clsidOld), clsidNew);
|
||||
memcpy(clsidNew,clsidOld,sizeof(CLSID)); /* copy over old value */
|
||||
*clsidNew = *clsidOld; /* copy over old value */
|
||||
|
||||
res = COM_OpenKeyForCLSID(clsidOld, wszTreatAs, KEY_READ, &hkey);
|
||||
if (FAILED(res))
|
||||
|
@ -3437,8 +3434,8 @@ HRESULT WINAPI CoWaitForMultipleHandles(DWORD dwFlags, DWORD dwTimeout,
|
|||
|
||||
if (message_loop)
|
||||
{
|
||||
DWORD wait_flags = (dwFlags & COWAIT_WAITALL) ? MWMO_WAITALL : 0 |
|
||||
(dwFlags & COWAIT_ALERTABLE ) ? MWMO_ALERTABLE : 0;
|
||||
DWORD wait_flags = ((dwFlags & COWAIT_WAITALL) ? MWMO_WAITALL : 0) |
|
||||
((dwFlags & COWAIT_ALERTABLE ) ? MWMO_ALERTABLE : 0);
|
||||
|
||||
TRACE("waiting for rpc completion or window message\n");
|
||||
|
||||
|
@ -3534,7 +3531,7 @@ HRESULT WINAPI CoWaitForMultipleHandles(DWORD dwFlags, DWORD dwTimeout,
|
|||
/***********************************************************************
|
||||
* CoGetObject [OLE32.@]
|
||||
*
|
||||
* Gets the object named by coverting the name to a moniker and binding to it.
|
||||
* Gets the object named by converting the name to a moniker and binding to it.
|
||||
*
|
||||
* PARAMS
|
||||
* pszName [I] String representing the object.
|
||||
|
@ -3739,6 +3736,18 @@ HRESULT WINAPI CoGetObjectContext(REFIID riid, void **ppv)
|
|||
return hr;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* CoGetContextToken [OLE32.@]
|
||||
*/
|
||||
HRESULT WINAPI CoGetContextToken( ULONG_PTR *token )
|
||||
{
|
||||
FIXME( "stub\n" );
|
||||
if (token) *token = 0;
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DllMain (OLE32.@)
|
||||
*/
|
||||
|
|
|
@ -53,7 +53,7 @@ DEFINE_OLEGUID( CLSID_PSFactoryBuffer, 0x00000320, 0, 0 );
|
|||
* locking is required.
|
||||
* LOCK - The value is written to only using Interlocked* functions.
|
||||
* CS - The value is read or written to inside a critical section.
|
||||
* The identifier following "CS" is the specific critical setion that
|
||||
* The identifier following "CS" is the specific critical section that
|
||||
* must be used.
|
||||
* MUTEX - The value is read or written to with a mutex held.
|
||||
* The identifier following "MUTEX" is the specific mutex that
|
||||
|
@ -92,6 +92,7 @@ struct stub_manager
|
|||
|
||||
ULONG extrefs; /* number of 'external' references (CS lock) */
|
||||
ULONG refs; /* internal reference count (CS apt->cs) */
|
||||
ULONG weakrefs; /* number of weak references (CS lock) */
|
||||
OID oid; /* apartment-scoped unique identifier (RO) */
|
||||
IUnknown *object; /* the object we are managing the stub for (RO) */
|
||||
ULONG next_ipid; /* currently unused (LOCK) */
|
||||
|
@ -201,15 +202,15 @@ HRESULT FTMarshalCF_Create(REFIID riid, LPVOID *ppv);
|
|||
ULONG stub_manager_int_addref(struct stub_manager *This);
|
||||
ULONG stub_manager_int_release(struct stub_manager *This);
|
||||
struct stub_manager *new_stub_manager(APARTMENT *apt, IUnknown *object);
|
||||
ULONG stub_manager_ext_addref(struct stub_manager *m, ULONG refs);
|
||||
ULONG stub_manager_ext_release(struct stub_manager *m, ULONG refs, BOOL last_unlock_releases);
|
||||
ULONG stub_manager_ext_addref(struct stub_manager *m, ULONG refs, BOOL tableweak);
|
||||
ULONG stub_manager_ext_release(struct stub_manager *m, ULONG refs, BOOL tableweak, BOOL last_unlock_releases);
|
||||
struct ifstub *stub_manager_new_ifstub(struct stub_manager *m, IRpcStubBuffer *sb, IUnknown *iptr, REFIID iid, MSHLFLAGS flags);
|
||||
struct ifstub *stub_manager_find_ifstub(struct stub_manager *m, REFIID iid, MSHLFLAGS flags);
|
||||
struct stub_manager *get_stub_manager(APARTMENT *apt, OID oid);
|
||||
struct stub_manager *get_stub_manager_from_object(APARTMENT *apt, void *object);
|
||||
BOOL stub_manager_notify_unmarshal(struct stub_manager *m, const IPID *ipid);
|
||||
BOOL stub_manager_is_table_marshaled(struct stub_manager *m, const IPID *ipid);
|
||||
void stub_manager_release_marshal_data(struct stub_manager *m, ULONG refs, const IPID *ipid);
|
||||
void stub_manager_release_marshal_data(struct stub_manager *m, ULONG refs, const IPID *ipid, BOOL tableweak);
|
||||
HRESULT ipid_to_stub_manager(const IPID *ipid, APARTMENT **stub_apt, struct stub_manager **stubmgr_ret);
|
||||
HRESULT ipid_get_dispatch_params(const IPID *ipid, APARTMENT **stub_apt, IRpcStubBuffer **stub, IRpcChannelBuffer **chan, IID *iid, IUnknown **iface);
|
||||
HRESULT start_apartment_remote_unknown(void);
|
||||
|
@ -268,8 +269,7 @@ void apartment_joinmta(void);
|
|||
#define DM_HOSTOBJECT (WM_USER + 1) /* WPARAM = 0, LPARAM = (struct host_object_params *) */
|
||||
|
||||
/*
|
||||
* Per-thread values are stored in the TEB on offset 0xF80,
|
||||
* see http://www.microsoft.com/msj/1099/bugslayer/bugslayer1099.htm
|
||||
* Per-thread values are stored in the TEB on offset 0xF80
|
||||
*/
|
||||
|
||||
/* will create if necessary */
|
||||
|
|
|
@ -54,7 +54,7 @@ typedef struct CompositeMonikerImpl{
|
|||
|
||||
LONG ref; /* reference counter for this object */
|
||||
|
||||
IMoniker** tabMoniker; /* dynamaic table containing all components (monikers) of this composite moniker */
|
||||
IMoniker** tabMoniker; /* dynamic table containing all components (monikers) of this composite moniker */
|
||||
|
||||
ULONG tabSize; /* size of tabMoniker */
|
||||
|
||||
|
@ -903,7 +903,7 @@ CompositeMonikerImpl_CommonPrefixWith(IMoniker* iface, IMoniker* pmkOther,
|
|||
|
||||
IEnumMoniker_Next(enumMoniker1,1,&tempMk1,NULL);
|
||||
|
||||
/* if we have more than one commun moniker the result will be a composite moniker */
|
||||
/* if we have more than one common moniker the result will be a composite moniker */
|
||||
if (nbCommonMk>1){
|
||||
|
||||
/* initialize the common prefix moniker with the composite of two first moniker (from the left)*/
|
||||
|
@ -928,7 +928,7 @@ CompositeMonikerImpl_CommonPrefixWith(IMoniker* iface, IMoniker* pmkOther,
|
|||
return S_OK;
|
||||
}
|
||||
else{
|
||||
/* if we have only one commun moniker the result will be a simple moniker which is the most-left one*/
|
||||
/* if we have only one common moniker the result will be a simple moniker which is the most-left one*/
|
||||
*ppmkPrefix=tempMk1;
|
||||
|
||||
return S_OK;
|
||||
|
|
|
@ -66,7 +66,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
|||
* PresentationDataHeader
|
||||
*
|
||||
* This structure represents the header of the \002OlePresXXX stream in
|
||||
* the OLE object strorage.
|
||||
* the OLE object storage.
|
||||
*/
|
||||
typedef struct PresentationDataHeader
|
||||
{
|
||||
|
@ -1240,13 +1240,13 @@ static HRESULT WINAPI DataCache_GetClassID(
|
|||
HRESULT hr = IStorage_Stat(cache_entry->storage, &statstg, STATFLAG_NONAME);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
memcpy(pClassID, &statstg.clsid, sizeof(*pClassID));
|
||||
*pClassID = statstg.clsid;
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
memcpy(pClassID, &CLSID_NULL, sizeof(*pClassID));
|
||||
*pClassID = CLSID_NULL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -2252,7 +2252,7 @@ static const IOleCacheControlVtbl DataCache_IOleCacheControl_VTable =
|
|||
*
|
||||
* NOTES
|
||||
* The following interfaces are supported by the returned data cache object:
|
||||
* IOleCache, IOleCache2, IOleCacheControl, IPersistStorae, IDataObject,
|
||||
* IOleCache, IOleCache2, IOleCacheControl, IPersistStorage, IDataObject,
|
||||
* IViewObject and IViewObject2.
|
||||
*/
|
||||
HRESULT WINAPI CreateDataCache(
|
||||
|
|
|
@ -16,8 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
/* see http://www.microsoft.com/msj/0398/dcom.htm */
|
||||
/* and the official DCOM specification
|
||||
/* see the official DCOM specification
|
||||
* (there's a copy at http://www.grimes.demon.co.uk/DCOM/DCOMSpec.htm) */
|
||||
|
||||
import "unknwn.idl";
|
||||
|
|
|
@ -396,7 +396,7 @@ static HRESULT WINAPI DefaultHandler_SetHostNames(
|
|||
if (object_is_running(This))
|
||||
IOleObject_SetHostNames(This->pOleDelegate, szContainerApp, szContainerObj);
|
||||
|
||||
/* Be sure to cleanup before re-assinging the strings. */
|
||||
/* Be sure to cleanup before re-assigning the strings. */
|
||||
HeapFree( GetProcessHeap(), 0, This->containerApp );
|
||||
This->containerApp = NULL;
|
||||
HeapFree( GetProcessHeap(), 0, This->containerObj );
|
||||
|
@ -672,7 +672,7 @@ static HRESULT WINAPI DefaultHandler_GetUserClassID(
|
|||
if (!pClsid)
|
||||
return E_POINTER;
|
||||
|
||||
memcpy(pClsid, &This->clsid, sizeof(CLSID));
|
||||
*pClsid = This->clsid;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -1744,7 +1744,7 @@ static DefaultHandler* DefaultHandler_Construct(
|
|||
/*
|
||||
* Initialize the other data members of the class.
|
||||
*/
|
||||
memcpy(&This->clsid, clsid, sizeof(CLSID));
|
||||
This->clsid = *clsid;
|
||||
This->clientSite = NULL;
|
||||
This->oleAdviseHolder = NULL;
|
||||
This->dataAdviseHolder = NULL;
|
||||
|
|
|
@ -25,12 +25,15 @@
|
|||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "objbase.h"
|
||||
|
||||
#include "enumx.h"
|
||||
|
||||
#include "wine/list.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
||||
|
||||
typedef struct tagEnumSTATPROPSETSTG_impl
|
||||
struct tagEnumSTATPROPSETSTG_impl
|
||||
{
|
||||
const void *vtbl;
|
||||
LONG ref;
|
||||
|
@ -38,7 +41,7 @@ typedef struct tagEnumSTATPROPSETSTG_impl
|
|||
struct list *current;
|
||||
ULONG elem_size;
|
||||
GUID riid;
|
||||
} enumx_impl;
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
* enumx_QueryInterface
|
||||
|
@ -177,7 +180,7 @@ enumx_impl *enumx_allocate(REFIID riid, const void *vtbl, ULONG elem_size)
|
|||
enumx->ref = 1;
|
||||
enumx->current = NULL;
|
||||
enumx->elem_size = elem_size;
|
||||
memcpy(&enumx->riid, riid, sizeof *riid);
|
||||
enumx->riid = *riid;
|
||||
list_init(&enumx->elements);
|
||||
}
|
||||
|
||||
|
|
|
@ -250,7 +250,7 @@ static HRESULT WINAPI IErrorInfoImpl_GetGUID(
|
|||
ErrorInfoImpl *This = impl_from_IErrorInfo(iface);
|
||||
TRACE("(%p)->(count=%u)\n",This,This->ref);
|
||||
if(!pGUID )return E_INVALIDARG;
|
||||
memcpy(pGUID, &This->m_Guid, sizeof(GUID));
|
||||
*pGUID = This->m_Guid;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -354,7 +354,7 @@ static HRESULT WINAPI ICreateErrorInfoImpl_SetGUID(
|
|||
{
|
||||
ErrorInfoImpl *This = impl_from_ICreateErrorInfo(iface);
|
||||
TRACE("(%p)->(%s)\n", This, debugstr_guid(rguid));
|
||||
memcpy(&This->m_Guid, rguid, sizeof(GUID));
|
||||
This->m_Guid = *rguid;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -600,7 +600,7 @@ FileMonikerImpl_BindToStorage(IMoniker* iface, IBindCtx* pbc, IMoniker* pmkToLef
|
|||
/* get the file name */
|
||||
IMoniker_GetDisplayName(iface,pbc,pmkToLeft,&filePath);
|
||||
|
||||
/* verifie if the file contains a storage object */
|
||||
/* verify if the file contains a storage object */
|
||||
res=StgIsStorageFile(filePath);
|
||||
|
||||
if(res==S_OK){
|
||||
|
@ -679,7 +679,7 @@ FileMonikerImpl_ComposeWith(IMoniker* iface, IMoniker* pmkRight,
|
|||
|
||||
IMoniker_IsSystemMoniker(pmkRight,&mkSys);
|
||||
|
||||
/* check if we have two filemonikers to compose or not */
|
||||
/* check if we have two FileMonikers to compose or not */
|
||||
if(mkSys==MKSYS_FILEMONIKER){
|
||||
|
||||
CreateBindCtx(0,&bind);
|
||||
|
@ -1264,7 +1264,7 @@ FileMonikerROTDataImpl_Release(IROTData* iface)
|
|||
}
|
||||
|
||||
/******************************************************************************
|
||||
* FileMonikerIROTData_GetComparaisonData
|
||||
* FileMonikerIROTData_GetComparisonData
|
||||
*/
|
||||
static HRESULT WINAPI
|
||||
FileMonikerROTDataImpl_GetComparisonData(IROTData* iface, BYTE* pbData,
|
||||
|
@ -1345,7 +1345,7 @@ FileMonikerImpl_Construct(FileMonikerImpl* This, LPCOLESTR lpszPathName)
|
|||
|
||||
TRACE("(%p,%s)\n",This,debugstr_w(lpszPathName));
|
||||
|
||||
/* Initialize the virtual fgunction table. */
|
||||
/* Initialize the virtual function table. */
|
||||
This->lpvtbl1 = &VT_FileMonikerImpl;
|
||||
This->lpvtbl2 = &VT_ROTDataImpl;
|
||||
This->ref = 0;
|
||||
|
|
|
@ -141,9 +141,9 @@ FTMarshalImpl_GetUnmarshalClass (LPMARSHAL iface, REFIID riid, void *pv, DWORD d
|
|||
TRACE("(%s, %p, 0x%x, %p, 0x%x, %p)\n", debugstr_guid(riid), pv,
|
||||
dwDestContext, pvDestContext, mshlflags, pCid);
|
||||
if (dwDestContext == MSHCTX_INPROC || dwDestContext == MSHCTX_CROSSCTX)
|
||||
memcpy(pCid, &CLSID_InProcFreeMarshaler, sizeof(CLSID_InProcFreeMarshaler));
|
||||
*pCid = CLSID_InProcFreeMarshaler;
|
||||
else
|
||||
memcpy(pCid, &CLSID_DfMarshal, sizeof(CLSID_InProcFreeMarshaler));
|
||||
*pCid = CLSID_DfMarshal;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -467,24 +467,16 @@ static HRESULT WINAPI HGLOBALStreamImpl_CopyTo(
|
|||
TRACE("(%p, %p, %d, %p, %p)\n", iface, pstm,
|
||||
cb.u.LowPart, pcbRead, pcbWritten);
|
||||
|
||||
/*
|
||||
* Sanity check
|
||||
*/
|
||||
if ( pstm == 0 )
|
||||
return STG_E_INVALIDPOINTER;
|
||||
|
||||
totalBytesRead.u.LowPart = totalBytesRead.u.HighPart = 0;
|
||||
totalBytesWritten.u.LowPart = totalBytesWritten.u.HighPart = 0;
|
||||
totalBytesRead.QuadPart = 0;
|
||||
totalBytesWritten.QuadPart = 0;
|
||||
|
||||
/*
|
||||
* use stack to store data temporarly
|
||||
* there is surely more performant way of doing it, for now this basic
|
||||
* implementation will do the job
|
||||
*/
|
||||
while ( cb.u.LowPart > 0 )
|
||||
while ( cb.QuadPart > 0 )
|
||||
{
|
||||
if ( cb.u.LowPart >= 128 )
|
||||
copySize = 128;
|
||||
if ( cb.QuadPart >= sizeof(tmpBuffer) )
|
||||
copySize = sizeof(tmpBuffer);
|
||||
else
|
||||
copySize = cb.u.LowPart;
|
||||
|
||||
|
@ -492,7 +484,7 @@ static HRESULT WINAPI HGLOBALStreamImpl_CopyTo(
|
|||
if (FAILED(hr))
|
||||
break;
|
||||
|
||||
totalBytesRead.u.LowPart += bytesRead;
|
||||
totalBytesRead.QuadPart += bytesRead;
|
||||
|
||||
if (bytesRead)
|
||||
{
|
||||
|
@ -500,29 +492,18 @@ static HRESULT WINAPI HGLOBALStreamImpl_CopyTo(
|
|||
if (FAILED(hr))
|
||||
break;
|
||||
|
||||
totalBytesWritten.u.LowPart += bytesWritten;
|
||||
totalBytesWritten.QuadPart += bytesWritten;
|
||||
}
|
||||
|
||||
if (bytesRead!=copySize)
|
||||
cb.u.LowPart = 0;
|
||||
cb.QuadPart = 0;
|
||||
else
|
||||
cb.u.LowPart -= bytesRead;
|
||||
cb.QuadPart -= bytesRead;
|
||||
}
|
||||
|
||||
/*
|
||||
* Update number of bytes read and written
|
||||
*/
|
||||
if (pcbRead)
|
||||
{
|
||||
pcbRead->u.LowPart = totalBytesRead.u.LowPart;
|
||||
pcbRead->u.HighPart = totalBytesRead.u.HighPart;
|
||||
}
|
||||
if (pcbRead) pcbRead->QuadPart = totalBytesRead.QuadPart;
|
||||
if (pcbWritten) pcbWritten->QuadPart = totalBytesWritten.QuadPart;
|
||||
|
||||
if (pcbWritten)
|
||||
{
|
||||
pcbWritten->u.LowPart = totalBytesWritten.u.LowPart;
|
||||
pcbWritten->u.HighPart = totalBytesWritten.u.HighPart;
|
||||
}
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
|
|
@ -640,7 +640,7 @@ HRESULT WINAPI CoRegisterMallocSpy(LPMALLOCSPY pMallocSpy)
|
|||
/***********************************************************************
|
||||
* CoRevokeMallocSpy [OLE32.@]
|
||||
*
|
||||
* Revokes a previousl registered object that receives notifications on memory
|
||||
* Revokes a previously registered object that receives notifications on memory
|
||||
* allocations and frees.
|
||||
*
|
||||
* PARAMS
|
||||
|
|
|
@ -270,7 +270,7 @@ HRESULT WINAPI ItemMonikerImpl_Load(IMoniker* iface,IStream* pStm)
|
|||
|
||||
TRACE("\n");
|
||||
|
||||
/* for more details about data read by this function see coments of ItemMonikerImpl_Save function */
|
||||
/* for more details about data read by this function see comments of ItemMonikerImpl_Save function */
|
||||
|
||||
/* read item delimiter string length + 1 */
|
||||
res=IStream_Read(pStm,&delimiterLength,sizeof(DWORD),&bread);
|
||||
|
@ -376,7 +376,7 @@ HRESULT WINAPI ItemMonikerImpl_GetSizeMax(IMoniker* iface,
|
|||
if (!pcbSize)
|
||||
return E_POINTER;
|
||||
|
||||
/* for more details see ItemMonikerImpl_Save coments */
|
||||
/* for more details see ItemMonikerImpl_Save comments */
|
||||
|
||||
pcbSize->u.LowPart = sizeof(DWORD) + /* DWORD which contains delimiter length */
|
||||
delimiterLength*4 + /* item delimiter string */
|
||||
|
@ -400,7 +400,7 @@ static HRESULT WINAPI ItemMonikerImpl_Construct(ItemMonikerImpl* This, LPCOLESTR
|
|||
|
||||
TRACE("(%p,%s,%s)\n",This,debugstr_w(lpszDelim),debugstr_w(lpszItem));
|
||||
|
||||
/* Initialize the virtual fgunction table. */
|
||||
/* Initialize the virtual function table. */
|
||||
This->lpvtbl1 = &VT_ItemMonikerImpl;
|
||||
This->lpvtbl2 = &VT_ROTDataImpl;
|
||||
This->ref = 0;
|
||||
|
@ -956,7 +956,7 @@ ULONG WINAPI ItemMonikerROTDataImpl_Release(IROTData* iface)
|
|||
}
|
||||
|
||||
/******************************************************************************
|
||||
* ItemMonikerIROTData_GetComparaisonData
|
||||
* ItemMonikerIROTData_GetComparisonData
|
||||
******************************************************************************/
|
||||
HRESULT WINAPI ItemMonikerROTDataImpl_GetComparisonData(IROTData* iface,
|
||||
BYTE* pbData,
|
||||
|
|
|
@ -45,9 +45,12 @@ extern const CLSID CLSID_DfMarshal;
|
|||
/* number of refs given out for normal marshaling */
|
||||
#define NORMALEXTREFS 5
|
||||
|
||||
|
||||
/* private flag indicating that the object was marshaled as table-weak */
|
||||
#define SORFP_TABLEWEAK SORF_OXRES1
|
||||
/* private flag indicating that the caller does not want to notify the stub
|
||||
* when the proxy disconnects or is destroyed */
|
||||
#define SORFP_NOLIFETIMEMGMT SORF_OXRES1
|
||||
#define SORFP_NOLIFETIMEMGMT SORF_OXRES2
|
||||
|
||||
static HRESULT unmarshal_object(const STDOBJREF *stdobjref, APARTMENT *apt,
|
||||
MSHCTX dest_context, void *dest_context_data,
|
||||
|
@ -131,10 +134,11 @@ HRESULT marshal_object(APARTMENT *apt, STDOBJREF *stdobjref, REFIID riid, IUnkno
|
|||
}
|
||||
}
|
||||
|
||||
stdobjref->flags = SORF_NULL;
|
||||
if (mshlflags & MSHLFLAGS_TABLEWEAK)
|
||||
stdobjref->flags |= SORFP_TABLEWEAK;
|
||||
if (mshlflags & MSHLFLAGS_NOPING)
|
||||
stdobjref->flags = SORF_NOPING;
|
||||
else
|
||||
stdobjref->flags = SORF_NULL;
|
||||
stdobjref->flags |= SORF_NOPING;
|
||||
|
||||
if ((manager = get_stub_manager_from_object(apt, object)))
|
||||
TRACE("registering new ifstub on pre-existing manager\n");
|
||||
|
@ -167,20 +171,22 @@ HRESULT marshal_object(APARTMENT *apt, STDOBJREF *stdobjref, REFIID riid, IUnkno
|
|||
stub_manager_int_release(manager);
|
||||
/* destroy the stub manager if it has no ifstubs by releasing
|
||||
* zero external references */
|
||||
stub_manager_ext_release(manager, 0, TRUE);
|
||||
stub_manager_ext_release(manager, 0, FALSE, TRUE);
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
if (!tablemarshal)
|
||||
{
|
||||
stdobjref->cPublicRefs = NORMALEXTREFS;
|
||||
stub_manager_ext_addref(manager, stdobjref->cPublicRefs);
|
||||
stub_manager_ext_addref(manager, stdobjref->cPublicRefs, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
stdobjref->cPublicRefs = 0;
|
||||
if (mshlflags & MSHLFLAGS_TABLESTRONG)
|
||||
stub_manager_ext_addref(manager, 1);
|
||||
stub_manager_ext_addref(manager, 1, FALSE);
|
||||
else
|
||||
stub_manager_ext_addref(manager, 0, TRUE);
|
||||
}
|
||||
|
||||
/* FIXME: check return value */
|
||||
|
@ -279,7 +285,7 @@ static HRESULT WINAPI ClientIdentity_QueryMultipleInterfaces(IMultiQI *iface, UL
|
|||
/* get IRemUnknown proxy so we can communicate with the remote object */
|
||||
hr = proxy_manager_get_remunknown(This, &remunk);
|
||||
|
||||
if (hr == S_OK)
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
hr = IRemUnknown_RemQueryInterface(remunk, ipid, NORMALEXTREFS,
|
||||
nonlocal_mqis, iids, &qiresults);
|
||||
|
@ -1330,7 +1336,7 @@ StdMarshalImpl_UnmarshalInterface(LPMARSHAL iface, IStream *pStm, REFIID riid, v
|
|||
|
||||
/* unref the ifstub. FIXME: only do this on success? */
|
||||
if (!stub_manager_is_table_marshaled(stubmgr, &stdobjref.ipid))
|
||||
stub_manager_ext_release(stubmgr, stdobjref.cPublicRefs, TRUE);
|
||||
stub_manager_ext_release(stubmgr, stdobjref.cPublicRefs, stdobjref.flags & SORFP_TABLEWEAK, TRUE);
|
||||
|
||||
stub_manager_int_release(stubmgr);
|
||||
return hres;
|
||||
|
@ -1407,7 +1413,7 @@ StdMarshalImpl_ReleaseMarshalData(LPMARSHAL iface, IStream *pStm)
|
|||
return RPC_E_INVALID_OBJREF;
|
||||
}
|
||||
|
||||
stub_manager_release_marshal_data(stubmgr, stdobjref.cPublicRefs, &stdobjref.ipid);
|
||||
stub_manager_release_marshal_data(stubmgr, stdobjref.cPublicRefs, &stdobjref.ipid, stdobjref.flags & SORFP_TABLEWEAK);
|
||||
|
||||
stub_manager_int_release(stubmgr);
|
||||
apartment_release(apt);
|
||||
|
|
|
@ -19,13 +19,11 @@
|
|||
* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*
|
||||
* TODO:
|
||||
* - IRunningObjectTable should work interprocess, but currently doesn't.
|
||||
* Native (on Win2k at least) uses an undocumented RPC interface, IROT, to
|
||||
* communicate with RPCSS which contains the table of marshalled data.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
|
@ -50,19 +48,13 @@
|
|||
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
||||
|
||||
/* see MSDN docs for IROTData::GetComparisonData, which states what this
|
||||
* constant is (http://msdn2.microsoft.com/en-us/library/ms693773.aspx) */
|
||||
* constant is
|
||||
*/
|
||||
#define MAX_COMPARISON_DATA 2048
|
||||
|
||||
static LONG WINAPI rpc_filter(EXCEPTION_POINTERS *__eptr)
|
||||
static LONG WINAPI rpc_filter(EXCEPTION_POINTERS *eptr)
|
||||
{
|
||||
switch (GetExceptionCode())
|
||||
{
|
||||
case EXCEPTION_ACCESS_VIOLATION:
|
||||
case EXCEPTION_ILLEGAL_INSTRUCTION:
|
||||
return EXCEPTION_CONTINUE_SEARCH;
|
||||
default:
|
||||
return EXCEPTION_EXECUTE_HANDLER;
|
||||
}
|
||||
return I_RpcExceptionFilter(eptr->ExceptionRecord->ExceptionCode);
|
||||
}
|
||||
|
||||
/* define the structure of the running object table elements */
|
||||
|
@ -980,9 +972,9 @@ HRESULT WINAPI RunningObjectTableImpl_Initialize(void)
|
|||
/* initialize the virtual table function */
|
||||
runningObjectTableInstance->lpVtbl = &VT_RunningObjectTableImpl;
|
||||
|
||||
/* the initial reference is set to "1" ! because if set to "0" it will be not practis when */
|
||||
/* the ROT referred many times not in the same time (all the objects in the ROT will */
|
||||
/* be removed every time the ROT is removed ) */
|
||||
/* the initial reference is set to "1" so that it isn't destroyed after its
|
||||
* first use until the process is destroyed, as the running object table is
|
||||
* a process-wide cache of a global table */
|
||||
runningObjectTableInstance->ref = 1;
|
||||
|
||||
list_init(&runningObjectTableInstance->rot);
|
||||
|
@ -1219,9 +1211,9 @@ HRESULT WINAPI GetClassFile(LPCOLESTR filePathName,CLSID *pclsid)
|
|||
|
||||
return res;
|
||||
}
|
||||
/* if the file is not a storage object then attemps to match various bits in the file against a
|
||||
pattern in the registry. this case is not frequently used ! so I present only the psodocode for
|
||||
this case
|
||||
/* If the file is not a storage object then attempt to match various bits in the file against a
|
||||
pattern in the registry. This case is not frequently used, so I present only the pseudocode for
|
||||
this case.
|
||||
|
||||
for(i=0;i<nFileTypes;i++)
|
||||
|
||||
|
@ -1248,7 +1240,7 @@ HRESULT WINAPI GetClassFile(LPCOLESTR filePathName,CLSID *pclsid)
|
|||
nbElm=FileMonikerImpl_DecomposePath(filePathName,&pathDec);
|
||||
absFile=pathDec[nbElm-1];
|
||||
|
||||
/* failed if the path represente a directory and not an absolute file name*/
|
||||
/* failed if the path represents a directory and not an absolute file name*/
|
||||
if (!lstrcmpW(absFile, bkslashW))
|
||||
return MK_E_INVALIDEXTENSION;
|
||||
|
||||
|
|
|
@ -409,7 +409,7 @@ HRESULT WINAPI StringFromCLSID16(
|
|||
*/
|
||||
HRESULT WINAPI ProgIDFromCLSID16(
|
||||
REFCLSID clsid, /* [in] class id as found in registry */
|
||||
LPOLESTR16 *lplpszProgID/* [out] associated Prog ID */
|
||||
LPOLESTR16 *lplpszProgID/* [out] associated Program ID */
|
||||
) {
|
||||
static const WCHAR wszProgID[] = {'P','r','o','g','I','D',0};
|
||||
HKEY hkey;
|
||||
|
|
|
@ -118,7 +118,7 @@ static const char OLEDD_DRAGTRACKERCLASS[] = "WineDragDropTracker32";
|
|||
static struct list targetListHead = LIST_INIT(targetListHead);
|
||||
|
||||
/******************************************************************************
|
||||
* These are the prototypes of miscelaneous utility methods
|
||||
* These are the prototypes of miscellaneous utility methods
|
||||
*/
|
||||
static void OLEUTL_ReadRegistryDWORDValue(HKEY regKey, DWORD* pdwValue);
|
||||
|
||||
|
@ -2734,7 +2734,7 @@ HRESULT WINAPI PropVariantClear(PROPVARIANT * pvar) /* [in/out] */
|
|||
case VT_CLSID:
|
||||
case VT_LPSTR:
|
||||
case VT_LPWSTR:
|
||||
/* pick an arbitary typed pointer - we don't care about the type
|
||||
/* pick an arbitrary typed pointer - we don't care about the type
|
||||
* as we are just freeing it */
|
||||
CoTaskMemFree(pvar->u.puuid);
|
||||
break;
|
||||
|
@ -2781,7 +2781,7 @@ HRESULT WINAPI PropVariantClear(PROPVARIANT * pvar) /* [in/out] */
|
|||
}
|
||||
if (pvar->vt & ~VT_VECTOR)
|
||||
{
|
||||
/* pick an arbitary VT_VECTOR structure - they all have the same
|
||||
/* pick an arbitrary VT_VECTOR structure - they all have the same
|
||||
* memory layout */
|
||||
CoTaskMemFree(pvar->u.capropvar.pElems);
|
||||
}
|
||||
|
@ -2811,7 +2811,7 @@ HRESULT WINAPI PropVariantCopy(PROPVARIANT *pvarDest, /* [out] */
|
|||
return hr;
|
||||
|
||||
/* this will deal with most cases */
|
||||
CopyMemory(pvarDest, pvarSrc, sizeof(*pvarDest));
|
||||
*pvarDest = *pvarSrc;
|
||||
|
||||
switch(pvarSrc->vt)
|
||||
{
|
||||
|
@ -2825,7 +2825,7 @@ HRESULT WINAPI PropVariantCopy(PROPVARIANT *pvarDest, /* [out] */
|
|||
break;
|
||||
case VT_CLSID:
|
||||
pvarDest->u.puuid = CoTaskMemAlloc(sizeof(CLSID));
|
||||
CopyMemory(pvarDest->u.puuid, pvarSrc->u.puuid, sizeof(CLSID));
|
||||
*pvarDest->u.puuid = *pvarSrc->u.puuid;
|
||||
break;
|
||||
case VT_LPSTR:
|
||||
len = strlen(pvarSrc->u.pszVal);
|
||||
|
@ -2888,8 +2888,8 @@ HRESULT WINAPI PropVariantCopy(PROPVARIANT *pvarDest, /* [out] */
|
|||
case VT_BSTR: elemSize = sizeof(*pvarSrc->u.bstrVal); break;
|
||||
case VT_LPSTR: elemSize = sizeof(*pvarSrc->u.pszVal); break;
|
||||
case VT_LPWSTR: elemSize = sizeof(*pvarSrc->u.pwszVal); break;
|
||||
case VT_VARIANT: elemSize = sizeof(*pvarSrc->u.pvarVal); break;
|
||||
|
||||
case VT_VARIANT:
|
||||
default:
|
||||
FIXME("Invalid element type: %ul\n", pvarSrc->vt & ~VT_VECTOR);
|
||||
return E_INVALIDARG;
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
@ stdcall CoGetCallContext(ptr ptr)
|
||||
@ stub CoGetCallerTID
|
||||
@ stdcall CoGetClassObject(ptr long ptr ptr ptr)
|
||||
@ stdcall CoGetContextToken(ptr)
|
||||
@ stub CoGetCurrentLogicalThreadId
|
||||
@ stdcall CoGetCurrentProcess()
|
||||
@ stub CoGetInstanceFromFile #@ stdcall (ptr ptr ptr long wstr long ptr) return 0,ERR_NOTIMPLEMENTED
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "winuser.h"
|
||||
#include "winnls.h"
|
||||
#include "objbase.h"
|
||||
#include "ole2.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
#include "wine/debug.h"
|
||||
#include "ole2.h"
|
||||
|
||||
#include "compobj_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
||||
|
||||
#define INITIAL_SINKS 10
|
||||
|
@ -724,7 +726,7 @@ static HRESULT WINAPI DataAdviseHolder_Advise(
|
|||
*/
|
||||
This->Connections[index].sink = pAdvise;
|
||||
This->Connections[index].advf = advf & ~WINE_ADVF_REMOTE;
|
||||
memcpy(&(This->Connections[index].fmat), pFetc, sizeof(FORMATETC));
|
||||
This->Connections[index].fmat = *pFetc;
|
||||
if (pFetc->ptd)
|
||||
{
|
||||
This->Connections[index].fmat.ptd = CoTaskMemAlloc(pFetc->ptd->tdSize);
|
||||
|
|
|
@ -19,22 +19,6 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
/* Documentation on MSDN:
|
||||
*
|
||||
* (Top level COM documentation)
|
||||
* http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/componentdevelopmentank.asp
|
||||
*
|
||||
* (COM Proxy)
|
||||
* http://msdn.microsoft.com/library/default.asp?url=/library/en-us/com/htm/comext_1q0p.asp
|
||||
*
|
||||
* (COM Stub)
|
||||
* http://msdn.microsoft.com/library/default.asp?url=/library/en-us/com/htm/comext_1lia.asp
|
||||
*
|
||||
* (Marshal)
|
||||
* http://msdn.microsoft.com/library/default.asp?url=/library/en-us/com/htm/comext_1gfn.asp
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
@ -64,7 +48,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
|||
|
||||
static ULONG WINAPI RURpcProxyBufferImpl_Release(LPRPCPROXYBUFFER iface);
|
||||
|
||||
/* From: http://msdn.microsoft.com/library/en-us/com/cmi_m_4lda.asp
|
||||
/* From msdn:
|
||||
*
|
||||
* The first time a client requests a pointer to an interface on a
|
||||
* particular object, COM loads an IClassFactory stub in the server
|
||||
|
|
|
@ -542,7 +542,7 @@ static void PointerMonikerImpl_Construct(PointerMonikerImpl* This, IUnknown *pun
|
|||
{
|
||||
TRACE("(%p)\n",This);
|
||||
|
||||
/* Initialize the virtual fgunction table. */
|
||||
/* Initialize the virtual function table. */
|
||||
This->lpvtbl = &VT_PointerMonikerImpl;
|
||||
This->ref = 1;
|
||||
if (punk)
|
||||
|
@ -567,7 +567,7 @@ HRESULT WINAPI CreatePointerMoniker(LPUNKNOWN punk, LPMONIKER *ppmk)
|
|||
{
|
||||
PointerMonikerImpl *This;
|
||||
|
||||
FIXME("(%p, %p): stub\n", punk, ppmk);
|
||||
TRACE("(%p, %p)\n", punk, ppmk);
|
||||
|
||||
if (!ppmk)
|
||||
return E_INVALIDARG;
|
||||
|
|
|
@ -242,7 +242,7 @@ static unsigned char * ChannelHooks_ClientFillBuffer(SChannelHookCallInfo *info,
|
|||
|
||||
wire_orpc_extent->conformance = (extension_size+7)&~7;
|
||||
wire_orpc_extent->size = extension_size;
|
||||
memcpy(&wire_orpc_extent->id, &entry->id, sizeof(wire_orpc_extent->id));
|
||||
wire_orpc_extent->id = entry->id;
|
||||
buffer += FIELD_OFFSET(WIRE_ORPC_EXTENT, data[wire_orpc_extent->conformance]);
|
||||
}
|
||||
|
||||
|
@ -362,7 +362,7 @@ static unsigned char * ChannelHooks_ServerFillBuffer(SChannelHookCallInfo *info,
|
|||
|
||||
wire_orpc_extent->conformance = (extension_size+7)&~7;
|
||||
wire_orpc_extent->size = extension_size;
|
||||
memcpy(&wire_orpc_extent->id, &entry->id, sizeof(wire_orpc_extent->id));
|
||||
wire_orpc_extent->id = entry->id;
|
||||
buffer += FIELD_OFFSET(WIRE_ORPC_EXTENT, data[wire_orpc_extent->conformance]);
|
||||
}
|
||||
|
||||
|
@ -411,7 +411,7 @@ HRESULT RPC_RegisterChannelHook(REFGUID rguid, IChannelHook *hook)
|
|||
if (!entry)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
memcpy(&entry->id, rguid, sizeof(entry->id));
|
||||
entry->id = *rguid;
|
||||
entry->hook = hook;
|
||||
IChannelHook_AddRef(hook);
|
||||
|
||||
|
@ -553,7 +553,7 @@ static HRESULT WINAPI ServerRpcChannelBuffer_GetBuffer(LPRPCCHANNELBUFFER iface,
|
|||
{
|
||||
WIRE_ORPC_EXTENT *wire_orpc_extent = msg->Buffer;
|
||||
wire_orpc_extent->conformance = 0;
|
||||
memcpy(&wire_orpc_extent->id, &GUID_NULL, sizeof(wire_orpc_extent->id));
|
||||
wire_orpc_extent->id = GUID_NULL;
|
||||
wire_orpc_extent->size = 0;
|
||||
msg->Buffer = (char *)msg->Buffer + FIELD_OFFSET(WIRE_ORPC_EXTENT, data[0]);
|
||||
}
|
||||
|
@ -737,7 +737,7 @@ static HRESULT WINAPI ClientRpcChannelBuffer_GetBuffer(LPRPCCHANNELBUFFER iface,
|
|||
{
|
||||
WIRE_ORPC_EXTENT *wire_orpc_extent = msg->Buffer;
|
||||
wire_orpc_extent->conformance = 0;
|
||||
memcpy(&wire_orpc_extent->id, &GUID_NULL, sizeof(wire_orpc_extent->id));
|
||||
wire_orpc_extent->id = GUID_NULL;
|
||||
wire_orpc_extent->size = 0;
|
||||
msg->Buffer = (char *)msg->Buffer + FIELD_OFFSET(WIRE_ORPC_EXTENT, data[0]);
|
||||
}
|
||||
|
@ -812,8 +812,8 @@ static HRESULT WINAPI ClientRpcChannelBuffer_SendReceive(LPRPCCHANNELBUFFER ifac
|
|||
wine_dbgstr_longlong(This->oxid));
|
||||
return RPC_E_WRONG_THREAD;
|
||||
}
|
||||
/* this situation should be impossible in multi-threaded apartments,
|
||||
* because the calling thread isn't re-entrable.
|
||||
/* This situation should be impossible in multi-threaded apartments,
|
||||
* because the calling thread isn't re-enterable.
|
||||
* Note: doing a COM call during the processing of a sent message is
|
||||
* only disallowed if a client call is already being waited for
|
||||
* completion */
|
||||
|
@ -1172,7 +1172,7 @@ static HRESULT unmarshal_ORPC_EXTENT_ARRAY(RPC_MESSAGE *msg, const char *end,
|
|||
|
||||
msg->Buffer = (char *)msg->Buffer + sizeof(DWORD);
|
||||
|
||||
/* arbritary limit for security (don't know what native does) */
|
||||
/* arbitrary limit for security (don't know what native does) */
|
||||
if (extensions->size > 256)
|
||||
{
|
||||
ERR("too many extensions: %ld\n", extensions->size);
|
||||
|
|
|
@ -358,7 +358,7 @@ void BIGBLOCKFILE_SetSize(LPBIGBLOCKFILE This, ULARGE_INTEGER newSize)
|
|||
/*
|
||||
* unmap all views, must be done before call to SetEndFile
|
||||
*
|
||||
* Just ditch the victim list because there is no guarentee we will need them
|
||||
* Just ditch the victim list because there is no guarantee we will need them
|
||||
* and it is not worth the performance hit to unmap and remap them all.
|
||||
*/
|
||||
BIGBLOCKFILE_DeleteList(This, This->victimhead);
|
||||
|
@ -411,17 +411,6 @@ void BIGBLOCKFILE_SetSize(LPBIGBLOCKFILE This, ULARGE_INTEGER newSize)
|
|||
BIGBLOCKFILE_RemapAllMappedPages(This);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* BIGBLOCKFILE_GetSize
|
||||
*
|
||||
* Returns the size of the file.
|
||||
*
|
||||
*/
|
||||
ULARGE_INTEGER BIGBLOCKFILE_GetSize(LPBIGBLOCKFILE This)
|
||||
{
|
||||
return This->filesize;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* BIGBLOCKFILE_FindPageInList [PRIVATE]
|
||||
*
|
||||
|
|
|
@ -25,11 +25,6 @@
|
|||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*
|
||||
* There's a decent overview of property set storage here:
|
||||
* http://msdn.microsoft.com/archive/en-us/dnarolegen/html/msdn_propset.asp
|
||||
* It's a little bit out of date, and more definitive references are given
|
||||
* below, but it gives the best "big picture" that I've found.
|
||||
*
|
||||
* TODO:
|
||||
* - I don't honor the maximum property set size.
|
||||
* - Certain bogus files could result in reading past the end of a buffer.
|
||||
|
@ -68,9 +63,7 @@ static inline StorageImpl *impl_from_IPropertySetStorage( IPropertySetStorage *i
|
|||
return (StorageImpl *)((char*)iface - FIELD_OFFSET(StorageImpl, base.pssVtbl));
|
||||
}
|
||||
|
||||
/* These are documented in MSDN, e.g.
|
||||
* http://msdn.microsoft.com/library/en-us/stg/stg/property_set_header.asp
|
||||
* http://msdn.microsoft.com/library/library/en-us/stg/stg/section.asp
|
||||
/* These are documented in MSDN,
|
||||
* but they don't seem to be in any header file.
|
||||
*/
|
||||
#define PROPSETHDR_BYTEORDER_MAGIC 0xfffe
|
||||
|
@ -87,9 +80,6 @@ static inline StorageImpl *impl_from_IPropertySetStorage( IPropertySetStorage *i
|
|||
#define CFTAG_FMTID (-3L)
|
||||
#define CFTAG_NODATA 0L
|
||||
|
||||
/* The format version (and what it implies) is described here:
|
||||
* http://msdn.microsoft.com/library/en-us/stg/stg/format_version.asp
|
||||
*/
|
||||
typedef struct tagPROPERTYSETHEADER
|
||||
{
|
||||
WORD wByteOrder; /* always 0xfffe */
|
||||
|
@ -897,7 +887,7 @@ static HRESULT WINAPI IPropertyStorage_fnSetClass(
|
|||
return E_INVALIDARG;
|
||||
if (!(This->grfMode & STGM_READWRITE))
|
||||
return STG_E_ACCESSDENIED;
|
||||
memcpy(&This->clsid, clsid, sizeof(This->clsid));
|
||||
This->clsid = *clsid;
|
||||
This->dirty = TRUE;
|
||||
if (This->grfFlags & PROPSETFLAG_UNBUFFERED)
|
||||
IPropertyStorage_Commit(iface, STGC_DEFAULT);
|
||||
|
@ -923,12 +913,12 @@ static HRESULT WINAPI IPropertyStorage_fnStat(
|
|||
hr = IStream_Stat(This->stm, &stat, STATFLAG_NONAME);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
memcpy(&statpsstg->fmtid, &This->fmtid, sizeof(statpsstg->fmtid));
|
||||
memcpy(&statpsstg->clsid, &This->clsid, sizeof(statpsstg->clsid));
|
||||
statpsstg->fmtid = This->fmtid;
|
||||
statpsstg->clsid = This->clsid;
|
||||
statpsstg->grfFlags = This->grfFlags;
|
||||
memcpy(&statpsstg->mtime, &stat.mtime, sizeof(statpsstg->mtime));
|
||||
memcpy(&statpsstg->ctime, &stat.ctime, sizeof(statpsstg->ctime));
|
||||
memcpy(&statpsstg->atime, &stat.atime, sizeof(statpsstg->atime));
|
||||
statpsstg->mtime = stat.mtime;
|
||||
statpsstg->ctime = stat.ctime;
|
||||
statpsstg->atime = stat.atime;
|
||||
statpsstg->dwOSVersion = This->originatorOS;
|
||||
}
|
||||
return hr;
|
||||
|
@ -1319,7 +1309,7 @@ static HRESULT PropertyStorage_ReadFromStream(PropertyStorage_impl *This)
|
|||
goto end;
|
||||
}
|
||||
This->format = hdr.wFormat;
|
||||
memcpy(&This->clsid, &hdr.clsid, sizeof(This->clsid));
|
||||
This->clsid = hdr.clsid;
|
||||
This->originatorOS = hdr.dwOSVer;
|
||||
if (PROPSETHDR_OSVER_KIND(hdr.dwOSVer) == PROPSETHDR_OSVER_KIND_MAC)
|
||||
WARN("File comes from a Mac, strings will probably be screwed up\n");
|
||||
|
@ -1421,9 +1411,7 @@ static HRESULT PropertyStorage_ReadFromStream(PropertyStorage_impl *This)
|
|||
}
|
||||
if (!This->codePage)
|
||||
{
|
||||
/* default to Unicode unless told not to, as specified here:
|
||||
* http://msdn.microsoft.com/library/en-us/stg/stg/names_in_istorage.asp
|
||||
*/
|
||||
/* default to Unicode unless told not to, as specified on msdn */
|
||||
if (This->grfFlags & PROPSETFLAG_ANSI)
|
||||
This->codePage = GetACP();
|
||||
else
|
||||
|
@ -1981,7 +1969,7 @@ static HRESULT PropertyStorage_BaseConstruct(IStream *stm,
|
|||
InitializeCriticalSection(&(*pps)->cs);
|
||||
(*pps)->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": PropertyStorage_impl.cs");
|
||||
(*pps)->stm = stm;
|
||||
memcpy(&(*pps)->fmtid, rfmtid, sizeof((*pps)->fmtid));
|
||||
(*pps)->fmtid = *rfmtid;
|
||||
(*pps)->grfMode = grfMode;
|
||||
|
||||
hr = PropertyStorage_CreateDictionaries(*pps);
|
||||
|
@ -2037,9 +2025,7 @@ static HRESULT PropertyStorage_ConstructEmpty(IStream *stm,
|
|||
ps->grfFlags = grfFlags;
|
||||
if (ps->grfFlags & PROPSETFLAG_CASE_SENSITIVE)
|
||||
ps->format = 1;
|
||||
/* default to Unicode unless told not to, as specified here:
|
||||
* http://msdn.microsoft.com/library/en-us/stg/stg/names_in_istorage.asp
|
||||
*/
|
||||
/* default to Unicode unless told not to, as specified on msdn */
|
||||
if (ps->grfFlags & PROPSETFLAG_ANSI)
|
||||
ps->codePage = GetACP();
|
||||
else
|
||||
|
@ -2328,7 +2314,7 @@ static HRESULT create_EnumSTATPROPSETSTG(
|
|||
statpss.atime = stat.atime;
|
||||
statpss.ctime = stat.ctime;
|
||||
statpss.grfFlags = stat.grfMode;
|
||||
memcpy(&statpss.clsid, &stat.clsid, sizeof stat.clsid);
|
||||
statpss.clsid = stat.clsid;
|
||||
enumx_add_element(enumx, &statpss);
|
||||
}
|
||||
CoTaskMemFree(stat.pwcsName);
|
||||
|
@ -2507,8 +2493,6 @@ static const WCHAR szDocSummaryInfo[] = { 5,'D','o','c','u','m','e','n','t',
|
|||
*
|
||||
* NOTES
|
||||
* str must be at least CCH_MAX_PROPSTG_NAME characters in length.
|
||||
* Based on the algorithm described here:
|
||||
* http://msdn.microsoft.com/library/en-us/stg/stg/names_in_istorage.asp
|
||||
*/
|
||||
HRESULT WINAPI FmtIdToPropStgName(const FMTID *rfmtid, LPOLESTR str)
|
||||
{
|
||||
|
@ -2574,10 +2558,6 @@ HRESULT WINAPI FmtIdToPropStgName(const FMTID *rfmtid, LPOLESTR str)
|
|||
* RETURNS
|
||||
* E_INVALIDARG if rfmtid or str is NULL or if str can't be converted to
|
||||
* a format ID, S_OK otherwise.
|
||||
*
|
||||
* NOTES
|
||||
* Based on the algorithm described here:
|
||||
* http://msdn.microsoft.com/library/en-us/stg/stg/names_in_istorage.asp
|
||||
*/
|
||||
HRESULT WINAPI PropStgNameToFmtId(const LPOLESTR str, FMTID *rfmtid)
|
||||
{
|
||||
|
@ -2590,12 +2570,12 @@ HRESULT WINAPI PropStgNameToFmtId(const LPOLESTR str, FMTID *rfmtid)
|
|||
|
||||
if (!lstrcmpiW(str, szDocSummaryInfo))
|
||||
{
|
||||
memcpy(rfmtid, &FMTID_DocSummaryInformation, sizeof(*rfmtid));
|
||||
*rfmtid = FMTID_DocSummaryInformation;
|
||||
hr = S_OK;
|
||||
}
|
||||
else if (!lstrcmpiW(str, szSummaryInfo))
|
||||
{
|
||||
memcpy(rfmtid, &FMTID_SummaryInformation, sizeof(*rfmtid));
|
||||
*rfmtid = FMTID_SummaryInformation;
|
||||
hr = S_OK;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -689,28 +689,23 @@ static HRESULT WINAPI StgStreamImpl_CopyTo(
|
|||
if ( pstm == 0 )
|
||||
return STG_E_INVALIDPOINTER;
|
||||
|
||||
totalBytesRead.u.LowPart = totalBytesRead.u.HighPart = 0;
|
||||
totalBytesWritten.u.LowPart = totalBytesWritten.u.HighPart = 0;
|
||||
totalBytesRead.QuadPart = 0;
|
||||
totalBytesWritten.QuadPart = 0;
|
||||
|
||||
/*
|
||||
* use stack to store data temporarily
|
||||
* there is surely a more performant way of doing it, for now this basic
|
||||
* implementation will do the job
|
||||
*/
|
||||
while ( cb.u.LowPart > 0 )
|
||||
while ( cb.QuadPart > 0 )
|
||||
{
|
||||
if ( cb.u.LowPart >= 128 )
|
||||
copySize = 128;
|
||||
if ( cb.QuadPart >= sizeof(tmpBuffer) )
|
||||
copySize = sizeof(tmpBuffer);
|
||||
else
|
||||
copySize = cb.u.LowPart;
|
||||
|
||||
IStream_Read(iface, tmpBuffer, copySize, &bytesRead);
|
||||
|
||||
totalBytesRead.u.LowPart += bytesRead;
|
||||
totalBytesRead.QuadPart += bytesRead;
|
||||
|
||||
IStream_Write(pstm, tmpBuffer, bytesRead, &bytesWritten);
|
||||
|
||||
totalBytesWritten.u.LowPart += bytesWritten;
|
||||
totalBytesWritten.QuadPart += bytesWritten;
|
||||
|
||||
/*
|
||||
* Check that read & write operations were successful
|
||||
|
@ -723,25 +718,14 @@ static HRESULT WINAPI StgStreamImpl_CopyTo(
|
|||
}
|
||||
|
||||
if (bytesRead!=copySize)
|
||||
cb.u.LowPart = 0;
|
||||
cb.QuadPart = 0;
|
||||
else
|
||||
cb.u.LowPart -= bytesRead;
|
||||
cb.QuadPart -= bytesRead;
|
||||
}
|
||||
|
||||
/*
|
||||
* Update number of bytes read and written
|
||||
*/
|
||||
if (pcbRead)
|
||||
{
|
||||
pcbRead->u.LowPart = totalBytesRead.u.LowPart;
|
||||
pcbRead->u.HighPart = totalBytesRead.u.HighPart;
|
||||
}
|
||||
if (pcbRead) pcbRead->QuadPart = totalBytesRead.QuadPart;
|
||||
if (pcbWritten) pcbWritten->QuadPart = totalBytesWritten.QuadPart;
|
||||
|
||||
if (pcbWritten)
|
||||
{
|
||||
pcbWritten->u.LowPart = totalBytesWritten.u.LowPart;
|
||||
pcbWritten->u.HighPart = totalBytesWritten.u.HighPart;
|
||||
}
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
|
|
@ -304,7 +304,7 @@ static void _create_istream16(LPSTREAM16 *str);
|
|||
* directory searches while not using a more efficient file
|
||||
* block locating system than FAT (seedling/sapling/tree
|
||||
* would result in a massive improvement - in fact we have
|
||||
* an alternative to DocFiles that we use internally that
|
||||
* an alternative to docfiles that we use internally that
|
||||
* uses seedling/sapling/tree and *is* far more efficient).
|
||||
*
|
||||
* It is worth noting that the MS implementation of red-black
|
||||
|
|
|
@ -28,9 +28,6 @@
|
|||
* The compound file implementation of IStorage used for create
|
||||
* and manage substorages and streams within a storage object
|
||||
* residing in a compound file object.
|
||||
*
|
||||
* MSDN
|
||||
* http://msdn.microsoft.com/library/default.asp?url=/library/en-us/stg/stg/istorage_compound_file_implementation.asp
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
|
@ -124,7 +121,7 @@ typedef struct
|
|||
DWORD dwOleObjFileNameLength;
|
||||
DWORD dwMetaFileWidth;
|
||||
DWORD dwMetaFileHeight;
|
||||
CHAR strUnknown[8]; /* don't know what is this 8 byts information in OLE stream. */
|
||||
CHAR strUnknown[8]; /* don't know what this 8 byte information in OLE stream is. */
|
||||
DWORD dwDataLength;
|
||||
BYTE *pData;
|
||||
}OLECONVERT_OLESTREAM_DATA;
|
||||
|
@ -145,7 +142,7 @@ typedef struct
|
|||
}OLECONVERT_ISTORAGE_COMPOBJ;
|
||||
|
||||
|
||||
/* Ole Presention Stream structure */
|
||||
/* Ole Presentation Stream structure */
|
||||
/* Used for OleConvertIStorageToOLESTREAM and OleConvertOLESTREAMToIStorage */
|
||||
typedef struct
|
||||
{
|
||||
|
@ -266,7 +263,7 @@ static ULONG BLOCK_GetBigBlockOffset(ULONG index)
|
|||
}
|
||||
|
||||
/************************************************************************
|
||||
** Storage32BaseImpl implementatiion
|
||||
** Storage32BaseImpl implementation
|
||||
*/
|
||||
static HRESULT StorageImpl_ReadAt(StorageImpl* This,
|
||||
ULARGE_INTEGER offset,
|
||||
|
@ -662,7 +659,7 @@ end:
|
|||
* Storage32BaseImpl_EnumElements (IStorage)
|
||||
*
|
||||
* This method will create an enumerator object that can be used to
|
||||
* retrieve informatino about all the properties in the storage object.
|
||||
* retrieve information about all the properties in the storage object.
|
||||
*
|
||||
* See Windows documentation for more details on IStorage methods.
|
||||
*/
|
||||
|
@ -1413,12 +1410,12 @@ static ULONG getFreeProperty(
|
|||
*
|
||||
* Internal Method
|
||||
*
|
||||
* Case insensitive comparaison of StgProperty.name by first considering
|
||||
* Case insensitive comparison of StgProperty.name by first considering
|
||||
* their size.
|
||||
*
|
||||
* Returns <0 when newPrpoerty < currentProperty
|
||||
* >0 when newPrpoerty > currentProperty
|
||||
* 0 when newPrpoerty == currentProperty
|
||||
* Returns <0 when newProperty < currentProperty
|
||||
* >0 when newProperty > currentProperty
|
||||
* 0 when newProperty == currentProperty
|
||||
*/
|
||||
static LONG propertyNameCmp(
|
||||
const OLECHAR *newProperty,
|
||||
|
@ -2415,7 +2412,7 @@ static HRESULT StorageImpl_Construct(
|
|||
*/
|
||||
This->base.lpVtbl = &Storage32Impl_Vtbl;
|
||||
This->base.pssVtbl = &IPropertySetStorage_Vtbl;
|
||||
This->base.v_destructor = &StorageImpl_Destroy;
|
||||
This->base.v_destructor = StorageImpl_Destroy;
|
||||
This->base.openFlags = (openFlags & ~STGM_CREATE);
|
||||
|
||||
/*
|
||||
|
@ -4239,7 +4236,7 @@ static StorageInternalImpl* StorageInternalImpl_Construct(
|
|||
* Initialize the virtual function table.
|
||||
*/
|
||||
newStorage->base.lpVtbl = &Storage32InternalImpl_Vtbl;
|
||||
newStorage->base.v_destructor = &StorageInternalImpl_Destroy;
|
||||
newStorage->base.v_destructor = StorageInternalImpl_Destroy;
|
||||
newStorage->base.openFlags = (openFlags & ~STGM_CREATE);
|
||||
|
||||
/*
|
||||
|
@ -6577,7 +6574,7 @@ static DWORD GetCreationModeFromSTGM(DWORD stgm)
|
|||
* RETURNS
|
||||
* Success: S_OK
|
||||
* Failure: CONVERT10_E_OLESTREAM_GET for invalid Get
|
||||
* CONVERT10_E_OLESTREAM_FMT if the OLEID is invalide
|
||||
* CONVERT10_E_OLESTREAM_FMT if the OLEID is invalid
|
||||
*
|
||||
* NOTES
|
||||
* This function is used by OleConvertOLESTREAMToIStorage only.
|
||||
|
@ -6697,7 +6694,7 @@ static HRESULT OLECONVERT_LoadOLE10(LPOLESTREAM pOleStream, OLECONVERT_OLESTREAM
|
|||
}
|
||||
}
|
||||
|
||||
if(hRes == S_OK) /* I don't know what is this 8 byts information is we have to figure out */
|
||||
if(hRes == S_OK) /* I don't know what this 8 byte information is. We have to figure out */
|
||||
{
|
||||
if(!bStrem1) /* if it is a second OLE stream data */
|
||||
{
|
||||
|
@ -7116,7 +7113,7 @@ HRESULT WINAPI WriteFmtUserTypeStg(
|
|||
TRACE("(%p,%x,%s)\n",pstg,cf,debugstr_w(lpszUserType));
|
||||
|
||||
/* get the clipboard format name */
|
||||
n = GetClipboardFormatNameW( cf, szwClipName, sizeof(szwClipName) );
|
||||
n = GetClipboardFormatNameW( cf, szwClipName, sizeof(szwClipName)/sizeof(szwClipName[0]) );
|
||||
szwClipName[n]=0;
|
||||
|
||||
TRACE("Clipboard name is %s\n", debugstr_w(szwClipName));
|
||||
|
@ -7652,7 +7649,7 @@ static void OLECONVERT_GetOle20PresData(LPSTORAGE pStorage, OLECONVERT_OLESTREAM
|
|||
* Read info on MSDN
|
||||
*
|
||||
* TODO
|
||||
* DVTARGETDEVICE paramenter is not handled
|
||||
* DVTARGETDEVICE parameter is not handled
|
||||
* Still unsure of some mem fields for OLE 10 Stream
|
||||
* Still some unknowns for the IStorage: "\002OlePres000", "\001CompObj",
|
||||
* and "\001OLE" streams
|
||||
|
@ -7911,7 +7908,7 @@ HRESULT WINAPI ReadClassStm(IStream *pStm,CLSID *pclsid)
|
|||
return E_INVALIDARG;
|
||||
|
||||
/* clear the output args */
|
||||
memcpy(pclsid, &CLSID_NULL, sizeof(*pclsid));
|
||||
*pclsid = CLSID_NULL;
|
||||
|
||||
res = IStream_Read(pStm,(void*)pclsid,sizeof(CLSID),&nbByte);
|
||||
|
||||
|
|
|
@ -374,7 +374,7 @@ struct StgStreamImpl
|
|||
/*
|
||||
* The information in the stream is represented by a chain of small blocks
|
||||
* or a chain of large blocks. Depending on the case, one of the two
|
||||
* following variabled points to that information.
|
||||
* following variables points to that information.
|
||||
*/
|
||||
BlockChainStream* bigBlockChain;
|
||||
SmallBlockChainStream* smallBlockChain;
|
||||
|
|
|
@ -69,6 +69,7 @@ struct stub_manager *new_stub_manager(APARTMENT *apt, IUnknown *object)
|
|||
/* start off with 2 references because the stub is in the apartment
|
||||
* and the caller will also hold a reference */
|
||||
sm->refs = 2;
|
||||
sm->weakrefs = 0;
|
||||
|
||||
sm->oxid_info.dwPid = GetCurrentProcessId();
|
||||
sm->oxid_info.dwTid = GetCurrentThreadId();
|
||||
|
@ -87,8 +88,8 @@ struct stub_manager *new_stub_manager(APARTMENT *apt, IUnknown *object)
|
|||
sm->oxid_info.dwAuthnHint = RPC_C_AUTHN_LEVEL_NONE;
|
||||
sm->oxid_info.psa = NULL /* FIXME */;
|
||||
|
||||
/* yes, that's right, this starts at zero. that's zero EXTERNAL
|
||||
* refs, ie nobody has unmarshalled anything yet. we can't have
|
||||
/* Yes, that's right, this starts at zero. that's zero EXTERNAL
|
||||
* refs, i.e., nobody has unmarshalled anything yet. We can't have
|
||||
* negative refs because the stub manager cannot be explicitly
|
||||
* killed, it has to die by somebody unmarshalling then releasing
|
||||
* the marshalled ifptr.
|
||||
|
@ -252,16 +253,19 @@ ULONG stub_manager_int_release(struct stub_manager *This)
|
|||
}
|
||||
|
||||
/* add some external references (ie from a client that unmarshaled an ifptr) */
|
||||
ULONG stub_manager_ext_addref(struct stub_manager *m, ULONG refs)
|
||||
ULONG stub_manager_ext_addref(struct stub_manager *m, ULONG refs, BOOL tableweak)
|
||||
{
|
||||
ULONG rc;
|
||||
|
||||
EnterCriticalSection(&m->lock);
|
||||
|
||||
|
||||
/* make sure we don't overflow extrefs */
|
||||
refs = min(refs, (ULONG_MAX-1 - m->extrefs));
|
||||
rc = (m->extrefs += refs);
|
||||
|
||||
if (tableweak)
|
||||
rc += ++m->weakrefs;
|
||||
|
||||
LeaveCriticalSection(&m->lock);
|
||||
|
||||
TRACE("added %u refs to %p (oid %s), rc is now %u\n", refs, m, wine_dbgstr_longlong(m->oid), rc);
|
||||
|
@ -270,7 +274,7 @@ ULONG stub_manager_ext_addref(struct stub_manager *m, ULONG refs)
|
|||
}
|
||||
|
||||
/* remove some external references */
|
||||
ULONG stub_manager_ext_release(struct stub_manager *m, ULONG refs, BOOL last_unlock_releases)
|
||||
ULONG stub_manager_ext_release(struct stub_manager *m, ULONG refs, BOOL tableweak, BOOL last_unlock_releases)
|
||||
{
|
||||
ULONG rc;
|
||||
|
||||
|
@ -280,6 +284,9 @@ ULONG stub_manager_ext_release(struct stub_manager *m, ULONG refs, BOOL last_unl
|
|||
refs = min(refs, m->extrefs);
|
||||
rc = (m->extrefs -= refs);
|
||||
|
||||
if (tableweak)
|
||||
rc += --m->weakrefs;
|
||||
|
||||
LeaveCriticalSection(&m->lock);
|
||||
|
||||
TRACE("removed %u refs from %p (oid %s), rc is now %u\n", refs, m, wine_dbgstr_longlong(m->oid), rc);
|
||||
|
@ -534,7 +541,7 @@ BOOL stub_manager_notify_unmarshal(struct stub_manager *m, const IPID *ipid)
|
|||
}
|
||||
|
||||
/* handles refcounting for CoReleaseMarshalData */
|
||||
void stub_manager_release_marshal_data(struct stub_manager *m, ULONG refs, const IPID *ipid)
|
||||
void stub_manager_release_marshal_data(struct stub_manager *m, ULONG refs, const IPID *ipid, BOOL tableweak)
|
||||
{
|
||||
struct ifstub *ifstub;
|
||||
|
||||
|
@ -546,7 +553,7 @@ void stub_manager_release_marshal_data(struct stub_manager *m, ULONG refs, const
|
|||
else if (ifstub->flags & MSHLFLAGS_TABLESTRONG)
|
||||
refs = 1;
|
||||
|
||||
stub_manager_ext_release(m, refs, TRUE);
|
||||
stub_manager_ext_release(m, refs, tableweak, TRUE);
|
||||
}
|
||||
|
||||
/* is an ifstub table marshaled? */
|
||||
|
@ -693,7 +700,7 @@ static HRESULT WINAPI RemUnknown_RemAddRef(IRemUnknown *iface,
|
|||
continue;
|
||||
}
|
||||
|
||||
stub_manager_ext_addref(stubmgr, InterfaceRefs[i].cPublicRefs);
|
||||
stub_manager_ext_addref(stubmgr, InterfaceRefs[i].cPublicRefs, FALSE);
|
||||
if (InterfaceRefs[i].cPrivateRefs)
|
||||
FIXME("Adding %ld refs securely not implemented\n", InterfaceRefs[i].cPrivateRefs);
|
||||
|
||||
|
@ -726,7 +733,7 @@ static HRESULT WINAPI RemUnknown_RemRelease(IRemUnknown *iface,
|
|||
break;
|
||||
}
|
||||
|
||||
stub_manager_ext_release(stubmgr, InterfaceRefs[i].cPublicRefs, TRUE);
|
||||
stub_manager_ext_release(stubmgr, InterfaceRefs[i].cPublicRefs, FALSE, TRUE);
|
||||
if (InterfaceRefs[i].cPrivateRefs)
|
||||
FIXME("Releasing %ld refs securely not implemented\n", InterfaceRefs[i].cPrivateRefs);
|
||||
|
||||
|
|
|
@ -192,7 +192,7 @@ HRESULT WINAPI CreateStdDispatch(
|
|||
* 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),
|
||||
* accessible programmatically 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().
|
||||
*
|
||||
|
|
|
@ -287,7 +287,7 @@ BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
|
|||
*
|
||||
* NOTES
|
||||
* See BSTR(), SysAllocStringByteLen().
|
||||
* *pbstr may be changed by this function.
|
||||
* *old may be changed by this function.
|
||||
*/
|
||||
int WINAPI SysReAllocStringLen(BSTR* old, const OLECHAR* str, unsigned int len)
|
||||
{
|
||||
|
@ -301,7 +301,7 @@ int WINAPI SysReAllocStringLen(BSTR* old, const OLECHAR* str, unsigned int len)
|
|||
*old = (BSTR)(ptr+1);
|
||||
*ptr = newbytelen;
|
||||
if (str) {
|
||||
memcpy(*old, str, newbytelen);
|
||||
memmove(*old, str, newbytelen);
|
||||
(*old)[len] = 0;
|
||||
} else {
|
||||
/* Subtle hidden feature: The old string data is still there
|
||||
|
|
|
@ -25,14 +25,14 @@
|
|||
#include "version.rc"
|
||||
|
||||
#include "oleaut32_Bg.rc"
|
||||
#include "oleaut32_Da.rc"
|
||||
#include "oleaut32_De.rc"
|
||||
#include "oleaut32_Dk.rc"
|
||||
#include "oleaut32_El.rc"
|
||||
#include "oleaut32_En.rc"
|
||||
#include "oleaut32_Eo.rc"
|
||||
#include "oleaut32_Es.rc"
|
||||
#include "oleaut32_Cz.rc"
|
||||
#include "oleaut32_Fr.rc"
|
||||
#include "oleaut32_Gr.rc"
|
||||
#include "oleaut32_Hu.rc"
|
||||
#include "oleaut32_It.rc"
|
||||
#include "oleaut32_Ja.rc"
|
||||
|
@ -41,7 +41,9 @@
|
|||
#include "oleaut32_No.rc"
|
||||
#include "oleaut32_Pl.rc"
|
||||
#include "oleaut32_Pt.rc"
|
||||
#include "oleaut32_Ro.rc"
|
||||
#include "oleaut32_Ru.rc"
|
||||
#include "oleaut32_Si.rc"
|
||||
#include "oleaut32_Sv.rc"
|
||||
#include "oleaut32_Th.rc"
|
||||
#include "oleaut32_Tr.rc"
|
||||
|
@ -50,6 +52,6 @@
|
|||
/*
|
||||
* FIXME:
|
||||
* Finnish, Greek, Hebrew, Japanese, Korean,
|
||||
* Turkish, Slovenian (at least) are localised in XP Home.
|
||||
* Turkish (at least) are localised in XP Home.
|
||||
* I expect Chinese etc are localised in Asian Editions also.
|
||||
*/
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Greek resources for oleaut32
|
||||
*
|
||||
* Copyright 2006 Dj Apal®
|
||||
* Copyright 200 Apostolos Alexiadis
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_GREEK, SUBLANG_DEFAULT
|
||||
|
@ -25,7 +25,7 @@ STRINGTABLE DISCARDABLE
|
|||
IDS_TRUE "ÁëçèÝò"
|
||||
IDS_FALSE "ØåõäÝò"
|
||||
IDS_YES "Íáé"
|
||||
IDS_NO "¼÷é"
|
||||
IDS_ON "Áíïé÷ôü"
|
||||
IDS_OFF "Êëåéóôü"
|
||||
IDS_NO "ü÷é"
|
||||
IDS_ON "Åíåñãü"
|
||||
IDS_OFF "Áíåíåñãü"
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_TRUE "True"
|
||||
IDS_FALSE "False"
|
||||
IDS_YES "はい"
|
||||
IDS_NO "いいえ"
|
||||
IDS_ON "オン"
|
||||
IDS_OFF "オフ"
|
||||
}
|
34
reactos/dll/win32/oleaut32/oleaut32_Ro.rc
Normal file
34
reactos/dll/win32/oleaut32/oleaut32_Ro.rc
Normal file
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Copyright 2003 Jon Griffiths
|
||||
* Copyright 2008 Michael Stefaniuc
|
||||
*
|
||||
* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
|
||||
|
||||
#pragma code_page(65001)
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_TRUE "Adevărat"
|
||||
IDS_FALSE "Fals"
|
||||
IDS_YES "Da"
|
||||
IDS_NO "Nu"
|
||||
IDS_ON "Activat"
|
||||
IDS_OFF "Dezactivat"
|
||||
}
|
||||
|
||||
#pragma code_page(default)
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Ukrainian resources for oleaut32
|
||||
* Slovenian resources for oleaut32
|
||||
*
|
||||
* Copyright 2006 Artem Reznikov
|
||||
* Copyright 2008 Rok Mandeljc
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -15,17 +15,21 @@
|
|||
*
|
||||
* 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
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT
|
||||
#pragma code_page(65001)
|
||||
|
||||
LANGUAGE LANG_SLOVENIAN, SUBLANG_DEFAULT
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_TRUE "²ñòèíà"
|
||||
IDS_FALSE "Íåïðàâäà"
|
||||
IDS_YES "Òàê"
|
||||
IDS_NO "ͳ"
|
||||
IDS_ON "Ââ³ìêíåíî"
|
||||
IDS_OFF "Âèìêíåíî"
|
||||
IDS_TRUE "Da"
|
||||
IDS_FALSE "Ne"
|
||||
IDS_YES "Da"
|
||||
IDS_NO "Ne"
|
||||
IDS_ON "Vključeno"
|
||||
IDS_OFF "Izključeno"
|
||||
}
|
||||
|
||||
#pragma code_page(default)
|
|
@ -18,7 +18,7 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_SWEDISH, SUBLANG_DEFAULT
|
||||
LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
|
|
|
@ -1,39 +1,3 @@
|
|||
Index: oleaut32_Gr.rc
|
||||
===================================================================
|
||||
--- oleaut32_Gr.rc (revision 23782)
|
||||
+++ oleaut32_Gr.rc (working copy)
|
||||
@@ -0,0 +1,31 @@
|
||||
+/*
|
||||
+ * Greek resources for oleaut32
|
||||
+ *
|
||||
+ * Copyright 2006 Dj Apal®
|
||||
+ *
|
||||
+ * 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_GREEK, SUBLANG_DEFAULT
|
||||
+
|
||||
+STRINGTABLE DISCARDABLE
|
||||
+{
|
||||
+ IDS_TRUE "ÁëçèÝò"
|
||||
+ IDS_FALSE "ØåõäÝò"
|
||||
+ IDS_YES "Íáé"
|
||||
+ IDS_NO "¼÷é"
|
||||
+ IDS_ON "Áíïé÷ôü"
|
||||
+ IDS_OFF "Êëåéóôü"
|
||||
+}
|
||||
Index: oleaut32_Ja.rc
|
||||
===================================================================
|
||||
--- oleaut32_Ja.rc (revision 23782)
|
||||
|
@ -90,11 +54,10 @@ Index: oleaut32.rc
|
|||
===================================================================
|
||||
--- oleaut32.rc (revision 23782)
|
||||
+++ oleaut32.rc (working copy)
|
||||
@@ -32,8 +32,10 @@
|
||||
@@ -32,8 +32,9 @@
|
||||
#include "oleaut32_Es.rc"
|
||||
#include "oleaut32_Cz.rc"
|
||||
#include "oleaut32_Fr.rc"
|
||||
+#include "oleaut32_Gr.rc"
|
||||
#include "oleaut32_Hu.rc"
|
||||
#include "oleaut32_It.rc"
|
||||
+#include "oleaut32_Ja.rc"
|
||||
|
|
|
@ -941,7 +941,7 @@ static HRESULT WINAPI OLEFontImpl_IsEqual(
|
|||
{
|
||||
OLEFontImpl *left = (OLEFontImpl *)iface;
|
||||
OLEFontImpl *right = (OLEFontImpl *)pFontOther;
|
||||
HRESULT hres;
|
||||
INT ret;
|
||||
INT left_len,right_len;
|
||||
|
||||
if((iface == NULL) || (pFontOther == NULL))
|
||||
|
@ -964,9 +964,9 @@ static HRESULT WINAPI OLEFontImpl_IsEqual(
|
|||
/* Check from string */
|
||||
left_len = strlenW(left->description.lpstrName);
|
||||
right_len = strlenW(right->description.lpstrName);
|
||||
hres = CompareStringW(0,0,left->description.lpstrName, left_len,
|
||||
ret = CompareStringW(0,0,left->description.lpstrName, left_len,
|
||||
right->description.lpstrName, right_len);
|
||||
if (hres != CSTR_EQUAL)
|
||||
if (ret != CSTR_EQUAL)
|
||||
return S_FALSE;
|
||||
|
||||
return S_OK;
|
||||
|
@ -1377,7 +1377,6 @@ static HRESULT WINAPI OLEFontImpl_Invoke(
|
|||
return hr;
|
||||
} else {
|
||||
VARIANTARG vararg;
|
||||
HRESULT hr;
|
||||
|
||||
VariantInit(&vararg);
|
||||
hr = VariantChangeTypeEx(&vararg, &pDispParams->rgvarg[0], lcid, 0, VT_BOOL);
|
||||
|
@ -1399,7 +1398,6 @@ static HRESULT WINAPI OLEFontImpl_Invoke(
|
|||
return hr;
|
||||
} else {
|
||||
VARIANTARG vararg;
|
||||
HRESULT hr;
|
||||
|
||||
VariantInit(&vararg);
|
||||
hr = VariantChangeTypeEx(&vararg, &pDispParams->rgvarg[0], lcid, 0, VT_BOOL);
|
||||
|
@ -1421,7 +1419,6 @@ static HRESULT WINAPI OLEFontImpl_Invoke(
|
|||
return hr;
|
||||
} else {
|
||||
VARIANTARG vararg;
|
||||
HRESULT hr;
|
||||
|
||||
VariantInit(&vararg);
|
||||
hr = VariantChangeTypeEx(&vararg, &pDispParams->rgvarg[0], lcid, 0, VT_BOOL);
|
||||
|
@ -1440,7 +1437,6 @@ static HRESULT WINAPI OLEFontImpl_Invoke(
|
|||
return OLEFontImpl_get_Size((IFont *)this, &V_CY(pVarResult));
|
||||
} else {
|
||||
VARIANTARG vararg;
|
||||
HRESULT hr;
|
||||
|
||||
VariantInit(&vararg);
|
||||
hr = VariantChangeTypeEx(&vararg, &pDispParams->rgvarg[0], lcid, 0, VT_CY);
|
||||
|
@ -1459,7 +1455,6 @@ static HRESULT WINAPI OLEFontImpl_Invoke(
|
|||
return OLEFontImpl_get_Weight((IFont *)this, &V_I2(pVarResult));
|
||||
} else {
|
||||
VARIANTARG vararg;
|
||||
HRESULT hr;
|
||||
|
||||
VariantInit(&vararg);
|
||||
hr = VariantChangeTypeEx(&vararg, &pDispParams->rgvarg[0], lcid, 0, VT_I2);
|
||||
|
@ -1478,7 +1473,6 @@ static HRESULT WINAPI OLEFontImpl_Invoke(
|
|||
return OLEFontImpl_get_Charset((IFont *)this, &V_I2(pVarResult));
|
||||
} else {
|
||||
VARIANTARG vararg;
|
||||
HRESULT hr;
|
||||
|
||||
VariantInit(&vararg);
|
||||
hr = VariantChangeTypeEx(&vararg, &pDispParams->rgvarg[0], lcid, 0, VT_I2);
|
||||
|
@ -1562,7 +1556,7 @@ static HRESULT WINAPI OLEFontImpl_GetClassID(
|
|||
if (pClassID==0)
|
||||
return E_POINTER;
|
||||
|
||||
memcpy(pClassID, &CLSID_StdFont, sizeof(CLSID_StdFont));
|
||||
*pClassID = CLSID_StdFont;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -1812,7 +1806,9 @@ static HRESULT WINAPI OLEFontImpl_GetSizeMax(
|
|||
pcbSize->u.LowPart += sizeof(BYTE); /* StrLength */
|
||||
|
||||
if (this->description.lpstrName!=0)
|
||||
pcbSize->u.LowPart += lstrlenW(this->description.lpstrName);
|
||||
pcbSize->u.LowPart += WideCharToMultiByte( CP_ACP, 0, this->description.lpstrName,
|
||||
strlenW(this->description.lpstrName),
|
||||
NULL, 0, NULL, NULL );
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
*
|
||||
* BUGS
|
||||
*
|
||||
* Support PICTYPE_BITMAP and PICTYPE_ICON, altough only bitmaps very well..
|
||||
* Support PICTYPE_BITMAP and PICTYPE_ICON, although only bitmaps very well..
|
||||
* Lots of methods are just stubs.
|
||||
*
|
||||
*
|
||||
|
@ -45,6 +45,22 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef SONAME_LIBJPEG
|
||||
/* This is a hack, so jpeglib.h does not redefine INT32 and the like*/
|
||||
#define XMD_H
|
||||
#define UINT8 JPEG_UINT8
|
||||
#define UINT16 JPEG_UINT16
|
||||
#define boolean jpeg_boolean
|
||||
# include <jpeglib.h>
|
||||
#undef UINT8
|
||||
#undef UINT16
|
||||
#undef boolean
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PNG_H
|
||||
#include <png.h>
|
||||
#endif
|
||||
|
||||
/* Must be before wine includes, the header has things conflicting with
|
||||
* WINE headers.
|
||||
*/
|
||||
|
@ -67,23 +83,6 @@
|
|||
|
||||
#include "wine/wingdi16.h"
|
||||
|
||||
#ifdef SONAME_LIBJPEG
|
||||
/* This is a hack, so jpeglib.h does not redefine INT32 and the like*/
|
||||
#define XMD_H
|
||||
#define UINT8 JPEG_UINT8
|
||||
#define UINT16 JPEG_UINT16
|
||||
#undef FAR
|
||||
#define boolean jpeg_boolean
|
||||
# include <jpeglib.h>
|
||||
#undef jpeg_boolean
|
||||
#undef UINT16
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PNG_H
|
||||
#undef FAR
|
||||
#include <png.h>
|
||||
#endif
|
||||
|
||||
#include "ungif.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
||||
|
@ -316,7 +315,7 @@ static OLEPictureImpl* OLEPictureImpl_Construct(LPPICTDESC pictDesc, BOOL fOwn)
|
|||
newObject->bIsDirty = FALSE;
|
||||
|
||||
if (pictDesc) {
|
||||
memcpy(&newObject->desc, pictDesc, sizeof(PICTDESC));
|
||||
newObject->desc = *pictDesc;
|
||||
|
||||
switch(pictDesc->picType) {
|
||||
case PICTYPE_BITMAP:
|
||||
|
@ -955,7 +954,7 @@ static HRESULT WINAPI OLEPictureImpl_GetClassID(
|
|||
IPersistStream* iface,CLSID* pClassID)
|
||||
{
|
||||
TRACE("(%p)\n", pClassID);
|
||||
memcpy(pClassID, &CLSID_StdPicture, sizeof(*pClassID));
|
||||
*pClassID = CLSID_StdPicture;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -1008,7 +1007,7 @@ static void *load_libjpeg(void)
|
|||
/* for the jpeg decompressor source manager. */
|
||||
static void _jpeg_init_source(j_decompress_ptr cinfo) { }
|
||||
|
||||
static boolean _jpeg_fill_input_buffer(j_decompress_ptr cinfo) {
|
||||
static jpeg_boolean _jpeg_fill_input_buffer(j_decompress_ptr cinfo) {
|
||||
ERR("(), should not get here.\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -1019,7 +1018,7 @@ static void _jpeg_skip_input_data(j_decompress_ptr cinfo,long num_bytes) {
|
|||
cinfo->src->bytes_in_buffer -= num_bytes;
|
||||
}
|
||||
|
||||
static boolean _jpeg_resync_to_restart(j_decompress_ptr cinfo, int desired) {
|
||||
static jpeg_boolean _jpeg_resync_to_restart(j_decompress_ptr cinfo, int desired) {
|
||||
ERR("(desired=%d), should not get here.\n",desired);
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -1741,6 +1740,17 @@ static HRESULT OLEPictureImpl_LoadAPM(OLEPictureImpl *This,
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* BITMAP FORMAT FLAGS -
|
||||
* Flags that differentiate between different types of bitmaps.
|
||||
*/
|
||||
|
||||
#define BITMAP_FORMAT_BMP 0x4d42 /* "BM" */
|
||||
#define BITMAP_FORMAT_JPEG 0xd8ff
|
||||
#define BITMAP_FORMAT_GIF 0x4947
|
||||
#define BITMAP_FORMAT_PNG 0x5089
|
||||
#define BITMAP_FORMAT_APM 0xcdd7
|
||||
|
||||
/************************************************************************
|
||||
* OLEPictureImpl_IPersistStream_Load (IUnknown)
|
||||
*
|
||||
|
@ -1887,19 +1897,19 @@ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface,IStream*pStm) {
|
|||
This->loadtime_format = magic;
|
||||
|
||||
switch (magic) {
|
||||
case 0x4947: /* GIF */
|
||||
case BITMAP_FORMAT_GIF: /* GIF */
|
||||
hr = OLEPictureImpl_LoadGif(This, xbuf, xread);
|
||||
break;
|
||||
case 0xd8ff: /* JPEG */
|
||||
case BITMAP_FORMAT_JPEG: /* JPEG */
|
||||
hr = OLEPictureImpl_LoadJpeg(This, xbuf, xread);
|
||||
break;
|
||||
case 0x4d42: /* Bitmap */
|
||||
case BITMAP_FORMAT_BMP: /* Bitmap */
|
||||
hr = OLEPictureImpl_LoadDIB(This, xbuf, xread);
|
||||
break;
|
||||
case 0x5089: /* PNG */
|
||||
case BITMAP_FORMAT_PNG: /* PNG */
|
||||
hr = OLEPictureImpl_LoadPNG(This, xbuf, xread);
|
||||
break;
|
||||
case 0xcdd7: /* APM */
|
||||
case BITMAP_FORMAT_APM: /* APM */
|
||||
hr = OLEPictureImpl_LoadAPM(This, xbuf, xread);
|
||||
break;
|
||||
case 0x0000: { /* ICON , first word is dwReserved */
|
||||
|
@ -1975,7 +1985,7 @@ static int serializeBMP(HBITMAP hBitmap, void ** ppBuffer, unsigned int * pLengt
|
|||
|
||||
/* Fill the BITMAPFILEHEADER */
|
||||
pFileHeader = (BITMAPFILEHEADER *)(*ppBuffer);
|
||||
pFileHeader->bfType = 0x4d42;
|
||||
pFileHeader->bfType = BITMAP_FORMAT_BMP;
|
||||
pFileHeader->bfSize = *pLength;
|
||||
pFileHeader->bfOffBits =
|
||||
sizeof(BITMAPFILEHEADER) +
|
||||
|
@ -2066,7 +2076,7 @@ static int serializeIcon(HICON hIcon, void ** ppBuffer, unsigned int * pLength)
|
|||
|
||||
/* Fill out the BITMAPINFOHEADER */
|
||||
pIconBitmapHeader = (BITMAPINFOHEADER *)(pIconData + 3 * sizeof(WORD) + sizeof(CURSORICONFILEDIRENTRY));
|
||||
memcpy(pIconBitmapHeader, &pInfoBitmap->bmiHeader, sizeof(BITMAPINFOHEADER));
|
||||
*pIconBitmapHeader = pInfoBitmap->bmiHeader;
|
||||
|
||||
/* Find out whether a palette exists for the bitmap */
|
||||
if ( (pInfoBitmap->bmiHeader.biBitCount == 16 && pInfoBitmap->bmiHeader.biCompression == BI_RGB)
|
||||
|
@ -2187,17 +2197,17 @@ static HRESULT WINAPI OLEPictureImpl_Save(
|
|||
break;
|
||||
case PICTYPE_BITMAP:
|
||||
if (This->bIsDirty) {
|
||||
switch (This->keepOrigFormat ? This->loadtime_format : 0x4d42) {
|
||||
case 0x4d42:
|
||||
switch (This->keepOrigFormat ? This->loadtime_format : BITMAP_FORMAT_BMP) {
|
||||
case BITMAP_FORMAT_BMP:
|
||||
iSerializeResult = serializeBMP(This->desc.u.bmp.hbitmap, &pIconData, &iDataSize);
|
||||
break;
|
||||
case 0xd8ff:
|
||||
case BITMAP_FORMAT_JPEG:
|
||||
FIXME("(%p,%p,%d), PICTYPE_BITMAP (format JPEG) not implemented!\n",This,pStm,fClearDirty);
|
||||
break;
|
||||
case 0x4947:
|
||||
case BITMAP_FORMAT_GIF:
|
||||
FIXME("(%p,%p,%d), PICTYPE_BITMAP (format GIF) not implemented!\n",This,pStm,fClearDirty);
|
||||
break;
|
||||
case 0x5089:
|
||||
case BITMAP_FORMAT_PNG:
|
||||
FIXME("(%p,%p,%d), PICTYPE_BITMAP (format PNG) not implemented!\n",This,pStm,fClearDirty);
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -211,12 +211,12 @@ static HRESULT WINAPI IRecordInfoImpl_RecordClear(IRecordInfo *iface, PVOID pvEx
|
|||
var = ((PBYTE)pvExisting)+This->fields[i].offset;
|
||||
switch(This->fields[i].vt) {
|
||||
case VT_BSTR:
|
||||
/* NOTE: Windows implementatino reads DWORD (len) before string,
|
||||
* but it seems to do nothing with this */
|
||||
SysFreeString(*(BSTR*)var);
|
||||
*(BSTR*)var = NULL;
|
||||
break;
|
||||
case VT_I2:
|
||||
case VT_I4:
|
||||
case VT_R4:
|
||||
case VT_R8:
|
||||
case VT_CY:
|
||||
case VT_DATE:
|
||||
|
@ -268,7 +268,7 @@ static HRESULT WINAPI IRecordInfoImpl_GetGuid(IRecordInfo *iface, GUID *pguid)
|
|||
if(!pguid)
|
||||
return E_INVALIDARG;
|
||||
|
||||
memcpy(pguid, &This->guid, sizeof(GUID));
|
||||
*pguid = This->guid;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -467,9 +467,14 @@ static HRESULT WINAPI IRecordInfoImpl_RecordCreateCopy(IRecordInfo *iface, PVOID
|
|||
static HRESULT WINAPI IRecordInfoImpl_RecordDestroy(IRecordInfo *iface, PVOID pvRecord)
|
||||
{
|
||||
IRecordInfoImpl *This = (IRecordInfoImpl*)iface;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, pvRecord);
|
||||
|
||||
hres = IRecordInfo_RecordClear(iface, pvRecord);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
if(!HeapFree(GetProcessHeap(), 0, pvRecord))
|
||||
return E_INVALIDARG;
|
||||
|
||||
|
@ -557,7 +562,7 @@ HRESULT WINAPI GetRecordInfoFromTypeInfo(ITypeInfo* pTI, IRecordInfo** ppRecInfo
|
|||
|
||||
if(typeattr->typekind == TKIND_ALIAS) {
|
||||
hres = ITypeInfo_GetRefTypeInfo(pTI, typeattr->tdescAlias.u.hreftype, &pTypeInfo);
|
||||
memcpy(&guid, &typeattr->guid, sizeof(GUID));
|
||||
guid = typeattr->guid;
|
||||
ITypeInfo_ReleaseTypeAttr(pTI, typeattr);
|
||||
if(FAILED(hres)) {
|
||||
WARN("GetRefTypeInfo failed: %08x\n", hres);
|
||||
|
@ -567,7 +572,7 @@ HRESULT WINAPI GetRecordInfoFromTypeInfo(ITypeInfo* pTI, IRecordInfo** ppRecInfo
|
|||
}else {
|
||||
pTypeInfo = pTI;
|
||||
ITypeInfo_AddRef(pTypeInfo);
|
||||
memcpy(&guid, &typeattr->guid, sizeof(GUID));
|
||||
guid = typeattr->guid;
|
||||
}
|
||||
|
||||
if(typeattr->typekind != TKIND_RECORD) {
|
||||
|
@ -585,7 +590,7 @@ HRESULT WINAPI GetRecordInfoFromTypeInfo(ITypeInfo* pTI, IRecordInfo** ppRecInfo
|
|||
ret->size = typeattr->cbSizeInstance;
|
||||
ITypeInfo_ReleaseTypeAttr(pTypeInfo, typeattr);
|
||||
|
||||
memcpy(&ret->guid, &guid, sizeof(GUID));
|
||||
ret->guid = guid;
|
||||
|
||||
/* NOTE: Windows implementation calls ITypeInfo::GetCantainingTypeLib and
|
||||
* ITypeLib::GetLibAttr, but we currently don't need this.
|
||||
|
|
|
@ -483,7 +483,7 @@ HRESULT WINAPI SafeArrayAllocDescriptor(UINT cDims, SAFEARRAY **ppsaOut)
|
|||
* Failure: An HRESULT error code indicating the error.
|
||||
*
|
||||
* NOTES
|
||||
* - This function does not chack that vt is an allowed VARTYPE.
|
||||
* - This function does not check that vt is an allowed VARTYPE.
|
||||
* - Unlike SafeArrayAllocDescriptor(), vt is associated with the array.
|
||||
* See SafeArray.
|
||||
*/
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -698,11 +699,24 @@ serialize_param(
|
|||
}
|
||||
ITypeInfo_GetTypeAttr(tinfo2,&tattr);
|
||||
switch (tattr->typekind) {
|
||||
case TKIND_ALIAS:
|
||||
if (tattr->tdescAlias.vt == VT_USERDEFINED)
|
||||
{
|
||||
DWORD href = tattr->tdescAlias.u.hreftype;
|
||||
ITypeInfo_ReleaseTypeAttr(tinfo, tattr);
|
||||
ITypeInfo_Release(tinfo2);
|
||||
hres = ITypeInfo_GetRefTypeInfo(tinfo,href,&tinfo2);
|
||||
if (hres) {
|
||||
ERR("Could not get typeinfo of hreftype %x for VT_USERDEFINED.\n",tdesc->u.lptdesc->u.hreftype);
|
||||
return hres;
|
||||
}
|
||||
ITypeInfo_GetTypeAttr(tinfo2,&tattr);
|
||||
derefhere = (tattr->typekind != TKIND_DISPATCH && tattr->typekind != TKIND_INTERFACE);
|
||||
}
|
||||
break;
|
||||
case TKIND_ENUM: /* confirmed */
|
||||
case TKIND_RECORD: /* FIXME: mostly untested */
|
||||
derefhere=TRUE;
|
||||
break;
|
||||
case TKIND_ALIAS: /* FIXME: untested */
|
||||
case TKIND_DISPATCH: /* will be done in VT_USERDEFINED case */
|
||||
case TKIND_INTERFACE: /* will be done in VT_USERDEFINED case */
|
||||
derefhere=FALSE;
|
||||
|
@ -1030,11 +1044,24 @@ deserialize_param(
|
|||
}
|
||||
ITypeInfo_GetTypeAttr(tinfo2,&tattr);
|
||||
switch (tattr->typekind) {
|
||||
case TKIND_ALIAS:
|
||||
if (tattr->tdescAlias.vt == VT_USERDEFINED)
|
||||
{
|
||||
DWORD href = tattr->tdescAlias.u.hreftype;
|
||||
ITypeInfo_ReleaseTypeAttr(tinfo, tattr);
|
||||
ITypeInfo_Release(tinfo2);
|
||||
hres = ITypeInfo_GetRefTypeInfo(tinfo,href,&tinfo2);
|
||||
if (hres) {
|
||||
ERR("Could not get typeinfo of hreftype %x for VT_USERDEFINED.\n",tdesc->u.lptdesc->u.hreftype);
|
||||
return hres;
|
||||
}
|
||||
ITypeInfo_GetTypeAttr(tinfo2,&tattr);
|
||||
derefhere = (tattr->typekind != TKIND_DISPATCH && tattr->typekind != TKIND_INTERFACE);
|
||||
}
|
||||
break;
|
||||
case TKIND_ENUM: /* confirmed */
|
||||
case TKIND_RECORD: /* FIXME: mostly untested */
|
||||
derefhere=TRUE;
|
||||
break;
|
||||
case TKIND_ALIAS: /* FIXME: untested */
|
||||
case TKIND_DISPATCH: /* will be done in VT_USERDEFINED case */
|
||||
case TKIND_INTERFACE: /* will be done in VT_USERDEFINED case */
|
||||
derefhere=FALSE;
|
||||
|
@ -1776,7 +1803,7 @@ PSFacBuf_CreateProxy(
|
|||
/* one reference for the proxy */
|
||||
proxy->ref = 1;
|
||||
proxy->tinfo = tinfo;
|
||||
memcpy(&proxy->iid,riid,sizeof(*riid));
|
||||
proxy->iid = *riid;
|
||||
proxy->chanbuf = 0;
|
||||
|
||||
InitializeCriticalSection(&proxy->crit);
|
||||
|
@ -2068,7 +2095,7 @@ TMStubImpl_Invoke(
|
|||
args
|
||||
);
|
||||
}
|
||||
__EXCEPT(NULL)
|
||||
__EXCEPT_ALL
|
||||
{
|
||||
DWORD dwExceptionCode = GetExceptionCode();
|
||||
ERR("invoke call failed with exception 0x%08x (%d)\n", dwExceptionCode, dwExceptionCode);
|
||||
|
@ -2192,7 +2219,7 @@ PSFacBuf_CreateStub(
|
|||
stub->tinfo = tinfo;
|
||||
stub->dispatch_stub = NULL;
|
||||
stub->dispatch_derivative = FALSE;
|
||||
memcpy(&(stub->iid),riid,sizeof(*riid));
|
||||
stub->iid = *riid;
|
||||
hres = IRpcStubBuffer_Connect((LPRPCSTUBBUFFER)stub,pUnkServer);
|
||||
*ppStub = (LPRPCSTUBBUFFER)stub;
|
||||
TRACE("IRpcStubBuffer: %p\n", stub);
|
||||
|
|
|
@ -237,7 +237,7 @@ static WCHAR *get_lcid_subkey( LCID lcid, SYSKIND syskind, WCHAR *buffer )
|
|||
return buffer;
|
||||
}
|
||||
|
||||
static int TLB_ReadTypeLib(LPCWSTR pszFileName, LPWSTR pszPath, UINT cchPath, ITypeLib2 **ppTypeLib);
|
||||
static HRESULT TLB_ReadTypeLib(LPCWSTR pszFileName, LPWSTR pszPath, UINT cchPath, ITypeLib2 **ppTypeLib);
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -998,7 +998,7 @@ typedef struct tagITypeInfoImpl
|
|||
const ITypeInfo2Vtbl *lpVtbl;
|
||||
const ITypeCompVtbl *lpVtblTypeComp;
|
||||
LONG ref;
|
||||
BOOL no_free_data; /* don't free data structurees */
|
||||
BOOL no_free_data; /* don't free data structures */
|
||||
TYPEATTR TypeAttr ; /* _lots_ of type information. */
|
||||
ITypeLibImpl * pTypeLib; /* back pointer to typelib */
|
||||
int index; /* index in this typelib; */
|
||||
|
@ -1084,6 +1084,8 @@ static void dump_TypeDesc(const TYPEDESC *pTD,char *szVarType) {
|
|||
case VT_HRESULT: sprintf(szVarType, "VT_HRESULT"); break;
|
||||
case VT_USERDEFINED: sprintf(szVarType, "VT_USERDEFINED ref = %x",
|
||||
pTD->u.hreftype); break;
|
||||
case VT_LPSTR: sprintf(szVarType, "VT_LPSTR"); break;
|
||||
case VT_LPWSTR: sprintf(szVarType, "VT_LPWSTR"); break;
|
||||
case VT_PTR: sprintf(szVarType, "ptr to ");
|
||||
dump_TypeDesc(pTD->u.lptdesc, szVarType + 7);
|
||||
break;
|
||||
|
@ -2024,7 +2026,6 @@ static void MSFT_DoVars(TLBContext *pcx, ITypeInfoImpl *pTI, int cFuncs,
|
|||
static void MSFT_DoRefType(TLBContext *pcx, ITypeLibImpl *pTL,
|
||||
int offset)
|
||||
{
|
||||
int j;
|
||||
TLBRefType *ref;
|
||||
|
||||
TRACE_(typelib)("TLB context %p, TLB offset %x\n", pcx, offset);
|
||||
|
@ -2046,7 +2047,7 @@ static void MSFT_DoRefType(TLBContext *pcx, ITypeLibImpl *pTL,
|
|||
|
||||
MSFT_ReadLEDWords(&impinfo, sizeof(impinfo), pcx,
|
||||
pcx->pTblDir->pImpInfo.offset + (offset & 0xfffffffc));
|
||||
for(j=0;pImpLib;j++){ /* search the known offsets of all import libraries */
|
||||
while (pImpLib){ /* search the known offsets of all import libraries */
|
||||
if(pImpLib->offset==impinfo.oImpFile) break;
|
||||
pImpLib=pImpLib->next;
|
||||
}
|
||||
|
@ -2171,7 +2172,7 @@ static ITypeInfoImpl * MSFT_DoTypeInfo(
|
|||
break;
|
||||
case TKIND_DISPATCH:
|
||||
/* This is not -1 when the interface is a non-base dual interface or
|
||||
when a dispinterface wraps an interface ie the idl 'dispinterface x {interface y;};'.
|
||||
when a dispinterface wraps an interface, i.e., the idl 'dispinterface x {interface y;};'.
|
||||
Note however that GetRefTypeOfImplType(0) always returns a ref to IDispatch and
|
||||
not this interface.
|
||||
*/
|
||||
|
@ -2217,6 +2218,188 @@ static CRITICAL_SECTION_DEBUG cache_section_debug =
|
|||
static CRITICAL_SECTION cache_section = { &cache_section_debug, -1, 0, 0, 0, 0 };
|
||||
|
||||
|
||||
typedef struct TLB_PEFile
|
||||
{
|
||||
const IUnknownVtbl *lpvtbl;
|
||||
LONG refs;
|
||||
HMODULE dll;
|
||||
HRSRC typelib_resource;
|
||||
HGLOBAL typelib_global;
|
||||
LPVOID typelib_base;
|
||||
} TLB_PEFile;
|
||||
|
||||
static HRESULT WINAPI TLB_PEFile_QueryInterface(IUnknown *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
if (IsEqualIID(riid, &IID_IUnknown))
|
||||
{
|
||||
*ppv = iface;
|
||||
IUnknown_AddRef(iface);
|
||||
return S_OK;
|
||||
}
|
||||
*ppv = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI TLB_PEFile_AddRef(IUnknown *iface)
|
||||
{
|
||||
TLB_PEFile *This = (TLB_PEFile *)iface;
|
||||
return InterlockedIncrement(&This->refs);
|
||||
}
|
||||
|
||||
static ULONG WINAPI TLB_PEFile_Release(IUnknown *iface)
|
||||
{
|
||||
TLB_PEFile *This = (TLB_PEFile *)iface;
|
||||
ULONG refs = InterlockedDecrement(&This->refs);
|
||||
if (!refs)
|
||||
{
|
||||
if (This->typelib_global)
|
||||
FreeResource(This->typelib_global);
|
||||
if (This->dll)
|
||||
FreeLibrary(This->dll);
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
}
|
||||
return refs;
|
||||
}
|
||||
|
||||
static const IUnknownVtbl TLB_PEFile_Vtable =
|
||||
{
|
||||
TLB_PEFile_QueryInterface,
|
||||
TLB_PEFile_AddRef,
|
||||
TLB_PEFile_Release
|
||||
};
|
||||
|
||||
static HRESULT TLB_PEFile_Open(LPCWSTR path, INT index, LPVOID *ppBase, DWORD *pdwTLBLength, IUnknown **ppFile)
|
||||
{
|
||||
TLB_PEFile *This;
|
||||
|
||||
This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
|
||||
if (!This)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
This->lpvtbl = &TLB_PEFile_Vtable;
|
||||
This->refs = 1;
|
||||
This->dll = NULL;
|
||||
This->typelib_resource = NULL;
|
||||
This->typelib_global = NULL;
|
||||
This->typelib_base = NULL;
|
||||
|
||||
This->dll = LoadLibraryExW(path, 0, DONT_RESOLVE_DLL_REFERENCES |
|
||||
LOAD_LIBRARY_AS_DATAFILE | LOAD_WITH_ALTERED_SEARCH_PATH);
|
||||
|
||||
if (This->dll)
|
||||
{
|
||||
static const WCHAR TYPELIBW[] = {'T','Y','P','E','L','I','B',0};
|
||||
This->typelib_resource = FindResourceW(This->dll, MAKEINTRESOURCEW(index), TYPELIBW);
|
||||
if (This->typelib_resource)
|
||||
{
|
||||
This->typelib_global = LoadResource(This->dll, This->typelib_resource);
|
||||
if (This->typelib_global)
|
||||
{
|
||||
This->typelib_base = LockResource(This->typelib_global);
|
||||
|
||||
if (This->typelib_base)
|
||||
{
|
||||
*pdwTLBLength = SizeofResource(This->dll, This->typelib_resource);
|
||||
*ppBase = This->typelib_base;
|
||||
*ppFile = (IUnknown *)&This->lpvtbl;
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TLB_PEFile_Release((IUnknown *)&This->lpvtbl);
|
||||
return TYPE_E_CANTLOADLIBRARY;
|
||||
}
|
||||
|
||||
|
||||
typedef struct TLB_Mapping
|
||||
{
|
||||
const IUnknownVtbl *lpvtbl;
|
||||
LONG refs;
|
||||
HANDLE file;
|
||||
HANDLE mapping;
|
||||
LPVOID typelib_base;
|
||||
} TLB_Mapping;
|
||||
|
||||
static HRESULT WINAPI TLB_Mapping_QueryInterface(IUnknown *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
if (IsEqualIID(riid, &IID_IUnknown))
|
||||
{
|
||||
*ppv = iface;
|
||||
IUnknown_AddRef(iface);
|
||||
return S_OK;
|
||||
}
|
||||
*ppv = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI TLB_Mapping_AddRef(IUnknown *iface)
|
||||
{
|
||||
TLB_Mapping *This = (TLB_Mapping *)iface;
|
||||
return InterlockedIncrement(&This->refs);
|
||||
}
|
||||
|
||||
static ULONG WINAPI TLB_Mapping_Release(IUnknown *iface)
|
||||
{
|
||||
TLB_Mapping *This = (TLB_Mapping *)iface;
|
||||
ULONG refs = InterlockedDecrement(&This->refs);
|
||||
if (!refs)
|
||||
{
|
||||
if (This->typelib_base)
|
||||
UnmapViewOfFile(This->typelib_base);
|
||||
if (This->mapping)
|
||||
CloseHandle(This->mapping);
|
||||
if (This->file != INVALID_HANDLE_VALUE)
|
||||
CloseHandle(This->file);
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
}
|
||||
return refs;
|
||||
}
|
||||
|
||||
static const IUnknownVtbl TLB_Mapping_Vtable =
|
||||
{
|
||||
TLB_Mapping_QueryInterface,
|
||||
TLB_Mapping_AddRef,
|
||||
TLB_Mapping_Release
|
||||
};
|
||||
|
||||
static HRESULT TLB_Mapping_Open(LPCWSTR path, LPVOID *ppBase, DWORD *pdwTLBLength, IUnknown **ppFile)
|
||||
{
|
||||
TLB_Mapping *This;
|
||||
|
||||
This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
|
||||
if (!This)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
This->lpvtbl = &TLB_Mapping_Vtable;
|
||||
This->refs = 1;
|
||||
This->file = INVALID_HANDLE_VALUE;
|
||||
This->mapping = NULL;
|
||||
This->typelib_base = NULL;
|
||||
|
||||
This->file = CreateFileW(path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0);
|
||||
if (INVALID_HANDLE_VALUE != This->file)
|
||||
{
|
||||
This->mapping = CreateFileMappingW(This->file, NULL, PAGE_READONLY | SEC_COMMIT, 0, 0, NULL);
|
||||
if (This->mapping)
|
||||
{
|
||||
This->typelib_base = MapViewOfFile(This->mapping, FILE_MAP_READ, 0, 0, 0);
|
||||
if(This->typelib_base)
|
||||
{
|
||||
/* retrieve file size */
|
||||
*pdwTLBLength = GetFileSize(This->file, NULL);
|
||||
*ppBase = This->typelib_base;
|
||||
*ppFile = (IUnknown *)&This->lpvtbl;
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IUnknown_Release((IUnknown *)&This->lpvtbl);
|
||||
return TYPE_E_CANTLOADLIBRARY;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* TLB_ReadTypeLib
|
||||
*
|
||||
|
@ -2225,13 +2408,15 @@ static CRITICAL_SECTION cache_section = { &cache_section_debug, -1, 0, 0, 0, 0 }
|
|||
*/
|
||||
#define MSFT_SIGNATURE 0x5446534D /* "MSFT" */
|
||||
#define SLTG_SIGNATURE 0x47544c53 /* "SLTG" */
|
||||
static int TLB_ReadTypeLib(LPCWSTR pszFileName, LPWSTR pszPath, UINT cchPath, ITypeLib2 **ppTypeLib)
|
||||
static HRESULT TLB_ReadTypeLib(LPCWSTR pszFileName, LPWSTR pszPath, UINT cchPath, ITypeLib2 **ppTypeLib)
|
||||
{
|
||||
ITypeLibImpl *entry;
|
||||
int ret = TYPE_E_CANTLOADLIBRARY;
|
||||
HRESULT ret;
|
||||
INT index = 1;
|
||||
HINSTANCE hinstDLL;
|
||||
LPWSTR index_str, file = (LPWSTR)pszFileName;
|
||||
LPVOID pBase = NULL;
|
||||
DWORD dwTLBLength = 0;
|
||||
IUnknown *pFile = NULL;
|
||||
|
||||
*ppTypeLib = NULL;
|
||||
|
||||
|
@ -2285,63 +2470,27 @@ static int TLB_ReadTypeLib(LPCWSTR pszFileName, LPWSTR pszPath, UINT cchPath, IT
|
|||
|
||||
/* now actually load and parse the typelib */
|
||||
|
||||
hinstDLL = LoadLibraryExW(pszPath, 0, DONT_RESOLVE_DLL_REFERENCES |
|
||||
LOAD_LIBRARY_AS_DATAFILE | LOAD_WITH_ALTERED_SEARCH_PATH);
|
||||
|
||||
if (hinstDLL)
|
||||
ret = TLB_PEFile_Open(pszPath, index, &pBase, &dwTLBLength, &pFile);
|
||||
if (ret == TYPE_E_CANTLOADLIBRARY)
|
||||
ret = TLB_Mapping_Open(pszPath, &pBase, &dwTLBLength, &pFile);
|
||||
if (SUCCEEDED(ret))
|
||||
{
|
||||
static const WCHAR TYPELIBW[] = {'T','Y','P','E','L','I','B',0};
|
||||
HRSRC hrsrc = FindResourceW(hinstDLL, MAKEINTRESOURCEW(index), TYPELIBW);
|
||||
if (hrsrc)
|
||||
if (dwTLBLength >= 4)
|
||||
{
|
||||
HGLOBAL hGlobal = LoadResource(hinstDLL, hrsrc);
|
||||
if (hGlobal)
|
||||
DWORD dwSignature = FromLEDWord(*((DWORD*) pBase));
|
||||
if (dwSignature == MSFT_SIGNATURE)
|
||||
*ppTypeLib = ITypeLib2_Constructor_MSFT(pBase, dwTLBLength);
|
||||
else if (dwSignature == SLTG_SIGNATURE)
|
||||
*ppTypeLib = ITypeLib2_Constructor_SLTG(pBase, dwTLBLength);
|
||||
else
|
||||
{
|
||||
LPVOID pBase = LockResource(hGlobal);
|
||||
DWORD dwTLBLength = SizeofResource(hinstDLL, hrsrc);
|
||||
|
||||
if (pBase)
|
||||
{
|
||||
/* try to load as incore resource */
|
||||
DWORD dwSignature = FromLEDWord(*((DWORD*) pBase));
|
||||
if (dwSignature == MSFT_SIGNATURE)
|
||||
*ppTypeLib = ITypeLib2_Constructor_MSFT(pBase, dwTLBLength);
|
||||
else if (dwSignature == SLTG_SIGNATURE)
|
||||
*ppTypeLib = ITypeLib2_Constructor_SLTG(pBase, dwTLBLength);
|
||||
else
|
||||
FIXME("Header type magic 0x%08x not supported.\n",dwSignature);
|
||||
}
|
||||
FreeResource( hGlobal );
|
||||
FIXME("Header type magic 0x%08x not supported.\n",dwSignature);
|
||||
ret = TYPE_E_CANTLOADLIBRARY;
|
||||
}
|
||||
}
|
||||
FreeLibrary(hinstDLL);
|
||||
}
|
||||
else
|
||||
{
|
||||
HANDLE hFile = CreateFileW(pszPath, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0 );
|
||||
if (INVALID_HANDLE_VALUE != hFile)
|
||||
{
|
||||
HANDLE hMapping = CreateFileMappingW( hFile, NULL, PAGE_READONLY | SEC_COMMIT, 0, 0, NULL );
|
||||
if (hMapping)
|
||||
{
|
||||
LPVOID pBase = MapViewOfFile(hMapping, FILE_MAP_READ, 0, 0, 0);
|
||||
if(pBase)
|
||||
{
|
||||
/* retrieve file size */
|
||||
DWORD dwTLBLength = GetFileSize(hFile, NULL);
|
||||
DWORD dwSignature = FromLEDWord(*((DWORD*) pBase));
|
||||
|
||||
if (dwSignature == MSFT_SIGNATURE)
|
||||
*ppTypeLib = ITypeLib2_Constructor_MSFT(pBase, dwTLBLength);
|
||||
else if (dwSignature == SLTG_SIGNATURE)
|
||||
*ppTypeLib = ITypeLib2_Constructor_SLTG(pBase, dwTLBLength);
|
||||
|
||||
UnmapViewOfFile(pBase);
|
||||
}
|
||||
CloseHandle(hMapping);
|
||||
}
|
||||
CloseHandle(hFile);
|
||||
}
|
||||
else
|
||||
ret = TYPE_E_CANTLOADLIBRARY;
|
||||
IUnknown_Release(pFile);
|
||||
}
|
||||
|
||||
if(*ppTypeLib) {
|
||||
|
@ -2476,7 +2625,7 @@ static ITypeLib2* ITypeLib2_Constructor_MSFT(LPVOID pLib, DWORD dwTLBLength)
|
|||
pTypeLibImpl->ctCustData = MSFT_CustData(&cx, tlbHeader.CustomDataOffset, &pTypeLibImpl->pCustData);
|
||||
}
|
||||
|
||||
/* fill in typedescriptions */
|
||||
/* fill in type descriptions */
|
||||
if(tlbSegDir.pTypdescTab.length > 0)
|
||||
{
|
||||
int i, j, cTD = tlbSegDir.pTypdescTab.length / (2*sizeof(INT));
|
||||
|
@ -2952,7 +3101,6 @@ static void SLTG_DoVars(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, unsign
|
|||
SLTG_Variable *pItem;
|
||||
unsigned short i;
|
||||
WORD *pType;
|
||||
char buf[300];
|
||||
|
||||
for(pItem = (SLTG_Variable *)pFirstItem, i = 0; i < cVars;
|
||||
pItem = (SLTG_Variable *)(pBlk + pItem->next), i++) {
|
||||
|
@ -2972,9 +3120,21 @@ static void SLTG_DoVars(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, unsign
|
|||
else
|
||||
(*ppVarDesc)->Name = TLB_MultiByteToBSTR(pItem->name + pNameTable);
|
||||
|
||||
TRACE_(typelib)("name: %s\n", debugstr_w((*ppVarDesc)->Name));
|
||||
TRACE_(typelib)("byte_offs = 0x%x\n", pItem->byte_offs);
|
||||
TRACE_(typelib)("memid = 0x%x\n", pItem->memid);
|
||||
|
||||
if(pItem->flags & 0x02)
|
||||
pType = &pItem->type;
|
||||
else
|
||||
pType = (WORD*)(pBlk + pItem->type);
|
||||
|
||||
if (pItem->flags & ~0xda)
|
||||
FIXME_(typelib)("unhandled flags = %02x\n", pItem->flags & ~0xda);
|
||||
|
||||
SLTG_DoElem(pType, pBlk,
|
||||
&(*ppVarDesc)->vardesc.elemdescVar, ref_lookup);
|
||||
|
||||
if (pItem->flags & 0x40) {
|
||||
TRACE_(typelib)("VAR_DISPATCH\n");
|
||||
(*ppVarDesc)->vardesc.varkind = VAR_DISPATCH;
|
||||
|
@ -2985,8 +3145,34 @@ static void SLTG_DoVars(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, unsign
|
|||
(*ppVarDesc)->vardesc.u.lpvarValue = HeapAlloc(GetProcessHeap(), 0,
|
||||
sizeof(VARIANT));
|
||||
V_VT((*ppVarDesc)->vardesc.u.lpvarValue) = VT_INT;
|
||||
V_UNION((*ppVarDesc)->vardesc.u.lpvarValue, intVal) =
|
||||
*(INT*)(pBlk + pItem->byte_offs);
|
||||
if (pItem->flags & 0x08)
|
||||
V_UNION((*ppVarDesc)->vardesc.u.lpvarValue, intVal) = pItem->byte_offs;
|
||||
else {
|
||||
switch ((*ppVarDesc)->vardesc.elemdescVar.tdesc.vt)
|
||||
{
|
||||
case VT_LPSTR:
|
||||
case VT_LPWSTR:
|
||||
case VT_BSTR:
|
||||
{
|
||||
WORD len = *(WORD *)(pBlk + pItem->byte_offs);
|
||||
INT alloc_len = MultiByteToWideChar(CP_ACP, 0, pBlk + pItem->byte_offs + 2, len, NULL, 0);
|
||||
BSTR str = SysAllocStringLen(NULL, alloc_len);
|
||||
MultiByteToWideChar(CP_ACP, 0, pBlk + pItem->byte_offs + 2, len, str, alloc_len);
|
||||
V_VT((*ppVarDesc)->vardesc.u.lpvarValue) = VT_BSTR;
|
||||
V_BSTR((*ppVarDesc)->vardesc.u.lpvarValue) = str;
|
||||
break;
|
||||
}
|
||||
case VT_I2:
|
||||
case VT_UI2:
|
||||
case VT_I4:
|
||||
case VT_UI4:
|
||||
V_UNION((*ppVarDesc)->vardesc.u.lpvarValue, intVal) =
|
||||
*(INT*)(pBlk + pItem->byte_offs);
|
||||
break;
|
||||
default:
|
||||
FIXME("VAR_CONST unimplemented for type %d\n", (*ppVarDesc)->vardesc.elemdescVar.tdesc.vt);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
TRACE_(typelib)("VAR_PERINSTANCE\n");
|
||||
|
@ -3000,18 +3186,11 @@ static void SLTG_DoVars(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, unsign
|
|||
if (pItem->flags & 0x80)
|
||||
(*ppVarDesc)->vardesc.wVarFlags |= VARFLAG_FREADONLY;
|
||||
|
||||
if(pItem->flags & 0x02)
|
||||
pType = &pItem->type;
|
||||
else
|
||||
pType = (WORD*)(pBlk + pItem->type);
|
||||
|
||||
if (pItem->flags & ~0xd2)
|
||||
FIXME_(typelib)("unhandled flags = %02x\n", pItem->flags & ~0xd2);
|
||||
|
||||
SLTG_DoElem(pType, pBlk,
|
||||
&(*ppVarDesc)->vardesc.elemdescVar, ref_lookup);
|
||||
|
||||
dump_TypeDesc(&(*ppVarDesc)->vardesc.elemdescVar.tdesc, buf);
|
||||
if (TRACE_ON(typelib)) {
|
||||
char buf[300];
|
||||
dump_TypeDesc(&(*ppVarDesc)->vardesc.elemdescVar.tdesc, buf);
|
||||
TRACE_(typelib)("elemdescVar: %s\n", buf);
|
||||
}
|
||||
|
||||
bstrPrevName = (*ppVarDesc)->Name;
|
||||
ppVarDesc = &((*ppVarDesc)->next);
|
||||
|
@ -3136,7 +3315,7 @@ static void SLTG_ProcessCoClass(char *pBlk, ITypeInfoImpl *pTI,
|
|||
char *pNameTable, SLTG_TypeInfoHeader *pTIHeader,
|
||||
SLTG_TypeInfoTail *pTITail)
|
||||
{
|
||||
char *pFirstItem, *pNextItem;
|
||||
char *pFirstItem;
|
||||
sltg_ref_lookup_t *ref_lookup = NULL;
|
||||
|
||||
if(pTIHeader->href_table != 0xffffffff) {
|
||||
|
@ -3144,10 +3323,10 @@ static void SLTG_ProcessCoClass(char *pBlk, ITypeInfoImpl *pTI,
|
|||
pNameTable);
|
||||
}
|
||||
|
||||
pFirstItem = pNextItem = pBlk;
|
||||
pFirstItem = pBlk;
|
||||
|
||||
if(*(WORD*)pFirstItem == SLTG_IMPL_MAGIC) {
|
||||
pNextItem = SLTG_DoImpls(pFirstItem, pTI, FALSE, ref_lookup);
|
||||
SLTG_DoImpls(pFirstItem, pTI, FALSE, ref_lookup);
|
||||
}
|
||||
HeapFree(GetProcessHeap(), 0, ref_lookup);
|
||||
}
|
||||
|
@ -3157,7 +3336,7 @@ static void SLTG_ProcessInterface(char *pBlk, ITypeInfoImpl *pTI,
|
|||
char *pNameTable, SLTG_TypeInfoHeader *pTIHeader,
|
||||
const SLTG_TypeInfoTail *pTITail)
|
||||
{
|
||||
char *pFirstItem, *pNextItem;
|
||||
char *pFirstItem;
|
||||
sltg_ref_lookup_t *ref_lookup = NULL;
|
||||
|
||||
if(pTIHeader->href_table != 0xffffffff) {
|
||||
|
@ -3165,10 +3344,10 @@ static void SLTG_ProcessInterface(char *pBlk, ITypeInfoImpl *pTI,
|
|||
pNameTable);
|
||||
}
|
||||
|
||||
pFirstItem = pNextItem = pBlk;
|
||||
pFirstItem = pBlk;
|
||||
|
||||
if(*(WORD*)pFirstItem == SLTG_IMPL_MAGIC) {
|
||||
pNextItem = SLTG_DoImpls(pFirstItem, pTI, TRUE, ref_lookup);
|
||||
SLTG_DoImpls(pFirstItem, pTI, TRUE, ref_lookup);
|
||||
}
|
||||
|
||||
if (pTITail->funcs_off != 0xffff)
|
||||
|
@ -3229,7 +3408,7 @@ static void SLTG_ProcessDispatch(char *pBlk, ITypeInfoImpl *pTI,
|
|||
SLTG_DoFuncs(pBlk, pBlk + pTITail->funcs_off, pTI, pTITail->cFuncs, pNameTable, ref_lookup);
|
||||
|
||||
/* this is necessary to cope with MSFT typelibs that set cFuncs to the number
|
||||
* of dispinterface functons including the IDispatch ones, so
|
||||
* of dispinterface functions including the IDispatch ones, so
|
||||
* ITypeInfo::GetFuncDesc takes the real value for cFuncs from cbSizeVft */
|
||||
pTI->TypeAttr.cbSizeVft = pTI->TypeAttr.cFuncs * sizeof(void *);
|
||||
|
||||
|
@ -3477,8 +3656,7 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength)
|
|||
pOtherTypeInfoBlks[i].name_offs +
|
||||
pNameTable);
|
||||
(*ppTypeInfoImpl)->dwHelpContext = pOtherTypeInfoBlks[i].helpcontext;
|
||||
memcpy(&((*ppTypeInfoImpl)->TypeAttr.guid), &pOtherTypeInfoBlks[i].uuid,
|
||||
sizeof(GUID));
|
||||
(*ppTypeInfoImpl)->TypeAttr.guid = pOtherTypeInfoBlks[i].uuid;
|
||||
(*ppTypeInfoImpl)->TypeAttr.typekind = pTIHeader->typekind;
|
||||
(*ppTypeInfoImpl)->TypeAttr.wMajorVerNum = pTIHeader->major_version;
|
||||
(*ppTypeInfoImpl)->TypeAttr.wMinorVerNum = pTIHeader->minor_version;
|
||||
|
@ -3849,7 +4027,7 @@ static HRESULT WINAPI ITypeLib2_fnGetLibAttr(
|
|||
ITypeLibImpl *This = (ITypeLibImpl *)iface;
|
||||
TRACE("(%p)\n",This);
|
||||
*ppTLibAttr = HeapAlloc(GetProcessHeap(), 0, sizeof(**ppTLibAttr));
|
||||
memcpy(*ppTLibAttr, &This->LibAttr, sizeof(**ppTLibAttr));
|
||||
**ppTLibAttr = This->LibAttr;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -4589,7 +4767,7 @@ static HRESULT WINAPI ITypeInfo_fnGetTypeAttr( ITypeInfo2 *iface,
|
|||
if (!*ppTypeAttr)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
memcpy(*ppTypeAttr, &This->TypeAttr, sizeof(**ppTypeAttr));
|
||||
**ppTypeAttr = This->TypeAttr;
|
||||
|
||||
if (This->TypeAttr.typekind == TKIND_ALIAS)
|
||||
TLB_CopyTypeDesc(&(*ppTypeAttr)->tdescAlias,
|
||||
|
@ -4632,14 +4810,14 @@ static SIZE_T TLB_SizeElemDesc( const ELEMDESC *elemdesc )
|
|||
|
||||
static HRESULT TLB_CopyElemDesc( const ELEMDESC *src, ELEMDESC *dest, char **buffer )
|
||||
{
|
||||
memcpy(dest, src, sizeof(ELEMDESC));
|
||||
*dest = *src;
|
||||
*buffer = TLB_CopyTypeDesc(&dest->tdesc, &src->tdesc, *buffer);
|
||||
if (src->u.paramdesc.wParamFlags & PARAMFLAG_FHASDEFAULT)
|
||||
{
|
||||
const PARAMDESCEX *pparamdescex_src = src->u.paramdesc.pparamdescex;
|
||||
PARAMDESCEX *pparamdescex_dest = dest->u.paramdesc.pparamdescex = (PARAMDESCEX *)*buffer;
|
||||
*buffer += sizeof(PARAMDESCEX);
|
||||
memcpy(pparamdescex_dest, pparamdescex_src, sizeof(PARAMDESCEX));
|
||||
*pparamdescex_dest = *pparamdescex_src;
|
||||
VariantInit(&pparamdescex_dest->varDefaultValue);
|
||||
return VariantCopy(&pparamdescex_dest->varDefaultValue,
|
||||
(VARIANTARG *)&pparamdescex_src->varDefaultValue);
|
||||
|
@ -4674,7 +4852,7 @@ static HRESULT TLB_AllocAndInitFuncDesc( const FUNCDESC *src, FUNCDESC **dest_pt
|
|||
dest = (FUNCDESC *)SysAllocStringByteLen(NULL, size);
|
||||
if (!dest) return E_OUTOFMEMORY;
|
||||
|
||||
memcpy(dest, src, sizeof(FUNCDESC));
|
||||
*dest = *src;
|
||||
if (dispinterface) /* overwrite funckind */
|
||||
dest->funckind = FUNC_DISPATCH;
|
||||
buffer = (char *)(dest + 1);
|
||||
|
@ -5433,7 +5611,7 @@ static HRESULT typedescvt_to_variantvt(ITypeInfo *tinfo, const TYPEDESC *tdesc,
|
|||
/***********************************************************************
|
||||
* DispCallFunc (OLEAUT32.@)
|
||||
*
|
||||
* Invokes a function of the specifed calling convention, passing the
|
||||
* Invokes a function of the specified calling convention, passing the
|
||||
* specified arguments and returns the result.
|
||||
*
|
||||
* PARAMS
|
||||
|
|
|
@ -576,7 +576,7 @@ typedef struct {
|
|||
BYTE flags;
|
||||
WORD next;
|
||||
WORD name;
|
||||
WORD byte_offs; /* pos in struct, or offset to const type */
|
||||
WORD byte_offs; /* pos in struct, or offset to const type or const data (if flags & 0x08) */
|
||||
WORD type; /* if flags & 0x02 this is the type, else offset to type */
|
||||
DWORD memid;
|
||||
WORD helpcontext; /* ?? */
|
||||
|
|
|
@ -214,8 +214,7 @@ static void ctl2_init_header(
|
|||
This->typelib_header.magic1 = 0x5446534d;
|
||||
This->typelib_header.magic2 = 0x00010002;
|
||||
This->typelib_header.posguid = -1;
|
||||
This->typelib_header.lcid = 0x0409; /* or do we use the current one? */
|
||||
This->typelib_header.lcid2 = 0x0409;
|
||||
This->typelib_header.lcid = This->typelib_header.lcid2 = GetUserDefaultLCID();
|
||||
This->typelib_header.varflags = 0x40;
|
||||
This->typelib_header.version = 0;
|
||||
This->typelib_header.flags = 0;
|
||||
|
@ -1276,6 +1275,8 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetDocString(
|
|||
int offset;
|
||||
|
||||
TRACE("(%p,%s)\n", iface, debugstr_w(pStrDoc));
|
||||
if (!pStrDoc)
|
||||
return E_INVALIDARG;
|
||||
|
||||
offset = ctl2_alloc_string(This->typelib, pStrDoc);
|
||||
if (offset == -1) return E_OUTOFMEMORY;
|
||||
|
@ -3155,6 +3156,8 @@ static HRESULT WINAPI ICreateTypeLib2_fnSetDocString(ICreateTypeLib2 * iface, LP
|
|||
int offset;
|
||||
|
||||
TRACE("(%p,%s)\n", iface, debugstr_w(szDoc));
|
||||
if (!szDoc)
|
||||
return E_INVALIDARG;
|
||||
|
||||
offset = ctl2_alloc_string(This, szDoc);
|
||||
if (offset == -1) return E_OUTOFMEMORY;
|
||||
|
@ -3189,8 +3192,11 @@ static HRESULT WINAPI ICreateTypeLib2_fnSetHelpFileName(ICreateTypeLib2 * iface,
|
|||
*/
|
||||
static HRESULT WINAPI ICreateTypeLib2_fnSetHelpContext(ICreateTypeLib2 * iface, DWORD dwHelpContext)
|
||||
{
|
||||
FIXME("(%p,%d), stub!\n", iface, dwHelpContext);
|
||||
return E_OUTOFMEMORY;
|
||||
ICreateTypeLib2Impl *This = (ICreateTypeLib2Impl *)iface;
|
||||
|
||||
TRACE("(%p,%d)\n", iface, dwHelpContext);
|
||||
This->typelib_header.helpcontext = dwHelpContext;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -3204,7 +3210,7 @@ static HRESULT WINAPI ICreateTypeLib2_fnSetLcid(ICreateTypeLib2 * iface, LCID lc
|
|||
|
||||
TRACE("(%p,%d)\n", iface, lcid);
|
||||
|
||||
This->typelib_header.lcid2 = lcid;
|
||||
This->typelib_header.lcid = This->typelib_header.lcid2 = lcid;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
@ -404,7 +404,7 @@ DGifGetImageDesc(GifFileType * GifFile) {
|
|||
}
|
||||
|
||||
sp = &GifFile->SavedImages[GifFile->ImageCount];
|
||||
memcpy(&sp->ImageDesc, &GifFile->Image, sizeof(GifImageDesc));
|
||||
sp->ImageDesc = GifFile->Image;
|
||||
if (GifFile->Image.ColorMap != NULL) {
|
||||
sp->ImageDesc.ColorMap = MakeMapObject(
|
||||
GifFile->Image.ColorMap->ColorCount,
|
||||
|
@ -616,7 +616,7 @@ DGifDecompressLine(GifFileType * GifFile,
|
|||
LastCode = Private->LastCode;
|
||||
|
||||
if (StackPtr != 0) {
|
||||
/* Let pop the stack off before continueing to read the gif file: */
|
||||
/* Let pop the stack off before continuing to read the gif file: */
|
||||
while (StackPtr != 0 && i < LineLen)
|
||||
Line[i++] = Stack[--StackPtr];
|
||||
}
|
||||
|
@ -626,7 +626,7 @@ DGifDecompressLine(GifFileType * GifFile,
|
|||
return GIF_ERROR;
|
||||
|
||||
if (CrntCode == EOFCode) {
|
||||
/* Note however that usually we will not be here as we will stop
|
||||
/* Note, however, that usually we will not be here as we will stop
|
||||
* decoding as soon as we got all the pixel, or EOF code will
|
||||
* not be read at all, and DGifGetLine/Pixel clean everything. */
|
||||
if (i != LineLen - 1 || Private->PixelCount != 0) {
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
* History:
|
||||
* 14 Jun 89 - Version 1.0 by Gershon Elber.
|
||||
* 3 Sep 90 - Version 1.1 by Gershon Elber (Support for Gif89, Unique names)
|
||||
* 15 Sep 90 - Version 2.0 by Eric S. Raymond (Changes to suoport GIF slurp)
|
||||
* 15 Sep 90 - Version 2.0 by Eric S. Raymond (Changes to support GIF slurp)
|
||||
* 26 Jun 96 - Version 3.0 by Eric S. Raymond (Full GIF89 support)
|
||||
* 17 Dec 98 - Version 4.0 by Toshio Kuratomi (Fix extension writing code)
|
||||
*****************************************************************************/
|
||||
|
|
|
@ -151,7 +151,7 @@ static const WCHAR szPercentZeroStar_d[] = { '%','0','*','d','\0' };
|
|||
* Common format definitions
|
||||
*/
|
||||
|
||||
/* Fomat types */
|
||||
/* Format types */
|
||||
#define FMT_TYPE_UNKNOWN 0x0
|
||||
#define FMT_TYPE_GENERAL 0x1
|
||||
#define FMT_TYPE_NUMBER 0x2
|
||||
|
@ -284,7 +284,7 @@ typedef struct tagFMT_DATE_HEADER
|
|||
#define FMT_STR_COPY_SPACE 0x40 /* Copy len chars with space if no char */
|
||||
#define FMT_STR_COPY_SKIP 0x41 /* Copy len chars or skip if no char */
|
||||
/* Wine additions */
|
||||
#define FMT_WINE_HOURS_12 0x81 /* Hours using 12 hour clockhourCopy len chars or skip if no char */
|
||||
#define FMT_WINE_HOURS_12 0x81 /* Hours using 12 hour clock */
|
||||
|
||||
/* Named Formats and their tokenised values */
|
||||
static const WCHAR szGeneralDate[] = { 'G','e','n','e','r','a','l',' ','D','a','t','e','\0' };
|
||||
|
@ -522,7 +522,6 @@ HRESULT WINAPI VarTokenizeFormatString(LPOLESTR lpszFormat, LPBYTE rgbTok,
|
|||
FMT_HEADER *header = (FMT_HEADER*)rgbTok;
|
||||
FMT_STRING_HEADER *str_header = (FMT_STRING_HEADER*)(rgbTok + sizeof(FMT_HEADER));
|
||||
FMT_NUMBER_HEADER *num_header = (FMT_NUMBER_HEADER*)str_header;
|
||||
FMT_DATE_HEADER *date_header = (FMT_DATE_HEADER*)str_header;
|
||||
BYTE* pOut = rgbTok + sizeof(FMT_HEADER) + sizeof(FMT_STRING_HEADER);
|
||||
BYTE* pLastHours = NULL;
|
||||
BYTE fmt_number = 0;
|
||||
|
@ -591,7 +590,6 @@ HRESULT WINAPI VarTokenizeFormatString(LPOLESTR lpszFormat, LPBYTE rgbTok,
|
|||
header->starts[fmt_number] = pOut - rgbTok;
|
||||
str_header = (FMT_STRING_HEADER*)pOut;
|
||||
num_header = (FMT_NUMBER_HEADER*)pOut;
|
||||
date_header = (FMT_DATE_HEADER*)pOut;
|
||||
memset(str_header, 0, sizeof(FMT_STRING_HEADER));
|
||||
pOut += sizeof(FMT_STRING_HEADER);
|
||||
fmt_state = 0;
|
||||
|
@ -1465,7 +1463,8 @@ VARIANT_FormatNumber_Bool:
|
|||
while (count-- > 0)
|
||||
*pBuff++ = '0';
|
||||
}
|
||||
if (*pToken == FMT_NUM_COPY_ZERO || have_int > 1 || *prgbDig > 0)
|
||||
if (*pToken == FMT_NUM_COPY_ZERO || have_int > 1 ||
|
||||
(have_int > 0 && *prgbDig > 0))
|
||||
{
|
||||
dwState |= NUM_WRITE_ON;
|
||||
count = min(count_max, have_int);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Copyright 2005 Daniel Remenak
|
||||
* Copyright 2006 Google (Benjamin Arai)
|
||||
*
|
||||
* The alorithm for conversion from Julian days to day/month/year is based on
|
||||
* The algorithm for conversion from Julian days to day/month/year is based on
|
||||
* that devised by Henry Fliegel, as implemented in PostgreSQL, which is
|
||||
* Copyright 1994-7 Regents of the University of California
|
||||
*
|
||||
|
@ -1108,7 +1108,7 @@ static HRESULT VARIANT_RollUdate(UDATE *lpUd)
|
|||
{
|
||||
lpUd->st.wMonth--; /* Previous month */
|
||||
if (lpUd->st.wMonth == 2 && IsLeapYear(lpUd->st.wYear))
|
||||
lpUd->st.wDay = 29; /* Februaury has 29 days on leap years */
|
||||
lpUd->st.wDay = 29; /* February has 29 days on leap years */
|
||||
else
|
||||
lpUd->st.wDay = days[lpUd->st.wMonth]; /* Last day of the month */
|
||||
}
|
||||
|
@ -1119,7 +1119,7 @@ static HRESULT VARIANT_RollUdate(UDATE *lpUd)
|
|||
|
||||
/* Possibly need to roll the date forward */
|
||||
if (lpUd->st.wMonth == 2 && IsLeapYear(lpUd->st.wYear))
|
||||
rollForward = lpUd->st.wDay - 29; /* Februaury has 29 days on leap years */
|
||||
rollForward = lpUd->st.wDay - 29; /* February has 29 days on leap years */
|
||||
else
|
||||
rollForward = lpUd->st.wDay - days[lpUd->st.wMonth];
|
||||
|
||||
|
@ -1254,7 +1254,7 @@ INT WINAPI SystemTimeToVariantTime(LPSYSTEMTIME lpSt, double *pDateOut)
|
|||
if (lpSt->wMonth > 12)
|
||||
return FALSE;
|
||||
|
||||
memcpy(&ud.st, lpSt, sizeof(ud.st));
|
||||
ud.st = *lpSt;
|
||||
return !VarDateFromUdate(&ud, 0, pDateOut);
|
||||
}
|
||||
|
||||
|
@ -1280,7 +1280,7 @@ INT WINAPI VariantTimeToSystemTime(double dateIn, LPSYSTEMTIME lpSt)
|
|||
if (FAILED(VarUdateFromDate(dateIn, 0, &ud)))
|
||||
return FALSE;
|
||||
|
||||
memcpy(lpSt, &ud.st, sizeof(ud.st));
|
||||
*lpSt = ud.st;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -1312,8 +1312,8 @@ HRESULT WINAPI VarDateFromUdateEx(UDATE *pUdateIn, LCID lcid, ULONG dwFlags, DAT
|
|||
|
||||
if (lcid != MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT))
|
||||
FIXME("lcid possibly not handled, treating as en-us\n");
|
||||
|
||||
memcpy(&ud, pUdateIn, sizeof(ud));
|
||||
|
||||
ud = *pUdateIn;
|
||||
|
||||
if (dwFlags & VAR_VALIDDATE)
|
||||
WARN("Ignoring VAR_VALIDDATE\n");
|
||||
|
@ -1468,9 +1468,25 @@ HRESULT WINAPI VarUdateFromDate(DATE dateIn, ULONG dwFlags, UDATE *lpUdate)
|
|||
static void VARIANT_GetLocalisedNumberChars(VARIANT_NUMBER_CHARS *lpChars, LCID lcid, DWORD dwFlags)
|
||||
{
|
||||
static const VARIANT_NUMBER_CHARS defaultChars = { '-','+','.',',','$',0,'.',',' };
|
||||
static CRITICAL_SECTION csLastChars = { NULL, -1, 0, 0, 0, 0 };
|
||||
static VARIANT_NUMBER_CHARS lastChars;
|
||||
static LCID lastLcid = -1;
|
||||
static DWORD lastFlags = 0;
|
||||
LCTYPE lctype = dwFlags & LOCALE_NOUSEROVERRIDE;
|
||||
WCHAR buff[4];
|
||||
|
||||
/* To make caching thread-safe, a critical section is needed */
|
||||
EnterCriticalSection(&csLastChars);
|
||||
|
||||
/* Asking for default locale entries is very expensive: It is a registry
|
||||
server call. So cache one locally, as Microsoft does it too */
|
||||
if(lcid == lastLcid && dwFlags == lastFlags)
|
||||
{
|
||||
memcpy(lpChars, &lastChars, sizeof(defaultChars));
|
||||
LeaveCriticalSection(&csLastChars);
|
||||
return;
|
||||
}
|
||||
|
||||
memcpy(lpChars, &defaultChars, sizeof(defaultChars));
|
||||
GET_NUMBER_TEXT(LOCALE_SNEGATIVESIGN, cNegativeSymbol);
|
||||
GET_NUMBER_TEXT(LOCALE_SPOSITIVESIGN, cPositiveSymbol);
|
||||
|
@ -1490,6 +1506,11 @@ static void VARIANT_GetLocalisedNumberChars(VARIANT_NUMBER_CHARS *lpChars, LCID
|
|||
}
|
||||
TRACE("lcid 0x%x, cCurrencyLocal =%d,%d '%c','%c'\n", lcid, lpChars->cCurrencyLocal,
|
||||
lpChars->cCurrencyLocal2, lpChars->cCurrencyLocal, lpChars->cCurrencyLocal2);
|
||||
|
||||
memcpy(&lastChars, lpChars, sizeof(defaultChars));
|
||||
lastLcid = lcid;
|
||||
lastFlags = dwFlags;
|
||||
LeaveCriticalSection(&csLastChars);
|
||||
}
|
||||
|
||||
/* Number Parsing States */
|
||||
|
@ -1915,7 +1936,7 @@ HRESULT WINAPI VarParseNumFromStr(OLECHAR *lpszStr, LCID lcid, ULONG dwFlags,
|
|||
* NOTES
|
||||
* - The smallest favoured type present in dwVtBits that can represent the
|
||||
* number in pNumprs without losing precision is used.
|
||||
* - Signed types are preferrred over unsigned types of the same size.
|
||||
* - Signed types are preferred over unsigned types of the same size.
|
||||
* - Preferred types in order are: integer, float, double, currency then decimal.
|
||||
* - Rounding (dropping of decimal points) occurs without error. See VarI8FromR8()
|
||||
* for details of the rounding method.
|
||||
|
@ -1924,7 +1945,7 @@ HRESULT WINAPI VarParseNumFromStr(OLECHAR *lpszStr, LCID lcid, ULONG dwFlags,
|
|||
* design?): If some other VTBIT's for integers are specified together
|
||||
* with VTBIT_I8 and the number will fit only in a VT_I8 Windows will "cast"
|
||||
* the number to the smallest requested integer truncating this way the
|
||||
* number. Wine dosn't implement this "feature" (yet?).
|
||||
* number. Wine doesn't implement this "feature" (yet?).
|
||||
*/
|
||||
HRESULT WINAPI VarNumFromParseNum(NUMPARSE *pNumprs, BYTE *rgbDig,
|
||||
ULONG dwVtBits, VARIANT *pVarDst)
|
||||
|
@ -2517,7 +2538,7 @@ HRESULT WINAPI VarCat(LPVARIANT left, LPVARIANT right, LPVARIANT out)
|
|||
else
|
||||
hres = DISP_E_BADVARTYPE;
|
||||
|
||||
/* if resutl type is not S_OK, then no need to go further */
|
||||
/* if result type is not S_OK, then no need to go further */
|
||||
if (hres != S_OK)
|
||||
{
|
||||
V_VT(out) = resultvt;
|
||||
|
@ -2666,8 +2687,8 @@ static HRESULT _VarChangeTypeExWrap (VARIANTARG* pvargDest,
|
|||
* Failure: An HRESULT error code indicating the error.
|
||||
*
|
||||
* NOTES
|
||||
* Native VarCmp up to and including WinXP dosn't like as input variants
|
||||
* I1, UI2, VT_UI4, UI8 and UINT. INT is accepted only as left variant.
|
||||
* Native VarCmp up to and including WinXP doesn't like I1, UI2, VT_UI4,
|
||||
* UI8 and UINT as input variants. INT is accepted only as left variant.
|
||||
*
|
||||
* If both input variants are ERROR then VARCMP_EQ will be returned, else
|
||||
* an ERROR variant will trigger an error.
|
||||
|
@ -3115,10 +3136,10 @@ VarAnd_Exit:
|
|||
* Failure: An HRESULT error code indicating the error.
|
||||
*
|
||||
* NOTES
|
||||
* Native VarAdd up to and including WinXP dosn't like as input variants
|
||||
* I1, UI2, UI4, UI8, INT and UINT.
|
||||
* Native VarAdd up to and including WinXP doesn't like I1, UI2, UI4,
|
||||
* UI8, INT and UINT as input variants.
|
||||
*
|
||||
* Native VarAdd dosn't check for NULL in/out pointers and crashes. We do the
|
||||
* Native VarAdd doesn't check for NULL in/out pointers and crashes. We do the
|
||||
* same here.
|
||||
*
|
||||
* FIXME
|
||||
|
@ -3330,10 +3351,10 @@ end:
|
|||
* Failure: An HRESULT error code indicating the error.
|
||||
*
|
||||
* NOTES
|
||||
* Native VarMul up to and including WinXP dosn't like as input variants
|
||||
* I1, UI2, UI4, UI8, INT and UINT. But it can multiply apples with oranges.
|
||||
* Native VarMul up to and including WinXP doesn't like I1, UI2, UI4,
|
||||
* UI8, INT and UINT as input variants. But it can multiply apples with oranges.
|
||||
*
|
||||
* Native VarMul dosn't check for NULL in/out pointers and crashes. We do the
|
||||
* Native VarMul doesn't check for NULL in/out pointers and crashes. We do the
|
||||
* same here.
|
||||
*
|
||||
* FIXME
|
||||
|
|
|
@ -5311,7 +5311,7 @@ static HRESULT VARIANT_DI_normalize(VARIANT_DI * val, int exponent2, int isDoubl
|
|||
VARIANT_int_add(val->bitsnum, 3, &x, 1);
|
||||
}
|
||||
}
|
||||
/* This step is requierd in order to remove excess bits of precision from the
|
||||
/* This step is required in order to remove excess bits of precision from the
|
||||
end of the bit representation, down to the precision guaranteed by the
|
||||
floating point number. */
|
||||
if (isDouble) {
|
||||
|
@ -6529,7 +6529,7 @@ HRESULT WINAPI VarBstrFromCy(CY cyIn, LCID lcid, ULONG dwFlags, BSTR *pbstrOut)
|
|||
*pbstrOut = SysAllocString(cybuff);
|
||||
}
|
||||
else
|
||||
*pbstrOut = SysAllocString(buff);
|
||||
*pbstrOut = VARIANT_BstrReplaceDecimal(buff,lcid,dwFlags);
|
||||
|
||||
return *pbstrOut ? S_OK : E_OUTOFMEMORY;
|
||||
}
|
||||
|
@ -7348,7 +7348,7 @@ VARIANT_MakeDate_OK:
|
|||
*
|
||||
* RETURNS
|
||||
* Success: S_OK. pdateOut contains the converted value.
|
||||
* FAILURE: An HRESULT error code indicating the prolem.
|
||||
* FAILURE: An HRESULT error code indicating the problem.
|
||||
*
|
||||
* NOTES
|
||||
* Any date format that can be created using the date formats from lcid
|
||||
|
|
|
@ -305,7 +305,7 @@ static void UIINSERTOBJECTDLG_SelectCreateNew(InsertObjectDlgInfo* pdlgInfo)
|
|||
*/
|
||||
static void UIINSERTOBJECTDLG_SelectCreateFromFile(InsertObjectDlgInfo* pdlgInfo)
|
||||
{
|
||||
char resstr[MAX_PATH];
|
||||
WCHAR resstr[MAX_PATH];
|
||||
|
||||
ShowWindow(pdlgInfo->hwndAddCtrlBTN, SW_HIDE);
|
||||
ShowWindow(pdlgInfo->hwndObjTypeLBL, SW_HIDE);
|
||||
|
@ -318,10 +318,10 @@ static void UIINSERTOBJECTDLG_SelectCreateFromFile(InsertObjectDlgInfo* pdlgInfo
|
|||
ShowWindow(pdlgInfo->hwndFileTB, SW_SHOW);
|
||||
ShowWindow(pdlgInfo->hwndBrowseBTN, SW_SHOW);
|
||||
|
||||
SendMessageA(pdlgInfo->hwndCreateFromFileCB, BM_SETCHECK, BST_CHECKED, 0);
|
||||
SendMessageW(pdlgInfo->hwndCreateFromFileCB, BM_SETCHECK, BST_CHECKED, 0);
|
||||
|
||||
if (LoadStringA(OLEDLG_hInstance, IDS_RESULTFILEOBJDESC, resstr, MAX_PATH))
|
||||
SendMessageA(pdlgInfo->hwndResultDesc, WM_SETTEXT, 0, (LPARAM)resstr);
|
||||
if (LoadStringW(OLEDLG_hInstance, IDS_RESULTFILEOBJDESC, resstr, MAX_PATH))
|
||||
SendMessageW(pdlgInfo->hwndResultDesc, WM_SETTEXT, 0, (LPARAM)resstr);
|
||||
}
|
||||
|
||||
|
||||
|
@ -377,7 +377,7 @@ static BOOL UIINSERTOBJECTDLG_PopulateObjectTypes(InsertObjectDlgInfo* pdlgInfo)
|
|||
if (ERROR_SUCCESS == RegQueryValueW(hkey, NULL, keydesc, &len))
|
||||
{
|
||||
CLSID* lpclsid = HeapAlloc(GetProcessHeap(), 0, sizeof(CLSID));
|
||||
memcpy(lpclsid, &clsid, sizeof(CLSID));
|
||||
*lpclsid = clsid;
|
||||
|
||||
len = SendMessageW(pdlgInfo->hwndObjTypeLB, LB_ADDSTRING, 0, (LPARAM)keydesc);
|
||||
SendMessageW(pdlgInfo->hwndObjTypeLB, LB_SETITEMDATA, (WPARAM)len, (LPARAM)lpclsid);
|
||||
|
@ -418,20 +418,20 @@ static void UIINSERTOBJECTDLG_FreeObjectTypes(InsertObjectDlgInfo* pdlgInfo)
|
|||
static void UIINSERTOBJECTDLG_SelChange(InsertObjectDlgInfo* pdlgInfo)
|
||||
{
|
||||
INT index;
|
||||
CHAR objname[MAX_PATH];
|
||||
CHAR objdesc[MAX_PATH];
|
||||
CHAR resstr[MAX_PATH];
|
||||
WCHAR objname[MAX_PATH];
|
||||
WCHAR objdesc[MAX_PATH];
|
||||
WCHAR resstr[MAX_PATH];
|
||||
|
||||
TRACE("\n");
|
||||
|
||||
if (LoadStringA(OLEDLG_hInstance, IDS_RESULTOBJDESC, resstr, MAX_PATH) &&
|
||||
((index = SendMessageA(pdlgInfo->hwndObjTypeLB, LB_GETCURSEL, 0, 0)) >= 0) &&
|
||||
SendMessageA(pdlgInfo->hwndObjTypeLB, LB_GETTEXT, (WPARAM)index, (LPARAM)objname))
|
||||
sprintf(objdesc, resstr, objname);
|
||||
if (LoadStringW(OLEDLG_hInstance, IDS_RESULTOBJDESC, resstr, MAX_PATH) &&
|
||||
((index = SendMessageW(pdlgInfo->hwndObjTypeLB, LB_GETCURSEL, 0, 0)) >= 0) &&
|
||||
SendMessageW(pdlgInfo->hwndObjTypeLB, LB_GETTEXT, (WPARAM)index, (LPARAM)objname))
|
||||
wsprintfW(objdesc, resstr, objname);
|
||||
else
|
||||
objdesc[0] = 0;
|
||||
|
||||
SendMessageA(pdlgInfo->hwndResultDesc, WM_SETTEXT, 0, (LPARAM)objdesc);
|
||||
SendMessageW(pdlgInfo->hwndResultDesc, WM_SETTEXT, 0, (LPARAM)objdesc);
|
||||
}
|
||||
|
||||
|
||||
|
@ -453,7 +453,7 @@ static BOOL UIINSERTOBJECTDLG_OnOpen(InsertObjectDlgInfo* pdlgInfo)
|
|||
{
|
||||
CLSID* clsid = (CLSID*) SendMessageA(pdlgInfo->hwndObjTypeLB,
|
||||
LB_GETITEMDATA, (WPARAM)index, 0);
|
||||
memcpy(&pdlgInfo->lpOleUIInsertObject->clsid, clsid, sizeof(CLSID));
|
||||
pdlgInfo->lpOleUIInsertObject->clsid = *clsid;
|
||||
|
||||
if (pdlgInfo->lpOleUIInsertObject->dwFlags & IOF_CREATENEWOBJECT)
|
||||
{
|
||||
|
@ -615,13 +615,13 @@ static void UIINSERTOBJECTDLG_AddControl(InsertObjectDlgInfo* pdlgInfo)
|
|||
|
||||
if (!bValid)
|
||||
{
|
||||
char title[32];
|
||||
char msg[256];
|
||||
WCHAR title[32];
|
||||
WCHAR msg[256];
|
||||
|
||||
LoadStringA(OLEDLG_hInstance, IDS_NOTOLEMODCAPTION, title, 32);
|
||||
LoadStringA(OLEDLG_hInstance, IDS_NOTOLEMOD, msg, 256);
|
||||
LoadStringW(OLEDLG_hInstance, IDS_NOTOLEMODCAPTION, title, 32);
|
||||
LoadStringW(OLEDLG_hInstance, IDS_NOTOLEMOD, msg, 256);
|
||||
|
||||
MessageBoxA(pdlgInfo->hwndSelf, msg, title, MB_ICONEXCLAMATION);
|
||||
MessageBoxW(pdlgInfo->hwndSelf, msg, title, MB_ICONEXCLAMATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
97
reactos/dll/win32/oledlg/oledlg_Da.rc
Normal file
97
reactos/dll/win32/oledlg/oledlg_Da.rc
Normal file
|
@ -0,0 +1,97 @@
|
|||
/*
|
||||
* Danish language support
|
||||
*
|
||||
* Copyright (C) 2008 Jens Albretsen <jens@albretsen.dk>
|
||||
*
|
||||
* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_DANISH, SUBLANG_DEFAULT
|
||||
|
||||
UIINSERTOBJECT DIALOG DISCARDABLE 0, 0, 294, 151
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Indsæt objekt"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LISTBOX IDC_OBJTYPELIST,82,19,131,66,LBS_SORT |
|
||||
LBS_NOINTEGRALHEIGHT | WS_VISIBLE | WS_VSCROLL |
|
||||
WS_TABSTOP
|
||||
LTEXT "Objekttype:",IDC_OBJTYPELBL,82,7,53,8,WS_VISIBLE
|
||||
DEFPUSHBUTTON "OK",IDOK,221,7,66,14
|
||||
PUSHBUTTON "Annuller",IDCANCEL,221,24,66,14
|
||||
GROUPBOX "Resultat",IDC_RESULT,7,103,208,41
|
||||
CONTROL "Opret ny",IDC_CREATENEW,"Button",BS_AUTORADIOBUTTON |
|
||||
WS_GROUP,7,20,62,10
|
||||
CONTROL "Opret control",IDC_CREATECONTROL,"Button",
|
||||
BS_AUTORADIOBUTTON | NOT WS_VISIBLE,7,54,62,10
|
||||
CONTROL "Opret fra fil",IDC_CREATEFROMFILE,"Button",
|
||||
BS_AUTORADIOBUTTON,7,37,67,10
|
||||
LTEXT "",IDC_RESULTDESC,49,112,159,23
|
||||
PUSHBUTTON "&Tilføj Control...",IDC_ADDCONTROL,81,88,63,14,NOT WS_VISIBLE
|
||||
CONTROL "Vis som ikon",IDC_ASICON,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP | NOT WS_VISIBLE,223,58,64,10
|
||||
PUSHBUTTON "Gennemse...",IDC_BROWSE,83,53,50,14,NOT WS_VISIBLE
|
||||
LTEXT "Fil:",IDC_FILELBL,83,27,20,8, NOT WS_VISIBLE
|
||||
EDITTEXT IDC_FILE,83,37,132,13,ES_AUTOHSCROLL | NOT WS_VISIBLE
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_RESULTOBJDESC "Indsæt nyt %s objekt i dokumentet"
|
||||
IDS_RESULTFILEOBJDESC "Indsæt filens indhold som objekt ind i dokumentet, så du kan aktivere det med programmet som har lavet det."
|
||||
IDS_BROWSE "Gennemse"
|
||||
IDS_NOTOLEMOD "Filen ser ikke ud til at være et gyldig OLE modul. Kunne ikke registrere OLE control'en."
|
||||
IDS_NOTOLEMODCAPTION "Tilføj control"
|
||||
}
|
||||
|
||||
IDD_PASTESPECIAL4 DIALOG DISCARDABLE 3, 15, 293, 140
|
||||
STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Indsæt speciel"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "Kilde:", -1, 6, 9, 30, 8, WS_VISIBLE | WS_GROUP
|
||||
CONTROL "&Indsæt", IDC_PS_PASTE, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_GROUP | WS_VISIBLE,
|
||||
6, 38, 55, 10
|
||||
CONTROL "Indsæt &genvej", IDC_PS_PASTELINK, "Button", BS_AUTORADIOBUTTON | WS_VISIBLE,
|
||||
6, 63, 55, 10
|
||||
LTEXT "&Som:", -1, 65, 25, 16, 8, WS_VISIBLE | WS_GROUP
|
||||
LISTBOX IDC_PS_PASTELIST, 65, 36, 153, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | NOT WS_VISIBLE
|
||||
LISTBOX IDC_PS_PASTELINKLIST, 65, 36, 153, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | NOT WS_VISIBLE
|
||||
LISTBOX IDC_PS_DISPLAYLIST, 65, 36, 153, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | WS_VISIBLE
|
||||
CONTROL "OK", IDOK, "Button", BS_DEFPUSHBUTTON | WS_TABSTOP | WS_GROUP | WS_VISIBLE, 224, 6, 66, 14
|
||||
CONTROL "Annuller", IDCANCEL, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 23, 66, 14
|
||||
CONTROL "&Hjælp", IDC_OLEUIHELP, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 42, 66, 14
|
||||
CONTROL "&Vis som ikon", IDC_PS_DISPLAYASICON, "Button", BS_AUTOCHECKBOX | WS_TABSTOP | WS_VISIBLE, 224, 59, 66, 14
|
||||
CONTROL "", IDC_PS_ICONDISPLAY, "Static", SS_ICON | WS_VISIBLE, 224, 75, 66, 44
|
||||
CONTROL "Ændre &ikon...", IDC_PS_CHANGEICON, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 123, 66, 14
|
||||
CONTROL "", IDC_PS_RESULTIMAGE, "Static", SS_ICON | WS_VISIBLE, 8, 101, 42, 34
|
||||
CONTROL "<< resultatet kommer her >>", IDC_PS_RESULTTEXT, "Static", SS_NOPREFIX | WS_VISIBLE, 54, 100, 159, 35
|
||||
CONTROL "Resultat", -1, "Button", BS_GROUPBOX | WS_GROUP | WS_VISIBLE, 6, 90, 212, 48
|
||||
CONTROL "", IDC_PS_SOURCETEXT, "Edit", ES_READONLY | ES_AUTOHSCROLL | WS_VISIBLE, 37, 9, 180, 8
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_PS_PASTE_DATA "Indsætter indholdet fra klippebordet ind i dokumentet som %s."
|
||||
IDS_PS_PASTE_OBJECT "Indsætter indholdet fra klippebordet ind i dokumentet, så du kan aktivere det med %s."
|
||||
IDS_PS_PASTE_OBJECT_AS_ICON "Indsætter indholdet fra klippebordet ind i dokumentet, så du kan aktivere det med %s. Det vises som et ikon."
|
||||
IDS_PS_PASTE_LINK_DATA "Indsætter indholdet fra klippebordet ind i dokumentet som %s. Den kobles til kildefilen så ændreringer også sker i dokumentet."
|
||||
IDS_PS_PASTE_LINK_OBJECT "Indsætter et billede af klippebordet i dokumentet. Billedet kobles til kildefilen så ændringer også sker i dokumentet ."
|
||||
IDS_PS_PASTE_LINK_OBJECT_AS_ICON "Indsætter en genvej som peger på placeringen af indholdet på klippebordet. Genvejen kobles til kildefilen så ændringer også sker i dokumentet."
|
||||
IDS_PS_NON_OLE "Indsætter indholdet fra klippebordet ind i dokumentet."
|
||||
IDS_PS_UNKNOWN_TYPE "Ukendt type"
|
||||
IDS_PS_UNKNOWN_SRC "Ukendt kilde"
|
||||
IDS_PS_UNKNOWN_APP "programmet der lavede det"
|
||||
}
|
|
@ -33,12 +33,12 @@ BEGIN
|
|||
GROUPBOX "Risultato",IDC_RESULT,7,103,208,41
|
||||
CONTROL "Crea Nuovo",IDC_CREATENEW,"Button",BS_AUTORADIOBUTTON |
|
||||
WS_GROUP,7,20,62,10
|
||||
CONTROL "Crea Controllo",IDC_CREATECONTROL,"Tasto",
|
||||
CONTROL "Crea Controllo",IDC_CREATECONTROL,"Button",
|
||||
BS_AUTORADIOBUTTON | NOT WS_VISIBLE,7,54,62,10
|
||||
CONTROL "Crea da File",IDC_CREATEFROMFILE,"Tasto",
|
||||
CONTROL "Crea da File",IDC_CREATEFROMFILE,"Button",
|
||||
BS_AUTORADIOBUTTON,7,37,67,10
|
||||
LTEXT "",IDC_RESULTDESC,49,112,159,23
|
||||
PUSHBUTTON "&Aggiungi Controllo...",IDC_ADDCONTROL,81,88,63,14,NOT WS_VISIBLE
|
||||
PUSHBUTTON "&Aggiungi Controllo...",IDC_ADDCONTROL,81,88,73,14,NOT WS_VISIBLE
|
||||
CONTROL "Visualizza come Icona",IDC_ASICON,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP | NOT WS_VISIBLE,223,58,64,10
|
||||
PUSHBUTTON "Esplora...",IDC_BROWSE,83,53,50,14,NOT WS_VISIBLE
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Copyright 2003 Ulrich Czekalla for CodeWeavers
|
||||
* Copyright 2003 Hans Leidekker
|
||||
* Copyright 2008 Frans Kool
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -54,3 +55,43 @@ STRINGTABLE DISCARDABLE
|
|||
IDS_NOTOLEMOD "Het bestand is geen geldig OLE bestand. Registratie is mislukt."
|
||||
IDS_NOTOLEMODCAPTION "Toevoegen"
|
||||
}
|
||||
|
||||
IDD_PASTESPECIAL4 DIALOG DISCARDABLE 3, 15, 293, 140
|
||||
STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Plakken (Speciaal)"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "Bron:", -1, 6, 9, 30, 8, WS_VISIBLE | WS_GROUP
|
||||
CONTROL "&Plakken", IDC_PS_PASTE, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_GROUP | WS_VISIBLE,
|
||||
6, 38, 55, 10
|
||||
CONTROL "Plakken &Verwijzing", IDC_PS_PASTELINK, "Button", BS_AUTORADIOBUTTON | WS_VISIBLE,
|
||||
6, 63, 55, 10
|
||||
LTEXT "&Als:", -1, 65, 25, 16, 8, WS_VISIBLE | WS_GROUP
|
||||
LISTBOX IDC_PS_PASTELIST, 65, 36, 153, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | NOT WS_VISIBLE
|
||||
LISTBOX IDC_PS_PASTELINKLIST, 65, 36, 153, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | NOT WS_VISIBLE
|
||||
LISTBOX IDC_PS_DISPLAYLIST, 65, 36, 153, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | WS_VISIBLE
|
||||
CONTROL "OK", IDOK, "Button", BS_DEFPUSHBUTTON | WS_TABSTOP | WS_GROUP | WS_VISIBLE, 224, 6, 66, 14
|
||||
CONTROL "Annuleren", IDCANCEL, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 23, 66, 14
|
||||
CONTROL "&Help", IDC_OLEUIHELP, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 42, 66, 14
|
||||
CONTROL "&Toon Als Icoon", IDC_PS_DISPLAYASICON, "Button", BS_AUTOCHECKBOX | WS_TABSTOP | WS_VISIBLE, 224, 59, 66, 14
|
||||
CONTROL "", IDC_PS_ICONDISPLAY, "Static", SS_ICON | WS_VISIBLE, 224, 75, 66, 44
|
||||
CONTROL "Verander &Icoon...", IDC_PS_CHANGEICON, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 123, 66, 14
|
||||
CONTROL "", IDC_PS_RESULTIMAGE, "Static", SS_ICON | WS_VISIBLE, 8, 101, 42, 34
|
||||
CONTROL "<< resultaat tekst komt hier >>", IDC_PS_RESULTTEXT, "Static", SS_NOPREFIX | WS_VISIBLE, 54, 100, 159, 35
|
||||
CONTROL "Resultaat", -1, "Button", BS_GROUPBOX | WS_GROUP | WS_VISIBLE, 6, 90, 212, 48
|
||||
CONTROL "", IDC_PS_SOURCETEXT, "Edit", ES_READONLY | ES_AUTOHSCROLL | WS_VISIBLE, 37, 9, 180, 8
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_PS_PASTE_DATA "Voegt de inhoud van het clipbord in uw document als %s."
|
||||
IDS_PS_PASTE_OBJECT "Voegt de inhoud van het clipbord in uw document zodat u het kan activeren met %s."
|
||||
IDS_PS_PASTE_OBJECT_AS_ICON "Voegt de inhoud van het clipbord in uw document zodat u het kan activeren met %s. Het zal getoond worden als een icoon."
|
||||
IDS_PS_PASTE_LINK_DATA "Voegt de inhoud van het clipbord in uw document als %s. De data is verbonden met het bron bestand zodat wijzigingen in dat bestand worden getoond in uw document."
|
||||
IDS_PS_PASTE_LINK_OBJECT "Voegt een afbeelding vanuit het clipbord in uw document. De afbeelding is verbonden met het bron bestand zodat wijzigingen in dat bestand worden getoond in uw document."
|
||||
IDS_PS_PASTE_LINK_OBJECT_AS_ICON "Voegt een verwijzing in die wijst naar de locatie van de inhoud van het clipbord. De verwijzing is verbonden met het bron bestand zodat wijzigingen in dat bestand worden getoond in uw document."
|
||||
IDS_PS_NON_OLE "Voegt de inhoud van het clipbord in uw document."
|
||||
IDS_PS_UNKNOWN_TYPE "Onbekend Type"
|
||||
IDS_PS_UNKNOWN_SRC "Onbekende Bron"
|
||||
IDS_PS_UNKNOWN_APP "het programma die het gecreëerd heeft"
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2005-2006 Alexander N. Sørnes <alex@thehandofagony.com>
|
||||
* Copyright 2005-2008 Alexander N. Sørnes <alex@thehandofagony.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -37,10 +37,10 @@ BEGIN
|
|||
CONTROL "Opprett fra fil",IDC_CREATEFROMFILE,"Button",
|
||||
BS_AUTORADIOBUTTON,7,37,67,10
|
||||
LTEXT "",IDC_RESULTDESC,49,112,159,23
|
||||
PUSHBUTTON "&Legg til kontroller . . .",IDC_ADDCONTROL,81,88,63,14,NOT WS_VISIBLE
|
||||
PUSHBUTTON "&Legg til kontroller...",IDC_ADDCONTROL,81,88,63,14,NOT WS_VISIBLE
|
||||
CONTROL "Vis som ikon",IDC_ASICON,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP | NOT WS_VISIBLE,223,58,64,10
|
||||
PUSHBUTTON "Bla . . .",IDC_BROWSE,83,53,50,14,NOT WS_VISIBLE
|
||||
PUSHBUTTON "Bla...",IDC_BROWSE,83,53,50,14,NOT WS_VISIBLE
|
||||
LTEXT "Fil:",IDC_FILELBL,83,27,20,8, NOT WS_VISIBLE
|
||||
EDITTEXT IDC_FILE,83,37,132,13,ES_AUTOHSCROLL | NOT WS_VISIBLE
|
||||
END
|
||||
|
@ -73,11 +73,11 @@ BEGIN
|
|||
CONTROL "&Hjelp", IDC_OLEUIHELP, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 42, 66, 14
|
||||
CONTROL "&Vis som ikon", IDC_PS_DISPLAYASICON, "Button", BS_AUTOCHECKBOX | WS_TABSTOP | WS_VISIBLE, 224, 59, 66, 14
|
||||
CONTROL "", IDC_PS_ICONDISPLAY, "Static", SS_ICON | WS_VISIBLE, 224, 75, 66, 44
|
||||
CONTROL "Endre &ikon . . .", IDC_PS_CHANGEICON, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 123, 66, 14
|
||||
CONTROL "Endre &ikon...", IDC_PS_CHANGEICON, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 123, 66, 14
|
||||
CONTROL "", IDC_PS_RESULTIMAGE, "Static", SS_ICON | WS_VISIBLE, 8, 101, 42, 34
|
||||
CONTROL "<< resultatet kommer her >>", IDC_PS_RESULTTEXT, "Static", SS_NOPREFIX | WS_VISIBLE, 54, 100, 159, 35
|
||||
CONTROL "Resultat", -1, "Button", BS_GROUPBOX | WS_GROUP | WS_VISIBLE, 6, 90, 212, 48
|
||||
CONTROL "", IDC_PS_SOURCETEXT, "Rediger", ES_READONLY | ES_AUTOHSCROLL | WS_VISIBLE, 37, 9, 180, 8
|
||||
CONTROL "", IDC_PS_SOURCETEXT, "Edit", ES_READONLY | ES_AUTOHSCROLL | WS_VISIBLE, 37, 9, 180, 8
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
|
99
reactos/dll/win32/oledlg/oledlg_Si.rc
Normal file
99
reactos/dll/win32/oledlg/oledlg_Si.rc
Normal file
|
@ -0,0 +1,99 @@
|
|||
/*
|
||||
* Copyright 2008 Rok Mandeljc
|
||||
*
|
||||
* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#pragma code_page(65001)
|
||||
|
||||
LANGUAGE LANG_SLOVENIAN, SUBLANG_DEFAULT
|
||||
|
||||
UIINSERTOBJECT DIALOG DISCARDABLE 0, 0, 294, 151
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Vstavljanje predmeta"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LISTBOX IDC_OBJTYPELIST,82,19,131,66,LBS_SORT |
|
||||
LBS_NOINTEGRALHEIGHT | WS_VISIBLE | WS_VSCROLL |
|
||||
WS_TABSTOP
|
||||
LTEXT "Vrsta predmeta:",IDC_OBJTYPELBL,82,7,53,8,WS_VISIBLE
|
||||
DEFPUSHBUTTON "V redu",IDOK,221,7,66,14
|
||||
PUSHBUTTON "Prekliči",IDCANCEL,221,24,66,14
|
||||
GROUPBOX "Rezultat",IDC_RESULT,7,103,208,41
|
||||
CONTROL "Ustvari nov",IDC_CREATENEW,"Button",BS_AUTORADIOBUTTON |
|
||||
WS_GROUP,7,20,62,10
|
||||
CONTROL "Ustvari kontrolo",IDC_CREATECONTROL,"Button",
|
||||
BS_AUTORADIOBUTTON | NOT WS_VISIBLE,7,54,62,10
|
||||
CONTROL "Ustvari iz datoteke",IDC_CREATEFROMFILE,"Button",
|
||||
BS_AUTORADIOBUTTON,7,37,67,10
|
||||
LTEXT "",IDC_RESULTDESC,49,112,159,23
|
||||
PUSHBUTTON "&Dodaj kontrolo ...",IDC_ADDCONTROL,81,88,63,14,NOT WS_VISIBLE
|
||||
CONTROL "Prikaži kot ikono",IDC_ASICON,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP | NOT WS_VISIBLE,223,58,64,10
|
||||
PUSHBUTTON "Brskaj ...",IDC_BROWSE,83,53,50,14,NOT WS_VISIBLE
|
||||
LTEXT "Datoteka:",IDC_FILELBL,83,27,20,8, NOT WS_VISIBLE
|
||||
EDITTEXT IDC_FILE,83,37,132,13,ES_AUTOHSCROLL | NOT WS_VISIBLE
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_RESULTOBJDESC "Vstavi nov predmet %s v dokument"
|
||||
IDS_RESULTFILEOBJDESC "Vstavi vsebino datoteke kot predmet v dokument, tako da lahko z njim upravljate z ustreznim programom."
|
||||
IDS_BROWSE "Brskaj"
|
||||
IDS_NOTOLEMOD "Datoteka ni veljaven OLE modul. OLE kontrole ni mogoče registrirati."
|
||||
IDS_NOTOLEMODCAPTION "Dodajanje kontrole"
|
||||
}
|
||||
|
||||
IDD_PASTESPECIAL4 DIALOG DISCARDABLE 3, 15, 293, 140
|
||||
STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Posebno lepljenje"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "Vir:", -1, 6, 9, 30, 8, WS_VISIBLE | WS_GROUP
|
||||
CONTROL "Pri&lepi", IDC_PS_PASTE, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_GROUP | WS_VISIBLE,
|
||||
6, 38, 55, 10
|
||||
CONTROL "Prilepi po&vezavo", IDC_PS_PASTELINK, "Button", BS_AUTORADIOBUTTON | WS_VISIBLE,
|
||||
6, 63, 55, 10
|
||||
LTEXT "Prilepi &kot:", -1, 65, 25, 16, 8, WS_VISIBLE | WS_GROUP
|
||||
LISTBOX IDC_PS_PASTELIST, 65, 36, 153, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | NOT WS_VISIBLE
|
||||
LISTBOX IDC_PS_PASTELINKLIST, 65, 36, 153, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | NOT WS_VISIBLE
|
||||
LISTBOX IDC_PS_DISPLAYLIST, 65, 36, 153, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | WS_VISIBLE
|
||||
CONTROL "V redu", IDOK, "Button", BS_DEFPUSHBUTTON | WS_TABSTOP | WS_GROUP | WS_VISIBLE, 224, 6, 66, 14
|
||||
CONTROL "Prekliči", IDCANCEL, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 23, 66, 14
|
||||
CONTROL "&Pomoč", IDC_OLEUIHELP, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 42, 66, 14
|
||||
CONTROL "P&rikaži kot ikono", IDC_PS_DISPLAYASICON, "Button", BS_AUTOCHECKBOX | WS_TABSTOP | WS_VISIBLE, 224, 59, 66, 14
|
||||
CONTROL "", IDC_PS_ICONDISPLAY, "Static", SS_ICON | WS_VISIBLE, 224, 75, 66, 44
|
||||
CONTROL "Spremeni &ikono ...", IDC_PS_CHANGEICON, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 123, 66, 14
|
||||
CONTROL "", IDC_PS_RESULTIMAGE, "Static", SS_ICON | WS_VISIBLE, 8, 101, 42, 34
|
||||
CONTROL "<< besedilo >>", IDC_PS_RESULTTEXT, "Static", SS_NOPREFIX | WS_VISIBLE, 54, 100, 159, 35
|
||||
CONTROL "Rezultat", -1, "Button", BS_GROUPBOX | WS_GROUP | WS_VISIBLE, 6, 90, 212, 48
|
||||
CONTROL "", IDC_PS_SOURCETEXT, "Edit", ES_READONLY | ES_AUTOHSCROLL | WS_VISIBLE, 37, 9, 180, 8
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_PS_PASTE_DATA "Vnese vsebino odložišča kot predmet vrste %s."
|
||||
IDS_PS_PASTE_OBJECT "Vnese vsebino odložišča, tako da jo lahko urejate s programom %s."
|
||||
IDS_PS_PASTE_OBJECT_AS_ICON "Vnese vsebino odložišča, tako da jo lahko urejate s programom %s. Prikazana bo kot ikona."
|
||||
IDS_PS_PASTE_LINK_DATA "Vnese vsebino odložišča kot predmet vrste %s. Ustvarjena bo povezava z izvorno datoteko, tako da bodo spremembe le-te odražene tudi v dokumentu."
|
||||
IDS_PS_PASTE_LINK_OBJECT "Vnese sliko vsebine odložišča. Ustvarjena bo povezava z izvorno datoteko, tako da bodo spremembe le-te odražene tudi v dokumentu."
|
||||
IDS_PS_PASTE_LINK_OBJECT_AS_ICON "Vnese bližnjico do vsebine odložišča. Ustvarjena bo povezava z izvorno datoteko, tako da bodo spremembe le-te odražene tudi v dokumentu."
|
||||
IDS_PS_NON_OLE "Vnese vsebino odložišča v dokument."
|
||||
IDS_PS_UNKNOWN_TYPE "Neznana vrsta"
|
||||
IDS_PS_UNKNOWN_SRC "Neznan vir"
|
||||
IDS_PS_UNKNOWN_APP "Neznan program"
|
||||
}
|
||||
|
||||
#pragma code_page(default)
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_SWEDISH, SUBLANG_DEFAULT
|
||||
LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
|
||||
|
||||
UIINSERTOBJECT DIALOG DISCARDABLE 0, 0, 294, 151
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
* get localized bitmaps for example.
|
||||
*/
|
||||
#include "oledlg_Cs.rc"
|
||||
#include "oledlg_Da.rc"
|
||||
#include "oledlg_De.rc"
|
||||
#include "oledlg_En.rc"
|
||||
#include "oledlg_Es.rc"
|
||||
|
@ -47,6 +48,7 @@
|
|||
#include "oledlg_Pl.rc"
|
||||
#include "oledlg_Pt.rc"
|
||||
#include "oledlg_Ru.rc"
|
||||
#include "oledlg_Si.rc"
|
||||
#include "oledlg_Sv.rc"
|
||||
#include "oledlg_Tr.rc"
|
||||
#include "oledlg_Uk.rc"
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
@ stub I_RpcConnectionSetSockBuffSize
|
||||
@ stub I_RpcDeleteMutex
|
||||
@ stub I_RpcEnableWmiTrace # wxp
|
||||
@ stub I_RpcExceptionFilter # wxp
|
||||
@ stdcall I_RpcExceptionFilter(long)
|
||||
@ stdcall I_RpcFree(ptr)
|
||||
@ stdcall I_RpcFreeBuffer(ptr)
|
||||
@ stub I_RpcFreePipeBuffer
|
||||
|
|
|
@ -936,6 +936,28 @@ LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
|
|||
}
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* I_RpcExceptionFilter (rpcrt4.@)
|
||||
*/
|
||||
int WINAPI I_RpcExceptionFilter(ULONG ExceptionCode)
|
||||
{
|
||||
TRACE("0x%x\n", ExceptionCode);
|
||||
switch (ExceptionCode)
|
||||
{
|
||||
case STATUS_DATATYPE_MISALIGNMENT:
|
||||
case STATUS_BREAKPOINT:
|
||||
case STATUS_ACCESS_VIOLATION:
|
||||
case STATUS_ILLEGAL_INSTRUCTION:
|
||||
case STATUS_PRIVILEGED_INSTRUCTION:
|
||||
case STATUS_INSTRUCTION_MISALIGNMENT:
|
||||
case STATUS_STACK_OVERFLOW:
|
||||
case STATUS_POSSIBLE_DEADLOCK:
|
||||
return EXCEPTION_CONTINUE_SEARCH;
|
||||
default:
|
||||
return EXCEPTION_EXECUTE_HANDLER;
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* RpcErrorStartEnumeration (rpcrt4.@)
|
||||
*/
|
||||
|
|
|
@ -97,73 +97,6 @@ static const ulong32 TE0[256] = {
|
|||
0x7bb0b0cbUL, 0xa85454fcUL, 0x6dbbbbd6UL, 0x2c16163aUL,
|
||||
};
|
||||
|
||||
static const ulong32 Te4[256] = {
|
||||
0x63636363UL, 0x7c7c7c7cUL, 0x77777777UL, 0x7b7b7b7bUL,
|
||||
0xf2f2f2f2UL, 0x6b6b6b6bUL, 0x6f6f6f6fUL, 0xc5c5c5c5UL,
|
||||
0x30303030UL, 0x01010101UL, 0x67676767UL, 0x2b2b2b2bUL,
|
||||
0xfefefefeUL, 0xd7d7d7d7UL, 0xababababUL, 0x76767676UL,
|
||||
0xcacacacaUL, 0x82828282UL, 0xc9c9c9c9UL, 0x7d7d7d7dUL,
|
||||
0xfafafafaUL, 0x59595959UL, 0x47474747UL, 0xf0f0f0f0UL,
|
||||
0xadadadadUL, 0xd4d4d4d4UL, 0xa2a2a2a2UL, 0xafafafafUL,
|
||||
0x9c9c9c9cUL, 0xa4a4a4a4UL, 0x72727272UL, 0xc0c0c0c0UL,
|
||||
0xb7b7b7b7UL, 0xfdfdfdfdUL, 0x93939393UL, 0x26262626UL,
|
||||
0x36363636UL, 0x3f3f3f3fUL, 0xf7f7f7f7UL, 0xccccccccUL,
|
||||
0x34343434UL, 0xa5a5a5a5UL, 0xe5e5e5e5UL, 0xf1f1f1f1UL,
|
||||
0x71717171UL, 0xd8d8d8d8UL, 0x31313131UL, 0x15151515UL,
|
||||
0x04040404UL, 0xc7c7c7c7UL, 0x23232323UL, 0xc3c3c3c3UL,
|
||||
0x18181818UL, 0x96969696UL, 0x05050505UL, 0x9a9a9a9aUL,
|
||||
0x07070707UL, 0x12121212UL, 0x80808080UL, 0xe2e2e2e2UL,
|
||||
0xebebebebUL, 0x27272727UL, 0xb2b2b2b2UL, 0x75757575UL,
|
||||
0x09090909UL, 0x83838383UL, 0x2c2c2c2cUL, 0x1a1a1a1aUL,
|
||||
0x1b1b1b1bUL, 0x6e6e6e6eUL, 0x5a5a5a5aUL, 0xa0a0a0a0UL,
|
||||
0x52525252UL, 0x3b3b3b3bUL, 0xd6d6d6d6UL, 0xb3b3b3b3UL,
|
||||
0x29292929UL, 0xe3e3e3e3UL, 0x2f2f2f2fUL, 0x84848484UL,
|
||||
0x53535353UL, 0xd1d1d1d1UL, 0x00000000UL, 0xededededUL,
|
||||
0x20202020UL, 0xfcfcfcfcUL, 0xb1b1b1b1UL, 0x5b5b5b5bUL,
|
||||
0x6a6a6a6aUL, 0xcbcbcbcbUL, 0xbebebebeUL, 0x39393939UL,
|
||||
0x4a4a4a4aUL, 0x4c4c4c4cUL, 0x58585858UL, 0xcfcfcfcfUL,
|
||||
0xd0d0d0d0UL, 0xefefefefUL, 0xaaaaaaaaUL, 0xfbfbfbfbUL,
|
||||
0x43434343UL, 0x4d4d4d4dUL, 0x33333333UL, 0x85858585UL,
|
||||
0x45454545UL, 0xf9f9f9f9UL, 0x02020202UL, 0x7f7f7f7fUL,
|
||||
0x50505050UL, 0x3c3c3c3cUL, 0x9f9f9f9fUL, 0xa8a8a8a8UL,
|
||||
0x51515151UL, 0xa3a3a3a3UL, 0x40404040UL, 0x8f8f8f8fUL,
|
||||
0x92929292UL, 0x9d9d9d9dUL, 0x38383838UL, 0xf5f5f5f5UL,
|
||||
0xbcbcbcbcUL, 0xb6b6b6b6UL, 0xdadadadaUL, 0x21212121UL,
|
||||
0x10101010UL, 0xffffffffUL, 0xf3f3f3f3UL, 0xd2d2d2d2UL,
|
||||
0xcdcdcdcdUL, 0x0c0c0c0cUL, 0x13131313UL, 0xececececUL,
|
||||
0x5f5f5f5fUL, 0x97979797UL, 0x44444444UL, 0x17171717UL,
|
||||
0xc4c4c4c4UL, 0xa7a7a7a7UL, 0x7e7e7e7eUL, 0x3d3d3d3dUL,
|
||||
0x64646464UL, 0x5d5d5d5dUL, 0x19191919UL, 0x73737373UL,
|
||||
0x60606060UL, 0x81818181UL, 0x4f4f4f4fUL, 0xdcdcdcdcUL,
|
||||
0x22222222UL, 0x2a2a2a2aUL, 0x90909090UL, 0x88888888UL,
|
||||
0x46464646UL, 0xeeeeeeeeUL, 0xb8b8b8b8UL, 0x14141414UL,
|
||||
0xdedededeUL, 0x5e5e5e5eUL, 0x0b0b0b0bUL, 0xdbdbdbdbUL,
|
||||
0xe0e0e0e0UL, 0x32323232UL, 0x3a3a3a3aUL, 0x0a0a0a0aUL,
|
||||
0x49494949UL, 0x06060606UL, 0x24242424UL, 0x5c5c5c5cUL,
|
||||
0xc2c2c2c2UL, 0xd3d3d3d3UL, 0xacacacacUL, 0x62626262UL,
|
||||
0x91919191UL, 0x95959595UL, 0xe4e4e4e4UL, 0x79797979UL,
|
||||
0xe7e7e7e7UL, 0xc8c8c8c8UL, 0x37373737UL, 0x6d6d6d6dUL,
|
||||
0x8d8d8d8dUL, 0xd5d5d5d5UL, 0x4e4e4e4eUL, 0xa9a9a9a9UL,
|
||||
0x6c6c6c6cUL, 0x56565656UL, 0xf4f4f4f4UL, 0xeaeaeaeaUL,
|
||||
0x65656565UL, 0x7a7a7a7aUL, 0xaeaeaeaeUL, 0x08080808UL,
|
||||
0xbabababaUL, 0x78787878UL, 0x25252525UL, 0x2e2e2e2eUL,
|
||||
0x1c1c1c1cUL, 0xa6a6a6a6UL, 0xb4b4b4b4UL, 0xc6c6c6c6UL,
|
||||
0xe8e8e8e8UL, 0xddddddddUL, 0x74747474UL, 0x1f1f1f1fUL,
|
||||
0x4b4b4b4bUL, 0xbdbdbdbdUL, 0x8b8b8b8bUL, 0x8a8a8a8aUL,
|
||||
0x70707070UL, 0x3e3e3e3eUL, 0xb5b5b5b5UL, 0x66666666UL,
|
||||
0x48484848UL, 0x03030303UL, 0xf6f6f6f6UL, 0x0e0e0e0eUL,
|
||||
0x61616161UL, 0x35353535UL, 0x57575757UL, 0xb9b9b9b9UL,
|
||||
0x86868686UL, 0xc1c1c1c1UL, 0x1d1d1d1dUL, 0x9e9e9e9eUL,
|
||||
0xe1e1e1e1UL, 0xf8f8f8f8UL, 0x98989898UL, 0x11111111UL,
|
||||
0x69696969UL, 0xd9d9d9d9UL, 0x8e8e8e8eUL, 0x94949494UL,
|
||||
0x9b9b9b9bUL, 0x1e1e1e1eUL, 0x87878787UL, 0xe9e9e9e9UL,
|
||||
0xcecececeUL, 0x55555555UL, 0x28282828UL, 0xdfdfdfdfUL,
|
||||
0x8c8c8c8cUL, 0xa1a1a1a1UL, 0x89898989UL, 0x0d0d0d0dUL,
|
||||
0xbfbfbfbfUL, 0xe6e6e6e6UL, 0x42424242UL, 0x68686868UL,
|
||||
0x41414141UL, 0x99999999UL, 0x2d2d2d2dUL, 0x0f0f0f0fUL,
|
||||
0xb0b0b0b0UL, 0x54545454UL, 0xbbbbbbbbUL, 0x16161616UL,
|
||||
};
|
||||
|
||||
static const ulong32 TD0[256] = {
|
||||
0x51f4a750UL, 0x7e416553UL, 0x1a17a4c3UL, 0x3a275e96UL,
|
||||
0x3bab6bcbUL, 0x1f9d45f1UL, 0xacfa58abUL, 0x4be30393UL,
|
||||
|
|
|
@ -231,7 +231,7 @@ fast_mp_montgomery_reduce (mp_int * x, const mp_int * n, mp_digit rho)
|
|||
/* a = a + mu * m * b**i
|
||||
*
|
||||
* This is computed in place and on the fly. The multiplication
|
||||
* by b**i is handled by offseting which columns the results
|
||||
* by b**i is handled by offsetting which columns the results
|
||||
* are added to.
|
||||
*
|
||||
* Note the comba method normally doesn't handle carries in the
|
||||
|
@ -367,7 +367,7 @@ fast_s_mp_mul_digs (const mp_int * a, const mp_int * b, mp_int * c, int digs)
|
|||
tmpx = a->dp + tx;
|
||||
tmpy = b->dp + ty;
|
||||
|
||||
/* this is the number of times the loop will iterrate, essentially its
|
||||
/* This is the number of times the loop will iterate, essentially it's
|
||||
while (tx++ < a->used && ty-- >= 0) { ... }
|
||||
*/
|
||||
iy = MIN(a->used-tx, ty+1);
|
||||
|
@ -444,7 +444,7 @@ fast_s_mp_mul_high_digs (const mp_int * a, const mp_int * b, mp_int * c, int dig
|
|||
tmpx = a->dp + tx;
|
||||
tmpy = b->dp + ty;
|
||||
|
||||
/* this is the number of times the loop will iterrate, essentially its
|
||||
/* This is the number of times the loop will iterate, essentially it's
|
||||
while (tx++ < a->used && ty-- >= 0) { ... }
|
||||
*/
|
||||
iy = MIN(a->used-tx, ty+1);
|
||||
|
@ -544,7 +544,7 @@ int fast_s_mp_sqr (const mp_int * a, mp_int * b)
|
|||
tmpx = a->dp + tx;
|
||||
tmpy = a->dp + ty;
|
||||
|
||||
/* this is the number of times the loop will iterrate, essentially its
|
||||
/* This is the number of times the loop will iterate, essentially it's
|
||||
while (tx++ < a->used && ty-- >= 0) { ... }
|
||||
*/
|
||||
iy = MIN(a->used-tx, ty+1);
|
||||
|
@ -2259,7 +2259,7 @@ __ERR:mp_clear_multi (&x, &y, &u, &v, &A, &B, &C, &D, NULL);
|
|||
* are saved. Note also that the call to mp_mul can end up back
|
||||
* in this function if the a0, a1, b0, or b1 are above the threshold.
|
||||
* This is known as divide-and-conquer and leads to the famous
|
||||
* O(N**lg(3)) or O(N**1.584) work which is asymptopically lower than
|
||||
* O(N**lg(3)) or O(N**1.584) work which is asymptotically lower than
|
||||
* the standard O(N**2) that the baseline/comba methods use.
|
||||
* Generally though the overhead of this method doesn't pay off
|
||||
* until a certain size (N ~ 80) is reached.
|
||||
|
|
|
@ -3822,7 +3822,7 @@ cleanup:
|
|||
return res;
|
||||
}
|
||||
|
||||
static const WCHAR szProviderKeys[5][104] = {
|
||||
static const WCHAR szProviderKeys[6][116] = {
|
||||
{ 'S','o','f','t','w','a','r','e','\\',
|
||||
'M','i','c','r','o','s','o','f','t','\\','C','r','y','p','t','o','g','r',
|
||||
'a','p','h','y','\\','D','e','f','a','u','l','t','s','\\','P','r','o','v',
|
||||
|
@ -3851,7 +3851,13 @@ static const WCHAR szProviderKeys[5][104] = {
|
|||
'C','r','y','p','t','o','g','r','a','p','h','y','\\','D','e','f','a','u','l','t','s','\\',
|
||||
'P','r','o','v','i','d','e','r','\\','M','i','c','r','o','s','o','f','t',' ',
|
||||
'E','n','h','a','n','c','e','d',' ','R','S','A',' ','a','n','d',' ','A','E','S',' ',
|
||||
'C','r','y','p','t','o','g','r','a','p','h','i','c',' ','P','r','o','v','i','d','e','r',0 }
|
||||
'C','r','y','p','t','o','g','r','a','p','h','i','c',' ','P','r','o','v','i','d','e','r',0 },
|
||||
{ 'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\',
|
||||
'C','r','y','p','t','o','g','r','a','p','h','y','\\','D','e','f','a','u','l','t','s','\\',
|
||||
'P','r','o','v','i','d','e','r','\\','M','i','c','r','o','s','o','f','t',' ',
|
||||
'E','n','h','a','n','c','e','d',' ','R','S','A',' ','a','n','d',' ','A','E','S',' ',
|
||||
'C','r','y','p','t','o','g','r','a','p','h','i','c',' ','P','r','o','v','i','d','e','r',
|
||||
' ','(','P','r','o','t','o','t','y','p','e',')',0 }
|
||||
};
|
||||
static const WCHAR szDefaultKeys[3][65] = {
|
||||
{ 'S','o','f','t','w','a','r','e','\\',
|
||||
|
@ -3897,7 +3903,7 @@ HRESULT WINAPI DllRegisterServer(void)
|
|||
long apiRet;
|
||||
int i;
|
||||
|
||||
for (i=0; i<5; i++) {
|
||||
for (i=0; i<6; i++) {
|
||||
apiRet = RegCreateKeyExW(HKEY_LOCAL_MACHINE, szProviderKeys[i], 0, NULL,
|
||||
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &key, &dp);
|
||||
|
||||
|
@ -3917,6 +3923,7 @@ HRESULT WINAPI DllRegisterServer(void)
|
|||
type=PROV_RSA_SCHANNEL;
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
type=PROV_RSA_AES;
|
||||
break;
|
||||
default:
|
||||
|
@ -3993,6 +4000,7 @@ HRESULT WINAPI DllUnregisterServer(void)
|
|||
RegDeleteKeyW(HKEY_LOCAL_MACHINE, szProviderKeys[2]);
|
||||
RegDeleteKeyW(HKEY_LOCAL_MACHINE, szProviderKeys[3]);
|
||||
RegDeleteKeyW(HKEY_LOCAL_MACHINE, szProviderKeys[4]);
|
||||
RegDeleteKeyW(HKEY_LOCAL_MACHINE, szProviderKeys[5]);
|
||||
RegDeleteKeyW(HKEY_LOCAL_MACHINE, szDefaultKeys[0]);
|
||||
RegDeleteKeyW(HKEY_LOCAL_MACHINE, szDefaultKeys[1]);
|
||||
RegDeleteKeyW(HKEY_LOCAL_MACHINE, szDefaultKeys[2]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue