Sweden-Number/dlls/ole32/ole2.c

2963 lines
78 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 21:08:12 +02: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
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Release 950620 Mon Jun 19 20:29:50 1995 Alexandre Julliard (julliard@sunsite.unc.edu) * [debugger/*.c] Modified debugger to use segmented pointers everywhere. * [if1632/shell.spec] [if1632/sound.spec] [if1632/user.spec] Declared all functions that return only 16-bit as 'pascal16'. * [include/ldt.h] [memory/ldt.c] Export LDT_EntryToBytes (new) and LDT_BytesToEntry for DPMI. Maintain a copy of the selector flags, removing the need to make a system call to retrieve an LDT entry. * [loader/module.c] Fixed bug with module file handle cache. * [loader/ne_resource.c] Fixed file name bug in NE_AccessResource(). * [loader/resource.c] Fixed bug in LoadIcon() that caused wrong colors to be used for the icon mask. * [loader/signal.c] Moved instruction emulation to miscemu/instr.c. * [misc/dos_fs.c] [miscemu/int21.c] Lots of small fixes, thanks to Morten Welinder. * [miscemu/dpmi.c] More complete DPMI emulation. * [miscemu/instr.c] Added support for prefixes in instructions to emulate. * [miscemu/int2f.c] Use register macros instead of destroying the high part of 32-bit registers. * [objects/dc.c] Fixed bug in GetDCState() that failed to clear the new DC. * [rc/sysres.rc] Removed dialogs 11 and 12 that were never used. * [tools/build.c] 'pascal16' generated functions did not save %dx. Removed use of %fs to access the stack. %ds is no longer initialized before calling a 16-bit routine. * [windows/defwnd.c] Accept a NULL pointer as window title. * [windows/mdi.c] MDICascade: skip iconic windows. Implemented CalcChildScroll(). * [windows/utility.c] Fixed MulDiv() for illegal values. * [windows/win.c] Fixed X error in CreateWindowEx() when WM_NCCALCSIZE returned a zero width or height. Sun Jun 18 22:22:30 MET DST 1995 Fons Botman (botman@inter.nl.net) * [controls/edit.c] Fixed "uninitalized" message which -Wall couldnt see to be ok in EDIT_WriteText. * [include/debug.h] Added define for extra checks in API definitions during debugging. * [loader/ne_image.c] Added newline in NE_FixupPrologs to avoid long lines. * [misc/dos_fs.c] Added extra safety check in DOS_ValidDrive. * [misc/exec.c] Fixed definition of ExitWindows. Sun Jun 18 21:16:08 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de> * [controls/edit.c] Some fixes, mostly for memory management, but also for text selection and tab postitions. General cleanup. Notepad.exe now works. * [controls/combo.c] Fix: the hwnd field of the DRAWITEMSTRUCT should always be that of the combo box, not the ComboLBox that belongs to it. * [controls/listbox.c] Handle itemID field correctly throughout. * [memory/local.c] Implemented flag LMEM_ZEROINIT. LocalReAlloc() could trash the heap. Fixed. * [objects/font.c] FONT_MatchFont(): don't get confused by negative widths. Fixed a segfault in EnumFonts(). * [objects/text.c] DrawText(): DT_CALCRECT implies DT_NOCLIP. * [objects/dcvalues.c] MAKELONG was used with bad parameters in DC_GET_X_Y. * [windows/dialog.c] Don't show the dialog if WS_VISIBLE isn't set in the template. * [windows/utility.c] UTILITY_convertArgs(): Never pass an expression containing ++ into a macro... * [windows/win.c] SetParent() should unlink the window before changing the parent. * [windows/message.c] Don't call timer functions via CallWindowProc(), since it checks whether hwnd==0 and does not call the function in that case. * [miscemu/instr.c] Ignore interrupt 0x3D, for VBRUN300.DLL. * [misc/commdlg.c] Don't rely on the itemData field of the DRAWITEMSTRUCT to contain a pointer to the item text. * [if1632/relay.c] Disable OLE and DDEML DLLs by default, since they contain nothing but stubs anyway. SHELL, COMMDLG and WIN87EM are left enabled, although some programs may work better without them. * [multimedia/*.c] [include/multimedia.h] [include/driver.h] Begun cleaning things up a little. Replaced printfs with dprintf_ macros, made functions static where possible, and some other minor changes. Sun Jun 11 23:19:10 1995 Martin von Loewis <martin@informatik.hu-berlin.de> * [debugger/dbg.y][debugger/dbg.l] Removed special handling for FILE_IDENTIFER, because it caused problems with x/<format> statements. * [debugger/info.c] Use SC_ESP instead of SC_EIP for stack dump. * [misc/compobj.c][if1632/compobj.spec] CoBuildVersion, CoInitialize, CoUninitialize: new functions * [misc/ole2.c][if1632/ole2.spec][misc/Imakefile][include/ole2.h] New files ole2.c, ole2.h OleBuildVersion, OleInitialize, OleUninitialize: new functions * [if1632/ole2disp.spec] Added missing ordinals above 109 * [misc/ole2nls.c][if1632/ole2nls.spec][include/winnls.h] New file winnls.h GetLocaleInfoA: new function * [if1632/shell.spec] Added FindEnvironmentString as stub * [misc/olecli.c][if1632/olecli.spec] OleIsDcMeta: New function * [objects/font][misc/gdi.spec] GetKerningPairs: new function * [misc/shell.c] ShellExecute: Implemented support for starting programs * [if1632/user.spec] Inserted missing relay to GetClipCursor Sun Jun 11 20:34:47 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de> * [controls/edit.c] Fix a problem with the local heap. * [include/wintypes.h] Fixed wrong declarations of CATCHBUF and LPCATCHBUF. * [include/mdi.h] [windows/mdi.c] This code still assumed segmented address==linear address. Fixed. * [include/msdos.h] [misc/dos_fs.c] The filemask field of the dosdirent structure could be overrun. Fixed. If you had a file called foobar and a file called foo, trying to FindFile(foo) could accidentally find file foobar instead. Fixed. * [misc/file.c] OpenFile(): Always return the full pathname in ofs->szPathName. This also fixes GetModuleFilename(). Prevent _lclose() from closing stderr or stdout. * [misc/profile.c] Search for .ini files in the path of the current module as well. (Needed by Lotus Organizer.) * [loader/task.c] [loader/ne_image.c] [loader/module.c] [memory/local.c] Local heaps are now initialized by InitTask() for executables. DLLs have to call LocalInit() themselves, LocalInit() has to put the heap at the end of the segment when called with start==0. We no longer allocate the DGROUP with 64k on startup, but grow the local heap in LOCAL_GetBlock() when necessary. * [loader/module.c] LoadLibrary() should call LoadModule() in all cases, even if the DLL is already loaded, to ensure that the reference count is correct. * [loader/ne_image.c] Some changes to function prolog fixup. Does anyone know exactly how this is supposed to work? I am only guessing here. In NE_InitializeDLLs(), initialize the DLLs a module refers to before the module itself. * [loader/task.c] Initialize instance data at the beginning of the DGROUP in InitTask(). * [memory/local.c] Some fixes for moveable blocks. * [memory/selector.c] All the IsBad*Pointer() functions returned exactly the wrong boolean value in all cases! * [objects/bitblt.c] Fixed another null pointer dereference in debugging output. * [objects/font.c] Some more recovery possibilities for FONT_MatchFont() if a specified font does not exist. * [windows/win.c] The dialog code may call CreateWindowEx with an integer in windowName. This happens for static icon controls that expect a resource ID as the window name. CreateWindowEx() used to crash. Fixed. * [windows/class.c] [windows/win.c] Window classes are owned by modules, not instances. Changed RegisterClass(), UnregisterClass(), GetClassInfo() and CreateWindowEx() accordingly. Sat Jun 10 16:10:53 1995 Olaf Flebbe <o.flebbe@science-computing.uni-tuebingen.de> * [miscemu/int21.c] clock.exe was displaying incorrect year. Fri Jun 9 20:36:56 1995 Victor Schneider <tailor@crl.com> * [include/cursor.h] [windows/cursor.c] Implemented CreateCursorIconIndirect().
1995-06-20 21:08:12 +02:00
*/
#include "config.h"
#include <assert.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#define COBJMACROS
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "wingdi.h"
1999-02-28 20:14:33 +01:00
#include "winuser.h"
#include "winnls.h"
#include "winreg.h"
#include "commctrl.h"
#include "ole2.h"
#include "ole2ver.h"
#include "wownt32.h"
#include "wine/unicode.h"
#include "compobj_private.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 21:08:12 +02:00
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(ole);
WINE_DECLARE_DEBUG_CHANNEL(accel);
/******************************************************************************
2002-06-01 01:06:46 +02:00
* These are static/global variables and internal data structures that the
* OLE module uses to maintain it's state.
*/
typedef struct tagDropTargetNode
{
HWND hwndTarget;
IDropTarget* dropTarget;
struct tagDropTargetNode* prevDropTarget;
struct tagDropTargetNode* nextDropTarget;
} DropTargetNode;
typedef struct tagTrackerWindowInfo
{
IDataObject* dataObject;
IDropSource* dropSource;
DWORD dwOKEffect;
DWORD* pdwEffect;
BOOL trackingDone;
HRESULT returnValue;
BOOL escPressed;
HWND curTargetHWND; /* window the mouse is hovering over */
HWND curDragTargetHWND; /* might be a ancestor of curTargetHWND */
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 ULONG OLE_moduleLockCount = 0;
/*
* Name of our registered window class.
*/
static const char OLEDD_DRAGTRACKERCLASS[] = "WineDragDropTracker32";
/*
* This is the head of the Drop target container.
*/
static DropTargetNode* targetListHead = NULL;
/******************************************************************************
2002-06-01 01:06:46 +02:00
* These are the prototypes of miscelaneous 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);
BOOL OLEMenu_InstallHooks( DWORD tid );
BOOL OLEMenu_UnInstallHooks( DWORD tid );
OleMenuHookItem * OLEMenu_IsHookInstalled( DWORD tid );
static BOOL OLEMenu_FindMainMenuIndex( HMENU hMainMenu, HMENU hPopupMenu, UINT *pnPos );
BOOL OLEMenu_SetIsServerMenu( HMENU hmenu, OleMenuDescriptor *pOleMenuDescriptor );
LRESULT CALLBACK OLEMenu_CallWndProc(INT code, WPARAM wParam, LPARAM lParam);
LRESULT CALLBACK OLEMenu_GetMsgProc(INT code, WPARAM wParam, LPARAM lParam);
1999-07-18 17:43:45 +02: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 17:43:45 +02:00
/******************************************************************************
* These are the prototypes of the utility methods used for OLE Drag n Drop
*/
static void OLEDD_Initialize(void);
static void OLEDD_UnInitialize(void);
static void OLEDD_InsertDropTarget(
DropTargetNode* nodeToAdd);
static DropTargetNode* OLEDD_ExtractDropTarget(
HWND hwndOfTarget);
static DropTargetNode* OLEDD_FindDropTarget(
HWND hwndOfTarget);
static LRESULT WINAPI OLEDD_DragTrackerWindowProc(
2002-06-01 01:06:46 +02:00
HWND hwnd,
UINT uMsg,
2002-06-01 01:06:46 +02:00
WPARAM wParam,
LPARAM lParam);
static void OLEDD_TrackMouseMove(
TrackerWindowInfo* trackerInfo);
static void OLEDD_TrackStateChange(
TrackerWindowInfo* trackerInfo);
static DWORD OLEDD_GetButtonState(void);
/******************************************************************************
* OleBuildVersion [OLE2.1]
2003-09-11 05:06:25 +02: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 21:08:12 +02: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 21:08:12 +02: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 19:17:23 +02: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 21:08:12 +02:00
}
/***********************************************************************
2001-07-02 21:59:40 +02:00
* OleInitialize (OLE2.2)
2003-09-11 05:06:25 +02: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 21:08:12 +02:00
*/
Release 970824 Sat Aug 23 00:05:23 1997 Andreas Mohr <100.30936@germany.net> * [if1632/kernel.spec] [if1632/mmsystem.spec] Added some stubs. * [include/neexe.h] [loader/module.c] Added warning for OS/2 executables. * [multimedia/midi.c] Shortened MIDIOUT driver version string to be less than 31 chars. * [objects/gdiobj.c] Fixed DeleteObject32() to react properly when called with stock object. Fri Aug 22 18:03:26 1997 Dimitrie O. Paun <dimi@cs.toronto.edu> * [controls/updown.c] [include/updown.h] First attempt at implementiong the UpDown class. * [controls/widgets.c] Added the UpDown class to be initialized by InitCommonControls(). Wed Aug 20 18:01:33 1997 Doug Ridgway <ridgway@routh.UCSD.EDU> * [graphics/*] [objects/*] [include/gdi.h] Made all GDI objects (except DCs) moveable. Mon Aug 18 03:25:30 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [windows/event.c] [misc/winsock.c] [misc/winsock_dns.c] Removed IPC communication to speed up winsock services (tested only with 16-bit netscape 3.03). * [graphics/x11drv/xfont.c] [documentation/fonts] Miscellaneous improvements. Updated docs. Sun Aug 17 20:39:55 1997 Ingo Schneider <schneidi@informatik.tu-muenchen.de> * [misc/comm.c] A couple of bug fixes. Sun Aug 17 19:29:22 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [debugger/dbg.y] Display next instruction after stepi/nexti. * [if1632/relay.c] [include/callback.h] [tools/build.c] Replaced CallTo32_LargeStack with the CALL_LARGE_STACK macro for better Winelib support. * [include/sigcontext.h] Renamed to sig_context.h to avoid conflicts with libc. * [*/*] All API functions are now prefixed with WINAPI in prevision of future Winelib integration. * [loader/signal.c] [memory/ldt.c] Fixed assembly code to be -fPIC compatible. Thu Aug 14 14:38:15 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [if1632/crtdll.spec][win32/except.c] _global_unwind, _local_unwind stub added. * [objects/dib.c] Don't read memory you don't even need for the target bitmap (fixes one 'lazy' program). * [if1632/relay.c][if1632/thunk.c][if1632/kernel32.spec] [win32/ordinals.c][memory/selector.c][memory/global.c] [include/callback.h] Added/moved some more win95 ordinal stuff. Implemented QT_Thunk (not 100% correct yet) and some friends. * [loader/pe_image.c] Add possibility to break at the DLL entrypoint. * [controls/static.c][misc/commdlg.c][scheduler/thread.c] Misc bugfixes and additions. * [misc/registry.c] The registry seems to be case-preserving but case-insensitive. * [memory/global.c] Adapted to new /proc/meminfo format. * [objects/font.c][graphics/x11drv/xfont.c] FONT_SelectObject and GetTextMetrics* get passed ranges in logical and not device points (thanks to Marion Reyzl for pointing this out). * [windows/caret.c] Use the windows own DC if present (The caret coordinates are logical coordinates based on it). Fixes another AMIPRO problem. Wed Aug 6 18:22:22 1997 Morten Welinder <terra@diku.dk> * [controls/menu.c] General clean-up and Win32 work: split item_flags into fType and fState; split item_id into wID and hSubMenu. Improved debug-printing. Implemented InsertMenuItem32[AW], SetMenuDefaultItem32, and SetMenuItemInfo32[AW]. Fixed GetMenuItemInfo32[AW]. * [if1632/user32.spec] Define above new functions. * [include/windows.h] Define MF_DEFAULT and MF_RIGHTJUSTIFY. Prototype above functions. * [include/menu.h] Don't prototype now-static MENU_InitSysMenuPopup. * [include/comm.h] Reduce MAX_PORTS to 9 (which the profile code can handle). Tue Aug 5 20:16:22 1997 Victor Schneider <vischne@ibm.net> * [library/winestub.c] [libtest/expand.c] These patches let people porting Windows apps compile them using the same conventions regarding global _argc and _argv as those on Windows C/C++ compilers.
1997-08-24 18:00:30 +02:00
HRESULT WINAPI 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 21:08:12 +02: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-06-01 01:06:46 +02:00
* If the CoInitializeEx call failed, the OLE libraries can't be
* initialized.
*/
if (FAILED(hr))
2002-06-01 01:06:46 +02:00
return hr;
/*
* Then, it has to initialize the OLE specific modules.
* This includes:
* Clipboard
* Drag and Drop
* Object linking and Embedding
* In-place activation
*/
if (OLE_moduleLockCount==0)
{
2002-06-01 01:06:46 +02:00
/*
* Initialize the libraries.
*/
TRACE("() - Initializing the OLE libraries\n");
1999-07-18 17:43:45 +02:00
/*
* OLE Clipboard
*/
OLEClipbrd_Initialize();
/*
* Drag and Drop
*/
OLEDD_Initialize();
/*
* OLE shared menu
*/
OLEMenu_Initialize();
}
/*
* Then, we increase the lock count on the OLE module.
*/
2002-06-01 01:06:46 +02:00
OLE_moduleLockCount++;
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 21:05:02 +01:00
}
/******************************************************************************
2001-07-02 21:59:40 +02:00
* OleUninitialize [OLE2.3]
2003-09-11 05:06:25 +02: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 21:08:12 +02:00
*/
Release 971012 Sun Oct 12 15:03:01 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [if1632/builtin.c] [if1632/relay.c] Relay debugging entry points are now generated on the fly for Win32 DLLs. * [include/stackframe.h] Added VA_LIST16 type and macros to access arguments on the 16-bit stack. * [memory/global.c] Fixed GlobalHandle32 to work with fixed blocks. * [misc/ddeml.c] (New file) Added a lot of stubs for DDEML functions. * [objects/dc.c] Added Get/SetGraphicsMode(). * [objects/gdiobj.c] [windows/winpos.c] Added a few stubs. * [tools/build.c] Removed 'byte', 'word', 'long' and 'return' entry points for Win32. 'register' functions can no longer take arguments in Win32. The Win32 NE module is now generated by MODULE_CreateDummyModule. CallFrom32 callbacks removed except for register functions. Fri Oct 10 18:22:18 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/Makefile.in] [graphics/win16drv/brush.c] [graphics/win16drv/graphics.c] [graphics/win16drv/init.c] [graphics/win16drv/objects.c] [graphics/win16drv/pen.c] [graphics/win16drv/prtdrv.c] [graphics/win16drv/text.c] [include/callback.h] [include/win16drv.h] Added support for pens and brushes in SelectObject. Added support for LineTo, MoveToEx, PatBlt (very preliminary), Polygon and Rectangle. Text is drawn in the correct place more often. These changes may only work with the Windows Postscript driver since many other drivers now need more GDI support. Tue Oct 7 21:06:23 1997 Kristian Nielsen <kristian.nielsen@risoe.dk> * [debugger/expr.c] Fixed typo for the >> operator. * [loader/task.c] Fixed SwitchStackTo(); it used to return with the new stack placed four bytes too high in memory. * [loader/ne_resource.c] Removed problematic nametable code introduced in Wine 970914. Tue Oct 7 02:24:12 1997 Dimitrie O. Paun <dimi@cs.toronto.edu> * [controls/commctrl.c] Added this files to hold functions from the comctl32.dll Added to this files some functions scattered in different places (such as InitCommonControls) and added some new ones as well. * [include/syscolor.h] [windows/syscolor.c] Added proper entries for all possible COLOR_* values. * [objects/brush.c] Modified GetSysColorBrush to return the correct brush for all possible COLOR_* constants. Sat Oct 4 23:35:20 1997 U.Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [loader/module.c] [scheduler/process.c] [win32/environment.c] Another approach to get access to an unrestricted commandline. * [misc/crtdll.c] Make fclose work again. * [if1632/crtdll.spec] Use sprintf for crtdll-sprintf again as e.g. %g is not available for wsprintf. * [misc/wsprintf.c] Make WPR_STRING work in more situations. Added debug output for the wsprintf functions. * [misc/crtdll.c] [misc/main.c] Use argv[0] as comand with CRTDLL_system. Fri Oct 3 14:00:29 MET DST 1997 Jan Willamowius <jan@janhh.shnet.org> * [*/*] Removed some compiler warnings. * [msdos/int15.c] New INT 15 handler.
1997-10-12 18:30:17 +02:00
void WINAPI 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 21:08:12 +02:00
{
TRACE("()\n");
/*
* Decrease the lock count on the OLE module.
*/
OLE_moduleLockCount--;
/*
* If we hit the bottom of the lock stack, free the libraries.
*/
if (OLE_moduleLockCount==0)
{
/*
* Actually free the libraries.
*/
TRACE("() - Freeing the last reference count\n");
1999-07-18 17:43:45 +02:00
/*
* OLE Clipboard
*/
OLEClipbrd_UnInitialize();
/*
* Drag and Drop
*/
OLEDD_UnInitialize();
2002-06-01 01:06:46 +02:00
/*
* OLE shared menu
*/
OLEMenu_UnInitialize();
}
2002-06-01 01:06:46 +02: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 21:08:12 +02: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 19:17:23 +02:00
/******************************************************************************
2003-09-11 05:06:25 +02: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 21:05:02 +01:00
*/
2005-07-22 20:29:19 +02:00
HRESULT WINAPI OleInitializeWOW(DWORD x, DWORD y) {
FIXME("(0x%08lx, 0x%08lx),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 21:05:02 +01: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 21:29:56 +01:00
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 21:03:56 +02:00
/***********************************************************************
2003-09-11 05:06:25 +02: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 21:03:56 +02:00
*/
HRESULT WINAPI RegisterDragDrop(
HWND hwnd,
2002-06-01 01:06:46 +02:00
LPDROPTARGET pDropTarget)
{
DropTargetNode* dropTargetInfo;
2002-11-22 05:43:02 +01:00
TRACE("(%p,%p)\n", hwnd, pDropTarget);
if (!pDropTarget)
return E_INVALIDARG;
/*
* First, check if the window is already registered.
*/
dropTargetInfo = OLEDD_FindDropTarget(hwnd);
if (dropTargetInfo!=NULL)
return DRAGDROP_E_ALREADYREGISTERED;
/*
* If it's not there, we can add it. We first create a node for it.
*/
dropTargetInfo = HeapAlloc(GetProcessHeap(), 0, sizeof(DropTargetNode));
if (dropTargetInfo==NULL)
return E_OUTOFMEMORY;
dropTargetInfo->hwndTarget = hwnd;
dropTargetInfo->prevDropTarget = NULL;
dropTargetInfo->nextDropTarget = NULL;
/*
* Don't forget that this is an interface pointer, need to nail it down since
* we keep a copy of it.
*/
dropTargetInfo->dropTarget = pDropTarget;
IDropTarget_AddRef(dropTargetInfo->dropTarget);
2002-06-01 01:06:46 +02:00
OLEDD_InsertDropTarget(dropTargetInfo);
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 21:03:56 +02:00
return S_OK;
}
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 18:32:00 +02:00
/***********************************************************************
2003-09-11 05:06:25 +02: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 18:32:00 +02:00
*/
HRESULT WINAPI RevokeDragDrop(
HWND hwnd)
{
DropTargetNode* dropTargetInfo;
2002-11-22 05:43:02 +01:00
TRACE("(%p)\n", hwnd);
/*
* First, check if the window is already registered.
*/
dropTargetInfo = OLEDD_ExtractDropTarget(hwnd);
/*
* If it ain't in there, it's an error.
*/
if (dropTargetInfo==NULL)
return DRAGDROP_E_NOTREGISTERED;
/*
* If it's in there, clean-up it's used memory and
* references
*/
IDropTarget_Release(dropTargetInfo->dropTarget);
2002-06-01 01:06:46 +02:00
HeapFree(GetProcessHeap(), 0, dropTargetInfo);
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 18:32:00 +02:00
return S_OK;
}
/***********************************************************************
2003-09-11 05:06:25 +02:00
* OleRegGetUserType (OLE32.@)
*
* This implementation of OleRegGetUserType ignores the dwFormOfType
* parameter and always returns the full name of the object. This is
* not too bad since this is the case for many objects because of the
* way they are registered.
*/
2002-06-01 01:06:46 +02:00
HRESULT WINAPI OleRegGetUserType(
REFCLSID clsid,
DWORD dwFormOfType,
LPOLESTR* pszUserType)
{
char keyName[60];
DWORD dwKeyType;
DWORD cbData;
HKEY clsidKey;
LONG hres;
2005-07-05 13:02:54 +02:00
LPSTR buffer;
HRESULT retVal;
/*
* Initialize the out parameter.
*/
*pszUserType = NULL;
/*
* Build the key name we're looking for
*/
sprintf( keyName, "CLSID\\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\\",
clsid->Data1, clsid->Data2, clsid->Data3,
clsid->Data4[0], clsid->Data4[1], clsid->Data4[2], clsid->Data4[3],
clsid->Data4[4], clsid->Data4[5], clsid->Data4[6], clsid->Data4[7] );
TRACE("(%s, %ld, %p)\n", keyName, dwFormOfType, pszUserType);
/*
* Open the class id Key
*/
hres = RegOpenKeyA(HKEY_CLASSES_ROOT,
keyName,
&clsidKey);
if (hres != ERROR_SUCCESS)
return REGDB_E_CLASSNOTREG;
/*
* Retrieve the size of the name string.
*/
cbData = 0;
hres = RegQueryValueExA(clsidKey,
"",
NULL,
&dwKeyType,
NULL,
&cbData);
if (hres!=ERROR_SUCCESS)
{
RegCloseKey(clsidKey);
return REGDB_E_READREGDB;
}
/*
* Allocate a buffer for the registry value.
*/
*pszUserType = CoTaskMemAlloc(cbData*2);
if (*pszUserType==NULL)
{
RegCloseKey(clsidKey);
return E_OUTOFMEMORY;
}
buffer = HeapAlloc(GetProcessHeap(), 0, cbData);
if (buffer == NULL)
{
RegCloseKey(clsidKey);
CoTaskMemFree(*pszUserType);
*pszUserType=NULL;
return E_OUTOFMEMORY;
}
hres = RegQueryValueExA(clsidKey,
"",
NULL,
&dwKeyType,
2005-07-05 13:02:54 +02:00
(LPBYTE) buffer,
&cbData);
RegCloseKey(clsidKey);
2002-06-01 01:06:46 +02:00
if (hres!=ERROR_SUCCESS)
{
CoTaskMemFree(*pszUserType);
*pszUserType=NULL;
retVal = REGDB_E_READREGDB;
}
else
{
MultiByteToWideChar( CP_ACP, 0, buffer, -1, *pszUserType, cbData /*FIXME*/ );
retVal = S_OK;
}
HeapFree(GetProcessHeap(), 0, buffer);
return retVal;
}
/***********************************************************************
2003-09-11 05:06:25 +02: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 */
{
TrackerWindowInfo trackerInfo;
HWND hwndTrackWindow;
MSG msg;
TRACE("(DataObject %p, DropSource %p)\n", pDataObject, pDropSource);
/*
* Setup the drag n drop tracking window.
*/
if (!IsValidInterface((LPUNKNOWN)pDropSource))
return E_INVALIDARG;
trackerInfo.dataObject = pDataObject;
trackerInfo.dropSource = pDropSource;
trackerInfo.dwOKEffect = dwOKEffect;
trackerInfo.pdwEffect = pdwEffect;
trackerInfo.trackingDone = FALSE;
trackerInfo.escPressed = FALSE;
trackerInfo.curDragTargetHWND = 0;
trackerInfo.curTargetHWND = 0;
trackerInfo.curDragTarget = 0;
hwndTrackWindow = CreateWindowA(OLEDD_DRAGTRACKERCLASS,
"TrackerWindow",
WS_POPUP,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
0,
0,
0,
(LPVOID)&trackerInfo);
if (hwndTrackWindow!=0)
{
/*
* Capture the mouse input
*/
SetCapture(hwndTrackWindow);
msg.message = 0;
/*
* Pump messages. All mouse input should go the the capture window.
*/
while (!trackerInfo.trackingDone && GetMessageA(&msg, 0, 0, 0) )
{
trackerInfo.curMousePos.x = msg.pt.x;
trackerInfo.curMousePos.y = msg.pt.y;
trackerInfo.dwKeyState = OLEDD_GetButtonState();
2002-06-01 01:06:46 +02: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-06-01 01:06:46 +02:00
*/
OLEDD_TrackStateChange(&trackerInfo);
}
else
{
/*
* Dispatch the messages only when it's not a keyboard message.
*/
DispatchMessageA(&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 05:06:25 +02:00
* OleQueryLinkFromData [OLE32.@]
*/
HRESULT WINAPI OleQueryLinkFromData(
IDataObject* pSrcDataObject)
{
FIXME("(%p),stub!\n", pSrcDataObject);
return S_OK;
}
/***********************************************************************
2003-09-11 05:06:25 +02:00
* OleRegGetMiscStatus [OLE32.@]
*/
HRESULT WINAPI OleRegGetMiscStatus(
REFCLSID clsid,
DWORD dwAspect,
DWORD* pdwStatus)
{
char keyName[60];
HKEY clsidKey;
HKEY miscStatusKey;
HKEY aspectKey;
LONG result;
/*
* Initialize the out parameter.
*/
*pdwStatus = 0;
/*
* Build the key name we're looking for
*/
sprintf( keyName, "CLSID\\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\\",
clsid->Data1, clsid->Data2, clsid->Data3,
clsid->Data4[0], clsid->Data4[1], clsid->Data4[2], clsid->Data4[3],
clsid->Data4[4], clsid->Data4[5], clsid->Data4[6], clsid->Data4[7] );
TRACE("(%s, %ld, %p)\n", keyName, dwAspect, pdwStatus);
/*
* Open the class id Key
*/
result = RegOpenKeyA(HKEY_CLASSES_ROOT,
keyName,
&clsidKey);
if (result != ERROR_SUCCESS)
return REGDB_E_CLASSNOTREG;
/*
* Get the MiscStatus
*/
result = RegOpenKeyA(clsidKey,
"MiscStatus",
&miscStatusKey);
2002-06-01 01:06:46 +02:00
if (result != ERROR_SUCCESS)
{
RegCloseKey(clsidKey);
return REGDB_E_READREGDB;
}
/*
* Read the default value
*/
OLEUTL_ReadRegistryDWORDValue(miscStatusKey, pdwStatus);
/*
* Open the key specific to the requested aspect.
*/
sprintf(keyName, "%ld", dwAspect);
result = RegOpenKeyA(miscStatusKey,
keyName,
&aspectKey);
2002-06-01 01:06:46 +02:00
if (result == ERROR_SUCCESS)
{
OLEUTL_ReadRegistryDWORDValue(aspectKey, pdwStatus);
RegCloseKey(aspectKey);
}
/*
* Cleanup
*/
RegCloseKey(miscStatusKey);
RegCloseKey(clsidKey);
return S_OK;
}
2005-09-23 12:08:25 +02:00
static HRESULT EnumOLEVERB_Construct(HKEY hkeyVerb, ULONG index, IEnumOLEVERB **ppenum);
typedef struct
{
const IEnumOLEVERBVtbl *lpvtbl;
LONG ref;
HKEY hkeyVerb;
ULONG index;
} EnumOLEVERB;
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))
{
IUnknown_AddRef(iface);
*ppv = iface;
return S_OK;
}
return E_NOINTERFACE;
}
static ULONG WINAPI EnumOLEVERB_AddRef(
IEnumOLEVERB *iface)
{
EnumOLEVERB *This = (EnumOLEVERB *)iface;
TRACE("()\n");
return InterlockedIncrement(&This->ref);
}
static ULONG WINAPI EnumOLEVERB_Release(
IEnumOLEVERB *iface)
{
EnumOLEVERB *This = (EnumOLEVERB *)iface;
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 = (EnumOLEVERB *)iface;
HRESULT hr = S_OK;
TRACE("(%ld, %p, %p)\n", celt, rgelt, pceltFetched);
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, sizeof(wszSubKey)/sizeof(wszSubKey[0]));
if (res == ERROR_NO_MORE_ITEMS)
{
hr = S_FALSE;
break;
}
else if (res != ERROR_SUCCESS)
{
ERR("RegEnumKeyW failed with error %ld\n", res);
hr = REGDB_E_READREGDB;
break;
}
res = RegQueryValueW(This->hkeyVerb, wszSubKey, NULL, &cbData);
if (res != ERROR_SUCCESS)
{
ERR("RegQueryValueW failed with error %ld\n", res);
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 %ld\n", res);
hr = REGDB_E_READREGDB;
CoTaskMemFree(pwszOLEVERB);
break;
}
TRACE("verb string: %s\n", debugstr_w(pwszOLEVERB));
pwszMenuFlags = strchrW(pwszOLEVERB, ',');
if (!pwszMenuFlags)
{
hr = OLEOBJ_E_INVALIDVERB;
CoTaskMemFree(pwszOLEVERB);
break;
}
/* nul terminate the name string and advance to first character */
*pwszMenuFlags = '\0';
pwszMenuFlags++;
pwszAttribs = strchrW(pwszMenuFlags, ',');
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 = atolW(wszSubKey);
rgelt->lpszVerbName = pwszOLEVERB; /* user should free */
rgelt->fuFlags = atolW(pwszMenuFlags);
rgelt->grfAttribs = atolW(pwszAttribs);
if (pceltFetched)
*pceltFetched++;
This->index++;
}
return hr;
}
static HRESULT WINAPI EnumOLEVERB_Skip(
IEnumOLEVERB *iface, ULONG celt)
{
EnumOLEVERB *This = (EnumOLEVERB *)iface;
TRACE("(%ld)\n", celt);
This->index += celt;
return S_OK;
}
static HRESULT WINAPI EnumOLEVERB_Reset(
IEnumOLEVERB *iface)
{
EnumOLEVERB *This = (EnumOLEVERB *)iface;
TRACE("()\n");
This->index = 0;
return S_OK;
}
static HRESULT WINAPI EnumOLEVERB_Clone(
IEnumOLEVERB *iface,
IEnumOLEVERB **ppenum)
{
EnumOLEVERB *This = (EnumOLEVERB *)iface;
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->lpvtbl = &EnumOLEVERB_VTable;
This->ref = 1;
This->index = index;
This->hkeyVerb = hkeyVerb;
*ppenum = (IEnumOLEVERB *)&This->lpvtbl;
return S_OK;
}
/***********************************************************************
* 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 12:08:25 +02: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 %ld\n",
debugstr_guid(clsid), res);
return res;
2005-09-23 12:08:25 +02: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 %ld\n", GetLastError());
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 05:06:25 +02:00
* OleSetContainedObject [OLE32.@]
*/
HRESULT WINAPI OleSetContainedObject(
2002-06-01 01:06:46 +02: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 22:52:57 +02:00
(void**)&runnable);
if (SUCCEEDED(hres))
{
hres = IRunnableObject_SetContainedObject(runnable, fContained);
IRunnableObject_Release(runnable);
return hres;
}
return S_OK;
}
/******************************************************************************
2003-09-11 05:06:25 +02:00
* OleLoad [OLE32.@]
*/
HRESULT WINAPI OleLoad(
2002-06-01 01:06:46 +02:00
LPSTORAGE pStg,
REFIID riid,
LPOLECLIENTSITE pClientSite,
LPVOID* ppvObj)
{
IPersistStorage* persistStorage = NULL;
IOleObject* oleObject = NULL;
STATSTG storageInfo;
HRESULT hres;
TRACE("(%p,%p,%p,%p)\n", pStg, riid, pClientSite, ppvObj);
2002-06-01 01:06:46 +02:00
/*
* TODO, Conversion ... OleDoAutoConvert
*/
/*
* Get the class ID for the object.
*/
hres = IStorage_Stat(pStg, &storageInfo, STATFLAG_NONAME);
/*
* Now, try and create the handler for the object
*/
hres = CoCreateInstance(&storageInfo.clsid,
NULL,
CLSCTX_INPROC_HANDLER,
&IID_IOleObject,
2004-05-21 22:52:57 +02:00
(void**)&oleObject);
/*
* If that fails, as it will most times, load the default
* OLE handler.
*/
if (FAILED(hres))
{
hres = OleCreateDefaultHandler(&storageInfo.clsid,
NULL,
&IID_IOleObject,
2004-05-21 22:52:57 +02:00
(void**)&oleObject);
}
/*
* If we couldn't find a handler... this is bad. Abort the whole thing.
*/
if (FAILED(hres))
return hres;
/*
* Inform the new object of it's client site.
*/
hres = IOleObject_SetClientSite(oleObject, pClientSite);
/*
* Initialize the object with it's IPersistStorage interface.
*/
hres = IOleObject_QueryInterface(oleObject,
&IID_IPersistStorage,
2004-05-21 22:52:57 +02:00
(void**)&persistStorage);
2002-06-01 01:06:46 +02:00
if (SUCCEEDED(hres))
{
IPersistStorage_Load(persistStorage, pStg);
IPersistStorage_Release(persistStorage);
persistStorage = NULL;
}
/*
* Return the requested interface to the caller.
*/
hres = IOleObject_QueryInterface(oleObject, riid, ppvObj);
/*
* Cleanup interfaces used internally
*/
IOleObject_Release(oleObject);
return hres;
}
/***********************************************************************
2003-09-11 05:06:25 +02: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-06-01 01:06:46 +02:00
return hres;
}
/******************************************************************************
2003-09-11 05:06:25 +02:00
* OleLockRunning [OLE32.@]
*/
2002-06-01 01:06:46 +02: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 22:52:57 +02:00
(void**)&runnable);
if (SUCCEEDED(hres))
{
hres = IRunnableObject_LockRunning(runnable, fLock, fLastUnlockCloses);
IRunnableObject_Release(runnable);
return hres;
}
else
return E_INVALIDARG;
}
/**************************************************************************
* 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()
{
}
/***
* OLEMenu_UnInitialize()
*
* Releases the OLEMENU data structures.
*/
static void OLEMenu_UnInitialize()
{
}
/*************************************************************************
* OLEMenu_InstallHooks
* Install thread scope message hooks for WH_GETMESSAGE and WH_CALLWNDPROC
*
2003-07-02 06:37:26 +02:00
* RETURNS: TRUE if message hooks were successfully installed
* FALSE on failure
*/
BOOL OLEMenu_InstallHooks( DWORD tid )
{
OleMenuHookItem *pHookItem = NULL;
/* Create an entry for the hook table */
if ( !(pHookItem = HeapAlloc(GetProcessHeap(), 0,
sizeof(OleMenuHookItem)) ) )
return FALSE;
pHookItem->tid = tid;
pHookItem->hHeap = GetProcessHeap();
2002-06-01 01:06:46 +02:00
/* Install a thread scope message hook for WH_GETMESSAGE */
pHookItem->GetMsg_hHook = SetWindowsHookExA( WH_GETMESSAGE, OLEMenu_GetMsgProc,
0, GetCurrentThreadId() );
if ( !pHookItem->GetMsg_hHook )
goto CLEANUP;
/* Install a thread scope message hook for WH_CALLWNDPROC */
pHookItem->CallWndProc_hHook = SetWindowsHookExA( 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-06-01 01:06:46 +02:00
return TRUE;
2002-06-01 01:06:46 +02: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-06-01 01:06:46 +02:00
return FALSE;
}
/*************************************************************************
* OLEMenu_UnInstallHooks
* UnInstall thread scope message hooks for WH_GETMESSAGE and WH_CALLWNDPROC
*
2003-07-02 06:37:26 +02:00
* RETURNS: TRUE if message hooks were successfully installed
* FALSE on failure
*/
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
*/
OleMenuHookItem * OLEMenu_IsHookInstalled( DWORD tid )
{
OleMenuHookItem *pHookItem = NULL;
/* 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-06-01 01:06:46 +02: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 )
{
UINT i, nItems;
nItems = GetMenuItemCount( hMainMenu );
for (i = 0; i < nItems; i++)
{
HMENU hsubmenu;
2002-06-01 01:06:46 +02: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 15:07:56 +01:00
* FALSE if the popup menu is part of a container owned group
*/
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-06-01 01:06:46 +02: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) ? TRUE : FALSE;
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.
*/
LRESULT CALLBACK OLEMenu_CallWndProc(INT code, WPARAM wParam, LPARAM lParam)
{
LPCWPSTRUCT pMsg = NULL;
HOLEMENU hOleMenu = 0;
OleMenuDescriptor *pOleMenuDescriptor = NULL;
OleMenuHookItem *pHookItem = NULL;
WORD fuFlags;
2002-06-01 01:06:46 +02:00
TRACE("%i, %04x, %08x\n", code, wParam, (unsigned)lParam );
/* Check if we're being asked to process the message */
if ( HC_ACTION != code )
goto NEXTHOOK;
2002-06-01 01:06:46 +02: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 = (HOLEMENU)GetPropA( pMsg->hwnd, "PROP_OLEMenuDescriptor" );
if ( !hOleMenu )
goto NEXTHOOK;
/* Get the menu descriptor */
pOleMenuDescriptor = (OleMenuDescriptor *) 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 */
SendMessageA( pOleMenuDescriptor->hwndActiveObject,
pMsg->message, pMsg->wParam, pMsg->lParam );
goto NEXTHOOK;
}
2002-06-01 01:06:46 +02:00
case WM_INITMENUPOPUP:
{
/* Save the state for whether this is a server owned menu */
OLEMenu_SetIsServerMenu( (HMENU)pMsg->wParam, pOleMenuDescriptor );
break;
}
2002-06-01 01:06:46 +02: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-06-01 01:06:46 +02: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 )
{
SendMessageA( pOleMenuDescriptor->hwndActiveObject,
pMsg->message, pMsg->wParam, pMsg->lParam );
}
2002-06-01 01:06:46 +02:00
NEXTHOOK:
if ( pOleMenuDescriptor )
GlobalUnlock( hOleMenu );
2002-06-01 01:06:46 +02: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-06-01 01:06:46 +02: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.
*/
LRESULT CALLBACK OLEMenu_GetMsgProc(INT code, WPARAM wParam, LPARAM lParam)
{
LPMSG pMsg = NULL;
HOLEMENU hOleMenu = 0;
OleMenuDescriptor *pOleMenuDescriptor = NULL;
OleMenuHookItem *pHookItem = NULL;
WORD wCode;
2002-06-01 01:06:46 +02:00
TRACE("%i, %04x, %08x\n", code, wParam, (unsigned)lParam );
/* Check if we're being asked to process a messages */
if ( HC_ACTION != code )
goto NEXTHOOK;
2002-06-01 01:06:46 +02: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 = (HOLEMENU)GetPropA( pMsg->hwnd, "PROP_OLEMenuDescriptor" );
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 = (OleMenuDescriptor *) 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-06-01 01:06:46 +02:00
NEXTHOOK:
if ( pOleMenuDescriptor )
GlobalUnlock( hOleMenu );
2002-06-01 01:06:46 +02: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-06-01 01:06:46 +02:00
/* Pass on the message to the next hooker */
return CallNextHookEx( pHookItem->GetMsg_hHook, code, wParam, lParam );
}
/***********************************************************************
2003-09-11 05:06:25 +02: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 = (OleMenuDescriptor *) 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-06-01 01:06:46 +02:00
pOleMenuDescriptor->hmenuCombined = hmenuCombined;
pOleMenuDescriptor->bIsServerItem = FALSE;
GlobalUnlock( hOleMenu );
2002-06-01 01:06:46 +02:00
return hOleMenu;
}
/***********************************************************************
2003-09-11 05:06:25 +02:00
* OleDestroyMenuDescriptor [OLE32.@]
* Destroy the shared menu descriptor
*/
HRESULT WINAPI OleDestroyMenuDescriptor(
HOLEMENU hmenuDescriptor)
{
if ( hmenuDescriptor )
GlobalFree( hmenuDescriptor );
return S_OK;
}
/***********************************************************************
2003-09-11 05:06:25 +02:00
* OleSetMenuDescriptor [OLE32.@]
2005-11-09 11:30:57 +01:00
* Installs or removes OLE dispatching code for the containers frame window.
2002-06-01 01:06:46 +02:00
*
2005-11-09 11:30:57 +01: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 11:30:57 +01:00
* RETURNS
* S_OK - menu installed correctly
* E_FAIL, E_INVALIDARG, E_UNEXPECTED - failure
2005-11-09 11:30:57 +01: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(
HOLEMENU hOleMenu,
HWND hwndFrame,
HWND hwndActiveObject,
LPOLEINPLACEFRAME lpFrame,
LPOLEINPLACEACTIVEOBJECT lpActiveObject)
{
OleMenuDescriptor *pOleMenuDescriptor = NULL;
/* Check args */
if ( !hwndFrame || (hOleMenu && !hwndActiveObject) )
return E_INVALIDARG;
if ( lpFrame || lpActiveObject )
{
FIXME("(%p, %p, %p, %p, %p), Context sensitive help filtering not implemented!\n",
hOleMenu,
hwndFrame,
hwndActiveObject,
lpFrame,
lpActiveObject);
}
/* 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.
*/
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;
2002-06-01 01:06:46 +02:00
/* Get the menu descriptor */
pOleMenuDescriptor = (OleMenuDescriptor *) GlobalLock( hOleMenu );
if ( !pOleMenuDescriptor )
return E_UNEXPECTED;
/* Update the menu descriptor */
pOleMenuDescriptor->hwndFrame = hwndFrame;
pOleMenuDescriptor->hwndActiveObject = hwndActiveObject;
GlobalUnlock( hOleMenu );
pOleMenuDescriptor = NULL;
2002-06-01 01:06:46 +02:00
/* Add a menu descriptor windows property to the frame window */
SetPropA( hwndFrame, "PROP_OLEMenuDescriptor", 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-06-01 01:06:46 +02:00
/* Remove the menu descriptor property from the frame window */
RemovePropA( hwndFrame, "PROP_OLEMenuDescriptor" );
}
2002-06-01 01:06:46 +02:00
return S_OK;
}
2001-04-16 20:58:09 +02:00
/******************************************************************************
2003-09-11 05:06:25 +02:00
* IsAccelerator [OLE32.@]
2001-04-16 20:58:09 +02: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 20:58:09 +02:00
int i;
if(!lpMsg) return FALSE;
if (!hAccel)
2001-04-16 20:58:09 +02:00
{
WARN_(accel)("NULL accel handle\n");
2001-04-16 20:58:09 +02:00
return FALSE;
}
if((lpMsg->message != WM_KEYDOWN &&
lpMsg->message != WM_KEYUP &&
lpMsg->message != WM_SYSKEYDOWN &&
lpMsg->message != WM_SYSKEYUP &&
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 20:58:09 +02:00
2002-11-22 05:43:02 +01:00
TRACE_(accel)("hAccel=%p, cAccelEntries=%d,"
"msg->hwnd=%p, msg->message=%04x, wParam=%08x, lParam=%08lx\n",
2001-04-16 20:58:09 +02: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", lpMsg->wParam & 0xff);
goto found;
}
}
else
{
if(lpAccelTbl[i].fVirt & FVIRTKEY)
{
INT mask = 0;
TRACE_(accel)("found accel for virt_key %04x (scan %04x)\n",
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", lpMsg->wParam & 0xff);
goto found;
}
}
}
}
2002-06-01 01:06:46 +02:00
}
2001-04-16 20:58:09 +02:00
WARN_(accel)("couldn't translate accelerator key\n");
HeapFree(GetProcessHeap(), 0, lpAccelTbl);
2001-04-16 20:58:09 +02:00
return FALSE;
found:
if(lpwCmd) *lpwCmd = lpAccelTbl[i].cmd;
HeapFree(GetProcessHeap(), 0, lpAccelTbl);
2001-04-16 20:58:09 +02:00
return TRUE;
}
/***********************************************************************
2003-09-11 05:06:25 +02:00
* ReleaseStgMedium [OLE32.@]
*/
void WINAPI ReleaseStgMedium(
STGMEDIUM* pmedium)
{
switch (pmedium->tymed)
{
case TYMED_HGLOBAL:
{
2002-06-01 01:06:46 +02: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-06-01 01:06:46 +02: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-06-01 01:06:46 +02:00
if ( (pmedium->pUnkForRelease==0) &&
(pmedium->u.hBitmap!=0) )
DeleteObject(pmedium->u.hBitmap);
break;
}
case TYMED_MFPICT:
{
2002-06-01 01:06:46 +02: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-06-01 01:06:46 +02: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()
{
WNDCLASSA wndClass;
ZeroMemory (&wndClass, sizeof(WNDCLASSA));
wndClass.style = CS_GLOBALCLASS;
2004-12-06 12:51:29 +01:00
wndClass.lpfnWndProc = OLEDD_DragTrackerWindowProc;
wndClass.cbClsExtra = 0;
wndClass.cbWndExtra = sizeof(TrackerWindowInfo*);
wndClass.hCursor = 0;
wndClass.hbrBackground = 0;
wndClass.lpszClassName = OLEDD_DRAGTRACKERCLASS;
2002-06-01 01:06:46 +02:00
RegisterClassA (&wndClass);
}
/***
* OLEDD_UnInitialize()
*
* Releases the OLE drag and drop data structures.
*/
static void OLEDD_UnInitialize()
{
/*
* Simply empty the list.
*/
while (targetListHead!=NULL)
{
RevokeDragDrop(targetListHead->hwndTarget);
}
}
/***
* OLEDD_InsertDropTarget()
*
* Insert the target node in the tree.
*/
static void OLEDD_InsertDropTarget(DropTargetNode* nodeToAdd)
{
DropTargetNode* curNode;
DropTargetNode** parentNodeLink;
/*
* Iterate the tree to find the insertion point.
*/
curNode = targetListHead;
parentNodeLink = &targetListHead;
while (curNode!=NULL)
{
if (nodeToAdd->hwndTarget<curNode->hwndTarget)
{
/*
* If the node we want to add has a smaller HWND, go left
*/
parentNodeLink = &curNode->prevDropTarget;
curNode = curNode->prevDropTarget;
}
else if (nodeToAdd->hwndTarget>curNode->hwndTarget)
{
/*
* If the node we want to add has a larger HWND, go right
*/
parentNodeLink = &curNode->nextDropTarget;
curNode = curNode->nextDropTarget;
}
else
{
/*
* The item was found in the list. It shouldn't have been there
*/
assert(FALSE);
return;
}
}
/*
* If we get here, we have found a spot for our item. The parentNodeLink
2002-06-01 01:06:46 +02:00
* pointer points to the pointer that we have to modify.
* The curNode should be NULL. We just have to establish the link and Voila!
*/
assert(curNode==NULL);
assert(parentNodeLink!=NULL);
assert(*parentNodeLink==NULL);
*parentNodeLink=nodeToAdd;
}
/***
* OLEDD_ExtractDropTarget()
*
* Removes the target node from the tree.
*/
static DropTargetNode* OLEDD_ExtractDropTarget(HWND hwndOfTarget)
{
DropTargetNode* curNode;
DropTargetNode** parentNodeLink;
/*
* Iterate the tree to find the insertion point.
*/
curNode = targetListHead;
parentNodeLink = &targetListHead;
while (curNode!=NULL)
{
if (hwndOfTarget<curNode->hwndTarget)
{
/*
* If the node we want to add has a smaller HWND, go left
*/
parentNodeLink = &curNode->prevDropTarget;
curNode = curNode->prevDropTarget;
}
else if (hwndOfTarget>curNode->hwndTarget)
{
/*
* If the node we want to add has a larger HWND, go right
*/
parentNodeLink = &curNode->nextDropTarget;
curNode = curNode->nextDropTarget;
}
else
{
/*
2002-06-01 01:06:46 +02:00
* The item was found in the list. Detach it from it's parent and
* re-insert it's kids in the tree.
*/
assert(parentNodeLink!=NULL);
assert(*parentNodeLink==curNode);
/*
* We arbitrately re-attach the left sub-tree to the parent.
*/
*parentNodeLink = curNode->prevDropTarget;
/*
* And we re-insert the right subtree
*/
if (curNode->nextDropTarget!=NULL)
{
OLEDD_InsertDropTarget(curNode->nextDropTarget);
}
/*
* The node we found is still a valid node once we complete
* the unlinking of the kids.
*/
curNode->nextDropTarget=NULL;
curNode->prevDropTarget=NULL;
return curNode;
}
}
/*
* If we get here, the node is not in the tree
*/
return NULL;
}
/***
* OLEDD_FindDropTarget()
*
* Finds information about the drop target.
*/
static DropTargetNode* OLEDD_FindDropTarget(HWND hwndOfTarget)
{
DropTargetNode* curNode;
/*
* Iterate the tree to find the HWND value.
*/
curNode = targetListHead;
while (curNode!=NULL)
{
if (hwndOfTarget<curNode->hwndTarget)
{
/*
* If the node we want to add has a smaller HWND, go left
*/
curNode = curNode->prevDropTarget;
}
else if (hwndOfTarget>curNode->hwndTarget)
{
/*
* If the node we want to add has a larger HWND, go right
*/
curNode = curNode->nextDropTarget;
}
else
{
/*
* The item was found in the list.
*/
return curNode;
}
}
/*
* If we get here, the item is not in the list
*/
return NULL;
}
/***
* 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-06-01 01:06:46 +02:00
HWND hwnd,
UINT uMsg,
2002-06-01 01:06:46 +02:00
WPARAM wParam,
LPARAM lParam)
{
switch (uMsg)
{
case WM_CREATE:
{
LPCREATESTRUCTA createStruct = (LPCREATESTRUCTA)lParam;
2002-06-01 01:06:46 +02:00
SetWindowLongA(hwnd, 0, (LONG)createStruct->lpCreateParams);
SetTimer(hwnd, DRAG_TIMER_ID, 50, NULL);
break;
}
case WM_TIMER:
case WM_MOUSEMOVE:
{
OLEDD_TrackMouseMove((TrackerWindowInfo*)GetWindowLongA(hwnd, 0));
break;
}
case WM_LBUTTONUP:
case WM_MBUTTONUP:
case WM_RBUTTONUP:
case WM_LBUTTONDOWN:
case WM_MBUTTONDOWN:
case WM_RBUTTONDOWN:
{
OLEDD_TrackStateChange((TrackerWindowInfo*)GetWindowLongA(hwnd, 0));
break;
}
case WM_DESTROY:
{
KillTimer(hwnd, DRAG_TIMER_ID);
break;
}
}
/*
* This is a window proc after all. Let's call the default.
*/
return DefWindowProcA (hwnd, uMsg, wParam, lParam);
}
/***
* OLEDD_TrackMouseMove()
*
* This method is invoked while a drag and drop operation is in effect.
* it will generate the appropriate callbacks in the drop source
* and drop target. It will also provide the expected feedback to
* the user.
*
* params:
* trackerInfo - Pointer to the structure identifying the
* drag & drop operation that is currently
* active.
*/
static void OLEDD_TrackMouseMove(TrackerWindowInfo* trackerInfo)
{
HWND hwndNewTarget = 0;
HRESULT hr = S_OK;
POINT pt;
/*
* Get the handle of the window under the mouse
*/
pt.x = trackerInfo->curMousePos.x;
pt.y = trackerInfo->curMousePos.y;
hwndNewTarget = WindowFromPoint(pt);
1999-05-01 12:10:30 +02:00
/*
* Every time, we re-initialize the effects passed to the
* IDropTarget to the effects allowed by the source.
*/
*trackerInfo->pdwEffect = trackerInfo->dwOKEffect;
/*
* If we are hovering over the same target as before, send the
* DragOver notification
*/
2002-06-01 01:06:46 +02:00
if ( (trackerInfo->curDragTarget != 0) &&
(trackerInfo->curTargetHWND == hwndNewTarget) )
{
IDropTarget_DragOver(trackerInfo->curDragTarget,
trackerInfo->dwKeyState,
trackerInfo->curMousePos,
trackerInfo->pdwEffect);
}
else
1999-05-01 12:10:30 +02:00
{
DropTargetNode* newDropTargetNode = 0;
2002-06-01 01:06:46 +02:00
/*
* If we changed window, we have to notify our old target and check for
* the new one.
*/
if (trackerInfo->curDragTarget!=0)
{
IDropTarget_DragLeave(trackerInfo->curDragTarget);
}
2002-06-01 01:06:46 +02:00
/*
* Make sure we're hovering over a window.
*/
if (hwndNewTarget!=0)
{
/*
* Find-out if there is a drag target under the mouse
*/
HWND nexttar = hwndNewTarget;
trackerInfo->curTargetHWND = hwndNewTarget;
do {
newDropTargetNode = OLEDD_FindDropTarget(nexttar);
} while (!newDropTargetNode && (nexttar = GetParent(nexttar)) != 0);
if(nexttar) hwndNewTarget = nexttar;
trackerInfo->curDragTargetHWND = hwndNewTarget;
trackerInfo->curDragTarget = newDropTargetNode ? newDropTargetNode->dropTarget : 0;
2002-06-01 01:06:46 +02:00
/*
* If there is, notify it that we just dragged-in
*/
if (trackerInfo->curDragTarget!=0)
{
IDropTarget_DragEnter(trackerInfo->curDragTarget,
trackerInfo->dataObject,
trackerInfo->dwKeyState,
trackerInfo->curMousePos,
trackerInfo->pdwEffect);
}
}
else
{
/*
* The mouse is not over a window so we don't track anything.
*/
trackerInfo->curDragTargetHWND = 0;
trackerInfo->curTargetHWND = 0;
trackerInfo->curDragTarget = 0;
}
}
/*
2002-06-01 01:06:46 +02:00
* Now that we have done that, we have to tell the source to give
* us feedback on the work being done by the target. If we don't
* have a target, simulate no effect.
*/
if (trackerInfo->curDragTarget==0)
{
*trackerInfo->pdwEffect = DROPEFFECT_NONE;
}
hr = IDropSource_GiveFeedback(trackerInfo->dropSource,
*trackerInfo->pdwEffect);
/*
* When we ask for feedback from the drop source, sometimes it will
* do all the necessary work and sometimes it will not handle it
* when that's the case, we must display the standard drag and drop
* cursors.
*/
if (hr==DRAGDROP_S_USEDEFAULTCURSORS)
{
2000-11-05 21:16:15 +01:00
if (*trackerInfo->pdwEffect & DROPEFFECT_MOVE)
{
2000-11-05 21:16:15 +01:00
SetCursor(LoadCursorA(OLE32_hInstance, MAKEINTRESOURCEA(1)));
}
else if (*trackerInfo->pdwEffect & DROPEFFECT_COPY)
{
SetCursor(LoadCursorA(OLE32_hInstance, MAKEINTRESOURCEA(2)));
}
else if (*trackerInfo->pdwEffect & DROPEFFECT_LINK)
{
SetCursor(LoadCursorA(OLE32_hInstance, MAKEINTRESOURCEA(3)));
}
else
{
2000-11-05 21:16:15 +01:00
SetCursor(LoadCursorA(OLE32_hInstance, MAKEINTRESOURCEA(0)));
}
2002-06-01 01:06:46 +02:00
}
}
/***
* OLEDD_TrackStateChange()
*
* This method is invoked while a drag and drop operation is in effect.
* It is used to notify the drop target/drop source callbacks when
* the state of the keyboard or mouse button change.
*
* params:
* trackerInfo - Pointer to the structure identifying the
* drag & drop operation that is currently
* active.
*/
static void OLEDD_TrackStateChange(TrackerWindowInfo* trackerInfo)
{
/*
* Ask the drop source what to do with the operation.
*/
trackerInfo->returnValue = IDropSource_QueryContinueDrag(
trackerInfo->dropSource,
2002-06-01 01:06:46 +02:00
trackerInfo->escPressed,
trackerInfo->dwKeyState);
2002-06-01 01:06:46 +02:00
/*
* All the return valued will stop the operation except the S_OK
* return value.
*/
if (trackerInfo->returnValue!=S_OK)
{
/*
* Make sure the message loop in DoDragDrop stops
*/
trackerInfo->trackingDone = TRUE;
/*
2002-06-01 01:06:46 +02:00
* Release the mouse in case the drop target decides to show a popup
* or a menu or something.
*/
ReleaseCapture();
2002-06-01 01:06:46 +02:00
/*
2002-06-01 01:06:46 +02:00
* If we end-up over a target, drop the object in the target or
* inform the target that the operation was cancelled.
*/
if (trackerInfo->curDragTarget!=0)
{
switch (trackerInfo->returnValue)
{
/*
2002-06-01 01:06:46 +02:00
* If the source wants us to complete the operation, we tell
* the drop target that we just dropped the object in it.
*/
case DRAGDROP_S_DROP:
{
IDropTarget_Drop(trackerInfo->curDragTarget,
trackerInfo->dataObject,
trackerInfo->dwKeyState,
trackerInfo->curMousePos,
trackerInfo->pdwEffect);
break;
}
/*
2002-06-01 01:06:46 +02:00
* If the source told us that we should cancel, fool the drop
* target by telling it that the mouse left it's window.
2002-06-01 01:06:46 +02:00
* Also set the drop effect to "NONE" in case the application
* ignores the result of DoDragDrop.
*/
case DRAGDROP_S_CANCEL:
IDropTarget_DragLeave(trackerInfo->curDragTarget);
*trackerInfo->pdwEffect = DROPEFFECT_NONE;
break;
}
}
}
}
/***
* 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()
{
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_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-06-01 01:06:46 +02: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-06-01 01:06:46 +02:00
HKEY regKey,
DWORD* pdwValue)
{
char buffer[20];
DWORD dwKeyType;
DWORD cbData = 20;
LONG lres;
lres = RegQueryValueExA(regKey,
"",
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 = (DWORD)strtoul(buffer, NULL, 10);
break;
}
}
}
2003-06-27 06:03:40 +02:00
/******************************************************************************
2003-09-11 05:06:25 +02:00
* OleDraw (OLE32.@)
2003-06-27 06:03:40 +02: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 lprcBounds)
{
HRESULT hres;
IViewObject *viewobject;
hres = IUnknown_QueryInterface(pUnk,
&IID_IViewObject,
2004-05-21 22:52:57 +02:00
(void**)&viewobject);
2003-06-27 06:03:40 +02:00
if (SUCCEEDED(hres))
{
RECTL rectl;
rectl.left = lprcBounds->left;
rectl.right = lprcBounds->right;
rectl.top = lprcBounds->top;
rectl.bottom = lprcBounds->bottom;
hres = IViewObject_Draw(viewobject, dwAspect, -1, 0, 0, 0, hdcDraw, &rectl, 0, 0, 0);
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, hres1;
IUnknown * pUnk = NULL;
FIXME("\n\t%s\n\t%s semi-stub!\n", debugstr_guid(rclsid), debugstr_guid(riid));
2004-05-21 22:52:57 +02:00
if (SUCCEEDED((hres = CoCreateInstance(rclsid, 0, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER|CLSCTX_LOCAL_SERVER , riid, (LPVOID*)&pUnk))))
{
if (pClientSite)
{
IOleObject * pOE;
IPersistStorage * pPS;
2004-05-21 22:52:57 +02:00
if (SUCCEEDED((hres = IUnknown_QueryInterface( pUnk, &IID_IOleObject, (LPVOID*)&pOE))))
{
TRACE("trying to set clientsite %p\n", pClientSite);
hres1 = IOleObject_SetClientSite(pOE, pClientSite);
TRACE("-- result 0x%08lx\n", hres1);
IOleObject_Release(pOE);
}
2004-05-21 22:52:57 +02:00
if (SUCCEEDED((hres = IUnknown_QueryInterface( pUnk, &IID_IPersistStorage, (LPVOID*)&pPS))))
{
TRACE("trying to set stg %p\n", pStg);
hres1 = IPersistStorage_InitNew(pPS, pStg);
TRACE("-- result 0x%08lx\n", hres1);
IPersistStorage_Release(pPS);
}
}
}
*ppvObj = pUnk;
2005-11-10 13:14:56 +01:00
TRACE("-- %p\n", pUnk);
return hres;
}
/******************************************************************************
* 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, (strlenW(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)
{
FIXME("(%p,%p) : stub\n",pStg,pClsidNew);
return E_NOTIMPL;
}
2005-09-20 13:36:56 +02:00
/******************************************************************************
* OleIsRunning [OLE32.@]
*/
BOOL WINAPI OleIsRunning(LPOLEOBJECT pObject)
{
IRunnableObject *pRunnable;
HRESULT hr;
BOOL running;
TRACE("(%p)\n", pObject);
hr = IOleObject_QueryInterface(pObject, &IID_IRunnableObject, (void **)&pRunnable);
if (FAILED(hr))
return FALSE;
running = IRunnableObject_IsRunning(pRunnable);
IRunnableObject_Release(pRunnable);
return running;
}
/***********************************************************************
* OLE_FreeClipDataArray [internal]
*
* NOTES:
* frees the data associated with an array of CLIPDATAs
*/
static void OLE_FreeClipDataArray(ULONG count, CLIPDATA * pClipDataArray)
{
ULONG i;
for (i = 0; i < count; i++)
if (pClipDataArray[i].pClipData)
CoTaskMemFree(pClipDataArray[i].pClipData);
}
/***********************************************************************
* PropSysAllocString [OLE32.@]
* NOTES:
* Basically a copy of SysAllocStringLen.
*/
BSTR WINAPI PropSysAllocString(LPCOLESTR str)
{
DWORD bufferSize;
DWORD* newBuffer;
WCHAR* stringBuffer;
int len;
if (!str) return 0;
len = lstrlenW(str);
/*
* Find the length of the buffer passed-in in bytes.
*/
bufferSize = len * sizeof (WCHAR);
/*
* Allocate a new buffer to hold the string.
* don't forget to keep an empty spot at the beginning of the
* buffer for the character count and an extra character at the
* end for the NULL.
*/
newBuffer = HeapAlloc(GetProcessHeap(), 0,
bufferSize + sizeof(WCHAR) + sizeof(DWORD));
/*
* If the memory allocation failed, return a null pointer.
*/
if (newBuffer==0)
return 0;
/*
* Copy the length of the string in the placeholder.
*/
*newBuffer = bufferSize;
/*
* Skip the byte count.
*/
newBuffer++;
/*
* Copy the information in the buffer.
* Since it is valid to pass a NULL pointer here, we'll initialize the
* buffer to nul if it is the case.
*/
if (str != 0)
memcpy(newBuffer, str, bufferSize);
else
memset(newBuffer, 0, bufferSize);
/*
* Make sure that there is a nul character at the end of the
* string.
*/
stringBuffer = (WCHAR*)newBuffer;
stringBuffer[len] = L'\0';
return (LPWSTR)stringBuffer;
}
/***********************************************************************
* PropSysFreeString [OLE32.@]
* NOTES
* Copy of SysFreeString.
*/
void WINAPI PropSysFreeString(LPOLESTR str)
{
DWORD* bufferPointer;
/* NULL is a valid parameter */
if(!str) return;
/*
* We have to be careful when we free a BSTR pointer, it points to
* the beginning of the string but it skips the byte count contained
* before the string.
*/
bufferPointer = (DWORD*)str;
bufferPointer--;
/*
* Free the memory from its "real" origin.
*/
HeapFree(GetProcessHeap(), 0, bufferPointer);
}
/******************************************************************************
* Check if a PROPVARIANT's type is valid.
*/
static inline HRESULT PROPVARIANT_ValidateType(VARTYPE vt)
{
switch (vt)
{
case VT_EMPTY:
case VT_NULL:
case VT_I2:
case VT_I4:
case VT_R4:
case VT_R8:
case VT_CY:
case VT_DATE:
case VT_BSTR:
case VT_ERROR:
case VT_BOOL:
case VT_UI1:
case VT_UI2:
case VT_UI4:
case VT_I8:
case VT_UI8:
case VT_LPSTR:
case VT_LPWSTR:
case VT_FILETIME:
case VT_BLOB:
case VT_STREAM:
case VT_STORAGE:
case VT_STREAMED_OBJECT:
case VT_STORED_OBJECT:
case VT_BLOB_OBJECT:
case VT_CF:
case VT_CLSID:
case VT_I2|VT_VECTOR:
case VT_I4|VT_VECTOR:
case VT_R4|VT_VECTOR:
case VT_R8|VT_VECTOR:
case VT_CY|VT_VECTOR:
case VT_DATE|VT_VECTOR:
case VT_BSTR|VT_VECTOR:
case VT_ERROR|VT_VECTOR:
case VT_BOOL|VT_VECTOR:
case VT_VARIANT|VT_VECTOR:
case VT_UI1|VT_VECTOR:
case VT_UI2|VT_VECTOR:
case VT_UI4|VT_VECTOR:
case VT_I8|VT_VECTOR:
case VT_UI8|VT_VECTOR:
case VT_LPSTR|VT_VECTOR:
case VT_LPWSTR|VT_VECTOR:
case VT_FILETIME|VT_VECTOR:
case VT_CF|VT_VECTOR:
case VT_CLSID|VT_VECTOR:
return S_OK;
}
WARN("Bad type %d\n", vt);
return STG_E_INVALIDPARAMETER;
}
/***********************************************************************
* PropVariantClear [OLE32.@]
*/
HRESULT WINAPI PropVariantClear(PROPVARIANT * pvar) /* [in/out] */
{
HRESULT hr;
TRACE("(%p)\n", pvar);
if (!pvar)
return S_OK;
hr = PROPVARIANT_ValidateType(pvar->vt);
if (FAILED(hr))
return hr;
switch(pvar->vt)
{
case VT_STREAM:
case VT_STREAMED_OBJECT:
case VT_STORAGE:
case VT_STORED_OBJECT:
if (pvar->u.pStream)
IUnknown_Release(pvar->u.pStream);
break;
case VT_CLSID:
case VT_LPSTR:
case VT_LPWSTR:
/* pick an arbitary typed pointer - we don't care about the type
* as we are just freeing it */
CoTaskMemFree(pvar->u.puuid);
break;
case VT_BLOB:
case VT_BLOB_OBJECT:
CoTaskMemFree(pvar->u.blob.pBlobData);
break;
case VT_BSTR:
if (pvar->u.bstrVal)
PropSysFreeString(pvar->u.bstrVal);
break;
case VT_CF:
if (pvar->u.pclipdata)
{
OLE_FreeClipDataArray(1, pvar->u.pclipdata);
CoTaskMemFree(pvar->u.pclipdata);
}
break;
default:
if (pvar->vt & VT_VECTOR)
{
ULONG i;
switch (pvar->vt & ~VT_VECTOR)
{
case VT_VARIANT:
FreePropVariantArray(pvar->u.capropvar.cElems, pvar->u.capropvar.pElems);
break;
case VT_CF:
OLE_FreeClipDataArray(pvar->u.caclipdata.cElems, pvar->u.caclipdata.pElems);
break;
case VT_BSTR:
for (i = 0; i < pvar->u.cabstr.cElems; i++)
PropSysFreeString(pvar->u.cabstr.pElems[i]);
break;
case VT_LPSTR:
for (i = 0; i < pvar->u.calpstr.cElems; i++)
CoTaskMemFree(pvar->u.calpstr.pElems[i]);
break;
case VT_LPWSTR:
for (i = 0; i < pvar->u.calpwstr.cElems; i++)
CoTaskMemFree(pvar->u.calpwstr.pElems[i]);
break;
}
if (pvar->vt & ~VT_VECTOR)
{
/* pick an arbitary VT_VECTOR structure - they all have the same
* memory layout */
CoTaskMemFree(pvar->u.capropvar.pElems);
}
}
else
WARN("Invalid/unsupported type %d\n", pvar->vt);
}
ZeroMemory(pvar, sizeof(*pvar));
return S_OK;
}
/***********************************************************************
* PropVariantCopy [OLE32.@]
*/
HRESULT WINAPI PropVariantCopy(PROPVARIANT *pvarDest, /* [out] */
const PROPVARIANT *pvarSrc) /* [in] */
{
ULONG len;
HRESULT hr;
TRACE("(%p, %p)\n", pvarDest, pvarSrc);
hr = PROPVARIANT_ValidateType(pvarSrc->vt);
if (FAILED(hr))
return hr;
/* this will deal with most cases */
CopyMemory(pvarDest, pvarSrc, sizeof(*pvarDest));
switch(pvarSrc->vt)
{
case VT_STREAM:
case VT_STREAMED_OBJECT:
case VT_STORAGE:
case VT_STORED_OBJECT:
IUnknown_AddRef((LPUNKNOWN)pvarDest->u.pStream);
break;
case VT_CLSID:
pvarDest->u.puuid = CoTaskMemAlloc(sizeof(CLSID));
CopyMemory(pvarDest->u.puuid, pvarSrc->u.puuid, sizeof(CLSID));
break;
case VT_LPSTR:
len = strlen(pvarSrc->u.pszVal);
pvarDest->u.pszVal = CoTaskMemAlloc((len+1)*sizeof(CHAR));
CopyMemory(pvarDest->u.pszVal, pvarSrc->u.pszVal, (len+1)*sizeof(CHAR));
break;
case VT_LPWSTR:
len = lstrlenW(pvarSrc->u.pwszVal);
pvarDest->u.pwszVal = CoTaskMemAlloc((len+1)*sizeof(WCHAR));
CopyMemory(pvarDest->u.pwszVal, pvarSrc->u.pwszVal, (len+1)*sizeof(WCHAR));
break;
case VT_BLOB:
case VT_BLOB_OBJECT:
if (pvarSrc->u.blob.pBlobData)
{
len = pvarSrc->u.blob.cbSize;
pvarDest->u.blob.pBlobData = CoTaskMemAlloc(len);
CopyMemory(pvarDest->u.blob.pBlobData, pvarSrc->u.blob.pBlobData, len);
}
break;
case VT_BSTR:
pvarDest->u.bstrVal = PropSysAllocString(pvarSrc->u.bstrVal);
break;
case VT_CF:
if (pvarSrc->u.pclipdata)
{
len = pvarSrc->u.pclipdata->cbSize - sizeof(pvarSrc->u.pclipdata->ulClipFmt);
CoTaskMemAlloc(len);
CopyMemory(pvarDest->u.pclipdata->pClipData, pvarSrc->u.pclipdata->pClipData, len);
}
break;
default:
if (pvarSrc->vt & VT_VECTOR)
{
int elemSize;
ULONG i;
switch(pvarSrc->vt & ~VT_VECTOR)
{
case VT_I1: elemSize = sizeof(pvarSrc->u.cVal); break;
case VT_UI1: elemSize = sizeof(pvarSrc->u.bVal); break;
case VT_I2: elemSize = sizeof(pvarSrc->u.iVal); break;
case VT_UI2: elemSize = sizeof(pvarSrc->u.uiVal); break;
case VT_BOOL: elemSize = sizeof(pvarSrc->u.boolVal); break;
case VT_I4: elemSize = sizeof(pvarSrc->u.lVal); break;
case VT_UI4: elemSize = sizeof(pvarSrc->u.ulVal); break;
case VT_R4: elemSize = sizeof(pvarSrc->u.fltVal); break;
case VT_R8: elemSize = sizeof(pvarSrc->u.dblVal); break;
case VT_ERROR: elemSize = sizeof(pvarSrc->u.scode); break;
case VT_I8: elemSize = sizeof(pvarSrc->u.hVal); break;
case VT_UI8: elemSize = sizeof(pvarSrc->u.uhVal); break;
case VT_CY: elemSize = sizeof(pvarSrc->u.cyVal); break;
case VT_DATE: elemSize = sizeof(pvarSrc->u.date); break;
case VT_FILETIME: elemSize = sizeof(pvarSrc->u.filetime); break;
case VT_CLSID: elemSize = sizeof(*pvarSrc->u.puuid); break;
case VT_CF: elemSize = sizeof(*pvarSrc->u.pclipdata); break;
case VT_BSTR: elemSize = sizeof(*pvarSrc->u.bstrVal); break;
case VT_LPSTR: elemSize = sizeof(*pvarSrc->u.pszVal); break;
case VT_LPWSTR: elemSize = sizeof(*pvarSrc->u.pwszVal); break;
case VT_VARIANT:
default:
FIXME("Invalid element type: %ul\n", pvarSrc->vt & ~VT_VECTOR);
return E_INVALIDARG;
}
len = pvarSrc->u.capropvar.cElems;
pvarDest->u.capropvar.pElems = CoTaskMemAlloc(len * elemSize);
if (pvarSrc->vt == (VT_VECTOR | VT_VARIANT))
{
for (i = 0; i < len; i++)
PropVariantCopy(&pvarDest->u.capropvar.pElems[i], &pvarSrc->u.capropvar.pElems[i]);
}
else if (pvarSrc->vt == (VT_VECTOR | VT_CF))
{
FIXME("Copy clipformats\n");
}
else if (pvarSrc->vt == (VT_VECTOR | VT_BSTR))
{
for (i = 0; i < len; i++)
pvarDest->u.cabstr.pElems[i] = PropSysAllocString(pvarSrc->u.cabstr.pElems[i]);
}
else if (pvarSrc->vt == (VT_VECTOR | VT_LPSTR))
{
size_t strLen;
for (i = 0; i < len; i++)
{
strLen = lstrlenA(pvarSrc->u.calpstr.pElems[i]) + 1;
pvarDest->u.calpstr.pElems[i] = CoTaskMemAlloc(strLen);
memcpy(pvarDest->u.calpstr.pElems[i],
pvarSrc->u.calpstr.pElems[i], strLen);
}
}
else if (pvarSrc->vt == (VT_VECTOR | VT_LPWSTR))
{
size_t strLen;
for (i = 0; i < len; i++)
{
strLen = (lstrlenW(pvarSrc->u.calpwstr.pElems[i]) + 1) *
sizeof(WCHAR);
pvarDest->u.calpstr.pElems[i] = CoTaskMemAlloc(strLen);
memcpy(pvarDest->u.calpstr.pElems[i],
pvarSrc->u.calpstr.pElems[i], strLen);
}
}
else
CopyMemory(pvarDest->u.capropvar.pElems, pvarSrc->u.capropvar.pElems, len * elemSize);
}
else
WARN("Invalid/unsupported type %d\n", pvarSrc->vt);
}
return S_OK;
}
/***********************************************************************
* FreePropVariantArray [OLE32.@]
*/
HRESULT WINAPI FreePropVariantArray(ULONG cVariants, /* [in] */
PROPVARIANT *rgvars) /* [in/out] */
{
ULONG i;
TRACE("(%lu, %p)\n", cVariants, rgvars);
for(i = 0; i < cVariants; i++)
PropVariantClear(&rgvars[i]);
return S_OK;
}
2000-12-19 04:38:05 +01:00
/******************************************************************************
2003-09-11 05:06:25 +02:00
* DllDebugObjectRPCHook (OLE32.@)
2000-12-19 04:38:05 +01:00
* turns on and off internal debugging, pointer is only used on macintosh
*/
BOOL WINAPI DllDebugObjectRPCHook(BOOL b, void *dummy)
{
FIXME("stub\n");
return TRUE;
}