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
|
|
|
|
*
|
2005-04-13 13:13:55 +02:00
|
|
|
* Copyright 1995 Martin von Loewis
|
|
|
|
* Copyright 1999 Francis Beaudet
|
|
|
|
* Copyright 1999 Noel Borthwick
|
|
|
|
* Copyright 1999, 2000 Marcus Meissner
|
2005-05-17 12:18:59 +02:00
|
|
|
* Copyright 2005 Juan Lang
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
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-24 01:50:18 +02:00
|
|
|
#include "config.h"
|
|
|
|
|
1999-02-13 10:13:49 +01:00
|
|
|
#include <assert.h>
|
1999-05-02 11:27:08 +02:00
|
|
|
#include <stdlib.h>
|
2003-09-06 01:08:26 +02:00
|
|
|
#include <stdarg.h>
|
2000-02-10 20:03:02 +01:00
|
|
|
#include <stdio.h>
|
1999-06-26 16:58:24 +02:00
|
|
|
#include <string.h>
|
1999-02-13 10:13:49 +01:00
|
|
|
|
2004-10-07 05:06:48 +02:00
|
|
|
#define COBJMACROS
|
2003-01-07 21:36:20 +01:00
|
|
|
#define NONAMELESSUNION
|
|
|
|
#define NONAMELESSSTRUCT
|
2004-10-07 05:06:48 +02:00
|
|
|
|
2000-02-10 20:03:02 +01:00
|
|
|
#include "windef.h"
|
2000-09-26 01:30:56 +02:00
|
|
|
#include "winbase.h"
|
2001-07-24 01:50:18 +02:00
|
|
|
#include "winerror.h"
|
2003-09-06 01:08:26 +02:00
|
|
|
#include "wingdi.h"
|
1999-02-28 20:14:33 +01:00
|
|
|
#include "winuser.h"
|
2003-09-06 01:08:26 +02:00
|
|
|
#include "winnls.h"
|
2001-07-24 01:50:18 +02:00
|
|
|
#include "winreg.h"
|
2003-09-06 01:08:26 +02:00
|
|
|
#include "ole2.h"
|
|
|
|
#include "ole2ver.h"
|
2001-07-24 01:50:18 +02:00
|
|
|
|
2005-06-20 15:14:22 +02:00
|
|
|
#include "wine/unicode.h"
|
2005-01-14 18:05:36 +01:00
|
|
|
#include "compobj_private.h"
|
2006-04-25 15:51:09 +02:00
|
|
|
#include "wine/list.h"
|
Release 950620
Mon Jun 19 20:29:50 1995 Alexandre Julliard (julliard@sunsite.unc.edu)
* [debugger/*.c]
Modified debugger to use segmented pointers everywhere.
* [if1632/shell.spec] [if1632/sound.spec] [if1632/user.spec]
Declared all functions that return only 16-bit as 'pascal16'.
* [include/ldt.h] [memory/ldt.c]
Export LDT_EntryToBytes (new) and LDT_BytesToEntry for DPMI.
Maintain a copy of the selector flags, removing the need to make a
system call to retrieve an LDT entry.
* [loader/module.c]
Fixed bug with module file handle cache.
* [loader/ne_resource.c]
Fixed file name bug in NE_AccessResource().
* [loader/resource.c]
Fixed bug in LoadIcon() that caused wrong colors to be used for
the icon mask.
* [loader/signal.c]
Moved instruction emulation to miscemu/instr.c.
* [misc/dos_fs.c] [miscemu/int21.c]
Lots of small fixes, thanks to Morten Welinder.
* [miscemu/dpmi.c]
More complete DPMI emulation.
* [miscemu/instr.c]
Added support for prefixes in instructions to emulate.
* [miscemu/int2f.c]
Use register macros instead of destroying the high part of 32-bit
registers.
* [objects/dc.c]
Fixed bug in GetDCState() that failed to clear the new DC.
* [rc/sysres.rc]
Removed dialogs 11 and 12 that were never used.
* [tools/build.c]
'pascal16' generated functions did not save %dx.
Removed use of %fs to access the stack.
%ds is no longer initialized before calling a 16-bit routine.
* [windows/defwnd.c]
Accept a NULL pointer as window title.
* [windows/mdi.c]
MDICascade: skip iconic windows.
Implemented CalcChildScroll().
* [windows/utility.c]
Fixed MulDiv() for illegal values.
* [windows/win.c]
Fixed X error in CreateWindowEx() when WM_NCCALCSIZE returned
a zero width or height.
Sun Jun 18 22:22:30 MET DST 1995 Fons Botman (botman@inter.nl.net)
* [controls/edit.c]
Fixed "uninitalized" message which -Wall couldnt see to be ok
in EDIT_WriteText.
* [include/debug.h]
Added define for extra checks in API definitions during debugging.
* [loader/ne_image.c]
Added newline in NE_FixupPrologs to avoid long lines.
* [misc/dos_fs.c]
Added extra safety check in DOS_ValidDrive.
* [misc/exec.c]
Fixed definition of ExitWindows.
Sun Jun 18 21:16:08 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Some fixes, mostly for memory management, but also for text selection
and tab postitions. General cleanup. Notepad.exe now works.
* [controls/combo.c]
Fix: the hwnd field of the DRAWITEMSTRUCT should always be that of
the combo box, not the ComboLBox that belongs to it.
* [controls/listbox.c]
Handle itemID field correctly throughout.
* [memory/local.c]
Implemented flag LMEM_ZEROINIT.
LocalReAlloc() could trash the heap. Fixed.
* [objects/font.c]
FONT_MatchFont(): don't get confused by negative widths.
Fixed a segfault in EnumFonts().
* [objects/text.c]
DrawText(): DT_CALCRECT implies DT_NOCLIP.
* [objects/dcvalues.c]
MAKELONG was used with bad parameters in DC_GET_X_Y.
* [windows/dialog.c]
Don't show the dialog if WS_VISIBLE isn't set in the template.
* [windows/utility.c]
UTILITY_convertArgs(): Never pass an expression containing ++ into a
macro...
* [windows/win.c]
SetParent() should unlink the window before changing the parent.
* [windows/message.c]
Don't call timer functions via CallWindowProc(), since it checks
whether hwnd==0 and does not call the function in that case.
* [miscemu/instr.c]
Ignore interrupt 0x3D, for VBRUN300.DLL.
* [misc/commdlg.c]
Don't rely on the itemData field of the DRAWITEMSTRUCT to contain a
pointer to the item text.
* [if1632/relay.c]
Disable OLE and DDEML DLLs by default, since they contain nothing but
stubs anyway. SHELL, COMMDLG and WIN87EM are left enabled, although
some programs may work better without them.
* [multimedia/*.c] [include/multimedia.h] [include/driver.h]
Begun cleaning things up a little. Replaced printfs with dprintf_
macros, made functions static where possible, and some other minor
changes.
Sun Jun 11 23:19:10 1995 Martin von Loewis <martin@informatik.hu-berlin.de>
* [debugger/dbg.y][debugger/dbg.l]
Removed special handling for FILE_IDENTIFER, because it caused
problems with x/<format> statements.
* [debugger/info.c]
Use SC_ESP instead of SC_EIP for stack dump.
* [misc/compobj.c][if1632/compobj.spec]
CoBuildVersion, CoInitialize, CoUninitialize: new functions
* [misc/ole2.c][if1632/ole2.spec][misc/Imakefile][include/ole2.h]
New files ole2.c, ole2.h
OleBuildVersion, OleInitialize, OleUninitialize: new functions
* [if1632/ole2disp.spec]
Added missing ordinals above 109
* [misc/ole2nls.c][if1632/ole2nls.spec][include/winnls.h]
New file winnls.h
GetLocaleInfoA: new function
* [if1632/shell.spec]
Added FindEnvironmentString as stub
* [misc/olecli.c][if1632/olecli.spec]
OleIsDcMeta: New function
* [objects/font][misc/gdi.spec]
GetKerningPairs: new function
* [misc/shell.c]
ShellExecute: Implemented support for starting programs
* [if1632/user.spec]
Inserted missing relay to GetClipCursor
Sun Jun 11 20:34:47 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Fix a problem with the local heap.
* [include/wintypes.h]
Fixed wrong declarations of CATCHBUF and LPCATCHBUF.
* [include/mdi.h] [windows/mdi.c]
This code still assumed segmented address==linear address. Fixed.
* [include/msdos.h] [misc/dos_fs.c]
The filemask field of the dosdirent structure could be overrun. Fixed.
If you had a file called foobar and a file called foo, trying to
FindFile(foo) could accidentally find file foobar instead. Fixed.
* [misc/file.c]
OpenFile(): Always return the full pathname in ofs->szPathName. This
also fixes GetModuleFilename().
Prevent _lclose() from closing stderr or stdout.
* [misc/profile.c]
Search for .ini files in the path of the current module as well.
(Needed by Lotus Organizer.)
* [loader/task.c] [loader/ne_image.c] [loader/module.c]
[memory/local.c]
Local heaps are now initialized by InitTask() for executables. DLLs
have to call LocalInit() themselves, LocalInit() has to put the
heap at the end of the segment when called with start==0. We no longer
allocate the DGROUP with 64k on startup, but grow the local heap
in LOCAL_GetBlock() when necessary.
* [loader/module.c]
LoadLibrary() should call LoadModule() in all cases, even if the
DLL is already loaded, to ensure that the reference count is correct.
* [loader/ne_image.c]
Some changes to function prolog fixup. Does anyone know exactly how
this is supposed to work? I am only guessing here.
In NE_InitializeDLLs(), initialize the DLLs a module refers to before
the module itself.
* [loader/task.c]
Initialize instance data at the beginning of the DGROUP in InitTask().
* [memory/local.c]
Some fixes for moveable blocks.
* [memory/selector.c]
All the IsBad*Pointer() functions returned exactly the wrong boolean
value in all cases!
* [objects/bitblt.c]
Fixed another null pointer dereference in debugging output.
* [objects/font.c]
Some more recovery possibilities for FONT_MatchFont() if a specified
font does not exist.
* [windows/win.c]
The dialog code may call CreateWindowEx with an integer in windowName.
This happens for static icon controls that expect a resource ID as
the window name. CreateWindowEx() used to crash. Fixed.
* [windows/class.c] [windows/win.c]
Window classes are owned by modules, not instances. Changed
RegisterClass(), UnregisterClass(), GetClassInfo() and CreateWindowEx()
accordingly.
Sat Jun 10 16:10:53 1995 Olaf Flebbe <o.flebbe@science-computing.uni-tuebingen.de>
* [miscemu/int21.c]
clock.exe was displaying incorrect year.
Fri Jun 9 20:36:56 1995 Victor Schneider <tailor@crl.com>
* [include/cursor.h] [windows/cursor.c]
Implemented CreateCursorIconIndirect().
1995-06-20 21:08:12 +02:00
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
#include "wine/debug.h"
|
2001-07-24 01:50:18 +02:00
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
|
|
|
WINE_DECLARE_DEBUG_CHANNEL(accel);
|
1999-04-19 16:56:29 +02:00
|
|
|
|
1999-01-30 14:36:55 +01:00
|
|
|
/******************************************************************************
|
2002-06-01 01:06:46 +02:00
|
|
|
* These are static/global variables and internal data structures that the
|
1999-02-13 10:13:49 +01:00
|
|
|
* OLE module uses to maintain it's state.
|
1999-01-30 14:36:55 +01:00
|
|
|
*/
|
1999-02-13 10:13:49 +01:00
|
|
|
typedef struct tagTrackerWindowInfo
|
|
|
|
{
|
|
|
|
IDataObject* dataObject;
|
|
|
|
IDropSource* dropSource;
|
|
|
|
DWORD dwOKEffect;
|
|
|
|
DWORD* pdwEffect;
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL trackingDone;
|
1999-02-13 10:13:49 +01:00
|
|
|
HRESULT returnValue;
|
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL escPressed;
|
2003-01-28 02:06:20 +01:00
|
|
|
HWND curTargetHWND; /* window the mouse is hovering over */
|
|
|
|
HWND curDragTargetHWND; /* might be a ancestor of curTargetHWND */
|
1999-02-13 10:13:49 +01:00
|
|
|
IDropTarget* curDragTarget;
|
2005-12-12 12:42:53 +01:00
|
|
|
POINTL curMousePos; /* current position of the mouse in screen coordinates */
|
|
|
|
DWORD dwKeyState; /* current state of the shift and ctrl keys and the mouse buttons */
|
1999-02-13 10:13:49 +01:00
|
|
|
} TrackerWindowInfo;
|
1999-01-30 14:36:55 +01:00
|
|
|
|
1999-04-01 13:48:01 +02:00
|
|
|
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 */
|
2000-01-26 03:25:44 +01:00
|
|
|
struct tagOleMenuHookItem *next;
|
1999-04-01 13:48:01 +02:00
|
|
|
} OleMenuHookItem;
|
|
|
|
|
2000-01-26 03:25:44 +01:00
|
|
|
static OleMenuHookItem *hook_list;
|
1999-04-01 13:48:01 +02:00
|
|
|
|
1999-01-30 14:36:55 +01:00
|
|
|
/*
|
|
|
|
* This is the lock count on the OLE library. It is controlled by the
|
|
|
|
* OLEInitialize/OLEUninitialize methods.
|
|
|
|
*/
|
2007-01-07 13:16:15 +01:00
|
|
|
static LONG OLE_moduleLockCount = 0;
|
1999-02-13 10:13:49 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Name of our registered window class.
|
|
|
|
*/
|
2010-04-27 21:41:04 +02:00
|
|
|
static const WCHAR OLEDD_DRAGTRACKERCLASS[] =
|
|
|
|
{'W','i','n','e','D','r','a','g','D','r','o','p','T','r','a','c','k','e','r','3','2',0};
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Name of menu descriptor property.
|
|
|
|
*/
|
|
|
|
static const WCHAR prop_olemenuW[] =
|
|
|
|
{'P','R','O','P','_','O','L','E','M','e','n','u','D','e','s','c','r','i','p','t','o','r',0};
|
1999-02-13 10:13:49 +01:00
|
|
|
|
2010-05-18 00:21:49 +02:00
|
|
|
/* property to store IDropTarget pointer */
|
|
|
|
static const WCHAR prop_oledroptarget[] =
|
|
|
|
{'O','l','e','D','r','o','p','T','a','r','g','e','t','I','n','t','e','r','f','a','c','e',0};
|
|
|
|
|
2010-07-22 14:37:19 +02:00
|
|
|
/* property to store Marshalled IDropTarget pointer */
|
|
|
|
static const WCHAR prop_marshalleddroptarget[] =
|
|
|
|
{'W','i','n','e','M','a','r','s','h','a','l','l','e','d','D','r','o','p','T','a','r','g','e','t',0};
|
|
|
|
|
2010-05-05 23:20:30 +02:00
|
|
|
static const WCHAR clsidfmtW[] =
|
|
|
|
{'C','L','S','I','D','\\','{','%','0','8','x','-','%','0','4','x','-','%','0','4','x','-',
|
|
|
|
'%','0','2','x','%','0','2','x','-','%','0','2','x','%','0','2','x','%','0','2','x','%','0','2','x',
|
|
|
|
'%','0','2','x','%','0','2','x','}','\\',0};
|
|
|
|
|
|
|
|
static const WCHAR emptyW[] = { 0 };
|
|
|
|
|
1999-05-02 11:27:08 +02:00
|
|
|
/******************************************************************************
|
2008-03-01 21:10:38 +01:00
|
|
|
* These are the prototypes of miscellaneous utility methods
|
1999-05-02 11:27:08 +02:00
|
|
|
*/
|
|
|
|
static void OLEUTL_ReadRegistryDWORDValue(HKEY regKey, DWORD* pdwValue);
|
|
|
|
|
1999-04-01 13:48:01 +02:00
|
|
|
/******************************************************************************
|
|
|
|
* These are the prototypes of the utility methods used to manage a shared menu
|
|
|
|
*/
|
2004-12-13 22:19:01 +01:00
|
|
|
static void OLEMenu_Initialize(void);
|
|
|
|
static void OLEMenu_UnInitialize(void);
|
2006-08-02 13:31:26 +02:00
|
|
|
static BOOL OLEMenu_InstallHooks( DWORD tid );
|
|
|
|
static BOOL OLEMenu_UnInstallHooks( DWORD tid );
|
|
|
|
static OleMenuHookItem * OLEMenu_IsHookInstalled( DWORD tid );
|
1999-04-01 13:48:01 +02:00
|
|
|
static BOOL OLEMenu_FindMainMenuIndex( HMENU hMainMenu, HMENU hPopupMenu, UINT *pnPos );
|
2006-08-02 13:31:26 +02:00
|
|
|
static BOOL OLEMenu_SetIsServerMenu( HMENU hmenu, OleMenuDescriptor *pOleMenuDescriptor );
|
|
|
|
static LRESULT CALLBACK OLEMenu_CallWndProc(INT code, WPARAM wParam, LPARAM lParam);
|
|
|
|
static LRESULT CALLBACK OLEMenu_GetMsgProc(INT code, WPARAM wParam, LPARAM lParam);
|
1999-04-01 13:48:01 +02:00
|
|
|
|
1999-07-18 17:43:45 +02:00
|
|
|
/******************************************************************************
|
|
|
|
* These are the prototypes of the OLE Clipboard initialization methods (in clipboard.c)
|
|
|
|
*/
|
2005-03-29 13:32:04 +02:00
|
|
|
extern void OLEClipbrd_UnInitialize(void);
|
|
|
|
extern void OLEClipbrd_Initialize(void);
|
1999-07-18 17:43:45 +02:00
|
|
|
|
1999-02-13 10:13:49 +01:00
|
|
|
/******************************************************************************
|
|
|
|
* These are the prototypes of the utility methods used for OLE Drag n Drop
|
|
|
|
*/
|
2010-05-18 00:21:49 +02:00
|
|
|
static void OLEDD_Initialize(void);
|
|
|
|
static LRESULT WINAPI OLEDD_DragTrackerWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
static void OLEDD_TrackMouseMove(TrackerWindowInfo* trackerInfo);
|
|
|
|
static void OLEDD_TrackStateChange(TrackerWindowInfo* trackerInfo);
|
2004-12-13 22:19:01 +01:00
|
|
|
static DWORD OLEDD_GetButtonState(void);
|
1999-02-13 10:13:49 +01:00
|
|
|
|
1998-10-11 16:21:42 +02:00
|
|
|
/******************************************************************************
|
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
|
|
|
*/
|
1998-12-26 20:44:13 +01: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
|
|
|
{
|
1999-12-06 00:52:56 +01: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
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
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
|
|
|
*/
|
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
|
|
|
{
|
1999-01-30 14:36:55 +01:00
|
|
|
HRESULT hr;
|
|
|
|
|
1999-07-04 18:02:24 +02:00
|
|
|
TRACE("(%p)\n", reserved);
|
1999-01-30 14:36:55 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* The first duty of the OleInitialize is to initialize the COM libraries.
|
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
1999-01-30 14:36:55 +01:00
|
|
|
|
|
|
|
/*
|
2002-06-01 01:06:46 +02:00
|
|
|
* If the CoInitializeEx call failed, the OLE libraries can't be
|
1999-01-30 14:36:55 +01:00
|
|
|
* initialized.
|
|
|
|
*/
|
|
|
|
if (FAILED(hr))
|
2002-06-01 01:06:46 +02:00
|
|
|
return hr;
|
1999-01-30 14:36:55 +01:00
|
|
|
|
2009-11-17 00:41:48 +01:00
|
|
|
if (!COM_CurrentInfo()->ole_inits)
|
|
|
|
hr = S_OK;
|
|
|
|
|
1999-01-30 14:36:55 +01:00
|
|
|
/*
|
|
|
|
* Then, it has to initialize the OLE specific modules.
|
|
|
|
* This includes:
|
|
|
|
* Clipboard
|
|
|
|
* Drag and Drop
|
|
|
|
* Object linking and Embedding
|
|
|
|
* In-place activation
|
|
|
|
*/
|
2007-01-07 13:16:15 +01:00
|
|
|
if (!COM_CurrentInfo()->ole_inits++ &&
|
|
|
|
InterlockedIncrement(&OLE_moduleLockCount) == 1)
|
2001-09-11 02:32:32 +02:00
|
|
|
{
|
2002-06-01 01:06:46 +02:00
|
|
|
/*
|
1999-01-30 14:36:55 +01:00
|
|
|
* Initialize the libraries.
|
|
|
|
*/
|
1999-07-04 18:02:24 +02:00
|
|
|
TRACE("() - Initializing the OLE libraries\n");
|
1999-02-13 10:13:49 +01:00
|
|
|
|
1999-07-18 17:43:45 +02:00
|
|
|
/*
|
|
|
|
* OLE Clipboard
|
|
|
|
*/
|
|
|
|
OLEClipbrd_Initialize();
|
|
|
|
|
1999-02-13 10:13:49 +01:00
|
|
|
/*
|
|
|
|
* Drag and Drop
|
|
|
|
*/
|
|
|
|
OLEDD_Initialize();
|
1999-04-01 13:48:01 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* OLE shared menu
|
|
|
|
*/
|
|
|
|
OLEMenu_Initialize();
|
2001-09-11 02:32:32 +02:00
|
|
|
}
|
1999-01-30 14:36:55 +01:00
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
1998-10-11 16:21:42 +02:00
|
|
|
/******************************************************************************
|
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
|
|
|
*/
|
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
|
|
|
{
|
1999-07-04 18:02:24 +02:00
|
|
|
TRACE("()\n");
|
1999-01-30 14:36:55 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* If we hit the bottom of the lock stack, free the libraries.
|
|
|
|
*/
|
2007-01-07 13:16:15 +01:00
|
|
|
if (!--COM_CurrentInfo()->ole_inits && !InterlockedDecrement(&OLE_moduleLockCount))
|
1999-01-30 14:36:55 +01:00
|
|
|
{
|
|
|
|
/*
|
|
|
|
* Actually free the libraries.
|
|
|
|
*/
|
1999-07-04 18:02:24 +02:00
|
|
|
TRACE("() - Freeing the last reference count\n");
|
1999-02-13 10:13:49 +01:00
|
|
|
|
1999-07-18 17:43:45 +02:00
|
|
|
/*
|
|
|
|
* OLE Clipboard
|
|
|
|
*/
|
|
|
|
OLEClipbrd_UnInitialize();
|
|
|
|
|
1999-04-01 13:48:01 +02:00
|
|
|
/*
|
|
|
|
* OLE shared menu
|
|
|
|
*/
|
|
|
|
OLEMenu_UnInitialize();
|
1999-01-30 14:36:55 +01:00
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-01-30 14:36:55 +01:00
|
|
|
/*
|
|
|
|
* Then, uninitialize the COM libraries.
|
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
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
|
|
|
|
1998-10-11 16:21:42 +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) {
|
2006-10-15 12:28:08 +02:00
|
|
|
FIXME("(0x%08x, 0x%08x),stub!\n",x, y);
|
Release 980301
Sun Mar 1 10:45:23 1998 Andreas Mohr <100.30936@germany.net>
* [loader/ne_image.c]
Fixed problem with weird DLLs (NE_FFLAGS_SINGLEDATA && DGROUP = 0).
* [msdos/dosmem.c]
Export address for __0000H, too.
* [msdos/dpmi.c]
Changed MemAlloc functions to return less fragmented addresses.
Sat Feb 28 18:50:12 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [scheduler/process.c] [scheduler/sysdeps.c]
Don't use %fs register before threading initialization.
Sat Feb 28 14:04:56 1998 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [configure.in] [include/acconfig.h]
Autoconf macro to check for non-reentrant X libraries.
* [windows/winpos.c]
In SetWindowPos32(), do not cause WM_SIZE messages when the
SWP_NOSIZE flag is specified. This fixes the division-by-zero in
Borland C++ 4.0 "Open Project" menu item.
Sat Feb 28 13:11:26 1998 James Moody <013263m@dragon.acadiau.ca>
* [ole/ole2nls.c]
Changed "English" values from German to English.
* [files/dos_fs.c]
Fixed off-by-one month bug.
Fri Feb 27 22:12:01 1998 Douglas Ridgway <ridgway@winehq.com>
* [windows/win.c]
Fix winelib class menu loading bug.
* [include/module.h] [loader/module.c]
LoadModule32 should be implemented in terms of CreateProcess.
* [programs/view/*]
Metafile viewer sample program.
* [documentation/wine.texinfo] [documentation/Makefile.in]
Improvements and additions, HTML target.
Fri Feb 27 04:27:48 1998 Dimitrie O. Paun <dimi@cs.toronto.edu>
* [*/*]
Switched to the new debug messages interface. For more information
please refer to documentation/debug-msgs. Because the new scheme
introduces a new semantic level, I had to manually do through
about 530 dprintf_xxx! The rest of about 2400 where transformed
via a script. Because of the large number of changes that I had
to do, some may have not come out as nicely as I wanted them. If
this is the case, please let me know. There is a lot of work left
to do: -- a few hundred printf's to be converted -- about 2300
fprintf's to be converted -- about 600 FIXME's to be transformed
The problem is that in the above mentioned cases, a lot of manual
intervention is required because a lot of the information is
missing. There are also a lot of other things to be done to the
interface and so forth. I have now ideas for a at least a month
worth of full time work :) I will proceed with many changes in the
next few releases, so please do not start modifing things because
there will be a hell of a lot of conflicts. If you have ideas that
you want to integrate or you want to work on different things,
please coordinate with me.
Thu Feb 26 13:04:29 1998 David Lee Lambert <lamber45@egr.msu.edu>
* [ole/ole2nls.c] [include/windows.h]
First try at OLE date- and time-formatting functions.
Wed Feb 25 11:20:35 1998 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/*.c]
Changed dos device handling, added 'CON' devicehandling.
* [graphics/ddraw.c]
Bug fixes, some additions.
* [if1632/builtin.c][loader/module.c][library/winestub.c]
Small hack so we don't need a dummy BUILTIN_LoadModule
in winestub.c.
* [ole/*][relay32/ole32.spec][if1632/storage.spec]
storage.dll started. winword loads documents (saving
doesn't work yet, dunno why).
Several ole additions, some cleanups and bugfixes.
IMalloc16 implemented.
* [loader/pe_image.c]
Added some comments, fixed circular dll references,
fixed modref ordering, fixed tls allocation.
* [memory/global.c]
Added validity checks before every GET_ARENA_PTR.
(several functions rely on Global* return values
on invalid handles, like IsTask).
Implemented GlobalUnlockFree16.
* [memory/virtual.c]
Replaced dprintf_virtual by fprintf, so we can
do 'info map' again in the debugger. Increase read
linesize for Linux2.1 cases.
* [misc/cpu.c][misc/registry.c]
Moved cpu registry initialization to misc/cpu.c.
* [multimedia/dsound.c]
Enhanced, replaced GETOSPACE bufferingcheck by SETFRAGMENT.
* [relay32/crtdll.spec][relay32/ntdll.spec]
Replaced some ptr by respective 'str' and 'wstr' arguments
for libc functions.
* [scheduler/thread.c]
Added some sanity checks to stackallocation, tlshandling fixed.
* [tools/build.c]
Fixed cdecl argumenttype order (was reversed).
* [win32/ordinals.c]
Implemented KERNEL_449.
* [windows/dinput.c]
Some fixes, needs much more work. Tomb Raider2 works with keyboard ;)
Tue Feb 24 20:46:37 1998 James Juran <jrj120@psu.edu>
* [windows/win.c]
Fixed USER32 ordinal numbers in documentation.
Sat Feb 21 12:30:38 1998 John Richardson <jrichard@zko.dec.com>
* [files/file.c] [include/k32obj.h] [memory/virtual.c]
[scheduler/critsection.c] [scheduler/event.c] [scheduler/handle.c]
[scheduler/k32obj.c] [scheduler/mutex.c] [scheduler/process.c]
[scheduler/semaphore.c] [scheduler/thread.c]
Added generic k32obj read and write routines for k32objs that
support I/O.
* [documentation/console]
Updated console docs.
* [win32/console.c]
Make console work like a k32obj that supports I/O.
* [include/windows.h]
Make WriteFile and ReadFile take HANDLE32 for handle.
Sun Feb 15 14:07:07 1998 Dimitrie O. Paun <dimi@mail.cs.toronto.edu>
* [controls/menu.c] [misc/ver.c] [multimedia/dsound.c]
[multimedia/joystick.c] [windows/dialog.c]
Modified some dprintf_xxx's to prepare them for a new
dprintf_ scheme. Basically, I changed the dprintf's that
outputed a line with many dprintf calls to do just one
dprintf call.
1998-03-01 21:05:02 +01:00
|
|
|
return 0;
|
|
|
|
}
|
1998-03-15 21:29:56 +01:00
|
|
|
|
2010-07-22 14:37:19 +02:00
|
|
|
/*************************************************************
|
|
|
|
* get_droptarget_handle
|
|
|
|
*
|
|
|
|
* Retrieve a handle to the map containing the marshalled IDropTarget.
|
|
|
|
* This handle belongs to the process that called RegisterDragDrop.
|
|
|
|
* See get_droptarget_local_handle().
|
|
|
|
*/
|
|
|
|
static inline HANDLE get_droptarget_handle(HWND hwnd)
|
|
|
|
{
|
|
|
|
return GetPropW(hwnd, prop_marshalleddroptarget);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************
|
|
|
|
* is_droptarget
|
|
|
|
*
|
|
|
|
* Is the window a droptarget.
|
|
|
|
*/
|
|
|
|
static inline BOOL is_droptarget(HWND hwnd)
|
|
|
|
{
|
|
|
|
return get_droptarget_handle(hwnd) ? TRUE : FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************
|
|
|
|
* get_droptarget_local_handle
|
|
|
|
*
|
|
|
|
* Retrieve a handle to the map containing the marshalled IDropTarget.
|
|
|
|
* The handle should be closed when finished with.
|
|
|
|
*/
|
|
|
|
static HANDLE get_droptarget_local_handle(HWND hwnd)
|
|
|
|
{
|
|
|
|
HANDLE handle, local_handle = 0;
|
|
|
|
|
|
|
|
handle = get_droptarget_handle(hwnd);
|
|
|
|
|
|
|
|
if(handle)
|
|
|
|
{
|
|
|
|
DWORD pid;
|
|
|
|
HANDLE process;
|
|
|
|
|
|
|
|
GetWindowThreadProcessId(hwnd, &pid);
|
|
|
|
process = OpenProcess(PROCESS_DUP_HANDLE, FALSE, pid);
|
|
|
|
if(process)
|
|
|
|
{
|
|
|
|
DuplicateHandle(process, handle, GetCurrentProcess(), &local_handle, 0, FALSE, DUPLICATE_SAME_ACCESS);
|
|
|
|
CloseHandle(process);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return local_handle;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* create_map_from_stream
|
|
|
|
*
|
|
|
|
* Helper for RegisterDragDrop. Creates a file mapping object
|
|
|
|
* with the contents of the provided stream. The stream must
|
|
|
|
* be a global memory backed stream.
|
|
|
|
*/
|
|
|
|
static HRESULT create_map_from_stream(IStream *stream, HANDLE *map)
|
|
|
|
{
|
|
|
|
HGLOBAL hmem;
|
|
|
|
DWORD size;
|
|
|
|
HRESULT hr;
|
|
|
|
void *data;
|
|
|
|
|
|
|
|
hr = GetHGlobalFromStream(stream, &hmem);
|
|
|
|
if(FAILED(hr)) return hr;
|
|
|
|
|
|
|
|
size = GlobalSize(hmem);
|
|
|
|
*map = CreateFileMappingW(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, size, NULL);
|
|
|
|
if(!*map) return E_OUTOFMEMORY;
|
|
|
|
|
|
|
|
data = MapViewOfFile(*map, FILE_MAP_WRITE, 0, 0, size);
|
|
|
|
memcpy(data, GlobalLock(hmem), size);
|
|
|
|
GlobalUnlock(hmem);
|
|
|
|
UnmapViewOfFile(data);
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* create_stream_from_map
|
|
|
|
*
|
|
|
|
* Creates a stream from the provided map.
|
|
|
|
*/
|
|
|
|
static HRESULT create_stream_from_map(HANDLE map, IStream **stream)
|
|
|
|
{
|
|
|
|
HRESULT hr = E_OUTOFMEMORY;
|
|
|
|
HGLOBAL hmem;
|
|
|
|
void *data;
|
|
|
|
MEMORY_BASIC_INFORMATION info;
|
|
|
|
|
|
|
|
data = MapViewOfFile(map, FILE_MAP_READ, 0, 0, 0);
|
|
|
|
if(!data) return hr;
|
|
|
|
|
|
|
|
VirtualQuery(data, &info, sizeof(info));
|
|
|
|
TRACE("size %d\n", (int)info.RegionSize);
|
|
|
|
|
|
|
|
hmem = GlobalAlloc(GMEM_MOVEABLE, info.RegionSize);
|
|
|
|
if(hmem)
|
|
|
|
{
|
|
|
|
memcpy(GlobalLock(hmem), data, info.RegionSize);
|
|
|
|
GlobalUnlock(hmem);
|
|
|
|
hr = CreateStreamOnHGlobal(hmem, TRUE, stream);
|
|
|
|
}
|
|
|
|
UnmapViewOfFile(data);
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* get_droptarget_pointer
|
2010-05-18 00:21:49 +02:00
|
|
|
*
|
2010-07-22 14:37:19 +02:00
|
|
|
* Retrieves the marshalled IDropTarget from the window.
|
2010-05-18 00:21:49 +02:00
|
|
|
*/
|
2010-07-22 14:37:19 +02:00
|
|
|
static IDropTarget* get_droptarget_pointer(HWND hwnd)
|
2010-05-18 00:21:49 +02:00
|
|
|
{
|
2010-07-22 14:37:19 +02:00
|
|
|
IDropTarget *droptarget = NULL;
|
|
|
|
HANDLE map;
|
|
|
|
IStream *stream;
|
|
|
|
|
|
|
|
map = get_droptarget_local_handle(hwnd);
|
|
|
|
if(!map) return NULL;
|
|
|
|
|
|
|
|
if(SUCCEEDED(create_stream_from_map(map, &stream)))
|
|
|
|
{
|
|
|
|
CoUnmarshalInterface(stream, &IID_IDropTarget, (void**)&droptarget);
|
|
|
|
IStream_Release(stream);
|
|
|
|
}
|
|
|
|
CloseHandle(map);
|
|
|
|
return droptarget;
|
2010-05-18 00:21:49 +02: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
|
|
|
*/
|
2010-05-18 00:21:49 +02:00
|
|
|
HRESULT WINAPI RegisterDragDrop(HWND hwnd, LPDROPTARGET pDropTarget)
|
1999-02-13 10:13:49 +01:00
|
|
|
{
|
2010-05-18 00:21:49 +02:00
|
|
|
DWORD pid = 0;
|
2010-07-22 14:37:19 +02:00
|
|
|
HRESULT hr;
|
|
|
|
IStream *stream;
|
|
|
|
HANDLE map;
|
2010-07-28 12:42:04 +02:00
|
|
|
IUnknown *unk;
|
1999-02-13 10:13:49 +01:00
|
|
|
|
2002-11-22 05:43:02 +01:00
|
|
|
TRACE("(%p,%p)\n", hwnd, pDropTarget);
|
1999-02-13 10:13:49 +01:00
|
|
|
|
2007-04-05 12:32:32 +02:00
|
|
|
if (!COM_CurrentApt())
|
|
|
|
{
|
|
|
|
ERR("COM not initialized\n");
|
2007-10-07 16:52:28 +02:00
|
|
|
return E_OUTOFMEMORY;
|
2007-04-05 12:32:32 +02:00
|
|
|
}
|
|
|
|
|
2004-03-30 07:13:58 +02:00
|
|
|
if (!pDropTarget)
|
|
|
|
return E_INVALIDARG;
|
2007-04-05 12:32:32 +02:00
|
|
|
|
|
|
|
if (!IsWindow(hwnd))
|
2007-04-05 12:33:16 +02:00
|
|
|
{
|
|
|
|
ERR("invalid hwnd %p\n", hwnd);
|
2007-04-05 12:32:32 +02:00
|
|
|
return DRAGDROP_E_INVALIDHWND;
|
2007-04-05 12:33:16 +02:00
|
|
|
}
|
2007-04-05 12:32:32 +02:00
|
|
|
|
2010-05-18 00:21:49 +02:00
|
|
|
/* block register for other processes windows */
|
|
|
|
GetWindowThreadProcessId(hwnd, &pid);
|
|
|
|
if (pid != GetCurrentProcessId())
|
|
|
|
{
|
|
|
|
FIXME("register for another process windows is disabled\n");
|
|
|
|
return DRAGDROP_E_INVALIDHWND;
|
|
|
|
}
|
1999-02-13 10:13:49 +01:00
|
|
|
|
2010-05-18 00:21:49 +02:00
|
|
|
/* check if the window is already registered */
|
2010-07-22 14:37:19 +02:00
|
|
|
if (is_droptarget(hwnd))
|
1999-02-13 10:13:49 +01:00
|
|
|
return DRAGDROP_E_ALREADYREGISTERED;
|
|
|
|
|
2010-07-22 14:37:19 +02:00
|
|
|
/*
|
|
|
|
* Marshal the drop target pointer into a shared memory map and
|
|
|
|
* store the map's handle in a Wine specific window prop. We also
|
|
|
|
* store the drop target pointer itself in the
|
|
|
|
* "OleDropTargetInterface" prop for compatibility with Windows.
|
|
|
|
*/
|
1999-02-13 10:13:49 +01:00
|
|
|
|
2010-07-22 14:37:19 +02:00
|
|
|
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream);
|
|
|
|
if(FAILED(hr)) return hr;
|
|
|
|
|
2010-09-16 17:12:33 +02:00
|
|
|
unk = NULL;
|
2010-07-28 12:42:04 +02:00
|
|
|
hr = IDropTarget_QueryInterface(pDropTarget, &IID_IUnknown, (void**)&unk);
|
2010-09-16 17:12:33 +02:00
|
|
|
if (SUCCEEDED(hr) && !unk) hr = E_NOINTERFACE;
|
2010-07-28 12:42:04 +02:00
|
|
|
if(FAILED(hr))
|
|
|
|
{
|
|
|
|
IStream_Release(stream);
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
hr = CoMarshalInterface(stream, &IID_IDropTarget, unk, MSHCTX_LOCAL, NULL, MSHLFLAGS_TABLESTRONG);
|
|
|
|
IUnknown_Release(unk);
|
|
|
|
|
2010-07-22 14:37:19 +02:00
|
|
|
if(SUCCEEDED(hr))
|
|
|
|
{
|
|
|
|
hr = create_map_from_stream(stream, &map);
|
|
|
|
if(SUCCEEDED(hr))
|
|
|
|
{
|
|
|
|
IDropTarget_AddRef(pDropTarget);
|
|
|
|
SetPropW(hwnd, prop_oledroptarget, pDropTarget);
|
|
|
|
SetPropW(hwnd, prop_marshalleddroptarget, map);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
LARGE_INTEGER zero;
|
|
|
|
zero.QuadPart = 0;
|
|
|
|
IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL);
|
|
|
|
CoReleaseMarshalData(stream);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
IStream_Release(stream);
|
|
|
|
|
|
|
|
return hr;
|
Release 980822
Sat Aug 22 17:46:19 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de>
* [include/dosexe.h] [include/module.h] [include/pe_image.h]
[include/process.h] [include/windows.h] [loader/dos/module.c]
[loader/module.c] [loader/ne/module.c] [loader/pe_image.c]
[scheduler/process.c] [win32/process.c]
Partially implemented CreateProcess32.
* [win32/device.c] [relay32/kernel32.spec] [scheduler/k32obj.c]
[misc/registry.c] [win32/file.c]
Partially implemented VxDCall (VMM registry services).
* [files/dos_fs.c]
DOSFS_FindNext made thread-safe.
* [include/sig_context.h] [include/syslevel.h] [loader/signal.c]
[scheduler/syslevel.c] [tools/build.c]
Replaced CALLTO16_Current_fs by SYSLEVEL_Win16CurrentTeb.
* [win32/kernel32.c]
Bugfix: QT_Thunk/FT_Thunk should return 'long' in DX:AX, not EAX.
* [if1632/relay.c] [relay32/builtin32.c] [windows/msgbox.c]
[msdos/int20.c] [msdos/int21.c]
Use ExitProcess instead of TASK_KillCurrentTask.
* [include/task.h] [include/thread.h] [loader/task.c]
[scheduler/thread.c] [include/queue.h] [windows/message.c]
[windows/queue.c] [windows/win.c]
Prevent Win32 threads from entering the TASK_Reschedule loop.
(Note: Win32 messaging still doesn't work correctly; this patch
is just preventing the system from crashing when Win32 threads
call messaging functions. Messages will probably still get lost.)
* [scheduler/critsection.c]
Deactivated the use of SEM_UNDO for the SYSTEM_LOCK semaphore;
for some reason, this leads to problems after threads terminate...
Sat Aug 22 15:00:00 1998 Jrgen Schmied <juergen.schmied@metronet.de>
* [include/authors.h]
New file, includes all names of the developer (former shell.c)
* [Makefile.in][configure][configure.in][dlls/Makefile.in]
[dlls/shell32/Makefile.in][shres.rc]
Created dlls/shell32 and moved the shell32 stuff in it.
Started to create internal resources.
* [dlls/shell32/*]
Split the shell32 implementation into smaller files.
New classes: IContextMenu, IExtractIcon, IShellView.
Implemented Shell_GetImageList().
shell32 links to comctl32 now dynamically so it can use
internal/external implementations.
* [documentation/internal-dll] [documentation/shell32]
New, could anybody do a spellcheck?
* [include/commctrl.h]
Many new LV constants, structures, functions.
* [controls/comctl32undoc.c]
Rewrote the DSA* functions.
* [windows/winpos.c]
SetShellWindow32, GetShellWindow32.
Sat Aug 22 14:02:15 1998 Alexander Lukyanov <lav@long.yar.ru>
* [loader/resource.c]
Mark last accelerator as such in LoadAccelerators32W.
* [relay32/shell32.spec] [misc/shell.c]
Add stubs for SHGetSpecialFolderPath[AW].
Sat Aug 22 02:07:42 1998 Adrian Harvey <adrian@select.com.au>
* [include/file.h] [file/file.c] [msdos/int21.c] [msdos/vxd.c]
[misc/lzexpand.c] [win32/kernel32.c] [documentation/filehandles]
Fixed file handle handling. Created universal HFILE16 to HFILE32
translation macro from msdos/int21 code by Ove Kaaven.
Used macro in all Win16 functions so that win32 handles are translated
to avoid DOS/Win16 stdxx handles.
Removed handle translation from int21.c where Win16 functions are
called. Changed remaining calls to use new macro names.
Documented filehandle handling and differences between win 16 & 32.
Fri Aug 21 20:32:49 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [server/process.c] [server/thread.c]
Implemented object wait queues and synchronization.
Fri Aug 21 18:40:02 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>
* [graphics/psdrv/*]
DEVMODE dmPaper{Width|Length} fields are in 0.1mm.
Select a 100 pixel default font in CreateDC.
Thu Aug 20 22:47:39 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [objects/bitmap.c]
Handle bits=32 in SetBitmapBits32 and GetBitmapBits32.
* [msdos/int21.c]
Add handling of Int21 0A and 37.
* [misc/commdlg.c]
Use MapHModuleLS and MapHModuleSL when translating HINSTANCE16 to
HINSTANCE32 and vice versa.
* [win32/file.c]
CreateFile32A: Abort if filename == NULL.
Thu Aug 20 12:28:31 1998 Marcus Meissner <marcus@jet.franken.de>
* [*/*]
Lots of missing prototypes added, some parameter types adapted to match
SDK.
* [debugger/stabs.c]
Don't loop forever if we don't find wine or one of the libxxx.so.
* [loader/ne/module.c]
Implemented MapHModuleLS,MapHModuleSL,MapHinstLS,MapHinstSL.
* [misc/network.c]
Implemented WNetGetUser32A.
* [misc/shellord.c]
Implemented ILRemoveLastID.
* [multimedia/dsound.c]
Fixed StarCraft memory leak.
* [graphics/ddraw.c]
Removed some unnecessary simple relaying functions, tried polishing
up the Xlib implementation (still doesn't work), temp. removed Xshm
code (to be remerged with working Xlib code).
Tue Aug 18 22:29:17 1998 Ove Kaaven <ovek@arcticnet.no>
* [multimedia/mmio.c] [multimedia/mmsystem.c]
Fixed most mmio bugs, fully implementing mmioSetBuffer
buffering, ability to read memory files, and the
sndPlaySound() SND_MEMORY flag. Most mmio-using programs
now work fine.
* [include/dosexe.h] [include/miscemu.h] [include/module.h]
[loader/module.c] [loader/task.c] [msdos/dosmem.c]
Improved DOS VM flexibility and portability somewhat. (Did
I get the #ifdefs right this time, BSD-ers?)
* [msdos/int21.c]
Made "Get Current PSP address" work as expected in a DOS VM.
* [loader/dos/*]
Began improving flexibility and portability somewhat. It
should be easier to add DPMI RMCB callbacks now. The
DOS VM no longer leaves big files lying around in /tmp
after a crash.
Tue Aug 18 12:38:31 1998 Turchanov Sergey <turchanov@usa.net>
* [relay32/winmm.spec]
This patch allows WinAmp to play WAV files (at least in PCM
format).
Sun Aug 16 05:34:13 1998 Pablo Saratxaga <srtxg@chanae.alphanet.ch>
* [windows/keyboard.c]
Corrected keyboard code to properly handle keys : ? ~ and "
on non US keyboards.
Sat Aug 15 18:47:14 1998 Brian Craft <bcboy@dorothy.wanglab.brandeis.edu>
* [windows/win.c]
Fixed severe bug in EnumChildWindwos().
Thu Aug 13 21:05:35 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
* [controls/tooltips.c]
Fixed some bugs. Added subclassing support.
* [controls/toolbar.c]
Improved tooltip integration. Fixed some bugs.
* [controls/commctrl.c]
Changed control registration and added some documentation.
Fixed ShowHideMenuCtl.
* [controls/rebar.c][include/rebar.h][include/commctrl.h]
Improved rebar implementation (still no display).
* [controls/pager.c][include/pager.h][include/commctrl.h]
Improved pager implementation (still no display).
* [misc/imagelist.c]
Fixed a bug.
* [documentation/common_controls]
Updated.
Sun Aug 9 19:50:20 1998 James Juran <jrj120@psu.edu>
* [Makefile.in] [documentation/Makefile.in]
[programs/Makefile.in] [programs/*/Makefile.in]
Added uninstall rules, cleaned up install rules a little bit.
Sun Aug 9 13:21:35 1998 Andreas Mohr <100.30936@germany.net>
* [loader/ne/module.c] [if1632/kernel.spec]
Added the undocumented HIWORD of GetModuleHandle (hFirstModule).
* [loader/ne/segment.c]
Wine forgot to set some NE_SEGFLAGS_*.
Combined with another loader change, this fixed the
"BLINKER -- error in loading module" or ghost MessageBox problem
that about 1% of all Windows programs have.
Some BLINKER programs still don't work, though.
But I'm working on it, with great help from Blinkinc.
* [loader/task.c]
InitTask needs to decrement the SP register by two as Win95 does.
Sun Aug 9 02:41:28 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de>
* [if1632/kernel.spec] [relay32/kernel32.spec] [scheduler/syslevel.c]
[loader/main.c] [win32/ordinals.c] [include/syslevel.h]
[scheduler/Makefile.in]
Implemented Win95 'syslevel' routines (including Win16Lock).
* [if1632/relay.c] [if1632/thunk.c] [tools/build.c] [loader/task.c]
[loader/ne/segment.c] [win32/kernel32.c] [memory/selector.c]
[include/stackframe.h] [include/thread.h]
16-bit %fs handling revised. Use Win16Lock where appropriate.
* [include/thread.h] [scheduler/synchro.c] [windows/message.c]
[windows/queue.c] [win32/process.c]
Implemented MsgWaitForMultipleObjects.
* [files/change.c] [files/Makefile.in] [scheduler/k32obj.c]
[win32/newfns.c]
Implemented (dummy) file change notification objects.
* [debugger/dbg.y] [scheduler/process.c] [scheduler/thread.c]
[include/process.h] [include/thread.h]
Suspend all threads except current when hitting debugger break point.
* [objects/dib.c]
Bugfix for CreateDIBSection.
1998-08-22 21:03:56 +02:00
|
|
|
}
|
Release 980913
Fri Sep 11 13:14:35 1998 Andreas Mohr <100.30936@germany.net>
* [files/file.c] [include/file.h]
Fixed SetFilePointer to allow negative positions as in DOS.
* [graphics/ddraw.c]
Added some methods to IDirect3D.
* [ole/compobj.c] [if1632/compobj.spec]
Added/implemented CoCreateStandardMalloc16,
CoGetClassObject, CoCreateInstance,
LookupETask, SetETask, CoGetState16.
* [loader/task.c]
MakeProcInstance: return 0 if func == NULL.
* [*/*] [tools/winapi-check]
Added zillions of missing WINAPI's and __cdecl's.
(oops, several caused by myself)
Wrote script for automated checking.
* [if1632/compobj.spec]
Many stub names.
* [misc/ddeml.c] [ole/compobj.c]
Some stubs.
Tue Sep 9 21:36:48 1998 Anders Carlsson <anders.carlsson@linux.nu>
* [dlls/comctl32/Makefile.in] [dlls/comctl32/commctrl.c]
[dlls/comctl32/tab.c] [include/commctrl.h] [include/tab.h]
Added preliminary tab control support.
Sat Sep 5 16:27:20 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>
* [graphics/psdrv/*]
More changes to the PostScript driver:
Implemented pens and solid brushes.
Colour/greyscale for fonts, pens and brushes.
To get coloured output you need to have *ColorDevice set to true
in your PPD, otherwise you'll get greyscale.
Landscape mode now works, as does non-A4 page sizes.
Encoding of fonts to ANSI is better, Symbol works again.
* [objects/dc.c] [include/gdi.h] [*/*]
Moved dc->w.{text,background}Pixel to X11DRV_PDEVICE where they
belong.
Sat Sep 5 05:12:09 1998 Ove Kaaven <ovek@arcticnet.no>
* [include/dosexe.h] [include/miscemu.h] [include/msdos.h]
[loader/dos/dosvm.c] [loader/dos/module.c] [msdos/dpmi.c]
[msdos/int2f.c] [msdos/interrupts.c]
Fixed portability. Adapted some code to make it easier to
integrate the DOS subsystem with the DPMI subsystem, made
the DPMI simulated real-mode interrupts be handled the V86
way. Added support for .COM files. Made int2f DPMI check
fail, to avoid pkunzip crashing in attempting to use DPMI.
Generally moved stuff around a little.
It is now technically possible to load several DOS programs
into the same memory space. Not tested, though.
Fri Sep 4 21:40:45 1998 Marcus Meissner <marcus@jet.franken.de>
* [if1632/kernel.spec]
Changed 500-53x stubnames accordingly to nt3.51 krnl386.exe.
* [win32/except.c]
Fixed one bad program behaviour, (deleting SEH while in
first walk). RtlUnwind is broken too I think (it should unwind
on success, not while walking the exception chain).
* [ole/ole2nls.c]
Get*DefaultLCID returns 0x400|id. expected by one application.
* [if1632/snoop.c]
Handle non-standard SP returns more graceful.
* [windows/class.c]
hinstances are mostly irrelevant for win32.
* [memory/string.c] [misc/registry.c]
lstrcmpi32W: use toupper for characters < 0x100. (speedup hack
for registry.c)
Some small speedup hacks for registry.c
Thu Sep 3 20:40:16 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
* [Makefile.in][configure][configure.in][dlls/Makefile.in]
[dlls/comctl32/Makefile.in]
Created dlls/comctl32 and moved the common controls stuff to it.
* [misc/version.c]
Removed COMCTL32_DllGetVersion. The fixed function is part
of the common controls stuff.
* [dlls/comctl32/*.c][include/commctrl.h]
Added structure size tests.
* [dlls/comctl32/toolbar.c]
Fixed a bug in TOOLBAR_GetMaxWidth().
* [dlls/comctl32/animate.c][include/animate.h]
[dlls/comctl32/comboex.c][include/comboex.h]
[dlls/comctl32/hotkey.c][include/hotkey.h]
[dlls/comctl32/listview.c][include/listview.h]
[dlls/comctl32/commctrl.c][include/commctrl.h]
New files. Added Animation, ComboBoxEx, Hotkey and
Listview control dummies.
* [dlls/comctl32/tooltips.c]
Fixed a display bug and font selection.
* [dlls/comctl32/comctl32undoc.c][include/commctrl.h]
Added missing DPA functions. Fixed bugs and published the
function prototypes.
* [documentation/common_controls]
Updated.
Wed Sep 2 15:43:45 1998 Patrik Stridvall <ps@leissner.se>
* [AUTHORS] [include/authors.h]
Added myself as a Wine author.
* [memory/virtual.c] [objects/dc.c]
Fixed runtime errors for Solaris.
* [misc/ddeml.c] [objects/gdiobj.c]
Minor fixes.
* [win32/device.c]
Added stubs for IFSMgr VxDCall and
a partial implementation of IFSMgr DeviceIo.
* [relay32/Makefile.in] [relay32/builtin32.c] [relay32/imm32.spec]
[relay32/msnet32.spec] [relay32/oledlg.spec]
Added new spec files for IMM32.DLL, MSNET32.DLL, OLEDLG.DLL.
* [misc/Makefile.in] [misc/imm.c] [include/imm.h]
Added news files for implementation of IMM32.DLL.
All functions return 0 as is correct for all Western Languages.
* [ole/Makefile.in] [ole/oledlg.c] [include/oledlg.h]
Added new files for implementation of OLEDLG.DLL.
Added stubs with FIXME:s for all functions.
Wed Sep 2 10:50:00 1998 Juergen Schmied <juergen.schmied@metronet.de>
* [dlls/shell32/contmenu.c][dlls/shell32/shellole.c]
[dlls/shell32/shlfolder.c][dlls/shell32/shlview.c]
[documentation/shell32][include/shell.h]
Clean up, bugfixes.
* [dlls/shell32/enumidlist.c]
Fileattributes implemented.
* [dlls/shell32/pidl.c]
Class pidlmgr splited into functions, structures changed,
some functions rewritten.
* [dlls/shell32/shell32_main.c]
Small changes and bugfixes SHGetFileInfoA, SHGetSpecialFolderLocation.
* [dlls/shell32/shellord.c][relay32/shell32.spec]
Parameter documented, implemented SHCloneSpecialIDList.
Stub improved ShellExecuteEx32A.
New stubs SHFind_InitMenuPopup, FileMenu_InitMenuPopup,
FileMenu_Create, FileMenu_TrackPopupMenuEx, SHWinHelp,
SHRunConrolPanel, DAD_ShowDragImage, FileMenu_Destroy,
SHGetDataFromIDListA, SHFileOperationA.
* [include/winnls.h][include/ole2nls.c]
TIME_FORCE24HOURFORMAT, TIME_NOTIMEMARKER implemented
in OLE_GetFormatA, GetTimeFormat32A.
* [win32/code_page.c]
WideCharToMultiByte: parameter checking and returning of strlen
implemented.
* [windows/keyboard.c][windows/defwnd.c]
Debug messages added.
* [windows/win.c]
WIN_SetWindowLong GWL_STYLE and GWL_EXSTYLE implemented.
* [controls/menu.c]
Missing line added.
* [include/winerror.h]
Macros for SUCCEEDED and FAILED added.
Mon Aug 31 00:55:31 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de>
* [loader/module.c]
Bugfix: LoadModule16 should *not* call LoadModule32.
* [files/dos_fs.c]
Bugfix: don't crash if given directory doesn't exist.
Sat Aug 29 15:00:49 1998 Turchanov Sergey <turchanov@usa.net>
* [include/mmsystem.h][multimedia/mmsystem.c][relay32/winmm.spec]
Almost completed implementation of [snd]PlaySound (except
flags SND_ALIAS_ID and SND_APPLICATION).
* [if1632/user.spec][windows/winpos.c]
Added SetWindowRgn16 stub.
Sat Aug 29 02:53:31 1998 Alexander Lukyanov <lav@long.yar.ru>
* [files/drive.c]
GetDriveType32A: return DRIVE_DOESNOTEXIST in case of non
existent drive.
* [msdos/int21.c]
INT21_FindFirstFCB: check drive validity to prevent oops.
* [win32/file.c]
CreateFile32A: duplicate STD_{INPUT,OUTPUT}_HANDLE.
* [files/dos_fs.c]
Make DOSFS_OpenDir treat "" as "/".
DOSFS_OpenDevice: duplicate STD_{INPUT,OUTPUT}_HANDLE.
* [windows/dialog.c]
GetNextDlgTabItem32: use last/first item instead of first/last
when hwndCtrl==0. This fixes initial focus.
Sat Aug 29 02:46:32 1998 Adrian Harvey <adrian@select.com.au>
* [include/process.h] [include/process.c]
Renamed PROCESS_SELF to CURRENT_PROCESS_PSEUDOHANDLE in line
with thread constant, and Win32 documentation (which calls it
a pseudohandle.) Made GetCurrentProcess actually use this
constant instead of the value.
* [include/process.h] [include/thread.h] [scheduler/thread.c]
[scheduler/process.c] [scheduler/handle.c]
Modify HANDLE_GetObjPtr to understand about
CURRENT_THREAD_PSEUDOHANDLE and CURRENT_PROCESS_PSEUDOHANDLE.
This allows DuplicateHandle to do the correct thing with these
handles. Removed now duplicate functionality from THREAD_GetPtr
and PROCESS_GetPtr.
* [loader/ne/segment.c]
Fixed two places where HFILE32s were being created and passed to
16-bit code. This should unbreak NE self-loading code.
Added two casts to remove compile time warnings.
Fri Aug 28 21:04:13 1998 Joseph Pranevich <knight@baltimore.wwaves.com>
* [msdos/dosmem.c] [msdos/int2f.c]
Added beginnings of DOS error table.
* [msdos/int1a.c]
Stub for subfunction 0xb0.
* [msdos/int10.c] [loader/dos/dosvm.c]
INT 10 support completely rewritten and lots of debugging
added. Now, DOS apps that use INT 10 to write to the screen will
work. (Beyond Zork does, at least. Somewhat.)
* [include/miscemu.h] [msdos/dosmem.c] [msdos/int21.c]
Another shot at getting MS's generic error message facility
right.
* [msdos/int21.c]
Command.Com wanted to set its own PSP address. I let it.
Wed Aug 26 12:26:20 1998 Matthew Toseland <Matthew.Toseland@btinternet.com>
* [include/file.h] [misc/lzexpand.c]
Fixed LZCopy16 by fixing HFILE16/HFILE32 convertor macros so don't
convert lzw handles.
Tue Aug 25 22:22:55 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [misc/registry.c]
In RegEnumvalue, ivalue == 0 is a legal request and should
return the first entry.
* [msdos/int21.c]
Add handling for Int21-48/49 in Win16. Makes blinker demo work.
* [windows/winproc.c]
Add Msg32A<->Msg32W translation for LB_ADDSTRING.
Tue Aug 25 21:03:31 1998 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [windows/win.c]
Fix for SetParent(): MS Windows 3.11 does not clear the WS_CHILD
flag when a child window is reparented to the desktop window.
Mon Aug 24 20:55:22 1998 Berend Reitsma <berend at asset-control dot com>
* [controls/menu.c]
Menus created with SetMenuItemInfo and InsertMenuItem should
work now.
Sun Aug 23 23:23:23 1998 Alex Korobka <korobka@ams.sunysb.edu>
* [controls/combo.c]
Added CB_GETITEMHEIGHT.
* [windows/winpos.c]
WM_NCHITTEST, SWP_FRAMECHANGED bugfixes.
Sat Aug 22 21:15:29 1998 Alex Priem <alexp@sci.kun.nl>
* [files/profile.c] [include/windows.h]
Added GetPrivateProfileSectionNames[AW],GetPrivateProfileSectionW,
GetPrivateProfileStructW, GetProfileSectionW,
WriteProfileSection[AW], WritePrivateProfileStructW.
1998-09-13 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
|
|
|
*/
|
2010-05-18 00:21:49 +02:00
|
|
|
HRESULT WINAPI RevokeDragDrop(HWND hwnd)
|
1999-02-13 10:13:49 +01:00
|
|
|
{
|
2010-07-22 14:37:19 +02:00
|
|
|
HANDLE map;
|
|
|
|
IStream *stream;
|
|
|
|
IDropTarget *drop_target;
|
|
|
|
HRESULT hr;
|
1999-02-13 10:13:49 +01:00
|
|
|
|
2002-11-22 05:43:02 +01:00
|
|
|
TRACE("(%p)\n", hwnd);
|
1999-02-13 10:13:49 +01:00
|
|
|
|
2007-04-05 12:33:16 +02:00
|
|
|
if (!IsWindow(hwnd))
|
|
|
|
{
|
|
|
|
ERR("invalid hwnd %p\n", hwnd);
|
|
|
|
return DRAGDROP_E_INVALIDHWND;
|
|
|
|
}
|
|
|
|
|
2010-05-18 00:21:49 +02:00
|
|
|
/* no registration data */
|
2010-07-22 14:37:19 +02:00
|
|
|
if (!(map = get_droptarget_handle(hwnd)))
|
1999-02-13 10:13:49 +01:00
|
|
|
return DRAGDROP_E_NOTREGISTERED;
|
|
|
|
|
2010-07-22 14:37:19 +02:00
|
|
|
drop_target = GetPropW(hwnd, prop_oledroptarget);
|
|
|
|
if(drop_target) IDropTarget_Release(drop_target);
|
|
|
|
|
2010-05-18 00:21:49 +02:00
|
|
|
RemovePropW(hwnd, prop_oledroptarget);
|
2010-07-22 14:37:19 +02:00
|
|
|
RemovePropW(hwnd, prop_marshalleddroptarget);
|
1999-02-13 10:13:49 +01:00
|
|
|
|
2010-07-22 14:37:19 +02:00
|
|
|
hr = create_stream_from_map(map, &stream);
|
|
|
|
if(SUCCEEDED(hr))
|
|
|
|
{
|
|
|
|
CoReleaseMarshalData(stream);
|
|
|
|
IStream_Release(stream);
|
|
|
|
}
|
|
|
|
CloseHandle(map);
|
|
|
|
|
|
|
|
return hr;
|
Release 980913
Fri Sep 11 13:14:35 1998 Andreas Mohr <100.30936@germany.net>
* [files/file.c] [include/file.h]
Fixed SetFilePointer to allow negative positions as in DOS.
* [graphics/ddraw.c]
Added some methods to IDirect3D.
* [ole/compobj.c] [if1632/compobj.spec]
Added/implemented CoCreateStandardMalloc16,
CoGetClassObject, CoCreateInstance,
LookupETask, SetETask, CoGetState16.
* [loader/task.c]
MakeProcInstance: return 0 if func == NULL.
* [*/*] [tools/winapi-check]
Added zillions of missing WINAPI's and __cdecl's.
(oops, several caused by myself)
Wrote script for automated checking.
* [if1632/compobj.spec]
Many stub names.
* [misc/ddeml.c] [ole/compobj.c]
Some stubs.
Tue Sep 9 21:36:48 1998 Anders Carlsson <anders.carlsson@linux.nu>
* [dlls/comctl32/Makefile.in] [dlls/comctl32/commctrl.c]
[dlls/comctl32/tab.c] [include/commctrl.h] [include/tab.h]
Added preliminary tab control support.
Sat Sep 5 16:27:20 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>
* [graphics/psdrv/*]
More changes to the PostScript driver:
Implemented pens and solid brushes.
Colour/greyscale for fonts, pens and brushes.
To get coloured output you need to have *ColorDevice set to true
in your PPD, otherwise you'll get greyscale.
Landscape mode now works, as does non-A4 page sizes.
Encoding of fonts to ANSI is better, Symbol works again.
* [objects/dc.c] [include/gdi.h] [*/*]
Moved dc->w.{text,background}Pixel to X11DRV_PDEVICE where they
belong.
Sat Sep 5 05:12:09 1998 Ove Kaaven <ovek@arcticnet.no>
* [include/dosexe.h] [include/miscemu.h] [include/msdos.h]
[loader/dos/dosvm.c] [loader/dos/module.c] [msdos/dpmi.c]
[msdos/int2f.c] [msdos/interrupts.c]
Fixed portability. Adapted some code to make it easier to
integrate the DOS subsystem with the DPMI subsystem, made
the DPMI simulated real-mode interrupts be handled the V86
way. Added support for .COM files. Made int2f DPMI check
fail, to avoid pkunzip crashing in attempting to use DPMI.
Generally moved stuff around a little.
It is now technically possible to load several DOS programs
into the same memory space. Not tested, though.
Fri Sep 4 21:40:45 1998 Marcus Meissner <marcus@jet.franken.de>
* [if1632/kernel.spec]
Changed 500-53x stubnames accordingly to nt3.51 krnl386.exe.
* [win32/except.c]
Fixed one bad program behaviour, (deleting SEH while in
first walk). RtlUnwind is broken too I think (it should unwind
on success, not while walking the exception chain).
* [ole/ole2nls.c]
Get*DefaultLCID returns 0x400|id. expected by one application.
* [if1632/snoop.c]
Handle non-standard SP returns more graceful.
* [windows/class.c]
hinstances are mostly irrelevant for win32.
* [memory/string.c] [misc/registry.c]
lstrcmpi32W: use toupper for characters < 0x100. (speedup hack
for registry.c)
Some small speedup hacks for registry.c
Thu Sep 3 20:40:16 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
* [Makefile.in][configure][configure.in][dlls/Makefile.in]
[dlls/comctl32/Makefile.in]
Created dlls/comctl32 and moved the common controls stuff to it.
* [misc/version.c]
Removed COMCTL32_DllGetVersion. The fixed function is part
of the common controls stuff.
* [dlls/comctl32/*.c][include/commctrl.h]
Added structure size tests.
* [dlls/comctl32/toolbar.c]
Fixed a bug in TOOLBAR_GetMaxWidth().
* [dlls/comctl32/animate.c][include/animate.h]
[dlls/comctl32/comboex.c][include/comboex.h]
[dlls/comctl32/hotkey.c][include/hotkey.h]
[dlls/comctl32/listview.c][include/listview.h]
[dlls/comctl32/commctrl.c][include/commctrl.h]
New files. Added Animation, ComboBoxEx, Hotkey and
Listview control dummies.
* [dlls/comctl32/tooltips.c]
Fixed a display bug and font selection.
* [dlls/comctl32/comctl32undoc.c][include/commctrl.h]
Added missing DPA functions. Fixed bugs and published the
function prototypes.
* [documentation/common_controls]
Updated.
Wed Sep 2 15:43:45 1998 Patrik Stridvall <ps@leissner.se>
* [AUTHORS] [include/authors.h]
Added myself as a Wine author.
* [memory/virtual.c] [objects/dc.c]
Fixed runtime errors for Solaris.
* [misc/ddeml.c] [objects/gdiobj.c]
Minor fixes.
* [win32/device.c]
Added stubs for IFSMgr VxDCall and
a partial implementation of IFSMgr DeviceIo.
* [relay32/Makefile.in] [relay32/builtin32.c] [relay32/imm32.spec]
[relay32/msnet32.spec] [relay32/oledlg.spec]
Added new spec files for IMM32.DLL, MSNET32.DLL, OLEDLG.DLL.
* [misc/Makefile.in] [misc/imm.c] [include/imm.h]
Added news files for implementation of IMM32.DLL.
All functions return 0 as is correct for all Western Languages.
* [ole/Makefile.in] [ole/oledlg.c] [include/oledlg.h]
Added new files for implementation of OLEDLG.DLL.
Added stubs with FIXME:s for all functions.
Wed Sep 2 10:50:00 1998 Juergen Schmied <juergen.schmied@metronet.de>
* [dlls/shell32/contmenu.c][dlls/shell32/shellole.c]
[dlls/shell32/shlfolder.c][dlls/shell32/shlview.c]
[documentation/shell32][include/shell.h]
Clean up, bugfixes.
* [dlls/shell32/enumidlist.c]
Fileattributes implemented.
* [dlls/shell32/pidl.c]
Class pidlmgr splited into functions, structures changed,
some functions rewritten.
* [dlls/shell32/shell32_main.c]
Small changes and bugfixes SHGetFileInfoA, SHGetSpecialFolderLocation.
* [dlls/shell32/shellord.c][relay32/shell32.spec]
Parameter documented, implemented SHCloneSpecialIDList.
Stub improved ShellExecuteEx32A.
New stubs SHFind_InitMenuPopup, FileMenu_InitMenuPopup,
FileMenu_Create, FileMenu_TrackPopupMenuEx, SHWinHelp,
SHRunConrolPanel, DAD_ShowDragImage, FileMenu_Destroy,
SHGetDataFromIDListA, SHFileOperationA.
* [include/winnls.h][include/ole2nls.c]
TIME_FORCE24HOURFORMAT, TIME_NOTIMEMARKER implemented
in OLE_GetFormatA, GetTimeFormat32A.
* [win32/code_page.c]
WideCharToMultiByte: parameter checking and returning of strlen
implemented.
* [windows/keyboard.c][windows/defwnd.c]
Debug messages added.
* [windows/win.c]
WIN_SetWindowLong GWL_STYLE and GWL_EXSTYLE implemented.
* [controls/menu.c]
Missing line added.
* [include/winerror.h]
Macros for SUCCEEDED and FAILED added.
Mon Aug 31 00:55:31 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de>
* [loader/module.c]
Bugfix: LoadModule16 should *not* call LoadModule32.
* [files/dos_fs.c]
Bugfix: don't crash if given directory doesn't exist.
Sat Aug 29 15:00:49 1998 Turchanov Sergey <turchanov@usa.net>
* [include/mmsystem.h][multimedia/mmsystem.c][relay32/winmm.spec]
Almost completed implementation of [snd]PlaySound (except
flags SND_ALIAS_ID and SND_APPLICATION).
* [if1632/user.spec][windows/winpos.c]
Added SetWindowRgn16 stub.
Sat Aug 29 02:53:31 1998 Alexander Lukyanov <lav@long.yar.ru>
* [files/drive.c]
GetDriveType32A: return DRIVE_DOESNOTEXIST in case of non
existent drive.
* [msdos/int21.c]
INT21_FindFirstFCB: check drive validity to prevent oops.
* [win32/file.c]
CreateFile32A: duplicate STD_{INPUT,OUTPUT}_HANDLE.
* [files/dos_fs.c]
Make DOSFS_OpenDir treat "" as "/".
DOSFS_OpenDevice: duplicate STD_{INPUT,OUTPUT}_HANDLE.
* [windows/dialog.c]
GetNextDlgTabItem32: use last/first item instead of first/last
when hwndCtrl==0. This fixes initial focus.
Sat Aug 29 02:46:32 1998 Adrian Harvey <adrian@select.com.au>
* [include/process.h] [include/process.c]
Renamed PROCESS_SELF to CURRENT_PROCESS_PSEUDOHANDLE in line
with thread constant, and Win32 documentation (which calls it
a pseudohandle.) Made GetCurrentProcess actually use this
constant instead of the value.
* [include/process.h] [include/thread.h] [scheduler/thread.c]
[scheduler/process.c] [scheduler/handle.c]
Modify HANDLE_GetObjPtr to understand about
CURRENT_THREAD_PSEUDOHANDLE and CURRENT_PROCESS_PSEUDOHANDLE.
This allows DuplicateHandle to do the correct thing with these
handles. Removed now duplicate functionality from THREAD_GetPtr
and PROCESS_GetPtr.
* [loader/ne/segment.c]
Fixed two places where HFILE32s were being created and passed to
16-bit code. This should unbreak NE self-loading code.
Added two casts to remove compile time warnings.
Fri Aug 28 21:04:13 1998 Joseph Pranevich <knight@baltimore.wwaves.com>
* [msdos/dosmem.c] [msdos/int2f.c]
Added beginnings of DOS error table.
* [msdos/int1a.c]
Stub for subfunction 0xb0.
* [msdos/int10.c] [loader/dos/dosvm.c]
INT 10 support completely rewritten and lots of debugging
added. Now, DOS apps that use INT 10 to write to the screen will
work. (Beyond Zork does, at least. Somewhat.)
* [include/miscemu.h] [msdos/dosmem.c] [msdos/int21.c]
Another shot at getting MS's generic error message facility
right.
* [msdos/int21.c]
Command.Com wanted to set its own PSP address. I let it.
Wed Aug 26 12:26:20 1998 Matthew Toseland <Matthew.Toseland@btinternet.com>
* [include/file.h] [misc/lzexpand.c]
Fixed LZCopy16 by fixing HFILE16/HFILE32 convertor macros so don't
convert lzw handles.
Tue Aug 25 22:22:55 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [misc/registry.c]
In RegEnumvalue, ivalue == 0 is a legal request and should
return the first entry.
* [msdos/int21.c]
Add handling for Int21-48/49 in Win16. Makes blinker demo work.
* [windows/winproc.c]
Add Msg32A<->Msg32W translation for LB_ADDSTRING.
Tue Aug 25 21:03:31 1998 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [windows/win.c]
Fix for SetParent(): MS Windows 3.11 does not clear the WS_CHILD
flag when a child window is reparented to the desktop window.
Mon Aug 24 20:55:22 1998 Berend Reitsma <berend at asset-control dot com>
* [controls/menu.c]
Menus created with SetMenuItemInfo and InsertMenuItem should
work now.
Sun Aug 23 23:23:23 1998 Alex Korobka <korobka@ams.sunysb.edu>
* [controls/combo.c]
Added CB_GETITEMHEIGHT.
* [windows/winpos.c]
WM_NCHITTEST, SWP_FRAMECHANGED bugfixes.
Sat Aug 22 21:15:29 1998 Alex Priem <alexp@sci.kun.nl>
* [files/profile.c] [include/windows.h]
Added GetPrivateProfileSectionNames[AW],GetPrivateProfileSectionW,
GetPrivateProfileStructW, GetProfileSectionW,
WriteProfileSection[AW], WritePrivateProfileStructW.
1998-09-13 18:32:00 +02:00
|
|
|
}
|
1998-11-08 12:40:00 +01:00
|
|
|
|
1998-11-15 10:22:23 +01:00
|
|
|
/***********************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* OleRegGetUserType (OLE32.@)
|
1999-05-02 11:27:08 +02:00
|
|
|
*
|
|
|
|
* 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.
|
1998-11-15 10:22:23 +01:00
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
HRESULT WINAPI OleRegGetUserType(
|
|
|
|
REFCLSID clsid,
|
1998-11-15 10:22:23 +01:00
|
|
|
DWORD dwFormOfType,
|
1999-02-26 12:11:13 +01:00
|
|
|
LPOLESTR* pszUserType)
|
1998-11-15 10:22:23 +01:00
|
|
|
{
|
2010-05-05 23:20:30 +02:00
|
|
|
WCHAR keyName[60];
|
2000-04-04 20:54:06 +02:00
|
|
|
DWORD dwKeyType;
|
|
|
|
DWORD cbData;
|
|
|
|
HKEY clsidKey;
|
|
|
|
LONG hres;
|
2010-05-05 23:20:30 +02:00
|
|
|
|
1999-05-02 11:27:08 +02:00
|
|
|
/*
|
|
|
|
* Initialize the out parameter.
|
|
|
|
*/
|
|
|
|
*pszUserType = NULL;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Build the key name we're looking for
|
|
|
|
*/
|
2010-05-05 23:20:30 +02:00
|
|
|
sprintfW( keyName, clsidfmtW,
|
|
|
|
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] );
|
1999-05-02 11:27:08 +02:00
|
|
|
|
2010-05-05 23:20:30 +02:00
|
|
|
TRACE("(%s, %d, %p)\n", debugstr_w(keyName), dwFormOfType, pszUserType);
|
1999-05-02 11:27:08 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Open the class id Key
|
|
|
|
*/
|
2010-05-05 23:20:30 +02:00
|
|
|
hres = RegOpenKeyW(HKEY_CLASSES_ROOT,
|
1999-05-02 11:27:08 +02:00
|
|
|
keyName,
|
|
|
|
&clsidKey);
|
|
|
|
|
|
|
|
if (hres != ERROR_SUCCESS)
|
|
|
|
return REGDB_E_CLASSNOTREG;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Retrieve the size of the name string.
|
|
|
|
*/
|
|
|
|
cbData = 0;
|
|
|
|
|
2010-05-05 23:20:30 +02:00
|
|
|
hres = RegQueryValueExW(clsidKey,
|
|
|
|
emptyW,
|
1999-05-02 11:27:08 +02:00
|
|
|
NULL,
|
|
|
|
&dwKeyType,
|
|
|
|
NULL,
|
|
|
|
&cbData);
|
|
|
|
|
|
|
|
if (hres!=ERROR_SUCCESS)
|
|
|
|
{
|
|
|
|
RegCloseKey(clsidKey);
|
|
|
|
return REGDB_E_READREGDB;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Allocate a buffer for the registry value.
|
|
|
|
*/
|
2010-05-05 23:20:30 +02:00
|
|
|
*pszUserType = CoTaskMemAlloc(cbData);
|
1999-05-02 11:27:08 +02:00
|
|
|
|
|
|
|
if (*pszUserType==NULL)
|
|
|
|
{
|
|
|
|
RegCloseKey(clsidKey);
|
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
}
|
|
|
|
|
2010-05-05 23:20:30 +02:00
|
|
|
hres = RegQueryValueExW(clsidKey,
|
|
|
|
emptyW,
|
1999-05-02 11:27:08 +02:00
|
|
|
NULL,
|
|
|
|
&dwKeyType,
|
2010-05-05 23:20:30 +02:00
|
|
|
(LPBYTE) *pszUserType,
|
1999-05-02 11:27:08 +02:00
|
|
|
&cbData);
|
|
|
|
|
|
|
|
RegCloseKey(clsidKey);
|
2000-04-04 20:54:06 +02:00
|
|
|
|
2010-05-05 23:20:30 +02:00
|
|
|
if (hres != ERROR_SUCCESS)
|
1999-05-02 11:27:08 +02:00
|
|
|
{
|
|
|
|
CoTaskMemFree(*pszUserType);
|
2010-05-05 23:20:30 +02:00
|
|
|
*pszUserType = NULL;
|
1999-05-02 11:27:08 +02:00
|
|
|
|
2010-05-05 23:20:30 +02:00
|
|
|
return REGDB_E_READREGDB;
|
1999-05-02 11:27:08 +02:00
|
|
|
}
|
|
|
|
|
2010-05-05 23:20:30 +02:00
|
|
|
return S_OK;
|
1998-11-15 10:22:23 +01:00
|
|
|
}
|
|
|
|
|
1999-01-23 12:54:12 +01:00
|
|
|
/***********************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* DoDragDrop [OLE32.@]
|
1999-01-23 12:54:12 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
HRESULT WINAPI DoDragDrop (
|
2000-12-02 00:58:28 +01:00
|
|
|
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 */
|
1999-01-23 12:54:12 +01:00
|
|
|
{
|
2010-04-27 21:41:04 +02:00
|
|
|
static const WCHAR trackerW[] = {'T','r','a','c','k','e','r','W','i','n','d','o','w',0};
|
1999-02-13 10:13:49 +01:00
|
|
|
TrackerWindowInfo trackerInfo;
|
1999-02-26 12:11:13 +01:00
|
|
|
HWND hwndTrackWindow;
|
|
|
|
MSG msg;
|
1999-02-13 10:13:49 +01:00
|
|
|
|
2010-05-01 19:37:46 +02:00
|
|
|
TRACE("(%p, %p, %d, %p)\n", pDataObject, pDropSource, dwOKEffect, pdwEffect);
|
|
|
|
|
|
|
|
if (!pDataObject || !pDropSource || !pdwEffect)
|
|
|
|
return E_INVALIDARG;
|
1999-02-13 10:13:49 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Setup the drag n drop tracking window.
|
|
|
|
*/
|
2003-01-13 21:37:39 +01:00
|
|
|
|
1999-02-13 10:13:49 +01:00
|
|
|
trackerInfo.dataObject = pDataObject;
|
|
|
|
trackerInfo.dropSource = pDropSource;
|
|
|
|
trackerInfo.dwOKEffect = dwOKEffect;
|
|
|
|
trackerInfo.pdwEffect = pdwEffect;
|
|
|
|
trackerInfo.trackingDone = FALSE;
|
|
|
|
trackerInfo.escPressed = FALSE;
|
|
|
|
trackerInfo.curDragTargetHWND = 0;
|
2003-01-28 02:06:20 +01:00
|
|
|
trackerInfo.curTargetHWND = 0;
|
1999-02-13 10:13:49 +01:00
|
|
|
trackerInfo.curDragTarget = 0;
|
|
|
|
|
2010-04-27 21:41:04 +02:00
|
|
|
hwndTrackWindow = CreateWindowW(OLEDD_DRAGTRACKERCLASS, trackerW,
|
2009-02-11 10:48:38 +01:00
|
|
|
WS_POPUP, CW_USEDEFAULT, CW_USEDEFAULT,
|
|
|
|
CW_USEDEFAULT, CW_USEDEFAULT, 0, 0, 0,
|
|
|
|
&trackerInfo);
|
1999-02-13 10:13:49 +01:00
|
|
|
|
2010-04-27 21:41:04 +02:00
|
|
|
if (hwndTrackWindow)
|
1999-02-13 10:13:49 +01:00
|
|
|
{
|
|
|
|
/*
|
|
|
|
* Capture the mouse input
|
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
SetCapture(hwndTrackWindow);
|
1999-02-13 10:13:49 +01:00
|
|
|
|
2006-01-18 11:29:13 +01:00
|
|
|
msg.message = 0;
|
|
|
|
|
1999-02-13 10:13:49 +01:00
|
|
|
/*
|
2007-10-23 15:30:30 +02:00
|
|
|
* Pump messages. All mouse input should go to the capture window.
|
1999-02-13 10:13:49 +01:00
|
|
|
*/
|
2010-04-27 21:41:04 +02:00
|
|
|
while (!trackerInfo.trackingDone && GetMessageW(&msg, 0, 0, 0) )
|
1999-02-13 10:13:49 +01:00
|
|
|
{
|
2005-12-12 12:42:53 +01:00
|
|
|
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) &&
|
2000-08-16 14:44:04 +02:00
|
|
|
(msg.message <= WM_KEYLAST) )
|
1999-02-13 10:13:49 +01:00
|
|
|
{
|
|
|
|
/*
|
|
|
|
* 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
|
|
|
*/
|
2005-12-12 12:42:53 +01:00
|
|
|
OLEDD_TrackStateChange(&trackerInfo);
|
1999-02-13 10:13:49 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* Dispatch the messages only when it's not a keyboard message.
|
|
|
|
*/
|
2010-04-27 21:41:04 +02:00
|
|
|
DispatchMessageW(&msg);
|
1999-02-13 10:13:49 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-01-18 11:29:13 +01:00
|
|
|
/* re-post the quit message to outer message loop */
|
|
|
|
if (msg.message == WM_QUIT)
|
|
|
|
PostQuitMessage(msg.wParam);
|
1999-02-13 10:13:49 +01:00
|
|
|
/*
|
|
|
|
* Destroy the temporary window.
|
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
DestroyWindow(hwndTrackWindow);
|
1999-02-13 10:13:49 +01:00
|
|
|
|
|
|
|
return trackerInfo.returnValue;
|
|
|
|
}
|
|
|
|
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* OleQueryLinkFromData [OLE32.@]
|
1999-02-13 10:13:49 +01:00
|
|
|
*/
|
1999-03-28 15:15:40 +02:00
|
|
|
HRESULT WINAPI OleQueryLinkFromData(
|
1999-02-13 10:13:49 +01:00
|
|
|
IDataObject* pSrcDataObject)
|
|
|
|
{
|
1999-07-04 18:02:24 +02:00
|
|
|
FIXME("(%p),stub!\n", pSrcDataObject);
|
2009-06-22 14:24:08 +02:00
|
|
|
return S_FALSE;
|
1999-02-13 10:13:49 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* OleRegGetMiscStatus [OLE32.@]
|
1999-02-13 10:13:49 +01:00
|
|
|
*/
|
1999-03-28 15:15:40 +02:00
|
|
|
HRESULT WINAPI OleRegGetMiscStatus(
|
1999-02-13 10:13:49 +01:00
|
|
|
REFCLSID clsid,
|
|
|
|
DWORD dwAspect,
|
|
|
|
DWORD* pdwStatus)
|
|
|
|
{
|
2010-05-05 23:20:30 +02:00
|
|
|
static const WCHAR miscstatusW[] = {'M','i','s','c','S','t','a','t','u','s',0};
|
|
|
|
static const WCHAR dfmtW[] = {'%','d',0};
|
|
|
|
WCHAR keyName[60];
|
1999-05-02 11:27:08 +02:00
|
|
|
HKEY clsidKey;
|
|
|
|
HKEY miscStatusKey;
|
|
|
|
HKEY aspectKey;
|
|
|
|
LONG result;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Initialize the out parameter.
|
|
|
|
*/
|
|
|
|
*pdwStatus = 0;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Build the key name we're looking for
|
|
|
|
*/
|
2010-05-05 23:20:30 +02:00
|
|
|
sprintfW( keyName, clsidfmtW,
|
|
|
|
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] );
|
1999-05-02 11:27:08 +02:00
|
|
|
|
2010-05-05 23:20:30 +02:00
|
|
|
TRACE("(%s, %d, %p)\n", debugstr_w(keyName), dwAspect, pdwStatus);
|
1999-05-02 11:27:08 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Open the class id Key
|
|
|
|
*/
|
2010-05-05 23:20:30 +02:00
|
|
|
result = RegOpenKeyW(HKEY_CLASSES_ROOT,
|
1999-05-02 11:27:08 +02:00
|
|
|
keyName,
|
|
|
|
&clsidKey);
|
|
|
|
|
|
|
|
if (result != ERROR_SUCCESS)
|
|
|
|
return REGDB_E_CLASSNOTREG;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Get the MiscStatus
|
|
|
|
*/
|
2010-05-05 23:20:30 +02:00
|
|
|
result = RegOpenKeyW(clsidKey,
|
|
|
|
miscstatusW,
|
1999-05-02 11:27:08 +02:00
|
|
|
&miscStatusKey);
|
|
|
|
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-05-02 11:27:08 +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.
|
|
|
|
*/
|
2010-05-05 23:20:30 +02:00
|
|
|
sprintfW(keyName, dfmtW, dwAspect);
|
1999-05-02 11:27:08 +02:00
|
|
|
|
2010-05-05 23:20:30 +02:00
|
|
|
result = RegOpenKeyW(miscStatusKey,
|
1999-05-02 11:27:08 +02:00
|
|
|
keyName,
|
|
|
|
&aspectKey);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-05-02 11:27:08 +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
|
|
|
|
{
|
2010-12-04 22:14:24 +01:00
|
|
|
IEnumOLEVERB IEnumOLEVERB_iface;
|
2005-09-23 12:08:25 +02:00
|
|
|
LONG ref;
|
|
|
|
|
|
|
|
HKEY hkeyVerb;
|
|
|
|
ULONG index;
|
|
|
|
} EnumOLEVERB;
|
|
|
|
|
2010-12-04 22:14:24 +01:00
|
|
|
static inline EnumOLEVERB *impl_from_IEnumOLEVERB(IEnumOLEVERB *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, EnumOLEVERB, IEnumOLEVERB_iface);
|
|
|
|
}
|
|
|
|
|
2005-09-23 12:08:25 +02:00
|
|
|
static HRESULT WINAPI EnumOLEVERB_QueryInterface(
|
|
|
|
IEnumOLEVERB *iface, REFIID riid, void **ppv)
|
|
|
|
{
|
|
|
|
TRACE("(%s, %p)\n", debugstr_guid(riid), ppv);
|
|
|
|
if (IsEqualIID(riid, &IID_IUnknown) ||
|
|
|
|
IsEqualIID(riid, &IID_IEnumOLEVERB))
|
|
|
|
{
|
|
|
|
IUnknown_AddRef(iface);
|
|
|
|
*ppv = iface;
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI EnumOLEVERB_AddRef(
|
|
|
|
IEnumOLEVERB *iface)
|
|
|
|
{
|
2010-12-04 22:14:24 +01:00
|
|
|
EnumOLEVERB *This = impl_from_IEnumOLEVERB(iface);
|
2005-09-23 12:08:25 +02:00
|
|
|
TRACE("()\n");
|
|
|
|
return InterlockedIncrement(&This->ref);
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI EnumOLEVERB_Release(
|
|
|
|
IEnumOLEVERB *iface)
|
|
|
|
{
|
2010-12-04 22:14:24 +01:00
|
|
|
EnumOLEVERB *This = impl_from_IEnumOLEVERB(iface);
|
2005-09-23 12:08:25 +02:00
|
|
|
LONG refs = InterlockedDecrement(&This->ref);
|
|
|
|
TRACE("()\n");
|
|
|
|
if (!refs)
|
|
|
|
{
|
|
|
|
RegCloseKey(This->hkeyVerb);
|
|
|
|
HeapFree(GetProcessHeap(), 0, This);
|
|
|
|
}
|
|
|
|
return refs;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI EnumOLEVERB_Next(
|
|
|
|
IEnumOLEVERB *iface, ULONG celt, LPOLEVERB rgelt,
|
|
|
|
ULONG *pceltFetched)
|
|
|
|
{
|
2010-12-04 22:14:24 +01:00
|
|
|
EnumOLEVERB *This = impl_from_IEnumOLEVERB(iface);
|
2005-09-23 12:08:25 +02:00
|
|
|
HRESULT hr = S_OK;
|
|
|
|
|
2006-10-15 12:28:08 +02:00
|
|
|
TRACE("(%d, %p, %p)\n", celt, rgelt, pceltFetched);
|
2005-09-23 12:08:25 +02:00
|
|
|
|
|
|
|
if (pceltFetched)
|
|
|
|
*pceltFetched = 0;
|
|
|
|
|
|
|
|
for (; celt; celt--, rgelt++)
|
|
|
|
{
|
|
|
|
WCHAR wszSubKey[20];
|
|
|
|
LONG cbData;
|
|
|
|
LPWSTR pwszOLEVERB;
|
|
|
|
LPWSTR pwszMenuFlags;
|
|
|
|
LPWSTR pwszAttribs;
|
|
|
|
LONG res = RegEnumKeyW(This->hkeyVerb, This->index, wszSubKey, sizeof(wszSubKey)/sizeof(wszSubKey[0]));
|
|
|
|
if (res == ERROR_NO_MORE_ITEMS)
|
|
|
|
{
|
|
|
|
hr = S_FALSE;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
else if (res != ERROR_SUCCESS)
|
|
|
|
{
|
2006-10-15 12:28:08 +02:00
|
|
|
ERR("RegEnumKeyW failed with error %d\n", res);
|
2005-09-23 12:08:25 +02:00
|
|
|
hr = REGDB_E_READREGDB;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
res = RegQueryValueW(This->hkeyVerb, wszSubKey, NULL, &cbData);
|
|
|
|
if (res != ERROR_SUCCESS)
|
|
|
|
{
|
2006-10-15 12:28:08 +02:00
|
|
|
ERR("RegQueryValueW failed with error %d\n", res);
|
2005-09-23 12:08:25 +02:00
|
|
|
hr = REGDB_E_READREGDB;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
pwszOLEVERB = CoTaskMemAlloc(cbData);
|
|
|
|
if (!pwszOLEVERB)
|
|
|
|
{
|
|
|
|
hr = E_OUTOFMEMORY;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
res = RegQueryValueW(This->hkeyVerb, wszSubKey, pwszOLEVERB, &cbData);
|
|
|
|
if (res != ERROR_SUCCESS)
|
|
|
|
{
|
2006-10-15 12:28:08 +02:00
|
|
|
ERR("RegQueryValueW failed with error %d\n", res);
|
2005-09-23 12:08:25 +02:00
|
|
|
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)
|
2006-03-02 18:03:32 +01:00
|
|
|
(*pceltFetched)++;
|
2005-09-23 12:08:25 +02:00
|
|
|
This->index++;
|
|
|
|
}
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI EnumOLEVERB_Skip(
|
|
|
|
IEnumOLEVERB *iface, ULONG celt)
|
|
|
|
{
|
2010-12-04 22:14:24 +01:00
|
|
|
EnumOLEVERB *This = impl_from_IEnumOLEVERB(iface);
|
2005-09-23 12:08:25 +02:00
|
|
|
|
2006-10-15 12:28:08 +02:00
|
|
|
TRACE("(%d)\n", celt);
|
2005-09-23 12:08:25 +02:00
|
|
|
|
|
|
|
This->index += celt;
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI EnumOLEVERB_Reset(
|
|
|
|
IEnumOLEVERB *iface)
|
|
|
|
{
|
2010-12-04 22:14:24 +01:00
|
|
|
EnumOLEVERB *This = impl_from_IEnumOLEVERB(iface);
|
2005-09-23 12:08:25 +02:00
|
|
|
|
|
|
|
TRACE("()\n");
|
|
|
|
|
|
|
|
This->index = 0;
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI EnumOLEVERB_Clone(
|
|
|
|
IEnumOLEVERB *iface,
|
|
|
|
IEnumOLEVERB **ppenum)
|
|
|
|
{
|
2010-12-04 22:14:24 +01:00
|
|
|
EnumOLEVERB *This = impl_from_IEnumOLEVERB(iface);
|
2005-09-23 12:08:25 +02:00
|
|
|
HKEY hkeyVerb;
|
|
|
|
TRACE("(%p)\n", ppenum);
|
|
|
|
if (!DuplicateHandle(GetCurrentProcess(), This->hkeyVerb, GetCurrentProcess(), (HANDLE *)&hkeyVerb, 0, FALSE, DUPLICATE_SAME_ACCESS))
|
|
|
|
return HRESULT_FROM_WIN32(GetLastError());
|
|
|
|
return EnumOLEVERB_Construct(hkeyVerb, This->index, ppenum);
|
|
|
|
}
|
|
|
|
|
|
|
|
static const IEnumOLEVERBVtbl EnumOLEVERB_VTable =
|
|
|
|
{
|
|
|
|
EnumOLEVERB_QueryInterface,
|
|
|
|
EnumOLEVERB_AddRef,
|
|
|
|
EnumOLEVERB_Release,
|
|
|
|
EnumOLEVERB_Next,
|
|
|
|
EnumOLEVERB_Skip,
|
|
|
|
EnumOLEVERB_Reset,
|
|
|
|
EnumOLEVERB_Clone
|
|
|
|
};
|
|
|
|
|
|
|
|
static HRESULT EnumOLEVERB_Construct(HKEY hkeyVerb, ULONG index, IEnumOLEVERB **ppenum)
|
|
|
|
{
|
|
|
|
EnumOLEVERB *This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
|
|
|
|
if (!This)
|
|
|
|
{
|
|
|
|
RegCloseKey(hkeyVerb);
|
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
}
|
2010-12-04 22:14:24 +01:00
|
|
|
This->IEnumOLEVERB_iface.lpVtbl = &EnumOLEVERB_VTable;
|
2005-09-23 12:08:25 +02:00
|
|
|
This->ref = 1;
|
|
|
|
This->index = index;
|
|
|
|
This->hkeyVerb = hkeyVerb;
|
2010-12-04 22:14:24 +01:00
|
|
|
*ppenum = &This->IEnumOLEVERB_iface;
|
|
|
|
return S_OK;
|
2005-09-23 12:08:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* OleRegEnumVerbs [OLE32.@]
|
|
|
|
*
|
|
|
|
* Enumerates verbs associated with a class stored in the registry.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* clsid [I] Class ID to enumerate the verbs for.
|
|
|
|
* ppenum [O] Enumerator.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* S_OK: Success.
|
|
|
|
* REGDB_E_CLASSNOTREG: The specified class does not have a key in the registry.
|
|
|
|
* REGDB_E_READREGDB: The class key could not be opened for some other reason.
|
|
|
|
* OLE_E_REGDB_KEY: The Verb subkey for the class is not present.
|
|
|
|
* OLEOBJ_E_NOVERBS: The Verb subkey for the class is empty.
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI OleRegEnumVerbs (REFCLSID clsid, LPENUMOLEVERB* ppenum)
|
|
|
|
{
|
|
|
|
LONG res;
|
|
|
|
HKEY hkeyVerb;
|
|
|
|
DWORD dwSubKeys;
|
|
|
|
static const WCHAR wszVerb[] = {'V','e','r','b',0};
|
|
|
|
|
|
|
|
TRACE("(%s, %p)\n", debugstr_guid(clsid), ppenum);
|
|
|
|
|
2005-11-09 11:29:11 +01:00
|
|
|
res = COM_OpenKeyForCLSID(clsid, wszVerb, KEY_READ, &hkeyVerb);
|
|
|
|
if (FAILED(res))
|
2005-09-23 12:08:25 +02:00
|
|
|
{
|
2005-11-09 11:29:11 +01: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
|
2006-10-15 12:28:08 +02:00
|
|
|
ERR("failed to open Verbs key for CLSID %s with error %d\n",
|
2005-11-09 11:29:11 +01:00
|
|
|
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)
|
|
|
|
{
|
2006-10-15 12:28:08 +02:00
|
|
|
ERR("failed to get subkey count with error %d\n", GetLastError());
|
2005-09-23 12:08:25 +02:00
|
|
|
return REGDB_E_READREGDB;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!dwSubKeys)
|
|
|
|
{
|
|
|
|
WARN("class %s has no verbs\n", debugstr_guid(clsid));
|
|
|
|
RegCloseKey(hkeyVerb);
|
|
|
|
return OLEOBJ_E_NOVERBS;
|
|
|
|
}
|
|
|
|
|
|
|
|
return EnumOLEVERB_Construct(hkeyVerb, 0, ppenum);
|
|
|
|
}
|
|
|
|
|
1999-05-02 11:27:08 +02:00
|
|
|
/******************************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* OleSetContainedObject [OLE32.@]
|
1999-05-02 11:27:08 +02:00
|
|
|
*/
|
|
|
|
HRESULT WINAPI OleSetContainedObject(
|
2002-06-01 01:06:46 +02:00
|
|
|
LPUNKNOWN pUnknown,
|
1999-05-02 11:27:08 +02:00
|
|
|
BOOL fContained)
|
|
|
|
{
|
|
|
|
IRunnableObject* runnable = NULL;
|
|
|
|
HRESULT hres;
|
|
|
|
|
2006-01-06 21:08:09 +01:00
|
|
|
TRACE("(%p,%x)\n", pUnknown, fContained);
|
1999-05-02 11:27:08 +02:00
|
|
|
|
|
|
|
hres = IUnknown_QueryInterface(pUnknown,
|
|
|
|
&IID_IRunnableObject,
|
2004-05-21 22:52:57 +02:00
|
|
|
(void**)&runnable);
|
1999-05-02 11:27:08 +02:00
|
|
|
|
|
|
|
if (SUCCEEDED(hres))
|
|
|
|
{
|
|
|
|
hres = IRunnableObject_SetContainedObject(runnable, fContained);
|
|
|
|
|
|
|
|
IRunnableObject_Release(runnable);
|
|
|
|
|
|
|
|
return hres;
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2007-03-26 19:25:21 +02:00
|
|
|
/******************************************************************************
|
|
|
|
* OleRun [OLE32.@]
|
|
|
|
*
|
|
|
|
* Set the OLE object to the running state.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* pUnknown [I] OLE object to run.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: S_OK.
|
|
|
|
* Failure: Any HRESULT code.
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI OleRun(LPUNKNOWN pUnknown)
|
|
|
|
{
|
|
|
|
IRunnableObject *runable;
|
|
|
|
HRESULT hres;
|
|
|
|
|
|
|
|
TRACE("(%p)\n", pUnknown);
|
|
|
|
|
|
|
|
hres = IUnknown_QueryInterface(pUnknown, &IID_IRunnableObject, (void**)&runable);
|
|
|
|
if (FAILED(hres))
|
|
|
|
return S_OK; /* Appears to return no error. */
|
|
|
|
|
|
|
|
hres = IRunnableObject_Run(runable, NULL);
|
|
|
|
IRunnableObject_Release(runable);
|
|
|
|
return hres;
|
|
|
|
}
|
|
|
|
|
1999-05-02 11:27:08 +02:00
|
|
|
/******************************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* OleLoad [OLE32.@]
|
1999-05-02 11:27:08 +02:00
|
|
|
*/
|
|
|
|
HRESULT WINAPI OleLoad(
|
2002-06-01 01:06:46 +02:00
|
|
|
LPSTORAGE pStg,
|
|
|
|
REFIID riid,
|
|
|
|
LPOLECLIENTSITE pClientSite,
|
1999-05-02 11:27:08 +02:00
|
|
|
LPVOID* ppvObj)
|
|
|
|
{
|
|
|
|
IPersistStorage* persistStorage = NULL;
|
2006-08-31 18:17:55 +02:00
|
|
|
IUnknown* pUnk;
|
|
|
|
IOleObject* pOleObject = NULL;
|
1999-05-02 11:27:08 +02:00
|
|
|
STATSTG storageInfo;
|
|
|
|
HRESULT hres;
|
|
|
|
|
2007-03-14 16:53:33 +01:00
|
|
|
TRACE("(%p, %s, %p, %p)\n", pStg, debugstr_guid(riid), pClientSite, ppvObj);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2006-08-31 18:17:55 +02:00
|
|
|
*ppvObj = NULL;
|
|
|
|
|
1999-05-02 11:27:08 +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,
|
2007-03-05 21:44:52 +01:00
|
|
|
CLSCTX_INPROC_HANDLER|CLSCTX_INPROC_SERVER,
|
2006-08-31 18:17:55 +02:00
|
|
|
riid,
|
|
|
|
(void**)&pUnk);
|
1999-05-02 11:27:08 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* If that fails, as it will most times, load the default
|
|
|
|
* OLE handler.
|
|
|
|
*/
|
|
|
|
if (FAILED(hres))
|
|
|
|
{
|
|
|
|
hres = OleCreateDefaultHandler(&storageInfo.clsid,
|
|
|
|
NULL,
|
2006-08-31 18:17:55 +02:00
|
|
|
riid,
|
|
|
|
(void**)&pUnk);
|
1999-05-02 11:27:08 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* If we couldn't find a handler... this is bad. Abort the whole thing.
|
|
|
|
*/
|
|
|
|
if (FAILED(hres))
|
|
|
|
return hres;
|
|
|
|
|
2006-08-31 18:17:55 +02:00
|
|
|
if (pClientSite)
|
|
|
|
{
|
|
|
|
hres = IUnknown_QueryInterface(pUnk, &IID_IOleObject, (void **)&pOleObject);
|
|
|
|
if (SUCCEEDED(hres))
|
|
|
|
{
|
|
|
|
DWORD dwStatus;
|
|
|
|
hres = IOleObject_GetMiscStatus(pOleObject, DVASPECT_CONTENT, &dwStatus);
|
|
|
|
}
|
|
|
|
}
|
1999-05-02 11:27:08 +02:00
|
|
|
|
2010-10-18 04:19:23 +02:00
|
|
|
/*
|
|
|
|
* Initialize the object with its IPersistStorage interface.
|
|
|
|
*/
|
|
|
|
hres = IOleObject_QueryInterface(pUnk,
|
|
|
|
&IID_IPersistStorage,
|
|
|
|
(void**)&persistStorage);
|
1999-05-02 11:27:08 +02:00
|
|
|
|
2002-06-01 01:06:46 +02:00
|
|
|
if (SUCCEEDED(hres))
|
1999-05-02 11:27:08 +02:00
|
|
|
{
|
2006-08-31 18:17:55 +02:00
|
|
|
hres = IPersistStorage_Load(persistStorage, pStg);
|
1999-05-02 11:27:08 +02:00
|
|
|
|
|
|
|
IPersistStorage_Release(persistStorage);
|
|
|
|
persistStorage = NULL;
|
|
|
|
}
|
|
|
|
|
2006-08-31 18:17:55 +02:00
|
|
|
if (SUCCEEDED(hres) && pClientSite)
|
|
|
|
/*
|
|
|
|
* Inform the new object of it's client site.
|
|
|
|
*/
|
|
|
|
hres = IOleObject_SetClientSite(pOleObject, pClientSite);
|
1999-05-02 11:27:08 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Cleanup interfaces used internally
|
|
|
|
*/
|
2006-08-31 18:17:55 +02:00
|
|
|
if (pOleObject)
|
|
|
|
IOleObject_Release(pOleObject);
|
|
|
|
|
2006-08-31 18:18:36 +02:00
|
|
|
if (SUCCEEDED(hres))
|
|
|
|
{
|
|
|
|
IOleLink *pOleLink;
|
|
|
|
HRESULT hres1;
|
|
|
|
hres1 = IUnknown_QueryInterface(pUnk, &IID_IOleLink, (void **)&pOleLink);
|
|
|
|
if (SUCCEEDED(hres1))
|
|
|
|
{
|
|
|
|
FIXME("handle OLE link\n");
|
|
|
|
IOleLink_Release(pOleLink);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-08-31 18:17:55 +02:00
|
|
|
if (FAILED(hres))
|
|
|
|
{
|
|
|
|
IUnknown_Release(pUnk);
|
|
|
|
pUnk = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
*ppvObj = pUnk;
|
1999-05-02 11:27:08 +02:00
|
|
|
|
|
|
|
return hres;
|
1999-02-13 10:13:49 +01:00
|
|
|
}
|
|
|
|
|
1999-05-08 12:55:32 +02:00
|
|
|
/***********************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* OleSave [OLE32.@]
|
1999-05-08 12:55:32 +02:00
|
|
|
*/
|
|
|
|
HRESULT WINAPI OleSave(
|
|
|
|
LPPERSISTSTORAGE pPS,
|
|
|
|
LPSTORAGE pStg,
|
|
|
|
BOOL fSameAsLoad)
|
|
|
|
{
|
|
|
|
HRESULT hres;
|
|
|
|
CLSID objectClass;
|
|
|
|
|
1999-07-04 18:02:24 +02:00
|
|
|
TRACE("(%p,%p,%x)\n", pPS, pStg, fSameAsLoad);
|
1999-05-08 12:55:32 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* 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
|
|
|
|
1999-05-08 12:55:32 +02:00
|
|
|
return hres;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2000-10-12 22:40:32 +02:00
|
|
|
/******************************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* OleLockRunning [OLE32.@]
|
2000-10-12 22:40:32 +02:00
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
HRESULT WINAPI OleLockRunning(LPUNKNOWN pUnknown, BOOL fLock, BOOL fLastUnlockCloses)
|
2000-10-12 22:40:32 +02:00
|
|
|
{
|
|
|
|
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);
|
2000-10-12 22:40:32 +02:00
|
|
|
|
|
|
|
if (SUCCEEDED(hres))
|
|
|
|
{
|
|
|
|
hres = IRunnableObject_LockRunning(runnable, fLock, fLastUnlockCloses);
|
|
|
|
|
|
|
|
IRunnableObject_Release(runnable);
|
|
|
|
|
|
|
|
return hres;
|
|
|
|
}
|
2009-11-11 11:21:11 +01:00
|
|
|
|
|
|
|
return S_OK;
|
2000-10-12 22:40:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
1999-04-01 13:48:01 +02:00
|
|
|
/**************************************************************************
|
|
|
|
* Internal methods to manage the shared OLE menu in response to the
|
|
|
|
* OLE***MenuDescriptor API
|
|
|
|
*/
|
|
|
|
|
|
|
|
/***
|
|
|
|
* OLEMenu_Initialize()
|
|
|
|
*
|
|
|
|
* Initializes the OLEMENU data structures.
|
|
|
|
*/
|
2006-08-02 13:31:26 +02:00
|
|
|
static void OLEMenu_Initialize(void)
|
1999-04-01 13:48:01 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/***
|
|
|
|
* OLEMenu_UnInitialize()
|
|
|
|
*
|
|
|
|
* Releases the OLEMENU data structures.
|
|
|
|
*/
|
2006-08-02 13:31:26 +02:00
|
|
|
static void OLEMenu_UnInitialize(void)
|
1999-04-01 13:48:01 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* 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
|
1999-04-01 13:48:01 +02:00
|
|
|
* FALSE on failure
|
|
|
|
*/
|
2006-08-02 13:31:26 +02:00
|
|
|
static BOOL OLEMenu_InstallHooks( DWORD tid )
|
1999-04-01 13:48:01 +02:00
|
|
|
{
|
2010-04-27 21:41:04 +02:00
|
|
|
OleMenuHookItem *pHookItem;
|
1999-04-01 13:48:01 +02:00
|
|
|
|
|
|
|
/* Create an entry for the hook table */
|
|
|
|
if ( !(pHookItem = HeapAlloc(GetProcessHeap(), 0,
|
|
|
|
sizeof(OleMenuHookItem)) ) )
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
pHookItem->tid = tid;
|
|
|
|
pHookItem->hHeap = GetProcessHeap();
|
2010-04-27 21:45:07 +02:00
|
|
|
pHookItem->CallWndProc_hHook = NULL;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-04-01 13:48:01 +02:00
|
|
|
/* Install a thread scope message hook for WH_GETMESSAGE */
|
2010-04-27 21:41:04 +02:00
|
|
|
pHookItem->GetMsg_hHook = SetWindowsHookExW( WH_GETMESSAGE, OLEMenu_GetMsgProc,
|
1999-04-01 13:48:01 +02:00
|
|
|
0, GetCurrentThreadId() );
|
|
|
|
if ( !pHookItem->GetMsg_hHook )
|
|
|
|
goto CLEANUP;
|
|
|
|
|
|
|
|
/* Install a thread scope message hook for WH_CALLWNDPROC */
|
2010-04-27 21:41:04 +02:00
|
|
|
pHookItem->CallWndProc_hHook = SetWindowsHookExW( WH_CALLWNDPROC, OLEMenu_CallWndProc,
|
1999-04-01 13:48:01 +02:00
|
|
|
0, GetCurrentThreadId() );
|
|
|
|
if ( !pHookItem->CallWndProc_hHook )
|
|
|
|
goto CLEANUP;
|
|
|
|
|
|
|
|
/* Insert the hook table entry */
|
2000-01-26 03:25:44 +01:00
|
|
|
pHookItem->next = hook_list;
|
|
|
|
hook_list = pHookItem;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-04-01 13:48:01 +02:00
|
|
|
return TRUE;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-04-01 13:48:01 +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
|
|
|
|
1999-04-01 13:48:01 +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
|
1999-04-01 13:48:01 +02:00
|
|
|
* FALSE on failure
|
|
|
|
*/
|
2006-08-02 13:31:26 +02:00
|
|
|
static BOOL OLEMenu_UnInstallHooks( DWORD tid )
|
1999-04-01 13:48:01 +02:00
|
|
|
{
|
|
|
|
OleMenuHookItem *pHookItem = NULL;
|
2000-01-26 03:25:44 +01:00
|
|
|
OleMenuHookItem **ppHook = &hook_list;
|
1999-04-01 13:48:01 +02:00
|
|
|
|
2000-01-26 03:25:44 +01:00
|
|
|
while (*ppHook)
|
|
|
|
{
|
|
|
|
if ((*ppHook)->tid == tid)
|
|
|
|
{
|
|
|
|
pHookItem = *ppHook;
|
|
|
|
*ppHook = pHookItem->next;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
ppHook = &(*ppHook)->next;
|
|
|
|
}
|
|
|
|
if (!pHookItem) return FALSE;
|
1999-04-01 13:48:01 +02:00
|
|
|
|
|
|
|
/* 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 */
|
2004-12-23 18:06:43 +01:00
|
|
|
HeapFree(pHookItem->hHeap, 0, pHookItem );
|
1999-04-01 13:48:01 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
*/
|
2006-08-02 13:31:26 +02:00
|
|
|
static OleMenuHookItem * OLEMenu_IsHookInstalled( DWORD tid )
|
1999-04-01 13:48:01 +02:00
|
|
|
{
|
2010-04-27 21:41:04 +02:00
|
|
|
OleMenuHookItem *pHookItem;
|
1999-04-01 13:48:01 +02:00
|
|
|
|
|
|
|
/* Do a simple linear search for an entry whose tid matches ours.
|
|
|
|
* We really need a map but efficiency is not a concern here. */
|
2000-01-26 03:25:44 +01:00
|
|
|
for (pHookItem = hook_list; pHookItem; pHookItem = pHookItem->next)
|
1999-04-01 13:48:01 +02:00
|
|
|
{
|
|
|
|
if ( tid == pHookItem->tid )
|
|
|
|
return pHookItem;
|
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-04-01 13:48:01 +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 )
|
|
|
|
{
|
2008-10-03 16:55:57 +02:00
|
|
|
INT i, nItems;
|
1999-04-01 13:48:01 +02:00
|
|
|
|
|
|
|
nItems = GetMenuItemCount( hMainMenu );
|
|
|
|
|
|
|
|
for (i = 0; i < nItems; i++)
|
|
|
|
{
|
|
|
|
HMENU hsubmenu;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-04-01 13:48:01 +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
|
1999-04-01 13:48:01 +02:00
|
|
|
*/
|
2006-08-02 13:31:26 +02:00
|
|
|
static BOOL OLEMenu_SetIsServerMenu( HMENU hmenu, OleMenuDescriptor *pOleMenuDescriptor )
|
1999-04-01 13:48:01 +02:00
|
|
|
{
|
|
|
|
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
|
|
|
|
1999-04-01 13:48:01 +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.
|
2001-08-21 19:07:17 +02:00
|
|
|
* Loop through the group widths and locate the group we are a member of.
|
1999-04-01 13:48:01 +02:00
|
|
|
*/
|
|
|
|
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.
|
|
|
|
*/
|
2006-08-02 13:31:26 +02:00
|
|
|
static LRESULT CALLBACK OLEMenu_CallWndProc(INT code, WPARAM wParam, LPARAM lParam)
|
1999-04-01 13:48:01 +02:00
|
|
|
{
|
2010-04-27 21:41:04 +02:00
|
|
|
LPCWPSTRUCT pMsg;
|
1999-04-01 13:48:01 +02:00
|
|
|
HOLEMENU hOleMenu = 0;
|
|
|
|
OleMenuDescriptor *pOleMenuDescriptor = NULL;
|
|
|
|
OleMenuHookItem *pHookItem = NULL;
|
|
|
|
WORD fuFlags;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2007-05-24 16:41:17 +02:00
|
|
|
TRACE("%i, %04lx, %08lx\n", code, wParam, lParam );
|
1999-04-01 13:48:01 +02:00
|
|
|
|
|
|
|
/* Check if we're being asked to process the message */
|
|
|
|
if ( HC_ACTION != code )
|
|
|
|
goto NEXTHOOK;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-04-01 13:48:01 +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. */
|
|
|
|
|
2010-04-27 21:41:04 +02:00
|
|
|
hOleMenu = GetPropW( pMsg->hwnd, prop_olemenuW );
|
1999-04-01 13:48:01 +02:00
|
|
|
if ( !hOleMenu )
|
|
|
|
goto NEXTHOOK;
|
|
|
|
|
|
|
|
/* Get the menu descriptor */
|
2008-11-05 23:04:10 +01:00
|
|
|
pOleMenuDescriptor = GlobalLock( hOleMenu );
|
1999-04-01 13:48:01 +02:00
|
|
|
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 */
|
2010-04-27 21:41:04 +02:00
|
|
|
SendMessageW( pOleMenuDescriptor->hwndActiveObject,
|
1999-04-01 13:48:01 +02:00
|
|
|
pMsg->message, pMsg->wParam, pMsg->lParam );
|
|
|
|
goto NEXTHOOK;
|
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-04-01 13:48:01 +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
|
|
|
|
1999-04-01 13:48:01 +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
|
|
|
|
1999-04-01 13:48:01 +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 )
|
|
|
|
{
|
2010-04-27 21:41:04 +02:00
|
|
|
SendMessageW( pOleMenuDescriptor->hwndActiveObject,
|
1999-04-01 13:48:01 +02:00
|
|
|
pMsg->message, pMsg->wParam, pMsg->lParam );
|
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-04-01 13:48:01 +02:00
|
|
|
NEXTHOOK:
|
|
|
|
if ( pOleMenuDescriptor )
|
|
|
|
GlobalUnlock( hOleMenu );
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-04-01 13:48:01 +02:00
|
|
|
/* Lookup the hook item for the current thread */
|
2000-01-26 03:25:44 +01:00
|
|
|
if ( !( pHookItem = OLEMenu_IsHookInstalled( GetCurrentThreadId() ) ) )
|
1999-04-01 13:48:01 +02:00
|
|
|
{
|
|
|
|
/* This should never fail!! */
|
1999-07-04 18:02:24 +02:00
|
|
|
WARN("could not retrieve hHook for current thread!\n" );
|
1999-04-01 13:48:01 +02:00
|
|
|
return 0;
|
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-04-01 13:48:01 +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.
|
|
|
|
*/
|
2006-08-02 13:31:26 +02:00
|
|
|
static LRESULT CALLBACK OLEMenu_GetMsgProc(INT code, WPARAM wParam, LPARAM lParam)
|
1999-04-01 13:48:01 +02:00
|
|
|
{
|
2010-04-27 21:41:04 +02:00
|
|
|
LPMSG pMsg;
|
1999-04-01 13:48:01 +02:00
|
|
|
HOLEMENU hOleMenu = 0;
|
|
|
|
OleMenuDescriptor *pOleMenuDescriptor = NULL;
|
|
|
|
OleMenuHookItem *pHookItem = NULL;
|
|
|
|
WORD wCode;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2007-05-24 16:41:17 +02:00
|
|
|
TRACE("%i, %04lx, %08lx\n", code, wParam, lParam );
|
1999-04-01 13:48:01 +02:00
|
|
|
|
|
|
|
/* Check if we're being asked to process a messages */
|
|
|
|
if ( HC_ACTION != code )
|
|
|
|
goto NEXTHOOK;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-04-01 13:48:01 +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. */
|
|
|
|
|
2010-04-27 21:41:04 +02:00
|
|
|
hOleMenu = GetPropW( pMsg->hwnd, prop_olemenuW );
|
1999-04-01 13:48:01 +02:00
|
|
|
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 */
|
2008-11-05 23:04:10 +01:00
|
|
|
pOleMenuDescriptor = GlobalLock( hOleMenu );
|
1999-04-01 13:48:01 +02:00
|
|
|
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
|
|
|
|
1999-04-01 13:48:01 +02:00
|
|
|
NEXTHOOK:
|
|
|
|
if ( pOleMenuDescriptor )
|
|
|
|
GlobalUnlock( hOleMenu );
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-04-01 13:48:01 +02:00
|
|
|
/* Lookup the hook item for the current thread */
|
2000-01-26 03:25:44 +01:00
|
|
|
if ( !( pHookItem = OLEMenu_IsHookInstalled( GetCurrentThreadId() ) ) )
|
1999-04-01 13:48:01 +02:00
|
|
|
{
|
|
|
|
/* This should never fail!! */
|
1999-07-04 18:02:24 +02:00
|
|
|
WARN("could not retrieve hHook for current thread!\n" );
|
1999-04-01 13:48:01 +02:00
|
|
|
return FALSE;
|
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-04-01 13:48:01 +02:00
|
|
|
/* Pass on the message to the next hooker */
|
|
|
|
return CallNextHookEx( pHookItem->GetMsg_hHook, code, wParam, lParam );
|
|
|
|
}
|
|
|
|
|
1999-02-20 17:05:50 +01:00
|
|
|
/***********************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* OleCreateMenuDescriptor [OLE32.@]
|
1999-04-01 13:48:01 +02:00
|
|
|
* 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
|
|
|
|
*
|
1999-02-20 17:05:50 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
HOLEMENU WINAPI OleCreateMenuDescriptor(
|
|
|
|
HMENU hmenuCombined,
|
|
|
|
LPOLEMENUGROUPWIDTHS lpMenuWidths)
|
1999-02-20 17:05:50 +01:00
|
|
|
{
|
1999-04-01 13:48:01 +02:00
|
|
|
HOLEMENU hOleMenu;
|
|
|
|
OleMenuDescriptor *pOleMenuDescriptor;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
if ( !hmenuCombined || !lpMenuWidths )
|
|
|
|
return 0;
|
1999-02-20 17:05:50 +01:00
|
|
|
|
1999-04-01 13:48:01 +02:00
|
|
|
/* Create an OLE menu descriptor */
|
|
|
|
if ( !(hOleMenu = GlobalAlloc(GMEM_MOVEABLE | GMEM_ZEROINIT,
|
|
|
|
sizeof(OleMenuDescriptor) ) ) )
|
1999-03-18 18:39:57 +01:00
|
|
|
return 0;
|
1999-04-01 13:48:01 +02:00
|
|
|
|
2008-11-05 23:04:10 +01:00
|
|
|
pOleMenuDescriptor = GlobalLock( hOleMenu );
|
1999-04-01 13:48:01 +02:00
|
|
|
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
|
|
|
|
1999-04-01 13:48:01 +02:00
|
|
|
pOleMenuDescriptor->hmenuCombined = hmenuCombined;
|
|
|
|
pOleMenuDescriptor->bIsServerItem = FALSE;
|
|
|
|
GlobalUnlock( hOleMenu );
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-04-01 13:48:01 +02:00
|
|
|
return hOleMenu;
|
1999-02-20 17:05:50 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* OleDestroyMenuDescriptor [OLE32.@]
|
1999-04-01 13:48:01 +02:00
|
|
|
* Destroy the shared menu descriptor
|
1999-02-20 17:05:50 +01:00
|
|
|
*/
|
1999-03-14 14:47:00 +01:00
|
|
|
HRESULT WINAPI OleDestroyMenuDescriptor(
|
1999-02-26 12:11:13 +01:00
|
|
|
HOLEMENU hmenuDescriptor)
|
1999-02-20 17:05:50 +01:00
|
|
|
{
|
1999-04-01 13:48:01 +02:00
|
|
|
if ( hmenuDescriptor )
|
|
|
|
GlobalFree( hmenuDescriptor );
|
1999-03-14 14:47:00 +01:00
|
|
|
return S_OK;
|
1999-02-20 17:05:50 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
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
|
1999-04-01 13:48:01 +02:00
|
|
|
* 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
|
1999-04-01 13:48:01 +02:00
|
|
|
* 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.
|
1999-02-20 17:05:50 +01:00
|
|
|
*/
|
|
|
|
HRESULT WINAPI OleSetMenuDescriptor(
|
1999-04-01 13:48:01 +02:00
|
|
|
HOLEMENU hOleMenu,
|
1999-02-26 12:11:13 +01:00
|
|
|
HWND hwndFrame,
|
|
|
|
HWND hwndActiveObject,
|
1999-02-20 17:05:50 +01:00
|
|
|
LPOLEINPLACEFRAME lpFrame,
|
|
|
|
LPOLEINPLACEACTIVEOBJECT lpActiveObject)
|
|
|
|
{
|
1999-04-01 13:48:01 +02:00
|
|
|
OleMenuDescriptor *pOleMenuDescriptor = NULL;
|
|
|
|
|
|
|
|
/* Check args */
|
|
|
|
if ( !hwndFrame || (hOleMenu && !hwndActiveObject) )
|
|
|
|
return E_INVALIDARG;
|
|
|
|
|
|
|
|
if ( lpFrame || lpActiveObject )
|
|
|
|
{
|
2005-09-12 12:30:05 +02:00
|
|
|
FIXME("(%p, %p, %p, %p, %p), Context sensitive help filtering not implemented!\n",
|
|
|
|
hOleMenu,
|
1999-02-20 17:05:50 +01:00
|
|
|
hwndFrame,
|
|
|
|
hwndActiveObject,
|
|
|
|
lpFrame,
|
|
|
|
lpActiveObject);
|
1999-04-01 13:48:01 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Set up a message hook to intercept the containers frame window messages.
|
|
|
|
* The message filter is responsible for dispatching menu messages from the
|
|
|
|
* shared menu which are intended for the object.
|
|
|
|
*/
|
1999-02-20 17:05:50 +01:00
|
|
|
|
1999-04-01 13:48:01 +02:00
|
|
|
if ( hOleMenu ) /* Want to install dispatching code */
|
|
|
|
{
|
|
|
|
/* If OLEMenu hooks are already installed for this thread, fail
|
|
|
|
* Note: This effectively means that OleSetMenuDescriptor cannot
|
|
|
|
* be called twice in succession on the same frame window
|
|
|
|
* without first calling it with a null hOleMenu to uninstall */
|
2000-01-26 03:25:44 +01:00
|
|
|
if ( OLEMenu_IsHookInstalled( GetCurrentThreadId() ) )
|
1999-02-20 17:05:50 +01:00
|
|
|
return E_FAIL;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-04-01 13:48:01 +02:00
|
|
|
/* Get the menu descriptor */
|
2008-11-05 23:04:10 +01:00
|
|
|
pOleMenuDescriptor = GlobalLock( hOleMenu );
|
1999-04-01 13:48:01 +02:00
|
|
|
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
|
|
|
|
1999-04-01 13:48:01 +02:00
|
|
|
/* Add a menu descriptor windows property to the frame window */
|
2010-04-27 21:41:04 +02:00
|
|
|
SetPropW( hwndFrame, prop_olemenuW, hOleMenu );
|
1999-04-01 13:48:01 +02:00
|
|
|
|
|
|
|
/* 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
|
|
|
|
1999-04-01 13:48:01 +02:00
|
|
|
/* Remove the menu descriptor property from the frame window */
|
2010-04-27 21:41:04 +02:00
|
|
|
RemovePropW( hwndFrame, prop_olemenuW );
|
1999-04-01 13:48:01 +02:00
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-04-01 13:48:01 +02:00
|
|
|
return S_OK;
|
1999-02-20 17:05:50 +01:00
|
|
|
}
|
|
|
|
|
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)
|
|
|
|
{
|
2004-01-28 21:06:35 +01:00
|
|
|
LPACCEL lpAccelTbl;
|
2001-04-16 20:58:09 +02:00
|
|
|
int i;
|
|
|
|
|
|
|
|
if(!lpMsg) return FALSE;
|
2004-01-28 21:06:35 +01:00
|
|
|
if (!hAccel)
|
2001-04-16 20:58:09 +02:00
|
|
|
{
|
2004-01-28 21:06:35 +01: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_SYSKEYDOWN &&
|
2007-04-30 21:20:20 +02:00
|
|
|
lpMsg->message != WM_SYSCHAR &&
|
2001-04-16 20:58:09 +02:00
|
|
|
lpMsg->message != WM_CHAR)) return FALSE;
|
2004-01-28 21:06:35 +01:00
|
|
|
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,"
|
2007-05-24 16:41:17 +02:00
|
|
|
"msg->hwnd=%p, msg->message=%04x, wParam=%08lx, 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))
|
|
|
|
{
|
2007-05-24 16:41:17 +02:00
|
|
|
TRACE_(accel)("found accel for WM_CHAR: ('%c')\n", LOWORD(lpMsg->wParam) & 0xff);
|
2001-04-16 20:58:09 +02:00
|
|
|
goto found;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if(lpAccelTbl[i].fVirt & FVIRTKEY)
|
|
|
|
{
|
|
|
|
INT mask = 0;
|
2007-05-24 16:41:17 +02:00
|
|
|
TRACE_(accel)("found accel for virt_key %04lx (scan %04x)\n",
|
2001-04-16 20:58:09 +02:00
|
|
|
lpMsg->wParam, HIWORD(lpMsg->lParam) & 0xff);
|
|
|
|
if(GetKeyState(VK_SHIFT) & 0x8000) mask |= FSHIFT;
|
|
|
|
if(GetKeyState(VK_CONTROL) & 0x8000) mask |= FCONTROL;
|
|
|
|
if(GetKeyState(VK_MENU) & 0x8000) mask |= FALT;
|
|
|
|
if(mask == (lpAccelTbl[i].fVirt & (FSHIFT | FCONTROL | FALT))) goto found;
|
|
|
|
TRACE_(accel)("incorrect SHIFT/CTRL/ALT-state\n");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if(!(lpMsg->lParam & 0x01000000)) /* no special_key */
|
|
|
|
{
|
|
|
|
if((lpAccelTbl[i].fVirt & FALT) && (lpMsg->lParam & 0x20000000))
|
|
|
|
{ /* ^^ ALT pressed */
|
2007-05-24 16:41:17 +02:00
|
|
|
TRACE_(accel)("found accel for Alt-%c\n", LOWORD(lpMsg->wParam) & 0xff);
|
2001-04-16 20:58:09 +02:00
|
|
|
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");
|
2004-01-28 21:06:35 +01:00
|
|
|
HeapFree(GetProcessHeap(), 0, lpAccelTbl);
|
2001-04-16 20:58:09 +02:00
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
found:
|
|
|
|
if(lpwCmd) *lpwCmd = lpAccelTbl[i].cmd;
|
2004-01-28 21:06:35 +01:00
|
|
|
HeapFree(GetProcessHeap(), 0, lpAccelTbl);
|
2001-04-16 20:58:09 +02:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
1999-03-10 14:24:39 +01:00
|
|
|
/***********************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
* ReleaseStgMedium [OLE32.@]
|
1999-03-10 14:24:39 +01:00
|
|
|
*/
|
|
|
|
void WINAPI ReleaseStgMedium(
|
|
|
|
STGMEDIUM* pmedium)
|
|
|
|
{
|
|
|
|
switch (pmedium->tymed)
|
|
|
|
{
|
|
|
|
case TYMED_HGLOBAL:
|
|
|
|
{
|
2002-06-01 01:06:46 +02:00
|
|
|
if ( (pmedium->pUnkForRelease==0) &&
|
1999-03-10 14:24:39 +01:00
|
|
|
(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
|
|
|
|
1999-03-10 14:24:39 +01: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) &&
|
2003-01-14 20:32:14 +01:00
|
|
|
(pmedium->u.hBitmap!=0) )
|
|
|
|
DeleteObject(pmedium->u.hBitmap);
|
1999-03-10 14:24:39 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case TYMED_MFPICT:
|
|
|
|
{
|
2002-06-01 01:06:46 +02:00
|
|
|
if ( (pmedium->pUnkForRelease==0) &&
|
1999-03-10 14:24:39 +01:00
|
|
|
(pmedium->u.hMetaFilePict!=0) )
|
|
|
|
{
|
2003-01-14 20:32:14 +01:00
|
|
|
LPMETAFILEPICT pMP = GlobalLock(pmedium->u.hMetaFilePict);
|
2001-02-12 02:22:01 +01:00
|
|
|
DeleteMetaFile(pMP->hMF);
|
2003-01-14 20:32:14 +01:00
|
|
|
GlobalUnlock(pmedium->u.hMetaFilePict);
|
|
|
|
GlobalFree(pmedium->u.hMetaFilePict);
|
1999-03-10 14:24:39 +01:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case TYMED_ENHMF:
|
|
|
|
{
|
2002-06-01 01:06:46 +02:00
|
|
|
if ( (pmedium->pUnkForRelease==0) &&
|
1999-03-10 14:24:39 +01:00
|
|
|
(pmedium->u.hEnhMetaFile!=0) )
|
|
|
|
{
|
|
|
|
DeleteEnhMetaFile(pmedium->u.hEnhMetaFile);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case TYMED_NULL:
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
2003-01-14 20:32:14 +01:00
|
|
|
pmedium->tymed=TYMED_NULL;
|
1999-03-10 14:24:39 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* After cleaning up, the unknown is released
|
|
|
|
*/
|
|
|
|
if (pmedium->pUnkForRelease!=0)
|
|
|
|
{
|
|
|
|
IUnknown_Release(pmedium->pUnkForRelease);
|
|
|
|
pmedium->pUnkForRelease = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1999-02-13 10:13:49 +01:00
|
|
|
/***
|
|
|
|
* OLEDD_Initialize()
|
|
|
|
*
|
|
|
|
* Initializes the OLE drag and drop data structures.
|
|
|
|
*/
|
2006-08-28 15:18:15 +02:00
|
|
|
static void OLEDD_Initialize(void)
|
1999-02-13 10:13:49 +01:00
|
|
|
{
|
2010-04-27 21:41:04 +02:00
|
|
|
WNDCLASSW wndClass;
|
1999-02-13 10:13:49 +01:00
|
|
|
|
2010-04-27 21:41:04 +02:00
|
|
|
ZeroMemory (&wndClass, sizeof(WNDCLASSW));
|
1999-02-13 10:13:49 +01:00
|
|
|
wndClass.style = CS_GLOBALCLASS;
|
2004-12-06 12:51:29 +01:00
|
|
|
wndClass.lpfnWndProc = OLEDD_DragTrackerWindowProc;
|
1999-02-13 10:13:49 +01:00
|
|
|
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
|
|
|
|
2010-04-27 21:41:04 +02:00
|
|
|
RegisterClassW (&wndClass);
|
1999-02-13 10:13:49 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/***
|
|
|
|
* 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.
|
|
|
|
*/
|
2005-12-12 12:42:53 +01:00
|
|
|
|
|
|
|
#define DRAG_TIMER_ID 1
|
|
|
|
|
1999-02-13 10:13:49 +01:00
|
|
|
static LRESULT WINAPI OLEDD_DragTrackerWindowProc(
|
2002-06-01 01:06:46 +02:00
|
|
|
HWND hwnd,
|
1999-02-26 12:11:13 +01:00
|
|
|
UINT uMsg,
|
2002-06-01 01:06:46 +02:00
|
|
|
WPARAM wParam,
|
1999-02-13 10:13:49 +01:00
|
|
|
LPARAM lParam)
|
|
|
|
{
|
|
|
|
switch (uMsg)
|
|
|
|
{
|
|
|
|
case WM_CREATE:
|
|
|
|
{
|
1999-02-26 12:11:13 +01:00
|
|
|
LPCREATESTRUCTA createStruct = (LPCREATESTRUCTA)lParam;
|
1999-02-13 10:13:49 +01:00
|
|
|
|
2010-04-27 21:41:04 +02:00
|
|
|
SetWindowLongPtrW(hwnd, 0, (LONG_PTR)createStruct->lpCreateParams);
|
2005-12-12 12:42:53 +01:00
|
|
|
SetTimer(hwnd, DRAG_TIMER_ID, 50, NULL);
|
1999-02-13 10:13:49 +01:00
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
2005-12-12 12:42:53 +01:00
|
|
|
case WM_TIMER:
|
1999-02-13 10:13:49 +01:00
|
|
|
case WM_MOUSEMOVE:
|
|
|
|
{
|
2009-02-09 23:34:20 +01:00
|
|
|
OLEDD_TrackMouseMove((TrackerWindowInfo*)GetWindowLongPtrA(hwnd, 0));
|
1999-02-13 10:13:49 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case WM_LBUTTONUP:
|
|
|
|
case WM_MBUTTONUP:
|
|
|
|
case WM_RBUTTONUP:
|
|
|
|
case WM_LBUTTONDOWN:
|
|
|
|
case WM_MBUTTONDOWN:
|
|
|
|
case WM_RBUTTONDOWN:
|
|
|
|
{
|
2009-02-09 23:34:20 +01:00
|
|
|
OLEDD_TrackStateChange((TrackerWindowInfo*)GetWindowLongPtrA(hwnd, 0));
|
2005-12-12 12:42:53 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case WM_DESTROY:
|
|
|
|
{
|
|
|
|
KillTimer(hwnd, DRAG_TIMER_ID);
|
1999-02-13 10:13:49 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This is a window proc after all. Let's call the default.
|
|
|
|
*/
|
2010-04-27 21:41:04 +02:00
|
|
|
return DefWindowProcW (hwnd, uMsg, wParam, lParam);
|
1999-02-13 10:13:49 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/***
|
|
|
|
* 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.
|
|
|
|
*/
|
2005-12-12 12:42:53 +01:00
|
|
|
static void OLEDD_TrackMouseMove(TrackerWindowInfo* trackerInfo)
|
1999-02-13 10:13:49 +01:00
|
|
|
{
|
1999-02-26 12:11:13 +01:00
|
|
|
HWND hwndNewTarget = 0;
|
1999-02-13 10:13:49 +01:00
|
|
|
HRESULT hr = S_OK;
|
2005-12-12 12:42:53 +01:00
|
|
|
POINT pt;
|
1999-02-13 10:13:49 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Get the handle of the window under the mouse
|
|
|
|
*/
|
2005-12-12 12:42:53 +01:00
|
|
|
pt.x = trackerInfo->curMousePos.x;
|
|
|
|
pt.y = trackerInfo->curMousePos.y;
|
|
|
|
hwndNewTarget = WindowFromPoint(pt);
|
1999-02-13 10:13:49 +01:00
|
|
|
|
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;
|
|
|
|
|
1999-02-13 10:13:49 +01:00
|
|
|
/*
|
|
|
|
* 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) &&
|
2003-01-28 02:06:20 +01:00
|
|
|
(trackerInfo->curTargetHWND == hwndNewTarget) )
|
1999-02-13 10:13:49 +01:00
|
|
|
{
|
|
|
|
IDropTarget_DragOver(trackerInfo->curDragTarget,
|
2005-12-12 12:42:53 +01:00
|
|
|
trackerInfo->dwKeyState,
|
|
|
|
trackerInfo->curMousePos,
|
1999-02-13 10:13:49 +01:00
|
|
|
trackerInfo->pdwEffect);
|
|
|
|
}
|
|
|
|
else
|
1999-05-01 12:10:30 +02:00
|
|
|
{
|
1999-02-13 10:13:49 +01:00
|
|
|
/*
|
|
|
|
* If we changed window, we have to notify our old target and check for
|
|
|
|
* the new one.
|
|
|
|
*/
|
2010-05-18 00:21:49 +02:00
|
|
|
if (trackerInfo->curDragTarget)
|
1999-02-13 10:13:49 +01:00
|
|
|
IDropTarget_DragLeave(trackerInfo->curDragTarget);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-02-13 10:13:49 +01:00
|
|
|
/*
|
|
|
|
* Make sure we're hovering over a window.
|
|
|
|
*/
|
2010-05-18 00:21:49 +02:00
|
|
|
if (hwndNewTarget)
|
1999-02-13 10:13:49 +01:00
|
|
|
{
|
|
|
|
/*
|
|
|
|
* Find-out if there is a drag target under the mouse
|
|
|
|
*/
|
2010-05-18 00:21:49 +02:00
|
|
|
HWND next_target_wnd = hwndNewTarget;
|
|
|
|
|
2003-01-28 02:06:20 +01:00
|
|
|
trackerInfo->curTargetHWND = hwndNewTarget;
|
|
|
|
|
2010-07-22 14:37:19 +02:00
|
|
|
while (next_target_wnd && !is_droptarget(next_target_wnd))
|
|
|
|
next_target_wnd = GetParent(next_target_wnd);
|
2000-12-15 21:54:18 +01:00
|
|
|
|
2010-05-18 00:21:49 +02:00
|
|
|
if (next_target_wnd) hwndNewTarget = next_target_wnd;
|
|
|
|
|
2010-07-22 14:37:19 +02:00
|
|
|
trackerInfo->curDragTargetHWND = hwndNewTarget;
|
|
|
|
if(trackerInfo->curDragTarget) IDropTarget_Release(trackerInfo->curDragTarget);
|
|
|
|
trackerInfo->curDragTarget = get_droptarget_pointer(hwndNewTarget);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-02-13 10:13:49 +01:00
|
|
|
/*
|
|
|
|
* If there is, notify it that we just dragged-in
|
|
|
|
*/
|
2010-05-02 10:49:37 +02:00
|
|
|
if (trackerInfo->curDragTarget)
|
1999-02-13 10:13:49 +01:00
|
|
|
{
|
2010-05-02 10:49:37 +02:00
|
|
|
hr = IDropTarget_DragEnter(trackerInfo->curDragTarget,
|
|
|
|
trackerInfo->dataObject,
|
|
|
|
trackerInfo->dwKeyState,
|
|
|
|
trackerInfo->curMousePos,
|
|
|
|
trackerInfo->pdwEffect);
|
|
|
|
|
|
|
|
/* failed DragEnter() means invalid target */
|
|
|
|
if (hr != S_OK)
|
|
|
|
{
|
|
|
|
trackerInfo->curDragTargetHWND = 0;
|
|
|
|
trackerInfo->curTargetHWND = 0;
|
2010-07-22 14:37:19 +02:00
|
|
|
IDropTarget_Release(trackerInfo->curDragTarget);
|
2010-05-02 10:49:37 +02:00
|
|
|
trackerInfo->curDragTarget = 0;
|
|
|
|
}
|
1999-02-13 10:13:49 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* The mouse is not over a window so we don't track anything.
|
|
|
|
*/
|
|
|
|
trackerInfo->curDragTargetHWND = 0;
|
2003-01-28 02:06:20 +01:00
|
|
|
trackerInfo->curTargetHWND = 0;
|
2010-07-22 14:37:19 +02:00
|
|
|
if(trackerInfo->curDragTarget) IDropTarget_Release(trackerInfo->curDragTarget);
|
1999-02-13 10:13:49 +01:00
|
|
|
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
|
1999-02-13 10:13:49 +01:00
|
|
|
* 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.
|
|
|
|
*/
|
2010-04-27 23:32:37 +02:00
|
|
|
if (hr == DRAGDROP_S_USEDEFAULTCURSORS)
|
1999-02-13 10:13:49 +01:00
|
|
|
{
|
2010-04-27 23:32:37 +02:00
|
|
|
HCURSOR hCur;
|
|
|
|
|
2000-11-05 21:16:15 +01:00
|
|
|
if (*trackerInfo->pdwEffect & DROPEFFECT_MOVE)
|
1999-02-13 10:13:49 +01:00
|
|
|
{
|
2010-10-12 20:22:14 +02:00
|
|
|
hCur = LoadCursorW(hProxyDll, MAKEINTRESOURCEW(2));
|
2000-11-05 21:16:15 +01:00
|
|
|
}
|
|
|
|
else if (*trackerInfo->pdwEffect & DROPEFFECT_COPY)
|
|
|
|
{
|
2010-10-12 20:22:14 +02:00
|
|
|
hCur = LoadCursorW(hProxyDll, MAKEINTRESOURCEW(3));
|
2000-11-05 21:16:15 +01:00
|
|
|
}
|
|
|
|
else if (*trackerInfo->pdwEffect & DROPEFFECT_LINK)
|
|
|
|
{
|
2010-10-12 20:22:14 +02:00
|
|
|
hCur = LoadCursorW(hProxyDll, MAKEINTRESOURCEW(4));
|
1999-02-13 10:13:49 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-10-12 20:22:14 +02:00
|
|
|
hCur = LoadCursorW(hProxyDll, MAKEINTRESOURCEW(1));
|
1999-02-13 10:13:49 +01:00
|
|
|
}
|
2010-04-27 23:32:37 +02:00
|
|
|
|
|
|
|
SetCursor(hCur);
|
2002-06-01 01:06:46 +02:00
|
|
|
}
|
1999-02-13 10:13:49 +01: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.
|
|
|
|
*/
|
2005-12-12 12:42:53 +01:00
|
|
|
static void OLEDD_TrackStateChange(TrackerWindowInfo* trackerInfo)
|
1999-02-13 10:13:49 +01:00
|
|
|
{
|
|
|
|
/*
|
|
|
|
* 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,
|
2005-12-12 12:42:53 +01:00
|
|
|
trackerInfo->dwKeyState);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-02-13 10:13:49 +01: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
|
1999-02-13 10:13:49 +01:00
|
|
|
* or a menu or something.
|
|
|
|
*/
|
|
|
|
ReleaseCapture();
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-02-13 10:13:49 +01:00
|
|
|
/*
|
2002-06-01 01:06:46 +02:00
|
|
|
* If we end-up over a target, drop the object in the target or
|
1999-02-13 10:13:49 +01:00
|
|
|
* inform the target that the operation was cancelled.
|
|
|
|
*/
|
2010-05-02 10:56:47 +02:00
|
|
|
if (trackerInfo->curDragTarget)
|
1999-02-13 10:13:49 +01:00
|
|
|
{
|
|
|
|
switch (trackerInfo->returnValue)
|
|
|
|
{
|
|
|
|
/*
|
2002-06-01 01:06:46 +02:00
|
|
|
* If the source wants us to complete the operation, we tell
|
1999-02-13 10:13:49 +01:00
|
|
|
* the drop target that we just dropped the object in it.
|
|
|
|
*/
|
|
|
|
case DRAGDROP_S_DROP:
|
2010-05-02 10:56:47 +02:00
|
|
|
if (*trackerInfo->pdwEffect != DROPEFFECT_NONE)
|
|
|
|
IDropTarget_Drop(trackerInfo->curDragTarget,
|
|
|
|
trackerInfo->dataObject,
|
|
|
|
trackerInfo->dwKeyState,
|
|
|
|
trackerInfo->curMousePos,
|
|
|
|
trackerInfo->pdwEffect);
|
|
|
|
else
|
|
|
|
IDropTarget_DragLeave(trackerInfo->curDragTarget);
|
|
|
|
break;
|
|
|
|
|
1999-02-13 10:13:49 +01:00
|
|
|
/*
|
2002-06-01 01:06:46 +02:00
|
|
|
* If the source told us that we should cancel, fool the drop
|
1999-02-13 10:13:49 +01:00
|
|
|
* 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
|
1999-10-23 16:03:41 +02:00
|
|
|
* ignores the result of DoDragDrop.
|
1999-02-13 10:13:49 +01:00
|
|
|
*/
|
|
|
|
case DRAGDROP_S_CANCEL:
|
|
|
|
IDropTarget_DragLeave(trackerInfo->curDragTarget);
|
1999-10-23 16:03:41 +02:00
|
|
|
*trackerInfo->pdwEffect = DROPEFFECT_NONE;
|
1999-02-13 10:13:49 +01:00
|
|
|
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.
|
|
|
|
*/
|
2006-08-28 15:18:15 +02:00
|
|
|
static DWORD OLEDD_GetButtonState(void)
|
1999-02-13 10:13:49 +01:00
|
|
|
{
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
1999-05-02 11:27:08 +02:00
|
|
|
/***
|
|
|
|
* 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
|
1999-05-02 11:27:08 +02:00
|
|
|
* 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,
|
1999-05-02 11:27:08 +02:00
|
|
|
DWORD* pdwValue)
|
|
|
|
{
|
2010-05-05 23:20:30 +02:00
|
|
|
WCHAR buffer[20];
|
2010-04-27 21:41:04 +02:00
|
|
|
DWORD cbData = sizeof(buffer);
|
1999-05-02 11:27:08 +02:00
|
|
|
DWORD dwKeyType;
|
|
|
|
LONG lres;
|
|
|
|
|
2010-05-05 23:20:30 +02:00
|
|
|
lres = RegQueryValueExW(regKey,
|
|
|
|
emptyW,
|
1999-05-02 11:27:08 +02:00
|
|
|
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:
|
2010-05-05 23:20:30 +02:00
|
|
|
*pdwValue = (DWORD)strtoulW(buffer, NULL, 10);
|
1999-05-02 11:27:08 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
1999-02-13 10:13:49 +01:00
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-12-08 23:46:08 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* 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)
|
|
|
|
{
|
2006-08-31 18:14:38 +02:00
|
|
|
HRESULT hres;
|
2003-12-08 23:46:08 +01:00
|
|
|
IUnknown * pUnk = NULL;
|
2006-08-31 18:14:38 +02:00
|
|
|
IOleObject *pOleObject = NULL;
|
2003-12-08 23:46:08 +01:00
|
|
|
|
2007-03-13 13:45:52 +01:00
|
|
|
TRACE("(%s, %s, %d, %p, %p, %p, %p)\n", debugstr_guid(rclsid),
|
|
|
|
debugstr_guid(riid), renderopt, pFormatEtc, pClientSite, pStg, ppvObj);
|
2003-12-08 23:46:08 +01:00
|
|
|
|
2007-03-13 13:41:18 +01:00
|
|
|
hres = CoCreateInstance(rclsid, 0, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, riid, (LPVOID*)&pUnk);
|
2006-08-31 18:13:45 +02:00
|
|
|
|
|
|
|
if (SUCCEEDED(hres))
|
|
|
|
hres = IStorage_SetClass(pStg, rclsid);
|
|
|
|
|
2006-08-31 18:14:38 +02:00
|
|
|
if (pClientSite && SUCCEEDED(hres))
|
2006-08-31 18:15:15 +02:00
|
|
|
{
|
2006-08-31 18:14:38 +02:00
|
|
|
hres = IUnknown_QueryInterface(pUnk, &IID_IOleObject, (LPVOID*)&pOleObject);
|
2006-08-31 18:15:15 +02:00
|
|
|
if (SUCCEEDED(hres))
|
|
|
|
{
|
|
|
|
DWORD dwStatus;
|
|
|
|
hres = IOleObject_GetMiscStatus(pOleObject, DVASPECT_CONTENT, &dwStatus);
|
|
|
|
}
|
|
|
|
}
|
2006-08-31 18:14:38 +02:00
|
|
|
|
2006-08-31 18:13:45 +02:00
|
|
|
if (SUCCEEDED(hres))
|
2003-12-08 23:46:08 +01:00
|
|
|
{
|
2006-08-31 18:14:38 +02:00
|
|
|
IPersistStorage * pPS;
|
|
|
|
if (SUCCEEDED((hres = IUnknown_QueryInterface(pUnk, &IID_IPersistStorage, (LPVOID*)&pPS))))
|
2003-12-08 23:46:08 +01:00
|
|
|
{
|
2006-08-31 18:14:38 +02:00
|
|
|
TRACE("trying to set stg %p\n", pStg);
|
|
|
|
hres = IPersistStorage_InitNew(pPS, pStg);
|
2006-10-15 12:28:08 +02:00
|
|
|
TRACE("-- result 0x%08x\n", hres);
|
2006-08-31 18:14:38 +02:00
|
|
|
IPersistStorage_Release(pPS);
|
2003-12-08 23:46:08 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-08-31 18:14:38 +02:00
|
|
|
if (pClientSite && SUCCEEDED(hres))
|
|
|
|
{
|
|
|
|
TRACE("trying to set clientsite %p\n", pClientSite);
|
|
|
|
hres = IOleObject_SetClientSite(pOleObject, pClientSite);
|
2006-10-15 12:28:08 +02:00
|
|
|
TRACE("-- result 0x%08x\n", hres);
|
2006-08-31 18:14:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (pOleObject)
|
|
|
|
IOleObject_Release(pOleObject);
|
2006-08-31 18:16:28 +02:00
|
|
|
|
|
|
|
if (((renderopt == OLERENDER_DRAW) || (renderopt == OLERENDER_FORMAT)) &&
|
|
|
|
SUCCEEDED(hres))
|
|
|
|
{
|
|
|
|
IRunnableObject *pRunnable;
|
|
|
|
IOleCache *pOleCache;
|
2006-10-07 14:56:09 +02:00
|
|
|
HRESULT hres2;
|
2006-08-31 18:16:28 +02:00
|
|
|
|
2006-10-07 14:56:09 +02:00
|
|
|
hres2 = IUnknown_QueryInterface(pUnk, &IID_IRunnableObject, (void **)&pRunnable);
|
|
|
|
if (SUCCEEDED(hres2))
|
2006-08-31 18:16:28 +02:00
|
|
|
{
|
|
|
|
hres = IRunnableObject_Run(pRunnable, NULL);
|
|
|
|
IRunnableObject_Release(pRunnable);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (SUCCEEDED(hres))
|
|
|
|
{
|
2006-10-07 14:56:09 +02:00
|
|
|
hres2 = IUnknown_QueryInterface(pUnk, &IID_IOleCache, (void **)&pOleCache);
|
|
|
|
if (SUCCEEDED(hres2))
|
|
|
|
{
|
|
|
|
DWORD dwConnection;
|
2010-09-24 17:53:32 +02:00
|
|
|
if (renderopt == OLERENDER_DRAW && !pFormatEtc) {
|
2010-09-28 22:43:50 +02:00
|
|
|
FORMATETC pfe;
|
|
|
|
pfe.cfFormat = 0;
|
|
|
|
pfe.ptd = NULL;
|
|
|
|
pfe.dwAspect = DVASPECT_CONTENT;
|
|
|
|
pfe.lindex = -1;
|
|
|
|
pfe.tymed = TYMED_NULL;
|
|
|
|
hres = IOleCache_Cache(pOleCache, &pfe, ADVF_PRIMEFIRST, &dwConnection);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
hres = IOleCache_Cache(pOleCache, pFormatEtc, ADVF_PRIMEFIRST, &dwConnection);
|
2006-10-07 14:56:09 +02:00
|
|
|
IOleCache_Release(pOleCache);
|
|
|
|
}
|
2006-08-31 18:16:28 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-01-03 11:31:08 +01:00
|
|
|
if (FAILED(hres) && pUnk)
|
2006-08-31 18:14:38 +02:00
|
|
|
{
|
|
|
|
IUnknown_Release(pUnk);
|
|
|
|
pUnk = NULL;
|
|
|
|
}
|
|
|
|
|
2003-12-08 23:46:08 +01:00
|
|
|
*ppvObj = pUnk;
|
|
|
|
|
2005-11-10 13:14:56 +01:00
|
|
|
TRACE("-- %p\n", pUnk);
|
2003-12-08 23:46:08 +01:00
|
|
|
return hres;
|
|
|
|
}
|
|
|
|
|
2006-08-16 14:00:02 +02:00
|
|
|
/******************************************************************************
|
|
|
|
* OleGetAutoConvert [OLE32.@]
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI OleGetAutoConvert(REFCLSID clsidOld, LPCLSID pClsidNew)
|
|
|
|
{
|
|
|
|
static const WCHAR wszAutoConvertTo[] = {'A','u','t','o','C','o','n','v','e','r','t','T','o',0};
|
|
|
|
HKEY hkey = NULL;
|
|
|
|
WCHAR buf[CHARS_IN_GUID];
|
|
|
|
LONG len;
|
|
|
|
HRESULT res = S_OK;
|
|
|
|
|
|
|
|
res = COM_OpenKeyForCLSID(clsidOld, wszAutoConvertTo, KEY_READ, &hkey);
|
|
|
|
if (FAILED(res))
|
|
|
|
goto done;
|
|
|
|
|
|
|
|
len = sizeof(buf);
|
|
|
|
if (RegQueryValueW(hkey, NULL, buf, &len))
|
|
|
|
{
|
|
|
|
res = REGDB_E_KEYMISSING;
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
res = CLSIDFromString(buf, pClsidNew);
|
|
|
|
done:
|
|
|
|
if (hkey) RegCloseKey(hkey);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
2005-01-14 18:05:36 +01:00
|
|
|
/******************************************************************************
|
|
|
|
* OleSetAutoConvert [OLE32.@]
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI OleSetAutoConvert(REFCLSID clsidOld, REFCLSID clsidNew)
|
|
|
|
{
|
2005-06-20 15:14:22 +02:00
|
|
|
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];
|
2005-01-14 18:05:36 +01:00
|
|
|
HRESULT res = S_OK;
|
|
|
|
|
|
|
|
TRACE("(%s,%s)\n", debugstr_guid(clsidOld), debugstr_guid(clsidNew));
|
2005-06-20 15:14:22 +02:00
|
|
|
|
2005-11-09 11:29:11 +01:00
|
|
|
res = COM_OpenKeyForCLSID(clsidOld, NULL, KEY_READ | KEY_WRITE, &hkey);
|
|
|
|
if (FAILED(res))
|
|
|
|
goto done;
|
2005-06-20 15:14:22 +02:00
|
|
|
StringFromGUID2(clsidNew, szClsidNew, CHARS_IN_GUID);
|
|
|
|
if (RegSetValueW(hkey, wszAutoConvertTo, REG_SZ, szClsidNew, (strlenW(szClsidNew)+1) * sizeof(WCHAR)))
|
2005-01-14 18:05:36 +01:00
|
|
|
{
|
|
|
|
res = REGDB_E_WRITEREGDB;
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
|
|
|
|
done:
|
|
|
|
if (hkey) RegCloseKey(hkey);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* OleDoAutoConvert [OLE32.@]
|
|
|
|
*/
|
2005-08-16 18:01:15 +02:00
|
|
|
HRESULT WINAPI OleDoAutoConvert(LPSTORAGE pStg, LPCLSID pClsidNew)
|
2005-01-14 18:05:36 +01:00
|
|
|
{
|
|
|
|
FIXME("(%p,%p) : stub\n",pStg,pClsidNew);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2005-09-20 13:36:56 +02:00
|
|
|
/******************************************************************************
|
|
|
|
* OleIsRunning [OLE32.@]
|
|
|
|
*/
|
2011-04-08 11:31:33 +02:00
|
|
|
BOOL WINAPI OleIsRunning(LPOLEOBJECT object)
|
2005-09-20 13:36:56 +02:00
|
|
|
{
|
|
|
|
IRunnableObject *pRunnable;
|
|
|
|
HRESULT hr;
|
|
|
|
BOOL running;
|
|
|
|
|
2011-04-08 11:31:33 +02:00
|
|
|
TRACE("(%p)\n", object);
|
2005-09-20 13:36:56 +02:00
|
|
|
|
2011-04-08 11:31:33 +02:00
|
|
|
if (!object) return FALSE;
|
|
|
|
|
|
|
|
hr = IOleObject_QueryInterface(object, &IID_IRunnableObject, (void **)&pRunnable);
|
2005-09-20 13:36:56 +02:00
|
|
|
if (FAILED(hr))
|
2007-10-09 01:32:58 +02:00
|
|
|
return TRUE;
|
2005-09-20 13:36:56 +02:00
|
|
|
running = IRunnableObject_IsRunning(pRunnable);
|
|
|
|
IRunnableObject_Release(pRunnable);
|
|
|
|
return running;
|
|
|
|
}
|
|
|
|
|
2006-07-31 17:43:50 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* OleNoteObjectVisible [OLE32.@]
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI OleNoteObjectVisible(LPUNKNOWN pUnknown, BOOL bVisible)
|
|
|
|
{
|
|
|
|
TRACE("(%p, %s)\n", pUnknown, bVisible ? "TRUE" : "FALSE");
|
|
|
|
return CoLockObjectExternal(pUnknown, bVisible, TRUE);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-12-08 23:46:08 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* 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);
|
|
|
|
}
|
|
|
|
|
2005-04-13 13:13:55 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* 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);
|
|
|
|
/*
|
2006-10-15 17:05:01 +02:00
|
|
|
* Find the length of the buffer passed-in, in bytes.
|
2005-04-13 13:13:55 +02:00
|
|
|
*/
|
|
|
|
bufferSize = len * sizeof (WCHAR);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Allocate a new buffer to hold the string.
|
2006-10-15 17:05:01 +02:00
|
|
|
* Don't forget to keep an empty spot at the beginning of the
|
2005-04-13 13:13:55 +02:00
|
|
|
* 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++;
|
|
|
|
|
2007-01-05 11:00:43 +01:00
|
|
|
memcpy(newBuffer, str, bufferSize);
|
2005-04-13 13:13:55 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Make sure that there is a nul character at the end of the
|
|
|
|
* string.
|
|
|
|
*/
|
|
|
|
stringBuffer = (WCHAR*)newBuffer;
|
2007-06-21 22:57:32 +02:00
|
|
|
stringBuffer[len] = '\0';
|
2005-04-13 13:13:55 +02:00
|
|
|
|
2009-02-11 10:48:38 +01:00
|
|
|
return stringBuffer;
|
2005-04-13 13:13:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* PropSysFreeString [OLE32.@]
|
|
|
|
* NOTES
|
|
|
|
* Copy of SysFreeString.
|
|
|
|
*/
|
2005-04-20 18:21:16 +02:00
|
|
|
void WINAPI PropSysFreeString(LPOLESTR str)
|
2005-04-13 13:13:55 +02:00
|
|
|
{
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
2004-09-03 03:04:38 +02:00
|
|
|
/******************************************************************************
|
|
|
|
* 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:
|
2009-03-06 12:32:42 +01:00
|
|
|
case VT_DECIMAL:
|
2004-09-03 03:04:38 +02:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2003-12-08 23:46:08 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* PropVariantClear [OLE32.@]
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI PropVariantClear(PROPVARIANT * pvar) /* [in/out] */
|
|
|
|
{
|
2004-09-03 03:04:38 +02:00
|
|
|
HRESULT hr;
|
|
|
|
|
2003-12-08 23:46:08 +01:00
|
|
|
TRACE("(%p)\n", pvar);
|
|
|
|
|
|
|
|
if (!pvar)
|
|
|
|
return S_OK;
|
|
|
|
|
2004-09-03 03:04:38 +02:00
|
|
|
hr = PROPVARIANT_ValidateType(pvar->vt);
|
|
|
|
if (FAILED(hr))
|
|
|
|
return hr;
|
|
|
|
|
2003-12-08 23:46:08 +01:00
|
|
|
switch(pvar->vt)
|
|
|
|
{
|
2006-07-12 08:26:01 +02:00
|
|
|
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_ERROR:
|
|
|
|
case VT_BOOL:
|
2009-03-06 12:32:42 +01:00
|
|
|
case VT_DECIMAL:
|
2006-07-12 08:26:01 +02:00
|
|
|
case VT_UI1:
|
|
|
|
case VT_UI2:
|
|
|
|
case VT_UI4:
|
|
|
|
case VT_I8:
|
|
|
|
case VT_UI8:
|
|
|
|
case VT_FILETIME:
|
|
|
|
break;
|
2003-12-08 23:46:08 +01:00
|
|
|
case VT_STREAM:
|
|
|
|
case VT_STREAMED_OBJECT:
|
|
|
|
case VT_STORAGE:
|
|
|
|
case VT_STORED_OBJECT:
|
2004-09-03 03:04:38 +02:00
|
|
|
if (pvar->u.pStream)
|
|
|
|
IUnknown_Release(pvar->u.pStream);
|
2003-12-08 23:46:08 +01:00
|
|
|
break;
|
|
|
|
case VT_CLSID:
|
|
|
|
case VT_LPSTR:
|
|
|
|
case VT_LPWSTR:
|
2008-03-01 21:10:38 +01:00
|
|
|
/* pick an arbitrary typed pointer - we don't care about the type
|
2003-12-08 23:46:08 +01:00
|
|
|
* 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:
|
2004-09-06 23:28:28 +02:00
|
|
|
if (pvar->u.bstrVal)
|
2005-04-13 13:13:55 +02:00
|
|
|
PropSysFreeString(pvar->u.bstrVal);
|
2003-12-08 23:46:08 +01:00
|
|
|
break;
|
2006-07-12 08:26:01 +02:00
|
|
|
case VT_CF:
|
2003-12-08 23:46:08 +01:00
|
|
|
if (pvar->u.pclipdata)
|
|
|
|
{
|
|
|
|
OLE_FreeClipDataArray(1, pvar->u.pclipdata);
|
|
|
|
CoTaskMemFree(pvar->u.pclipdata);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
2005-05-17 12:18:59 +02:00
|
|
|
if (pvar->vt & VT_VECTOR)
|
2003-12-08 23:46:08 +01:00
|
|
|
{
|
2005-05-17 12:18:59 +02:00
|
|
|
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)
|
|
|
|
{
|
2008-03-01 21:10:38 +01:00
|
|
|
/* pick an arbitrary VT_VECTOR structure - they all have the same
|
2005-05-17 12:18:59 +02:00
|
|
|
* memory layout */
|
|
|
|
CoTaskMemFree(pvar->u.capropvar.pElems);
|
|
|
|
}
|
2003-12-08 23:46:08 +01:00
|
|
|
}
|
2005-05-17 12:18:59 +02:00
|
|
|
else
|
|
|
|
WARN("Invalid/unsupported type %d\n", pvar->vt);
|
2003-12-08 23:46:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
ZeroMemory(pvar, sizeof(*pvar));
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* PropVariantCopy [OLE32.@]
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI PropVariantCopy(PROPVARIANT *pvarDest, /* [out] */
|
|
|
|
const PROPVARIANT *pvarSrc) /* [in] */
|
|
|
|
{
|
|
|
|
ULONG len;
|
2004-09-03 03:04:38 +02:00
|
|
|
HRESULT hr;
|
|
|
|
|
2009-03-06 12:32:42 +01:00
|
|
|
TRACE("(%p, %p vt %04x)\n", pvarDest, pvarSrc, pvarSrc->vt);
|
2004-09-03 03:04:38 +02:00
|
|
|
|
|
|
|
hr = PROPVARIANT_ValidateType(pvarSrc->vt);
|
|
|
|
if (FAILED(hr))
|
|
|
|
return hr;
|
2003-12-08 23:46:08 +01:00
|
|
|
|
|
|
|
/* this will deal with most cases */
|
2008-03-29 12:37:15 +01:00
|
|
|
*pvarDest = *pvarSrc;
|
2003-12-08 23:46:08 +01:00
|
|
|
|
|
|
|
switch(pvarSrc->vt)
|
|
|
|
{
|
2008-11-12 13:39:58 +01:00
|
|
|
case VT_EMPTY:
|
|
|
|
case VT_NULL:
|
|
|
|
case VT_I1:
|
|
|
|
case VT_UI1:
|
|
|
|
case VT_I2:
|
|
|
|
case VT_UI2:
|
|
|
|
case VT_BOOL:
|
2009-03-06 12:32:42 +01:00
|
|
|
case VT_DECIMAL:
|
2008-11-12 13:39:58 +01:00
|
|
|
case VT_I4:
|
|
|
|
case VT_UI4:
|
|
|
|
case VT_R4:
|
|
|
|
case VT_ERROR:
|
|
|
|
case VT_I8:
|
|
|
|
case VT_UI8:
|
|
|
|
case VT_R8:
|
|
|
|
case VT_CY:
|
|
|
|
case VT_DATE:
|
2006-08-14 11:30:16 +02:00
|
|
|
case VT_FILETIME:
|
|
|
|
break;
|
2003-12-08 23:46:08 +01:00
|
|
|
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));
|
2008-03-29 12:37:15 +01:00
|
|
|
*pvarDest->u.puuid = *pvarSrc->u.puuid;
|
2003-12-08 23:46:08 +01:00
|
|
|
break;
|
|
|
|
case VT_LPSTR:
|
|
|
|
len = strlen(pvarSrc->u.pszVal);
|
2004-09-06 23:28:28 +02:00
|
|
|
pvarDest->u.pszVal = CoTaskMemAlloc((len+1)*sizeof(CHAR));
|
|
|
|
CopyMemory(pvarDest->u.pszVal, pvarSrc->u.pszVal, (len+1)*sizeof(CHAR));
|
2003-12-08 23:46:08 +01:00
|
|
|
break;
|
|
|
|
case VT_LPWSTR:
|
|
|
|
len = lstrlenW(pvarSrc->u.pwszVal);
|
2004-09-06 23:28:28 +02:00
|
|
|
pvarDest->u.pwszVal = CoTaskMemAlloc((len+1)*sizeof(WCHAR));
|
|
|
|
CopyMemory(pvarDest->u.pwszVal, pvarSrc->u.pwszVal, (len+1)*sizeof(WCHAR));
|
2003-12-08 23:46:08 +01:00
|
|
|
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:
|
2005-04-13 13:13:55 +02:00
|
|
|
pvarDest->u.bstrVal = PropSysAllocString(pvarSrc->u.bstrVal);
|
2003-12-08 23:46:08 +01:00
|
|
|
break;
|
|
|
|
case VT_CF:
|
|
|
|
if (pvarSrc->u.pclipdata)
|
|
|
|
{
|
|
|
|
len = pvarSrc->u.pclipdata->cbSize - sizeof(pvarSrc->u.pclipdata->ulClipFmt);
|
2006-07-11 16:47:59 +02:00
|
|
|
pvarDest->u.pclipdata = CoTaskMemAlloc(sizeof (CLIPDATA));
|
|
|
|
pvarDest->u.pclipdata->cbSize = pvarSrc->u.pclipdata->cbSize;
|
|
|
|
pvarDest->u.pclipdata->ulClipFmt = pvarSrc->u.pclipdata->ulClipFmt;
|
2006-06-19 19:19:31 +02:00
|
|
|
pvarDest->u.pclipdata->pClipData = CoTaskMemAlloc(len);
|
2003-12-08 23:46:08 +01:00
|
|
|
CopyMemory(pvarDest->u.pclipdata->pClipData, pvarSrc->u.pclipdata->pClipData, len);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
if (pvarSrc->vt & VT_VECTOR)
|
|
|
|
{
|
|
|
|
int elemSize;
|
2005-05-17 12:18:59 +02:00
|
|
|
ULONG i;
|
|
|
|
|
|
|
|
switch(pvarSrc->vt & ~VT_VECTOR)
|
2003-12-08 23:46:08 +01:00
|
|
|
{
|
|
|
|
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;
|
2009-02-13 10:58:14 +01:00
|
|
|
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;
|
2008-02-25 15:25:12 +01:00
|
|
|
case VT_VARIANT: elemSize = sizeof(*pvarSrc->u.pvarVal); break;
|
2003-12-08 23:46:08 +01:00
|
|
|
|
|
|
|
default:
|
2005-05-17 12:18:59 +02:00
|
|
|
FIXME("Invalid element type: %ul\n", pvarSrc->vt & ~VT_VECTOR);
|
2003-12-08 23:46:08 +01:00
|
|
|
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))
|
|
|
|
{
|
2005-05-17 12:18:59 +02:00
|
|
|
for (i = 0; i < len; i++)
|
|
|
|
pvarDest->u.cabstr.pElems[i] = PropSysAllocString(pvarSrc->u.cabstr.pElems[i]);
|
2003-12-08 23:46:08 +01:00
|
|
|
}
|
|
|
|
else if (pvarSrc->vt == (VT_VECTOR | VT_LPSTR))
|
|
|
|
{
|
2005-05-17 12:18:59 +02:00
|
|
|
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);
|
|
|
|
}
|
2003-12-08 23:46:08 +01:00
|
|
|
}
|
2005-05-17 12:18:59 +02:00
|
|
|
else if (pvarSrc->vt == (VT_VECTOR | VT_LPWSTR))
|
2003-12-08 23:46:08 +01:00
|
|
|
{
|
2005-05-17 12:18:59 +02:00
|
|
|
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);
|
|
|
|
}
|
2003-12-08 23:46:08 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
CopyMemory(pvarDest->u.capropvar.pElems, pvarSrc->u.capropvar.pElems, len * elemSize);
|
|
|
|
}
|
2005-05-17 12:18:59 +02:00
|
|
|
else
|
|
|
|
WARN("Invalid/unsupported type %d\n", pvarSrc->vt);
|
2003-12-08 23:46:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* FreePropVariantArray [OLE32.@]
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI FreePropVariantArray(ULONG cVariants, /* [in] */
|
|
|
|
PROPVARIANT *rgvars) /* [in/out] */
|
|
|
|
{
|
|
|
|
ULONG i;
|
|
|
|
|
2006-10-15 12:28:08 +02:00
|
|
|
TRACE("(%u, %p)\n", cVariants, rgvars);
|
2003-12-08 23:46:08 +01:00
|
|
|
|
2006-08-14 07:06:36 +02:00
|
|
|
if (!rgvars)
|
|
|
|
return E_INVALIDARG;
|
|
|
|
|
2003-12-08 23:46:08 +01:00
|
|
|
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;
|
|
|
|
}
|