Recovery of release 990110 after disk crash.
See Changelog for changes between 990103 and 990110.
This commit is contained in:
parent
7a2f5019af
commit
638f169b1e
18
ANNOUNCE
18
ANNOUNCE
|
@ -1,4 +1,4 @@
|
|||
This is release 990103 of Wine, a free implementation of Windows on
|
||||
This is release 990110 of Wine, a free implementation of Windows on
|
||||
Unix. This is still a developers only release. There are many bugs
|
||||
and unimplemented features. Most applications still do not work
|
||||
correctly.
|
||||
|
@ -6,11 +6,9 @@ correctly.
|
|||
Patches should be submitted to "julliard@lrc.epfl.ch". Please don't
|
||||
forget to include a ChangeLog entry.
|
||||
|
||||
WHAT'S NEW with Wine-990103: (see ChangeLog for details)
|
||||
- Improved console support.
|
||||
- Tons of new stubs.
|
||||
- Improvements to header files compatibility.
|
||||
- More features in Wine server.
|
||||
WHAT'S NEW with Wine-990110: (see ChangeLog for details)
|
||||
- Many more COM interfaces definitions.
|
||||
- Improvements to the resource compiler.
|
||||
- Lots of bug fixes.
|
||||
|
||||
See the README file in the distribution for installation instructions.
|
||||
|
@ -19,10 +17,10 @@ Because of lags created by using mirror, this message may reach you before
|
|||
the release is available at the ftp sites. The sources will be available
|
||||
from the following locations:
|
||||
|
||||
ftp://metalab.unc.edu/pub/Linux/ALPHA/wine/development/Wine-990103.tar.gz
|
||||
ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/Wine-990103.tar.gz
|
||||
ftp://ftp.infomagic.com/pub/mirrors/linux/sunsite/ALPHA/wine/development/Wine-990103.tar.gz
|
||||
ftp://ftp.progsoc.uts.edu.au/pub/Wine/development/Wine-990103.tar.gz
|
||||
ftp://metalab.unc.edu/pub/Linux/ALPHA/wine/development/Wine-990110.tar.gz
|
||||
ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/Wine-990110.tar.gz
|
||||
ftp://ftp.infomagic.com/pub/mirrors/linux/sunsite/ALPHA/wine/development/Wine-990110.tar.gz
|
||||
ftp://ftp.progsoc.uts.edu.au/pub/Wine/development/Wine-990110.tar.gz
|
||||
|
||||
It should also be available from any site that mirrors tsx-11 or sunsite.
|
||||
|
||||
|
|
241
ChangeLog
241
ChangeLog
|
@ -1,3 +1,244 @@
|
|||
Sun Jan 10 14:40:34 1999 Alexandre Julliard <julliard@winehq.com>
|
||||
|
||||
* include/miscemu.h, include/msdos.h, loader/main.c, msdos/Makefile.in, msdos/dosconf.c, msdos/int21.c:
|
||||
Andreas Mohr <a.mohr@mailto.de>
|
||||
Added config.sys parser.
|
||||
|
||||
* controls/listbox.c: Pascal Cuoq <Pascal.Cuoq@inria.fr>
|
||||
Small change in LB_SETCURSEL32 handling (the caret should be moved as
|
||||
well).
|
||||
|
||||
* configure, configure.in, files/async.c, include/config.h.in, misc/winsock_dns.c, msdos/int21.c, ole/compobj.c:
|
||||
Marcus Meissner <marcus@jet.franken.de>
|
||||
Use autoconf check for presence of sys/file.h.
|
||||
|
||||
* dlls/ntdll/rtl.c, relay32/ntdll.spec:
|
||||
Marcus Meissner <marcus@jet.franken.de>
|
||||
Implemented DbgPrint, added ultoa.
|
||||
|
||||
* win32/console.c: Peter Hunnisett <hunnise@nortelnetworks.com>
|
||||
PeekConsoleInput & ReadConsoleInput need to return 0 records read in
|
||||
the case of an invalid handle.
|
||||
|
||||
* console/ncurses.c, loader/main.c:
|
||||
Joseph Pranevich <jpranevich@lycos.com>
|
||||
More verbose debugging output.
|
||||
Remove compilation warning.
|
||||
|
||||
* msdos/int10.c: Joseph Pranevich <jpranevich@lycos.com>
|
||||
Fix up some interrupt calls to return at the data that they are supposed
|
||||
to. Also increase comment verbosity to help debug things later.
|
||||
|
||||
* include/options.h, misc/main.c, misc/version.c:
|
||||
Andreas Mohr <a.mohr@mailto.de>
|
||||
Added switch -dosver.
|
||||
Cleanup for OaBuildVersion().
|
||||
|
||||
* libtest/.cvsignore: Added vartest and volinfo
|
||||
|
||||
* dlls/shell32/contmenu.c, dlls/shell32/pidl.c, dlls/shell32/pidl.h, dlls/shell32/shelllink.c, dlls/shell32/shellord.c, dlls/shell32/shlfolder.c, dlls/shell32/shlview.c, include/shell.h:
|
||||
Juergen Schmied <juergen.schmied@metronet.de>
|
||||
Many bugfixes, code cleanup.
|
||||
Removed a few glitches from the COM patch.
|
||||
|
||||
* windows/dialog.c: Lawson Whitney <lawson_whitney@juno.com>
|
||||
Only destroy window once.
|
||||
|
||||
* graphics/ddraw.c, include/ddraw.h:
|
||||
Marcus Meissner <marcus@jet.franken.de>
|
||||
- moved drawable to common since it is used by both DGA and Xlib.
|
||||
(fixes one bad memory corruption bug in DGA (StarCraft and Diablo)
|
||||
- added BltFast sanity checks.
|
||||
|
||||
* windows/queue.c, loader/task.c:
|
||||
Ulrich Weigand <weigand@informatik.uni-erlangen.de>
|
||||
InitApp() call removed from 32-bit application startup;
|
||||
create task message queue in InitThreadInput() instead.
|
||||
|
||||
* loader/ne/convert.c:
|
||||
Ulrich Weigand <weigand@informatik.uni-erlangen.de>
|
||||
Added accelerator table PE->NE resource conversion.
|
||||
|
||||
* debugger/editline.c:
|
||||
Ulrich Weigand <weigand@informatik.uni-erlangen.de>
|
||||
Restart read() in case of EINTR in TTYget().
|
||||
|
||||
* dlls/shell32/shellole.c: Marcus Meissner <marcus@jet.franken.de>
|
||||
Ptr ref wrong.
|
||||
|
||||
* tools/wrc/CHANGES, tools/wrc/dumpres.c, tools/wrc/genres.c, tools/wrc/newstruc.c, tools/wrc/newstruc.h, tools/wrc/parser.l, tools/wrc/parser.y, tools/wrc/readres.c, tools/wrc/utils.c, tools/wrc/utils.h, tools/wrc/wrc.h, tools/wrc/wrctypes.h, tools/wrc/writeres.c:
|
||||
Bertho Stultiens <bertho@panter.soci.aau.dk>
|
||||
Wrc version 1.0.8. Toolbar resources are now supported. A couple of
|
||||
other fixes are also included. See file tools/wrc/CHANGES for details.
|
||||
|
||||
* ole/compobj.c: Marcus Meissner <marcus@jet.franken.de>
|
||||
Missing WINAPI.
|
||||
|
||||
* include/x11drv.h, loader/dos/module.c, objects/dc.c, relay32/builtin32.c, relay32/relay386.c, scheduler/k32obj.c, files/async.c, if1632/relay.c, include/main.h, include/multimedia.h, include/windows.h:
|
||||
James Juran <jrj120@psu.edu>
|
||||
Add missing #includes and prototypes to eliminate some implicit
|
||||
function declaration warnings and 'extern's in .c files.
|
||||
|
||||
* configure, configure.in, console/ncurses.c, include/acconfig.h, include/config.h.in:
|
||||
Ove Kaaven <ovek@arcticnet.no>
|
||||
Check for resizeterm in ncurses.
|
||||
|
||||
* libtest/Makefile.in, libtest/vartest-Win32.log, libtest/vartest.c, libtest/vartest.readme:
|
||||
Francis Beaudet <francis@macadamian.com>
|
||||
New test program for VARIANT functions.
|
||||
|
||||
* debugger/msc.c: Eric Pouech <Eric.Pouech@wanadoo.fr>
|
||||
Some debug information (PDB) was not mapped when loading a module,
|
||||
which caused a core in the debugger when it tried to access it.
|
||||
|
||||
* Makefile.in: Ove Kaaven <ovek@arcticnet.no>
|
||||
Links libwine.so.1.0 to libwine.so in Wine's main directory.
|
||||
Makes Wine compile with --enable-dll again.
|
||||
|
||||
Sat Jan 9 09:12:40 1999 Alexandre Julliard <julliard@winehq.com>
|
||||
|
||||
* relay32/ole32.spec, windows/dinput.c, include/storage.h, include/unknwn.h, include/windows.h, include/wine/obj_base.h, include/wine/obj_channel.h, include/wine/obj_clientserver.h, include/wine/obj_dataobject.h, include/wine/obj_marshal.h, include/wine/obj_misc.h, include/wine/obj_moniker.h, include/wine/obj_propertystorage.h, include/wine/obj_storage.h, include/winerror.h, include/wtypes.h, misc/shell.c, multimedia/dplay.c, multimedia/dsound.c, objects/font.c, ole/compobj.c, ole/ifs.c, ole/moniker.c, ole/ole2.c, ole/ole2disp.c, ole/oledlg.c, ole/oleobj.c, ole/storage.c, ole/typelib.c, dlls/shell32/dataobject.c, dlls/shell32/enumidlist.c, dlls/shell32/folders.c, dlls/shell32/pidl.c, dlls/shell32/shell32_main.c, dlls/shell32/shelllink.c, dlls/shell32/shellole.c, dlls/shell32/shellord.c, dlls/shell32/shlfolder.c, dlls/shell32/shlview.c, graphics/ddraw.c, graphics/vga.c, if1632/compobj.spec, include/compobj.h, include/ddraw.h, include/dinput.h, include/dplay.h, include/dsound.h, include/interfaces.h, include/objbase.h, include/objidl.h, include/ole.h, include/ole2.h, include/oleobj.h, include/servprov.h, include/shell.h, include/shlguid.h, include/shlobj.h, dlls/comctl32/imagelist.c, dlls/shell32/contmenu.c:
|
||||
Francois Gouget <fgouget@multimania.com>
|
||||
Added a lot of COM interfaces definitions.
|
||||
Restructured COM header files for better compatibility and clarity.
|
||||
|
||||
Fri Jan 8 16:37:03 1999 Alexandre Julliard <julliard@winehq.com>
|
||||
|
||||
* files/file.c: Set GENERIC_READ|GENERIC_WRITE access for OF_CREATE.
|
||||
Make GetFileType work for all handle types.
|
||||
|
||||
* win32/device.c: Avoid crash on NULL dev->info.
|
||||
|
||||
* include/flatsb.h, relay32/comctl32.spec, dlls/comctl32/Makefile.in, dlls/comctl32/commctrl.c, dlls/comctl32/flatsb.c, include/commctrl.h:
|
||||
Alex Priem <alexp@sci.kun.nl>
|
||||
Added stubs and defines for the flat scrollbar common control.
|
||||
|
||||
* include/commctrl.h, dlls/comctl32/datetime.c:
|
||||
Alex Priem <alexp@sci.kun.nl>
|
||||
Added some defines needed for custom draw'ing and datetime common
|
||||
controls.
|
||||
|
||||
* dlls/shell32/iconcache.c: Eddie Carpenter <ecarpenter@itex.co.za>
|
||||
Fixed a small bug in function ExtractIconEx32A.
|
||||
|
||||
* windows/winproc.c: Juergen Schmied <juergen.schmied@metronet.de>
|
||||
HTASK16 -> threadID mapping of WM_ACTIVATEAPP.
|
||||
|
||||
* files/file.c: Bertho Stultiens <bertho@panter.soci.aau.dk>
|
||||
Make DeleteFile fail for empty path.
|
||||
|
||||
* msdos/ioports.c: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
|
||||
Fix dummy_ctr stuff to work even without DIRECT_IO_ACCESS.
|
||||
|
||||
* loader/ne/segment.c: Marcus Meissner <marcus@jet.franken.de>
|
||||
Fixed wrong buffer which caused fixups to fail.
|
||||
|
||||
* graphics/d3dcommon.c, graphics/d3ddevices.c, graphics/d3dtexture.c, include/d3d.h:
|
||||
Lionel Ulmer <ulmer@directprovider.net>
|
||||
- added all the Direct3D error codes
|
||||
- added 8bit palettized texture support
|
||||
|
||||
* msdos/cdrom.c: Marcus Meissner <marcus@jet.franken.de>
|
||||
ifdefs for defines not in linux 2.0.
|
||||
|
||||
* relay32/winspool.spec, misc/printdrv.c:
|
||||
Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
|
||||
Added two stubs for AddPrinterDriver.
|
||||
|
||||
* include/dosexe.h, loader/dos/dosmod.c, loader/dos/dosmod.h, loader/dos/dosvm.c:
|
||||
Ove Kaaven <ovek@arcticnet.no>
|
||||
Queue SIGALRM to reduce the "signal 14 lost" complaints.
|
||||
Added support for reprogramming the DOS timer, and reading back the
|
||||
current value.
|
||||
|
||||
* misc/registry.c: Marcus Meissner <marcus@jet.franken.de>
|
||||
Wine hangs when registry (corrupted) has lone \ at end of file.
|
||||
|
||||
* dlls/shell32/shell32_main.h, dlls/shell32/shell32_main.c:
|
||||
Kostya Ivanov <kostya@warmcat.excom.spb.su>
|
||||
Small patch that enables Clarion for Windows not to trap while
|
||||
loading.
|
||||
|
||||
* ole/variant.c: Marcus Meissner <marcus@jet.franken.de>
|
||||
Replace troublesome assignments by memset for whole struct.
|
||||
|
||||
* graphics/ddraw.c: Lionel Ulmer <ulmer@directprovider.net>
|
||||
Added handling of the 'palent' field of the CreatePalette procedure.
|
||||
|
||||
* documentation/wine.man:
|
||||
Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
|
||||
Added description about including/excluding functions from relay
|
||||
trace.
|
||||
|
||||
* win32/console.c: Marcus Meissner <marcus@jet.franken.de>
|
||||
Read at least 1 input record in ReadConsoleInputA.
|
||||
|
||||
* memory/virtual.c:
|
||||
Fixed CreateMapping when a mapping with the same name already exists.
|
||||
|
||||
Wed Jan 6 10:37:29 1999 Alexandre Julliard <julliard@winehq.com>
|
||||
|
||||
* server/file.c: Fixed file destruction when file has no name.
|
||||
|
||||
Tue Jan 5 18:38:59 1999 Alexandre Julliard <julliard@winehq.com>
|
||||
|
||||
* misc/main.c: Eric Pouech <Eric.Pouech@wanadoo.fr>
|
||||
Warns user if multiple -dll switches are used on command line.
|
||||
|
||||
* dlls/comctl32/trackbar.c: Alex Priem <alexp@sci.kun.nl>
|
||||
Fixed a leftover HeapFree in the trackbar common control.
|
||||
|
||||
* include/commctrl.h, include/debug.h, include/debugdefs.h, include/tab.h, dlls/comctl32/tab.c:
|
||||
Alex Priem <alexp@sci.kun.nl>
|
||||
Fixed some problems with the tab common control (with thanks to Anders
|
||||
Carlsson <anders.carlsson@linux.nu>).
|
||||
|
||||
* dlls/comctl32/commctrl.c, dlls/comctl32/propsheet.c, include/commctrl.h, include/propsheet.h, relay32/comctl32.spec:
|
||||
Alex Priem <alexp@sci.kun.nl>
|
||||
Added a missing PropertySheet32AW and CreatePropertySheetPage stub,
|
||||
and some missing defines.
|
||||
|
||||
* misc/main.c, scheduler/syslevel.c, graphics/vga.c:
|
||||
Ulrich Weigand <weigand@informatik.uni-erlangen.de>
|
||||
Use MakeCriticalSectionGlobal on all critical sections used across
|
||||
process boundaries.
|
||||
|
||||
* include/winbase.h, include/windows.h:
|
||||
Ulrich Weigand <weigand@informatik.uni-erlangen.de>
|
||||
Added prototypes for MakeCriticalSectionGlobal, ConvertToGlobalHandle.
|
||||
|
||||
* documentation/wine.man:
|
||||
Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
|
||||
Added environment variables in the man page.
|
||||
|
||||
* loader/dos/module.c: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
|
||||
Fixed args of MZ_CreateProcess.
|
||||
|
||||
* programs/clock/language.c, programs/notepad/language.c, programs/progman/main.c:
|
||||
Andreas Mohr <a.mohr@mailto.de>
|
||||
Fixed string bug in programs/.
|
||||
|
||||
* msdos/ioports.c: Andreas Mohr <a.mohr@mailto.de>
|
||||
Added stupid "action" emulation for hardware timers in ioports.c.
|
||||
|
||||
* dlls/winaspi/winaspi16.c: Andreas Mohr <a.mohr@mailto.de>
|
||||
Again a small DOSASPI patch.
|
||||
|
||||
* documentation/bugreports, documentation/fonts, windows/sysmetrics.c, windows/win.c, windows/winpos.c:
|
||||
Andreas Mohr <a.mohr@mailto.de>
|
||||
Documentation updates.
|
||||
|
||||
* graphics/ddraw.c: Lionel Ulmer <ulmer@directprovider.net>
|
||||
- check if palette is not null when setting a palette
|
||||
- check if window handle is valid before getting its 'drawable'
|
||||
|
||||
* graphics/x11drv/xfont.c: Eric Pouech <Eric.Pouech@wanadoo.fr>
|
||||
Prevent core dump with some TTF (when X11 runs with a true type
|
||||
server).
|
||||
|
||||
* server/console.c: Marcus Meissner <marcus@jet.franken.de>
|
||||
Use stdout for default console output.
|
||||
|
||||
----------------------------------------------------------------
|
||||
Sun Jan 3 17:00:20 1999 Alexandre Julliard <julliard@winehq.com>
|
||||
|
||||
|
|
|
@ -170,6 +170,7 @@ libwine.a: $(LIBOBJS) $(X11OBJS)
|
|||
|
||||
libwine.so.1.0: $(LIBOBJS) $(X11OBJS)
|
||||
$(LDSHARED) -o$@ $(LIBOBJS) $(X11OBJS) $(LDOPTIONS)
|
||||
ln -sf $@ libwine.so
|
||||
|
||||
install_emu: install_lib
|
||||
[ -d $(bindir) ] || $(MKDIR) $(bindir)
|
||||
|
@ -230,7 +231,7 @@ htmlpages:
|
|||
clean::
|
||||
for i in $(ALLSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
|
||||
for i in include; do (cd $$i; $(RM) *.o \#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
|
||||
$(RM) wine wine.sym libwine.a libwine.so.1.0 TAGS .#*
|
||||
$(RM) wine wine.sym libwine.a libwine.so.1.0 libwine.so TAGS .#*
|
||||
|
||||
distclean: clean
|
||||
$(RM) config.* Make.rules include/config.h
|
||||
|
|
|
@ -2548,10 +2548,53 @@ else
|
|||
fi
|
||||
|
||||
if test "$ac_cv_lib_ncurses_waddch" = "yes"
|
||||
then :
|
||||
then
|
||||
echo $ac_n "checking for resizeterm in -lncurses""... $ac_c" 1>&6
|
||||
echo "configure:2554: checking for resizeterm in -lncurses" >&5
|
||||
ac_lib_var=`echo ncurses'_'resizeterm | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lncurses $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2562 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
builtin and then its argument prototype would still apply. */
|
||||
char resizeterm();
|
||||
|
||||
int main() {
|
||||
resizeterm()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=no"
|
||||
fi
|
||||
rm -f conftest*
|
||||
LIBS="$ac_save_LIBS"
|
||||
|
||||
fi
|
||||
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define HAVE_RESIZETERM 1
|
||||
EOF
|
||||
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
else
|
||||
echo $ac_n "checking for waddch in -lcurses""... $ac_c" 1>&6
|
||||
echo "configure:2555: checking for waddch in -lcurses" >&5
|
||||
echo "configure:2598: checking for waddch in -lcurses" >&5
|
||||
ac_lib_var=`echo curses'_'waddch | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -2559,7 +2602,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lcurses $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2563 "configure"
|
||||
#line 2606 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
|
@ -2570,7 +2613,7 @@ int main() {
|
|||
waddch()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:2617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
|
@ -2593,6 +2636,49 @@ EOF
|
|||
|
||||
LIBS="-lcurses $LIBS"
|
||||
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for resizeterm in -lcurses""... $ac_c" 1>&6
|
||||
echo "configure:2645: checking for resizeterm in -lcurses" >&5
|
||||
ac_lib_var=`echo curses'_'resizeterm | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lcurses $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2653 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
builtin and then its argument prototype would still apply. */
|
||||
char resizeterm();
|
||||
|
||||
int main() {
|
||||
resizeterm()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=no"
|
||||
fi
|
||||
rm -f conftest*
|
||||
LIBS="$ac_save_LIBS"
|
||||
|
||||
fi
|
||||
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define HAVE_RESIZETERM 1
|
||||
EOF
|
||||
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
@ -2600,12 +2686,12 @@ fi
|
|||
fi
|
||||
|
||||
echo $ac_n "checking "for GNU style IPX support"""... $ac_c" 1>&6
|
||||
echo "configure:2604: checking "for GNU style IPX support"" >&5
|
||||
echo "configure:2690: checking "for GNU style IPX support"" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_ipx_gnu'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2609 "configure"
|
||||
#line 2695 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/socket.h>
|
||||
#include <netipx/ipx.h>
|
||||
|
@ -2613,7 +2699,7 @@ int main() {
|
|||
((struct sockaddr_ipx *)0)->sipx_family == AF_IPX
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:2703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define HAVE_IPX_GNU 1
|
||||
|
@ -2635,12 +2721,12 @@ echo "$ac_t""$ac_cv_c_ipx_gnu" 1>&6
|
|||
if test "$ac_cv_c_ipx_gnu" = "no"
|
||||
then
|
||||
echo $ac_n "checking "for linux style IPX support"""... $ac_c" 1>&6
|
||||
echo "configure:2639: checking "for linux style IPX support"" >&5
|
||||
echo "configure:2725: checking "for linux style IPX support"" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_ipx_linux'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2644 "configure"
|
||||
#line 2730 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/socket.h>
|
||||
#include <asm/types.h>
|
||||
|
@ -2649,7 +2735,7 @@ int main() {
|
|||
((struct sockaddr_ipx *)0)->sipx_family == AF_IPX
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:2739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define HAVE_IPX_LINUX 1
|
||||
|
@ -2673,17 +2759,17 @@ for ac_hdr in sys/soundcard.h machine/soundcard.h soundcard.h
|
|||
do
|
||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||
echo "configure:2677: checking for $ac_hdr" >&5
|
||||
echo "configure:2763: checking for $ac_hdr" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2682 "configure"
|
||||
#line 2768 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:2687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:2773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -2711,12 +2797,12 @@ done
|
|||
|
||||
|
||||
echo $ac_n "checking "for Open Sound System"""... $ac_c" 1>&6
|
||||
echo "configure:2715: checking "for Open Sound System"" >&5
|
||||
echo "configure:2801: checking "for Open Sound System"" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_opensoundsystem'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2720 "configure"
|
||||
#line 2806 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if defined(HAVE_SYS_SOUNDCARD_H)
|
||||
|
@ -2737,7 +2823,7 @@ int main() {
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:2827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_opensoundsystem="yes"
|
||||
else
|
||||
|
@ -2761,12 +2847,12 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking "for union semun"""... $ac_c" 1>&6
|
||||
echo "configure:2765: checking "for union semun"" >&5
|
||||
echo "configure:2851: checking "for union semun"" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_union_semun'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2770 "configure"
|
||||
#line 2856 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/sem.h>
|
||||
|
@ -2774,7 +2860,7 @@ int main() {
|
|||
union semun foo
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:2864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_union_semun="yes"
|
||||
else
|
||||
|
@ -2802,7 +2888,7 @@ if test "x${GCC}" = "xyes"
|
|||
then
|
||||
CFLAGS="$CFLAGS -Wall"
|
||||
echo $ac_n "checking "for gcc strength-reduce bug"""... $ac_c" 1>&6
|
||||
echo "configure:2806: checking "for gcc strength-reduce bug"" >&5
|
||||
echo "configure:2892: checking "for gcc strength-reduce bug"" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_gcc_strength_bug'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -2810,7 +2896,7 @@ else
|
|||
ac_cv_c_gcc_strength_bug="yes"
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2814 "configure"
|
||||
#line 2900 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main(void) {
|
||||
|
@ -2821,7 +2907,7 @@ int main(void) {
|
|||
exit( Array[1] != -2 );
|
||||
}
|
||||
EOF
|
||||
if { (eval echo configure:2825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:2911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
ac_cv_c_gcc_strength_bug="no"
|
||||
else
|
||||
|
@ -2844,7 +2930,7 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking "whether external symbols need an underscore prefix"""... $ac_c" 1>&6
|
||||
echo "configure:2848: checking "whether external symbols need an underscore prefix"" >&5
|
||||
echo "configure:2934: checking "whether external symbols need an underscore prefix"" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_extern_prefix'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -2856,14 +2942,14 @@ _ac_test:
|
|||
.long 0
|
||||
EOF
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2860 "configure"
|
||||
#line 2946 "configure"
|
||||
#include "confdefs.h"
|
||||
extern int ac_test;
|
||||
int main() {
|
||||
if (ac_test) return 1
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:2953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_extern_prefix="yes"
|
||||
else
|
||||
|
@ -2887,7 +2973,7 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking "whether assembler accepts .string"""... $ac_c" 1>&6
|
||||
echo "configure:2891: checking "whether assembler accepts .string"" >&5
|
||||
echo "configure:2977: checking "whether assembler accepts .string"" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_asm_string'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -2897,14 +2983,14 @@ cat > conftest_asm.s <<EOF
|
|||
.string "test"
|
||||
EOF
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2901 "configure"
|
||||
#line 2987 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:2994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_asm_string="yes"
|
||||
else
|
||||
|
@ -2932,21 +3018,21 @@ LDSHARED=""
|
|||
if test "$LIB_TARGET" = "libwine.so.1.0"
|
||||
then
|
||||
echo $ac_n "checking "whether we can build a Linux dll"""... $ac_c" 1>&6
|
||||
echo "configure:2936: checking "whether we can build a Linux dll"" >&5
|
||||
echo "configure:3022: checking "whether we can build a Linux dll"" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_dll_linux'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
saved_cflags=$CFLAGS
|
||||
CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2943 "configure"
|
||||
#line 3029 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
return 1
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:3036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_dll_linux="yes"
|
||||
else
|
||||
|
@ -2967,21 +3053,21 @@ echo "$ac_t""$ac_cv_c_dll_linux" 1>&6
|
|||
LDSHARED="\$(CC) -shared -Wl,-soname,libwine.so"
|
||||
else
|
||||
echo $ac_n "checking "whether we can build a NetBSD dll"""... $ac_c" 1>&6
|
||||
echo "configure:2971: checking "whether we can build a NetBSD dll"" >&5
|
||||
echo "configure:3057: checking "whether we can build a NetBSD dll"" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_dll_netbsd'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
saved_cflags=$CFLAGS
|
||||
CFLAGS="$CFLAGS -fPIC -Bshareable -Bforcearchive"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2978 "configure"
|
||||
#line 3064 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
return 1
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:3071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_dll_netbsd="yes"
|
||||
else
|
||||
|
@ -3012,7 +3098,7 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking "for reentrant libc"""... $ac_c" 1>&6
|
||||
echo "configure:3016: checking "for reentrant libc"" >&5
|
||||
echo "configure:3102: checking "for reentrant libc"" >&5
|
||||
if eval "test \"`echo '$''{'wine_cv_libc_reentrant'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -3020,14 +3106,14 @@ else
|
|||
wine_cv_libc_reentrant=yes
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3024 "configure"
|
||||
#line 3110 "configure"
|
||||
#include "confdefs.h"
|
||||
int myerrno = 0;
|
||||
char buf[256];
|
||||
int *__errno_location(){return &myerrno;}
|
||||
main(){connect(0,buf,255); exit(!myerrno);}
|
||||
EOF
|
||||
if { (eval echo configure:3031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:3117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
wine_cv_libc_reentrant=yes
|
||||
else
|
||||
|
@ -3052,7 +3138,7 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking "for reentrant X libraries"""... $ac_c" 1>&6
|
||||
echo "configure:3056: checking "for reentrant X libraries"" >&5
|
||||
echo "configure:3142: checking "for reentrant X libraries"" >&5
|
||||
if eval "test \"`echo '$''{'wine_cv_x_reentrant'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -3097,12 +3183,12 @@ fi
|
|||
for ac_func in clone getpagesize memmove sendmsg sigaltstack strerror stricmp tcgetattr timegm usleep wait4 waitpid vfscanf
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:3101: checking for $ac_func" >&5
|
||||
echo "configure:3187: checking for $ac_func" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3106 "configure"
|
||||
#line 3192 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
|
@ -3125,7 +3211,7 @@ $ac_func();
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:3215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=yes"
|
||||
else
|
||||
|
@ -3149,21 +3235,21 @@ else
|
|||
fi
|
||||
done
|
||||
|
||||
for ac_hdr in wctype.h sys/syscall.h syscall.h sys/param.h sys/vfs.h sys/mount.h sys/statfs.h float.h linux/cdrom.h linux/ucdrom.h sys/cdio.h sys/filio.h sys/modem.h strings.h sys/strtio.h dlfcn.h unistd.h sys/sockio.h net/if.h netinet/in.h
|
||||
for ac_hdr in wctype.h sys/syscall.h syscall.h sys/param.h sys/vfs.h sys/mount.h sys/statfs.h float.h linux/cdrom.h linux/ucdrom.h sys/cdio.h sys/filio.h sys/modem.h strings.h sys/strtio.h dlfcn.h unistd.h sys/sockio.h net/if.h netinet/in.h sys/file.h
|
||||
do
|
||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||
echo "configure:3157: checking for $ac_hdr" >&5
|
||||
echo "configure:3243: checking for $ac_hdr" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3162 "configure"
|
||||
#line 3248 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:3167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:3253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -3190,12 +3276,12 @@ fi
|
|||
done
|
||||
|
||||
echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
|
||||
echo "configure:3194: checking whether stat file-mode macros are broken" >&5
|
||||
echo "configure:3280: checking whether stat file-mode macros are broken" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3199 "configure"
|
||||
#line 3285 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -3246,12 +3332,12 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for working const""... $ac_c" 1>&6
|
||||
echo "configure:3250: checking for working const" >&5
|
||||
echo "configure:3336: checking for working const" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3255 "configure"
|
||||
#line 3341 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
|
@ -3300,7 +3386,7 @@ ccp = (char const *const *) p;
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:3390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_const=yes
|
||||
else
|
||||
|
@ -3321,12 +3407,12 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
|
||||
echo "configure:3325: checking for ANSI C header files" >&5
|
||||
echo "configure:3411: checking for ANSI C header files" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3330 "configure"
|
||||
#line 3416 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
@ -3334,7 +3420,7 @@ else
|
|||
#include <float.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:3338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:3424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -3351,7 +3437,7 @@ rm -f conftest*
|
|||
if test $ac_cv_header_stdc = yes; then
|
||||
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3355 "configure"
|
||||
#line 3441 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <string.h>
|
||||
EOF
|
||||
|
@ -3369,7 +3455,7 @@ fi
|
|||
if test $ac_cv_header_stdc = yes; then
|
||||
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3373 "configure"
|
||||
#line 3459 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdlib.h>
|
||||
EOF
|
||||
|
@ -3390,7 +3476,7 @@ if test "$cross_compiling" = yes; then
|
|||
:
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3394 "configure"
|
||||
#line 3480 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <ctype.h>
|
||||
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
|
||||
|
@ -3401,7 +3487,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
|
|||
exit (0); }
|
||||
|
||||
EOF
|
||||
if { (eval echo configure:3405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:3491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
:
|
||||
else
|
||||
|
@ -3425,12 +3511,12 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for size_t""... $ac_c" 1>&6
|
||||
echo "configure:3429: checking for size_t" >&5
|
||||
echo "configure:3515: checking for size_t" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3434 "configure"
|
||||
#line 3520 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#if STDC_HEADERS
|
||||
|
@ -3458,7 +3544,7 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking size of long long""... $ac_c" 1>&6
|
||||
echo "configure:3462: checking size of long long" >&5
|
||||
echo "configure:3548: checking size of long long" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -3466,7 +3552,7 @@ else
|
|||
ac_cv_sizeof_long_long=0
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3470 "configure"
|
||||
#line 3556 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdio.h>
|
||||
main()
|
||||
|
@ -3477,7 +3563,7 @@ main()
|
|||
exit(0);
|
||||
}
|
||||
EOF
|
||||
if { (eval echo configure:3481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:3567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
ac_cv_sizeof_long_long=`cat conftestval`
|
||||
else
|
||||
|
@ -3500,7 +3586,7 @@ EOF
|
|||
|
||||
if test $ac_cv_func_sendmsg = no; then
|
||||
echo $ac_n "checking for sendmsg in -lsocket""... $ac_c" 1>&6
|
||||
echo "configure:3504: checking for sendmsg in -lsocket" >&5
|
||||
echo "configure:3590: checking for sendmsg in -lsocket" >&5
|
||||
ac_lib_var=`echo socket'_'sendmsg | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -3508,7 +3594,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lsocket $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3512 "configure"
|
||||
#line 3598 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
|
@ -3519,7 +3605,7 @@ int main() {
|
|||
sendmsg()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:3609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
|
@ -3552,12 +3638,12 @@ fi
|
|||
if test "$ac_cv_header_sys_vfs_h" = "yes"
|
||||
then
|
||||
echo $ac_n "checking "whether sys/vfs.h defines statfs"""... $ac_c" 1>&6
|
||||
echo "configure:3556: checking "whether sys/vfs.h defines statfs"" >&5
|
||||
echo "configure:3642: checking "whether sys/vfs.h defines statfs"" >&5
|
||||
if eval "test \"`echo '$''{'wine_cv_sys_vfs_has_statfs'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3561 "configure"
|
||||
#line 3647 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -3574,7 +3660,7 @@ int main() {
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:3664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
wine_cv_sys_vfs_has_statfs=yes
|
||||
else
|
||||
|
@ -3601,12 +3687,12 @@ fi
|
|||
if test "$ac_cv_header_sys_statfs_h" = "yes"
|
||||
then
|
||||
echo $ac_n "checking "whether sys/statfs.h defines statfs"""... $ac_c" 1>&6
|
||||
echo "configure:3605: checking "whether sys/statfs.h defines statfs"" >&5
|
||||
echo "configure:3691: checking "whether sys/statfs.h defines statfs"" >&5
|
||||
if eval "test \"`echo '$''{'wine_cv_sys_statfs_has_statfs'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3610 "configure"
|
||||
#line 3696 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -3621,7 +3707,7 @@ int main() {
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:3711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
wine_cv_sys_statfs_has_statfs=yes
|
||||
else
|
||||
|
@ -3648,12 +3734,12 @@ fi
|
|||
if test "$ac_cv_header_sys_mount_h" = "yes"
|
||||
then
|
||||
echo $ac_n "checking "whether sys/mount.h defines statfs"""... $ac_c" 1>&6
|
||||
echo "configure:3652: checking "whether sys/mount.h defines statfs"" >&5
|
||||
echo "configure:3738: checking "whether sys/mount.h defines statfs"" >&5
|
||||
if eval "test \"`echo '$''{'wine_cv_sys_mount_has_statfs'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3657 "configure"
|
||||
#line 3743 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -3668,7 +3754,7 @@ int main() {
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:3758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
wine_cv_sys_mount_has_statfs=yes
|
||||
else
|
||||
|
@ -3694,7 +3780,7 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking "for statfs.f_bfree"""... $ac_c" 1>&6
|
||||
echo "configure:3698: checking "for statfs.f_bfree"" >&5
|
||||
echo "configure:3784: checking "for statfs.f_bfree"" >&5
|
||||
if eval "test \"`echo '$''{'wine_cv_statfs_bfree'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -3703,7 +3789,7 @@ else
|
|||
wine_cv_statfs_bfree=no
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3707 "configure"
|
||||
#line 3793 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -3730,7 +3816,7 @@ int main() {
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:3820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
wine_cv_statfs_bfree=yes
|
||||
else
|
||||
|
@ -3754,7 +3840,7 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking "for statfs.f_bavail"""... $ac_c" 1>&6
|
||||
echo "configure:3758: checking "for statfs.f_bavail"" >&5
|
||||
echo "configure:3844: checking "for statfs.f_bavail"" >&5
|
||||
if eval "test \"`echo '$''{'wine_cv_statfs_bavail'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -3763,7 +3849,7 @@ else
|
|||
wine_cv_statfs_bavail=no
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3767 "configure"
|
||||
#line 3853 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -3790,7 +3876,7 @@ int main() {
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:3880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
wine_cv_statfs_bavail=yes
|
||||
else
|
||||
|
@ -3815,7 +3901,7 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking "for working sigaltstack"""... $ac_c" 1>&6
|
||||
echo "configure:3819: checking "for working sigaltstack"" >&5
|
||||
echo "configure:3905: checking "for working sigaltstack"" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_working_sigaltstack'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -3824,7 +3910,7 @@ else
|
|||
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3828 "configure"
|
||||
#line 3914 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -3862,7 +3948,7 @@ else
|
|||
}
|
||||
|
||||
EOF
|
||||
if { (eval echo configure:3866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:3952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
ac_cv_c_working_sigaltstack="yes"
|
||||
else
|
||||
|
@ -3889,12 +3975,12 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking "for msg_accrights in struct msghdr"""... $ac_c" 1>&6
|
||||
echo "configure:3893: checking "for msg_accrights in struct msghdr"" >&5
|
||||
echo "configure:3979: checking "for msg_accrights in struct msghdr"" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_msg_accrights'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3898 "configure"
|
||||
#line 3984 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
|
@ -3902,7 +3988,7 @@ int main() {
|
|||
struct msghdr hdr; hdr.msg_accrights=0
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:3992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_msg_accrights="yes"
|
||||
else
|
||||
|
@ -4420,6 +4506,14 @@ rm -fr confdefs* $ac_clean_files
|
|||
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
|
||||
|
||||
|
||||
if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
|
||||
then
|
||||
echo
|
||||
echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
|
||||
echo "*** terminal resize support. Consider upgrading ncurses."
|
||||
echo
|
||||
fi
|
||||
|
||||
if test "$wine_cv_libc_reentrant" = "no"
|
||||
then
|
||||
echo
|
||||
|
|
14
configure.in
14
configure.in
|
@ -117,9 +117,11 @@ fi
|
|||
dnl **** Check which curses lib to use ***
|
||||
AC_CHECK_LIB(ncurses,waddch)
|
||||
if test "$ac_cv_lib_ncurses_waddch" = "yes"
|
||||
then :
|
||||
then
|
||||
AC_CHECK_LIB(ncurses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
|
||||
else
|
||||
AC_CHECK_LIB(curses,waddch)
|
||||
AC_CHECK_LIB(curses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
|
||||
fi
|
||||
|
||||
dnl **** Check for IPX (currently Linux only) ****
|
||||
|
@ -342,7 +344,7 @@ fi
|
|||
dnl **** Check for functions and header files ****
|
||||
|
||||
AC_CHECK_FUNCS(clone getpagesize memmove sendmsg sigaltstack strerror stricmp tcgetattr timegm usleep wait4 waitpid vfscanf)
|
||||
AC_CHECK_HEADERS(wctype.h sys/syscall.h syscall.h sys/param.h sys/vfs.h sys/mount.h sys/statfs.h float.h linux/cdrom.h linux/ucdrom.h sys/cdio.h sys/filio.h sys/modem.h strings.h sys/strtio.h dlfcn.h unistd.h sys/sockio.h net/if.h netinet/in.h)
|
||||
AC_CHECK_HEADERS(wctype.h sys/syscall.h syscall.h sys/param.h sys/vfs.h sys/mount.h sys/statfs.h float.h linux/cdrom.h linux/ucdrom.h sys/cdio.h sys/filio.h sys/modem.h strings.h sys/strtio.h dlfcn.h unistd.h sys/sockio.h net/if.h netinet/in.h sys/file.h)
|
||||
AC_HEADER_STAT()
|
||||
AC_C_CONST()
|
||||
AC_TYPE_SIZE_T()
|
||||
|
@ -617,6 +619,14 @@ windows/Makefile
|
|||
windows/ttydrv/Makefile
|
||||
windows/x11drv/Makefile ])
|
||||
|
||||
if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
|
||||
then
|
||||
echo
|
||||
echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
|
||||
echo "*** terminal resize support. Consider upgrading ncurses."
|
||||
echo
|
||||
fi
|
||||
|
||||
if test "$wine_cv_libc_reentrant" = "no"
|
||||
then
|
||||
echo
|
||||
|
|
|
@ -39,7 +39,9 @@ void NCURSES_Start()
|
|||
driver.getCursorPosition = NCURSES_GetCursorPosition;
|
||||
driver.getCharacterAtCursor = NCURSES_GetCharacterAtCursor;
|
||||
driver.clearScreen = NCURSES_ClearScreen;
|
||||
#ifdef HAVE_RESIZETERM
|
||||
driver.notifyResizeScreen = NCURSES_NotifyResizeScreen;
|
||||
#endif
|
||||
|
||||
driver.checkForKeystroke = NCURSES_CheckForKeystroke;
|
||||
driver.getKeystroke = NCURSES_GetKeystroke;
|
||||
|
@ -62,9 +64,14 @@ void NCURSES_Init()
|
|||
|
||||
void NCURSES_Write(char output, int fg, int bg, int attribute)
|
||||
{
|
||||
char row, col;
|
||||
|
||||
/* We can discard all extended information. */
|
||||
if (waddch(stdscr, output) == ERR)
|
||||
FIXME(console, "NCURSES: waddch() failed.\n");
|
||||
{
|
||||
NCURSES_GetCursorPosition(&row, &col);
|
||||
FIXME(console, "NCURSES: waddch() failed at %d, %d.\n", row, col);
|
||||
}
|
||||
}
|
||||
|
||||
void NCURSES_Close()
|
||||
|
@ -137,6 +144,8 @@ void NCURSES_ClearScreen()
|
|||
werase(stdscr);
|
||||
}
|
||||
|
||||
#ifdef HAVE_RESIZETERM
|
||||
|
||||
void NCURSES_NotifyResizeScreen(int x, int y)
|
||||
{
|
||||
/* Note: This function gets called *after* another driver in the chain
|
||||
|
@ -146,4 +155,6 @@ void NCURSES_NotifyResizeScreen(int x, int y)
|
|||
resizeterm(y, x);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* WINE_NCURSES */
|
||||
|
|
|
@ -1186,23 +1186,26 @@ static LRESULT LISTBOX_SelectItemRange( WND *wnd, LB_DESCR *descr, INT32 first,
|
|||
|
||||
/***********************************************************************
|
||||
* LISTBOX_SetCaretIndex
|
||||
*
|
||||
* NOTES
|
||||
* index must be between 0 and descr->nb_items-1, or LB_ERR is returned.
|
||||
*
|
||||
*/
|
||||
static LRESULT LISTBOX_SetCaretIndex( WND *wnd, LB_DESCR *descr, INT32 index,
|
||||
BOOL32 fully_visible )
|
||||
{
|
||||
INT32 oldfocus = descr->focus_item;
|
||||
INT32 oldfocus = descr->focus_item;
|
||||
|
||||
if ((index < -1) || (index >= descr->nb_items)) return LB_ERR;
|
||||
if ((index < 0) || (index >= descr->nb_items)) return LB_ERR;
|
||||
if (index == oldfocus) return LB_OKAY;
|
||||
descr->focus_item = index;
|
||||
if ((oldfocus != -1) && descr->caret_on && (GetFocus32() == wnd->hwndSelf))
|
||||
LISTBOX_RepaintItem( wnd, descr, oldfocus, ODA_FOCUS );
|
||||
if (index != -1)
|
||||
{
|
||||
LISTBOX_MakeItemVisible( wnd, descr, index, fully_visible );
|
||||
if (descr->caret_on && (GetFocus32() == wnd->hwndSelf))
|
||||
LISTBOX_RepaintItem( wnd, descr, index, ODA_FOCUS );
|
||||
}
|
||||
|
||||
LISTBOX_MakeItemVisible( wnd, descr, index, fully_visible );
|
||||
if (descr->caret_on && (GetFocus32() == wnd->hwndSelf))
|
||||
LISTBOX_RepaintItem( wnd, descr, index, ODA_FOCUS );
|
||||
|
||||
return LB_OKAY;
|
||||
}
|
||||
|
||||
|
@ -2284,7 +2287,7 @@ LRESULT WINAPI ListBoxWndProc( HWND32 hwnd, UINT32 msg,
|
|||
wParam = (INT32)(INT16)wParam;
|
||||
/* fall through */
|
||||
case LB_SETCURSEL32:
|
||||
if (wParam != -1) LISTBOX_MakeItemVisible( wnd, descr, wParam, TRUE );
|
||||
LISTBOX_SetCaretIndex( wnd, descr, wParam, TRUE );
|
||||
return LISTBOX_SetSelection( wnd, descr, wParam, TRUE, FALSE );
|
||||
|
||||
case LB_GETSELCOUNT16:
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -279,6 +280,7 @@ static unsigned int
|
|||
TTYget()
|
||||
{
|
||||
CHAR c;
|
||||
int retv;
|
||||
|
||||
TTYflush();
|
||||
if (Pushed) {
|
||||
|
@ -287,7 +289,14 @@ TTYget()
|
|||
}
|
||||
if (*Input)
|
||||
return *Input++;
|
||||
return read(0, &c, (size_t)1) == 1 ? c : EOF;
|
||||
|
||||
while ( ( retv = read( 0, &c, (size_t)1 ) ) == -1 )
|
||||
{
|
||||
if ( errno != EINTR )
|
||||
perror( "read" );
|
||||
}
|
||||
|
||||
return retv == 1 ? c : EOF;
|
||||
}
|
||||
|
||||
#define TTYback() (backspace ? TTYputs((CHAR *)backspace) : TTYput('\b'))
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include "debugger.h"
|
||||
#include "peexe.h"
|
||||
#include "xmalloc.h"
|
||||
|
||||
#include "file.h"
|
||||
|
||||
/*
|
||||
* This is an index we use to keep track of the debug information
|
||||
|
@ -888,7 +888,6 @@ DEBUG_RegisterDebugInfo( HMODULE32 hModule, const char *module_name,
|
|||
int rtn = FALSE;
|
||||
int orig_size;
|
||||
PIMAGE_DEBUG_DIRECTORY dbgptr;
|
||||
struct deferred_debug_info * deefer;
|
||||
|
||||
orig_size = size;
|
||||
dbgptr = (PIMAGE_DEBUG_DIRECTORY) (hModule + v_addr);
|
||||
|
@ -934,35 +933,72 @@ DEBUG_RegisterDebugInfo( HMODULE32 hModule, const char *module_name,
|
|||
* means that this entry points to a .DBG file. Otherwise,
|
||||
* it just points to itself, and we can ignore this.
|
||||
*/
|
||||
if( (dbgptr->Type == IMAGE_DEBUG_TYPE_MISC)
|
||||
&& (PE_HEADER(hModule)->FileHeader.Characteristics & IMAGE_FILE_DEBUG_STRIPPED) == 0 )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
deefer = (struct deferred_debug_info *) xmalloc(sizeof(*deefer));
|
||||
deefer->module = hModule;
|
||||
deefer->load_addr = (char *)hModule;
|
||||
deefer->dbg_info = NULL;
|
||||
deefer->dbg_size = 0;
|
||||
|
||||
/*
|
||||
* Read the important bits. What we do after this depends
|
||||
* upon the type, but this is always enough so we are able
|
||||
* to proceed if we know what we need to do next.
|
||||
*/
|
||||
deefer->dbg_size = dbgptr->SizeOfData;
|
||||
deefer->dbg_info = (char *)(hModule + dbgptr->PointerToRawData);
|
||||
deefer->dbgdir = dbgptr;
|
||||
deefer->next = dbglist;
|
||||
deefer->loaded = FALSE;
|
||||
deefer->dbg_index = DEBUG_next_index;
|
||||
deefer->module_name = xstrdup(module_name);
|
||||
|
||||
deefer->sectp = PE_SECTIONS(hModule);
|
||||
deefer->nsect = PE_HEADER(hModule)->FileHeader.NumberOfSections;
|
||||
|
||||
dbglist = deefer;
|
||||
|
||||
|
||||
if( (dbgptr->Type != IMAGE_DEBUG_TYPE_MISC) ||
|
||||
(PE_HEADER(hModule)->FileHeader.Characteristics & IMAGE_FILE_DEBUG_STRIPPED) != 0 )
|
||||
{
|
||||
struct deferred_debug_info* deefer = (struct deferred_debug_info *) xmalloc(sizeof(*deefer));
|
||||
|
||||
deefer->module = hModule;
|
||||
deefer->load_addr = (char *)hModule;
|
||||
|
||||
/*
|
||||
* Read the important bits. What we do after this depends
|
||||
* upon the type, but this is always enough so we are able
|
||||
* to proceed if we know what we need to do next.
|
||||
*/
|
||||
/* in some cases, debug information has not been mapped, so load it...
|
||||
* basically, the PE loader maps all sections (data, resources...), but doesn't map
|
||||
* the DataDirectory array's content. One its entry contains the *beloved*
|
||||
* debug information. (Note the DataDirectory is mapped, not its content)
|
||||
*/
|
||||
if (IsBadReadPtr32((void*)hModule, dbgptr->PointerToRawData + dbgptr->SizeOfData))
|
||||
{
|
||||
char fn[PATH_MAX];
|
||||
int fd = -1;
|
||||
DOS_FULL_NAME full_name;
|
||||
|
||||
if (GetModuleFileName32A(hModule, fn, sizeof(fn)) > 0 &&
|
||||
DOSFS_GetFullName(fn, TRUE, &full_name) &&
|
||||
(fd = open(full_name.long_name, O_RDONLY)) > 0)
|
||||
{
|
||||
deefer->dbg_info = mmap(NULL, dbgptr->SizeOfData,
|
||||
PROT_READ, MAP_PRIVATE, fd, dbgptr->PointerToRawData);
|
||||
close(fd);
|
||||
if( deefer->dbg_info == (char *) 0xffffffff )
|
||||
{
|
||||
free(deefer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
free(deefer);
|
||||
fprintf(stderr, " (not mapped: fn=%s, lfn=%s, fd=%d)", fn, full_name.long_name, fd);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
deefer->dbg_info = (char *)(hModule + dbgptr->PointerToRawData);
|
||||
}
|
||||
deefer->dbg_size = dbgptr->SizeOfData;
|
||||
deefer->dbgdir = dbgptr;
|
||||
deefer->next = dbglist;
|
||||
deefer->loaded = FALSE;
|
||||
deefer->dbg_index = DEBUG_next_index;
|
||||
deefer->module_name = xstrdup(module_name);
|
||||
|
||||
deefer->sectp = PE_SECTIONS(hModule);
|
||||
deefer->nsect = PE_HEADER(hModule)->FileHeader.NumberOfSections;
|
||||
|
||||
dbglist = deefer;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
@ -1813,7 +1849,7 @@ DEBUG_ProcessPDBFile(struct deferred_debug_info * deefer, char * full_filename)
|
|||
status = stat(filename, &statbuf);
|
||||
if( status == -1 )
|
||||
{
|
||||
fprintf(stderr, "Unable to open .PDB file %s\n", filename);
|
||||
fprintf(stderr, "-Unable to open .PDB file %s\n", filename);
|
||||
goto leave;
|
||||
}
|
||||
|
||||
|
@ -1823,7 +1859,7 @@ DEBUG_ProcessPDBFile(struct deferred_debug_info * deefer, char * full_filename)
|
|||
fd = open(filename, O_RDONLY);
|
||||
if( fd == -1 )
|
||||
{
|
||||
fprintf(stderr, "Unable to open .DBG file %s\n", filename);
|
||||
fprintf(stderr, "-Unable to open .DBG file %s\n", filename);
|
||||
goto leave;
|
||||
}
|
||||
|
||||
|
@ -1835,7 +1871,7 @@ DEBUG_ProcessPDBFile(struct deferred_debug_info * deefer, char * full_filename)
|
|||
MAP_PRIVATE, fd, 0);
|
||||
if( addr == (char *) 0xffffffff )
|
||||
{
|
||||
fprintf(stderr, "Unable to mmap .DBG file %s\n", filename);
|
||||
fprintf(stderr, "-Unable to mmap .DBG file %s\n", filename);
|
||||
goto leave;
|
||||
}
|
||||
|
||||
|
@ -2141,7 +2177,7 @@ DEBUG_ProcessDBGFile(struct deferred_debug_info * deefer, char * filename)
|
|||
status = stat(filename, &statbuf);
|
||||
if( status == -1 )
|
||||
{
|
||||
fprintf(stderr, "Unable to open .DBG file %s\n", filename);
|
||||
fprintf(stderr, "-Unable to open .DBG file %s\n", filename);
|
||||
goto leave;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ C_SRCS = \
|
|||
comctl32undoc.c \
|
||||
commctrl.c \
|
||||
datetime.c \
|
||||
flatsb.c \
|
||||
header.c \
|
||||
hotkey.c \
|
||||
imagelist.c \
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "animate.h"
|
||||
#include "comboex.h"
|
||||
#include "datetime.h"
|
||||
#include "flatsb.h"
|
||||
#include "header.h"
|
||||
#include "hotkey.h"
|
||||
#include "ipaddress.h"
|
||||
|
@ -20,6 +21,7 @@
|
|||
#include "nativefont.h"
|
||||
#include "pager.h"
|
||||
#include "progress.h"
|
||||
#include "propsheet.h"
|
||||
#include "rebar.h"
|
||||
#include "status.h"
|
||||
#include "tab.h"
|
||||
|
@ -70,9 +72,11 @@ COMCTL32_LibMain (HINSTANCE32 hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
|||
|
||||
/* register all Win95 common control classes */
|
||||
ANIMATE_Register ();
|
||||
FLATSB_Register ();
|
||||
HEADER_Register ();
|
||||
HOTKEY_Register ();
|
||||
LISTVIEW_Register ();
|
||||
PROPSHEET_Register ();
|
||||
PROGRESS_Register ();
|
||||
STATUS_Register ();
|
||||
TAB_Register ();
|
||||
|
@ -92,6 +96,7 @@ COMCTL32_LibMain (HINSTANCE32 hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
|||
ANIMATE_Unregister ();
|
||||
COMBOEX_Unregister ();
|
||||
DATETIME_Unregister ();
|
||||
FLATSB_Unregister ();
|
||||
HEADER_Unregister ();
|
||||
HOTKEY_Unregister ();
|
||||
IPADDRESS_Unregister ();
|
||||
|
@ -99,6 +104,7 @@ COMCTL32_LibMain (HINSTANCE32 hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
|||
MONTHCAL_Unregister ();
|
||||
NATIVEFONT_Unregister ();
|
||||
PAGER_Unregister ();
|
||||
PROPSHEET_UnRegister ();
|
||||
PROGRESS_Unregister ();
|
||||
REBAR_Unregister ();
|
||||
STATUS_Unregister ();
|
||||
|
|
|
@ -60,12 +60,7 @@ DATETIME_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
{
|
||||
DATETIME_INFO *infoPtr = DATETIME_GetInfoPtr(wndPtr);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* free ipaddress info data */
|
||||
/* free datetime info data */
|
||||
COMCTL32_Free (infoPtr);
|
||||
|
||||
return 0;
|
||||
|
@ -82,6 +77,49 @@ DATETIME_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
|
|||
switch (uMsg)
|
||||
{
|
||||
|
||||
case DTM_GETSYSTEMTIME:
|
||||
FIXME (datetime, "Unimplemented msg DTM_GETSYSTEMTIME\n");
|
||||
return GDT_VALID;
|
||||
|
||||
case DTM_SETSYSTEMTIME:
|
||||
FIXME (datetime, "Unimplemented msg DTM_SETSYSTEMTIME\n");
|
||||
return 1;
|
||||
|
||||
case DTM_GETRANGE:
|
||||
FIXME (datetime, "Unimplemented msg DTM_GETRANGE\n");
|
||||
return 0;
|
||||
|
||||
case DTM_SETRANGE:
|
||||
FIXME (datetime, "Unimplemented msg DTM_SETRANGE\n");
|
||||
return 1;
|
||||
|
||||
case DTM_SETFORMAT32A:
|
||||
FIXME (datetime, "Unimplemented msg DTM_SETFORMAT32A\n");
|
||||
return 1;
|
||||
|
||||
case DTM_SETFORMAT32W:
|
||||
FIXME (datetime, "Unimplemented msg DTM_SETFORMAT32W\n");
|
||||
return 1;
|
||||
|
||||
case DTM_SETMCCOLOR:
|
||||
FIXME (datetime, "Unimplemented msg DTM_SETMCCOLOR\n");
|
||||
return 0;
|
||||
|
||||
case DTM_GETMCCOLOR:
|
||||
FIXME (datetime, "Unimplemented msg DTM_GETMCCOLOR\n");
|
||||
return 0;
|
||||
|
||||
case DTM_GETMONTHCAL:
|
||||
FIXME (datetime, "Unimplemented msg DTM_GETMONTHCAL\n");
|
||||
return 0;
|
||||
|
||||
case DTM_SETMCFONT:
|
||||
FIXME (datetime, "Unimplemented msg DTM_SETMCFONT\n");
|
||||
return 0;
|
||||
|
||||
case DTM_GETMCFONT:
|
||||
FIXME (datetime, "Unimplemented msg DTM_GETMCFONT\n");
|
||||
return 0;
|
||||
|
||||
case WM_CREATE:
|
||||
return DATETIME_Create (wndPtr, wParam, lParam);
|
||||
|
|
|
@ -0,0 +1,179 @@
|
|||
/*
|
||||
* Flat Scrollbar control
|
||||
*
|
||||
* Copyright 1998 Eric Kohl
|
||||
*
|
||||
* NOTES
|
||||
* This is just a dummy control. An author is needed! Any volunteers?
|
||||
* I will only improve this control once in a while.
|
||||
* Eric <ekohl@abo.rhein-zeitung.de>
|
||||
*
|
||||
* TODO:
|
||||
* - All messages.
|
||||
* - All notifications.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "windows.h"
|
||||
#include "commctrl.h"
|
||||
#include "flatsb.h"
|
||||
#include "win.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
#define FlatSB_GetInfoPtr(wndPtr) ((FLATSB_INFO*)wndPtr->wExtra[0])
|
||||
|
||||
|
||||
BOOL32 WINAPI
|
||||
FlatSB_EnableScrollBar(HWND32 hwnd, INT32 dummy, UINT32 dummy2)
|
||||
{
|
||||
FIXME(commctrl,"stub\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL32 WINAPI
|
||||
FlatSB_ShowScrollBar(HWND32 hwnd, INT32 code, BOOL32 flag)
|
||||
{
|
||||
FIXME(commctrl,"stub\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL32 WINAPI
|
||||
FlatSB_GetScrollRange(HWND32 hwnd, INT32 code, LPINT32 min, LPINT32 max)
|
||||
{
|
||||
FIXME(commctrl,"stub\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL32 WINAPI
|
||||
FlatSB_GetScrollInfo(HWND32 hwnd, INT32 code, LPSCROLLINFO info)
|
||||
{
|
||||
FIXME(commctrl,"stub\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT32 WINAPI
|
||||
FlatSB_GetScrollPos(HWND32 hwnd, INT32 code)
|
||||
{
|
||||
FIXME(commctrl,"stub\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL32 WINAPI
|
||||
FlatSB_GetScrollProp(HWND32 hwnd, INT32 propIndex, LPINT32 prop)
|
||||
{
|
||||
FIXME(commctrl,"stub\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INT32 WINAPI
|
||||
FlatSB_SetScrollPos(HWND32 hwnd, INT32 code, INT32 pos, BOOL32 fRedraw)
|
||||
{
|
||||
FIXME(commctrl,"stub\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT32 WINAPI
|
||||
FlatSB_SetScrollInfo(HWND32 hwnd, INT32 code, LPSCROLLINFO info, BOOL32 fRedraw)
|
||||
{
|
||||
FIXME(commctrl,"stub\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT32 WINAPI
|
||||
FlatSB_SetScrollRange(HWND32 hwnd, INT32 code, INT32 min, INT32 max, BOOL32 fRedraw)
|
||||
{
|
||||
FIXME(commctrl,"stub\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL32 WINAPI
|
||||
FlatSB_SetScrollProp(HWND32 hwnd, UINT32 index, INT32 newValue, BOOL32 flag)
|
||||
{
|
||||
FIXME(commctrl,"stub\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
BOOL32 WINAPI InitializeFlatSB(HWND32 hwnd)
|
||||
{
|
||||
FIXME(commctrl,"stub\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
HRESULT WINAPI UninitializeFlatSB(HWND32 hwnd)
|
||||
{
|
||||
FIXME(commctrl,"stub\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static LRESULT
|
||||
FlatSB_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT
|
||||
FlatSB_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
LRESULT WINAPI
|
||||
FlatSB_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
WND *wndPtr = WIN_FindWndPtr(hwnd);
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
|
||||
case WM_CREATE:
|
||||
return FlatSB_Create (wndPtr, wParam, lParam);
|
||||
|
||||
case WM_DESTROY:
|
||||
return FlatSB_Destroy (wndPtr, wParam, lParam);
|
||||
|
||||
default:
|
||||
if (uMsg >= WM_USER)
|
||||
ERR (datetime, "unknown msg %04x wp=%08x lp=%08lx\n",
|
||||
uMsg, wParam, lParam);
|
||||
return DefWindowProc32A (hwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
FLATSB_Register (VOID)
|
||||
{
|
||||
WNDCLASS32A wndClass;
|
||||
|
||||
if (GlobalFindAtom32A (FLATSB_CLASS32A)) return;
|
||||
|
||||
ZeroMemory (&wndClass, sizeof(WNDCLASS32A));
|
||||
wndClass.style = CS_GLOBALCLASS;
|
||||
wndClass.lpfnWndProc = (WNDPROC32)FlatSB_WindowProc;
|
||||
wndClass.cbClsExtra = 0;
|
||||
wndClass.cbWndExtra = sizeof(FLATSB_INFO *);
|
||||
wndClass.hCursor = LoadCursor32A (0, IDC_ARROW32A);
|
||||
wndClass.hbrBackground = (HBRUSH32)(COLOR_WINDOW + 1);
|
||||
wndClass.lpszClassName = FLATSB_CLASS32A;
|
||||
|
||||
RegisterClass32A (&wndClass);
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
FLATSB_Unregister (VOID)
|
||||
{
|
||||
if (GlobalFindAtom32A (FLATSB_CLASS32A))
|
||||
UnregisterClass32A (FLATSB_CLASS32A, (HINSTANCE32)NULL);
|
||||
}
|
||||
|
|
@ -32,8 +32,8 @@
|
|||
|
||||
#include "windows.h"
|
||||
#include "winversion.h"
|
||||
#include "compobj.h"
|
||||
#include "storage.h"
|
||||
#include "wine/obj_base.h"
|
||||
#include "wine/obj_storage.h"
|
||||
#include "imagelist.h"
|
||||
#include "commctrl.h"
|
||||
#include "debug.h"
|
||||
|
|
|
@ -9,18 +9,50 @@
|
|||
*/
|
||||
|
||||
#include "windows.h"
|
||||
#include "winversion.h"
|
||||
#include "commctrl.h"
|
||||
#include "propsheet.h"
|
||||
#include "win.h"
|
||||
#include "debug.h"
|
||||
|
||||
LRESULT WINAPI
|
||||
PROPSHEET_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
* PropertySheet32AW (COMCTL32.83)
|
||||
*/
|
||||
INT32 WINAPI PropertySheet32AW(LPVOID propertySheetHeader)
|
||||
{
|
||||
if (VERSION_OsIsUnicode())
|
||||
return PropertySheet32W ((LPCPROPSHEETHEADER32W) propertySheetHeader);
|
||||
return PropertySheet32A ((LPCPROPSHEETHEADER32A) propertySheetHeader);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
* PropertySheet32A (COMCTL32.84)
|
||||
*/
|
||||
INT32 WINAPI PropertySheet32A(LPCPROPSHEETHEADER32A propertySheetHeader)
|
||||
INT32 WINAPI PropertySheet32A(LPCPROPSHEETHEADER32A lppsh)
|
||||
{
|
||||
FIXME(commctrl, "(%p): stub\n", propertySheetHeader);
|
||||
HWND32 hwnd;
|
||||
|
||||
return -1;
|
||||
FIXME(propsheet, "(%p): stub\n", lppsh);
|
||||
|
||||
if (lppsh->dwFlags & PSH_MODELESS) {
|
||||
hwnd = CreateDialogParam32A ( lppsh->hInstance, WC_PROPSHEET32A,
|
||||
lppsh->hwndParent, PROPSHEET_WindowProc, (LPARAM) lppsh );
|
||||
ShowWindow32 (hwnd, TRUE);
|
||||
} else {
|
||||
hwnd = DialogBoxParam32A ( lppsh->hInstance, WC_PROPSHEET32A,
|
||||
lppsh->hwndParent, PROPSHEET_WindowProc, (LPARAM) lppsh );
|
||||
}
|
||||
return hwnd;
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
|
@ -28,17 +60,33 @@ INT32 WINAPI PropertySheet32A(LPCPROPSHEETHEADER32A propertySheetHeader)
|
|||
*/
|
||||
INT32 WINAPI PropertySheet32W(LPCPROPSHEETHEADER32W propertySheetHeader)
|
||||
{
|
||||
FIXME(commctrl, "(%p): stub\n", propertySheetHeader);
|
||||
FIXME(propsheet, "(%p): stub\n", propertySheetHeader);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
* CreatePropertySheet32AW (COMCTL32.83)
|
||||
*/
|
||||
HPROPSHEETPAGE WINAPI CreatePropertySheetPage32AW (LPVOID lpPropSheetPage)
|
||||
{
|
||||
if (VERSION_OsIsUnicode())
|
||||
return CreatePropertySheetPage32W((LPCPROPSHEETPAGE32W) lpPropSheetPage);
|
||||
return CreatePropertySheetPage32A((LPCPROPSHEETPAGE32A) lpPropSheetPage);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
* CreatePropertySheetPage32A (COMCTL32.19)
|
||||
*/
|
||||
HPROPSHEETPAGE WINAPI CreatePropertySheetPage32A(LPCPROPSHEETPAGE32A lpPropSheetPage)
|
||||
{
|
||||
FIXME(commctrl, "(%p): stub\n", lpPropSheetPage);
|
||||
FIXME(propsheet, "(%p): stub\n", lpPropSheetPage);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -48,7 +96,7 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPage32A(LPCPROPSHEETPAGE32A lpPropSheet
|
|||
*/
|
||||
HPROPSHEETPAGE WINAPI CreatePropertySheetPage32W(LPCPROPSHEETPAGE32W lpPropSheetPage)
|
||||
{
|
||||
FIXME(commctrl, "(%p): stub\n", lpPropSheetPage);
|
||||
FIXME(propsheet, "(%p): stub\n", lpPropSheetPage);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -58,8 +106,115 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPage32W(LPCPROPSHEETPAGE32W lpPropSheet
|
|||
*/
|
||||
BOOL32 WINAPI DestroyPropertySheetPage32(HPROPSHEETPAGE hPropPage)
|
||||
{
|
||||
FIXME(commctrl, "(0x%x): stub\n", hPropPage);
|
||||
FIXME(propsheet, "(0x%x): stub\n", hPropPage);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
LRESULT WINAPI
|
||||
PROPSHEET_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
WND *wndPtr = WIN_FindWndPtr(hwnd);
|
||||
|
||||
switch (uMsg) {
|
||||
case PSM_SETCURSEL:
|
||||
FIXME (propsheet, "Unimplemented msg PSM_SETCURSEL\n");
|
||||
return 0;
|
||||
case PSM_REMOVEPAGE:
|
||||
FIXME (propsheet, "Unimplemented msg PSM_REMOVEPAGE\n");
|
||||
return 0;
|
||||
case PSM_ADDPAGE:
|
||||
FIXME (propsheet, "Unimplemented msg PSM_ADDPAGE\n");
|
||||
return 0;
|
||||
case PSM_CHANGED:
|
||||
FIXME (propsheet, "Unimplemented msg PSM_CHANGED\n");
|
||||
return 0;
|
||||
case PSM_RESTARTWINDOWS:
|
||||
FIXME (propsheet, "Unimplemented msg PSM_RESTARTWINDOWS\n");
|
||||
return 0;
|
||||
case PSM_REBOOTSYSTEM:
|
||||
FIXME (propsheet, "Unimplemented msg PSM_REBOOTSYSTEM\n");
|
||||
return 0;
|
||||
case PSM_CANCELTOCLOSE:
|
||||
FIXME (propsheet, "Unimplemented msg PSM_CANCELTOCLOSE\n");
|
||||
return 0;
|
||||
case PSM_QUERYSIBLINGS:
|
||||
FIXME (propsheet, "Unimplemented msg PSM_QUERYSIBLINGS\n");
|
||||
return 0;
|
||||
case PSM_UNCHANGED:
|
||||
FIXME (propsheet, "Unimplemented msg PSM_UNCHANGED\n");
|
||||
return 0;
|
||||
case PSM_APPLY:
|
||||
FIXME (propsheet, "Unimplemented msg PSM_APPLY\n");
|
||||
return 0;
|
||||
case PSM_SETTITLE32A:
|
||||
FIXME (propsheet, "Unimplemented msg PSM_SETTITLE32A\n");
|
||||
return 0;
|
||||
case PSM_SETTITLE32W:
|
||||
FIXME (propsheet, "Unimplemented msg PSM_SETTITLE32W\n");
|
||||
return 0;
|
||||
case PSM_SETWIZBUTTONS:
|
||||
FIXME (propsheet, "Unimplemented msg PSM_SETWIZBUTTONS\n");
|
||||
return 0;
|
||||
case PSM_PRESSBUTTON:
|
||||
FIXME (propsheet, "Unimplemented msg PSM_PRESSBUTTON\n");
|
||||
return 0;
|
||||
case PSM_SETCURSELID:
|
||||
FIXME (propsheet, "Unimplemented msg PSM_SETCURSELID\n");
|
||||
return 0;
|
||||
case PSM_SETFINISHTEXT32A:
|
||||
FIXME (propsheet, "Unimplemented msg PSM_SETFINISHTEXT32A\n");
|
||||
return 0;
|
||||
case PSM_SETFINISHTEXT32W:
|
||||
FIXME (propsheet, "Unimplemented msg PSM_SETFINISHTEXT32W\n");
|
||||
return 0;
|
||||
case PSM_GETTABCONTROL:
|
||||
FIXME (propsheet, "Unimplemented msg PSM_GETTABCONTROL\n");
|
||||
return 0;
|
||||
case PSM_ISDIALOGMESSAGE:
|
||||
FIXME (propsheet, "Unimplemented msg PSM_ISDIALOGMESSAGE\n");
|
||||
return 0;
|
||||
case PSM_GETCURRENTPAGEHWND:
|
||||
FIXME (propsheet, "Unimplemented msg PSM_GETCURRENTPAGEHWND\n");
|
||||
return 0;
|
||||
|
||||
default:
|
||||
if (uMsg >= WM_USER)
|
||||
ERR (propsheet, "unknown msg %04x wp=%08x lp=%08lx\n",
|
||||
uMsg, wParam, lParam);
|
||||
return DefWindowProc32A (hwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
PROPSHEET_Register (VOID)
|
||||
{
|
||||
WNDCLASS32A wndClass;
|
||||
|
||||
if (GlobalFindAtom32A (WC_PROPSHEET32A)) return;
|
||||
|
||||
ZeroMemory (&wndClass, sizeof(WNDCLASS32A));
|
||||
wndClass.style = CS_GLOBALCLASS | CS_DBLCLKS | CS_SAVEBITS;
|
||||
wndClass.lpfnWndProc = (WNDPROC32)PROPSHEET_WindowProc;
|
||||
wndClass.cbClsExtra = 0;
|
||||
wndClass.cbWndExtra = sizeof(PROPSHEET_INFO *);
|
||||
wndClass.hCursor = LoadCursor32A (0, IDC_ARROW32A);
|
||||
wndClass.hbrBackground = 0;
|
||||
wndClass.lpszClassName = WC_PROPSHEET32A;
|
||||
|
||||
RegisterClass32A (&wndClass);
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
PROPSHEET_UnRegister (VOID)
|
||||
{
|
||||
if (GlobalFindAtom32A (WC_PROPSHEET32A))
|
||||
UnregisterClass32A (WC_PROPSHEET32A, (HINSTANCE32)NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,13 +16,17 @@
|
|||
#include "windows.h"
|
||||
#include "commctrl.h"
|
||||
#include "tab.h"
|
||||
#include "heap.h"
|
||||
#include "win.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
#define TAB_GetInfoPtr(wndPtr) ((TAB_INFO *)wndPtr->wExtra[0])
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static BOOL32
|
||||
TAB_SendSimpleNotify (WND *wndPtr, UINT32 code)
|
||||
{
|
||||
|
@ -44,6 +48,22 @@ TAB_GetCurSel (WND *wndPtr)
|
|||
return infoPtr->iSelected;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT
|
||||
TAB_SetCurSel (WND *wndPtr,WPARAM32 wParam)
|
||||
{
|
||||
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
|
||||
INT32 iItem=(INT32) wParam;
|
||||
INT32 prevItem;
|
||||
|
||||
prevItem=-1;
|
||||
if ((iItem >= 0) && (iItem < infoPtr->uNumItem)) {
|
||||
prevItem=infoPtr->iSelected;
|
||||
infoPtr->iSelected=iItem;
|
||||
}
|
||||
return prevItem;
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
TAB_LButtonUp (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
|
@ -78,6 +98,20 @@ TAB_LButtonUp (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT
|
||||
TAB_AdjustRect (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
|
||||
if (wParam==TRUE) {
|
||||
FIXME (tab,"Should set display rectangle\n");
|
||||
} else {
|
||||
FIXME (tab,"Should set window rectangle\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
TAB_SetItemBounds (WND *wndPtr)
|
||||
{
|
||||
|
@ -129,9 +163,9 @@ TAB_DrawItem (WND *wndPtr, HDC32 hdc, INT32 iItem)
|
|||
RECT32 r;
|
||||
INT32 oldBkMode;
|
||||
|
||||
HPEN32 hwPen = CreatePen32 (PS_SOLID, 1, RGB (255, 255, 255 ));
|
||||
HPEN32 hbPen = CreatePen32 (PS_SOLID, 1, GetSysColor32 (COLOR_BTNSHADOW));
|
||||
HPEN32 hsdPen = CreatePen32(PS_SOLID, 1, GetSysColor32 (COLOR_BTNTEXT));
|
||||
HPEN32 hwPen = GetSysColorPen32 (COLOR_3DHILIGHT);
|
||||
HPEN32 hbPen = GetSysColorPen32 (COLOR_BTNSHADOW);
|
||||
HPEN32 hsdPen = GetSysColorPen32 (COLOR_BTNTEXT);
|
||||
HPEN32 htmpPen = (HPEN32)NULL;
|
||||
|
||||
CopyRect32(&r, &pti->rect);
|
||||
|
@ -152,9 +186,6 @@ TAB_DrawItem (WND *wndPtr, HDC32 hdc, INT32 iItem)
|
|||
MoveToEx32 (hdc, r.right, r.top+1, NULL);
|
||||
LineTo32(hdc, r.right,r.bottom);
|
||||
hsdPen = SelectObject32(hdc,htmpPen);
|
||||
DeleteObject32(hwPen);
|
||||
DeleteObject32(hbPen);
|
||||
DeleteObject32(hsdPen);
|
||||
|
||||
oldBkMode = SetBkMode32(hdc, TRANSPARENT);
|
||||
r.left += 3;
|
||||
|
@ -170,9 +201,10 @@ static void
|
|||
TAB_DrawBorder (WND *wndPtr, HDC32 hdc)
|
||||
{
|
||||
HPEN32 htmPen;
|
||||
HPEN32 hwPen = GetStockObject32(WHITE_PEN);
|
||||
HPEN32 hbPen = GetStockObject32(BLACK_PEN);
|
||||
HPEN32 hShade = CreatePen32 ( PS_SOLID, 1, GetSysColor32 (COLOR_BTNSHADOW));
|
||||
HPEN32 hwPen = GetSysColorPen32 (COLOR_3DHILIGHT);
|
||||
HPEN32 hbPen = GetSysColorPen32 (COLOR_3DDKSHADOW);
|
||||
HPEN32 hShade = GetSysColorPen32 (COLOR_BTNSHADOW);
|
||||
|
||||
RECT32 rect;
|
||||
|
||||
htmPen = SelectObject32 (hdc, hwPen);
|
||||
|
@ -191,7 +223,6 @@ TAB_DrawBorder (WND *wndPtr, HDC32 hdc)
|
|||
LineTo32 (hdc, rect.right-1, rect.bottom-1);
|
||||
LineTo32 (hdc, rect.left, rect.bottom-1);
|
||||
hShade = SelectObject32(hdc, hShade);
|
||||
DeleteObject32 (hShade);
|
||||
}
|
||||
|
||||
|
||||
|
@ -199,17 +230,16 @@ static void
|
|||
TAB_Refresh (WND *wndPtr, HDC32 hdc)
|
||||
{
|
||||
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
|
||||
HFONT32 hFont, hOldFont;
|
||||
RECT32 rect;
|
||||
HBRUSH32 hbrBk;
|
||||
HFONT32 hOldFont;
|
||||
INT32 i;
|
||||
|
||||
TAB_DrawBorder (wndPtr, hdc);
|
||||
|
||||
hOldFont = SelectObject32 (hdc, infoPtr->hFont);
|
||||
for (i = 0; i < infoPtr->uNumItem; i++) {
|
||||
TAB_DrawItem (wndPtr, hdc, i);
|
||||
}
|
||||
|
||||
SelectObject32 (hdc, hOldFont);
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
|
@ -230,11 +260,11 @@ static LRESULT
|
|||
TAB_InsertItem (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
|
||||
TCITEM *pti;
|
||||
TCITEM32A *pti;
|
||||
HDC32 hdc;
|
||||
INT32 iItem, len;
|
||||
|
||||
pti = (TCITEM*)lParam;
|
||||
pti = (TCITEM32A *)lParam;
|
||||
iItem = (INT32)wParam;
|
||||
|
||||
if (iItem < 0) return -1;
|
||||
|
@ -242,16 +272,14 @@ TAB_InsertItem (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
iItem = infoPtr->uNumItem;
|
||||
|
||||
if (infoPtr->uNumItem == 0) {
|
||||
infoPtr->items = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||
sizeof (TAB_ITEM));
|
||||
infoPtr->items = COMCTL32_Alloc (sizeof (TAB_ITEM));
|
||||
infoPtr->uNumItem++;
|
||||
}
|
||||
else {
|
||||
TAB_ITEM *oldItems = infoPtr->items;
|
||||
|
||||
infoPtr->uNumItem++;
|
||||
infoPtr->items = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||
sizeof (TAB_ITEM) * infoPtr->uNumItem);
|
||||
infoPtr->items = COMCTL32_Alloc (sizeof (TAB_ITEM) * infoPtr->uNumItem);
|
||||
|
||||
/* pre insert copy */
|
||||
if (iItem > 0) {
|
||||
|
@ -266,20 +294,17 @@ TAB_InsertItem (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
|
||||
}
|
||||
|
||||
HeapFree (GetProcessHeap (), 0, oldItems);
|
||||
COMCTL32_Free (oldItems);
|
||||
}
|
||||
|
||||
infoPtr->items[iItem].mask = pti->mask;
|
||||
if (pti->mask & TCIF_TEXT) {
|
||||
len = lstrlen32A (pti->pszText);
|
||||
infoPtr->items[iItem].pszText =
|
||||
HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, len+1);
|
||||
infoPtr->items[iItem].pszText = COMCTL32_Alloc (len+1);
|
||||
lstrcpy32A (infoPtr->items[iItem].pszText, pti->pszText);
|
||||
infoPtr->items[iItem].cchTextMax = pti->cchTextMax;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (pti->mask & TCIF_IMAGE)
|
||||
infoPtr->items[iItem].iImage = pti->iImage;
|
||||
|
||||
|
@ -297,13 +322,169 @@ TAB_InsertItem (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
return iItem;
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
TAB_SetItem32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
|
||||
TCITEM32A *tabItem;
|
||||
TAB_ITEM *wineItem;
|
||||
INT32 iItem,len;
|
||||
|
||||
iItem=(INT32) wParam;
|
||||
tabItem=(LPTCITEM32A ) lParam;
|
||||
TRACE (tab,"%d %p\n",iItem, tabItem);
|
||||
if ((iItem<0) || (iItem>infoPtr->uNumItem)) return FALSE;
|
||||
|
||||
wineItem=& infoPtr->items[iItem];
|
||||
|
||||
if (tabItem->mask & TCIF_IMAGE)
|
||||
wineItem->iImage=tabItem->iImage;
|
||||
|
||||
if (tabItem->mask & TCIF_PARAM)
|
||||
wineItem->lParam=tabItem->lParam;
|
||||
|
||||
if (tabItem->mask & TCIF_RTLREADING)
|
||||
FIXME (tab,"TCIF_RTLREADING\n");
|
||||
|
||||
if (tabItem->mask & TCIF_STATE)
|
||||
wineItem->dwState=tabItem->dwState;
|
||||
|
||||
if (tabItem->mask & TCIF_TEXT) {
|
||||
len=lstrlen32A (tabItem->pszText);
|
||||
if (len>wineItem->cchTextMax)
|
||||
wineItem->pszText= COMCTL32_ReAlloc (wineItem->pszText, len+1);
|
||||
lstrcpyn32A (wineItem->pszText, tabItem->pszText, len);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
TAB_GetItemCount (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
|
||||
|
||||
return infoPtr->uNumItem;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT
|
||||
TAB_GetItem32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
|
||||
TCITEM32A *tabItem;
|
||||
TAB_ITEM *wineItem;
|
||||
INT32 iItem;
|
||||
|
||||
iItem=(INT32) wParam;
|
||||
tabItem=(LPTCITEM32A) lParam;
|
||||
TRACE (tab,"\n");
|
||||
if ((iItem<0) || (iItem>infoPtr->uNumItem)) return FALSE;
|
||||
|
||||
wineItem=& infoPtr->items[iItem];
|
||||
|
||||
if (tabItem->mask & TCIF_IMAGE)
|
||||
tabItem->iImage=wineItem->iImage;
|
||||
|
||||
if (tabItem->mask & TCIF_PARAM)
|
||||
tabItem->lParam=wineItem->lParam;
|
||||
|
||||
if (tabItem->mask & TCIF_RTLREADING)
|
||||
FIXME (tab, "TCIF_RTLREADING\n");
|
||||
|
||||
if (tabItem->mask & TCIF_STATE)
|
||||
tabItem->dwState=wineItem->dwState;
|
||||
|
||||
if (tabItem->mask & TCIF_TEXT)
|
||||
lstrcpyn32A (tabItem->pszText, wineItem->pszText, tabItem->cchTextMax);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
TAB_DeleteItem (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
|
||||
|
||||
FIXME (tab,"stub \n");
|
||||
return TRUE;
|
||||
}
|
||||
static LRESULT
|
||||
TAB_DeleteAllItems (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
|
||||
|
||||
COMCTL32_Free (infoPtr->items);
|
||||
infoPtr->uNumItem=0;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT
|
||||
TAB_GetFont (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
|
||||
|
||||
TRACE (tab,"\n");
|
||||
return (LRESULT)infoPtr->hFont;
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
TAB_SetFont (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
|
||||
{
|
||||
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
|
||||
TEXTMETRIC32A tm;
|
||||
HFONT32 hFont, hOldFont;
|
||||
HDC32 hdc;
|
||||
|
||||
TRACE (tab,"%x %lx\n",wParam, lParam);
|
||||
|
||||
infoPtr->hFont = (HFONT32)wParam;
|
||||
|
||||
hFont = infoPtr->hFont ? infoPtr->hFont : GetStockObject32 (SYSTEM_FONT);
|
||||
|
||||
hdc = GetDC32 (0);
|
||||
hOldFont = SelectObject32 (hdc, hFont);
|
||||
GetTextMetrics32A (hdc, &tm);
|
||||
infoPtr->nHeight= tm.tmHeight + tm.tmExternalLeading;
|
||||
SelectObject32 (hdc, hOldFont);
|
||||
|
||||
if (lParam) TAB_Refresh (wndPtr,hdc);
|
||||
ReleaseDC32 (0, hdc);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT
|
||||
TAB_GetImageList (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
|
||||
|
||||
TRACE (tab,"\n");
|
||||
return (LRESULT)infoPtr->himl;
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
TAB_SetImageList (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
|
||||
HIMAGELIST himlPrev;
|
||||
|
||||
TRACE (tab,"\n");
|
||||
himlPrev = infoPtr->himl;
|
||||
infoPtr->himl= (HIMAGELIST)lParam;
|
||||
return (LRESULT)himlPrev;
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
TAB_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
TAB_INFO *infoPtr;
|
||||
|
||||
infoPtr = (TAB_INFO *)HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||
sizeof(TAB_INFO));
|
||||
infoPtr = (TAB_INFO *)COMCTL32_Alloc (sizeof(TAB_INFO));
|
||||
wndPtr->wExtra[0] = (DWORD)infoPtr;
|
||||
|
||||
infoPtr->uNumItem = 0;
|
||||
|
@ -325,12 +506,12 @@ TAB_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
if (infoPtr->items) {
|
||||
for (iItem = 0; iItem < infoPtr->uNumItem; iItem++) {
|
||||
if (infoPtr->items[iItem].pszText)
|
||||
HeapFree (GetProcessHeap (), 0, infoPtr->items[iItem].pszText);
|
||||
COMCTL32_Free (infoPtr->items[iItem].pszText);
|
||||
}
|
||||
HeapFree (GetProcessHeap (), 0, infoPtr->items);
|
||||
COMCTL32_Free (infoPtr->items);
|
||||
}
|
||||
|
||||
HeapFree (GetProcessHeap (), 0, infoPtr);
|
||||
COMCTL32_Free (infoPtr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -343,20 +524,117 @@ TAB_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
|
|||
switch (uMsg)
|
||||
{
|
||||
|
||||
case TCM_GETIMAGELIST:
|
||||
return TAB_GetImageList (wndPtr, wParam, lParam);
|
||||
|
||||
case TCM_SETIMAGELIST:
|
||||
return TAB_SetImageList (wndPtr, wParam, lParam);
|
||||
|
||||
case TCM_GETITEMCOUNT:
|
||||
return TAB_GetItemCount (wndPtr, wParam, lParam);
|
||||
|
||||
case TCM_GETITEM32A:
|
||||
return TAB_GetItem32A (wndPtr, wParam, lParam);
|
||||
|
||||
case TCM_GETITEM32W:
|
||||
FIXME (tab, "Unimplemented msg TCM_GETITEM32W\n");
|
||||
return 0;
|
||||
|
||||
case TCM_SETITEM32A:
|
||||
return TAB_SetItem32A (wndPtr, wParam, lParam);
|
||||
|
||||
case TCM_SETITEM32W:
|
||||
FIXME (tab, "Unimplemented msg TCM_GETITEM32W\n");
|
||||
return 0;
|
||||
|
||||
case TCM_DELETEITEM:
|
||||
return TAB_DeleteItem (wndPtr, wParam, lParam);
|
||||
|
||||
case TCM_DELETEALLITEMS:
|
||||
return TAB_DeleteAllItems (wndPtr, wParam, lParam);
|
||||
|
||||
case TCM_GETITEMRECT:
|
||||
FIXME (tab, "Unimplemented msg TCM_GETITEMRECT\n");
|
||||
return 0;
|
||||
|
||||
case TCM_GETCURSEL:
|
||||
return TAB_GetCurSel (wndPtr);
|
||||
|
||||
case TCM_INSERTITEM:
|
||||
case TCM_SETCURSEL:
|
||||
return TAB_SetCurSel (wndPtr, wParam);
|
||||
|
||||
case TCM_INSERTITEM32A:
|
||||
return TAB_InsertItem (wndPtr, wParam, lParam);
|
||||
|
||||
case TCM_INSERTITEM32W:
|
||||
FIXME (tab, "Unimplemented msg TCM_INSERTITEM32W\n");
|
||||
return 0;
|
||||
|
||||
case TCM_SETITEMEXTRA:
|
||||
FIXME (tab, "Unimplemented msg TCM_SETITEMEXTRA\n");
|
||||
return 0;
|
||||
|
||||
case TCM_ADJUSTRECT:
|
||||
return TAB_AdjustRect (wndPtr, wParam, lParam);
|
||||
|
||||
case TCM_SETITEMSIZE:
|
||||
FIXME (tab, "Unimplemented msg TCM_SETITEMSIZE\n");
|
||||
return 0;
|
||||
|
||||
case TCM_REMOVEIMAGE:
|
||||
FIXME (tab, "Unimplemented msg TCM_REMOVEIMAGE\n");
|
||||
return 0;
|
||||
|
||||
case TCM_SETPADDING:
|
||||
FIXME (tab, "Unimplemented msg TCM_SETPADDING\n");
|
||||
return 0;
|
||||
|
||||
case TCM_GETROWCOUNT:
|
||||
FIXME (tab, "Unimplemented msg TCM_GETROWCOUNT\n");
|
||||
return 0;
|
||||
|
||||
case TCM_GETTOOLTIPS:
|
||||
FIXME (tab, "Unimplemented msg TCM_GETTOOLTIPS\n");
|
||||
return 0;
|
||||
|
||||
case TCM_SETTOOLTIPS:
|
||||
FIXME (tab, "Unimplemented msg TCM_SETTOOLTIPS\n");
|
||||
return 0;
|
||||
|
||||
case TCM_GETCURFOCUS:
|
||||
FIXME (tab, "Unimplemented msg TCM_GETCURFOCUS\n");
|
||||
return 0;
|
||||
|
||||
case TCM_SETCURFOCUS:
|
||||
FIXME (tab, "Unimplemented msg TCM_SETCURFOCUS\n");
|
||||
return 0;
|
||||
|
||||
case TCM_SETMINTTABWIDTH:
|
||||
FIXME (tab, "Unimplemented msg TCM_SETMINTTABWIDTH\n");
|
||||
return 0;
|
||||
|
||||
case TCM_DESELECTALL:
|
||||
FIXME (tab, "Unimplemented msg TCM_DESELECTALL\n");
|
||||
return 0;
|
||||
|
||||
case WM_GETFONT:
|
||||
return TAB_GetFont (wndPtr, wParam, lParam);
|
||||
|
||||
case WM_SETFONT:
|
||||
return TAB_SetFont (wndPtr, wParam, lParam);
|
||||
|
||||
case WM_CREATE:
|
||||
return TAB_Create (wndPtr, wParam, lParam);
|
||||
|
||||
case WM_DESTROY:
|
||||
return TAB_Destroy (wndPtr, wParam, lParam);
|
||||
|
||||
case WM_GETDLGCODE:
|
||||
return DLGC_WANTARROWS | DLGC_WANTCHARS;
|
||||
|
||||
case WM_LBUTTONUP:
|
||||
return TAB_LButtonUp (wndPtr, wParam, lParam);
|
||||
|
||||
case WM_PAINT:
|
||||
return TAB_Paint (wndPtr, wParam);
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Trackbar control
|
||||
*
|
||||
* Copyright 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
|
||||
* Copyright 1998 Alex Priem <alexp@sci.kun.nl>
|
||||
* Copyright 1998,1999 Alex Priem <alexp@sci.kun.nl>
|
||||
*
|
||||
*
|
||||
* TODO:
|
||||
|
@ -11,7 +11,7 @@
|
|||
* - handle dragging slider better
|
||||
* - better tic handling.
|
||||
* - more notifications.
|
||||
* - tooltips
|
||||
*
|
||||
*/
|
||||
|
||||
/* known bugs:
|
||||
|
@ -27,7 +27,6 @@
|
|||
#include "windows.h"
|
||||
#include "commctrl.h"
|
||||
#include "trackbar.h"
|
||||
#include "heap.h"
|
||||
#include "win.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
@ -68,7 +67,7 @@ void TRACKBAR_RecalculateTics (TRACKBAR_INFO *infoPtr)
|
|||
nrTics=(infoPtr->nRangeMax - infoPtr->nRangeMin)/infoPtr->uTicFreq;
|
||||
else {
|
||||
nrTics=0;
|
||||
HeapFree (SystemHeap,0,infoPtr->tics);
|
||||
COMCTL32_Free (infoPtr->tics);
|
||||
infoPtr->tics=NULL;
|
||||
infoPtr->uNumTics=0;
|
||||
return;
|
||||
|
|
|
@ -842,3 +842,14 @@ NTSTATUS WINAPI RtlCompareUnicodeString(LPUNICODE_STRING x1,LPUNICODE_STRING x2,
|
|||
FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx),stub!\n",debugstr_w(x1->Buffer),debugstr_w(x2->Buffer),x3);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* DbgPrint [NTDLL]
|
||||
*/
|
||||
void __cdecl DbgPrint(LPCSTR fmt,LPVOID args) {
|
||||
char buf[512];
|
||||
|
||||
wvsprintf32A(buf,fmt,&args);
|
||||
MSG("DbgPrint says: %s",buf);
|
||||
/* hmm, raise exception? */
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "debug.h"
|
||||
#include "pidl.h"
|
||||
#include "shlobj.h"
|
||||
#include "objbase.h"
|
||||
#include "shell32_main.h"
|
||||
#include "shresdef.h"
|
||||
#include "if_macros.h"
|
||||
|
@ -52,8 +53,7 @@ static HRESULT WINAPI IContextMenu_QueryInterface(LPCONTEXTMENU this,REFIID riid
|
|||
{ *ppvObj = (LPCONTEXTMENU)this;
|
||||
}
|
||||
else if(IsEqualIID(riid, &IID_IShellExtInit)) /*IShellExtInit*/
|
||||
{ *ppvObj = (LPSHELLEXTINIT)this;
|
||||
WARN(shell,"-- LPSHELLEXTINIT pointer requested\n");
|
||||
{ FIXME (shell,"-- LPSHELLEXTINIT pointer requested\n");
|
||||
}
|
||||
|
||||
if(*ppvObj)
|
||||
|
@ -270,7 +270,7 @@ static HRESULT WINAPI IContextMenu_InvokeCommand(LPCONTEXTMENU this, LPCMINVOKEC
|
|||
* IContextMenu_GetCommandString()
|
||||
*/
|
||||
static HRESULT WINAPI IContextMenu_GetCommandString( LPCONTEXTMENU this, UINT32 idCommand,
|
||||
UINT32 uFlags,LPUINT32 lpReserved,LPSTR lpszName,UINT32 uMaxNameLen)
|
||||
UINT32 uFlags,LPUINT32 lpReserved,LPSTR lpszName,UINT32 uMaxNameLen)
|
||||
{ HRESULT hr = E_INVALIDARG;
|
||||
|
||||
TRACE(shell,"(%p)->(idcom=%x flags=%x %p name=%p len=%x)\n",this, idCommand, uFlags, lpReserved, lpszName, uMaxNameLen);
|
||||
|
@ -321,8 +321,9 @@ static HRESULT WINAPI IContextMenu_HandleMenuMsg(LPCONTEXTMENU this, UINT32 uMsg
|
|||
* IContextMenu_AllocPidlTable()
|
||||
*/
|
||||
BOOL32 IContextMenu_AllocPidlTable(LPCONTEXTMENU this, DWORD dwEntries)
|
||||
{ /*add one for NULL terminator */
|
||||
TRACE(shell,"(%p)->(entrys=%lu)\n",this, dwEntries);
|
||||
{ TRACE(shell,"(%p)->(entrys=%lu)\n",this, dwEntries);
|
||||
|
||||
/*add one for NULL terminator */
|
||||
dwEntries++;
|
||||
|
||||
this->aPidls = (LPITEMIDLIST*)SHAlloc(dwEntries * sizeof(LPITEMIDLIST));
|
||||
|
|
|
@ -7,7 +7,11 @@
|
|||
*/
|
||||
#include "debug.h"
|
||||
#include "wintypes.h"
|
||||
#include "shlobj.h"
|
||||
#include "wine/obj_base.h"
|
||||
#include "wine/obj_storage.h"
|
||||
#include "wine/obj_moniker.h"
|
||||
#include "wine/obj_dataobject.h"
|
||||
#include "objbase.h"
|
||||
#include "pidl.h"
|
||||
#include "winerror.h"
|
||||
#include "shell32_main.h"
|
||||
|
@ -19,29 +23,44 @@ UINT32 cfFileContents=0;
|
|||
/***********************************************************************
|
||||
* IEnumFORMATETC implementation
|
||||
*/
|
||||
static HRESULT WINAPI IEnumFORMATETC_QueryInterface (LPENUMFORMATETC this, REFIID riid, LPVOID * ppvObj);
|
||||
static ULONG WINAPI IEnumFORMATETC_AddRef (LPENUMFORMATETC this);
|
||||
static ULONG WINAPI IEnumFORMATETC_Release (LPENUMFORMATETC this);
|
||||
static HRESULT WINAPI IEnumFORMATETC_Next(LPENUMFORMATETC this, ULONG celt, FORMATETC32 *rgelt, ULONG *pceltFethed);
|
||||
static HRESULT WINAPI IEnumFORMATETC_Skip(LPENUMFORMATETC this, ULONG celt);
|
||||
static HRESULT WINAPI IEnumFORMATETC_Reset(LPENUMFORMATETC this);
|
||||
static HRESULT WINAPI IEnumFORMATETC_Clone(LPENUMFORMATETC this, LPENUMFORMATETC* ppenum);
|
||||
typedef struct _IEnumFORMATETC
|
||||
{
|
||||
/* IUnknown fields */
|
||||
ICOM_VTABLE(IEnumFORMATETC)* lpvtbl;
|
||||
DWORD ref;
|
||||
/* IEnumFORMATETC fields */
|
||||
UINT32 posFmt;
|
||||
UINT32 countFmt;
|
||||
LPFORMATETC32 pFmt;
|
||||
} _IEnumFORMATETC;
|
||||
|
||||
static struct IEnumFORMATETC_VTable efvt =
|
||||
{ IEnumFORMATETC_QueryInterface,
|
||||
IEnumFORMATETC_AddRef,
|
||||
IEnumFORMATETC_Release,
|
||||
IEnumFORMATETC_Next,
|
||||
IEnumFORMATETC_Skip,
|
||||
IEnumFORMATETC_Reset,
|
||||
IEnumFORMATETC_Clone
|
||||
static HRESULT WINAPI IEnumFORMATETC_fnQueryInterface(LPUNKNOWN iface, REFIID riid, LPVOID* ppvObj);
|
||||
static ULONG WINAPI IEnumFORMATETC_fnAddRef(LPUNKNOWN iface);
|
||||
static ULONG WINAPI IEnumFORMATETC_fnRelease(LPUNKNOWN iface);
|
||||
static HRESULT WINAPI IEnumFORMATETC_fnNext(LPENUMFORMATETC iface, ULONG celt, FORMATETC32* rgelt, ULONG* pceltFethed);
|
||||
static HRESULT WINAPI IEnumFORMATETC_fnSkip(LPENUMFORMATETC iface, ULONG celt);
|
||||
static HRESULT WINAPI IEnumFORMATETC_fnReset(LPENUMFORMATETC iface);
|
||||
static HRESULT WINAPI IEnumFORMATETC_fnClone(LPENUMFORMATETC iface, LPENUMFORMATETC* ppenum);
|
||||
|
||||
static struct ICOM_VTABLE(IEnumFORMATETC) efvt =
|
||||
{
|
||||
{
|
||||
IEnumFORMATETC_fnQueryInterface,
|
||||
IEnumFORMATETC_fnAddRef,
|
||||
IEnumFORMATETC_fnRelease
|
||||
},
|
||||
IEnumFORMATETC_fnNext,
|
||||
IEnumFORMATETC_fnSkip,
|
||||
IEnumFORMATETC_fnReset,
|
||||
IEnumFORMATETC_fnClone
|
||||
};
|
||||
|
||||
extern LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT32 cfmt, const FORMATETC32 afmt[])
|
||||
{ LPENUMFORMATETC ef;
|
||||
LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT32 cfmt, const FORMATETC32 afmt[])
|
||||
{
|
||||
_IEnumFORMATETC* ef;
|
||||
DWORD size=cfmt * sizeof(FORMATETC32);
|
||||
|
||||
ef=(LPENUMFORMATETC)HeapAlloc(GetProcessHeap(),0,sizeof(IEnumFORMATETC));
|
||||
ef=(_IEnumFORMATETC*)HeapAlloc(GetProcessHeap(),0,sizeof(_IEnumFORMATETC));
|
||||
ef->ref=1;
|
||||
ef->lpvtbl=&efvt;
|
||||
|
||||
|
@ -54,10 +73,12 @@ extern LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT32 cfmt, const FORMATETC32
|
|||
}
|
||||
|
||||
TRACE(shell,"(%p)->()\n",ef);
|
||||
return ef;
|
||||
return (LPENUMFORMATETC)ef;
|
||||
}
|
||||
static HRESULT WINAPI IEnumFORMATETC_QueryInterface (LPENUMFORMATETC this, REFIID riid, LPVOID * ppvObj)
|
||||
{ char xriid[50];
|
||||
static HRESULT WINAPI IEnumFORMATETC_fnQueryInterface(LPUNKNOWN iface, REFIID riid, LPVOID* ppvObj)
|
||||
{
|
||||
ICOM_THIS(IEnumFORMATETC,iface);
|
||||
char xriid[50];
|
||||
WINE_StringFromCLSID((LPCLSID)riid,xriid);
|
||||
TRACE(shell,"(%p)->(\n\tIID:\t%s,%p)\n",this,xriid,ppvObj);
|
||||
|
||||
|
@ -71,7 +92,7 @@ static HRESULT WINAPI IEnumFORMATETC_QueryInterface (LPENUMFORMATETC this, REFII
|
|||
}
|
||||
|
||||
if(*ppvObj)
|
||||
{ (*(LPENUMFORMATETC*)ppvObj)->lpvtbl->fnAddRef(this);
|
||||
{ IEnumFORMATETC_AddRef((IEnumFORMATETC*)*ppvObj);
|
||||
TRACE(shell,"-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -79,12 +100,16 @@ static HRESULT WINAPI IEnumFORMATETC_QueryInterface (LPENUMFORMATETC this, REFII
|
|||
return E_NOINTERFACE;
|
||||
|
||||
}
|
||||
static ULONG WINAPI IEnumFORMATETC_AddRef (LPENUMFORMATETC this)
|
||||
{ TRACE(shell,"(%p)->(count=%lu)\n",this,(this->ref)+1);
|
||||
static ULONG WINAPI IEnumFORMATETC_fnAddRef(LPUNKNOWN iface)
|
||||
{
|
||||
ICOM_THIS(IEnumFORMATETC,iface);
|
||||
TRACE(shell,"(%p)->(count=%lu)\n",this,(this->ref)+1);
|
||||
return ++(this->ref);
|
||||
}
|
||||
static ULONG WINAPI IEnumFORMATETC_Release (LPENUMFORMATETC this)
|
||||
{ TRACE(shell,"(%p)->()\n",this);
|
||||
static ULONG WINAPI IEnumFORMATETC_fnRelease(LPUNKNOWN iface)
|
||||
{
|
||||
ICOM_THIS(IEnumFORMATETC,iface);
|
||||
TRACE(shell,"(%p)->()\n",this);
|
||||
if (!--(this->ref))
|
||||
{ TRACE(shell," destroying IEnumFORMATETC(%p)\n",this);
|
||||
if (this->pFmt)
|
||||
|
@ -95,8 +120,10 @@ static ULONG WINAPI IEnumFORMATETC_Release (LPENUMFORMATETC this)
|
|||
}
|
||||
return this->ref;
|
||||
}
|
||||
static HRESULT WINAPI IEnumFORMATETC_Next(LPENUMFORMATETC this, ULONG celt, FORMATETC32 *rgelt, ULONG *pceltFethed)
|
||||
{ UINT32 cfetch;
|
||||
static HRESULT WINAPI IEnumFORMATETC_fnNext(LPENUMFORMATETC iface, ULONG celt, FORMATETC32 *rgelt, ULONG *pceltFethed)
|
||||
{
|
||||
ICOM_THIS(IEnumFORMATETC,iface);
|
||||
UINT32 cfetch;
|
||||
HRESULT hres = S_FALSE;
|
||||
|
||||
TRACE (shell, "(%p)->()\n", this);
|
||||
|
@ -120,8 +147,10 @@ static HRESULT WINAPI IEnumFORMATETC_Next(LPENUMFORMATETC this, ULONG celt, FORM
|
|||
|
||||
return hres;
|
||||
}
|
||||
static HRESULT WINAPI IEnumFORMATETC_Skip(LPENUMFORMATETC this, ULONG celt)
|
||||
{ FIXME (shell, "(%p)->(num=%lu)\n", this, celt);
|
||||
static HRESULT WINAPI IEnumFORMATETC_fnSkip(LPENUMFORMATETC iface, ULONG celt)
|
||||
{
|
||||
ICOM_THIS(IEnumFORMATETC,iface);
|
||||
FIXME (shell, "(%p)->(num=%lu)\n", this, celt);
|
||||
|
||||
this->posFmt += celt;
|
||||
if (this->posFmt > this->countFmt)
|
||||
|
@ -130,55 +159,73 @@ static HRESULT WINAPI IEnumFORMATETC_Skip(LPENUMFORMATETC this, ULONG celt)
|
|||
}
|
||||
return S_OK;
|
||||
}
|
||||
static HRESULT WINAPI IEnumFORMATETC_Reset(LPENUMFORMATETC this)
|
||||
{ FIXME (shell, "(%p)->()\n", this);
|
||||
static HRESULT WINAPI IEnumFORMATETC_fnReset(LPENUMFORMATETC iface)
|
||||
{
|
||||
ICOM_THIS(IEnumFORMATETC,iface);
|
||||
FIXME (shell, "(%p)->()\n", this);
|
||||
|
||||
this->posFmt = 0;
|
||||
return S_OK;
|
||||
}
|
||||
static HRESULT WINAPI IEnumFORMATETC_Clone(LPENUMFORMATETC this, LPENUMFORMATETC* ppenum)
|
||||
{ FIXME (shell, "(%p)->(ppenum=%p)\n", this, ppenum);
|
||||
static HRESULT WINAPI IEnumFORMATETC_fnClone(LPENUMFORMATETC iface, LPENUMFORMATETC* ppenum)
|
||||
{
|
||||
ICOM_THIS(IEnumFORMATETC,iface);
|
||||
FIXME (shell, "(%p)->(ppenum=%p)\n", this, ppenum);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* IDataObject implementation
|
||||
*/
|
||||
typedef struct _IDataObject
|
||||
{
|
||||
/* IUnknown fields */
|
||||
ICOM_VTABLE(IDataObject)* lpvtbl;
|
||||
DWORD ref;
|
||||
/* IDataObject fields */
|
||||
LPSHELLFOLDER psf;
|
||||
LPIDLLIST lpill; /* the data of the dataobject */
|
||||
LPITEMIDLIST pidl;
|
||||
} _IDataObject;
|
||||
|
||||
static HRESULT WINAPI IDataObject_QueryInterface (LPDATAOBJECT, REFIID riid, LPVOID * ppvObj);
|
||||
static ULONG WINAPI IDataObject_AddRef (LPDATAOBJECT);
|
||||
static ULONG WINAPI IDataObject_Release (LPDATAOBJECT);
|
||||
static HRESULT WINAPI IDataObject_GetData (LPDATAOBJECT, LPFORMATETC32 pformatetcIn, STGMEDIUM32 *pmedium);
|
||||
static HRESULT WINAPI IDataObject_GetDataHere(LPDATAOBJECT, LPFORMATETC32 pformatetc, STGMEDIUM32 *pmedium);
|
||||
static HRESULT WINAPI IDataObject_QueryGetData(LPDATAOBJECT, LPFORMATETC32 pformatetc);
|
||||
static HRESULT WINAPI IDataObject_GetCanonicalFormatEtc(LPDATAOBJECT, LPFORMATETC32 pformatectIn, LPFORMATETC32 pformatetcOut);
|
||||
static HRESULT WINAPI IDataObject_SetData(LPDATAOBJECT, LPFORMATETC32 pformatetc, STGMEDIUM32 *pmedium, BOOL32 fRelease);
|
||||
static HRESULT WINAPI IDataObject_EnumFormatEtc(LPDATAOBJECT, DWORD dwDirection, IEnumFORMATETC **ppenumFormatEtc);
|
||||
static HRESULT WINAPI IDataObject_DAdvise (LPDATAOBJECT, LPFORMATETC32 *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection);
|
||||
static HRESULT WINAPI IDataObject_DUnadvise(LPDATAOBJECT, DWORD dwConnection);
|
||||
static HRESULT WINAPI IDataObject_EnumDAdvise(LPDATAOBJECT, IEnumSTATDATA **ppenumAdvise);
|
||||
static HRESULT WINAPI IDataObject_fnQueryInterface(LPUNKNOWN iface, REFIID riid, LPVOID* ppvObj);
|
||||
static ULONG WINAPI IDataObject_fnAddRef(LPUNKNOWN iface);
|
||||
static ULONG WINAPI IDataObject_fnRelease(LPUNKNOWN iface);
|
||||
static HRESULT WINAPI IDataObject_fnGetData(LPDATAOBJECT iface, LPFORMATETC32 pformatetcIn, STGMEDIUM32* pmedium);
|
||||
static HRESULT WINAPI IDataObject_fnGetDataHere(LPDATAOBJECT iface, LPFORMATETC32 pformatetc, STGMEDIUM32* pmedium);
|
||||
static HRESULT WINAPI IDataObject_fnQueryGetData(LPDATAOBJECT iface, LPFORMATETC32 pformatetc);
|
||||
static HRESULT WINAPI IDataObject_fnGetCanonicalFormatEtc(LPDATAOBJECT iface, LPFORMATETC32 pformatectIn, LPFORMATETC32 pformatetcOut);
|
||||
static HRESULT WINAPI IDataObject_fnSetData(LPDATAOBJECT iface, LPFORMATETC32 pformatetc, STGMEDIUM32* pmedium, BOOL32 fRelease);
|
||||
static HRESULT WINAPI IDataObject_fnEnumFormatEtc(LPDATAOBJECT iface, DWORD dwDirection, IEnumFORMATETC** ppenumFormatEtc);
|
||||
static HRESULT WINAPI IDataObject_fnDAdvise(LPDATAOBJECT iface, LPFORMATETC32* pformatetc, DWORD advf, IAdviseSink* pAdvSink, DWORD* pdwConnection);
|
||||
static HRESULT WINAPI IDataObject_fnDUnadvise(LPDATAOBJECT iface, DWORD dwConnection);
|
||||
static HRESULT WINAPI IDataObject_fnEnumDAdvise(LPDATAOBJECT iface, IEnumSTATDATA **ppenumAdvise);
|
||||
|
||||
static struct IDataObject_VTable dtovt =
|
||||
{ IDataObject_QueryInterface,
|
||||
IDataObject_AddRef,
|
||||
IDataObject_Release,
|
||||
IDataObject_GetData,
|
||||
IDataObject_GetDataHere,
|
||||
IDataObject_QueryGetData,
|
||||
IDataObject_GetCanonicalFormatEtc,
|
||||
IDataObject_SetData,
|
||||
IDataObject_EnumFormatEtc,
|
||||
IDataObject_DAdvise,
|
||||
IDataObject_DUnadvise,
|
||||
IDataObject_EnumDAdvise
|
||||
static struct ICOM_VTABLE(IDataObject) dtovt =
|
||||
{
|
||||
{
|
||||
IDataObject_fnQueryInterface,
|
||||
IDataObject_fnAddRef,
|
||||
IDataObject_fnRelease
|
||||
},
|
||||
IDataObject_fnGetData,
|
||||
IDataObject_fnGetDataHere,
|
||||
IDataObject_fnQueryGetData,
|
||||
IDataObject_fnGetCanonicalFormatEtc,
|
||||
IDataObject_fnSetData,
|
||||
IDataObject_fnEnumFormatEtc,
|
||||
IDataObject_fnDAdvise,
|
||||
IDataObject_fnDUnadvise,
|
||||
IDataObject_fnEnumDAdvise
|
||||
};
|
||||
|
||||
/**************************************************************************
|
||||
* IDataObject_Constructor
|
||||
*/
|
||||
LPDATAOBJECT IDataObject_Constructor(HWND32 hwndOwner, LPSHELLFOLDER psf, LPITEMIDLIST * apidl, UINT32 cidl)
|
||||
{ LPDATAOBJECT dto;
|
||||
if (!(dto = (LPDATAOBJECT)HeapAlloc(GetProcessHeap(),0,sizeof(IDataObject))))
|
||||
{
|
||||
_IDataObject* dto;
|
||||
if (!(dto = (_IDataObject*)HeapAlloc(GetProcessHeap(),0,sizeof(_IDataObject))))
|
||||
return NULL;
|
||||
|
||||
dto->ref=1;
|
||||
|
@ -194,13 +241,15 @@ LPDATAOBJECT IDataObject_Constructor(HWND32 hwndOwner, LPSHELLFOLDER psf, LPITEM
|
|||
dto->lpill->lpvtbl->fnAddItems(dto->lpill, apidl, cidl);
|
||||
|
||||
TRACE(shell,"(%p)->(sf=%p apidl=%p cidl=%u)\n",dto, psf, apidl, cidl);
|
||||
return dto;
|
||||
return (LPDATAOBJECT)dto;
|
||||
}
|
||||
/***************************************************************************
|
||||
* IDataObject_QueryInterface
|
||||
*/
|
||||
static HRESULT WINAPI IDataObject_QueryInterface (LPDATAOBJECT this, REFIID riid, LPVOID * ppvObj)
|
||||
{ char xriid[50];
|
||||
static HRESULT WINAPI IDataObject_fnQueryInterface (LPUNKNOWN iface, REFIID riid, LPVOID * ppvObj)
|
||||
{
|
||||
ICOM_THIS(IDataObject,iface);
|
||||
char xriid[50];
|
||||
WINE_StringFromCLSID((LPCLSID)riid,xriid);
|
||||
TRACE(shell,"(%p)->(\n\tIID:\t%s,%p)\n",this,xriid,ppvObj);
|
||||
|
||||
|
@ -214,7 +263,7 @@ static HRESULT WINAPI IDataObject_QueryInterface (LPDATAOBJECT this, REFIID riid
|
|||
}
|
||||
|
||||
if(*ppvObj)
|
||||
{ (*(LPDATAOBJECT*)ppvObj)->lpvtbl->fnAddRef(this);
|
||||
{ IDataObject_AddRef((IDataObject*)*ppvObj);
|
||||
TRACE(shell,"-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -224,15 +273,19 @@ static HRESULT WINAPI IDataObject_QueryInterface (LPDATAOBJECT this, REFIID riid
|
|||
/**************************************************************************
|
||||
* IDataObject_AddRef
|
||||
*/
|
||||
static ULONG WINAPI IDataObject_AddRef(LPDATAOBJECT this)
|
||||
{ TRACE(shell,"(%p)->(count=%lu)\n",this,(this->ref)+1);
|
||||
static ULONG WINAPI IDataObject_fnAddRef(LPUNKNOWN iface)
|
||||
{
|
||||
ICOM_THIS(IDataObject,iface);
|
||||
TRACE(shell,"(%p)->(count=%lu)\n",this,(this->ref)+1);
|
||||
return ++(this->ref);
|
||||
}
|
||||
/**************************************************************************
|
||||
* IDataObject_Release
|
||||
*/
|
||||
static ULONG WINAPI IDataObject_Release(LPDATAOBJECT this)
|
||||
{ TRACE(shell,"(%p)->()\n",this);
|
||||
static ULONG WINAPI IDataObject_fnRelease(LPUNKNOWN iface)
|
||||
{
|
||||
ICOM_THIS(IDataObject,iface);
|
||||
TRACE(shell,"(%p)->()\n",this);
|
||||
if (!--(this->ref))
|
||||
{ TRACE(shell," destroying IDataObject(%p)\n",this);
|
||||
IDLList_Destructor(this->lpill);
|
||||
|
@ -262,6 +315,7 @@ static BOOL32 DATAOBJECT_InitShellIDList(void)
|
|||
* NOTES
|
||||
* get or register the "FileGroupDescriptor" clipformat
|
||||
*/
|
||||
/* FIXME: DATAOBJECT_InitFileGroupDesc is not used (19981226)
|
||||
static BOOL32 DATAOBJECT_InitFileGroupDesc(void)
|
||||
{ if (cfFileGroupDesc)
|
||||
{ return(TRUE);
|
||||
|
@ -270,12 +324,14 @@ static BOOL32 DATAOBJECT_InitFileGroupDesc(void)
|
|||
cfFileGroupDesc = RegisterClipboardFormat32A(CFSTR_FILEDESCRIPTORA);
|
||||
return(cfFileGroupDesc != 0);
|
||||
}
|
||||
*/
|
||||
/**************************************************************************
|
||||
* DATAOBJECT_InitFileContents (internal)
|
||||
*
|
||||
* NOTES
|
||||
* get or register the "FileContents" clipformat
|
||||
*/
|
||||
/* FIXME: DATAOBJECT_InitFileContents is not used (19981226)
|
||||
static BOOL32 DATAOBJECT_InitFileContents(void)
|
||||
{ if (cfFileContents)
|
||||
{ return(TRUE);
|
||||
|
@ -284,13 +340,15 @@ static BOOL32 DATAOBJECT_InitFileContents(void)
|
|||
cfFileContents = RegisterClipboardFormat32A(CFSTR_FILECONTENTS);
|
||||
return(cfFileContents != 0);
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
/**************************************************************************
|
||||
* interface implementation
|
||||
*/
|
||||
static HRESULT WINAPI IDataObject_GetData (LPDATAOBJECT this, LPFORMATETC32 pformatetcIn, STGMEDIUM32 *pmedium)
|
||||
{ char temp[256];
|
||||
static HRESULT WINAPI IDataObject_fnGetData(LPDATAOBJECT iface, LPFORMATETC32 pformatetcIn, STGMEDIUM32 *pmedium)
|
||||
{
|
||||
ICOM_THIS(IDataObject,iface);
|
||||
char temp[256];
|
||||
UINT32 cItems;
|
||||
DWORD size, size1, size2;
|
||||
LPITEMIDLIST pidl;
|
||||
|
@ -353,35 +411,51 @@ static HRESULT WINAPI IDataObject_GetData (LPDATAOBJECT this, LPFORMATETC32 pfor
|
|||
FIXME (shell, "-- clipformat not implemented\n");
|
||||
return (E_INVALIDARG);
|
||||
}
|
||||
static HRESULT WINAPI IDataObject_GetDataHere(LPDATAOBJECT this, LPFORMATETC32 pformatetc, STGMEDIUM32 *pmedium)
|
||||
{ FIXME (shell, "(%p)->()\n", this);
|
||||
static HRESULT WINAPI IDataObject_fnGetDataHere(LPDATAOBJECT iface, LPFORMATETC32 pformatetc, STGMEDIUM32 *pmedium)
|
||||
{
|
||||
ICOM_THIS(IDataObject,iface);
|
||||
FIXME (shell, "(%p)->()\n", this);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
static HRESULT WINAPI IDataObject_QueryGetData(LPDATAOBJECT this, LPFORMATETC32 pformatetc)
|
||||
{ FIXME (shell, "(%p)->()\n", this);
|
||||
static HRESULT WINAPI IDataObject_fnQueryGetData(LPDATAOBJECT iface, LPFORMATETC32 pformatetc)
|
||||
{
|
||||
ICOM_THIS(IDataObject,iface);
|
||||
FIXME (shell, "(%p)->()\n", this);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
static HRESULT WINAPI IDataObject_GetCanonicalFormatEtc(LPDATAOBJECT this, LPFORMATETC32 pformatectIn, LPFORMATETC32 pformatetcOut)
|
||||
{ FIXME (shell, "(%p)->()\n", this);
|
||||
static HRESULT WINAPI IDataObject_fnGetCanonicalFormatEtc(LPDATAOBJECT iface, LPFORMATETC32 pformatectIn, LPFORMATETC32 pformatetcOut)
|
||||
{
|
||||
ICOM_THIS(IDataObject,iface);
|
||||
FIXME (shell, "(%p)->()\n", this);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
static HRESULT WINAPI IDataObject_SetData(LPDATAOBJECT this, LPFORMATETC32 pformatetc, STGMEDIUM32 *pmedium, BOOL32 fRelease)
|
||||
{ FIXME (shell, "(%p)->()\n", this);
|
||||
static HRESULT WINAPI IDataObject_fnSetData(LPDATAOBJECT iface, LPFORMATETC32 pformatetc, STGMEDIUM32 *pmedium, BOOL32 fRelease)
|
||||
{
|
||||
ICOM_THIS(IDataObject,iface);
|
||||
FIXME (shell, "(%p)->()\n", this);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
static HRESULT WINAPI IDataObject_EnumFormatEtc(LPDATAOBJECT this, DWORD dwDirection, IEnumFORMATETC **ppenumFormatEtc)
|
||||
{ FIXME (shell, "(%p)->()\n", this);
|
||||
static HRESULT WINAPI IDataObject_fnEnumFormatEtc(LPDATAOBJECT iface, DWORD dwDirection, IEnumFORMATETC **ppenumFormatEtc)
|
||||
{
|
||||
ICOM_THIS(IDataObject,iface);
|
||||
FIXME (shell, "(%p)->()\n", this);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
static HRESULT WINAPI IDataObject_DAdvise (LPDATAOBJECT this, LPFORMATETC32 *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection)
|
||||
{ FIXME (shell, "(%p)->()\n", this);
|
||||
static HRESULT WINAPI IDataObject_fnDAdvise(LPDATAOBJECT iface, LPFORMATETC32 *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection)
|
||||
{
|
||||
ICOM_THIS(IDataObject,iface);
|
||||
FIXME (shell, "(%p)->()\n", this);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
static HRESULT WINAPI IDataObject_DUnadvise(LPDATAOBJECT this, DWORD dwConnection)
|
||||
{ FIXME (shell, "(%p)->()\n", this);
|
||||
static HRESULT WINAPI IDataObject_fnDUnadvise(LPDATAOBJECT iface, DWORD dwConnection)
|
||||
{
|
||||
ICOM_THIS(IDataObject,iface);
|
||||
FIXME (shell, "(%p)->()\n", this);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
static HRESULT WINAPI IDataObject_EnumDAdvise(LPDATAOBJECT this, IEnumSTATDATA **ppenumAdvise)
|
||||
{ FIXME (shell, "(%p)->()\n", this);
|
||||
static HRESULT WINAPI IDataObject_fnEnumDAdvise(LPDATAOBJECT iface, IEnumSTATDATA **ppenumAdvise)
|
||||
{
|
||||
ICOM_THIS(IDataObject,iface);
|
||||
FIXME (shell, "(%p)->()\n", this);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
|
|
@ -10,9 +10,8 @@
|
|||
#include "ole.h"
|
||||
#include "ole2.h"
|
||||
#include "debug.h"
|
||||
#include "compobj.h"
|
||||
#include "interfaces.h"
|
||||
#include "shlobj.h"
|
||||
#include "objbase.h"
|
||||
#include "shell.h"
|
||||
#include "winerror.h"
|
||||
#include "winnls.h"
|
||||
|
|
|
@ -10,9 +10,8 @@
|
|||
#include "ole.h"
|
||||
#include "ole2.h"
|
||||
#include "debug.h"
|
||||
#include "compobj.h"
|
||||
#include "interfaces.h"
|
||||
#include "shlobj.h"
|
||||
#include "objbase.h"
|
||||
#include "shell.h"
|
||||
#include "winerror.h"
|
||||
#include "winnls.h"
|
||||
|
|
|
@ -741,7 +741,7 @@ HICON32 WINAPI ExtractIconEx32A ( LPSTR lpszFile, INT32 nIconIndex, HICON32 * ph
|
|||
if (phiconSmall)
|
||||
{ ret = ICO_ExtractIconEx(lpszFile, phiconSmall, nIconIndex, nIcons, 16, 16 );
|
||||
if ( nIcons==1 )
|
||||
{ ret = phiconLarge[0];
|
||||
{ ret = phiconSmall[0];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,8 +14,6 @@
|
|||
#include "ole.h"
|
||||
#include "ole2.h"
|
||||
#include "debug.h"
|
||||
#include "compobj.h"
|
||||
#include "interfaces.h"
|
||||
#include "shlobj.h"
|
||||
#include "shell.h"
|
||||
#include "winerror.h"
|
||||
|
@ -556,8 +554,8 @@ LPITEMIDLIST WINAPI _ILCreateDesktop()
|
|||
return _ILCreate(PT_DESKTOP, NULL, 0);
|
||||
}
|
||||
LPITEMIDLIST WINAPI _ILCreateMyComputer()
|
||||
{ TRACE(pidl,"()\n");
|
||||
return _ILCreate(PT_MYCOMP, (void *)"My Computer", strlen ("My Computer")+1);
|
||||
{ TRACE(pidl,"()\n");
|
||||
return _ILCreate(PT_MYCOMP, (void *)"My Computer", strlen ("My Computer")+1);
|
||||
}
|
||||
LPITEMIDLIST WINAPI _ILCreateDrive( LPCSTR lpszNew)
|
||||
{ char sTemp[4];
|
||||
|
@ -568,47 +566,58 @@ LPITEMIDLIST WINAPI _ILCreateDrive( LPCSTR lpszNew)
|
|||
return _ILCreate(PT_DRIVE,(LPVOID)&sTemp[0],4);
|
||||
}
|
||||
LPITEMIDLIST WINAPI _ILCreateFolder( LPCSTR lpszNew)
|
||||
{ TRACE(pidl,"(%s)\n",lpszNew);
|
||||
return _ILCreate(PT_FOLDER, (LPVOID)lpszNew, strlen(lpszNew)+1);
|
||||
{ TRACE(pidl,"(%s)\n",lpszNew);
|
||||
return _ILCreate(PT_FOLDER, (LPVOID)lpszNew, strlen(lpszNew)+1);
|
||||
}
|
||||
LPITEMIDLIST WINAPI _ILCreateValue(LPCSTR lpszNew)
|
||||
{ TRACE(pidl,"(%s)\n",lpszNew);
|
||||
return _ILCreate(PT_VALUE, (LPVOID)lpszNew, strlen(lpszNew)+1);
|
||||
{ TRACE(pidl,"(%s)\n",lpszNew);
|
||||
return _ILCreate(PT_VALUE, (LPVOID)lpszNew, strlen(lpszNew)+1);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* _ILGetDrive()
|
||||
*
|
||||
* FIXME: quick hack
|
||||
* Gets the text for the drive eg. 'c:\'
|
||||
*
|
||||
* RETURNS
|
||||
* strlen (lpszText)
|
||||
*/
|
||||
BOOL32 WINAPI _ILGetDrive(LPCITEMIDLIST pidl,LPSTR pOut, UINT16 uSize)
|
||||
{ LPITEMIDLIST pidlTemp=NULL;
|
||||
DWORD WINAPI _ILGetDrive(LPCITEMIDLIST pidl,LPSTR pOut, UINT16 uSize)
|
||||
{ TRACE(pidl,"(%p,%p,%u)\n",pidl,pOut,uSize);
|
||||
|
||||
TRACE(pidl,"(%p,%p,%u)\n",pidl,pOut,uSize);
|
||||
if(_ILIsMyComputer(pidl))
|
||||
{ pidlTemp = ILGetNext(pidl);
|
||||
}
|
||||
else if (pidlTemp && _ILIsDrive(pidlTemp))
|
||||
{ return (BOOL32)_ILGetData(PT_DRIVE, pidlTemp, (LPVOID)pOut, uSize);
|
||||
}
|
||||
return FALSE;
|
||||
pidl = ILGetNext(pidl);
|
||||
|
||||
if (pidl && _ILIsDrive(pidl))
|
||||
return _ILGetData(PT_DRIVE, pidl, (LPVOID)pOut, uSize)-1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
/**************************************************************************
|
||||
* _ILGetItemText()
|
||||
* Gets the text for only this item
|
||||
* Gets the text for only the first item
|
||||
*
|
||||
* RETURNS
|
||||
* strlen (lpszText)
|
||||
*/
|
||||
DWORD WINAPI _ILGetItemText(LPCITEMIDLIST pidl, LPSTR lpszText, UINT16 uSize)
|
||||
{ TRACE(pidl,"(pidl=%p %p %x)\n",pidl,lpszText,uSize);
|
||||
{ DWORD ret = 0;
|
||||
|
||||
TRACE(pidl,"(pidl=%p %p %d)\n",pidl,lpszText,uSize);
|
||||
if (_ILIsMyComputer(pidl))
|
||||
{ return _ILGetData(PT_MYCOMP, pidl, (LPVOID)lpszText, uSize);
|
||||
{ ret = _ILGetData(PT_MYCOMP, pidl, (LPVOID)lpszText, uSize)-1;
|
||||
}
|
||||
if (_ILIsDrive(pidl))
|
||||
{ return _ILGetData(PT_DRIVE, pidl, (LPVOID)lpszText, uSize);
|
||||
else if (_ILIsDrive(pidl))
|
||||
{ ret = _ILGetData(PT_DRIVE, pidl, (LPVOID)lpszText, uSize)-1;
|
||||
}
|
||||
if (_ILIsFolder (pidl))
|
||||
{ return _ILGetData(PT_FOLDER, pidl, (LPVOID)lpszText, uSize);
|
||||
else if (_ILIsFolder (pidl))
|
||||
{ ret = _ILGetData(PT_FOLDER, pidl, (LPVOID)lpszText, uSize)-1;
|
||||
}
|
||||
return _ILGetData(PT_VALUE, pidl, (LPVOID)lpszText, uSize);
|
||||
else if (_ILIsValue (pidl))
|
||||
{ ret = _ILGetData(PT_VALUE, pidl, (LPVOID)lpszText, uSize)-1;
|
||||
}
|
||||
TRACE(pidl,"(-- %s)\n",debugstr_a(lpszText));
|
||||
return ret;
|
||||
}
|
||||
/**************************************************************************
|
||||
* _ILIsDesktop()
|
||||
|
@ -617,82 +626,38 @@ DWORD WINAPI _ILGetItemText(LPCITEMIDLIST pidl, LPSTR lpszText, UINT16 uSize)
|
|||
* _ILIsValue()
|
||||
*/
|
||||
BOOL32 WINAPI _ILIsDesktop(LPCITEMIDLIST pidl)
|
||||
{ TRACE(pidl,"(%p)\n",pidl);
|
||||
|
||||
if (! pidl)
|
||||
return TRUE;
|
||||
|
||||
return ( pidl->mkid.cb == 0x00 );
|
||||
{ TRACE(pidl,"(%p)\n",pidl);
|
||||
return ( !pidl || (pidl && pidl->mkid.cb == 0x00) );
|
||||
}
|
||||
|
||||
BOOL32 WINAPI _ILIsMyComputer(LPCITEMIDLIST pidl)
|
||||
{ LPPIDLDATA pData;
|
||||
TRACE(pidl,"(%p)\n",pidl);
|
||||
|
||||
if (! pidl)
|
||||
return FALSE;
|
||||
|
||||
pData = _ILGetDataPointer(pidl);
|
||||
return (PT_MYCOMP == pData->type);
|
||||
{ TRACE(pidl,"(%p)\n",pidl);
|
||||
return (pidl && PT_MYCOMP == _ILGetDataPointer(pidl)->type);
|
||||
}
|
||||
|
||||
BOOL32 WINAPI _ILIsDrive(LPCITEMIDLIST pidl)
|
||||
{ LPPIDLDATA pData;
|
||||
TRACE(pidl,"(%p)\n",pidl);
|
||||
|
||||
if (! pidl)
|
||||
return FALSE;
|
||||
|
||||
pData = _ILGetDataPointer(pidl);
|
||||
return (PT_DRIVE == pData->type);
|
||||
{ TRACE(pidl,"(%p)\n",pidl);
|
||||
return (pidl && PT_DRIVE == _ILGetDataPointer(pidl)->type);
|
||||
}
|
||||
|
||||
BOOL32 WINAPI _ILIsFolder(LPCITEMIDLIST pidl)
|
||||
{ LPPIDLDATA pData;
|
||||
TRACE(pidl,"(%p)\n",pidl);
|
||||
|
||||
if (! pidl)
|
||||
return FALSE;
|
||||
|
||||
pData = _ILGetDataPointer(pidl);
|
||||
return (PT_FOLDER == pData->type);
|
||||
{ TRACE(pidl,"(%p)\n",pidl);
|
||||
return (pidl && PT_FOLDER == _ILGetDataPointer(pidl)->type);
|
||||
}
|
||||
|
||||
BOOL32 WINAPI _ILIsValue(LPCITEMIDLIST pidl)
|
||||
{ LPPIDLDATA pData;
|
||||
TRACE(pidl,"(%p)\n",pidl);
|
||||
|
||||
if (! pidl)
|
||||
return FALSE;
|
||||
|
||||
pData = _ILGetDataPointer(pidl);
|
||||
return (PT_VALUE == pData->type);
|
||||
}
|
||||
/**************************************************************************
|
||||
* _ILHasFolders()
|
||||
* fixme: quick hack
|
||||
*/
|
||||
BOOL32 WINAPI _ILHasFolders( LPSTR pszPath, LPCITEMIDLIST pidl)
|
||||
{ BOOL32 bResult= FALSE;
|
||||
WIN32_FIND_DATA32A stffile;
|
||||
HANDLE32 hFile;
|
||||
|
||||
TRACE(pidl,"%p %p\n", pszPath, pidl);
|
||||
|
||||
hFile = FindFirstFile32A(pszPath,&stffile);
|
||||
do
|
||||
{ if (! (stffile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) )
|
||||
{ bResult= TRUE;
|
||||
}
|
||||
} while( FindNextFile32A(hFile,&stffile));
|
||||
FindClose32 (hFile);
|
||||
|
||||
return bResult;
|
||||
{ TRACE(pidl,"(%p)\n",pidl);
|
||||
return (pidl && PT_VALUE == _ILGetDataPointer(pidl)->type);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* _ILGetFolderText()
|
||||
* Creates a Path string from a PIDL, filtering out the special Folders
|
||||
* Creates a Path string from a PIDL, filtering out the special Folders and values
|
||||
* There is no trailing backslash
|
||||
* When lpszPath is NULL the needed size is returned
|
||||
*
|
||||
* RETURNS
|
||||
* strlen(lpszPath)
|
||||
*/
|
||||
DWORD WINAPI _ILGetFolderText(LPCITEMIDLIST pidl,LPSTR lpszPath, DWORD dwSize)
|
||||
{ LPITEMIDLIST pidlTemp;
|
||||
|
@ -702,8 +667,7 @@ DWORD WINAPI _ILGetFolderText(LPCITEMIDLIST pidl,LPSTR lpszPath, DWORD dwSize)
|
|||
TRACE(pidl,"(%p path=%p)\n",pidl, lpszPath);
|
||||
|
||||
if(!pidl)
|
||||
{ return 0;
|
||||
}
|
||||
return 0;
|
||||
|
||||
if(_ILIsMyComputer(pidl))
|
||||
{ pidlTemp = ILGetNext(pidl);
|
||||
|
@ -713,49 +677,36 @@ DWORD WINAPI _ILGetFolderText(LPCITEMIDLIST pidl,LPSTR lpszPath, DWORD dwSize)
|
|||
{ pidlTemp = (LPITEMIDLIST)pidl;
|
||||
}
|
||||
|
||||
/*if this is NULL, return the required size of the buffer */
|
||||
if(!lpszPath)
|
||||
{ while(pidlTemp->mkid.cb)
|
||||
{ LPPIDLDATA pData = _ILGetDataPointer(pidlTemp);
|
||||
pText = _ILGetTextPointer(pData->type,pData);
|
||||
if(lpszPath)
|
||||
*lpszPath = 0;
|
||||
|
||||
/*add the length of this item plus one for the backslash
|
||||
fixme: is one to much, drive has its own backslash*/
|
||||
dwCopied += strlen(pText) + 1;
|
||||
pidlTemp = ILGetNext(pidlTemp);
|
||||
}
|
||||
|
||||
/*add one for the NULL terminator */
|
||||
TRACE(pidl,"-- (size=%lu)\n",dwCopied);
|
||||
return dwCopied + 1;
|
||||
}
|
||||
|
||||
*lpszPath = 0;
|
||||
|
||||
while(pidlTemp->mkid.cb && (dwCopied < dwSize))
|
||||
while(pidlTemp->mkid.cb)
|
||||
{ LPPIDLDATA pData = _ILGetDataPointer(pidlTemp);
|
||||
|
||||
/*if this item is a value, then skip it and finish */
|
||||
if(PT_VALUE == pData->type)
|
||||
{ break;
|
||||
}
|
||||
pText = _ILGetTextPointer(pData->type,pData);
|
||||
strcat(lpszPath, pText);
|
||||
PathAddBackslash32A(lpszPath);
|
||||
dwCopied += strlen(pText) + 1;
|
||||
|
||||
pText = _ILGetTextPointer(pData->type,pData);
|
||||
pidlTemp = ILGetNext(pidlTemp);
|
||||
dwCopied += strlen(pText);
|
||||
|
||||
TRACE(pidl,"-- (size=%lu,%s)\n",dwCopied,lpszPath);
|
||||
}
|
||||
|
||||
/*remove the last backslash if necessary */
|
||||
if(dwCopied)
|
||||
{ if(*(lpszPath + strlen(lpszPath) - 1) == '\\')
|
||||
{ *(lpszPath + strlen(lpszPath) - 1) = 0;
|
||||
dwCopied--;
|
||||
if (lpszPath)
|
||||
{ strcat(lpszPath, pText);
|
||||
if (pidlTemp && lpszPath[dwCopied-1]!='\\')
|
||||
{ lpszPath[dwCopied] = '\\';
|
||||
lpszPath[dwCopied+1] = '\0';
|
||||
dwCopied++;
|
||||
}
|
||||
}
|
||||
else /* only length */
|
||||
{ if (pidlTemp && !_ILIsDrive (pidlTemp)) /* backslash between elements */
|
||||
dwCopied++;
|
||||
}
|
||||
}
|
||||
TRACE(pidl,"-- (path=%s)\n",lpszPath);
|
||||
|
||||
TRACE(pidl,"-- (size=%lu path=%s)\n",dwCopied, debugstr_a(lpszPath));
|
||||
return dwCopied;
|
||||
}
|
||||
|
||||
|
@ -764,8 +715,7 @@ DWORD WINAPI _ILGetFolderText(LPCITEMIDLIST pidl,LPSTR lpszPath, DWORD dwSize)
|
|||
* _ILGetValueText()
|
||||
* Gets the text for the last item in the list
|
||||
*/
|
||||
DWORD WINAPI _ILGetValueText(
|
||||
LPCITEMIDLIST pidl, LPSTR lpszValue, DWORD dwSize)
|
||||
DWORD WINAPI _ILGetValueText(LPCITEMIDLIST pidl, LPSTR lpszValue, DWORD dwSize)
|
||||
{ LPITEMIDLIST pidlTemp=pidl;
|
||||
CHAR szText[MAX_PATH];
|
||||
|
||||
|
@ -786,99 +736,53 @@ DWORD WINAPI _ILGetValueText(
|
|||
_ILGetItemText( pidlTemp, szText, sizeof(szText));
|
||||
|
||||
if(!lpszValue)
|
||||
{ return strlen(szText) + 1;
|
||||
{ return strlen(szText);
|
||||
}
|
||||
|
||||
strcpy(lpszValue, szText);
|
||||
|
||||
TRACE(pidl,"-- (pidl=%p %p=%s 0x%08lx)\n",pidl,lpszValue,lpszValue,dwSize);
|
||||
return strlen(lpszValue);
|
||||
}
|
||||
/**************************************************************************
|
||||
* _ILGetDataText()
|
||||
* NOTES
|
||||
* used from ShellView
|
||||
*/
|
||||
DWORD WINAPI _ILGetDataText( LPCITEMIDLIST pidlPath, LPCITEMIDLIST pidlValue, LPSTR lpszOut, DWORD dwOutSize)
|
||||
{ LPSTR lpszFolder,
|
||||
lpszValueName;
|
||||
DWORD dwNameSize;
|
||||
|
||||
FIXME(pidl,"(pidl=%p pidl=%p) stub\n",pidlPath,pidlValue);
|
||||
|
||||
if(!lpszOut || !pidlPath || !pidlValue)
|
||||
{ return FALSE;
|
||||
}
|
||||
|
||||
/* fixme: get the driveletter*/
|
||||
|
||||
/*assemble the Folder string */
|
||||
dwNameSize = _ILGetFolderText(pidlPath, NULL, 0);
|
||||
lpszFolder = (LPSTR)HeapAlloc(GetProcessHeap(),0,dwNameSize);
|
||||
if(!lpszFolder)
|
||||
{ return FALSE;
|
||||
}
|
||||
_ILGetFolderText(pidlPath, lpszFolder, dwNameSize);
|
||||
|
||||
/*assemble the value name */
|
||||
dwNameSize = _ILGetValueText(pidlValue, NULL, 0);
|
||||
lpszValueName = (LPSTR)HeapAlloc(GetProcessHeap(),0,dwNameSize);
|
||||
if(!lpszValueName)
|
||||
{ HeapFree(GetProcessHeap(),0,lpszFolder);
|
||||
return FALSE;
|
||||
}
|
||||
_ILGetValueText(pidlValue, lpszValueName, dwNameSize);
|
||||
|
||||
/* fixme: we've got the path now do something with it*/
|
||||
|
||||
HeapFree(GetProcessHeap(),0,lpszFolder);
|
||||
HeapFree(GetProcessHeap(),0,lpszValueName);
|
||||
|
||||
TRACE(pidl,"-- (%p=%s 0x%08lx)\n",lpszOut,lpszOut,dwOutSize);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* _ILGetPidlPath()
|
||||
* Create a string that includes the Drive name, the folder text and
|
||||
* the value text.
|
||||
*
|
||||
* RETURNS
|
||||
* strlen(lpszOut)
|
||||
*/
|
||||
DWORD WINAPI _ILGetPidlPath( LPCITEMIDLIST pidl, LPSTR lpszOut, DWORD dwOutSize)
|
||||
{ LPSTR lpszTemp;
|
||||
WORD len;
|
||||
{ WORD len = 0;
|
||||
|
||||
TRACE(pidl,"(%p,%lu)\n",lpszOut,dwOutSize);
|
||||
TRACE(pidl,"(%p,%lu)\n",lpszOut,dwOutSize);
|
||||
|
||||
if(!lpszOut)
|
||||
{ return 0;
|
||||
if(!lpszOut)
|
||||
{ return 0;
|
||||
}
|
||||
|
||||
*lpszOut = 0;
|
||||
lpszTemp = lpszOut;
|
||||
*lpszOut = 0;
|
||||
|
||||
dwOutSize -= _ILGetFolderText(pidl, lpszTemp, dwOutSize);
|
||||
len = _ILGetFolderText(pidl, lpszOut, dwOutSize);
|
||||
|
||||
/*add a backslash if necessary */
|
||||
len = strlen(lpszTemp);
|
||||
if (len && lpszTemp[len-1]!='\\')
|
||||
{ lpszTemp[len+0]='\\';
|
||||
lpszTemp[len+1]='\0';
|
||||
dwOutSize--;
|
||||
}
|
||||
lpszOut += len;
|
||||
strcpy (lpszOut,"\\");
|
||||
lpszOut++;
|
||||
|
||||
lpszTemp = lpszOut + strlen(lpszOut);
|
||||
dwOutSize -= len+1;;
|
||||
|
||||
/*add the value string */
|
||||
_ILGetValueText(pidl, lpszTemp, dwOutSize);
|
||||
len += _ILGetValueText(pidl, lpszOut, dwOutSize );
|
||||
|
||||
/*remove the last backslash if necessary */
|
||||
if(*(lpszOut + strlen(lpszOut) - 1) == '\\')
|
||||
{ *(lpszOut + strlen(lpszOut) - 1) = 0;
|
||||
}
|
||||
/*remove the last backslash if necessary */
|
||||
if( lpszOut[len-1]=='\\')
|
||||
{ lpszOut[len-1] = 0;
|
||||
len--;
|
||||
}
|
||||
|
||||
TRACE(pidl,"-- (%p=%s,%lu)\n",lpszOut,lpszOut,dwOutSize);
|
||||
|
||||
return strlen(lpszOut);
|
||||
TRACE(pidl,"-- (%p=%s,%lu)\n",lpszOut,lpszOut,dwOutSize);
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
|
@ -886,7 +790,7 @@ DWORD WINAPI _ILGetPidlPath( LPCITEMIDLIST pidl, LPSTR lpszOut, DWORD dwOutSize)
|
|||
* Creates a new PIDL
|
||||
* type = PT_DESKTOP | PT_DRIVE | PT_FOLDER | PT_VALUE
|
||||
* pIn = data
|
||||
* uInSize = size of data
|
||||
* uInSize = size of data (raw)
|
||||
*/
|
||||
|
||||
LPITEMIDLIST WINAPI _ILCreate(PIDLTYPE type, LPVOID pIn, UINT16 uInSize)
|
||||
|
@ -950,6 +854,9 @@ LPITEMIDLIST WINAPI _ILCreate(PIDLTYPE type, LPVOID pIn, UINT16 uInSize)
|
|||
}
|
||||
/**************************************************************************
|
||||
* _ILGetData(PIDLTYPE, LPCITEMIDLIST, LPVOID, UINT16)
|
||||
*
|
||||
* RETURNS
|
||||
* length of data (raw)
|
||||
*/
|
||||
DWORD WINAPI _ILGetData(PIDLTYPE type, LPCITEMIDLIST pidl, LPVOID pOut, UINT32 uOutSize)
|
||||
{ LPPIDLDATA pData;
|
||||
|
@ -976,20 +883,20 @@ DWORD WINAPI _ILGetData(PIDLTYPE type, LPCITEMIDLIST pidl, LPVOID pOut, UINT32 u
|
|||
if(uOutSize < 1)
|
||||
return 0;
|
||||
strncpy((LPSTR)pOut, "My Computer", uOutSize);
|
||||
dwReturn = strlen((LPSTR)pOut);
|
||||
dwReturn = strlen((LPSTR)pOut)+1;
|
||||
break;
|
||||
|
||||
case PT_DRIVE:
|
||||
if(uOutSize < 1)
|
||||
return 0;
|
||||
strncpy((LPSTR)pOut, pszSrc, uOutSize);
|
||||
dwReturn = strlen((LPSTR)pOut);
|
||||
dwReturn = strlen((LPSTR)pOut)+1;
|
||||
break;
|
||||
|
||||
case PT_FOLDER:
|
||||
case PT_VALUE:
|
||||
strncpy((LPSTR)pOut, pszSrc, uOutSize);
|
||||
dwReturn = strlen((LPSTR)pOut);
|
||||
dwReturn = strlen((LPSTR)pOut)+1;
|
||||
break;
|
||||
default:
|
||||
ERR(pidl,"-- unknown type\n");
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
*
|
||||
* a pidl of NULL means the desktop
|
||||
*
|
||||
* The structure of the pidl seens to be a union. The first byte of the
|
||||
* The structure of the pidl seems to be a union. The first byte of the
|
||||
* PIDLDATA desribes the type of pidl.
|
||||
*
|
||||
* first byte - my Computer 0x1F
|
||||
|
@ -35,67 +35,92 @@
|
|||
* file: see the PIDLDATA structure
|
||||
*/
|
||||
|
||||
#define PT_DESKTOP 0x00 /*fixme*/
|
||||
#define PT_DESKTOP 0x00 /* internal */
|
||||
#define PT_MYCOMP 0x1F
|
||||
#define PT_SPECIAL 0x2E
|
||||
#define PT_DRIVE 0x23
|
||||
#define PT_FOLDER 0x31
|
||||
#define PT_VALUE 0x33 /*fixme*/
|
||||
#define PT_VALUE 0x32
|
||||
|
||||
#pragma pack(1)
|
||||
typedef BYTE PIDLTYPE;
|
||||
|
||||
typedef struct tagPIDLDATA
|
||||
{ PIDLTYPE type;
|
||||
{ PIDLTYPE type; /*00*/
|
||||
union
|
||||
{ struct
|
||||
{ CHAR szDriveName[4];
|
||||
{ CHAR szDriveName[4]; /*01*/
|
||||
/* end of MS compatible*/
|
||||
DWORD dwSFGAO;
|
||||
DWORD dwSFGAO; /*05*/
|
||||
/* the drive seems to be 19 bytes every time */
|
||||
} drive;
|
||||
struct
|
||||
{ BYTE dummy;
|
||||
DWORD dwFileSize;
|
||||
WORD uFileDate;
|
||||
WORD uFileTime;
|
||||
WORD uFileAttribs;
|
||||
/* end of MS compatible*/
|
||||
DWORD dwSFGAO;
|
||||
{ BYTE dummy; /*01 is 0x00 for files or dirs */
|
||||
DWORD dwFileSize; /*02*/
|
||||
WORD uFileDate; /*06*/
|
||||
WORD uFileTime; /*08*/
|
||||
WORD uFileAttribs; /*10*/
|
||||
/* end of MS compatible. Here are comming just one or two
|
||||
strings. The first is the long name. The second the dos name
|
||||
when needed. */
|
||||
DWORD dwSFGAO; /*12*/
|
||||
CHAR szAlternateName[14]; /* the 8.3 Name*/
|
||||
CHAR szText[1]; /* last entry, variable size */
|
||||
CHAR szText[1]; /* last entry, variable size */
|
||||
} file, folder, generic;
|
||||
}u;
|
||||
} PIDLDATA, *LPPIDLDATA;
|
||||
#pragma pack(4)
|
||||
|
||||
LPITEMIDLIST WINAPI _ILCreateDesktop(void);
|
||||
LPITEMIDLIST WINAPI _ILCreateMyComputer(void);
|
||||
LPITEMIDLIST WINAPI _ILCreateDrive(LPCSTR);
|
||||
LPITEMIDLIST WINAPI _ILCreateFolder(LPCSTR);
|
||||
LPITEMIDLIST WINAPI _ILCreateValue(LPCSTR);
|
||||
LPITEMIDLIST WINAPI _ILCreate(PIDLTYPE,LPVOID,UINT16);
|
||||
|
||||
BOOL32 WINAPI _ILGetDrive(LPCITEMIDLIST,LPSTR,UINT16);
|
||||
/*
|
||||
* getting string values from pidls
|
||||
*
|
||||
* return value is strlen()
|
||||
*/
|
||||
DWORD WINAPI _ILGetDrive(LPCITEMIDLIST,LPSTR,UINT16);
|
||||
DWORD WINAPI _ILGetItemText(LPCITEMIDLIST,LPSTR,UINT16);
|
||||
DWORD WINAPI _ILGetFolderText(LPCITEMIDLIST,LPSTR,DWORD);
|
||||
DWORD WINAPI _ILGetValueText(LPCITEMIDLIST,LPSTR,DWORD);
|
||||
DWORD WINAPI _ILGetDataText(LPCITEMIDLIST,LPCITEMIDLIST,LPSTR,DWORD);
|
||||
DWORD WINAPI _ILGetPidlPath(LPCITEMIDLIST,LPSTR,DWORD);
|
||||
DWORD WINAPI _ILGetData(PIDLTYPE,LPCITEMIDLIST,LPVOID,UINT32);
|
||||
|
||||
/*
|
||||
* getting special values from simple pidls
|
||||
*/
|
||||
BOOL32 WINAPI _ILGetFileDate (LPCITEMIDLIST pidl, LPSTR pOut, UINT32 uOutSize);
|
||||
BOOL32 WINAPI _ILGetFileSize (LPCITEMIDLIST pidl, LPSTR pOut, UINT32 uOutSize);
|
||||
BOOL32 WINAPI _ILGetExtension (LPCITEMIDLIST pidl, LPSTR pOut, UINT32 uOutSize);
|
||||
|
||||
|
||||
/*
|
||||
* testing simple pidls
|
||||
*/
|
||||
BOOL32 WINAPI _ILIsDesktop(LPCITEMIDLIST);
|
||||
BOOL32 WINAPI _ILIsMyComputer(LPCITEMIDLIST);
|
||||
BOOL32 WINAPI _ILIsDrive(LPCITEMIDLIST);
|
||||
BOOL32 WINAPI _ILIsFolder(LPCITEMIDLIST);
|
||||
BOOL32 WINAPI _ILIsValue(LPCITEMIDLIST);
|
||||
|
||||
BOOL32 WINAPI _ILHasFolders(LPSTR,LPCITEMIDLIST);
|
||||
/*
|
||||
* simple pidls from strings
|
||||
*/
|
||||
LPITEMIDLIST WINAPI _ILCreateDesktop(void);
|
||||
LPITEMIDLIST WINAPI _ILCreateMyComputer(void);
|
||||
LPITEMIDLIST WINAPI _ILCreateDrive(LPCSTR);
|
||||
LPITEMIDLIST WINAPI _ILCreateFolder(LPCSTR);
|
||||
LPITEMIDLIST WINAPI _ILCreateValue(LPCSTR);
|
||||
|
||||
/*
|
||||
* raw pidl handling (binary)
|
||||
*
|
||||
* data is binary / sizes are bytes
|
||||
*/
|
||||
DWORD WINAPI _ILGetData(PIDLTYPE,LPCITEMIDLIST,LPVOID,UINT32);
|
||||
LPITEMIDLIST WINAPI _ILCreate(PIDLTYPE,LPVOID,UINT16);
|
||||
|
||||
/*
|
||||
* helper functions (getting struct-pointer)
|
||||
*/
|
||||
LPPIDLDATA WINAPI _ILGetDataPointer(LPCITEMIDLIST);
|
||||
LPSTR WINAPI _ILGetTextPointer(PIDLTYPE type, LPPIDLDATA pidldata);
|
||||
BOOL32 WINAPI _ILGetFileDate (LPCITEMIDLIST pidl, LPSTR pOut, UINT32 uOutSize);
|
||||
BOOL32 WINAPI _ILGetFileSize (LPCITEMIDLIST pidl, LPSTR pOut, UINT32 uOutSize);
|
||||
BOOL32 WINAPI _ILGetExtension (LPCITEMIDLIST pidl, LPSTR pOut, UINT32 uOutSize);
|
||||
|
||||
void pdump (LPCITEMIDLIST pidl);
|
||||
#endif
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include "dlgs.h"
|
||||
#include "win.h"
|
||||
#include "cursoricon.h"
|
||||
#include "interfaces.h"
|
||||
#include "sysmetrics.h"
|
||||
#include "shlobj.h"
|
||||
#include "debug.h"
|
||||
|
@ -382,30 +381,29 @@ DWORD WINAPI SHGetDesktopFolder(LPSHELLFOLDER *shellfolder)
|
|||
LPCLASSFACTORY lpclf;
|
||||
TRACE(shell,"%p->(%p)\n",shellfolder,*shellfolder);
|
||||
|
||||
if (pdesktopfolder)
|
||||
{ hres = NOERROR;
|
||||
}
|
||||
else
|
||||
{ lpclf = IClassFactory_Constructor();
|
||||
if (pdesktopfolder) {
|
||||
hres = NOERROR;
|
||||
} else {
|
||||
lpclf = IClassFactory_Constructor();
|
||||
/* fixme: the buildin IClassFactory_Constructor is at the moment only
|
||||
for rclsid=CLSID_ShellDesktop, so we get the right Interface (jsch)*/
|
||||
if(lpclf)
|
||||
{ hres = lpclf->lpvtbl->fnCreateInstance(lpclf,NULL,(REFIID)&IID_IShellFolder, (void*)&pdesktopfolder);
|
||||
lpclf->lpvtbl->fnRelease(lpclf);
|
||||
if(lpclf) {
|
||||
hres = IClassFactory_CreateInstance(lpclf,NULL,(REFIID)&IID_IShellFolder, (void*)&pdesktopfolder);
|
||||
IClassFactory_Release(lpclf);
|
||||
}
|
||||
}
|
||||
|
||||
if (pdesktopfolder)
|
||||
{ *shellfolder = pdesktopfolder;
|
||||
if (pdesktopfolder) {
|
||||
*shellfolder = pdesktopfolder;
|
||||
pdesktopfolder->lpvtbl->fnAddRef(pdesktopfolder);
|
||||
} else {
|
||||
*shellfolder=NULL;
|
||||
}
|
||||
else
|
||||
{ *shellfolder=NULL;
|
||||
}
|
||||
|
||||
TRACE(shell,"-- %p->(%p)\n",shellfolder, *shellfolder);
|
||||
return hres;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* SHGetPathFromIDList [SHELL32.221][NT 4.0: SHELL32.219]
|
||||
*/
|
||||
|
@ -962,7 +960,7 @@ DWORD WINAPI SHGetPathFromIDList32W (LPCITEMIDLIST pidl,LPWSTR pszPath)
|
|||
}
|
||||
|
||||
|
||||
void (CALLBACK* pDLLInitComctl)(void);
|
||||
void (CALLBACK* pDLLInitComctl)(LPVOID);
|
||||
INT32 (CALLBACK* pImageList_AddIcon) (HIMAGELIST himl, HICON32 hIcon);
|
||||
INT32 (CALLBACK* pImageList_ReplaceIcon) (HIMAGELIST, INT32, HICON32);
|
||||
HIMAGELIST (CALLBACK * pImageList_Create) (INT32,INT32,UINT32,INT32,INT32);
|
||||
|
@ -1000,7 +998,7 @@ BOOL32 WINAPI Shell32LibMain(HINSTANCE32 hinstDLL, DWORD fdwReason, LPVOID lpvRe
|
|||
if (hComctl32)
|
||||
{ pDLLInitComctl=GetProcAddress32(hComctl32,"InitCommonControlsEx");
|
||||
if (pDLLInitComctl)
|
||||
{ pDLLInitComctl();
|
||||
{ pDLLInitComctl(NULL);
|
||||
}
|
||||
pImageList_Create=GetProcAddress32(hComctl32,"ImageList_Create");
|
||||
pImageList_AddIcon=GetProcAddress32(hComctl32,"ImageList_AddIcon");
|
||||
|
|
|
@ -16,7 +16,7 @@ extern HIMAGELIST ShellBigIconList;
|
|||
/*******************************************
|
||||
* pointer to functions dynamically loaded
|
||||
*/
|
||||
extern void (CALLBACK* pDLLInitComctl)(void);
|
||||
extern void (CALLBACK* pDLLInitComctl)(LPVOID);
|
||||
extern INT32 (CALLBACK* pImageList_AddIcon) (HIMAGELIST himl, HICON32 hIcon);
|
||||
extern INT32 (CALLBACK* pImageList_ReplaceIcon) (HIMAGELIST, INT32, HICON32);
|
||||
extern HIMAGELIST (CALLBACK* pImageList_Create) (INT32,INT32,UINT32,INT32,INT32);
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
#include "ole.h"
|
||||
#include "ole2.h"
|
||||
#include "debug.h"
|
||||
#include "compobj.h"
|
||||
#include "interfaces.h"
|
||||
#include "shlobj.h"
|
||||
#include "objbase.h"
|
||||
#include "wine/obj_base.h"
|
||||
#include "wine/obj_storage.h"
|
||||
#include "shell.h"
|
||||
#include "winerror.h"
|
||||
#include "winnls.h"
|
||||
|
@ -24,48 +24,38 @@
|
|||
#include "shell32_main.h"
|
||||
|
||||
/* IPersistFile Implementation */
|
||||
static HRESULT WINAPI IPersistFile_QueryInterface(LPPERSISTFILE this, REFIID riid, LPVOID * ppvObj);
|
||||
static ULONG WINAPI IPersistFile_AddRef(LPPERSISTFILE this);
|
||||
static ULONG WINAPI IPersistFile_Release(LPPERSISTFILE this);
|
||||
typedef struct _IPersistFile {
|
||||
/* IUnknown fields */
|
||||
ICOM_VTABLE(IPersistFile)* lpvtbl;
|
||||
DWORD ref;
|
||||
} _IPersistFile;
|
||||
|
||||
static struct ICOM_VTABLE(IPersistFile) pfvt;
|
||||
|
||||
static HRESULT WINAPI IPersistFile_GetClassID (LPPERSISTFILE this, CLSID *pClassID);
|
||||
static HRESULT WINAPI IPersistFile_IsDirty (LPPERSISTFILE this);
|
||||
static HRESULT WINAPI IPersistFile_Load (LPPERSISTFILE this, LPCOLESTR32 pszFileName, DWORD dwMode);
|
||||
static HRESULT WINAPI IPersistFile_Save (LPPERSISTFILE this, LPCOLESTR32 pszFileName, BOOL32 fRemember);
|
||||
static HRESULT WINAPI IPersistFile_SaveCompleted (LPPERSISTFILE this, LPCOLESTR32 pszFileName);
|
||||
static HRESULT WINAPI IPersistFile_GetCurFile (LPPERSISTFILE this, LPOLESTR32 *ppszFileName);
|
||||
|
||||
static struct IPersistFile_VTable pfvt =
|
||||
{ IPersistFile_QueryInterface,
|
||||
IPersistFile_AddRef,
|
||||
IPersistFile_Release,
|
||||
IPersistFile_GetClassID,
|
||||
IPersistFile_IsDirty,
|
||||
IPersistFile_Load,
|
||||
IPersistFile_Save,
|
||||
IPersistFile_SaveCompleted,
|
||||
IPersistFile_GetCurFile
|
||||
};
|
||||
/**************************************************************************
|
||||
* IPersistFile_Constructor
|
||||
*/
|
||||
LPPERSISTFILE IPersistFile_Constructor(void)
|
||||
{ LPPERSISTFILE sl;
|
||||
{
|
||||
_IPersistFile* sl;
|
||||
|
||||
sl = (LPPERSISTFILE)HeapAlloc(GetProcessHeap(),0,sizeof(IPersistFile));
|
||||
sl = (_IPersistFile*)HeapAlloc(GetProcessHeap(),0,sizeof(_IPersistFile));
|
||||
sl->ref = 1;
|
||||
sl->lpvtbl = &pfvt;
|
||||
|
||||
TRACE(shell,"(%p)->()\n",sl);
|
||||
return sl;
|
||||
return (LPPERSISTFILE)sl;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* IPersistFile_QueryInterface
|
||||
*/
|
||||
static HRESULT WINAPI IPersistFile_QueryInterface(
|
||||
LPPERSISTFILE this, REFIID riid, LPVOID *ppvObj)
|
||||
{ char xriid[50];
|
||||
static HRESULT WINAPI IPersistFile_fnQueryInterface(
|
||||
LPUNKNOWN iface, REFIID riid, LPVOID *ppvObj)
|
||||
{
|
||||
ICOM_THIS(IPersistFile,iface);
|
||||
char xriid[50];
|
||||
WINE_StringFromCLSID((LPCLSID)riid,xriid);
|
||||
TRACE(shell,"(%p)->(\n\tIID:\t%s)\n",this,xriid);
|
||||
|
||||
|
@ -79,7 +69,7 @@ static HRESULT WINAPI IPersistFile_QueryInterface(
|
|||
}
|
||||
|
||||
if(*ppvObj)
|
||||
{ (*(LPPERSISTFILE*)ppvObj)->lpvtbl->fnAddRef(this);
|
||||
{ IPersistFile_AddRef((IPersistFile*)*ppvObj);
|
||||
TRACE(shell,"-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -89,15 +79,19 @@ static HRESULT WINAPI IPersistFile_QueryInterface(
|
|||
/******************************************************************************
|
||||
* IPersistFile_AddRef
|
||||
*/
|
||||
static ULONG WINAPI IPersistFile_AddRef(LPPERSISTFILE this)
|
||||
{ TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
|
||||
static ULONG WINAPI IPersistFile_fnAddRef(LPUNKNOWN iface)
|
||||
{
|
||||
ICOM_THIS(IPersistFile,iface);
|
||||
TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
|
||||
return ++(this->ref);
|
||||
}
|
||||
/******************************************************************************
|
||||
* IPersistFile_Release
|
||||
*/
|
||||
static ULONG WINAPI IPersistFile_Release(LPPERSISTFILE this)
|
||||
{ TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
|
||||
static ULONG WINAPI IPersistFile_fnRelease(LPUNKNOWN iface)
|
||||
{
|
||||
ICOM_THIS(IPersistFile,iface);
|
||||
TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
|
||||
if (!--(this->ref))
|
||||
{ TRACE(shell,"-- destroying IPersistFile(%p)\n",this);
|
||||
HeapFree(GetProcessHeap(),0,this);
|
||||
|
@ -106,70 +100,89 @@ static ULONG WINAPI IPersistFile_Release(LPPERSISTFILE this)
|
|||
return this->ref;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IPersistFile_GetClassID (LPPERSISTFILE this, CLSID *pClassID)
|
||||
{ FIXME(shell,"(%p)\n",this);
|
||||
static HRESULT WINAPI IPersistFile_fnGetClassID(const IPersist* iface, CLSID *pClassID)
|
||||
{
|
||||
ICOM_CTHIS(IPersistFile,iface);
|
||||
FIXME(shell,"(%p)\n",this);
|
||||
return NOERROR;
|
||||
}
|
||||
static HRESULT WINAPI IPersistFile_IsDirty (LPPERSISTFILE this)
|
||||
{ FIXME(shell,"(%p)\n",this);
|
||||
static HRESULT WINAPI IPersistFile_fnIsDirty(const IPersistFile* iface)
|
||||
{
|
||||
ICOM_CTHIS(IPersistFile,iface);
|
||||
FIXME(shell,"(%p)\n",this);
|
||||
return NOERROR;
|
||||
}
|
||||
static HRESULT WINAPI IPersistFile_Load (LPPERSISTFILE this, LPCOLESTR32 pszFileName, DWORD dwMode)
|
||||
{ FIXME(shell,"(%p)->(%s)\n",this,debugstr_w(pszFileName));
|
||||
static HRESULT WINAPI IPersistFile_fnLoad(LPPERSISTFILE iface, LPCOLESTR32 pszFileName, DWORD dwMode)
|
||||
{
|
||||
ICOM_THIS(IPersistFile,iface);
|
||||
FIXME(shell,"(%p)->(%s)\n",this,debugstr_w(pszFileName));
|
||||
return E_FAIL;
|
||||
}
|
||||
static HRESULT WINAPI IPersistFile_Save (LPPERSISTFILE this, LPCOLESTR32 pszFileName, BOOL32 fRemember)
|
||||
{ FIXME(shell,"(%p)->(%s)\n",this,debugstr_w(pszFileName));
|
||||
static HRESULT WINAPI IPersistFile_fnSave(LPPERSISTFILE iface, LPCOLESTR32 pszFileName, BOOL32 fRemember)
|
||||
{
|
||||
ICOM_THIS(IPersistFile,iface);
|
||||
FIXME(shell,"(%p)->(%s)\n",this,debugstr_w(pszFileName));
|
||||
return NOERROR;
|
||||
}
|
||||
static HRESULT WINAPI IPersistFile_fnSaveCompleted(LPPERSISTFILE iface, LPCOLESTR32 pszFileName)
|
||||
{
|
||||
ICOM_THIS(IPersistFile,iface);
|
||||
FIXME(shell,"(%p)->(%s)\n",this,debugstr_w(pszFileName));
|
||||
return NOERROR;
|
||||
}
|
||||
static HRESULT WINAPI IPersistFile_fnGetCurFile(const IPersistFile* iface, LPOLESTR32 *ppszFileName)
|
||||
{
|
||||
ICOM_CTHIS(IPersistFile,iface);
|
||||
FIXME(shell,"(%p)\n",this);
|
||||
return NOERROR;
|
||||
}
|
||||
static HRESULT WINAPI IPersistFile_SaveCompleted (LPPERSISTFILE this, LPCOLESTR32 pszFileName)
|
||||
{ FIXME(shell,"(%p)->(%s)\n",this,debugstr_w(pszFileName));
|
||||
return NOERROR;
|
||||
}
|
||||
static HRESULT WINAPI IPersistFile_GetCurFile (LPPERSISTFILE this, LPOLESTR32 *ppszFileName)
|
||||
{ FIXME(shell,"(%p)\n",this);
|
||||
return NOERROR;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* IClassFactory Implementation
|
||||
*/
|
||||
static HRESULT WINAPI IShellLink_CF_QueryInterface(LPCLASSFACTORY,REFIID,LPVOID*);
|
||||
static ULONG WINAPI IShellLink_CF_AddRef(LPCLASSFACTORY);
|
||||
static ULONG WINAPI IShellLink_CF_Release(LPCLASSFACTORY);
|
||||
static HRESULT WINAPI IShellLink_CF_CreateInstance(LPCLASSFACTORY, LPUNKNOWN, REFIID, LPVOID *);
|
||||
static HRESULT WINAPI IShellLink_CF_LockServer(LPCLASSFACTORY, BOOL32);
|
||||
/**************************************************************************
|
||||
* IShellLink_CF_VTable
|
||||
*/
|
||||
static IClassFactory_VTable slcfvt =
|
||||
{ IShellLink_CF_QueryInterface,
|
||||
IShellLink_CF_AddRef,
|
||||
IShellLink_CF_Release,
|
||||
IShellLink_CF_CreateInstance,
|
||||
IShellLink_CF_LockServer
|
||||
|
||||
static struct ICOM_VTABLE(IPersistFile) pfvt =
|
||||
{
|
||||
{
|
||||
{
|
||||
IPersistFile_fnQueryInterface,
|
||||
IPersistFile_fnAddRef,
|
||||
IPersistFile_fnRelease
|
||||
},
|
||||
IPersistFile_fnGetClassID
|
||||
},
|
||||
IPersistFile_fnIsDirty,
|
||||
IPersistFile_fnLoad,
|
||||
IPersistFile_fnSave,
|
||||
IPersistFile_fnSaveCompleted,
|
||||
IPersistFile_fnGetCurFile
|
||||
};
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* IShellLink's IClassFactory implementation
|
||||
*/
|
||||
|
||||
static ICOM_VTABLE(IClassFactory) slcfvt;
|
||||
|
||||
/**************************************************************************
|
||||
* IShellLink_CF_Constructor
|
||||
*/
|
||||
|
||||
LPCLASSFACTORY IShellLink_CF_Constructor(void)
|
||||
{ LPCLASSFACTORY lpclf;
|
||||
{
|
||||
_IClassFactory* lpclf;
|
||||
|
||||
lpclf= (LPCLASSFACTORY)HeapAlloc(GetProcessHeap(),0,sizeof(IClassFactory));
|
||||
lpclf= (_IClassFactory*)HeapAlloc(GetProcessHeap(),0,sizeof(_IClassFactory));
|
||||
lpclf->ref = 1;
|
||||
lpclf->lpvtbl = &slcfvt;
|
||||
TRACE(shell,"(%p)->()\n",lpclf);
|
||||
return lpclf;
|
||||
return (LPCLASSFACTORY)lpclf;
|
||||
}
|
||||
/**************************************************************************
|
||||
* IShellLink_CF_QueryInterface
|
||||
*/
|
||||
static HRESULT WINAPI IShellLink_CF_QueryInterface(
|
||||
LPCLASSFACTORY this, REFIID riid, LPVOID *ppvObj)
|
||||
{ char xriid[50];
|
||||
LPUNKNOWN iface, REFIID riid, LPVOID *ppvObj)
|
||||
{
|
||||
ICOM_THIS(IClassFactory,iface);
|
||||
char xriid[50];
|
||||
WINE_StringFromCLSID((LPCLSID)riid,xriid);
|
||||
TRACE(shell,"(%p)->(\n\tIID:\t%s)\n",this,xriid);
|
||||
|
||||
|
@ -183,7 +196,7 @@ static HRESULT WINAPI IShellLink_CF_QueryInterface(
|
|||
}
|
||||
|
||||
if(*ppvObj)
|
||||
{ (*(LPCLASSFACTORY*)ppvObj)->lpvtbl->fnAddRef(this);
|
||||
{ IUnknown_AddRef((IUnknown*)*ppvObj);
|
||||
TRACE(shell,"-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -193,15 +206,19 @@ static HRESULT WINAPI IShellLink_CF_QueryInterface(
|
|||
/******************************************************************************
|
||||
* IShellLink_CF_AddRef
|
||||
*/
|
||||
static ULONG WINAPI IShellLink_CF_AddRef(LPCLASSFACTORY this)
|
||||
{ TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
|
||||
static ULONG WINAPI IShellLink_CF_AddRef(LPUNKNOWN iface)
|
||||
{
|
||||
ICOM_THIS(IClassFactory,iface);
|
||||
TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
|
||||
return ++(this->ref);
|
||||
}
|
||||
/******************************************************************************
|
||||
* IShellLink_CF_Release
|
||||
*/
|
||||
static ULONG WINAPI IShellLink_CF_Release(LPCLASSFACTORY this)
|
||||
{ TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
|
||||
static ULONG WINAPI IShellLink_CF_Release(LPUNKNOWN iface)
|
||||
{
|
||||
ICOM_THIS(IClassFactory,iface);
|
||||
TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
|
||||
if (!--(this->ref))
|
||||
{ TRACE(shell,"-- destroying IClassFactory(%p)\n",this);
|
||||
HeapFree(GetProcessHeap(),0,this);
|
||||
|
@ -213,8 +230,10 @@ static ULONG WINAPI IShellLink_CF_Release(LPCLASSFACTORY this)
|
|||
* IShellLink_CF_CreateInstance
|
||||
*/
|
||||
static HRESULT WINAPI IShellLink_CF_CreateInstance(
|
||||
LPCLASSFACTORY this, LPUNKNOWN pUnknown, REFIID riid, LPVOID *ppObject)
|
||||
{ IUnknown *pObj = NULL;
|
||||
LPCLASSFACTORY iface, LPUNKNOWN pUnknown, REFIID riid, LPVOID *ppObject)
|
||||
{
|
||||
ICOM_THIS(IClassFactory,iface);
|
||||
IUnknown *pObj = NULL;
|
||||
HRESULT hres;
|
||||
char xriid[50];
|
||||
|
||||
|
@ -239,8 +258,8 @@ static HRESULT WINAPI IShellLink_CF_CreateInstance(
|
|||
{ return(E_OUTOFMEMORY);
|
||||
}
|
||||
|
||||
hres = pObj->lpvtbl->fnQueryInterface(pObj,riid, ppObject);
|
||||
pObj->lpvtbl->fnRelease(pObj);
|
||||
hres = IUnknown_QueryInterface(pObj,riid, ppObject);
|
||||
IUnknown_Release(pObj);
|
||||
TRACE(shell,"-- Object created: (%p)->%p\n",this,*ppObject);
|
||||
|
||||
return hres;
|
||||
|
@ -248,10 +267,22 @@ static HRESULT WINAPI IShellLink_CF_CreateInstance(
|
|||
/******************************************************************************
|
||||
* IShellLink_CF_LockServer
|
||||
*/
|
||||
static HRESULT WINAPI IShellLink_CF_LockServer(LPCLASSFACTORY this, BOOL32 fLock)
|
||||
{ TRACE(shell,"%p->(0x%x), not implemented\n",this, fLock);
|
||||
static HRESULT WINAPI IShellLink_CF_LockServer(LPCLASSFACTORY iface, BOOL32 fLock)
|
||||
{
|
||||
ICOM_THIS(IClassFactory,iface);
|
||||
TRACE(shell,"%p->(0x%x), not implemented\n",this, fLock);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
static ICOM_VTABLE(IClassFactory) slcfvt =
|
||||
{
|
||||
{
|
||||
IShellLink_CF_QueryInterface,
|
||||
IShellLink_CF_AddRef,
|
||||
IShellLink_CF_Release
|
||||
},
|
||||
IShellLink_CF_CreateInstance,
|
||||
IShellLink_CF_LockServer
|
||||
};
|
||||
|
||||
/* IShellLink Implementation */
|
||||
static HRESULT WINAPI IShellLink_QueryInterface(LPSHELLLINK,REFIID,LPVOID*);
|
||||
|
@ -280,6 +311,7 @@ static HRESULT WINAPI IShellLink_SetPath(LPSHELLLINK, LPCSTR);
|
|||
* IShellLink Implementation
|
||||
*/
|
||||
|
||||
|
||||
static struct IShellLink_VTable slvt =
|
||||
{ IShellLink_QueryInterface,
|
||||
IShellLink_AddRef,
|
||||
|
@ -363,7 +395,7 @@ static ULONG WINAPI IShellLink_Release(LPSHELLLINK this)
|
|||
{ TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
|
||||
if (!--(this->ref))
|
||||
{ TRACE(shell,"-- destroying IShellLink(%p)\n",this);
|
||||
this->lppf->lpvtbl->fnRelease(this->lppf); /* IPersistFile*/
|
||||
IPersistFile_Release(this->lppf); /* IPersistFile*/
|
||||
HeapFree(GetProcessHeap(),0,this);
|
||||
return 0;
|
||||
}
|
||||
|
@ -453,43 +485,33 @@ static HRESULT WINAPI IShellLink_SetPath(LPSHELLLINK this, LPCSTR pszFile)
|
|||
}
|
||||
|
||||
/**************************************************************************
|
||||
* IClassFactory for IShellLinkW
|
||||
* IShellLink's IClassFactory implementation
|
||||
*/
|
||||
static HRESULT WINAPI IShellLinkW_CF_QueryInterface(LPCLASSFACTORY,REFIID,LPVOID*);
|
||||
static ULONG WINAPI IShellLinkW_CF_AddRef(LPCLASSFACTORY);
|
||||
static ULONG WINAPI IShellLinkW_CF_Release(LPCLASSFACTORY);
|
||||
static HRESULT WINAPI IShellLinkW_CF_CreateInstance(LPCLASSFACTORY, LPUNKNOWN, REFIID, LPVOID *);
|
||||
static HRESULT WINAPI IShellLinkW_CF_LockServer(LPCLASSFACTORY, BOOL32);
|
||||
/**************************************************************************
|
||||
* IShellLinkW_CF_VTable
|
||||
*/
|
||||
static IClassFactory_VTable slwcfvt =
|
||||
{ IShellLinkW_CF_QueryInterface,
|
||||
IShellLinkW_CF_AddRef,
|
||||
IShellLinkW_CF_Release,
|
||||
IShellLinkW_CF_CreateInstance,
|
||||
IShellLinkW_CF_LockServer
|
||||
};
|
||||
|
||||
static ICOM_VTABLE(IClassFactory) slwcfvt;
|
||||
|
||||
/**************************************************************************
|
||||
* IShellLinkW_CF_Constructor
|
||||
*/
|
||||
|
||||
LPCLASSFACTORY IShellLinkW_CF_Constructor(void)
|
||||
{ LPCLASSFACTORY lpclf;
|
||||
{
|
||||
_IClassFactory* lpclf;
|
||||
|
||||
lpclf= (LPCLASSFACTORY)HeapAlloc(GetProcessHeap(),0,sizeof(IClassFactory));
|
||||
lpclf= (_IClassFactory*)HeapAlloc(GetProcessHeap(),0,sizeof(_IClassFactory));
|
||||
lpclf->ref = 1;
|
||||
lpclf->lpvtbl = &slwcfvt;
|
||||
TRACE(shell,"(%p)->()\n",lpclf);
|
||||
return lpclf;
|
||||
return (LPCLASSFACTORY)lpclf;
|
||||
}
|
||||
/**************************************************************************
|
||||
* IShellLinkW_CF_QueryInterface
|
||||
*/
|
||||
static HRESULT WINAPI IShellLinkW_CF_QueryInterface(
|
||||
LPCLASSFACTORY this, REFIID riid, LPVOID *ppvObj)
|
||||
{ char xriid[50];
|
||||
LPUNKNOWN iface, REFIID riid, LPVOID *ppvObj)
|
||||
{
|
||||
ICOM_THIS(IClassFactory,iface);
|
||||
char xriid[50];
|
||||
WINE_StringFromCLSID((LPCLSID)riid,xriid);
|
||||
TRACE(shell,"(%p)->(\n\tIID:\t%s)\n",this,xriid);
|
||||
|
||||
|
@ -502,8 +524,8 @@ static HRESULT WINAPI IShellLinkW_CF_QueryInterface(
|
|||
{ *ppvObj = (LPCLASSFACTORY)this;
|
||||
}
|
||||
|
||||
if(*ppvObj)
|
||||
{ (*(LPCLASSFACTORY*)ppvObj)->lpvtbl->fnAddRef(this);
|
||||
if(*ppvObj) {
|
||||
IUnknown_AddRef((IUnknown*)*ppvObj);
|
||||
TRACE(shell,"-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -513,15 +535,19 @@ static HRESULT WINAPI IShellLinkW_CF_QueryInterface(
|
|||
/******************************************************************************
|
||||
* IShellLinkW_CF_AddRef
|
||||
*/
|
||||
static ULONG WINAPI IShellLinkW_CF_AddRef(LPCLASSFACTORY this)
|
||||
{ TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
|
||||
static ULONG WINAPI IShellLinkW_CF_AddRef(LPUNKNOWN iface)
|
||||
{
|
||||
ICOM_THIS(IClassFactory,iface);
|
||||
TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
|
||||
return ++(this->ref);
|
||||
}
|
||||
/******************************************************************************
|
||||
* IShellLinkW_CF_Release
|
||||
*/
|
||||
static ULONG WINAPI IShellLinkW_CF_Release(LPCLASSFACTORY this)
|
||||
{ TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
|
||||
static ULONG WINAPI IShellLinkW_CF_Release(LPUNKNOWN iface)
|
||||
{
|
||||
ICOM_THIS(IClassFactory,iface);
|
||||
TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
|
||||
if (!--(this->ref))
|
||||
{ TRACE(shell,"-- destroying IClassFactory(%p)\n",this);
|
||||
HeapFree(GetProcessHeap(),0,this);
|
||||
|
@ -533,8 +559,10 @@ static ULONG WINAPI IShellLinkW_CF_Release(LPCLASSFACTORY this)
|
|||
* IShellLinkW_CF_CreateInstance
|
||||
*/
|
||||
static HRESULT WINAPI IShellLinkW_CF_CreateInstance(
|
||||
LPCLASSFACTORY this, LPUNKNOWN pUnknown, REFIID riid, LPVOID *ppObject)
|
||||
{ IUnknown *pObj = NULL;
|
||||
LPCLASSFACTORY iface, LPUNKNOWN pUnknown, REFIID riid, LPVOID *ppObject)
|
||||
{
|
||||
ICOM_THIS(IClassFactory,iface);
|
||||
IUnknown *pObj = NULL;
|
||||
HRESULT hres;
|
||||
char xriid[50];
|
||||
|
||||
|
@ -569,11 +597,24 @@ static HRESULT WINAPI IShellLinkW_CF_CreateInstance(
|
|||
* IShellLinkW_CF_LockServer
|
||||
*/
|
||||
|
||||
static HRESULT WINAPI IShellLinkW_CF_LockServer(LPCLASSFACTORY this, BOOL32 fLock)
|
||||
{ TRACE(shell,"%p->(0x%x), not implemented\n",this, fLock);
|
||||
static HRESULT WINAPI IShellLinkW_CF_LockServer(LPCLASSFACTORY iface, BOOL32 fLock)
|
||||
{
|
||||
ICOM_THIS(IClassFactory,iface);
|
||||
TRACE(shell,"%p->(0x%x), not implemented\n",this, fLock);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static ICOM_VTABLE(IClassFactory) slwcfvt =
|
||||
{
|
||||
{
|
||||
IShellLinkW_CF_QueryInterface,
|
||||
IShellLinkW_CF_AddRef,
|
||||
IShellLinkW_CF_Release
|
||||
},
|
||||
IShellLinkW_CF_CreateInstance,
|
||||
IShellLinkW_CF_LockServer
|
||||
};
|
||||
|
||||
/* IShellLinkW Implementation */
|
||||
static HRESULT WINAPI IShellLinkW_QueryInterface(LPSHELLLINKW,REFIID,LPVOID*);
|
||||
static ULONG WINAPI IShellLinkW_AddRef(LPSHELLLINKW);
|
||||
|
@ -684,7 +725,7 @@ static ULONG WINAPI IShellLinkW_Release(LPSHELLLINKW this)
|
|||
{ TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
|
||||
if (!--(this->ref))
|
||||
{ TRACE(shell,"-- destroying IShellLinkW(%p)\n",this);
|
||||
this->lppf->lpvtbl->fnRelease(this->lppf); /* IPersistFile*/
|
||||
IPersistFile_Release(this->lppf); /* IPersistFile*/
|
||||
HeapFree(GetProcessHeap(),0,this);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -12,9 +12,8 @@
|
|||
#include "ole.h"
|
||||
#include "ole2.h"
|
||||
#include "debug.h"
|
||||
#include "compobj.h"
|
||||
#include "interfaces.h"
|
||||
#include "shlobj.h"
|
||||
#include "objbase.h"
|
||||
#include "shell.h"
|
||||
#include "winerror.h"
|
||||
#include "winnls.h"
|
||||
|
@ -84,8 +83,8 @@ static DWORD SH_get_instance(REFCLSID clsid,LPSTR dllname,LPVOID unknownouter,RE
|
|||
{ FIXME(shell,"no classfactory, but hres is 0x%ld!\n",hres);
|
||||
return E_FAIL;
|
||||
}
|
||||
classfac->lpvtbl->fnCreateInstance(classfac,unknownouter,refiid,inst);
|
||||
classfac->lpvtbl->fnRelease(classfac);
|
||||
IClassFactory_CreateInstance(classfac,unknownouter,refiid,inst);
|
||||
IClassFactory_Release(classfac);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -185,9 +184,9 @@ DWORD WINAPI SHELL32_DllGetClassObject(REFCLSID rclsid,REFIID iid,LPVOID *ppv)
|
|||
{ lpclf = IClassFactory_Constructor();
|
||||
}
|
||||
|
||||
if(lpclf)
|
||||
{ hres = lpclf->lpvtbl->fnQueryInterface(lpclf,iid, ppv);
|
||||
lpclf->lpvtbl->fnRelease(lpclf);
|
||||
if(lpclf) {
|
||||
hres = IClassFactory_QueryInterface(lpclf,iid, ppv);
|
||||
IClassFactory_Release(lpclf);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -216,41 +215,31 @@ DWORD WINAPI SHGetMalloc(LPMALLOC32 *lpmal)
|
|||
/**************************************************************************
|
||||
* IClassFactory Implementation
|
||||
*/
|
||||
static HRESULT WINAPI IClassFactory_QueryInterface(LPCLASSFACTORY,REFIID,LPVOID*);
|
||||
static ULONG WINAPI IClassFactory_AddRef(LPCLASSFACTORY);
|
||||
static ULONG WINAPI IClassFactory_Release(LPCLASSFACTORY);
|
||||
static HRESULT WINAPI IClassFactory_CreateInstance(LPCLASSFACTORY, LPUNKNOWN, REFIID, LPVOID *);
|
||||
static HRESULT WINAPI IClassFactory_LockServer(LPCLASSFACTORY, BOOL32);
|
||||
/**************************************************************************
|
||||
* IClassFactory_VTable
|
||||
*/
|
||||
static IClassFactory_VTable clfvt =
|
||||
{ IClassFactory_QueryInterface,
|
||||
IClassFactory_AddRef,
|
||||
IClassFactory_Release,
|
||||
IClassFactory_CreateInstance,
|
||||
IClassFactory_LockServer
|
||||
};
|
||||
|
||||
static ICOM_VTABLE(IClassFactory) clfvt;
|
||||
|
||||
/**************************************************************************
|
||||
* IClassFactory_Constructor
|
||||
*/
|
||||
|
||||
LPCLASSFACTORY IClassFactory_Constructor(void)
|
||||
{ LPCLASSFACTORY lpclf;
|
||||
{
|
||||
_IClassFactory* lpclf;
|
||||
|
||||
lpclf= (LPCLASSFACTORY)HeapAlloc(GetProcessHeap(),0,sizeof(IClassFactory));
|
||||
lpclf= (_IClassFactory*)HeapAlloc(GetProcessHeap(),0,sizeof(_IClassFactory));
|
||||
lpclf->ref = 1;
|
||||
lpclf->lpvtbl = &clfvt;
|
||||
TRACE(shell,"(%p)->()\n",lpclf);
|
||||
return lpclf;
|
||||
return (LPCLASSFACTORY)lpclf;
|
||||
}
|
||||
/**************************************************************************
|
||||
* IClassFactory_QueryInterface
|
||||
*/
|
||||
static HRESULT WINAPI IClassFactory_QueryInterface(
|
||||
LPCLASSFACTORY this, REFIID riid, LPVOID *ppvObj)
|
||||
{ char xriid[50];
|
||||
static HRESULT WINAPI IClassFactory_fnQueryInterface(
|
||||
LPUNKNOWN iface, REFIID riid, LPVOID *ppvObj)
|
||||
{
|
||||
ICOM_THIS(IClassFactory,iface);
|
||||
char xriid[50];
|
||||
WINE_StringFromCLSID((LPCLSID)riid,xriid);
|
||||
TRACE(shell,"(%p)->(\n\tIID:\t%s)\n",this,xriid);
|
||||
|
||||
|
@ -264,7 +253,7 @@ static HRESULT WINAPI IClassFactory_QueryInterface(
|
|||
}
|
||||
|
||||
if(*ppvObj)
|
||||
{ (*(LPCLASSFACTORY*)ppvObj)->lpvtbl->fnAddRef(this);
|
||||
{ IUnknown_AddRef((LPUNKNOWN)*ppvObj);
|
||||
TRACE(shell,"-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -274,15 +263,19 @@ static HRESULT WINAPI IClassFactory_QueryInterface(
|
|||
/******************************************************************************
|
||||
* IClassFactory_AddRef
|
||||
*/
|
||||
static ULONG WINAPI IClassFactory_AddRef(LPCLASSFACTORY this)
|
||||
{ TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
|
||||
static ULONG WINAPI IClassFactory_fnAddRef(LPUNKNOWN iface)
|
||||
{
|
||||
ICOM_THIS(IClassFactory,iface);
|
||||
TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
|
||||
return ++(this->ref);
|
||||
}
|
||||
/******************************************************************************
|
||||
* IClassFactory_Release
|
||||
*/
|
||||
static ULONG WINAPI IClassFactory_Release(LPCLASSFACTORY this)
|
||||
{ TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
|
||||
static ULONG WINAPI IClassFactory_fnRelease(LPUNKNOWN iface)
|
||||
{
|
||||
ICOM_THIS(IClassFactory,iface);
|
||||
TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
|
||||
if (!--(this->ref))
|
||||
{ TRACE(shell,"-- destroying IClassFactory(%p)\n",this);
|
||||
HeapFree(GetProcessHeap(),0,this);
|
||||
|
@ -293,9 +286,11 @@ static ULONG WINAPI IClassFactory_Release(LPCLASSFACTORY this)
|
|||
/******************************************************************************
|
||||
* IClassFactory_CreateInstance
|
||||
*/
|
||||
static HRESULT WINAPI IClassFactory_CreateInstance(
|
||||
LPCLASSFACTORY this, LPUNKNOWN pUnknown, REFIID riid, LPVOID *ppObject)
|
||||
{ IUnknown *pObj = NULL;
|
||||
static HRESULT WINAPI IClassFactory_fnCreateInstance(
|
||||
LPCLASSFACTORY iface, LPUNKNOWN pUnknown, REFIID riid, LPVOID *ppObject)
|
||||
{
|
||||
ICOM_THIS(IClassFactory,iface);
|
||||
IUnknown *pObj = NULL;
|
||||
HRESULT hres;
|
||||
char xriid[50];
|
||||
|
||||
|
@ -341,7 +336,20 @@ static HRESULT WINAPI IClassFactory_CreateInstance(
|
|||
/******************************************************************************
|
||||
* IClassFactory_LockServer
|
||||
*/
|
||||
static HRESULT WINAPI IClassFactory_LockServer(LPCLASSFACTORY this, BOOL32 fLock)
|
||||
{ TRACE(shell,"%p->(0x%x), not implemented\n",this, fLock);
|
||||
static HRESULT WINAPI IClassFactory_fnLockServer(LPCLASSFACTORY iface, BOOL32 fLock)
|
||||
{
|
||||
ICOM_THIS(IClassFactory,iface);
|
||||
TRACE(shell,"%p->(0x%x), not implemented\n",this, fLock);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static ICOM_VTABLE(IClassFactory) clfvt =
|
||||
{
|
||||
{
|
||||
IClassFactory_fnQueryInterface,
|
||||
IClassFactory_fnAddRef,
|
||||
IClassFactory_fnRelease
|
||||
},
|
||||
IClassFactory_fnCreateInstance,
|
||||
IClassFactory_fnLockServer
|
||||
};
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include "dlgs.h"
|
||||
#include "win.h"
|
||||
#include "cursoricon.h"
|
||||
#include "interfaces.h"
|
||||
#include "shlobj.h"
|
||||
#include "debug.h"
|
||||
#include "winreg.h"
|
||||
|
@ -311,7 +310,9 @@ DWORD WINAPI SHCreateDirectory(LPSECURITY_ATTRIBUTES sec,LPCSTR path) {
|
|||
*/
|
||||
DWORD WINAPI SHFree(LPVOID x) {
|
||||
TRACE(shell,"%p\n",x);
|
||||
/*return LocalFree32((HANDLE32)x);*/ /* crashes */
|
||||
if (!HIWORD(x))
|
||||
{ *(LPDWORD)0xdeaf0000 = 0;
|
||||
}
|
||||
return HeapFree(GetProcessHeap(),0,x);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Shell Folder stuff (...and all the OLE-Objects of SHELL32.DLL)
|
||||
* Shell Folder stuff
|
||||
*
|
||||
* Copyright 1997 Marcus Meissner
|
||||
* Copyright 1998 Juergen Schmied
|
||||
|
@ -12,9 +12,8 @@
|
|||
#include "ole.h"
|
||||
#include "ole2.h"
|
||||
#include "debug.h"
|
||||
#include "compobj.h"
|
||||
#include "interfaces.h"
|
||||
#include "shlobj.h"
|
||||
#include "objbase.h"
|
||||
#include "shell.h"
|
||||
#include "winerror.h"
|
||||
#include "winnls.h"
|
||||
|
@ -115,11 +114,11 @@ LPSHELLFOLDER IShellFolder_Constructor(LPSHELLFOLDER pParent,LPITEMIDLIST pidl)
|
|||
if(sf->mpidl) /* do we have a pidl? */
|
||||
{ dwSize = 0;
|
||||
if(sf->mpSFParent->sMyPath) /* get the size of the parents path */
|
||||
{ dwSize += strlen(sf->mpSFParent->sMyPath) + 1;
|
||||
{ dwSize += strlen(sf->mpSFParent->sMyPath) ;
|
||||
TRACE(shell,"-- (%p)->(parent's path=%s)\n",sf, debugstr_a(sf->mpSFParent->sMyPath));
|
||||
}
|
||||
dwSize += _ILGetFolderText(sf->mpidl,NULL,0); /* add the size of the foldername*/
|
||||
sf->sMyPath = SHAlloc(dwSize);
|
||||
sf->sMyPath = SHAlloc(dwSize+1);
|
||||
if(sf->sMyPath)
|
||||
{ *(sf->sMyPath)=0x00;
|
||||
if(sf->mpSFParent->sMyPath) /* if the parent has a path, get it*/
|
||||
|
@ -141,24 +140,24 @@ LPSHELLFOLDER IShellFolder_Constructor(LPSHELLFOLDER pParent,LPITEMIDLIST pidl)
|
|||
*/
|
||||
static HRESULT WINAPI IShellFolder_QueryInterface(
|
||||
LPSHELLFOLDER this, REFIID riid, LPVOID *ppvObj)
|
||||
{ char xriid[50];
|
||||
WINE_StringFromCLSID((LPCLSID)riid,xriid);
|
||||
TRACE(shell,"(%p)->(\n\tIID:\t%s,%p)\n",this,xriid,ppvObj);
|
||||
{ char xriid[50];
|
||||
WINE_StringFromCLSID((LPCLSID)riid,xriid);
|
||||
TRACE(shell,"(%p)->(\n\tIID:\t%s,%p)\n",this,xriid,ppvObj);
|
||||
|
||||
*ppvObj = NULL;
|
||||
*ppvObj = NULL;
|
||||
|
||||
if(IsEqualIID(riid, &IID_IUnknown)) /*IUnknown*/
|
||||
{ *ppvObj = this;
|
||||
}
|
||||
else if(IsEqualIID(riid, &IID_IShellFolder)) /*IShellFolder*/
|
||||
{ *ppvObj = (IShellFolder*)this;
|
||||
}
|
||||
if(IsEqualIID(riid, &IID_IUnknown)) /*IUnknown*/
|
||||
{ *ppvObj = this;
|
||||
}
|
||||
else if(IsEqualIID(riid, &IID_IShellFolder)) /*IShellFolder*/
|
||||
{ *ppvObj = (IShellFolder*)this;
|
||||
}
|
||||
|
||||
if(*ppvObj)
|
||||
{ (*(LPSHELLFOLDER*)ppvObj)->lpvtbl->fnAddRef(this);
|
||||
TRACE(shell,"-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
|
||||
return S_OK;
|
||||
}
|
||||
if(*ppvObj)
|
||||
{ (*(LPSHELLFOLDER*)ppvObj)->lpvtbl->fnAddRef(this);
|
||||
TRACE(shell,"-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
|
||||
return S_OK;
|
||||
}
|
||||
TRACE(shell,"-- Interface: E_NOINTERFACE\n");
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
@ -223,36 +222,40 @@ static HRESULT WINAPI IShellFolder_ParseDisplayName(
|
|||
DWORD *pdwAttributes)
|
||||
{ HRESULT hr=E_OUTOFMEMORY;
|
||||
LPITEMIDLIST pidlFull=NULL, pidlTemp = NULL, pidlOld = NULL;
|
||||
LPSTR pszTemp, pszNext=NULL;
|
||||
CHAR szElement[MAX_PATH];
|
||||
LPSTR pszNext=NULL;
|
||||
CHAR szTemp[MAX_PATH],szElement[MAX_PATH];
|
||||
BOOL32 bIsFile;
|
||||
DWORD dwChars;
|
||||
|
||||
TRACE(shell,"(%p)->(HWND=0x%08x,%p,%p=%s,%p,pidl=%p,%p)\n",
|
||||
this,hwndOwner,pbcReserved,lpszDisplayName,
|
||||
debugstr_w(lpszDisplayName),pchEaten,ppidl,pdwAttributes);
|
||||
|
||||
dwChars=lstrlen32W(lpszDisplayName) + 1;
|
||||
pszTemp=(LPSTR)HeapAlloc(GetProcessHeap(),0,dwChars);
|
||||
|
||||
if(pszTemp)
|
||||
{ hr = E_FAIL;
|
||||
WideCharToLocal32(pszTemp, lpszDisplayName, dwChars);
|
||||
if(*pszTemp)
|
||||
{ if (strcmp(pszTemp,"Desktop")==0)
|
||||
{ pidlFull = (LPITEMIDLIST)HeapAlloc(GetProcessHeap(),0,2);
|
||||
pidlFull->mkid.cb = 0;
|
||||
WideCharToLocal32(szTemp, lpszDisplayName, lstrlen32W(lpszDisplayName) + 1);
|
||||
if(szTemp[0])
|
||||
{ if (strcmp(szTemp,"Desktop")==0)
|
||||
{ pidlFull = _ILCreateDesktop();
|
||||
}
|
||||
else if (strcmp(pszTemp,"My Computer")==0)
|
||||
else if (strcmp(szTemp,"My Computer")==0)
|
||||
{ pidlFull = _ILCreateMyComputer();
|
||||
}
|
||||
else
|
||||
{ pidlFull = _ILCreateMyComputer();
|
||||
|
||||
{ if (!PathIsRoot32A(szTemp))
|
||||
{ if (this->sMyPath && strlen (this->sMyPath))
|
||||
{ if (strcmp(this->sMyPath,"My Computer"))
|
||||
{ strcpy (szElement,this->sMyPath);
|
||||
PathAddBackslash32A (szElement);
|
||||
strcat (szElement, szTemp);
|
||||
strcpy (szTemp, szElement);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* check if the lpszDisplayName is Folder or File*/
|
||||
bIsFile = ! (GetFileAttributes32A(pszTemp) & FILE_ATTRIBUTE_DIRECTORY);
|
||||
pszNext = GetNextElement(pszTemp, szElement, MAX_PATH);
|
||||
bIsFile = ! (GetFileAttributes32A(szTemp) & FILE_ATTRIBUTE_DIRECTORY);
|
||||
pszNext = GetNextElement(szTemp, szElement, MAX_PATH);
|
||||
|
||||
pidlFull = _ILCreateMyComputer();
|
||||
pidlTemp = _ILCreateDrive(szElement);
|
||||
pidlOld = pidlFull;
|
||||
pidlFull = ILCombine(pidlFull,pidlTemp);
|
||||
|
@ -275,7 +278,6 @@ static HRESULT WINAPI IShellFolder_ParseDisplayName(
|
|||
}
|
||||
}
|
||||
}
|
||||
HeapFree(GetProcessHeap(),0,pszTemp);
|
||||
*ppidl = pidlFull;
|
||||
return hr;
|
||||
}
|
||||
|
@ -358,19 +360,15 @@ static HRESULT WINAPI IShellFolder_BindToObject( LPSHELLFOLDER this, LPCITEMIDLI
|
|||
* REFIID riid, //[in ] Initial storage interface
|
||||
* LPVOID* ppvObject //[out] Interface* returned
|
||||
*/
|
||||
static HRESULT WINAPI IShellFolder_BindToStorage(
|
||||
LPSHELLFOLDER this,
|
||||
LPCITEMIDLIST pidl, /*simple/complex pidl*/
|
||||
LPBC pbcReserved,
|
||||
REFIID riid,
|
||||
LPVOID *ppvOut)
|
||||
static HRESULT WINAPI IShellFolder_BindToStorage(LPSHELLFOLDER this,
|
||||
LPCITEMIDLIST pidl,LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
|
||||
{ char xriid[50];
|
||||
WINE_StringFromCLSID(riid,xriid);
|
||||
|
||||
FIXME(shell,"(%p)->(pidl=%p,%p,\n\tIID:%s,%p) stub\n",this,pidl,pbcReserved,xriid,ppvOut);
|
||||
|
||||
*ppvOut = NULL;
|
||||
return E_NOTIMPL;
|
||||
*ppvOut = NULL;
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
|
@ -463,8 +461,10 @@ static HRESULT WINAPI IShellFolder_CreateViewObject( LPSHELLFOLDER this,
|
|||
*ppvOut = NULL;
|
||||
|
||||
pShellView = IShellView_Constructor(this, this->mpidl);
|
||||
|
||||
if(!pShellView)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
hr = pShellView->lpvtbl->fnQueryInterface(pShellView, riid, ppvOut);
|
||||
pShellView->lpvtbl->fnRelease(pShellView);
|
||||
TRACE(shell,"-- (%p)->(interface=%p)\n",this, ppvOut);
|
||||
|
@ -617,54 +617,56 @@ static HRESULT WINAPI IShellFolder_GetDisplayNameOf( LPSHELLFOLDER this, LPCITEM
|
|||
|
||||
szSpecial[0]=0x00;
|
||||
szDrive[0]=0x00;
|
||||
szText[0]=0x00;
|
||||
|
||||
/* test if simple(relative) or complex(absolute) pidl */
|
||||
pidlTemp = ILGetNext(pidl);
|
||||
if (pidlTemp && pidlTemp->mkid.cb==0x00)
|
||||
{ bSimplePidl = TRUE;
|
||||
TRACE(shell,"-- simple pidl\n");
|
||||
|
||||
}
|
||||
|
||||
if (_ILIsDesktop( pidl))
|
||||
{ strcpy (szText,"Desktop");
|
||||
}
|
||||
}
|
||||
else
|
||||
{ if (_ILIsMyComputer( pidl))
|
||||
{ _ILGetItemText( pidl, szSpecial, MAX_PATH);
|
||||
{ if (_ILIsMyComputer(pidl))
|
||||
{ _ILGetItemText(pidl, szSpecial, MAX_PATH);
|
||||
pidl = ILGetNext(pidl);
|
||||
}
|
||||
if (_ILIsDrive( pidl))
|
||||
{ pidlTemp = ILFindLastID(pidl);
|
||||
if (pidlTemp)
|
||||
{ _ILGetItemText( pidlTemp, szTemp, MAX_PATH);
|
||||
}
|
||||
if ( dwFlags==SHGDN_NORMAL || dwFlags==SHGDN_INFOLDER)
|
||||
|
||||
if (_ILIsDrive(pidl))
|
||||
{ _ILGetDrive( pidl, szTemp, MAX_PATH);
|
||||
|
||||
if ( dwFlags==SHGDN_NORMAL || dwFlags==SHGDN_INFOLDER) /* like "A1-dos (C:)" */
|
||||
{ GetVolumeInformation32A(szTemp,szDrive,MAX_PATH,&dwVolumeSerialNumber,&dwMaximumComponetLength,&dwFileSystemFlags,NULL,0);
|
||||
if (szTemp[2]=='\\')
|
||||
{ szTemp[2]=0x00;
|
||||
}
|
||||
szTemp[2]=0x00; /* overwrite '\' */
|
||||
strcat (szDrive," (");
|
||||
strcat (szDrive,szTemp);
|
||||
strcat (szDrive,")");
|
||||
}
|
||||
else
|
||||
else /* like "C:\" */
|
||||
{ PathAddBackslash32A (szTemp);
|
||||
strcpy(szDrive,szTemp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
switch(dwFlags)
|
||||
{ case SHGDN_NORMAL:
|
||||
{ case SHGDN_NORMAL: /* 0x0000 */
|
||||
_ILGetPidlPath( pidl, szText, MAX_PATH);
|
||||
break;
|
||||
|
||||
case SHGDN_INFOLDER | SHGDN_FORPARSING: /*fall thru*/
|
||||
case SHGDN_INFOLDER:
|
||||
case SHGDN_INFOLDER | SHGDN_FORPARSING: /* 0x8001 */
|
||||
case SHGDN_INFOLDER: /* 0x0001 */
|
||||
pidlTemp = ILFindLastID(pidl);
|
||||
if (pidlTemp)
|
||||
{ _ILGetItemText( pidlTemp, szText, MAX_PATH);
|
||||
}
|
||||
break;
|
||||
|
||||
case SHGDN_FORPARSING:
|
||||
case SHGDN_FORPARSING: /* 0x8000 */
|
||||
if (bSimplePidl)
|
||||
{ /* if the IShellFolder has parents, get the path from the
|
||||
parent and add the ItemName*/
|
||||
|
@ -681,9 +683,8 @@ static HRESULT WINAPI IShellFolder_GetDisplayNameOf( LPSHELLFOLDER this, LPCITEM
|
|||
}
|
||||
strcat(szText,szTemp);
|
||||
}
|
||||
else
|
||||
{ /* if the pidl is absolute, get everything from the pidl*/
|
||||
_ILGetPidlPath( pidl, szText, MAX_PATH);
|
||||
else /* if the pidl is absolute, get everything from the pidl*/
|
||||
{ _ILGetPidlPath( pidl, szText, MAX_PATH);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
#include "ole.h"
|
||||
#include "ole2.h"
|
||||
#include "debug.h"
|
||||
#include "compobj.h"
|
||||
#include "interfaces.h"
|
||||
#include "servprov.h"
|
||||
#include "shlobj.h"
|
||||
#include "objbase.h"
|
||||
#include "shell.h"
|
||||
#include "winerror.h"
|
||||
#include "winnls.h"
|
||||
|
@ -666,7 +666,7 @@ BOOL32 ShellView_AddRemoveDockingWindow(LPSHELLVIEW this, BOOL32 bAdd)
|
|||
hr = IShellBrowser_QueryInterface(this->pShellBrowser, (REFIID)&IID_IServiceProvider, (LPVOID*)&pSP);
|
||||
if(SUCCEEDED(hr))
|
||||
{ /*get the IDockingWindowFrame pointer*/
|
||||
hr = pSP->lpvtbl->fnQueryService(pSP, (REFGUID)&SID_SShellBrowser, (REFIID)&IID_IDockingWindowFrame, (LPVOID*)&pFrame);
|
||||
hr = IServiceProvider_QueryService(pSP, (REFGUID)&SID_SShellBrowser, (REFIID)&IID_IDockingWindowFrame, (LPVOID*)&pFrame);
|
||||
if(SUCCEEDED(hr))
|
||||
{ if(bAdd)
|
||||
{ hr = S_OK;
|
||||
|
@ -706,7 +706,7 @@ BOOL32 ShellView_AddRemoveDockingWindow(LPSHELLVIEW this, BOOL32 bAdd)
|
|||
}
|
||||
pFrame->lpvtbl->fnRelease(pFrame);
|
||||
}
|
||||
pSP->lpvtbl->fnRelease(pSP);
|
||||
IServiceProvider_Release(pSP);
|
||||
}
|
||||
return bReturn;
|
||||
}
|
||||
|
@ -725,12 +725,12 @@ BOOL32 ShellView_CanDoIDockingWindow(LPSHELLVIEW this)
|
|||
/*get the browser's IServiceProvider*/
|
||||
hr = IShellBrowser_QueryInterface(this->pShellBrowser, (REFIID)&IID_IServiceProvider, (LPVOID*)&pSP);
|
||||
if(hr==S_OK)
|
||||
{ hr = pSP->lpvtbl->fnQueryService(pSP, (REFGUID)&SID_SShellBrowser, (REFIID)&IID_IDockingWindowFrame, (LPVOID*)&pFrame);
|
||||
{ hr = IServiceProvider_QueryService(pSP, (REFGUID)&SID_SShellBrowser, (REFIID)&IID_IDockingWindowFrame, (LPVOID*)&pFrame);
|
||||
if(SUCCEEDED(hr))
|
||||
{ bReturn = TRUE;
|
||||
pFrame->lpvtbl->fnRelease(pFrame);
|
||||
}
|
||||
pSP->lpvtbl->fnRelease(pSP);
|
||||
IServiceProvider_Release(pSP);
|
||||
}
|
||||
return bReturn;
|
||||
}
|
||||
|
@ -843,6 +843,11 @@ UINT32 ShellView_GetSelections(LPSHELLVIEW this)
|
|||
{ LVITEM32A lvItem;
|
||||
UINT32 i;
|
||||
|
||||
|
||||
if (this->aSelectedItems)
|
||||
{ SHFree(this->aSelectedItems);
|
||||
}
|
||||
|
||||
this->uSelected = ListView_GetSelectedCount(this->hWndList);
|
||||
this->aSelectedItems = (LPITEMIDLIST*)SHAlloc(this->uSelected * sizeof(LPITEMIDLIST));
|
||||
|
||||
|
@ -949,9 +954,6 @@ void ShellView_DoContextMenu(LPSHELLVIEW this, WORD x, WORD y, BOOL32 fDefault)
|
|||
if (pContextMenu)
|
||||
pContextMenu->lpvtbl->fnRelease(pContextMenu);
|
||||
}
|
||||
SHFree(this->aSelectedItems);
|
||||
this->aSelectedItems=NULL;
|
||||
this->uSelected=0;
|
||||
}
|
||||
else /* background context menu */
|
||||
{ hMenu = LoadMenuIndirect32A(&_Resource_Men_MENU_002_0_data);
|
||||
|
@ -1321,17 +1323,20 @@ static ULONG WINAPI IShellView_AddRef(LPSHELLVIEW this)
|
|||
* IShellView_Release
|
||||
*/
|
||||
static ULONG WINAPI IShellView_Release(LPSHELLVIEW this)
|
||||
{ TRACE(shell,"(%p)->()\n",this);
|
||||
if (!--(this->ref))
|
||||
{ TRACE(shell," destroying IShellView(%p)\n",this);
|
||||
{ TRACE(shell,"(%p)->()\n",this);
|
||||
if (!--(this->ref))
|
||||
{ TRACE(shell," destroying IShellView(%p)\n",this);
|
||||
|
||||
if(this->pSFParent)
|
||||
this->pSFParent->lpvtbl->fnRelease(this->pSFParent);
|
||||
if(this->pSFParent)
|
||||
this->pSFParent->lpvtbl->fnRelease(this->pSFParent);
|
||||
|
||||
HeapFree(GetProcessHeap(),0,this);
|
||||
return 0;
|
||||
}
|
||||
return this->ref;
|
||||
if (this->aSelectedItems)
|
||||
SHFree(this->aSelectedItems);
|
||||
|
||||
HeapFree(GetProcessHeap(),0,this);
|
||||
return 0;
|
||||
}
|
||||
return this->ref;
|
||||
}
|
||||
/**************************************************************************
|
||||
* ShellView_GetWindow
|
||||
|
@ -1516,14 +1521,12 @@ static HRESULT WINAPI IShellView_GetItemObject(LPSHELLVIEW this, UINT32 uItem, R
|
|||
|
||||
*ppvOut = NULL;
|
||||
if(IsEqualIID(riid, &IID_IContextMenu))
|
||||
{ pObj =(LPUNKNOWN)IContextMenu_Constructor(this->pSFParent,this->aSelectedItems,this->uSelected);
|
||||
{ ShellView_GetSelections(this);
|
||||
pObj =(LPUNKNOWN)IContextMenu_Constructor(this->pSFParent,this->aSelectedItems,this->uSelected);
|
||||
}
|
||||
else if (IsEqualIID(riid, &IID_IDataObject))
|
||||
{ ShellView_GetSelections(this);
|
||||
pObj =(LPUNKNOWN)IDataObject_Constructor(this->hWndParent, this->pSFParent,this->aSelectedItems,this->uSelected);
|
||||
SHFree(this->aSelectedItems);
|
||||
this->aSelectedItems=NULL;
|
||||
this->uSelected=0;
|
||||
}
|
||||
|
||||
TRACE(shell,"-- (%p)->(interface=%p)\n",this, ppvOut);
|
||||
|
|
|
@ -490,8 +490,14 @@ void ASPI_DOS_HandleInt(CONTEXT *context)
|
|||
{
|
||||
#ifdef linux
|
||||
FARPROC16 *p = (FARPROC16 *)CTX_SEG_OFF_TO_LIN(context, DS_reg(context), EDX_reg(context));
|
||||
if ((CX_reg(context) == 4) || (CX_reg(context) == 5))
|
||||
{
|
||||
*p = DPMI_AllocInternalRMCB(ASPI_DOS_func);
|
||||
TRACE(aspi, "allocated real mode proc %p\n", *p);
|
||||
AX_reg(context) = CX_reg(context);
|
||||
}
|
||||
else
|
||||
SET_CFLAG(context);
|
||||
#else
|
||||
SET_CFLAG(context);
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
How to Report a Bug
|
||||
How To Report A Bug
|
||||
-------------------
|
||||
|
||||
Some simple advice on making your bug report more useful (and thus more
|
||||
|
@ -6,21 +6,23 @@ likely to get answered and fixed):
|
|||
|
||||
1) Post as much information as possible.
|
||||
|
||||
This means we need more information than,
|
||||
"MS Word crashes whenever I run it. Do you know why?" Include at
|
||||
least the following information:
|
||||
This means we need more information than a simple
|
||||
"MS Word crashes whenever I run it. Do you know why?"
|
||||
Include at least the following information:
|
||||
|
||||
- Version of Wine you're using (run 'wine -v')
|
||||
- Operating system you're using, what distribution (if any), and what
|
||||
version.
|
||||
version
|
||||
- Compiler and version (run 'gcc -v')
|
||||
- Windows version, if installed
|
||||
- Program you're trying to run, its version number, and a URL for
|
||||
where the program can be obtained (if available).
|
||||
where the program can be obtained (if available)
|
||||
- Command line you used to start wine
|
||||
- Any other information you think may be relevant or helpful.
|
||||
- Any other information you think may be relevant or helpful, such as
|
||||
X server version in case of X problems, libc version etc.
|
||||
|
||||
2) Re-run the program with the -debugmsg +relay option
|
||||
(i.e., 'wine -debugmsg +relay sol.exe').
|
||||
2) Re-run the program with the -debugmsg +relay,+snoop option
|
||||
(i.e., 'wine -debugmsg +relay,+snoop sol.exe').
|
||||
|
||||
If Wine crashes while running your program, it is important that we
|
||||
have this information to have a chance at figuring out what is causing
|
||||
|
@ -32,7 +34,7 @@ likely to get answered and fixed):
|
|||
|
||||
tcsh and other csh-like shells:
|
||||
|
||||
wine -debugmsg +relay [other_options] program_name |& tee filename.out
|
||||
wine -debugmsg +relay,+snoop [other_options] program_name |& tee filename.out
|
||||
tail -100 filename.out > report_file
|
||||
|
||||
bash and other sh-like shells:
|
||||
|
|
|
@ -169,6 +169,5 @@ values in the 60 - 120 range. 96 is a good starting point.
|
|||
|
||||
The most likely cause is a broken fonts.dir file in one of your font
|
||||
directories. You need to rerun 'mkfontdir' to rebuild this file. Read
|
||||
its manpage for more information.
|
||||
|
||||
|
||||
its manpage for more information. If you can't run mkfontdir on this machine
|
||||
as you are not root, use "xset -fp xxx" to remove the broken font path.
|
||||
|
|
|
@ -94,7 +94,7 @@ Use the named configuration file rather than the default
|
|||
.I -debug
|
||||
Enter the debugger before starting application
|
||||
.TP
|
||||
.I -debugmsg [xxx]#name[,[xxx1]#name1]
|
||||
.I -debugmsg [xxx]#name[,[xxx1]#name1][,<+|->relay=yyy1[:yyy2]]
|
||||
Turn debugging messages on or off.
|
||||
.RS +7
|
||||
.PP
|
||||
|
@ -107,7 +107,10 @@ or
|
|||
If xxx is not specified, all debugging messages for the specified
|
||||
channel are turned on. Each channel will print messages about a particular
|
||||
component of Wine. # is required and can be either + or -. Note that
|
||||
there is not a space after the comma between names.
|
||||
there is not a space after the comma between names. yyy are either the
|
||||
name of a whole DLL or a single API entry by Name you either
|
||||
want to include or exclude from the relay listing. These names must be in
|
||||
the case as names used in the relaylisting. You can do the same for snoop.
|
||||
.PP
|
||||
For instance:
|
||||
.PP
|
||||
|
@ -117,6 +120,13 @@ will turn on DLL warning messages and all heap messages.
|
|||
.I -debugmsg fixme-all,warn+cursor,+relay
|
||||
will turn off all FIXME messages, turn on cursor warning messages, and turn
|
||||
on all relay messages (API calls).
|
||||
.br
|
||||
.I -debugmsg -relay=LeaveCriticalSection:EnterCriticalSection
|
||||
will turn on all relay messages except for LeaveCriticalSection and
|
||||
EnterCriticalSection.
|
||||
.br
|
||||
.I -debugmsg +relay=ADVAPI32
|
||||
will only turn on relay messages into the ADVAPI32 code.
|
||||
.PP
|
||||
The full list of names is: all, accel, advapi, animate, aspi, atom,
|
||||
bitblt, bitmap, caret, cd, cdaudio, class, clipboard, clipping, combo,
|
||||
|
@ -234,6 +244,12 @@ file of this format in your home directory or have the environment variable
|
|||
.B WINE_INI
|
||||
pointing to a configuration file, or use the -config option on the command
|
||||
line.
|
||||
.SH ENVIRONMENT VARIABLES
|
||||
.B wine
|
||||
makes the environment variables of the shell from which
|
||||
.B wine
|
||||
is started accesible to the windows/dos processes started. So use the
|
||||
appropriate syntax for your shell to enter environment variables you need.
|
||||
.SH CONFIGURATION FILE FORMAT
|
||||
All entries are grouped in sections; a section begins with the line
|
||||
.br
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
|
@ -29,7 +30,7 @@
|
|||
#ifdef HAVE_SYS_FILIO_H
|
||||
# include <sys/filio.h>
|
||||
#endif
|
||||
#ifdef __svr4__
|
||||
#ifdef HAVE_SYS_FILE_H
|
||||
# include <sys/file.h>
|
||||
#endif
|
||||
|
||||
|
|
13
files/file.c
13
files/file.c
|
@ -911,9 +911,9 @@ static HFILE32 FILE_DoOpenFile( LPCSTR name, OFSTRUCT *ofs, UINT32 mode,
|
|||
|
||||
if (mode & OF_CREATE)
|
||||
{
|
||||
if ((hFileRet = CreateFile32A( name, access, sharing, NULL,
|
||||
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL,
|
||||
-1 ))== INVALID_HANDLE_VALUE32)
|
||||
if ((hFileRet = CreateFile32A( name, GENERIC_READ | GENERIC_WRITE,
|
||||
sharing, NULL, CREATE_ALWAYS,
|
||||
FILE_ATTRIBUTE_NORMAL, -1 ))== INVALID_HANDLE_VALUE32)
|
||||
goto error;
|
||||
goto success;
|
||||
}
|
||||
|
@ -1452,6 +1452,11 @@ BOOL32 WINAPI DeleteFile32A( LPCSTR path )
|
|||
|
||||
TRACE(file, "'%s'\n", path );
|
||||
|
||||
if (!*path)
|
||||
{
|
||||
ERR(file, "Empty path passed\n");
|
||||
return FALSE;
|
||||
}
|
||||
if (DOSFS_GetDevice( path ))
|
||||
{
|
||||
WARN(file, "cannot remove DOS device '%s'!\n", path);
|
||||
|
@ -1581,7 +1586,7 @@ DWORD WINAPI GetFileType( HFILE32 hFile )
|
|||
struct get_file_info_reply reply;
|
||||
|
||||
if ((req.handle = HANDLE_GetServerHandle( PROCESS_Current(), hFile,
|
||||
K32OBJ_FILE, 0 )) == -1)
|
||||
K32OBJ_UNKNOWN, 0 )) == -1)
|
||||
return FILE_TYPE_UNKNOWN;
|
||||
CLIENT_SendRequest( REQ_GET_FILE_INFO, -1, 1, &req, sizeof(req) );
|
||||
if (CLIENT_WaitSimpleReply( &reply, sizeof(reply), NULL ))
|
||||
|
|
|
@ -121,6 +121,24 @@ void set_render_state(D3DRENDERSTATETYPE dwRenderStateType,
|
|||
} else {
|
||||
/* All others state variables */
|
||||
switch (dwRenderStateType) {
|
||||
|
||||
case D3DRENDERSTATE_TEXTUREHANDLE: {
|
||||
LPDIRECT3DTEXTURE2 tex = (LPDIRECT3DTEXTURE2) dwRenderState;
|
||||
|
||||
if (tex == NULL) {
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
} else {
|
||||
TRACE(ddraw, "setting OpenGL texture handle : %d\n", tex->tex_name);
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||
glBindTexture(GL_TEXTURE_2D, tex->tex_name);
|
||||
}
|
||||
} break;
|
||||
|
||||
|
||||
case D3DRENDERSTATE_ZENABLE: /* 7 */
|
||||
if (dwRenderState)
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
|
|
|
@ -884,11 +884,12 @@ static HRESULT WINAPI IDirect3DDevice2_DrawPrimitive(LPDIRECT3DDEVICE2 this,
|
|||
glColor3f(((col >> 16) & 0xFF) / 255.0,
|
||||
((col >> 8) & 0xFF) / 255.0,
|
||||
((col >> 0) & 0xFF) / 255.0);
|
||||
|
||||
glTexCoord2f(vx->u.tu, vx->v.tv);
|
||||
glVertex3f(vx->x.sx, vx->y.sy, vx->z.sz);
|
||||
TRACE(ddraw, " TLV: %f %f %f (%02lx %02lx %02lx)\n",
|
||||
TRACE(ddraw, " TLV: %f %f %f (%02lx %02lx %02lx) (%f %f)\n",
|
||||
vx->x.sx, vx->y.sy, vx->z.sz,
|
||||
((col >> 16) & 0xFF), ((col >> 8) & 0xFF), ((col >> 0) & 0xFF));
|
||||
((col >> 16) & 0xFF), ((col >> 8) & 0xFF), ((col >> 0) & 0xFF),
|
||||
vx->u.tu, vx->v.tv);
|
||||
} break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -98,9 +98,9 @@ static HRESULT WINAPI IDirect3DTexture_GetHandle(LPDIRECT3DTEXTURE this,
|
|||
{
|
||||
FIXME(ddraw, "(%p)->(%p,%p): stub\n", this, lpD3DDevice, lpHandle);
|
||||
|
||||
*lpHandle = (DWORD) this->surface;
|
||||
*lpHandle = (DWORD) this;
|
||||
|
||||
return DD_OK;
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirect3DTexture_Initialize(LPDIRECT3DTEXTURE this,
|
||||
|
@ -116,7 +116,7 @@ static HRESULT WINAPI IDirect3DTexture_Unload(LPDIRECT3DTEXTURE this)
|
|||
{
|
||||
FIXME(ddraw, "(%p)->(): stub\n", this);
|
||||
|
||||
return DD_OK;
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
/*** IDirect3DTexture2 methods ***/
|
||||
|
@ -124,11 +124,19 @@ static HRESULT WINAPI IDirect3DTexture2_GetHandle(LPDIRECT3DTEXTURE2 this,
|
|||
LPDIRECT3DDEVICE2 lpD3DDevice2,
|
||||
LPD3DTEXTUREHANDLE lpHandle)
|
||||
{
|
||||
FIXME(ddraw, "(%p)->(%p,%p): stub\n", this, lpD3DDevice2, lpHandle);
|
||||
TRACE(ddraw, "(%p)->(%p,%p)\n", this, lpD3DDevice2, lpHandle);
|
||||
|
||||
*lpHandle = (DWORD) this->surface; /* lpD3DDevice2->store_texture(this); */
|
||||
/* For 32 bits OSes, handles = pointers */
|
||||
*lpHandle = (DWORD) this;
|
||||
|
||||
return DD_OK;
|
||||
/* Now, bind a new texture */
|
||||
lpD3DDevice2->set_context(lpD3DDevice2);
|
||||
this->D3Ddevice = (void *) lpD3DDevice2;
|
||||
glGenTextures(1, &(this->tex_name));
|
||||
|
||||
TRACE(ddraw, "OpenGL texture handle is : %d\n", this->tex_name);
|
||||
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
/* Common methods */
|
||||
|
@ -138,17 +146,74 @@ static HRESULT WINAPI IDirect3DTexture2_PaletteChanged(LPDIRECT3DTEXTURE2 this,
|
|||
{
|
||||
FIXME(ddraw, "(%p)->(%8ld,%8ld): stub\n", this, dwStart, dwCount);
|
||||
|
||||
return DD_OK;
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirect3DTexture2_Load(LPDIRECT3DTEXTURE2 this,
|
||||
LPDIRECT3DTEXTURE2 lpD3DTexture2)
|
||||
{
|
||||
FIXME(ddraw, "(%p)->(%p): stub\n", this, lpD3DTexture2);
|
||||
DDSURFACEDESC *src_d, *dst_d;
|
||||
TRACE(ddraw, "(%p)->(%p)\n", this, lpD3DTexture2);
|
||||
|
||||
/* Hack ? */
|
||||
FIXME(ddraw, "Sthis %p / Sload %p\n", this->surface, lpD3DTexture2->surface);
|
||||
TRACE(ddraw, "Copied to surface %p, surface %p\n", this->surface, lpD3DTexture2->surface);
|
||||
this->surface->s.surface_desc.ddsCaps.dwCaps &= ~DDSCAPS_ALLOCONLOAD;
|
||||
|
||||
/* Copy one surface on the other */
|
||||
dst_d = &(this->surface->s.surface_desc);
|
||||
src_d = &(lpD3DTexture2->surface->s.surface_desc);
|
||||
|
||||
if ((src_d->dwWidth != dst_d->dwWidth) || (src_d->dwHeight != dst_d->dwHeight)) {
|
||||
/* Should also check for same pixel format, lPitch, ... */
|
||||
ERR(ddraw, "Error in surface sizes\n");
|
||||
return D3DERR_TEXTURE_LOAD_FAILED;
|
||||
} else {
|
||||
LPDIRECT3DDEVICE2 d3dd = (LPDIRECT3DDEVICE2) this->D3Ddevice;
|
||||
/* I should put a macro for the calculus of bpp */
|
||||
int bpp = (src_d->ddpfPixelFormat.dwFlags & DDPF_PALETTEINDEXED8 ?
|
||||
1 /* 8 bit of palette index */:
|
||||
src_d->ddpfPixelFormat.x.dwRGBBitCount / 8 /* RGB bits for each colors */ );
|
||||
|
||||
/* Not sure if this is usefull ! */
|
||||
memcpy(dst_d->y.lpSurface, src_d->y.lpSurface, src_d->dwWidth * src_d->dwHeight * bpp);
|
||||
|
||||
/* Now, load the texture */
|
||||
d3dd->set_context(d3dd);
|
||||
glBindTexture(GL_TEXTURE_2D, this->tex_name);
|
||||
|
||||
if (src_d->ddpfPixelFormat.dwFlags & DDPF_PALETTEINDEXED8) {
|
||||
LPDIRECTDRAWPALETTE pal = this->surface->s.palette;
|
||||
BYTE table[256][4];
|
||||
int i;
|
||||
|
||||
/* Get the surface's palette */
|
||||
for (i = 0; i < 256; i++) {
|
||||
table[i][0] = pal->palents[i].peRed;
|
||||
table[i][1] = pal->palents[i].peGreen;
|
||||
table[i][2] = pal->palents[i].peBlue;
|
||||
table[i][3] = 0xFF;
|
||||
}
|
||||
|
||||
/* Use Paletted Texture Extension */
|
||||
glColorTableEXT(GL_TEXTURE_2D, /* target */
|
||||
GL_RGBA, /* internal format */
|
||||
256, /* table size */
|
||||
GL_RGBA, /* table format */
|
||||
GL_UNSIGNED_BYTE, /* table type */
|
||||
table); /* the color table */
|
||||
|
||||
glTexImage2D(GL_TEXTURE_2D, /* target */
|
||||
0, /* level */
|
||||
GL_COLOR_INDEX8_EXT, /* internal format */
|
||||
src_d->dwWidth, src_d->dwHeight, /* width, height */
|
||||
0, /* border */
|
||||
GL_COLOR_INDEX, /* texture format */
|
||||
GL_UNSIGNED_BYTE, /* texture type */
|
||||
src_d->y.lpSurface); /* the texture */
|
||||
} else {
|
||||
ERR(ddraw, "Unhandled texture format\n");
|
||||
}
|
||||
}
|
||||
|
||||
return DD_OK;
|
||||
}
|
||||
|
|
106
graphics/ddraw.c
106
graphics/ddraw.c
|
@ -33,7 +33,6 @@
|
|||
#endif
|
||||
|
||||
#include "winerror.h"
|
||||
#include "interfaces.h"
|
||||
#include "gdi.h"
|
||||
#include "heap.h"
|
||||
#include "ldt.h"
|
||||
|
@ -43,7 +42,6 @@
|
|||
#include "ddraw.h"
|
||||
#include "d3d.h"
|
||||
#include "debug.h"
|
||||
#include "compobj.h"
|
||||
#include "spy.h"
|
||||
#include "message.h"
|
||||
#include "x11drv.h"
|
||||
|
@ -426,7 +424,7 @@ static HRESULT WINAPI Xlib_IDirectDrawSurface3_Unlock(
|
|||
#ifdef HAVE_LIBXXSHM
|
||||
if (this->s.ddraw->e.xlib.xshm_active)
|
||||
TSXShmPutImage(display,
|
||||
this->s.ddraw->e.xlib.drawable,
|
||||
this->s.ddraw->d.drawable,
|
||||
DefaultGCOfScreen(screen),
|
||||
this->t.xlib.image,
|
||||
0, 0, 0, 0,
|
||||
|
@ -436,7 +434,7 @@ static HRESULT WINAPI Xlib_IDirectDrawSurface3_Unlock(
|
|||
else
|
||||
#endif
|
||||
TSXPutImage( display,
|
||||
this->s.ddraw->e.xlib.drawable,
|
||||
this->s.ddraw->d.drawable,
|
||||
DefaultGCOfScreen(screen),
|
||||
this->t.xlib.image,
|
||||
0, 0, 0, 0,
|
||||
|
@ -444,7 +442,7 @@ static HRESULT WINAPI Xlib_IDirectDrawSurface3_Unlock(
|
|||
this->t.xlib.image->height);
|
||||
|
||||
if (this->s.palette && this->s.palette->cm)
|
||||
TSXSetWindowColormap(display,this->s.ddraw->e.xlib.drawable,this->s.palette->cm);
|
||||
TSXSetWindowColormap(display,this->s.ddraw->d.drawable,this->s.palette->cm);
|
||||
}
|
||||
|
||||
return DD_OK;
|
||||
|
@ -503,7 +501,7 @@ static HRESULT WINAPI Xlib_IDirectDrawSurface3_Flip(
|
|||
#ifdef HAVE_LIBXXSHM
|
||||
if (this->s.ddraw->e.xlib.xshm_active) {
|
||||
TSXShmPutImage(display,
|
||||
this->s.ddraw->e.xlib.drawable,
|
||||
this->s.ddraw->d.drawable,
|
||||
DefaultGCOfScreen(screen),
|
||||
flipto->t.xlib.image,
|
||||
0, 0, 0, 0,
|
||||
|
@ -513,7 +511,7 @@ static HRESULT WINAPI Xlib_IDirectDrawSurface3_Flip(
|
|||
} else
|
||||
#endif
|
||||
TSXPutImage(display,
|
||||
this->s.ddraw->e.xlib.drawable,
|
||||
this->s.ddraw->d.drawable,
|
||||
DefaultGCOfScreen(screen),
|
||||
flipto->t.xlib.image,
|
||||
0, 0, 0, 0,
|
||||
|
@ -521,7 +519,7 @@ static HRESULT WINAPI Xlib_IDirectDrawSurface3_Flip(
|
|||
flipto->t.xlib.image->height);
|
||||
|
||||
if (flipto->s.palette && flipto->s.palette->cm) {
|
||||
TSXSetWindowColormap(display,this->s.ddraw->e.xlib.drawable,flipto->s.palette->cm);
|
||||
TSXSetWindowColormap(display,this->s.ddraw->d.drawable,flipto->s.palette->cm);
|
||||
}
|
||||
if (flipto!=this) {
|
||||
XImage *tmp;
|
||||
|
@ -547,12 +545,17 @@ static HRESULT WINAPI Xlib_IDirectDrawSurface3_SetPalette(
|
|||
int i;
|
||||
TRACE(ddraw,"(%p)->(%p)\n",this,pal);
|
||||
|
||||
if (pal == NULL) {
|
||||
if( this->s.palette != NULL )
|
||||
this->s.palette->lpvtbl->fnRelease( this->s.palette );
|
||||
this->s.palette = pal;
|
||||
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
if( !(pal->cm) && (this->s.ddraw->d.depth<=8))
|
||||
{
|
||||
pal->cm = TSXCreateColormap(display,this->s.ddraw->e.xlib.drawable,DefaultVisualOfScreen(screen),AllocAll);
|
||||
|
||||
/* FIXME: this is not correct, when using -managed (XSetWindowColormap??) */
|
||||
TSXInstallColormap(display,pal->cm);
|
||||
pal->cm = TSXCreateColormap(display,this->s.ddraw->d.drawable,DefaultVisualOfScreen(screen),AllocAll);
|
||||
|
||||
for (i=0;i<256;i++) {
|
||||
XColor xc;
|
||||
|
@ -587,7 +590,7 @@ static HRESULT WINAPI Xlib_IDirectDrawSurface3_SetPalette(
|
|||
pal->lpvtbl->fnAddRef( pal );
|
||||
}
|
||||
/* Perform the refresh */
|
||||
TSXSetWindowColormap(display,this->s.ddraw->e.xlib.drawable,this->s.palette->cm);
|
||||
TSXSetWindowColormap(display,this->s.ddraw->d.drawable,this->s.palette->cm);
|
||||
}
|
||||
return DD_OK;
|
||||
}
|
||||
|
@ -697,6 +700,7 @@ static HRESULT WINAPI IDirectDrawSurface3_Blt(
|
|||
if (dwFlags) {
|
||||
TRACE(ddraw,"\t(src=NULL):Unsupported flags: ");_dump_DDBLT(dwFlags);fprintf(stderr,"\n");
|
||||
}
|
||||
this->lpvtbl->fnUnlock(this,ddesc.y.lpSurface);
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
|
@ -768,24 +772,33 @@ static HRESULT WINAPI IDirectDrawSurface3_Blt(
|
|||
static HRESULT WINAPI IDirectDrawSurface3_BltFast(
|
||||
LPDIRECTDRAWSURFACE3 this,DWORD dstx,DWORD dsty,LPDIRECTDRAWSURFACE3 src,LPRECT32 rsrc,DWORD trans
|
||||
) {
|
||||
int i,bpp;
|
||||
int i,bpp,w,h;
|
||||
DDSURFACEDESC ddesc,sdesc;
|
||||
|
||||
if (TRACE_ON(ddraw)) {
|
||||
TRACE(ddraw,"(%p)->(%ld,%ld,%p,%p,%08lx)\n",
|
||||
if (1 || TRACE_ON(ddraw)) {
|
||||
FIXME(ddraw,"(%p)->(%ld,%ld,%p,%p,%08lx)\n",
|
||||
this,dstx,dsty,src,rsrc,trans
|
||||
);
|
||||
TRACE(ddraw," trans:");_dump_DDBLTFAST(trans);fprintf(stderr,"\n");
|
||||
TRACE(ddraw," srcrect: %dx%d-%dx%d\n",rsrc->left,rsrc->top,rsrc->right,rsrc->bottom);
|
||||
FIXME(ddraw," trans:");_dump_DDBLTFAST(trans);fprintf(stderr,"\n");
|
||||
FIXME(ddraw," srcrect: %dx%d-%dx%d\n",rsrc->left,rsrc->top,rsrc->right,rsrc->bottom);
|
||||
}
|
||||
/* We need to lock the surfaces, or we won't get refreshes when done. */
|
||||
src ->lpvtbl->fnLock(src, NULL,&sdesc,DDLOCK_READONLY, 0);
|
||||
this->lpvtbl->fnLock(this,NULL,&ddesc,DDLOCK_WRITEONLY,0);
|
||||
bpp = this->s.surface_desc.ddpfPixelFormat.x.dwRGBBitCount / 8;
|
||||
for (i=0;i<rsrc->bottom-rsrc->top;i++) {
|
||||
h=rsrc->bottom-rsrc->top;
|
||||
if (h>ddesc.dwHeight-dsty) h=ddesc.dwHeight-dsty;
|
||||
if (h>sdesc.dwHeight-rsrc->top) h=sdesc.dwHeight-rsrc->top;
|
||||
if (h<0) h=0;
|
||||
w=rsrc->right-rsrc->left;
|
||||
if (w>ddesc.dwWidth-dstx) w=ddesc.dwWidth-dstx;
|
||||
if (w>sdesc.dwWidth-rsrc->left) w=sdesc.dwWidth-rsrc->left;
|
||||
if (w<0) w=0;
|
||||
|
||||
for (i=0;i<h;i++) {
|
||||
memcpy( ddesc.y.lpSurface+(dsty +i)*ddesc.lPitch+dstx*bpp,
|
||||
sdesc.y.lpSurface+(rsrc->top+i)*sdesc.lPitch+rsrc->left*bpp,
|
||||
(rsrc->right-rsrc->left)*bpp
|
||||
w*bpp
|
||||
);
|
||||
}
|
||||
this->lpvtbl->fnUnlock(this,ddesc.y.lpSurface);
|
||||
|
@ -2247,7 +2260,8 @@ static HRESULT WINAPI IDirectDraw2_SetCooperativeLevel(
|
|||
|
||||
/* This will be overwritten in the case of Full Screen mode.
|
||||
Windowed games could work with that :-) */
|
||||
this->e.xlib.drawable = ((X11DRV_WND_DATA *) WIN_FindWndPtr(hwnd)->pDriverData)->window;
|
||||
if (hwnd)
|
||||
this->d.drawable = ((X11DRV_WND_DATA *) WIN_FindWndPtr(hwnd)->pDriverData)->window;
|
||||
|
||||
return DD_OK;
|
||||
}
|
||||
|
@ -2414,10 +2428,10 @@ static HRESULT WINAPI Xlib_IDirectDraw_SetDisplayMode(
|
|||
_common_IDirectDraw_SetDisplayMode(this);
|
||||
|
||||
this->e.xlib.paintable = 1;
|
||||
this->e.xlib.drawable = ((X11DRV_WND_DATA *) WIN_FindWndPtr(this->d.window)->pDriverData)->window;
|
||||
this->d.drawable = ((X11DRV_WND_DATA *) WIN_FindWndPtr(this->d.window)->pDriverData)->window;
|
||||
/* We don't have a context for this window. Host off the desktop */
|
||||
if( !this->e.xlib.drawable )
|
||||
this->e.xlib.drawable = ((X11DRV_WND_DATA *) WIN_GetDesktop()->pDriverData)->window;
|
||||
if( !this->d.drawable )
|
||||
this->d.drawable = ((X11DRV_WND_DATA *) WIN_GetDesktop()->pDriverData)->window;
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
|
@ -2495,7 +2509,7 @@ static HRESULT WINAPI IDirectDraw2_CreateClipper(
|
|||
}
|
||||
|
||||
static HRESULT WINAPI common_IDirectDraw2_CreatePalette(
|
||||
LPDIRECTDRAW2 this,DWORD x,LPPALETTEENTRY palent,LPDIRECTDRAWPALETTE *lpddpal,LPUNKNOWN lpunk
|
||||
LPDIRECTDRAW2 this,DWORD dwFlags,LPPALETTEENTRY palent,LPDIRECTDRAWPALETTE *lpddpal,LPUNKNOWN lpunk
|
||||
) {
|
||||
*lpddpal = (LPDIRECTDRAWPALETTE)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirectDrawPalette));
|
||||
if (*lpddpal == NULL) return E_OUTOFMEMORY;
|
||||
|
@ -2511,8 +2525,20 @@ static HRESULT WINAPI common_IDirectDraw2_CreatePalette(
|
|||
|
||||
if (palent)
|
||||
{
|
||||
/* Initialize the palette based on the passed palent struct */
|
||||
FIXME(ddraw,"needs to handle palent (%p)\n",palent);
|
||||
int size = 0;
|
||||
|
||||
if (dwFlags & DDPCAPS_1BIT)
|
||||
size = 2;
|
||||
else if (dwFlags & DDPCAPS_2BIT)
|
||||
size = 4;
|
||||
else if (dwFlags & DDPCAPS_4BIT)
|
||||
size = 16;
|
||||
else if (dwFlags & DDPCAPS_8BIT)
|
||||
size = 256;
|
||||
else
|
||||
ERR(ddraw, "unhandled palette format\n");
|
||||
|
||||
memcpy((*lpddpal)->palents, palent, size * sizeof(PALETTEENTRY));
|
||||
}
|
||||
return DD_OK;
|
||||
}
|
||||
|
@ -2529,11 +2555,13 @@ static HRESULT WINAPI DGA_IDirectDraw2_CreatePalette(
|
|||
}
|
||||
|
||||
static HRESULT WINAPI Xlib_IDirectDraw2_CreatePalette(
|
||||
LPDIRECTDRAW2 this,DWORD x,LPPALETTEENTRY palent,LPDIRECTDRAWPALETTE *lpddpal,LPUNKNOWN lpunk
|
||||
LPDIRECTDRAW2 this,DWORD dwFlags,LPPALETTEENTRY palent,LPDIRECTDRAWPALETTE *lpddpal,LPUNKNOWN lpunk
|
||||
) {
|
||||
TRACE(ddraw,"(%p)->(%08lx,%p,%p,%p)\n",this,x,palent,lpddpal,lpunk);
|
||||
TRACE(ddraw,"(%p)->(%08lx,%p,%p,%p)\n",this,dwFlags,palent,lpddpal,lpunk);
|
||||
*lpddpal = (LPDIRECTDRAWPALETTE)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirectDrawPalette));
|
||||
|
||||
TRACE(ddraw, "Palette created : %p\n", *lpddpal);
|
||||
|
||||
if (*lpddpal == NULL)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
|
@ -2544,8 +2572,22 @@ static HRESULT WINAPI Xlib_IDirectDraw2_CreatePalette(
|
|||
(*lpddpal)->ddraw = (LPDIRECTDRAW)this;
|
||||
this->lpvtbl->fnAddRef(this);
|
||||
|
||||
if (palent)
|
||||
FIXME(ddraw,"needs to handle palent (%p)\n",palent);
|
||||
if (palent) {
|
||||
int size = 0;
|
||||
|
||||
if (dwFlags & DDPCAPS_1BIT)
|
||||
size = 2;
|
||||
else if (dwFlags & DDPCAPS_2BIT)
|
||||
size = 4;
|
||||
else if (dwFlags & DDPCAPS_4BIT)
|
||||
size = 16;
|
||||
else if (dwFlags & DDPCAPS_8BIT)
|
||||
size = 256;
|
||||
else
|
||||
ERR(ddraw, "unhandled palette format\n");
|
||||
|
||||
memcpy((*lpddpal)->palents, palent, size * sizeof(PALETTEENTRY));
|
||||
}
|
||||
|
||||
return DD_OK;
|
||||
}
|
||||
|
@ -3215,7 +3257,7 @@ HRESULT WINAPI Xlib_DirectDrawCreate( LPDIRECTDRAW *lplpDD, LPUNKNOWN pUnkOuter)
|
|||
*lplpDD = (LPDIRECTDRAW)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirectDraw));
|
||||
(*lplpDD)->lpvtbl = &xlib_ddvt;
|
||||
(*lplpDD)->ref = 1;
|
||||
(*lplpDD)->e.xlib.drawable = 0; /* in SetDisplayMode */
|
||||
(*lplpDD)->d.drawable = 0; /* in SetDisplayMode */
|
||||
|
||||
(*lplpDD)->d.depth = DefaultDepthOfScreen(screen);
|
||||
(*lplpDD)->d.height = screenHeight;
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
#include "winbase.h"
|
||||
#include "miscemu.h"
|
||||
#include "vga.h"
|
||||
#include "compobj.h"
|
||||
#include "interfaces.h"
|
||||
#include "ddraw.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
@ -49,6 +47,7 @@ int VGA_SetMode(unsigned Xres,unsigned Yres,unsigned Depth)
|
|||
}
|
||||
vga_refresh=0;
|
||||
InitializeCriticalSection(&vga_crit);
|
||||
MakeCriticalSectionGlobal(&vga_crit);
|
||||
/* poll every 20ms (50fps should provide adequate responsiveness) */
|
||||
poll_timer = CreateSystemTimer( 20, VGA_Poll );
|
||||
}
|
||||
|
|
|
@ -1806,6 +1806,7 @@ BOOL32 X11DRV_FONT_Init( DeviceCaps* pDevCaps )
|
|||
HeapFree(SystemHeap, 0, buffer);
|
||||
|
||||
InitializeCriticalSection( &crtsc_fonts_X11 );
|
||||
MakeCriticalSectionGlobal( &crtsc_fonts_X11 );
|
||||
|
||||
/* fontList initialization is over, allocate X font cache */
|
||||
|
||||
|
@ -1935,7 +1936,7 @@ static UINT32 XFONT_Match( fontMatch* pfm )
|
|||
d = (h = pfi->df.dfPoints) + plf->lfHeight;
|
||||
else d = h = 0;
|
||||
|
||||
if( d && plf->lfHeight )
|
||||
if( d && h && plf->lfHeight )
|
||||
{
|
||||
UINT16 height = ( plf->lfHeight > 0 ) ? plf->lfHeight
|
||||
: ((-plf->lfHeight * pfi->df.dfPixHeight) / h);
|
||||
|
@ -1959,7 +1960,8 @@ static UINT32 XFONT_Match( fontMatch* pfm )
|
|||
pfm->height = pfi->df.dfPixHeight;
|
||||
penalty += (d > 0)? d * 0x8 : -d * 0x10;
|
||||
}
|
||||
} else pfm->height = pfi->df.dfPixHeight;
|
||||
}
|
||||
else pfm->height = pfi->df.dfPixHeight;
|
||||
|
||||
if((pfm->flags & FO_MATCH_PAF) &&
|
||||
(plf->lfPitchAndFamily & FF_FAMILY) != (pfi->df.dfPitchAndFamily & FF_FAMILY) )
|
||||
|
|
|
@ -18,7 +18,7 @@ type win16
|
|||
15 pascal CoDisconnectObject(ptr long) CoDisconnectObject
|
||||
16 stub CORELEASEMARSHALDATA
|
||||
17 pascal16 COFREEUNUSEDLIBRARIES() CoFreeUnusedLibraries
|
||||
18 pascal16 IsEqualGUID(ptr ptr) IsEqualGUID
|
||||
18 pascal16 IsEqualGUID(ptr ptr) IsEqualGUID16
|
||||
19 pascal StringFromCLSID(ptr ptr) StringFromCLSID16
|
||||
20 pascal CLSIDFromString(str ptr) CLSIDFromString16
|
||||
21 stub ISVALIDPTRIN
|
||||
|
@ -208,12 +208,12 @@ type win16
|
|||
207 stub ADDAPPCOMPATFLAG
|
||||
|
||||
# WINE internal relays (for Win16 interfaces)
|
||||
500 cdecl IMalloc16_QueryInterface(ptr ptr ptr) IMalloc16_QueryInterface
|
||||
501 cdecl IMalloc16_AddRef(ptr) IMalloc16_AddRef
|
||||
502 cdecl IMalloc16_Release(ptr) IMalloc16_Release
|
||||
503 cdecl IMalloc16_Alloc(ptr long) IMalloc16_Alloc
|
||||
504 cdecl IMalloc16_Realloc(ptr segptr long) IMalloc16_Realloc
|
||||
505 cdecl IMalloc16_Free(ptr segptr) IMalloc16_Free
|
||||
506 cdecl IMalloc16_GetSize(ptr segptr) IMalloc16_GetSize
|
||||
507 cdecl IMalloc16_DidAlloc(ptr segptr) IMalloc16_DidAlloc
|
||||
508 cdecl IMalloc16_HeapMinimize(ptr) IMalloc16_HeapMinimize
|
||||
500 cdecl IMalloc16_QueryInterface(ptr ptr ptr) IMalloc16_fnQueryInterface
|
||||
501 cdecl IMalloc16_AddRef(ptr) IMalloc16_fnAddRef
|
||||
502 cdecl IMalloc16_Release(ptr) IMalloc16_fnRelease
|
||||
503 cdecl IMalloc16_Alloc(ptr long) IMalloc16_fnAlloc
|
||||
504 cdecl IMalloc16_Realloc(ptr segptr long) IMalloc16_fnRealloc
|
||||
505 cdecl IMalloc16_Free(ptr segptr) IMalloc16_fnFree
|
||||
506 cdecl IMalloc16_GetSize(ptr segptr) IMalloc16_fnGetSize
|
||||
507 cdecl IMalloc16_DidAlloc(ptr segptr) IMalloc16_fnDidAlloc
|
||||
508 cdecl IMalloc16_HeapMinimize(ptr) IMalloc16_fnHeapMinimize
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "task.h"
|
||||
#include "debugstr.h"
|
||||
#include "debug.h"
|
||||
#include "main.h"
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -22,7 +23,6 @@
|
|||
BOOL32 RELAY_Init(void)
|
||||
{
|
||||
WORD codesel;
|
||||
extern BOOL32 THUNK_Init(void);
|
||||
|
||||
/* Allocate the code selector for CallTo16 routines */
|
||||
|
||||
|
@ -74,8 +74,6 @@ void RELAY_DebugCallFrom16( int func_type, char *args,
|
|||
char *args16;
|
||||
const char *funstr;
|
||||
int i;
|
||||
/* from relay32/relay386.c */
|
||||
extern int RELAY_ShowDebugmsgRelay(const char *);
|
||||
|
||||
if (!TRACE_ON(relay)) return;
|
||||
|
||||
|
@ -196,8 +194,6 @@ void RELAY_DebugCallFrom16Ret( int func_type, int ret_val, CONTEXT *context)
|
|||
STACK16FRAME *frame;
|
||||
WORD ordinal;
|
||||
const char *funstr;
|
||||
/* from relay32/relay386.c */
|
||||
extern int RELAY_ShowDebugmsgRelay(const char *);
|
||||
|
||||
if (!TRACE_ON(relay)) return;
|
||||
frame = CURRENT_STACK16;
|
||||
|
|
|
@ -63,6 +63,9 @@
|
|||
/* Define if we can use curses (if no ncurses) for full-screen access */
|
||||
#undef HAVE_LIBCURSES
|
||||
|
||||
/* Define if ncurses have the new resizeterm function */
|
||||
#undef HAVE_RESIZETERM
|
||||
|
||||
/* Define if we can a compatible xterm program */
|
||||
#undef XTERM_PROGRAM
|
||||
|
||||
|
|
|
@ -93,6 +93,7 @@ BOOL32 WINAPI InitCommonControlsEx (LPINITCOMMONCONTROLSEX);
|
|||
|
||||
#define I_IMAGECALLBACK (-1)
|
||||
#define I_INDENTCALLBACK (-1)
|
||||
#define I_CHILDRENCALLBACK (-1)
|
||||
|
||||
|
||||
/* owner drawn types */
|
||||
|
@ -117,6 +118,66 @@ typedef struct tagNMTOOLTIPSCREATED
|
|||
#define SNDMSG WINELIB_NAME_AW(SendMessage)
|
||||
|
||||
|
||||
|
||||
/* Custom Draw messages */
|
||||
|
||||
#define CDRF_DODEFAULT 0x0
|
||||
#define CDRF_NEWFONT 0x00000002
|
||||
#define CDRF_SKIPDEFAULT 0x00000004
|
||||
#define CDRF_NOTIFYPOSTPAINT 0x00000010
|
||||
#define CDRF_NOTIFYITEMDRAW 0x00000020
|
||||
#define CDRF_NOTIFYSUBITEMDRAW 0x00000020
|
||||
#define CDRF_NOTIFYPOSTERASE 0x00000040
|
||||
/* #define CDRF_NOTIFYITEMERASE 0x00000080 obsolete ? */
|
||||
|
||||
|
||||
/* drawstage flags */
|
||||
|
||||
#define CDDS_PREPAINT 1
|
||||
#define CDDS_POSTPAINT 2
|
||||
#define CDDS_PREERASE 3
|
||||
#define CDDS_POSTERASE 4
|
||||
|
||||
#define CDDS_ITEM 0x00010000
|
||||
#define CDDS_ITEMPREPAINT (CDDS_ITEM | CDDS_PREPAINT)
|
||||
#define CDDS_ITEMPOSTPAINT (CDDS_ITEM | CDDS_POSTPAINT)
|
||||
#define CDDS_ITEMPREERASE (CDDS_ITEM | CDDS_PREERASE)
|
||||
#define CDDS_ITEMPOSTERASE (CDDS_ITEM | CDDS_POSTERASE)
|
||||
#define CDDS_SUBITEM 0x00020000
|
||||
|
||||
/* itemState flags */
|
||||
|
||||
#define CDIS_SELECTED 0x0001
|
||||
#define CDIS_GRAYED 0x0002
|
||||
#define CDIS_DISABLED 0x0004
|
||||
#define CDIS_CHECKED 0x0008
|
||||
#define CDIS_FOCUS 0x0010
|
||||
#define CDIS_DEFAULT 0x0020
|
||||
#define CDIS_HOT 0x0040
|
||||
#define CDIS_MARKED 0x0080
|
||||
#define CDIS_INDETERMINATE 0x0100
|
||||
|
||||
|
||||
typedef struct tagNMCUSTOMDRAWINFO
|
||||
{
|
||||
NMHDR hdr;
|
||||
DWORD dwDrawStage;
|
||||
HDC32 hdc;
|
||||
RECT32 rc;
|
||||
DWORD dwItemSpec;
|
||||
UINT32 uItemState;
|
||||
LPARAM lItemlParam;
|
||||
} NMCUSTOMDRAW, *LPNMCUSTOMDRAW;
|
||||
|
||||
typedef struct tagNMTTCUSTOMDRAW
|
||||
{
|
||||
NMCUSTOMDRAW nmcd;
|
||||
UINT32 uDrawFlags;
|
||||
} NMTTCUSTOMDRAW, *LPNMTTCUSTOMDRAW;
|
||||
|
||||
|
||||
|
||||
|
||||
/* StatusWindow */
|
||||
|
||||
#define STATUSCLASSNAME16 "msctls_statusbar"
|
||||
|
@ -395,6 +456,28 @@ BOOL32 WINAPI ImageList_Write(HIMAGELIST, LPSTREAM32);
|
|||
#define ImageList_RemoveAll(himl) ImageList_Remove(himl,-1)
|
||||
|
||||
|
||||
/* Flat Scrollbar control */
|
||||
|
||||
#define FLATSB_CLASS16 "flatsb_class"
|
||||
#define FLATSB_CLASS32A "flatsb_class32"
|
||||
#define FLATSB_CLASS32W L"flatsb_class32"
|
||||
#define FLATSB_CLASS WINELIB_NAME_AW(FLATSB_CLASS)
|
||||
|
||||
BOOL32 WINAPI FlatSB_EnableScrollBar(HWND32, INT32, UINT32);
|
||||
BOOL32 WINAPI FlatSB_ShowScrollBar(HWND32, INT32, BOOL32);
|
||||
BOOL32 WINAPI FlatSB_GetScrollRange(HWND32, INT32, LPINT32, LPINT32);
|
||||
BOOL32 WINAPI FlatSB_GetScrollInfo(HWND32, INT32, LPSCROLLINFO);
|
||||
INT32 WINAPI FlatSB_GetScrollPos(HWND32, INT32);
|
||||
BOOL32 WINAPI FlatSB_GetScrollProp(HWND32, INT32, LPINT32);
|
||||
INT32 WINAPI FlatSB_SetScrollPos(HWND32, INT32, INT32, BOOL32);
|
||||
INT32 WINAPI FlatSB_SetScrollInfo(HWND32, INT32, LPSCROLLINFO, BOOL32);
|
||||
INT32 WINAPI FlatSB_SetScrollRange(HWND32, INT32, INT32, INT32, BOOL32);
|
||||
BOOL32 WINAPI FlatSB_SetScrollProp(HWND32, UINT32, INT32, BOOL32);
|
||||
BOOL32 WINAPI InitializeFlatSB(HWND32);
|
||||
HRESULT WINAPI UninitializeFlatSB(HWND32);
|
||||
|
||||
|
||||
|
||||
/* Header control */
|
||||
|
||||
#define WC_HEADER16 "SysHeader"
|
||||
|
@ -2307,9 +2390,15 @@ typedef INT32 (CALLBACK *PFNLVCOMPARE)(LPARAM, LPARAM, LPARAM);
|
|||
#define TCM_GETIMAGELIST (TCM_FIRST + 2)
|
||||
#define TCM_SETIMAGELIST (TCM_FIRST + 3)
|
||||
#define TCM_GETITEMCOUNT (TCM_FIRST + 4)
|
||||
#define TCM_GETITEM (TCM_FIRST + 5)
|
||||
#define TCM_SETITEM (TCM_FIRST + 6)
|
||||
#define TCM_INSERTITEM (TCM_FIRST + 7)
|
||||
#define TCM_GETITEM WINELIB_NAME_AW(TCM_GETITEM)
|
||||
#define TCM_GETITEM32A (TCM_FIRST + 5)
|
||||
#define TCM_GETITEM32W (TCM_FIRST + 60)
|
||||
#define TCM_SETITEM32A (TCM_FIRST + 6)
|
||||
#define TCM_SETITEM32W (TCM_FIRST + 61)
|
||||
#define TCM_SETITEM WINELIB_NAME_AW(TCM_SETITEM)
|
||||
#define TCM_INSERTITEM32A (TCM_FIRST + 7)
|
||||
#define TCM_INSERTITEM32W (TCM_FIRST + 62)
|
||||
#define TCM_INSERTITEM WINELIB_NAME_AW(TCM_INSERTITEM)
|
||||
#define TCM_DELETEITEM (TCM_FIRST + 8)
|
||||
#define TCM_DELETEALLITEMS (TCM_FIRST + 9)
|
||||
#define TCM_GETITEMRECT (TCM_FIRST + 10)
|
||||
|
@ -2328,27 +2417,51 @@ typedef INT32 (CALLBACK *PFNLVCOMPARE)(LPARAM, LPARAM, LPARAM);
|
|||
#define TCM_SETCURFOCUS (TCM_FIRST + 48)
|
||||
#define TCM_SETMINTTABWIDTH (TCM_FIRST + 49)
|
||||
#define TCM_DESELECTALL (TCM_FIRST + 50)
|
||||
#define TCM_HIGHLIGHTITEM (TCM_FIRST + 51)
|
||||
#define TCM_SETEXTENDEDSTYLE (TCM_FIRST + 52)
|
||||
#define TCM_GETEXTENDEDSTYLE (TCM_FIRST + 53)
|
||||
#define TCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
|
||||
#define TCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
|
||||
|
||||
|
||||
#define TCIF_TEXT 0x0001
|
||||
#define TCIF_IMAGE 0x0002
|
||||
#define TCIF_RTLREADING 0x0004
|
||||
#define TCIF_PARAM 0x0008
|
||||
#define TCIF_STATE 0x0010
|
||||
|
||||
typedef struct tagTCITEM {
|
||||
|
||||
typedef struct tagTCITEM32A {
|
||||
UINT32 mask;
|
||||
UINT32 lpReserved1;
|
||||
UINT32 lpReserved2;
|
||||
UINT32 dwState;
|
||||
UINT32 dwStateMask;
|
||||
LPSTR pszText;
|
||||
int cchTextMax;
|
||||
int iImage;
|
||||
LPARAM lParam;
|
||||
} TCITEM, *LPTCITEM;
|
||||
} TCITEM32A, *LPTCITEM32A;
|
||||
|
||||
typedef struct tagTCITEM32W
|
||||
{
|
||||
UINT32 mask;
|
||||
DWORD dwState;
|
||||
DWORD dwStateMask;
|
||||
LPWSTR pszText;
|
||||
INT32 cchTextMax;
|
||||
INT32 iImage;
|
||||
LPARAM lParam;
|
||||
} TCITEM32W, *LPTCITEM32W;
|
||||
|
||||
#define TCITEM WINELIB_NAME_AW(TCITEM)
|
||||
#define LPTCITEM WINELIB_NAME_AW(LPTCITEM)
|
||||
|
||||
|
||||
#define TCN_FIRST (0U-550U)
|
||||
#define TCN_LAST (0U-580U)
|
||||
#define TCN_KEYDOWN (TCN_FIRST - 0)
|
||||
#define TCN_SELCHANGE (TCN_FIRST - 1)
|
||||
#define TCN_SELCHANGING (TCN_FIRST - 2)
|
||||
#define TCN_GETOBJECT (TCN_FIRST - 3)
|
||||
|
||||
|
||||
/* ComboBoxEx control */
|
||||
|
@ -2522,6 +2635,36 @@ typedef struct tagNMIPADDRESS
|
|||
#define DATETIMEPICK_CLASS32W L"SysDateTimePick32"
|
||||
#define DATETIMEPICK_CLASS WINELIB_NAME_AW(DATETIMEPICK_CLASS)
|
||||
|
||||
#define DTM_FIRST 0x1000
|
||||
|
||||
#define DTM_GETSYSTEMTIME (DTM_FIRST+1)
|
||||
#define DTM_SETSYSTEMTIME (DTM_FIRST+2)
|
||||
#define DTM_GETRANGE (DTM_FIRST+3)
|
||||
#define DTM_SETRANGE (DTM_FIRST+4)
|
||||
#define DTM_SETFORMAT32A (DTM_FIRST+5)
|
||||
#define DTM_SETFORMAT32W (DTM_FIRST + 50)
|
||||
#define DTM_SETFORMAT WINELIB_NAME_AW(DTM_SETFORMAT)
|
||||
#define DTM_SETMCCOLOR (DTM_FIRST+6)
|
||||
#define DTM_GETMCCOLOR (DTM_FIRST+7)
|
||||
|
||||
#define DTM_GETMONTHCAL (DTM_FIRST+8)
|
||||
|
||||
#define DTM_SETMCFONT (DTM_FIRST+9)
|
||||
#define DTM_GETMCFONT (DTM_FIRST+10)
|
||||
|
||||
|
||||
|
||||
|
||||
#define GDT_ERROR -1
|
||||
#define GDT_VALID 0
|
||||
#define GDT_NONE 1
|
||||
|
||||
#define GDTR_MIN 0x0001
|
||||
#define GDTR_MAX 0x0002
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* UNDOCUMENTED functions
|
||||
|
@ -2624,6 +2767,13 @@ LRESULT WINAPI COMCTL32_SendNotifyEx (HWND32, HWND32, UINT32, LPNMHDR, DWORD);
|
|||
/*
|
||||
* Property sheet support (callback procs)
|
||||
*/
|
||||
|
||||
|
||||
#define WC_PROPSHEET32A "SysPager"
|
||||
#define WC_PROPSHEET32W L"SysPager"
|
||||
#define WC_PROPSHEET WINELIB_NAME_AW(WC_PROPSHEET)
|
||||
|
||||
|
||||
struct _PROPSHEETPAGE32A; /** need to forward declare those structs **/
|
||||
struct _PROPSHEETPAGE32W;
|
||||
struct _PSP;
|
||||
|
|
|
@ -1,43 +1,8 @@
|
|||
#ifndef COMPOBJ_H
|
||||
#define COMPOBJ_H
|
||||
#ifndef __WINE_COMPOBJ_H
|
||||
#define __WINE_COMPOBJ_H
|
||||
|
||||
#include "ole.h"
|
||||
/* "compobj.h" is obsolete, you should include "objbase.h" instead */
|
||||
|
||||
struct tagGUID
|
||||
{
|
||||
DWORD Data1;
|
||||
WORD Data2;
|
||||
WORD Data3;
|
||||
BYTE Data4[8];
|
||||
};
|
||||
#include "objbase.h"
|
||||
|
||||
typedef struct tagGUID GUID,*LPGUID,*REFGUID;
|
||||
typedef struct tagGUID CLSID,*LPCLSID,*REFCLSID;
|
||||
typedef struct tagGUID IID,*REFIID,*LPIID;
|
||||
|
||||
OLESTATUS WINAPI StringFromCLSID16(const CLSID *id, LPOLESTR16*);
|
||||
OLESTATUS WINAPI StringFromCLSID32(const CLSID *id, LPOLESTR32*);
|
||||
#define StringFromCLSID WINELIB_NAME(StringFromCLSID)
|
||||
OLESTATUS WINAPI CLSIDFromString16(LPCOLESTR16, CLSID *);
|
||||
OLESTATUS WINAPI CLSIDFromString32(LPCOLESTR32, CLSID *);
|
||||
#define CLSIDFromString WINELIB_NAME(CLSIDFromString)
|
||||
|
||||
OLESTATUS WINAPI WINE_StringFromCLSID(const CLSID *id, LPSTR);
|
||||
|
||||
INT32 WINAPI StringFromGUID2(REFGUID id, LPOLESTR32 str, INT32 cmax);
|
||||
|
||||
|
||||
#ifdef INITGUID
|
||||
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
|
||||
const GUID name =\
|
||||
{ l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
|
||||
#else
|
||||
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
|
||||
extern const GUID name
|
||||
#endif
|
||||
|
||||
#define DEFINE_OLEGUID(name, l, w1, w2) \
|
||||
DEFINE_GUID(name, l, w1, w2, 0xC0,0,0,0,0,0,0,0x46)
|
||||
|
||||
#define DEFINE_SHLGUID(name, l, w1, w2) DEFINE_OLEGUID(name,l,w1,w2)
|
||||
#endif
|
||||
#endif /* __WINE_COMPOBJ_H */
|
||||
|
|
|
@ -69,6 +69,9 @@
|
|||
/* Define if the struct statfs is defined by <sys/mount.h> */
|
||||
#undef STATFS_DEFINED_BY_SYS_MOUNT
|
||||
|
||||
/* Define if ncurses have the new resizeterm function */
|
||||
#undef HAVE_RESIZETERM
|
||||
|
||||
/* Define if IPX should use netipx/ipx.h from libc */
|
||||
#undef HAVE_IPX_GNU
|
||||
|
||||
|
@ -153,6 +156,9 @@
|
|||
/* Define if you have the <sys/cdio.h> header file. */
|
||||
#undef HAVE_SYS_CDIO_H
|
||||
|
||||
/* Define if you have the <sys/file.h> header file. */
|
||||
#undef HAVE_SYS_FILE_H
|
||||
|
||||
/* Define if you have the <sys/filio.h> header file. */
|
||||
#undef HAVE_SYS_FILIO_H
|
||||
|
||||
|
|
|
@ -40,6 +40,65 @@ typedef struct IDirect3DMaterial2 IDirect3DMaterial, *LPDIRECT3DMATERIAL, ID
|
|||
typedef struct IDirect3DTexture2 IDirect3DTexture, *LPDIRECT3DTEXTURE, IDirect3DTexture2, *LPDIRECT3DTEXTURE2;
|
||||
typedef struct IDirect3DExecuteBuffer IDirect3DExecuteBuffer, *LPDIRECT3DEXECUTEBUFFER;
|
||||
|
||||
/* ********************************************************************
|
||||
Error Codes
|
||||
******************************************************************** */
|
||||
#define D3D_OK DD_OK
|
||||
#define D3DERR_BADMAJORVERSION MAKE_DDHRESULT(700)
|
||||
#define D3DERR_BADMINORVERSION MAKE_DDHRESULT(701)
|
||||
#define D3DERR_INVALID_DEVICE MAKE_DDHRESULT(705)
|
||||
#define D3DERR_INITFAILED MAKE_DDHRESULT(706)
|
||||
#define D3DERR_DEVICEAGGREGATED MAKE_DDHRESULT(707)
|
||||
#define D3DERR_EXECUTE_CREATE_FAILED MAKE_DDHRESULT(710)
|
||||
#define D3DERR_EXECUTE_DESTROY_FAILED MAKE_DDHRESULT(711)
|
||||
#define D3DERR_EXECUTE_LOCK_FAILED MAKE_DDHRESULT(712)
|
||||
#define D3DERR_EXECUTE_UNLOCK_FAILED MAKE_DDHRESULT(713)
|
||||
#define D3DERR_EXECUTE_LOCKED MAKE_DDHRESULT(714)
|
||||
#define D3DERR_EXECUTE_NOT_LOCKED MAKE_DDHRESULT(715)
|
||||
#define D3DERR_EXECUTE_FAILED MAKE_DDHRESULT(716)
|
||||
#define D3DERR_EXECUTE_CLIPPED_FAILED MAKE_DDHRESULT(717)
|
||||
#define D3DERR_TEXTURE_NO_SUPPORT MAKE_DDHRESULT(720)
|
||||
#define D3DERR_TEXTURE_CREATE_FAILED MAKE_DDHRESULT(721)
|
||||
#define D3DERR_TEXTURE_DESTROY_FAILED MAKE_DDHRESULT(722)
|
||||
#define D3DERR_TEXTURE_LOCK_FAILED MAKE_DDHRESULT(723)
|
||||
#define D3DERR_TEXTURE_UNLOCK_FAILED MAKE_DDHRESULT(724)
|
||||
#define D3DERR_TEXTURE_LOAD_FAILED MAKE_DDHRESULT(725)
|
||||
#define D3DERR_TEXTURE_SWAP_FAILED MAKE_DDHRESULT(726)
|
||||
#define D3DERR_TEXTURE_LOCKED MAKE_DDHRESULT(727)
|
||||
#define D3DERR_TEXTURE_NOT_LOCKED MAKE_DDHRESULT(728)
|
||||
#define D3DERR_TEXTURE_GETSURF_FAILED MAKE_DDHRESULT(729)
|
||||
#define D3DERR_MATRIX_CREATE_FAILED MAKE_DDHRESULT(730)
|
||||
#define D3DERR_MATRIX_DESTROY_FAILED MAKE_DDHRESULT(731)
|
||||
#define D3DERR_MATRIX_SETDATA_FAILED MAKE_DDHRESULT(732)
|
||||
#define D3DERR_MATRIX_GETDATA_FAILED MAKE_DDHRESULT(733)
|
||||
#define D3DERR_SETVIEWPORTDATA_FAILED MAKE_DDHRESULT(734)
|
||||
#define D3DERR_INVALIDCURRENTVIEWPORT MAKE_DDHRESULT(735)
|
||||
#define D3DERR_INVALIDPRIMITIVETYPE MAKE_DDHRESULT(736)
|
||||
#define D3DERR_INVALIDVERTEXTYPE MAKE_DDHRESULT(737)
|
||||
#define D3DERR_TEXTURE_BADSIZE MAKE_DDHRESULT(738)
|
||||
#define D3DERR_INVALIDRAMPTEXTURE MAKE_DDHRESULT(739)
|
||||
#define D3DERR_MATERIAL_CREATE_FAILED MAKE_DDHRESULT(740)
|
||||
#define D3DERR_MATERIAL_DESTROY_FAILED MAKE_DDHRESULT(741)
|
||||
#define D3DERR_MATERIAL_SETDATA_FAILED MAKE_DDHRESULT(742)
|
||||
#define D3DERR_MATERIAL_GETDATA_FAILED MAKE_DDHRESULT(743)
|
||||
#define D3DERR_INVALIDPALETTE MAKE_DDHRESULT(744)
|
||||
#define D3DERR_ZBUFF_NEEDS_SYSTEMMEMORY MAKE_DDHRESULT(745)
|
||||
#define D3DERR_ZBUFF_NEEDS_VIDEOMEMORY MAKE_DDHRESULT(746)
|
||||
#define D3DERR_SURFACENOTINVIDMEM MAKE_DDHRESULT(747)
|
||||
#define D3DERR_LIGHT_SET_FAILED MAKE_DDHRESULT(750)
|
||||
#define D3DERR_LIGHTHASVIEWPORT MAKE_DDHRESULT(751)
|
||||
#define D3DERR_LIGHTNOTINTHISVIEWPORT MAKE_DDHRESULT(752)
|
||||
#define D3DERR_SCENE_IN_SCENE MAKE_DDHRESULT(760)
|
||||
#define D3DERR_SCENE_NOT_IN_SCENE MAKE_DDHRESULT(761)
|
||||
#define D3DERR_SCENE_BEGIN_FAILED MAKE_DDHRESULT(762)
|
||||
#define D3DERR_SCENE_END_FAILED MAKE_DDHRESULT(763)
|
||||
#define D3DERR_INBEGIN MAKE_DDHRESULT(770)
|
||||
#define D3DERR_NOTINBEGIN MAKE_DDHRESULT(771)
|
||||
#define D3DERR_NOVIEWPORTS MAKE_DDHRESULT(772)
|
||||
#define D3DERR_VIEWPORTDATANOTSET MAKE_DDHRESULT(773)
|
||||
#define D3DERR_VIEWPORTHASNODEVICE MAKE_DDHRESULT(774)
|
||||
#define D3DERR_NOCURRENTVIEWPORT MAKE_DDHRESULT(775)
|
||||
|
||||
/* ********************************************************************
|
||||
Enums
|
||||
******************************************************************** */
|
||||
|
@ -1202,7 +1261,12 @@ typedef struct IDirect3DTexture2_VTable {
|
|||
struct IDirect3DTexture2 {
|
||||
LPDIRECT3DTEXTURE2_VTABLE lpvtbl;
|
||||
DWORD ref;
|
||||
|
||||
|
||||
void *D3Ddevice; /* I put (void *) to use the same pointer for both
|
||||
Direct3D and Direct3D2 */
|
||||
#ifdef HAVE_MESAGL
|
||||
GLuint tex_name;
|
||||
#endif
|
||||
LPDIRECTDRAWSURFACE3 surface;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef __WINE_DDRAW_H
|
||||
#define __WINE_DDRAW_H
|
||||
|
||||
#include "wine/obj_base.h"
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifndef X_DISPLAY_MISSING
|
||||
|
@ -14,7 +16,6 @@
|
|||
#define DIRECTDRAW_VERSION 0x0500
|
||||
#endif /* DIRECTDRAW_VERSION */
|
||||
|
||||
|
||||
DEFINE_GUID( CLSID_DirectDraw, 0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35 );
|
||||
DEFINE_GUID( CLSID_DirectDrawClipper, 0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56 );
|
||||
DEFINE_GUID( IID_IDirectDraw, 0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
|
||||
|
@ -900,6 +901,7 @@ struct _common_directdrawdata {
|
|||
We need it also in DGA mode to make some games (for example Monkey Island III work) */
|
||||
ATOM winclass;
|
||||
HWND32 window;
|
||||
Window drawable;
|
||||
PAINTSTRUCT32 ps;
|
||||
};
|
||||
|
||||
|
@ -910,7 +912,6 @@ struct _dga_directdrawdata {
|
|||
};
|
||||
|
||||
struct _xlib_directdrawdata {
|
||||
Window drawable;
|
||||
int paintable;
|
||||
|
||||
#ifdef HAVE_LIBXXSHM
|
||||
|
|
103
include/debug.h
103
include/debug.h
|
@ -101,57 +101,58 @@
|
|||
#define dbch_profile 93
|
||||
#define dbch_progress 94
|
||||
#define dbch_prop 95
|
||||
#define dbch_psapi 96
|
||||
#define dbch_psdrv 97
|
||||
#define dbch_ras 98
|
||||
#define dbch_rebar 99
|
||||
#define dbch_reg 100
|
||||
#define dbch_region 101
|
||||
#define dbch_relay 102
|
||||
#define dbch_resource 103
|
||||
#define dbch_scroll 104
|
||||
#define dbch_security 105
|
||||
#define dbch_segment 106
|
||||
#define dbch_selector 107
|
||||
#define dbch_sem 108
|
||||
#define dbch_sendmsg 109
|
||||
#define dbch_server 110
|
||||
#define dbch_shell 111
|
||||
#define dbch_shm 112
|
||||
#define dbch_snoop 113
|
||||
#define dbch_sound 114
|
||||
#define dbch_static 115
|
||||
#define dbch_statusbar 116
|
||||
#define dbch_stress 117
|
||||
#define dbch_string 118
|
||||
#define dbch_syscolor 119
|
||||
#define dbch_system 120
|
||||
#define dbch_tab 121
|
||||
#define dbch_task 122
|
||||
#define dbch_text 123
|
||||
#define dbch_thread 124
|
||||
#define dbch_thunk 125
|
||||
#define dbch_timer 126
|
||||
#define dbch_toolbar 127
|
||||
#define dbch_toolhelp 128
|
||||
#define dbch_tooltips 129
|
||||
#define dbch_trackbar 130
|
||||
#define dbch_treeview 131
|
||||
#define dbch_tweak 132
|
||||
#define dbch_uitools 133
|
||||
#define dbch_updown 134
|
||||
#define dbch_ver 135
|
||||
#define dbch_virtual 136
|
||||
#define dbch_vxd 137
|
||||
#define dbch_wave 138
|
||||
#define dbch_win 139
|
||||
#define dbch_win16drv 140
|
||||
#define dbch_win32 141
|
||||
#define dbch_wing 142
|
||||
#define dbch_winsock 143
|
||||
#define dbch_wnet 144
|
||||
#define dbch_x11 145
|
||||
#define dbch_x11drv 146
|
||||
#define dbch_propsheet 96
|
||||
#define dbch_psapi 97
|
||||
#define dbch_psdrv 98
|
||||
#define dbch_ras 99
|
||||
#define dbch_rebar 100
|
||||
#define dbch_reg 101
|
||||
#define dbch_region 102
|
||||
#define dbch_relay 103
|
||||
#define dbch_resource 104
|
||||
#define dbch_scroll 105
|
||||
#define dbch_security 106
|
||||
#define dbch_segment 107
|
||||
#define dbch_selector 108
|
||||
#define dbch_sem 109
|
||||
#define dbch_sendmsg 110
|
||||
#define dbch_server 111
|
||||
#define dbch_shell 112
|
||||
#define dbch_shm 113
|
||||
#define dbch_snoop 114
|
||||
#define dbch_sound 115
|
||||
#define dbch_static 116
|
||||
#define dbch_statusbar 117
|
||||
#define dbch_stress 118
|
||||
#define dbch_string 119
|
||||
#define dbch_syscolor 120
|
||||
#define dbch_system 121
|
||||
#define dbch_tab 122
|
||||
#define dbch_task 123
|
||||
#define dbch_text 124
|
||||
#define dbch_thread 125
|
||||
#define dbch_thunk 126
|
||||
#define dbch_timer 127
|
||||
#define dbch_toolbar 128
|
||||
#define dbch_toolhelp 129
|
||||
#define dbch_tooltips 130
|
||||
#define dbch_trackbar 131
|
||||
#define dbch_treeview 132
|
||||
#define dbch_tweak 133
|
||||
#define dbch_uitools 134
|
||||
#define dbch_updown 135
|
||||
#define dbch_ver 136
|
||||
#define dbch_virtual 137
|
||||
#define dbch_vxd 138
|
||||
#define dbch_wave 139
|
||||
#define dbch_win 140
|
||||
#define dbch_win16drv 141
|
||||
#define dbch_win32 142
|
||||
#define dbch_wing 143
|
||||
#define dbch_winsock 144
|
||||
#define dbch_wnet 145
|
||||
#define dbch_x11 146
|
||||
#define dbch_x11drv 147
|
||||
/* Definitions for classes identifiers */
|
||||
#define dbcl_fixme 0
|
||||
#define dbcl_err 1
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "debugtools.h"
|
||||
#endif
|
||||
|
||||
#define DEBUG_CHANNEL_COUNT 147
|
||||
#define DEBUG_CHANNEL_COUNT 148
|
||||
#ifdef DEBUG_RUNTIME
|
||||
short debug_msg_enabled[][DEBUG_CLASS_COUNT] = {
|
||||
{1, 1, 0, 0},
|
||||
|
@ -154,6 +154,7 @@ short debug_msg_enabled[][DEBUG_CLASS_COUNT] = {
|
|||
{1, 1, 0, 0},
|
||||
{1, 1, 0, 0},
|
||||
{1, 1, 0, 0},
|
||||
{1, 1, 0, 0},
|
||||
};
|
||||
const char* debug_ch_name[] = {
|
||||
"accel",
|
||||
|
@ -252,6 +253,7 @@ const char* debug_ch_name[] = {
|
|||
"profile",
|
||||
"progress",
|
||||
"prop",
|
||||
"propsheet",
|
||||
"psapi",
|
||||
"psdrv",
|
||||
"ras",
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef _WINE_DINPUT_H
|
||||
#define _WINE_DINPUT_H
|
||||
|
||||
#include "unknwn.h"
|
||||
|
||||
#define STDMETHOD(xfn) HRESULT (CALLBACK *fn##xfn)
|
||||
#define STDMETHOD_(ret,xfn) ret (CALLBACK *fn##xfn)
|
||||
#define PURE
|
||||
|
|
|
@ -51,5 +51,7 @@ extern void MZ_Tick( WORD handle );
|
|||
extern HINSTANCE16 MZ_CreateProcess( LPCSTR name, LPCSTR cmdline, LPCSTR env, BOOL32 inherit,
|
||||
LPSTARTUPINFO32A startup, LPPROCESS_INFORMATION info );
|
||||
extern int DOSVM_Enter( PCONTEXT context );
|
||||
extern void DOSVM_SetTimer( unsigned ticks );
|
||||
extern unsigned DOSVM_GetTimer( void );
|
||||
|
||||
#endif /* __WINE_DOSEXE_H */
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#ifndef __WINE_DPLAY_H
|
||||
#define __WINE_DPLAY_H
|
||||
|
||||
#include "unknwn.h"
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
/* Return Values for Direct Play */
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include "windows.h"
|
||||
#include "winbase.h"
|
||||
#include "compobj.h"
|
||||
#include "mmsystem.h"
|
||||
#include "d3d.h" /*FIXME: Need to break out d3dtypes.h */
|
||||
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* Date and time picker class extra info
|
||||
*
|
||||
* Copyright 1998 Eric Kohl
|
||||
*/
|
||||
|
||||
#ifndef __WINE_FLATSB_H
|
||||
#define __WINE_FLATSB_H
|
||||
|
||||
typedef struct tagFLATSB_INFO
|
||||
{
|
||||
DWORD dwDummy; /* just to keep the compiler happy ;-) */
|
||||
|
||||
} FLATSB_INFO, *LPFLATSB_INFO;
|
||||
|
||||
|
||||
extern VOID FLATSB_Register (VOID);
|
||||
extern VOID FLATSB_Unregister (VOID);
|
||||
|
||||
#endif /* __WINE_FLATSB_H */
|
|
@ -48,7 +48,6 @@ DEFINE_GUID(IID_ISupportErrorInfo, 0xDF0B3D60,0x547D,0x101B,0x8E,0x65,
|
|||
#include "objbase.h"
|
||||
|
||||
#define THIS LPCLASSFACTORY this
|
||||
typedef struct IClassFactory *LPCLASSFACTORY,IClassFactory;
|
||||
typedef struct {
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid,LPVOID FAR* ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
|
@ -57,14 +56,9 @@ typedef struct {
|
|||
STDMETHOD(LockServer) (THIS_ BOOL32) PURE;
|
||||
} *LPCLASSFACTORY_VTABLE,IClassFactory_VTable;
|
||||
|
||||
struct IClassFactory {
|
||||
LPCLASSFACTORY_VTABLE lpvtbl;
|
||||
DWORD ref;
|
||||
};
|
||||
#undef THIS
|
||||
|
||||
#define THIS LPMALLOC32 this
|
||||
typedef struct IMalloc32 *LPMALLOC32,IMalloc32;
|
||||
typedef struct {
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid,LPVOID FAR* ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
|
@ -78,14 +72,9 @@ typedef struct {
|
|||
STDMETHOD_(LPVOID,HeapMinimize) ( THIS );
|
||||
} *LPMALLOC32_VTABLE,IMalloc32_VTable;
|
||||
|
||||
struct IMalloc32 {
|
||||
LPMALLOC32_VTABLE lpvtbl;
|
||||
DWORD ref;
|
||||
};
|
||||
#undef THIS
|
||||
|
||||
#define THIS LPMALLOC16 this
|
||||
typedef struct IMalloc16 *LPMALLOC16,IMalloc16;
|
||||
typedef struct {
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid,LPVOID FAR* ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
|
@ -99,14 +88,6 @@ typedef struct {
|
|||
STDMETHOD_(LPVOID,HeapMinimize) ( THIS );
|
||||
} *LPMALLOC16_VTABLE,IMalloc16_VTable;
|
||||
|
||||
struct IMalloc16 {
|
||||
LPMALLOC16_VTABLE lpvtbl;
|
||||
DWORD ref;
|
||||
/* Gmm, I think one is not enough, we should probably manage a list of
|
||||
* heaps
|
||||
*/
|
||||
HGLOBAL16 heap;
|
||||
};
|
||||
#undef THIS
|
||||
|
||||
/* private prototypes for the constructors */
|
||||
|
|
|
@ -12,6 +12,9 @@ extern HINSTANCE32 MAIN_WinelibInit( int *argc, char *argv[] );
|
|||
extern int MAIN_GetLanguageID(char*lang, char*country, char*charset, char*dialect);
|
||||
|
||||
extern BOOL32 RELAY_Init(void);
|
||||
extern int RELAY_ShowDebugmsgRelay(const char *func);
|
||||
extern void* CALL32_Init(void);
|
||||
|
||||
extern BOOL32 THUNK_Init(void);
|
||||
|
||||
#endif /* __WINE_MAIN_H */
|
||||
|
|
|
@ -11,7 +11,10 @@
|
|||
#include "winnt.h"
|
||||
#include "ldt.h"
|
||||
|
||||
/* msdos/dosmem.c */
|
||||
/* msdos/dosconf.c */
|
||||
extern int DOSCONF_ReadConfig(void);
|
||||
|
||||
/* msdos/dosmem.c */
|
||||
extern HANDLE16 DOSMEM_BiosSeg;
|
||||
extern DWORD DOSMEM_CollateTable;
|
||||
|
||||
|
|
|
@ -196,4 +196,25 @@ void WINAPI DOS3Call( CONTEXT *context );
|
|||
void do_mscdex( CONTEXT *context );
|
||||
void do_mscdex_dd (CONTEXT * context, int dorealmode);
|
||||
|
||||
#define DOSCONF_MEM_HIGH 0x0001
|
||||
#define DOSCONF_MEM_UMB 0x0002
|
||||
#define DOSCONF_NUMLOCK 0x0004
|
||||
#define DOSCONF_KEYB_CONV 0x0008
|
||||
|
||||
typedef struct {
|
||||
char lastdrive;
|
||||
int brk_flag;
|
||||
int files;
|
||||
int stacks_nr;
|
||||
int stacks_sz;
|
||||
int buf;
|
||||
int buf2;
|
||||
int fcbs;
|
||||
int flags;
|
||||
char *shell;
|
||||
char *country;
|
||||
} DOSCONF;
|
||||
|
||||
extern DOSCONF DOSCONF_config;
|
||||
|
||||
#endif /* __WINE_MSDOS_H */
|
||||
|
|
|
@ -58,8 +58,8 @@ extern UINT16 MCI_FirstDevID(void);
|
|||
extern UINT16 MCI_NextDevID(UINT16 wDevID);
|
||||
extern BOOL32 MCI_DevIDValid(UINT16 wDevID);
|
||||
|
||||
extern int MCI_MapMsg16To32A(WORD uDevType, WORD wMsg, DWORD* lParam);
|
||||
extern int MCI_UnMapMsg16To32A(WORD uDevTyp, WORD wMsg, DWORD lParam);
|
||||
extern int MCI_MapMsg16To32A(WORD uDevType, WORD wMsg, DWORD* lParam);
|
||||
extern int MCI_UnMapMsg16To32A(WORD uDevTyp, WORD wMsg, DWORD lParam);
|
||||
|
||||
typedef LONG (*MCIPROC16)(DWORD, HDRVR16, WORD, DWORD, DWORD);
|
||||
typedef LONG (*MCIPROC32)(DWORD, HDRVR16, DWORD, DWORD, DWORD);
|
||||
|
@ -69,7 +69,9 @@ extern WORD MCI_GetDevType(LPCSTR str);
|
|||
extern DWORD MCI_WriteString(LPSTR lpDstStr, DWORD dstSize, LPCSTR lpSrcStr);
|
||||
extern const char* MCI_CommandToString(UINT16 wMsg);
|
||||
|
||||
extern DWORD MCI_SendCommandAsync32(UINT32 wDevID, UINT32 wMsg, DWORD dwParam1, DWORD dwParam2);
|
||||
|
||||
extern DWORD MCI_SendCommand32(UINT32 wDevID, UINT16 wMsg, DWORD dwParam1, DWORD dwParam2);
|
||||
extern DWORD MCI_SendCommandAsync32(UINT32 wDevID, UINT32 wMsg, DWORD dwParam1, DWORD dwParam2);
|
||||
|
||||
LONG MCIWAVE_DriverProc32(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
|
||||
DWORD dwParam1, DWORD dwParam2);
|
||||
|
|
|
@ -2,467 +2,115 @@
|
|||
#define __WINE_OBJBASE_H
|
||||
|
||||
|
||||
/*
|
||||
* The goal of the following set of definitions is to provide a way to use the same
|
||||
* header file definitions to provide both a C interface and a C++ object oriented
|
||||
* interface to COM interfaces. The type of interface is selected automatically
|
||||
* depending on the language but it is always possible to get the C interface in C++
|
||||
* by defining CINTERFACE.
|
||||
*
|
||||
* It is based on the following assumptions:
|
||||
* - all COM interfaces derive from IUnknown, this should not be a problem.
|
||||
* - the header file only defines the interface, the actual fields are defined
|
||||
* separately in the C file implementing the interface.
|
||||
* - no COM method returns void. This seems to be the case but otherwise we could support this
|
||||
* case by having one more set of macros.
|
||||
*
|
||||
* The natural approach to this problem would be to make sure we get a C++ class and
|
||||
* virtual methods in C++ and a structure with a table of pointer to functions in C.
|
||||
* Unfortunately the layout of the virtual table is compiler specific, the layout of
|
||||
* g++ virtual tables is not the same as that of an egcs virtual table which is not the
|
||||
* same as that generated by Visual C+. There are workarounds to make the virtual tables
|
||||
* compatible via padding but unfortunately the one which is imposed to the WINE emulator
|
||||
* by the Windows binaries, i.e. the Visual C++ one, is the most compact of all.
|
||||
*
|
||||
* So the solution I finally adopted does not use virtual tables. Instead I use inline
|
||||
* non virtual methods that dereference the method pointer themselves and perform the call.
|
||||
*
|
||||
* Let's take Direct3D as an example:
|
||||
*
|
||||
* #define ICOM_INTERFACE IDirect3D
|
||||
* ICOM_BEGIN(IDirect3D,IUnknown)
|
||||
* ICOM_METHOD1(HRESULT,Initialize, REFIID,);
|
||||
* ICOM_METHOD2(HRESULT,EnumDevices, LPD3DENUMDEVICESCALLBACK,, LPVOID,);
|
||||
* ICOM_METHOD2(HRESULT,CreateLight, LPDIRECT3DLIGHT*,, IUnknown*,);
|
||||
* ICOM_METHOD2(HRESULT,CreateMaterial,LPDIRECT3DMATERIAL*,, IUnknown*,);
|
||||
* ICOM_METHOD2(HRESULT,CreateViewport,LPDIRECT3DVIEWPORT*,, IUnknown*,);
|
||||
* ICOM_METHOD2(HRESULT,FindDevice, LPD3DFINDDEVICESEARCH,, LPD3DFINDDEVICERESULT,);
|
||||
* ICOM_END(IDirect3D)
|
||||
* #undef ICOM_INTERFACE
|
||||
*
|
||||
* #if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
* // *** IUnknown methods *** //
|
||||
* #define IDirect3D_QueryInterface(p,a,b) ICOM_ICALL2(IUnknown,QueryInterface,p,a,b)
|
||||
* #define IDirect3D_AddRef(p) ICOM_ICALL (IUnknown,AddRef,p)
|
||||
* #define IDirect3D_Release(p) ICOM_ICALL (IUnknown,Release,p)
|
||||
* // *** IDirect3D methods *** //
|
||||
* #define IDirect3D_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
|
||||
* #define IDirect3D_EnumDevices(p,a,b) ICOM_CALL2(EnumDevice,p,a,b)
|
||||
* #define IDirect3D_CreateLight(p,a,b) ICOM_CALL2(CreateLight,p,a,b)
|
||||
* #define IDirect3D_CreateMaterial(p,a,b) ICOM_CALL2(CreateMaterial,p,a,b)
|
||||
* #define IDirect3D_CreateViewport(p,a,b) ICOM_CALL2(CreateViewport,p,a,b)
|
||||
* #define IDirect3D_FindDevice(p,a,b) ICOM_CALL2(FindDevice,p,a,b)
|
||||
* #endif
|
||||
*
|
||||
* Comments:
|
||||
* - The ICOM_INTERFACE is used in the ICOM_METHOD macros for the 'this' pointer and to cast
|
||||
* pointers. Defining this macro here saves us the trouble of having to repeat the interface
|
||||
* name everywhere. Note haowever that because of the way macros work a macro like ICOM_METHOD1
|
||||
* cannot use 'ICOM_INTERFACE##_VTABLE' because this would give 'ICOM_INTERFACE_VTABLE' and not
|
||||
* 'IDirect3D_VTABLE'.
|
||||
* - ICOM_BEGIN and ICOM_END are responsible for generating whatever structure is appropriate for
|
||||
* representing the interface in the current language. In C this is a couple of structs in C++
|
||||
* it's a class. The first parameter is the interface name and the second one is the interface
|
||||
* we inherit from. The reason why you have to repeat the interface name is because that's the
|
||||
* only way these macro can successfully output "IDirect3D_VTABLE'. Trying to use ICOM_INTERFACE
|
||||
* would, as in ICOM_METHOD, only yield 'ICOM_INTERFACE_VTABLE'.
|
||||
* - With the way ICOM_BEGIN works you don't have to repeat the definitions of the methods of the
|
||||
* parent interface. They are automatically inherited both in C and in C++.
|
||||
* - In C++ the ICOM_METHOD macros generate a function prototype and a call to a function pointer
|
||||
* method. This means using once 't1 p1, t2 p2, ...' and once 'p1, p2' without the types. The
|
||||
* only way I found to handle this is to have one ICOM_METHOD macro per number of parameters and
|
||||
* to have it take only the type information (with const if necessary) as parameters.
|
||||
* The 'undef ICOM_INTERFACE' is here to remind you that using ICOM_INTERFACE in the following
|
||||
* macros will not work. This time it's because the ICOM_CALL macro expansion is done only once
|
||||
* the 'IDirect3D_Xxx' macro is expanded. And by that time ICOM_INTERFACE will be long gone
|
||||
* anyway.
|
||||
* - You may have noticed the double commas after each parameter type. This allows you to put the
|
||||
* name of that parameter which I think is good for documentation. It is not required and since
|
||||
* I did not know what to put there for this example (I could only find doc about IDirect3D2),
|
||||
* I left them blank.
|
||||
* - Finally the set of 'IDirect3D_Xxx' macros is a standard set of macros defined to ease access
|
||||
* to the interface methods in C. Unfortunately I don't see any way to avoid having to duplicate
|
||||
* the inherited method definitions there. We must use ICOM_ICALL to invoke inherited methods,
|
||||
* because in C we have to cast the virtual table pointer, and we should use the ICOM_CALL
|
||||
* method in the other cases. This time I could have used a trick to use only one macro whatever
|
||||
* the number of parameters but I prefered to have it work the same way as above.
|
||||
* - You probably have noticed that we don't define the fields we need to actually implement this
|
||||
* interface: reference count, pointer to other resources and miscellaneous fields. That's
|
||||
* because it's not needed, and the user will anyway only manipulate pointers to this structure
|
||||
* so he does not need to know its real size. Of course on the implementation side we have the
|
||||
* real definition of the interface structure and they should match what the macros yield in
|
||||
* each language (or conversely).
|
||||
*
|
||||
*
|
||||
* In C this gives:
|
||||
* typedef struct IDirect3D_VTABLE IDirect3D_VTABLE;
|
||||
* struct IDirect3D {
|
||||
* IDirect3D_VTABLE* lpvtbl;
|
||||
* };
|
||||
* struct IDirect3D_VTABLE {
|
||||
* IUnknown_VTABLE bvt;
|
||||
* HRESULT (*fnInitialize)(IDirect3D* me, REFIID a);
|
||||
* HRESULT (*fnEnumDevices)(IDirect3D* me, LPD3DENUMDEVICESCALLBACK a, LPVOID b);
|
||||
* HRESULT (*fnCreateLight)(IDirect3D* me, LPDIRECT3DLIGHT* a, IUnknown* b);
|
||||
* HRESULT (*fnCreateMaterial)(IDirect3D* me, LPDIRECT3DMATERIAL* a, IUnknown* b);
|
||||
* HRESULT (*fnCreateViewport)(IDirect3D* me, LPDIRECT3DVIEWPORT* a, IUnknown* b);
|
||||
* HRESULT (*fnFindDevice)(IDirect3D* me, LPD3DFINDDEVICESEARCH a, LPD3DFINDDEVICERESULT b);
|
||||
* };
|
||||
*
|
||||
* #if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
* // *** IUnknown methods *** //
|
||||
* #define IDirect3D_QueryInterface(p,a,b) ((IUnknown_VTABLE*)(p)->lpvtbl)->fnQueryInterface((IUnknown*)p,a,b)
|
||||
* #define IDirect3D_AddRef(p) ((IUnknown_VTABLE*)(p)->lpvtbl)->fnAddRef((IUnknown*)p)
|
||||
* #define IDirect3D_Release(p) ((IUnknown_VTABLE*)(p)->lpvtbl)->fnRelease((IUnknown*)p)
|
||||
* // *** IDirect3D methods *** //
|
||||
* #define IDirect3D_Initialize(p,a) (p)->lpvtbl->fnInitialize(p,a)
|
||||
* #define IDirect3D_EnumDevices(p,a,b) (p)->lpvtbl->fnEnumDevice(p,a,b)
|
||||
* #define IDirect3D_CreateLight(p,a,b) (p)->lpvtbl->fnCreateLight(p,a,b)
|
||||
* #define IDirect3D_CreateMaterial(p,a,b) (p)->lpvtbl->fnCreateMaterial(p,a,b)
|
||||
* #define IDirect3D_CreateViewport(p,a,b) (p)->lpvtbl->fnCreateViewport(p,a,b)
|
||||
* #define IDirect3D_FindDevice(p,a,b) (p)->lpvtbl->fnFindDevice(p,a,b)
|
||||
* #endif
|
||||
*
|
||||
* Comments:
|
||||
* - IDirect3D only contains a pointer to the IDirect3D virtual/jump table. This is the only thing
|
||||
* the user needs to know to use the interface. Of course the structure we will define to
|
||||
* implement this interface will have more fields but the first one will match this pointer.
|
||||
* - The code generated by ICOM_BEGIN goes up to the bvt field in the IDirect3D virtual table.
|
||||
* This bvt field is what saves us from having to duplicate the inherited method definitions.
|
||||
* It's a shame that C (gcc) will not allow unnamed structs. If this was possible we could
|
||||
* seamlessly inherit and use the parent's interface function pointers.
|
||||
* - What follows is just a bunch of function pointer definitions generated by the ICOM_METHOD
|
||||
* macros. The implementation will fill this jump table with appropriate values in a static
|
||||
* variable and initialize the lpvtbl field to point to this variable.
|
||||
* - The IDirect3D_Xxx macros then just derefence the lpvtbl pointer and use the function pointer
|
||||
* corresponding to the macro name. This emulates the behavior of a virtual table and should be
|
||||
* about as fast. In the case of inherited methods we have some additional casting to do to
|
||||
* because the inherited methods are defined in the bvt field or maybe further imbricated. Since
|
||||
* the effect of the bvt field is that we inherit the parent virtual table fields this cast is
|
||||
* relatively inocuous. A similar cast must be performed on the interface pointer before the
|
||||
* invoked method will accept it. Despite all these casts there is little chance that you call a
|
||||
* method on the wrong type of interface because the function names still have to match. But this
|
||||
* is the only thing that will make the compilation fail.
|
||||
*
|
||||
*
|
||||
* And in C++ (with gcc's g++):
|
||||
*
|
||||
* typedef struct IDirect3D: public IUnknown {
|
||||
* private: HRESULT (*fnInitialize)(IDirect3D* me, REFIID a);
|
||||
* public: inline HRESULT Initialize(REFIID a) { return ((IDirect3D*)t.lpvtbl)->fnInitialize(this,a); };
|
||||
* private: HRESULT (*fnEnumDevices)(IDirect3D* me, LPD3DENUMDEVICESCALLBACK a, LPVOID b);
|
||||
* public: inline HRESULT EnumDevices(LPD3DENUMDEVICESCALLBACK a, LPVOID b)
|
||||
* { return ((IDirect3D*)t.lpvtbl)->fnEnumDevices(this,a,b); };
|
||||
* private: HRESULT (*fnCreateLight)(IDirect3D* me, LPDIRECT3DLIGHT* a, IUnknown* b);
|
||||
* public: inline HRESULT CreateLight(LPDIRECT3DLIGHT* a, IUnknown* b)
|
||||
* { return ((IDirect3D*)t.lpvtbl)->fnCreateLight(this,a,b); };
|
||||
* private: HRESULT (*fnCreateMaterial)(IDirect3D* me, LPDIRECT3DMATERIAL* a, IUnknown* b);
|
||||
* public: inline HRESULT CreateMaterial(LPDIRECT3DMATERIAL* a, IUnknown* b)
|
||||
* { return ((IDirect3D*)t.lpvtbl)->fnCreateMaterial(this,a,b); };
|
||||
* private: HRESULT (*fnCreateViewport)(IDirect3D* me, LPDIRECT3DVIEWPORT* a, IUnknown* b);
|
||||
* public: inline HRESULT CreateViewport(LPDIRECT3DVIEWPORT* a, IUnknown* b)
|
||||
* { return ((IDirect3D*)t.lpvtbl)->fnCreateViewport(this,a,b); };
|
||||
* private: HRESULT (*fnFindDevice)(IDirect3D* me, LPD3DFINDDEVICESEARCH a, LPD3DFINDDEVICERESULT b);
|
||||
* public: inline HRESULT FindDevice(LPD3DFINDDEVICESEARCH a, LPD3DFINDDEVICERESULT b)
|
||||
* { return ((IDirect3D*)t.lpvtbl)->fnFindDevice(this,a,b); };
|
||||
* };
|
||||
*
|
||||
* Comments:
|
||||
* - In C++ IDirect3D does double duty as both the virtual/jump table and as the interface
|
||||
* definition. The reason for this is to avoid having to duplicate the mehod definitions: once
|
||||
* to have the function pointers in the jump table and once to have the methods in the interface
|
||||
* class. Here one macro can generate both. This means though that the first pointer, t.lpvtbl
|
||||
* defined in IUnknown, must be interpreted as the jump table pointer if we interpret the
|
||||
* structure as the the interface class, and as the function pointer to the QueryInterface
|
||||
* method, t.fnQueryInterface, if we interpret the structure as the jump table. Fortunately this
|
||||
* gymnastic is entirely taken care of in the header of IUnknown.
|
||||
* - Of course in C++ we use inheritance so that we don't have to duplicate the method definitions.
|
||||
* - Since IDirect3D does double duty, each ICOM_METHOD macro defines both a function pointer and
|
||||
* a non-vritual inline method which dereferences it and calls it. This way this method behaves
|
||||
* just like a virtual method but does not create a true C++ virtual table which would break the
|
||||
* structure layout. If you look at the implementation of these methods you'll notice that they
|
||||
* would not work for void functions. We have to return something and fortunately this seems to
|
||||
* be what all the COM methods do (otherwise we would need another set of macros).
|
||||
* - Note how the ICOM_METHOD generates both function prototypes mixing types and formal parameter
|
||||
* names and the method invocation using only the formal parameter name. This is the reason why
|
||||
* we need different macros to handle different numbers of parameters.
|
||||
* - Finally there is no IDirect3D_Xxx macro. These are not needed in C++ unless the CINTERFACE
|
||||
* macro is defined in which case we would not be here.
|
||||
*
|
||||
*
|
||||
* Implementing a COM interface.
|
||||
*
|
||||
* This continues the above example.I assume the implementation is in C but it would probably
|
||||
* be similar in C++.
|
||||
*
|
||||
* typedef struct _IDirect3D {
|
||||
* void* lpvtbl;
|
||||
* // ...
|
||||
*
|
||||
* } _IDirect3D;
|
||||
*
|
||||
* static ICOM_VTABLE(IDirect3D) d3dvt;
|
||||
*
|
||||
* // implement the IDirect3D methods here
|
||||
*
|
||||
* int IDirect3D_fnQueryInterface(LPUNKNOWN me)
|
||||
* {
|
||||
* ICOM_THIS(IDirect3D,me);
|
||||
* // ...
|
||||
* }
|
||||
*
|
||||
* // ...
|
||||
*
|
||||
* static ICOM_VTABLE(IDirect3D) d3dvt = {
|
||||
* {
|
||||
* IDirect3D_fnQueryInterface,
|
||||
* IUnknown_fnAdd,
|
||||
* IUnknown_fnAdd2
|
||||
* },
|
||||
* IDirect3D_fnInitialize,
|
||||
* IDirect3D_fnSetWidth
|
||||
* };
|
||||
*
|
||||
* Comments:
|
||||
* - We first define what the interface really contains. This is th e_IDirect3D structure. The
|
||||
* first field must of course be the virtual table pointer. Everything else is free.
|
||||
* - Then we predeclare our static virtual table variable, we will need its address in some
|
||||
* methods to initialize the virtual table pointer of the returned interface objects.
|
||||
* - Then we implement the interface methods. To match what has been declared in the header file
|
||||
* they must take a pointer to a IDirect3D structure so we must cast it to an _IDirect3D so that
|
||||
* we can manipulate the fields. This is performed by the ICOM_THIS macro.
|
||||
* - Finally we initialize the virtual table. The inherited methods must be in curly brackets to
|
||||
* match the parent interface's virtual table definition.
|
||||
#include "wine/obj_base.h"
|
||||
|
||||
/* the following depend only on obj_base.h */
|
||||
#include "wine/obj_misc.h"
|
||||
#include "wine/obj_channel.h"
|
||||
#include "wine/obj_clientserver.h"
|
||||
#include "wine/obj_marshal.h"
|
||||
#include "wine/obj_storage.h"
|
||||
|
||||
/* the following depend on obj_storage.h */
|
||||
#include "wine/obj_moniker.h"
|
||||
#include "wine/obj_propertystorage.h"
|
||||
|
||||
/* the following depend on obj_moniker.h */
|
||||
#include "wine/obj_dataobject.h"
|
||||
|
||||
/* FIXME: the following should be moved to one of the wine/obj_XXX.h headers */
|
||||
|
||||
/*****************************************************************************
|
||||
* CoXXX API
|
||||
*/
|
||||
/* FIXME: more CoXXX functions are missing */
|
||||
DWORD WINAPI CoBuildVersion(void);
|
||||
|
||||
typedef enum tagCOINIT
|
||||
{
|
||||
COINIT_APARTMENTTHREADED = 0x2, /* Apartment model */
|
||||
COINIT_MULTITHREADED = 0x0, /* OLE calls objects on any thread */
|
||||
COINIT_DISABLE_OLE1DDE = 0x4, /* Don't use DDE for Ole1 support */
|
||||
COINIT_SPEED_OVER_MEMORY = 0x8 /* Trade memory for speed */
|
||||
} COINIT;
|
||||
|
||||
HRESULT WINAPI CoInitialize16(LPVOID lpReserved);
|
||||
HRESULT WINAPI CoInitialize32(LPVOID lpReserved);
|
||||
#define CoInitialize WINELIB_NAME(CoInitialize)
|
||||
|
||||
HRESULT WINAPI CoInitializeEx32(LPVOID lpReserved, DWORD dwCoInit);
|
||||
#define CoInitializeEx WINELIB_NAME(CoInitializeEx)
|
||||
|
||||
void WINAPI CoUninitialize(void);
|
||||
|
||||
|
||||
HRESULT WINAPI CoCreateGuid(GUID *pguid);
|
||||
|
||||
/* class registration flags; passed to CoRegisterClassObject */
|
||||
typedef enum tagREGCLS
|
||||
{
|
||||
REGCLS_SINGLEUSE = 0,
|
||||
REGCLS_MULTIPLEUSE = 1,
|
||||
REGCLS_MULTI_SEPARATE = 2,
|
||||
REGCLS_SUSPENDED = 4
|
||||
} REGCLS;
|
||||
|
||||
HRESULT WINAPI CoRegisterClassObject16(REFCLSID rclsid, LPUNKNOWN pUnk, DWORD dwClsContext, DWORD flags, LPDWORD lpdwRegister);
|
||||
HRESULT WINAPI CoRegisterClassObject32(REFCLSID rclsid,LPUNKNOWN pUnk,DWORD dwClsContext,DWORD flags,LPDWORD lpdwRegister);
|
||||
#define CoRegisterClassObject WINELIB_NAME(CoRegisterClassObject)
|
||||
|
||||
HRESULT WINAPI CoRevokeClassObject(DWORD dwRegister);
|
||||
HRESULT WINAPI CoGetClassObject(REFCLSID rclsid, DWORD dwClsContext,LPVOID pvReserved, const REFIID iid, LPVOID *ppv);
|
||||
|
||||
|
||||
HRESULT WINAPI CoCreateInstance(REFCLSID rclsid,LPUNKNOWN pUnkOuter,DWORD dwClsContext,REFIID iid,LPVOID *ppv);
|
||||
void WINAPI CoFreeLibrary(HINSTANCE32 hLibrary);
|
||||
void WINAPI CoFreeAllLibraries(void);
|
||||
void WINAPI CoFreeUnusedLibraries(void);
|
||||
HRESULT WINAPI CoFileTimeNow(FILETIME *lpFileTime);
|
||||
LPVOID WINAPI CoTaskMemAlloc(ULONG size);
|
||||
void WINAPI CoTaskMemFree(LPVOID ptr);
|
||||
HINSTANCE32 WINAPI CoLoadLibrary(LPOLESTR16 lpszLibName, BOOL32 bAutoFree);
|
||||
|
||||
HRESULT WINAPI CoLockObjectExternal16(LPUNKNOWN pUnk,BOOL16 fLock,BOOL16 fLastUnlockReleases);
|
||||
HRESULT WINAPI CoLockObjectExternal32(LPUNKNOWN pUnk,BOOL32 fLock,BOOL32 fLastUnlockReleases);
|
||||
#define CoLockObjectExternal WINELIB_NAME(CoLockObjectExternal)
|
||||
|
||||
|
||||
/* internal Wine stuff */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IClassFactory interface
|
||||
*/
|
||||
|
||||
typedef struct _IClassFactory {
|
||||
/* IUnknown fields */
|
||||
ICOM_VTABLE(IClassFactory)* lpvtbl;
|
||||
DWORD ref;
|
||||
} _IClassFactory;
|
||||
|
||||
#define ICOM_VTABLE(iface) iface##_VTABLE
|
||||
HRESULT WINE_StringFromCLSID(const CLSID *id, LPSTR);
|
||||
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
/* C++ interface */
|
||||
|
||||
#define ICOM_BEGIN(iface,ibase) \
|
||||
typedef struct iface: public ibase {
|
||||
|
||||
#define ICOM_METHOD(ret,xfn) \
|
||||
private: ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me); \
|
||||
public: inline ret (CALLBACK xfn)(void) { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this); };
|
||||
|
||||
#define ICOM_METHOD1(ret,xfn,ta,na) \
|
||||
private: ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a); \
|
||||
public: inline ret (CALLBACK xfn)(ta a) { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a); };
|
||||
|
||||
#define ICOM_METHOD2(ret,xfn,ta,na,tb,nb) \
|
||||
private: ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b); \
|
||||
public: inline ret (CALLBACK xfn)(ta a,tb b) { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b); };
|
||||
|
||||
#define ICOM_METHOD3(ret,xfn,ta,na,tb,nb,tc,nc) \
|
||||
private: ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c); \
|
||||
public: inline ret (CALLBACK xfn)(ta a,tb b,tc c) { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c); };
|
||||
|
||||
#define ICOM_METHOD4(ret,xfn,ta,na,tb,nb,tc,nc,td,nd) \
|
||||
private: ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d); \
|
||||
public: inline ret (CALLBACK xfn)(ta a,tb b,tc c,td d) { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d); };
|
||||
|
||||
#define ICOM_METHOD5(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne) \
|
||||
private: ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e); \
|
||||
public: inline ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e) { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e); };
|
||||
|
||||
#define ICOM_METHOD6(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf) \
|
||||
private: ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f); \
|
||||
public: inline ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f) { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e,f); };
|
||||
|
||||
#define ICOM_METHOD7(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng) \
|
||||
private: ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f,tg g); \
|
||||
public: inline ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g) { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e,f,g); };
|
||||
|
||||
|
||||
#define ICOM_CMETHOD(ret,xfn) \
|
||||
private: ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me); \
|
||||
public: inline ret (CALLBACK xfn)(void) const { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this); };
|
||||
|
||||
#define ICOM_CMETHOD1(ret,xfn,ta,na) \
|
||||
private: ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a); \
|
||||
public: inline ret (CALLBACK xfn)(ta a) const { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a); };
|
||||
|
||||
#define ICOM_CMETHOD2(ret,xfn,ta,na,tb,nb) \
|
||||
private: ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b); \
|
||||
public: inline ret (CALLBACK xfn)(ta a,tb b) const { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b); };
|
||||
|
||||
#define ICOM_CMETHOD3(ret,xfn,ta,na,tb,nb,tc,nc) \
|
||||
private: ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c); \
|
||||
public: inline ret (CALLBACK xfn)(ta a,tb b,tc c) const { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c); };
|
||||
|
||||
#define ICOM_CMETHOD4(ret,xfn,ta,na,tb,nb,tc,nc,td,nd) \
|
||||
private: ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d); \
|
||||
public: inline ret (CALLBACK xfn)(ta a,tb b,tc c,td d) const { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d); };
|
||||
|
||||
#define ICOM_CMETHOD5(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne) \
|
||||
private: ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e); \
|
||||
public: inline ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e) const { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e); };
|
||||
|
||||
#define ICOM_CMETHOD6(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf) \
|
||||
private: ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f); \
|
||||
public: inline ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f) const { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e,f); };
|
||||
|
||||
#define ICOM_CMETHOD7(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng) \
|
||||
private: ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f,tg g); \
|
||||
public: inline ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g) const { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e,f,g); };
|
||||
|
||||
|
||||
#define ICOM_END(iface) \
|
||||
};
|
||||
|
||||
#define ICOM_ICALL(ibase, xfn, p) this_is_a_syntax_error
|
||||
#define ICOM_ICALL1(ibase, xfn, p,a) this_is_a_syntax_error
|
||||
#define ICOM_ICALL2(ibase, xfn, p,a,b) this_is_a_syntax_error
|
||||
#define ICOM_ICALL3(ibase, xfn, p,a,b,c) this_is_a_syntax_error
|
||||
#define ICOM_ICALL4(ibase, xfn, p,a,b,c,d) this_is_a_syntax_error
|
||||
#define ICOM_ICALL5(ibase, xfn, p,a,b,c,d,e) this_is_a_syntax_error
|
||||
#define ICOM_ICALL6(ibase, xfn, p,a,b,c,d,e,f) this_is_a_syntax_error
|
||||
#define ICOM_ICALL7(ibase, xfn, p,a,b,c,d,e,f,g) this_is_a_syntax_error
|
||||
|
||||
#define ICOM_CALL(xfn, p) this_is_a_syntax_error
|
||||
#define ICOM_CALL1(xfn, p,a) this_is_a_syntax_error
|
||||
#define ICOM_CALL2(xfn, p,a,b) this_is_a_syntax_error
|
||||
#define ICOM_CALL3(xfn, p,a,b,c) this_is_a_syntax_error
|
||||
#define ICOM_CALL4(xfn, p,a,b,c,d) this_is_a_syntax_error
|
||||
#define ICOM_CALL5(xfn, p,a,b,c,d,e) this_is_a_syntax_error
|
||||
#define ICOM_CALL6(xfn, p,a,b,c,d,e,f) this_is_a_syntax_error
|
||||
#define ICOM_CALL7(xfn, p,a,b,c,d,e,f,g) this_is_a_syntax_error
|
||||
|
||||
|
||||
#else
|
||||
/* C interface */
|
||||
|
||||
|
||||
#define ICOM_BEGIN(iface,ibase) \
|
||||
typedef struct ICOM_VTABLE(iface) ICOM_VTABLE(iface); \
|
||||
struct iface { \
|
||||
const ICOM_VTABLE(iface)* lpvtbl; \
|
||||
}; \
|
||||
struct ICOM_VTABLE(iface) { \
|
||||
ICOM_VTABLE(ibase) bvt;
|
||||
|
||||
#define ICOM_METHOD(ret, xfn) \
|
||||
ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me);
|
||||
|
||||
#define ICOM_METHOD1(ret,xfn,ta,na) \
|
||||
ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a);
|
||||
|
||||
#define ICOM_METHOD2(ret,xfn,ta,na,tb,nb) \
|
||||
ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b);
|
||||
|
||||
#define ICOM_METHOD3(ret,xfn,ta,na,tb,nb,tc,nc) \
|
||||
ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c);
|
||||
|
||||
#define ICOM_METHOD4(ret,xfn,ta,na,tb,nb,tc,nc,td,nd) \
|
||||
ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d);
|
||||
|
||||
#define ICOM_METHOD5(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne) \
|
||||
ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e);
|
||||
|
||||
#define ICOM_METHOD6(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf) \
|
||||
ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f);
|
||||
|
||||
#define ICOM_METHOD7(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng) \
|
||||
ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f,tg g);
|
||||
|
||||
|
||||
#define ICOM_CMETHOD(ret, xfn) \
|
||||
ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me);
|
||||
|
||||
#define ICOM_CMETHOD1(ret,xfn,ta,na) \
|
||||
ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a);
|
||||
|
||||
#define ICOM_CMETHOD2(ret,xfn,ta,na,tb,nb) \
|
||||
ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b);
|
||||
|
||||
#define ICOM_CMETHOD3(ret,xfn,ta,na,tb,nb,tc,nc) \
|
||||
ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c);
|
||||
|
||||
#define ICOM_CMETHOD4(ret,xfn,ta,na,tb,nb,tc,nc,td,nd) \
|
||||
ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d);
|
||||
|
||||
#define ICOM_CMETHOD5(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne) \
|
||||
ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e);
|
||||
|
||||
#define ICOM_CMETHOD6(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf) \
|
||||
ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f);
|
||||
|
||||
#define ICOM_CMETHOD7(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng) \
|
||||
ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f,tg g);
|
||||
|
||||
#define ICOM_END(iface) \
|
||||
};
|
||||
|
||||
#define ICOM_ICALL(ibase, xfn, p) ((ICOM_VTABLE(ibase)*)(p)->lpvtbl)->fn##xfn((ibase*)p)
|
||||
#define ICOM_ICALL1(ibase, xfn, p,a) ((ICOM_VTABLE(ibase)*)(p)->lpvtbl)->fn##xfn((ibase*)p,a)
|
||||
#define ICOM_ICALL2(ibase, xfn, p,a,b) ((ICOM_VTABLE(ibase)*)(p)->lpvtbl)->fn##xfn((ibase*)p,a,b)
|
||||
#define ICOM_ICALL3(ibase, xfn, p,a,b,c) ((ICOM_VTABLE(ibase)*)(p)->lpvtbl)->fn##xfn((ibase*)p,a,b,c)
|
||||
#define ICOM_ICALL4(ibase, xfn, p,a,b,c,d) ((ICOM_VTABLE(ibase)*)(p)->lpvtbl)->fn##xfn((ibase*)p,a,b,c,d)
|
||||
#define ICOM_ICALL5(ibase, xfn, p,a,b,c,d,e) ((ICOM_VTABLE(ibase)*)(p)->lpvtbl)->fn##xfn((ibase*)p,a,b,c,d,e)
|
||||
#define ICOM_ICALL6(ibase, xfn, p,a,b,c,d,e,f) ((ICOM_VTABLE(ibase)*)(p)->lpvtbl)->fn##xfn((ibase*)p,a,b,c,d,e,f)
|
||||
#define ICOM_ICALL7(ibase, xfn, p,a,b,c,d,e,f,g) ((ICOM_VTABLE(ibase)*)(p)->lpvtbl)->fn##xfn((ibase*)p,a,b,c,d,e,f,g)
|
||||
|
||||
#define ICOM_CALL(xfn, p) (p)->lpvtbl->fn##xfn(p)
|
||||
#define ICOM_CALL1(xfn, p,a) (p)->lpvtbl->fn##xfn(p,a)
|
||||
#define ICOM_CALL2(xfn, p,a,b) (p)->lpvtbl->fn##xfn(p,a,b)
|
||||
#define ICOM_CALL3(xfn, p,a,b,c) (p)->lpvtbl->fn##xfn(p,a,b,c)
|
||||
#define ICOM_CALL4(xfn, p,a,b,c,d) (p)->lpvtbl->fn##xfn(p,a,b,c,d)
|
||||
#define ICOM_CALL5(xfn, p,a,b,c,d,e) (p)->lpvtbl->fn##xfn(p,a,b,c,d,e)
|
||||
#define ICOM_CALL6(xfn, p,a,b,c,d,e,f) (p)->lpvtbl->fn##xfn(p,a,b,c,d,e,f)
|
||||
#define ICOM_CALL7(xfn, p,a,b,c,d,e,f,g) (p)->lpvtbl->fn##xfn(p,a,b,c,d,e,f,g)
|
||||
|
||||
|
||||
#define ICOM_THIS(iface,me) struct _##iface* this=(struct _##iface*)me
|
||||
#define ICOM_CTHIS(iface,me) const _##iface* this=(const _##iface*)me
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* FIXME: compobj.h seems to be obsolete (replaced by objbase.h!) but it still contains REFIID */
|
||||
#include "compobj.h"
|
||||
|
||||
typedef struct IUnknown IUnknown ,*LPUNKNOWN;
|
||||
/*****************************************************************************
|
||||
* IMalloc interface
|
||||
*/
|
||||
/* private prototypes for the constructors */
|
||||
LPMALLOC16 IMalloc16_Constructor(void);
|
||||
LPMALLOC32 IMalloc32_Constructor(void);
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IUnknown interface
|
||||
*/
|
||||
#define ICOM_INTERFACE IUnknown
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
struct IUnknown {
|
||||
union {
|
||||
const void* lpvtbl;
|
||||
HRESULT (CALLBACK *fnQueryInterface)(IUnknown* me, REFIID riid, LPVOID* ppvObj);
|
||||
} t;
|
||||
inline int QueryInterface(REFIID a, LPVOID* b) { return ((IUnknown*)t.lpvtbl)->t.fnQueryInterface(this,a,b); }
|
||||
#else
|
||||
typedef struct ICOM_VTABLE(IUnknown) ICOM_VTABLE(IUnknown);
|
||||
struct IUnknown {
|
||||
|
||||
typedef struct _IUnknown {
|
||||
/* IUnknown fields */
|
||||
ICOM_VTABLE(IUnknown)* lpvtbl;
|
||||
};
|
||||
struct ICOM_VTABLE(IUnknown) {
|
||||
ICOM_METHOD2(HRESULT,QueryInterface,REFIID,riid, LPVOID*,ppvObj)
|
||||
#endif
|
||||
|
||||
ICOM_METHOD (ULONG,AddRef)
|
||||
ICOM_METHOD (ULONG,Release)
|
||||
#ifdef __WRC__
|
||||
}; /* FIXME: WRC does not support function macros and it is ICOM_END that is supposed to close the class */
|
||||
#else
|
||||
ICOM_END(IUnknown)
|
||||
#endif
|
||||
#undef ICOM_INTERFACE
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
/*** IUnknown methods ***/
|
||||
#define IUnknown_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
|
||||
#define IUnknown_AddRef(p) ICOM_CALL (AddRef,p)
|
||||
#define IUnknown_Release(p) ICOM_CALL (Release,p)
|
||||
#endif
|
||||
DWORD ref;
|
||||
} _IUnknown;
|
||||
|
||||
LPUNKNOWN IUnknown_Constructor(void);
|
||||
|
||||
#endif /* __WINE_OBJBASE_H */
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
#ifndef __WINE_OBJIDL_H
|
||||
#define __WINE_OBJIDL_H
|
||||
|
||||
|
||||
#include "wine/obj_base.h"
|
||||
|
||||
/* the following depend only on obj_base.h */
|
||||
#include "wine/obj_misc.h"
|
||||
#include "wine/obj_channel.h"
|
||||
#include "wine/obj_clientserver.h"
|
||||
#include "wine/obj_marshal.h"
|
||||
#include "wine/obj_storage.h"
|
||||
|
||||
/* the following depend on obj_storage.h */
|
||||
#include "wine/obj_moniker.h"
|
||||
#include "wine/obj_propertystorage.h"
|
||||
|
||||
/* the following depend on obj_moniker.h */
|
||||
#include "wine/obj_dataobject.h"
|
||||
|
||||
|
||||
#endif /* __WINE_OBJIDL_H */
|
|
@ -7,37 +7,18 @@
|
|||
|
||||
#include "wingdi.h"
|
||||
|
||||
typedef CHAR OLECHAR16;
|
||||
typedef OLECHAR16 *BSTR16;
|
||||
typedef BSTR16 *LPBSTR16;
|
||||
typedef LPSTR LPOLESTR16;
|
||||
typedef LPCSTR LPCOLESTR16;
|
||||
typedef WCHAR OLECHAR32;
|
||||
typedef OLECHAR32 *BSTR32;
|
||||
typedef BSTR32 *LPBSTR32;
|
||||
typedef LPWSTR LPOLESTR32;
|
||||
typedef LPCWSTR LPCOLESTR32;
|
||||
DECL_WINELIB_TYPE(OLECHAR)
|
||||
DECL_WINELIB_TYPE(LPOLESTR)
|
||||
DECL_WINELIB_TYPE(LPCOLESTR)
|
||||
DECL_WINELIB_TYPE(BSTR)
|
||||
DECL_WINELIB_TYPE(LPBSTR)
|
||||
/* FIXME: we need to include wtypes.h mainly, it seems, because we need BSTR.
|
||||
* Normally none of the APIs in ole.h depend on it. It is most likey that they should
|
||||
* be moved to ole2.h (which includes objbase.h and thus wtypes.h) or some other
|
||||
* OLE include
|
||||
*/
|
||||
#include "wtypes.h"
|
||||
|
||||
|
||||
#define OLESTR16(x) x
|
||||
#define OLESTR32(x) L##x /* probably wrong */
|
||||
#define OLESTR WINELIB_NAME(OLESTR)
|
||||
|
||||
typedef enum tagCLSCTX
|
||||
{
|
||||
CLSCTX_INPROC_SERVER = 0x1,
|
||||
CLSCTX_INPROC_HANDLER = 0x2,
|
||||
CLSCTX_LOCAL_SERVER = 0x4,
|
||||
CLSCTX_REMOTE_SERVER = 0x10
|
||||
} CLSCTX;
|
||||
|
||||
#define CLSCTX_SERVER (CLSCTX_INPROC_SERVER|CLSCTX_LOCAL_SERVER|CLSCTX_REMOTE_SERVER)
|
||||
#define CLSCTX_ALL (CLSCTX_INPROC_HANDLER|CLSCTX_SERVER)
|
||||
|
||||
typedef unsigned short VARTYPE;
|
||||
typedef LONG DISPID;
|
||||
|
||||
|
|
|
@ -6,18 +6,15 @@
|
|||
#define __WINE_OLE2_H
|
||||
|
||||
/* to be implemented */
|
||||
typedef LPVOID LPMESSAGEFILTER;
|
||||
/* FIXME: this should be defined somewhere in oleidl.h instead, should it be repeated here ? */
|
||||
typedef LPVOID LPDROPTARGET;
|
||||
typedef struct tagMONIKER *LPMONIKER, IMoniker;
|
||||
|
||||
#define S_OK 0
|
||||
#define S_FALSE 1
|
||||
|
||||
/* OLE version */
|
||||
#define rmm 23
|
||||
#define rup 639
|
||||
|
||||
/* FIXME should be in oleidl.h*/
|
||||
/* FIXME: should be in oleidl.h */
|
||||
typedef struct tagOleMenuGroupWidths
|
||||
{ LONG width[ 6 ];
|
||||
} OLEMENUGROUPWIDTHS32;
|
||||
|
|
|
@ -3,8 +3,10 @@
|
|||
|
||||
#include "ole.h"
|
||||
#include "ole2.h"
|
||||
#include "compobj.h"
|
||||
/* #include "interfaces.h" */
|
||||
#include "wine/obj_base.h"
|
||||
#include "wine/obj_storage.h"
|
||||
#include "wine/obj_moniker.h"
|
||||
#include "wine/obj_dataobject.h"
|
||||
|
||||
#define STDMETHOD(xfn) HRESULT (CALLBACK *fn##xfn)
|
||||
#define STDMETHOD_(type,xfn) type (CALLBACK *fn##xfn)
|
||||
|
@ -14,8 +16,6 @@
|
|||
|
||||
/* forward declaration of the objects*/
|
||||
typedef struct tagOLEADVISEHOLDER *LPOLEADVISEHOLDER, IOleAdviseHolder;
|
||||
typedef struct tagADVISESINK *LPADVISESINK, IAdviseSink;
|
||||
typedef struct tagENUMSTATDATA *LPENUMSTATDATA, IEnumSTATDATA;
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
|
|
|
@ -92,6 +92,7 @@ extern int PROFILE_GetWineIniBool( char const *section, char const *key_name,
|
|||
extern char* PROFILE_GetStringItem( char* );
|
||||
|
||||
/* Version functions */
|
||||
extern void VERSION_ParseVersion( char *arg );
|
||||
extern void VERSION_ParseWinVersion( const char *arg );
|
||||
extern void VERSION_ParseDosVersion( const char *arg );
|
||||
|
||||
#endif /* __WINE_OPTIONS_H */
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Property sheet class extra info
|
||||
*
|
||||
* Copyright 1998 Anders Carlsson
|
||||
*/
|
||||
|
||||
#ifndef __WINE_PROPSHEET_H
|
||||
#define __WINE_PROPSHEET_H
|
||||
|
||||
typedef struct tagPROPSHEET_INFO
|
||||
{
|
||||
DWORD dwDummy; /* just to keep the compiler happy ;-) */
|
||||
|
||||
} PROPSHEET_INFO, *LPPROPSHEET_INFO;
|
||||
|
||||
|
||||
|
||||
extern VOID PROPSHEET_Register (VOID);
|
||||
extern VOID PROPSHEET_UnRegister (VOID);
|
||||
|
||||
#endif /* __WINE_PROPSHEET_H */
|
|
@ -0,0 +1,34 @@
|
|||
#ifndef __WINE_SERVPROV_H
|
||||
#define __WINE_SERVPROV_H
|
||||
|
||||
|
||||
#include "unknwn.h"
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* Predeclare the interfaces
|
||||
*/
|
||||
DEFINE_GUID (IID_IServiceProvider, 0x6d5140c1L, 0x7436, 0x11ce, 0x80, 0x34, 0x00, 0xaa, 0x00, 0x60, 0x09, 0xfa);
|
||||
typedef struct IServiceProvider IServiceProvider,*LPSERVICEPROVIDER;
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IServiceProvider interface
|
||||
*/
|
||||
#define ICOM_INTERFACE IServiceProvider
|
||||
ICOM_BEGIN(IServiceProvider,IUnknown)
|
||||
ICOM_METHOD3(HRESULT,QueryService, REFGUID,guidService, REFIID,riid, void**,ppvObject);
|
||||
ICOM_END(IServiceProvider)
|
||||
#undef ICOM_INTERFACE
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
/*** IUnknown methods ***/
|
||||
#define IServiceProvider_QueryInterface(p,a,b) ICOM_ICALL2(IUnknown,QueryInterface,p,a,b)
|
||||
#define IServiceProvider_AddRef(p) ICOM_ICALL (IUnknown,AddRef,p)
|
||||
#define IServiceProvider_Release(p) ICOM_ICALL (IUnknown,Release,p)
|
||||
/*** IServiceProvider methods ***/
|
||||
#define IServiceProvider_QueryService(p,a,b,c) ICOM_CALL3(QueryService,p,a,b,c)
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* __WINE_SERVPROV_H */
|
|
@ -4,13 +4,10 @@
|
|||
#ifndef __WINE_SHELL_H
|
||||
#define __WINE_SHELL_H
|
||||
|
||||
#include "wintypes.h"
|
||||
#include "windows.h"
|
||||
#include "winreg.h"
|
||||
#include "imagelist.h"
|
||||
|
||||
#ifndef MAX_PATH
|
||||
#define MAX_PATH 260
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* shell 16
|
||||
|
@ -247,6 +244,11 @@ HRESULT WINAPI SHGetSpecialFolderLocation(HWND32, INT32, LPITEMIDLIST *);
|
|||
/****************************************************************************
|
||||
* string and path functions
|
||||
*/
|
||||
BOOL32 WINAPI PathIsRoot32A(LPCSTR x);
|
||||
BOOL32 WINAPI PathIsRoot32W(LPCWSTR x);
|
||||
#define PathIsRoot WINELIB_NAME_AW(PathIsRoot)
|
||||
BOOL32 WINAPI PathIsRoot32AW(LPCVOID x);
|
||||
|
||||
LPSTR WINAPI PathAddBackslash32A(LPSTR path);
|
||||
LPWSTR WINAPI PathAddBackslash32W(LPWSTR path);
|
||||
#define PathAddBackslash WINELIB_NAME_AW(PathAddBackslash)
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
#ifndef __WINE_SHLGUID_H
|
||||
#define __WINE_SHLGUID_H
|
||||
|
||||
|
||||
/* This file defines the GUID of the shell objects. In WINE we define
|
||||
* the GUIDs where the interface is declared so this file just
|
||||
* includes shlobj.h
|
||||
*/
|
||||
|
||||
#include "shlobj.h"
|
||||
|
||||
|
||||
#endif /* __WINE_SHLGUID_H */
|
175
include/shlobj.h
175
include/shlobj.h
|
@ -1,15 +1,13 @@
|
|||
#ifndef _WINE_SHLOBJ_H
|
||||
#define _WINE_SHLOBJ_H
|
||||
#ifndef __WINE_SHLOBJ_H
|
||||
#define __WINE_SHLOBJ_H
|
||||
|
||||
#include "wine/obj_base.h"
|
||||
#include "shell.h"
|
||||
#include "ole.h"
|
||||
#include "ole2.h"
|
||||
#include "compobj.h"
|
||||
#include "oleobj.h"
|
||||
#include "storage.h"
|
||||
#include "commctrl.h"
|
||||
#include "wintypes.h"
|
||||
#include "interfaces.h"
|
||||
|
||||
#define STDMETHOD(xfn) HRESULT (CALLBACK *fn##xfn)
|
||||
#define STDMETHOD_(type,xfn) type (CALLBACK *fn##xfn)
|
||||
|
@ -23,22 +21,19 @@
|
|||
DWORD WINAPI SHELL32_DllGetClassObject(LPCLSID,REFIID,LPVOID*);
|
||||
|
||||
|
||||
typedef LPVOID LPBC; /* *IBindCtx really */
|
||||
|
||||
/* foreward declaration of the objects*/
|
||||
typedef struct tagPERSISTFILE *LPPERSISTFILE, IPersistFile;
|
||||
typedef struct tagCONTEXTMENU *LPCONTEXTMENU, IContextMenu;
|
||||
typedef struct tagSHELLEXTINIT *LPSHELLEXTINIT,IShellExtInit;
|
||||
typedef struct tagENUMIDLIST *LPENUMIDLIST, IEnumIDList;
|
||||
typedef struct tagSHELLFOLDER *LPSHELLFOLDER, IShellFolder;
|
||||
typedef struct tagSHELLVIEW *LPSHELLVIEW, IShellView;
|
||||
typedef struct tagSHELLBROWSER *LPSHELLBROWSER,IShellBrowser;
|
||||
typedef struct tagDATAOBJECT *LPDATAOBJECT, IDataObject;
|
||||
typedef struct tagSHELLICON *LPSHELLICON, IShellIcon;
|
||||
typedef struct tagDOCKINGWINDOWFRAME *LPDOCKINGWINDOWFRAME, IDockingWindowFrame;
|
||||
typedef struct tagSERVICEPROVIDER *LPSERVICEPROVIDER, IServiceProvider;
|
||||
typedef struct tagCOMMDLGBROWSER *LPCOMMDLGBROWSER, ICommDlgBrowser;
|
||||
typedef struct tagENUMFORMATETC *LPENUMFORMATETC, IEnumFORMATETC;
|
||||
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* SHELL ID
|
||||
|
@ -47,24 +42,13 @@ typedef struct tagENUMFORMATETC *LPENUMFORMATETC, IEnumFORMATETC;
|
|||
DEFINE_GUID (IID_MyComputer, 0x20D04FE0L, 0x3AEA, 0x1069, 0xA2, 0xD8, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D);
|
||||
|
||||
/* strange Objects */
|
||||
DEFINE_SHLGUID(IID_IEnumUnknown, 0x00000100L, 0, 0);
|
||||
DEFINE_SHLGUID(IID_IEnumString, 0x00000101L, 0, 0);
|
||||
DEFINE_SHLGUID(IID_IEnumMoniker, 0x00000102L, 0, 0);
|
||||
DEFINE_SHLGUID(IID_IEnumFORMATETC, 0x00000103L, 0, 0);
|
||||
DEFINE_SHLGUID(IID_IEnumOLEVERB, 0x00000104L, 0, 0);
|
||||
DEFINE_SHLGUID(IID_IEnumSTATDATA, 0x00000105L, 0, 0);
|
||||
|
||||
DEFINE_SHLGUID(IID_IPersistStream, 0x00000109L, 0, 0);
|
||||
DEFINE_SHLGUID(IID_IPersistStorage, 0x0000010AL, 0, 0);
|
||||
DEFINE_SHLGUID(IID_IPersistFile, 0x0000010BL, 0, 0);
|
||||
DEFINE_SHLGUID(IID_IPersist, 0x0000010CL, 0, 0);
|
||||
DEFINE_SHLGUID(IID_IViewObject, 0x0000010DL, 0, 0);
|
||||
DEFINE_SHLGUID(IID_IDataObject, 0x0000010EL, 0, 0);
|
||||
|
||||
DEFINE_SHLGUID(IID_IDropSource, 0x00000121L, 0, 0);
|
||||
DEFINE_SHLGUID(IID_IDropTarget, 0x00000122L, 0, 0);
|
||||
|
||||
DEFINE_GUID (IID_IServiceProvider, 0x6D5140C1L, 0x7436, 0x11CE, 0x80, 0x34, 0x00, 0xAA, 0x00, 0x60, 0x09, 0xFA);
|
||||
DEFINE_GUID (IID_IDockingWindow, 0x012dd920L, 0x7B26, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
|
||||
DEFINE_GUID (IID_IDockingWindowSite, 0x2A342FC2L, 0x7B26, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
|
||||
DEFINE_GUID (IID_IDockingWindowFrame, 0x47D2657AL, 0x7B27, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
|
||||
|
@ -127,31 +111,8 @@ typedef struct _STRRET
|
|||
WCHAR cStrW[MAX_PATH];
|
||||
}u;
|
||||
} STRRET,*LPSTRRET;
|
||||
/*****************************************************************************
|
||||
* IPersistFile interface
|
||||
*/
|
||||
#define THIS LPPERSISTFILE this
|
||||
typedef struct IPersistFile_VTable
|
||||
{ /* *** IUnknown methods *** */
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
|
||||
STDMETHOD(GetClassID )(THIS_ CLSID *pClassID) PURE;
|
||||
STDMETHOD(IsDirty )(THIS) PURE;
|
||||
STDMETHOD(Load )(THIS_ LPCOLESTR32 pszFileName, DWORD dwMode) PURE;
|
||||
STDMETHOD(Save )(THIS_ LPCOLESTR32 pszFileName, BOOL32 fRemember) PURE;
|
||||
STDMETHOD(SaveCompleted )(THIS_ LPCOLESTR32 pszFileName) PURE;
|
||||
STDMETHOD(GetCurFile )(THIS_ LPOLESTR32 *ppszFileName) PURE;
|
||||
|
||||
} IPersistFile_VTable,*LPPERSISTFILE_VTABLE;
|
||||
|
||||
struct tagPERSISTFILE
|
||||
{ LPPERSISTFILE_VTABLE lpvtbl;
|
||||
DWORD ref;
|
||||
};
|
||||
|
||||
#undef THIS
|
||||
/*****************************************************************************
|
||||
* IContextMenu interface
|
||||
*/
|
||||
|
@ -282,52 +243,6 @@ typedef enum tagDVASPECT
|
|||
DVASPECT_DOCPRINT = 8
|
||||
} DVASPECT;
|
||||
|
||||
typedef enum tagTYMED
|
||||
{ TYMED_HGLOBAL = 1,
|
||||
TYMED_FILE = 2,
|
||||
TYMED_ISTREAM = 4,
|
||||
TYMED_ISTORAGE = 8,
|
||||
TYMED_GDI = 16,
|
||||
TYMED_MFPICT = 32,
|
||||
TYMED_ENHMF = 64,
|
||||
TYMED_NULL = 0
|
||||
} TYMED;
|
||||
|
||||
typedef struct
|
||||
{ DWORD tdSize;
|
||||
WORD tdDriverNameOffset;
|
||||
WORD tdDeviceNameOffset;
|
||||
WORD tdPortNameOffset;
|
||||
WORD tdExtDevmodeOffset;
|
||||
BYTE tdData[ 1 ];
|
||||
} DVTARGETDEVICE32;
|
||||
|
||||
typedef WORD CLIPFORMAT32, *LPCLIPFORMAT32;
|
||||
|
||||
/* dataobject as answer to a request */
|
||||
typedef struct
|
||||
{ DWORD tymed;
|
||||
union
|
||||
{ HBITMAP32 hBitmap;
|
||||
/*HMETAFILEPICT32 hMetaFilePict;*/
|
||||
/*HENHMETAFILE32 hEnhMetaFile;*/
|
||||
HGLOBAL32 hGlobal;
|
||||
LPOLESTR32 lpszFileName;
|
||||
IStream32 *pstm;
|
||||
IStorage32 *pstg;
|
||||
} u;
|
||||
IUnknown *pUnkForRelease;
|
||||
} STGMEDIUM32;
|
||||
|
||||
/* wished data format */
|
||||
typedef struct
|
||||
{ CLIPFORMAT32 cfFormat;
|
||||
DVTARGETDEVICE32 *ptd;
|
||||
DWORD dwAspect;
|
||||
LONG lindex;
|
||||
DWORD tymed;
|
||||
} FORMATETC32, *LPFORMATETC32;
|
||||
|
||||
/* shell specific clipboard formats */
|
||||
|
||||
/* DATAOBJECT_InitShellIDList*/
|
||||
|
@ -399,65 +314,6 @@ struct tagLPIDLLIST
|
|||
extern LPIDLLIST IDLList_Constructor (UINT32 uStep);
|
||||
extern void IDLList_Destructor(LPIDLLIST this);
|
||||
#undef THIS
|
||||
/*****************************************************************************
|
||||
* IEnumFORMATETC interface
|
||||
*/
|
||||
#define THIS LPENUMFORMATETC this
|
||||
|
||||
typedef struct IEnumFORMATETC_VTable
|
||||
{ /* IUnknown methods */
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
|
||||
/* IEnumFORMATETC methods */
|
||||
STDMETHOD (Next)(THIS_ ULONG celt, FORMATETC32 *rgelt, ULONG *pceltFethed) PURE;
|
||||
STDMETHOD (Skip)(THIS_ ULONG celt) PURE;
|
||||
STDMETHOD (Reset)(THIS) PURE;
|
||||
STDMETHOD (Clone)(THIS_ IEnumFORMATETC ** ppenum) PURE;
|
||||
} IEnumFORMATETC_VTable,*LPENUMFORMATETC_VTABLE;
|
||||
|
||||
struct tagENUMFORMATETC
|
||||
{ LPENUMFORMATETC_VTABLE lpvtbl;
|
||||
DWORD ref;
|
||||
UINT32 posFmt;
|
||||
UINT32 countFmt;
|
||||
LPFORMATETC32 pFmt;
|
||||
};
|
||||
|
||||
#undef THIS
|
||||
|
||||
/*****************************************************************************
|
||||
* IDataObject interface
|
||||
*/
|
||||
#define THIS LPDATAOBJECT this
|
||||
|
||||
typedef struct IDataObject_VTable
|
||||
{ /*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
|
||||
STDMETHOD (GetData )(THIS_ LPFORMATETC32 pformatetcIn, STGMEDIUM32 *pmedium) PURE;
|
||||
STDMETHOD (GetDataHere)(THIS_ LPFORMATETC32 pformatetc, STGMEDIUM32 *pmedium) PURE;
|
||||
STDMETHOD (QueryGetData)(THIS_ LPFORMATETC32 pformatetc) PURE;
|
||||
STDMETHOD (GetCanonicalFormatEtc)(THIS_ LPFORMATETC32 pformatectIn, LPFORMATETC32 pformatetcOut) PURE;
|
||||
STDMETHOD (SetData)(THIS_ LPFORMATETC32 pformatetc, STGMEDIUM32 *pmedium, BOOL32 fRelease) PURE;
|
||||
STDMETHOD (EnumFormatEtc)(THIS_ DWORD dwDirection, IEnumFORMATETC **ppenumFormatEtc) PURE;
|
||||
STDMETHOD (DAdvise )(THIS_ LPFORMATETC32 *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection) PURE;
|
||||
STDMETHOD (DUnadvise)(THIS_ DWORD dwConnection) PURE;
|
||||
STDMETHOD (EnumDAdvise)(THIS_ IEnumSTATDATA **ppenumAdvise) PURE;
|
||||
} IDataObject_VTable,*LPDATAOBJECT_VTABLE;
|
||||
|
||||
struct tagDATAOBJECT
|
||||
{ LPDATAOBJECT_VTABLE lpvtbl;
|
||||
DWORD ref;
|
||||
LPSHELLFOLDER psf;
|
||||
LPIDLLIST lpill; /* the data of the dataobject */
|
||||
LPITEMIDLIST pidl;
|
||||
};
|
||||
|
||||
#undef THIS
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
|
@ -1107,24 +963,6 @@ struct tagDOCKINGWINDOWFRAME
|
|||
};
|
||||
|
||||
#undef THIS
|
||||
/****************************************************************************
|
||||
* IServiceProvider interface
|
||||
*/
|
||||
#define THIS LPSERVICEPROVIDER this
|
||||
|
||||
typedef struct IServiceProvider_VTable
|
||||
{ /*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
|
||||
STDMETHOD(QueryService)(THIS_ REFGUID guidService, REFIID riid, void **ppvObject);
|
||||
} IServiceProvider_VTable, *LPSERVICEPROVIDER_VTABLE;
|
||||
|
||||
struct tagSERVICEPROVIDER
|
||||
{ LPSERVICEPROVIDER_VTABLE lpvtbl;
|
||||
DWORD ref;
|
||||
};
|
||||
/****************************************************************************
|
||||
* Shell Execute API
|
||||
*/
|
||||
|
@ -1389,4 +1227,5 @@ typedef struct
|
|||
#undef THIS_
|
||||
#undef STDMETHOD
|
||||
#undef STDMETHOD_
|
||||
#endif /*_WINE_SHLOBJ_H*/
|
||||
|
||||
#endif /* __WINE_SHLOBJ_H */
|
||||
|
|
|
@ -1,254 +1,8 @@
|
|||
#ifndef __WINE_STORAGE_H
|
||||
#define __WINE_STORAGE_H
|
||||
|
||||
/* "storage.h" is obsolete, you should include "objbase.h" instead */
|
||||
|
||||
#include "objbase.h"
|
||||
#include "windows.h"
|
||||
|
||||
/* Does this look like a cellar to you? */
|
||||
|
||||
struct storage_header {
|
||||
BYTE magic[8]; /* 00: magic */
|
||||
BYTE unknown1[36]; /* 08: unknown */
|
||||
DWORD num_of_bbd_blocks;/* 2C: length of big datablocks */
|
||||
DWORD root_startblock;/* 30: root storage first big block */
|
||||
DWORD unknown2[2]; /* 34: unknown */
|
||||
DWORD sbd_startblock; /* 3C: small block depot first big block */
|
||||
DWORD unknown3[3]; /* 40: unknown */
|
||||
DWORD bbd_list[109]; /* 4C: big data block list (up to end of sector)*/
|
||||
};
|
||||
struct storage_pps_entry {
|
||||
WCHAR pps_rawname[32];/* 00: \0 terminated widechar name */
|
||||
WORD pps_sizeofname; /* 40: namelength in bytes */
|
||||
BYTE pps_type; /* 42: flags, 1 storage/dir, 2 stream, 5 root */
|
||||
BYTE pps_unknown0; /* 43: unknown */
|
||||
DWORD pps_prev; /* 44: previous pps */
|
||||
DWORD pps_next; /* 48: next pps */
|
||||
DWORD pps_dir; /* 4C: directory pps */
|
||||
GUID pps_guid; /* 50: class ID */
|
||||
DWORD pps_unknown1; /* 60: unknown */
|
||||
FILETIME pps_ft1; /* 64: filetime1 */
|
||||
FILETIME pps_ft2; /* 70: filetime2 */
|
||||
DWORD pps_sb; /* 74: data startblock */
|
||||
DWORD pps_size; /* 78: datalength. (<0x1000)?small:big blocks*/
|
||||
DWORD pps_unknown2; /* 7C: unknown */
|
||||
};
|
||||
|
||||
#define STORAGE_CHAINENTRY_FAT 0xfffffffd
|
||||
#define STORAGE_CHAINENTRY_ENDOFCHAIN 0xfffffffe
|
||||
#define STORAGE_CHAINENTRY_FREE 0xffffffff
|
||||
|
||||
typedef LPOLESTR16 *SNB16;
|
||||
typedef LPOLESTR32 *SNB32;
|
||||
DECL_WINELIB_TYPE(SNB)
|
||||
|
||||
typedef struct IStorage16 IStorage16,*LPSTORAGE16;
|
||||
typedef struct IStorage32 IStorage32,*LPSTORAGE32;
|
||||
typedef struct IStream16 IStream16,*LPSTREAM16;
|
||||
typedef struct IStream32 IStream32,*LPSTREAM32;
|
||||
|
||||
typedef struct IEnumSTATSTG IEnumSTATSTG,*LPENUMSTATSTG;
|
||||
|
||||
typedef struct {
|
||||
LPOLESTR16 pwcsName;
|
||||
DWORD type;
|
||||
ULARGE_INTEGER cbSize;
|
||||
FILETIME mtime;
|
||||
FILETIME ctime;
|
||||
FILETIME atime;
|
||||
DWORD grfMode;
|
||||
DWORD grfLocksSupported;
|
||||
CLSID clsid;
|
||||
DWORD grfStateBits;
|
||||
DWORD reserved;
|
||||
} STATSTG;
|
||||
|
||||
#define STGM_DIRECT 0x00000000
|
||||
#define STGM_TRANSACTED 0x00010000
|
||||
#define STGM_SIMPLE 0x08000000
|
||||
#define STGM_READ 0x00000000
|
||||
#define STGM_WRITE 0x00000001
|
||||
#define STGM_READWRITE 0x00000002
|
||||
#define STGM_SHARE_DENY_NONE 0x00000040
|
||||
#define STGM_SHARE_DENY_READ 0x00000030
|
||||
#define STGM_SHARE_DENY_WRITE 0x00000020
|
||||
#define STGM_SHARE_EXCLUSIVE 0x00000010
|
||||
#define STGM_PRIORITY 0x00040000
|
||||
#define STGM_DELETEONRELEASE 0x04000000
|
||||
#define STGM_NOSCRATCH 0x00100000
|
||||
#define STGM_CREATE 0x00001000
|
||||
#define STGM_CONVERT 0x00020000
|
||||
#define STGM_FAILIFTHERE 0x00000000
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IStorage16 interface
|
||||
*/
|
||||
#define ICOM_INTERFACE IStorage16
|
||||
ICOM_BEGIN(IStorage16,IUnknown)
|
||||
ICOM_METHOD5(HRESULT,CreateStream, LPCOLESTR16,pwcsName, DWORD,grfMode, DWORD,reserved1, DWORD,reserved2, IStream16**,ppstm)
|
||||
ICOM_METHOD5(HRESULT,OpenStream, LPCOLESTR16,pwcsName, void*,reserved1, DWORD,grfMode, DWORD,reserved2, IStream16**,ppstm)
|
||||
ICOM_METHOD5(HRESULT,CreateStorage, LPCOLESTR16,pwcsName, DWORD,grfMode, DWORD,dwStgFmt, DWORD,reserved2, IStorage16**,ppstg)
|
||||
ICOM_METHOD6(HRESULT,OpenStorage, LPCOLESTR16,pwcsName, IStorage16*,pstgPriority, DWORD,grfMode, SNB16,snb16Exclude, DWORD,reserved, IStorage16**,ppstg)
|
||||
ICOM_METHOD4(HRESULT,CopyTo, DWORD,ciidExclude, const IID*,rgiidExclude, SNB16,snb16Exclude, IStorage16*,pstgDest)
|
||||
ICOM_METHOD4(HRESULT,MoveElementTo, LPCOLESTR16,pwcsName, IStorage16*,pstgDest, LPCOLESTR16,pwcsNewName, DWORD,grfFlags)
|
||||
ICOM_METHOD1(HRESULT,Commit, DWORD,grfCommitFlags)
|
||||
ICOM_METHOD (HRESULT,Revert)
|
||||
ICOM_METHOD4(HRESULT,EnumElements, DWORD,reserved1, void*,reserved2, DWORD,reserved3, IEnumSTATSTG**,ppenum)
|
||||
ICOM_METHOD1(HRESULT,DestroyElement, LPCOLESTR16,pwcsName)
|
||||
ICOM_METHOD2(HRESULT,RenameElement, LPCOLESTR16,pwcsOldName, LPCOLESTR16,pwcsNewName)
|
||||
ICOM_METHOD4(HRESULT,SetElementTimes,LPCOLESTR16,pwcsName, const FILETIME*,pctime, const FILETIME*,patime, const FILETIME*,pmtime)
|
||||
ICOM_METHOD1(HRESULT,SetClass, REFCLSID,clsid)
|
||||
ICOM_METHOD2(HRESULT,SetStateBits, DWORD,grfStateBits, DWORD,grfMask)
|
||||
ICOM_METHOD2(HRESULT,Stat, STATSTG*,pstatstg, DWORD,grfStatFlag)
|
||||
ICOM_END(IStorage16)
|
||||
#undef ICOM_INTERFACE
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
/*** IUnknown methods ***/
|
||||
#define IStorage16_QueryInterface(p,a,b) ICOM_ICALL2(QueryInterface,p,a,b)
|
||||
#define IStorage16_AddRef(p) ICOM_ICALL (AddRef,p)
|
||||
#define IStorage16_Release(p) ICOM_ICALL (Release,p)
|
||||
/*** IStorage16 methods ***/
|
||||
#define IStorage16_CreateStream(p,a,b,c,d,e) ICOM_CALL5(CreateStream,p,a,b,c,d,e)
|
||||
#define IStorage16_OpenStream(p,a,b,c,d,e) ICOM_CALL5(OpenStream,p,a,b,c,d,e)
|
||||
#define IStorage16_CreateStorage(p,a,b,c,d,e) ICOM_CALL5(CreateStorage,p,a,b,c,d,e)
|
||||
#define IStorage16_OpenStorage(p,a,b,c,d,e,f) ICOM_CALL6(OpenStorage,p,a,b,c,d,e,f)
|
||||
#define IStorage16_CopyTo(p,a,b,c,d) ICOM_CALL4(CopyTo,p,a,b,c,d)
|
||||
#define IStorage16_MoveElementTo(p,a,b,c,d) ICOM_CALL4(MoveElementTo,p,a,b,c,d)
|
||||
#define IStorage16_Commit(p,a) ICOM_CALL1(Commit,p,a)
|
||||
#define IStorage16_Revert(p) ICOM_CALL (Revert,p)
|
||||
#define IStorage16_EnumElements(p,a,b,c,d) ICOM_CALL4(EnumElements,p,a,b,c,d)
|
||||
#define IStorage16_DestroyElement(p,a) ICOM_CALL1(DestroyElement,p,a)
|
||||
#define IStorage16_RenameElement(p,a,b) ICOM_CALL2(RenameElement,p,a,b)
|
||||
#define IStorage16_SetElementTimes(p,a,b,c,d) ICOM_CALL4(SetElementTimes,p,a,b,c,d)
|
||||
#define IStorage16_SetClass(p,a) ICOM_CALL1(SetClass,p,a)
|
||||
#define IStorage16_SetStateBits(p,a,b) ICOM_CALL2(SetStateBits,p,a,b)
|
||||
#define IStorage16_Stat(p,a,b) ICOM_CALL2(Stat,p,a,b)
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IStorage32 interface
|
||||
*/
|
||||
#define ICOM_INTERFACE IStorage32
|
||||
ICOM_BEGIN(IStorage32,IUnknown)
|
||||
ICOM_METHOD5(HRESULT,CreateStream, LPCOLESTR32,pwcsName, DWORD,grfMode, DWORD,reserved1, DWORD,reserved2, IStream32**,ppstm)
|
||||
ICOM_METHOD5(HRESULT,OpenStream, LPCOLESTR32,pwcsName, void*,reserved1, DWORD,grfMode, DWORD,reserved2, IStream32**,ppstm)
|
||||
ICOM_METHOD5(HRESULT,CreateStorage, LPCOLESTR32,pwcsName, DWORD,grfMode, DWORD,dwStgFmt, DWORD,reserved2, IStorage32**,ppstg)
|
||||
ICOM_METHOD6(HRESULT,OpenStorage, LPCOLESTR32,pwcsName, IStorage32*,pstgPriority, DWORD,grfMode, SNB32,snb16Exclude, DWORD,reserved, IStorage32**,ppstg)
|
||||
ICOM_METHOD4(HRESULT,CopyTo, DWORD,ciidExclude, const IID*,rgiidExclude, SNB32,snb16Exclude, IStorage32*,pstgDest)
|
||||
ICOM_METHOD4(HRESULT,MoveElementTo, LPCOLESTR32,pwcsName, IStorage32*,pstgDest, LPCOLESTR32,pwcsNewName, DWORD,grfFlags)
|
||||
ICOM_METHOD1(HRESULT,Commit, DWORD,grfCommitFlags)
|
||||
ICOM_METHOD (HRESULT,Revert)
|
||||
ICOM_METHOD4(HRESULT,EnumElements, DWORD,reserved1, void*,reserved2, DWORD,reserved3, IEnumSTATSTG**,ppenum)
|
||||
ICOM_METHOD1(HRESULT,DestroyElement, LPCOLESTR32,pwcsName)
|
||||
ICOM_METHOD2(HRESULT,RenameElement, LPCOLESTR32,pwcsOldName, LPCOLESTR32,pwcsNewName)
|
||||
ICOM_METHOD4(HRESULT,SetElementTimes,LPCOLESTR32,pwcsName, const FILETIME*,pctime, const FILETIME*,patime, const FILETIME*,pmtime)
|
||||
ICOM_METHOD1(HRESULT,SetClass, REFCLSID,clsid)
|
||||
ICOM_METHOD2(HRESULT,SetStateBits, DWORD,grfStateBits, DWORD,grfMask)
|
||||
ICOM_METHOD2(HRESULT,Stat, STATSTG*,pstatstg, DWORD,grfStatFlag)
|
||||
ICOM_END(IStorage32)
|
||||
#undef ICOM_INTERFACE
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
/*** IUnknown methods ***/
|
||||
#define IStorage32_QueryInterface(p,a,b) ICOM_ICALL2(QueryInterface,p,a,b)
|
||||
#define IStorage32_AddRef(p) ICOM_ICALL (AddRef,p)
|
||||
#define IStorage32_Release(p) ICOM_ICALL (Release,p)
|
||||
/*** IStorage32 methods ***/
|
||||
#define IStorage32_CreateStream(p,a,b,c,d,e) ICOM_CALL5(CreateStream,p,a,b,c,d,e)
|
||||
#define IStorage32_OpenStream(p,a,b,c,d,e) ICOM_CALL5(OpenStream,p,a,b,c,d,e)
|
||||
#define IStorage32_CreateStorage(p,a,b,c,d,e) ICOM_CALL5(CreateStorage,p,a,b,c,d,e)
|
||||
#define IStorage32_OpenStorage(p,a,b,c,d,e,f) ICOM_CALL6(OpenStorage,p,a,b,c,d,e,f)
|
||||
#define IStorage32_CopyTo(p,a,b,c,d) ICOM_CALL4(CopyTo,p,a,b,c,d)
|
||||
#define IStorage32_MoveElementTo(p,a,b,c,d) ICOM_CALL4(MoveElementTo,p,a,b,c,d)
|
||||
#define IStorage32_Commit(p,a) ICOM_CALL1(Commit,p,a)
|
||||
#define IStorage32_Revert(p) ICOM_CALL (Revert,p)
|
||||
#define IStorage32_EnumElements(p,a,b,c,d) ICOM_CALL4(EnumElements,p,a,b,c,d)
|
||||
#define IStorage32_DestroyElement(p,a) ICOM_CALL1(DestroyElement,p,a)
|
||||
#define IStorage32_RenameElement(p,a,b) ICOM_CALL2(RenameElement,p,a,b)
|
||||
#define IStorage32_SetElementTimes(p,a,b,c,d) ICOM_CALL4(SetElementTimes,p,a,b,c,d)
|
||||
#define IStorage32_SetClass(p,a) ICOM_CALL1(SetClass,p,a)
|
||||
#define IStorage32_SetStateBits(p,a,b) ICOM_CALL2(SetStateBits,p,a,b)
|
||||
#define IStorage32_Stat(p,a,b) ICOM_CALL2(Stat,p,a,b)
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IStream16 interface
|
||||
*/
|
||||
#define ICOM_INTERFACE IStream16
|
||||
ICOM_BEGIN(IStream16,IUnknown)
|
||||
ICOM_METHOD3(HRESULT,Read, void*,pv, ULONG,cb, ULONG*,pcbRead)
|
||||
ICOM_METHOD3(HRESULT,Write, const void*,pv, ULONG,cb, ULONG*,pcbWritten)
|
||||
ICOM_METHOD3(HRESULT,Seek, LARGE_INTEGER,dlibMove, DWORD,dwOrigin, ULARGE_INTEGER*,plibNewPosition)
|
||||
ICOM_METHOD1(HRESULT,SetSize, ULARGE_INTEGER,libNewSize)
|
||||
ICOM_METHOD4(HRESULT,CopyTo, IStream16*,pstm, ULARGE_INTEGER,cb, ULARGE_INTEGER*,pcbRead, ULARGE_INTEGER*,pcbWritten)
|
||||
ICOM_METHOD1(HRESULT,Commit, DWORD,grfCommitFlags)
|
||||
ICOM_METHOD (HRESULT,Revert)
|
||||
ICOM_METHOD3(HRESULT,LockRegion, ULARGE_INTEGER,libOffset, ULARGE_INTEGER,cb, DWORD,dwLockType)
|
||||
ICOM_METHOD3(HRESULT,UnlockRegion,ULARGE_INTEGER,libOffset, ULARGE_INTEGER,cb, DWORD,dwLockType)
|
||||
ICOM_METHOD2(HRESULT,Stat, STATSTG*,pstatstg, DWORD,grfStatFlag)
|
||||
ICOM_METHOD1(HRESULT,Clone, IStream16**,ppstm)
|
||||
ICOM_END(IStream16)
|
||||
#undef ICOM_INTERFACE
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
/*** IUnknown methods ***/
|
||||
#define IStream16_QueryInterface(p,a,b) ICOM_ICALL2(QueryInterface,p,a,b)
|
||||
#define IStream16_AddRef(p) ICOM_ICALL (AddRef,p)
|
||||
#define IStream16_Release(p) ICOM_ICALL (Release,p)
|
||||
/*** IStream16 methods ***/
|
||||
#define IStream16_Read(p,a,b,c) ICOM_CALL3(Read,p,a,b,c)
|
||||
#define IStream16_Write(p,a,b,c) ICOM_CALL3(Write,p,a,b,c)
|
||||
#define IStream16_Seek(p) ICOM_CALL3(Seek,p)
|
||||
#define IStream16_SetSize(p,a,b) ICOM_CALL1(SetSize,p,a,b)
|
||||
#define IStream16_CopyTo(pa,b,c,d) ICOM_CALL4(CopyTo,pa,b,c,d)
|
||||
#define IStream16_Commit(p,a) ICOM_CALL1(Commit,p,a)
|
||||
#define IStream16_Revert(p) ICOM_CALL (Revert,p)
|
||||
#define IStream16_LockRegion(pa,b,c) ICOM_CALL3(LockRegion,pa,b,c)
|
||||
#define IStream16_UnlockRegion(p,a,b,c) ICOM_CALL3(UnlockRegion,p,a,b,c)
|
||||
#define IStream16_Stat(p,a,b) ICOM_CALL2(Stat,p,a,b)
|
||||
#define IStream16_Clone(p,a) ICOM_CALL1(Clone,p,a)
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IStream32 interface
|
||||
*/
|
||||
#define ICOM_INTERFACE IStream32
|
||||
ICOM_BEGIN(IStream32,IUnknown)
|
||||
ICOM_METHOD3(HRESULT,Read, void*,pv, ULONG,cb, ULONG*,pcbRead)
|
||||
ICOM_METHOD3(HRESULT,Write, const void*,pv, ULONG,cb, ULONG*,pcbWritten)
|
||||
ICOM_METHOD3(HRESULT,Seek, LARGE_INTEGER,dlibMove, DWORD,dwOrigin, ULARGE_INTEGER*,plibNewPosition)
|
||||
ICOM_METHOD1(HRESULT,SetSize, ULARGE_INTEGER,libNewSize)
|
||||
ICOM_METHOD4(HRESULT,CopyTo, IStream32*,pstm, ULARGE_INTEGER,cb, ULARGE_INTEGER*,pcbRead, ULARGE_INTEGER*,pcbWritten)
|
||||
ICOM_METHOD1(HRESULT,Commit, DWORD,grfCommitFlags)
|
||||
ICOM_METHOD (HRESULT,Revert)
|
||||
ICOM_METHOD3(HRESULT,LockRegion, ULARGE_INTEGER,libOffset, ULARGE_INTEGER,cb, DWORD,dwLockType)
|
||||
ICOM_METHOD3(HRESULT,UnlockRegion,ULARGE_INTEGER,libOffset, ULARGE_INTEGER,cb, DWORD,dwLockType)
|
||||
ICOM_METHOD2(HRESULT,Stat, STATSTG*,pstatstg, DWORD,grfStatFlag)
|
||||
ICOM_METHOD1(HRESULT,Clone, IStream32**,ppstm)
|
||||
ICOM_END(IStream32)
|
||||
#undef ICOM_INTERFACE
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
/*** IUnknown methods ***/
|
||||
#define IStream32_QueryInterface(p,a,b) ICOM_ICALL2(QueryInterface,p,a,b)
|
||||
#define IStream32_AddRef(p) ICOM_ICALL (AddRef,p)
|
||||
#define IStream32_Release(p) ICOM_ICALL (Release,p)
|
||||
/*** IStream32 methods ***/
|
||||
#define IStream32_Read(p,a,b,c) ICOM_CALL3(Read,p,a,b,c)
|
||||
#define IStream32_Write(p,a,b,c) ICOM_CALL3(Write,p,a,b,c)
|
||||
#define IStream32_Seek(p) ICOM_CALL3(Seek,p)
|
||||
#define IStream32_SetSize(p,a,b) ICOM_CALL1(SetSize,p,a,b)
|
||||
#define IStream32_CopyTo(pa,b,c,d) ICOM_CALL4(CopyTo,pa,b,c,d)
|
||||
#define IStream32_Commit(p,a) ICOM_CALL1(Commit,p,a)
|
||||
#define IStream32_Revert(p) ICOM_CALL (Revert,p)
|
||||
#define IStream32_LockRegion(pa,b,c) ICOM_CALL3(LockRegion,pa,b,c)
|
||||
#define IStream32_UnlockRegion(p,a,b,c) ICOM_CALL3(UnlockRegion,p,a,b,c)
|
||||
#define IStream32_Stat(p,a,b) ICOM_CALL2(Stat,p,a,b)
|
||||
#define IStream32_Clone(p,a) ICOM_CALL1(Clone,p,a)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -9,11 +9,10 @@
|
|||
|
||||
typedef struct tagTAB_ITEM
|
||||
{
|
||||
UINT32 mask;
|
||||
UINT32 lpReserved1;
|
||||
UINT32 lpReserved2;
|
||||
UINT32 mask;
|
||||
DWORD dwState;
|
||||
LPSTR pszText;
|
||||
INT32 cchTextMax;
|
||||
INT32 cchTextMax;
|
||||
INT32 iImage;
|
||||
LPARAM lParam;
|
||||
RECT32 rect; /* bounding rectangle of the item */
|
||||
|
@ -21,13 +20,15 @@ typedef struct tagTAB_ITEM
|
|||
|
||||
typedef struct tagTAB_INFO
|
||||
{
|
||||
UINT32 uNumItem; /* number of tab items */
|
||||
INT32 nHeight; /* height of the tab row */
|
||||
HFONT32 hFont; /* handle to the current font */
|
||||
UINT32 uNumItem; /* number of tab items */
|
||||
INT32 nHeight; /* height of the tab row */
|
||||
HFONT32 hFont; /* handle to the current font */
|
||||
HCURSOR32 hcurArrow; /* handle to the current cursor */
|
||||
INT32 iSelected; /* the currently selected item */
|
||||
HIMAGELIST himl; /* handle to a image list (may be 0) */
|
||||
UINT32 cchTextMax;
|
||||
INT32 iSelected; /* the currently selected item */
|
||||
TAB_ITEM *items; /* pointer to an array of TAB_ITEM's */
|
||||
RECT32 rect;
|
||||
RECT32 rect;
|
||||
} TAB_INFO;
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
#ifndef __WINE_UNKNWN_H
|
||||
#define __WINE_UNKNWN_H
|
||||
|
||||
|
||||
#include "wine/obj_base.h"
|
||||
|
||||
|
||||
#endif /* __WINE_UNKNWN_H */
|
|
@ -1 +1 @@
|
|||
#define WINE_RELEASE_INFO "Wine release 990103"
|
||||
#define WINE_RELEASE_INFO "Wine release 990110"
|
||||
|
|
|
@ -302,6 +302,7 @@ void WINAPI DeleteCriticalSection(CRITICAL_SECTION *lpCrit);
|
|||
void WINAPI EnterCriticalSection(CRITICAL_SECTION *lpCrit);
|
||||
void WINAPI InitializeCriticalSection(CRITICAL_SECTION *lpCrit);
|
||||
void WINAPI LeaveCriticalSection(CRITICAL_SECTION *lpCrit);
|
||||
void WINAPI MakeCriticalSectionGlobal(CRITICAL_SECTION *lpCrit);
|
||||
HANDLE32 WINAPI OpenProcess(DWORD access, BOOL32 inherit, DWORD id);
|
||||
BOOL32 WINAPI GetProcessWorkingSetSize(HANDLE32,LPDWORD,LPDWORD);
|
||||
BOOL32 WINAPI SetProcessWorkingSetSize(HANDLE32,DWORD,DWORD);
|
||||
|
|
|
@ -12,8 +12,14 @@ extern "C" {
|
|||
#include "wintypes.h"
|
||||
#include "winbase.h"
|
||||
|
||||
/* FIXME: Maybe we should try to get something from the Unix headers instead, this should be in windef.h by the way */
|
||||
/* FIXME: Maybe MAX_PATH and _MAX_PATH should be computed from the Unix headers instead
|
||||
* and by the way, _MAX_PATH should be defined in stdlib.h and MAX_PATH in windef.h
|
||||
* and mapiwin.h
|
||||
*/
|
||||
#define _MAX_PATH 260
|
||||
#ifndef MAX_PATH
|
||||
#define MAX_PATH 260
|
||||
#endif
|
||||
|
||||
#ifndef DONT_INCLUDE_WINGDI
|
||||
#include "winbase.h"
|
||||
|
@ -3836,6 +3842,8 @@ VOID WINAPI OldYield(void);
|
|||
VOID WINAPI PostEvent(HTASK16);
|
||||
WORD WINAPI PrestoChangoSelector(WORD,WORD);
|
||||
BOOL32 WINAPI RegisterShellHook(HWND16,UINT16);
|
||||
/* NOTE: This is SYSTEM.3, not USER.182, which is also named KillSystemTimer */
|
||||
WORD WINAPI SYSTEM_KillSystemTimer( WORD );
|
||||
WORD WINAPI SelectorAccessRights(WORD,WORD,WORD);
|
||||
VOID WINAPI SetPriority(HTASK16,INT16);
|
||||
FARPROC16 WINAPI SetResourceHandler(HINSTANCE16,SEGPTR,FARPROC16);
|
||||
|
@ -3857,6 +3865,7 @@ BOOL32 WINAPI AreFileApisANSI(void);
|
|||
BOOL32 WINAPI Beep(DWORD,DWORD);
|
||||
BOOL32 WINAPI CloseHandle(HANDLE32);
|
||||
BOOL32 WINAPI CloseServiceHandle(HANDLE32);
|
||||
HANDLE32 WINAPI ConvertToGlobalHandle(HANDLE32 hSrc);
|
||||
BOOL32 WINAPI CopyFile32A(LPCSTR,LPCSTR,BOOL32);
|
||||
BOOL32 WINAPI CopyFile32W(LPCWSTR,LPCWSTR,BOOL32);
|
||||
#define CopyFile WINELIB_NAME_AW(CopyFile)
|
||||
|
@ -4135,6 +4144,7 @@ LONG WINAPI RegSetKeySecurity(HKEY,SECURITY_INFORMATION,LPSECURITY_DESCRI
|
|||
LONG WINAPI RegUnLoadKey32A(HKEY,LPCSTR);
|
||||
LONG WINAPI RegUnLoadKey32W(HKEY,LPCWSTR);
|
||||
#define RegUnLoadKey WINELIB_NAME_AW(RegUnLoadKey)
|
||||
BOOL32 WINAPI ReleaseMutex(HANDLE32);
|
||||
BOOL32 WINAPI ReleaseSemaphore(HANDLE32,LONG,LPLONG);
|
||||
BOOL32 WINAPI ResetEvent(HANDLE32);
|
||||
DWORD WINAPI ResumeThread(HANDLE32);
|
||||
|
|
|
@ -0,0 +1,749 @@
|
|||
/*
|
||||
* This file defines the macros and types necessary to define COM interfaces,
|
||||
* and the three most basic COM interfaces: IUnknown, IMalloc and IClassFactory.
|
||||
*/
|
||||
|
||||
#ifndef __WINE_WINE_OBJ_BASE_H
|
||||
#define __WINE_WINE_OBJ_BASE_H
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* Defines the basic types
|
||||
*/
|
||||
#include "wtypes.h"
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* Macros to declare the GUIDs
|
||||
*/
|
||||
#ifdef INITGUID
|
||||
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
|
||||
const GUID name = \
|
||||
{ l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
|
||||
#else
|
||||
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
|
||||
extern const GUID name
|
||||
#endif
|
||||
|
||||
#define DEFINE_OLEGUID(name, l, w1, w2) \
|
||||
DEFINE_GUID(name, l, w1, w2, 0xC0,0,0,0,0,0,0,0x46)
|
||||
|
||||
#define DEFINE_SHLGUID(name, l, w1, w2) DEFINE_OLEGUID(name,l,w1,w2)
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* GUID API
|
||||
*/
|
||||
HRESULT WINAPI StringFromCLSID16(const CLSID *id, LPOLESTR16*);
|
||||
HRESULT WINAPI StringFromCLSID32(const CLSID *id, LPOLESTR32*);
|
||||
#define StringFromCLSID WINELIB_NAME(StringFromCLSID)
|
||||
HRESULT WINAPI CLSIDFromString16(LPCOLESTR16, CLSID *);
|
||||
HRESULT WINAPI CLSIDFromString32(LPCOLESTR32, CLSID *);
|
||||
#define CLSIDFromString WINELIB_NAME(CLSIDFromString)
|
||||
HRESULT WINAPI CLSIDFromProgID16(LPCOLESTR16 progid, LPCLSID riid);
|
||||
HRESULT WINAPI CLSIDFromProgID32(LPCOLESTR32 progid, LPCLSID riid);
|
||||
#define CLSIDFromProgID WINELIB_NAME(CLSIDFromProgID)
|
||||
|
||||
INT32 WINAPI StringFromGUID2(REFGUID id, LPOLESTR32 str, INT32 cmax);
|
||||
|
||||
BOOL16 WINAPI IsEqualGUID16(GUID* g1,GUID* g2);
|
||||
BOOL32 WINAPI IsEqualGUID32(REFGUID rguid1,REFGUID rguid2);
|
||||
/*#define IsEqualGUID WINELIB_NAME(IsEqualGUID)*/
|
||||
#define IsEqualGUID(rguid1, rguid2) (!memcmp(rguid1, rguid2, sizeof(GUID)))
|
||||
#define IsEqualIID(riid1, riid2) IsEqualGUID(riid1, riid2)
|
||||
#define IsEqualCLSID(rclsid1, rclsid2) IsEqualGUID(rclsid1, rclsid2)
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* Macros to define a COM interface
|
||||
*/
|
||||
/*
|
||||
* The goal of the following set of definitions is to provide a way to use the same
|
||||
* header file definitions to provide both a C interface and a C++ object oriented
|
||||
* interface to COM interfaces. The type of interface is selected automatically
|
||||
* depending on the language but it is always possible to get the C interface in C++
|
||||
* by defining CINTERFACE.
|
||||
*
|
||||
* It is based on the following assumptions:
|
||||
* - all COM interfaces derive from IUnknown, this should not be a problem.
|
||||
* - the header file only defines the interface, the actual fields are defined
|
||||
* separately in the C file implementing the interface.
|
||||
*
|
||||
* The natural approach to this problem would be to make sure we get a C++ class and
|
||||
* virtual methods in C++ and a structure with a table of pointer to functions in C.
|
||||
* Unfortunately the layout of the virtual table is compiler specific, the layout of
|
||||
* g++ virtual tables is not the same as that of an egcs virtual table which is not the
|
||||
* same as that generated by Visual C+. There are workarounds to make the virtual tables
|
||||
* compatible via padding but unfortunately the one which is imposed to the WINE emulator
|
||||
* by the Windows binaries, i.e. the Visual C++ one, is the most compact of all.
|
||||
*
|
||||
* So the solution I finally adopted does not use virtual tables. Instead I use inline
|
||||
* non virtual methods that dereference the method pointer themselves and perform the call.
|
||||
*
|
||||
* Let's take Direct3D as an example:
|
||||
*
|
||||
* #define ICOM_INTERFACE IDirect3D
|
||||
* ICOM_BEGIN(IDirect3D,IUnknown)
|
||||
* ICOM_METHOD1(HRESULT,Initialize, REFIID,);
|
||||
* ICOM_METHOD2(HRESULT,EnumDevices, LPD3DENUMDEVICESCALLBACK,, LPVOID,);
|
||||
* ICOM_METHOD2(HRESULT,CreateLight, LPDIRECT3DLIGHT*,, IUnknown*,);
|
||||
* ICOM_METHOD2(HRESULT,CreateMaterial,LPDIRECT3DMATERIAL*,, IUnknown*,);
|
||||
* ICOM_METHOD2(HRESULT,CreateViewport,LPDIRECT3DVIEWPORT*,, IUnknown*,);
|
||||
* ICOM_METHOD2(HRESULT,FindDevice, LPD3DFINDDEVICESEARCH,, LPD3DFINDDEVICERESULT,);
|
||||
* ICOM_END(IDirect3D)
|
||||
* #undef ICOM_INTERFACE
|
||||
*
|
||||
* #if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
* // *** IUnknown methods *** //
|
||||
* #define IDirect3D_QueryInterface(p,a,b) ICOM_ICALL2(IUnknown,QueryInterface,p,a,b)
|
||||
* #define IDirect3D_AddRef(p) ICOM_ICALL (IUnknown,AddRef,p)
|
||||
* #define IDirect3D_Release(p) ICOM_ICALL (IUnknown,Release,p)
|
||||
* // *** IDirect3D methods *** //
|
||||
* #define IDirect3D_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
|
||||
* #define IDirect3D_EnumDevices(p,a,b) ICOM_CALL2(EnumDevice,p,a,b)
|
||||
* #define IDirect3D_CreateLight(p,a,b) ICOM_CALL2(CreateLight,p,a,b)
|
||||
* #define IDirect3D_CreateMaterial(p,a,b) ICOM_CALL2(CreateMaterial,p,a,b)
|
||||
* #define IDirect3D_CreateViewport(p,a,b) ICOM_CALL2(CreateViewport,p,a,b)
|
||||
* #define IDirect3D_FindDevice(p,a,b) ICOM_CALL2(FindDevice,p,a,b)
|
||||
* #endif
|
||||
*
|
||||
* Comments:
|
||||
* - The ICOM_INTERFACE is used in the ICOM_METHOD macros for the 'this' pointer and to cast
|
||||
* pointers. Defining this macro here saves us the trouble of having to repeat the interface
|
||||
* name everywhere. Note haowever that because of the way macros work a macro like ICOM_METHOD1
|
||||
* cannot use 'ICOM_INTERFACE##_VTABLE' because this would give 'ICOM_INTERFACE_VTABLE' and not
|
||||
* 'IDirect3D_VTABLE'.
|
||||
* - ICOM_BEGIN and ICOM_END are responsible for generating whatever structure is appropriate for
|
||||
* representing the interface in the current language. In C this is a couple of structs in C++
|
||||
* it's a class. The first parameter is the interface name and the second one is the interface
|
||||
* we inherit from. The reason why you have to repeat the interface name is because that's the
|
||||
* only way these macro can successfully output "IDirect3D_VTABLE'. Trying to use ICOM_INTERFACE
|
||||
* would, as in ICOM_METHOD, only yield 'ICOM_INTERFACE_VTABLE'.
|
||||
* - With the way ICOM_BEGIN works you don't have to repeat the definitions of the methods of the
|
||||
* parent interface. They are automatically inherited both in C and in C++.
|
||||
* - In C++ the ICOM_METHOD macros generate a function prototype and a call to a function pointer
|
||||
* method. This means using once 't1 p1, t2 p2, ...' and once 'p1, p2' without the types. The
|
||||
* only way I found to handle this is to have one ICOM_METHOD macro per number of parameters and
|
||||
* to have it take only the type information (with const if necessary) as parameters.
|
||||
* The 'undef ICOM_INTERFACE' is here to remind you that using ICOM_INTERFACE in the following
|
||||
* macros will not work. This time it's because the ICOM_CALL macro expansion is done only once
|
||||
* the 'IDirect3D_Xxx' macro is expanded. And by that time ICOM_INTERFACE will be long gone
|
||||
* anyway.
|
||||
* - You may have noticed the double commas after each parameter type. This allows you to put the
|
||||
* name of that parameter which I think is good for documentation. It is not required and since
|
||||
* I did not know what to put there for this example (I could only find doc about IDirect3D2),
|
||||
* I left them blank.
|
||||
* - Finally the set of 'IDirect3D_Xxx' macros is a standard set of macros defined to ease access
|
||||
* to the interface methods in C. Unfortunately I don't see any way to avoid having to duplicate
|
||||
* the inherited method definitions there. We must use ICOM_ICALL to invoke inherited methods,
|
||||
* because in C we have to cast the virtual table pointer, and we should use the ICOM_CALL
|
||||
* method in the other cases. This time I could have used a trick to use only one macro whatever
|
||||
* the number of parameters but I prefered to have it work the same way as above.
|
||||
* - You probably have noticed that we don't define the fields we need to actually implement this
|
||||
* interface: reference count, pointer to other resources and miscellaneous fields. That's
|
||||
* because it's not needed, and the user will anyway only manipulate pointers to this structure
|
||||
* so he does not need to know its real size. Of course on the implementation side we have the
|
||||
* real definition of the interface structure and they should match what the macros yield in
|
||||
* each language (or conversely).
|
||||
*
|
||||
*
|
||||
* In C this gives:
|
||||
* typedef struct IDirect3D_VTABLE IDirect3D_VTABLE;
|
||||
* struct IDirect3D {
|
||||
* IDirect3D_VTABLE* lpvtbl;
|
||||
* };
|
||||
* struct IDirect3D_VTABLE {
|
||||
* IUnknown_VTABLE bvt;
|
||||
* HRESULT (*fnInitialize)(IDirect3D* me, REFIID a);
|
||||
* HRESULT (*fnEnumDevices)(IDirect3D* me, LPD3DENUMDEVICESCALLBACK a, LPVOID b);
|
||||
* HRESULT (*fnCreateLight)(IDirect3D* me, LPDIRECT3DLIGHT* a, IUnknown* b);
|
||||
* HRESULT (*fnCreateMaterial)(IDirect3D* me, LPDIRECT3DMATERIAL* a, IUnknown* b);
|
||||
* HRESULT (*fnCreateViewport)(IDirect3D* me, LPDIRECT3DVIEWPORT* a, IUnknown* b);
|
||||
* HRESULT (*fnFindDevice)(IDirect3D* me, LPD3DFINDDEVICESEARCH a, LPD3DFINDDEVICERESULT b);
|
||||
* };
|
||||
*
|
||||
* #if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
* // *** IUnknown methods *** //
|
||||
* #define IDirect3D_QueryInterface(p,a,b) ((IUnknown_VTABLE*)(p)->lpvtbl)->fnQueryInterface((IUnknown*)p,a,b)
|
||||
* #define IDirect3D_AddRef(p) ((IUnknown_VTABLE*)(p)->lpvtbl)->fnAddRef((IUnknown*)p)
|
||||
* #define IDirect3D_Release(p) ((IUnknown_VTABLE*)(p)->lpvtbl)->fnRelease((IUnknown*)p)
|
||||
* // *** IDirect3D methods *** //
|
||||
* #define IDirect3D_Initialize(p,a) (p)->lpvtbl->fnInitialize(p,a)
|
||||
* #define IDirect3D_EnumDevices(p,a,b) (p)->lpvtbl->fnEnumDevice(p,a,b)
|
||||
* #define IDirect3D_CreateLight(p,a,b) (p)->lpvtbl->fnCreateLight(p,a,b)
|
||||
* #define IDirect3D_CreateMaterial(p,a,b) (p)->lpvtbl->fnCreateMaterial(p,a,b)
|
||||
* #define IDirect3D_CreateViewport(p,a,b) (p)->lpvtbl->fnCreateViewport(p,a,b)
|
||||
* #define IDirect3D_FindDevice(p,a,b) (p)->lpvtbl->fnFindDevice(p,a,b)
|
||||
* #endif
|
||||
*
|
||||
* Comments:
|
||||
* - IDirect3D only contains a pointer to the IDirect3D virtual/jump table. This is the only thing
|
||||
* the user needs to know to use the interface. Of course the structure we will define to
|
||||
* implement this interface will have more fields but the first one will match this pointer.
|
||||
* - The code generated by ICOM_BEGIN goes up to the bvt field in the IDirect3D virtual table.
|
||||
* This bvt field is what saves us from having to duplicate the inherited method definitions.
|
||||
* It's a shame that C (gcc) will not allow unnamed structs. If this was possible we could
|
||||
* seamlessly inherit and use the parent's interface function pointers.
|
||||
* - What follows is just a bunch of function pointer definitions generated by the ICOM_METHOD
|
||||
* macros. The implementation will fill this jump table with appropriate values in a static
|
||||
* variable and initialize the lpvtbl field to point to this variable.
|
||||
* - The IDirect3D_Xxx macros then just derefence the lpvtbl pointer and use the function pointer
|
||||
* corresponding to the macro name. This emulates the behavior of a virtual table and should be
|
||||
* about as fast. In the case of inherited methods we have some additional casting to do to
|
||||
* because the inherited methods are defined in the bvt field or maybe further imbricated. Since
|
||||
* the effect of the bvt field is that we inherit the parent virtual table fields this cast is
|
||||
* relatively inocuous. A similar cast must be performed on the interface pointer before the
|
||||
* invoked method will accept it. Despite all these casts there is little chance that you call a
|
||||
* method on the wrong type of interface because the function names still have to match. But this
|
||||
* is the only thing that will make the compilation fail.
|
||||
*
|
||||
*
|
||||
* And in C++ (with gcc's g++):
|
||||
*
|
||||
* typedef struct IDirect3D: public IUnknown {
|
||||
* private: HRESULT (*fnInitialize)(IDirect3D* me, REFIID a);
|
||||
* public: inline HRESULT Initialize(REFIID a) { return ((IDirect3D*)t.lpvtbl)->fnInitialize(this,a); };
|
||||
* private: HRESULT (*fnEnumDevices)(IDirect3D* me, LPD3DENUMDEVICESCALLBACK a, LPVOID b);
|
||||
* public: inline HRESULT EnumDevices(LPD3DENUMDEVICESCALLBACK a, LPVOID b)
|
||||
* { return ((IDirect3D*)t.lpvtbl)->fnEnumDevices(this,a,b); };
|
||||
* private: HRESULT (*fnCreateLight)(IDirect3D* me, LPDIRECT3DLIGHT* a, IUnknown* b);
|
||||
* public: inline HRESULT CreateLight(LPDIRECT3DLIGHT* a, IUnknown* b)
|
||||
* { return ((IDirect3D*)t.lpvtbl)->fnCreateLight(this,a,b); };
|
||||
* private: HRESULT (*fnCreateMaterial)(IDirect3D* me, LPDIRECT3DMATERIAL* a, IUnknown* b);
|
||||
* public: inline HRESULT CreateMaterial(LPDIRECT3DMATERIAL* a, IUnknown* b)
|
||||
* { return ((IDirect3D*)t.lpvtbl)->fnCreateMaterial(this,a,b); };
|
||||
* private: HRESULT (*fnCreateViewport)(IDirect3D* me, LPDIRECT3DVIEWPORT* a, IUnknown* b);
|
||||
* public: inline HRESULT CreateViewport(LPDIRECT3DVIEWPORT* a, IUnknown* b)
|
||||
* { return ((IDirect3D*)t.lpvtbl)->fnCreateViewport(this,a,b); };
|
||||
* private: HRESULT (*fnFindDevice)(IDirect3D* me, LPD3DFINDDEVICESEARCH a, LPD3DFINDDEVICERESULT b);
|
||||
* public: inline HRESULT FindDevice(LPD3DFINDDEVICESEARCH a, LPD3DFINDDEVICERESULT b)
|
||||
* { return ((IDirect3D*)t.lpvtbl)->fnFindDevice(this,a,b); };
|
||||
* };
|
||||
*
|
||||
* Comments:
|
||||
* - In C++ IDirect3D does double duty as both the virtual/jump table and as the interface
|
||||
* definition. The reason for this is to avoid having to duplicate the mehod definitions: once
|
||||
* to have the function pointers in the jump table and once to have the methods in the interface
|
||||
* class. Here one macro can generate both. This means though that the first pointer, t.lpvtbl
|
||||
* defined in IUnknown, must be interpreted as the jump table pointer if we interpret the
|
||||
* structure as the the interface class, and as the function pointer to the QueryInterface
|
||||
* method, t.fnQueryInterface, if we interpret the structure as the jump table. Fortunately this
|
||||
* gymnastic is entirely taken care of in the header of IUnknown.
|
||||
* - Of course in C++ we use inheritance so that we don't have to duplicate the method definitions.
|
||||
* - Since IDirect3D does double duty, each ICOM_METHOD macro defines both a function pointer and
|
||||
* a non-vritual inline method which dereferences it and calls it. This way this method behaves
|
||||
* just like a virtual method but does not create a true C++ virtual table which would break the
|
||||
* structure layout. If you look at the implementation of these methods you'll notice that they
|
||||
* would not work for void functions. We have to return something and fortunately this seems to
|
||||
* be what all the COM methods do (otherwise we would need another set of macros).
|
||||
* - Note how the ICOM_METHOD generates both function prototypes mixing types and formal parameter
|
||||
* names and the method invocation using only the formal parameter name. This is the reason why
|
||||
* we need different macros to handle different numbers of parameters.
|
||||
* - Finally there is no IDirect3D_Xxx macro. These are not needed in C++ unless the CINTERFACE
|
||||
* macro is defined in which case we would not be here.
|
||||
*
|
||||
*
|
||||
* Implementing a COM interface.
|
||||
*
|
||||
* This continues the above example.I assume the implementation is in C but it would probably
|
||||
* be similar in C++.
|
||||
*
|
||||
* typedef struct _IDirect3D {
|
||||
* void* lpvtbl;
|
||||
* // ...
|
||||
*
|
||||
* } _IDirect3D;
|
||||
*
|
||||
* static ICOM_VTABLE(IDirect3D) d3dvt;
|
||||
*
|
||||
* // implement the IDirect3D methods here
|
||||
*
|
||||
* int IDirect3D_fnQueryInterface(LPUNKNOWN me)
|
||||
* {
|
||||
* ICOM_THIS(IDirect3D,me);
|
||||
* // ...
|
||||
* }
|
||||
*
|
||||
* // ...
|
||||
*
|
||||
* static ICOM_VTABLE(IDirect3D) d3dvt = {
|
||||
* {
|
||||
* IDirect3D_fnQueryInterface,
|
||||
* IUnknown_fnAdd,
|
||||
* IUnknown_fnAdd2
|
||||
* },
|
||||
* IDirect3D_fnInitialize,
|
||||
* IDirect3D_fnSetWidth
|
||||
* };
|
||||
*
|
||||
* Comments:
|
||||
* - We first define what the interface really contains. This is th e_IDirect3D structure. The
|
||||
* first field must of course be the virtual table pointer. Everything else is free.
|
||||
* - Then we predeclare our static virtual table variable, we will need its address in some
|
||||
* methods to initialize the virtual table pointer of the returned interface objects.
|
||||
* - Then we implement the interface methods. To match what has been declared in the header file
|
||||
* they must take a pointer to a IDirect3D structure so we must cast it to an _IDirect3D so that
|
||||
* we can manipulate the fields. This is performed by the ICOM_THIS macro.
|
||||
* - Finally we initialize the virtual table. The inherited methods must be in curly brackets to
|
||||
* match the parent interface's virtual table definition.
|
||||
*/
|
||||
|
||||
|
||||
#define ICOM_VTABLE(iface) iface##_VTABLE
|
||||
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
/* C++ interface */
|
||||
|
||||
#define ICOM_BEGIN(iface,ibase) \
|
||||
typedef struct iface: public ibase {
|
||||
|
||||
|
||||
#define ICOM_METHOD(ret,xfn) \
|
||||
private: ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me); \
|
||||
public: inline ret (CALLBACK xfn)(void) { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this); };
|
||||
|
||||
#define ICOM_METHOD1(ret,xfn,ta,na) \
|
||||
private: ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a); \
|
||||
public: inline ret (CALLBACK xfn)(ta a) { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a); };
|
||||
|
||||
#define ICOM_METHOD2(ret,xfn,ta,na,tb,nb) \
|
||||
private: ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b); \
|
||||
public: inline ret (CALLBACK xfn)(ta a,tb b) { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b); };
|
||||
|
||||
#define ICOM_METHOD3(ret,xfn,ta,na,tb,nb,tc,nc) \
|
||||
private: ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c); \
|
||||
public: inline ret (CALLBACK xfn)(ta a,tb b,tc c) { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c); };
|
||||
|
||||
#define ICOM_METHOD4(ret,xfn,ta,na,tb,nb,tc,nc,td,nd) \
|
||||
private: ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d); \
|
||||
public: inline ret (CALLBACK xfn)(ta a,tb b,tc c,td d) { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d); };
|
||||
|
||||
#define ICOM_METHOD5(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne) \
|
||||
private: ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e); \
|
||||
public: inline ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e) { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e); };
|
||||
|
||||
#define ICOM_METHOD6(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf) \
|
||||
private: ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f); \
|
||||
public: inline ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f) { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e,f); };
|
||||
|
||||
#define ICOM_METHOD7(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng) \
|
||||
private: ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f,tg g); \
|
||||
public: inline ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g) { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e,f,g); };
|
||||
|
||||
|
||||
#define ICOM_CMETHOD(ret,xfn) \
|
||||
private: ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me); \
|
||||
public: inline ret (CALLBACK xfn)(void) const { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this); };
|
||||
|
||||
#define ICOM_CMETHOD1(ret,xfn,ta,na) \
|
||||
private: ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a); \
|
||||
public: inline ret (CALLBACK xfn)(ta a) const { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a); };
|
||||
|
||||
#define ICOM_CMETHOD2(ret,xfn,ta,na,tb,nb) \
|
||||
private: ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b); \
|
||||
public: inline ret (CALLBACK xfn)(ta a,tb b) const { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b); };
|
||||
|
||||
#define ICOM_CMETHOD3(ret,xfn,ta,na,tb,nb,tc,nc) \
|
||||
private: ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c); \
|
||||
public: inline ret (CALLBACK xfn)(ta a,tb b,tc c) const { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c); };
|
||||
|
||||
#define ICOM_CMETHOD4(ret,xfn,ta,na,tb,nb,tc,nc,td,nd) \
|
||||
private: ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d); \
|
||||
public: inline ret (CALLBACK xfn)(ta a,tb b,tc c,td d) const { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d); };
|
||||
|
||||
#define ICOM_CMETHOD5(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne) \
|
||||
private: ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e); \
|
||||
public: inline ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e) const { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e); };
|
||||
|
||||
#define ICOM_CMETHOD6(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf) \
|
||||
private: ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f); \
|
||||
public: inline ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f) const { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e,f); };
|
||||
|
||||
#define ICOM_CMETHOD7(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng) \
|
||||
private: ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f,tg g); \
|
||||
public: inline ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g) const { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e,f,g); };
|
||||
|
||||
|
||||
#define ICOM_VMETHOD(xfn) \
|
||||
private: void (CALLBACK *fn##xfn)(ICOM_INTERFACE* me); \
|
||||
public: inline void (CALLBACK xfn)(void) { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this); };
|
||||
|
||||
#define ICOM_VMETHOD1(xfn,ta,na) \
|
||||
private: void (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a); \
|
||||
public: inline void (CALLBACK xfn)(ta a) { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a); };
|
||||
|
||||
#define ICOM_VMETHOD2(xfn,ta,na,tb,nb) \
|
||||
private: void (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b); \
|
||||
public: inline void (CALLBACK xfn)(ta a,tb b) { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b); };
|
||||
|
||||
#define ICOM_VMETHOD3(xfn,ta,na,tb,nb,tc,nc) \
|
||||
private: void (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c); \
|
||||
public: inline void (CALLBACK xfn)(ta a,tb b,tc c) { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c); };
|
||||
|
||||
#define ICOM_VMETHOD4(xfn,ta,na,tb,nb,tc,nc,td,nd) \
|
||||
private: void (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d); \
|
||||
public: inline void (CALLBACK xfn)(ta a,tb b,tc c,td d) { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d); };
|
||||
|
||||
#define ICOM_VMETHOD5(xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne) \
|
||||
private: void (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e); \
|
||||
public: inline void (CALLBACK xfn)(ta a,tb b,tc c,td d,te e) { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e); };
|
||||
|
||||
#define ICOM_VMETHOD6(xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf) \
|
||||
private: void (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f); \
|
||||
public: inline void (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f) { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e,f); };
|
||||
|
||||
#define ICOM_VMETHOD7(xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng) \
|
||||
private: void (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f,tg g); \
|
||||
public: inline void (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g) { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e,f,g); };
|
||||
|
||||
|
||||
#define ICOM_CVMETHOD(xfn) \
|
||||
private: void (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me); \
|
||||
public: inline void (CALLBACK xfn)(void) const { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this); };
|
||||
|
||||
#define ICOM_CVMETHOD1(xfn,ta,na) \
|
||||
private: void (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a); \
|
||||
public: inline void (CALLBACK xfn)(ta a) const { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a); };
|
||||
|
||||
#define ICOM_CVMETHOD2(xfn,ta,na,tb,nb) \
|
||||
private: void (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b); \
|
||||
public: inline void (CALLBACK xfn)(ta a,tb b) const { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b); };
|
||||
|
||||
#define ICOM_CVMETHOD3(xfn,ta,na,tb,nb,tc,nc) \
|
||||
private: void (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c); \
|
||||
public: inline void (CALLBACK xfn)(ta a,tb b,tc c) const { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c); };
|
||||
|
||||
#define ICOM_CVMETHOD4(xfn,ta,na,tb,nb,tc,nc,td,nd) \
|
||||
private: void (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d); \
|
||||
public: inline void (CALLBACK xfn)(ta a,tb b,tc c,td d) const { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d); };
|
||||
|
||||
#define ICOM_CVMETHOD5(xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne) \
|
||||
private: void (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e); \
|
||||
public: inline void (CALLBACK xfn)(ta a,tb b,tc c,td d,te e) const { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e); };
|
||||
|
||||
#define ICOM_CVMETHOD6(xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf) \
|
||||
private: void (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f); \
|
||||
public: inline void (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f) const { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e,f); };
|
||||
|
||||
#define ICOM_CVMETHOD7(xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng) \
|
||||
private: void (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f,tg g); \
|
||||
public: inline void (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g) const { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e,f,g); };
|
||||
|
||||
|
||||
#define ICOM_END(iface) \
|
||||
};
|
||||
|
||||
#define ICOM_ICALL(ibase, xfn, p) this_is_a_syntax_error
|
||||
#define ICOM_ICALL1(ibase, xfn, p,a) this_is_a_syntax_error
|
||||
#define ICOM_ICALL2(ibase, xfn, p,a,b) this_is_a_syntax_error
|
||||
#define ICOM_ICALL3(ibase, xfn, p,a,b,c) this_is_a_syntax_error
|
||||
#define ICOM_ICALL4(ibase, xfn, p,a,b,c,d) this_is_a_syntax_error
|
||||
#define ICOM_ICALL5(ibase, xfn, p,a,b,c,d,e) this_is_a_syntax_error
|
||||
#define ICOM_ICALL6(ibase, xfn, p,a,b,c,d,e,f) this_is_a_syntax_error
|
||||
#define ICOM_ICALL7(ibase, xfn, p,a,b,c,d,e,f,g) this_is_a_syntax_error
|
||||
|
||||
#define ICOM_CALL(xfn, p) this_is_a_syntax_error
|
||||
#define ICOM_CALL1(xfn, p,a) this_is_a_syntax_error
|
||||
#define ICOM_CALL2(xfn, p,a,b) this_is_a_syntax_error
|
||||
#define ICOM_CALL3(xfn, p,a,b,c) this_is_a_syntax_error
|
||||
#define ICOM_CALL4(xfn, p,a,b,c,d) this_is_a_syntax_error
|
||||
#define ICOM_CALL5(xfn, p,a,b,c,d,e) this_is_a_syntax_error
|
||||
#define ICOM_CALL6(xfn, p,a,b,c,d,e,f) this_is_a_syntax_error
|
||||
#define ICOM_CALL7(xfn, p,a,b,c,d,e,f,g) this_is_a_syntax_error
|
||||
|
||||
|
||||
#else
|
||||
/* C interface */
|
||||
|
||||
|
||||
#define ICOM_BEGIN(iface,ibase) \
|
||||
typedef struct ICOM_VTABLE(iface) ICOM_VTABLE(iface); \
|
||||
struct iface { \
|
||||
const ICOM_VTABLE(iface)* lpvtbl; \
|
||||
}; \
|
||||
struct ICOM_VTABLE(iface) { \
|
||||
ICOM_VTABLE(ibase) bvt;
|
||||
|
||||
|
||||
#define ICOM_METHOD(ret,xfn) \
|
||||
ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me);
|
||||
|
||||
#define ICOM_METHOD1(ret,xfn,ta,na) \
|
||||
ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a);
|
||||
|
||||
#define ICOM_METHOD2(ret,xfn,ta,na,tb,nb) \
|
||||
ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b);
|
||||
|
||||
#define ICOM_METHOD3(ret,xfn,ta,na,tb,nb,tc,nc) \
|
||||
ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c);
|
||||
|
||||
#define ICOM_METHOD4(ret,xfn,ta,na,tb,nb,tc,nc,td,nd) \
|
||||
ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d);
|
||||
|
||||
#define ICOM_METHOD5(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne) \
|
||||
ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e);
|
||||
|
||||
#define ICOM_METHOD6(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf) \
|
||||
ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f);
|
||||
|
||||
#define ICOM_METHOD7(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng) \
|
||||
ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f,tg g);
|
||||
|
||||
|
||||
#define ICOM_CMETHOD(ret,xfn) \
|
||||
ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me);
|
||||
|
||||
#define ICOM_CMETHOD1(ret,xfn,ta,na) \
|
||||
ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a);
|
||||
|
||||
#define ICOM_CMETHOD2(ret,xfn,ta,na,tb,nb) \
|
||||
ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b);
|
||||
|
||||
#define ICOM_CMETHOD3(ret,xfn,ta,na,tb,nb,tc,nc) \
|
||||
ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c);
|
||||
|
||||
#define ICOM_CMETHOD4(ret,xfn,ta,na,tb,nb,tc,nc,td,nd) \
|
||||
ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d);
|
||||
|
||||
#define ICOM_CMETHOD5(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne) \
|
||||
ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e);
|
||||
|
||||
#define ICOM_CMETHOD6(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf) \
|
||||
ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f);
|
||||
|
||||
#define ICOM_CMETHOD7(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng) \
|
||||
ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f,tg g);
|
||||
|
||||
|
||||
#define ICOM_VMETHOD(xfn) \
|
||||
void (CALLBACK *fn##xfn)(ICOM_INTERFACE* me);
|
||||
|
||||
#define ICOM_VMETHOD1(xfn,ta,na) \
|
||||
void (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a);
|
||||
|
||||
#define ICOM_VMETHOD2(xfn,ta,na,tb,nb) \
|
||||
void (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b);
|
||||
|
||||
#define ICOM_VMETHOD3(xfn,ta,na,tb,nb,tc,nc) \
|
||||
void (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c);
|
||||
|
||||
#define ICOM_VMETHOD4(xfn,ta,na,tb,nb,tc,nc,td,nd) \
|
||||
void (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d);
|
||||
|
||||
#define ICOM_VMETHOD5(xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne) \
|
||||
void (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e);
|
||||
|
||||
#define ICOM_VMETHOD6(xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf) \
|
||||
void (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f);
|
||||
|
||||
#define ICOM_VMETHOD7(xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng) \
|
||||
void (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f,tg g);
|
||||
|
||||
|
||||
#define ICOM_CVMETHOD(xfn) \
|
||||
void (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me);
|
||||
|
||||
#define ICOM_CVMETHOD1(xfn,ta,na) \
|
||||
void (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a);
|
||||
|
||||
#define ICOM_CVMETHOD2(xfn,ta,na,tb,nb) \
|
||||
void (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b);
|
||||
|
||||
#define ICOM_CVMETHOD3(xfn,ta,na,tb,nb,tc,nc) \
|
||||
void (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c);
|
||||
|
||||
#define ICOM_CVMETHOD4(xfn,ta,na,tb,nb,tc,nc,td,nd) \
|
||||
void (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d);
|
||||
|
||||
#define ICOM_CVMETHOD5(xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne) \
|
||||
void (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e);
|
||||
|
||||
#define ICOM_CVMETHOD6(xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf) \
|
||||
void (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f);
|
||||
|
||||
#define ICOM_CVMETHOD7(xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng) \
|
||||
void (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f,tg g);
|
||||
|
||||
|
||||
#define ICOM_END(iface) \
|
||||
};
|
||||
|
||||
#define ICOM_ICALL(ibase, xfn, p) ((ICOM_VTABLE(ibase)*)(p)->lpvtbl)->fn##xfn((ibase*)p)
|
||||
#define ICOM_ICALL1(ibase, xfn, p,a) ((ICOM_VTABLE(ibase)*)(p)->lpvtbl)->fn##xfn((ibase*)p,a)
|
||||
#define ICOM_ICALL2(ibase, xfn, p,a,b) ((ICOM_VTABLE(ibase)*)(p)->lpvtbl)->fn##xfn((ibase*)p,a,b)
|
||||
#define ICOM_ICALL3(ibase, xfn, p,a,b,c) ((ICOM_VTABLE(ibase)*)(p)->lpvtbl)->fn##xfn((ibase*)p,a,b,c)
|
||||
#define ICOM_ICALL4(ibase, xfn, p,a,b,c,d) ((ICOM_VTABLE(ibase)*)(p)->lpvtbl)->fn##xfn((ibase*)p,a,b,c,d)
|
||||
#define ICOM_ICALL5(ibase, xfn, p,a,b,c,d,e) ((ICOM_VTABLE(ibase)*)(p)->lpvtbl)->fn##xfn((ibase*)p,a,b,c,d,e)
|
||||
#define ICOM_ICALL6(ibase, xfn, p,a,b,c,d,e,f) ((ICOM_VTABLE(ibase)*)(p)->lpvtbl)->fn##xfn((ibase*)p,a,b,c,d,e,f)
|
||||
#define ICOM_ICALL7(ibase, xfn, p,a,b,c,d,e,f,g) ((ICOM_VTABLE(ibase)*)(p)->lpvtbl)->fn##xfn((ibase*)p,a,b,c,d,e,f,g)
|
||||
|
||||
#define ICOM_CALL(xfn, p) (p)->lpvtbl->fn##xfn(p)
|
||||
#define ICOM_CALL1(xfn, p,a) (p)->lpvtbl->fn##xfn(p,a)
|
||||
#define ICOM_CALL2(xfn, p,a,b) (p)->lpvtbl->fn##xfn(p,a,b)
|
||||
#define ICOM_CALL3(xfn, p,a,b,c) (p)->lpvtbl->fn##xfn(p,a,b,c)
|
||||
#define ICOM_CALL4(xfn, p,a,b,c,d) (p)->lpvtbl->fn##xfn(p,a,b,c,d)
|
||||
#define ICOM_CALL5(xfn, p,a,b,c,d,e) (p)->lpvtbl->fn##xfn(p,a,b,c,d,e)
|
||||
#define ICOM_CALL6(xfn, p,a,b,c,d,e,f) (p)->lpvtbl->fn##xfn(p,a,b,c,d,e,f)
|
||||
#define ICOM_CALL7(xfn, p,a,b,c,d,e,f,g) (p)->lpvtbl->fn##xfn(p,a,b,c,d,e,f,g)
|
||||
|
||||
|
||||
#define ICOM_THIS(iface,me) struct _##iface* this=(struct _##iface*)me
|
||||
#define ICOM_CTHIS(iface,me) const _##iface* this=(const _##iface*)me
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* Predeclare the interfaces
|
||||
*/
|
||||
DEFINE_OLEGUID(IID_IClassFactory, 0x00000001L, 0, 0);
|
||||
typedef struct IClassFactory IClassFactory, *LPCLASSFACTORY;
|
||||
|
||||
DEFINE_OLEGUID(IID_IMalloc, 0x00000002L, 0, 0);
|
||||
typedef struct IMalloc16 IMalloc16,*LPMALLOC16;
|
||||
typedef struct IMalloc32 IMalloc32,*LPMALLOC32;
|
||||
DECL_WINELIB_TYPE(IMalloc)
|
||||
DECL_WINELIB_TYPE(LPMALLOC)
|
||||
|
||||
DEFINE_OLEGUID(IID_IUnknown, 0x00000000L, 0, 0);
|
||||
typedef struct IUnknown IUnknown, *LPUNKNOWN;
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IUnknown interface
|
||||
*/
|
||||
#define ICOM_INTERFACE IUnknown
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
struct IUnknown {
|
||||
union {
|
||||
const void* lpvtbl;
|
||||
HRESULT (CALLBACK *fnQueryInterface)(IUnknown* me, REFIID riid, LPVOID* ppvObj);
|
||||
} t;
|
||||
inline int QueryInterface(REFIID a, LPVOID* b) { return ((IUnknown*)t.lpvtbl)->t.fnQueryInterface(this,a,b); }
|
||||
#else
|
||||
typedef struct ICOM_VTABLE(IUnknown) ICOM_VTABLE(IUnknown);
|
||||
struct IUnknown {
|
||||
ICOM_VTABLE(IUnknown)* lpvtbl;
|
||||
};
|
||||
struct ICOM_VTABLE(IUnknown) {
|
||||
ICOM_METHOD2(HRESULT,QueryInterface,REFIID,riid, LPVOID*,ppvObj)
|
||||
#endif
|
||||
|
||||
ICOM_METHOD (ULONG,AddRef)
|
||||
ICOM_METHOD (ULONG,Release)
|
||||
#ifdef __WRC__
|
||||
}; /* FIXME: WRC does not support function macros and it is ICOM_END that is supposed to close the class */
|
||||
#else
|
||||
ICOM_END(IUnknown)
|
||||
#endif
|
||||
#undef ICOM_INTERFACE
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
/*** IUnknown methods ***/
|
||||
#define IUnknown_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
|
||||
#define IUnknown_AddRef(p) ICOM_CALL (AddRef,p)
|
||||
#define IUnknown_Release(p) ICOM_CALL (Release,p)
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IClassFactory interface
|
||||
*/
|
||||
#define ICOM_INTERFACE IClassFactory
|
||||
ICOM_BEGIN(IClassFactory,IUnknown)
|
||||
ICOM_METHOD3(HRESULT,CreateInstance, LPUNKNOWN,pUnkOuter, REFIID,riid, LPVOID*,ppvObject);
|
||||
ICOM_METHOD1(HRESULT,LockServer, BOOL32,fLock);
|
||||
ICOM_END(IClassFactory)
|
||||
#undef ICOM_INTERFACE
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
/*** IUnknown methods ***/
|
||||
#define IClassFactory_QueryInterface(p,a,b) ICOM_ICALL2(IUnknown,QueryInterface,p,a,b)
|
||||
#define IClassFactory_AddRef(p) ICOM_ICALL (IUnknown,AddRef,p)
|
||||
#define IClassFactory_Release(p) ICOM_ICALL (IUnknown,Release,p)
|
||||
/*** IClassFactory methods ***/
|
||||
#define IClassFactory_CreateInstance(p,a,b,c) ICOM_CALL3(CreateInstance,p,a,b,c)
|
||||
#define IClassFactory_LockServer(p,a) ICOM_CALL1(LockServer,p,a)
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IMalloc interface
|
||||
*/
|
||||
#define ICOM_INTERFACE IMalloc16
|
||||
ICOM_BEGIN(IMalloc16,IUnknown)
|
||||
ICOM_METHOD1 (LPVOID,Alloc, DWORD,cb);
|
||||
ICOM_METHOD2 (LPVOID,Realloc, LPVOID,pv, DWORD,cb);
|
||||
ICOM_VMETHOD1( Free, LPVOID,pv);
|
||||
ICOM_CMETHOD1(DWORD, GetSize, LPVOID,pv);
|
||||
ICOM_CMETHOD1(INT16, DidAlloc, LPVOID,pv);
|
||||
ICOM_METHOD (LPVOID,HeapMinimize);
|
||||
ICOM_END(IMalloc16)
|
||||
#undef ICOM_INTERFACE
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
/*** IUnknown methods ***/
|
||||
#define IMalloc16_QueryInterface(p,a,b) ICOM_ICALL2(IUnknown,QueryInterface,p,a,b)
|
||||
#define IMalloc16_AddRef(p) ICOM_ICALL (IUnknown,AddRef,p)
|
||||
#define IMalloc16_Release(p) ICOM_ICALL (IUnknown,Release,p)
|
||||
/*** IMalloc16 methods ***/
|
||||
#define IMalloc16_Alloc(p,a) ICOM_CALL1(Alloc,p,a)
|
||||
#define IMalloc16_Realloc(p,a,b) ICOM_CALL2(Realloc,p,a,b)
|
||||
#define IMalloc16_Free(p,a) ICOM_CALL1(Free,p,a)
|
||||
#define IMalloc16_GetSize(p,a) ICOM_CALL1(GetSize,p,a)
|
||||
#define IMalloc16_DidAlloc(p,a) ICOM_CALL1(DidAlloc,p,a)
|
||||
#define IMalloc16_HeapMinimize(p) ICOM_CALL (HeapMinimize,p)
|
||||
#endif
|
||||
|
||||
|
||||
#define ICOM_INTERFACE IMalloc32
|
||||
ICOM_BEGIN(IMalloc32,IUnknown)
|
||||
ICOM_METHOD1 (LPVOID,Alloc, DWORD,cb);
|
||||
ICOM_METHOD2 (LPVOID,Realloc, LPVOID,pv, DWORD,cb);
|
||||
ICOM_VMETHOD1( Free, LPVOID,pv);
|
||||
ICOM_CMETHOD1(DWORD, GetSize, LPVOID,pv);
|
||||
ICOM_CMETHOD1(INT32, DidAlloc, LPVOID,pv);
|
||||
ICOM_METHOD (LPVOID,HeapMinimize);
|
||||
ICOM_END(IMalloc32)
|
||||
#undef ICOM_INTERFACE
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
/*** IUnknown methods ***/
|
||||
#define IMalloc32_QueryInterface(p,a,b) ICOM_ICALL2(IUnknown,QueryInterface,p,a,b)
|
||||
#define IMalloc32_AddRef(p) ICOM_ICALL (IUnknown,AddRef,p)
|
||||
#define IMalloc32_Release(p) ICOM_ICALL (IUnknown,Release,p)
|
||||
/*** IMalloc32 methods ***/
|
||||
#define IMalloc32_Alloc(p,a) ICOM_CALL1(Alloc,p,a)
|
||||
#define IMalloc32_Realloc(p,a,b) ICOM_CALL2(Realloc,p,a,b)
|
||||
#define IMalloc32_Free(p,a) ICOM_CALL1(Free,p,a)
|
||||
#define IMalloc32_GetSize(p,a) ICOM_CALL1(GetSize,p,a)
|
||||
#define IMalloc32_DidAlloc(p,a) ICOM_CALL1(DidAlloc,p,a)
|
||||
#define IMalloc32_HeapMinimize(p) ICOM_CALL (HeapMinimize,p)
|
||||
|
||||
#ifndef __WINE__
|
||||
/* Duplicated for WINELIB */
|
||||
/*** IUnknown methods ***/
|
||||
#define IMalloc_QueryInterface(p,a,b) ICOM_ICALL2(IUnknown,QueryInterface,p,a,b)
|
||||
#define IMalloc_AddRef(p) ICOM_ICALL (IUnknown,AddRef,p)
|
||||
#define IMalloc_Release(p) ICOM_ICALL (IUnknown,Release,p)
|
||||
/*** IMalloc methods ***/
|
||||
#define IMalloc_Alloc(p,a) ICOM_CALL1(Alloc,p,a)
|
||||
#define IMalloc_Realloc(p,a,b) ICOM_CALL2(Realloc,p,a,b)
|
||||
#define IMalloc_Free(p,a) ICOM_CALL1(Free,p,a)
|
||||
#define IMalloc_GetSize(p,a) ICOM_CALL1(GetSize,p,a)
|
||||
#define IMalloc_DidAlloc(p,a) ICOM_CALL1(DidAlloc,p,a)
|
||||
#define IMalloc_HeapMinimize(p) ICOM_CALL (HeapMinimize,p)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
HRESULT WINAPI CoCreateStandardMalloc16(DWORD dwMemContext, LPMALLOC16* lpMalloc);
|
||||
#define CoCreateStandardMalloc WINELIB_NAME(CoCreateStandardMalloc)
|
||||
|
||||
HRESULT WINAPI CoGetMalloc16(DWORD dwMemContext,LPMALLOC16* lpMalloc);
|
||||
HRESULT WINAPI CoGetMalloc32(DWORD dwMemContext,LPMALLOC32* lpMalloc);
|
||||
#define CoGetMalloc WINELIB_NAME(CoGetMalloc)
|
||||
|
||||
|
||||
#endif /* __WINE_WINE_OBJ_BASE_H */
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* Defines undocumented Microsoft COM interfaces and APIs seemingly related to some 'channel' notion.
|
||||
*
|
||||
* Depends on 'obj_base.h'.
|
||||
*/
|
||||
|
||||
#ifndef __WINE_WINE_OBJ_CHANNEL_H
|
||||
#define __WINE_WINE_OBJ_CHANNEL_H
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* Predeclare the interfaces
|
||||
*/
|
||||
DEFINE_GUID (IID_IChannelHook, 0x1008c4a0L, 0x7613, 0x11cf, 0x9a, 0xf1, 0x00, 0x20, 0xaf, 0x6e, 0x72, 0xf4);
|
||||
typedef struct IChannelHook IChannelHook,*LPCHANNELHOOK;
|
||||
|
||||
DEFINE_GUID (IID_IPSFactoryBuffer, 0xd5f569d0L, 0x593b, 0x101a, 0xb5, 0x69, 0x08, 0x00, 0x2b, 0x2d, 0xbf, 0x7a);
|
||||
typedef struct IPSFactoryBuffer IPSFactoryBuffer,*LPPSFACTORYBUFFER;
|
||||
|
||||
DEFINE_GUID (IID_IRpcChannelBuffer, 0xd5f56b60L, 0x593b, 0x101a, 0xb5, 0x69, 0x08, 0x00, 0x2b, 0x2d, 0xbf, 0x7a);
|
||||
typedef struct IRpcChannelBuffer IRpcChannelBuffer,*LPRPCCHANNELBUFFER;
|
||||
|
||||
DEFINE_GUID (IID_IRpcProxyBuffer, 0xd5f56a34L, 0x593b, 0x101a, 0xb5, 0x69, 0x08, 0x00, 0x2b, 0x2d, 0xbf, 0x7a);
|
||||
typedef struct IRpcProxyBuffer IRpcProxyBuffer,*LPRPCPROXYBUFFER;
|
||||
|
||||
DEFINE_GUID (IID_IRpcStubBuffer, 0xd5f56afcL, 0x593b, 0x101a, 0xb5, 0x69, 0x08, 0x00, 0x2b, 0x2d, 0xbf, 0x7a);
|
||||
typedef struct IRpcStubBuffer IRpcStubBuffer,*LPRPCSTUBBUFFER;
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IChannelHook interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IPSFactoryBuffer interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IRpcChannelBuffer interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IRpcProxyBuffer interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IRpcStubBuffer interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
#endif /* __WINE_WINE_OBJ_CHANNEL_H */
|
|
@ -0,0 +1,57 @@
|
|||
/*
|
||||
* Defines the COM interfaces and APIs related to client/server aspects.
|
||||
*
|
||||
* Depends on 'obj_base.h'.
|
||||
*/
|
||||
|
||||
#ifndef __WINE_WINE_OBJ_CLIENTSERVER_H
|
||||
#define __WINE_WINE_OBJ_CLIENTSERVER_H
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* Predeclare the interfaces
|
||||
*/
|
||||
DEFINE_OLEGUID(IID_IClientSecurity, 0x0000013dL, 0, 0);
|
||||
typedef struct IClientSecurity IClientSecurity,*LPCLIENTSECURITY;
|
||||
|
||||
DEFINE_OLEGUID(IID_IExternalConnection, 0x00000019L, 0, 0);
|
||||
typedef struct IExternalConnection IExternalConnection,*LPEXTERNALCONNECTION;
|
||||
|
||||
DEFINE_OLEGUID(IID_IMessageFilter, 0x00000016L, 0, 0);
|
||||
typedef struct IMessageFilter IMessageFilter,*LPMESSAGEFILTER;
|
||||
|
||||
DEFINE_OLEGUID(IID_IServerSecurity, 0x0000013eL, 0, 0);
|
||||
typedef struct IServerSecurity IServerSecurity,*LPSERVERSECURITY;
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IClientSecurity interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IExternalConnection interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
HRESULT WINAPI CoDisconnectObject(LPUNKNOWN lpUnk, DWORD reserved);
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IMessageFilter interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
HRESULT WINAPI CoRegisterMessageFilter16(LPMESSAGEFILTER lpMessageFilter,LPMESSAGEFILTER *lplpMessageFilter);
|
||||
HRESULT WINAPI CoRegisterMessageFilter32(LPMESSAGEFILTER lpMessageFilter,LPMESSAGEFILTER *lplpMessageFilter);
|
||||
#define CoRegisterMessageFilter WINELIB_NAME(CoRegisterMessageFilter)
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IServerSecurity interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
#endif /* __WINE_WINE_OBJ_CLIENTSERVER_H */
|
|
@ -0,0 +1,192 @@
|
|||
/*
|
||||
* Defines the COM interfaces and APIs related to IDataObject.
|
||||
*
|
||||
* Depends on 'obj_moniker.h', 'obj_storage.h' and 'obj_base.h'.
|
||||
*/
|
||||
|
||||
#ifndef __WINE_WINE_OBJ_DATAOBJECT_H
|
||||
#define __WINE_WINE_OBJ_DATAOBJECT_H
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* Predeclare the structures
|
||||
*/
|
||||
typedef struct DVTARGETDEVICE32 DVTARGETDEVICE32, *LPDVTARGETDEVICE32;
|
||||
DECL_WINELIB_TYPE(DVTARGETDEVICE)
|
||||
DECL_WINELIB_TYPE(LPDVTARGETDEVICE)
|
||||
|
||||
typedef struct FORMATETC32 FORMATETC32, *LPFORMATETC32;
|
||||
DECL_WINELIB_TYPE(FORMATETC)
|
||||
DECL_WINELIB_TYPE(LPFORMATETC)
|
||||
|
||||
typedef struct STGMEDIUM32 STGMEDIUM32, *LPSTGMEDIUM32;
|
||||
DECL_WINELIB_TYPE(STGMEDIUM)
|
||||
DECL_WINELIB_TYPE(LPSTGMEDIUM)
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* Predeclare the interfaces
|
||||
*/
|
||||
DEFINE_OLEGUID(IID_IAdviseSink, 0x0000010fL, 0, 0);
|
||||
typedef struct IAdviseSink IAdviseSink,*LPADVISESINK;
|
||||
|
||||
DEFINE_OLEGUID(IID_IAdviseSink2, 0x00000125L, 0, 0);
|
||||
typedef struct IAdviseSink2 IAdviseSink2,*LPADVISESINK2;
|
||||
|
||||
DEFINE_OLEGUID(IID_IDataAdviseHolder, 0x00000110L, 0, 0);
|
||||
typedef struct IDataAdviseHolder IDataAdviseHolder,*LPDATAADVISEHOLDER;
|
||||
|
||||
DEFINE_OLEGUID(IID_IDataObject, 0x0000010EL, 0, 0);
|
||||
typedef struct IDataObject IDataObject,*LPDATAOBJECT;
|
||||
|
||||
DEFINE_OLEGUID(IID_IEnumFORMATETC, 0x00000103L, 0, 0);
|
||||
typedef struct IEnumFORMATETC IEnumFORMATETC,*LPENUMFORMATETC;
|
||||
|
||||
DEFINE_OLEGUID(IID_IEnumSTATDATA, 0x00000105L, 0, 0);
|
||||
typedef struct IEnumSTATDATA IEnumSTATDATA,*LPENUMSTATDATA;
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* DVTARGETDEVICE structure
|
||||
*/
|
||||
struct DVTARGETDEVICE32
|
||||
{
|
||||
DWORD tdSize;
|
||||
WORD tdDriverNameOffset;
|
||||
WORD tdDeviceNameOffset;
|
||||
WORD tdPortNameOffset;
|
||||
WORD tdExtDevmodeOffset;
|
||||
BYTE tdData[1];
|
||||
};
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* FORMATETC structure
|
||||
*/
|
||||
/* wished data format */
|
||||
struct FORMATETC32
|
||||
{
|
||||
CLIPFORMAT32 cfFormat;
|
||||
DVTARGETDEVICE32* ptd;
|
||||
DWORD dwAspect;
|
||||
LONG lindex;
|
||||
DWORD tymed;
|
||||
};
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* STGMEDIUM structure
|
||||
*/
|
||||
typedef enum tagTYMED
|
||||
{ TYMED_HGLOBAL = 1,
|
||||
TYMED_FILE = 2,
|
||||
TYMED_ISTREAM = 4,
|
||||
TYMED_ISTORAGE = 8,
|
||||
TYMED_GDI = 16,
|
||||
TYMED_MFPICT = 32,
|
||||
TYMED_ENHMF = 64,
|
||||
TYMED_NULL = 0
|
||||
} TYMED;
|
||||
|
||||
/* dataobject as answer to a request */
|
||||
struct STGMEDIUM32
|
||||
{
|
||||
DWORD tymed;
|
||||
union {
|
||||
HBITMAP32 hBitmap;
|
||||
HMETAFILEPICT32 hMetaFilePict;
|
||||
HENHMETAFILE32 hEnhMetaFile;
|
||||
HGLOBAL32 hGlobal;
|
||||
LPOLESTR32 lpszFileName;
|
||||
IStream32 *pstm;
|
||||
IStorage32 *pstg;
|
||||
} u;
|
||||
IUnknown *pUnkForRelease;
|
||||
};
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IAdviseSink interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IAdviseSink2 interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IDataAdviseHolder interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IDataObject interface
|
||||
*/
|
||||
#define ICOM_INTERFACE IDataObject
|
||||
ICOM_BEGIN(IDataObject,IUnknown)
|
||||
ICOM_METHOD2(HRESULT,GetData, LPFORMATETC32,pformatetcIn, STGMEDIUM32*,pmedium);
|
||||
ICOM_METHOD2(HRESULT,GetDataHere, LPFORMATETC32,pformatetc, STGMEDIUM32*,pmedium);
|
||||
ICOM_METHOD1(HRESULT,QueryGetData, LPFORMATETC32,pformatetc);
|
||||
ICOM_METHOD2(HRESULT,GetCanonicalFormatEtc, LPFORMATETC32,pformatectIn, LPFORMATETC32,pformatetcOut);
|
||||
ICOM_METHOD3(HRESULT,SetData, LPFORMATETC32,pformatetc, STGMEDIUM32*,pmedium, BOOL32,fRelease);
|
||||
ICOM_METHOD2(HRESULT,EnumFormatEtc, DWORD,dwDirection, IEnumFORMATETC**,ppenumFormatEtc);
|
||||
ICOM_METHOD4(HRESULT,DAdvise, LPFORMATETC32*,pformatetc, DWORD,advf, IAdviseSink*,pAdvSink, DWORD*,pdwConnection);
|
||||
ICOM_METHOD1(HRESULT,DUnadvise, DWORD,dwConnection);
|
||||
ICOM_METHOD1(HRESULT,EnumDAdvise, IEnumSTATDATA**,ppenumAdvise);
|
||||
ICOM_END(IDataObject)
|
||||
#undef ICOM_INTERFACE
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
/*** IUnknown methods ***/
|
||||
#define IDataObject_QueryInterface(p,a,b) ICOM_ICALL2(IUnknown,QueryInterface,p,a,b)
|
||||
#define IDataObject_AddRef(p) ICOM_ICALL (IUnknown,AddRef,p)
|
||||
#define IDataObject_Release(p) ICOM_ICALL (IUnknown,Release,p)
|
||||
/*** IDataObject methods ***/
|
||||
#define IDataObject_GetData(p,a,b) ICOM_CALL2(GetData,p,a,b)
|
||||
#define IDataObject_GetDataHere(p,a,b) ICOM_CALL2(GetDataHere,p,a,b)
|
||||
#define IDataObject_QueryGetData(p,a) ICOM_CALL1(QueryGetData,p,a)
|
||||
#define IDataObject_GetCanonicalFormatEtc(p,a,b) ICOM_CALL2(GetCanonicalFormatEtc,p,a,b)
|
||||
#define IDataObject_SetData(p,a,b,c) ICOM_CALL3(SetData,p,a,b,c)
|
||||
#define IDataObject_EnumFormatEtc(p,a,b) ICOM_CALL2(EnumFormatEtc,p,a,b)
|
||||
#define IDataObject_DAdvise(p,a,b,c,d) ICOM_CALL4(DAdvise,p,a,b,c,d)
|
||||
#define IDataObject_DUnadvise(p,a) ICOM_CALL1(DUnadvise,p,a)
|
||||
#define IDataObject_EnumDAdvise(p,a) ICOM_CALL1(EnumDAdvise,p,a)
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IEnumFORMATETC interface
|
||||
*/
|
||||
#define ICOM_INTERFACE IEnumFORMATETC
|
||||
ICOM_BEGIN(IEnumFORMATETC,IUnknown)
|
||||
ICOM_METHOD3(HRESULT,Next, ULONG,celt, FORMATETC32*,rgelt, ULONG*,pceltFethed);
|
||||
ICOM_METHOD1(HRESULT,Skip, ULONG,celt);
|
||||
ICOM_METHOD (HRESULT,Reset);
|
||||
ICOM_METHOD1(HRESULT,Clone, IEnumFORMATETC**,ppenum);
|
||||
ICOM_END(IEnumFORMATETC)
|
||||
#undef ICOM_INTERFACE
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
/*** IUnknown methods ***/
|
||||
#define IEnumFORMATETC_QueryInterface(p,a,b) ICOM_ICALL2(IUnknown,QueryInterface,p,a,b)
|
||||
#define IEnumFORMATETC_AddRef(p) ICOM_ICALL (IUnknown,AddRef,p)
|
||||
#define IEnumFORMATETC_Release(p) ICOM_ICALL (IUnknown,Release,p)
|
||||
/*** IEnumFORMATETC methods ***/
|
||||
#define IEnumFORMATETC_Next(p,a,b,c) ICOM_CALL3(Next,p,a,b,c)
|
||||
#define IEnumFORMATETC_Skip(p,a) ICOM_CALL1(Skip,p,a)
|
||||
#define IEnumFORMATETC_Reset(p) ICOM_CALL (Reset,p)
|
||||
#define IEnumFORMATETC_Clone(p,a) ICOM_CALL1(Clone,p,a)
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IEnumSTATDATA interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
#endif /* __WINE_WINE_OBJ_DATAOBJECT_H */
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Defines the COM interfaces and APIs that allow an interface to
|
||||
* specify a custom marshaling for its objects.
|
||||
*
|
||||
* Depends on 'obj_storage.h' and 'obj_base.h'.
|
||||
*/
|
||||
|
||||
#ifndef __WINE_WINE_OBJ_MARSHAL_H
|
||||
#define __WINE_WINE_OBJ_MARSHAL_H
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* Predeclare the interfaces
|
||||
*/
|
||||
DEFINE_OLEGUID(IID_IMarshal, 0x00000003L, 0, 0);
|
||||
typedef struct IMarshal IMarshal,*LPMARSHAL;
|
||||
|
||||
DEFINE_OLEGUID(IID_IStdMarshalInfo, 0x00000018L, 0, 0);
|
||||
typedef struct IStdMarshalInfo IStdMarshalInfo,*LPSTDMARSHALINFO;
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IMarshal interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IStdMarshalInfo interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
#endif /* __WINE_WINE_OBJ_MARSHAL_H */
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* Defines miscellaneous COM interfaces and APIs defined in objidl.h.
|
||||
* These did not really fit into the other categories, whould have
|
||||
* required their own specific category or are too rarely used to be
|
||||
* put in 'obj_base.h'.
|
||||
*
|
||||
* Depends on 'obj_base.h'.
|
||||
*/
|
||||
|
||||
#ifndef __WINE_WINE_OBJ_MISC_H
|
||||
#define __WINE_WINE_OBJ_MISC_H
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* Predeclare the interfaces
|
||||
*/
|
||||
DEFINE_OLEGUID(IID_IEnumString, 0x00000101L, 0, 0);
|
||||
typedef struct IEnumString IEnumString,*LPENUMSTRING;
|
||||
|
||||
DEFINE_OLEGUID(IID_IEnumUnknown, 0x00000100L, 0, 0);
|
||||
typedef struct IEnumUnknown IEnumUnknown,*LPENUMUNKNOWN;
|
||||
|
||||
DEFINE_OLEGUID(IID_IMallocSpy, 0x0000001dL, 0, 0);
|
||||
typedef struct IMallocSpy IMallocSpy,*LPMALLOCSPY;
|
||||
|
||||
DEFINE_OLEGUID(IID_IMultiQI, 0x00000020L, 0, 0);
|
||||
typedef struct IMultiQI IMultiQI,*LPMULTIQI;
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IEnumString interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IEnumUnknown interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IMallocSpy interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IMultiQI interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
#endif /* __WINE_WINE_OBJ_MISC_H */
|
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
* Defines the COM interfaces and APIs related to the moniker functionality.
|
||||
*
|
||||
* This file depends on 'obj_storage.h' and 'obj_base.h'.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __WINE_WINE_OBJ_MONIKER_H
|
||||
#define __WINE_WINE_OBJ_MONIKER_H
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* Predeclare the interfaces
|
||||
*/
|
||||
DEFINE_OLEGUID(IID_IBindCtx,0xe,0,0);
|
||||
typedef struct IBindCtx IBindCtx,*LPBINDCTX;
|
||||
typedef LPBINDCTX LPBC;
|
||||
|
||||
DEFINE_OLEGUID(IID_IClassActivator, 0x00000140L, 0, 0);
|
||||
typedef struct IClassActivator IClassActivator,*LPCLASSACTIVATOR;
|
||||
|
||||
DEFINE_OLEGUID(IID_IEnumMoniker, 0x00000102L, 0, 0);
|
||||
typedef struct IEnumMoniker IEnumMoniker,*LPENUMMONIKER;
|
||||
|
||||
DEFINE_OLEGUID(IID_IMoniker, 0x0000000fL, 0, 0);
|
||||
typedef struct IMoniker IMoniker,*LPMONIKER;
|
||||
|
||||
DEFINE_GUID (IID_IROTData, 0xf29f6bc0L, 0x5021, 0x11ce, 0xaa, 0x15, 0x00, 0x00, 0x69, 0x01, 0x29, 0x3f);
|
||||
typedef struct IROTData IROTData,*LPROTDATA;
|
||||
|
||||
DEFINE_OLEGUID(IID_IRunnableObject, 0x00000126L, 0, 0);
|
||||
typedef struct IRunnableObject IRunnableObject,*LPRUNNABLEOBJECT;
|
||||
|
||||
DEFINE_OLEGUID(IID_IRunningObjectTable, 0x00000010L, 0, 0);
|
||||
typedef struct IRunningObjectTable IRunningObjectTable,*LPRUNNINGOBJECTTABLE;
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IBindCtx interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IClassActivator interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IEnumMoniker interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IMoniker interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
HRESULT WINAPI CreateFileMoniker16(LPCOLESTR16 lpszPathName,LPMONIKER* ppmk);
|
||||
HRESULT WINAPI CreateFileMoniker32(LPCOLESTR32 lpszPathName,LPMONIKER* ppmk);
|
||||
#define CreateFileMoniker WINELIB_NAME(CreateFileMoniker)
|
||||
|
||||
HRESULT WINAPI CreateItemMoniker32(LPCOLESTR32 lpszDelim,LPCOLESTR32 lpszItem,LPMONIKER* ppmk);
|
||||
#define CreateItemMoniker WINELIB_NAME(CreateItemMoniker)
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IROTData interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IRunnableObject interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IRunningObjectTable interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
#endif /* __WINE_WINE_OBJ_MONIKER_H */
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Defines the COM interfaces and APIs related to saving properties to file.
|
||||
*
|
||||
* Depends on 'obj_storage.h' and 'obj_base.h'.
|
||||
*/
|
||||
|
||||
#ifndef __WINE_WINE_OBJ_PROPERTYSTORAGE_H
|
||||
#define __WINE_WINE_OBJ_PROPERTYSTORAGE_H
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* Predeclare the interfaces
|
||||
*/
|
||||
DEFINE_OLEGUID(IID_IEnumSTATPROPSETSTG, 0x0000013bL, 0, 0);
|
||||
typedef struct IEnumSTATPROPSETSTG IEnumSTATPROPSETSTG,*LPENUMSTATPROPSETSTG;
|
||||
|
||||
DEFINE_OLEGUID(IID_IEnumSTATPROPSTG, 0x00000139L, 0, 0);
|
||||
typedef struct IEnumSTATPROPSTG IEnumSTATPROPSTG,*LPENUMSTATPROPSTG;
|
||||
|
||||
DEFINE_OLEGUID(IID_IPropertySetStorage, 0x0000013aL, 0, 0);
|
||||
typedef struct IPropertySetStorage IPropertySetStorage,*LPPROPERTYSETSTORAGE;
|
||||
|
||||
DEFINE_OLEGUID(IID_IPropertyStorage, 0x00000138L, 0, 0);
|
||||
typedef struct IPropertyStorage IPropertyStorage,*LPPROPERTYSTORAGE;
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IEnumSTATPROPSETSTG interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IEnumSTATPROPSTG interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IPropertySetStorage interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IPropertyStorage interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
|
||||
#endif /* __WINE_WINE_OBJ_PROPERTYSTORAGE_H */
|
|
@ -0,0 +1,459 @@
|
|||
/*
|
||||
* Defines the COM interfaces and APIs related to structured data storage.
|
||||
*
|
||||
* Depends on 'obj_base.h'.
|
||||
*/
|
||||
|
||||
#ifndef __WINE_WINE_OBJ_STORAGE_H
|
||||
#define __WINE_WINE_OBJ_STORAGE_H
|
||||
|
||||
|
||||
#include "winnt.h"
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* Predeclare the structures
|
||||
*/
|
||||
typedef LPOLESTR16 *SNB16;
|
||||
typedef LPOLESTR32 *SNB32;
|
||||
DECL_WINELIB_TYPE(SNB)
|
||||
|
||||
typedef struct STATSTG STATSTG;
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* Predeclare the interfaces
|
||||
*/
|
||||
DEFINE_OLEGUID(IID_IEnumSTATSTG, 0x0000000dL, 0, 0);
|
||||
typedef struct IEnumSTATSTG IEnumSTATSTG,*LPENUMSTATSTG;
|
||||
|
||||
DEFINE_GUID (IID_IFillLockBytes, 0x99caf010L, 0x415e, 0x11cf, 0x88, 0x14, 0x00, 0xaa, 0x00, 0xb5, 0x69, 0xf5);
|
||||
typedef struct IFillLockBytes IFillLockBytes,*LPFILLLOCKBYTES;
|
||||
|
||||
DEFINE_GUID (IID_ILayoutStorage, 0x0e6d4d90L, 0x6738, 0x11cf, 0x96, 0x08, 0x00, 0xaa, 0x00, 0x68, 0x0d, 0xb4);
|
||||
typedef struct ILayoutStorage ILayoutStorage,*LPLAYOUTSTORAGE;
|
||||
|
||||
DEFINE_OLEGUID(IID_ILockBytes, 0x0000000aL, 0, 0);
|
||||
typedef struct ILockBytes ILockBytes,*LPLOCKBYTES;
|
||||
|
||||
DEFINE_OLEGUID(IID_IPersist, 0x0000010cL, 0, 0);
|
||||
typedef struct IPersist IPersist,*LPPERSIST;
|
||||
|
||||
DEFINE_OLEGUID(IID_IPersistFile, 0x0000010bL, 0, 0);
|
||||
typedef struct IPersistFile IPersistFile,*LPPERSISTFILE;
|
||||
|
||||
DEFINE_OLEGUID(IID_IPersistStorage, 0x0000010aL, 0, 0);
|
||||
typedef struct IPersistStorage IPersistStorage,*LPPERSISTSTORAGE;
|
||||
|
||||
DEFINE_OLEGUID(IID_IPersistStream, 0x00000109L, 0, 0);
|
||||
typedef struct IPersistStream IPersistStream,*LPPERSISTSTREAM;
|
||||
|
||||
DEFINE_GUID (IID_IProgressNotify, 0xa9d758a0L, 0x4617, 0x11cf, 0x95, 0xfc, 0x00, 0xaa, 0x00, 0x68, 0x0d, 0xb4);
|
||||
typedef struct IProgressNotify IProgressNotify,*LPPROGRESSNOTIFY;
|
||||
|
||||
DEFINE_OLEGUID(IID_IRootStorage, 0x00000012L, 0, 0);
|
||||
typedef struct IRootStorage IRootStorage,*LPROOTSTORAGE;
|
||||
|
||||
DEFINE_GUID (IID_ISequentialStream, 0x0c733a30L, 0x2a1c, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
|
||||
typedef struct ISequentialStream ISequentialStream,*LPSEQUENTIALSTREAM;
|
||||
|
||||
DEFINE_OLEGUID(IID_IStorage, 0x0000000bL, 0, 0);
|
||||
typedef struct IStorage16 IStorage16,*LPSTORAGE16;
|
||||
typedef struct IStorage32 IStorage32,*LPSTORAGE32;
|
||||
DECL_WINELIB_TYPE(IStorage)
|
||||
DECL_WINELIB_TYPE(LPSTORAGE)
|
||||
|
||||
DEFINE_OLEGUID(IID_IStream, 0x0000000cL, 0, 0);
|
||||
typedef struct IStream16 IStream16,*LPSTREAM16;
|
||||
typedef struct IStream32 IStream32,*LPSTREAM32;
|
||||
DECL_WINELIB_TYPE(IStream)
|
||||
DECL_WINELIB_TYPE(LPSTREAM)
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* STGM enumeration
|
||||
*
|
||||
* See IStorage and IStream
|
||||
*/
|
||||
#define STGM_DIRECT 0x00000000
|
||||
#define STGM_TRANSACTED 0x00010000
|
||||
#define STGM_SIMPLE 0x08000000
|
||||
#define STGM_READ 0x00000000
|
||||
#define STGM_WRITE 0x00000001
|
||||
#define STGM_READWRITE 0x00000002
|
||||
#define STGM_SHARE_DENY_NONE 0x00000040
|
||||
#define STGM_SHARE_DENY_READ 0x00000030
|
||||
#define STGM_SHARE_DENY_WRITE 0x00000020
|
||||
#define STGM_SHARE_EXCLUSIVE 0x00000010
|
||||
#define STGM_PRIORITY 0x00040000
|
||||
#define STGM_DELETEONRELEASE 0x04000000
|
||||
#define STGM_CREATE 0x00001000
|
||||
#define STGM_CONVERT 0x00020000
|
||||
#define STGM_FAILIFTHERE 0x00000000
|
||||
#define STGM_NOSCRATCH 0x00100000
|
||||
#define STGM_NOSNAPSHOT 0x00200000
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* STATSTG structure
|
||||
*/
|
||||
struct STATSTG {
|
||||
LPOLESTR16 pwcsName;
|
||||
DWORD type;
|
||||
ULARGE_INTEGER cbSize;
|
||||
FILETIME mtime;
|
||||
FILETIME ctime;
|
||||
FILETIME atime;
|
||||
DWORD grfMode;
|
||||
DWORD grfLocksSupported;
|
||||
CLSID clsid;
|
||||
DWORD grfStateBits;
|
||||
DWORD reserved;
|
||||
};
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IEnumSTATSTG interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IFillLockBytes interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* ILayoutStorage interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* ILockBytes interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IPersist interface
|
||||
*/
|
||||
#define ICOM_INTERFACE IPersist
|
||||
ICOM_BEGIN(IPersist,IUnknown)
|
||||
ICOM_CMETHOD1(HRESULT,GetClassID, CLSID*,pClassID);
|
||||
ICOM_END(IPersist)
|
||||
#undef ICOM_INTERFACE
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
/*** IUnknown methods ***/
|
||||
#define IPersist_QueryInterface(p,a,b) ICOM_ICALL2(IUnknown,QueryInterface,p,a,b)
|
||||
#define IPersist_AddRef(p) ICOM_ICALL (IUnknown,AddRef,p)
|
||||
#define IPersist_Release(p) ICOM_ICALL (IUnknown,Release,p)
|
||||
/*** IPersist methods ***/
|
||||
#define IPersist_GetClassID(p,a) ICOM_CALL1(GetClassID,p,a)
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IPersistFile interface
|
||||
*/
|
||||
#define ICOM_INTERFACE IPersistFile
|
||||
ICOM_BEGIN(IPersistFile,IPersist)
|
||||
ICOM_CMETHOD (HRESULT,IsDirty);
|
||||
ICOM_METHOD2 (HRESULT,Load, LPCOLESTR32,pszFileName, DWORD,dwMode);
|
||||
ICOM_METHOD2 (HRESULT,Save, LPCOLESTR32,pszFileName, BOOL32,fRemember);
|
||||
ICOM_METHOD1 (HRESULT,SaveCompleted, LPCOLESTR32,pszFileName);
|
||||
ICOM_CMETHOD1(HRESULT,GetCurFile, LPOLESTR32*,ppszFileName);
|
||||
ICOM_END(IPersistFile)
|
||||
#undef ICOM_INTERFACE
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
/*** IUnknown methods ***/
|
||||
#define IPersistFile_QueryInterface(p,a,b) ICOM_ICALL2(IUnknown,QueryInterface,p,a,b)
|
||||
#define IPersistFile_AddRef(p) ICOM_ICALL (IUnknown,AddRef,p)
|
||||
#define IPersistFile_Release(p) ICOM_ICALL (IUnknown,Release,p)
|
||||
/*** IPersist methods ***/
|
||||
#define IPersistFile_GetClassID(p,a) ICOM_ICALL1(IPersist,GetClassID,p,a)
|
||||
/*** IPersistFile methods ***/
|
||||
#define IPersistFile_IsDirty(p) ICOM_CALL(IsDirty,p)
|
||||
#define IPersistFile_Load(p,a,b) ICOM_CALL(Load,p,a,b)
|
||||
#define IPersistFile_Save(p,a,b) ICOM_CALL(Save,p,a,b)
|
||||
#define IPersistFile_SaveCompleted(p,a) ICOM_CALL(SaveCompleted,p,a)
|
||||
#define IPersistFile_GetCurFile(p,a) ICOM_CALL(GetCurFile,p,a)
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IPersistStorage interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IPersistStream interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IProgressNotify interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IRootStorage interface
|
||||
*/
|
||||
/* FIXME: not implemented */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* ISequentialStream interface
|
||||
*/
|
||||
#define ICOM_INTERFACE ISequentialStream
|
||||
ICOM_BEGIN(ISequentialStream,IUnknown)
|
||||
ICOM_METHOD3(HRESULT,Read, void*,pv, ULONG,cb, ULONG*,pcbRead);
|
||||
ICOM_METHOD3(HRESULT,Write, const void*,pv, ULONG,cb, ULONG*,pcbWritten);
|
||||
ICOM_END(ISequentialStream)
|
||||
#undef ICOM_INTERFACE
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
/*** IUnknown methods ***/
|
||||
#define ISequentialStream_QueryInterface(p,a,b) ICOM_ICALL2(IUnknown,QueryInterface,p,a,b)
|
||||
#define ISequentialStream_AddRef(p) ICOM_ICALL (IUnknown,AddRef,p)
|
||||
#define ISequentialStream_Release(p) ICOM_ICALL (IUnknown,Release,p)
|
||||
/*** ISequentialStream methods ***/
|
||||
#define ISequentialStream_Read(p,a,b,c) ICOM_CALL3(Read,p,a,b,c)
|
||||
#define ISequentialStream_Write(p,a,b,c) ICOM_CALL3(Write,p,a,b,c)
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IStorage interface
|
||||
*/
|
||||
#define ICOM_INTERFACE IStorage16
|
||||
ICOM_BEGIN(IStorage16,IUnknown)
|
||||
ICOM_METHOD5(HRESULT,CreateStream, LPCOLESTR16,pwcsName, DWORD,grfMode, DWORD,reserved1, DWORD,reserved2, IStream16**,ppstm)
|
||||
ICOM_METHOD5(HRESULT,OpenStream, LPCOLESTR16,pwcsName, void*,reserved1, DWORD,grfMode, DWORD,reserved2, IStream16**,ppstm)
|
||||
ICOM_METHOD5(HRESULT,CreateStorage, LPCOLESTR16,pwcsName, DWORD,grfMode, DWORD,dwStgFmt, DWORD,reserved2, IStorage16**,ppstg)
|
||||
ICOM_METHOD6(HRESULT,OpenStorage, LPCOLESTR16,pwcsName, IStorage16*,pstgPriority, DWORD,grfMode, SNB16,snb16Exclude, DWORD,reserved, IStorage16**,ppstg)
|
||||
ICOM_METHOD4(HRESULT,CopyTo, DWORD,ciidExclude, const IID*,rgiidExclude, SNB16,snb16Exclude, IStorage16*,pstgDest)
|
||||
ICOM_METHOD4(HRESULT,MoveElementTo, LPCOLESTR16,pwcsName, IStorage16*,pstgDest, LPCOLESTR16,pwcsNewName, DWORD,grfFlags)
|
||||
ICOM_METHOD1(HRESULT,Commit, DWORD,grfCommitFlags)
|
||||
ICOM_METHOD (HRESULT,Revert)
|
||||
ICOM_METHOD4(HRESULT,EnumElements, DWORD,reserved1, void*,reserved2, DWORD,reserved3, IEnumSTATSTG**,ppenum)
|
||||
ICOM_METHOD1(HRESULT,DestroyElement, LPCOLESTR16,pwcsName)
|
||||
ICOM_METHOD2(HRESULT,RenameElement, LPCOLESTR16,pwcsOldName, LPCOLESTR16,pwcsNewName)
|
||||
ICOM_METHOD4(HRESULT,SetElementTimes,LPCOLESTR16,pwcsName, const FILETIME*,pctime, const FILETIME*,patime, const FILETIME*,pmtime)
|
||||
ICOM_METHOD1(HRESULT,SetClass, REFCLSID,clsid)
|
||||
ICOM_METHOD2(HRESULT,SetStateBits, DWORD,grfStateBits, DWORD,grfMask)
|
||||
ICOM_METHOD2(HRESULT,Stat, STATSTG*,pstatstg, DWORD,grfStatFlag)
|
||||
ICOM_END(IStorage16)
|
||||
#undef ICOM_INTERFACE
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
/*** IUnknown methods ***/
|
||||
#define IStorage16_QueryInterface(p,a,b) ICOM_ICALL2(IUnknown,QueryInterface,p,a,b)
|
||||
#define IStorage16_AddRef(p) ICOM_ICALL (IUnknown,AddRef,p)
|
||||
#define IStorage16_Release(p) ICOM_ICALL (IUnknown,Release,p)
|
||||
/*** IStorage16 methods ***/
|
||||
#define IStorage16_CreateStream(p,a,b,c,d,e) ICOM_CALL5(CreateStream,p,a,b,c,d,e)
|
||||
#define IStorage16_OpenStream(p,a,b,c,d,e) ICOM_CALL5(OpenStream,p,a,b,c,d,e)
|
||||
#define IStorage16_CreateStorage(p,a,b,c,d,e) ICOM_CALL5(CreateStorage,p,a,b,c,d,e)
|
||||
#define IStorage16_OpenStorage(p,a,b,c,d,e,f) ICOM_CALL6(OpenStorage,p,a,b,c,d,e,f)
|
||||
#define IStorage16_CopyTo(p,a,b,c,d) ICOM_CALL4(CopyTo,p,a,b,c,d)
|
||||
#define IStorage16_MoveElementTo(p,a,b,c,d) ICOM_CALL4(MoveElementTo,p,a,b,c,d)
|
||||
#define IStorage16_Commit(p,a) ICOM_CALL1(Commit,p,a)
|
||||
#define IStorage16_Revert(p) ICOM_CALL (Revert,p)
|
||||
#define IStorage16_EnumElements(p,a,b,c,d) ICOM_CALL4(EnumElements,p,a,b,c,d)
|
||||
#define IStorage16_DestroyElement(p,a) ICOM_CALL1(DestroyElement,p,a)
|
||||
#define IStorage16_RenameElement(p,a,b) ICOM_CALL2(RenameElement,p,a,b)
|
||||
#define IStorage16_SetElementTimes(p,a,b,c,d) ICOM_CALL4(SetElementTimes,p,a,b,c,d)
|
||||
#define IStorage16_SetClass(p,a) ICOM_CALL1(SetClass,p,a)
|
||||
#define IStorage16_SetStateBits(p,a,b) ICOM_CALL2(SetStateBits,p,a,b)
|
||||
#define IStorage16_Stat(p,a,b) ICOM_CALL2(Stat,p,a,b)
|
||||
#endif
|
||||
|
||||
|
||||
#define ICOM_INTERFACE IStorage32
|
||||
ICOM_BEGIN(IStorage32,IUnknown)
|
||||
ICOM_METHOD5(HRESULT,CreateStream, LPCOLESTR32,pwcsName, DWORD,grfMode, DWORD,reserved1, DWORD,reserved2, IStream32**,ppstm);
|
||||
ICOM_METHOD5(HRESULT,OpenStream, LPCOLESTR32,pwcsName, void*,reserved1, DWORD,grfMode, DWORD,reserved2, IStream32**,ppstm);
|
||||
ICOM_METHOD5(HRESULT,CreateStorage, LPCOLESTR32,pwcsName, DWORD,grfMode, DWORD,dwStgFmt, DWORD,reserved2, IStorage32**,ppstg);
|
||||
ICOM_METHOD6(HRESULT,OpenStorage, LPCOLESTR32,pwcsName, IStorage32*,pstgPriority, DWORD,grfMode, SNB32,snb16Exclude, DWORD,reserved, IStorage32**,ppstg);
|
||||
ICOM_METHOD4(HRESULT,CopyTo, DWORD,ciidExclude, const IID*,rgiidExclude, SNB32,snb16Exclude, IStorage32*,pstgDest);
|
||||
ICOM_METHOD4(HRESULT,MoveElementTo, LPCOLESTR32,pwcsName, IStorage32*,pstgDest, LPCOLESTR32,pwcsNewName, DWORD,grfFlags);
|
||||
ICOM_METHOD1(HRESULT,Commit, DWORD,grfCommitFlags);
|
||||
ICOM_METHOD (HRESULT,Revert);
|
||||
ICOM_METHOD4(HRESULT,EnumElements, DWORD,reserved1, void*,reserved2, DWORD,reserved3, IEnumSTATSTG**,ppenum);
|
||||
ICOM_METHOD1(HRESULT,DestroyElement, LPCOLESTR32,pwcsName);
|
||||
ICOM_METHOD2(HRESULT,RenameElement, LPCOLESTR32,pwcsOldName, LPCOLESTR32,pwcsNewName);
|
||||
ICOM_METHOD4(HRESULT,SetElementTimes,LPCOLESTR32,pwcsName, const FILETIME*,pctime, const FILETIME*,patime, const FILETIME*,pmtime);
|
||||
ICOM_METHOD1(HRESULT,SetClass, REFCLSID,clsid);
|
||||
ICOM_METHOD2(HRESULT,SetStateBits, DWORD,grfStateBits, DWORD,grfMask);
|
||||
ICOM_METHOD2(HRESULT,Stat, STATSTG*,pstatstg, DWORD,grfStatFlag);
|
||||
ICOM_END(IStorage32)
|
||||
#undef ICOM_INTERFACE
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
/*** IUnknown methods ***/
|
||||
#define IStorage32_QueryInterface(p,a,b) ICOM_ICALL2(IUnknown,QueryInterface,p,a,b)
|
||||
#define IStorage32_AddRef(p) ICOM_ICALL (IUnknown,AddRef,p)
|
||||
#define IStorage32_Release(p) ICOM_ICALL (IUnknown,Release,p)
|
||||
/*** IStorage32 methods ***/
|
||||
#define IStorage32_CreateStream(p,a,b,c,d,e) ICOM_CALL5(CreateStream,p,a,b,c,d,e)
|
||||
#define IStorage32_OpenStream(p,a,b,c,d,e) ICOM_CALL5(OpenStream,p,a,b,c,d,e)
|
||||
#define IStorage32_CreateStorage(p,a,b,c,d,e) ICOM_CALL5(CreateStorage,p,a,b,c,d,e)
|
||||
#define IStorage32_OpenStorage(p,a,b,c,d,e,f) ICOM_CALL6(OpenStorage,p,a,b,c,d,e,f)
|
||||
#define IStorage32_CopyTo(p,a,b,c,d) ICOM_CALL4(CopyTo,p,a,b,c,d)
|
||||
#define IStorage32_MoveElementTo(p,a,b,c,d) ICOM_CALL4(MoveElementTo,p,a,b,c,d)
|
||||
#define IStorage32_Commit(p,a) ICOM_CALL1(Commit,p,a)
|
||||
#define IStorage32_Revert(p) ICOM_CALL (Revert,p)
|
||||
#define IStorage32_EnumElements(p,a,b,c,d) ICOM_CALL4(EnumElements,p,a,b,c,d)
|
||||
#define IStorage32_DestroyElement(p,a) ICOM_CALL1(DestroyElement,p,a)
|
||||
#define IStorage32_RenameElement(p,a,b) ICOM_CALL2(RenameElement,p,a,b)
|
||||
#define IStorage32_SetElementTimes(p,a,b,c,d) ICOM_CALL4(SetElementTimes,p,a,b,c,d)
|
||||
#define IStorage32_SetClass(p,a) ICOM_CALL1(SetClass,p,a)
|
||||
#define IStorage32_SetStateBits(p,a,b) ICOM_CALL2(SetStateBits,p,a,b)
|
||||
#define IStorage32_Stat(p,a,b) ICOM_CALL2(Stat,p,a,b)
|
||||
|
||||
#ifndef __WINE__
|
||||
/* Duplicated for WINELIB */
|
||||
/*** IUnknown methods ***/
|
||||
#define IStorage_QueryInterface(p,a,b) ICOM_ICALL2(IUnknown,QueryInterface,p,a,b)
|
||||
#define IStorage_AddRef(p) ICOM_ICALL (IUnknown,AddRef,p)
|
||||
#define IStorage_Release(p) ICOM_ICALL (IUnknown,Release,p)
|
||||
/*** IStorage methods ***/
|
||||
#define IStorage_CreateStream(p,a,b,c,d,e) ICOM_CALL5(CreateStream,p,a,b,c,d,e)
|
||||
#define IStorage_OpenStream(p,a,b,c,d,e) ICOM_CALL5(OpenStream,p,a,b,c,d,e)
|
||||
#define IStorage_CreateStorage(p,a,b,c,d,e) ICOM_CALL5(CreateStorage,p,a,b,c,d,e)
|
||||
#define IStorage_OpenStorage(p,a,b,c,d,e,f) ICOM_CALL6(OpenStorage,p,a,b,c,d,e,f)
|
||||
#define IStorage_CopyTo(p,a,b,c,d) ICOM_CALL4(CopyTo,p,a,b,c,d)
|
||||
#define IStorage_MoveElementTo(p,a,b,c,d) ICOM_CALL4(MoveElementTo,p,a,b,c,d)
|
||||
#define IStorage_Commit(p,a) ICOM_CALL1(Commit,p,a)
|
||||
#define IStorage_Revert(p) ICOM_CALL (Revert,p)
|
||||
#define IStorage_EnumElements(p,a,b,c,d) ICOM_CALL4(EnumElements,p,a,b,c,d)
|
||||
#define IStorage_DestroyElement(p,a) ICOM_CALL1(DestroyElement,p,a)
|
||||
#define IStorage_RenameElement(p,a,b) ICOM_CALL2(RenameElement,p,a,b)
|
||||
#define IStorage_SetElementTimes(p,a,b,c,d) ICOM_CALL4(SetElementTimes,p,a,b,c,d)
|
||||
#define IStorage_SetClass(p,a) ICOM_CALL1(SetClass,p,a)
|
||||
#define IStorage_SetStateBits(p,a,b) ICOM_CALL2(SetStateBits,p,a,b)
|
||||
#define IStorage_Stat(p,a,b) ICOM_CALL2(Stat,p,a,b)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IStream interface
|
||||
*/
|
||||
#define ICOM_INTERFACE IStream16
|
||||
ICOM_BEGIN(IStream16,ISequentialStream)
|
||||
ICOM_METHOD3(HRESULT,Seek, LARGE_INTEGER,dlibMove, DWORD,dwOrigin, ULARGE_INTEGER*,plibNewPosition);
|
||||
ICOM_METHOD1(HRESULT,SetSize, ULARGE_INTEGER,libNewSize);
|
||||
ICOM_METHOD4(HRESULT,CopyTo, IStream16*,pstm, ULARGE_INTEGER,cb, ULARGE_INTEGER*,pcbRead, ULARGE_INTEGER*,pcbWritten);
|
||||
ICOM_METHOD1(HRESULT,Commit, DWORD,grfCommitFlags);
|
||||
ICOM_METHOD (HRESULT,Revert);
|
||||
ICOM_METHOD3(HRESULT,LockRegion, ULARGE_INTEGER,libOffset, ULARGE_INTEGER,cb, DWORD,dwLockType);
|
||||
ICOM_METHOD3(HRESULT,UnlockRegion,ULARGE_INTEGER,libOffset, ULARGE_INTEGER,cb, DWORD,dwLockType);
|
||||
ICOM_METHOD2(HRESULT,Stat, STATSTG*,pstatstg, DWORD,grfStatFlag);
|
||||
ICOM_METHOD1(HRESULT,Clone, IStream16**,ppstm);
|
||||
ICOM_END(IStream16)
|
||||
#undef ICOM_INTERFACE
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
/*** IUnknown methods ***/
|
||||
#define IStream16_QueryInterface(p,a,b) ICOM_ICALL2(IUnknown,QueryInterface,p,a,b)
|
||||
#define IStream16_AddRef(p) ICOM_ICALL (IUnknown,AddRef,p)
|
||||
#define IStream16_Release(p) ICOM_ICALL (IUnknown,Release,p)
|
||||
/*** ISequentialStream methods ***/
|
||||
#define IStream16_Read(p,a,b,c) ICOM_ICALL3(ISequentialStream,Read,p,a,b,c)
|
||||
#define IStream16_Write(p,a,b,c) ICOM_ICALL3(ISequentialStream,Write,p,a,b,c)
|
||||
/*** IStream16 methods ***/
|
||||
#define IStream16_Seek(p) ICOM_CALL3(Seek,p)
|
||||
#define IStream16_SetSize(p,a,b) ICOM_CALL1(SetSize,p,a,b)
|
||||
#define IStream16_CopyTo(pa,b,c,d) ICOM_CALL4(CopyTo,pa,b,c,d)
|
||||
#define IStream16_Commit(p,a) ICOM_CALL1(Commit,p,a)
|
||||
#define IStream16_Revert(p) ICOM_CALL (Revert,p)
|
||||
#define IStream16_LockRegion(pa,b,c) ICOM_CALL3(LockRegion,pa,b,c)
|
||||
#define IStream16_UnlockRegion(p,a,b,c) ICOM_CALL3(UnlockRegion,p,a,b,c)
|
||||
#define IStream16_Stat(p,a,b) ICOM_CALL2(Stat,p,a,b)
|
||||
#define IStream16_Clone(p,a) ICOM_CALL1(Clone,p,a)
|
||||
#endif
|
||||
|
||||
|
||||
#define ICOM_INTERFACE IStream32
|
||||
ICOM_BEGIN(IStream32,ISequentialStream)
|
||||
ICOM_METHOD3(HRESULT,Seek, LARGE_INTEGER,dlibMove, DWORD,dwOrigin, ULARGE_INTEGER*,plibNewPosition);
|
||||
ICOM_METHOD1(HRESULT,SetSize, ULARGE_INTEGER,libNewSize);
|
||||
ICOM_METHOD4(HRESULT,CopyTo, IStream32*,pstm, ULARGE_INTEGER,cb, ULARGE_INTEGER*,pcbRead, ULARGE_INTEGER*,pcbWritten);
|
||||
ICOM_METHOD1(HRESULT,Commit, DWORD,grfCommitFlags);
|
||||
ICOM_METHOD (HRESULT,Revert);
|
||||
ICOM_METHOD3(HRESULT,LockRegion, ULARGE_INTEGER,libOffset, ULARGE_INTEGER,cb, DWORD,dwLockType);
|
||||
ICOM_METHOD3(HRESULT,UnlockRegion,ULARGE_INTEGER,libOffset, ULARGE_INTEGER,cb, DWORD,dwLockType);
|
||||
ICOM_METHOD2(HRESULT,Stat, STATSTG*,pstatstg, DWORD,grfStatFlag);
|
||||
ICOM_METHOD1(HRESULT,Clone, IStream32**,ppstm);
|
||||
ICOM_END(IStream32)
|
||||
#undef ICOM_INTERFACE
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
/*** IUnknown methods ***/
|
||||
#define IStream32_QueryInterface(p,a,b) ICOM_ICALL2(IUnknown,QueryInterface,p,a,b)
|
||||
#define IStream32_AddRef(p) ICOM_ICALL (IUnknown,AddRef,p)
|
||||
#define IStream32_Release(p) ICOM_ICALL (IUnknown,Release,p)
|
||||
/*** ISequentialStream methods ***/
|
||||
#define IStream32_Read(p,a,b,c) ICOM_ICALL3(ISequentialStream,Read,p,a,b,c)
|
||||
#define IStream32_Write(p,a,b,c) ICOM_ICALL3(ISequentialStream,Write,p,a,b,c)
|
||||
/*** IStream32 methods ***/
|
||||
#define IStream32_Seek(p) ICOM_CALL3(Seek,p)
|
||||
#define IStream32_SetSize(p,a,b) ICOM_CALL1(SetSize,p,a,b)
|
||||
#define IStream32_CopyTo(pa,b,c,d) ICOM_CALL4(CopyTo,pa,b,c,d)
|
||||
#define IStream32_Commit(p,a) ICOM_CALL1(Commit,p,a)
|
||||
#define IStream32_Revert(p) ICOM_CALL (Revert,p)
|
||||
#define IStream32_LockRegion(pa,b,c) ICOM_CALL3(LockRegion,pa,b,c)
|
||||
#define IStream32_UnlockRegion(p,a,b,c) ICOM_CALL3(UnlockRegion,p,a,b,c)
|
||||
#define IStream32_Stat(p,a,b) ICOM_CALL2(Stat,p,a,b)
|
||||
#define IStream32_Clone(p,a) ICOM_CALL1(Clone,p,a)
|
||||
|
||||
#ifndef __WINE__
|
||||
/* Duplicated for WINELIB */
|
||||
/*** IUnknown methods ***/
|
||||
#define IStream_QueryInterface(p,a,b) ICOM_ICALL2(IUnknown,QueryInterface,p,a,b)
|
||||
#define IStream_AddRef(p) ICOM_ICALL (IUnknown,AddRef,p)
|
||||
#define IStream_Release(p) ICOM_ICALL (IUnknown,Release,p)
|
||||
/*** ISequentialStream methods ***/
|
||||
#define IStream_Read(p,a,b,c) ICOM_ICALL3(ISequentialStream,Read,p,a,b,c)
|
||||
#define IStream_Write(p,a,b,c) ICOM_ICALL3(ISequentialStream,Write,p,a,b,c)
|
||||
/*** IStream methods ***/
|
||||
#define IStream_Seek(p) ICOM_CALL3(Seek,p)
|
||||
#define IStream_SetSize(p,a,b) ICOM_CALL1(SetSize,p,a,b)
|
||||
#define IStream_CopyTo(pa,b,c,d) ICOM_CALL4(CopyTo,pa,b,c,d)
|
||||
#define IStream_Commit(p,a) ICOM_CALL1(Commit,p,a)
|
||||
#define IStream_Revert(p) ICOM_CALL (Revert,p)
|
||||
#define IStream_LockRegion(pa,b,c) ICOM_CALL3(LockRegion,pa,b,c)
|
||||
#define IStream_UnlockRegion(p,a,b,c) ICOM_CALL3(UnlockRegion,p,a,b,c)
|
||||
#define IStream_Stat(p,a,b) ICOM_CALL2(Stat,p,a,b)
|
||||
#define IStream_Clone(p,a) ICOM_CALL1(Clone,p,a)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* StgXXX API
|
||||
*/
|
||||
/* FIXME: many functions are missing */
|
||||
HRESULT WINAPI StgCreateDocFile16(LPCOLESTR16 pwcsName,DWORD grfMode,DWORD reserved,IStorage16 **ppstgOpen);
|
||||
HRESULT WINAPI StgCreateDocfile32(LPCOLESTR32 pwcsName,DWORD grfMode,DWORD reserved,IStorage32 **ppstgOpen);
|
||||
#define StgCreateDocfile WINELIB_NAME(StgCreateDocfile)
|
||||
|
||||
HRESULT WINAPI StgIsStorageFile16(LPCOLESTR16 fn);
|
||||
HRESULT WINAPI StgIsStorageFile32(LPCOLESTR32 fn);
|
||||
#define StgIsStorageFile WINELIB_NAME(StgIsStorageFile)
|
||||
|
||||
HRESULT WINAPI StgOpenStorage16(const OLECHAR16* pwcsName,IStorage16* pstgPriority,DWORD grfMode,SNB16 snbExclude,DWORD reserved,IStorage16**ppstgOpen);
|
||||
HRESULT WINAPI StgOpenStorage32(const OLECHAR32* pwcsName,IStorage32* pstgPriority,DWORD grfMode,SNB32 snbExclude,DWORD reserved,IStorage32**ppstgOpen);
|
||||
#define StgOpenStorage WINELIB_NAME(StgOpenStorage)
|
||||
|
||||
|
||||
|
||||
#endif /* __WINE_WINE_OBJ_STORAGE_H */
|
|
@ -145,8 +145,9 @@ extern int WIN32_LastError;
|
|||
|
||||
/* HRESULT values for OLE, SHELL and other Interface stuff */
|
||||
/* the codes 4000-40ff are reserved for OLE */
|
||||
#define NOERROR 0
|
||||
#define S_OK 0
|
||||
#define NOERROR 0L
|
||||
#define S_OK ((HRESULT)0L)
|
||||
#define S_FALSE ((HRESULT)1L)
|
||||
|
||||
#define DISP_E_BADVARTYPE 0x80020008L
|
||||
#define DISP_E_OVERFLOW 0x8002000AL
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* Defines the basic types used by COM interfaces.
|
||||
*/
|
||||
|
||||
#ifndef __WINE_WTYPES_H
|
||||
#define __WINE_WTYPES_H
|
||||
|
||||
|
||||
#include "wintypes.h"
|
||||
|
||||
|
||||
typedef WORD CLIPFORMAT32, *LPCLIPFORMAT32;
|
||||
DECL_WINELIB_TYPE(CLIPFORMAT)
|
||||
|
||||
typedef CHAR OLECHAR16;
|
||||
typedef WCHAR OLECHAR32;
|
||||
DECL_WINELIB_TYPE(OLECHAR)
|
||||
|
||||
typedef LPSTR LPOLESTR16;
|
||||
typedef LPWSTR LPOLESTR32;
|
||||
DECL_WINELIB_TYPE(LPOLESTR)
|
||||
|
||||
typedef LPCSTR LPCOLESTR16;
|
||||
typedef LPCWSTR LPCOLESTR32;
|
||||
DECL_WINELIB_TYPE(LPCOLESTR)
|
||||
|
||||
typedef OLECHAR16 *BSTR16;
|
||||
typedef OLECHAR32 *BSTR32;
|
||||
DECL_WINELIB_TYPE(BSTR)
|
||||
|
||||
typedef BSTR16 *LPBSTR16;
|
||||
typedef BSTR32 *LPBSTR32;
|
||||
DECL_WINELIB_TYPE(LPBSTR)
|
||||
|
||||
struct _GUID
|
||||
{
|
||||
DWORD Data1;
|
||||
WORD Data2;
|
||||
WORD Data3;
|
||||
BYTE Data4[8];
|
||||
};
|
||||
|
||||
typedef struct _GUID GUID,*LPGUID,*REFGUID;
|
||||
typedef struct _GUID CLSID,*LPCLSID,*REFCLSID;
|
||||
typedef struct _GUID IID,*REFIID,*LPIID;
|
||||
|
||||
#define DECLARE_HANDLE(a) typedef HANDLE16 a##16; typedef HANDLE32 a##32
|
||||
DECLARE_HANDLE(HMETAFILEPICT);
|
||||
#undef DECLARE_HANDLE
|
||||
|
||||
typedef enum tagCLSCTX
|
||||
{
|
||||
CLSCTX_INPROC_SERVER = 0x1,
|
||||
CLSCTX_INPROC_HANDLER = 0x2,
|
||||
CLSCTX_LOCAL_SERVER = 0x4,
|
||||
CLSCTX_INPROC_SERVER16 = 0x8,
|
||||
CLSCTX_REMOTE_SERVER = 0x10,
|
||||
CLSCTX_INPROC_HANDLER16 = 0x20,
|
||||
CLSCTX_INPROC_SERVERX86 = 0x40,
|
||||
CLSCTX_INPROC_HANDLERX86 = 0x80
|
||||
} CLSCTX;
|
||||
|
||||
#define CLSCTX_INPROC (CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER)
|
||||
#define CLSCTX_ALL (CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER)
|
||||
#define CLSCTX_SERVER (CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER)
|
||||
|
||||
|
||||
#endif /* __WINE_WTYPES_H */
|
|
@ -272,6 +272,8 @@ extern WORD X11DRV_KEYBOARD_VkKeyScan(CHAR cChar);
|
|||
extern UINT16 X11DRV_KEYBOARD_MapVirtualKey(UINT16 wCode, UINT16 wMapType);
|
||||
extern INT16 X11DRV_KEYBOARD_GetKeyNameText(LONG lParam, LPSTR lpBuffer, INT16 nSize);
|
||||
extern INT16 X11DRV_KEYBOARD_ToAscii(UINT16 virtKey, UINT16 scanCode, LPBYTE lpKeyState, LPVOID lpChar, UINT16 flags);
|
||||
extern void KEYBOARD_HandleEvent( WND *pWnd, XKeyEvent *event );
|
||||
extern void KEYBOARD_UpdateState ( void );
|
||||
|
||||
/* X11 mouse driver */
|
||||
|
||||
|
|
|
@ -9,3 +9,5 @@ hello4
|
|||
hello5
|
||||
new
|
||||
rolex
|
||||
vartest
|
||||
volinfo
|
||||
|
|
|
@ -4,7 +4,7 @@ SRCDIR = @srcdir@
|
|||
VPATH = @srcdir@
|
||||
MODULE = none
|
||||
RCFLAGS = -w32 -h
|
||||
PROGRAMS = expand hello hello2 hello3 hello4 hello5 new rolex volinfo
|
||||
PROGRAMS = expand hello hello2 hello3 hello4 hello5 new rolex vartest volinfo
|
||||
ALL_LIBS = $(WINELIB) $(X_LIBS) $(XLIB) $(LIBS)
|
||||
|
||||
C_SRCS = \
|
||||
|
@ -16,6 +16,7 @@ C_SRCS = \
|
|||
hello5.c \
|
||||
new.c \
|
||||
rolex.c \
|
||||
vartest.c \
|
||||
volinfo.c
|
||||
|
||||
RC_SRCS = \
|
||||
|
@ -54,6 +55,9 @@ new: new.o
|
|||
rolex: rolex.o
|
||||
$(CC) -o rolex rolex.o $(LDOPTIONS) $(ALL_LIBS)
|
||||
|
||||
vartest: vartest.o
|
||||
$(CC) -o vartest vartest.o $(LDOPTIONS) $(ALL_LIBS)
|
||||
|
||||
volinfo: volinfo.o
|
||||
$(CC) -o volinfo volinfo.o $(LDOPTIONS) $(ALL_LIBS)
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,21 @@
|
|||
The purpose of this program is validate the implementation
|
||||
of the APIs related to VARIANTs. The validation is done
|
||||
by comparing the results given by the Windows implementation
|
||||
versus the Wine implementation.
|
||||
|
||||
This program tests the creation/coercion/destruction of VARIANTs.
|
||||
|
||||
This program was built in both Windows and Wine and the purpose
|
||||
of this program is to compare the output produced in both
|
||||
environments. To facilitate that, the log of the output created
|
||||
by the windows version of this program was added to CVS.
|
||||
|
||||
If you modify this program, it might be wise to rebuild it in
|
||||
Windows, regenerate that output file and resubmit it to CVS.
|
||||
|
||||
The output of the programs differ slightly from the one generated
|
||||
in Windows but most of the differences are caused by differences
|
||||
in the way that printf interprets some escape sequences and the way
|
||||
floating point numbers are printed. See the notes in vartest.c for
|
||||
more information.
|
||||
|
|
@ -56,6 +56,41 @@ static __inline__ int vm86plus( int func, struct vm86plus_struct *ptr )
|
|||
return -1;
|
||||
}
|
||||
|
||||
int XREAD(int fd,void*buf,int size) {
|
||||
int res;
|
||||
|
||||
while (1) {
|
||||
res = read(fd, buf, size);
|
||||
if (res==size)
|
||||
return res;
|
||||
if (res==-1) {
|
||||
if (errno==EINTR)
|
||||
continue;
|
||||
perror("dosmod read");
|
||||
return -1;
|
||||
}
|
||||
fprintf(stderr,"dosmod read only %d of %d bytes.\n",res,size);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
int XWRITE(int fd,void*buf,int size) {
|
||||
int res;
|
||||
|
||||
while (1) {
|
||||
res = write(fd, buf, size);
|
||||
if (res==size)
|
||||
return res;
|
||||
if (res==-1) {
|
||||
if (errno==EINTR)
|
||||
continue;
|
||||
perror("dosmod write");
|
||||
return -1;
|
||||
}
|
||||
fprintf(stderr,"dosmod write only %d of %d bytes.\n",res,size);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
void set_timer(struct timeval*tim)
|
||||
{
|
||||
struct itimerval cur;
|
||||
|
@ -65,7 +100,15 @@ void set_timer(struct timeval*tim)
|
|||
setitimer(ITIMER_REAL,&cur,NULL);
|
||||
}
|
||||
|
||||
volatile int sig_pend,sig_fatal=0;
|
||||
void get_timer(struct timeval*tim)
|
||||
{
|
||||
struct itimerval cur;
|
||||
|
||||
getitimer(ITIMER_REAL,&cur);
|
||||
*tim=cur.it_value;
|
||||
}
|
||||
|
||||
volatile int sig_pend,sig_fatal=0,sig_alrm=0;
|
||||
void*img;
|
||||
struct vm86plus_struct VM86;
|
||||
|
||||
|
@ -84,6 +127,12 @@ void bad_handler(int sig)
|
|||
signal(sig,bad_handler);
|
||||
}
|
||||
|
||||
void alarm_handler(int sig)
|
||||
{
|
||||
sig_alrm++;
|
||||
signal(sig,alarm_handler);
|
||||
}
|
||||
|
||||
int main(int argc,char**argv)
|
||||
{
|
||||
int mfd=open(argv[0],O_RDWR);
|
||||
|
@ -121,7 +170,7 @@ int main(int argc,char**argv)
|
|||
signal(SIGINT,sig_handler);
|
||||
signal(SIGUSR1,sig_handler);
|
||||
signal(SIGUSR2,sig_handler);
|
||||
signal(SIGALRM,sig_handler);
|
||||
signal(SIGALRM,alarm_handler);
|
||||
|
||||
signal(SIGQUIT,bad_handler);
|
||||
signal(SIGILL,bad_handler);
|
||||
|
@ -135,28 +184,33 @@ int main(int argc,char**argv)
|
|||
#endif
|
||||
/* report back to the main program that we're ready */
|
||||
ret=1; /* dosmod protocol revision 1 */
|
||||
write(1,&ret,sizeof(ret));
|
||||
XWRITE(1,&ret,sizeof(ret));
|
||||
/* context exchange loop */
|
||||
do {
|
||||
if (read(0,&func,sizeof(func))!=sizeof(func)) return 1;
|
||||
if (XREAD(0,&func,sizeof(func))!=sizeof(func)) return 1;
|
||||
if (func<0) break;
|
||||
switch (func) {
|
||||
case DOSMOD_SET_TIMER:
|
||||
if (read(0,&tim,sizeof(tim))!=sizeof(tim)) return 1;
|
||||
if (XREAD(0,&tim,sizeof(tim))!=sizeof(tim)) return 1;
|
||||
set_timer(&tim);
|
||||
/* no response */
|
||||
break;
|
||||
case DOSMOD_GET_TIMER:
|
||||
get_timer(&tim);
|
||||
if (XWRITE(1,&tim,sizeof(tim))!=sizeof(tim)) return 1;
|
||||
break;
|
||||
case DOSMOD_ENTER:
|
||||
default:
|
||||
if (read(0,&VM86,sizeof(VM86))!=sizeof(VM86)) return 1;
|
||||
if (sig_pend) ret=DOSMOD_SIGNAL; else
|
||||
if (XREAD(0,&VM86,sizeof(VM86))!=sizeof(VM86)) return 1;
|
||||
if (sig_pend||sig_alrm) ret=DOSMOD_SIGNAL; else
|
||||
ret=vm86plus(func,&VM86);
|
||||
if (write(1,&ret,sizeof(ret))!=sizeof(ret)) return 1;
|
||||
if (write(1,&VM86,sizeof(VM86))!=sizeof(VM86)) return 1;
|
||||
if (XWRITE(1,&ret,sizeof(ret))!=sizeof(ret)) return 1;
|
||||
if (XWRITE(1,&VM86,sizeof(VM86))!=sizeof(VM86)) return 1;
|
||||
switch (ret&0xff) {
|
||||
case DOSMOD_SIGNAL:
|
||||
ret=sig_pend; sig_pend=0;
|
||||
if (write(1,&ret,sizeof(ret))!=sizeof(ret)) return 1;
|
||||
if (!ret) { ret=SIGALRM; sig_alrm--; }
|
||||
if (XWRITE(1,&ret,sizeof(ret))!=sizeof(ret)) return 1;
|
||||
if (sig_fatal) return 1;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#define DOSMOD_ENTER 0x01 /* VM86_ENTER */
|
||||
#define DOSMOD_SET_TIMER 0x10
|
||||
#define DOSMOD_GET_TIMER 0x11
|
||||
|
||||
#define DOSMOD_SIGNAL 0x00 /* VM86_SIGNAL */
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue