wine/dlls/ole32/ole2.c

2734 lines
73 KiB
C
Raw Normal View History

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 19:08:12 +00:00
/*
* OLE2 library
*
* Copyright 1995 Martin von Loewis
* Copyright 1999 Francis Beaudet
* Copyright 1999 Noel Borthwick
* Copyright 1999, 2000 Marcus Meissner
* Copyright 2005 Juan Lang
* Copyright 2011 Adam Martinson for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
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 19:08:12 +00:00
*/
#include <assert.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#define COBJMACROS
#define NONAMELESSUNION
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "wingdi.h"
1999-02-28 19:14:33 +00:00
#include "winuser.h"
#include "winnls.h"
#include "winreg.h"
#include "ole2.h"
#include "ole2ver.h"
#include "compobj_private.h"
#include "olestd.h"
#include "wine/list.h"
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 19:08:12 +00:00
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(ole);
WINE_DECLARE_DEBUG_CHANNEL(accel);
/******************************************************************************
2002-05-31 23:06:46 +00:00
* These are static/global variables and internal data structures that the
2014-02-07 21:42:49 +00:00
* OLE module uses to maintain its state.
*/
typedef struct tagTrackerWindowInfo
{
IDataObject* dataObject;
IDropSource* dropSource;
DWORD dwOKEffect;
DWORD* pdwEffect;
BOOL trackingDone;
BOOL inTrackCall;
HRESULT returnValue;
BOOL escPressed;
HWND curTargetHWND; /* window the mouse is hovering over */
IDropTarget* curDragTarget;
POINTL curMousePos; /* current position of the mouse in screen coordinates */
DWORD dwKeyState; /* current state of the shift and ctrl keys and the mouse buttons */
} TrackerWindowInfo;
typedef struct tagOleMenuDescriptor /* OleMenuDescriptor */
{
HWND hwndFrame; /* The containers frame window */
HWND hwndActiveObject; /* The active objects window */
OLEMENUGROUPWIDTHS mgw; /* OLE menu group widths for the shared menu */
HMENU hmenuCombined; /* The combined menu */
BOOL bIsServerItem; /* True if the currently open popup belongs to the server */
} OleMenuDescriptor;
typedef struct tagOleMenuHookItem /* OleMenu hook item in per thread hook list */
{
DWORD tid; /* Thread Id */
HANDLE hHeap; /* Heap this is allocated from */
HHOOK GetMsg_hHook; /* message hook for WH_GETMESSAGE */
HHOOK CallWndProc_hHook; /* message hook for WH_CALLWNDPROC */
struct tagOleMenuHookItem *next;
} OleMenuHookItem;
static OleMenuHookItem *hook_list;
/*
* This is the lock count on the OLE library. It is controlled by the
* OLEInitialize/OLEUninitialize methods.
*/
static LONG OLE_moduleLockCount = 0;
/*
* Name of our registered window class.
*/
static const WCHAR OLEDD_DRAGTRACKERCLASS[] =
{'W','i','n','e','D','r','a','g','D','r','o','p','T','r','a','c','k','e','r','3','2',0};
/*
* Name of menu descriptor property.
*/
static const WCHAR prop_olemenuW[] =
{'P','R','O','P','_','O','L','E','M','e','n','u','D','e','s','c','r','i','p','t','o','r',0};
/* property to store IDropTarget pointer */
static const WCHAR prop_oledroptarget[] =
{'O','l','e','D','r','o','p','T','a','r','g','e','t','I','n','t','e','r','f','a','c','e',0};
/* property to store Marshalled IDropTarget pointer */
static const WCHAR prop_marshalleddroptarget[] =
{'W','i','n','e','M','a','r','s','h','a','l','l','e','d','D','r','o','p','T','a','r','g','e','t',0};
static const WCHAR emptyW[] = { 0 };
/******************************************************************************
* These are the prototypes of miscellaneous utility methods
*/
static void OLEUTL_ReadRegistryDWORDValue(HKEY regKey, DWORD* pdwValue);
/******************************************************************************
* These are the prototypes of the utility methods used to manage a shared menu
*/
static void OLEMenu_Initialize(void);
static void OLEMenu_UnInitialize(void);
static BOOL OLEMenu_InstallHooks( DWORD tid );
static BOOL OLEMenu_UnInstallHooks( DWORD tid );
static OleMenuHookItem * OLEMenu_IsHookInstalled( DWORD tid );
static BOOL OLEMenu_FindMainMenuIndex( HMENU hMainMenu, HMENU hPopupMenu, UINT *pnPos );
static BOOL OLEMenu_SetIsServerMenu( HMENU hmenu, OleMenuDescriptor *pOleMenuDescriptor );
static LRESULT CALLBACK OLEMenu_CallWndProc(INT code, WPARAM wParam, LPARAM lParam);
static LRESULT CALLBACK OLEMenu_GetMsgProc(INT code, WPARAM wParam, LPARAM lParam);
1999-07-18 15:43:45 +00:00
/******************************************************************************
* These are the prototypes of the OLE Clipboard initialization methods (in clipboard.c)
*/
extern void OLEClipbrd_UnInitialize(void);
extern void OLEClipbrd_Initialize(void);
1999-07-18 15:43:45 +00:00
/******************************************************************************
* These are the prototypes of the utility methods used for OLE Drag n Drop
*/
static void OLEDD_Initialize(void);
static LRESULT WINAPI OLEDD_DragTrackerWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
static void OLEDD_TrackStateChange(TrackerWindowInfo* trackerInfo);
static DWORD OLEDD_GetButtonState(void);
/******************************************************************************
2003-09-11 03:06:25 +00:00
* OleBuildVersion [OLE32.@]
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 19:08:12 +00:00
*/
DWORD WINAPI OleBuildVersion(void)
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 19:08:12 +00:00
{
TRACE("Returning version %d, build %d.\n", rmm, rup);
Release 970914 Thu Sep 11 18:24:56 1997 Philippe De Muyter <phdm@info.ucl.ac.be> * [objects/dc.c] In DC_SetupGCForPatBlt, replace R2_NOT by GXxor with (black xor white). Tue Sep 9 23:04:02 1997 U. Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [memory/virtual.c] Do not write debugging info unconditionally to stderr. * [files/profile.c] Call PROFILE_GetSection in PROFILE_GetString for key_name "" too. * [misc/crtdll.c] Many new functions. * [include/windows.h] [windows/winpos.c] ClientToScreen16 doesn't have a return value. Sun Sep 7 10:06:39 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [misc/main.c] [AUTHORS] Update the list of contributors. Please let me know if I forgot someone. * [if1632/*.spec] [if1632/builtin.c] [tools/build.c] Ordinal base for Win32 DLLs is now computed automatically from the lowest ordinal found. * [include/wintypes.h] WINAPI is now defined as attribute((stdcall)). This will require gcc to compile. * [if1632/thunk.c] Removed Win32 thunks (no longer needed with stdcall). * [if1632/crtdll.spec] [misc/crtdll.c] Make sure we only reference cdecl functions in the spec file. * [objects/dc.c] Use CapNotLast drawing style for 1-pixel wide lines. * [tools/build.c] Added 'double' argument type. Added 'varargs' function type for Win32. Made CallTo16_xxx functions stdcall. Fri Sep 5 14:50:49 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [tools/build.c] [windows/win.c] [windows/event.c] [windows/message.c] More fixes to get message exchange closer to the original. * [misc/spy.c] Message logs now contain window names. * [loader/resource.c] [loader/ne_resource.c] [loader/task.c] [objects/cursoricon.c] [windows/user.c] Added some obscure features to fix memory leaks. Fri Sep 5 00:46:28 1997 Jan Willamowius <jan@janhh.shnet.org> * [if1632/kernel32.spec] [win32/newfns.c] Added stub for UTRegister() and UTUnRegister(). Thu Sep 4 12:03:12 1997 Frans van Dorsselaer <dorssel@rulhmpc49.LeidenUniv.nl> * [controls/edit.c] Allow ASCII codes > 127 in WM_CHAR. Mon Sep 1 17:23:24 1997 Dimitrie O. Paun <dimi@mail.cs.toronto.edu> * [controls/widgets.c] In InitCommonControls, remember the name of the class because lpszClassName was made to point to a local array Added the ProgressBar to the list of implemented controls. Call InitCommonControls from WIDGETS_Init to register all implemented Common Controls. * [include/commctrl.h] Added misc decl for the Progress Bar. * [controls/progress.c] [include/progress.h] First attempt at implementiong the Progress Bar class. * [objects/brush.h] Implementation for GetSysColorBrush[16|32] * [controls/status.c] Use DrawEdge to draw the borders and fill the background * [controls/uitools.c] Added DrawDiagEdge32 and DrawRectEdge32 * [graphics/painting.c] Implement DrawEdge[16|32] Started DrawFrameControl32 Mon Sep 1 10:07:09 1997 Lawson Whitney <lawson_whitney@juno.com> * [misc/comm.c] [include/windows.h] SetCommEventMask returns a SEGPTR. Sun Aug 31 23:28:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [loader/pe_image.c][loader/module.c][include/pe_image.h] [include/module.h] Cleaned up the whole Win32 library mess (a bit). * [debugger/stabs.c] If 'wine' has no absolute path and isn't found, check $PATH too. * [misc/ole2nls.c] Some fixes. * [misc/ver.c] Added support for PE style version resources. * [memory/string.c] Check for NULL pointers to _lstr* functions, just as Windows95 does. * [multimedia/time.c] Made list of timers a simple linked list. * [loader/resource.c] Netscape 3 seems to pass NEGATIVE resource Ids (in an unsigned int, yes). Don't know why, fixed it anyway. * [objects/bitmap.c] LoadImageW added. * [include/win.h][windows/win.c] Change wIDmenu from UINT16 to UINT32 and changed the SetWindow(Long|Word) accordingly. Thu Aug 28 19:30:08 1997 Morten Welinder <terra@diku.dk> * [include/windows.h] Add a few more colors defined for Win95. Add a few more brush styles. * [windows/syscolor.c] Add error checks for SYSCOLOR_SetColor, SYSCOLOR_Init, GetSysColor16, GetSysColor32. Add support for above colors. Sun Aug 24 16:22:57 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] Changed mmioDescend to use mmio functions for file I/O, neccessary for memory files.
1997-09-14 17:17:23 +00:00
return (rmm<<16)+rup;
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 19:08:12 +00:00
}
/***********************************************************************
2003-09-11 03:06:25 +00:00
* OleInitialize (OLE32.@)
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 19:08:12 +00:00
*/
HRESULT WINAPI DECLSPEC_HOTPATCH OleInitialize(LPVOID reserved)
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 19:08:12 +00:00
{
HRESULT hr;
TRACE("(%p)\n", reserved);
/*
* The first duty of the OleInitialize is to initialize the COM libraries.
*/
hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
/*
2002-05-31 23:06:46 +00:00
* If the CoInitializeEx call failed, the OLE libraries can't be
* initialized.
*/
if (FAILED(hr))
2002-05-31 23:06:46 +00:00
return hr;
if (!COM_CurrentInfo()->ole_inits)
hr = S_OK;
else
hr = S_FALSE;
/*
* Then, it has to initialize the OLE specific modules.
* This includes:
* Clipboard
* Drag and Drop
* Object linking and Embedding
* In-place activation
*/
if (!COM_CurrentInfo()->ole_inits++ &&
InterlockedIncrement(&OLE_moduleLockCount) == 1)
{
2002-05-31 23:06:46 +00:00
/*
* Initialize the libraries.
*/
TRACE("() - Initializing the OLE libraries\n");
1999-07-18 15:43:45 +00:00
/*
* OLE Clipboard
*/
OLEClipbrd_Initialize();
/*
* Drag and Drop
*/
OLEDD_Initialize();
/*
* OLE shared menu
*/
OLEMenu_Initialize();
}
return hr;
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 20:05:02 +00:00
}
/******************************************************************************
2003-09-11 03:06:25 +00:00
* OleUninitialize [OLE32.@]
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 19:08:12 +00:00
*/
void WINAPI DECLSPEC_HOTPATCH OleUninitialize(void)
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 19:08:12 +00:00
{
TRACE("()\n");
if (COM_CurrentInfo()->ole_inits == 0)
{
WARN("ole_inits is already 0\n");
return ;
}
/*
* If we hit the bottom of the lock stack, free the libraries.
*/
if (!--COM_CurrentInfo()->ole_inits && !InterlockedDecrement(&OLE_moduleLockCount))
{
/*
* Actually free the libraries.
*/
TRACE("() - Freeing the last reference count\n");
1999-07-18 15:43:45 +00:00
/*
* OLE Clipboard
*/
OLEClipbrd_UnInitialize();
/*
* OLE shared menu
*/
OLEMenu_UnInitialize();
}
2002-05-31 23:06:46 +00:00
/*
* Then, uninitialize the COM libraries.
*/
CoUninitialize();
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 19:08:12 +00:00
}
Release 970914 Thu Sep 11 18:24:56 1997 Philippe De Muyter <phdm@info.ucl.ac.be> * [objects/dc.c] In DC_SetupGCForPatBlt, replace R2_NOT by GXxor with (black xor white). Tue Sep 9 23:04:02 1997 U. Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [memory/virtual.c] Do not write debugging info unconditionally to stderr. * [files/profile.c] Call PROFILE_GetSection in PROFILE_GetString for key_name "" too. * [misc/crtdll.c] Many new functions. * [include/windows.h] [windows/winpos.c] ClientToScreen16 doesn't have a return value. Sun Sep 7 10:06:39 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [misc/main.c] [AUTHORS] Update the list of contributors. Please let me know if I forgot someone. * [if1632/*.spec] [if1632/builtin.c] [tools/build.c] Ordinal base for Win32 DLLs is now computed automatically from the lowest ordinal found. * [include/wintypes.h] WINAPI is now defined as attribute((stdcall)). This will require gcc to compile. * [if1632/thunk.c] Removed Win32 thunks (no longer needed with stdcall). * [if1632/crtdll.spec] [misc/crtdll.c] Make sure we only reference cdecl functions in the spec file. * [objects/dc.c] Use CapNotLast drawing style for 1-pixel wide lines. * [tools/build.c] Added 'double' argument type. Added 'varargs' function type for Win32. Made CallTo16_xxx functions stdcall. Fri Sep 5 14:50:49 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [tools/build.c] [windows/win.c] [windows/event.c] [windows/message.c] More fixes to get message exchange closer to the original. * [misc/spy.c] Message logs now contain window names. * [loader/resource.c] [loader/ne_resource.c] [loader/task.c] [objects/cursoricon.c] [windows/user.c] Added some obscure features to fix memory leaks. Fri Sep 5 00:46:28 1997 Jan Willamowius <jan@janhh.shnet.org> * [if1632/kernel32.spec] [win32/newfns.c] Added stub for UTRegister() and UTUnRegister(). Thu Sep 4 12:03:12 1997 Frans van Dorsselaer <dorssel@rulhmpc49.LeidenUniv.nl> * [controls/edit.c] Allow ASCII codes > 127 in WM_CHAR. Mon Sep 1 17:23:24 1997 Dimitrie O. Paun <dimi@mail.cs.toronto.edu> * [controls/widgets.c] In InitCommonControls, remember the name of the class because lpszClassName was made to point to a local array Added the ProgressBar to the list of implemented controls. Call InitCommonControls from WIDGETS_Init to register all implemented Common Controls. * [include/commctrl.h] Added misc decl for the Progress Bar. * [controls/progress.c] [include/progress.h] First attempt at implementiong the Progress Bar class. * [objects/brush.h] Implementation for GetSysColorBrush[16|32] * [controls/status.c] Use DrawEdge to draw the borders and fill the background * [controls/uitools.c] Added DrawDiagEdge32 and DrawRectEdge32 * [graphics/painting.c] Implement DrawEdge[16|32] Started DrawFrameControl32 Mon Sep 1 10:07:09 1997 Lawson Whitney <lawson_whitney@juno.com> * [misc/comm.c] [include/windows.h] SetCommEventMask returns a SEGPTR. Sun Aug 31 23:28:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [loader/pe_image.c][loader/module.c][include/pe_image.h] [include/module.h] Cleaned up the whole Win32 library mess (a bit). * [debugger/stabs.c] If 'wine' has no absolute path and isn't found, check $PATH too. * [misc/ole2nls.c] Some fixes. * [misc/ver.c] Added support for PE style version resources. * [memory/string.c] Check for NULL pointers to _lstr* functions, just as Windows95 does. * [multimedia/time.c] Made list of timers a simple linked list. * [loader/resource.c] Netscape 3 seems to pass NEGATIVE resource Ids (in an unsigned int, yes). Don't know why, fixed it anyway. * [objects/bitmap.c] LoadImageW added. * [include/win.h][windows/win.c] Change wIDmenu from UINT16 to UINT32 and changed the SetWindow(Long|Word) accordingly. Thu Aug 28 19:30:08 1997 Morten Welinder <terra@diku.dk> * [include/windows.h] Add a few more colors defined for Win95. Add a few more brush styles. * [windows/syscolor.c] Add error checks for SYSCOLOR_SetColor, SYSCOLOR_Init, GetSysColor16, GetSysColor32. Add support for above colors. Sun Aug 24 16:22:57 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] Changed mmioDescend to use mmio functions for file I/O, neccessary for memory files.
1997-09-14 17:17:23 +00:00
/******************************************************************************
2003-09-11 03:06:25 +00:00
* OleInitializeWOW [OLE32.@]
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 20:05:02 +00:00
*/
2005-07-22 18:29:19 +00:00
HRESULT WINAPI OleInitializeWOW(DWORD x, DWORD y) {
FIXME("(0x%08x, 0x%08x),stub!\n",x, y);
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 20:05:02 +00:00
return 0;
}
Release 980315 Sun Mar 15 03:46:50 1998 Dimitrie O. Paun <dimi@mail.cs.toronto.edu> * [*/*] Fixed some dprintf_ such that there is one and only one new line for each dprintf and that new line occurs at the end. Transformed some fprintfs into proper debug statements. Removed much redundancy from most of the debug statements. The redundancy appeared because now the component and function name is output automatically. Most debug statements also used to output the name of the function. All these changes prepared the source to switch completely to the new debugging interface. For more info, refer to ./documentation/debug-msg Sat Mar 14 19:45:23 1997 Andreas Mohr <100.30936@germany.net> * [misc/shell.c] [if1632/kernel.spec] Changed parameters of FUNC004() to fix a crash. Not sure if this fix is correct (doc wanted). * [windows/user.c] [if1632/user.spec] [include/user.h] Implemented UserSeeUserDo. * [msdos/int21.c] [include/msdos.h] Added "GET LIST OF LISTS" (INT 21/52h). Sat Mar 14 15:48:02 1998 Douglas Ridgway <ridgway@gmcl.com> * [include/windows.h] [relay32/gdi32.spec] [objects/enhmetafile.c] Beginnings of enhanced metafile support. Fri Mar 13 20:53:09 1998 John Richardson <jrichard@zko.dec.com> * [win32/console.c] Restart interrupted console writes. Fri Mar 13 18:59:24 1998 Matthew Becker <mbecker@glasscity.net> * [*/*.c] Updated documentation for API manpages. * [windows/dce.c] ReleaseDC16: Fixed cast. * [include/windows.h] [memory/virtual.c] VirtualQuery{Ex} should return DWORD instead of BOOL32. Fri Mar 13 13:03:06 1998 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [README][documentation/status/] README updated, added lzexpand,version and multimedia status notes to new documentation/status directory. * [ole/*.c][if1632/typelib.spec] Added typelib stubs, several small additions and fixes. * [loader/pe_image.c] Fixed a small bug (fixup_imports got passed the wrong hModule in a remapcase). * [loader/signal.c][if1632/signal.c][misc/winsock_dns.c] [loader/module.c] Fixed some recursive debugger crashes (caused by invalid FS). * [misc/registry.c] Two bugs fixed. Fri Mar 13 04:55:01 1998 David Lee Lambert <lamber45@egr.msu.edu> * [include/winnt.h] [include/winnls.h] Moved LANG_xxx flags to winnls.h * [include/winnls.h] Added flags for GetDateFormat(); fixed validity of LOCALE_SYSTEM_DEFAULT. * [include/windows.h] Added GetTimeFormat() prototypes. * [ole/ole2nls.c] Implemented ASCII date- and time-functions, using an optimized common core; added stubs for Unicode versions; started work on a Unicode core. * [AUTHORS] Added my name. Mon Mar 9 20:10:15 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de> * [relay32/comctl32.spec] [include/imagelist.h] [include/commctrl.h] [misc/imagelist.c] [misc/Makefile.in] First attempt at implementing ImageLists. Sun Mar 8 20:19:49 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> * [files/dos_fs.c] [configure.in] Try to get FileTimeToLocalFileTime,FileTimeToSystemTime and SystemTimeToFileTime right. Use timegm() where available. * [misc/lstr.c] Fix an off by one error in FormatMessage and handle the case when args = NULL (used by programs to get the length of the string). * [win32/console.c] Actual display a per-process Title string, better working attempt for WriteConsole32W and ReadConsole32W. Fri Mar 6 20:33:45 1998 Slaven Rezic <eserte@cs.tu-berlin.de> * [include/config.h.in][configure.in][multimedia/audio.c] [multimedia/dsound.c] Added check for FreeBSD sound system. Sun Mar 1 17:40:10 1998 Jason Schonberg <schon@mti.sgi.com> * [controls/edit.c] [include/ole.h] [include/shlobj.h] Removed final commas in enum types. Mon Feb 23 07:52:18 1998 Luiz Otavio L. Zorzella <zorzella@nr.conexware.com> * [multimedia/time.c] Workaround to avoid infinite recursion inside timeGetTime. * [multimedia/audio.c] WODM_GETNUMDEVS and WIDM_GETNUMDEVS only return 1 now if the SOUND_DEV can be opened, or if it's busy.
1998-03-15 20:29:56 +00:00
/*************************************************************
* get_droptarget_handle
*
* Retrieve a handle to the map containing the marshalled IDropTarget.
* This handle belongs to the process that called RegisterDragDrop.
* See get_droptarget_local_handle().
*/
static inline HANDLE get_droptarget_handle(HWND hwnd)
{
return GetPropW(hwnd, prop_marshalleddroptarget);
}
/*************************************************************
* is_droptarget
*
* Is the window a droptarget.
*/
static inline BOOL is_droptarget(HWND hwnd)
{
return get_droptarget_handle(hwnd) != 0;
}
/*************************************************************
* get_droptarget_local_handle
*
* Retrieve a handle to the map containing the marshalled IDropTarget.
* The handle should be closed when finished with.
*/
static HANDLE get_droptarget_local_handle(HWND hwnd)
{
HANDLE handle, local_handle = 0;
handle = get_droptarget_handle(hwnd);
if(handle)
{
DWORD pid;
HANDLE process;
GetWindowThreadProcessId(hwnd, &pid);
process = OpenProcess(PROCESS_DUP_HANDLE, FALSE, pid);
if(process)
{
DuplicateHandle(process, handle, GetCurrentProcess(), &local_handle, 0, FALSE, DUPLICATE_SAME_ACCESS);
CloseHandle(process);
}
}
return local_handle;
}
/***********************************************************************
* create_map_from_stream
*
* Helper for RegisterDragDrop. Creates a file mapping object
* with the contents of the provided stream. The stream must
* be a global memory backed stream.
*/
static HRESULT create_map_from_stream(IStream *stream, HANDLE *map)
{
HGLOBAL hmem;
DWORD size;
HRESULT hr;
void *data;
hr = GetHGlobalFromStream(stream, &hmem);
if(FAILED(hr)) return hr;
size = GlobalSize(hmem);
*map = CreateFileMappingW(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, size, NULL);
if(!*map) return E_OUTOFMEMORY;
data = MapViewOfFile(*map, FILE_MAP_WRITE, 0, 0, size);
memcpy(data, GlobalLock(hmem), size);
GlobalUnlock(hmem);
UnmapViewOfFile(data);
return S_OK;
}
/***********************************************************************
* create_stream_from_map
*
* Creates a stream from the provided map.
*/
static HRESULT create_stream_from_map(HANDLE map, IStream **stream)
{
HRESULT hr = E_OUTOFMEMORY;
HGLOBAL hmem;
void *data;
MEMORY_BASIC_INFORMATION info;
data = MapViewOfFile(map, FILE_MAP_READ, 0, 0, 0);
if(!data) return hr;
VirtualQuery(data, &info, sizeof(info));
TRACE("size %d\n", (int)info.RegionSize);
hmem = GlobalAlloc(GMEM_MOVEABLE, info.RegionSize);
if(hmem)
{
memcpy(GlobalLock(hmem), data, info.RegionSize);
GlobalUnlock(hmem);
hr = CreateStreamOnHGlobal(hmem, TRUE, stream);
}
UnmapViewOfFile(data);
return hr;
}
/* This is to work around apps which break COM rules by not implementing
* IDropTarget::QueryInterface(). Windows doesn't expose this because it
* doesn't call CoMarshallInterface() in RegisterDragDrop().
* The wrapper is only used internally, and only exists for the life of
* the marshal. We don't want to hold a ref on the app provided target
* as some apps destroy this prior to CoUninitialize without calling
* RevokeDragDrop. The only (long-term) ref is held by the window prop. */
typedef struct {
IDropTarget IDropTarget_iface;
HWND hwnd;
LONG refs;
} DropTargetWrapper;
static inline DropTargetWrapper* impl_from_IDropTarget(IDropTarget* iface)
{
return CONTAINING_RECORD(iface, DropTargetWrapper, IDropTarget_iface);
}
static HRESULT WINAPI DropTargetWrapper_QueryInterface(IDropTarget* iface,
REFIID riid,
void** ppvObject)
{
DropTargetWrapper* This = impl_from_IDropTarget(iface);
if (IsEqualIID(riid, &IID_IUnknown) ||
IsEqualIID(riid, &IID_IDropTarget))
{
IDropTarget_AddRef(&This->IDropTarget_iface);
*ppvObject = &This->IDropTarget_iface;
return S_OK;
}
*ppvObject = NULL;
return E_NOINTERFACE;
}
static ULONG WINAPI DropTargetWrapper_AddRef(IDropTarget* iface)
{
DropTargetWrapper* This = impl_from_IDropTarget(iface);
return InterlockedIncrement(&This->refs);
}
static ULONG WINAPI DropTargetWrapper_Release(IDropTarget* iface)
{
DropTargetWrapper* This = impl_from_IDropTarget(iface);
ULONG refs = InterlockedDecrement(&This->refs);
if (!refs) HeapFree(GetProcessHeap(), 0, This);
return refs;
}
static inline HRESULT get_target_from_wrapper( IDropTarget *wrapper, IDropTarget **target )
{
DropTargetWrapper* This = impl_from_IDropTarget( wrapper );
*target = GetPropW( This->hwnd, prop_oledroptarget );
if (!*target) return DRAGDROP_E_NOTREGISTERED;
IDropTarget_AddRef( *target );
return S_OK;
}
static HRESULT WINAPI DropTargetWrapper_DragEnter(IDropTarget* iface,
IDataObject* pDataObj,
DWORD grfKeyState,
POINTL pt,
DWORD* pdwEffect)
{
IDropTarget *target;
HRESULT r = get_target_from_wrapper( iface, &target );
if (SUCCEEDED( r ))
{
r = IDropTarget_DragEnter( target, pDataObj, grfKeyState, pt, pdwEffect );
IDropTarget_Release( target );
}
return r;
}
static HRESULT WINAPI DropTargetWrapper_DragOver(IDropTarget* iface,
DWORD grfKeyState,
POINTL pt,
DWORD* pdwEffect)
{
IDropTarget *target;
HRESULT r = get_target_from_wrapper( iface, &target );
if (SUCCEEDED( r ))
{
r = IDropTarget_DragOver( target, grfKeyState, pt, pdwEffect );
IDropTarget_Release( target );
}
return r;
}
static HRESULT WINAPI DropTargetWrapper_DragLeave(IDropTarget* iface)
{
IDropTarget *target;
HRESULT r = get_target_from_wrapper( iface, &target );
if (SUCCEEDED( r ))
{
r = IDropTarget_DragLeave( target );
IDropTarget_Release( target );
}
return r;
}
static HRESULT WINAPI DropTargetWrapper_Drop(IDropTarget* iface,
IDataObject* pDataObj,
DWORD grfKeyState,
POINTL pt,
DWORD* pdwEffect)
{
IDropTarget *target;
HRESULT r = get_target_from_wrapper( iface, &target );
if (SUCCEEDED( r ))
{
r = IDropTarget_Drop( target, pDataObj, grfKeyState, pt, pdwEffect );
IDropTarget_Release( target );
}
return r;
}
static const IDropTargetVtbl DropTargetWrapperVTbl =
{
DropTargetWrapper_QueryInterface,
DropTargetWrapper_AddRef,
DropTargetWrapper_Release,
DropTargetWrapper_DragEnter,
DropTargetWrapper_DragOver,
DropTargetWrapper_DragLeave,
DropTargetWrapper_Drop
};
static IDropTarget* WrapDropTarget( HWND hwnd )
{
DropTargetWrapper* This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
if (This)
{
This->IDropTarget_iface.lpVtbl = &DropTargetWrapperVTbl;
This->hwnd = hwnd;
This->refs = 1;
}
return &This->IDropTarget_iface;
}
/***********************************************************************
* get_droptarget_pointer
*
* Retrieves the marshalled IDropTarget from the window.
*/
static IDropTarget* get_droptarget_pointer(HWND hwnd)
{
IDropTarget *droptarget = NULL;
HANDLE map;
IStream *stream;
map = get_droptarget_local_handle(hwnd);
if(!map) return NULL;
if(SUCCEEDED(create_stream_from_map(map, &stream)))
{
CoUnmarshalInterface(stream, &IID_IDropTarget, (void**)&droptarget);
IStream_Release(stream);
}
CloseHandle(map);
return droptarget;
}
Release 980822 Sat Aug 22 17:46:19 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de> * [include/dosexe.h] [include/module.h] [include/pe_image.h] [include/process.h] [include/windows.h] [loader/dos/module.c] [loader/module.c] [loader/ne/module.c] [loader/pe_image.c] [scheduler/process.c] [win32/process.c] Partially implemented CreateProcess32. * [win32/device.c] [relay32/kernel32.spec] [scheduler/k32obj.c] [misc/registry.c] [win32/file.c] Partially implemented VxDCall (VMM registry services). * [files/dos_fs.c] DOSFS_FindNext made thread-safe. * [include/sig_context.h] [include/syslevel.h] [loader/signal.c] [scheduler/syslevel.c] [tools/build.c] Replaced CALLTO16_Current_fs by SYSLEVEL_Win16CurrentTeb. * [win32/kernel32.c] Bugfix: QT_Thunk/FT_Thunk should return 'long' in DX:AX, not EAX. * [if1632/relay.c] [relay32/builtin32.c] [windows/msgbox.c] [msdos/int20.c] [msdos/int21.c] Use ExitProcess instead of TASK_KillCurrentTask. * [include/task.h] [include/thread.h] [loader/task.c] [scheduler/thread.c] [include/queue.h] [windows/message.c] [windows/queue.c] [windows/win.c] Prevent Win32 threads from entering the TASK_Reschedule loop. (Note: Win32 messaging still doesn't work correctly; this patch is just preventing the system from crashing when Win32 threads call messaging functions. Messages will probably still get lost.) * [scheduler/critsection.c] Deactivated the use of SEM_UNDO for the SYSTEM_LOCK semaphore; for some reason, this leads to problems after threads terminate... Sat Aug 22 15:00:00 1998 Jrgen Schmied <juergen.schmied@metronet.de> * [include/authors.h] New file, includes all names of the developer (former shell.c) * [Makefile.in][configure][configure.in][dlls/Makefile.in] [dlls/shell32/Makefile.in][shres.rc] Created dlls/shell32 and moved the shell32 stuff in it. Started to create internal resources. * [dlls/shell32/*] Split the shell32 implementation into smaller files. New classes: IContextMenu, IExtractIcon, IShellView. Implemented Shell_GetImageList(). shell32 links to comctl32 now dynamically so it can use internal/external implementations. * [documentation/internal-dll] [documentation/shell32] New, could anybody do a spellcheck? * [include/commctrl.h] Many new LV constants, structures, functions. * [controls/comctl32undoc.c] Rewrote the DSA* functions. * [windows/winpos.c] SetShellWindow32, GetShellWindow32. Sat Aug 22 14:02:15 1998 Alexander Lukyanov <lav@long.yar.ru> * [loader/resource.c] Mark last accelerator as such in LoadAccelerators32W. * [relay32/shell32.spec] [misc/shell.c] Add stubs for SHGetSpecialFolderPath[AW]. Sat Aug 22 02:07:42 1998 Adrian Harvey <adrian@select.com.au> * [include/file.h] [file/file.c] [msdos/int21.c] [msdos/vxd.c] [misc/lzexpand.c] [win32/kernel32.c] [documentation/filehandles] Fixed file handle handling. Created universal HFILE16 to HFILE32 translation macro from msdos/int21 code by Ove Kaaven. Used macro in all Win16 functions so that win32 handles are translated to avoid DOS/Win16 stdxx handles. Removed handle translation from int21.c where Win16 functions are called. Changed remaining calls to use new macro names. Documented filehandle handling and differences between win 16 & 32. Fri Aug 21 20:32:49 1998 Alexandre Julliard <julliard@lrc.epfl.ch> * [server/process.c] [server/thread.c] Implemented object wait queues and synchronization. Fri Aug 21 18:40:02 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk> * [graphics/psdrv/*] DEVMODE dmPaper{Width|Length} fields are in 0.1mm. Select a 100 pixel default font in CreateDC. Thu Aug 20 22:47:39 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> * [objects/bitmap.c] Handle bits=32 in SetBitmapBits32 and GetBitmapBits32. * [msdos/int21.c] Add handling of Int21 0A and 37. * [misc/commdlg.c] Use MapHModuleLS and MapHModuleSL when translating HINSTANCE16 to HINSTANCE32 and vice versa. * [win32/file.c] CreateFile32A: Abort if filename == NULL. Thu Aug 20 12:28:31 1998 Marcus Meissner <marcus@jet.franken.de> * [*/*] Lots of missing prototypes added, some parameter types adapted to match SDK. * [debugger/stabs.c] Don't loop forever if we don't find wine or one of the libxxx.so. * [loader/ne/module.c] Implemented MapHModuleLS,MapHModuleSL,MapHinstLS,MapHinstSL. * [misc/network.c] Implemented WNetGetUser32A. * [misc/shellord.c] Implemented ILRemoveLastID. * [multimedia/dsound.c] Fixed StarCraft memory leak. * [graphics/ddraw.c] Removed some unnecessary simple relaying functions, tried polishing up the Xlib implementation (still doesn't work), temp. removed Xshm code (to be remerged with working Xlib code). Tue Aug 18 22:29:17 1998 Ove Kaaven <ovek@arcticnet.no> * [multimedia/mmio.c] [multimedia/mmsystem.c] Fixed most mmio bugs, fully implementing mmioSetBuffer buffering, ability to read memory files, and the sndPlaySound() SND_MEMORY flag. Most mmio-using programs now work fine. * [include/dosexe.h] [include/miscemu.h] [include/module.h] [loader/module.c] [loader/task.c] [msdos/dosmem.c] Improved DOS VM flexibility and portability somewhat. (Did I get the #ifdefs right this time, BSD-ers?) * [msdos/int21.c] Made "Get Current PSP address" work as expected in a DOS VM. * [loader/dos/*] Began improving flexibility and portability somewhat. It should be easier to add DPMI RMCB callbacks now. The DOS VM no longer leaves big files lying around in /tmp after a crash. Tue Aug 18 12:38:31 1998 Turchanov Sergey <turchanov@usa.net> * [relay32/winmm.spec] This patch allows WinAmp to play WAV files (at least in PCM format). Sun Aug 16 05:34:13 1998 Pablo Saratxaga <srtxg@chanae.alphanet.ch> * [windows/keyboard.c] Corrected keyboard code to properly handle keys : ? ~ and " on non US keyboards. Sat Aug 15 18:47:14 1998 Brian Craft <bcboy@dorothy.wanglab.brandeis.edu> * [windows/win.c] Fixed severe bug in EnumChildWindwos(). Thu Aug 13 21:05:35 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de> * [controls/tooltips.c] Fixed some bugs. Added subclassing support. * [controls/toolbar.c] Improved tooltip integration. Fixed some bugs. * [controls/commctrl.c] Changed control registration and added some documentation. Fixed ShowHideMenuCtl. * [controls/rebar.c][include/rebar.h][include/commctrl.h] Improved rebar implementation (still no display). * [controls/pager.c][include/pager.h][include/commctrl.h] Improved pager implementation (still no display). * [misc/imagelist.c] Fixed a bug. * [documentation/common_controls] Updated. Sun Aug 9 19:50:20 1998 James Juran <jrj120@psu.edu> * [Makefile.in] [documentation/Makefile.in] [programs/Makefile.in] [programs/*/Makefile.in] Added uninstall rules, cleaned up install rules a little bit. Sun Aug 9 13:21:35 1998 Andreas Mohr <100.30936@germany.net> * [loader/ne/module.c] [if1632/kernel.spec] Added the undocumented HIWORD of GetModuleHandle (hFirstModule). * [loader/ne/segment.c] Wine forgot to set some NE_SEGFLAGS_*. Combined with another loader change, this fixed the "BLINKER -- error in loading module" or ghost MessageBox problem that about 1% of all Windows programs have. Some BLINKER programs still don't work, though. But I'm working on it, with great help from Blinkinc. * [loader/task.c] InitTask needs to decrement the SP register by two as Win95 does. Sun Aug 9 02:41:28 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de> * [if1632/kernel.spec] [relay32/kernel32.spec] [scheduler/syslevel.c] [loader/main.c] [win32/ordinals.c] [include/syslevel.h] [scheduler/Makefile.in] Implemented Win95 'syslevel' routines (including Win16Lock). * [if1632/relay.c] [if1632/thunk.c] [tools/build.c] [loader/task.c] [loader/ne/segment.c] [win32/kernel32.c] [memory/selector.c] [include/stackframe.h] [include/thread.h] 16-bit %fs handling revised. Use Win16Lock where appropriate. * [include/thread.h] [scheduler/synchro.c] [windows/message.c] [windows/queue.c] [win32/process.c] Implemented MsgWaitForMultipleObjects. * [files/change.c] [files/Makefile.in] [scheduler/k32obj.c] [win32/newfns.c] Implemented (dummy) file change notification objects. * [debugger/dbg.y] [scheduler/process.c] [scheduler/thread.c] [include/process.h] [include/thread.h] Suspend all threads except current when hitting debugger break point. * [objects/dib.c] Bugfix for CreateDIBSection.
1998-08-22 19:03:56 +00:00
/***********************************************************************
2003-09-11 03:06:25 +00:00
* RegisterDragDrop (OLE32.@)
Release 980822 Sat Aug 22 17:46:19 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de> * [include/dosexe.h] [include/module.h] [include/pe_image.h] [include/process.h] [include/windows.h] [loader/dos/module.c] [loader/module.c] [loader/ne/module.c] [loader/pe_image.c] [scheduler/process.c] [win32/process.c] Partially implemented CreateProcess32. * [win32/device.c] [relay32/kernel32.spec] [scheduler/k32obj.c] [misc/registry.c] [win32/file.c] Partially implemented VxDCall (VMM registry services). * [files/dos_fs.c] DOSFS_FindNext made thread-safe. * [include/sig_context.h] [include/syslevel.h] [loader/signal.c] [scheduler/syslevel.c] [tools/build.c] Replaced CALLTO16_Current_fs by SYSLEVEL_Win16CurrentTeb. * [win32/kernel32.c] Bugfix: QT_Thunk/FT_Thunk should return 'long' in DX:AX, not EAX. * [if1632/relay.c] [relay32/builtin32.c] [windows/msgbox.c] [msdos/int20.c] [msdos/int21.c] Use ExitProcess instead of TASK_KillCurrentTask. * [include/task.h] [include/thread.h] [loader/task.c] [scheduler/thread.c] [include/queue.h] [windows/message.c] [windows/queue.c] [windows/win.c] Prevent Win32 threads from entering the TASK_Reschedule loop. (Note: Win32 messaging still doesn't work correctly; this patch is just preventing the system from crashing when Win32 threads call messaging functions. Messages will probably still get lost.) * [scheduler/critsection.c] Deactivated the use of SEM_UNDO for the SYSTEM_LOCK semaphore; for some reason, this leads to problems after threads terminate... Sat Aug 22 15:00:00 1998 Jrgen Schmied <juergen.schmied@metronet.de> * [include/authors.h] New file, includes all names of the developer (former shell.c) * [Makefile.in][configure][configure.in][dlls/Makefile.in] [dlls/shell32/Makefile.in][shres.rc] Created dlls/shell32 and moved the shell32 stuff in it. Started to create internal resources. * [dlls/shell32/*] Split the shell32 implementation into smaller files. New classes: IContextMenu, IExtractIcon, IShellView. Implemented Shell_GetImageList(). shell32 links to comctl32 now dynamically so it can use internal/external implementations. * [documentation/internal-dll] [documentation/shell32] New, could anybody do a spellcheck? * [include/commctrl.h] Many new LV constants, structures, functions. * [controls/comctl32undoc.c] Rewrote the DSA* functions. * [windows/winpos.c] SetShellWindow32, GetShellWindow32. Sat Aug 22 14:02:15 1998 Alexander Lukyanov <lav@long.yar.ru> * [loader/resource.c] Mark last accelerator as such in LoadAccelerators32W. * [relay32/shell32.spec] [misc/shell.c] Add stubs for SHGetSpecialFolderPath[AW]. Sat Aug 22 02:07:42 1998 Adrian Harvey <adrian@select.com.au> * [include/file.h] [file/file.c] [msdos/int21.c] [msdos/vxd.c] [misc/lzexpand.c] [win32/kernel32.c] [documentation/filehandles] Fixed file handle handling. Created universal HFILE16 to HFILE32 translation macro from msdos/int21 code by Ove Kaaven. Used macro in all Win16 functions so that win32 handles are translated to avoid DOS/Win16 stdxx handles. Removed handle translation from int21.c where Win16 functions are called. Changed remaining calls to use new macro names. Documented filehandle handling and differences between win 16 & 32. Fri Aug 21 20:32:49 1998 Alexandre Julliard <julliard@lrc.epfl.ch> * [server/process.c] [server/thread.c] Implemented object wait queues and synchronization. Fri Aug 21 18:40:02 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk> * [graphics/psdrv/*] DEVMODE dmPaper{Width|Length} fields are in 0.1mm. Select a 100 pixel default font in CreateDC. Thu Aug 20 22:47:39 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> * [objects/bitmap.c] Handle bits=32 in SetBitmapBits32 and GetBitmapBits32. * [msdos/int21.c] Add handling of Int21 0A and 37. * [misc/commdlg.c] Use MapHModuleLS and MapHModuleSL when translating HINSTANCE16 to HINSTANCE32 and vice versa. * [win32/file.c] CreateFile32A: Abort if filename == NULL. Thu Aug 20 12:28:31 1998 Marcus Meissner <marcus@jet.franken.de> * [*/*] Lots of missing prototypes added, some parameter types adapted to match SDK. * [debugger/stabs.c] Don't loop forever if we don't find wine or one of the libxxx.so. * [loader/ne/module.c] Implemented MapHModuleLS,MapHModuleSL,MapHinstLS,MapHinstSL. * [misc/network.c] Implemented WNetGetUser32A. * [misc/shellord.c] Implemented ILRemoveLastID. * [multimedia/dsound.c] Fixed StarCraft memory leak. * [graphics/ddraw.c] Removed some unnecessary simple relaying functions, tried polishing up the Xlib implementation (still doesn't work), temp. removed Xshm code (to be remerged with working Xlib code). Tue Aug 18 22:29:17 1998 Ove Kaaven <ovek@arcticnet.no> * [multimedia/mmio.c] [multimedia/mmsystem.c] Fixed most mmio bugs, fully implementing mmioSetBuffer buffering, ability to read memory files, and the sndPlaySound() SND_MEMORY flag. Most mmio-using programs now work fine. * [include/dosexe.h] [include/miscemu.h] [include/module.h] [loader/module.c] [loader/task.c] [msdos/dosmem.c] Improved DOS VM flexibility and portability somewhat. (Did I get the #ifdefs right this time, BSD-ers?) * [msdos/int21.c] Made "Get Current PSP address" work as expected in a DOS VM. * [loader/dos/*] Began improving flexibility and portability somewhat. It should be easier to add DPMI RMCB callbacks now. The DOS VM no longer leaves big files lying around in /tmp after a crash. Tue Aug 18 12:38:31 1998 Turchanov Sergey <turchanov@usa.net> * [relay32/winmm.spec] This patch allows WinAmp to play WAV files (at least in PCM format). Sun Aug 16 05:34:13 1998 Pablo Saratxaga <srtxg@chanae.alphanet.ch> * [windows/keyboard.c] Corrected keyboard code to properly handle keys : ? ~ and " on non US keyboards. Sat Aug 15 18:47:14 1998 Brian Craft <bcboy@dorothy.wanglab.brandeis.edu> * [windows/win.c] Fixed severe bug in EnumChildWindwos(). Thu Aug 13 21:05:35 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de> * [controls/tooltips.c] Fixed some bugs. Added subclassing support. * [controls/toolbar.c] Improved tooltip integration. Fixed some bugs. * [controls/commctrl.c] Changed control registration and added some documentation. Fixed ShowHideMenuCtl. * [controls/rebar.c][include/rebar.h][include/commctrl.h] Improved rebar implementation (still no display). * [controls/pager.c][include/pager.h][include/commctrl.h] Improved pager implementation (still no display). * [misc/imagelist.c] Fixed a bug. * [documentation/common_controls] Updated. Sun Aug 9 19:50:20 1998 James Juran <jrj120@psu.edu> * [Makefile.in] [documentation/Makefile.in] [programs/Makefile.in] [programs/*/Makefile.in] Added uninstall rules, cleaned up install rules a little bit. Sun Aug 9 13:21:35 1998 Andreas Mohr <100.30936@germany.net> * [loader/ne/module.c] [if1632/kernel.spec] Added the undocumented HIWORD of GetModuleHandle (hFirstModule). * [loader/ne/segment.c] Wine forgot to set some NE_SEGFLAGS_*. Combined with another loader change, this fixed the "BLINKER -- error in loading module" or ghost MessageBox problem that about 1% of all Windows programs have. Some BLINKER programs still don't work, though. But I'm working on it, with great help from Blinkinc. * [loader/task.c] InitTask needs to decrement the SP register by two as Win95 does. Sun Aug 9 02:41:28 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de> * [if1632/kernel.spec] [relay32/kernel32.spec] [scheduler/syslevel.c] [loader/main.c] [win32/ordinals.c] [include/syslevel.h] [scheduler/Makefile.in] Implemented Win95 'syslevel' routines (including Win16Lock). * [if1632/relay.c] [if1632/thunk.c] [tools/build.c] [loader/task.c] [loader/ne/segment.c] [win32/kernel32.c] [memory/selector.c] [include/stackframe.h] [include/thread.h] 16-bit %fs handling revised. Use Win16Lock where appropriate. * [include/thread.h] [scheduler/synchro.c] [windows/message.c] [windows/queue.c] [win32/process.c] Implemented MsgWaitForMultipleObjects. * [files/change.c] [files/Makefile.in] [scheduler/k32obj.c] [win32/newfns.c] Implemented (dummy) file change notification objects. * [debugger/dbg.y] [scheduler/process.c] [scheduler/thread.c] [include/process.h] [include/thread.h] Suspend all threads except current when hitting debugger break point. * [objects/dib.c] Bugfix for CreateDIBSection.
1998-08-22 19:03:56 +00:00
*/
HRESULT WINAPI RegisterDragDrop(HWND hwnd, LPDROPTARGET pDropTarget)
{
DWORD pid = 0;
HRESULT hr;
IStream *stream;
HANDLE map;
IDropTarget *wrapper;
2002-11-22 04:43:02 +00:00
TRACE("(%p,%p)\n", hwnd, pDropTarget);
if (!COM_CurrentApt())
{
ERR("COM not initialized\n");
return E_OUTOFMEMORY;
}
if (!pDropTarget)
return E_INVALIDARG;
if (!IsWindow(hwnd))
{
ERR("invalid hwnd %p\n", hwnd);
return DRAGDROP_E_INVALIDHWND;
}
/* block register for other processes windows */
GetWindowThreadProcessId(hwnd, &pid);
if (pid != GetCurrentProcessId())
{
FIXME("register for another process windows is disabled\n");
return DRAGDROP_E_INVALIDHWND;
}
/* check if the window is already registered */
if (is_droptarget(hwnd))
return DRAGDROP_E_ALREADYREGISTERED;
/*
* Marshal the drop target pointer into a shared memory map and
* store the map's handle in a Wine specific window prop. We also
* store the drop target pointer itself in the
* "OleDropTargetInterface" prop for compatibility with Windows.
*/
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream);
if(FAILED(hr)) return hr;
/* IDropTarget::QueryInterface() shouldn't be called, some (broken) apps depend on this. */
wrapper = WrapDropTarget( hwnd );
if(!wrapper)
{
IStream_Release(stream);
return E_OUTOFMEMORY;
}
hr = CoMarshalInterface(stream, &IID_IDropTarget, (IUnknown*)wrapper, MSHCTX_LOCAL, NULL, MSHLFLAGS_TABLESTRONG);
IDropTarget_Release(wrapper);
if(SUCCEEDED(hr))
{
hr = create_map_from_stream(stream, &map);
if(SUCCEEDED(hr))
{
IDropTarget_AddRef(pDropTarget);
SetPropW(hwnd, prop_oledroptarget, pDropTarget);
SetPropW(hwnd, prop_marshalleddroptarget, map);
}
else
{
LARGE_INTEGER zero;
zero.QuadPart = 0;
IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL);
CoReleaseMarshalData(stream);
}
}
IStream_Release(stream);
return hr;
Release 980822 Sat Aug 22 17:46:19 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de> * [include/dosexe.h] [include/module.h] [include/pe_image.h] [include/process.h] [include/windows.h] [loader/dos/module.c] [loader/module.c] [loader/ne/module.c] [loader/pe_image.c] [scheduler/process.c] [win32/process.c] Partially implemented CreateProcess32. * [win32/device.c] [relay32/kernel32.spec] [scheduler/k32obj.c] [misc/registry.c] [win32/file.c] Partially implemented VxDCall (VMM registry services). * [files/dos_fs.c] DOSFS_FindNext made thread-safe. * [include/sig_context.h] [include/syslevel.h] [loader/signal.c] [scheduler/syslevel.c] [tools/build.c] Replaced CALLTO16_Current_fs by SYSLEVEL_Win16CurrentTeb. * [win32/kernel32.c] Bugfix: QT_Thunk/FT_Thunk should return 'long' in DX:AX, not EAX. * [if1632/relay.c] [relay32/builtin32.c] [windows/msgbox.c] [msdos/int20.c] [msdos/int21.c] Use ExitProcess instead of TASK_KillCurrentTask. * [include/task.h] [include/thread.h] [loader/task.c] [scheduler/thread.c] [include/queue.h] [windows/message.c] [windows/queue.c] [windows/win.c] Prevent Win32 threads from entering the TASK_Reschedule loop. (Note: Win32 messaging still doesn't work correctly; this patch is just preventing the system from crashing when Win32 threads call messaging functions. Messages will probably still get lost.) * [scheduler/critsection.c] Deactivated the use of SEM_UNDO for the SYSTEM_LOCK semaphore; for some reason, this leads to problems after threads terminate... Sat Aug 22 15:00:00 1998 Jrgen Schmied <juergen.schmied@metronet.de> * [include/authors.h] New file, includes all names of the developer (former shell.c) * [Makefile.in][configure][configure.in][dlls/Makefile.in] [dlls/shell32/Makefile.in][shres.rc] Created dlls/shell32 and moved the shell32 stuff in it. Started to create internal resources. * [dlls/shell32/*] Split the shell32 implementation into smaller files. New classes: IContextMenu, IExtractIcon, IShellView. Implemented Shell_GetImageList(). shell32 links to comctl32 now dynamically so it can use internal/external implementations. * [documentation/internal-dll] [documentation/shell32] New, could anybody do a spellcheck? * [include/commctrl.h] Many new LV constants, structures, functions. * [controls/comctl32undoc.c] Rewrote the DSA* functions. * [windows/winpos.c] SetShellWindow32, GetShellWindow32. Sat Aug 22 14:02:15 1998 Alexander Lukyanov <lav@long.yar.ru> * [loader/resource.c] Mark last accelerator as such in LoadAccelerators32W. * [relay32/shell32.spec] [misc/shell.c] Add stubs for SHGetSpecialFolderPath[AW]. Sat Aug 22 02:07:42 1998 Adrian Harvey <adrian@select.com.au> * [include/file.h] [file/file.c] [msdos/int21.c] [msdos/vxd.c] [misc/lzexpand.c] [win32/kernel32.c] [documentation/filehandles] Fixed file handle handling. Created universal HFILE16 to HFILE32 translation macro from msdos/int21 code by Ove Kaaven. Used macro in all Win16 functions so that win32 handles are translated to avoid DOS/Win16 stdxx handles. Removed handle translation from int21.c where Win16 functions are called. Changed remaining calls to use new macro names. Documented filehandle handling and differences between win 16 & 32. Fri Aug 21 20:32:49 1998 Alexandre Julliard <julliard@lrc.epfl.ch> * [server/process.c] [server/thread.c] Implemented object wait queues and synchronization. Fri Aug 21 18:40:02 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk> * [graphics/psdrv/*] DEVMODE dmPaper{Width|Length} fields are in 0.1mm. Select a 100 pixel default font in CreateDC. Thu Aug 20 22:47:39 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> * [objects/bitmap.c] Handle bits=32 in SetBitmapBits32 and GetBitmapBits32. * [msdos/int21.c] Add handling of Int21 0A and 37. * [misc/commdlg.c] Use MapHModuleLS and MapHModuleSL when translating HINSTANCE16 to HINSTANCE32 and vice versa. * [win32/file.c] CreateFile32A: Abort if filename == NULL. Thu Aug 20 12:28:31 1998 Marcus Meissner <marcus@jet.franken.de> * [*/*] Lots of missing prototypes added, some parameter types adapted to match SDK. * [debugger/stabs.c] Don't loop forever if we don't find wine or one of the libxxx.so. * [loader/ne/module.c] Implemented MapHModuleLS,MapHModuleSL,MapHinstLS,MapHinstSL. * [misc/network.c] Implemented WNetGetUser32A. * [misc/shellord.c] Implemented ILRemoveLastID. * [multimedia/dsound.c] Fixed StarCraft memory leak. * [graphics/ddraw.c] Removed some unnecessary simple relaying functions, tried polishing up the Xlib implementation (still doesn't work), temp. removed Xshm code (to be remerged with working Xlib code). Tue Aug 18 22:29:17 1998 Ove Kaaven <ovek@arcticnet.no> * [multimedia/mmio.c] [multimedia/mmsystem.c] Fixed most mmio bugs, fully implementing mmioSetBuffer buffering, ability to read memory files, and the sndPlaySound() SND_MEMORY flag. Most mmio-using programs now work fine. * [include/dosexe.h] [include/miscemu.h] [include/module.h] [loader/module.c] [loader/task.c] [msdos/dosmem.c] Improved DOS VM flexibility and portability somewhat. (Did I get the #ifdefs right this time, BSD-ers?) * [msdos/int21.c] Made "Get Current PSP address" work as expected in a DOS VM. * [loader/dos/*] Began improving flexibility and portability somewhat. It should be easier to add DPMI RMCB callbacks now. The DOS VM no longer leaves big files lying around in /tmp after a crash. Tue Aug 18 12:38:31 1998 Turchanov Sergey <turchanov@usa.net> * [relay32/winmm.spec] This patch allows WinAmp to play WAV files (at least in PCM format). Sun Aug 16 05:34:13 1998 Pablo Saratxaga <srtxg@chanae.alphanet.ch> * [windows/keyboard.c] Corrected keyboard code to properly handle keys : ? ~ and " on non US keyboards. Sat Aug 15 18:47:14 1998 Brian Craft <bcboy@dorothy.wanglab.brandeis.edu> * [windows/win.c] Fixed severe bug in EnumChildWindwos(). Thu Aug 13 21:05:35 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de> * [controls/tooltips.c] Fixed some bugs. Added subclassing support. * [controls/toolbar.c] Improved tooltip integration. Fixed some bugs. * [controls/commctrl.c] Changed control registration and added some documentation. Fixed ShowHideMenuCtl. * [controls/rebar.c][include/rebar.h][include/commctrl.h] Improved rebar implementation (still no display). * [controls/pager.c][include/pager.h][include/commctrl.h] Improved pager implementation (still no display). * [misc/imagelist.c] Fixed a bug. * [documentation/common_controls] Updated. Sun Aug 9 19:50:20 1998 James Juran <jrj120@psu.edu> * [Makefile.in] [documentation/Makefile.in] [programs/Makefile.in] [programs/*/Makefile.in] Added uninstall rules, cleaned up install rules a little bit. Sun Aug 9 13:21:35 1998 Andreas Mohr <100.30936@germany.net> * [loader/ne/module.c] [if1632/kernel.spec] Added the undocumented HIWORD of GetModuleHandle (hFirstModule). * [loader/ne/segment.c] Wine forgot to set some NE_SEGFLAGS_*. Combined with another loader change, this fixed the "BLINKER -- error in loading module" or ghost MessageBox problem that about 1% of all Windows programs have. Some BLINKER programs still don't work, though. But I'm working on it, with great help from Blinkinc. * [loader/task.c] InitTask needs to decrement the SP register by two as Win95 does. Sun Aug 9 02:41:28 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de> * [if1632/kernel.spec] [relay32/kernel32.spec] [scheduler/syslevel.c] [loader/main.c] [win32/ordinals.c] [include/syslevel.h] [scheduler/Makefile.in] Implemented Win95 'syslevel' routines (including Win16Lock). * [if1632/relay.c] [if1632/thunk.c] [tools/build.c] [loader/task.c] [loader/ne/segment.c] [win32/kernel32.c] [memory/selector.c] [include/stackframe.h] [include/thread.h] 16-bit %fs handling revised. Use Win16Lock where appropriate. * [include/thread.h] [scheduler/synchro.c] [windows/message.c] [windows/queue.c] [win32/process.c] Implemented MsgWaitForMultipleObjects. * [files/change.c] [files/Makefile.in] [scheduler/k32obj.c] [win32/newfns.c] Implemented (dummy) file change notification objects. * [debugger/dbg.y] [scheduler/process.c] [scheduler/thread.c] [include/process.h] [include/thread.h] Suspend all threads except current when hitting debugger break point. * [objects/dib.c] Bugfix for CreateDIBSection.
1998-08-22 19:03:56 +00:00
}
Release 980913 Fri Sep 11 13:14:35 1998 Andreas Mohr <100.30936@germany.net> * [files/file.c] [include/file.h] Fixed SetFilePointer to allow negative positions as in DOS. * [graphics/ddraw.c] Added some methods to IDirect3D. * [ole/compobj.c] [if1632/compobj.spec] Added/implemented CoCreateStandardMalloc16, CoGetClassObject, CoCreateInstance, LookupETask, SetETask, CoGetState16. * [loader/task.c] MakeProcInstance: return 0 if func == NULL. * [*/*] [tools/winapi-check] Added zillions of missing WINAPI's and __cdecl's. (oops, several caused by myself) Wrote script for automated checking. * [if1632/compobj.spec] Many stub names. * [misc/ddeml.c] [ole/compobj.c] Some stubs. Tue Sep 9 21:36:48 1998 Anders Carlsson <anders.carlsson@linux.nu> * [dlls/comctl32/Makefile.in] [dlls/comctl32/commctrl.c] [dlls/comctl32/tab.c] [include/commctrl.h] [include/tab.h] Added preliminary tab control support. Sat Sep 5 16:27:20 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk> * [graphics/psdrv/*] More changes to the PostScript driver: Implemented pens and solid brushes. Colour/greyscale for fonts, pens and brushes. To get coloured output you need to have *ColorDevice set to true in your PPD, otherwise you'll get greyscale. Landscape mode now works, as does non-A4 page sizes. Encoding of fonts to ANSI is better, Symbol works again. * [objects/dc.c] [include/gdi.h] [*/*] Moved dc->w.{text,background}Pixel to X11DRV_PDEVICE where they belong. Sat Sep 5 05:12:09 1998 Ove Kaaven <ovek@arcticnet.no> * [include/dosexe.h] [include/miscemu.h] [include/msdos.h] [loader/dos/dosvm.c] [loader/dos/module.c] [msdos/dpmi.c] [msdos/int2f.c] [msdos/interrupts.c] Fixed portability. Adapted some code to make it easier to integrate the DOS subsystem with the DPMI subsystem, made the DPMI simulated real-mode interrupts be handled the V86 way. Added support for .COM files. Made int2f DPMI check fail, to avoid pkunzip crashing in attempting to use DPMI. Generally moved stuff around a little. It is now technically possible to load several DOS programs into the same memory space. Not tested, though. Fri Sep 4 21:40:45 1998 Marcus Meissner <marcus@jet.franken.de> * [if1632/kernel.spec] Changed 500-53x stubnames accordingly to nt3.51 krnl386.exe. * [win32/except.c] Fixed one bad program behaviour, (deleting SEH while in first walk). RtlUnwind is broken too I think (it should unwind on success, not while walking the exception chain). * [ole/ole2nls.c] Get*DefaultLCID returns 0x400|id. expected by one application. * [if1632/snoop.c] Handle non-standard SP returns more graceful. * [windows/class.c] hinstances are mostly irrelevant for win32. * [memory/string.c] [misc/registry.c] lstrcmpi32W: use toupper for characters < 0x100. (speedup hack for registry.c) Some small speedup hacks for registry.c Thu Sep 3 20:40:16 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de> * [Makefile.in][configure][configure.in][dlls/Makefile.in] [dlls/comctl32/Makefile.in] Created dlls/comctl32 and moved the common controls stuff to it. * [misc/version.c] Removed COMCTL32_DllGetVersion. The fixed function is part of the common controls stuff. * [dlls/comctl32/*.c][include/commctrl.h] Added structure size tests. * [dlls/comctl32/toolbar.c] Fixed a bug in TOOLBAR_GetMaxWidth(). * [dlls/comctl32/animate.c][include/animate.h] [dlls/comctl32/comboex.c][include/comboex.h] [dlls/comctl32/hotkey.c][include/hotkey.h] [dlls/comctl32/listview.c][include/listview.h] [dlls/comctl32/commctrl.c][include/commctrl.h] New files. Added Animation, ComboBoxEx, Hotkey and Listview control dummies. * [dlls/comctl32/tooltips.c] Fixed a display bug and font selection. * [dlls/comctl32/comctl32undoc.c][include/commctrl.h] Added missing DPA functions. Fixed bugs and published the function prototypes. * [documentation/common_controls] Updated. Wed Sep 2 15:43:45 1998 Patrik Stridvall <ps@leissner.se> * [AUTHORS] [include/authors.h] Added myself as a Wine author. * [memory/virtual.c] [objects/dc.c] Fixed runtime errors for Solaris. * [misc/ddeml.c] [objects/gdiobj.c] Minor fixes. * [win32/device.c] Added stubs for IFSMgr VxDCall and a partial implementation of IFSMgr DeviceIo. * [relay32/Makefile.in] [relay32/builtin32.c] [relay32/imm32.spec] [relay32/msnet32.spec] [relay32/oledlg.spec] Added new spec files for IMM32.DLL, MSNET32.DLL, OLEDLG.DLL. * [misc/Makefile.in] [misc/imm.c] [include/imm.h] Added news files for implementation of IMM32.DLL. All functions return 0 as is correct for all Western Languages. * [ole/Makefile.in] [ole/oledlg.c] [include/oledlg.h] Added new files for implementation of OLEDLG.DLL. Added stubs with FIXME:s for all functions. Wed Sep 2 10:50:00 1998 Juergen Schmied <juergen.schmied@metronet.de> * [dlls/shell32/contmenu.c][dlls/shell32/shellole.c] [dlls/shell32/shlfolder.c][dlls/shell32/shlview.c] [documentation/shell32][include/shell.h] Clean up, bugfixes. * [dlls/shell32/enumidlist.c] Fileattributes implemented. * [dlls/shell32/pidl.c] Class pidlmgr splited into functions, structures changed, some functions rewritten. * [dlls/shell32/shell32_main.c] Small changes and bugfixes SHGetFileInfoA, SHGetSpecialFolderLocation. * [dlls/shell32/shellord.c][relay32/shell32.spec] Parameter documented, implemented SHCloneSpecialIDList. Stub improved ShellExecuteEx32A. New stubs SHFind_InitMenuPopup, FileMenu_InitMenuPopup, FileMenu_Create, FileMenu_TrackPopupMenuEx, SHWinHelp, SHRunConrolPanel, DAD_ShowDragImage, FileMenu_Destroy, SHGetDataFromIDListA, SHFileOperationA. * [include/winnls.h][include/ole2nls.c] TIME_FORCE24HOURFORMAT, TIME_NOTIMEMARKER implemented in OLE_GetFormatA, GetTimeFormat32A. * [win32/code_page.c] WideCharToMultiByte: parameter checking and returning of strlen implemented. * [windows/keyboard.c][windows/defwnd.c] Debug messages added. * [windows/win.c] WIN_SetWindowLong GWL_STYLE and GWL_EXSTYLE implemented. * [controls/menu.c] Missing line added. * [include/winerror.h] Macros for SUCCEEDED and FAILED added. Mon Aug 31 00:55:31 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de> * [loader/module.c] Bugfix: LoadModule16 should *not* call LoadModule32. * [files/dos_fs.c] Bugfix: don't crash if given directory doesn't exist. Sat Aug 29 15:00:49 1998 Turchanov Sergey <turchanov@usa.net> * [include/mmsystem.h][multimedia/mmsystem.c][relay32/winmm.spec] Almost completed implementation of [snd]PlaySound (except flags SND_ALIAS_ID and SND_APPLICATION). * [if1632/user.spec][windows/winpos.c] Added SetWindowRgn16 stub. Sat Aug 29 02:53:31 1998 Alexander Lukyanov <lav@long.yar.ru> * [files/drive.c] GetDriveType32A: return DRIVE_DOESNOTEXIST in case of non existent drive. * [msdos/int21.c] INT21_FindFirstFCB: check drive validity to prevent oops. * [win32/file.c] CreateFile32A: duplicate STD_{INPUT,OUTPUT}_HANDLE. * [files/dos_fs.c] Make DOSFS_OpenDir treat "" as "/". DOSFS_OpenDevice: duplicate STD_{INPUT,OUTPUT}_HANDLE. * [windows/dialog.c] GetNextDlgTabItem32: use last/first item instead of first/last when hwndCtrl==0. This fixes initial focus. Sat Aug 29 02:46:32 1998 Adrian Harvey <adrian@select.com.au> * [include/process.h] [include/process.c] Renamed PROCESS_SELF to CURRENT_PROCESS_PSEUDOHANDLE in line with thread constant, and Win32 documentation (which calls it a pseudohandle.) Made GetCurrentProcess actually use this constant instead of the value. * [include/process.h] [include/thread.h] [scheduler/thread.c] [scheduler/process.c] [scheduler/handle.c] Modify HANDLE_GetObjPtr to understand about CURRENT_THREAD_PSEUDOHANDLE and CURRENT_PROCESS_PSEUDOHANDLE. This allows DuplicateHandle to do the correct thing with these handles. Removed now duplicate functionality from THREAD_GetPtr and PROCESS_GetPtr. * [loader/ne/segment.c] Fixed two places where HFILE32s were being created and passed to 16-bit code. This should unbreak NE self-loading code. Added two casts to remove compile time warnings. Fri Aug 28 21:04:13 1998 Joseph Pranevich <knight@baltimore.wwaves.com> * [msdos/dosmem.c] [msdos/int2f.c] Added beginnings of DOS error table. * [msdos/int1a.c] Stub for subfunction 0xb0. * [msdos/int10.c] [loader/dos/dosvm.c] INT 10 support completely rewritten and lots of debugging added. Now, DOS apps that use INT 10 to write to the screen will work. (Beyond Zork does, at least. Somewhat.) * [include/miscemu.h] [msdos/dosmem.c] [msdos/int21.c] Another shot at getting MS's generic error message facility right. * [msdos/int21.c] Command.Com wanted to set its own PSP address. I let it. Wed Aug 26 12:26:20 1998 Matthew Toseland <Matthew.Toseland@btinternet.com> * [include/file.h] [misc/lzexpand.c] Fixed LZCopy16 by fixing HFILE16/HFILE32 convertor macros so don't convert lzw handles. Tue Aug 25 22:22:55 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> * [misc/registry.c] In RegEnumvalue, ivalue == 0 is a legal request and should return the first entry. * [msdos/int21.c] Add handling for Int21-48/49 in Win16. Makes blinker demo work. * [windows/winproc.c] Add Msg32A<->Msg32W translation for LB_ADDSTRING. Tue Aug 25 21:03:31 1998 Kristian Nielsen <kristian.nielsen@risoe.dk> * [windows/win.c] Fix for SetParent(): MS Windows 3.11 does not clear the WS_CHILD flag when a child window is reparented to the desktop window. Mon Aug 24 20:55:22 1998 Berend Reitsma <berend at asset-control dot com> * [controls/menu.c] Menus created with SetMenuItemInfo and InsertMenuItem should work now. Sun Aug 23 23:23:23 1998 Alex Korobka <korobka@ams.sunysb.edu> * [controls/combo.c] Added CB_GETITEMHEIGHT. * [windows/winpos.c] WM_NCHITTEST, SWP_FRAMECHANGED bugfixes. Sat Aug 22 21:15:29 1998 Alex Priem <alexp@sci.kun.nl> * [files/profile.c] [include/windows.h] Added GetPrivateProfileSectionNames[AW],GetPrivateProfileSectionW, GetPrivateProfileStructW, GetProfileSectionW, WriteProfileSection[AW], WritePrivateProfileStructW.
1998-09-13 16:32:00 +00:00
/***********************************************************************
2003-09-11 03:06:25 +00:00
* RevokeDragDrop (OLE32.@)
Release 980913 Fri Sep 11 13:14:35 1998 Andreas Mohr <100.30936@germany.net> * [files/file.c] [include/file.h] Fixed SetFilePointer to allow negative positions as in DOS. * [graphics/ddraw.c] Added some methods to IDirect3D. * [ole/compobj.c] [if1632/compobj.spec] Added/implemented CoCreateStandardMalloc16, CoGetClassObject, CoCreateInstance, LookupETask, SetETask, CoGetState16. * [loader/task.c] MakeProcInstance: return 0 if func == NULL. * [*/*] [tools/winapi-check] Added zillions of missing WINAPI's and __cdecl's. (oops, several caused by myself) Wrote script for automated checking. * [if1632/compobj.spec] Many stub names. * [misc/ddeml.c] [ole/compobj.c] Some stubs. Tue Sep 9 21:36:48 1998 Anders Carlsson <anders.carlsson@linux.nu> * [dlls/comctl32/Makefile.in] [dlls/comctl32/commctrl.c] [dlls/comctl32/tab.c] [include/commctrl.h] [include/tab.h] Added preliminary tab control support. Sat Sep 5 16:27:20 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk> * [graphics/psdrv/*] More changes to the PostScript driver: Implemented pens and solid brushes. Colour/greyscale for fonts, pens and brushes. To get coloured output you need to have *ColorDevice set to true in your PPD, otherwise you'll get greyscale. Landscape mode now works, as does non-A4 page sizes. Encoding of fonts to ANSI is better, Symbol works again. * [objects/dc.c] [include/gdi.h] [*/*] Moved dc->w.{text,background}Pixel to X11DRV_PDEVICE where they belong. Sat Sep 5 05:12:09 1998 Ove Kaaven <ovek@arcticnet.no> * [include/dosexe.h] [include/miscemu.h] [include/msdos.h] [loader/dos/dosvm.c] [loader/dos/module.c] [msdos/dpmi.c] [msdos/int2f.c] [msdos/interrupts.c] Fixed portability. Adapted some code to make it easier to integrate the DOS subsystem with the DPMI subsystem, made the DPMI simulated real-mode interrupts be handled the V86 way. Added support for .COM files. Made int2f DPMI check fail, to avoid pkunzip crashing in attempting to use DPMI. Generally moved stuff around a little. It is now technically possible to load several DOS programs into the same memory space. Not tested, though. Fri Sep 4 21:40:45 1998 Marcus Meissner <marcus@jet.franken.de> * [if1632/kernel.spec] Changed 500-53x stubnames accordingly to nt3.51 krnl386.exe. * [win32/except.c] Fixed one bad program behaviour, (deleting SEH while in first walk). RtlUnwind is broken too I think (it should unwind on success, not while walking the exception chain). * [ole/ole2nls.c] Get*DefaultLCID returns 0x400|id. expected by one application. * [if1632/snoop.c] Handle non-standard SP returns more graceful. * [windows/class.c] hinstances are mostly irrelevant for win32. * [memory/string.c] [misc/registry.c] lstrcmpi32W: use toupper for characters < 0x100. (speedup hack for registry.c) Some small speedup hacks for registry.c Thu Sep 3 20:40:16 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de> * [Makefile.in][configure][configure.in][dlls/Makefile.in] [dlls/comctl32/Makefile.in] Created dlls/comctl32 and moved the common controls stuff to it. * [misc/version.c] Removed COMCTL32_DllGetVersion. The fixed function is part of the common controls stuff. * [dlls/comctl32/*.c][include/commctrl.h] Added structure size tests. * [dlls/comctl32/toolbar.c] Fixed a bug in TOOLBAR_GetMaxWidth(). * [dlls/comctl32/animate.c][include/animate.h] [dlls/comctl32/comboex.c][include/comboex.h] [dlls/comctl32/hotkey.c][include/hotkey.h] [dlls/comctl32/listview.c][include/listview.h] [dlls/comctl32/commctrl.c][include/commctrl.h] New files. Added Animation, ComboBoxEx, Hotkey and Listview control dummies. * [dlls/comctl32/tooltips.c] Fixed a display bug and font selection. * [dlls/comctl32/comctl32undoc.c][include/commctrl.h] Added missing DPA functions. Fixed bugs and published the function prototypes. * [documentation/common_controls] Updated. Wed Sep 2 15:43:45 1998 Patrik Stridvall <ps@leissner.se> * [AUTHORS] [include/authors.h] Added myself as a Wine author. * [memory/virtual.c] [objects/dc.c] Fixed runtime errors for Solaris. * [misc/ddeml.c] [objects/gdiobj.c] Minor fixes. * [win32/device.c] Added stubs for IFSMgr VxDCall and a partial implementation of IFSMgr DeviceIo. * [relay32/Makefile.in] [relay32/builtin32.c] [relay32/imm32.spec] [relay32/msnet32.spec] [relay32/oledlg.spec] Added new spec files for IMM32.DLL, MSNET32.DLL, OLEDLG.DLL. * [misc/Makefile.in] [misc/imm.c] [include/imm.h] Added news files for implementation of IMM32.DLL. All functions return 0 as is correct for all Western Languages. * [ole/Makefile.in] [ole/oledlg.c] [include/oledlg.h] Added new files for implementation of OLEDLG.DLL. Added stubs with FIXME:s for all functions. Wed Sep 2 10:50:00 1998 Juergen Schmied <juergen.schmied@metronet.de> * [dlls/shell32/contmenu.c][dlls/shell32/shellole.c] [dlls/shell32/shlfolder.c][dlls/shell32/shlview.c] [documentation/shell32][include/shell.h] Clean up, bugfixes. * [dlls/shell32/enumidlist.c] Fileattributes implemented. * [dlls/shell32/pidl.c] Class pidlmgr splited into functions, structures changed, some functions rewritten. * [dlls/shell32/shell32_main.c] Small changes and bugfixes SHGetFileInfoA, SHGetSpecialFolderLocation. * [dlls/shell32/shellord.c][relay32/shell32.spec] Parameter documented, implemented SHCloneSpecialIDList. Stub improved ShellExecuteEx32A. New stubs SHFind_InitMenuPopup, FileMenu_InitMenuPopup, FileMenu_Create, FileMenu_TrackPopupMenuEx, SHWinHelp, SHRunConrolPanel, DAD_ShowDragImage, FileMenu_Destroy, SHGetDataFromIDListA, SHFileOperationA. * [include/winnls.h][include/ole2nls.c] TIME_FORCE24HOURFORMAT, TIME_NOTIMEMARKER implemented in OLE_GetFormatA, GetTimeFormat32A. * [win32/code_page.c] WideCharToMultiByte: parameter checking and returning of strlen implemented. * [windows/keyboard.c][windows/defwnd.c] Debug messages added. * [windows/win.c] WIN_SetWindowLong GWL_STYLE and GWL_EXSTYLE implemented. * [controls/menu.c] Missing line added. * [include/winerror.h] Macros for SUCCEEDED and FAILED added. Mon Aug 31 00:55:31 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de> * [loader/module.c] Bugfix: LoadModule16 should *not* call LoadModule32. * [files/dos_fs.c] Bugfix: don't crash if given directory doesn't exist. Sat Aug 29 15:00:49 1998 Turchanov Sergey <turchanov@usa.net> * [include/mmsystem.h][multimedia/mmsystem.c][relay32/winmm.spec] Almost completed implementation of [snd]PlaySound (except flags SND_ALIAS_ID and SND_APPLICATION). * [if1632/user.spec][windows/winpos.c] Added SetWindowRgn16 stub. Sat Aug 29 02:53:31 1998 Alexander Lukyanov <lav@long.yar.ru> * [files/drive.c] GetDriveType32A: return DRIVE_DOESNOTEXIST in case of non existent drive. * [msdos/int21.c] INT21_FindFirstFCB: check drive validity to prevent oops. * [win32/file.c] CreateFile32A: duplicate STD_{INPUT,OUTPUT}_HANDLE. * [files/dos_fs.c] Make DOSFS_OpenDir treat "" as "/". DOSFS_OpenDevice: duplicate STD_{INPUT,OUTPUT}_HANDLE. * [windows/dialog.c] GetNextDlgTabItem32: use last/first item instead of first/last when hwndCtrl==0. This fixes initial focus. Sat Aug 29 02:46:32 1998 Adrian Harvey <adrian@select.com.au> * [include/process.h] [include/process.c] Renamed PROCESS_SELF to CURRENT_PROCESS_PSEUDOHANDLE in line with thread constant, and Win32 documentation (which calls it a pseudohandle.) Made GetCurrentProcess actually use this constant instead of the value. * [include/process.h] [include/thread.h] [scheduler/thread.c] [scheduler/process.c] [scheduler/handle.c] Modify HANDLE_GetObjPtr to understand about CURRENT_THREAD_PSEUDOHANDLE and CURRENT_PROCESS_PSEUDOHANDLE. This allows DuplicateHandle to do the correct thing with these handles. Removed now duplicate functionality from THREAD_GetPtr and PROCESS_GetPtr. * [loader/ne/segment.c] Fixed two places where HFILE32s were being created and passed to 16-bit code. This should unbreak NE self-loading code. Added two casts to remove compile time warnings. Fri Aug 28 21:04:13 1998 Joseph Pranevich <knight@baltimore.wwaves.com> * [msdos/dosmem.c] [msdos/int2f.c] Added beginnings of DOS error table. * [msdos/int1a.c] Stub for subfunction 0xb0. * [msdos/int10.c] [loader/dos/dosvm.c] INT 10 support completely rewritten and lots of debugging added. Now, DOS apps that use INT 10 to write to the screen will work. (Beyond Zork does, at least. Somewhat.) * [include/miscemu.h] [msdos/dosmem.c] [msdos/int21.c] Another shot at getting MS's generic error message facility right. * [msdos/int21.c] Command.Com wanted to set its own PSP address. I let it. Wed Aug 26 12:26:20 1998 Matthew Toseland <Matthew.Toseland@btinternet.com> * [include/file.h] [misc/lzexpand.c] Fixed LZCopy16 by fixing HFILE16/HFILE32 convertor macros so don't convert lzw handles. Tue Aug 25 22:22:55 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> * [misc/registry.c] In RegEnumvalue, ivalue == 0 is a legal request and should return the first entry. * [msdos/int21.c] Add handling for Int21-48/49 in Win16. Makes blinker demo work. * [windows/winproc.c] Add Msg32A<->Msg32W translation for LB_ADDSTRING. Tue Aug 25 21:03:31 1998 Kristian Nielsen <kristian.nielsen@risoe.dk> * [windows/win.c] Fix for SetParent(): MS Windows 3.11 does not clear the WS_CHILD flag when a child window is reparented to the desktop window. Mon Aug 24 20:55:22 1998 Berend Reitsma <berend at asset-control dot com> * [controls/menu.c] Menus created with SetMenuItemInfo and InsertMenuItem should work now. Sun Aug 23 23:23:23 1998 Alex Korobka <korobka@ams.sunysb.edu> * [controls/combo.c] Added CB_GETITEMHEIGHT. * [windows/winpos.c] WM_NCHITTEST, SWP_FRAMECHANGED bugfixes. Sat Aug 22 21:15:29 1998 Alex Priem <alexp@sci.kun.nl> * [files/profile.c] [include/windows.h] Added GetPrivateProfileSectionNames[AW],GetPrivateProfileSectionW, GetPrivateProfileStructW, GetProfileSectionW, WriteProfileSection[AW], WritePrivateProfileStructW.
1998-09-13 16:32:00 +00:00
*/
HRESULT WINAPI RevokeDragDrop(HWND hwnd)
{
HANDLE map;
IStream *stream;
IDropTarget *drop_target;
HRESULT hr;
2002-11-22 04:43:02 +00:00
TRACE("(%p)\n", hwnd);
if (!IsWindow(hwnd))
{
ERR("invalid hwnd %p\n", hwnd);
return DRAGDROP_E_INVALIDHWND;
}
/* no registration data */
if (!(map = get_droptarget_handle(hwnd)))
return DRAGDROP_E_NOTREGISTERED;
drop_target = GetPropW(hwnd, prop_oledroptarget);
if(drop_target) IDropTarget_Release(drop_target);
RemovePropW(hwnd, prop_oledroptarget);
RemovePropW(hwnd, prop_marshalleddroptarget);
hr = create_stream_from_map(map, &stream);
if(SUCCEEDED(hr))
{
CoReleaseMarshalData(stream);
IStream_Release(stream);
}
CloseHandle(map);
return hr;
Release 980913 Fri Sep 11 13:14:35 1998 Andreas Mohr <100.30936@germany.net> * [files/file.c] [include/file.h] Fixed SetFilePointer to allow negative positions as in DOS. * [graphics/ddraw.c] Added some methods to IDirect3D. * [ole/compobj.c] [if1632/compobj.spec] Added/implemented CoCreateStandardMalloc16, CoGetClassObject, CoCreateInstance, LookupETask, SetETask, CoGetState16. * [loader/task.c] MakeProcInstance: return 0 if func == NULL. * [*/*] [tools/winapi-check] Added zillions of missing WINAPI's and __cdecl's. (oops, several caused by myself) Wrote script for automated checking. * [if1632/compobj.spec] Many stub names. * [misc/ddeml.c] [ole/compobj.c] Some stubs. Tue Sep 9 21:36:48 1998 Anders Carlsson <anders.carlsson@linux.nu> * [dlls/comctl32/Makefile.in] [dlls/comctl32/commctrl.c] [dlls/comctl32/tab.c] [include/commctrl.h] [include/tab.h] Added preliminary tab control support. Sat Sep 5 16:27:20 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk> * [graphics/psdrv/*] More changes to the PostScript driver: Implemented pens and solid brushes. Colour/greyscale for fonts, pens and brushes. To get coloured output you need to have *ColorDevice set to true in your PPD, otherwise you'll get greyscale. Landscape mode now works, as does non-A4 page sizes. Encoding of fonts to ANSI is better, Symbol works again. * [objects/dc.c] [include/gdi.h] [*/*] Moved dc->w.{text,background}Pixel to X11DRV_PDEVICE where they belong. Sat Sep 5 05:12:09 1998 Ove Kaaven <ovek@arcticnet.no> * [include/dosexe.h] [include/miscemu.h] [include/msdos.h] [loader/dos/dosvm.c] [loader/dos/module.c] [msdos/dpmi.c] [msdos/int2f.c] [msdos/interrupts.c] Fixed portability. Adapted some code to make it easier to integrate the DOS subsystem with the DPMI subsystem, made the DPMI simulated real-mode interrupts be handled the V86 way. Added support for .COM files. Made int2f DPMI check fail, to avoid pkunzip crashing in attempting to use DPMI. Generally moved stuff around a little. It is now technically possible to load several DOS programs into the same memory space. Not tested, though. Fri Sep 4 21:40:45 1998 Marcus Meissner <marcus@jet.franken.de> * [if1632/kernel.spec] Changed 500-53x stubnames accordingly to nt3.51 krnl386.exe. * [win32/except.c] Fixed one bad program behaviour, (deleting SEH while in first walk). RtlUnwind is broken too I think (it should unwind on success, not while walking the exception chain). * [ole/ole2nls.c] Get*DefaultLCID returns 0x400|id. expected by one application. * [if1632/snoop.c] Handle non-standard SP returns more graceful. * [windows/class.c] hinstances are mostly irrelevant for win32. * [memory/string.c] [misc/registry.c] lstrcmpi32W: use toupper for characters < 0x100. (speedup hack for registry.c) Some small speedup hacks for registry.c Thu Sep 3 20:40:16 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de> * [Makefile.in][configure][configure.in][dlls/Makefile.in] [dlls/comctl32/Makefile.in] Created dlls/comctl32 and moved the common controls stuff to it. * [misc/version.c] Removed COMCTL32_DllGetVersion. The fixed function is part of the common controls stuff. * [dlls/comctl32/*.c][include/commctrl.h] Added structure size tests. * [dlls/comctl32/toolbar.c] Fixed a bug in TOOLBAR_GetMaxWidth(). * [dlls/comctl32/animate.c][include/animate.h] [dlls/comctl32/comboex.c][include/comboex.h] [dlls/comctl32/hotkey.c][include/hotkey.h] [dlls/comctl32/listview.c][include/listview.h] [dlls/comctl32/commctrl.c][include/commctrl.h] New files. Added Animation, ComboBoxEx, Hotkey and Listview control dummies. * [dlls/comctl32/tooltips.c] Fixed a display bug and font selection. * [dlls/comctl32/comctl32undoc.c][include/commctrl.h] Added missing DPA functions. Fixed bugs and published the function prototypes. * [documentation/common_controls] Updated. Wed Sep 2 15:43:45 1998 Patrik Stridvall <ps@leissner.se> * [AUTHORS] [include/authors.h] Added myself as a Wine author. * [memory/virtual.c] [objects/dc.c] Fixed runtime errors for Solaris. * [misc/ddeml.c] [objects/gdiobj.c] Minor fixes. * [win32/device.c] Added stubs for IFSMgr VxDCall and a partial implementation of IFSMgr DeviceIo. * [relay32/Makefile.in] [relay32/builtin32.c] [relay32/imm32.spec] [relay32/msnet32.spec] [relay32/oledlg.spec] Added new spec files for IMM32.DLL, MSNET32.DLL, OLEDLG.DLL. * [misc/Makefile.in] [misc/imm.c] [include/imm.h] Added news files for implementation of IMM32.DLL. All functions return 0 as is correct for all Western Languages. * [ole/Makefile.in] [ole/oledlg.c] [include/oledlg.h] Added new files for implementation of OLEDLG.DLL. Added stubs with FIXME:s for all functions. Wed Sep 2 10:50:00 1998 Juergen Schmied <juergen.schmied@metronet.de> * [dlls/shell32/contmenu.c][dlls/shell32/shellole.c] [dlls/shell32/shlfolder.c][dlls/shell32/shlview.c] [documentation/shell32][include/shell.h] Clean up, bugfixes. * [dlls/shell32/enumidlist.c] Fileattributes implemented. * [dlls/shell32/pidl.c] Class pidlmgr splited into functions, structures changed, some functions rewritten. * [dlls/shell32/shell32_main.c] Small changes and bugfixes SHGetFileInfoA, SHGetSpecialFolderLocation. * [dlls/shell32/shellord.c][relay32/shell32.spec] Parameter documented, implemented SHCloneSpecialIDList. Stub improved ShellExecuteEx32A. New stubs SHFind_InitMenuPopup, FileMenu_InitMenuPopup, FileMenu_Create, FileMenu_TrackPopupMenuEx, SHWinHelp, SHRunConrolPanel, DAD_ShowDragImage, FileMenu_Destroy, SHGetDataFromIDListA, SHFileOperationA. * [include/winnls.h][include/ole2nls.c] TIME_FORCE24HOURFORMAT, TIME_NOTIMEMARKER implemented in OLE_GetFormatA, GetTimeFormat32A. * [win32/code_page.c] WideCharToMultiByte: parameter checking and returning of strlen implemented. * [windows/keyboard.c][windows/defwnd.c] Debug messages added. * [windows/win.c] WIN_SetWindowLong GWL_STYLE and GWL_EXSTYLE implemented. * [controls/menu.c] Missing line added. * [include/winerror.h] Macros for SUCCEEDED and FAILED added. Mon Aug 31 00:55:31 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de> * [loader/module.c] Bugfix: LoadModule16 should *not* call LoadModule32. * [files/dos_fs.c] Bugfix: don't crash if given directory doesn't exist. Sat Aug 29 15:00:49 1998 Turchanov Sergey <turchanov@usa.net> * [include/mmsystem.h][multimedia/mmsystem.c][relay32/winmm.spec] Almost completed implementation of [snd]PlaySound (except flags SND_ALIAS_ID and SND_APPLICATION). * [if1632/user.spec][windows/winpos.c] Added SetWindowRgn16 stub. Sat Aug 29 02:53:31 1998 Alexander Lukyanov <lav@long.yar.ru> * [files/drive.c] GetDriveType32A: return DRIVE_DOESNOTEXIST in case of non existent drive. * [msdos/int21.c] INT21_FindFirstFCB: check drive validity to prevent oops. * [win32/file.c] CreateFile32A: duplicate STD_{INPUT,OUTPUT}_HANDLE. * [files/dos_fs.c] Make DOSFS_OpenDir treat "" as "/". DOSFS_OpenDevice: duplicate STD_{INPUT,OUTPUT}_HANDLE. * [windows/dialog.c] GetNextDlgTabItem32: use last/first item instead of first/last when hwndCtrl==0. This fixes initial focus. Sat Aug 29 02:46:32 1998 Adrian Harvey <adrian@select.com.au> * [include/process.h] [include/process.c] Renamed PROCESS_SELF to CURRENT_PROCESS_PSEUDOHANDLE in line with thread constant, and Win32 documentation (which calls it a pseudohandle.) Made GetCurrentProcess actually use this constant instead of the value. * [include/process.h] [include/thread.h] [scheduler/thread.c] [scheduler/process.c] [scheduler/handle.c] Modify HANDLE_GetObjPtr to understand about CURRENT_THREAD_PSEUDOHANDLE and CURRENT_PROCESS_PSEUDOHANDLE. This allows DuplicateHandle to do the correct thing with these handles. Removed now duplicate functionality from THREAD_GetPtr and PROCESS_GetPtr. * [loader/ne/segment.c] Fixed two places where HFILE32s were being created and passed to 16-bit code. This should unbreak NE self-loading code. Added two casts to remove compile time warnings. Fri Aug 28 21:04:13 1998 Joseph Pranevich <knight@baltimore.wwaves.com> * [msdos/dosmem.c] [msdos/int2f.c] Added beginnings of DOS error table. * [msdos/int1a.c] Stub for subfunction 0xb0. * [msdos/int10.c] [loader/dos/dosvm.c] INT 10 support completely rewritten and lots of debugging added. Now, DOS apps that use INT 10 to write to the screen will work. (Beyond Zork does, at least. Somewhat.) * [include/miscemu.h] [msdos/dosmem.c] [msdos/int21.c] Another shot at getting MS's generic error message facility right. * [msdos/int21.c] Command.Com wanted to set its own PSP address. I let it. Wed Aug 26 12:26:20 1998 Matthew Toseland <Matthew.Toseland@btinternet.com> * [include/file.h] [misc/lzexpand.c] Fixed LZCopy16 by fixing HFILE16/HFILE32 convertor macros so don't convert lzw handles. Tue Aug 25 22:22:55 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> * [misc/registry.c] In RegEnumvalue, ivalue == 0 is a legal request and should return the first entry. * [msdos/int21.c] Add handling for Int21-48/49 in Win16. Makes blinker demo work. * [windows/winproc.c] Add Msg32A<->Msg32W translation for LB_ADDSTRING. Tue Aug 25 21:03:31 1998 Kristian Nielsen <kristian.nielsen@risoe.dk> * [windows/win.c] Fix for SetParent(): MS Windows 3.11 does not clear the WS_CHILD flag when a child window is reparented to the desktop window. Mon Aug 24 20:55:22 1998 Berend Reitsma <berend at asset-control dot com> * [controls/menu.c] Menus created with SetMenuItemInfo and InsertMenuItem should work now. Sun Aug 23 23:23:23 1998 Alex Korobka <korobka@ams.sunysb.edu> * [controls/combo.c] Added CB_GETITEMHEIGHT. * [windows/winpos.c] WM_NCHITTEST, SWP_FRAMECHANGED bugfixes. Sat Aug 22 21:15:29 1998 Alex Priem <alexp@sci.kun.nl> * [files/profile.c] [include/windows.h] Added GetPrivateProfileSectionNames[AW],GetPrivateProfileSectionW, GetPrivateProfileStructW, GetProfileSectionW, WriteProfileSection[AW], WritePrivateProfileStructW.
1998-09-13 16:32:00 +00:00
}
/***********************************************************************
2003-09-11 03:06:25 +00:00
* OleRegGetUserType (OLE32.@)
*/
HRESULT WINAPI OleRegGetUserType(REFCLSID clsid, DWORD form, LPOLESTR *usertype)
{
static const WCHAR auxusertypeW[] = {'A','u','x','U','s','e','r','T','y','p','e','\\','%','d',0};
DWORD valuetype, valuelen;
WCHAR auxkeynameW[16];
HKEY usertypekey;
HRESULT hres;
LONG ret;
TRACE("(%s, %u, %p)\n", debugstr_guid(clsid), form, usertype);
if (!usertype)
return E_INVALIDARG;
*usertype = NULL;
/* Return immediately if it's not registered. */
hres = COM_OpenKeyForCLSID(clsid, NULL, KEY_READ, &usertypekey);
if (FAILED(hres))
return hres;
valuelen = 0;
/* Try additional types if requested. If they don't exist fall back to USERCLASSTYPE_FULL. */
if (form != USERCLASSTYPE_FULL)
{
HKEY auxkey;
swprintf(auxkeynameW, ARRAY_SIZE(auxkeynameW), auxusertypeW, form);
if (COM_OpenKeyForCLSID(clsid, auxkeynameW, KEY_READ, &auxkey) == S_OK)
{
if (!RegQueryValueExW(auxkey, emptyW, NULL, &valuetype, NULL, &valuelen) && valuelen)
{
RegCloseKey(usertypekey);
usertypekey = auxkey;
}
else
RegCloseKey(auxkey);
}
}
valuelen = 0;
if (RegQueryValueExW(usertypekey, emptyW, NULL, &valuetype, NULL, &valuelen))
{
RegCloseKey(usertypekey);
return REGDB_E_READREGDB;
}
*usertype = CoTaskMemAlloc(valuelen);
if (!*usertype)
{
RegCloseKey(usertypekey);
return E_OUTOFMEMORY;
}
ret = RegQueryValueExW(usertypekey,
emptyW,
NULL,
&valuetype,
(LPBYTE)*usertype,
&valuelen);
RegCloseKey(usertypekey);
if (ret != ERROR_SUCCESS)
{
CoTaskMemFree(*usertype);
*usertype = NULL;
return REGDB_E_READREGDB;
}
return S_OK;
}
/***********************************************************************
2003-09-11 03:06:25 +00:00
* DoDragDrop [OLE32.@]
*/
HRESULT WINAPI DoDragDrop (
IDataObject *pDataObject, /* [in] ptr to the data obj */
IDropSource* pDropSource, /* [in] ptr to the source obj */
DWORD dwOKEffect, /* [in] effects allowed by the source */
DWORD *pdwEffect) /* [out] ptr to effects of the source */
{
static const WCHAR trackerW[] = {'T','r','a','c','k','e','r','W','i','n','d','o','w',0};
TrackerWindowInfo trackerInfo;
HWND hwndTrackWindow;
MSG msg;
2012-02-21 14:19:44 +00:00
TRACE("(%p, %p, %08x, %p)\n", pDataObject, pDropSource, dwOKEffect, pdwEffect);
if (!pDataObject || !pDropSource || !pdwEffect)
return E_INVALIDARG;
/*
* Setup the drag n drop tracking window.
*/
trackerInfo.dataObject = pDataObject;
trackerInfo.dropSource = pDropSource;
trackerInfo.dwOKEffect = dwOKEffect;
trackerInfo.pdwEffect = pdwEffect;
trackerInfo.trackingDone = FALSE;
trackerInfo.inTrackCall = FALSE;
trackerInfo.escPressed = FALSE;
trackerInfo.curTargetHWND = 0;
trackerInfo.curDragTarget = 0;
hwndTrackWindow = CreateWindowW(OLEDD_DRAGTRACKERCLASS, trackerW,
WS_POPUP, CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT, 0, 0, 0,
&trackerInfo);
if (hwndTrackWindow)
{
/*
* Capture the mouse input
*/
SetCapture(hwndTrackWindow);
msg.message = 0;
/*
2007-10-23 13:30:30 +00:00
* Pump messages. All mouse input should go to the capture window.
*/
while (!trackerInfo.trackingDone && GetMessageW(&msg, 0, 0, 0) )
{
trackerInfo.curMousePos.x = msg.pt.x;
trackerInfo.curMousePos.y = msg.pt.y;
trackerInfo.dwKeyState = OLEDD_GetButtonState();
2002-05-31 23:06:46 +00:00
if ( (msg.message >= WM_KEYFIRST) &&
(msg.message <= WM_KEYLAST) )
{
/*
* When keyboard messages are sent to windows on this thread, we
* want to ignore notify the drop source that the state changed.
* in the case of the Escape key, we also notify the drop source
* we give it a special meaning.
*/
if ( (msg.message==WM_KEYDOWN) &&
(msg.wParam==VK_ESCAPE) )
{
trackerInfo.escPressed = TRUE;
}
/*
* Notify the drop source.
2002-05-31 23:06:46 +00:00
*/
OLEDD_TrackStateChange(&trackerInfo);
}
else
{
/*
* Dispatch the messages only when it's not a keyboard message.
*/
DispatchMessageW(&msg);
}
}
/* re-post the quit message to outer message loop */
if (msg.message == WM_QUIT)
PostQuitMessage(msg.wParam);
/*
* Destroy the temporary window.
*/
DestroyWindow(hwndTrackWindow);
return trackerInfo.returnValue;
}
return E_FAIL;
}
/***********************************************************************
2003-09-11 03:06:25 +00:00
* OleQueryLinkFromData [OLE32.@]
*/
HRESULT WINAPI OleQueryLinkFromData(
IDataObject* pSrcDataObject)
{
FIXME("(%p),stub!\n", pSrcDataObject);
return S_FALSE;
}
/***********************************************************************
2003-09-11 03:06:25 +00:00
* OleRegGetMiscStatus [OLE32.@]
*/
HRESULT WINAPI OleRegGetMiscStatus(
REFCLSID clsid,
DWORD dwAspect,
DWORD* pdwStatus)
{
static const WCHAR miscstatusW[] = {'M','i','s','c','S','t','a','t','u','s',0};
static const WCHAR dfmtW[] = {'%','d',0};
WCHAR keyName[16];
HKEY miscStatusKey;
HKEY aspectKey;
LONG result;
HRESULT hr;
TRACE("(%s, %d, %p)\n", debugstr_guid(clsid), dwAspect, pdwStatus);
if (!pdwStatus) return E_INVALIDARG;
*pdwStatus = 0;
if (actctx_get_miscstatus(clsid, dwAspect, pdwStatus)) return S_OK;
hr = COM_OpenKeyForCLSID(clsid, miscstatusW, KEY_READ, &miscStatusKey);
if (FAILED(hr))
/* missing key is not a failure */
return hr == REGDB_E_KEYMISSING ? S_OK : hr;
OLEUTL_ReadRegistryDWORDValue(miscStatusKey, pdwStatus);
/*
* Open the key specific to the requested aspect.
*/
swprintf(keyName, ARRAY_SIZE(keyName), dfmtW, dwAspect);
result = open_classes_key(miscStatusKey, keyName, KEY_READ, &aspectKey);
if (result == ERROR_SUCCESS)
{
OLEUTL_ReadRegistryDWORDValue(aspectKey, pdwStatus);
RegCloseKey(aspectKey);
}
RegCloseKey(miscStatusKey);
return S_OK;
}
2005-09-23 10:08:25 +00:00
static HRESULT EnumOLEVERB_Construct(HKEY hkeyVerb, ULONG index, IEnumOLEVERB **ppenum);
typedef struct
{
IEnumOLEVERB IEnumOLEVERB_iface;
2005-09-23 10:08:25 +00:00
LONG ref;
HKEY hkeyVerb;
ULONG index;
} EnumOLEVERB;
static inline EnumOLEVERB *impl_from_IEnumOLEVERB(IEnumOLEVERB *iface)
{
return CONTAINING_RECORD(iface, EnumOLEVERB, IEnumOLEVERB_iface);
}
2005-09-23 10:08:25 +00:00
static HRESULT WINAPI EnumOLEVERB_QueryInterface(
IEnumOLEVERB *iface, REFIID riid, void **ppv)
{
TRACE("(%s, %p)\n", debugstr_guid(riid), ppv);
if (IsEqualIID(riid, &IID_IUnknown) ||
IsEqualIID(riid, &IID_IEnumOLEVERB))
{
IEnumOLEVERB_AddRef(iface);
2005-09-23 10:08:25 +00:00
*ppv = iface;
return S_OK;
}
return E_NOINTERFACE;
}
static ULONG WINAPI EnumOLEVERB_AddRef(
IEnumOLEVERB *iface)
{
EnumOLEVERB *This = impl_from_IEnumOLEVERB(iface);
2005-09-23 10:08:25 +00:00
TRACE("()\n");
return InterlockedIncrement(&This->ref);
}
static ULONG WINAPI EnumOLEVERB_Release(
IEnumOLEVERB *iface)
{
EnumOLEVERB *This = impl_from_IEnumOLEVERB(iface);
2005-09-23 10:08:25 +00:00
LONG refs = InterlockedDecrement(&This->ref);
TRACE("()\n");
if (!refs)
{
RegCloseKey(This->hkeyVerb);
HeapFree(GetProcessHeap(), 0, This);
}
return refs;
}
static HRESULT WINAPI EnumOLEVERB_Next(
IEnumOLEVERB *iface, ULONG celt, LPOLEVERB rgelt,
ULONG *pceltFetched)
{
EnumOLEVERB *This = impl_from_IEnumOLEVERB(iface);
2005-09-23 10:08:25 +00:00
HRESULT hr = S_OK;
TRACE("(%d, %p, %p)\n", celt, rgelt, pceltFetched);
2005-09-23 10:08:25 +00:00
if (pceltFetched)
*pceltFetched = 0;
for (; celt; celt--, rgelt++)
{
WCHAR wszSubKey[20];
LONG cbData;
LPWSTR pwszOLEVERB;
LPWSTR pwszMenuFlags;
LPWSTR pwszAttribs;
LONG res = RegEnumKeyW(This->hkeyVerb, This->index, wszSubKey, ARRAY_SIZE(wszSubKey));
2005-09-23 10:08:25 +00:00
if (res == ERROR_NO_MORE_ITEMS)
{
hr = S_FALSE;
break;
}
else if (res != ERROR_SUCCESS)
{
ERR("RegEnumKeyW failed with error %d\n", res);
2005-09-23 10:08:25 +00:00
hr = REGDB_E_READREGDB;
break;
}
res = RegQueryValueW(This->hkeyVerb, wszSubKey, NULL, &cbData);
if (res != ERROR_SUCCESS)
{
ERR("RegQueryValueW failed with error %d\n", res);
2005-09-23 10:08:25 +00:00
hr = REGDB_E_READREGDB;
break;
}
pwszOLEVERB = CoTaskMemAlloc(cbData);
if (!pwszOLEVERB)
{
hr = E_OUTOFMEMORY;
break;
}
res = RegQueryValueW(This->hkeyVerb, wszSubKey, pwszOLEVERB, &cbData);
if (res != ERROR_SUCCESS)
{
ERR("RegQueryValueW failed with error %d\n", res);
2005-09-23 10:08:25 +00:00
hr = REGDB_E_READREGDB;
CoTaskMemFree(pwszOLEVERB);
break;
}
TRACE("verb string: %s\n", debugstr_w(pwszOLEVERB));
pwszMenuFlags = wcschr(pwszOLEVERB, ',');
2005-09-23 10:08:25 +00:00
if (!pwszMenuFlags)
{
hr = OLEOBJ_E_INVALIDVERB;
CoTaskMemFree(pwszOLEVERB);
break;
}
/* nul terminate the name string and advance to first character */
*pwszMenuFlags = '\0';
pwszMenuFlags++;
pwszAttribs = wcschr(pwszMenuFlags, ',');
2005-09-23 10:08:25 +00:00
if (!pwszAttribs)
{
hr = OLEOBJ_E_INVALIDVERB;
CoTaskMemFree(pwszOLEVERB);
break;
}
/* nul terminate the menu string and advance to first character */
*pwszAttribs = '\0';
pwszAttribs++;
/* fill out structure for this verb */
rgelt->lVerb = wcstol(wszSubKey, NULL, 10);
2005-09-23 10:08:25 +00:00
rgelt->lpszVerbName = pwszOLEVERB; /* user should free */
rgelt->fuFlags = wcstol(pwszMenuFlags, NULL, 10);
rgelt->grfAttribs = wcstol(pwszAttribs, NULL, 10);
2005-09-23 10:08:25 +00:00
if (pceltFetched)
(*pceltFetched)++;
2005-09-23 10:08:25 +00:00
This->index++;
}
return hr;
}
static HRESULT WINAPI EnumOLEVERB_Skip(
IEnumOLEVERB *iface, ULONG celt)
{
EnumOLEVERB *This = impl_from_IEnumOLEVERB(iface);
2005-09-23 10:08:25 +00:00
TRACE("(%d)\n", celt);
2005-09-23 10:08:25 +00:00
This->index += celt;
return S_OK;
}
static HRESULT WINAPI EnumOLEVERB_Reset(
IEnumOLEVERB *iface)
{
EnumOLEVERB *This = impl_from_IEnumOLEVERB(iface);
2005-09-23 10:08:25 +00:00
TRACE("()\n");
This->index = 0;
return S_OK;
}
static HRESULT WINAPI EnumOLEVERB_Clone(
IEnumOLEVERB *iface,
IEnumOLEVERB **ppenum)
{
EnumOLEVERB *This = impl_from_IEnumOLEVERB(iface);
2005-09-23 10:08:25 +00:00
HKEY hkeyVerb;
TRACE("(%p)\n", ppenum);
if (!DuplicateHandle(GetCurrentProcess(), This->hkeyVerb, GetCurrentProcess(), (HANDLE *)&hkeyVerb, 0, FALSE, DUPLICATE_SAME_ACCESS))
return HRESULT_FROM_WIN32(GetLastError());
return EnumOLEVERB_Construct(hkeyVerb, This->index, ppenum);
}
static const IEnumOLEVERBVtbl EnumOLEVERB_VTable =
{
EnumOLEVERB_QueryInterface,
EnumOLEVERB_AddRef,
EnumOLEVERB_Release,
EnumOLEVERB_Next,
EnumOLEVERB_Skip,
EnumOLEVERB_Reset,
EnumOLEVERB_Clone
};
static HRESULT EnumOLEVERB_Construct(HKEY hkeyVerb, ULONG index, IEnumOLEVERB **ppenum)
{
EnumOLEVERB *This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
if (!This)
{
RegCloseKey(hkeyVerb);
return E_OUTOFMEMORY;
}
This->IEnumOLEVERB_iface.lpVtbl = &EnumOLEVERB_VTable;
2005-09-23 10:08:25 +00:00
This->ref = 1;
This->index = index;
This->hkeyVerb = hkeyVerb;
*ppenum = &This->IEnumOLEVERB_iface;
return S_OK;
2005-09-23 10:08:25 +00:00
}
/***********************************************************************
* OleRegEnumVerbs [OLE32.@]
*
* Enumerates verbs associated with a class stored in the registry.
*
* PARAMS
* clsid [I] Class ID to enumerate the verbs for.
* ppenum [O] Enumerator.
*
* RETURNS
* S_OK: Success.
* REGDB_E_CLASSNOTREG: The specified class does not have a key in the registry.
* REGDB_E_READREGDB: The class key could not be opened for some other reason.
* OLE_E_REGDB_KEY: The Verb subkey for the class is not present.
* OLEOBJ_E_NOVERBS: The Verb subkey for the class is empty.
*/
HRESULT WINAPI OleRegEnumVerbs (REFCLSID clsid, LPENUMOLEVERB* ppenum)
{
LONG res;
HKEY hkeyVerb;
DWORD dwSubKeys;
static const WCHAR wszVerb[] = {'V','e','r','b',0};
TRACE("(%s, %p)\n", debugstr_guid(clsid), ppenum);
res = COM_OpenKeyForCLSID(clsid, wszVerb, KEY_READ, &hkeyVerb);
if (FAILED(res))
2005-09-23 10:08:25 +00:00
{
if (res == REGDB_E_CLASSNOTREG)
ERR("CLSID %s not registered\n", debugstr_guid(clsid));
else if (res == REGDB_E_KEYMISSING)
ERR("no Verbs key for class %s\n", debugstr_guid(clsid));
else
ERR("failed to open Verbs key for CLSID %s with error %d\n",
debugstr_guid(clsid), res);
return res;
2005-09-23 10:08:25 +00:00
}
res = RegQueryInfoKeyW(hkeyVerb, NULL, NULL, NULL, &dwSubKeys, NULL,
NULL, NULL, NULL, NULL, NULL, NULL);
if (res != ERROR_SUCCESS)
{
ERR("failed to get subkey count with error %d\n", GetLastError());
2005-09-23 10:08:25 +00:00
return REGDB_E_READREGDB;
}
if (!dwSubKeys)
{
WARN("class %s has no verbs\n", debugstr_guid(clsid));
RegCloseKey(hkeyVerb);
return OLEOBJ_E_NOVERBS;
}
return EnumOLEVERB_Construct(hkeyVerb, 0, ppenum);
}
/******************************************************************************
2003-09-11 03:06:25 +00:00
* OleSetContainedObject [OLE32.@]
*/
HRESULT WINAPI OleSetContainedObject(
2002-05-31 23:06:46 +00:00
LPUNKNOWN pUnknown,
BOOL fContained)
{
IRunnableObject* runnable = NULL;
HRESULT hres;
TRACE("(%p,%x)\n", pUnknown, fContained);
hres = IUnknown_QueryInterface(pUnknown,
&IID_IRunnableObject,
2004-05-21 20:52:57 +00:00
(void**)&runnable);
if (SUCCEEDED(hres))
{
hres = IRunnableObject_SetContainedObject(runnable, fContained);
IRunnableObject_Release(runnable);
return hres;
}
return S_OK;
}
/******************************************************************************
* OleRun [OLE32.@]
*
* Set the OLE object to the running state.
*
* PARAMS
* pUnknown [I] OLE object to run.
*
* RETURNS
* Success: S_OK.
* Failure: Any HRESULT code.
*/
HRESULT WINAPI DECLSPEC_HOTPATCH OleRun(LPUNKNOWN pUnknown)
{
IRunnableObject *runable;
HRESULT hres;
TRACE("(%p)\n", pUnknown);
hres = IUnknown_QueryInterface(pUnknown, &IID_IRunnableObject, (void**)&runable);
if (FAILED(hres))
return S_OK; /* Appears to return no error. */
hres = IRunnableObject_Run(runable, NULL);
IRunnableObject_Release(runable);
return hres;
}
/******************************************************************************
2003-09-11 03:06:25 +00:00
* OleLoad [OLE32.@]
*/
HRESULT WINAPI OleLoad(
2002-05-31 23:06:46 +00:00
LPSTORAGE pStg,
REFIID riid,
LPOLECLIENTSITE pClientSite,
LPVOID* ppvObj)
{
IPersistStorage* persistStorage = NULL;
IUnknown* pUnk;
IOleObject* pOleObject = NULL;
STATSTG storageInfo;
HRESULT hres;
TRACE("(%p, %s, %p, %p)\n", pStg, debugstr_guid(riid), pClientSite, ppvObj);
2002-05-31 23:06:46 +00:00
*ppvObj = NULL;
/*
* TODO, Conversion ... OleDoAutoConvert
*/
/*
* Get the class ID for the object.
*/
hres = IStorage_Stat(pStg, &storageInfo, STATFLAG_NONAME);
if (FAILED(hres))
return hres;
/*
* Now, try and create the handler for the object
*/
hres = CoCreateInstance(&storageInfo.clsid,
NULL,
CLSCTX_INPROC_HANDLER|CLSCTX_INPROC_SERVER,
riid,
(void**)&pUnk);
/*
* If that fails, as it will most times, load the default
* OLE handler.
*/
if (FAILED(hres))
{
hres = OleCreateDefaultHandler(&storageInfo.clsid,
NULL,
riid,
(void**)&pUnk);
}
/*
* If we couldn't find a handler... this is bad. Abort the whole thing.
*/
if (FAILED(hres))
return hres;
if (pClientSite)
{
hres = IUnknown_QueryInterface(pUnk, &IID_IOleObject, (void **)&pOleObject);
if (SUCCEEDED(hres))
{
DWORD dwStatus;
hres = IOleObject_GetMiscStatus(pOleObject, DVASPECT_CONTENT, &dwStatus);
}
}
/*
* Initialize the object with its IPersistStorage interface.
*/
hres = IUnknown_QueryInterface(pUnk, &IID_IPersistStorage, (void**)&persistStorage);
2002-05-31 23:06:46 +00:00
if (SUCCEEDED(hres))
{
hres = IPersistStorage_Load(persistStorage, pStg);
IPersistStorage_Release(persistStorage);
persistStorage = NULL;
}
if (SUCCEEDED(hres) && pClientSite)
/*
2014-02-07 21:42:49 +00:00
* Inform the new object of its client site.
*/
hres = IOleObject_SetClientSite(pOleObject, pClientSite);
/*
* Cleanup interfaces used internally
*/
if (pOleObject)
IOleObject_Release(pOleObject);
if (SUCCEEDED(hres))
{
IOleLink *pOleLink;
HRESULT hres1;
hres1 = IUnknown_QueryInterface(pUnk, &IID_IOleLink, (void **)&pOleLink);
if (SUCCEEDED(hres1))
{
FIXME("handle OLE link\n");
IOleLink_Release(pOleLink);
}
}
if (FAILED(hres))
{
IUnknown_Release(pUnk);
pUnk = NULL;
}
*ppvObj = pUnk;
return hres;
}
/***********************************************************************
2003-09-11 03:06:25 +00:00
* OleSave [OLE32.@]
*/
HRESULT WINAPI OleSave(
LPPERSISTSTORAGE pPS,
LPSTORAGE pStg,
BOOL fSameAsLoad)
{
HRESULT hres;
CLSID objectClass;
TRACE("(%p,%p,%x)\n", pPS, pStg, fSameAsLoad);
/*
* First, we transfer the class ID (if available)
*/
hres = IPersistStorage_GetClassID(pPS, &objectClass);
if (SUCCEEDED(hres))
{
WriteClassStg(pStg, &objectClass);
}
/*
* Then, we ask the object to save itself to the
* storage. If it is successful, we commit the storage.
*/
hres = IPersistStorage_Save(pPS, pStg, fSameAsLoad);
if (SUCCEEDED(hres))
{
IStorage_Commit(pStg,
STGC_DEFAULT);
}
2002-05-31 23:06:46 +00:00
return hres;
}
/******************************************************************************
2003-09-11 03:06:25 +00:00
* OleLockRunning [OLE32.@]
*/
2002-05-31 23:06:46 +00:00
HRESULT WINAPI OleLockRunning(LPUNKNOWN pUnknown, BOOL fLock, BOOL fLastUnlockCloses)
{
IRunnableObject* runnable = NULL;
HRESULT hres;
TRACE("(%p,%x,%x)\n", pUnknown, fLock, fLastUnlockCloses);
hres = IUnknown_QueryInterface(pUnknown,
&IID_IRunnableObject,
2004-05-21 20:52:57 +00:00
(void**)&runnable);
if (SUCCEEDED(hres))
{
hres = IRunnableObject_LockRunning(runnable, fLock, fLastUnlockCloses);
IRunnableObject_Release(runnable);
return hres;
}
return S_OK;
}
/**************************************************************************
* Internal methods to manage the shared OLE menu in response to the
* OLE***MenuDescriptor API
*/
/***
* OLEMenu_Initialize()
*
* Initializes the OLEMENU data structures.
*/
static void OLEMenu_Initialize(void)
{
}
/***
* OLEMenu_UnInitialize()
*
* Releases the OLEMENU data structures.
*/
static void OLEMenu_UnInitialize(void)
{
}
/*************************************************************************
* OLEMenu_InstallHooks
* Install thread scope message hooks for WH_GETMESSAGE and WH_CALLWNDPROC
*
2003-07-02 04:37:26 +00:00
* RETURNS: TRUE if message hooks were successfully installed
* FALSE on failure
*/
static BOOL OLEMenu_InstallHooks( DWORD tid )
{
OleMenuHookItem *pHookItem;
/* Create an entry for the hook table */
if ( !(pHookItem = HeapAlloc(GetProcessHeap(), 0,
sizeof(OleMenuHookItem)) ) )
return FALSE;
pHookItem->tid = tid;
pHookItem->hHeap = GetProcessHeap();
pHookItem->CallWndProc_hHook = NULL;
2002-05-31 23:06:46 +00:00
/* Install a thread scope message hook for WH_GETMESSAGE */
pHookItem->GetMsg_hHook = SetWindowsHookExW( WH_GETMESSAGE, OLEMenu_GetMsgProc,
0, GetCurrentThreadId() );
if ( !pHookItem->GetMsg_hHook )
goto CLEANUP;
/* Install a thread scope message hook for WH_CALLWNDPROC */
pHookItem->CallWndProc_hHook = SetWindowsHookExW( WH_CALLWNDPROC, OLEMenu_CallWndProc,
0, GetCurrentThreadId() );
if ( !pHookItem->CallWndProc_hHook )
goto CLEANUP;
/* Insert the hook table entry */
pHookItem->next = hook_list;
hook_list = pHookItem;
2002-05-31 23:06:46 +00:00
return TRUE;
2002-05-31 23:06:46 +00:00
CLEANUP:
/* Unhook any hooks */
if ( pHookItem->GetMsg_hHook )
UnhookWindowsHookEx( pHookItem->GetMsg_hHook );
if ( pHookItem->CallWndProc_hHook )
UnhookWindowsHookEx( pHookItem->CallWndProc_hHook );
/* Release the hook table entry */
HeapFree(pHookItem->hHeap, 0, pHookItem );
2002-05-31 23:06:46 +00:00
return FALSE;
}
/*************************************************************************
* OLEMenu_UnInstallHooks
* UnInstall thread scope message hooks for WH_GETMESSAGE and WH_CALLWNDPROC
*
2003-07-02 04:37:26 +00:00
* RETURNS: TRUE if message hooks were successfully installed
* FALSE on failure
*/
static BOOL OLEMenu_UnInstallHooks( DWORD tid )
{
OleMenuHookItem *pHookItem = NULL;
OleMenuHookItem **ppHook = &hook_list;
while (*ppHook)
{
if ((*ppHook)->tid == tid)
{
pHookItem = *ppHook;
*ppHook = pHookItem->next;
break;
}
ppHook = &(*ppHook)->next;
}
if (!pHookItem) return FALSE;
/* Uninstall the hooks installed for this thread */
if ( !UnhookWindowsHookEx( pHookItem->GetMsg_hHook ) )
goto CLEANUP;
if ( !UnhookWindowsHookEx( pHookItem->CallWndProc_hHook ) )
goto CLEANUP;
/* Release the hook table entry */
HeapFree(pHookItem->hHeap, 0, pHookItem );
return TRUE;
CLEANUP:
/* Release the hook table entry */
HeapFree(pHookItem->hHeap, 0, pHookItem );
return FALSE;
}
/*************************************************************************
* OLEMenu_IsHookInstalled
* Tests if OLEMenu hooks have been installed for a thread
*
* RETURNS: The pointer and index of the hook table entry for the tid
* NULL and -1 for the index if no hooks were installed for this thread
*/
static OleMenuHookItem * OLEMenu_IsHookInstalled( DWORD tid )
{
OleMenuHookItem *pHookItem;
/* Do a simple linear search for an entry whose tid matches ours.
* We really need a map but efficiency is not a concern here. */
for (pHookItem = hook_list; pHookItem; pHookItem = pHookItem->next)
{
if ( tid == pHookItem->tid )
return pHookItem;
}
2002-05-31 23:06:46 +00:00
return NULL;
}
/***********************************************************************
* OLEMenu_FindMainMenuIndex
*
* Used by OLEMenu API to find the top level group a menu item belongs to.
* On success pnPos contains the index of the item in the top level menu group
*
* RETURNS: TRUE if the ID was found, FALSE on failure
*/
static BOOL OLEMenu_FindMainMenuIndex( HMENU hMainMenu, HMENU hPopupMenu, UINT *pnPos )
{
INT i, nItems;
nItems = GetMenuItemCount( hMainMenu );
for (i = 0; i < nItems; i++)
{
HMENU hsubmenu;
2002-05-31 23:06:46 +00:00
/* Is the current item a submenu? */
if ( (hsubmenu = GetSubMenu(hMainMenu, i)) )
{
/* If the handle is the same we're done */
if ( hsubmenu == hPopupMenu )
{
if (pnPos)
*pnPos = i;
return TRUE;
}
/* Recursively search without updating pnPos */
else if ( OLEMenu_FindMainMenuIndex( hsubmenu, hPopupMenu, NULL ) )
{
if (pnPos)
*pnPos = i;
return TRUE;
}
}
}
return FALSE;
}
/***********************************************************************
* OLEMenu_SetIsServerMenu
*
* Checks whether a popup menu belongs to a shared menu group which is
* owned by the server, and sets the menu descriptor state accordingly.
* All menu messages from these groups should be routed to the server.
*
* RETURNS: TRUE if the popup menu is part of a server owned group
2005-02-25 14:07:56 +00:00
* FALSE if the popup menu is part of a container owned group
*/
static BOOL OLEMenu_SetIsServerMenu( HMENU hmenu, OleMenuDescriptor *pOleMenuDescriptor )
{
UINT nPos = 0, nWidth, i;
pOleMenuDescriptor->bIsServerItem = FALSE;
/* Don't bother searching if the popup is the combined menu itself */
if ( hmenu == pOleMenuDescriptor->hmenuCombined )
return FALSE;
/* Find the menu item index in the shared OLE menu that this item belongs to */
if ( !OLEMenu_FindMainMenuIndex( pOleMenuDescriptor->hmenuCombined, hmenu, &nPos ) )
return FALSE;
2002-05-31 23:06:46 +00:00
/* The group widths array has counts for the number of elements
* in the groups File, Edit, Container, Object, Window, Help.
* The Edit, Object & Help groups belong to the server object
* and the other three belong to the container.
* Loop through the group widths and locate the group we are a member of.
*/
for ( i = 0, nWidth = 0; i < 6; i++ )
{
nWidth += pOleMenuDescriptor->mgw.width[i];
if ( nPos < nWidth )
{
/* Odd elements are server menu widths */
pOleMenuDescriptor->bIsServerItem = i%2;
break;
}
}
return pOleMenuDescriptor->bIsServerItem;
}
/*************************************************************************
* OLEMenu_CallWndProc
* Thread scope WH_CALLWNDPROC hook proc filter function (callback)
* This is invoked from a message hook installed in OleSetMenuDescriptor.
*/
static LRESULT CALLBACK OLEMenu_CallWndProc(INT code, WPARAM wParam, LPARAM lParam)
{
LPCWPSTRUCT pMsg;
HOLEMENU hOleMenu = 0;
OleMenuDescriptor *pOleMenuDescriptor = NULL;
OleMenuHookItem *pHookItem = NULL;
WORD fuFlags;
2002-05-31 23:06:46 +00:00
TRACE("%i, %04lx, %08lx\n", code, wParam, lParam );
/* Check if we're being asked to process the message */
if ( HC_ACTION != code )
goto NEXTHOOK;
2002-05-31 23:06:46 +00:00
/* Retrieve the current message being dispatched from lParam */
pMsg = (LPCWPSTRUCT)lParam;
/* Check if the message is destined for a window we are interested in:
* If the window has an OLEMenu property we may need to dispatch
* the menu message to its active objects window instead. */
hOleMenu = GetPropW( pMsg->hwnd, prop_olemenuW );
if ( !hOleMenu )
goto NEXTHOOK;
/* Get the menu descriptor */
pOleMenuDescriptor = GlobalLock( hOleMenu );
if ( !pOleMenuDescriptor ) /* Bad descriptor! */
goto NEXTHOOK;
/* Process menu messages */
switch( pMsg->message )
{
case WM_INITMENU:
{
/* Reset the menu descriptor state */
pOleMenuDescriptor->bIsServerItem = FALSE;
/* Send this message to the server as well */
SendMessageW( pOleMenuDescriptor->hwndActiveObject,
pMsg->message, pMsg->wParam, pMsg->lParam );
goto NEXTHOOK;
}
2002-05-31 23:06:46 +00:00
case WM_INITMENUPOPUP:
{
/* Save the state for whether this is a server owned menu */
OLEMenu_SetIsServerMenu( (HMENU)pMsg->wParam, pOleMenuDescriptor );
break;
}
2002-05-31 23:06:46 +00:00
case WM_MENUSELECT:
{
fuFlags = HIWORD(pMsg->wParam); /* Get flags */
if ( fuFlags & MF_SYSMENU )
goto NEXTHOOK;
/* Save the state for whether this is a server owned popup menu */
else if ( fuFlags & MF_POPUP )
OLEMenu_SetIsServerMenu( (HMENU)pMsg->lParam, pOleMenuDescriptor );
break;
}
2002-05-31 23:06:46 +00:00
case WM_DRAWITEM:
{
LPDRAWITEMSTRUCT lpdis = (LPDRAWITEMSTRUCT) pMsg->lParam;
if ( pMsg->wParam != 0 || lpdis->CtlType != ODT_MENU )
goto NEXTHOOK; /* Not a menu message */
break;
}
default:
goto NEXTHOOK;
}
/* If the message was for the server dispatch it accordingly */
if ( pOleMenuDescriptor->bIsServerItem )
{
SendMessageW( pOleMenuDescriptor->hwndActiveObject,
pMsg->message, pMsg->wParam, pMsg->lParam );
}
2002-05-31 23:06:46 +00:00
NEXTHOOK:
if ( pOleMenuDescriptor )
GlobalUnlock( hOleMenu );
2002-05-31 23:06:46 +00:00
/* Lookup the hook item for the current thread */
if ( !( pHookItem = OLEMenu_IsHookInstalled( GetCurrentThreadId() ) ) )
{
/* This should never fail!! */
WARN("could not retrieve hHook for current thread!\n" );
return 0;
}
2002-05-31 23:06:46 +00:00
/* Pass on the message to the next hooker */
return CallNextHookEx( pHookItem->CallWndProc_hHook, code, wParam, lParam );
}
/*************************************************************************
* OLEMenu_GetMsgProc
* Thread scope WH_GETMESSAGE hook proc filter function (callback)
* This is invoked from a message hook installed in OleSetMenuDescriptor.
*/
static LRESULT CALLBACK OLEMenu_GetMsgProc(INT code, WPARAM wParam, LPARAM lParam)
{
LPMSG pMsg;
HOLEMENU hOleMenu = 0;
OleMenuDescriptor *pOleMenuDescriptor = NULL;
OleMenuHookItem *pHookItem = NULL;
WORD wCode;
2002-05-31 23:06:46 +00:00
TRACE("%i, %04lx, %08lx\n", code, wParam, lParam );
/* Check if we're being asked to process a messages */
if ( HC_ACTION != code )
goto NEXTHOOK;
2002-05-31 23:06:46 +00:00
/* Retrieve the current message being dispatched from lParam */
pMsg = (LPMSG)lParam;
/* Check if the message is destined for a window we are interested in:
* If the window has an OLEMenu property we may need to dispatch
* the menu message to its active objects window instead. */
hOleMenu = GetPropW( pMsg->hwnd, prop_olemenuW );
if ( !hOleMenu )
goto NEXTHOOK;
/* Process menu messages */
switch( pMsg->message )
{
case WM_COMMAND:
{
wCode = HIWORD(pMsg->wParam); /* Get notification code */
if ( wCode )
goto NEXTHOOK; /* Not a menu message */
break;
}
default:
goto NEXTHOOK;
}
/* Get the menu descriptor */
pOleMenuDescriptor = GlobalLock( hOleMenu );
if ( !pOleMenuDescriptor ) /* Bad descriptor! */
goto NEXTHOOK;
/* If the message was for the server dispatch it accordingly */
if ( pOleMenuDescriptor->bIsServerItem )
{
/* Change the hWnd in the message to the active objects hWnd.
* The message loop which reads this message will automatically
* dispatch it to the embedded objects window. */
pMsg->hwnd = pOleMenuDescriptor->hwndActiveObject;
}
2002-05-31 23:06:46 +00:00
NEXTHOOK:
if ( pOleMenuDescriptor )
GlobalUnlock( hOleMenu );
2002-05-31 23:06:46 +00:00
/* Lookup the hook item for the current thread */
if ( !( pHookItem = OLEMenu_IsHookInstalled( GetCurrentThreadId() ) ) )
{
/* This should never fail!! */
WARN("could not retrieve hHook for current thread!\n" );
return FALSE;
}
2002-05-31 23:06:46 +00:00
/* Pass on the message to the next hooker */
return CallNextHookEx( pHookItem->GetMsg_hHook, code, wParam, lParam );
}
/***********************************************************************
2003-09-11 03:06:25 +00:00
* OleCreateMenuDescriptor [OLE32.@]
* Creates an OLE menu descriptor for OLE to use when dispatching
* menu messages and commands.
*
* PARAMS:
* hmenuCombined - Handle to the objects combined menu
* lpMenuWidths - Pointer to array of 6 LONG's indicating menus per group
*
*/
HOLEMENU WINAPI OleCreateMenuDescriptor(
HMENU hmenuCombined,
LPOLEMENUGROUPWIDTHS lpMenuWidths)
{
HOLEMENU hOleMenu;
OleMenuDescriptor *pOleMenuDescriptor;
int i;
if ( !hmenuCombined || !lpMenuWidths )
return 0;
/* Create an OLE menu descriptor */
if ( !(hOleMenu = GlobalAlloc(GMEM_MOVEABLE | GMEM_ZEROINIT,
sizeof(OleMenuDescriptor) ) ) )
return 0;
pOleMenuDescriptor = GlobalLock( hOleMenu );
if ( !pOleMenuDescriptor )
return 0;
/* Initialize menu group widths and hmenu */
for ( i = 0; i < 6; i++ )
pOleMenuDescriptor->mgw.width[i] = lpMenuWidths->width[i];
2002-05-31 23:06:46 +00:00
pOleMenuDescriptor->hmenuCombined = hmenuCombined;
pOleMenuDescriptor->bIsServerItem = FALSE;
GlobalUnlock( hOleMenu );
2002-05-31 23:06:46 +00:00
return hOleMenu;
}
/***********************************************************************
2003-09-11 03:06:25 +00:00
* OleDestroyMenuDescriptor [OLE32.@]
* Destroy the shared menu descriptor
*/
HRESULT WINAPI OleDestroyMenuDescriptor(
2012-12-18 22:52:22 +00:00
HOLEMENU hmenuDescriptor)
{
2012-12-18 22:52:22 +00:00
if ( hmenuDescriptor )
GlobalFree( hmenuDescriptor );
return S_OK;
}
/***********************************************************************
2003-09-11 03:06:25 +00:00
* OleSetMenuDescriptor [OLE32.@]
2005-11-09 10:30:57 +00:00
* Installs or removes OLE dispatching code for the containers frame window.
2002-05-31 23:06:46 +00:00
*
2005-11-09 10:30:57 +00:00
* PARAMS
* hOleMenu Handle to composite menu descriptor
* hwndFrame Handle to containers frame window
* hwndActiveObject Handle to objects in-place activation window
* lpFrame Pointer to IOleInPlaceFrame on containers window
* lpActiveObject Pointer to IOleInPlaceActiveObject on active in-place object
*
2005-11-09 10:30:57 +00:00
* RETURNS
* S_OK - menu installed correctly
* E_FAIL, E_INVALIDARG, E_UNEXPECTED - failure
2005-11-09 10:30:57 +00:00
*
* FIXME
* The lpFrame and lpActiveObject parameters are currently ignored
* OLE should install context sensitive help F1 filtering for the app when
* these are non null.
*/
HRESULT WINAPI OleSetMenuDescriptor(
2012-12-18 22:52:22 +00:00
HOLEMENU hOleMenu,
HWND hwndFrame,
HWND hwndActiveObject,
LPOLEINPLACEFRAME lpFrame,
LPOLEINPLACEACTIVEOBJECT lpActiveObject)
{
2012-12-18 22:52:22 +00:00
OleMenuDescriptor *pOleMenuDescriptor = NULL;
2012-12-18 22:52:22 +00:00
/* Check args */
if ( !hwndFrame || (hOleMenu && !hwndActiveObject) )
return E_INVALIDARG;
2012-12-18 22:52:22 +00:00
if ( lpFrame || lpActiveObject )
{
FIXME("(%p, %p, %p, %p, %p), Context sensitive help filtering not implemented!\n",
hOleMenu,
hwndFrame,
hwndActiveObject,
lpFrame,
lpActiveObject);
}
2002-05-31 23:06:46 +00:00
2012-12-18 22:52:22 +00:00
/* Set up a message hook to intercept the containers frame window messages.
* The message filter is responsible for dispatching menu messages from the
* shared menu which are intended for the object.
*/
2012-12-18 22:52:22 +00:00
if ( hOleMenu ) /* Want to install dispatching code */
{
/* If OLEMenu hooks are already installed for this thread, fail
* Note: This effectively means that OleSetMenuDescriptor cannot
* be called twice in succession on the same frame window
* without first calling it with a null hOleMenu to uninstall
*/
if ( OLEMenu_IsHookInstalled( GetCurrentThreadId() ) )
return E_FAIL;
/* Get the menu descriptor */
pOleMenuDescriptor = GlobalLock( hOleMenu );
if ( !pOleMenuDescriptor )
return E_UNEXPECTED;
/* Update the menu descriptor */
pOleMenuDescriptor->hwndFrame = hwndFrame;
pOleMenuDescriptor->hwndActiveObject = hwndActiveObject;
GlobalUnlock( hOleMenu );
pOleMenuDescriptor = NULL;
/* Add a menu descriptor windows property to the frame window */
SetPropW( hwndFrame, prop_olemenuW, hOleMenu );
/* Install thread scope message hooks for WH_GETMESSAGE and WH_CALLWNDPROC */
if ( !OLEMenu_InstallHooks( GetCurrentThreadId() ) )
return E_FAIL;
}
else /* Want to uninstall dispatching code */
{
/* Uninstall the hooks */
if ( !OLEMenu_UnInstallHooks( GetCurrentThreadId() ) )
return E_FAIL;
2002-05-31 23:06:46 +00:00
2012-12-18 22:52:22 +00:00
/* Remove the menu descriptor property from the frame window */
RemovePropW( hwndFrame, prop_olemenuW );
}
2002-05-31 23:06:46 +00:00
2012-12-18 22:52:22 +00:00
return S_OK;
}
2001-04-16 18:58:09 +00:00
/******************************************************************************
2003-09-11 03:06:25 +00:00
* IsAccelerator [OLE32.@]
2001-04-16 18:58:09 +00:00
* Mostly copied from controls/menu.c TranslateAccelerator implementation
*/
BOOL WINAPI IsAccelerator(HACCEL hAccel, int cAccelEntries, LPMSG lpMsg, WORD* lpwCmd)
{
LPACCEL lpAccelTbl;
2001-04-16 18:58:09 +00:00
int i;
if(!lpMsg) return FALSE;
if (!hAccel)
2001-04-16 18:58:09 +00:00
{
WARN_(accel)("NULL accel handle\n");
2001-04-16 18:58:09 +00:00
return FALSE;
}
if((lpMsg->message != WM_KEYDOWN &&
lpMsg->message != WM_SYSKEYDOWN &&
lpMsg->message != WM_SYSCHAR &&
2001-04-16 18:58:09 +00:00
lpMsg->message != WM_CHAR)) return FALSE;
lpAccelTbl = HeapAlloc(GetProcessHeap(), 0, cAccelEntries * sizeof(ACCEL));
if (NULL == lpAccelTbl)
{
return FALSE;
}
if (CopyAcceleratorTableW(hAccel, lpAccelTbl, cAccelEntries) != cAccelEntries)
{
WARN_(accel)("CopyAcceleratorTableW failed\n");
HeapFree(GetProcessHeap(), 0, lpAccelTbl);
return FALSE;
}
2001-04-16 18:58:09 +00:00
2002-11-22 04:43:02 +00:00
TRACE_(accel)("hAccel=%p, cAccelEntries=%d,"
"msg->hwnd=%p, msg->message=%04x, wParam=%08lx, lParam=%08lx\n",
2001-04-16 18:58:09 +00:00
hAccel, cAccelEntries,
lpMsg->hwnd, lpMsg->message, lpMsg->wParam, lpMsg->lParam);
for(i = 0; i < cAccelEntries; i++)
{
if(lpAccelTbl[i].key != lpMsg->wParam)
continue;
if(lpMsg->message == WM_CHAR)
{
if(!(lpAccelTbl[i].fVirt & FALT) && !(lpAccelTbl[i].fVirt & FVIRTKEY))
{
TRACE_(accel)("found accel for WM_CHAR: ('%c')\n", LOWORD(lpMsg->wParam) & 0xff);
2001-04-16 18:58:09 +00:00
goto found;
}
}
else
{
if(lpAccelTbl[i].fVirt & FVIRTKEY)
{
INT mask = 0;
TRACE_(accel)("found accel for virt_key %04lx (scan %04x)\n",
2001-04-16 18:58:09 +00:00
lpMsg->wParam, HIWORD(lpMsg->lParam) & 0xff);
if(GetKeyState(VK_SHIFT) & 0x8000) mask |= FSHIFT;
if(GetKeyState(VK_CONTROL) & 0x8000) mask |= FCONTROL;
if(GetKeyState(VK_MENU) & 0x8000) mask |= FALT;
if(mask == (lpAccelTbl[i].fVirt & (FSHIFT | FCONTROL | FALT))) goto found;
TRACE_(accel)("incorrect SHIFT/CTRL/ALT-state\n");
}
else
{
if(!(lpMsg->lParam & 0x01000000)) /* no special_key */
{
if((lpAccelTbl[i].fVirt & FALT) && (lpMsg->lParam & 0x20000000))
{ /* ^^ ALT pressed */
TRACE_(accel)("found accel for Alt-%c\n", LOWORD(lpMsg->wParam) & 0xff);
2001-04-16 18:58:09 +00:00
goto found;
}
}
}
}
2002-05-31 23:06:46 +00:00
}
2001-04-16 18:58:09 +00:00
WARN_(accel)("couldn't translate accelerator key\n");
HeapFree(GetProcessHeap(), 0, lpAccelTbl);
2001-04-16 18:58:09 +00:00
return FALSE;
found:
if(lpwCmd) *lpwCmd = lpAccelTbl[i].cmd;
HeapFree(GetProcessHeap(), 0, lpAccelTbl);
2001-04-16 18:58:09 +00:00
return TRUE;
}
/***********************************************************************
2003-09-11 03:06:25 +00:00
* ReleaseStgMedium [OLE32.@]
*/
void WINAPI ReleaseStgMedium(
STGMEDIUM* pmedium)
{
if (!pmedium) return;
switch (pmedium->tymed)
{
case TYMED_HGLOBAL:
{
2002-05-31 23:06:46 +00:00
if ( (pmedium->pUnkForRelease==0) &&
(pmedium->u.hGlobal!=0) )
GlobalFree(pmedium->u.hGlobal);
break;
}
case TYMED_FILE:
{
if (pmedium->u.lpszFileName!=0)
{
if (pmedium->pUnkForRelease==0)
{
DeleteFileW(pmedium->u.lpszFileName);
}
2002-05-31 23:06:46 +00:00
CoTaskMemFree(pmedium->u.lpszFileName);
}
break;
}
case TYMED_ISTREAM:
{
if (pmedium->u.pstm!=0)
{
IStream_Release(pmedium->u.pstm);
}
break;
}
case TYMED_ISTORAGE:
{
if (pmedium->u.pstg!=0)
{
IStorage_Release(pmedium->u.pstg);
}
break;
}
case TYMED_GDI:
{
2002-05-31 23:06:46 +00:00
if ( (pmedium->pUnkForRelease==0) &&
(pmedium->u.hBitmap!=0) )
DeleteObject(pmedium->u.hBitmap);
break;
}
case TYMED_MFPICT:
{
2002-05-31 23:06:46 +00:00
if ( (pmedium->pUnkForRelease==0) &&
(pmedium->u.hMetaFilePict!=0) )
{
LPMETAFILEPICT pMP = GlobalLock(pmedium->u.hMetaFilePict);
DeleteMetaFile(pMP->hMF);
GlobalUnlock(pmedium->u.hMetaFilePict);
GlobalFree(pmedium->u.hMetaFilePict);
}
break;
}
case TYMED_ENHMF:
{
2002-05-31 23:06:46 +00:00
if ( (pmedium->pUnkForRelease==0) &&
(pmedium->u.hEnhMetaFile!=0) )
{
DeleteEnhMetaFile(pmedium->u.hEnhMetaFile);
}
break;
}
case TYMED_NULL:
default:
break;
}
pmedium->tymed=TYMED_NULL;
/*
* After cleaning up, the unknown is released
*/
if (pmedium->pUnkForRelease!=0)
{
IUnknown_Release(pmedium->pUnkForRelease);
pmedium->pUnkForRelease = 0;
}
}
/***
* OLEDD_Initialize()
*
* Initializes the OLE drag and drop data structures.
*/
static void OLEDD_Initialize(void)
{
WNDCLASSW wndClass;
ZeroMemory (&wndClass, sizeof(WNDCLASSW));
wndClass.style = CS_GLOBALCLASS;
2004-12-06 11:51:29 +00:00
wndClass.lpfnWndProc = OLEDD_DragTrackerWindowProc;
wndClass.cbClsExtra = 0;
wndClass.cbWndExtra = sizeof(TrackerWindowInfo*);
wndClass.hCursor = 0;
wndClass.hbrBackground = 0;
wndClass.lpszClassName = OLEDD_DRAGTRACKERCLASS;
2002-05-31 23:06:46 +00:00
RegisterClassW (&wndClass);
}
/***
* OLEDD_DragTrackerWindowProc()
*
* This method is the WindowProcedure of the drag n drop tracking
* window. During a drag n Drop operation, an invisible window is created
* to receive the user input and act upon it. This procedure is in charge
* of this behavior.
*/
#define DRAG_TIMER_ID 1
static LRESULT WINAPI OLEDD_DragTrackerWindowProc(
2002-05-31 23:06:46 +00:00
HWND hwnd,
UINT uMsg,
2002-05-31 23:06:46 +00:00
WPARAM wParam,
LPARAM lParam)
{
switch (uMsg)
{
case WM_CREATE:
{
LPCREATESTRUCTA createStruct = (LPCREATESTRUCTA)lParam;
SetWindowLongPtrW(hwnd, 0, (LONG_PTR)createStruct->lpCreateParams);
SetTimer(hwnd, DRAG_TIMER_ID, 50, NULL);
break;
}
case WM_TIMER:
case WM_MOUSEMOVE:
case WM_LBUTTONUP:
case WM_MBUTTONUP:
case WM_RBUTTONUP:
case WM_LBUTTONDOWN:
case WM_MBUTTONDOWN:
case WM_RBUTTONDOWN:
{
TrackerWindowInfo *trackerInfo = (TrackerWindowInfo*)GetWindowLongPtrA(hwnd, 0);
if (trackerInfo->trackingDone) break;
OLEDD_TrackStateChange(trackerInfo);
break;
}
case WM_DESTROY:
{
KillTimer(hwnd, DRAG_TIMER_ID);
break;
}
}
/*
* This is a window proc after all. Let's call the default.
*/
return DefWindowProcW (hwnd, uMsg, wParam, lParam);
}
static void drag_enter( TrackerWindowInfo *info, HWND new_target )
{
HRESULT hr;
info->curTargetHWND = new_target;
while (new_target && !is_droptarget( new_target ))
new_target = GetParent( new_target );
info->curDragTarget = get_droptarget_pointer( new_target );
if (info->curDragTarget)
{
*info->pdwEffect = info->dwOKEffect;
hr = IDropTarget_DragEnter( info->curDragTarget, info->dataObject,
info->dwKeyState, info->curMousePos,
info->pdwEffect );
*info->pdwEffect &= info->dwOKEffect;
/* failed DragEnter() means invalid target */
if (hr != S_OK)
{
IDropTarget_Release( info->curDragTarget );
info->curDragTarget = NULL;
info->curTargetHWND = NULL;
}
}
}
static void drag_end( TrackerWindowInfo *info )
{
HRESULT hr;
info->trackingDone = TRUE;
ReleaseCapture();
if (info->curDragTarget)
{
if (info->returnValue == DRAGDROP_S_DROP &&
*info->pdwEffect != DROPEFFECT_NONE)
{
*info->pdwEffect = info->dwOKEffect;
hr = IDropTarget_Drop( info->curDragTarget, info->dataObject, info->dwKeyState,
info->curMousePos, info->pdwEffect );
*info->pdwEffect &= info->dwOKEffect;
if (FAILED( hr ))
info->returnValue = hr;
}
else
{
IDropTarget_DragLeave( info->curDragTarget );
*info->pdwEffect = DROPEFFECT_NONE;
}
IDropTarget_Release( info->curDragTarget );
info->curDragTarget = NULL;
}
else
*info->pdwEffect = DROPEFFECT_NONE;
}
static HRESULT give_feedback( TrackerWindowInfo *info )
{
HRESULT hr;
int res;
HCURSOR cur;
if (info->curDragTarget == NULL)
*info->pdwEffect = DROPEFFECT_NONE;
hr = IDropSource_GiveFeedback( info->dropSource, *info->pdwEffect );
if (hr == DRAGDROP_S_USEDEFAULTCURSORS)
{
if (*info->pdwEffect & DROPEFFECT_MOVE)
res = CURSOR_MOVE;
else if (*info->pdwEffect & DROPEFFECT_COPY)
res = CURSOR_COPY;
else if (*info->pdwEffect & DROPEFFECT_LINK)
res = CURSOR_LINK;
else
res = CURSOR_NODROP;
cur = LoadCursorW( hProxyDll, MAKEINTRESOURCEW( res ) );
SetCursor( cur );
}
return hr;
}
/***
* OLEDD_TrackStateChange()
*
* This method is invoked while a drag and drop operation is in effect.
*
* params:
* trackerInfo - Pointer to the structure identifying the
* drag & drop operation that is currently
* active.
*/
static void OLEDD_TrackStateChange(TrackerWindowInfo* trackerInfo)
{
HWND hwndNewTarget = 0;
POINT pt;
/*
* This method may be called from QueryContinueDrag again,
* (i.e. by running message loop) so avoid recursive call chain.
*/
if (trackerInfo->inTrackCall) return;
trackerInfo->inTrackCall = TRUE;
/*
* Get the handle of the window under the mouse
*/
pt.x = trackerInfo->curMousePos.x;
pt.y = trackerInfo->curMousePos.y;
hwndNewTarget = WindowFromPoint(pt);
trackerInfo->returnValue = IDropSource_QueryContinueDrag(trackerInfo->dropSource,
trackerInfo->escPressed,
trackerInfo->dwKeyState);
if (trackerInfo->curTargetHWND != hwndNewTarget &&
(trackerInfo->returnValue == S_OK ||
trackerInfo->returnValue == DRAGDROP_S_DROP))
1999-05-01 10:10:30 +00:00
{
if (trackerInfo->curDragTarget)
{
IDropTarget_DragLeave(trackerInfo->curDragTarget);
IDropTarget_Release(trackerInfo->curDragTarget);
trackerInfo->curDragTarget = NULL;
trackerInfo->curTargetHWND = NULL;
}
2002-05-31 23:06:46 +00:00
if (hwndNewTarget)
drag_enter( trackerInfo, hwndNewTarget );
give_feedback( trackerInfo );
2002-05-31 23:06:46 +00:00
}
if (trackerInfo->returnValue == S_OK)
{
if (trackerInfo->curDragTarget)
{
*trackerInfo->pdwEffect = trackerInfo->dwOKEffect;
IDropTarget_DragOver(trackerInfo->curDragTarget,
trackerInfo->dwKeyState,
trackerInfo->curMousePos,
trackerInfo->pdwEffect);
*trackerInfo->pdwEffect &= trackerInfo->dwOKEffect;
}
give_feedback( trackerInfo );
}
else
drag_end( trackerInfo );
trackerInfo->inTrackCall = FALSE;
}
/***
* OLEDD_GetButtonState()
*
* This method will use the current state of the keyboard to build
* a button state mask equivalent to the one passed in the
* WM_MOUSEMOVE wParam.
*/
static DWORD OLEDD_GetButtonState(void)
{
BYTE keyboardState[256];
DWORD keyMask = 0;
GetKeyboardState(keyboardState);
if ( (keyboardState[VK_SHIFT] & 0x80) !=0)
keyMask |= MK_SHIFT;
if ( (keyboardState[VK_CONTROL] & 0x80) !=0)
keyMask |= MK_CONTROL;
if ( (keyboardState[VK_MENU] & 0x80) !=0)
keyMask |= MK_ALT;
if ( (keyboardState[VK_LBUTTON] & 0x80) !=0)
keyMask |= MK_LBUTTON;
if ( (keyboardState[VK_RBUTTON] & 0x80) !=0)
keyMask |= MK_RBUTTON;
if ( (keyboardState[VK_MBUTTON] & 0x80) !=0)
keyMask |= MK_MBUTTON;
return keyMask;
}
/***
* OLEDD_GetButtonState()
*
* This method will read the default value of the registry key in
* parameter and extract a DWORD value from it. The registry key value
* can be in a string key or a DWORD key.
*
* params:
* regKey - Key to read the default value from
2002-05-31 23:06:46 +00:00
* pdwValue - Pointer to the location where the DWORD
* value is returned. This value is not modified
* if the value is not found.
*/
static void OLEUTL_ReadRegistryDWORDValue(
2002-05-31 23:06:46 +00:00
HKEY regKey,
DWORD* pdwValue)
{
WCHAR buffer[20];
DWORD cbData = sizeof(buffer);
DWORD dwKeyType;
LONG lres;
lres = RegQueryValueExW(regKey,
emptyW,
NULL,
&dwKeyType,
(LPBYTE)buffer,
&cbData);
if (lres==ERROR_SUCCESS)
{
switch (dwKeyType)
{
case REG_DWORD:
*pdwValue = *(DWORD*)buffer;
break;
case REG_EXPAND_SZ:
case REG_MULTI_SZ:
case REG_SZ:
*pdwValue = wcstoul(buffer, NULL, 10);
break;
}
}
}
2003-06-27 04:03:40 +00:00
/******************************************************************************
2003-09-11 03:06:25 +00:00
* OleDraw (OLE32.@)
2003-06-27 04:03:40 +00:00
*
* The operation of this function is documented literally in the WinAPI
* documentation to involve a QueryInterface for the IViewObject interface,
* followed by a call to IViewObject::Draw.
*/
HRESULT WINAPI OleDraw(
IUnknown *pUnk,
DWORD dwAspect,
HDC hdcDraw,
LPCRECT rect)
2003-06-27 04:03:40 +00:00
{
HRESULT hres;
IViewObject *viewobject;
2012-12-06 17:45:33 +00:00
if (!pUnk) return E_INVALIDARG;
2003-06-27 04:03:40 +00:00
hres = IUnknown_QueryInterface(pUnk,
&IID_IViewObject,
2004-05-21 20:52:57 +00:00
(void**)&viewobject);
2003-06-27 04:03:40 +00:00
if (SUCCEEDED(hres))
{
hres = IViewObject_Draw(viewobject, dwAspect, -1, 0, 0, 0, hdcDraw, (RECTL*)rect, 0, 0, 0);
2003-06-27 04:03:40 +00:00
IViewObject_Release(viewobject);
return hres;
}
else
return DV_E_NOIVIEWOBJECT;
}
/***********************************************************************
* OleTranslateAccelerator [OLE32.@]
*/
HRESULT WINAPI OleTranslateAccelerator (LPOLEINPLACEFRAME lpFrame,
LPOLEINPLACEFRAMEINFO lpFrameInfo, LPMSG lpmsg)
{
WORD wID;
TRACE("(%p,%p,%p)\n", lpFrame, lpFrameInfo, lpmsg);
if (IsAccelerator(lpFrameInfo->haccel,lpFrameInfo->cAccelEntries,lpmsg,&wID))
return IOleInPlaceFrame_TranslateAccelerator(lpFrame,lpmsg,wID);
return S_FALSE;
}
/******************************************************************************
* OleCreate [OLE32.@]
*
*/
HRESULT WINAPI OleCreate(
REFCLSID rclsid,
REFIID riid,
DWORD renderopt,
LPFORMATETC pFormatEtc,
LPOLECLIENTSITE pClientSite,
LPSTORAGE pStg,
LPVOID* ppvObj)
{
HRESULT hres;
IUnknown * pUnk = NULL;
IOleObject *pOleObject = NULL;
TRACE("(%s, %s, %d, %p, %p, %p, %p)\n", debugstr_guid(rclsid),
debugstr_guid(riid), renderopt, pFormatEtc, pClientSite, pStg, ppvObj);
hres = CoCreateInstance(rclsid, 0, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, riid, (LPVOID*)&pUnk);
if (SUCCEEDED(hres))
hres = IStorage_SetClass(pStg, rclsid);
if (pClientSite && SUCCEEDED(hres))
{
hres = IUnknown_QueryInterface(pUnk, &IID_IOleObject, (LPVOID*)&pOleObject);
if (SUCCEEDED(hres))
{
DWORD dwStatus;
IOleObject_GetMiscStatus(pOleObject, DVASPECT_CONTENT, &dwStatus);
}
}
if (SUCCEEDED(hres))
{
IPersistStorage * pPS;
if (SUCCEEDED((hres = IUnknown_QueryInterface(pUnk, &IID_IPersistStorage, (LPVOID*)&pPS))))
{
TRACE("trying to set stg %p\n", pStg);
hres = IPersistStorage_InitNew(pPS, pStg);
TRACE("-- result 0x%08x\n", hres);
IPersistStorage_Release(pPS);
}
}
if (pClientSite && SUCCEEDED(hres))
{
TRACE("trying to set clientsite %p\n", pClientSite);
hres = IOleObject_SetClientSite(pOleObject, pClientSite);
TRACE("-- result 0x%08x\n", hres);
}
if (pOleObject)
IOleObject_Release(pOleObject);
if (((renderopt == OLERENDER_DRAW) || (renderopt == OLERENDER_FORMAT)) &&
SUCCEEDED(hres))
{
hres = OleRun(pUnk);
if (SUCCEEDED(hres))
{
IOleCache *pOleCache;
if (SUCCEEDED(IUnknown_QueryInterface(pUnk, &IID_IOleCache, (void **)&pOleCache)))
{
DWORD dwConnection;
if (renderopt == OLERENDER_DRAW && !pFormatEtc) {
FORMATETC pfe;
pfe.cfFormat = 0;
pfe.ptd = NULL;
pfe.dwAspect = DVASPECT_CONTENT;
pfe.lindex = -1;
pfe.tymed = TYMED_NULL;
hres = IOleCache_Cache(pOleCache, &pfe, ADVF_PRIMEFIRST, &dwConnection);
}
else
hres = IOleCache_Cache(pOleCache, pFormatEtc, ADVF_PRIMEFIRST, &dwConnection);
IOleCache_Release(pOleCache);
}
}
}
if (FAILED(hres) && pUnk)
{
IUnknown_Release(pUnk);
pUnk = NULL;
}
*ppvObj = pUnk;
2005-11-10 12:14:56 +00:00
TRACE("-- %p\n", pUnk);
return hres;
}
/******************************************************************************
* OleGetAutoConvert [OLE32.@]
*/
HRESULT WINAPI OleGetAutoConvert(REFCLSID clsidOld, LPCLSID pClsidNew)
{
static const WCHAR wszAutoConvertTo[] = {'A','u','t','o','C','o','n','v','e','r','t','T','o',0};
HKEY hkey = NULL;
WCHAR buf[CHARS_IN_GUID];
LONG len;
HRESULT res = S_OK;
res = COM_OpenKeyForCLSID(clsidOld, wszAutoConvertTo, KEY_READ, &hkey);
if (FAILED(res))
goto done;
len = sizeof(buf);
if (RegQueryValueW(hkey, NULL, buf, &len))
{
res = REGDB_E_KEYMISSING;
goto done;
}
res = CLSIDFromString(buf, pClsidNew);
done:
if (hkey) RegCloseKey(hkey);
return res;
}
/******************************************************************************
* OleSetAutoConvert [OLE32.@]
*/
HRESULT WINAPI OleSetAutoConvert(REFCLSID clsidOld, REFCLSID clsidNew)
{
static const WCHAR wszAutoConvertTo[] = {'A','u','t','o','C','o','n','v','e','r','t','T','o',0};
HKEY hkey = NULL;
WCHAR szClsidNew[CHARS_IN_GUID];
HRESULT res = S_OK;
TRACE("(%s,%s)\n", debugstr_guid(clsidOld), debugstr_guid(clsidNew));
res = COM_OpenKeyForCLSID(clsidOld, NULL, KEY_READ | KEY_WRITE, &hkey);
if (FAILED(res))
goto done;
StringFromGUID2(clsidNew, szClsidNew, CHARS_IN_GUID);
if (RegSetValueW(hkey, wszAutoConvertTo, REG_SZ, szClsidNew, (lstrlenW(szClsidNew)+1) * sizeof(WCHAR)))
{
res = REGDB_E_WRITEREGDB;
goto done;
}
done:
if (hkey) RegCloseKey(hkey);
return res;
}
/******************************************************************************
* OleDoAutoConvert [OLE32.@]
*/
HRESULT WINAPI OleDoAutoConvert(LPSTORAGE pStg, LPCLSID pClsidNew)
{
WCHAR *user_type_old, *user_type_new;
CLIPFORMAT cf;
STATSTG stat;
CLSID clsid;
HRESULT hr;
TRACE("(%p, %p)\n", pStg, pClsidNew);
*pClsidNew = CLSID_NULL;
if(!pStg)
return E_INVALIDARG;
hr = IStorage_Stat(pStg, &stat, STATFLAG_NONAME);
if(FAILED(hr))
return hr;
*pClsidNew = stat.clsid;
hr = OleGetAutoConvert(&stat.clsid, &clsid);
if(FAILED(hr))
return hr;
hr = IStorage_SetClass(pStg, &clsid);
if(FAILED(hr))
return hr;
hr = ReadFmtUserTypeStg(pStg, &cf, &user_type_old);
if(FAILED(hr)) {
cf = 0;
user_type_new = NULL;
}
hr = OleRegGetUserType(&clsid, USERCLASSTYPE_FULL, &user_type_new);
if(FAILED(hr))
user_type_new = NULL;
hr = WriteFmtUserTypeStg(pStg, cf, user_type_new);
CoTaskMemFree(user_type_new);
if(FAILED(hr))
{
CoTaskMemFree(user_type_old);
IStorage_SetClass(pStg, &stat.clsid);
return hr;
}
hr = SetConvertStg(pStg, TRUE);
if(FAILED(hr))
{
WriteFmtUserTypeStg(pStg, cf, user_type_old);
IStorage_SetClass(pStg, &stat.clsid);
}
else
*pClsidNew = clsid;
CoTaskMemFree(user_type_old);
return hr;
}
2005-09-20 11:36:56 +00:00
/******************************************************************************
* OleIsRunning [OLE32.@]
*/
BOOL WINAPI OleIsRunning(LPOLEOBJECT object)
2005-09-20 11:36:56 +00:00
{
IRunnableObject *pRunnable;
HRESULT hr;
BOOL running;
TRACE("(%p)\n", object);
2005-09-20 11:36:56 +00:00
if (!object) return FALSE;
hr = IOleObject_QueryInterface(object, &IID_IRunnableObject, (void **)&pRunnable);
2005-09-20 11:36:56 +00:00
if (FAILED(hr))
return TRUE;
2005-09-20 11:36:56 +00:00
running = IRunnableObject_IsRunning(pRunnable);
IRunnableObject_Release(pRunnable);
return running;
}
/***********************************************************************
* OleNoteObjectVisible [OLE32.@]
*/
HRESULT WINAPI OleNoteObjectVisible(LPUNKNOWN pUnknown, BOOL bVisible)
{
TRACE("(%p, %s)\n", pUnknown, bVisible ? "TRUE" : "FALSE");
return CoLockObjectExternal(pUnknown, bVisible, TRUE);
}
/***********************************************************************
* PropSysAllocString [OLE32.@]
* NOTES
* Forward to oleaut32.
*/
BSTR WINAPI PropSysAllocString(LPCOLESTR str)
{
return SysAllocString(str);
}
/***********************************************************************
* PropSysFreeString [OLE32.@]
* NOTES
* Forward to oleaut32.
*/
void WINAPI PropSysFreeString(LPOLESTR str)
{
SysFreeString(str);
}