Release 950403
Sun Apr 2 18:31:12 1995 Alexandre Julliard (julliard@sunsite.unc.edu)
* [Configure] [if1632/Imakefile]
Removed new build and short names options.
* [if1632/*.c] [tools/build.c]
Implemented compiled call-back functions for better performance;
all the relay code is now done in assembly code generated by the
build program.
Relay code is no longer dependent on being loaded below 64K.
* [loader/resource.c]
Fixed memory leak in LoadString(). A fix will also be needed for
other resources.
* [memory/global.c]
Implemented global heap arenas, so we can store informations about
global blocks, like lock counts or owner handle.
Implemented FarGetOwner() and FarSetOwner().
Implemented global heap TOOLHELP functions.
* [memory/selector.c]
Bug fix: it was not possible to re-use a free selector.
Sun Apr 2 01:34:52 1995 Constantine Sapuntzakis (csapuntz@mit.edu)
* [controls/listbox.c]
Major work on listbox code
- Many bugs fixed (still many bugs)
- More messages supported
- Code simplified
Fri Mar 31 03:27:16 EST 1995 William Magro (wmagro@tc.cornell.edu)
* [controls/edit.c]
Lots of bug fixes related to diappearing text, lost carets,
highlighting, segmentation faults, occurance of random
characters, insertion of characters over selection, misplaced
caret location, display corruption, end of line behavior, etc.
* [controls/widgets.c]
EDIT class doesn't want to use CS_PARENTDC flag.
Thu Mar 30 20:58:25 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [loader/selector.c]
FixupFunctionPrologs() should also handle multiple data modules.
(this bug only became visible because MakeProcInstance() was fixed
in 950319)
* [misc/dosfs.c]
Simplified DOS_SimplifyPath.
Small fix to DOS_opendir to reuse an entry if an open directory
is opened again, to prevent "too many open directories" messages.
Thu Mar 30 12:05:05 1995 Martin von Loewis <loewis@informatik.hu-berlin.de>
* [if1632/compobj.spec][include/compobj.h][misc/compobj.c]
CoDisconnectObject: new stub function
* [include/msdos.h]
fix DOSVERSION
* [loader/ne_image.c]
NE_FixupSegment: Be more generous on additive fixups
* [if1632/user.spec][misc/network.c]
Add more WNet* stubs
Wed Mar 29 11:47:22 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/listbox.c]
DlgDirList(): send segptr instead of linear pointer
in message to static control
* [controls/menu.c]
Tried to implement ownerdrawn menuitems. Doesn't work.
* [if1632/gdi.spec] [include/windows.h] [objects/font.c]
Provide a stub for GetRasterizerCaps()
* [loader/selector.c]
Pass end address instead of length to LocalInit() in
CreateSelectors()
* [memory/local.c]
LocalInit(): If there's already a local heap in the segment, do
nothing and return TRUE
* [objects/linedda.c]
Replaced buggy LineDDA() with a Bresenham algorithm. Should work
now.
* [windows/cursor.c]
LoadCursor()/CreateCursor(): Cleaned up the mess. Needs some
more work still.
Tue Mar 21 17:54:43 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [if1632/relay.c] [if1632/callback.c] [include/dlls.h]
[if1632/winprocs.spec] [if1632/winprocs.c] [include/winprocs.h]
[controls/widgets.c] [misc/shell.c] [misc/commdlg.c]
[windows/nonclient.c] [misc/message.c]
Added a new builtin DLL that provides 16 bit entry points for all
the Def*Procs (DefDlgProc, ButtonProc etc.). OWL programs work
again.
* [misc/shell.c]
RegOpenKey()/RegCreateKey() bugs fixed.
* [loader/ne_image.c]
Skipping the initialization of a DLL when CS == 0 was broken.
1995-04-03 18:55:37 +02:00
|
|
|
/*
|
|
|
|
* COMPOBJ library
|
|
|
|
*
|
|
|
|
* Copyright 1995 Martin von Loewis
|
1998-11-08 14:36:39 +01:00
|
|
|
* Copyright 1998 Justin Bradford
|
1999-01-30 14:36:55 +01:00
|
|
|
* Copyright 1999 Francis Beaudet
|
2004-07-06 23:27:48 +02:00
|
|
|
* Copyright 1999 Sylvain St-Germain
|
|
|
|
* Copyright 2002 Marcus Meissner
|
|
|
|
* Copyright 2004 Mike Hearn
|
2006-08-16 14:00:02 +02:00
|
|
|
* Copyright 2005-2006 Robert Shearman (for CodeWeavers)
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* 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
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2005-01-04 21:32:47 +01:00
|
|
|
*
|
2005-01-11 16:45:03 +01:00
|
|
|
* Note
|
|
|
|
* 1. COINIT_MULTITHREADED is 0; it is the lack of COINIT_APARTMENTTHREADED
|
|
|
|
* Therefore do not test against COINIT_MULTITHREADED
|
|
|
|
*
|
2005-01-04 21:32:47 +01:00
|
|
|
* TODO list: (items bunched together depend on each other)
|
|
|
|
*
|
2005-02-15 22:48:09 +01:00
|
|
|
* - Implement the OXID resolver so we don't need magic endpoint names for
|
2005-01-04 21:32:47 +01:00
|
|
|
* clients and servers to meet up
|
|
|
|
*
|
Release 950403
Sun Apr 2 18:31:12 1995 Alexandre Julliard (julliard@sunsite.unc.edu)
* [Configure] [if1632/Imakefile]
Removed new build and short names options.
* [if1632/*.c] [tools/build.c]
Implemented compiled call-back functions for better performance;
all the relay code is now done in assembly code generated by the
build program.
Relay code is no longer dependent on being loaded below 64K.
* [loader/resource.c]
Fixed memory leak in LoadString(). A fix will also be needed for
other resources.
* [memory/global.c]
Implemented global heap arenas, so we can store informations about
global blocks, like lock counts or owner handle.
Implemented FarGetOwner() and FarSetOwner().
Implemented global heap TOOLHELP functions.
* [memory/selector.c]
Bug fix: it was not possible to re-use a free selector.
Sun Apr 2 01:34:52 1995 Constantine Sapuntzakis (csapuntz@mit.edu)
* [controls/listbox.c]
Major work on listbox code
- Many bugs fixed (still many bugs)
- More messages supported
- Code simplified
Fri Mar 31 03:27:16 EST 1995 William Magro (wmagro@tc.cornell.edu)
* [controls/edit.c]
Lots of bug fixes related to diappearing text, lost carets,
highlighting, segmentation faults, occurance of random
characters, insertion of characters over selection, misplaced
caret location, display corruption, end of line behavior, etc.
* [controls/widgets.c]
EDIT class doesn't want to use CS_PARENTDC flag.
Thu Mar 30 20:58:25 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [loader/selector.c]
FixupFunctionPrologs() should also handle multiple data modules.
(this bug only became visible because MakeProcInstance() was fixed
in 950319)
* [misc/dosfs.c]
Simplified DOS_SimplifyPath.
Small fix to DOS_opendir to reuse an entry if an open directory
is opened again, to prevent "too many open directories" messages.
Thu Mar 30 12:05:05 1995 Martin von Loewis <loewis@informatik.hu-berlin.de>
* [if1632/compobj.spec][include/compobj.h][misc/compobj.c]
CoDisconnectObject: new stub function
* [include/msdos.h]
fix DOSVERSION
* [loader/ne_image.c]
NE_FixupSegment: Be more generous on additive fixups
* [if1632/user.spec][misc/network.c]
Add more WNet* stubs
Wed Mar 29 11:47:22 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/listbox.c]
DlgDirList(): send segptr instead of linear pointer
in message to static control
* [controls/menu.c]
Tried to implement ownerdrawn menuitems. Doesn't work.
* [if1632/gdi.spec] [include/windows.h] [objects/font.c]
Provide a stub for GetRasterizerCaps()
* [loader/selector.c]
Pass end address instead of length to LocalInit() in
CreateSelectors()
* [memory/local.c]
LocalInit(): If there's already a local heap in the segment, do
nothing and return TRUE
* [objects/linedda.c]
Replaced buggy LineDDA() with a Bresenham algorithm. Should work
now.
* [windows/cursor.c]
LoadCursor()/CreateCursor(): Cleaned up the mess. Needs some
more work still.
Tue Mar 21 17:54:43 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [if1632/relay.c] [if1632/callback.c] [include/dlls.h]
[if1632/winprocs.spec] [if1632/winprocs.c] [include/winprocs.h]
[controls/widgets.c] [misc/shell.c] [misc/commdlg.c]
[windows/nonclient.c] [misc/message.c]
Added a new builtin DLL that provides 16 bit entry points for all
the Def*Procs (DefDlgProc, ButtonProc etc.). OWL programs work
again.
* [misc/shell.c]
RegOpenKey()/RegCreateKey() bugs fixed.
* [loader/ne_image.c]
Skipping the initialization of a DLL when CS == 0 was broken.
1995-04-03 18:55:37 +02:00
|
|
|
*/
|
|
|
|
|
2003-09-06 01:08:26 +02:00
|
|
|
#include <stdarg.h>
|
2000-02-10 23:15:21 +01:00
|
|
|
#include <stdio.h>
|
1997-08-04 18:34:36 +02:00
|
|
|
#include <string.h>
|
1999-01-30 14:36:55 +01:00
|
|
|
#include <assert.h>
|
2001-07-24 01:50:18 +02:00
|
|
|
|
2004-10-07 05:06:48 +02:00
|
|
|
#define COBJMACROS
|
2003-01-07 21:36:20 +01:00
|
|
|
#define NONAMELESSUNION
|
2004-10-07 05:06:48 +02:00
|
|
|
|
2012-11-26 15:20:13 +01:00
|
|
|
#include "ntstatus.h"
|
|
|
|
#define WIN32_NO_STATUS
|
2003-09-06 01:08:26 +02:00
|
|
|
#include "windef.h"
|
2003-06-04 22:11:34 +02:00
|
|
|
#include "winbase.h"
|
2005-09-25 17:17:10 +02:00
|
|
|
#include "winerror.h"
|
|
|
|
#include "winreg.h"
|
2003-06-04 22:11:34 +02:00
|
|
|
#include "winuser.h"
|
2009-06-23 15:25:56 +02:00
|
|
|
#define USE_COM_CONTEXT_DEF
|
2001-07-24 01:50:18 +02:00
|
|
|
#include "objbase.h"
|
|
|
|
#include "ole2.h"
|
|
|
|
#include "ole2ver.h"
|
2009-01-14 18:28:09 +01:00
|
|
|
#include "ctxtcall.h"
|
2009-05-15 20:35:25 +02:00
|
|
|
#include "dde.h"
|
2013-05-23 13:20:41 +02:00
|
|
|
#include "servprov.h"
|
2005-09-25 17:17:10 +02:00
|
|
|
|
2010-12-03 19:51:08 +01:00
|
|
|
#include "initguid.h"
|
2000-11-25 04:08:23 +01:00
|
|
|
#include "compobj_private.h"
|
2010-12-03 19:51:08 +01:00
|
|
|
#include "moniker.h"
|
2001-07-24 01:50:18 +02:00
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
#include "wine/debug.h"
|
1999-04-19 16:56:29 +02:00
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
2000-02-10 23:15:21 +01:00
|
|
|
|
1999-02-13 09:59:48 +01:00
|
|
|
/****************************************************************************
|
2002-08-03 02:17:10 +02:00
|
|
|
* This section defines variables internal to the COM module.
|
1999-02-13 09:59:48 +01:00
|
|
|
*/
|
|
|
|
|
2013-11-11 19:02:58 +01:00
|
|
|
enum comclass_miscfields
|
|
|
|
{
|
|
|
|
MiscStatus = 1,
|
|
|
|
MiscStatusIcon = 2,
|
|
|
|
MiscStatusContent = 4,
|
|
|
|
MiscStatusThumbnail = 8,
|
|
|
|
MiscStatusDocPrint = 16
|
|
|
|
};
|
|
|
|
|
2013-09-27 06:47:15 +02:00
|
|
|
struct comclassredirect_data
|
|
|
|
{
|
|
|
|
ULONG size;
|
2020-06-11 18:40:25 +02:00
|
|
|
ULONG flags;
|
2013-09-27 06:47:15 +02:00
|
|
|
DWORD model;
|
|
|
|
GUID clsid;
|
|
|
|
GUID alias;
|
|
|
|
GUID clsid2;
|
|
|
|
GUID tlbid;
|
|
|
|
ULONG name_len;
|
|
|
|
ULONG name_offset;
|
|
|
|
ULONG progid_len;
|
|
|
|
ULONG progid_offset;
|
|
|
|
ULONG clrdata_len;
|
|
|
|
ULONG clrdata_offset;
|
|
|
|
DWORD miscstatus;
|
|
|
|
DWORD miscstatuscontent;
|
|
|
|
DWORD miscstatusthumbnail;
|
|
|
|
DWORD miscstatusicon;
|
|
|
|
DWORD miscstatusdocprint;
|
|
|
|
};
|
|
|
|
|
2013-09-27 20:59:03 +02:00
|
|
|
struct ifacepsredirect_data
|
|
|
|
{
|
|
|
|
ULONG size;
|
|
|
|
DWORD mask;
|
|
|
|
GUID iid;
|
|
|
|
ULONG nummethods;
|
|
|
|
GUID tlbid;
|
|
|
|
GUID base;
|
|
|
|
ULONG name_len;
|
|
|
|
ULONG name_offset;
|
|
|
|
};
|
|
|
|
|
2013-10-24 20:49:20 +02:00
|
|
|
struct progidredirect_data
|
|
|
|
{
|
|
|
|
ULONG size;
|
|
|
|
DWORD reserved;
|
|
|
|
ULONG clsid_offset;
|
|
|
|
};
|
|
|
|
|
2019-10-29 14:36:05 +01:00
|
|
|
enum class_reg_data_origin
|
|
|
|
{
|
|
|
|
CLASS_REG_ACTCTX,
|
|
|
|
CLASS_REG_REGISTRY,
|
|
|
|
};
|
|
|
|
|
2013-09-27 06:47:15 +02:00
|
|
|
struct class_reg_data
|
|
|
|
{
|
2019-10-29 14:36:05 +01:00
|
|
|
enum class_reg_data_origin origin;
|
2013-09-27 06:47:15 +02:00
|
|
|
union
|
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
2019-10-29 14:36:05 +01:00
|
|
|
const WCHAR *module_name;
|
|
|
|
DWORD threading_model;
|
2013-09-27 06:47:15 +02:00
|
|
|
HANDLE hactctx;
|
|
|
|
} actctx;
|
|
|
|
HKEY hkey;
|
|
|
|
} u;
|
|
|
|
};
|
|
|
|
|
2013-11-11 19:02:58 +01:00
|
|
|
static inline enum comclass_miscfields dvaspect_to_miscfields(DWORD aspect)
|
|
|
|
{
|
|
|
|
switch (aspect)
|
|
|
|
{
|
|
|
|
case DVASPECT_CONTENT:
|
|
|
|
return MiscStatusContent;
|
|
|
|
case DVASPECT_THUMBNAIL:
|
|
|
|
return MiscStatusThumbnail;
|
|
|
|
case DVASPECT_ICON:
|
|
|
|
return MiscStatusIcon;
|
|
|
|
case DVASPECT_DOCPRINT:
|
|
|
|
return MiscStatusDocPrint;
|
|
|
|
default:
|
|
|
|
return MiscStatus;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
BOOL actctx_get_miscstatus(const CLSID *clsid, DWORD aspect, DWORD *status)
|
|
|
|
{
|
|
|
|
ACTCTX_SECTION_KEYED_DATA data;
|
|
|
|
|
|
|
|
data.cbSize = sizeof(data);
|
|
|
|
if (FindActCtxSectionGuid(0, NULL, ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION,
|
|
|
|
clsid, &data))
|
|
|
|
{
|
|
|
|
struct comclassredirect_data *comclass = (struct comclassredirect_data*)data.lpData;
|
|
|
|
enum comclass_miscfields misc = dvaspect_to_miscfields(aspect);
|
2020-06-11 18:40:25 +02:00
|
|
|
ULONG miscmask = (comclass->flags >> 8) & 0xff;
|
2013-11-11 19:02:58 +01:00
|
|
|
|
2020-06-11 18:40:25 +02:00
|
|
|
if (!(miscmask & misc))
|
2013-11-11 19:02:58 +01:00
|
|
|
{
|
2020-06-11 18:40:25 +02:00
|
|
|
if (!(miscmask & MiscStatus))
|
2013-11-11 19:02:58 +01:00
|
|
|
{
|
|
|
|
*status = 0;
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
misc = MiscStatus;
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (misc)
|
|
|
|
{
|
|
|
|
case MiscStatus:
|
|
|
|
*status = comclass->miscstatus;
|
|
|
|
break;
|
|
|
|
case MiscStatusIcon:
|
|
|
|
*status = comclass->miscstatusicon;
|
|
|
|
break;
|
|
|
|
case MiscStatusContent:
|
|
|
|
*status = comclass->miscstatuscontent;
|
|
|
|
break;
|
|
|
|
case MiscStatusThumbnail:
|
|
|
|
*status = comclass->miscstatusthumbnail;
|
|
|
|
break;
|
|
|
|
case MiscStatusDocPrint:
|
|
|
|
*status = comclass->miscstatusdocprint;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
;
|
|
|
|
};
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2012-11-26 15:20:13 +01:00
|
|
|
/* wrapper for NtCreateKey that creates the key recursively if necessary */
|
|
|
|
static NTSTATUS create_key( HKEY *retkey, ACCESS_MASK access, OBJECT_ATTRIBUTES *attr )
|
|
|
|
{
|
|
|
|
NTSTATUS status = NtCreateKey( (HANDLE *)retkey, access, attr, 0, NULL, 0, NULL );
|
|
|
|
|
|
|
|
if (status == STATUS_OBJECT_NAME_NOT_FOUND)
|
|
|
|
{
|
|
|
|
HANDLE subkey, root = attr->RootDirectory;
|
|
|
|
WCHAR *buffer = attr->ObjectName->Buffer;
|
|
|
|
DWORD attrs, pos = 0, i = 0, len = attr->ObjectName->Length / sizeof(WCHAR);
|
|
|
|
UNICODE_STRING str;
|
|
|
|
|
|
|
|
while (i < len && buffer[i] != '\\') i++;
|
|
|
|
if (i == len) return status;
|
|
|
|
|
|
|
|
attrs = attr->Attributes;
|
|
|
|
attr->ObjectName = &str;
|
|
|
|
|
|
|
|
while (i < len)
|
|
|
|
{
|
|
|
|
str.Buffer = buffer + pos;
|
|
|
|
str.Length = (i - pos) * sizeof(WCHAR);
|
|
|
|
status = NtCreateKey( &subkey, access, attr, 0, NULL, 0, NULL );
|
|
|
|
if (attr->RootDirectory != root) NtClose( attr->RootDirectory );
|
|
|
|
if (status) return status;
|
|
|
|
attr->RootDirectory = subkey;
|
|
|
|
while (i < len && buffer[i] == '\\') i++;
|
|
|
|
pos = i;
|
|
|
|
while (i < len && buffer[i] != '\\') i++;
|
|
|
|
}
|
|
|
|
str.Buffer = buffer + pos;
|
|
|
|
str.Length = (i - pos) * sizeof(WCHAR);
|
|
|
|
attr->Attributes = attrs;
|
|
|
|
status = NtCreateKey( (PHANDLE)retkey, access, attr, 0, NULL, 0, NULL );
|
|
|
|
if (attr->RootDirectory != root) NtClose( attr->RootDirectory );
|
|
|
|
}
|
|
|
|
return status;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HKEY classes_root_hkey;
|
|
|
|
|
|
|
|
/* create the special HKEY_CLASSES_ROOT key */
|
2014-07-15 12:34:39 +02:00
|
|
|
static HKEY create_classes_root_hkey(DWORD access)
|
2012-11-26 15:20:13 +01:00
|
|
|
{
|
|
|
|
HKEY hkey, ret = 0;
|
|
|
|
OBJECT_ATTRIBUTES attr;
|
|
|
|
UNICODE_STRING name;
|
|
|
|
|
|
|
|
attr.Length = sizeof(attr);
|
|
|
|
attr.RootDirectory = 0;
|
|
|
|
attr.ObjectName = &name;
|
|
|
|
attr.Attributes = 0;
|
|
|
|
attr.SecurityDescriptor = NULL;
|
|
|
|
attr.SecurityQualityOfService = NULL;
|
2020-11-26 22:20:04 +01:00
|
|
|
RtlInitUnicodeString( &name, L"\\Registry\\Machine\\Software\\Classes" );
|
2014-07-15 12:34:39 +02:00
|
|
|
if (create_key( &hkey, access, &attr )) return 0;
|
2012-11-26 15:20:13 +01:00
|
|
|
TRACE( "%s -> %p\n", debugstr_w(attr.ObjectName->Buffer), hkey );
|
|
|
|
|
2014-07-15 12:34:39 +02:00
|
|
|
if (!(access & KEY_WOW64_64KEY))
|
|
|
|
{
|
|
|
|
if (!(ret = InterlockedCompareExchangePointer( (void **)&classes_root_hkey, hkey, 0 )))
|
|
|
|
ret = hkey;
|
|
|
|
else
|
|
|
|
NtClose( hkey ); /* somebody beat us to it */
|
|
|
|
}
|
2012-11-26 15:20:13 +01:00
|
|
|
else
|
2014-07-15 12:34:39 +02:00
|
|
|
ret = hkey;
|
2012-11-26 15:20:13 +01:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* map the hkey from special root to normal key if necessary */
|
2014-07-15 12:34:39 +02:00
|
|
|
static inline HKEY get_classes_root_hkey( HKEY hkey, REGSAM access )
|
2012-11-26 15:20:13 +01:00
|
|
|
{
|
|
|
|
HKEY ret = hkey;
|
2014-07-15 12:34:39 +02:00
|
|
|
const BOOL is_win64 = sizeof(void*) > sizeof(int);
|
|
|
|
const BOOL force_wow32 = is_win64 && (access & KEY_WOW64_32KEY);
|
2012-11-26 15:20:13 +01:00
|
|
|
|
2014-07-15 12:34:39 +02:00
|
|
|
if (hkey == HKEY_CLASSES_ROOT &&
|
|
|
|
((access & KEY_WOW64_64KEY) || !(ret = classes_root_hkey)))
|
|
|
|
ret = create_classes_root_hkey(MAXIMUM_ALLOWED | (access & KEY_WOW64_64KEY));
|
|
|
|
if (force_wow32 && ret && ret == classes_root_hkey)
|
|
|
|
{
|
|
|
|
access &= ~KEY_WOW64_32KEY;
|
2020-11-26 22:20:04 +01:00
|
|
|
if (create_classes_key(classes_root_hkey, L"Wow6432Node", access, &hkey))
|
2014-07-15 12:34:39 +02:00
|
|
|
return 0;
|
|
|
|
ret = hkey;
|
|
|
|
}
|
2012-11-26 15:20:13 +01:00
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
LSTATUS create_classes_key( HKEY hkey, const WCHAR *name, REGSAM access, HKEY *retkey )
|
|
|
|
{
|
|
|
|
OBJECT_ATTRIBUTES attr;
|
|
|
|
UNICODE_STRING nameW;
|
|
|
|
|
2014-07-15 12:34:39 +02:00
|
|
|
if (!(hkey = get_classes_root_hkey( hkey, access ))) return ERROR_INVALID_HANDLE;
|
2012-11-26 15:20:13 +01:00
|
|
|
|
|
|
|
attr.Length = sizeof(attr);
|
|
|
|
attr.RootDirectory = hkey;
|
|
|
|
attr.ObjectName = &nameW;
|
|
|
|
attr.Attributes = 0;
|
|
|
|
attr.SecurityDescriptor = NULL;
|
|
|
|
attr.SecurityQualityOfService = NULL;
|
|
|
|
RtlInitUnicodeString( &nameW, name );
|
|
|
|
|
|
|
|
return RtlNtStatusToDosError( create_key( retkey, access, &attr ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
LSTATUS open_classes_key( HKEY hkey, const WCHAR *name, REGSAM access, HKEY *retkey )
|
|
|
|
{
|
|
|
|
OBJECT_ATTRIBUTES attr;
|
|
|
|
UNICODE_STRING nameW;
|
|
|
|
|
2014-07-15 12:34:39 +02:00
|
|
|
if (!(hkey = get_classes_root_hkey( hkey, access ))) return ERROR_INVALID_HANDLE;
|
2012-11-26 15:20:13 +01:00
|
|
|
|
|
|
|
attr.Length = sizeof(attr);
|
|
|
|
attr.RootDirectory = hkey;
|
|
|
|
attr.ObjectName = &nameW;
|
|
|
|
attr.Attributes = 0;
|
|
|
|
attr.SecurityDescriptor = NULL;
|
|
|
|
attr.SecurityQualityOfService = NULL;
|
|
|
|
RtlInitUnicodeString( &nameW, name );
|
|
|
|
|
|
|
|
return RtlNtStatusToDosError( NtOpenKey( (HANDLE *)retkey, access, &attr ) );
|
|
|
|
}
|
|
|
|
|
2011-05-30 12:45:31 +02:00
|
|
|
/******************************************************************************
|
|
|
|
* Implementation of the manual reset event object. (CLSID_ManualResetEvent)
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef struct ManualResetEvent {
|
2012-08-13 11:41:02 +02:00
|
|
|
ISynchronize ISynchronize_iface;
|
|
|
|
ISynchronizeHandle ISynchronizeHandle_iface;
|
2011-05-30 12:45:31 +02:00
|
|
|
LONG ref;
|
|
|
|
HANDLE event;
|
|
|
|
} MREImpl;
|
|
|
|
|
|
|
|
static inline MREImpl *impl_from_ISynchronize(ISynchronize *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, MREImpl, ISynchronize_iface);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI ISynchronize_fnQueryInterface(ISynchronize *iface, REFIID riid, void **ppv)
|
|
|
|
{
|
|
|
|
MREImpl *This = impl_from_ISynchronize(iface);
|
2012-08-13 11:41:02 +02:00
|
|
|
|
2011-05-30 12:45:31 +02:00
|
|
|
TRACE("%p (%s, %p)\n", This, debugstr_guid(riid), ppv);
|
|
|
|
|
2012-08-13 11:41:02 +02:00
|
|
|
if(IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_ISynchronize)) {
|
|
|
|
*ppv = &This->ISynchronize_iface;
|
|
|
|
}else if(IsEqualGUID(riid, &IID_ISynchronizeHandle)) {
|
|
|
|
*ppv = &This->ISynchronizeHandle_iface;
|
|
|
|
}else {
|
2011-05-30 12:45:31 +02:00
|
|
|
ERR("Unknown interface %s requested.\n", debugstr_guid(riid));
|
2012-08-13 11:41:02 +02:00
|
|
|
*ppv = NULL;
|
|
|
|
return E_NOINTERFACE;
|
2011-05-30 12:45:31 +02:00
|
|
|
}
|
|
|
|
|
2012-08-13 11:41:02 +02:00
|
|
|
IUnknown_AddRef((IUnknown*)*ppv);
|
|
|
|
return S_OK;
|
2011-05-30 12:45:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI ISynchronize_fnAddRef(ISynchronize *iface)
|
|
|
|
{
|
|
|
|
MREImpl *This = impl_from_ISynchronize(iface);
|
|
|
|
LONG ref = InterlockedIncrement(&This->ref);
|
|
|
|
TRACE("%p - ref %d\n", This, ref);
|
|
|
|
|
|
|
|
return ref;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI ISynchronize_fnRelease(ISynchronize *iface)
|
|
|
|
{
|
|
|
|
MREImpl *This = impl_from_ISynchronize(iface);
|
|
|
|
LONG ref = InterlockedDecrement(&This->ref);
|
|
|
|
TRACE("%p - ref %d\n", This, ref);
|
|
|
|
|
|
|
|
if(!ref)
|
|
|
|
{
|
|
|
|
CloseHandle(This->event);
|
|
|
|
HeapFree(GetProcessHeap(), 0, This);
|
|
|
|
}
|
|
|
|
|
|
|
|
return ref;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI ISynchronize_fnWait(ISynchronize *iface, DWORD dwFlags, DWORD dwMilliseconds)
|
|
|
|
{
|
|
|
|
MREImpl *This = impl_from_ISynchronize(iface);
|
|
|
|
UINT index;
|
|
|
|
TRACE("%p (%08x, %08x)\n", This, dwFlags, dwMilliseconds);
|
|
|
|
return CoWaitForMultipleHandles(dwFlags, dwMilliseconds, 1, &This->event, &index);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI ISynchronize_fnSignal(ISynchronize *iface)
|
|
|
|
{
|
|
|
|
MREImpl *This = impl_from_ISynchronize(iface);
|
|
|
|
TRACE("%p\n", This);
|
|
|
|
SetEvent(This->event);
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI ISynchronize_fnReset(ISynchronize *iface)
|
|
|
|
{
|
|
|
|
MREImpl *This = impl_from_ISynchronize(iface);
|
|
|
|
TRACE("%p\n", This);
|
|
|
|
ResetEvent(This->event);
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ISynchronizeVtbl vt_ISynchronize = {
|
|
|
|
ISynchronize_fnQueryInterface,
|
|
|
|
ISynchronize_fnAddRef,
|
|
|
|
ISynchronize_fnRelease,
|
|
|
|
ISynchronize_fnWait,
|
|
|
|
ISynchronize_fnSignal,
|
|
|
|
ISynchronize_fnReset
|
2020-08-25 17:18:15 +02:00
|
|
|
};
|
2007-05-17 18:06:16 +02:00
|
|
|
|
2020-08-25 17:18:15 +02:00
|
|
|
static inline MREImpl *impl_from_ISynchronizeHandle(ISynchronizeHandle *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, MREImpl, ISynchronizeHandle_iface);
|
|
|
|
}
|
2007-05-17 18:06:16 +02:00
|
|
|
|
2020-08-25 17:18:15 +02:00
|
|
|
static HRESULT WINAPI SynchronizeHandle_QueryInterface(ISynchronizeHandle *iface, REFIID riid, void **ppv)
|
|
|
|
{
|
|
|
|
MREImpl *This = impl_from_ISynchronizeHandle(iface);
|
|
|
|
return ISynchronize_QueryInterface(&This->ISynchronize_iface, riid, ppv);
|
|
|
|
}
|
2007-05-17 18:06:16 +02:00
|
|
|
|
2020-08-25 17:18:15 +02:00
|
|
|
static ULONG WINAPI SynchronizeHandle_AddRef(ISynchronizeHandle *iface)
|
|
|
|
{
|
|
|
|
MREImpl *This = impl_from_ISynchronizeHandle(iface);
|
|
|
|
return ISynchronize_AddRef(&This->ISynchronize_iface);
|
2007-05-17 18:06:16 +02:00
|
|
|
}
|
|
|
|
|
2020-08-25 17:18:15 +02:00
|
|
|
static ULONG WINAPI SynchronizeHandle_Release(ISynchronizeHandle *iface)
|
2007-05-17 18:06:16 +02:00
|
|
|
{
|
2020-08-25 17:18:15 +02:00
|
|
|
MREImpl *This = impl_from_ISynchronizeHandle(iface);
|
|
|
|
return ISynchronize_Release(&This->ISynchronize_iface);
|
|
|
|
}
|
2007-05-17 18:06:16 +02:00
|
|
|
|
2020-08-25 17:18:15 +02:00
|
|
|
static HRESULT WINAPI SynchronizeHandle_GetHandle(ISynchronizeHandle *iface, HANDLE *ph)
|
|
|
|
{
|
|
|
|
MREImpl *This = impl_from_ISynchronizeHandle(iface);
|
2007-05-17 18:06:16 +02:00
|
|
|
|
2020-08-25 17:18:15 +02:00
|
|
|
*ph = This->event;
|
|
|
|
return S_OK;
|
|
|
|
}
|
2007-05-17 18:06:16 +02:00
|
|
|
|
2020-08-25 17:18:15 +02:00
|
|
|
static const ISynchronizeHandleVtbl SynchronizeHandleVtbl = {
|
|
|
|
SynchronizeHandle_QueryInterface,
|
|
|
|
SynchronizeHandle_AddRef,
|
|
|
|
SynchronizeHandle_Release,
|
|
|
|
SynchronizeHandle_GetHandle
|
|
|
|
};
|
2007-05-17 18:06:16 +02:00
|
|
|
|
2020-08-25 17:18:15 +02:00
|
|
|
HRESULT WINAPI ManualResetEvent_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID iid, void **ppv)
|
|
|
|
{
|
|
|
|
MREImpl *This = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(MREImpl));
|
|
|
|
HRESULT hr;
|
2007-05-17 18:06:16 +02:00
|
|
|
|
2020-08-25 17:18:15 +02:00
|
|
|
if (outer)
|
|
|
|
FIXME("Aggregation not implemented.\n");
|
2007-05-17 18:06:16 +02:00
|
|
|
|
2020-08-25 17:18:15 +02:00
|
|
|
This->ref = 1;
|
|
|
|
This->ISynchronize_iface.lpVtbl = &vt_ISynchronize;
|
|
|
|
This->ISynchronizeHandle_iface.lpVtbl = &SynchronizeHandleVtbl;
|
|
|
|
This->event = CreateEventW(NULL, TRUE, FALSE, NULL);
|
2007-05-17 18:06:16 +02:00
|
|
|
|
2020-08-25 17:18:15 +02:00
|
|
|
hr = ISynchronize_QueryInterface(&This->ISynchronize_iface, iid, ppv);
|
|
|
|
ISynchronize_Release(&This->ISynchronize_iface);
|
2007-04-04 19:53:36 +02:00
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
1998-10-11 16:21:42 +02:00
|
|
|
/******************************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* CoBuildVersion [OLE32.@]
|
2005-01-14 18:05:36 +01:00
|
|
|
*
|
|
|
|
* Gets the build version of the DLL.
|
|
|
|
*
|
|
|
|
* PARAMS
|
2002-08-03 02:17:10 +02:00
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Current build version, hiword is majornumber, loword is minornumber
|
Release 950620
Mon Jun 19 20:29:50 1995 Alexandre Julliard (julliard@sunsite.unc.edu)
* [debugger/*.c]
Modified debugger to use segmented pointers everywhere.
* [if1632/shell.spec] [if1632/sound.spec] [if1632/user.spec]
Declared all functions that return only 16-bit as 'pascal16'.
* [include/ldt.h] [memory/ldt.c]
Export LDT_EntryToBytes (new) and LDT_BytesToEntry for DPMI.
Maintain a copy of the selector flags, removing the need to make a
system call to retrieve an LDT entry.
* [loader/module.c]
Fixed bug with module file handle cache.
* [loader/ne_resource.c]
Fixed file name bug in NE_AccessResource().
* [loader/resource.c]
Fixed bug in LoadIcon() that caused wrong colors to be used for
the icon mask.
* [loader/signal.c]
Moved instruction emulation to miscemu/instr.c.
* [misc/dos_fs.c] [miscemu/int21.c]
Lots of small fixes, thanks to Morten Welinder.
* [miscemu/dpmi.c]
More complete DPMI emulation.
* [miscemu/instr.c]
Added support for prefixes in instructions to emulate.
* [miscemu/int2f.c]
Use register macros instead of destroying the high part of 32-bit
registers.
* [objects/dc.c]
Fixed bug in GetDCState() that failed to clear the new DC.
* [rc/sysres.rc]
Removed dialogs 11 and 12 that were never used.
* [tools/build.c]
'pascal16' generated functions did not save %dx.
Removed use of %fs to access the stack.
%ds is no longer initialized before calling a 16-bit routine.
* [windows/defwnd.c]
Accept a NULL pointer as window title.
* [windows/mdi.c]
MDICascade: skip iconic windows.
Implemented CalcChildScroll().
* [windows/utility.c]
Fixed MulDiv() for illegal values.
* [windows/win.c]
Fixed X error in CreateWindowEx() when WM_NCCALCSIZE returned
a zero width or height.
Sun Jun 18 22:22:30 MET DST 1995 Fons Botman (botman@inter.nl.net)
* [controls/edit.c]
Fixed "uninitalized" message which -Wall couldnt see to be ok
in EDIT_WriteText.
* [include/debug.h]
Added define for extra checks in API definitions during debugging.
* [loader/ne_image.c]
Added newline in NE_FixupPrologs to avoid long lines.
* [misc/dos_fs.c]
Added extra safety check in DOS_ValidDrive.
* [misc/exec.c]
Fixed definition of ExitWindows.
Sun Jun 18 21:16:08 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Some fixes, mostly for memory management, but also for text selection
and tab postitions. General cleanup. Notepad.exe now works.
* [controls/combo.c]
Fix: the hwnd field of the DRAWITEMSTRUCT should always be that of
the combo box, not the ComboLBox that belongs to it.
* [controls/listbox.c]
Handle itemID field correctly throughout.
* [memory/local.c]
Implemented flag LMEM_ZEROINIT.
LocalReAlloc() could trash the heap. Fixed.
* [objects/font.c]
FONT_MatchFont(): don't get confused by negative widths.
Fixed a segfault in EnumFonts().
* [objects/text.c]
DrawText(): DT_CALCRECT implies DT_NOCLIP.
* [objects/dcvalues.c]
MAKELONG was used with bad parameters in DC_GET_X_Y.
* [windows/dialog.c]
Don't show the dialog if WS_VISIBLE isn't set in the template.
* [windows/utility.c]
UTILITY_convertArgs(): Never pass an expression containing ++ into a
macro...
* [windows/win.c]
SetParent() should unlink the window before changing the parent.
* [windows/message.c]
Don't call timer functions via CallWindowProc(), since it checks
whether hwnd==0 and does not call the function in that case.
* [miscemu/instr.c]
Ignore interrupt 0x3D, for VBRUN300.DLL.
* [misc/commdlg.c]
Don't rely on the itemData field of the DRAWITEMSTRUCT to contain a
pointer to the item text.
* [if1632/relay.c]
Disable OLE and DDEML DLLs by default, since they contain nothing but
stubs anyway. SHELL, COMMDLG and WIN87EM are left enabled, although
some programs may work better without them.
* [multimedia/*.c] [include/multimedia.h] [include/driver.h]
Begun cleaning things up a little. Replaced printfs with dprintf_
macros, made functions static where possible, and some other minor
changes.
Sun Jun 11 23:19:10 1995 Martin von Loewis <martin@informatik.hu-berlin.de>
* [debugger/dbg.y][debugger/dbg.l]
Removed special handling for FILE_IDENTIFER, because it caused
problems with x/<format> statements.
* [debugger/info.c]
Use SC_ESP instead of SC_EIP for stack dump.
* [misc/compobj.c][if1632/compobj.spec]
CoBuildVersion, CoInitialize, CoUninitialize: new functions
* [misc/ole2.c][if1632/ole2.spec][misc/Imakefile][include/ole2.h]
New files ole2.c, ole2.h
OleBuildVersion, OleInitialize, OleUninitialize: new functions
* [if1632/ole2disp.spec]
Added missing ordinals above 109
* [misc/ole2nls.c][if1632/ole2nls.spec][include/winnls.h]
New file winnls.h
GetLocaleInfoA: new function
* [if1632/shell.spec]
Added FindEnvironmentString as stub
* [misc/olecli.c][if1632/olecli.spec]
OleIsDcMeta: New function
* [objects/font][misc/gdi.spec]
GetKerningPairs: new function
* [misc/shell.c]
ShellExecute: Implemented support for starting programs
* [if1632/user.spec]
Inserted missing relay to GetClipCursor
Sun Jun 11 20:34:47 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Fix a problem with the local heap.
* [include/wintypes.h]
Fixed wrong declarations of CATCHBUF and LPCATCHBUF.
* [include/mdi.h] [windows/mdi.c]
This code still assumed segmented address==linear address. Fixed.
* [include/msdos.h] [misc/dos_fs.c]
The filemask field of the dosdirent structure could be overrun. Fixed.
If you had a file called foobar and a file called foo, trying to
FindFile(foo) could accidentally find file foobar instead. Fixed.
* [misc/file.c]
OpenFile(): Always return the full pathname in ofs->szPathName. This
also fixes GetModuleFilename().
Prevent _lclose() from closing stderr or stdout.
* [misc/profile.c]
Search for .ini files in the path of the current module as well.
(Needed by Lotus Organizer.)
* [loader/task.c] [loader/ne_image.c] [loader/module.c]
[memory/local.c]
Local heaps are now initialized by InitTask() for executables. DLLs
have to call LocalInit() themselves, LocalInit() has to put the
heap at the end of the segment when called with start==0. We no longer
allocate the DGROUP with 64k on startup, but grow the local heap
in LOCAL_GetBlock() when necessary.
* [loader/module.c]
LoadLibrary() should call LoadModule() in all cases, even if the
DLL is already loaded, to ensure that the reference count is correct.
* [loader/ne_image.c]
Some changes to function prolog fixup. Does anyone know exactly how
this is supposed to work? I am only guessing here.
In NE_InitializeDLLs(), initialize the DLLs a module refers to before
the module itself.
* [loader/task.c]
Initialize instance data at the beginning of the DGROUP in InitTask().
* [memory/local.c]
Some fixes for moveable blocks.
* [memory/selector.c]
All the IsBad*Pointer() functions returned exactly the wrong boolean
value in all cases!
* [objects/bitblt.c]
Fixed another null pointer dereference in debugging output.
* [objects/font.c]
Some more recovery possibilities for FONT_MatchFont() if a specified
font does not exist.
* [windows/win.c]
The dialog code may call CreateWindowEx with an integer in windowName.
This happens for static icon controls that expect a resource ID as
the window name. CreateWindowEx() used to crash. Fixed.
* [windows/class.c] [windows/win.c]
Window classes are owned by modules, not instances. Changed
RegisterClass(), UnregisterClass(), GetClassInfo() and CreateWindowEx()
accordingly.
Sat Jun 10 16:10:53 1995 Olaf Flebbe <o.flebbe@science-computing.uni-tuebingen.de>
* [miscemu/int21.c]
clock.exe was displaying incorrect year.
Fri Jun 9 20:36:56 1995 Victor Schneider <tailor@crl.com>
* [include/cursor.h] [windows/cursor.c]
Implemented CreateCursorIconIndirect().
1995-06-20 21:08:12 +02:00
|
|
|
*/
|
2002-08-03 02:17:10 +02:00
|
|
|
DWORD WINAPI CoBuildVersion(void)
|
|
|
|
{
|
|
|
|
TRACE("Returning version %d, build %d.\n", rmm, rup);
|
|
|
|
return (rmm<<16)+rup;
|
Release 980301
Sun Mar 1 10:45:23 1998 Andreas Mohr <100.30936@germany.net>
* [loader/ne_image.c]
Fixed problem with weird DLLs (NE_FFLAGS_SINGLEDATA && DGROUP = 0).
* [msdos/dosmem.c]
Export address for __0000H, too.
* [msdos/dpmi.c]
Changed MemAlloc functions to return less fragmented addresses.
Sat Feb 28 18:50:12 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [scheduler/process.c] [scheduler/sysdeps.c]
Don't use %fs register before threading initialization.
Sat Feb 28 14:04:56 1998 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [configure.in] [include/acconfig.h]
Autoconf macro to check for non-reentrant X libraries.
* [windows/winpos.c]
In SetWindowPos32(), do not cause WM_SIZE messages when the
SWP_NOSIZE flag is specified. This fixes the division-by-zero in
Borland C++ 4.0 "Open Project" menu item.
Sat Feb 28 13:11:26 1998 James Moody <013263m@dragon.acadiau.ca>
* [ole/ole2nls.c]
Changed "English" values from German to English.
* [files/dos_fs.c]
Fixed off-by-one month bug.
Fri Feb 27 22:12:01 1998 Douglas Ridgway <ridgway@winehq.com>
* [windows/win.c]
Fix winelib class menu loading bug.
* [include/module.h] [loader/module.c]
LoadModule32 should be implemented in terms of CreateProcess.
* [programs/view/*]
Metafile viewer sample program.
* [documentation/wine.texinfo] [documentation/Makefile.in]
Improvements and additions, HTML target.
Fri Feb 27 04:27:48 1998 Dimitrie O. Paun <dimi@cs.toronto.edu>
* [*/*]
Switched to the new debug messages interface. For more information
please refer to documentation/debug-msgs. Because the new scheme
introduces a new semantic level, I had to manually do through
about 530 dprintf_xxx! The rest of about 2400 where transformed
via a script. Because of the large number of changes that I had
to do, some may have not come out as nicely as I wanted them. If
this is the case, please let me know. There is a lot of work left
to do: -- a few hundred printf's to be converted -- about 2300
fprintf's to be converted -- about 600 FIXME's to be transformed
The problem is that in the above mentioned cases, a lot of manual
intervention is required because a lot of the information is
missing. There are also a lot of other things to be done to the
interface and so forth. I have now ideas for a at least a month
worth of full time work :) I will proceed with many changes in the
next few releases, so please do not start modifing things because
there will be a hell of a lot of conflicts. If you have ideas that
you want to integrate or you want to work on different things,
please coordinate with me.
Thu Feb 26 13:04:29 1998 David Lee Lambert <lamber45@egr.msu.edu>
* [ole/ole2nls.c] [include/windows.h]
First try at OLE date- and time-formatting functions.
Wed Feb 25 11:20:35 1998 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/*.c]
Changed dos device handling, added 'CON' devicehandling.
* [graphics/ddraw.c]
Bug fixes, some additions.
* [if1632/builtin.c][loader/module.c][library/winestub.c]
Small hack so we don't need a dummy BUILTIN_LoadModule
in winestub.c.
* [ole/*][relay32/ole32.spec][if1632/storage.spec]
storage.dll started. winword loads documents (saving
doesn't work yet, dunno why).
Several ole additions, some cleanups and bugfixes.
IMalloc16 implemented.
* [loader/pe_image.c]
Added some comments, fixed circular dll references,
fixed modref ordering, fixed tls allocation.
* [memory/global.c]
Added validity checks before every GET_ARENA_PTR.
(several functions rely on Global* return values
on invalid handles, like IsTask).
Implemented GlobalUnlockFree16.
* [memory/virtual.c]
Replaced dprintf_virtual by fprintf, so we can
do 'info map' again in the debugger. Increase read
linesize for Linux2.1 cases.
* [misc/cpu.c][misc/registry.c]
Moved cpu registry initialization to misc/cpu.c.
* [multimedia/dsound.c]
Enhanced, replaced GETOSPACE bufferingcheck by SETFRAGMENT.
* [relay32/crtdll.spec][relay32/ntdll.spec]
Replaced some ptr by respective 'str' and 'wstr' arguments
for libc functions.
* [scheduler/thread.c]
Added some sanity checks to stackallocation, tlshandling fixed.
* [tools/build.c]
Fixed cdecl argumenttype order (was reversed).
* [win32/ordinals.c]
Implemented KERNEL_449.
* [windows/dinput.c]
Some fixes, needs much more work. Tomb Raider2 works with keyboard ;)
Tue Feb 24 20:46:37 1998 James Juran <jrj120@psu.edu>
* [windows/win.c]
Fixed USER32 ordinal numbers in documentation.
Sat Feb 21 12:30:38 1998 John Richardson <jrichard@zko.dec.com>
* [files/file.c] [include/k32obj.h] [memory/virtual.c]
[scheduler/critsection.c] [scheduler/event.c] [scheduler/handle.c]
[scheduler/k32obj.c] [scheduler/mutex.c] [scheduler/process.c]
[scheduler/semaphore.c] [scheduler/thread.c]
Added generic k32obj read and write routines for k32objs that
support I/O.
* [documentation/console]
Updated console docs.
* [win32/console.c]
Make console work like a k32obj that supports I/O.
* [include/windows.h]
Make WriteFile and ReadFile take HANDLE32 for handle.
Sun Feb 15 14:07:07 1998 Dimitrie O. Paun <dimi@mail.cs.toronto.edu>
* [controls/menu.c] [misc/ver.c] [multimedia/dsound.c]
[multimedia/joystick.c] [windows/dialog.c]
Modified some dprintf_xxx's to prepare them for a new
dprintf_ scheme. Basically, I changed the dprintf's that
outputed a line with many dprintf calls to do just one
dprintf call.
1998-03-01 21:05:02 +01:00
|
|
|
}
|
|
|
|
|
1998-10-11 16:21:42 +02:00
|
|
|
/******************************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* CoInitialize [OLE32.@]
|
1999-01-17 17:32:32 +01:00
|
|
|
*
|
2004-11-29 18:00:15 +01:00
|
|
|
* Initializes the COM libraries by calling CoInitializeEx with
|
|
|
|
* COINIT_APARTMENTTHREADED, ie it enters a STA thread.
|
1999-01-17 17:32:32 +01:00
|
|
|
*
|
2005-01-14 18:05:36 +01:00
|
|
|
* PARAMS
|
|
|
|
* lpReserved [I] Pointer to IMalloc interface (obsolete, should be NULL).
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: S_OK if not already initialized, S_FALSE otherwise.
|
|
|
|
* Failure: HRESULT code.
|
|
|
|
*
|
2004-11-29 18:00:15 +01:00
|
|
|
* SEE ALSO
|
|
|
|
* CoInitializeEx
|
Release 980301
Sun Mar 1 10:45:23 1998 Andreas Mohr <100.30936@germany.net>
* [loader/ne_image.c]
Fixed problem with weird DLLs (NE_FFLAGS_SINGLEDATA && DGROUP = 0).
* [msdos/dosmem.c]
Export address for __0000H, too.
* [msdos/dpmi.c]
Changed MemAlloc functions to return less fragmented addresses.
Sat Feb 28 18:50:12 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [scheduler/process.c] [scheduler/sysdeps.c]
Don't use %fs register before threading initialization.
Sat Feb 28 14:04:56 1998 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [configure.in] [include/acconfig.h]
Autoconf macro to check for non-reentrant X libraries.
* [windows/winpos.c]
In SetWindowPos32(), do not cause WM_SIZE messages when the
SWP_NOSIZE flag is specified. This fixes the division-by-zero in
Borland C++ 4.0 "Open Project" menu item.
Sat Feb 28 13:11:26 1998 James Moody <013263m@dragon.acadiau.ca>
* [ole/ole2nls.c]
Changed "English" values from German to English.
* [files/dos_fs.c]
Fixed off-by-one month bug.
Fri Feb 27 22:12:01 1998 Douglas Ridgway <ridgway@winehq.com>
* [windows/win.c]
Fix winelib class menu loading bug.
* [include/module.h] [loader/module.c]
LoadModule32 should be implemented in terms of CreateProcess.
* [programs/view/*]
Metafile viewer sample program.
* [documentation/wine.texinfo] [documentation/Makefile.in]
Improvements and additions, HTML target.
Fri Feb 27 04:27:48 1998 Dimitrie O. Paun <dimi@cs.toronto.edu>
* [*/*]
Switched to the new debug messages interface. For more information
please refer to documentation/debug-msgs. Because the new scheme
introduces a new semantic level, I had to manually do through
about 530 dprintf_xxx! The rest of about 2400 where transformed
via a script. Because of the large number of changes that I had
to do, some may have not come out as nicely as I wanted them. If
this is the case, please let me know. There is a lot of work left
to do: -- a few hundred printf's to be converted -- about 2300
fprintf's to be converted -- about 600 FIXME's to be transformed
The problem is that in the above mentioned cases, a lot of manual
intervention is required because a lot of the information is
missing. There are also a lot of other things to be done to the
interface and so forth. I have now ideas for a at least a month
worth of full time work :) I will proceed with many changes in the
next few releases, so please do not start modifing things because
there will be a hell of a lot of conflicts. If you have ideas that
you want to integrate or you want to work on different things,
please coordinate with me.
Thu Feb 26 13:04:29 1998 David Lee Lambert <lamber45@egr.msu.edu>
* [ole/ole2nls.c] [include/windows.h]
First try at OLE date- and time-formatting functions.
Wed Feb 25 11:20:35 1998 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/*.c]
Changed dos device handling, added 'CON' devicehandling.
* [graphics/ddraw.c]
Bug fixes, some additions.
* [if1632/builtin.c][loader/module.c][library/winestub.c]
Small hack so we don't need a dummy BUILTIN_LoadModule
in winestub.c.
* [ole/*][relay32/ole32.spec][if1632/storage.spec]
storage.dll started. winword loads documents (saving
doesn't work yet, dunno why).
Several ole additions, some cleanups and bugfixes.
IMalloc16 implemented.
* [loader/pe_image.c]
Added some comments, fixed circular dll references,
fixed modref ordering, fixed tls allocation.
* [memory/global.c]
Added validity checks before every GET_ARENA_PTR.
(several functions rely on Global* return values
on invalid handles, like IsTask).
Implemented GlobalUnlockFree16.
* [memory/virtual.c]
Replaced dprintf_virtual by fprintf, so we can
do 'info map' again in the debugger. Increase read
linesize for Linux2.1 cases.
* [misc/cpu.c][misc/registry.c]
Moved cpu registry initialization to misc/cpu.c.
* [multimedia/dsound.c]
Enhanced, replaced GETOSPACE bufferingcheck by SETFRAGMENT.
* [relay32/crtdll.spec][relay32/ntdll.spec]
Replaced some ptr by respective 'str' and 'wstr' arguments
for libc functions.
* [scheduler/thread.c]
Added some sanity checks to stackallocation, tlshandling fixed.
* [tools/build.c]
Fixed cdecl argumenttype order (was reversed).
* [win32/ordinals.c]
Implemented KERNEL_449.
* [windows/dinput.c]
Some fixes, needs much more work. Tomb Raider2 works with keyboard ;)
Tue Feb 24 20:46:37 1998 James Juran <jrj120@psu.edu>
* [windows/win.c]
Fixed USER32 ordinal numbers in documentation.
Sat Feb 21 12:30:38 1998 John Richardson <jrichard@zko.dec.com>
* [files/file.c] [include/k32obj.h] [memory/virtual.c]
[scheduler/critsection.c] [scheduler/event.c] [scheduler/handle.c]
[scheduler/k32obj.c] [scheduler/mutex.c] [scheduler/process.c]
[scheduler/semaphore.c] [scheduler/thread.c]
Added generic k32obj read and write routines for k32objs that
support I/O.
* [documentation/console]
Updated console docs.
* [win32/console.c]
Make console work like a k32obj that supports I/O.
* [include/windows.h]
Make WriteFile and ReadFile take HANDLE32 for handle.
Sun Feb 15 14:07:07 1998 Dimitrie O. Paun <dimi@mail.cs.toronto.edu>
* [controls/menu.c] [misc/ver.c] [multimedia/dsound.c]
[multimedia/joystick.c] [windows/dialog.c]
Modified some dprintf_xxx's to prepare them for a new
dprintf_ scheme. Basically, I changed the dprintf's that
outputed a line with many dprintf calls to do just one
dprintf call.
1998-03-01 21:05:02 +01:00
|
|
|
*/
|
2005-01-14 18:05:36 +01:00
|
|
|
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
|
1999-01-30 14:36:55 +01:00
|
|
|
{
|
|
|
|
/*
|
|
|
|
* Just delegate to the newer method.
|
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
return CoInitializeEx(lpReserved, COINIT_APARTMENTTHREADED);
|
Release 950620
Mon Jun 19 20:29:50 1995 Alexandre Julliard (julliard@sunsite.unc.edu)
* [debugger/*.c]
Modified debugger to use segmented pointers everywhere.
* [if1632/shell.spec] [if1632/sound.spec] [if1632/user.spec]
Declared all functions that return only 16-bit as 'pascal16'.
* [include/ldt.h] [memory/ldt.c]
Export LDT_EntryToBytes (new) and LDT_BytesToEntry for DPMI.
Maintain a copy of the selector flags, removing the need to make a
system call to retrieve an LDT entry.
* [loader/module.c]
Fixed bug with module file handle cache.
* [loader/ne_resource.c]
Fixed file name bug in NE_AccessResource().
* [loader/resource.c]
Fixed bug in LoadIcon() that caused wrong colors to be used for
the icon mask.
* [loader/signal.c]
Moved instruction emulation to miscemu/instr.c.
* [misc/dos_fs.c] [miscemu/int21.c]
Lots of small fixes, thanks to Morten Welinder.
* [miscemu/dpmi.c]
More complete DPMI emulation.
* [miscemu/instr.c]
Added support for prefixes in instructions to emulate.
* [miscemu/int2f.c]
Use register macros instead of destroying the high part of 32-bit
registers.
* [objects/dc.c]
Fixed bug in GetDCState() that failed to clear the new DC.
* [rc/sysres.rc]
Removed dialogs 11 and 12 that were never used.
* [tools/build.c]
'pascal16' generated functions did not save %dx.
Removed use of %fs to access the stack.
%ds is no longer initialized before calling a 16-bit routine.
* [windows/defwnd.c]
Accept a NULL pointer as window title.
* [windows/mdi.c]
MDICascade: skip iconic windows.
Implemented CalcChildScroll().
* [windows/utility.c]
Fixed MulDiv() for illegal values.
* [windows/win.c]
Fixed X error in CreateWindowEx() when WM_NCCALCSIZE returned
a zero width or height.
Sun Jun 18 22:22:30 MET DST 1995 Fons Botman (botman@inter.nl.net)
* [controls/edit.c]
Fixed "uninitalized" message which -Wall couldnt see to be ok
in EDIT_WriteText.
* [include/debug.h]
Added define for extra checks in API definitions during debugging.
* [loader/ne_image.c]
Added newline in NE_FixupPrologs to avoid long lines.
* [misc/dos_fs.c]
Added extra safety check in DOS_ValidDrive.
* [misc/exec.c]
Fixed definition of ExitWindows.
Sun Jun 18 21:16:08 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Some fixes, mostly for memory management, but also for text selection
and tab postitions. General cleanup. Notepad.exe now works.
* [controls/combo.c]
Fix: the hwnd field of the DRAWITEMSTRUCT should always be that of
the combo box, not the ComboLBox that belongs to it.
* [controls/listbox.c]
Handle itemID field correctly throughout.
* [memory/local.c]
Implemented flag LMEM_ZEROINIT.
LocalReAlloc() could trash the heap. Fixed.
* [objects/font.c]
FONT_MatchFont(): don't get confused by negative widths.
Fixed a segfault in EnumFonts().
* [objects/text.c]
DrawText(): DT_CALCRECT implies DT_NOCLIP.
* [objects/dcvalues.c]
MAKELONG was used with bad parameters in DC_GET_X_Y.
* [windows/dialog.c]
Don't show the dialog if WS_VISIBLE isn't set in the template.
* [windows/utility.c]
UTILITY_convertArgs(): Never pass an expression containing ++ into a
macro...
* [windows/win.c]
SetParent() should unlink the window before changing the parent.
* [windows/message.c]
Don't call timer functions via CallWindowProc(), since it checks
whether hwnd==0 and does not call the function in that case.
* [miscemu/instr.c]
Ignore interrupt 0x3D, for VBRUN300.DLL.
* [misc/commdlg.c]
Don't rely on the itemData field of the DRAWITEMSTRUCT to contain a
pointer to the item text.
* [if1632/relay.c]
Disable OLE and DDEML DLLs by default, since they contain nothing but
stubs anyway. SHELL, COMMDLG and WIN87EM are left enabled, although
some programs may work better without them.
* [multimedia/*.c] [include/multimedia.h] [include/driver.h]
Begun cleaning things up a little. Replaced printfs with dprintf_
macros, made functions static where possible, and some other minor
changes.
Sun Jun 11 23:19:10 1995 Martin von Loewis <martin@informatik.hu-berlin.de>
* [debugger/dbg.y][debugger/dbg.l]
Removed special handling for FILE_IDENTIFER, because it caused
problems with x/<format> statements.
* [debugger/info.c]
Use SC_ESP instead of SC_EIP for stack dump.
* [misc/compobj.c][if1632/compobj.spec]
CoBuildVersion, CoInitialize, CoUninitialize: new functions
* [misc/ole2.c][if1632/ole2.spec][misc/Imakefile][include/ole2.h]
New files ole2.c, ole2.h
OleBuildVersion, OleInitialize, OleUninitialize: new functions
* [if1632/ole2disp.spec]
Added missing ordinals above 109
* [misc/ole2nls.c][if1632/ole2nls.spec][include/winnls.h]
New file winnls.h
GetLocaleInfoA: new function
* [if1632/shell.spec]
Added FindEnvironmentString as stub
* [misc/olecli.c][if1632/olecli.spec]
OleIsDcMeta: New function
* [objects/font][misc/gdi.spec]
GetKerningPairs: new function
* [misc/shell.c]
ShellExecute: Implemented support for starting programs
* [if1632/user.spec]
Inserted missing relay to GetClipCursor
Sun Jun 11 20:34:47 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Fix a problem with the local heap.
* [include/wintypes.h]
Fixed wrong declarations of CATCHBUF and LPCATCHBUF.
* [include/mdi.h] [windows/mdi.c]
This code still assumed segmented address==linear address. Fixed.
* [include/msdos.h] [misc/dos_fs.c]
The filemask field of the dosdirent structure could be overrun. Fixed.
If you had a file called foobar and a file called foo, trying to
FindFile(foo) could accidentally find file foobar instead. Fixed.
* [misc/file.c]
OpenFile(): Always return the full pathname in ofs->szPathName. This
also fixes GetModuleFilename().
Prevent _lclose() from closing stderr or stdout.
* [misc/profile.c]
Search for .ini files in the path of the current module as well.
(Needed by Lotus Organizer.)
* [loader/task.c] [loader/ne_image.c] [loader/module.c]
[memory/local.c]
Local heaps are now initialized by InitTask() for executables. DLLs
have to call LocalInit() themselves, LocalInit() has to put the
heap at the end of the segment when called with start==0. We no longer
allocate the DGROUP with 64k on startup, but grow the local heap
in LOCAL_GetBlock() when necessary.
* [loader/module.c]
LoadLibrary() should call LoadModule() in all cases, even if the
DLL is already loaded, to ensure that the reference count is correct.
* [loader/ne_image.c]
Some changes to function prolog fixup. Does anyone know exactly how
this is supposed to work? I am only guessing here.
In NE_InitializeDLLs(), initialize the DLLs a module refers to before
the module itself.
* [loader/task.c]
Initialize instance data at the beginning of the DGROUP in InitTask().
* [memory/local.c]
Some fixes for moveable blocks.
* [memory/selector.c]
All the IsBad*Pointer() functions returned exactly the wrong boolean
value in all cases!
* [objects/bitblt.c]
Fixed another null pointer dereference in debugging output.
* [objects/font.c]
Some more recovery possibilities for FONT_MatchFont() if a specified
font does not exist.
* [windows/win.c]
The dialog code may call CreateWindowEx with an integer in windowName.
This happens for static icon controls that expect a resource ID as
the window name. CreateWindowEx() used to crash. Fixed.
* [windows/class.c] [windows/win.c]
Window classes are owned by modules, not instances. Changed
RegisterClass(), UnregisterClass(), GetClassInfo() and CreateWindowEx()
accordingly.
Sat Jun 10 16:10:53 1995 Olaf Flebbe <o.flebbe@science-computing.uni-tuebingen.de>
* [miscemu/int21.c]
clock.exe was displaying incorrect year.
Fri Jun 9 20:36:56 1995 Victor Schneider <tailor@crl.com>
* [include/cursor.h] [windows/cursor.c]
Implemented CreateCursorIconIndirect().
1995-06-20 21:08:12 +02:00
|
|
|
}
|
|
|
|
|
2005-11-09 11:29:11 +01:00
|
|
|
/* open HKCR\\CLSID\\{string form of clsid}\\{keyname} key */
|
|
|
|
HRESULT COM_OpenKeyForCLSID(REFCLSID clsid, LPCWSTR keyname, REGSAM access, HKEY *subkey)
|
2005-06-20 12:33:17 +02:00
|
|
|
{
|
2020-11-26 22:20:04 +01:00
|
|
|
WCHAR path[CHARS_IN_GUID + ARRAY_SIZE(L"CLSID\\") - 1];
|
2005-11-09 11:29:11 +01:00
|
|
|
LONG res;
|
|
|
|
HKEY key;
|
|
|
|
|
2020-11-26 22:20:04 +01:00
|
|
|
lstrcpyW(path, L"CLSID\\");
|
|
|
|
StringFromGUID2(clsid, path + lstrlenW(L"CLSID\\"), CHARS_IN_GUID);
|
2012-11-26 15:20:48 +01:00
|
|
|
res = open_classes_key(HKEY_CLASSES_ROOT, path, keyname ? KEY_READ : access, &key);
|
2005-11-09 11:29:11 +01:00
|
|
|
if (res == ERROR_FILE_NOT_FOUND)
|
|
|
|
return REGDB_E_CLASSNOTREG;
|
|
|
|
else if (res != ERROR_SUCCESS)
|
|
|
|
return REGDB_E_READREGDB;
|
|
|
|
|
|
|
|
if (!keyname)
|
|
|
|
{
|
|
|
|
*subkey = key;
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2012-11-26 15:20:48 +01:00
|
|
|
res = open_classes_key(key, keyname, access, subkey);
|
2005-11-09 11:29:11 +01:00
|
|
|
RegCloseKey(key);
|
2006-08-26 12:55:16 +02:00
|
|
|
if (res == ERROR_FILE_NOT_FOUND)
|
|
|
|
return REGDB_E_KEYMISSING;
|
|
|
|
else if (res != ERROR_SUCCESS)
|
|
|
|
return REGDB_E_READREGDB;
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
1998-11-01 15:47:53 +01:00
|
|
|
/***********************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* CoLoadLibrary (OLE32.@)
|
2005-01-14 18:05:36 +01:00
|
|
|
*
|
|
|
|
* Loads a library.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* lpszLibName [I] Path to library.
|
|
|
|
* bAutoFree [I] Whether the library should automatically be freed.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: Handle to loaded library.
|
|
|
|
* Failure: NULL.
|
|
|
|
*
|
|
|
|
* SEE ALSO
|
|
|
|
* CoFreeLibrary, CoFreeAllLibraries, CoFreeUnusedLibraries
|
1998-11-01 15:47:53 +01:00
|
|
|
*/
|
2002-08-03 02:17:10 +02:00
|
|
|
HINSTANCE WINAPI CoLoadLibrary(LPOLESTR lpszLibName, BOOL bAutoFree)
|
1998-11-01 15:47:53 +01:00
|
|
|
{
|
2002-08-03 02:17:10 +02:00
|
|
|
TRACE("(%s, %d)\n", debugstr_w(lpszLibName), bAutoFree);
|
2001-09-11 02:26:12 +02:00
|
|
|
|
2002-08-03 02:17:10 +02:00
|
|
|
return LoadLibraryExW(lpszLibName, 0, LOAD_WITH_ALTERED_SEARCH_PATH);
|
|
|
|
}
|
1998-11-07 13:19:26 +01:00
|
|
|
|
2002-08-03 02:17:10 +02:00
|
|
|
/***********************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* CoFreeLibrary [OLE32.@]
|
2002-08-03 02:17:10 +02:00
|
|
|
*
|
2005-01-14 18:05:36 +01:00
|
|
|
* Unloads a library from memory.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* hLibrary [I] Handle to library to unload.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Nothing
|
|
|
|
*
|
|
|
|
* SEE ALSO
|
|
|
|
* CoLoadLibrary, CoFreeAllLibraries, CoFreeUnusedLibraries
|
2002-08-03 02:17:10 +02:00
|
|
|
*/
|
|
|
|
void WINAPI CoFreeLibrary(HINSTANCE hLibrary)
|
|
|
|
{
|
2004-03-24 00:20:16 +01:00
|
|
|
FreeLibrary(hLibrary);
|
1998-11-07 13:19:26 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* CoFreeAllLibraries [OLE32.@]
|
2002-08-03 02:17:10 +02:00
|
|
|
*
|
2005-01-14 18:05:36 +01:00
|
|
|
* Function for backwards compatibility only. Does nothing.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Nothing.
|
|
|
|
*
|
|
|
|
* SEE ALSO
|
|
|
|
* CoLoadLibrary, CoFreeLibrary, CoFreeUnusedLibraries
|
1998-11-07 13:19:26 +01:00
|
|
|
*/
|
|
|
|
void WINAPI CoFreeAllLibraries(void)
|
|
|
|
{
|
2004-03-24 00:20:16 +01:00
|
|
|
/* NOP */
|
1998-11-01 15:47:53 +01:00
|
|
|
}
|
|
|
|
|
2002-08-03 02:17:10 +02:00
|
|
|
/***********************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* CoGetState [OLE32.@]
|
2002-08-03 02:17:10 +02:00
|
|
|
*
|
2005-01-12 20:48:39 +01:00
|
|
|
* Retrieves the thread state object previously stored by CoSetState().
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* ppv [I] Address where pointer to object will be stored.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: S_OK.
|
|
|
|
* Failure: E_OUTOFMEMORY.
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* Crashes on all invalid ppv addresses, including NULL.
|
|
|
|
* If the function returns a non-NULL object then the caller must release its
|
|
|
|
* reference on the object when the object is no longer required.
|
|
|
|
*
|
|
|
|
* SEE ALSO
|
|
|
|
* CoSetState().
|
1999-02-13 09:59:48 +01:00
|
|
|
*/
|
2002-08-03 02:17:10 +02:00
|
|
|
HRESULT WINAPI CoGetState(IUnknown ** ppv)
|
1999-02-13 09:59:48 +01:00
|
|
|
{
|
2005-01-12 20:48:39 +01:00
|
|
|
struct oletls *info = COM_CurrentInfo();
|
|
|
|
if (!info) return E_OUTOFMEMORY;
|
2004-02-10 02:36:20 +01:00
|
|
|
|
2005-01-05 18:14:33 +01:00
|
|
|
*ppv = NULL;
|
2001-09-11 02:26:12 +02:00
|
|
|
|
2005-01-12 20:48:39 +01:00
|
|
|
if (info->state)
|
2005-01-05 18:14:33 +01:00
|
|
|
{
|
2005-01-12 20:48:39 +01:00
|
|
|
IUnknown_AddRef(info->state);
|
|
|
|
*ppv = info->state;
|
|
|
|
TRACE("apt->state=%p\n", info->state);
|
2005-01-05 18:14:33 +01:00
|
|
|
}
|
2001-09-11 02:26:12 +02:00
|
|
|
|
2005-01-12 20:48:39 +01:00
|
|
|
return S_OK;
|
1999-02-13 09:59:48 +01:00
|
|
|
}
|
1999-06-22 21:10:52 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* CoSetState [OLE32.@]
|
1999-06-22 21:10:52 +02:00
|
|
|
*
|
2005-01-12 20:48:39 +01:00
|
|
|
* Sets the thread state object.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* pv [I] Pointer to state object to be stored.
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* The system keeps a reference on the object while the object stored.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: S_OK.
|
|
|
|
* Failure: E_OUTOFMEMORY.
|
1999-06-22 21:10:52 +02:00
|
|
|
*/
|
2002-08-03 02:17:10 +02:00
|
|
|
HRESULT WINAPI CoSetState(IUnknown * pv)
|
1999-06-22 21:10:52 +02:00
|
|
|
{
|
2005-01-12 20:48:39 +01:00
|
|
|
struct oletls *info = COM_CurrentInfo();
|
|
|
|
if (!info) return E_OUTOFMEMORY;
|
|
|
|
|
2005-01-05 18:14:33 +01:00
|
|
|
if (pv) IUnknown_AddRef(pv);
|
2004-02-10 02:36:20 +01:00
|
|
|
|
2005-01-12 20:48:39 +01:00
|
|
|
if (info->state)
|
2005-01-05 18:14:33 +01:00
|
|
|
{
|
2005-01-12 20:48:39 +01:00
|
|
|
TRACE("-- release %p now\n", info->state);
|
|
|
|
IUnknown_Release(info->state);
|
2005-01-05 18:14:33 +01:00
|
|
|
}
|
2002-08-03 02:17:10 +02:00
|
|
|
|
2005-01-12 20:48:39 +01:00
|
|
|
info->state = pv;
|
2002-08-03 02:17:10 +02:00
|
|
|
|
2005-01-05 18:14:33 +01:00
|
|
|
return S_OK;
|
1999-06-22 21:10:52 +02:00
|
|
|
}
|
2000-07-29 13:29:26 +02:00
|
|
|
|
2002-08-03 02:17:10 +02:00
|
|
|
|
2002-01-03 03:34:09 +01:00
|
|
|
/******************************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* CoTreatAsClass [OLE32.@]
|
2004-03-29 23:41:33 +02:00
|
|
|
*
|
2005-01-14 18:05:36 +01:00
|
|
|
* Sets the TreatAs value of a class.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* clsidOld [I] Class to set TreatAs value on.
|
|
|
|
* clsidNew [I] The class the clsidOld should be treated as.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: S_OK.
|
|
|
|
* Failure: HRESULT code.
|
|
|
|
*
|
|
|
|
* SEE ALSO
|
|
|
|
* CoGetTreatAsClass
|
2002-01-03 03:34:09 +01:00
|
|
|
*/
|
|
|
|
HRESULT WINAPI CoTreatAsClass(REFCLSID clsidOld, REFCLSID clsidNew)
|
|
|
|
{
|
2005-06-20 15:14:22 +02:00
|
|
|
HKEY hkey = NULL;
|
|
|
|
WCHAR szClsidNew[CHARS_IN_GUID];
|
2002-01-03 03:34:09 +01:00
|
|
|
HRESULT res = S_OK;
|
2005-06-20 15:14:22 +02:00
|
|
|
WCHAR auto_treat_as[CHARS_IN_GUID];
|
2004-03-29 23:41:33 +02:00
|
|
|
LONG auto_treat_as_size = sizeof(auto_treat_as);
|
|
|
|
CLSID id;
|
2002-01-03 03:34:09 +01:00
|
|
|
|
2005-11-09 11:29:11 +01:00
|
|
|
res = COM_OpenKeyForCLSID(clsidOld, NULL, KEY_READ | KEY_WRITE, &hkey);
|
|
|
|
if (FAILED(res))
|
|
|
|
goto done;
|
2014-06-13 20:00:46 +02:00
|
|
|
|
|
|
|
if (IsEqualGUID( clsidOld, clsidNew ))
|
2001-02-12 02:26:16 +01:00
|
|
|
{
|
2020-11-26 22:20:04 +01:00
|
|
|
if (!RegQueryValueW(hkey, L"AutoTreatAs", auto_treat_as, &auto_treat_as_size) &&
|
2008-08-17 19:30:59 +02:00
|
|
|
CLSIDFromString(auto_treat_as, &id) == S_OK)
|
2004-03-29 23:41:33 +02:00
|
|
|
{
|
2020-11-26 22:20:04 +01:00
|
|
|
if (RegSetValueW(hkey, L"TreatAs", REG_SZ, auto_treat_as, sizeof(auto_treat_as)))
|
2004-03-29 23:41:33 +02:00
|
|
|
{
|
|
|
|
res = REGDB_E_WRITEREGDB;
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2020-11-26 22:20:04 +01:00
|
|
|
if (RegDeleteKeyW(hkey, L"TreatAs"))
|
2014-06-13 20:00:46 +02:00
|
|
|
res = REGDB_E_WRITEREGDB;
|
2004-03-29 23:41:33 +02:00
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
}
|
2014-06-13 20:00:46 +02:00
|
|
|
else
|
2004-03-29 23:41:33 +02:00
|
|
|
{
|
2014-06-13 20:00:46 +02:00
|
|
|
if(IsEqualGUID(clsidNew, &CLSID_NULL)){
|
2020-11-26 22:20:04 +01:00
|
|
|
RegDeleteKeyW(hkey, L"TreatAs");
|
2014-06-13 20:00:46 +02:00
|
|
|
}else{
|
2018-07-05 00:21:24 +02:00
|
|
|
if(!StringFromGUID2(clsidNew, szClsidNew, ARRAY_SIZE(szClsidNew))){
|
2014-06-13 20:00:46 +02:00
|
|
|
WARN("StringFromGUID2 failed\n");
|
|
|
|
res = E_FAIL;
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
|
2020-11-26 22:20:04 +01:00
|
|
|
if (RegSetValueW(hkey, L"TreatAs", REG_SZ, szClsidNew, sizeof(szClsidNew)) != ERROR_SUCCESS){
|
2014-06-13 20:00:46 +02:00
|
|
|
WARN("RegSetValue failed\n");
|
|
|
|
res = REGDB_E_WRITEREGDB;
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
}
|
2001-02-12 02:26:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
done:
|
|
|
|
if (hkey) RegCloseKey(hkey);
|
|
|
|
return res;
|
2000-07-29 13:29:26 +02:00
|
|
|
}
|
2000-08-03 06:16:34 +02:00
|
|
|
|
2005-01-14 18:05:36 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* CoIsOle1Class [OLE32.@]
|
|
|
|
*
|
|
|
|
* Determines whether the specified class an OLE v1 class.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* clsid [I] Class to test.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* TRUE if the class is an OLE v1 class, or FALSE otherwise.
|
|
|
|
*/
|
|
|
|
BOOL WINAPI CoIsOle1Class(REFCLSID clsid)
|
|
|
|
{
|
|
|
|
FIXME("%s\n", debugstr_guid(clsid));
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2000-08-03 06:16:34 +02:00
|
|
|
/***********************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* IsEqualGUID [OLE32.@]
|
2000-08-03 06:16:34 +02:00
|
|
|
*
|
|
|
|
* Compares two Unique Identifiers.
|
|
|
|
*
|
2005-01-14 18:05:36 +01:00
|
|
|
* PARAMS
|
|
|
|
* rguid1 [I] The first GUID to compare.
|
|
|
|
* rguid2 [I] The other GUID to compare.
|
|
|
|
*
|
2000-08-03 06:16:34 +02:00
|
|
|
* RETURNS
|
|
|
|
* TRUE if equal
|
|
|
|
*/
|
|
|
|
#undef IsEqualGUID
|
|
|
|
BOOL WINAPI IsEqualGUID(
|
2005-01-14 18:05:36 +01:00
|
|
|
REFGUID rguid1,
|
|
|
|
REFGUID rguid2)
|
2000-08-03 06:16:34 +02:00
|
|
|
{
|
|
|
|
return !memcmp(rguid1,rguid2,sizeof(GUID));
|
|
|
|
}
|
2002-07-19 02:23:27 +02:00
|
|
|
|
2005-08-26 10:47:09 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* CoAllowSetForegroundWindow [OLE32.@]
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI CoAllowSetForegroundWindow(IUnknown *pUnk, void *pvReserved)
|
|
|
|
{
|
|
|
|
FIXME("(%p, %p): stub\n", pUnk, pvReserved);
|
|
|
|
return S_OK;
|
|
|
|
}
|
2005-01-28 12:27:46 +01:00
|
|
|
|
2006-06-28 22:24:38 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* CoGetObject [OLE32.@]
|
|
|
|
*
|
2008-03-01 21:10:38 +01:00
|
|
|
* Gets the object named by converting the name to a moniker and binding to it.
|
2006-06-28 22:24:38 +02:00
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* pszName [I] String representing the object.
|
|
|
|
* pBindOptions [I] Parameters affecting the binding to the named object.
|
2019-12-12 17:19:12 +01:00
|
|
|
* riid [I] Interface to bind to on the object.
|
2006-06-28 22:24:38 +02:00
|
|
|
* ppv [O] On output, the interface riid of the object represented
|
|
|
|
* by pszName.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: S_OK.
|
|
|
|
* Failure: HRESULT code.
|
|
|
|
*
|
|
|
|
* SEE ALSO
|
|
|
|
* MkParseDisplayName.
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI CoGetObject(LPCWSTR pszName, BIND_OPTS *pBindOptions,
|
|
|
|
REFIID riid, void **ppv)
|
|
|
|
{
|
|
|
|
IBindCtx *pbc;
|
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
*ppv = NULL;
|
|
|
|
|
|
|
|
hr = CreateBindCtx(0, &pbc);
|
|
|
|
if (SUCCEEDED(hr))
|
|
|
|
{
|
|
|
|
if (pBindOptions)
|
|
|
|
hr = IBindCtx_SetBindOptions(pbc, pBindOptions);
|
|
|
|
|
|
|
|
if (SUCCEEDED(hr))
|
|
|
|
{
|
|
|
|
ULONG chEaten;
|
|
|
|
IMoniker *pmk;
|
|
|
|
|
|
|
|
hr = MkParseDisplayName(pbc, pszName, &chEaten, &pmk);
|
|
|
|
if (SUCCEEDED(hr))
|
|
|
|
{
|
|
|
|
hr = IMoniker_BindToObject(pmk, pbc, NULL, riid, ppv);
|
|
|
|
IMoniker_Release(pmk);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
IBindCtx_Release(pbc);
|
|
|
|
}
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
2020-08-25 17:18:15 +02:00
|
|
|
/* Returns expanded dll path from the registry or activation context. */
|
|
|
|
static BOOL get_object_dll_path(const struct class_reg_data *regdata, WCHAR *dst, DWORD dstlen)
|
|
|
|
{
|
|
|
|
DWORD ret;
|
|
|
|
|
|
|
|
if (regdata->origin == CLASS_REG_REGISTRY)
|
|
|
|
{
|
|
|
|
DWORD keytype;
|
|
|
|
WCHAR src[MAX_PATH];
|
|
|
|
DWORD dwLength = dstlen * sizeof(WCHAR);
|
|
|
|
|
|
|
|
if( (ret = RegQueryValueExW(regdata->u.hkey, NULL, NULL, &keytype, (BYTE*)src, &dwLength)) == ERROR_SUCCESS ) {
|
|
|
|
if (keytype == REG_EXPAND_SZ) {
|
|
|
|
if (dstlen <= ExpandEnvironmentStringsW(src, dst, dstlen)) ret = ERROR_MORE_DATA;
|
|
|
|
} else {
|
|
|
|
const WCHAR *quote_start;
|
|
|
|
quote_start = wcschr(src, '\"');
|
|
|
|
if (quote_start) {
|
|
|
|
const WCHAR *quote_end = wcschr(quote_start + 1, '\"');
|
|
|
|
if (quote_end) {
|
|
|
|
memmove(src, quote_start + 1,
|
|
|
|
(quote_end - quote_start - 1) * sizeof(WCHAR));
|
|
|
|
src[quote_end - quote_start - 1] = '\0';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
lstrcpynW(dst, src, dstlen);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return !ret;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ULONG_PTR cookie;
|
|
|
|
|
|
|
|
*dst = 0;
|
|
|
|
ActivateActCtx(regdata->u.actctx.hactctx, &cookie);
|
2020-11-26 22:20:04 +01:00
|
|
|
ret = SearchPathW(NULL, regdata->u.actctx.module_name, L".dll", dstlen, dst, NULL);
|
2020-08-25 17:18:15 +02:00
|
|
|
DeactivateActCtx(0, cookie);
|
|
|
|
return *dst != 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-11-23 16:07:49 +01:00
|
|
|
HRESULT Handler_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
|
|
|
{
|
|
|
|
HKEY hkey;
|
|
|
|
HRESULT hres;
|
|
|
|
|
2020-11-26 22:20:04 +01:00
|
|
|
hres = COM_OpenKeyForCLSID(rclsid, L"InprocHandler32", KEY_READ, &hkey);
|
2009-11-23 16:07:49 +01:00
|
|
|
if (SUCCEEDED(hres))
|
|
|
|
{
|
2013-09-27 06:47:15 +02:00
|
|
|
struct class_reg_data regdata;
|
2009-11-23 16:07:49 +01:00
|
|
|
WCHAR dllpath[MAX_PATH+1];
|
|
|
|
|
2013-09-27 06:47:15 +02:00
|
|
|
regdata.u.hkey = hkey;
|
2019-10-29 14:36:05 +01:00
|
|
|
regdata.origin = CLASS_REG_REGISTRY;
|
2013-09-27 06:47:15 +02:00
|
|
|
|
2018-08-16 07:56:14 +02:00
|
|
|
if (get_object_dll_path(®data, dllpath, ARRAY_SIZE(dllpath)))
|
2009-11-23 16:07:49 +01:00
|
|
|
{
|
2020-11-26 22:20:04 +01:00
|
|
|
if (!wcsicmp(dllpath, L"ole32.dll"))
|
2009-11-23 16:07:49 +01:00
|
|
|
{
|
|
|
|
RegCloseKey(hkey);
|
|
|
|
return HandlerCF_Create(rclsid, riid, ppv);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
WARN("not creating object for inproc handler path %s\n", debugstr_w(dllpath));
|
|
|
|
RegCloseKey(hkey);
|
|
|
|
}
|
|
|
|
|
|
|
|
return CLASS_E_CLASSNOTAVAILABLE;
|
|
|
|
}
|
2008-02-26 11:21:54 +01:00
|
|
|
|
2017-02-22 12:28:57 +01:00
|
|
|
typedef struct {
|
|
|
|
IGlobalOptions IGlobalOptions_iface;
|
|
|
|
LONG ref;
|
|
|
|
} GlobalOptions;
|
|
|
|
|
|
|
|
static inline GlobalOptions *impl_from_IGlobalOptions(IGlobalOptions *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, GlobalOptions, IGlobalOptions_iface);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI GlobalOptions_QueryInterface(IGlobalOptions *iface, REFIID riid, void **ppv)
|
|
|
|
{
|
|
|
|
GlobalOptions *This = impl_from_IGlobalOptions(iface);
|
|
|
|
|
|
|
|
TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
|
|
|
|
|
|
|
|
if (IsEqualGUID(&IID_IGlobalOptions, riid) || IsEqualGUID(&IID_IUnknown, riid))
|
|
|
|
{
|
|
|
|
*ppv = iface;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
*ppv = NULL;
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
|
|
|
IUnknown_AddRef((IUnknown*)*ppv);
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI GlobalOptions_AddRef(IGlobalOptions *iface)
|
|
|
|
{
|
|
|
|
GlobalOptions *This = impl_from_IGlobalOptions(iface);
|
|
|
|
LONG ref = InterlockedIncrement(&This->ref);
|
|
|
|
|
|
|
|
TRACE("(%p) ref=%d\n", This, ref);
|
|
|
|
|
|
|
|
return ref;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI GlobalOptions_Release(IGlobalOptions *iface)
|
|
|
|
{
|
|
|
|
GlobalOptions *This = impl_from_IGlobalOptions(iface);
|
|
|
|
LONG ref = InterlockedDecrement(&This->ref);
|
|
|
|
|
|
|
|
TRACE("(%p) ref=%d\n", This, ref);
|
|
|
|
|
|
|
|
if (!ref)
|
|
|
|
heap_free(This);
|
|
|
|
|
|
|
|
return ref;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI GlobalOptions_Set(IGlobalOptions *iface, GLOBALOPT_PROPERTIES property, ULONG_PTR value)
|
|
|
|
{
|
|
|
|
GlobalOptions *This = impl_from_IGlobalOptions(iface);
|
|
|
|
FIXME("(%p)->(%u %lx)\n", This, property, value);
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI GlobalOptions_Query(IGlobalOptions *iface, GLOBALOPT_PROPERTIES property, ULONG_PTR *value)
|
|
|
|
{
|
|
|
|
GlobalOptions *This = impl_from_IGlobalOptions(iface);
|
|
|
|
FIXME("(%p)->(%u %p)\n", This, property, value);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const IGlobalOptionsVtbl GlobalOptionsVtbl = {
|
|
|
|
GlobalOptions_QueryInterface,
|
|
|
|
GlobalOptions_AddRef,
|
|
|
|
GlobalOptions_Release,
|
|
|
|
GlobalOptions_Set,
|
|
|
|
GlobalOptions_Query
|
|
|
|
};
|
|
|
|
|
|
|
|
HRESULT WINAPI GlobalOptions_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
|
|
|
|
{
|
|
|
|
GlobalOptions *global_options;
|
|
|
|
HRESULT hres;
|
|
|
|
|
|
|
|
TRACE("(%p %s %p)\n", outer, debugstr_guid(riid), ppv);
|
|
|
|
|
|
|
|
if (outer)
|
|
|
|
return E_INVALIDARG;
|
|
|
|
|
|
|
|
global_options = heap_alloc(sizeof(*global_options));
|
|
|
|
if (!global_options)
|
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
global_options->IGlobalOptions_iface.lpVtbl = &GlobalOptionsVtbl;
|
|
|
|
global_options->ref = 1;
|
|
|
|
|
|
|
|
hres = IGlobalOptions_QueryInterface(&global_options->IGlobalOptions_iface, riid, ppv);
|
|
|
|
IGlobalOptions_Release(&global_options->IGlobalOptions_iface);
|
|
|
|
return hres;
|
|
|
|
}
|
|
|
|
|
2005-05-16 16:12:53 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* DllMain (OLE32.@)
|
|
|
|
*/
|
2013-05-14 11:25:29 +02:00
|
|
|
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID reserved)
|
2005-05-16 16:12:53 +02:00
|
|
|
{
|
2013-05-14 11:25:29 +02:00
|
|
|
TRACE("%p 0x%x %p\n", hinstDLL, fdwReason, reserved);
|
2005-05-16 16:12:53 +02:00
|
|
|
|
|
|
|
switch(fdwReason) {
|
|
|
|
case DLL_PROCESS_ATTACH:
|
2008-12-02 20:52:09 +01:00
|
|
|
hProxyDll = hinstDLL;
|
2005-05-16 16:12:53 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
case DLL_PROCESS_DETACH:
|
2013-05-14 11:25:29 +02:00
|
|
|
if (reserved) break;
|
2013-08-23 08:34:48 +02:00
|
|
|
release_std_git();
|
2020-08-25 17:18:15 +02:00
|
|
|
break;
|
2005-05-16 16:12:53 +02:00
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2010-12-03 19:51:08 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* DllRegisterServer (OLE32.@)
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI DllRegisterServer(void)
|
|
|
|
{
|
|
|
|
return OLE32_DllRegisterServer();
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* DllUnregisterServer (OLE32.@)
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI DllUnregisterServer(void)
|
|
|
|
{
|
|
|
|
return OLE32_DllUnregisterServer();
|
|
|
|
}
|